/* ==========================================================================
   The Six Codes™ — styles
   One light look across the whole site, in three colours:
     Chalk White  #FAFAFA  the canvas
     Forest Slate #34463F  text, headers, navigation and dark panels
     Warm Ochre   #E29553  accents: buttons, ticks, progress, highlights (sparingly)
   Type: Inter Tight throughout. The token names below (night, mist, accent...) are older; their
   values are the new palette, so every page picks it up from here.
   ========================================================================== */

:root {
  /* Colour. "night" = Forest Slate and its shades (dark panels: sidebar, banners, bands). */
  --night-950: #1B2521;
  --night-900: #34463F;
  --night-800: #3A4E46;
  --night-700: #435A50;
  --night-600: #4A6258;
  --night-500: #34463F;
  --dusk-900: #2E3E38;
  /* "mist" = soft neutral greys with a hint of the slate, for surfaces and lines. */
  --mist-100: #F2F3F1;
  --mist-200: #E8EBE9;
  --mist-300: #D2D9D5;
  --paper: #FAFAFA;
  --white: #FFFFFF;
  --accent: #E29553;
  --accent-600: #E29553;
  --accent-ink: #A35F27;            /* ochre for text on light surfaces (readable: 4.7:1 on chalk) */
  --accent-soft: #F6EBDD;           /* ochre tint for chips and tags */
  --ink: #34463F;
  --ink-2: #4C5D56;
  --ink-3: #66756F;
  --on-dark: #FAFAFA;
  --on-dark-2: rgba(250, 250, 250, .76);
  --line-light: rgba(52, 70, 63, .14);
  --line-dark: rgba(250, 250, 250, .16);
  --danger: #C9772F;

  /* Roles. --snow and --ink-fixed never change (text on photos, on the accent colour, etc.). */
  --snow: #FFFFFF;
  --ink-fixed: #34463F;
  --brand: var(--night-500);        /* links, icons and focus on page surfaces */
  --chart: var(--night-500);        /* lines, bars and dots in charts */
  --solid: var(--night-900);        /* selected chips, tabs and toggles */
  --on-solid: #FAFAFA;
  --on-solid-soft: rgba(250, 250, 250, .16);
  --glass: rgba(250, 250, 250, .9);
  --shadow: rgba(52, 70, 63, .3);
  --ok: #2E7D4F; --ok-bg: #E7F4EC; --ok-line: #C3E2CF; --ok-ink: #1F5A37;
  --bad: #A3341C; --bad-bg: #FBEAE6; --bad-line: #F0C7BD; --bad-ink: #7A2412;
  --warn-bg: #FFF4E5; --warn-line: #F3DDBD; --warn-ink: #8A5512;
  /* Nutrition colours: calories, protein, carbohydrate, fat (checked for colour-blind separation) */
  --kcal: #34463F; --pro: #1F7A5C; --carb: #B26A00; --fat: #8A4FBF;

  /* Type: one family. --font-serif is kept as a name so older rules still work; it's the same font. */
  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: var(--font-sans);

  /* Shape + space */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --pill: 999px;
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1320px;
  --section: clamp(88px, 12vw, 168px);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
}

/* ---------- Logo ----------
   The supplied logo in its two official colours: black for light backgrounds, white for dark
   ones. data-on="dark" uses white (Forest Slate bars, photos); otherwise black. */
.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; line-height: 0; flex: none; }
.brand-logo { display: block; height: var(--logo-h, 30px); width: auto; aspect-ratio: 2000 / 364; max-width: none; }
.brand .brand-white { display: none; }
.brand[data-on="dark"] .brand-black { display: none; }
.brand[data-on="dark"] .brand-white { display: block; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--ink-fixed); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.on-light :focus-visible, .band-paper :focus-visible, .band-mist :focus-visible, .band-white :focus-visible { outline-color: var(--brand); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--ink-fixed); padding: 10px 16px; border-radius: var(--pill);
  font-weight: 600; text-decoration: none; transition: top var(--t-fast);
}
.skip:focus { top: 12px; }
.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; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Bands ---------- */
.band-night { background: var(--night-900); color: var(--on-dark); }
.band-dusk { background: var(--dusk-900); color: var(--on-dark); }
.band-mist { background: var(--mist-200); color: var(--ink); }
.band-paper { background: var(--paper); color: var(--ink); }
.band-white { background: var(--white); color: var(--ink); }
.section { padding-block: var(--section); position: relative; }

/* .contours used to draw faint contour lines behind a section. The new design has no decoration
   like that, so it only keeps the positioning. */
.contours { position: relative; isolation: isolate; overflow: hidden; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.band-night .eyebrow, .band-dusk .eyebrow, .on-dark .eyebrow { color: var(--on-dark-2); }
.band-night .eyebrow::before, .band-dusk .eyebrow::before, .on-dark .eyebrow::before { background: var(--accent); }

.mega {
  font-size: clamp(3rem, 9.4vw, 9.25rem);
  line-height: .9;
  font-weight: 600;
  letter-spacing: -.05em;
}
.h2 {
  font-size: clamp(2.35rem, 5.4vw, 4.75rem);
  line-height: .98;
  font-weight: 500;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.h3 { font-size: clamp(1.35rem, 2vw, 1.625rem); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
/* Accent words in a headline (class kept from the earlier serif design): same font, in ochre. */
.serif {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  text-transform: none;
  color: var(--accent-ink);
}
/* On Forest Slate panels the brighter ochre reads better. */
:is(.band-night, .band-dusk, .on-dark, .app-side, .app-top, .dash-hero, .pg-hero, .done-hero, .dy-sum, .ob-cta, .auth-side,
  .guest-top, .footer, .final-card, .get-card.featured, .qr-next, .quiz-page, .plan-gets li, .feature-media.night) .serif { color: var(--accent); }
.band-mist .serif, .band-paper .serif, .band-white .serif { color: var(--accent-ink); }
.lede { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.band-night .lede, .band-dusk .lede, .on-dark .lede { color: var(--on-dark-2); }
.muted { color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--night-800); --fg: var(--on-dark);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--pill); border: 1px solid transparent;
  background: var(--bg); color: var(--fg);
  font-size: .9375rem; font-weight: 600; letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform var(--t-fast) var(--ease), background-color var(--t-med) var(--ease), color var(--t-med), border-color var(--t-med);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform var(--t-med) var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-accent { --bg: var(--accent); --fg: var(--ink-fixed); }
.btn-accent:hover { --bg: #E8A066; }
.btn-dark:hover { --bg: var(--night-600); }
.btn-ghost { --bg: transparent; --fg: currentColor; border-color: currentColor; }
.band-night .btn-ghost, .band-dusk .btn-ghost, .on-dark .btn-ghost { border-color: rgba(250, 250, 250, .4); }
.btn-ghost:hover { --bg: rgba(127, 127, 127, .1); }
.btn-white { --bg: var(--white); --fg: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }

.round-arrow {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  border-radius: 50%; background: var(--white); color: var(--ink);
  transition: transform var(--t-med) var(--ease);
}
.round-arrow svg { width: 18px; height: 18px; transform: rotate(-45deg); }
a:hover > .round-arrow, .round-arrow:hover { transform: rotate(45deg); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px;
  border-radius: var(--pill); font-size: .8125rem; font-weight: 500;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: var(--snow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(226, 149, 83, .25); }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.wordmark-mark { display: grid; grid-template-columns: repeat(2, 11px); gap: 3px; }
.wordmark-mark i { height: 6px; border-radius: 1.5px; background: var(--accent); }
.wordmark-type { font-weight: 700; font-size: .9375rem; line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.wordmark-type sup { font-size: .5em; font-weight: 500; margin-left: 1px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding: 12px var(--gutter) 0;
  transition: transform var(--t-med) var(--ease);
}
.header-bar {
  max-width: calc(var(--wrap) - 2 * var(--gutter) + 24px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 8px 8px 8px 20px; border-radius: var(--pill);
  color: var(--snow);
  background: transparent; border: 1px solid transparent;
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med), color var(--t-med), box-shadow var(--t-med);
}
.site-header.scrolled .header-bar {
  background: rgba(27, 37, 33, .82); border-color: var(--line-dark);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .35);
}
.site-header.hidden { transform: translateY(-120%); }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  padding: 10px 14px; border-radius: var(--pill); font-size: .9375rem; font-weight: 500; text-decoration: none;
  color: rgba(255, 255, 255, .86); transition: background-color var(--t-fast), color var(--t-fast);
}
.header-nav a:hover { background: rgba(255, 255, 255, .1); color: var(--snow); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-login { color: var(--on-dark); font-weight: 600; font-size: .9375rem; text-decoration: none; padding: 10px 12px; border-radius: var(--pill); white-space: nowrap; }
.header-login:hover { background: rgba(255, 255, 255, .08); }
/* Phones: "Log in" lives in the menu instead (the header has no room beside the logo). */
@media (max-width: 520px) { .header-login { display: none; } }
@media (min-width: 521px) { .header-nav .nav-login { display: none; } }
/* route.js: a signed-in visitor is on their way to the members area; don't draw the landing page. */
html.routing body { visibility: hidden; }
.menu-btn {
  display: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08); cursor: pointer; place-items: center;
}
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .i-close { display: none; }
.menu-open .menu-btn .i-open { display: none; }
.menu-open .menu-btn .i-close { display: block; }

/* ---------- Hero ---------- */
.hero { padding: 12px; background: var(--paper); }
.hero-card {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, calc(100svh - 24px));
  border-radius: var(--r-xl);
  background: var(--night-800);
  color: var(--snow);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform-origin: 60% 40%; }
.hero-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(27, 37, 33, .55) 0%, rgba(27, 37, 33, 0) 26%),
    linear-gradient(0deg, rgba(27, 37, 33, .92) 0%, rgba(27, 37, 33, .55) 38%, rgba(27, 37, 33, 0) 66%),
    linear-gradient(90deg, rgba(27, 37, 33, .55) 0%, rgba(27, 37, 33, 0) 60%);
}
.hero-inner { padding: 140px clamp(20px, 4vw, 56px) clamp(24px, 3.5vw, 44px); display: grid; gap: clamp(28px, 4vw, 48px); }
.hero h1 { max-width: 11ch; }
.hero-inner > .chip { justify-self: start; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: end; gap: 32px; }
.hero-side { display: grid; gap: 22px; }
.hero-side p { color: rgba(255, 255, 255, .86); font-size: 1.0625rem; max-width: 38ch; }
.hero-cta { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hero-note { font-size: .8125rem; color: rgba(255, 255, 255, .72); letter-spacing: .02em; }
.hero-account { margin-top: 14px; font-size: .875rem; color: rgba(255, 255, 255, .8); }
.hero-account a { color: var(--on-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.trust {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 18px;
}
.trust li { display: flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 500; color: rgba(255, 255, 255, .9); }
.trust svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* Image fallback when a photo has not been added yet */
.media-fallback {
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(226, 149, 83, .18), transparent 55%),
    linear-gradient(135deg, var(--night-600), var(--night-900));
}
img.is-missing { visibility: hidden; }

/* ---------- Statement (inline pill images, word reveal) ---------- */
.statement .wrap { display: grid; gap: 40px; }
.statement-text {
  font-size: clamp(2rem, 4.9vw, 4.4rem); line-height: 1.12; font-weight: 500; letter-spacing: -.035em;
  max-width: 20ch;
}
.statement-text .w { display: inline; }
.pill-img {
  display: inline-block; vertical-align: middle;
  width: 1.9em; height: .95em; margin: -.1em .08em 0; border-radius: var(--pill); overflow: hidden;
  background: var(--night-600);
}
.pill-img img { width: 100%; height: 100%; object-fit: cover; }
.statement-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }

/* ---------- Risk ---------- */
.risk-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.risk-copy { display: grid; align-content: start; gap: 24px; }
.stat-big { display: flex; align-items: flex-end; gap: 14px; margin-top: 12px; }
.stat-big b {
  font-size: clamp(5rem, 13vw, 11rem); font-weight: 400; line-height: .82; letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.stat-big svg { width: clamp(40px, 6vw, 72px); height: auto; color: var(--accent); margin-bottom: .4em; }
.stat-line { font-size: 1.125rem; color: var(--on-dark); max-width: 40ch; min-height: 3.2em; }
.stat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-tab {
  min-height: 44px; padding: 0 18px; border-radius: var(--pill); cursor: pointer;
  background: transparent; border: 1px solid var(--line-dark); color: var(--on-dark-2);
  font-weight: 600; font-size: .9375rem; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.stat-tab:hover { color: var(--on-dark); border-color: rgba(250, 250, 250, .35); }
.stat-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink-fixed); }
.cite { color: var(--on-dark-2); font-size: .75em; vertical-align: super; margin-left: 3px; text-decoration: none; padding: 2px; }
.cite:hover { color: var(--accent); }

.gauge-card {
  border-radius: var(--r-lg); background: var(--mist-300); color: var(--ink);
  padding: clamp(24px, 3vw, 40px); display: grid; gap: 22px; align-content: space-between;
  position: relative; overflow: hidden;
}
.gauge-card .eyebrow { color: var(--ink-2); }
.gauge-card .eyebrow::before { background: var(--night-600); }
.gauge-card :focus-visible { outline-color: var(--ink); }
.gauge { position: relative; }
.gauge svg { width: 100%; height: auto; }
.gauge .tick { stroke: var(--night-700); stroke-width: 2; stroke-linecap: round; opacity: .35; }
.gauge .tick.major { opacity: .8; stroke-width: 2.5; }
.gauge .needle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; transform-origin: 200px 200px; transition: transform 1.2s var(--ease); }
.gauge .label { font: 600 14px var(--font-sans); fill: var(--night-700); }
.gauge .label.hot { fill: var(--ink); }
.gauge-readout { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.gauge-readout b { font-size: clamp(3rem, 6vw, 4.5rem); line-height: .9; font-weight: 400; letter-spacing: -.05em; }
.gauge-readout p { color: var(--ink-2); font-size: .9375rem; max-width: 24ch; }
.gauge-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.gauge-legend span { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: var(--pill); background: rgba(255, 255, 255, .55); font-size: .8125rem; font-weight: 600; }
.gauge-legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- The Six Codes ---------- */
.codes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.code-card {
  position: relative; display: grid; gap: 10px; align-content: start; padding: clamp(22px, 2.6vw, 32px); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(226, 149, 83, .09), rgba(226, 149, 83, .02)); border: 1px solid var(--line-dark);
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), background-color var(--t-med);
}
.code-card:hover { transform: translateY(-4px); border-color: rgba(226, 149, 83, .4); }
.code-card em { font-family: var(--font-serif); font-style: normal; font-size: clamp(3rem, 5vw, 4.25rem); line-height: .9; color: var(--accent); }
.code-card h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; padding-right: 76px; }
.code-card p { color: var(--on-dark-2); font-size: 1rem; }
.code-tag {
  position: absolute; top: clamp(22px, 2.6vw, 32px); right: clamp(22px, 2.6vw, 32px); font-size: .6875rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--night-900); background: var(--accent); border-radius: var(--pill); padding: 4px 10px;
}
.codes-note { margin-top: 24px; max-width: 72ch; color: var(--on-dark-2); font-size: .9375rem; padding: 16px 20px; border-radius: var(--r-md); border: 1px dashed var(--line-dark); }
.codes-note b { color: var(--on-dark); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding-block: clamp(28px, 4vw, 48px); border-block: 1px solid var(--line-dark); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); padding-right: clamp(24px, 3vw, 48px); }
.marquee-item {
  font-size: clamp(2.75rem, 7vw, 6.5rem); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
}
.marquee-item.serif { font-weight: 400; }
.marquee-star { width: clamp(28px, 4vw, 52px); height: auto; color: var(--accent); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Plan cards (Slimor product cards) ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .eyebrow { grid-column: 1 / -1; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card {
  display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--white);
  padding: 10px; border: 1px solid var(--line-light);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(52, 70, 63, .35); }
.plan-media { position: relative; aspect-ratio: 4 / 3.4; border-radius: calc(var(--r-lg) - 8px); overflow: hidden; }
.plan-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.plan-card:hover .plan-media img { transform: scale(1.04); }
.plan-badge {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--pill); background: rgba(255, 255, 255, .92); color: var(--ink-fixed);
  font-size: .8125rem; font-weight: 600;
}
.plan-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--night-500); }
.plan-body { display: grid; gap: 10px; padding: 18px 12px 12px; flex: 1; align-content: start; }
.plan-body p { color: var(--ink-2); font-size: 1rem; }
.plan-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding: 14px 12px 6px; border-top: 1px solid var(--line-light); font-size: .875rem; font-weight: 600; color: var(--ink-2); }

/* ---------- Founder (collage) ---------- */
.founder { overflow: hidden; }
.collage { position: relative; min-height: clamp(720px, 100vw, 1080px); display: grid; place-items: center; }
.collage-title { position: relative; z-index: 2; text-align: center; display: grid; gap: 26px; justify-items: center; max-width: 1000px; padding-inline: var(--gutter); }
.collage-title blockquote { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.25; max-width: 30ch; color: var(--on-dark); }
.collage-title cite { font-style: normal; font-size: .875rem; color: var(--on-dark-2); letter-spacing: .04em; }
.float-photo { position: absolute; z-index: 1; margin: 0; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.float-photo img { width: 100%; height: 100%; object-fit: cover; }
.float-photo figcaption { position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: var(--pill); background: rgba(27, 37, 33, .7); font-size: .75rem; font-weight: 600; color: var(--snow); backdrop-filter: blur(6px); }
.fp-1 { width: clamp(180px, 22vw, 320px); aspect-ratio: 3 / 4; left: 4%; top: 6%; }
.fp-2 { width: clamp(130px, 14vw, 210px); aspect-ratio: 4 / 5; right: 7%; top: 3%; }
.fp-3 { width: clamp(150px, 17vw, 250px); aspect-ratio: 1; right: 4%; bottom: 8%; }
.fp-4 { width: clamp(120px, 12vw, 180px); aspect-ratio: 4 / 5; left: 14%; bottom: 4%; }
.scribble { width: min(520px, 80vw); height: auto; margin-top: -10px; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- What you get ---------- */
.get-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.get-card { border-radius: var(--r-lg); padding: clamp(24px, 3.5vw, 44px); display: grid; gap: 22px; align-content: start; background: var(--white); border: 1px solid var(--line-light); }
.get-card.featured { background: var(--night-900); color: var(--on-dark); border-color: transparent; position: relative; overflow: hidden; isolation: isolate; }
.get-card.featured::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../graphics/contours.svg") center / cover; opacity: .06; }
.get-step { display: inline-flex; align-self: start; justify-self: start; padding: 6px 12px; border-radius: var(--pill); font-size: .8125rem; font-weight: 600; background: var(--mist-200); color: var(--ink); }
.get-card.featured .get-step { background: var(--accent); color: var(--ink-fixed); }
.get-card ul { display: grid; gap: 14px; }
.get-card li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.get-card li svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--mist-200); color: var(--brand); margin-top: 2px; }
.get-card.featured li svg { background: rgba(226, 149, 83, .16); color: var(--accent); }
.get-card.featured li { color: var(--on-dark); }
.get-card.featured .serif { color: var(--accent); }
.get-foot { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--r-md); background: var(--mist-100); }
.get-foot p { font-weight: 500; }

/* ---------- Free guide signup ---------- */
.guide-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  border-radius: var(--r-xl); background: var(--accent); color: var(--ink); padding: clamp(28px, 5vw, 64px);
}
.guide-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../graphics/contours.svg") center / cover; filter: invert(1); opacity: .09; }
.guide-card .serif { color: var(--night-700); }
.guide-card :focus-visible { outline-color: var(--ink); }
.guide-card .eyebrow { color: var(--ink); }
.guide-card .eyebrow::before { background: var(--night-700); }
.guide-copy { display: grid; gap: 18px; }
.guide-copy p { color: var(--ink-2); max-width: 42ch; }
.signup, .signup-fields { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .875rem; font-weight: 600; }
.field input {
  width: 100%; min-height: 54px; padding: 0 18px; border-radius: var(--r-sm); font: inherit; font-size: 1rem;
  border: 1.5px solid rgba(52, 70, 63, .2); background: rgba(255, 255, 255, .85); color: var(--ink);
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:hover { border-color: rgba(52, 70, 63, .4); }
.field input:focus { outline: none; border-color: var(--ink); background: var(--white); box-shadow: 0 0 0 4px rgba(52, 70, 63, .12); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.field-error { font-size: .8125rem; font-weight: 600; color: var(--bad-ink); min-height: 1.2em; }
.signup .btn { width: 100%; min-height: 54px; }
.signup-fine { font-size: .8125rem; color: var(--ink-2); }
.signup-done { display: none; gap: 10px; padding: 22px; border-radius: var(--r-md); background: rgba(255, 255, 255, .7); }
.signup-done b { font-size: 1.25rem; letter-spacing: -.02em; }
.signup.is-done .signup-fields { display: none; }
.signup.is-done .signup-done { display: grid; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn .spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.btn[aria-busy="true"] .spin { display: inline-block; }
.btn[aria-busy="true"] .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq-intro { display: grid; gap: 22px; position: sticky; top: 110px; }
.faq-list { border-top: 1px solid var(--line-light); }
.faq-list details { border-bottom: 1px solid var(--line-light); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0;
  cursor: pointer; list-style: none; font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); font-weight: 600; letter-spacing: -.015em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span.pm { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--mist-200); transition: transform var(--t-med) var(--ease), background-color var(--t-med); }
.faq-list summary span.pm svg { width: 16px; height: 16px; }
.faq-list details[open] summary span.pm { transform: rotate(45deg); background: var(--accent); color: var(--ink-fixed); }
.faq-list details p { padding: 0 56px 26px 0; color: var(--ink-2); max-width: 62ch; }

/* ---------- Final CTA ---------- */
.final { padding: 12px; background: var(--paper); }
.final-card { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); min-height: clamp(560px, 80vh, 820px); display: grid; align-items: end; color: var(--snow); background: var(--night-900); }
.final-card > img { position: absolute; left: 0; top: -8%; z-index: -2; width: 100%; height: 116%; object-fit: cover; object-position: 70% center; }
.final-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(27, 37, 33, .92), rgba(27, 37, 33, .2) 70%), linear-gradient(90deg, rgba(27, 37, 33, .6), transparent 70%); }
.final-inner { padding: clamp(28px, 5vw, 64px); display: grid; gap: 26px; }
.final-mantra { font-size: .875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }

/* ---------- Footer ---------- */
.footer { background: var(--night-950); color: var(--on-dark-2); padding: 72px 0 120px; font-size: .9375rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: center; padding-bottom: 32px; border-bottom: 1px solid var(--line-dark); color: var(--on-dark); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.footer-nav a { padding: 10px 12px; text-decoration: none; color: var(--on-dark-2); border-radius: var(--pill); }
.footer-nav a:hover { color: var(--on-dark); background: rgba(255, 255, 255, .06); }
.sources { list-style: decimal; padding-left: 20px; margin: 32px 0; display: grid; gap: 6px; font-size: .8125rem; }
.sources a { color: var(--on-dark-2); text-underline-offset: 3px; }
.sources a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: .8125rem; }
.disclaimer { margin-top: 18px; font-size: .8125rem; max-width: 92ch; }

/* ---------- Sticky quiz bar ---------- */
.sticky-bar {
  position: fixed; left: 50%; bottom: 16px; z-index: 40; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 8px 8px 20px; border-radius: var(--pill);
  background: rgba(27, 37, 33, .9); color: var(--on-dark); border: 1px solid var(--line-dark);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5);
  transform: translate(-50%, 140%); transition: transform 500ms var(--ease);
}
.sticky-bar.show { transform: translate(-50%, 0); }
/* Desktop and large tablets have the header button permanently on screen instead. */
@media (min-width: 901px) { .sticky-bar { display: none; } }
@media (max-width: 900px) { .sticky-bar { bottom: calc(12px + env(safe-area-inset-bottom)); } }
.sticky-bar p { font-size: .9375rem; line-height: 1.3; }
.sticky-bar p b { display: block; color: var(--snow); }
.sticky-bar p span { color: var(--on-dark-2); font-size: .8125rem; }

/* ---------- Reveal (only hides when JS is running) ----------
   home.js removes data-reveal once the element has arrived, so these transitions never stand in
   for an element's own (hover) transitions afterwards. */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ==========================================================================
   Quiz page
   ========================================================================== */
.quiz-page { min-height: 100svh; background: var(--night-900); color: var(--on-dark); display: flex; flex-direction: column; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px var(--gutter); }
.quiz-head-right { display: flex; align-items: center; gap: 14px; }
.quiz-count { font-size: .875rem; font-weight: 600; color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.quiz-close { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-dark); text-decoration: none; }
.quiz-close:hover { background: rgba(255, 255, 255, .06); }
.quiz-close svg { width: 18px; height: 18px; }
.quiz-bar { height: 3px; background: var(--line-dark); margin-inline: var(--gutter); border-radius: 3px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 500ms var(--ease); }
.quiz-main { flex: 1; display: flex; padding: 20px var(--gutter) 40px; outline: none; }
.quiz-split { width: 100%; max-width: var(--wrap); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.quiz-fig { position: relative; margin: 0; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 4.6; max-height: 76vh; width: 100%; }
.quiz-fig img { width: 100%; height: 100%; object-fit: cover; }
.quiz-fig figcaption { position: absolute; left: 16px; bottom: 16px; right: 16px; font-family: var(--font-serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; color: var(--snow); text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.quiz-panel { display: grid; gap: 22px; align-content: center; }
.quiz-panel h1 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1; font-weight: 500; letter-spacing: -.04em; text-wrap: balance; }
.quiz-panel h1.mega { font-size: clamp(3rem, 8vw, 6.5rem); }
.quiz-sub { color: var(--on-dark-2); font-size: 1.0625rem; margin-top: -8px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 60px; padding: 14px 16px 14px 20px;
  border-radius: var(--r-md); border: 1px solid var(--line-dark); background: rgba(255, 255, 255, .04); color: var(--on-dark);
  text-align: left; cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.quiz-opt:hover { background: rgba(255, 255, 255, .08); border-color: rgba(250, 250, 250, .32); }
.quiz-opt:active { transform: scale(.99); }
.quiz-opt b { display: block; font-weight: 600; font-size: 1.0625rem; }
.quiz-opt small { display: block; color: var(--on-dark-2); font-size: .875rem; margin-top: 2px; }
.quiz-opt .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(250, 250, 250, .35); display: grid; place-items: center; }
.quiz-opt .tick svg { width: 14px; height: 14px; opacity: 0; }
.quiz-opt[aria-checked="true"] { background: rgba(226, 149, 83, .12); border-color: var(--accent); }
.quiz-opt[aria-checked="true"] .tick { background: var(--accent); border-color: var(--accent); color: var(--ink-fixed); }
.quiz-opt[aria-checked="true"] .tick svg { opacity: 1; }
.quiz-back { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 8px; border: 0; border-radius: var(--pill); background: transparent; color: var(--on-dark-2); cursor: pointer; font-weight: 600; font-size: .9375rem; }
.quiz-back:hover { color: var(--on-dark); background: rgba(255, 255, 255, .06); }
.quiz-back svg { width: 16px; height: 16px; }
.quiz-fine { font-size: .875rem; color: var(--on-dark-2); }
.quiz-step { animation: stepIn 520ms var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Result */
.quiz-result { width: 100%; max-width: 1080px; margin: 0 auto; display: grid; gap: clamp(28px, 4vw, 44px); padding-top: 24px; }
.qr-head { display: grid; gap: 18px; }
.qr-head h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: .95; font-weight: 500; letter-spacing: -.045em; }
.qr-signs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qr-signs li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-dark); }
.qr-signs svg { width: 18px; height: 18px; color: var(--danger); flex: none; margin-top: 3px; }
.qr-tried { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.25; color: var(--accent); max-width: 40ch; }
.qr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qr-card { border-radius: var(--r-lg); padding: 24px; display: grid; gap: 8px; align-content: start; background: var(--mist-200); color: var(--ink); }
.qr-card:nth-child(2) { background: var(--accent); }
.qr-card:nth-child(3) { background: var(--white); }
.qr-card span { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.qr-card b { font-size: 1.6rem; font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.qr-card p { color: var(--ink-2); font-size: .9375rem; }
.qr-codes ol { display: grid; gap: 0; border-top: 1px solid var(--line-dark); margin-top: 16px; }
.qr-codes li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line-dark); }
.qr-codes em { font-family: var(--font-serif); font-size: 1.6rem; color: var(--accent); }
.qr-codes b { font-size: 1.375rem; font-weight: 500; letter-spacing: -.025em; }
.qr-codes p { color: var(--on-dark-2); }
.qr-doctor { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-md); background: rgba(242, 166, 90, .12); border: 1px solid rgba(242, 166, 90, .4); }
.qr-doctor svg { width: 20px; height: 20px; color: var(--danger); flex: none; margin-top: 2px; }
.qr-next { display: grid; grid-template-columns: 160px 1fr auto; gap: 24px; align-items: center; padding: 12px 24px 12px 12px; border-radius: var(--r-lg); background: var(--night-800); border: 1px solid var(--line-dark); }
.qr-next .thumb { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; }
.qr-next .thumb img { width: 100%; height: 100%; object-fit: cover; }
.qr-next p { color: var(--on-dark-2); font-size: .9375rem; }
.qr-next b { font-size: 1.125rem; }
.qr-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .header-nav a { padding: 10px; font-size: .875rem; }
}

@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .header-nav {
    position: absolute; top: calc(100% + 8px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; border-radius: var(--r-lg);
    background: rgba(27, 37, 33, .96); border: 1px solid var(--line-dark);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
  }
  .menu-open .header-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .header-nav a { padding: 14px 16px; font-size: 1.0625rem; }
  .header-actions .btn { display: none; }
  .hero-row, .risk-grid, .faq-grid, .guide-card, .get-grid, .section-head { grid-template-columns: minmax(0, 1fr); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-grid { grid-auto-flow: row; }
  .codes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-intro { position: static; }
  .quiz-split { grid-template-columns: minmax(0, 1fr); }
  .quiz-fig { aspect-ratio: 16 / 9; max-height: 34vh; border-radius: var(--r-lg); }
  .qr-grid { grid-template-columns: minmax(0, 1fr); }
  .qr-signs { grid-template-columns: minmax(0, 1fr); }
  .qr-next { grid-template-columns: 1fr; padding: 12px 12px 20px; }
  .qr-next > div, .qr-next > a { margin-inline: 12px; }
  .qr-next .thumb { aspect-ratio: 16 / 7; }
  /* Photos sit in bands above and below the text instead of floating over it */
  .collage { min-height: 0; padding: clamp(280px, 62vw, 420px) 0 clamp(250px, 56vw, 380px); }
  .fp-1 { width: min(42vw, 260px); left: var(--gutter); top: 32px; }
  .fp-2 { width: min(30vw, 190px); right: var(--gutter); top: 72px; }
  .fp-3 { width: min(34vw, 220px); right: var(--gutter); bottom: 32px; }
  .fp-4 { width: min(28vw, 170px); left: calc(var(--gutter) + 6vw); bottom: 64px; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .hero { padding: 8px; }
  .hero-card { border-radius: var(--r-lg); min-height: calc(100svh - 16px); }
  .hero-inner { padding: 120px 18px 20px; }
  .trust { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trust li { font-size: .8125rem; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .faq-list details p { padding-right: 0; }
  .final { padding: 8px; }
  .final-card { border-radius: var(--r-lg); }
  .sticky-bar p span { display: none; }
  .codes-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .code-card { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; }
  .code-card em { grid-row: span 2; font-size: 2.75rem; width: 2ch; }
  .code-card h3 { font-size: 1.2rem; }
  .gauge-readout { flex-direction: column; align-items: flex-start; }
  .stat-tab { padding: 0 14px; }
}

