/* ==========================================================================
   Agon — shared site styles (index, privacy, terms)
   Brand: near-black navy, paper text, Agon blue accent, crown mark.
   Type:  Space Grotesk (display) + Inter (text).
   ========================================================================== */

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

:root {
  --bg: #05070d;
  --bg-2: #0a0e18;
  --bg-3: #10162a;
  --paper: #f5f6f8;
  --dim: rgba(245, 246, 248, 0.64);
  --faint: rgba(245, 246, 248, 0.42);
  --ghost: rgba(245, 246, 248, 0.26);
  --hair: rgba(245, 246, 248, 0.12);
  --hair-strong: rgba(245, 246, 248, 0.22);
  --card: rgba(245, 246, 248, 0.035);
  --card-hover: rgba(245, 246, 248, 0.06);
  --accent: #6ea0ff;
  --accent-deep: #123a7a;
  --accent-glow: rgba(110, 160, 255, 0.28);
  --gold: #f2c14e;
  --mint: #7ee0b8;
  --coral: #ff8a80;
  --violet: #b99cff;

  --display: "Space Grotesk", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --text: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --wrap: 1160px;
  --radius: 18px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100%); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 100;
  padding: 0.5rem 0.9rem; background: var(--paper); color: var(--bg);
  border-radius: 8px; font-weight: 600; font-size: 0.85rem;
  transition: top 0.2s ease;
}
.skip:focus { top: 0.75rem; }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 13, 0.55);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.is-stuck { border-bottom-color: var(--hair); background: #05070d; }

.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em;
}
.brand img { width: 30px; height: auto; }

.nav__links { display: flex; align-items: center; gap: 0.25rem 1.6rem; }
.nav__links a { font-size: 0.9rem; font-weight: 500; color: var(--dim); transition: color 0.2s ease; }
.nav__links a:hover { color: var(--paper); }
@media (max-width: 720px) { .nav__links { display: none; } }

.pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.85rem; font-weight: 500; color: var(--paper);
  padding: 0.5rem 0.95rem; border: 1px solid var(--hair-strong); border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.pill:hover { border-color: rgba(245, 246, 248, 0.5); background: rgba(245, 246, 248, 0.06); }
.pill svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem;
  background: var(--paper); color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); }
.btn svg { width: 18px; height: 18px; }

.btn--ghost {
  background: transparent; color: var(--paper);
  border: 1px solid var(--hair-strong);
}
.btn--ghost:hover { background: rgba(245, 246, 248, 0.06); box-shadow: none; border-color: rgba(245, 246, 248, 0.45); }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(110, 160, 255, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 160, 255, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(110, 160, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 160, 255, 0); }
}

.h-display {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.5rem, 6.4vw, 5.25rem); line-height: 0.98; letter-spacing: -0.035em;
}
.h-section {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.05; letter-spacing: -0.03em;
  max-width: 20ch;
}
/* Smaller display size for two-sentence headings that must break exactly once */
.h-section--sm { font-size: clamp(1.6rem, 2.9vw, 2.35rem); max-width: 26ch; }
.soft { color: var(--dim); }
.lede { color: var(--dim); font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.55; max-width: 52ch; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { position: relative; padding: clamp(3rem, 5.5vw, 4.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 4vw, 3.5rem) 0; }
.section__head { display: grid; gap: 1.1rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.section__head .lede { max-width: 58ch; }
.section__head--split {
  grid-template-columns: 1fr; align-items: end;
}
@media (min-width: 880px) {
  .section__head--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; }
  .section__head--split .lede { margin-top: 0.35rem; }
}
.hr { height: 1px; background: var(--hair); border: 0; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(calc(100svh - 4.25rem), 980px);
  display: flex; align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem);
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -3;
  background: url("img/hero.jpg") center 32% / cover no-repeat;
  filter: grayscale(100%) contrast(1.02) brightness(0.9);
  transform: scale(1.06);
  animation: push 26s ease-out forwards;
}
@keyframes push { to { transform: scale(1); } }
.hero__tint { position: absolute; inset: 0; z-index: -2; background: var(--accent-deep); mix-blend-mode: color; pointer-events: none; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(90% 60% at 78% 12%, rgba(110, 160, 255, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.55) 0%, rgba(5, 7, 13, 0.25) 35%, rgba(5, 7, 13, 0.85) 80%, var(--bg) 100%);
}

.hero__copy { max-width: 42rem; }
.hero__copy > * + * { margin-top: 1.4rem; }
.hero__copy .h-display { max-width: 15ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.1rem; margin-top: 2.2rem; }
.hero__note { font-size: 0.85rem; color: var(--faint); }

.hero__copy .h-display,
.hero__copy .lede,
.hero__copy .hero__actions,
.hero__copy .hero__note { opacity: 0; }
.hero__copy .h-display { transform: translateY(22px); filter: blur(6px); animation: reveal 1.2s var(--ease-out) 0.3s forwards; }
.hero__copy .lede { animation: fade 1s ease 0.65s forwards; }
.hero__copy .hero__actions { animation: fade 1s ease 0.85s forwards; }
.hero__copy .hero__note { animation: fade 1s ease 1s forwards; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes fade { to { opacity: 1; } }

/* --------------------------------------------------------------------------
   Proof strip
   -------------------------------------------------------------------------- */
.strip { background: transparent; }
.strip__inner {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 2rem;
  padding-top: 1.5rem; padding-bottom: 1.5rem;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
@media (min-width: 760px) { .strip__inner { grid-template-columns: repeat(4, 1fr); } }
.strip__item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--dim); }
.strip__item svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.strip__item strong { color: var(--paper); font-weight: 600; }

/* --------------------------------------------------------------------------
   Cards (Race section) — same idiom as .steps: top hairline only, no boxes
   -------------------------------------------------------------------------- */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.card {
  position: relative;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--hair-strong);
}
.card__num {
  display: block;
  font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--accent); font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.9rem;
}
.card h3 {
  font-family: var(--display); font-weight: 500; font-size: 1.35rem;
  letter-spacing: -0.02em; line-height: 1.15;
}
.card p { margin-top: 0.7rem; color: var(--dim); font-size: 0.95rem; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.step {
  position: relative; padding: 1.75rem 0 0; border-top: 1px solid var(--hair-strong);
}
.step__num {
  font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--accent); font-weight: 600;
  margin-bottom: 0.9rem;
}
.step h3 { font-family: var(--display); font-weight: 500; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }
.step p { margin-top: 0.7rem; color: var(--dim); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Photo tiles (Arena)
   -------------------------------------------------------------------------- */
.tiles { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4 / 5; border: 1px solid var(--hair);
  background: var(--bg-2);
}
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.05) brightness(0.62);
  transform: scale(1.02);
  transition: transform 0.9s var(--ease-out), filter 0.6s ease;
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--accent-deep); mix-blend-mode: color; opacity: 0.85;
  transition: opacity 0.6s ease;
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.1) 25%, rgba(5, 7, 13, 0.55) 60%, rgba(5, 7, 13, 0.95) 100%);
}
.tile:hover img { transform: scale(1.06); filter: grayscale(40%) contrast(1.05) brightness(0.7); }
.tile:hover::before { opacity: 0.7; }
/* Fixed-height caption block, top-aligned, so eyebrows and headings sit on the
   same line across all three tiles regardless of how the text wraps. */
.tile__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 1.5rem; min-height: 11.5rem;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.tile__body .eyebrow { color: #9dbcff; margin-bottom: 0.6rem; }
.tile__body h3 { font-family: var(--display); font-weight: 500; font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.tile__body p { margin-top: 0.5rem; color: rgba(255, 255, 255, 0.78); font-size: 0.92rem; max-width: 34ch; }

/* --------------------------------------------------------------------------
   Split (Watch)
   -------------------------------------------------------------------------- */
.split { display: grid; gap: 2.5rem; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } .split--flip > :first-child { order: 2; } }
.split__media {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--hair);
  aspect-ratio: 4 / 3; background: var(--bg-2);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.05) brightness(0.72); }
.split__media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--accent-deep); mix-blend-mode: color; pointer-events: none; }
.split__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 7, 13, 0.75) 100%);
}
.split__copy > * + * { margin-top: 1.1rem; }
.checks { display: grid; gap: 0.75rem; margin-top: 1.6rem !important; }
.checks li { list-style: none; display: flex; gap: 0.75rem; align-items: flex-start; color: var(--dim); font-size: 0.97rem; }
.checks svg { width: 18px; height: 18px; flex: none; margin-top: 0.15rem; color: var(--accent); }
.checks strong { color: var(--paper); font-weight: 600; }

.split__media { aspect-ratio: 3 / 2; }
.split__media img { object-position: 30% 55%; }

/* Apple Watch render. The screen shows Agon's projection wheel; geometry and colours
   mirror LagosWatch2 Watch App/Views/ActiveRace/Pages/ProjectionWheelView.swift
   (grey track band, green progress arc when ahead, green "you" / purple "Hare" markers,
   blue ±window magnifier band, PROJECTED readout, zoom slider). */
.awatch {
  --w: clamp(180px, 46%, 250px);
  position: relative; width: var(--w); aspect-ratio: 1 / 1.22;
  border-radius: 26%;
  background: linear-gradient(160deg, #2a2d33 0%, #0e1014 55%, #1a1d22 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 30px 70px rgba(0, 0, 0, 0.65),
    0 0 90px rgba(110, 160, 255, 0.18);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35));
}
.awatch__crown {
  position: absolute; right: -6%; top: 26%; width: 7%; height: 17%;
  border-radius: 3px; background: linear-gradient(180deg, #3a3d44, #1a1c21);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.awatch__crown::after {
  content: ""; position: absolute; inset: 30% 30%; border-radius: 2px; background: #ff3b30; opacity: 0.85;
}
.awatch__button {
  position: absolute; right: -4.5%; top: 50%; width: 5%; height: 20%;
  border-radius: 3px; background: linear-gradient(180deg, #33363d, #171920);
}
.awatch__screen {
  position: absolute; inset: 6.5%; border-radius: 22%;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; padding: 9% 8%;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, Inter, sans-serif;
  color: #fff; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
/* Small overlay variant sitting on the photo */
.awatch--small {
  --w: clamp(120px, 30%, 168px);
  position: absolute; right: 7%; bottom: 9%; z-index: 3;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 24px 50px rgba(0, 0, 0, 0.7);
}
.awatch__screen--wheel { padding: 3%; }
.awatch__screen--wheel svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   Privacy band + CTA
   -------------------------------------------------------------------------- */
.band {
  display: grid; gap: 1.75rem; align-items: center;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--hair); border-radius: var(--radius);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(110, 160, 255, 0.12), transparent 60%),
    var(--card);
}
@media (min-width: 880px) { .band { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; } }
.band h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.1; }
.band p { margin-top: 0.75rem; color: var(--dim); max-width: 60ch; }
.band__facts { display: grid; gap: 0.6rem; font-size: 0.9rem; color: var(--dim); }
.band__facts li { list-style: none; display: flex; align-items: center; gap: 0.6rem; }
.band__facts svg { width: 16px; height: 16px; color: var(--mint); flex: none; }

.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(5rem, 11vw, 9rem) 0;
  isolation: isolate;
}
.cta__bg {
  position: absolute; inset: -30% 0; z-index: -3;   /* extra height = room for parallax travel */
  background: url("img/track.jpg") center / cover no-repeat;
  filter: grayscale(100%) contrast(1.05) brightness(0.45);
}
.cta__tint { position: absolute; inset: 0; z-index: -2; background: var(--accent-deep); mix-blend-mode: color; }
.cta__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 70% at 50% 50%, rgba(5, 7, 13, 0.72), rgba(5, 7, 13, 0.45) 60%, rgba(5, 7, 13, 0.9) 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 25%, transparent 75%, var(--bg) 100%);
}
.cta .h-section { margin: 0 auto; max-width: 18ch; }
.cta .lede { margin: 1.25rem auto 0; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem 1.1rem; margin-top: 2.25rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot { background: var(--bg); }
.foot > .wrap {
  border-top: 1px solid var(--hair);
}
.foot__inner {
  display: grid; gap: 2rem; padding: 3rem 0 2.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .foot__inner { grid-template-columns: 1fr auto; align-items: end; } }
.foot__tag { margin-top: 0.9rem; color: var(--dim); font-size: 0.92rem; max-width: 34ch; }
.foot h4 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 0.9rem; }
.foot ul { list-style: none; display: grid; gap: 0.55rem; }
.foot ul a { color: var(--dim); font-size: 0.92rem; transition: color 0.2s ease; }
.foot ul a:hover { color: var(--paper); }
.foot__bottom {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between;
  padding: 1.25rem 0 1.75rem; border-top: 1px solid var(--hair);
  font-size: 0.8rem; color: var(--faint);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
/* Only hide reveal targets when JS is running (html.js is set inline in <head>). */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 1.1s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Scroll-driven motion (values set from JS via --py / --op) */
[data-parallax] { will-change: transform; transform: translate3d(0, var(--py, 0px), 0) scale(1.06); }
.hero__bg[data-parallax] { animation: none; }
[data-hero-copy] { will-change: transform, opacity; transform: translate3d(0, var(--py, 0px), 0); opacity: var(--op, 1); }
.tile img, .split__media img {
  will-change: transform;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.12);
  transition: transform 0.25s linear, filter 0.6s ease;
}
.tile:hover img { transform: translate3d(0, var(--py, 0px), 0) scale(1.16); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

/* --------------------------------------------------------------------------
   Legal documents (privacy / terms)
   -------------------------------------------------------------------------- */
.doc-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--hair); }
.doc-hero .eyebrow { margin-bottom: 1.1rem; }
.doc-hero .h-section { max-width: 24ch; }
.doc-hero__meta { margin-top: 1.1rem; color: var(--faint); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.doc-hero__meta a { color: var(--dim); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--hair-strong); }
.doc-hero__meta a:hover { color: var(--paper); }

.doc { display: grid; gap: 3rem; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6rem); grid-template-columns: 1fr; }
@media (min-width: 960px) { .doc { grid-template-columns: 240px minmax(0, 1fr); gap: 4.5rem; } }

.toc { align-self: start; }
@media (min-width: 960px) { .toc { position: sticky; top: 5.75rem; } }
.toc h4 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 0.9rem; }
.toc ol { list-style: none; display: grid; gap: 0.15rem; border-left: 1px solid var(--hair); }
.toc a {
  display: block; padding: 0.4rem 0 0.4rem 1rem; margin-left: -1px;
  font-size: 0.88rem; color: var(--faint); border-left: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.toc a:hover { color: var(--paper); }
.toc a.is-active { color: var(--paper); border-left-color: var(--accent); }
@media (max-width: 959px) {
  .toc ol { border-left: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .toc a { padding: 0.4rem 0.8rem; border: 1px solid var(--hair); border-radius: 999px; margin: 0; }
  .toc a.is-active { border-color: var(--hair-strong); }
}

.prose { max-width: 68ch; }
.prose section { padding: 1.75rem 0 2rem; border-bottom: 1px solid var(--hair); scroll-margin-top: 5.5rem; }
.prose section:first-child { padding-top: 0; }
.prose section:last-child { border-bottom: 0; }
.prose h2 {
  font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.9rem;
  display: flex; gap: 0.75rem; align-items: baseline;
}
.prose h2 .num { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; flex: none; }
.prose p, .prose li { color: var(--dim); font-size: 1rem; line-height: 1.65; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 0.8rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--paper); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: rgba(110, 160, 255, 0.4); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose .note {
  margin-top: 2.5rem; padding: 1.1rem 1.25rem; border: 1px solid var(--hair); border-radius: var(--radius-sm);
  background: var(--card); font-size: 0.9rem; color: var(--faint);
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero__bg { transform: none; }
  .hero__copy > * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .reveal { opacity: 1; transform: none; }
  [data-parallax], [data-hero-copy], .tile img, .split__media img { transform: none !important; opacity: 1 !important; }
}

@media print {
  .nav, .foot, .toc, .skip { display: none !important; }
  body { background: #fff; color: #111; }
  .prose p, .prose li, .doc-hero__meta { color: #333; }
  .prose a { color: #123a7a; }
}

/* ==========================================================================
   Light zone — everything below the proof strip sits on white.
   Same tokens, re-pointed, so every component above keeps working.
   ========================================================================== */
.theme-light {
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --bg-3: #eceef2;
  --paper: #0b0d12;
  --dim: rgba(11, 13, 18, 0.62);
  --faint: rgba(11, 13, 18, 0.45);
  --ghost: rgba(11, 13, 18, 0.28);
  --hair: rgba(11, 13, 18, 0.1);
  --hair-strong: rgba(11, 13, 18, 0.2);
  --card: rgba(11, 13, 18, 0.03);
  --card-hover: rgba(11, 13, 18, 0.05);
  --accent: #2f6fe4;
  --accent-glow: rgba(47, 111, 228, 0.22);
  background: var(--bg); color: var(--paper);
}
.theme-light .btn:hover { box-shadow: 0 12px 34px rgba(11, 13, 18, 0.22); }
.theme-light .btn--ghost:hover { background: rgba(11, 13, 18, 0.04); border-color: rgba(11, 13, 18, 0.4); }
.theme-light .band {
  background: radial-gradient(80% 120% at 0% 0%, rgba(47, 111, 228, 0.08), transparent 60%), var(--bg-2);
  border-color: transparent;
}
.theme-light .band__facts a { color: var(--paper) !important; }
.theme-light .tile, .theme-light .split__media { border-color: transparent; box-shadow: 0 18px 50px rgba(11, 13, 18, 0.14); }

/* Nav follows the zone under it: dark glass over the hero/CTA, white glass over the light zone. */
.nav.nav--light { background: rgba(255, 255, 255, 0.72); color: #0b0d12; }
.nav.nav--light.is-stuck { background: rgba(255, 255, 255, 0.86); border-bottom-color: rgba(11, 13, 18, 0.1); }
.nav.nav--light .brand img { filter: invert(1); }
.nav.nav--light .nav__links a { color: rgba(11, 13, 18, 0.62); }
.nav.nav--light .nav__links a:hover { color: #0b0d12; }
.nav.nav--light .pill { color: #0b0d12; border-color: rgba(11, 13, 18, 0.2); }
.nav.nav--light .pill:hover { border-color: rgba(11, 13, 18, 0.5); background: rgba(11, 13, 18, 0.04); }

/* --------------------------------------------------------------------------
   Race cards — 3-up grid, every card the same size: a 16:10 visual on top
   (app screenshot from assets/img/app/, or the rebuilt projected-finish wheel)
   -------------------------------------------------------------------------- */
.theme-light .card { border-top: 0; padding-top: 0; }
.card__art {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); background: #eef0f3; aspect-ratio: 16 / 10; margin-bottom: 1.25rem;
}
.card__art > img {
  position: absolute; left: 50%; top: calc(1.25rem - var(--shift, 0px)); transform: translateX(-50%);
  width: min(78%, 270px); height: auto; border-radius: 16px;
  box-shadow: 0 18px 40px rgba(11, 13, 18, 0.16), 0 0 0 1px rgba(11, 13, 18, 0.06);
}
.card__art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; pointer-events: none; background: linear-gradient(180deg, rgba(238,240,243,0), #eef0f3); }
.card__art--dark::after { display: none; }
.card__art--photo img { position: static; transform: none; width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none;
  filter: grayscale(100%) contrast(1.08) brightness(0.6); transform: scale(1.02); transition: transform 0.9s var(--ease-out), filter 0.6s ease; }
.card__art--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--accent-deep); mix-blend-mode: color; opacity: 0.7; }
.card__art--photo::after { background: linear-gradient(180deg, rgba(5, 7, 13, 0) 40%, rgba(5, 7, 13, 0.45) 100%); height: 100%; }
.card:hover .card__art--photo img { transform: scale(1.06); filter: grayscale(40%) contrast(1.05) brightness(0.68); }

/* Generic rail controls (arrows + dots) — shared by the race and watch rails */
.rail-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.5rem; }
.rail-nav button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hair-strong); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.rail-nav button:hover { background: var(--card-hover); border-color: var(--ghost); }
.rail-nav button[disabled] { opacity: 0.35; pointer-events: none; }
.rail-nav button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-dots { display: flex; gap: 6px; }
.rail-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ghost); transition: background 0.2s ease, transform 0.2s ease; }
.rail-dots i.on { background: var(--paper); transform: scale(1.25); }

/* --------------------------------------------------------------------------
   App mocks — the consumer app's screens, rebuilt in HTML from the SwiftUI
   sources (Lagos/Views/Run/Setup/RaceSetupView.swift, AverageContenderView,
   ProjectedFinishView, RaceSplitView, ActiveTraininPlanView …). Same fonts
   (SF / system), same layout rhythm, same colours: black primary actions,
   green = you when ahead, purple = the Hare, secondary label grey.
   -------------------------------------------------------------------------- */
.app {
  --a-ink: #000; --a-sec: #8a8a8e; --a-hair: rgba(60, 60, 67, 0.12); --a-fill: #f2f2f7;
  --a-blue: #007aff; --a-green: #34c759; --a-red: #ff3b30; --a-purple: #af52de; --a-orange: #ff9500;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, sans-serif;
  color: var(--a-ink); background: #fff; border-radius: 22px;
  box-shadow: 0 22px 50px rgba(11, 13, 18, 0.16), 0 0 0 1px rgba(11, 13, 18, 0.06);
  padding: 16px 16px 20px; font-size: 13px; line-height: 1.3; text-align: left;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
.app * { min-width: 0; }
.app__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.app__bar b { font-weight: 600; font-size: 15px; }
.app__bar .btn-txt { color: var(--a-blue); font-size: 14px; font-weight: 500; }
.app__title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 12px; }
.app__cap { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--a-sec); margin: 14px 0 8px; }
.app__cap:first-child { margin-top: 0; }
.app__pos {
  width: 28px; height: 28px; border-radius: 50%; background: #000; color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.app__pos--hare { background: var(--a-purple); }
.app__pos--grey { background: #e5e5ea; color: #8a8a8e; }
.app__pos--sm { width: 22px; height: 22px; font-size: 11px; }
.app__row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--a-hair); }
.app__row:last-child { border-bottom: 0; }
.app__row .grow { flex: 1; }
.app__row .name { font-weight: 600; font-size: 14px; }
.app__row .sub { color: var(--a-sec); font-size: 11.5px; margin-top: 1px; }
.app__row .val { text-align: right; font-size: 13px; font-weight: 500; }
.app__row .val small { display: block; color: var(--a-sec); font-weight: 400; font-size: 11px; }
.app__cta {
  margin-top: 12px; height: 42px; border-radius: 12px; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px;
}
.app__cta svg { width: 15px; height: 15px; }
.app__panel { background: var(--a-fill); border-radius: 12px; padding: 12px; }
.app__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; }
.app__stats > div { padding: 4px 0; border-right: 1px solid var(--a-hair); }
.app__stats > div:nth-child(3n) { border-right: 0; }
.app__stats b { display: block; font-size: 15px; font-weight: 600; }
.app__stats span { font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--a-sec); }
.app__icons { display: flex; justify-content: space-between; margin: 4px 0 6px; }
.app__icons div { display: grid; justify-items: center; gap: 4px; font-size: 9px; white-space: nowrap; color: var(--a-ink); }
.app__icons svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app__icons .on { font-weight: 600; }
.app__start {
  width: 84px; height: 84px; border-radius: 50%; background: #000; color: #fff; margin: 14px auto 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.app__map {
  height: 92px; border-radius: 12px; margin-top: 10px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(0deg, rgba(0,0,0,0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(120deg, #eef2ea, #e6ebe1);
  position: relative; overflow: hidden;
}
.app__map::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--a-blue); border: 2.5px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 6px rgba(0, 122, 255, 0.18); }
.app__chips { display: flex; gap: 10px; overflow: hidden; margin: 6px 0 10px; }
.app__chip { flex: none; width: 58px; text-align: center; font-size: 10px; color: var(--a-sec); }
.app__chip i { display: flex; width: 58px; height: 58px; border-radius: 16px; background: var(--a-fill); align-items: center; justify-content: center; margin-bottom: 6px; color: #8a8a8e; }
.app__chip i svg { width: 24px; height: 24px; fill: currentColor; }
.app__chip.on { color: #000; font-weight: 600; }
.app__chip.on i { background: #000; color: #fff; }
.app__slider { position: relative; height: 24px; margin: 6px 0 2px; }
.app__slider::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--a-blue); border-radius: 1px; }
.app__slider::after { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 1px; border-top: 1px dashed rgba(0, 122, 255, 0.5); }
.app__slider .you { position: absolute; left: 0; top: 16px; font-size: 7px; letter-spacing: 0.1em; color: var(--a-sec); background: #fff; padding-right: 4px; }
.app__slider .knob { position: absolute; right: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.app__toggle { width: 42px; height: 26px; border-radius: 13px; background: var(--a-green); position: relative; flex: none; }
.app__toggle--purple { background: var(--a-purple); }
.app__toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.app p.body { font-size: 12.5px; color: rgba(60, 60, 67, 0.7); line-height: 1.4; }
.app p.body b { color: var(--a-ink); font-weight: 600; }

/* Splits (RaceSplitView / summary race tab) */
.split-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--a-hair); }
.split-row:last-child { border-bottom: 0; }
.split-row .bar { position: relative; flex: 1; height: 8px; border-radius: 4px; background: #e5e5ea; }
.split-row .bar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--a-red); border-radius: 1px; }
.split-row .bar b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: #d1d1d6; }
.split-row .km { font-size: 10px; color: var(--a-sec); margin-top: 3px; }
.split-row .d { text-align: right; font-weight: 600; font-size: 13px; color: var(--a-red); min-width: 44px; }
.split-row .d.up { color: var(--a-green); }
.split-row .d small { display: block; font-weight: 400; color: var(--a-sec); font-size: 10.5px; }

/* Projected finish (phone wheel) */
.proj { background: linear-gradient(180deg, #0f0f0f, #000); border-radius: 16px; padding: 10px; color: #fff; }
.proj svg { width: 100%; height: auto; display: block; }
.proj__foot { display: flex; justify-content: space-between; gap: 14px; margin-top: 10px; font-size: 12px; color: rgba(255,255,255,0.65); }
.proj__foot b { color: #fff; font-weight: 600; }
.proj__foot .hare { color: #c77dff; }
.app--dark { background: #000; color: #fff; --a-hair: rgba(255,255,255,0.12); --a-sec: rgba(235,235,245,0.6); box-shadow: 0 22px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08); }

/* Training plan (ActiveTraininPlanView.planCard + planStatLabels + selectedDayWorkouts) */
.plan { background: rgba(0,0,0,0.03); border-radius: 12px; padding: 14px 16px; }
.plan__meta { display: flex; justify-content: space-between; font: 500 9.5px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.18em; color: rgba(0,0,0,0.35); }
.plan__meta .lvl { color: var(--a-blue); font-weight: 600; letter-spacing: 0.12em; }
.plan__name { font-size: 20px; font-weight: 700; margin-top: 12px; letter-spacing: -0.01em; }
.plan__tag { font-size: 12px; color: rgba(0,0,0,0.4); margin-top: 2px; }
.plan__prog { height: 6px; border-radius: 3px; background: rgba(0,0,0,0.06); margin-top: 14px; overflow: hidden; }
.plan__prog i { display: block; height: 100%; width: 38%; background: var(--a-blue); border-radius: 3px; }
.plan__wk { font-size: 10px; color: rgba(0,0,0,0.35); margin-top: 6px; }
.plan__stats { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(0,0,0,0.03); border-radius: 12px; padding: 12px 0; margin-top: 10px; text-align: center; }
.plan__stats div + div { border-left: 1px solid var(--a-hair); }
.plan__stats b { display: block; font-size: 14px; font-weight: 600; }
.plan__stats span { font-size: 8px; letter-spacing: 0.12em; color: var(--a-sec); }
.wk-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.wk-row i { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.wk-row i svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wk-row .n { font-weight: 500; font-size: 13.5px; }
.wk-row .s { color: var(--a-sec); font-size: 11px; }
.wk-row .acts { margin-left: auto; display: flex; gap: 12px; }
.wk-row .acts svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wk-row.done .n { text-decoration: line-through; color: var(--a-sec); }
.plan-cards { display: grid; gap: 8px; }
.plan-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--a-fill); }
.plan-card i { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; font-size: 11px; letter-spacing: -0.02em; }
.plan-card > div { flex: 1; min-width: 0; }
.plan-card .n { font-weight: 600; font-size: 13.5px; }
.plan-card .s { color: var(--a-sec); font-size: 11px; }
.plan-card .tag { margin-left: auto; flex: none; white-space: nowrap; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 3px 6px; border-radius: 5px; background: rgba(175, 82, 222, 0.14); color: var(--a-purple); }
.plan-card .tag--new { background: rgba(52, 199, 89, 0.16); color: #1f9d48; }

/* ActiveTraininPlanView pieces: stat icons, training-load card, progress chart header, heatmap header */
.app--plan .plan__stats > div { display: grid; justify-items: center; gap: 2px; }
.app--plan .plan__stats b { font-size: 16px; }
.app--plan .plan__stats span { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 7.5px; letter-spacing: 0.04em; color: rgba(0,0,0,0.35); }
.ic { display: inline-flex; width: 11px; height: 11px; color: rgba(0,0,0,0.3); }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.load { gap: 10px; }
.load > .ic { width: 20px; height: 20px; color: #34c759; flex: none; margin-right: 2px; }
.load .st { font-size: 12.5px; font-weight: 600; }
.load .v { margin-left: auto; gap: 14px; }
.load .chev { color: #c7c7cc; font-size: 16px; line-height: 1; }
.prog { margin-top: 12px; padding: 0 2px; }
.prog__head { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--a-sec); margin-bottom: 8px; }
.prog__tog { display: inline-flex; gap: 4px; }
.prog__tog i { width: 24px; height: 24px; border-radius: 6px; background: #e5e5ea; color: var(--a-sec); display: inline-flex; align-items: center; justify-content: center; }
.prog__tog i.on { background: var(--a-purple); color: #fff; }
.prog__tog svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.prog__unit { font-size: 9px; color: var(--a-sec); margin-top: 2px; }
.heat { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #f2f2f7; }
.heat__head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.heat__head .chev { color: var(--a-purple); font-size: 20px; line-height: 1; width: 26px; text-align: center; }
/* ActiveTraininPlanView day banner: 38×56 chips, selected = accent, today = accent outline */
.dchips { display: flex; gap: 5px; padding: 2px 2px; overflow: hidden; }
.dchip { width: 36px; height: 54px; flex: none; border-radius: 10px; background: #fff; display: grid; grid-template-rows: auto auto 4px; align-content: center; justify-items: center; gap: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.04); }
.dchip small { font-size: 9px; font-weight: 600; color: var(--a-sec); }
.dchip b { font-size: 15px; font-weight: 700; line-height: 1; }
.dchip i { width: 4px; height: 4px; border-radius: 50%; }
.dchip.on { background: var(--a-blue); color: #fff; box-shadow: none; }
.dchip.on small { color: #fff; }
.dchip.on i { background: #fff !important; }
.dchip.today { box-shadow: inset 0 0 0 1.5px var(--a-blue); }
.load { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--a-fill); margin-top: 10px; }
.load .l { font-size: 11px; color: var(--a-sec); }
.load .v { display: flex; gap: 14px; text-align: center; }
.load .v b { display: block; font-size: 12px; font-weight: 700; }
.load .v span { font-size: 9px; color: var(--a-sec); }

/* Training plan rail: two phone screens (overview, schedule), swipeable */
.split__mock.split__mock--rail { padding: 0; display: block; }
.mrail { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.mslide { overflow: hidden; }
.mrail::-webkit-scrollbar { display: none; }
.mrail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.mslide { flex: 0 0 100%; scroll-snap-align: start; position: relative; padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem) 0; min-height: 420px; }
.mslide .app { position: absolute; top: clamp(1.5rem, 4vw, 2.75rem); left: 50%; transform: translateX(-50%); width: min(calc(100% - 2.5rem), 320px); }
.rail-nav--mock { margin-top: 0.9rem; }
@media (min-width: 900px) { .rail-nav--mock { grid-column: 2; justify-content: center; } }
/* TrainingScheduleView pieces */
.wkhead { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 4px 6px; font-size: 10px; color: var(--a-sec); line-height: 1.3; }
.wkhead b { font-weight: 700; }
.wkhead em { font-style: normal; font-size: 9px; }
.wkprog { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; }
.wkprog .d { width: 6px; height: 6px; border-radius: 50%; background: #d1d1d6; }
.wkprog .d.on { background: #34c759; }
.drow { display: flex; gap: 12px; padding: 4px 4px; border-bottom: 1px solid var(--a-hair); margin-left: 0; }
.drow.today { background: rgba(175,82,222,0.04); border-radius: 8px; }
.dcol { width: 40px; flex: none; align-self: flex-start; text-align: center; padding: 8px 0; border-radius: 10px; }
.dcol small { display: block; font-size: 9px; font-weight: 500; color: var(--a-sec); }
.dcol b { display: block; font-size: 17px; font-weight: 400; margin-top: 1px; }
.dcol.on { background: var(--a-purple); color: #fff; }
.dcol.on small { color: #fff; }
.dcol.on b { font-weight: 700; }
.tl { width: 2px; flex: none; background: #d1d1d6; align-self: stretch; }
.drow.past .tl { background: rgba(52,199,89,0.4); }
.dbody { flex: 1; min-width: 0; display: grid; gap: 6px; padding: 4px 0; }
.dbody.rest { display: flex; align-items: center; gap: 8px; color: var(--a-sec); font-size: 13px; padding: 12px 0; }
.dbody.rest svg { width: 12px; height: 12px; fill: none; stroke: #8a8a8e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dbody.rest .plus { margin-left: auto; font-size: 16px; line-height: 1; color: var(--a-sec); }
.wcard { display: flex; align-items: center; gap: 10px; }
.wcard .ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.wcard .ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wcard .n { font-size: 13.5px; font-weight: 500; }
.wcard.done .n { text-decoration: line-through; color: var(--a-sec); }
.wcard .s { font-size: 11px; color: var(--a-sec); margin-top: 2px; }
.wcard .ok, .wcard .add { margin-left: auto; display: inline-flex; }
.wcard .add { margin-left: 8px; color: var(--a-purple); }
.wcard .ok svg, .wcard .add svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wcard .chev { margin-left: auto; color: var(--a-sec); font-size: 16px; line-height: 1; }
.addw { font-size: 11px; color: var(--a-purple); padding: 2px 0 6px; }

/* --------------------------------------------------------------------------
   Train section (split, mock on the right)
   -------------------------------------------------------------------------- */
.split__mock {
  position: relative; border-radius: var(--radius); background: #eef0f3; overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem) 0;
  display: flex; justify-content: center; aspect-ratio: 1 / 1;
}
.split__mock .app { position: absolute; top: clamp(1.5rem, 4vw, 2.75rem); left: 50%; transform: translateX(-50%); width: min(calc(100% - 2.5rem), 320px); }
.split__copy > .eyebrow { line-height: 1; }
@media (min-width: 900px) { .split { align-items: stretch; } .split__mock { aspect-ratio: auto; height: 100%; min-height: 420px; } }
.split__mock::after { content: ""; position: absolute; inset: auto 0 0 0; height: 16%; pointer-events: none; background: linear-gradient(180deg, rgba(238,240,243,0), #eef0f3); }

/* --------------------------------------------------------------------------
   Apple Watch — swipeable rail of every race page (no frame). Each screen is
   a 184×224 rebuild of LagosWatch2 Watch App/Views/ActiveRace/Pages/*.swift at
   0.93 px per point (45 mm = 198×242 pt), same fonts, colours and geometry.
   -------------------------------------------------------------------------- */
.wrail-wrap { position: relative; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.wrail {
  --n: 5; --gap: 18px;
  display: flex; gap: var(--gap); cursor: grab;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  margin: 0 -0.75rem; padding: 0.75rem 0.75rem 1.25rem; scroll-padding: 0 0.75rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wrail::-webkit-scrollbar { display: none; }
.wrail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.wslide { flex: none; scroll-snap-align: start; width: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n)); min-width: 200px; display: grid; gap: 0.9rem; justify-items: center; }
@media (max-width: 1099px) { .wrail { --n: 4; } }
@media (max-width: 899px) { .wrail { --n: 3; } }
@media (max-width: 679px) { .wrail { --n: 2; } }
@media (max-width: 479px) { .wslide { width: 200px; } }
.wslide figcaption { font-size: 0.82rem; color: var(--dim); text-align: center; line-height: 1.35; max-width: 22ch; }
.wslide figcaption b { display: block; color: var(--paper); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.15rem; }
.wscreen {
  width: 184px; height: 224px; border-radius: 40px; background: #000; color: #fff; overflow: hidden;
  position: relative; box-shadow: 0 24px 50px rgba(11, 13, 18, 0.25), inset 0 0 0 1px rgba(255,255,255,0.08);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, Inter, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  padding: 26px 7px 8px 7px; display: flex; flex-direction: column;
}
.wscreen svg { display: block; overflow: visible; }
.wscreen .mono, .wbar, .wrow .m, .wzones, .wgauge text, .wsplit .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
/* watchOS vertical page indicator, right edge */
.wdots { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); display: grid; gap: 3px; }
.wdots i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.28); }
.wdots i.on { background: #fff; }
/* MetricsBar: time | distance km | pace, 13pt mono medium, black 30% bg, radius 8 */
.wbar {
  display: flex; align-items: center; background: rgba(0,0,0,0.3); border-radius: 8px; padding: 3px 0;
  font-size: 12px; font-weight: 500; line-height: 1; flex: none; height: 24px;
}
.wbar span { flex: 1; text-align: center; white-space: nowrap; }
.wbar span small { font-size: 8.4px; color: rgba(235,235,245,0.6); margin-left: 1px; }
.wbar span + span { border-left: 1px solid rgba(84,84,88,0.65); }
.wcap { text-align: center; font-size: 8.4px; font-weight: 500; color: rgba(255,255,255,0.7); margin: 4px 0 6px; }
/* Main race page */
.wmain { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wmain .t { font-size: 41px; font-weight: 700; color: #30d158; letter-spacing: -0.01em; line-height: 1; }
.wmain .d { font-size: 26px; font-weight: 700; margin-top: 6px; line-height: 1; }
.wmain .d small { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.5); margin-left: 2px; }
.wmain .hr { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: #e44a3c; font-size: 20px; font-weight: 700; line-height: 1; }
.wmain .hr svg { width: 11px; height: 11px; fill: currentColor; }
.wmain .hr em { font-style: normal; font-size: 7.5px; font-weight: 600; background: rgba(228,74,60,0.15); color: rgba(228,74,60,0.85); border-radius: 3px; padding: 2px 4px; }
.wmain .paces { display: flex; width: 100%; margin-top: 10px; align-items: center; padding: 0 8px; }
.wmain .paces > div { flex: 1; text-align: center; }
.wmain .paces > i { width: 1px; height: 22px; background: rgba(255,255,255,0.2); }
.wmain .paces small { display: block; font-size: 7.5px; font-weight: 500; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.wmain .paces b { font-size: 17px; font-weight: 700; line-height: 1; }
.wmain .paces b sub { font-size: 6.5px; font-weight: 500; color: rgba(255,255,255,0.4); vertical-align: baseline; }
.wmain .paces .avg b { color: #64d2ff; }
.wmain .paces .avg b sub { color: rgba(100,210,255,0.4); }
/* Leaderboard */
.wlb { display: flex; gap: 2px; flex: 1; min-height: 0; margin-top: 2px; }
.wlb__bars { width: 6px; display: grid; gap: 4px; justify-items: center; }
.wlb__bars i { width: 4px; }
.wlb__bars i { border-radius: 2px; background: rgba(255,255,255,0.05); }
.wlb__bars i.hare { background: rgba(175,82,222,0.4); }
.wlb__bars i.you { background: rgba(255,255,255,0.95); }
.wlb__rows { flex: 1; display: grid; gap: 3px; padding-right: 10px; min-width: 0; }
.wrow { display: flex; align-items: center; gap: 6px; padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,0.05); }
.wrow.hare { background: rgba(175,82,222,0.4); }
.wrow.you { background: rgba(255,255,255,0.95); color: #000; }
.wrow .p { width: 19px; height: 19px; border-radius: 5px; background: linear-gradient(180deg, rgba(0,0,0,0.8), #000 50%, rgba(0,0,0,0.8)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.wrow .grow { flex: 1; min-width: 0; }
.wrow .n { font-weight: 500; font-size: 11px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow.you .n { font-weight: 700; }
.wrow .m { display: flex; justify-content: space-between; gap: 4px; font-size: 8px; line-height: 1.1; margin-top: 1px; white-space: nowrap; }
/* Heart rate */
.whr { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 39px; font-weight: 700; line-height: 1; margin: 6px 0 4px; }
.whr svg { width: 26px; height: 26px; fill: #ff3b30; }
.wzones { display: flex; gap: 3px; padding: 0 8px; height: 49px; }
.wzones > div { flex: 1; text-align: center; font-size: 8px; line-height: 1.25; color: rgba(255,255,255,0.4); }
.wzones > div.on { flex: 1.25; color: #fff; font-weight: 700; }
.wzones .bar { height: 24px; border-radius: 2px; background: rgba(142,142,147,0.2); position: relative; margin-top: 2px; overflow: hidden; }
.wzones .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px; opacity: 0.4; }
.wzones > div.on .bar i { opacity: 0.9; }
.wzbar { display: flex; gap: 3px; margin: 3px 8px 0; height: 16px; border-radius: 4px; overflow: hidden; }
.wzbar i { flex: 1; opacity: 0.4; display: flex; align-items: center; justify-content: center; font-size: 8.4px; font-weight: 700; color: #000; font-style: normal; border-radius: 2px; }
.wzbar i.on { flex: 1.25; opacity: 1; }
.wzlabel { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 5px; font-size: 11px; font-weight: 600; }
.wzlabel i { width: 7.5px; height: 7.5px; border-radius: 50%; background: #e44a3c; }
.wzlabel small { font-weight: 400; color: rgba(235,235,245,0.6); font-size: 10px; }
/* Pace / TRIMP / Form charts */
.wchart { flex: 1; min-height: 0; position: relative; }
.wchart svg { width: 100%; height: 100%; }
.wlegend { display: flex; align-items: center; gap: 9px; font-size: 8.4px; font-weight: 500; padding: 3px 4px 0 40px; }
.wlegend i { display: inline-block; width: 6.5px; height: 3px; border-radius: 1px; margin-right: 4px; vertical-align: middle; }
.wlegend .hare { color: #af52de; }
.wlegend .sec { color: rgba(235,235,245,0.6); }
.wlegend .sec i { height: 7.5px; border-radius: 2px; background: rgba(175,82,222,0.4); }
.wlegend .ico { margin-left: auto; color: rgba(235,235,245,0.6); display: inline-flex; }
.wlegend .ico svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; }
/* Form bottom block */
.wform { padding: 8px 8px 0; }
.wform .st { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; font-weight: 600; color: #30d158; line-height: 1; }
.wform .cue { font-size: 10px; color: rgba(235,235,245,0.6); margin-top: 3px; line-height: 1.25; min-height: 24px; }
.wform .row { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 500; margin-top: 2px; }
.wform .row .hr { color: #ff3b30; display: inline-flex; align-items: center; gap: 3px; }
.wform .row .hr svg { width: 9px; height: 9px; fill: currentColor; }
.wform .row .ico { margin-left: auto; color: rgba(235,235,245,0.6); display: inline-flex; }
.wform .row .ico svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; }
/* Map page */
.wmapbody { position: relative; flex: none; height: 174px; margin: 0 -7px -8px; overflow: hidden; }
.wmapbody > svg.map { display: block; width: 184px; height: 174px; }
.wmapbody .mbtn { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: rgba(60,60,67,0.6); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; }
.wmapbody .mbtn svg { width: 11px; height: 11px; fill: none; stroke: #0a84ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Race split */
.wsplit .laps { display: flex; gap: 2px; padding: 0 22px; height: 15px; margin-top: 2px; align-items: center; }
.wsplit .laps i { flex: 1; height: 9.3px; border-radius: 2px; background: rgba(142,142,147,0.3); }
.wsplit .laps i.w { background: #30d158; }
.wsplit .laps i.l { background: #ff3b30; }
.wsplit .delta { display: flex; justify-content: center; gap: 11px; font-size: 11px; font-weight: 700; color: #30d158; margin: 4px 0 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.wsplit .delta svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -1px; margin-right: 2px; }
.checks--grid { grid-template-columns: 1fr; }
@media (min-width: 760px) { .checks--grid { grid-template-columns: 1fr 1fr; gap: 0.9rem 2.5rem; } }
