/* Two design systems, scoped by surface:
   .ed = Quiet Green Editorial (design-landing.json): landing page and patient-facing screens
   .bn = Soft Bento Clinical (design.json): calculator, dossier and the owner's quiz view

   Editorial type scale (size/line): 80/88 hero, 48/56 section, 40/44 glass value, 32/36 stat,
   28/34 patient, 20/28 title, 18/28 lead, 16/24 body, 14/20 small, 12/16 caption.
   Bento type scale: 36/40 display, 24/30 heading, 40/44 metric, 32/36 stat, 22/28 value,
   20/26 tile value, 18/24 card title, 15/20 label, 14/20 body, 12/16 caption.

   Editorial grid: 12 columns between --edge lines, 20px gaps. The hero, nav and closing section
   all hang off the same lines, with column 7 as the page's main vertical. */

*, *::before, *::after { box-sizing: border-box; }
/* Page colors outside the two design systems. The dark values are at the end of this file. */
:root { color-scheme: light dark; --body-bg: #FFFFFF; --body-bg-bento: #DADBDD; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--body-bg); -webkit-tap-highlight-color: transparent; }
html:has(body.is-bento) { background: var(--body-bg-bento); }
body { margin: 0; -webkit-font-smoothing: antialiased; background: var(--body-bg); }
body.is-bento { background: var(--body-bg-bento); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
strong { font-weight: 500; }
a { color: inherit; }
[hidden] { display: none !important; }

.ed {
  --color-page: #FFFFFF;
  --color-section: #F2F4F3;
  --color-inverse: #000000;
  --color-text: #0A0A0A;
  --color-text-fade: #86888A;
  --color-text-secondary: #6B6E70;
  --color-text-on-inverse-fade: #A8AAAC;
  --color-line: #ECEEED;
  --color-line-inverse: #242424;
  --color-accent: #00D27F;
  --color-accent-hover: #00BD72;
  --color-accent-ink: #0B7A4B;
  --color-accent-soft: #E2F9EF;
  --color-on-accent: #0A0A0A;
  --color-surface: #FFFFFF;
  --color-ink-hover: #2A2A2A;
  --color-warn-bg: #FFF4DC;
  --color-warn-ink: #8A5A00;
  --color-danger: #C4322F;
  --radius-hero: 24px;
  --radius-media: 20px;
  --radius-panel: 20px;
  --radius-card: 16px;
  --radius-chip: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(10, 10, 10, 0.05);
  --shadow-raised: 0 16px 40px rgba(10, 10, 10, 0.08);
  --frame: clamp(12px, 1.4cqw, 20px);
  --edge: max(clamp(32px, 3.4cqw, 48px), calc((100cqw - 1200px) / 2));
  --col: calc((100cqw - 2 * var(--edge) - 220px) / 12);
  container-type: inline-size;
  font-family: 'Inter Tight', 'Neue Montreal', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  background: var(--color-page);
  color: var(--color-text);
  overflow-x: clip;
}
.ed :focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }

.bn {
  --color-canvas: #DADBDD;
  --color-card: #FFFFFF;
  --color-tile: #F6F6F6;
  --color-inverse: #1E2834;
  --color-text: #1E2834;
  --color-text-secondary: #6B6F76;
  --color-text-tertiary: #858688;
  --color-on-inverse-muted: #B4BAC4;
  --color-line-control: #D9DADC;
  --color-hairline: #ECECEC;
  --color-accent: #6F7AFE;
  --color-accent-strong: #4C57E0;
  --color-accent-soft: #ECEEFF;
  --color-lime: #A6FF3C;
  --color-lime-ink: #3F6F00;
  --color-lime-soft: #F1FFDF;
  --color-danger: #C4322F;
  --color-tile-hover: #F0F0F0;
  --color-inverse-hover: #2C3A4C;
  --color-track: #ECECEC;
  --hatch-a: #C8C8C8;
  --hatch-b: #F6F6F6;
  --radius-card: 28px;
  --radius-tile: 20px;
  --radius-tooltip: 16px;
  --radius-track: 16px;
  --radius-input: 14px;
  --radius-bar: 8px;
  --radius-pill: 999px;
  --gutter: 20px;
  --shadow-floating: 0 12px 32px rgba(30, 40, 52, 0.10);
  --pattern-hatch: repeating-linear-gradient(135deg, var(--hatch-a) 0 2.5px, var(--hatch-b) 2.5px 5px);
  --columns: minmax(0, 1fr) minmax(0, 1.27fr) minmax(0, 1fr);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 20px;
  background: var(--color-canvas);
  color: var(--color-text);
  min-height: 100vh;
  min-height: 100dvh;
}
.bn :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Editorial: shared */
.ed-wrap { padding-inline: var(--edge); }
.ed-section { padding-block: clamp(72px, 8.3vw, 120px); }
.ed-section--mist { background: var(--color-section); }
.ed-heading { font-size: clamp(30px, 3.4cqw, 48px); line-height: 1.17; font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
.ed-heading--center { text-align: center; }
.ed-title { font-size: 20px; line-height: 28px; font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
.fade { color: var(--color-text-fade); }
.ed-inverse .fade { color: var(--color-text-on-inverse-fade); }
.muted { color: var(--color-text-secondary); }
.small { font-size: 14px; line-height: 20px; }
.arrow { width: 14px; height: 14px; flex: none; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; }
.span-left { grid-column: 1 / 7; padding-right: 40px; min-width: 0; }
.span-right { grid-column: 7 / 13; min-width: 0; }
.closing .span-left { grid-column: 1 / 9; }
.closing .span-right { grid-column: 9 / 13; }
.closing .fade { display: block; }

.ed-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px; border: 0; border-radius: var(--radius-pill);
  background: var(--color-accent); color: var(--color-on-accent);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; text-align: center;
  transition: background 150ms;
}
.ed-btn:hover { background: var(--color-accent-hover); }
.ed-btn--large { min-height: 56px; }
.ed-btn--white { background: #FFFFFF; color: #0A0A0A; }
.ed-btn--white:hover { background: #ECEEED; }
.ed-btn--ghost { background: transparent; }
.ed-btn--ghost:hover { background: var(--color-section); }
.ed-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  background: none; border: 0; color: inherit; font-size: 14px; line-height: 20px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.ed-link .arrow { transition: transform 150ms; }
.ed-link:hover .arrow { transform: translate(2px, -2px); }

.banner { background: var(--color-section); padding: 10px 16px; text-align: center; font-size: 14px; line-height: 20px; text-wrap: balance; }
.bn .banner { background: var(--color-inverse); color: #FFFFFF; }

.ed-nav {
  min-height: 80px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  column-gap: 24px; padding: 12px var(--frame); font-size: 14px; line-height: 20px; font-weight: 500;
}
.ed-nav > .ed-btn { justify-self: end; }
.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-weight: 500; font-size: 15px; line-height: 20px; text-decoration: none; background: none; border: 0; padding: 0; color: inherit; }
.brand svg { width: 20px; height: 20px; flex: none; }
.brand img.logo-img { height: 22px; width: auto; flex: none; }
.brand-br { display: none; }
.ed-nav-links { display: flex; gap: 32px; }
.ed-nav-links button { background: none; border: 0; padding: 12px 0; font-weight: 500; }
.ed-nav-links button:hover { color: var(--color-text-secondary); }

/* Hero with the notched proof block */
.hero {
  position: relative; margin: 0 var(--frame) 48px; border-radius: var(--radius-hero) var(--radius-hero) 0 var(--radius-hero); overflow: hidden; color: #FFFFFF;
  background:
    radial-gradient(circle at 92% -8%, rgba(255, 255, 255, 0.05) 0 38%, transparent 38.2%),
    linear-gradient(180deg, rgba(20, 26, 36, 0.42) 0%, rgba(20, 26, 36, 0.58) 55%, rgba(20, 26, 36, 0.72) 100%),
    url('/img/hero-bg.jpg') center / cover no-repeat,
    #1E2834;
}
.hero-text {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
  padding: clamp(40px, 5cqw, 72px) calc(var(--edge) - var(--frame)) 48px;
}
.eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em;
}
.hero h1 { max-width: calc(var(--col) * 8 + 140px); font-size: clamp(40px, 5.6cqw, 80px); line-height: 1.1; font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
.hero-sub { max-width: calc(var(--col) * 6 + 100px); font-size: 18px; line-height: 28px; color: #E6E8EA; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 8px; }
.hero-glass {
  position: absolute; right: calc(var(--edge) - var(--frame)); top: clamp(40px, 5cqw, 72px); width: calc(var(--col) * 3 + 40px); padding: 20px;
  border-radius: var(--radius-card); background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}
.hero-glass-value { margin-top: 8px; font-size: 40px; line-height: 44px; letter-spacing: -0.02em; white-space: nowrap; }
.hero-glass-note { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.18); color: #E6E8EA; }
.hero-notch {
  position: relative; margin-left: auto; background: var(--color-page); color: var(--color-text);
  width: calc(var(--col) * 8 + 140px + 40px + var(--edge) - var(--frame));
  border-top-left-radius: var(--radius-hero); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  padding: 32px calc(var(--edge) - var(--frame)) 0 40px;
}
.hero-corner { position: absolute; width: 24px; height: 24px; background: radial-gradient(circle at 0 0, transparent 24px, var(--color-page) 24.5px); }
.hero-corner--top { right: 0; top: -24px; }
.hero-corner--left { left: -24px; bottom: 0; }
.proof-value { font-size: 32px; line-height: 36px; letter-spacing: -0.02em; white-space: nowrap; }
.proof-label { margin-top: 8px; font-size: 14px; line-height: 20px; font-weight: 500; }
.proof-detail { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--color-text-secondary); text-wrap: pretty; }

/* Editorial feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 64px; background: var(--color-line); border-radius: var(--radius-card); overflow: hidden; }
.feature-cell { background: var(--color-surface); padding: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.feature-chip { display: inline-flex; padding: 8px 12px; border-radius: var(--radius-chip); background: var(--color-surface); box-shadow: var(--shadow-soft); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--color-accent-ink); }
.feature-cell .ed-title { margin-top: 24px; }
.feature-cell p { margin-top: 8px; }

/* Two tracks with a sample dossier */
.split-left { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.split-head { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; column-gap: 20px; }
.track-card { grid-row: span 3; display: grid; grid-template-rows: subgrid; row-gap: 8px; border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 20px; }
.track-index { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); }
.sample { border-radius: var(--radius-media); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sample .bn-card { padding: 20px; }
.sample-note { color: var(--color-text-secondary); font-size: 12px; line-height: 16px; }

/* Patient funnel panel: the media panel starts on column 7 */
.funnel-panel { display: grid; grid-template-columns: minmax(0, calc(50% + 2px)) minmax(0, 1fr); gap: 8px; margin-top: 64px; padding: 8px; background: var(--color-section); border-radius: var(--radius-panel); }
.funnel-copy { padding: 32px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; }
.funnel-copy .ed-title { font-weight: 500; }
.funnel-media { border-radius: var(--radius-card); background: var(--color-surface); padding: 28px; display: flex; align-items: center; justify-content: center; }
.funnel-hook { font-size: 20px; line-height: 28px; letter-spacing: -0.01em; }
.funnel-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.funnel-step { border-top: 2px solid var(--color-line); padding-top: 10px; font-size: 14px; line-height: 20px; font-weight: 500; }

/* Closing section */
.ed-inverse { background: var(--color-inverse); color: #FFFFFF; padding-block: 96px 40px; }
.closing { row-gap: 32px; }
.closing-side { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.ticks { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 14px; line-height: 20px; }
.tick { display: inline-flex; align-items: center; gap: 8px; }
.tick svg { width: 16px; height: 16px; flex: none; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 96px; padding-bottom: 28px; border-bottom: 1px solid var(--color-line-inverse); }
.footer-legal { margin-top: 24px; font-size: 12px; line-height: 16px; color: var(--color-text-on-inverse-fade); max-width: 640px; }
.quiet-btn { background: none; border: 0; padding: 12px 0; font-size: 14px; line-height: 20px; color: var(--color-text-on-inverse-fade); text-decoration: underline; text-underline-offset: 4px; }

/* Bento: shared */
.bn-page { max-width: 1320px; margin: 0 auto; padding: 24px clamp(16px, 2.4vw, 32px) 56px; display: flex; flex-direction: column; gap: 20px; }
.bn-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.bn-card { background: var(--color-card); border-radius: var(--radius-card); padding: 24px; min-width: 0; display: flex; flex-direction: column; }
.bn-card--inverse { background: var(--color-inverse); color: #FFFFFF; }
.bn-card--grow { flex: 1; }
.bn-title { font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: -0.01em; }
.bn-sub { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--color-text-secondary); }
.bn-card--inverse .bn-sub { color: var(--color-on-inverse-muted); }
.bn-heading { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; font-weight: 500; letter-spacing: -0.025em; text-wrap: balance; }
.bn-body { font-size: 14px; line-height: 20px; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.bn-caption { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); }
.bn-card--inverse .bn-caption { color: var(--color-on-inverse-muted); }
.metric-xl { font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -0.03em; }
.metric-l { font-size: 32px; line-height: 36px; font-weight: 500; letter-spacing: -0.025em; }
.metric-lr { font-size: 32px; line-height: 36px; font-weight: 400; letter-spacing: -0.025em; }
.metric-m { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -0.02em; }
.metric-s { font-size: 20px; line-height: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.suffix { color: var(--color-text-tertiary); font-size: 0.65em; font-weight: 400; }
.content-gap { margin-top: 20px; }
.caption-gap { margin-top: 4px; }
.status-badge { display: inline-flex; align-self: flex-start; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.03em; background: var(--color-inverse); color: #FFFFFF; }

.bn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 24px; border: 0; border-radius: var(--radius-pill);
  background: var(--color-inverse); color: #FFFFFF; font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: -0.005em; text-align: center; text-decoration: none;
  transition: background 120ms;
}
.bn-btn:hover { background: var(--color-inverse-hover); }
.bn-btn--white { background: #FFFFFF; color: #1E2834; }
.bn-btn--white:hover { background: #ECEDEF; }
.bn-btn--secondary { background: var(--color-card); color: var(--color-text); border: 1px solid var(--color-line-control); }
.bn-btn--secondary:hover { background: var(--color-tile); }
.bn-btn--ghost { background: transparent; color: var(--color-text); }
.bn-btn--ghost:hover { background: var(--color-tile); }
.bn-btn--block { width: 100%; }
.bn-card--inverse .bn-btn--ghost { color: #FFFFFF; }
.bn-card--inverse .bn-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.hatch { background: var(--pattern-hatch); }

/* Progress */
.progress { display: flex; gap: 2px; height: 24px; }
.progress span { display: block; border-radius: var(--radius-bar); min-width: 0; transition: flex-grow 320ms cubic-bezier(0.2, 0, 0, 1); }
.progress .lime { background: var(--color-lime); }
.progress .peri { background: var(--color-accent); }
.progress-track { background: var(--color-tile); border-radius: var(--radius-track); padding: 10px; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-top: 8px; }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: var(--gutter); align-items: stretch; }
.calc-side { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
.calc-main { padding: 32px; gap: 24px; }
.calc-main h1 { max-width: 640px; font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.calc-main h1:focus { outline: none; }
.calc-eyebrow { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .field-label { font-size: 12px; line-height: 16px; font-weight: 500; }
.field input[type='text'], .field input[type='email'], .field input[type='tel'] {
  height: 44px; width: 100%; padding: 0 16px; border: 0; border-radius: var(--radius-input); background: var(--color-tile); font-size: 14px; line-height: 20px;
}
.field input:focus { background: var(--color-card); outline: 2px solid var(--color-accent); outline-offset: 0; }
.field input::placeholder { color: var(--color-text-secondary); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.field-error { color: var(--color-danger); font-size: 12px; line-height: 16px; }
fieldset .field-error { margin-top: 8px; }
.has-error input[type='text'], .has-error input[type='email'], .has-error input[type='tel'] { outline: 2px solid var(--color-danger); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 12px; line-height: 16px; font-weight: 500; }
.options { display: grid; gap: 8px; }
.options--2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.option { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 52px; padding: 16px; border-radius: var(--radius-input); background: var(--color-tile); cursor: pointer; transition: background 120ms; }
.option:hover { background: var(--color-tile-hover); }
.option input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; margin: 0; cursor: pointer; }
.option-mark { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--color-line-control); background: var(--color-card); display: flex; align-items: center; justify-content: center; }
.option-mark--square { border-radius: 6px; }
.option-mark svg { width: 12px; height: 12px; opacity: 0; }
.option strong { display: block; font-size: 15px; line-height: 20px; letter-spacing: -0.005em; }
.option span.opt-body { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--color-text-secondary); }
.option:has(input:checked) { background: var(--color-accent-soft); }
.option:has(input:checked) .option-mark { background: var(--color-inverse); border-color: var(--color-inverse); }
.option:has(input:checked) .option-mark svg { opacity: 1; }
.option:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.slider-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
input[type='range']::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--color-accent) var(--fill, 0%), var(--color-track) var(--fill, 0%)); }
input[type='range']::-moz-range-track { height: 8px; border-radius: 4px; background: var(--color-track); }
input[type='range']::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--color-accent); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #FFFFFF; border: 1px solid var(--color-line-control); box-shadow: var(--shadow-floating); }
input[type='range']::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; border: 1px solid var(--color-line-control); box-shadow: var(--shadow-floating); }
.scale-labels { display: flex; justify-content: space-between; }
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.calc-actions-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.summary-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.summary-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.summary-list li span:last-child { text-align: right; font-weight: 500; }

/* Dossier: the header shares the bento's columns, so its text lines up with the cards below */
.dossier-head { display: grid; grid-template-columns: var(--columns); column-gap: var(--gutter); row-gap: 16px; align-items: end; padding-block: 8px; }
.dossier-title { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dossier-title .bn-heading { max-width: 760px; }
.bento { display: grid; grid-template-columns: var(--columns); gap: var(--gutter); align-items: stretch; }
.bento-col { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 16px; }
.mult-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.mult-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.mult-list div span:last-child { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-top: 20px; }
.chart-axis { display: flex; flex-direction: column-reverse; justify-content: space-between; padding-bottom: 28px; text-align: right; font-size: 12px; line-height: 16px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; display: flex; justify-content: space-around; gap: 24px; min-width: 0; }
.chart-group { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.chart-bars { flex: none; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar { position: relative; width: 56px; max-width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; transform-origin: bottom; animation: grow 600ms cubic-bezier(0.2, 0, 0, 1); }
.chart-bar span { display: block; border-radius: var(--radius-bar); min-height: 4px; }
.chart-peri { background: var(--color-accent); }
.chart-lime { background: var(--color-lime); }
.chart-dot { position: absolute; top: -16px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--color-inverse); box-shadow: 0 0 0 2px var(--color-card); }
.chart-label { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); }
.chart-label--active { color: var(--color-text); font-weight: 500; }
.chart-note { margin: 12px 0 16px; }
.tooltip-card { position: relative; margin-top: auto; padding: 14px 26px 14px 14px; border-radius: var(--radius-tooltip); background: var(--color-tile); box-shadow: var(--shadow-floating); }
.tooltip-card::after { content: ''; position: absolute; right: 10px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--color-inverse); }
@keyframes grow { from { transform: scaleY(0.2); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 32px; margin-block: auto; padding-top: 20px; }
.donut { position: relative; width: min(100%, 220px); aspect-ratio: 1; flex: none; }
.donut svg { display: block; width: 100%; height: 100%; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 0 44px; }
.legend { display: flex; flex-direction: column; gap: 12px; flex: 1 1 150px; min-width: 0; }
.legend-row { display: grid; grid-template-columns: 6px 56px minmax(0, 1fr); align-items: center; column-gap: 12px; }
.legend-swatch { width: 6px; height: 36px; border-radius: 6px; }
.tile { background: var(--color-tile); border-radius: var(--radius-tile); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tile-title { font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: -0.005em; }
.tile-list { display: flex; flex-direction: column; flex: 1; gap: 8px; margin-top: 20px; }
.tile-list .tile { flex: 1; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--color-hairline); }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--color-card); font-size: 12px; line-height: 16px; }
.sims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.sims--single { grid-template-columns: minmax(0, 1fr); }
.sim { gap: 20px; }
.sim-phase { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); margin-bottom: 2px; }
.sim-copy { margin-top: 12px; max-width: 620px; }
.sim-work { display: flex; flex-direction: column; gap: 12px; margin-top: auto; min-width: 0; }
.sim-control { display: flex; flex-direction: column; gap: 8px; }
.sim-results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
.sim-results .tile { gap: 4px; min-height: 110px; }
.sims--single .sim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; }
.sims--single .sim-booster { grid-column: 1 / -1; }
.sims--single .sim-work { margin-top: 0; }
.assumptions summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; }
.assumptions ul { margin: 4px 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; max-width: 680px; }
.legal { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); max-width: 640px; }

/* Patient quiz */
.quiz { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--gutter); align-items: stretch; }
.quiz-steps { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.quiz-steps li { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 8px; align-items: baseline; padding: 12px 16px; border-radius: var(--radius-input); background: var(--color-tile); font-size: 14px; line-height: 20px; color: var(--color-text-secondary); }
.quiz-steps li b { font-weight: 500; }
.quiz-steps li.is-current { background: var(--color-inverse); color: #FFFFFF; }
.quiz-steps li.is-done { color: var(--color-text); }
.quiz-steps li.is-done b { color: var(--color-lime-ink); }
.quiz-stage { background: var(--color-card); border-radius: var(--radius-card); padding: clamp(16px, 3vw, 40px); display: flex; align-items: center; justify-content: center; min-width: 0; }
.patient { width: 100%; max-width: 440px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-media); padding: 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.patient-clinic { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 500; }
.patient h2 { font-size: 28px; line-height: 34px; font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
.patient h2:focus { outline: none; }
.patient fieldset legend { font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 8px; }
.patient-options { display: flex; flex-direction: column; gap: 8px; }
.patient-option { position: relative; display: flex; align-items: center; min-height: 48px; padding: 10px 16px; border-radius: 12px; background: var(--color-section); font-size: 14px; line-height: 20px; cursor: pointer; }
.patient-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.patient-option:has(input:checked) { background: var(--color-accent-soft); box-shadow: inset 0 0 0 2px var(--color-accent); }
.patient-option:has(input:focus-visible) { outline: 2px solid var(--color-text); outline-offset: 2px; }
.patient-line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--color-line); font-size: 14px; line-height: 20px; }
.patient-line:last-child { border-bottom: 0; }
.patient-note { font-size: 12px; line-height: 16px; color: var(--color-text-secondary); }
.demo-flag { padding: 12px 16px; border-radius: 12px; background: var(--color-section); font-size: 14px; line-height: 20px; }
.patient-actions { display: flex; flex-direction: column; gap: 8px; }

/* Dialogs */
dialog { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(30, 40, 52, 0.4); }
.modal { width: min(520px, calc(100vw - 24px)); background: var(--color-card); border-radius: var(--radius-card); padding: clamp(24px, 4vw, 32px); display: flex; flex-direction: column; gap: 20px; box-shadow: 0 24px 64px rgba(30, 40, 52, 0.18); min-height: 0; }
.modal h2 { font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.notice { padding: 12px 16px; border-radius: var(--radius-input); background: var(--color-tile); }
.notice--ok { background: var(--color-lime-soft); color: var(--color-lime-ink); }

/* Responsive */
@media (max-width: 1100px) {
  .hero h1, .hero-sub { max-width: 720px; }
  .hero-glass, .hero-corner { display: none; }
  .hero-notch { width: 100%; padding: 28px calc(var(--edge) - var(--frame)) 28px; border-radius: 0; }
  .hero { margin-bottom: 24px; border-radius: var(--radius-hero) var(--radius-hero) 0 0; }
  .closing .span-left { grid-column: 1 / 8; }
  .closing .span-right { grid-column: 8 / 13; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-col--wide { grid-column: 1 / -1; order: -1; }
  .dossier-head { grid-template-columns: minmax(0, 1fr); }
  .dossier-title { grid-column: auto; }
  .sim-results { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .sim-results .tile { min-height: 0; }
}
@media (max-width: 860px) {
  .ed-nav { grid-template-columns: minmax(0, 1fr) auto; }
  .ed-nav-links { display: none; }
  .ed-nav .brand-name { font-size: 13px; line-height: 17px; letter-spacing: -0.01em; }
  .hero-sub { font-size: 16px; line-height: 24px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .span-left, .span-right, .closing .span-left, .closing .span-right { grid-column: 1 / -1; padding-right: 0; }
  .split { row-gap: 40px; }
  .funnel-panel { grid-template-columns: minmax(0, 1fr); }
  .funnel-copy { padding: 20px; }
  .funnel-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-notch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc, .quiz, .sims, .sims--single .sim { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-col--wide { order: 0; }
  .footer-row { margin-top: 56px; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .eyebrow { font-size: 11px; line-height: 15px; padding: 5px 10px; letter-spacing: 0.05em; }
  .hero-sub { font-size: 15px; line-height: 22px; }
  .hero-notch { gap: 14px 16px; padding-left: 24px; }
  .proof-value { font-size: 22px; line-height: 26px; }
  .proof-label { font-size: 13px; line-height: 18px; margin-top: 6px; }
  .proof-detail { font-size: 13px; line-height: 18px; }
  .proof-value { white-space: normal; }
  .proof-value { font-size: 28px; line-height: 32px; }
  .track-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 12px; }
  .track-card { display: flex; flex-direction: column; }
  .stat-row .metric-l { font-size: 26px; line-height: 32px; }
  .bn-card { padding: 20px; }
  .calc-main { padding: 20px; }
  .donut { margin: 0 auto; }
  .metric-xl { font-size: 26px; line-height: 30px; overflow-wrap: anywhere; }
  .metric-l, .metric-lr { font-size: 24px; line-height: 28px; }
  .metric-m { font-size: 19px; line-height: 24px; }
  .stat-row { gap: 12px; margin: 14px 0 12px; }
  .sample { padding: 16px; }
  .sample .bn-card { padding: 16px; }
  .calc-actions-right, .calc-actions-right .bn-btn { width: 100%; }
}
/* Phones (iOS and Android) */
/* Notch, Dynamic Island, punch-hole cameras and the home indicator: keep content inside the safe area. */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.ed-inverse { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.bn-page { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
dialog { max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.modal { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
@media (pointer: coarse) {
  /* iOS zooms into any field under 16px when it is tapped. */
  .field input[type='text'], .field input[type='email'], .field input[type='tel'] { height: 48px; font-size: 16px; }
  /* Finger-sized targets: at least 44px tall. */
  .footer-col a, .footer-legal-links a, .quiet-btn, .crumbs a, .toc a { display: inline-flex; align-items: center; min-height: 44px; }
  .bn-btn { min-height: 48px; }
  input[type='range'] { height: 32px; }
  input[type='range']::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -10px; }
  input[type='range']::-moz-range-thumb { width: 28px; height: 28px; }
}
/* Hover colors only where there is a real pointer, so they don't stick after a tap on touch screens. */
@media (hover: none) {
  .ed-btn:hover { background: var(--color-accent); }
  .bn-btn:hover { background: var(--color-inverse); }
  .option:hover { background: var(--color-tile); }
  .post-card:hover { box-shadow: none; }
}
/* Small phones (iPhone SE, Galaxy S compact, 360px Android) */
@media (max-width: 380px) {
  .ed { --edge: 16px; --frame: 8px; }
  .bn-page { padding-inline: 12px; }
  .hero h1, .hero--plain h1 { font-size: 34px; }
  .page-head h1 { font-size: 30px; }
  .ed-heading { font-size: 26px; }
  .hero-notch { grid-template-columns: minmax(0, 1fr); padding-left: 16px; }
  .bn-card, .calc-main { padding: 16px; }
  .stat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat-row > :last-child { grid-column: 1 / -1; }
  .funnel-steps { grid-template-columns: minmax(0, 1fr); }
  .patient { padding: 20px; }
  .mult-list div span:last-child { white-space: normal; text-align: right; }
}
/* Fold covers and the narrowest Android phones (280-320px) */
@media (max-width: 340px) {
  .ed-nav .brand-name { display: none; }
}
@media (max-width: 320px) {
  .hero h1, .hero--plain h1 { font-size: 30px; }
  .metric-xl { font-size: 24px; line-height: 28px; }
  .legend-row { grid-template-columns: 6px 44px minmax(0, 1fr); }
}
/* Landscape phones: don't let the hero fill the whole short screen. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-text { padding-top: 24px; padding-bottom: 24px; gap: 16px; }
  .hero h1 { font-size: clamp(28px, 4cqw, 40px); }
}

/* Dark mode: follows the phone or computer setting. Only token values change, so every component follows. */
@media (prefers-color-scheme: dark) {
  :root { --body-bg: #0B0D0C; --body-bg-bento: #0E1116; }
  .ed {
    --color-page: #0B0D0C;
    --color-section: #141716;
    --color-surface: #161A18;
    --color-inverse: #1C211F;
    --color-text: #ECEEED;
    --color-text-fade: #7E8381;
    --color-text-secondary: #A7ACAA;
    --color-line: #262B29;
    --color-line-inverse: #2E3432;
    --color-accent-hover: #19E08F;
    --color-accent-ink: #3EE39F;
    --color-accent-soft: #0E2A1E;
    --color-ink-hover: #262C29;
    --color-warn-bg: #3A2E10;
    --color-warn-ink: #F3C969;
    --color-danger: #FF6B66;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-raised: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
  .bn {
    --color-canvas: #0E1116;
    --color-card: #171B22;
    --color-tile: #1F242C;
    --color-tile-hover: #262C35;
    --color-inverse: #2B3547;
    --color-inverse-hover: #36425A;
    --color-text: #E8EAEE;
    --color-text-secondary: #A0A6B0;
    --color-text-tertiary: #8A9099;
    --color-on-inverse-muted: #C3C9D3;
    --color-line-control: #3A414C;
    --color-hairline: #2A3039;
    --color-track: #2A3039;
    --color-accent: #8A93FF;
    --color-accent-strong: #6F7AFE;
    --color-accent-soft: #262B52;
    --color-lime-ink: #B8FF66;
    --color-lime-soft: #1F2C12;
    --color-danger: #FF6B66;
    --hatch-a: #3A414C;
    --hatch-b: #1F242C;
    --shadow-floating: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
  /* Dark panels need an edge to stand apart from the dark page. */
  .ed-inverse { border-top: 1px solid var(--color-line); }
  .article-cta, .ed-btn--ink, .chip[aria-current='page'] { box-shadow: inset 0 0 0 1px var(--color-line-inverse); }
  .hero-notch { color: var(--color-text); }
  dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
