/* ─────────────────────────────────────────────────────────────
   Protocol landing — design system v2 "one recovery"
   Editorial: Inter Tight display caps + Instrument Serif italic
   + JetBrains Mono labels. Pure black, crisp hairlines, #00ff88.
   No grain, no blur, no smoke.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #000;
  --surface: #0a0c0b;
  --surface-2: #101312;
  --fg: #f4f6f5;
  --fg-dim: #b9beba;
  --fg-muted: #7d837f;
  --fg-faint: #4a4f4c;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.45);
  --accent-soft: rgba(0, 255, 136, 0.07);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --grotesk: 'Inter Tight', 'Inter', -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
html, body { margin: 0; padding: 0; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--fg-dim);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #000; }

.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.dim { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 64px);
}

/* ── Page furniture ─────────────────────────────────────────── */

.spine {
  position: fixed;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line-soft);
  z-index: 90;
  pointer-events: none;
}
.spine-l { left: clamp(12px, 1.6vw, 24px); }
.spine-r { right: clamp(12px, 1.6vw, 24px); }

#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 120;
}

/* Day HUD — bottom left, ticks Day 01 → 84 across the page */
#day-hud {
  position: fixed;
  left: clamp(20px, 3vw, 40px);
  bottom: 24px;
  z-index: 110;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  pointer-events: none;
  /* own lane: a backdrop plate so page content never smears through the read-out */
  padding: 7px 13px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#day-hud b { color: var(--accent); font-weight: 500; }
#day-hud span { color: var(--fg-faint); }

/* Right-edge ruler */
#day-ruler {
  position: fixed;
  right: clamp(20px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  height: min(46vh, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 110;
  pointer-events: none;
}
#day-ruler .mono { font-size: 9px; letter-spacing: 0.18em; color: var(--fg-faint); }
.ruler-track {
  position: relative;
  flex: 1;
  width: 1px;
  background: repeating-linear-gradient(180deg,
    var(--line) 0px, var(--line) 1px,
    transparent 1px, transparent 6px);
}
.ruler-mark {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}

/* ── Type ───────────────────────────────────────────────────── */

.hero-h1 {
  margin: 0;
  text-align: center;
}
.h1-grotesk {
  font-family: var(--grotesk);
  font-weight: 800;
  font-size: clamp(64px, 13.5vw, 220px);
  letter-spacing: -0.035em;
  line-height: 0.92;
  color: var(--fg);
  text-transform: uppercase;
}
.h1-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(58px, 12vw, 196px);
  letter-spacing: -0.02em;
  line-height: 0.96;
  color: var(--accent);
}

.display-lg, .display-md {
  font-family: var(--grotesk);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--fg);
  margin: 0 0 30px;
}
.display-lg { font-size: clamp(44px, 7.2vw, 116px); line-height: 0.99; }
.display-md { font-size: clamp(36px, 5.4vw, 84px); line-height: 1.02; }
.display-xl-cta {
  font-family: var(--grotesk);
  font-weight: 800;
  font-size: clamp(52px, 9.5vw, 160px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--fg);
  margin: 0 0 34px;
  text-transform: uppercase;
}
.display-xl-cta .serif { text-transform: none; }

/* serif italic second lines — the editorial signature */
.line-inner.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg-muted);
  font-size: 0.94em;
}
.line-inner.serif.accent { color: var(--accent); }

.body-lg { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; color: var(--fg-dim); }
.body-md { font-size: 16px; color: var(--fg-muted); }
.narrow { max-width: 620px; }

/* Headline line masks */
.mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line-inner { display: block; will-change: transform; }
.js .line-inner[data-reveal-line] { transform: translateY(112%); }
.line-inner .char { display: inline-block; will-change: transform; }

/* ── Section markers — big, structural ──────────────────────── */

.sec-mark {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2.5vw, 32px);
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-bottom: clamp(36px, 5vh, 64px);
}
.sec-num {
  font-family: var(--grotesk);
  font-weight: 800;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.sec-label {
  font-size: clamp(13px, 1.3vw, 17px);
  letter-spacing: 0.3em;
  color: var(--fg);
  white-space: nowrap;
}
.sec-rule { flex: 1; height: 1px; background: var(--line-soft); align-self: center; }
.sec-days {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  white-space: nowrap;
}
.sec-mark.center {
  justify-content: center;
  border-top: none;
  gap: 20px;
}
.sec-mark.center .sec-num { font-size: clamp(36px, 4vw, 64px); }

/* ── Buttons — squared, typographic ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 30px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #fff; }
.btn-ghost {
  border-color: var(--line);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 11px 18px; font-size: 11px; }
.btn-xl { padding: 22px 40px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; border: none; }
.btn-arrow { transition: transform 0.35s var(--ease-out); display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(5px); }

/* ── Chips ──────────────────────────────────────────────────── */

.chip {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 13px;
  color: var(--fg-dim);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.chip.mono { font-size: 11px; letter-spacing: 0.16em; }
.chip:hover { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); }
.chip-x { color: var(--fg-faint); border-style: dashed; }
.chip-x:hover { border-color: var(--line); color: var(--fg-muted); background: transparent; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip-row.big { margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Preloader ──────────────────────────────────────────────── */

#loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
html:not(.js) #loader { display: none; }
.loader-inner { text-align: center; }
.loader-word {
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 500;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--fg);
  margin-bottom: 16px;
}
.loader-word .char { display: inline-block; }
.loader-day { font-size: 11px; letter-spacing: 0.3em; color: var(--accent); }

/* ── Cursor ─────────────────────────────────────────────────── */

#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 150;
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), margin 0.25s var(--ease-out), opacity 0.3s;
}
#cursor-dot.grow {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  background: transparent;
  border: 1px solid var(--accent);
  opacity: 0.9;
}
@media (hover: none), (max-width: 860px) {
  #cursor-dot { display: none; }
}

/* ── Nav ────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4.5vw, 64px);
  transition: background 0.45s, border-color 0.45s, padding 0.45s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  border-bottom-color: var(--line-soft);
  padding-top: 11px;
  padding-bottom: 11px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.22em;
}
.nav-meta {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--fg-faint);
}
.nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 110px;
  padding-bottom: 170px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--fg-muted);
  margin: 0 0 38px;
}
.hero-sub { max-width: 560px; margin: 36px 0 42px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-note { margin-top: 30px; letter-spacing: 0.22em; font-size: 10px; color: var(--fg-faint); }
.js .hero-content .hero-badge,
.js .hero-content .hero-sub,
.js .hero-content .hero-ctas,
.js .hero-content .hero-note { opacity: 0; }

/* hero foot: ECG strip + ticker */
.hero-foot {
  position: absolute;
  bottom: 0; left: 0; right: 0;
}
#ecg {
  display: block;
  width: 100%;
  height: 72px;
  opacity: 0.9;
}
.marquee {
  border-top: 1px solid var(--line-soft);
  padding: 14px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  width: max-content;
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--fg-muted);
  animation: marquee 50s linear infinite;
}
.marquee-track i { color: var(--accent-dim); font-style: normal; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Sections / pinning ─────────────────────────────────────── */

.section { position: relative; padding: clamp(96px, 12vh, 150px) 0; }
/* When a flowing section follows another section or a released pin, the two
   vertical paddings stack into a dead band (worst: shaped→check-in,
   scope→CTA). Collapse the trailing section's top padding so the join breathes
   without leaving an empty viewport. */
.pin-sec + .section,
.section + .section { padding-top: clamp(48px, 6vh, 84px); }
.pin-sec { position: relative; }
.pin-stage {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 84px 0 56px;
  width: 100%;
}
/* Pinned scenes must compose inside one viewport (they're pinned, so nothing
   below the fold is ever reachable). Cap the display headline on pinned
   sections and, on short/laptop viewports, reclaim the stage padding + the
   giant Day-N counter so the whole scene lands above the fold. */
.pin-sec .display-lg { font-size: clamp(40px, 5.4vw, 74px); line-height: 1.0; }
.pin-sec .display-md { font-size: clamp(32px, 4.4vw, 56px); }
@media (max-height: 860px) {
  .pin-stage { padding: 56px 0 36px; }
  .pin-sec .display-lg { font-size: clamp(36px, 4.4vw, 60px); }
  .pin-sec .display-md { font-size: clamp(30px, 3.8vw, 48px); }
  .dayn-counter { font-size: clamp(104px, 14vw, 170px); }
  .dayn-row { margin: 10px 0 24px; }
  .timeline { margin-top: clamp(32px, 4.5vh, 60px); }
}

/* ── 01 · Gap timeline ──────────────────────────────────────── */

.timeline { margin-top: clamp(44px, 7vh, 90px); }
.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  margin-bottom: 18px;
}
.timeline-track { position: relative; height: 110px; }
.timeline-base {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--line-soft);
}
.timeline-base::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: var(--accent);
}
.timeline-marker {
  position: absolute;
  top: 0; bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-marker i {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 4px #000, 0 0 0 5px var(--line);
}
.timeline-marker b {
  position: absolute;
  top: calc(50% + 24px);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  white-space: nowrap;
}
.timeline-cursor {
  position: absolute;
  left: calc(var(--pc, 0.02) * 100%);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px; height: 64px;
  background: var(--accent);
}
.timeline-cursor .mono {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  white-space: nowrap;
}
.timeline-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 44px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
}

/* ── 02 · Day N ─────────────────────────────────────────────── */

#dayn { overflow: hidden; }
.dayn-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 4vw, 52px);
  flex-wrap: wrap;
  margin: 14px 0 34px;
}
.dayn-counter-wrap { display: flex; align-items: baseline; gap: 18px; }
.dayn-label { font-size: 12px; letter-spacing: 0.3em; color: var(--fg-muted); }
.dayn-counter {
  font-family: var(--grotesk);
  font-size: clamp(110px, 17vw, 210px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.dayn-phases { flex: 1; min-width: 280px; padding-bottom: 24px; }
.phase-bars { display: flex; gap: 10px; margin-bottom: 16px; }
.phase { flex: 1; }
.phase-bar {
  height: 3px;
  background: var(--line-soft);
  overflow: hidden;
  position: relative;
}
.phase-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(var(--f, 0));
  transform-origin: 0 50%;
}
.phase > .mono {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  margin-top: 9px;
  color: var(--fg-faint);
  transition: color 0.4s;
}
.phase.on > .mono { color: var(--accent); }
.phase-copy { margin: 0; min-height: 60px; color: var(--fg); }

/* ── 03 · Reports ───────────────────────────────────────────── */

.reports-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(400px, 1.15fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.reports-visual { position: relative; height: 470px; }

.doc-card {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: min(290px, 80%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 22px 16px;
  overflow: hidden;
}
.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.doc-head .mono { font-size: 10px; letter-spacing: 0.22em; color: var(--fg-muted); }
.doc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc-field { margin-bottom: 13px; }
.doc-field .mono {
  display: block;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  margin-bottom: 3px;
}
.doc-field b {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  color: var(--fg);
  border-radius: 2px;
  padding: 1px 0;
  transition: background 0.5s, padding 0.5s, color 0.5s;
}
.doc-field b.redact, .doc-field b.dim { color: var(--fg-faint); }
.doc-card.lit .doc-field.extract b {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 136, 0.25);
  padding: 1px 6px;
  margin-left: -6px;
}
.doc-scanline {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.09), transparent);
  border-top: 1px solid rgba(0, 255, 136, 0.4);
  opacity: 0;
  pointer-events: none;
}

.extract-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.extract-lines path {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  fill: none;
  opacity: 0.55;
}

.coach-card {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: min(380px, 88%);
}
.coach-label { font-size: 10px; letter-spacing: 0.22em; color: var(--accent); margin-bottom: 10px; }
.coach-bubble {
  background: var(--surface);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  padding: 20px 22px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--fg);
  min-height: 132px;
}
.caret {
  display: inline-block;
  width: 8px; height: 17px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.coach-foot {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-dim); }

/* ── 04 · Shaped to you ─────────────────────────────────────── */

.reg-situation {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  margin: clamp(36px, 6vh, 60px) 0 20px;
}
.register-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}
.reg-card {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s, background 0.3s;
}
.reg-card:hover { border-color: var(--accent-dim); background: var(--accent-soft); }
.reg-tag { font-size: 10px; letter-spacing: 0.2em; color: var(--accent); }
.reg-quote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.35;
  color: var(--fg);
}
.habit { margin-top: clamp(32px, 5vh, 52px); }
.cue {
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  padding: 1px 8px;
  font-size: 0.8em;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ── 05 · Check-in ──────────────────────────────────────────── */

.checkin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: clamp(36px, 5vw, 70px);
  align-items: flex-start;
  margin-top: clamp(44px, 7vh, 80px);
}
.checkin-card { overflow: hidden; transform-style: preserve-3d; }
.checkin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.checkin-head .mono { font-size: 11px; letter-spacing: 0.2em; color: var(--fg); display: inline-flex; align-items: center; }
.checkin-head .dim { color: var(--fg-muted); }
.checkin-body { padding: 24px; }
.field { margin-bottom: 26px; }
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 14px;
}
.pain-readout b { font-size: 23px; color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.pain-readout i { font-style: normal; font-size: 13px; color: var(--fg-faint); }

.pain-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  outline: none;
  background: linear-gradient(90deg, var(--accent) calc(var(--v, 0.4) * 100%), var(--line-soft) calc(var(--v, 0.4) * 100%));
}
.pain-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 3px solid #000;
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform 0.2s;
}
.pain-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.pain-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #000;
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}
.slider-ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 9px; letter-spacing: 0.18em; color: var(--fg-faint); }

.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1;
  padding: 10px 4px;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s var(--ease-out);
}
.seg button:hover { border-color: var(--fg-muted); color: var(--fg); }
.seg button.on { background: var(--accent); color: #000; border-color: var(--accent); }

.checkin-response {
  padding: 20px 24px;
  border-top: 1px solid var(--line-soft);
  opacity: 0.55;
  transition: opacity 0.5s, background 0.6s;
}
.checkin-response.lit { opacity: 1; background: var(--accent-soft); }
.resp-label { font-size: 10px; letter-spacing: 0.22em; color: var(--accent); margin-bottom: 8px; }
.resp-text { font-size: 14px; line-height: 1.55; color: var(--fg-dim); min-height: 44px; }
.resp-text b { color: var(--fg); font-weight: 500; }

.trend-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 26px;
}
.trend-head .mono { font-size: 11px; letter-spacing: 0.22em; color: var(--fg-muted); }
.trend-dir { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.16em; color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 230px; }
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 100%;
}
.bar-num { font-size: 13px; color: var(--fg-muted); }
.bar-col.today .bar-num { color: var(--accent); }
.bar {
  width: 100%;
  max-width: 58px;
  height: calc(var(--h) * 170px);
  /* value-tinted so D12–D14 read against pure black instead of vanishing */
  background: rgba(0, 255, 136, 0.09);
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 2px;
  transform-origin: bottom;
  transition: height 0.5s var(--ease-out);
}
.bar-col.today .bar {
  background: var(--accent);
  border-color: var(--accent);
}
.bar-day { font-size: 11px; color: var(--fg-faint); }
.bar-col.today .bar-day { color: var(--fg); }

/* adherence + milestone — evidence of showing up */
.trend-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.trend-foot .adh { display: inline-flex; align-items: center; gap: 12px; }
.trend-foot .adh > .mono { font-size: 10px; letter-spacing: 0.22em; color: var(--fg-faint); }
.adh-dots { display: inline-flex; gap: 7px; }
.adh-dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}
.adh-dots i.on { background: var(--accent); box-shadow: 0 0 6px var(--accent-dim); }
.milestone-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 3px;
  padding: 6px 10px;
  background: var(--accent-soft);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  margin-top: 26px;
}
.kpi .mono:first-child { display: block; font-size: 10px; letter-spacing: 0.22em; color: var(--fg-faint); margin-bottom: 8px; }
.kpi b { font-size: 32px; font-weight: 500; color: var(--fg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ── 06 · Memory ────────────────────────────────────────────── */

.thread { position: relative; max-width: 940px; margin: clamp(36px, 6vh, 70px) auto 0; }
.thread svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.thread-dot { fill: var(--line); transition: fill 0.5s var(--ease-out); }
.thread-dot.lit { fill: var(--accent); }
.moments {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 16px;
}
.moment { display: flex; }
.moment.left { grid-column: 1; justify-content: flex-start; }
.moment.right { grid-column: 2; justify-content: flex-end; }
.moment-card {
  max-width: 350px;
  padding: 15px 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.moment-card.coach { color: var(--fg); }
.moment-card.callback {
  border-color: rgba(0, 255, 136, 0.45);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  color: var(--fg);
}
.moment-card .mono {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  margin-bottom: 6px;
}
.moment-card .mono.accent { color: var(--accent); }

/* ── 07 · Scope ─────────────────────────────────────────────── */

.scope-block { margin-top: clamp(40px, 6vh, 64px); }
.scope-label { font-size: 11px; letter-spacing: 0.26em; color: var(--fg-muted); margin-bottom: 18px; }
.scope-note { max-width: 580px; margin-top: 22px; }

/* ── 08 · CTA ───────────────────────────────────────────────── */

.cta { overflow: hidden; padding-bottom: clamp(100px, 13vh, 160px); }
.cta-inner { position: relative; text-align: center; max-width: 1000px; display: flex; flex-direction: column; align-items: center; }
.cta-inner .body-lg { max-width: 540px; margin: 0 auto 46px; }
.cta-inner .hero-note { margin-top: 32px; }

/* ── Footer ─────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: flex-start; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
}
.footer-grid p { margin: 0; max-width: 460px; line-height: 1.55; color: var(--fg-muted); font-size: 14px; }
.footer-meta { display: flex; flex-direction: column; gap: 10px; font-size: 11px; letter-spacing: 0.14em; color: var(--fg-muted); text-align: right; }
.footer-meta a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.3s, color 0.3s;
}
.footer-meta a:hover { color: var(--accent); border-color: var(--accent); }
.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 960px) {
  .reports-grid { grid-template-columns: 1fr; gap: 40px; }
  /* Single column: %-based absolute tops can't survive the stacked copy
     heights (the doc card rode up into the chip row). Take both cards out of
     absolute flow and stack them; the scrub still drives opacity + typing
     (transform is neutralised so the JS translate/-50% can't offset them). */
  .reports-visual { position: static; height: auto; display: flex; flex-direction: column; gap: 24px; }
  .doc-card { position: static; top: auto; left: auto; transform: none !important; width: 100%; }
  .coach-card { position: static; top: auto; right: auto; left: auto; transform: none !important; width: 100%; }
  .extract-lines { display: none; }
  .checkin-grid { grid-template-columns: 1fr; gap: 48px; }
  .register-grid { grid-template-columns: 1fr; }
  .nav-meta { display: none; }
  #day-ruler { display: none; }
  /* The fixed Day-HUD pill sat over live copy at phone width (RESTRICTIONS
     chip, the Day-30 callback, the footer contact line). The ruler is already
     dropped ≤960px; drop the HUD with it rather than overlay content. */
  #day-hud { display: none; }
  /* Centred "YOU ARE HERE" (translateX(-50%)) clipped the viewport at the
     travel extremes on narrow screens. Shift it proportionally with the cursor
     position so it left-aligns near p=0 and right-aligns near p=1 — the label
     stays fully on-screen while still reading as anchored to the cursor. */
  .timeline-cursor .mono { transform: translateX(calc(var(--pc, 0.5) * -100%)); }
}
@media (max-width: 720px) {
  /* The timeline carried three redundant label rows that collided at phone
     width. Inset the track so the markers and the travelling "YOU ARE HERE"
     cursor keep edge room, and drop the duplicated labels (the foot already
     says 1 VISIT … 1 VISIT; keep only the live DAY read-out up top). */
  .timeline-track { padding: 0 clamp(58px, 17vw, 78px); }
  .timeline-labels { justify-content: center; }
  .timeline-labels > span:first-child,
  .timeline-labels > span:last-child,
  .timeline-marker b { display: none; }
  .timeline-cursor .mono { font-size: 9px; letter-spacing: 0.1em; }
  .timeline-foot { font-size: 9px; letter-spacing: 0.14em; }
  /* Pinned scenes must fit one phone viewport so the scrubbed animation lands
     where the scroll rests instead of below the fold — reclaim vertical room. */
  .pin-stage { padding: 72px 0 32px; }
  .moments { grid-template-columns: 1fr; }
  .moment.left, .moment.right { grid-column: 1; justify-content: flex-start; }
  .thread svg { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .bars { height: 190px; }
  .bar { height: calc(var(--h) * 130px); }
  .sec-mark { flex-wrap: wrap; row-gap: 8px; }
  .sec-days { display: none; }
  .spine { display: none; }
  #day-hud { bottom: 16px; }
}

/* ── Reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .line-inner[data-reveal-line] { transform: none; }
  .js .hero-content .hero-badge,
  .js .hero-content .hero-sub,
  .js .hero-content .hero-ctas,
  .js .hero-content .hero-note { opacity: 1; }
  #loader { display: none; }
}

/* No-JS fallback: everything visible */
html:not(.js) [data-reveal],
html:not(.js) .line-inner { opacity: 1 !important; transform: none !important; }

/* ── How-it-works modal ─────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: min(560px, calc(100vw - 32px));
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 4vw, 46px);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.45s var(--ease-out);
}
.modal.open .modal-panel { transform: none; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-muted);
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin: 0 0 18px;
}
.modal-title {
  font-family: var(--grotesk);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0 0 18px;
}
.modal-title .serif {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}
.modal-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-dim);
  margin: 0 0 26px;
}
.modal-points {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}
.modal-points li {
  border-top: 1px solid var(--line-soft);
  padding: 15px 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
}
.modal-points li:last-child { border-bottom: 1px solid var(--line-soft); }
.modal-points li .mono {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 6px;
}
.modal-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .modal, .modal-panel { transition: none; }
}
