/* welcome.css -- the landing page at "/" (redesign 2026-11-21: Deliverables/2026-11-21-levels-landing-redesign.md;
   2026-11-22: StoryBrand rewrite, Deliverables/2026-11-22-levels-landing-sb7-copy.md; video under the hero).
   The ONLY stylesheet the page loads before first paint, so the headline paints on a slow phone network without
   waiting for the app's 150 KB of CSS (UAT P5-01). styles.css is fetched later by welcome.js, only when the video
   player is about to show, and is inserted BEFORE this file so these rules still win.
   Tokens: the block below is copied verbatim from styles.css :root (light, and dark by prefers-color-scheme), and
   tests/landing-page.test.mjs fails if any value here drifts from styles.css. No new colour value. Five landing-only
   sizes are Vesta's proposed tokens (spec 3.3), marked PROPOSED, pending approval. Phone first; 760px and 1000px up. */

/* ---- tokens (verbatim from styles.css) ---- */
:root{
  --bg:#f6f3ec; --paper:#fffdf9; --paper-alt:#efeadc;
  --ink:#1b1f23; --ink-2:#343b41; --muted:#5e6063;
  --line:#ddd5c1; --line-strong:#c8bd9f;
  --accent:#0d4a44; --accent-ink:#f8f6ee; --accent-bg:#e2efec; --accent-bg-strong:#c7e2db;
  --shadow-md:0 4px 16px rgba(24,20,10,.07);
  --shadow-lg:0 8px 32px rgba(24,20,10,.10);
  --font-display:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --font-body:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color-scheme: light;
  --text-page:28px; --text-section:22px; --text-card:18px; --text-body:16px; --text-dense:14px; --text-meta:13px; --text-caption:12px; --text-figure:40px;
  --space-xs:4px; --space-sm:8px; --space-md:16px; --space-lg:24px; --space-xl:32px; --space-2xl:48px;
  --radius-sm:4px; --radius-md:8px; --radius-lg:24px; --radius-pill:999px;
  --control-h:40px; --control-h-touch:44px;
  --appbar-h:56px;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#14171a; --paper:#1a1e22; --paper-alt:#20252a;
    --ink:#e8e5db; --ink-2:#c7c3b8; --muted:#a0a5ab;
    --line:#2c3237; --line-strong:#3c444b;
    --accent:#3fae9d; --accent-ink:#0a1310; --accent-bg:#173330; --accent-bg-strong:#1f463f;
    --shadow-md:0 6px 20px rgba(0,0,0,.35);
    --shadow-lg:0 10px 36px rgba(0,0,0,.40);
    color-scheme: dark;
  }
}
/* ---- PROPOSED landing-only tokens (Vesta, redesign spec 3.3; pending approval) ---- */
:root{
  --text-display:56px;  /* hero H1, desktop. Levels-only: GL-003 --text-display is 48px (CBIO), not this token */
  --text-lead:20px;     /* hero sub, desktop */
  --space-3xl:64px;     /* section rhythm, phone. Levels-only: GL-003 --space-3xl is 96px (CBIO), not this token */
  --space-4xl:96px;     /* section rhythm, desktop */
  --control-h-lg:52px;  /* hero, video and closing Get started */
}
/* landing aliases (existing tokens only): the phone frame's edge reads dark on both themes */
:root{ --lp-bezel:var(--ink); }
@media (prefers-color-scheme: dark){ :root{ --lp-bezel:var(--line-strong); } }
/* Vesta landing tokens ruling 2026-11-21, punch changes 2 and 3 (aliases of existing tokens, no new colour):
   the hero glow is stronger in light mode only (dark stays on --accent-bg: muted fine print on dark
   --accent-bg-strong is 4.22:1, a fail); the closing band is solid accent with the button inverted. */
:root{ --lp-hero-glow:var(--accent-bg-strong); --lp-close-bg:var(--accent); --lp-close-ink:var(--accent-ink); }
/* dark: a deeper teal band (bright --accent was too loud; design lead 2026-11-21) with --ink text and button:
   text, button text, button edge and focus ring all 8.3:1 on the dark --accent-bg-strong */
@media (prefers-color-scheme: dark){ :root{ --lp-hero-glow:var(--accent-bg); --lp-close-bg:var(--accent-bg-strong); --lp-close-ink:var(--ink); } }


/* ---- base ---- */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body.lp{margin:0;background:var(--bg);color:var(--ink);font:400 var(--text-body)/1.55 var(--font-body);overflow-x:hidden}
.lp :where(h1,h2,h3,p,ol,ul,figure){margin:0}
.lp :where(ol,ul){padding:0;list-style:none}
.lp a{color:var(--accent)}
.lp [hidden]{display:none !important}
.lp :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.lp :where(h1,h2,h3){font-family:var(--font-display);color:var(--ink);font-weight:600;text-wrap:balance}
.lp :where(p,li){text-wrap:pretty}
.lp-wrap{max-width:1160px;margin:0 auto;padding:0 var(--space-md)}
.lp-narrow{max-width:760px;text-align:center}
.lp-skip{position:absolute;left:var(--space-md);top:-64px;z-index:10;background:var(--paper);color:var(--accent);padding:var(--space-sm) var(--space-md);border-radius:var(--radius-md)}
.lp-skip:focus{top:var(--space-sm)}
.lp-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* buttons: the app's primary pill, larger on the landing */
.lp-btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--control-h-touch);padding:0 var(--space-lg);border-radius:var(--radius-pill);border:1px solid var(--accent);background:var(--accent);color:var(--accent-ink) !important;font:600 var(--text-dense)/1.2 var(--font-body);text-decoration:none;white-space:nowrap}
.lp-btn-lg{min-height:var(--control-h-lg);padding:0 var(--space-xl);font-size:var(--text-card)}
@media (hover:hover){.lp-btn:hover{filter:brightness(1.12)}}

.lp-eyebrow{font-size:var(--text-meta);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
.lp-fine{font-size:var(--text-meta);line-height:1.5;color:var(--muted)}
.lp-lead{font-size:var(--text-card);line-height:1.5;color:var(--ink-2);margin-top:var(--space-md)}
.lp-tag{display:inline-block;background:var(--accent);color:var(--accent-ink);font-size:var(--text-caption);font-weight:600;letter-spacing:.04em;padding:2px var(--space-sm);border-radius:var(--radius-pill)}

/* ---- bar (over the hero) ---- */
.lp-bar{position:absolute;top:0;left:0;right:0;z-index:2}
.lp-bar-in{display:flex;align-items:center;min-height:72px}
.lp-wordmark{display:inline-flex;align-items:center;gap:var(--space-sm);font:600 var(--text-section)/1 var(--font-display);color:var(--ink)}
.lp-mark{display:grid;place-items:center;width:32px;height:32px}
.lp-mark svg{width:100%;height:100%;display:block}
.lp-mark-steps{fill:var(--ink)}
.lp-mark-top{fill:var(--accent)}

/* ---- 1. hero: the promise, one Get started, who it is for ---- */
.lp-hero{padding:96px 0 var(--space-3xl);background:radial-gradient(ellipse 70% 50% at 50% 78%, var(--lp-hero-glow) 0%, transparent 72%),linear-gradient(180deg,var(--paper) 0%,var(--bg) 100%)}
.lp-hero-grid{display:grid;gap:var(--space-2xl);align-items:center}
.lp-hero-text{display:grid;justify-items:start}
.lp-hero h1{font-size:var(--text-figure);line-height:1.08;letter-spacing:-.015em;margin-top:var(--space-md)}
.lp-hero h1 span{color:var(--accent)} /* echoes the mark: ink steps, accent top step (Vesta punch change 1) */
.lp-sub{font-size:var(--text-card);line-height:1.5;color:var(--ink-2);margin-top:var(--space-md);max-width:40ch;text-wrap:balance}
.lp-hero .lp-btn{margin-top:var(--space-lg)}
.lp-for{margin-top:var(--space-md);font-size:var(--text-dense);color:var(--muted)}
.lp-vidlink{display:none;align-items:center;min-height:var(--control-h-touch);margin-top:var(--space-sm);font-weight:600}
.lp-hero-shot{justify-self:center;display:grid;justify-items:start;gap:var(--space-sm)}

/* phone frame: a drawn bezel and status strip around the untouched capture (the capture is never covered) */
.lp-device{width:260px;padding:10px;border-radius:44px;background:var(--lp-bezel);box-shadow:var(--shadow-lg)}
.lp-device-screen{border-radius:34px;overflow:hidden;background:var(--paper)}
.lp-device-screen::after{content:"";display:block;height:22px;background:var(--paper);background-image:linear-gradient(var(--lp-bezel),var(--lp-bezel));background-size:72px 4px;background-position:50% 9px;background-repeat:no-repeat} /* home bar: the tab labels sit above the rounded corners */
.lp-device-screen::before{content:"";display:block;height:26px;background:var(--paper);background-image:radial-gradient(closest-side,var(--lp-bezel) 98%,transparent);background-size:64px 14px;background-position:50% 7px;background-repeat:no-repeat}
.lp-device img,.lp-shot img{display:block;width:100%;height:auto}

/* intro video switch, before first paint: the host fills levels-intro-video "shown" only when the service shows the
   intro. Shown: the video section, the "Watch the intro" links, a centred hero with no image. Held (the default, and any
   page the host did not fill): the phone screen in the hero, and the video section is never laid out. welcome.js adds
   .lp-video-on as well, for browsers without :has() (the :is() lists below still match it). */
.lp-vid{display:none;padding:0 0 var(--space-3xl)}
html:has(meta[name="levels-intro-video"][content="shown"]) .lp-vid{display:block}
html.lp-video-on .lp-vid{display:block}
:is(:has(meta[content=shown]),.lp-video-on) .lp-vidlink{display:inline-flex}
:is(:has(meta[content=shown]),.lp-video-on) .lp-hero-shot{display:none}
:is(:has(meta[content=shown]),.lp-video-on) .lp-hero{padding-bottom:var(--space-2xl);background:radial-gradient(ellipse 60% 55% at 50% 45%, var(--lp-hero-glow) 0%, transparent 72%),linear-gradient(180deg,var(--paper) 0%,var(--bg) 100%)}
:is(:has(meta[content=shown]),.lp-video-on) .lp-hero-text{justify-items:center;text-align:center;max-width:760px;margin:0 auto}
.lp-vid-in{max-width:960px}
.lp-video-note{margin:0 auto var(--space-md);text-align:center;max-width:62ch}
.lp-vid [data-lp-video-failed]{margin:var(--space-md) auto 0;text-align:center}
.lp-vid .lp-btn{display:flex;width:max-content;margin:var(--space-lg) auto 0}
.lp-player{position:relative;aspect-ratio:16/9;border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-lg);background:linear-gradient(135deg,var(--accent) 0%,var(--accent-bg-strong) 100%)}
.lp-poster{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.lp-play{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;margin:0;padding:0;border:0;background:transparent;cursor:pointer;color:var(--accent-ink);font-family:var(--font-body)}
.lp-play-disc{display:grid;place-items:center;width:88px;height:88px;border-radius:50%;background:var(--accent);box-shadow:var(--shadow-lg);transition:transform .15s ease}
.lp-play-disc svg{width:40px;height:40px;margin-left:4px;fill:var(--accent-ink)}
.lp-play-len{position:absolute;left:var(--space-md);bottom:var(--space-md);background:var(--paper);color:var(--ink);border-radius:var(--radius-pill);padding:4px 12px;font-size:var(--text-meta);font-weight:600;box-shadow:var(--shadow-md)}
@media (hover:hover){.lp-play:hover .lp-play-disc{transform:scale(1.06)}}
@media (prefers-reduced-motion:reduce){.lp-play-disc{transition:none}}
.lp-play:focus-visible{outline-offset:-6px}
.lp-player.is-playing{overflow:visible;aspect-ratio:auto;background:none;box-shadow:none}
.lp-player .intro-frame{border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)}
.lp-chapters{margin-top:var(--space-sm)}
.lp-chapters summary{cursor:pointer;display:inline-flex;align-items:center;min-height:var(--control-h-touch);font-weight:600;color:var(--ink-2)}
.lp-player-failed .lp-chapters{display:none}

/* ---- sections ---- */
.lp-sec{padding:var(--space-3xl) 0}
.lp-sec h2{font-size:var(--text-page);line-height:1.15;letter-spacing:-.01em}
.lp-band{background:var(--paper-alt);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.lp-value h2,.lp-plan h2{text-align:center;margin:0 auto;max-width:24ch}
.lp-guide .lp-fine{margin-top:var(--space-md)}

/* 3. value: three cards, icon, heading, one line */
.lp-cards{display:grid;gap:var(--space-md);margin-top:var(--space-xl)}
.lp-cards li{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-lg);padding:var(--space-lg);box-shadow:var(--shadow-md)}
.lp-cards svg,.lp-proof svg{display:block;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lp-cards svg{width:32px;height:32px}
.lp-cards h3{font-size:var(--text-section);line-height:1.25;margin-top:var(--space-md)}
.lp-cards p{margin-top:var(--space-sm);color:var(--ink-2)}

/* 5. plan */
.lp-steps{display:grid;gap:var(--space-lg);counter-reset:s;margin-top:var(--space-xl)}
.lp-steps li{counter-increment:s;display:grid;grid-template-columns:48px 1fr;gap:var(--space-md);align-items:center;font-size:var(--text-card);line-height:1.4}
.lp-steps li::before{content:counter(s);display:grid;place-items:center;width:48px;height:48px;border-radius:50%;border:2px solid var(--accent);color:var(--accent);font:600 var(--text-section)/1 var(--font-display)}
.lp-opt{margin-top:var(--space-xl);text-align:center;font:600 var(--text-section)/1.3 var(--font-display)}

/* 6. how the levels work: the paragraph, the short disclosure directly under it, then the ladder */
.lp-levels-grid{display:grid;gap:var(--space-2xl);align-items:start}
.lp-levels .lp-fine{margin-top:var(--space-sm);color:var(--ink-2)}
.lp-lead-tight{margin-top:var(--space-sm)}
.lp-levels .lp-vidlink{margin-top:var(--space-md)}
.lp-also-wrap{margin-top:var(--space-2xl)}
.lp-also-h{font-size:var(--text-card)}
.lp-also{margin-top:var(--space-sm);display:grid;gap:var(--space-sm)}
.lp-also li{padding-left:var(--space-lg);position:relative;color:var(--ink-2)}
.lp-also li::before{content:"";position:absolute;left:0;top:.6em;width:10px;height:10px;border-radius:2px;background:var(--accent)}
.lp-levels-shot{justify-self:center;width:100%;max-width:380px}
.lp-levels-shot .lp-tag{margin-bottom:var(--space-sm)}
.lp-shot{border:1px solid var(--line-strong);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-md);background:var(--bg)}

/* 7. FAQ */
.lp-faq{max-width:720px;display:grid;gap:var(--space-sm)}
.lp-faq details{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-md)}
.lp-faq summary{cursor:pointer;padding:var(--space-md);font-weight:600;min-height:var(--control-h-touch)}
.lp-faq details p{padding:0 var(--space-md) var(--space-md);color:var(--ink-2)}

/* 8. closing band */
.lp-close{background:var(--lp-close-bg);text-align:center;padding:var(--space-3xl) 0}
.lp-close h2{font-size:var(--text-page);line-height:1.2;color:var(--lp-close-ink)}
.lp-close .lp-btn{margin-top:var(--space-xl);background:var(--lp-close-ink);border-color:var(--lp-close-ink);color:var(--lp-close-bg) !important}
.lp-soft{margin-top:var(--space-lg);color:var(--lp-close-ink)}
.lp-close .lp-soft a{color:var(--lp-close-ink)}
/* required: the default accent ring on the accent band is 1.0:1 */
.lp-close :focus-visible{outline-color:var(--lp-close-ink)}

/* 9. good to know, then the comparison folded away */
.lp-know{padding:var(--space-2xl) 0 var(--space-xl)}
.lp-know h2{font-size:var(--text-card)}
.lp-proof{margin-top:var(--space-md);display:grid;gap:var(--space-sm)}
.lp-proof li{display:flex;align-items:flex-start;gap:var(--space-sm);font-size:var(--text-dense);color:var(--ink-2)}
.lp-proof svg{flex:0 0 18px;width:18px;height:18px;margin-top:2px}
/* the comparison folds like a FAQ answer: the same box and the same open marker */
.lp-compare{margin-top:var(--space-xl);background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-md)}
.lp-compare summary{cursor:pointer;padding:var(--space-md);font-weight:600;min-height:var(--control-h-touch)}
.lp-compare[open]{padding-bottom:var(--space-md)}
.lp-compare > :not(summary){margin-left:var(--space-md);margin-right:var(--space-md)}
/* comparison: plain text, every column styled the same (legal: no highlighted column); on phones the table scrolls
   inside its own box, never the page */
.lp-table{margin-top:var(--space-md);overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--paper)}
.lp-table table{width:100%;min-width:760px;border-collapse:collapse;font-size:var(--text-dense);line-height:1.45}
.lp-table th,.lp-table td{padding:var(--space-sm) var(--space-md);border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.lp-table th{font-weight:600;color:var(--ink)}
.lp-table tbody th{width:16%}
.lp-table td{color:var(--ink-2)}
.lp-table tbody tr:last-child > *{border-bottom:0}
/* a11y audit 2026-11-21 (Medium, 1.3.1): the row labels stay in view while the table scrolls sideways on phones */
.lp-table thead th:first-child,
.lp-table tbody th{position:sticky;left:0;z-index:1;background:var(--paper);box-shadow:1px 0 0 var(--line)}
.lp-compare-note{margin-top:var(--space-md);max-width:90ch}

/* footer: the run-by line, the full disclosure, the links (every page state) */
.lp-foot{padding:var(--space-xl) 0 var(--space-2xl);font-size:var(--text-meta);line-height:1.55;color:var(--muted);border-top:1px solid var(--line)}
.lp-foot p{max-width:760px}
.lp-foot p + p{margin-top:var(--space-md)}
.lp-links a{display:inline-flex;align-items:center;min-height:var(--control-h-touch)}

@media (max-width:759px){
  .lp-hero{padding-top:80px}
  .lp-hero h1{margin-top:var(--space-sm)}
  .lp-sub{font-size:var(--text-body);margin-top:var(--space-sm)}
  .lp-hero .lp-btn{margin-top:var(--space-md);width:100%}
  .lp-play-disc{width:72px;height:72px}
  .lp-play-disc svg{width:32px;height:32px}
  .lp-vid .lp-btn,.lp-close .lp-btn{width:100%}
  .lp-lead{font-size:var(--text-body)}
}
@media (min-width:760px){
  .lp-wrap{padding:0 var(--space-xl)}
  .lp-cards{grid-template-columns:repeat(3,1fr)}
  /* video held: the words left, the phone screen right, from tablet up */
  .lp-hero-grid{grid-template-columns:minmax(0,1fr) auto;column-gap:var(--space-xl)}
  :is(:has(meta[content=shown]),.lp-video-on) .lp-hero-grid{grid-template-columns:minmax(0,1fr)}
}
@media (min-width:1000px){
  .lp-hero{padding:120px 0 var(--space-4xl)}
  .lp-hero-grid{column-gap:var(--space-4xl)}
  .lp-hero h1{font-size:var(--text-display)}
  .lp-sub{font-size:var(--text-lead)}
  .lp-play-disc{width:104px;height:104px}
  .lp-play-disc svg{width:48px;height:48px}
  .lp-vid{padding-bottom:var(--space-4xl)}
  .lp-sec{padding:var(--space-4xl) 0}
  .lp-sec h2{font-size:var(--text-figure)}
  .lp-steps{grid-template-columns:repeat(3,1fr)}
  .lp-steps li{grid-template-columns:1fr;justify-items:center;text-align:center;align-items:start}
  .lp-levels-grid{grid-template-columns:minmax(0,1fr) 380px;column-gap:var(--space-4xl)}
  .lp-close{padding:var(--space-4xl) 0}
  .lp-close h2{font-size:var(--text-figure)}
}
