/* FlatCore website — one stylesheet for every page. Documented in website/DESIGN.md.

   Palette "Porcelain and pine": a light, flat porcelain ground, white panels, near-black ink,
   one deep pine green that acts (buttons, links, the timer arc), a pale mist tint for the one
   band that matters (safety), and a coral mark used once — the current set in the app preview.
   Hairlines instead of shadows. Georgia for headings and numbers, Atkinson Hyperlegible for
   body and UI. The site has its own look; it does not mirror the app's theme.

   Contrast on the ground: ink 16.4:1, muted 6.2:1, pine 9.1:1, coral mark 3.7:1 (graphic only).
   The App Store button carries its own two tokens (--badge, --on-badge) for Apple's black badge. */

/* ---------- fonts ----------
   Headings, prices and the timer are Georgia, the serif already on every iPhone, Mac and Windows
   machine, so it is never downloaded. Georgia draws old-style figures by default; the body asks
   for lining figures (font-variant-numeric) so prices and times sit level.
   Atkinson's slashed zero reads as a typo in dates and prices ("2Ø26"), so the digits inside body
   copy come from Georgia too, through a digits-only local() face. Where Georgia is missing
   (Android), that face fails and the digits fall back to Atkinson. */
@font-face {
  font-family: "FlatCore Digits";
  src: local("Georgia");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-normal-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-normal-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-italic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ---- colour: porcelain and pine ---- */
  --ground: #F3F3EE;          /* porcelain, the page */
  --raised: #FFFFFF;          /* panels: pricing, quiet buttons */
  --beige: #EEE8DC;           /* the phone preview's screen: ink 14.9:1, muted 5.7:1, pine 8.3:1 */
  --beige-rule: #D9D1C2;      /* the timer's track on beige */
  --hairline: #DFDDD4;
  --hairline-strong: #C8C5BA; /* outlines on things you can tap */
  --ink: #101713;
  --muted: #525C56;           /* the one secondary text colour: 6.2:1 on ground, 5.65:1 on stone */
  --pine: #164A37;            /* action: buttons, links, the timer arc */
  --pine-deep: #0E3628;       /* hover */
  --on-pine: #FFFFFF;
  --mark: #CB5A2E;            /* coral: marks NOW, never text */
  --mist: #E1EAE3;            /* the safety band and the photo placeholder */
  --mist-muted: #435148;      /* secondary text on mist, 6.8:1 */
  --mist-rule: #C7D6CB;
  --on-pine-2: #C3D6CA;       /* secondary text on pine, 6.7:1 */
  --badge: #101713;
  --on-badge: #FFFFFF;

  --focus: var(--ink);

  /* ---- type ---- */
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "FlatCore Digits", "Atkinson Hyperlegible", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.9375rem;                                    /* 15 — meta, captions, legal */
  --step-0: 1.125rem;                                      /* 18 — body */
  --step-1: 1.25rem;                                       /* 20 — lede, list terms */
  --step-2: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);     /* 22–26 — h3 */
  --step-3: clamp(1.875rem, 1.25rem + 2.2vw, 2.625rem);    /* 30–42 — h2 */
  --step-4: clamp(2.5rem, 1.5rem + 3.6vw, 4rem);           /* 40–64 — h1 */

  /* ---- space: the 4px scale ---- */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-32: 32px;
  --s-40: 40px;
  --s-48: 48px;
  --s-64: 64px;

  /* One gap between any two blocks on the page ground; the tight one opens and closes the page. */
  --section: clamp(64px, 7vw, 104px);
  --section-tight: clamp(40px, 4.5vw, 64px);
  --hero-top: clamp(40px, 5vw, 80px);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;

  /* ---- shape: the app's 28px panel, with controls and cards nested under it ---- */
  --r-panel: 28px;
  --r-card: 20px;
  --r-control: 12px;
  --r-pill: 999px;

  /* Depth is a hairline. The one exception is the phone held over the hero photo. */
  --shadow-phone: 0 1px 2px rgba(27, 38, 32, 0.06), 0 24px 48px -28px rgba(27, 38, 32, 0.4);

  /* ---- motion: one curve, three durations ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 160ms;
  --t-enter: 300ms;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--pine);
  font-variant-numeric: lining-nums;
}

::selection { background: var(--mist); color: var(--ink); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

/* Headings are the serif at one weight. Hierarchy is size, never weight. */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }

a {
  color: var(--pine);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--pine) 40%, transparent);
  transition: text-decoration-color var(--t-press) var(--ease);
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--s-8);
}

.skip {
  position: absolute;
  left: var(--s-16);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-pine);
  padding: var(--s-8) var(--s-16);
  border-radius: var(--s-8);
}
.skip:focus { top: var(--s-16); }

/* Focus ring: ink everywhere except on solid pine (the closing card, the safety callout). */
.callout.is-safety, .closing-card { --focus: var(--on-pine); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
/* Opaque, in the page colour, so it meets the page seamlessly and needs no glass. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ground);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-enter) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s-24);
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-12);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.375rem;
  letter-spacing: 0;
}
.brand img { width: 32px; height: 32px; border-radius: var(--s-8); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-32); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-32); }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  padding-block: var(--s-8);
  transition: color var(--t-press) var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta { color: var(--ink); }
@media (max-width: 820px) {
  .site-nav ul { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  min-height: 48px;
  padding: 0 var(--s-24);
  border-radius: var(--r-pill);
  border: 0;
  font: 700 var(--step--1) / 1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-press) var(--ease), box-shadow var(--t-press) var(--ease), transform var(--t-press) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--pine); color: var(--on-pine); }
.btn-primary:hover { background: var(--pine-deep); }
.btn-quiet { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* The App Store button. Pre-launch it reads "Coming soon to the App Store";
   website/tools/configure.mjs rewrites it to the real link. It keeps Apple's badge rectangle. */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: var(--s-12);
  min-height: 56px;
  padding: var(--s-8) var(--s-24);
  border-radius: var(--r-control);
  background: var(--badge);
  color: var(--on-badge);
  text-align: left;
  text-decoration: none;
  transition: background-color var(--t-press) var(--ease), transform var(--t-press) var(--ease);
}
.appstore:hover { background: #000; }
/* On pine the badge turns white, as Apple's white badge does on dark grounds. */
.appstore.is-light { background: var(--on-badge); color: var(--badge); }
.appstore.is-light:hover { background: var(--ground); }
.appstore:active { transform: scale(0.98); }
.appstore svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.appstore small { display: block; font-size: 0.75rem; line-height: 1.2; opacity: 0.78; }
.appstore strong {
  display: block;
  font: 600 1.125rem / 1.2 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", var(--font-body);
  letter-spacing: 0;
  text-wrap: balance;
}

.qr {
  display: inline-flex;
  align-items: center;
  gap: var(--s-16);
  padding: var(--s-12);
  border-radius: var(--r-card);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: var(--step--1);
  color: var(--muted);
  max-width: 260px;
}
.qr img { width: 76px; height: 76px; border-radius: var(--s-8); }
@media (max-width: 900px) { .qr { display: none; } }

/* ---------- section rhythm ----------
   Every block owns the gap below it, so any two blocks on the page ground sit exactly one
   --section apart. A band paints its own ground, so it carries that gap inside it, above and
   below, and the block after it opens with one of its own. */
.section { padding-block: 0 var(--section); }
.band { padding-block: var(--section); }
.band + .section { padding-top: var(--section); }

.section-head { max-width: 760px; }
.section-head p { margin-top: var(--s-16); color: var(--muted); font-size: var(--step-1); max-width: 58ch; }

/* ---------- hero ---------- */
.hero { padding-block: var(--hero-top) var(--section-tight); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
/* The one italic on the page: the app sets the same words this way on its welcome screen. */
.hero h1 em { font-style: italic; }
.hero .lede {
  font-size: var(--step-1);
  color: var(--muted);
  margin-top: var(--s-24);
  max-width: 40ch;
}
@media (min-width: 901px) { .hero .lede-more { display: block; } }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-16) var(--s-24);
  margin-top: var(--s-32);
}
.cta-note { font-size: var(--step--1); color: var(--muted); }
.hero .qr { margin-top: var(--s-24); }

.hero-media { position: relative; padding-bottom: var(--s-40); }
.hero-photo {
  margin: 0;
  border-radius: var(--r-panel);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--mist);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.hero .phone {
  position: absolute;
  left: clamp(-28px, -2vw, 0px);
  bottom: 0;
  width: clamp(164px, 13vw, 184px);
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .lede { max-width: 40ch; }
  .hero-media { margin-top: var(--s-16); }
}
@media (max-width: 520px) {
  .hero .phone { width: 124px; left: var(--s-8); }
}

/* ---------- the app preview ----------
   Drawn to match the real session screen (src/app/session.tsx, src/components/timer-ring.tsx):
   one thin forest arc over a hairline track, starting at twelve o'clock, the time in Georgia
   on the cream ground, and the three set dashes with the current one in terracotta. */
.phone {
  aspect-ratio: 9 / 19;
  border-radius: 34px;
  background: var(--badge);
  padding: 7px;
  box-shadow: var(--shadow-phone);
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 28px;
  background: var(--beige);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 19% 9% 7%;
  container-type: inline-size;
}
.phone-island {
  position: absolute;
  top: 2.6%;
  left: 50%;
  translate: -50% 0;
  width: 32%;
  height: 4.4%;
  border-radius: 20px;
  background: var(--badge);
}
.phone-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}
.phone-top svg { width: 8cqi; height: 8cqi; }
/* The set dashes: three marks, the one you are on in terracotta. */
.phone-sets { display: flex; gap: 2cqi; }
.phone-sets i { display: block; width: 7cqi; height: 1.6cqi; border-radius: 1cqi; background: var(--hairline-strong); }
.phone-sets i.is-now { background: var(--mark); }
.ring { width: 84%; margin-top: 8cqi; position: relative; }
.ring svg { width: 100%; height: auto; overflow: visible; }
.ring-track { fill: none; stroke: var(--beige-rule); stroke-width: 1.7; }
.ring-arc {
  fill: none;
  stroke: var(--pine);
  stroke-width: 3.4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.ring-readout {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring-time {
  font: 400 20cqi / 1 var(--font-display);
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
}
.ring-label { font-size: max(9px, 7cqi); color: var(--muted); margin-top: 1.5cqi; white-space: nowrap; }
.phone-move { font: 400 9cqi / 1.2 var(--font-display); margin-top: 7cqi; }
.phone-cue { font-size: 5.2cqi; line-height: 1.4; color: var(--muted); text-align: center; margin-top: 2cqi; }
.phone-controls { margin-top: auto; display: flex; align-items: center; gap: 7cqi; }
.phone-controls span {
  display: grid;
  place-items: center;
  width: 15cqi; height: 15cqi;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--muted);
}
.phone-controls span.play { width: 22cqi; height: 22cqi; background: var(--pine); color: var(--on-pine); box-shadow: none; }
.phone-controls svg { width: 42%; height: 42%; fill: currentColor; }
.phone-safety { font-size: 4.6cqi; color: var(--muted); margin-top: 5cqi; text-align: center; }

/* ---------- fact strip ---------- */
.facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.facts li {
  padding: var(--s-20) var(--s-24);
  border-inline-start: 1px solid var(--hairline);
  font-size: var(--step--1);
  color: var(--muted);
}
.facts li:first-child { border-inline-start: 0; padding-inline-start: 0; }
@media (max-width: 900px) {
  .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}
@media (max-width: 460px) {
  .facts ul { grid-template-columns: minmax(0, 1fr); }
  .facts li { border-inline-start: 0; padding-inline-start: 0; }
  .facts li + li { border-top: 1px solid var(--hairline); }
}

/* ---------- what is FlatCore — answer-first ---------- */
.what .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--s-32) var(--s-64);
  align-items: start;
}
.what p { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.45; max-width: 36ch; }
.what p + p {
  margin-top: var(--s-24);
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--muted);
  max-width: 60ch;
}
@media (max-width: 900px) { .what .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- how it works ---------- */
.how .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.how figure {
  margin: 0;
  border-radius: var(--r-panel);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.how figure img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.steps {
  list-style: none;
  margin: var(--s-32) 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: var(--s-32);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: var(--s-40) minmax(0, 1fr);
  gap: var(--s-4) var(--s-16);
}
/* The step number is a serif numeral, not a filled circle: the accent stays for one thing. */
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font: 400 var(--step-2) / 1.2 var(--font-display);
  color: var(--muted);
  font-variant-numeric: lining-nums tabular-nums;
}
.steps h3 { font-size: var(--step-1); align-self: center; }
.steps p { color: var(--muted); max-width: 46ch; margin-top: var(--s-4); }
@media (max-width: 900px) {
  .how .wrap { grid-template-columns: minmax(0, 1fr); }
  .how figure { order: 2; }
}

/* ---------- safe for every body — the one band on the page ---------- */
.safety-band { background: var(--mist); }
.safety-band .section-head p { color: var(--mist-muted); }
.rules {
  margin: var(--s-48) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-32) var(--s-64);
}
.rules div { border-top: 1px solid var(--mist-rule); padding-top: var(--s-24); }
.rules dt { font: 400 var(--step-1) / 1.35 var(--font-display); }
.rules dd { margin: var(--s-8) 0 0; color: var(--mist-muted); max-width: 46ch; }
.safety-line {
  margin-top: var(--s-48);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-12) var(--s-32);
  padding-top: var(--s-24);
  border-top: 1px solid var(--mist-rule);
}
.safety-line strong { font: 400 var(--step-2) / 1.3 var(--font-display); }
.safety-line p { color: var(--mist-muted); font-size: var(--step--1); max-width: 52ch; }
@media (max-width: 760px) { .rules { grid-template-columns: minmax(0, 1fr); } }

/* ---------- privacy ---------- */
.privacy-band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.privacy-band figure {
  margin: 0;
  border-radius: var(--r-panel);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.privacy-band figure img { width: 100%; height: 100%; object-fit: cover; }
/* Plain sentences under hairlines — the check glyph is kept for the plans, where it compares. */
.checks { list-style: none; margin: var(--s-32) 0 0; padding: 0; border-top: 1px solid var(--hairline); }
.checks li { padding: var(--s-16) 0; border-bottom: 1px solid var(--hairline); max-width: 46ch; }
@media (max-width: 900px) { .privacy-band .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pricing ----------
   One panel split by a hairline, so neither plan is dressed up as the answer. */
.plans {
  margin-top: var(--s-48);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--raised);
  border-radius: var(--r-panel);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
}
.plan { display: flex; flex-direction: column; padding: var(--s-32); }
.plan + .plan { box-shadow: inset 1px 0 0 var(--hairline); }
.plan-name { font: 400 var(--step-1) / 1.2 var(--font-display); color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: var(--s-8); margin-top: var(--s-12); flex-wrap: wrap; }
.plan-price strong {
  font: 400 clamp(2.5rem, 2rem + 2vw, 3.25rem) / 1 var(--font-display);
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums tabular-nums;
}
.plan-price span { color: var(--muted); font-size: var(--step--1); }
.plan-trial { display: block; margin-top: var(--s-8); color: var(--muted); font-size: var(--step--1); }
.plan ul { list-style: none; margin: var(--s-24) 0 0; padding: 0; display: grid; gap: var(--s-12); }
.plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--s-12); font-size: var(--step--1); }
.plan li svg { width: 18px; height: 18px; color: var(--muted); margin-top: 3px; }
.legal-note { margin-top: var(--s-24); font-size: var(--step--1); color: var(--muted); max-width: 82ch; }
#pricing .legal-note { max-width: none; }
@media (max-width: 760px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { box-shadow: inset 0 1px 0 var(--hairline); }
}

/* ---------- FAQ ---------- */
.faq .wrap { display: grid; grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); gap: var(--s-48); }
.faq h2 { align-self: start; position: sticky; top: 96px; }
.faq-list { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-24);
  padding: var(--s-20) 0;
  font: 400 var(--step-1) / 1.4 var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  width: 18px; height: 18px; flex: none; color: var(--muted);
  transition: rotate var(--t-press) var(--ease);
}
.faq details[open] summary svg { rotate: 180deg; }
.faq details p { padding: 0 0 var(--s-20); color: var(--muted); max-width: 62ch; }
.faq details p + p { margin-top: calc(var(--s-12) * -1); }
@media (max-width: 900px) {
  .faq .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--s-24); }
  .faq h2 { position: static; }
}

/* ---------- closing call to action ---------- */
/* The page closes on the tight step, so the footer's hairline sits centred between card and links. */
.closing { padding-bottom: var(--section-tight); }
.closing-card {
  padding: clamp(40px, 6vw, 72px) var(--s-32);
  border-radius: var(--r-panel);
  background: var(--pine);
  color: var(--on-pine);
  text-align: center;
  display: grid;
  justify-items: center;
}
.closing-card h2 { color: var(--on-pine); }
.closing-card p { margin-top: var(--s-16); color: var(--on-pine-2); font-size: var(--step-1); max-width: 40ch; }
.closing-card .cta-row { margin-top: var(--s-32); justify-content: center; }

/* ---------- footer ---------- */
.site-footer {
  padding-block: var(--section-tight) calc(var(--section-tight) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline);
  font-size: var(--step--1);
  color: var(--muted);
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-32); }
.footer-top p { margin-top: var(--s-12); max-width: 38ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-48); }
.footer-links h2 { font: 700 var(--step--1) / 1 var(--font-body); color: var(--ink); margin-bottom: var(--s-16); }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-12); }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { margin-top: var(--s-48); padding-top: var(--s-24); border-top: 1px solid var(--hairline); display: grid; gap: var(--s-12); }
.footer-legal p { max-width: 96ch; }
.footer-legal a { color: inherit; }
/* The medical line reads first; the credits sit a step quieter under it. */
.footer-credits { font-size: 0.8125rem; color: color-mix(in srgb, var(--muted) 78%, var(--ground)); }

/* ---------- reading pages (privacy, terms, support, safety) ---------- */
.doc-hero { padding-block: var(--hero-top) var(--s-32); }
.doc-hero h1 { font-size: var(--step-3); max-width: 20ch; }
.doc-hero p { margin-top: var(--s-16); color: var(--muted); font-size: var(--step-1); max-width: 60ch; }
.doc-meta { margin-top: var(--s-16); font-size: var(--step--1); color: var(--muted); }
.breadcrumb { font-size: var(--step--1); color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0 0 var(--s-24); padding: 0; display: flex; gap: var(--s-8); flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s-8); color: var(--hairline-strong); }
.breadcrumb a { color: var(--muted); }
.doc {
  padding-block: var(--s-24) var(--section);
  display: grid;
  grid-template-columns: minmax(200px, 0.32fr) minmax(0, 1fr);
  gap: var(--s-64);
  align-items: start;
}
.toc { position: sticky; top: 96px; font-size: var(--step--1); }
.toc h2 { font: 700 var(--step--1) / 1 var(--font-body); margin-bottom: var(--s-16); }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-8); color: var(--muted); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { max-width: 66ch; }
.prose h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); margin-top: var(--s-48); scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: var(--s-32); }
.prose p, .prose ul, .prose ol { margin-top: var(--s-16); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: var(--s-8); }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose .callout {
  margin-top: var(--s-24);
  padding: var(--s-24);
  border-radius: var(--r-card);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.prose .callout.is-safety { background: var(--pine); color: var(--on-pine); box-shadow: none; }
.prose .callout.is-safety strong { color: var(--on-pine); }
.prose .callout.is-safety a { color: var(--on-pine); }
.prose table { width: 100%; border-collapse: collapse; margin-top: var(--s-16); font-size: var(--step--1); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--s-12) var(--s-12) var(--s-12) 0; border-bottom: 1px solid var(--hairline); }
.prose th { font-weight: 700; }
.table-scroll { overflow-x: auto; }
.contact-card {
  display: grid;
  gap: var(--s-8);
  margin-top: var(--s-24);
  padding: var(--s-32);
  border-radius: var(--r-card);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.contact-card .email { font: 400 var(--step-2) / 1.3 var(--font-display); word-break: break-word; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: var(--s-24); }
  .toc { position: static; padding: var(--s-24); border-radius: var(--r-card); background: var(--raised); box-shadow: inset 0 0 0 1px var(--hairline); }
}

/* ---------- 404 ---------- */
.not-found { padding-block: var(--section) var(--section); text-align: center; display: grid; justify-items: center; gap: var(--s-24); }
.not-found p { color: var(--muted); max-width: 44ch; }
.not-found .cta-row { justify-content: center; margin-top: 0; }

/* Apple's official badge, swapped in by website/tools/configure.mjs at launch. */
.appstore-badge { display: inline-flex; border-radius: var(--r-control); }
.appstore-badge img { height: 56px; width: auto; }

/* Phones: keep "Coming soon to the App Store" on one line in the closing card, like the hero. */
@media (max-width: 420px) {
  .closing-card .appstore strong { font-size: 0.9375rem; white-space: nowrap; }
}
@media (max-width: 359px) {
  .closing-card .appstore strong { white-space: normal; }
}
