/* platesmith.app
   One stylesheet, no JavaScript. The CSP forbids inline styles and scripts, so every
   style lives here and every animation is CSS: scroll-driven where the browser supports
   it (guarded by @supports), static everywhere else, and off with reduced motion. */

/* ---------- Display font ----------
   Inter Display (SIL Open Font License), Bold and ExtraBold only, subset to Latin-1 and served
   from this site (font-src 'self' in the Caddy CSP), so no request leaves platesmith.app.
   Body text stays the system font. Both files are ~21 KB and preloaded by every page. */
@font-face { font-family: "Inter Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/InterDisplay-Bold.woff2?v=1") format("woff2"); }
@font-face { font-family: "Inter Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/InterDisplay-ExtraBold.woff2?v=1") format("woff2"); }

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;
  --show-light: block;
  --show-dark: none;
  --bg: #f6f8f6;
  --bg-2: #eef2ef;
  --surface: #ffffff;
  --surface-2: #f2f5f3;
  --text: #0f1511;
  --muted: #59625c;
  --faint: #667069;
  --line: #e1e7e3;
  --line-2: #d0d8d3;
  --primary: #1e8539;
  --primary-hover: #19732f;
  --on-primary: #ffffff;
  --primary-text: #1a7a34;
  --primary-deep: #166a2c;
  --wash: #e3f3e8;
  --pr: #b25e00;
  --pr-wash: #fff1dc;
  --radius: 24px;
  --radius-sm: 16px;
  --frame: #1c201e;
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark follows the visitor's system setting. The header switch (#theme, a checkbox, so no
   script is needed) flips it the other way for this page view. The block is written twice
   because a selector can't sit inside and outside a media query at once. */
@media (prefers-color-scheme: dark) {
  :root:not(:has(#theme:checked)) {
    color-scheme: dark;
    --show-light: none;
    --show-dark: block;
    --bg: #0a0c0b;
    --bg-2: #0f1311;
    --surface: #131816;
    --surface-2: #1a201d;
    --text: #eef3ef;
    --muted: #9ba59f;
    --faint: #868f89;
    --line: #222a25;
    --line-2: #2e3832;
    --primary: #30d158;
    --primary-hover: #4ade74;
    --on-primary: #03230c;
    --primary-text: #4bdc72;
    --primary-deep: #5ee283;
    --wash: #0f2a18;
    --pr: #ffb340;
    --pr-wash: #33240c;
    --frame: #2a302d;
  }
}
@media not (prefers-color-scheme: dark) {
  :root:has(#theme:checked) {
    color-scheme: dark;
    --show-light: none;
    --show-dark: block;
    --bg: #0a0c0b;
    --bg-2: #0f1311;
    --surface: #131816;
    --surface-2: #1a201d;
    --text: #eef3ef;
    --muted: #9ba59f;
    --faint: #868f89;
    --line: #222a25;
    --line-2: #2e3832;
    --primary: #30d158;
    --primary-hover: #4ade74;
    --on-primary: #03230c;
    --primary-text: #4bdc72;
    --primary-deep: #5ee283;
    --wash: #0f2a18;
    --pr: #ffb340;
    --pr-wash: #33240c;
    --frame: #2a302d;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: var(--primary-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
::selection { background: var(--wash); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
b, strong { font-weight: 650; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.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: 12px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border-radius: 999px; border: 0;
  background: var(--primary); color: var(--on-primary);
  font: 600 17px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(0.98); }
.button.ghost { background: var(--surface-2); color: var(--text); }
.button.ghost:hover { background: var(--line); }
.button.small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.button svg { width: 18px; height: 18px; flex: none; }

/* The App Store button until the listing is live. Not a link. */
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 0 26px 0 20px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  line-height: 1.15; text-align: left;
}
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: 13px; font-weight: 500; opacity: 0.8; }
.store b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.site-header .nav { margin-left: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
.nav .button { color: var(--on-primary); margin-left: 6px; }
.nav .button:hover { color: var(--on-primary); background: var(--primary-hover); }

/* Light/dark switch: a visually hidden checkbox and its label. The icon shows where it goes. */
.theme-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; } /* taste-skill-ignore: visually hidden checkbox, not a rule */
.theme-toggle {
  flex: none; width: 40px; height: 40px; margin-left: -8px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--muted);
  background: var(--surface-2);
}
.theme-toggle:hover { color: var(--text); background: var(--line); }
.theme-input:focus-visible + .theme-toggle { outline: 2px solid var(--primary); outline-offset: 3px; }
.theme-toggle svg { width: 19px; height: 19px; grid-area: 1 / 1; }
.theme-toggle .to-dark, .theme-toggle .to-light { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.theme-toggle .moon, .theme-toggle .to-dark { display: var(--show-light); }
.theme-toggle .sun, .theme-toggle .to-light { display: var(--show-dark); }

/* Reading progress: a bar that fills as you scroll. Invisible at rest. */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; transform-origin: 0 50%; transform: scaleX(0); background: var(--primary); opacity: 0; }

/* ---------- Sections (shared) ---------- */

section { position: relative; }
.section { padding: 136px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; }
.section-head p { font-size: 21px; margin: 18px 0 0; max-width: 56ch; }

/* Below-the-fold home sections skip layout and paint (and their looping mocks) until they near
   the viewport. The sizes are measured content heights (padding excluded) so the scrollbar and #anchors stay put. */
section#how, section#features, section#privacy, section.coach, section#faq, section.closing { content-visibility: auto; }
section#how { contain-intrinsic-size: auto 453px; }
section#features { contain-intrinsic-size: auto 2013px; }
section#privacy { contain-intrinsic-size: auto 693px; }
section.coach { contain-intrinsic-size: auto 304px; }
section#faq { contain-intrinsic-size: auto 518px; }
section.closing { contain-intrinsic-size: auto 513px; }
@media (max-width: 760px) {
  section#how { contain-intrinsic-size: auto 739px; }
  section#features { contain-intrinsic-size: auto 4320px; }
  section#privacy { contain-intrinsic-size: auto 1064px; }
  section.coach { contain-intrinsic-size: auto 631px; }
  section#faq { contain-intrinsic-size: auto 731px; }
  section.closing { contain-intrinsic-size: auto 597px; }
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 96px; overflow: hidden; }
/* A soft green wash behind the hero: two blurred lights, one behind the phones, one top left. */
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 55% at 78% 45%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
    radial-gradient(30% 40% at 8% 10%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%);
}
.hero { isolation: isolate; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(44px, 5.3vw, 78px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; margin: 0; }
.hero h1 .line { display: block; }
.hero .sub { font-size: clamp(19px, 1.6vw, 21px); max-width: 44ch; margin: 28px 0 36px; }
.hero .fine { margin: 24px 0 0; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hero .fine span { display: inline-flex; align-items: center; gap: 6px; }
.hero .fine svg { width: 15px; height: 15px; color: var(--primary); }
.hero-art { position: relative; display: grid; place-items: center; }

/* ---------- Phones with real screenshots ----------
   Every screenshot comes as a light and a dark <img>; only the one matching the current theme
   is displayed, and since both are loading="lazy" the hidden one is never downloaded. */

.shot { width: 100%; height: auto; }
.shot.l { display: var(--show-light); }
.shot.d { display: var(--show-dark); }

.phone {
  position: relative; width: min(300px, 72vw);
  border-radius: 48px; padding: 9px;
  background: var(--frame);
}
.phone .screen { border-radius: 39px; overflow: hidden; background: var(--bg); }

.hero-art .phone.front { z-index: 1; }
.hero-art .phone.back { position: absolute; width: min(250px, 60vw); border-radius: 40px; padding: 8px; translate: 46% -4%; rotate: 6deg; opacity: 0.96; }
.hero-art .phone.back .screen { border-radius: 32px; }
.hero-art { padding-right: 90px; }

/* A phone peeking out of the bottom of a feature cell. */
.peek { margin: 26px -28px -28px; height: 330px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: 4px; flex: 1 0 auto; }
.peek .phone { width: 262px; border-radius: 42px; padding: 8px; }
.peek .phone .screen { border-radius: 34px; }

/* ---------- Screens gallery ---------- */

.screens { padding-bottom: 96px; }
.gallery-wrap { position: relative; }
.gallery {
  list-style: none; margin: 0; padding: 12px max(24px, calc((100vw - var(--wrap)) / 2 + 24px)) 28px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 254px; gap: 26px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; /* taste-skill-ignore: a sideways gallery of real screens, cut on purpose at the edge */
}
.gallery:focus-visible { outline-offset: -2px; }
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery .phone { width: 100%; border-radius: 40px; padding: 8px; }
.gallery .phone .screen { border-radius: 32px; }
/* On phones the second card is cut off, which is the only cue to scroll; this line says so. */
.swipe-hint { display: none; }
@media (max-width: 760px) {
  .swipe-hint { display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 0; color: var(--primary-text); font-size: 15px; font-weight: 600; }
  .swipe-hint span { display: inline-block; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .swipe-hint span { animation: nudge 1.6s ease-in-out infinite; }
}
@keyframes nudge { 50% { transform: translateX(4px); } }
.gallery figcaption { margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.gallery figcaption b { display: block; color: var(--text); font-size: 17px; font-weight: 700; margin-bottom: 2px; }

/* ---------- Stat band ---------- */

.stats { padding: 0; }
.stats ul {
  list-style: none; margin: 0; padding: 40px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  background: var(--bg-2); border-radius: var(--radius);
}
.stats li { padding: 0 32px; }
.stats .num { display: block; font: 800 clamp(40px, 5vw, 52px)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats .what { display: block; font-size: 17px; margin-top: 12px; max-width: 22ch; }

/* ---------- Statement: three lines that light up as you scroll ---------- */

.statement { padding: 96px 0; }
.statement .lines { margin: 0; max-width: 20ch; font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5vw, 64px); line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.statement .lines span { display: block; color: var(--text); }
.statement .lines span + span { margin-top: 0.35em; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .statement { padding: 0; height: 240vh; view-timeline-name: --statement; }
    .statement .wrap { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; }
    .statement .lines span { color: var(--line-2); animation: light linear both; animation-timeline: --statement; }
    .statement .lines span:nth-child(1) { animation-range: cover 18% cover 36%; }
    .statement .lines span:nth-child(2) { animation-range: cover 36% cover 54%; }
    .statement .lines span:nth-child(3) { animation-range: cover 54% cover 72%; }
  }
}
@keyframes light { to { color: var(--text); } }

/* ---------- How it works: timeline ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.steps li { position: relative; padding-top: 28px; }
/* A filled green bar on each step, growing left to right as the row scrolls in. */
.steps li::before { content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 6px; border-radius: 3px; background: var(--primary); transform-origin: 0 50%; }
.steps h3 { font-size: 23px; font-weight: 700; margin-bottom: 10px; }
.steps p { margin: 0; font-size: 17px; }

/* ---------- Bento ---------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.cell {
  position: relative; overflow: hidden;
  grid-column: span 2;
  background: var(--surface); border-radius: var(--radius);
  padding: 32px;
  display: flex; flex-direction: column;
}
.cell.wide { grid-column: span 3; }
.cell.tall { grid-row: span 2; }
.cell h3 { font-size: 23px; font-weight: 700; margin-bottom: 10px; }
.cell > p { margin: 0; font-size: 17px; }
.cell .mock { margin-top: 24px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.cell.feature-green { background: radial-gradient(70% 60% at 100% 0%, color-mix(in srgb, #fff 18%, var(--primary)), transparent 70%), var(--primary); color: var(--on-primary); }

/* Barcode mock */
.scan { position: relative; height: 120px; border-radius: var(--radius-sm); background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.scan .code { width: 150px; height: 58px; display: flex; gap: 2px; }
.scan .code i { flex: 1; background: var(--text); }
.scan .code i:nth-child(3n) { flex: 2.5; }
.scan .code i:nth-child(4n+1) { flex: 0.6; }
.scan::after { content: ""; position: absolute; left: 14%; right: 14%; top: 50%; height: 3px; border-radius: 2px; background: var(--primary); }
.scan .corner { position: absolute; inset: 16px 22%; border-radius: 10px; border: 2px solid var(--primary); clip-path: polygon(0 0, 22% 0, 22% 3px, 3px 3px, 3px 30%, 0 30%, 0 70%, 3px 70%, 3px calc(100% - 3px), 22% calc(100% - 3px), 22% 100%, 78% 100%, 78% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 70%, 100% 70%, 100% 30%, calc(100% - 3px) 30%, calc(100% - 3px) 3px, 78% 3px, 78% 0, 100% 0, 100% 100%, 0 100%); }

/* Tiers list in the programs cell */
.tiers { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.tiers li { display: grid; gap: 2px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--primary-deep); font-size: 15px; }
.tiers b { font-weight: 700; font-size: 17px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-size: 15px; font-weight: 550; color: var(--text); }
.chip svg { width: 14px; height: 14px; color: var(--primary); }

/* Habit week */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 22px; text-align: center; font-size: 15px; color: var(--muted); font-weight: 600; }
.week i { display: block; aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); margin-top: 6px; }
.week i.on { background: var(--primary); }
.week i.half { background: color-mix(in srgb, var(--primary) 40%, var(--surface-2)); }

/* ---------- Your numbers stay yours ---------- */

.privacy-band { background: var(--bg-2); }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.split .section-head { margin: 0; position: sticky; top: 112px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 24px; background: var(--surface); border-radius: var(--radius-sm); }
.checks .ok { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--primary-text); }
.checks .ok svg { width: 20px; height: 20px; }
.checks h3 { font-size: 19px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; line-height: 1.3; }
.checks p { margin: 0; font-size: 17px; }
.checks + .more { margin: 24px 0 0; font-size: 17px; }

/* ---------- Coach band (the other door) ---------- */

.coach { padding: 96px 0; }
.coach-card {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center;
  padding: 56px; border-radius: var(--radius);
  background: var(--surface);
}
.coach-card h2 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; }
.coach-card p { margin: 16px 0 0; }
.code-mock { background: var(--bg); border-radius: var(--radius); padding: 28px 22px; text-align: center; }
.code-mock .lbl { color: var(--muted); font-size: 15px; font-weight: 600; }
.code-mock .digits { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.code-mock .digits span { width: 40px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font: 700 23px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.code-mock .digits span.cur { background: var(--wash); }
.code-mock .who { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--wash); color: var(--primary-text); }
.code-mock .who i { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); }
.coach-note { margin: 24px 0 0; font-size: 17px; }

/* ---------- FAQ ---------- */

.faq-split { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 64px; align-items: start; }
.faq-split .section-head { position: sticky; top: 112px; margin: 0; }
.faq-list { display: grid; gap: 8px; }
details { background: var(--surface); border-radius: var(--radius-sm); padding: 0 24px; }
.prose details { margin: 8px 0; }
summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 22px 44px 22px 0; font-weight: 650; font-size: 19px; letter-spacing: -0.01em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  border-radius: 50%; background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; font: 500 21px/1 var(--font);
  transition: transform 0.25s var(--ease);
}
details[open] summary::after { transform: rotate(45deg); }
summary:hover { color: var(--primary-text); }
details > div { padding: 0 44px 24px 0; }
details > div p { margin: 0 0 10px; }
details > div p:last-child { margin: 0; }

/* ---------- Closing CTA ---------- */

.closing { margin-top: 24px; padding: 0; background: #07140b; color: #eef3ef; position: relative; overflow: hidden; isolation: isolate; }
.closing::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 60% at 50% 100%, rgba(48, 209, 88, 0.28), transparent 70%),
    radial-gradient(30% 40% at 90% 0%, rgba(48, 209, 88, 0.12), transparent 70%);
}
.cta-panel { position: relative; text-align: center; padding: 128px 32px 136px; }
.cta-panel img { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 28px; }
.cta-panel h2 { font-size: clamp(40px, 5.3vw, 76px); font-weight: 800; letter-spacing: -0.04em; }
.cta-panel p { color: #c9d3cc; font-size: 21px; max-width: 42ch; margin: 18px auto 32px; }
.cta-panel .cta-row { justify-content: center; }
.cta-panel .store { background: #eef3ef; color: #07140b; }
.cta-panel .button.ghost { color: #eef3ef; background: #16291c; }
.cta-panel .button.ghost:hover { background: #1f3726; }

/* ---------- Footer ---------- */

.site-footer { background: var(--bg-2); padding: 64px 0 48px; color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h2 { margin: 0 0 12px; color: var(--text); font-size: 15px; font-weight: 700; font-family: var(--font); letter-spacing: 0; line-height: 1.4; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
/* Links are at least 24px tall (WCAG 2.5.8 target size) without looking taller. */
.foot-grid li a { display: inline-block; padding: 3px 0; color: var(--muted); text-decoration: none; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }
.foot-grid .brand { color: var(--text); }
.foot-brand p { margin: 14px 0 0; max-width: 34ch; }
.disclaimer { margin: 48px 0 0; font-size: 15px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.disclaimer p { margin: 0; max-width: 68ch; }

/* ---------- Inner pages (privacy, support, 404) ---------- */

.page-head { padding: 88px 0 56px; background: radial-gradient(50% 80% at 90% 20%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%), var(--bg-2); position: relative; }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; letter-spacing: -0.04em; position: relative; max-width: 18ch; }
.page-head .lede, .page-head .meta { position: relative; }
.lede { font-size: 21px; margin: 18px 0 0; max-width: 50ch; }
.meta { color: var(--faint); font-size: 15px; margin: 14px 0 0; }

.doc { display: grid; grid-template-columns: 240px minmax(0, 680px); gap: 72px; padding-top: 64px; padding-bottom: 120px; }
.doc.single { grid-template-columns: minmax(0, 680px); }
.rail { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.rail h2, .toc h2 { font: 700 17px/1.2 var(--font); letter-spacing: -0.01em; color: var(--text); margin: 0 0 12px; }
.rail ol, .rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { margin: 0; }
.rail a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.4; }
.rail a:hover { color: var(--primary-text); }

.prose h2 { font-size: 28px; font-weight: 700; margin: 56px 0 14px; padding-top: 4px; }
.prose h3 { font-size: 21px; font-weight: 700; margin: 32px 0 10px; letter-spacing: -0.015em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--primary); }
.prose > :first-child { margin-top: 0; }

.summary-box { background: var(--wash); border-radius: var(--radius-sm); padding: 28px 32px; margin: 0 0 8px; }
.summary-box h2 { font-size: 21px; font-weight: 700; margin: 0 0 10px; }
.summary-box ul { margin: 0; }
.prose .toc { display: none; }

.table-scroll { overflow-x: auto; margin: 18px 0; border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.contact-card p { margin: 0; }
.prose details summary { font-size: 17px; }
.note { background: var(--surface-2); border-radius: var(--radius-sm); padding: 20px 24px; margin-top: 18px; }
.note p { margin: 0; }

.notfound { padding: 120px 0 140px; text-align: center; }
.notfound .plate { width: 120px; height: 120px; margin: 0 auto 32px; border-radius: 28px; }
.notfound h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; }
.notfound .lede { margin: 16px auto 32px; }
.notfound .cta-row { justify-content: center; }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 64px; }
  .hero h1 { font-size: clamp(40px, 10.6vw, 76px); }
  .stats ul { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell, .cell.wide { grid-column: span 1; }
  .cell.tall { grid-row: auto; }
  .cell.full-md { grid-column: 1 / -1; }
  .split, .faq-split { grid-template-columns: 1fr; gap: 40px; }
  .split .section-head, .faq-split .section-head { position: static; }
  .coach-card { grid-template-columns: 1fr; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { display: none; }
  .prose .toc { display: block; background: var(--surface); border-radius: var(--radius-sm); padding: 22px 24px; margin: 28px 0 0; }
  .prose .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
  .prose .toc li { margin: 4px 0; break-inside: avoid; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav a[href="/privacy/"] { display: none; }
  .nav a { padding: 8px 10px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .section { padding: 96px 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: 40px 0 72px; }
  .hero-art { padding-right: 40px; }
  .hero-art .phone.back { translate: 16% -4%; }
  .stats ul { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .stats li { padding: 0 24px; display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; align-items: center; }
  .stats .num { font-size: 40px; }
  .stats .what { margin: 0; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .bento { grid-template-columns: 1fr; }
  .cell { padding: 24px; }
  .coach-card { padding: 32px 24px; }
  details { padding: 0 18px; }
  .cta-panel { padding: 80px 22px 88px; }
  .hide-sm { display: none; }
  .nav a { padding: 8px 9px; }
  .prose .toc ol { columns: 1; }
  .page-head { padding: 48px 0 32px; }
  .doc { padding-top: 36px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .nav .button { display: none; }
  .code-mock .digits span { width: 34px; height: 46px; font-size: 20px; }
}

/* ---------- Motion ----------
   Time-based loops for the drawn mocks, scroll-driven reveals where supported.
   Everything below is skipped with reduced motion, and the resting state of every
   element is its finished state, so a browser that runs none of it shows a complete page. */

@property --n { syntax: "<integer>"; inherits: true; initial-value: 0; }

@counter-style pad3 { system: extends decimal; pad: 3 "0"; }

/* Animated numbers. Each has a static copy for screen readers and old browsers. */
.count .live { display: none; }

@media (prefers-reduced-motion: no-preference) {

  /* Hero entrance */
  .hero-copy > * { animation: rise 0.9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.14s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.22s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.3s; }
  .hero-art { animation: settle 1.2s 0.15s var(--ease) both; }
  .hero-art .phone { animation: float 7s 1.4s ease-in-out infinite; }
  .hero-art .phone.back { animation-delay: 3.2s; }

  /* Barcode scan line */
  .scan::after { top: 24%; will-change: transform; animation: scan 2.4s ease-in-out infinite alternate; }

  /* Current digit caret in the coach code */
  .code-mock .digits span.cur::after { content: ""; width: 2px; height: 26px; background: var(--primary); animation: blink 1s steps(2, start) infinite; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { opacity: 0; transform: translateY(40px) scale(0.96); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes fade-in { from { opacity: 0; } }
/* .scan is 120px tall: 24% -> 76% of it. */
@keyframes scan { to { transform: translateY(62.4px); } }
@keyframes blink { to { visibility: hidden; } }
@keyframes count-up { from { --n: 1000; } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes progress { from { transform: scaleX(0); opacity: 1; } to { transform: scaleX(1); opacity: 1; } }
@keyframes hero-exit { to { opacity: 0.2; transform: translateY(-60px) scale(0.98); } }

/* Counters: shown only where integer @property, round() and mod() all work. */
@supports (counter-reset: n calc(round(down, 9 / 2))) and (width: calc(mod(5px, 2px))) {
  .count .static { display: none; }
  .count .live { display: inline; }
  .count .live::after {
    --k: calc(round(down, var(--n) / 1000));
    --r: calc(mod(var(--n), 1000));
    counter-reset: k var(--k) r var(--r) n var(--n);
    content: counter(n);
  }
  .count.thousands .live::after { content: counter(k) "," counter(r, pad3); }
  .count-ex .live { --n: 1539; }
  .count-food .live { --n: 8863; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (counter-reset: n calc(round(down, 9 / 2))) and (width: calc(mod(5px, 2px))) {
    .count-ex .live, .count-food .live { animation: count-up 2s var(--ease) both; }
  }

  /* Scroll-driven, only where the browser has view timelines (Chrome, Edge, Safari 26). */
  @supports (animation-timeline: view()) {
    .progress { animation: progress linear both; animation-timeline: scroll(root); }

    .hero-copy { animation: hero-exit linear both; animation-timeline: view(); animation-range: exit 0% exit 80%; }

    .count-ex .live, .count-food .live { animation: count-up linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }

    .steps li::before { animation: grow-x linear both; animation-timeline: view(); animation-range: entry 40% cover 45%; }
    .steps li { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }

    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }

    .checks li { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }

    .cta-panel > * { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .rail, .skip { display: none; }
  body { background: #fff; color: #000; }
  .doc { display: block; padding: 0; }
}

/* ---------- Programs (/programs/, built by build_programs.py) ---------- */

.crumbs { position: relative; margin: 24px 0 0; font-size: 17px; }
.crumbs a { color: var(--primary-text); text-decoration: none; font-weight: 600; }
.crumbs a::before { content: "\2190\00a0"; }
.facts { position: relative; list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.facts li:first-child { background: var(--wash); color: var(--primary-text); }
.facts.small { margin-top: 14px; gap: 6px; }
.facts.small li { font-size: 13px; padding: 3px 10px; background: var(--surface-2); }
.level-jump { position: relative; list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.level-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.level-jump a:hover { background: var(--wash); color: var(--primary-text); }
.level-jump span { color: var(--muted); font-variant-numeric: tabular-nums; }
.programs { padding-top: 48px; padding-bottom: 112px; }
.program-group + .program-group { margin-top: 64px; }
.program-group h2 { font-size: 30px; font-weight: 700; margin: 0 0 22px; }
.program-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.program-card { display: flex; flex-direction: column; height: 100%; padding: 24px; background: var(--surface); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; transition: background-color 0.2s var(--ease), transform 0.2s var(--ease); }
.program-card:hover { background: var(--wash); transform: translateY(-2px); }
.program-card h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.015em; }
.program-card p { font-size: 15px; margin: 0; flex: 1; }
.workout { margin: 26px 0 0; }
.workout h3 { margin: 0 0 8px; }
.workout table { width: 100%; border-collapse: collapse; font-size: 17px; }
.workout th { background: none; text-align: left; font: 650 15px/1.2 var(--font); color: var(--muted); padding: 0 0 10px; border-bottom: 1px solid var(--line-2); }
.workout td { padding: 10px 0; vertical-align: middle; border-bottom: 1px solid var(--line); }
.workout th:last-child, .workout td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }
.alike a { color: var(--primary-text); font-weight: 600; }
.fine-print { color: var(--muted); font-size: 15px; margin-top: 48px; }
.summary-box .cta-row { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .program-card, .program-card:hover { transition: none; transform: none; } }
@media (max-width: 760px) { .program-grid { grid-template-columns: 1fr; } .programs { padding-bottom: 72px; } }
.cell .card-link { margin: 20px 0 0; }
.cell .card-link a { color: inherit; font-weight: 650; text-underline-offset: 3px; }
.cell .card-link a::after { content: "\00a0\2192"; }
