/* =========================================================================
   Presto — marketing site
   Art direction: "Warm Technical Spec-Sheet" — the beautifully typeset manual
   for a precision instrument. Visible grid, tabular-numeric ornament, one rare
   basil accent per section, warm tonal depth, zero shadow (device lift only).
   Tokens mirror src/theme.ts / DESIGN.md. Hex is the identity source of truth.
   ========================================================================= */

/* --- Self-hosted fonts ------------------------------------------------- */
/* Latin subsets pulled from Google Fonts (v9 / v23). Plex is the variable
   latin instance (weights 400-700 interpolated). Bricolage is the 800 cut. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces & ink (brand.*) */
  --bg: #f5f3ee;
  --bg-deep: #efece4;        /* a shade under paper, for alternating bands */
  --surface: #fcfaf6;
  --border: #e5e1d8;
  --divider: #eeeae1;
  --primary: #1e1b17;
  --secondary: #6b6862;
  --tertiary: #a89f92;
  --muted: #edebe6;

  /* Signature accent (basil.*) — reticle & scan motif only */
  --basil-fill: #a0c455;
  --basil-ink: #5c7a2c;

  /* Reticle tile (mark.*) */
  --mark-tile: #1f1b14;
  --mark-tile-border: #322c22;
  --mark-letter: #f4f1ea;

  /* Level words (data layer only, inside phone screens) */
  --level-good: #1e7a49;
  --level-bad: #c0392b;

  /* Star rating gold — a deliberate second accent, reserved for the
     universally-recognized 5-star rating convention only (never used
     elsewhere in page chrome). */
  --star: #c8940f;

  /* On-dark text — the one dark section (benefits-dark). --mark-letter is the
     existing warm-white already used inside the reticle tile; reused here for
     full consistency rather than a near-duplicate token. */
  --on-dark-secondary: #c7c0b3;

  /* Type */
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale (≥1.28 ratio between steps; spec-rail friendly) */
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.5rem);
  --step-2:  clamp(1.55rem, 1.4rem + 0.75vw, 2.1rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --step-4:  clamp(2.6rem, 2rem + 3vw, 4.6rem);
  --step-5:  clamp(3.1rem, 2.1rem + 5vw, 6.6rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 0.9rem + 1.7vw, 2.25rem);
  --section-y: clamp(3.25rem, 2.4rem + 4vw, 6rem);
  --radius: 18px;
  --radius-sm: 12px;

  /* One permitted lift: a warm, low shadow for the device only */
  --lift: 0 2px 4px rgba(30, 27, 23, 0.04),
          0 18px 40px -18px rgba(30, 27, 23, 0.22),
          0 60px 90px -60px rgba(30, 27, 23, 0.35);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

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

::selection { background: var(--mark-tile); color: var(--mark-letter); }

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =========================================================================
   LAYOUT PRIMITIVES
   ========================================================================= */
.wrap { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.band { background: var(--bg-deep); }
/* Full-bleed 1px hairline separates major sections instead of empty whitespace */
.section--ruled { border-top: 1px solid var(--border); }

/* --- Spec rail (the signature grid element) ---------------------------- */
/* A narrow left column carrying a section index (01–05) + a short uppercase
   tracked label, baseline-aligned to the heading it introduces. */
.rail {
  display: grid;
  grid-template-columns: minmax(72px, 120px) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}
.rail__meta {
  position: sticky;
  top: 88px;
  font-size: var(--step--1);
  color: var(--tertiary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}
.rail__meta .idx {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: 0;
  margin-bottom: 0.3rem;
}
@media (max-width: 720px) {
  .rail { grid-template-columns: 1fr; }
  .rail__meta {
    position: static;
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    margin-bottom: 1rem;
  }
  .rail__meta .idx { margin-bottom: 0; }
}

/* =========================================================================
   TYPOGRAPHY PRIMITIVES
   ========================================================================= */
h1, h2, h3 { font-weight: 800; margin: 0; color: var(--primary); }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.028em;
  color: var(--primary);
  text-wrap: balance;
}
.lede {
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--secondary);
  max-width: 38ch;
  font-weight: 400;
}
.kicker {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin: 0 0 1.1rem;
}

/* Star rating glyphs — gold everywhere they appear (App Store convention). */
.stars { color: var(--star); letter-spacing: 0.06em; }

/* =========================================================================
   BUTTONS + APP STORE BADGE + RETICLE + WORDMARK  (ported, refined)
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 14px;                 /* deliberate curve, never rounded-full */
  font-weight: 600;
  font-size: var(--step-0);
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-out), background-color 0.25s, border-color 0.25s;
  will-change: transform;
}
.btn--primary { background: var(--primary); color: var(--bg); }  /* the only CTA fill */
.btn--primary:hover { transform: translateY(-2px); background: #100e0b; }
.btn--ghost { color: var(--primary); border-color: var(--border); background: var(--surface); }
.btn--ghost:hover { border-color: var(--tertiary); transform: translateY(-2px); }
.btn--link {
  padding: 0; color: var(--primary); font-weight: 600;
  text-underline-offset: 3px; text-decoration: underline; text-decoration-color: var(--border);
}
.btn--link:hover { text-decoration-color: var(--primary); }

/* App Store badge — black, matches the one-CTA-color doctrine */
.badge-appstore {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: var(--primary); color: var(--bg);
  padding: 0.7rem 1.15rem 0.72rem; border-radius: 14px;
  transition: transform 0.35s var(--ease-out), background-color 0.25s;
  flex-shrink: 0; /* never let a tight flex row squeeze this and wrap the label */
}
.badge-appstore:hover { transform: translateY(-2px); background: #100e0b; }
.badge-appstore svg { width: 26px; height: 26px; fill: var(--bg); }
.badge-appstore .b-small { display: block; font-size: 0.66rem; letter-spacing: 0.04em; opacity: 0.9; line-height: 1; margin-bottom: 3px; white-space: nowrap; }
.badge-appstore .b-big { display: block; font-size: 1.16rem; font-weight: 600; line-height: 1; white-space: nowrap; }

/* Android waitlist — same standard dark-badge convention as the App Store
   badge (matches the familiar App Store / Google Play pairing), text swapped
   for a waitlist since there is no Play listing yet. Opens the waitlist dialog. */
.badge-wait {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: var(--primary); color: var(--bg);
  padding: 0.7rem 1.15rem 0.72rem; border-radius: 14px;
  transition: transform 0.35s var(--ease-out), background-color 0.25s;
  flex-shrink: 0;
}
.badge-wait:hover { transform: translateY(-2px); background: #100e0b; }
.badge-wait svg { width: 24px; height: 24px; fill: var(--bg); }
.badge-wait .b-small { display: block; font-size: 0.66rem; letter-spacing: 0.04em; opacity: 0.9; line-height: 1; margin-bottom: 3px; white-space: nowrap; }
.badge-wait .b-big { display: block; font-size: 1.16rem; font-weight: 600; line-height: 1; white-space: nowrap; }

/* Reticle mark — dark tile, basil L-brackets, Bricolage "p" */
.reticle {
  position: relative; display: grid; place-items: center;
  background: var(--mark-tile);
  border: 1px solid var(--mark-tile-border);
  color: var(--mark-letter);
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 26%;
  aspect-ratio: 1;
  width: var(--r-size, 34px);
  font-size: calc(var(--r-size, 34px) * 0.52);
  line-height: 1;
}
.reticle span { transform: translateY(2%); }
.reticle::before, .reticle::after {
  content: ""; position: absolute; width: 26%; height: 26%; pointer-events: none;
}
.reticle::before { top: 15%; left: 15%; border-top: 2px solid var(--basil-fill); border-left: 2px solid var(--basil-fill); border-top-left-radius: 4px; }
.reticle::after { bottom: 15%; right: 15%; border-bottom: 2px solid var(--basil-fill); border-right: 2px solid var(--basil-fill); border-bottom-right-radius: 4px; }

.wordmark { display: inline-flex; align-items: center; gap: 9px; }
.wordmark .mark { width: 34px; height: 34px; border-radius: 8px; }
.wordmark .word { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: 1.4rem; color: var(--primary); }
.footer .wordmark .mark { width: 32px; height: 32px; }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
  backdrop-filter: saturate(1.1) blur(8px);
}
.nav[data-scrolled="true"] { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav__links a { font-size: var(--step--1); font-weight: 500; color: var(--secondary); }
.nav__links a:hover { color: var(--primary); }
/* Higher specificity than ".nav__links a" so the primary CTA keeps its
   white (--bg) label instead of inheriting the gray nav-link color. */
.nav__links .nav__cta,
.nav__links .nav__cta:hover { color: var(--bg); }
.nav__cta { padding: 0.55rem 1.05rem; font-size: var(--step--1); gap: 0.45rem; }
.nav__cta .btn__apple { width: 15px; height: 15px; fill: currentColor; margin-top: -2px; }
@media (max-width: 720px) { .nav__links .nav__hide { display: none; } }

/* =========================================================================
   TABULAR-NUMERIC ORNAMENT  (page furniture — the MetricRow language)
   A one-line spec strip: tracked labels · tabular figures · hairline dividers.
   ========================================================================= */
.specstrip {
  display: inline-flex; align-items: stretch; flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.specstrip__cell {
  display: flex; flex-direction: column; gap: 3px;
  padding: 0.62rem 1.05rem;
  border-left: 1px solid var(--border);
}
.specstrip__cell:first-child { border-left: 0; }
.specstrip__k {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--tertiary); line-height: 1;
}
.specstrip__v {
  font-size: 0.98rem; font-weight: 600; color: var(--primary);
  letter-spacing: -0.01em; line-height: 1.1;
}
.specstrip__v .stars { font-size: 0.82rem; letter-spacing: 0.06em; }

/* =========================================================================
   DEVICE / PHONE FRAME  (ported — rendered faithfully)
   ========================================================================= */
.device {
  --w: 300px;
  width: var(--w); aspect-ratio: 300 / 620;
  background: #0d0c0a; border-radius: 46px; padding: 11px;
  box-shadow: var(--lift);                 /* the ONLY shadow on the page */
  position: relative;
}
.device--sm { --w: 264px; }
.device__screen {
  width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
  background: var(--bg); position: relative; display: flex; flex-direction: column;
}
.device__notch {
  position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: #0d0c0a; border-radius: 14px; z-index: 3;
}
/* Swappable target: replace .app-screen with <img class="device__shot"> later */
.device__shot { width: 100%; height: 100%; object-fit: cover; }

/* --- App screen mockups (faithful to the app; token-driven) ----------- */
.app-screen { flex: 1; padding: 44px 18px 16px; display: flex; flex-direction: column; font-size: 13px; }
.app-screen__back { color: var(--tertiary); font-size: 15px; margin-bottom: 10px; }
.app-title { font-family: var(--font-sans); font-weight: 700; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; color: var(--primary); }
.app-brandline { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tertiary); margin-top: 3px; }
.app-seclabel { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tertiary); margin: 16px 0 8px; }

.mrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 12px 2px; border-top: 1px solid var(--divider); }
.mrow:first-of-type { border-top: none; }
.mrow__label { font-weight: 500; color: var(--primary); font-size: 13px; }
.mrow__valwrap { display: flex; flex-direction: column; align-items: flex-end; }
.mrow__val { display: block; font-weight: 700; font-size: 19px; text-align: right; letter-spacing: -0.01em; line-height: 1.05; color: var(--primary); }
.mrow__unit { display: block; font-size: 9.5px; color: var(--tertiary); text-align: right; margin-top: 2px; }
.mrow__level { font-size: 12px; font-weight: 600; width: 40px; text-align: right; }
.mrow__level--good { color: var(--level-good); }
.mrow__level--bad { color: var(--level-bad); }

.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 12px; }
.app-price { display: flex; gap: 8px; margin-top: 6px; }
.app-input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-weight: 600; font-size: 14px; color: var(--primary); }
.app-input--sm { flex: 0 0 74px; color: var(--secondary); display: flex; justify-content: space-between; align-items: center; }
.app-cta { margin-top: auto; background: var(--primary); color: var(--bg); text-align: center; padding: 13px; border-radius: 14px; font-weight: 600; font-size: 14px; }

/* Goal screen */
.goal-opt { display: flex; align-items: center; gap: 11px; border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; background: var(--surface); }
.goal-opt[data-sel="true"] { border: 2px solid var(--primary); padding: 13px; }
.goal-ring { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cfc9bd; flex: none; display: grid; place-items: center; }
.goal-opt[data-sel="true"] .goal-ring { border-color: var(--primary); }
.goal-opt[data-sel="true"] .goal-ring::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: inset 0 0 0 2px var(--surface); }
.goal-opt__t { font-weight: 600; font-size: 14px; }
.goal-opt__s { font-size: 11px; color: var(--secondary); }

/* Compare screen */
.cmp-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 4px; }
.cmp-col { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.cmp-col__name { font-weight: 700; font-size: 12px; line-height: 1.15; color: var(--primary); }
.cmp-col__brand { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tertiary); margin-top: 2px; }
.cmp-sort { font-size: 10px; color: var(--tertiary); margin: 14px 0 4px; display: flex; align-items: center; gap: 5px; }
.cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--divider); }
.cmp-cell { text-align: left; }
.cmp-cell b { font-size: 16px; font-weight: 700; color: var(--primary); }
.cmp-cell.win b { color: var(--level-good); }
.cmp-metric { font-size: 10px; color: var(--tertiary); text-transform: uppercase; letter-spacing: 0.1em; grid-column: 1 / -1; }

/* --- Scan-bracket framing (the basil accent moment) -------------------- */
.framed { position: relative; padding: 20px; width: max-content; }
.framed::before, .framed::after,
.framed > .fc { position: absolute; width: 30px; height: 30px; pointer-events: none; }
.framed::before { content: ""; top: 0; left: 0; border-top: 2px solid var(--basil-fill); border-left: 2px solid var(--basil-fill); border-top-left-radius: 8px; }
.framed::after { content: ""; bottom: 0; right: 0; border-bottom: 2px solid var(--basil-fill); border-right: 2px solid var(--basil-fill); border-bottom-right-radius: 8px; }
.framed .fc-tr { top: 0; right: 0; border-top: 2px solid var(--basil-fill); border-right: 2px solid var(--basil-fill); border-top-right-radius: 8px; }
.framed .fc-bl { bottom: 0; left: 0; border-bottom: 2px solid var(--basil-fill); border-left: 2px solid var(--basil-fill); border-bottom-left-radius: 8px; }

/* =========================================================================
   REVEAL ON SCROLL  (one restrained page-load choreography)
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .badge-appstore, .plan .btn { transition: none; }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { border-top: 1px solid var(--border); padding-block: clamp(2.5rem, 4vw, 4rem); }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer__links { display: flex; gap: clamp(1.2rem, 3vw, 2.5rem); flex-wrap: wrap; }
.footer__links a { color: var(--secondary); font-size: var(--step--1); }
.footer__links a:hover { color: var(--primary); }
.footer__legal { color: var(--tertiary); font-size: 0.8rem; margin-top: 1.4rem; }

/* =========================================================================
   WAITLIST DIALOG
   ========================================================================= */
dialog.wl {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; max-width: 420px; width: calc(100% - 2rem);
  background: var(--surface); color: var(--primary);
  box-shadow: var(--lift);
}
dialog.wl::backdrop { background: rgba(30, 27, 23, 0.4); }
.wl h3 { font-family: var(--font-display); font-size: var(--step-2); letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.wl p { color: var(--secondary); font-size: var(--step--1); margin: 0 0 1.4rem; }
.wl form { display: flex; flex-direction: column; gap: 0.8rem; }
.wl input[type=email] { padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font-size: var(--step-0); }
.wl input[type=email]:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.wl__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wl__close { position: absolute; top: 1rem; right: 1rem; background: none; border: 0; color: var(--tertiary); font-size: 1.4rem; line-height: 1; }
.wl__close:hover { color: var(--primary); }
.wl__msg { font-size: var(--step--1); min-height: 1.2em; }
.wl__msg[data-state="error"] { color: var(--level-bad); }
.wl__msg[data-state="ok"] { color: var(--level-good); }

/* =========================================================================
   LEGAL / CONTENT PAGES  (ported)
   ========================================================================= */
.doc { padding-block: clamp(3rem, 6vw, 6rem); }
.doc__eyebrow { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--tertiary); }
.doc h1 { font-family: var(--font-display); font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1; margin: 0.8rem 0 0.4rem; }
.doc__updated { color: var(--tertiary); font-size: var(--step--1); margin-bottom: 2.5rem; }
.doc__body { max-width: 68ch; }
.doc__body h2 { font-size: var(--step-2); letter-spacing: -0.02em; margin: 2.6rem 0 0.9rem; font-weight: 700; font-family: var(--font-sans); }
.doc__body h3 { font-size: var(--step-1); margin: 1.8rem 0 0.6rem; font-weight: 600; }
.doc__body p, .doc__body li { color: var(--secondary); line-height: 1.65; }
.doc__body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--tertiary); }
.doc__body ul { padding-left: 1.2rem; }
.doc__body li { margin-bottom: 0.4rem; }
.doc__body hr { border: 0; border-top: 1px solid var(--border); margin: 2.4rem 0; }
.doc__body table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: var(--step--1); }
.doc__body th, .doc__body td { text-align: left; padding: 0.7rem 0.8rem; border: 1px solid var(--border); vertical-align: top; }
.doc__body th { background: var(--muted); color: var(--primary); font-weight: 600; }
.doc__table-scroll { overflow-x: auto; }
.callout { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.4rem 0; font-size: var(--step--1); color: var(--secondary); }

/* =========================================================================
   SECTION-SPECIFIC BLOCKS  (added by section tasks, appended below)
   Task 1 authors tokens + primitives + reusable components only.
   ========================================================================= */

/* =========================================================================
   HERO  — centered (MacroFactor-shaped): social proof, oversized headline,
   dual platform badges, then a centered device flanked by two real reviews.
   ========================================================================= */
.hero {
  padding-top: clamp(1.6rem, 0.8rem + 3.2vw, 3.25rem);
  padding-bottom: 0; /* the clipped device should touch the section's bottom edge, no gap */
  text-align: center;
}

.hero__proof {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0 0 clamp(1.2rem, 0.8rem + 1vw, 1.8rem);
  color: var(--secondary);
  font-size: clamp(0.92rem, 0.8rem + 0.5vw, 1.05rem);
  white-space: nowrap;
}
.hero__proof .stars { font-size: 0.85em; }

.hero__h1 {
  font-size: var(--step-4);
  letter-spacing: -0.03em;
  max-width: 32ch;
  margin: 0 auto;
}

.hero__actions {
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center;
  gap: 0.9rem 1rem; margin-top: clamp(2.2rem, 1.6rem + 1.8vw, 3rem);
}

/* Showcase: [review] [device] [review], centered, reviews vertically centered. */
.hero__showcase {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.hero__device { justify-self: center; }
/* Clipped like MacroFactor's hero device: the phone is cut off partway down
   rather than shown in full, so it reads as bleeding past the fold. */
.hero__device .device {
  --w: 262px;
  max-height: 430px; overflow: hidden;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.hero__framed { padding: 20px; }

.hero__quote {
  margin: 0; max-width: 300px; justify-self: center;
}
.hero__quote--l { justify-self: end; }
.hero__quote--r { justify-self: start; }
.hero__quote .stars { display: block; font-size: 0.85rem; margin-bottom: 0.9rem; }
.hero__quote blockquote {
  margin: 0 0 1rem; font-size: var(--step-0); line-height: 1.5; color: var(--primary);
  text-wrap: pretty;
}
.hero__quote figcaption {
  font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  font-size: var(--step--1); color: var(--primary);
}

/* Below the 3-column breakpoint: device centered, reviews stack under it. */
@media (max-width: 980px) {
  .hero__showcase { grid-template-columns: 1fr; justify-items: center; gap: clamp(2rem, 5vw, 3rem); }
  .hero__device { order: 1; }
  .hero__quote { order: 2; max-width: 44ch; }
  .hero__quote--l, .hero__quote--r { justify-self: center; }
}

/* =========================================================================
   BENEFITS (dark)  — MacroFactor-style 3-column band, the one deliberate
   dark contrast moment on the page. Light "widget" cards float on the near-
   black background, echoing the same dark-tile / warm-white relationship
   already used in the reticle mark.
   ========================================================================= */
.benefits-dark {
  background: var(--primary);
  color: var(--mark-letter);
  text-align: center;
}
.benefits-dark__h2 {
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--mark-letter);
  max-width: 30ch;
  margin: 0 auto;
}
.benefits-dark__sub {
  color: var(--on-dark-secondary);
  font-size: var(--step-1);
  max-width: 46ch;
  margin: 1.1rem auto 0;
}

.benefits-dark__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  text-align: left;
}
.benefit-col h3 {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--mark-letter);
  margin: 1.6rem 0 0.6rem;
  max-width: 30ch;
}
.benefit-col p { color: var(--on-dark-secondary); font-size: var(--step-0); line-height: 1.5; max-width: 34ch; }

/* Light "widget" card — the app UI peeking out against the dark backdrop,
   same lift as the phone device (the one shadow this page permits). */
.widget {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  overflow: hidden;
}
.widget__screen { padding: 18px 16px; }
.widget .app-brandline { margin-bottom: 10px; }
.widget .mrow:first-of-type { border-top: 0; }
.widget .cmp-head { margin-top: 2px; }

@media (max-width: 900px) {
  .benefits-dark__grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; gap: 2.8rem; }
}

/* =========================================================================
   REVIEWS  — a carousel of real App Store reviews (dropped the
   country/date metadata; author name only).
   ========================================================================= */
.reviews__head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); max-width: 56ch; margin-inline: auto; text-align: center; }
.reviews__head h2 { font-size: var(--step-3); letter-spacing: -0.025em; line-height: 1.08; margin-bottom: 0.9rem; }

.reviews__carousel {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto;
}
.reviews__track {
  display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none; padding: 0.25rem 0.1rem 1rem;
}
.reviews__track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 300px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
}
.review .stars { font-size: 0.85rem; }
.review__title { font-weight: 700; font-size: var(--step-0); margin: 0.8rem 0 0.6rem; letter-spacing: -0.01em; line-height: 1.3; }
.review__body { color: var(--secondary); font-size: var(--step--1); line-height: 1.6; margin: 0; }
.review__meta { margin-top: 1.2rem; font-size: 0.78rem; }
.review__meta b { color: var(--secondary); font-weight: 600; }

.carousel__nav {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--primary);
  transition: transform 0.35s var(--ease-out), border-color 0.25s;
}
.carousel__nav svg { width: 18px; height: 18px; }
.carousel__nav:hover { border-color: var(--tertiary); transform: translateY(-2px); }
.carousel__nav:disabled { opacity: 0.35; pointer-events: none; }
@media (max-width: 640px) {
  .reviews__carousel { grid-template-columns: 1fr; gap: 0.75rem; }
  .carousel__nav { display: none; }
}

/* =========================================================================
   PRICING (dark)  — the second dark band. A bordered plan card (monthly-
   equivalent pricing, honest math over hype) plus a checklist that also
   carries the "no ads, never sell your data" message.
   ========================================================================= */
.pricing-dark { background: var(--primary); color: var(--mark-letter); }
.pricing-dark__head { text-align: center; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.pricing-dark__eyebrow { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-secondary); margin-bottom: 0.8rem; }
.pricing-dark__head h2 { color: var(--mark-letter); font-size: var(--step-3); letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 0.6rem; }
.pricing-dark__sub { color: var(--on-dark-secondary); font-size: var(--step-1); }

.pricing-dark__card {
  display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center;
  gap: 1.25rem; border: 2px solid rgba(244, 241, 234, 0.22); border-radius: var(--radius);
  padding: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); max-width: 720px; margin-inline: auto;
}
@media (max-width: 640px) { .pricing-dark__card { grid-template-columns: minmax(0, 320px); } }
.pplan { text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; }
.pplan__tag {
  position: absolute; top: -2.4rem; left: 50%; transform: translateX(-50%);
  background: var(--mark-letter); color: var(--primary);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 7px; white-space: nowrap;
}
.pplan__name { font-weight: 600; font-size: var(--step-0); margin-top: 0.3rem; }
.pplan__note { color: var(--on-dark-secondary); font-size: 0.78rem; margin-bottom: 0.3rem; }
.pplan__price {
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-4);
  letter-spacing: -0.02em; line-height: 1; margin: 0.7rem 0 0.1rem; color: var(--mark-letter);
}
.pplan__price sup { font-size: 0.42em; top: -0.5em; }
.pplan__monthly { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; color: var(--on-dark-secondary); margin-bottom: 1.3rem; }
.pplan .btn { width: 100%; }

.btn--invert { background: var(--mark-letter); color: var(--primary); }
.btn--invert:hover { transform: translateY(-2px); background: #fff; }
.btn--ghost-invert { background: transparent; color: var(--mark-letter); border: 1px solid rgba(244, 241, 234, 0.35); }
.btn--ghost-invert:hover { border-color: var(--mark-letter); transform: translateY(-2px); }

/* Left-aligned, matching the FAQ content's width (wrap--narrow = 760px),
   so the lede and checklist share the same left edge as the checkmarks. */
.pricing-dark__foot { text-align: left; max-width: 760px; margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) auto 0; }
.pricing-dark__lede { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; max-width: 60ch; margin: 0 0 1.4rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.checklist li {
  position: relative; padding-left: 1.7rem; color: var(--on-dark-secondary); font-size: var(--step-0);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 14px; height: 9px;
  border-left: 2px solid var(--basil-fill); border-bottom: 2px solid var(--basil-fill);
  transform: rotate(-45deg);
}
.pricing-dark__fine { color: var(--on-dark-secondary); opacity: 0.7; font-size: 0.8rem; margin-top: 2.4rem; max-width: 62ch; line-height: 1.55; text-align: center; margin-inline: auto; }

/* =========================================================================
   FAQ  — hairline-ruled accordion. Plus rotates to a minus when open.
   ========================================================================= */
.faq__head { font-size: var(--step-3); letter-spacing: -0.025em; margin-bottom: 2.2rem; }
.faq__item { border-top: 1px solid var(--border); }
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: 100%; text-align: left; padding: 1.4rem 0.1rem;
  font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em;
}
.faq__q:hover { color: var(--primary); }
.faq__icon { flex: none; width: 20px; height: 20px; position: relative; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--secondary); transition: transform 0.35s var(--ease-out), opacity 0.3s; }
.faq__icon::before { top: 9px; left: 2px; width: 16px; height: 2px; }
.faq__icon::after { left: 9px; top: 2px; width: 2px; height: 16px; }
.faq__item[open] .faq__icon::after { transform: scaleY(0); opacity: 0; }
.faq__a { overflow: hidden; }
.faq__a p { margin: 0; padding: 0 0.1rem 1.5rem; color: var(--secondary); font-size: var(--step-0); line-height: 1.6; max-width: 62ch; }
details.faq__item summary { list-style: none; cursor: pointer; }
details.faq__item summary::-webkit-details-marker { display: none; }

/* =========================================================================
   FINAL CTA
   ========================================================================= */
.finalcta__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem); flex-wrap: wrap;
}
.finalcta__copy h2 { font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 0.7rem; }
.finalcta__copy p { color: var(--secondary); font-size: var(--step-0); white-space: nowrap; }
.finalcta__actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; align-items: stretch; flex: none; }

@media (max-width: 720px) {
  .finalcta__inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .finalcta__actions { justify-content: flex-start; }
  .finalcta__copy p { white-space: normal; }
}

/* =========================================================================
   WAITLIST DIALOG
   ========================================================================= */
dialog.wl {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; max-width: 420px; width: calc(100% - 2rem);
  background: var(--surface); color: var(--primary);
  box-shadow: var(--lift);
}
dialog.wl::backdrop { background: rgba(30, 27, 23, 0.4); }
.wl h3 { font-family: var(--font-display); font-size: var(--step-2); letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.wl p { color: var(--secondary); font-size: var(--step--1); margin: 0 0 1.4rem; }
.wl form { display: flex; flex-direction: column; gap: 0.8rem; position: relative; }
.wl input[type=email] { padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font-size: var(--step-0); }
.wl input[type=email]:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.wl__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wl__close { position: absolute; top: 1rem; right: 1rem; background: none; border: 0; color: var(--tertiary); font-size: 1.4rem; line-height: 1; }
.wl__close:hover { color: var(--primary); }
.wl__msg { font-size: var(--step--1); min-height: 1.2em; }
.wl__msg[data-state="error"] { color: var(--level-bad); }
.wl__msg[data-state="ok"] { color: var(--level-good); }
