/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Tokens — matched to fitness dashboard */
:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #999;
  --light: #bbb;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --accent: #5b6abf;
  --accent-light: #e8eaf6;
  --deep: #3949ab;
  --rem: #7e57c2;
  --core: #90a4ae;
  --awake: #ef9a9a;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Shell */
.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 48px;
}

/* Header */
.header { margin-bottom: 48px; }
.header h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
}
.sub {
  font-size: 13px;
  color: var(--light);
  margin-top: 4px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 48px;
}
.tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  user-select: none;
}
.tab:hover { color: #888; }
.tab.active { color: var(--text); border-bottom-color: var(--text); }

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Stats row */
.stats-row {
  display: flex;
  gap: 72px;
  margin-bottom: 56px;
}
.stat__value {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat__label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat__sub {
  font-size: 12px;
  color: var(--light);
  margin-top: 4px;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* Section label */
.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

/* Chart area */
.chart-area { margin-bottom: 48px; }
.chart-label {
  font-size: 11px;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.chart-container {
  position: relative;
  height: 160px;
}
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-container.tall { height: 220px; }

/* Two col / Three col */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  margin-bottom: 56px;
}
.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.four-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.col-label {
  font-size: 11px;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.col-value {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.col-value span {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
}
.col-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* Year cards */
.year-card {
  margin-bottom: 16px;
}
.year-card__header {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}
.year-card__meta {
  font-size: 12px;
  color: var(--light);
  margin-bottom: 12px;
}
.year-card__row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.year-card__row-label { color: var(--muted); }
.year-card__row-value { font-weight: 500; }

/* Record row */
.record-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.record-row:last-child { border-bottom: none; }
.record-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  position: relative;
  top: 4px;
}
.record-text { font-size: 14px; flex: 1; }
.record-value { font-size: 14px; font-weight: 600; flex-shrink: 0; }
.record-date { font-size: 12px; color: var(--light); flex-shrink: 0; }

/* Legend */
.legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .shell { padding: 32px 20px; }
  .header h1 { font-size: 36px; }
  .stats-row { flex-wrap: wrap; gap: 32px; }
  .stat__value { font-size: 40px; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .three-col { grid-template-columns: 1fr; gap: 32px; }
  .four-col { grid-template-columns: 1fr 1fr; gap: 32px; }
  .col-value { font-size: 36px; }
  .tabs { overflow-x: auto; }
  .tab { padding: 12px 16px; font-size: 13px; }
}
