:root {
  --bg: #0a0b0d;
  --bg2: #121a16;
  --surface: #162019;
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef6f0;
  --muted: #8a8f98;
  --accent: #3be37a;
  --accent-dim: rgba(59, 227, 122, 0.14);
  --warn: #ffd60a;
  --danger: #ff3b4e;
  --z1: #6b8f71;
  --z2: #3be37a;
  --z3: #e8d44d;
  --z4: #f0a05a;
  --z5: #ff3b4e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 0% -10%, rgba(59, 227, 122, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(80, 140, 110, 0.18), transparent 50%),
    linear-gradient(165deg, #0a0b0d 0%, #101816 45%, #0a0f0d 100%);
  line-height: 1.45;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: var(--surface);
  padding: 8px 12px;
}

.noscript {
  padding: 16px;
  background: var(--danger);
  color: #111;
  text-align: center;
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.photo-feed {
  width: 100%;
  margin: -14px 0 28px;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.photo-feed[hidden] {
  display: none;
}

.photo-feed-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 227, 122, 0.35) transparent;
  padding: 14px 0;
}

.photo-feed-track::-webkit-scrollbar {
  height: 6px;
}
.photo-feed-track::-webkit-scrollbar-thumb {
  background: rgba(59, 227, 122, 0.35);
  border-radius: 999px;
}

.photo-tile {
  position: relative;
  flex: 0 0 auto;
  width: min(42vw, 280px);
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #1a2420;
}

.photo-tile:first-child {
  margin-left: 0;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.photo-tile:hover img {
  transform: scale(1.04);
}

.photo-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.photo-name {
  font-family: var(--font-num);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-sub,
.photo-caption {
  font-size: 0.72rem;
  color: rgba(238, 246, 240, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .photo-tile {
    width: 72vw;
  }
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.hero h1 {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.lede {
  margin-top: 10px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.tag {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
}


.btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0a0b0d;
  background: var(--accent);
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.kpi .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.kpi .value {
  font-family: var(--font-num);
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 4px;
}
.kpi .sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.pr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.pr-card.is-empty .value {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.pr-card .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.pr-card .value {
  font-family: var(--font-num);
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 4px;
}

.pr-card .value a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.pr-card .value a:hover {
  border-bottom-color: var(--accent, #7ec898);
}

.pr-card .sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.padel-row td:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: min(380px, 55vw);
  margin-bottom: 12px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.panel {
  background: rgba(22, 32, 25, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 8px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 14px;
}

.panel-head h2 {
  font-family: var(--font-num);
  font-size: 1.15rem;
  font-weight: 700;
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.zone-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.zone-row {
  display: grid;
  grid-template-columns: 96px 1fr 64px 40px;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
}

.zone-row .bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.zone-row .bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  min-width: 0;
}

.zone-row small { color: var(--muted); font-size: 0.72rem; }
.zone-row > span:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.zone-row .pct { text-align: right; color: var(--muted); font-size: 0.8rem; }

.table-wrap {
  overflow-x: auto;
  margin: 0 -6px 10px;
  padding: 0 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

td a {
  color: var(--accent);
  text-decoration: none;
}
td a:hover { text-decoration: underline; }

.zone-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  text-transform: uppercase;
}
.zone-pill.z0 { color: var(--muted); background: rgba(255, 255, 255, 0.06); }
.zone-pill.z1 { color: var(--z1); }
.zone-pill.z2 { color: var(--z2); }
.zone-pill.z3 { color: #e8d44d; }
.zone-pill.z4 { color: var(--z4); }
.zone-pill.z5 { color: var(--z5); }

.errors {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 59, 78, 0.35);
  border-radius: 12px;
  background: rgba(255, 59, 78, 0.08);
}
.errors h2 { font-size: 0.95rem; margin-bottom: 8px; }
.errors li { margin-left: 18px; color: var(--muted); font-size: 0.88rem; }

.athlete-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  max-width: 280px;
}
.athlete-chip img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.athlete-chip .name {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
}
.athlete-chip .meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding-bottom: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.stat-card h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  padding: 4px 0;
}
.stat-line span:last-child {
  font-weight: 600;
  color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.stack-list,
.clubs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.stack-item,
.club-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.stack-item .title,
.club-card .title {
  font-weight: 600;
}
.stack-item .sub,
.club-card .sub {
  font-size: 0.8rem;
  color: var(--muted);
}
.club-card {
  text-decoration: none;
  color: inherit;
}
.club-card:hover {
  border-color: rgba(59, 227, 122, 0.35);
}
.club-card .members {
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 4px 0 12px;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

/* ── status colours on KPIs / sync tag ─────────────────────────────── */
.kpi.good { border-color: rgba(59, 227, 122, 0.4); }
.kpi.good .value { color: var(--accent); }
.kpi.warn { border-color: rgba(255, 214, 10, 0.4); }
.kpi.warn .value { color: var(--warn); }
.kpi.bad { border-color: rgba(255, 59, 78, 0.5); }
.kpi.bad .value { color: var(--danger); }
.tag.stale { color: var(--warn); border-color: rgba(255, 214, 10, 0.4); }

.chart-wrap.short { height: min(280px, 50vw); }

/* ── segmented toggle ──────────────────────────────────────────────── */
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.03);
}
.seg-btn {
  font: inherit;
  font-size: 0.78rem;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.seg-btn.is-on { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.panel > .hint { margin: -6px 0 10px; }

/* ── consistency grid ──────────────────────────────────────────────── */
.consistency {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto repeat(7, auto);
  grid-template-columns: 30px repeat(26, minmax(9px, 1fr));
  gap: 3px;
  max-width: 820px;
  padding-bottom: 14px;
}
.dlabel, .mlabel { font-size: 0.62rem; color: var(--muted); line-height: 1; align-self: center; white-space: nowrap; }
.mlabel { overflow: visible; width: 0; }
.cell { aspect-ratio: 1; border-radius: 3px; background: rgba(255, 255, 255, 0.05); }
.cell.future { background: transparent; }
.cell.l1 { background: rgba(59, 227, 122, 0.25); }
.cell.l2 { background: rgba(59, 227, 122, 0.5); }
.cell.l3 { background: rgba(59, 227, 122, 0.75); }
.cell.l4 { background: var(--accent); }

/* ── section labels / Whoop ───────────────────────────────────────── */
.section-label {
  font-family: var(--font-num);
  font-size: 1.35rem;
  margin: 28px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-label:first-child { margin-top: 0; }
.section-label span {
  font-family: "Outfit", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.connect p { margin-bottom: 10px; }
.connect pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  overflow-x: auto;
  margin-bottom: 10px;
}
.connect code { color: var(--accent); }
.rec-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.rec-pill.good { color: var(--accent); background: var(--accent-dim); }
.rec-pill.warn { color: var(--warn); background: rgba(255, 214, 10, 0.14); }
.rec-pill.bad { color: var(--danger); background: rgba(255, 59, 78, 0.14); }

/* ── insights ──────────────────────────────────────────────────────── */
.muted { color: var(--muted); font-size: 0.78rem; }
.bar-fill.good { background: var(--accent); }
.bar-fill.ok { background: #7ed6a0; }
.bar-fill.warn { background: var(--warn); }
.bar-fill.bad { background: var(--danger); }
.bar-track { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; overflow: hidden; }
.bar-track .bar-fill { height: 100%; border-radius: 999px; }

.readiness {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 24px;
  padding-bottom: 18px;
}
.ready-main .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ready-score { font-family: var(--font-num); font-size: 3.4rem; font-weight: 800; line-height: 1.05; margin-top: 6px; }
.ready-score small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.ready-main.good .ready-score { color: var(--accent); }
.ready-main.ok .ready-score { color: #7ed6a0; }
.ready-main.warn .ready-score { color: var(--warn); }
.ready-main.bad .ready-score { color: var(--danger); }
.ready-plan { font-weight: 600; margin-top: 6px; }
.ready-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 20px; align-content: center; }
.rp-head { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 6px; }
.rp-value { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }

.drivers { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; max-width: 880px; }
.driver { display: grid; grid-template-columns: minmax(120px, 1.1fr) 2fr 44px; gap: 10px; align-items: center; font-size: 0.86rem; }
.d-track { position: relative; height: 18px; }
.d-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.d-ci { position: absolute; top: 7px; height: 4px; border-radius: 999px; background: currentColor; opacity: 0.35; }
.d-dot { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: currentColor; }
.d-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.driver.up { color: var(--accent); }
.driver.down { color: var(--danger); }
.driver.unclear { color: var(--muted); }
.driver .d-label { color: var(--text); }
.driver.unclear .d-label { color: var(--muted); }
.d-note { margin-top: 4px; }


.body-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding-bottom: 14px; }
.stat-tile { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat-tile .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat-tile .value { font-family: var(--font-num); font-size: 1.35rem; font-weight: 700; margin-top: 4px; }
.stat-tile .sub { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

.body-chart-head { margin-top: 4px; }
.sub-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }

.patterns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; padding-bottom: 14px; }
.pat-card { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pat-card h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.pat-row { display: grid; grid-template-columns: 120px 1fr 40px 44px; gap: 8px; align-items: center; font-size: 0.84rem; margin-bottom: 7px; }
.pat-val { text-align: right; font-weight: 600; }
.pat-card .hint { margin-top: 6px; font-size: 0.76rem; }

@media (max-width: 640px) {
  .readiness { grid-template-columns: 1fr; }
  .driver { grid-template-columns: 1fr 1.4fr 40px; }
  .pat-row { grid-template-columns: 96px 1fr 36px 40px; }
}

/* ── fitness · assisted by Claude ─────────────────────────────────── */
.assist { border-color: rgba(30, 155, 255, 0.35); }
.assist-top { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 20px; margin-bottom: 16px; }
.assist-vo2 .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.assist-big { font-family: var(--font-num); font-size: 3.2rem; font-weight: 800; line-height: 1.05; color: #1e9bff; margin: 4px 0; }
.assist-big small { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.assist-vo2 .sub { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.assist-trend { display: inline-block; margin-top: 6px; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.assist-trend.up { color: var(--accent); background: var(--accent-dim); }
.assist-trend.down { color: var(--warn); background: rgba(255, 214, 10, 0.14); }
.assist-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; align-content: start; }
.assist-method { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.assist-method.missing { opacity: 0.6; }
.am-head { display: flex; justify-content: space-between; font-size: 0.86rem; }
.am-head b { font-variant-numeric: tabular-nums; }
.am-note { font-size: 0.74rem; color: var(--muted); margin-top: 4px; }
.assist-races { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.race-card { border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.race-card.no { border-color: rgba(255, 59, 78, 0.35); }
.race-card.yes { border-color: rgba(59, 227, 122, 0.45); }
.race-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.verdict { font-family: var(--font-num); font-size: 1.5rem; font-weight: 800; }
.race-card.no .verdict { color: var(--danger); }
.race-card.yes .verdict { color: var(--accent); }
.race-time { font-family: var(--font-num); font-size: 1.8rem; font-weight: 800; margin-top: 4px; }
.race-why { font-size: 0.84rem; color: var(--muted); margin-top: 4px; }
.race-card ul { margin: 10px 0 0 18px; font-size: 0.84rem; display: flex; flex-direction: column; gap: 4px; }
.assist-bottom { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
.assist-bottom .sub-title { margin-bottom: 8px; }
.assist-notes { margin-left: 18px; font-size: 0.86rem; display: flex; flex-direction: column; gap: 6px; }
.assist-foot { margin: 14px 0 10px; font-size: 0.74rem; }
.assist-foot code { color: var(--accent); }

@media (max-width: 760px) {
  .assist-top, .assist-races, .assist-bottom { grid-template-columns: 1fr; }
}

/* ── misc ──────────────────────────────────────────────────────────── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.value-sm { font-weight: 600; color: var(--accent); white-space: nowrap; }
.part {
  margin-left: 8px;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
}

.dialog {
  margin: auto;
  max-width: 520px;
  width: calc(100% - 32px);
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.dialog h2 { font-family: var(--font-num); font-size: 1.1rem; margin-bottom: 10px; }
.dialog p { margin-bottom: 10px; }
.dialog pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  overflow-x: auto;
  margin-bottom: 10px;
}
.dialog code { color: var(--accent); }

@media (max-width: 640px) {
  .app { padding: 20px 16px 48px; }
  .hero-meta { align-items: flex-start; }
  .zone-row { grid-template-columns: 72px 1fr 56px 34px; }
  #acts-table th:nth-child(5), #acts-table td:nth-child(5),
  #acts-table th:nth-child(6), #acts-table td:nth-child(6),
  #acts-table th:nth-child(9), #acts-table td:nth-child(9) { display: none; }
}

.bioage { border-color: rgba(160, 230, 160, 0.35); }
.bio-younger { color: #7fd99a; }
.bio-older { color: #f2a36e; }

/* Whoop-style rings */
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ring-card { background: var(--panel, rgba(255, 255, 255, 0.03)); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px 12px; text-align: center; }
.ring-svg { width: min(150px, 100%); height: auto; display: block; margin: 0 auto 6px; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 0.8s ease; }
.ring-value { font-family: var(--font-num); font-size: 24px; font-weight: 800; text-anchor: middle; }
.ring-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ring-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 520px) {
  .rings { gap: 8px; }
  .ring-card { padding: 10px 4px; }
  .ring-value { font-size: 22px; }
  .ring-sub { font-size: 0.68rem; }
}

/* ════════════════════════════════════════════════════════════════════
   Sleek theme (Nov 2026): near-black canvas, flat graphite cards,
   one type family, big tight numerals, small tracked uppercase labels.
   ════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #0a0b0d;
  --bg2: #101215;
  --surface: #16181c;
  --surface-2: #1d2025;
  --line: rgba(255, 255, 255, 0.06);
  --text: #f4f5f7;
  --muted: #8a8f98;
  --faint: #5b6068;
  --accent: #3be37a;
  --accent-dim: rgba(59, 227, 122, 0.12);
  --blue: #1e9bff;
  --warn: #ffd60a;
  --danger: #ff3b4e;
  --sleep: #8fa2ff;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Inter", system-ui, sans-serif;
  --radius: 20px;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  background: radial-gradient(ellipse 120% 60% at 50% -20%, #1a1d22 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  letter-spacing: -0.005em;
}

.app { max-width: 1080px; padding: 32px 16px 64px; }

/* header */
.hero { border-bottom: 0; margin-bottom: 20px; padding-bottom: 8px; align-items: center; }
.eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em; color: var(--faint); }
.hero h1 { font-weight: 900; font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: -0.045em; }
.lede { font-size: 0.9rem; max-width: 46ch; }
.hero-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag { background: var(--surface); border: 0; font-size: 0.74rem; font-weight: 600; padding: 7px 12px; }
.btn {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 14px;
  text-decoration: none; transition: background 0.2s ease;
}
.btn:hover { background: #262a30; filter: none; }

/* section labels */
.section-label {
  font-family: var(--font); font-size: 0.72rem !important; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--text); margin: 34px 0 12px; border: 0;
}
.section-label span { color: var(--faint); font-weight: 600; letter-spacing: 0.08em; margin-left: 8px; }

/* cards */
.panel, .kpi, .pr-card, .stat-tile, .stat-card, .ring-card, .race-card, .assist-method, .pat-card, .club-card, .stack-item, .ready-part, .driver {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}
.panel { padding: 20px 20px 18px; margin-bottom: 14px; }
.assist-method, .ready-part, .stack-item, .pat-card, .driver { background: var(--surface-2); border-radius: 14px; }
.panel-head h2 { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; }
.hint { color: var(--faint); font-size: 0.76rem; }
.sub-title { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.assist, .bioage, .kpi.good, .kpi.warn, .kpi.bad, .race-card.yes { border-color: transparent; }

/* numbers + labels */
.kpi .label, .pr-card .label, .stat-tile .label, .assist-vo2 .label, .ready-main .label {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; color: var(--muted);
}
.kpi .value, .pr-card .value, .stat-tile .value { font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.kpi .value { font-size: 1.9rem; }
.assist-big, .ready-score { font-weight: 900; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.kpi { position: relative; overflow: hidden; }
.kpi.good::before, .kpi.warn::before, .kpi.bad::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0;
}
.kpi.good::before { background: var(--accent); }
.kpi.warn::before { background: var(--warn); }
.kpi.bad::before { background: var(--danger); }

/* rings: the hero of the page */
.rings { gap: 12px; margin-bottom: 12px; }
.ring-card { padding: 22px 10px 18px; background: linear-gradient(180deg, #1a1d21 0%, var(--surface) 100%); }
.ring-svg { width: min(168px, 100%); }
.ring-track { stroke: rgba(255, 255, 255, 0.07); stroke-width: 9; }
.ring-fill { stroke-width: 9; }
.ring-value { font-family: var(--font-num); font-weight: 900; font-size: 26px; letter-spacing: -1px; }
.ring-label { margin-top: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.ring-sub { color: var(--muted); font-size: 0.74rem; }

/* bars, tables, pills */
.bar-track { background: rgba(255, 255, 255, 0.06); border-radius: 99px; }
.bar-fill { border-radius: 99px; }
th { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); font-weight: 700; }
td, th { border-color: var(--line) !important; }
.rec-pill { border-radius: 99px; font-weight: 700; }
.seg { background: var(--surface-2); border-radius: 99px; padding: 3px; border: 0; }
.seg-btn { border-radius: 99px; font-weight: 700; font-size: 0.74rem; }
.seg-btn.is-on { background: #2a2e35; color: var(--text); }
.photo-feed { border: 0; background: transparent; }

/* bio age */
.bio-chart { position: relative; height: 210px; margin-top: 10px; }
.bio-younger { color: var(--accent); }
.bio-older { color: #ff9f43; }

@media (max-width: 640px) {
  .app { padding: 20px 16px 48px; }
  .hero-meta { justify-content: flex-start; }
  .panel { padding: 16px 14px; border-radius: 18px; }
  .ring-card { padding: 14px 4px 12px; border-radius: 18px; }
  .ring-value { font-size: 24px; }
  .assist-top { grid-template-columns: 1fr; }
}

/* installed iPhone app: respect the notch / home indicator */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
.btn-sync { background: var(--blue); color: #fff; border-color: transparent; }
.btn-sync:disabled { opacity: 0.75; }
