/* =====================================================================
   ANTAEUS · the homepage, 2026-11 redesign. Layout and FINAL states only.
   Depends on tokens-12.css (palette, type, .btn, nav, footer). Every
   "from" state and every transition lives in motion-1.css, inside its
   prefers-reduced-motion: no-preference block (siteIntegrity §10), so
   with no motion stylesheet, no JS, or Reduce Motion the page is complete
   at rest: nothing waits at opacity 0.

   Hook contract (index.html owns the markup, story-1.js the behaviour):
     .hero .frag            the four fragments of a week (hero moment)
     .story                 the stage; .story-phone is sticky inside it
     .step[data-step]       a chapter; .shot[data-step] its screen
     .rail                  counter + progress line (#rail-n, #rail-fill)
     .try-phone             the phone the visitor drives (tabs, Train flow,
                            body map)
     .shot.<stem>           a real capture, CSS background keyed on theme
                            so only the active theme downloads
   ===================================================================== */

.home main { overflow-x: clip; }
i { font-style: normal; }
.home h1, .home h2, .home h3 { margin: 0; }

/* ---------- registers ---------- */
.home h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 16ch;
}
.home h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 3.8vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 20ch;
}
.home h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 26px;
  letter-spacing: -0.01em;
}
.step-k {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--t3);
}
.eyebrow { margin: 0 0 18px; font-size: 14px; font-weight: 600; color: var(--t2); }
.lede-x, .step-body {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 28px;
  color: var(--t2);
}
.lede-x + .lede-x { margin-top: 14px; }
.scene-cap {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--t3);
  max-width: 52ch;
}
.scene-cap a { color: inherit; }
.phone-cap { margin: 14px 0 0; text-align: center; font-size: 13px; line-height: 18px; color: var(--t3); }
.phone-cap a { color: inherit; }

/* ---------- the CTA pair: filled green + outline, never a third style ---------- */
.cta-pair { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* =====================================================================
   THE PHONE FRAME. One frame, three uses (hero, story, try-it). The
   capture ratio is the iPhone 17 Pro's (1206 x 2622); the screen keeps
   it so nothing is cropped.
   ===================================================================== */
.phone {
  --phone-w: 300px;
  width: var(--phone-w);
  max-width: 100%;
  margin: 0;
}
.phone .screen {
  position: relative;
  display: grid;
  border-radius: 48px;
  padding: 10px;
  background: var(--card-el);
  border: 1.5px solid var(--hairline);
  box-shadow: var(--catch), 0 30px 60px -30px rgba(0, 0, 0, 0.45);
  overflow: clip;
}
.phone .screen > * { grid-area: 1 / 1; }
.shot {
  display: block;
  width: 100%;
  aspect-ratio: 1206 / 2622;
  border-radius: 38px;
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
  background-color: var(--bg);
}

/* Real captures, VERSION 7, light and dark. The theme decides which file
   downloads; versioned in the FILENAME (siteIntegrity §3, §10). */
.shot.today { background-image: url('screens/today-light-7.webp'); }
.shot.week { background-image: url('screens/week-light-7.webp'); }
.shot.receipt { background-image: url('screens/receipt-light-7.webp'); }
.shot.session { background-image: url('screens/session-light-7.webp'); }
.shot.summary { background-image: url('screens/summary-light-7.webp'); }
.shot.records { background-image: url('screens/records-light-7.webp'); }
.shot.fuel { background-image: url('screens/fuel-light-7.webp'); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .shot.today { background-image: url('screens/today-dark-7.webp'); }
  :root:not([data-theme='light']) .shot.week { background-image: url('screens/week-dark-7.webp'); }
  :root:not([data-theme='light']) .shot.receipt { background-image: url('screens/receipt-dark-7.webp'); }
  :root:not([data-theme='light']) .shot.session { background-image: url('screens/session-dark-7.webp'); }
  :root:not([data-theme='light']) .shot.summary { background-image: url('screens/summary-dark-7.webp'); }
  :root:not([data-theme='light']) .shot.records { background-image: url('screens/records-dark-7.webp'); }
  :root:not([data-theme='light']) .shot.fuel { background-image: url('screens/fuel-dark-7.webp'); }
}
:root[data-theme='dark'] .shot.today { background-image: url('screens/today-dark-7.webp'); }
:root[data-theme='dark'] .shot.week { background-image: url('screens/week-dark-7.webp'); }
:root[data-theme='dark'] .shot.receipt { background-image: url('screens/receipt-dark-7.webp'); }
:root[data-theme='dark'] .shot.session { background-image: url('screens/session-dark-7.webp'); }
:root[data-theme='dark'] .shot.summary { background-image: url('screens/summary-dark-7.webp'); }
:root[data-theme='dark'] .shot.records { background-image: url('screens/records-dark-7.webp'); }
:root[data-theme='dark'] .shot.fuel { background-image: url('screens/fuel-dark-7.webp'); }


/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 40px;
  align-items: center;
  padding-top: clamp(40px, 7vh, 96px);
  padding-bottom: clamp(48px, 8vh, 120px);
  min-height: calc(100vh - 60px);
}
.hero-copy { position: relative; z-index: 1; }
.hero-stage {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.frags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  justify-items: end;
  align-self: start;
  padding-top: 18%;
  flex: none;
}
.frag {
  --dx: 0;
  --dy: 0;
  --rot: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  background: var(--card-el);
  border: 1px solid var(--hairline);
  box-shadow: var(--catch), 0 1px 2px rgba(0, 0, 0, 0.06);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.frag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--t3); flex: none; }
.frag[data-kind='workout']::before { background: var(--kind-workout); }
.frag[data-kind='run']::before { background: var(--info); }
.hero-phone { --phone-w: clamp(220px, 21vw, 300px); flex: none; }

/* =====================================================================
   THE STORY: six steps in a 12-column grid, the phone pinned in the
   right third. A step is tall enough to hold its screen on screen long
   enough to read.
   ===================================================================== */
.story {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  column-gap: clamp(24px, 4vw, 72px);
  padding-top: 24px;
}
.steps { list-style: none; margin: 0; padding: 0; grid-column: 2; }
.step {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0;
  max-width: 560px;
}
.step h2 { max-width: 18ch; }

.rail {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(50vh - 120px);
  align-self: start;
  height: 240px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.rail-count b { color: var(--t1); font-weight: 600; }
.rail-line { position: relative; width: 2px; background: var(--hairline); border-radius: 1px; }
.rail-line i { position: absolute; left: 0; top: 0; width: 100%; height: 16.66%; background: var(--t1); border-radius: 1px; }
.rail-cue { color: var(--t3); }

.story-phone {
  grid-column: 3;
  grid-row: 1;
  position: sticky;
  top: calc(50vh - var(--phone-h) / 2 - 10px);
  align-self: start;
  --phone-h: min(calc(100vh - 140px), 660px);
  --phone-w: calc(var(--phone-h) * 1206 / 2622);
}
/* Screens stack in one cell; JS brings one forward. With no JS the first
   screen is the one that shows. */
html.js .story-phone .shot:not(.on) { opacity: 0; }
html:not(.js) .story-phone .shot:not(:first-child) { display: none; }
.story-phone .shot { z-index: 0; }
.story-phone .shot.on { z-index: 1; }

/* =====================================================================
   SCENES
   ===================================================================== */
.scene { margin-top: 28px; }

/* rows: label left, figure right (the app's receipt rows) */
.rows .row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}
.rows .row:first-child { border-top: 0; }
.row-k { flex: 1 1 auto; font-size: 16px; color: var(--t2); }
.row-v { flex-shrink: 1; text-align: right; font-size: 16px; color: var(--t1); }
.row-v.fig { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.row-v.fig s { color: var(--ghost); text-decoration-thickness: 1.5px; font-size: 15px; }
.row-v.fig b { font-size: 20px; color: var(--t1); }
.rows.big .row { padding: 14px 0; }
.rows.big .row-v.fig s { font-size: clamp(20px, 2vw, 28px); text-decoration-thickness: 2px; }
.rows.big .row-v.fig b { font-size: clamp(44px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.02em; }
.pr { font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 4px; }

/* week strip */
.wk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wk-title { font-size: 17px; font-weight: 600; color: var(--t1); }
.wk-pace { font-size: 15px; font-weight: 600; color: var(--t2); font-variant-numeric: tabular-nums; }
.wk-days {
  list-style: none;
  margin: 14px 0 0;
  padding: 16px 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.wk-days li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wk-days .d { font-size: 14px; font-weight: 600; color: var(--t3); }
.k { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--kind-workout); }
.k-r { background: var(--info); }
.k-m1 { background: var(--ring-train); }
.k-w.k-m { background: linear-gradient(90deg, var(--kind-workout) 50%, var(--ring-train) 50%); }
.k-wr { background: linear-gradient(90deg, var(--kind-workout) 50%, var(--info) 50%); }
.k-none { width: 14px; height: 2px; margin: 10px 0; border-radius: 1px; background: var(--hairline); }
.wk-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--t2); }
.wk-legend li { display: flex; align-items: center; gap: 8px; }
.wk-legend .k { width: 10px; height: 10px; }

/* readiness */
.rd-state { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--warn); }

/* receipt tabs */
.r-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.r-tabs button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--t2);
  font: 600 14px/20px var(--f-sys);
  cursor: pointer;
}
.r-tabs button:hover { color: var(--t1); }
.r-tabs button[aria-selected='true'] { color: var(--t1); background: var(--card-el); border-color: var(--hairline); box-shadow: var(--catch); }
/* .rcpt, not .receipt: the phone's screen is .shot.receipt, and a shared
   class would hand it this panel's background shorthand (size: auto). */
.rcpt {
  display: grid;
  gap: 0;
  padding: 6px 20px 14px;
  background: var(--card-el);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--catch), var(--focal-shadow);
}
.rcpt[hidden] { display: none; }
.r-step { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px 0; }
.r-step + .r-step { border-top: 1px solid var(--hairline); }
.r-k { font-size: 13px; font-weight: 600; color: var(--t3); padding-top: 3px; }
.r-v p { margin: 0; }
.r-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 4px 0; color: var(--t2); font-size: 15px; }
.r-line span { flex-shrink: 1; }
.r-line b { font-weight: 600; font-size: 15px; color: var(--t1); text-align: right; flex-shrink: 1; }
.r-line.stack { flex-direction: column; align-items: flex-start; }
.r-line.stack b { text-align: left; }
.r-say { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--t1); max-width: 34ch; }
.r-note { margin-top: 10px !important; font-size: 14px; color: var(--t2); }
.r-note b { color: var(--t1); }

/* the set row and the rest band (step 4) */
.set-scene { display: grid; gap: 14px; max-width: 520px; }
.set-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--t1);
}
.set-n, .set-tag { font-size: 15px; color: var(--t3); }
.set-tag { font-family: var(--f-sys); font-weight: 600; }
.rest-band {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--card-el);
  border: 1px solid var(--hairline);
  box-shadow: var(--catch);
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--t1);
}
.rest-band > * { position: relative; }
.rest-band .sweep { position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); transform-origin: left center; }
.rest-band b { font-size: 30px; font-variant-numeric: tabular-nums; }
.rest-k { font-size: 14px; color: var(--t3); font-weight: 600; font-family: var(--f-sys); }
.rest-q { margin-left: auto; font-size: 15px; font-weight: 400; font-family: var(--f-sys); color: var(--t2); text-align: right; flex-shrink: 1; }

/* records */
.rec-over { margin: 0; font-size: 14px; font-weight: 600; color: var(--t3); }
.rec-fig {
  margin: 6px 0 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(64px, 8vw, 120px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
}
.rec-fig small { font-size: 0.32em; letter-spacing: 0; color: var(--t2); margin-left: 0.1em; }
.rec-step { margin: 10px 0 0; font-size: 20px; font-weight: 600; color: var(--accent); }

/* =====================================================================
   TRY IT
   ===================================================================== */
.try {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
  padding-top: clamp(64px, 10vh, 140px);
  padding-bottom: clamp(64px, 10vh, 140px);
}
.try-notes { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 46ch; font-size: 16px; line-height: 24px; color: var(--t2); }
.try-notes b { color: var(--t1); font-weight: 600; }
.try-phone { --phone-w: clamp(280px, 24vw, 330px); justify-self: center; }
.try-phone .screen { display: flex; flex-direction: column; aspect-ratio: 1206 / 2622; background: var(--bg); padding: 40px 0 0; border-width: 8px; border-color: var(--card-el); box-shadow: 0 0 0 1.5px var(--hairline), 0 30px 60px -30px rgba(0, 0, 0, 0.45); }
.try-phone .screen > * { grid-area: auto; }
/* The status bar is drawn once, opaque, over the top of whatever panel is
   showing, so a real capture's own bar sits under it rather than beside it. */
.sbar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 24px 0; height: 40px; background: var(--bg); border-radius: 40px 40px 0 0; font: 600 13px var(--f-display); color: var(--t1); }
.sbar i { width: 80px; height: 22px; border-radius: 11px; background: #000; margin: -4px auto 0; }
.try-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.try-panel[hidden] { display: none; }
/* A real capture fills the panel from the top; its own tab bar is clipped
   below, where the phone's live tab bar stands in for it. */
.try-panel .shot { flex: 1 1 auto; height: 100%; aspect-ratio: auto; border-radius: 0; background-size: 100% auto; background-position: top center; margin-top: -40px; }
.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 8px 10px 10px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 22px;
}
.tabbar button {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 6px 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--t3);
  font: 500 11px/14px var(--f-sys);
  cursor: pointer;
}
.tabbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-selected='true'] { color: var(--t1); background: var(--control); }

/* Train panel: the app's own anatomy, one line per set */
.try-panel.train { padding: 8px 18px 0; }
.tr-ex { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--t1); }
.tr-coach { margin: 8px 0 0; display: flex; align-items: baseline; gap: 8px; font-size: 14px; line-height: 20px; color: var(--t2); flex-wrap: wrap; }
.coach-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tip); align-self: center; flex: none; }
.coach-sig { font-weight: 600; color: var(--t1); }
.tr-sets { list-style: none; margin: 16px 0 0; padding: 0; }
.tr-set {
  display: grid;
  grid-template-columns: 24px 1fr 44px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 0;
  border-top: 1px solid var(--hairline);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
}
.tr-set:last-child { border-bottom: 1px solid var(--hairline); }
.tr-n { font-size: 14px; color: var(--t3); }
.tr-tag { font-family: var(--f-sys); font-weight: 600; font-size: 12px; color: var(--t3); text-align: right; }
.tr-set.ghost b, .tr-set.now:not(.done) b { color: var(--ghost); }
.tr-set.done b { color: var(--t1); }
.tr-set.now { font-size: 30px; }
.tr-complete {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ghost-outline);
  background: transparent;
  color: var(--t1);
  cursor: pointer;
  display: grid;
  place-items: center;
  justify-self: end;
}
.tr-complete svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tr-complete:hover { border-color: var(--t1); }
.tr-set.done .tr-complete { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-fill-text); cursor: default; }
.tr-band {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 14px 16px 12px;
  border-radius: var(--r-lg);
  background: var(--card-el);
  border: 1px solid var(--hairline);
}
.tr-band[hidden] { display: none; }
.tr-sweep { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(1); }
.tr-band-row { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); font-weight: 600; color: var(--t1); }
.tr-band-row b { font-size: 28px; font-variant-numeric: tabular-nums; }
.tr-q { margin: 8px 0 0; font-size: 14px; color: var(--t2); }
.tr-q[hidden], .tr-chips[hidden], .tr-receipt[hidden], .tr-reset[hidden] { display: none; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tr-chips button {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--t1);
  font: 500 13px/20px var(--f-sys);
  cursor: pointer;
}
.tr-chips button:hover { border-color: var(--t1); }
.tr-chips button[aria-pressed='true'] { background: var(--t1); color: var(--bg); border-color: var(--t1); }
.tr-receipt { margin: 10px 0 0; font-size: 14px; line-height: 20px; color: var(--t2); }
.tr-receipt b { color: var(--t1); font-weight: 600; }
.tr-reset { margin: 14px 0 0; align-self: flex-start; }
.tr-receipt:focus { outline: none; }

/* Progress panel: the body map inside the phone */
.try-panel.progress { padding: 4px 16px 0; }
.map-head p { margin: 0; }
.map-sel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.map-sel b { font-family: var(--f-display); font-size: 20px; color: var(--t1); }
.map-sel span { font-size: 13px; font-weight: 600; color: var(--t2); font-variant-numeric: tabular-nums; }
.map-sel-from { margin-top: 2px !important; font-size: 12px; line-height: 16px; color: var(--t3); min-height: 16px; }
.map-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; align-items: start; flex: 0 0 auto; }
.map-figs > div { display: flex; flex-direction: column; min-height: 0; }
.map-figs svg { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.map-figs .fig-label { text-align: center; font-size: 12px; font-weight: 600; color: var(--t3); margin: 4px 0 0; }
.map-nojs { grid-column: 1 / -1; align-self: center; color: var(--t3); text-align: center; font-size: 13px; }
.bm-base { fill: var(--silhouette); }
.bm-m { fill: var(--not-hit); cursor: pointer; stroke: var(--bg); stroke-width: 2; }
.bm-m.on { fill: var(--accent); }
.bm-m.low { fill: var(--warn); }
.bm-m.past { fill: var(--accent-deep); }
.bm-m.sel { stroke: var(--t1); stroke-width: 5; }
.map-scrub { margin-top: 6px; }
.map-scrub label { display: block; font-size: 12px; }
.map-scrub output { color: var(--t1); }
.map-scrub input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; cursor: pointer; }
.map-scrub input[type='range']::-webkit-slider-runnable-track { height: 2px; background: var(--hairline); border-radius: 1px; }
.map-scrub input[type='range']::-moz-range-track { height: 2px; background: var(--hairline); border-radius: 1px; }
.map-scrub input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -11px; border-radius: 50%; background: var(--t1); border: 4px solid var(--card-el); box-shadow: 0 0 0 1px var(--hairline); }
.map-scrub input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--t1); border: 4px solid var(--card-el); box-shadow: 0 0 0 1px var(--hairline); }
.map-scrub input[type='range']:focus-visible { outline: 2px solid var(--t1); outline-offset: 2px; border-radius: 4px; }
.map-ticks { display: flex; justify-content: space-between; padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--t3); }
.map-legend { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--t2); }
.map-legend li { display: flex; align-items: center; gap: 5px; }
.map-legend i { width: 8px; height: 8px; border-radius: 2px; }
.lg-on { background: var(--accent); }
.lg-low { background: var(--warn); }
.lg-past { background: var(--accent-deep); }
.lg-none { background: var(--not-hit); }
html:not(.js) .map-scrub, html:not(.js) #mob-toggle, html:not(.js) .tr-reset { display: none; }

/* =====================================================================
   BANDS (full-width sections on the card ground) AND BLOCK GRIDS
   ===================================================================== */
.fold { padding: clamp(64px, 10vh, 140px) 0; background: var(--card); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.fold + .fold { border-top: 0; }
.wrap.how, .wrap.tiers, .wrap.blocks, .wrap.join { padding-top: clamp(64px, 10vh, 140px); padding-bottom: clamp(64px, 10vh, 140px); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin-top: 40px; }
.grid3.tight { margin-top: 28px; gap: 24px 32px; }
.blk p { margin: 8px 0 0; font-size: 16px; line-height: 24px; color: var(--t2); }
.blk h3 { font-size: 20px; line-height: 24px; }

.how-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; max-width: 760px; }
.how-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-top: 1px solid var(--hairline); }
.how-list li:first-child { border-top: 0; }
.how-n { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1; color: var(--t3); font-variant-numeric: tabular-nums; }
.how-list p { margin: 6px 0 0; font-size: 16px; line-height: 24px; color: var(--t2); max-width: 56ch; }
.how-list b { color: var(--t1); }

.out-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; max-width: 980px; }
.out-list li { padding: 16px 0; border-top: 1px solid var(--hairline); font-size: 16px; line-height: 24px; color: var(--t2); }
.out-list b { color: var(--t1); }
.out-list a { color: var(--t1); }

.blocks { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.mob-scene { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; padding: 24px; background: var(--card-el); border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--catch), var(--focal-shadow); margin: 0; }
.mob-scene > .scene-cap { grid-column: 1 / -1; margin-top: 0; }
.mob-stage { position: relative; width: 200px; height: 200px; }
.mob-ring, .mob-fig { position: absolute; inset: 0; width: 100%; height: 100%; }
.mr-track { fill: none; stroke: var(--hairline); stroke-width: 1.5; }
.mr-breath { fill: none; stroke: var(--ring-train); stroke-width: 3; transform-box: fill-box; transform-origin: center; transform: scale(var(--b, 1)); }
.mob-stage .mob-fig { inset: auto; top: 15%; left: 15%; width: 70%; height: 70%; }
/* The mannequin (story-2.js draws it from data/mannequin-hipflexor-1.json).
   Its tones are the app's own rule, anatomy/color.ts ALPHA: the ink mixed
   into the ground at a fixed share per part, opaque, so neighbouring parts
   merge into one silhouette. The ground is the scene card. siteIntegrity 7e
   pins these shares to color.ts, light and dark. */
:root { --mq-trunk: 22%; --mq-near: 30%; --mq-far: 13%; --mq-top: 37%; --mq-top-far: 22%; --mq-shorts: 48%; --mq-shorts-far: 27%; --mq-shadow: 8%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --mq-trunk: 32%; --mq-near: 40%; --mq-far: 21%; --mq-top: 28%; --mq-top-far: 17%; --mq-shorts: 29%; --mq-shorts-far: 17%; --mq-shadow: 9%; }
}
:root[data-theme='dark'] { --mq-trunk: 32%; --mq-near: 40%; --mq-far: 21%; --mq-top: 28%; --mq-top-far: 17%; --mq-shorts: 29%; --mq-shorts-far: 17%; --mq-shadow: 9%; }
.mq-floor { stroke: var(--hairline); stroke-width: 1; }
.mq-shadow { fill: color-mix(in srgb, var(--t1) var(--mq-shadow), var(--card-el)); }
.mq-body.mq-trunk { fill: color-mix(in srgb, var(--t1) var(--mq-trunk), var(--card-el)); }
.mq-body.mq-near { fill: color-mix(in srgb, var(--t1) var(--mq-near), var(--card-el)); }
.mq-body.mq-far { fill: color-mix(in srgb, var(--t1) var(--mq-far), var(--card-el)); }
.mq-top { fill: color-mix(in srgb, var(--t1) var(--mq-top), var(--card-el)); }
.mq-top.mq-far { fill: color-mix(in srgb, var(--t1) var(--mq-top-far), var(--card-el)); }
.mq-shorts { fill: color-mix(in srgb, var(--t1) var(--mq-shorts), var(--card-el)); }
.mq-shorts.mq-far { fill: color-mix(in srgb, var(--t1) var(--mq-shorts-far), var(--card-el)); }
.mq-tint { fill: var(--ring-train); }
.mob-nojs { display: none; }
html:not(.js) .mob-nojs { display: block; margin-top: 8px !important; font-size: 13px; color: var(--t3); }
.mob-meta p { margin: 0; }
.mob-name { font-size: 14px; font-weight: 600; color: var(--t2); }
.mob-phase { margin-top: 8px !important; font-family: var(--f-display); font-weight: 600; font-size: 26px; line-height: 1.1; color: var(--t1); }
.mob-hold { margin-top: 6px !important; font-size: 14px; color: var(--t2); font-variant-numeric: tabular-nums; }
.mob-hold span { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--t1); }
#mob-toggle { margin-top: 14px; }
/* `hidden` loses to any author display rule (SITE_README, the plate trap): under Reduce Motion the Pause is gone, not disabled. */
#mob-toggle[hidden] { display: none; }

.spec { max-width: 820px; margin-top: 32px; }
.spec .lrow { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--hairline); min-height: 0; }
.spec .lrow:first-child { border-top: 0; }
.spec .lrow > .mono:first-child { flex: none; width: 140px; color: var(--t2); font-size: 15px; }
.spec .lrow p { margin: 0; font-size: 16px; line-height: 24px; color: var(--t1); flex-shrink: 1; }
.spec .lrow a { color: inherit; }

.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; max-width: 900px; }
.tier { padding: 24px; border-radius: var(--r-xl); background: var(--card-el); border: 1px solid var(--hairline); box-shadow: var(--catch); }
.tier.pro { border-color: var(--accent); }
.tier h3 { font-size: 24px; }
.tier-line { margin: 6px 0 0; font-size: 15px; color: var(--t2); }
.tier ul { margin: 16px 0 0; padding: 0; list-style: none; }
.tier li { padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 15px; line-height: 22px; color: var(--t1); }

.faq-list { margin: 32px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; max-width: 980px; }
.faq-list > div { padding: 18px 0; border-top: 1px solid var(--hairline); }
.faq-list dt { font-size: 17px; font-weight: 600; color: var(--t1); }
.faq-list dd { margin: 6px 0 0; font-size: 15px; line-height: 22px; color: var(--t2); }
.faq-list a { color: var(--t1); }

/* join */
.join-in { max-width: 640px; }
.join-label { display: block; margin-top: 28px; font-size: 13px; font-weight: 600; color: var(--t3); }
.signup { display: flex; gap: 10px; margin-top: 8px; }
.signup .field { flex: 1 1 auto; min-width: 0; }
.hp { position: absolute; left: -9999px; }
.note { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--t3); }
.note a { color: inherit; }
.note.err { color: var(--danger); }
#success { display: none; margin-top: 24px; }
#success.on { display: block; }
.aside { padding: 18px 20px; border-radius: var(--r-lg); background: var(--card-el); border: 1px solid var(--hairline); }
.aside p { margin: 0; color: var(--t1); font-weight: 600; }
.aside .cap { margin-top: 4px; font-weight: 400; color: var(--t2); }

/* the page-wide motion pause (WCAG 2.2.2), drawn by story-1.js */
.motion-pause {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card-el);
  color: var(--t1);
  font: 600 13px/20px var(--f-sys);
  box-shadow: var(--catch), 0 6px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.motion-pause[hidden] { display: none; }
/* On a phone every card is full width, so a bottom pill sits on whatever
   card ends at the fold (seen on the mobility scene at 390px). It moves to
   the top right, just under the sticky nav (tokens-12.css: 60px min-height
   plus its 1px rule and the safe-area top), where it covers at most a line
   of running text and never a card's own control. */
@media (max-width: 720px) {
  .motion-pause { top: calc(71px + env(safe-area-inset-top, 0px)); bottom: auto; right: 12px; }
}

/* focus: one ring everywhere */
.home :is(a, button, input, [tabindex]):focus-visible { outline: 2px solid var(--t1); outline-offset: 3px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .story { grid-template-columns: minmax(0, 1fr) auto; }
  .rail { display: none; }
  .steps { grid-column: 1; }
  .story-phone { grid-column: 2; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 36px; }
  .hero-stage { justify-content: center; }
  .frags { padding-top: 10%; }
  .hero-phone { --phone-w: clamp(180px, 42vw, 260px); }

  /* The phone pins to the top at a reduced height; the steps scroll
     under it. The screen keeps the capture's top; the frame fades out
     at the bottom so a cut is never a hard edge. */
  /* A column flex, with the phone ordered FIRST: it is the last child in
     the DOM (the grid placed it by row), and a sticky element only sticks
     inside the part of its container that follows it. It sits ABOVE the
     steps (z 3 over z 1) so text scrolls under its masked bottom edge and
     is never drawn across the screenshot. */
  .story { display: flex; flex-direction: column; align-items: center; padding-top: 0; }
  .story-phone {
    order: -1;
    position: sticky;
    top: 68px;
    z-index: 3;
    margin: 0 auto;
    --phone-h: 42vh;
    --phone-w: calc(42vh * 1206 / 2622);
    max-width: 220px;
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
    mask-image: linear-gradient(#000 70%, transparent);
  }
  .story-phone .screen { aspect-ratio: auto; height: var(--phone-h); border-radius: 40px 40px 0 0; border-bottom: 0; }
  .story-phone .shot { border-radius: 32px 32px 0 0; }
  .story-phone .phone-cap { display: none; }
  .steps { margin-top: -42vh; position: relative; z-index: 1; align-self: stretch; }
  .step { min-height: 0; padding: 46vh 0 48px; max-width: none; justify-content: flex-start; }
  .step h2 { max-width: none; }

  .try { grid-template-columns: 1fr; gap: 32px; }
  .try-phone { --phone-w: min(330px, 100%); }
  .grid3 { grid-template-columns: 1fr; gap: 24px; }
  .out-list, .faq-list { grid-template-columns: 1fr; }
  .blocks { grid-template-columns: 1fr; gap: 32px; }
  .mob-scene { grid-template-columns: 1fr; justify-items: start; }
  .tier-grid { grid-template-columns: 1fr; }
  .r-step { grid-template-columns: 1fr; gap: 6px; }
  .spec .lrow { flex-direction: column; gap: 4px; }
  .spec .lrow > .mono:first-child { width: auto; }
  .signup { flex-direction: column; }
  .signup .btn { width: 100%; }
  .rows.big .row-v.fig b { font-size: 40px; }
}
@media (max-width: 480px) {
  .home h1 { font-size: clamp(36px, 10.5vw, 44px); }
  .hero-stage { flex-direction: column; align-items: stretch; gap: 20px; }
  .frags { padding-top: 0; justify-items: stretch; width: 100%; grid-template-columns: 1fr 1fr; order: 2; }
  .frag { white-space: normal; font-size: 14px; }
  .hero-phone { --phone-w: 220px; align-self: center; }
  .set-row { grid-template-columns: 22px 1fr auto; font-size: 28px; }
  .rest-band { flex-wrap: wrap; }
  .rest-q { margin-left: 0; text-align: left; flex-basis: 100%; }
}
