/* ==========================================================================
   Health Risk Predictor — photographic, editorial design system
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --paper: #f6f1ea;
  --paper-2: #ede5d9;
  --surface: #fffcf7;
  --ink: #1d2622;
  --ink-2: #4d5852;
  --ink-3: #79837d;
  --line: #e2d8ca;
  --line-strong: #cbbfae;

  --primary: #2f5d50;
  --primary-strong: #224538;
  --primary-soft: #e2ebe5;
  --on-primary: #ffffff;
  --accent: #b85c38;
  --accent-soft: #f5e3d8;

  --deep: #1c2b26;
  --deep-2: #24372f;
  --deep-ink: #efe9df;
  --deep-ink-2: #b9c2bb;

  --good: #0aac23;   --good-text: #1f6b2c;  --good-soft: #e3f1e3;
  --warn: #fbb315;   --warn-text: #865300;  --warn-soft: #fbefd6;
  --crit: #dc3c3d;   --crit-text: #a8281f;  --crit-soft: #f9e2df;

  --series-heart: #257de0;
  --series-stroke: #f47230;
  --series-diabetes: #00b894;
  --raise: #ec4647;
  --lower: #257de0;
  --grid: #e7e2da;
  --axis: #c2baae;

  --r-sm: 6px;
  --r: 10px;
  --shadow: 0 1px 2px rgba(29, 38, 34, .06), 0 12px 32px -14px rgba(29, 38, 34, .18);
  --shadow-lg: 0 30px 60px -20px rgba(29, 38, 34, .35);
  --ring: 0 0 0 3px rgba(47, 93, 80, .3);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 76px;
  --gutter: clamp(20px, 4vw, 48px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121815;
  --paper-2: #18201c;
  --surface: #1b2420;
  --ink: #ece6dc;
  --ink-2: #b6bbb4;
  --ink-3: #8a928c;
  --line: #2b3631;
  --line-strong: #3b4842;
  --primary: #8fc2ad;
  --primary-strong: #aed6c5;
  --primary-soft: rgba(143, 194, 173, .14);
  --on-primary: #0f1f19;
  --accent: #e3926c;
  --accent-soft: rgba(227, 146, 108, .14);
  --deep: #0c1210;
  --deep-2: #141d19;
  --good-text: #6fcf74;  --good-soft: rgba(10, 172, 35, .15);
  --warn-text: #f5c25a;  --warn-soft: rgba(251, 179, 21, .14);
  --crit-text: #f08a80;  --crit-soft: rgba(220, 60, 61, .17);
  --series-heart: #338ced;
  --series-stroke: #e76624;
  --series-diabetes: #00a888;
  --raise: #eb6263;
  --lower: #338ced;
  --grid: #26302b;
  --axis: #3d4a44;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -14px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(143, 194, 173, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 72px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font: 400 17px/1.65 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--primary); color: var(--on-primary); border-radius: var(--r-sm); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--xs { width: 12px; height: 12px; }
.icon--sm { width: 16px; height: 16px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }

/* ---------- Type ---------- */
.h2 { font: 400 clamp(1.9rem, 1.3rem + 2vw, 3rem)/1.08 var(--serif); letter-spacing: -.02em; font-variation-settings: "opsz" 96; }
.h3 { font: 500 1.45rem/1.25 var(--serif); letter-spacing: -.01em; }
.h4 { font: 600 1.08rem/1.35 var(--sans); }
.h2 a, .h3 a { color: inherit; text-decoration: none; }
.h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 38rem; }
.prose-lg { font: 300 clamp(1.2rem, 1rem + .6vw, 1.45rem)/1.55 var(--serif); color: var(--ink); max-width: 42rem; }
.statement { font: 300 clamp(1.6rem, 1.1rem + 2vw, 2.7rem)/1.25 var(--serif); letter-spacing: -.015em; max-width: 58rem; margin: 0; }
.statement em, .footer__statement em { font-style: italic; color: var(--accent); }
.footer__statement em { color: #e7a07c; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.text-link .icon { transition: transform .2s var(--ease); }
.text-link:hover .icon { transform: translateX(4px); }

/* ---------- Layout ---------- */
.container { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section--flush { padding-top: 0; }
.section--paper { background: var(--paper-2); }
.section--dark { background: var(--deep); color: var(--deep-ink); }
.section--dark .lede, .section--dark p { color: var(--deep-ink-2); }
.section--overlap { padding-top: 0; position: relative; z-index: 2; }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-head .h2 { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split--top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.split__media { margin: 0; }
.split__media .photo img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: var(--r-sm); }
.split__text .h2 { margin-bottom: 20px; }
.split__text .btn, .split__text .text-link { margin-top: 28px; }
.caption { margin-top: 12px; font-size: .875rem; color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r-sm);
  font: 600 .98rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-strong); }
.btn--light { background: #fbf7f0; color: #1d2622; }
.btn--light:hover { background: #fff; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn--danger { background: var(--crit); color: #fff; }
.btn--danger:hover { background: #b92f30; }
.btn--danger-text { color: var(--crit-text); }
.btn--danger-text:hover { background: var(--crit-soft); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--primary); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn--light { color: var(--deep-ink); margin-top: 28px; }
.tool { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; transition: background-color .2s; }
.tool:hover { background: rgba(128, 128, 128, .15); background: color-mix(in srgb, currentColor 12%, transparent); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--nav-h); color: #fff; transition: background-color .35s, color .35s, box-shadow .35s; }
.nav::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(rgba(10, 16, 13, .45), transparent); pointer-events: none; transition: opacity .35s; }
.nav.is-solid { background: var(--paper); background: color-mix(in srgb, var(--paper) 94%, transparent); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav.is-solid::before { opacity: 0; }
.nav__inner { position: relative; height: 100%; display: flex; align-items: center; gap: 28px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 500 1.2rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.wordmark em { font-style: italic; font-weight: 400; margin-left: .25em; }
.wordmark__mark { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { position: relative; padding: 8px 12px; color: inherit; text-decoration: none; font-weight: 500; font-size: .96rem; opacity: .88; transition: opacity .2s; }
.nav__links a:hover, .nav__links a[aria-current] { opacity: 1; }
.nav__links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:hover::after, .nav__links a[aria-current]::after { transform: scaleX(1); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: 1px; }
.nav__tools { display: flex; align-items: center; gap: 2px; }
.nav__cta { margin-left: 10px; min-height: 42px; }
.nav.is-solid .nav__cta { background: var(--primary); color: var(--on-primary); }
.nav__burger { display: none; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

.menu { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--deep); color: var(--deep-ink); animation: fade .25s; }
.menu__head { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.menu__links { display: flex; flex-direction: column; flex: 1; justify-content: center; gap: 4px; }
.menu__links a { color: inherit; text-decoration: none; font: 300 clamp(2rem, 8vw, 3rem)/1.2 var(--serif); padding: 4px 0; opacity: 0; animation: menuIn .5s var(--ease) forwards; }
.menu__links a:nth-child(2) { animation-delay: .04s; } .menu__links a:nth-child(3) { animation-delay: .08s; } .menu__links a:nth-child(4) { animation-delay: .12s; }
.menu__links a:nth-child(5) { animation-delay: .16s; } .menu__links a:nth-child(6) { animation-delay: .2s; } .menu__links a:nth-child(7) { animation-delay: .24s; }
.menu__foot { padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); }
.menu .btn--primary { background: #fbf7f0; color: #1d2622; }
@keyframes menuIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #2a332e; isolation: isolate; }
.hero--full { min-height: max(620px, 100svh); }
.hero--page { min-height: max(480px, 72svh); }
.hero__photo, .band__photo { position: absolute; inset: 0; z-index: -2; }
.hero__photo img, .band__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo img { animation: settle 7s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 16, 13, .25) 0%, rgba(10, 16, 13, 0) 30%, rgba(10, 16, 13, .3) 55%, rgba(10, 16, 13, .78) 100%), linear-gradient(90deg, rgba(10, 16, 13, .45), transparent 70%); }
.hero__content { position: relative; padding: calc(var(--nav-h) + 48px) 0 clamp(48px, 8vh, 96px); }
.hero--page .hero__content { padding-bottom: clamp(56px, 9vh, 104px); }
.hero--overlap .hero__content { padding-bottom: 150px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: .9rem; }
.crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { opacity: .5; }
.hero__title { max-width: 16ch; font: 300 clamp(2.7rem, 1.6rem + 4.4vw, 5.8rem)/1.02 var(--serif); letter-spacing: -.03em; font-variation-settings: "opsz" 144; text-wrap: balance; }
.hero--page .hero__title { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.6rem); max-width: 18ch; }
.hero__lede { max-width: 36rem; margin-top: 22px; font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); color: rgba(255, 255, 255, .9); }
.hero__meta { margin-top: 14px; font-size: .92rem; color: rgba(255, 255, 255, .75); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__title, .hero__lede, .hero__actions, .crumbs { animation: rise .9s var(--ease) both; }
.hero__lede { animation-delay: .12s; }
.hero__actions { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.scroll-cue { position: absolute; right: 0; bottom: clamp(48px, 8vh, 96px); display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; color: #fff; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* ---------- Full-bleed photo bands ---------- */
.band { position: relative; display: flex; align-items: center; min-height: max(460px, 70svh); color: #fff; overflow: hidden; isolation: isolate; background: #2a332e; }
.band--tall { min-height: max(520px, 86svh); }
.band__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 16, 13, .72) 0%, rgba(10, 16, 13, .35) 55%, rgba(10, 16, 13, .15) 100%); }
.band__content { padding: 96px 0; }
.band__content--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.band__content--center .band__text { margin-inline: auto; }
.band__title { max-width: 14ch; font: 300 clamp(2.3rem, 1.5rem + 3.4vw, 4.6rem)/1.05 var(--serif); letter-spacing: -.025em; }
.band__text { max-width: 32rem; margin: 20px 0 32px; font-size: 1.12rem; color: rgba(255, 255, 255, .88); }

/* ---------- Home ---------- */
.intro { display: grid; gap: clamp(48px, 6vw, 80px); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding-top: 40px; border-top: 1px solid var(--line-strong); }
.figures dt { font: 300 clamp(2.6rem, 2rem + 2vw, 3.8rem)/1 var(--serif); letter-spacing: -.03em; color: var(--primary); }
.figures dd { margin: 12px 0 0; max-width: 18rem; color: var(--ink-2); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tiles--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 520px; overflow: hidden; border-radius: var(--r-sm); color: #fff; text-decoration: none; isolation: isolate; background: #2a332e; }
.tiles--small .tile, .tiles--two .tile { min-height: 380px; }
.tile__photo { position: absolute; inset: 0; z-index: -2; }
.tile__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(10, 16, 13, .85) 100%); }
.tile:hover .tile__photo img { transform: scale(1.05); }
.tile__body { padding: 28px; }
.tile__title { margin: 14px 0 8px; font: 400 clamp(1.6rem, 1.3rem + 1vw, 2.1rem)/1.1 var(--serif); letter-spacing: -.015em; }
.tile__text { color: rgba(255, 255, 255, .85); font-size: .98rem; }
.tile__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; }
.tile__link .icon { transition: transform .25s var(--ease); }
.tile:hover .tile__link .icon { transform: translateX(5px); }
.cond { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; }
.cond--heart { color: var(--series-heart); background: rgba(37, 125, 224, .13); background: color-mix(in srgb, var(--series-heart) 13%, transparent); }
.cond--stroke { color: var(--series-stroke); background: rgba(244, 114, 48, .13); background: color-mix(in srgb, var(--series-stroke) 13%, transparent); }
.cond--diabetes { color: var(--series-diabetes); background: rgba(0, 184, 148, .15); background: color-mix(in srgb, var(--series-diabetes) 15%, transparent); }
.tile .cond { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); }

.numbered { list-style: none; counter-reset: n; display: grid; gap: 28px; margin: 8px 0 0; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 56px 1fr; }
.numbered li::before { content: counter(n, decimal-leading-zero); grid-row: span 2; font: 300 2rem/1 var(--serif); color: var(--accent); }
.numbered h3 { font: 600 1.1rem/1.3 var(--sans); margin-bottom: 6px; }
.numbered p { color: var(--ink-2); }

.habit-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 28px 0 0; }
.habit-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.habit-list .icon { color: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.fact { margin: 0; padding-top: 28px; border-top: 2px solid var(--ink); }
.fact__value { font: 300 clamp(2.4rem, 1.8rem + 2.4vw, 3.8rem)/1 var(--serif); letter-spacing: -.03em; margin-bottom: 16px; }
.fact__label { color: var(--ink-2); }
.fact__source { margin-top: 10px; font-size: .82rem; color: var(--ink-3); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Check: wizard ---------- */
.check { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 28px; align-items: start; margin-top: -110px; }
.wizard { padding: clamp(24px, 4vw, 48px); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.wizard__steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.wizard__steps li { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; color: var(--ink-3); transition: color .3s; }
.wizard__steps span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid currentColor; font-size: .8rem; transition: background-color .3s, color .3s, border-color .3s; }
.wizard__steps li[aria-current], .wizard__steps li.is-done { color: var(--ink); }
.wizard__steps li[aria-current] span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.wizard__steps li.is-done span { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary); }
.wizard__bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: clamp(28px, 4vw, 44px); }
.wizard__bar span { display: block; height: 100%; width: 25%; background: var(--accent); transition: width .5s var(--ease); }
.step { margin: 0; padding: 0; border: 0; min-width: 0; animation: stepIn .45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.step__title { padding: 0; font: 400 clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem)/1.1 var(--serif); letter-spacing: -.02em; }
.step__intro { margin: 10px 0 30px; color: var(--ink-2); }
.wizard__nav { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.wizard__nav #step-next, .wizard__nav #submit-btn { margin-left: auto; }
.form-error { margin: 16px 0 0; color: var(--crit-text); font-weight: 500; }
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin: 0; }
.review div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.review dt { color: var(--ink-2); }
.review dd { margin: 0; }
.review button { border: 0; background: none; padding: 0; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.review button:hover { text-decoration-color: currentColor; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--ink-3); font-size: .9rem; }
.check__aside { position: sticky; top: calc(var(--nav-h) + 20px); }
.aside-card { margin: 0; overflow: hidden; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.aside-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.aside-card figcaption { padding: 24px; }
.tips { list-style: none; display: grid; gap: 12px; margin: 14px 0 18px; font-size: .94rem; color: var(--ink-2); }
.tips strong { color: var(--ink); }

.loading-screen { position: fixed; inset: 0; z-index: 120; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--paper); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(6px); font: 300 1.4rem var(--serif); animation: fade .3s; }
.pulse-line { width: 220px; height: 66px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: trace 1.4s var(--ease) infinite; }
@keyframes trace { 70%, 100% { stroke-dashoffset: 0; } }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; min-width: 0; }
.field label, .field .label { margin-bottom: 8px; font-weight: 600; font-size: .95rem; }
.field__hint { margin: 8px 0 0; font-size: .84rem; color: var(--ink-3); }
.field__error { margin: 6px 0 0; font-size: .86rem; font-weight: 500; color: var(--crit-text); }
.field__error:empty { display: none; }
.field.has-error .field__hint { display: none; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input, .search input, .select select, .note input {
  width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink); font-size: 1.05rem; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input-wrap input { padding-right: 70px; font-variant-numeric: tabular-nums; }
.input-wrap input::placeholder, .search input::placeholder, .note input::placeholder { color: var(--ink-3); opacity: .75; }
.input-wrap input:hover, .search input:hover, .select select:hover { border-color: var(--ink-3); }
.input-wrap input:focus, .search input:focus, .select select:focus, .note input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.input-wrap input::-webkit-outer-spin-button, .input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.input-unit { position: absolute; right: 16px; font-size: .86rem; color: var(--ink-3); pointer-events: none; }
.input-wrap--action input { padding-right: 130px; }
.input-action { position: absolute; right: 6px; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border: 0; border-radius: 4px; background: var(--primary-soft); color: var(--primary); font-size: .86rem; font-weight: 600; }
.input-action .icon { width: 16px; height: 16px; }
.input-action:hover { background: var(--primary-soft); background: color-mix(in srgb, var(--primary) 18%, transparent); }
.field.has-error input { border-color: var(--crit); }
.field.is-valid input { border-color: color-mix(in srgb, var(--primary) 50%, var(--line-strong)); }

.segmented { display: flex; width: 100%; padding: 4px; gap: 4px; border-radius: var(--r-sm); background: var(--paper-2); border: 1px solid var(--line); }
.segmented label { flex: 1; position: relative; margin: 0; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; height: 44px; padding: 0 14px; border-radius: 4px; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.segmented input:hover + span { color: var(--ink); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(29, 38, 34, .15); }
.segmented input:focus-visible + span { box-shadow: var(--ring); }
.segmented--sm { width: auto; display: inline-flex; }
.segmented--sm span { height: 34px; font-size: .86rem; }
.field.has-error .segmented { border-color: var(--crit); }
.unit-switch { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; font-size: .9rem; color: var(--ink-3); }

.select { position: relative; display: inline-flex; }
.select select { appearance: none; -webkit-appearance: none; height: 44px; padding-right: 40px; font-size: .94rem; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch__track { width: 46px; height: 28px; padding: 3px; border-radius: 14px; background: var(--line-strong); transition: background-color .2s; }
.switch__thumb { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

/* ---------- Report ---------- */
.actionbar { position: sticky; top: var(--nav-h); z-index: 40; background: var(--paper); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.actionbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.actionbar__buttons { display: flex; gap: 8px; }
.actionbar .btn { min-height: 42px; padding: 0 16px; font-size: .92rem; }
.note { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.note input { height: 42px; font-size: .94rem; border-style: dashed; background: transparent; }
.note__status { font-size: .82rem; color: var(--good-text); min-width: 40px; }

.risks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.risk-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.risk-card--low { border-top-color: var(--good); }
.risk-card--moderate { border-top-color: var(--warn); }
.risk-card--high { border-top-color: var(--crit); }
.risk-card__top { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.05rem; }
.risk-card__value { font: 300 clamp(3.4rem, 2.6rem + 2.6vw, 4.8rem)/.95 var(--serif); letter-spacing: -.04em; }
.risk-card__value small { font-size: .42em; margin-left: 4px; color: var(--ink-2); letter-spacing: 0; }
.risk-card .pill { align-self: flex-start; }
.risk-card__foot { font-size: .92rem; color: var(--ink-2); }
.risk-card__warn { display: flex; gap: 8px; font-size: .84rem; color: var(--warn-text); }
.risk-card__warn .icon { width: 16px; height: 16px; margin-top: 2px; }
.meter { position: relative; height: 10px; border-radius: 5px; background: var(--paper-2); }
.meter__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; transition: width 1s var(--ease); }
.meter__fill--low { background: var(--good); }
.meter__fill--moderate { background: var(--warn); }
.meter__fill--high { background: var(--crit); }
.meter__tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink-3); border-radius: 1px; }
.fineprint { display: flex; gap: 8px; margin-top: 24px; font-size: .88rem; color: var(--ink-3); }
.fineprint .icon { margin-top: 3px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.pill .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.pill--low, .pill--good { background: var(--good-soft); color: var(--good-text); }
.pill--moderate, .pill--warning { background: var(--warn-soft); color: var(--warn-text); }
.pill--high, .pill--critical { background: var(--crit-soft); color: var(--crit-text); }

.indicators { list-style: none; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.indicator { display: grid; grid-template-columns: 1.3fr 1fr auto; align-items: center; gap: 16px; padding: 20px 24px; }
.indicator + .indicator { border-top: 1px solid var(--line); }
.indicator__name { font-weight: 600; }
.indicator__target { display: block; font-size: .84rem; font-weight: 400; color: var(--ink-3); }
.indicator__value { font: 400 1.25rem var(--serif); font-variant-numeric: tabular-nums; }

.legend-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: .88rem; color: var(--ink-2); }
.legend-row .key:nth-of-type(2) { margin-left: 16px; }
.key { width: 14px; height: 14px; border-radius: 3px; }
.key--raise { background: var(--raise); }
.key--lower { background: var(--lower); }
.drivers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.driver-block { padding: 24px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.driver-block__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 600; flex-wrap: wrap; }
.driver-block__head .pill { margin-left: auto; }
.driver { display: grid; gap: 4px; padding: 8px 0; }
.driver + .driver { border-top: 1px solid var(--line); }
.driver__label { font-size: .9rem; color: var(--ink-2); }
.driver__row { display: grid; grid-template-columns: 1fr 52px; gap: 10px; align-items: center; }
.driver__track { position: relative; height: 14px; }
.driver__track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--axis); }
.driver__bar { position: absolute; top: 1px; height: 12px; transition: width .8s var(--ease); }
.driver__bar--raises { left: 50%; background: var(--raise); border-radius: 0 4px 4px 0; }
.driver__bar--lowers { right: 50%; background: var(--lower); border-radius: 4px 0 0 4px; }
.driver__value { text-align: right; font-size: .84rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.whatif { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 72px); }
.whatif__controls { display: grid; gap: 26px; align-content: start; }
.range { display: grid; gap: 8px; }
.range__head { display: flex; justify-content: space-between; font-weight: 600; color: var(--deep-ink); }
.range__value { font: 400 1.1rem var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
.range input[type=range] { width: 100%; height: 4px; appearance: none; -webkit-appearance: none; border-radius: 2px; background: linear-gradient(90deg, #e7a07c var(--fill, 50%), rgba(255, 255, 255, .18) var(--fill, 50%)); outline: none; }
.range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fbf7f0; border: 0; box-shadow: 0 0 0 5px rgba(231, 160, 124, .3); cursor: grab; }
.range input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fbf7f0; border: 0; cursor: grab; }
.range input[type=range]:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.range__scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--deep-ink-2); }
.section--dark .segmented { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.section--dark .segmented span { color: var(--deep-ink-2); }
.section--dark .segmented input:checked + span { background: #fbf7f0; color: #1d2622; }
.whatif__results { display: grid; gap: 14px; align-content: start; }
.wi-card { padding: 20px 22px; border-radius: var(--r); background: var(--deep-2); transition: opacity .2s; }
.whatif__results.is-updating .wi-card { opacity: .6; }
.wi-card__top { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 10px; color: var(--deep-ink); }
.wi-card__top .pill { margin-left: auto; }
.wi-card__nums { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.wi-card__now { font: 300 2.4rem/1 var(--serif); color: #fff; }
.wi-card__was { font-size: .88rem; color: var(--deep-ink-2); }
.wi-card .meter { background: rgba(255, 255, 255, .1); }
.delta { margin-left: auto; font-size: .88rem; font-weight: 700; }
.delta--down { color: var(--good-text); }
.delta--up { color: var(--crit-text); }
.delta--flat { color: var(--ink-3); }
.section--dark .delta--down { color: #7fd884; }
.section--dark .delta--up { color: #f5978d; }
.section--dark .delta--flat { color: var(--deep-ink-2); }
.section--dark .cond { background: rgba(255, 255, 255, .08); }

.recs { list-style: none; display: grid; gap: 14px; }
.rec { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 22px 24px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border-left: 4px solid var(--line); }
.rec--urgent, .rec--high { border-left-color: var(--crit); }
.rec--medium { border-left-color: var(--warn); }
.rec--low { border-left-color: var(--good); }
.rec__icon { color: var(--ink-2); margin-top: 2px; }
.rec--urgent .rec__icon, .rec--high .rec__icon { color: var(--crit-text); }
.rec--medium .rec__icon { color: var(--warn-text); }
.rec--low .rec__icon { color: var(--good-text); }
.rec__title { font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.rec__body { color: var(--ink-2); }
.disclaimer { display: flex; gap: 8px; padding: 28px 0 64px; font-size: .86rem; color: var(--ink-3); }
.disclaimer .icon { margin-top: 3px; }

/* ---------- Empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 640px; margin-inline: auto; }
.empty__photo img { width: min(560px, 100%); aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 36px; }
.empty .h2 { margin-bottom: 14px; }
.empty .lede { margin-inline: auto; }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- History ---------- */
.history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.history-head__actions { display: flex; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat { padding: 24px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.stat__label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.stat__label .cond { width: 30px; height: 30px; }
.stat__label .cond .icon { width: 16px; height: 16px; }
.stat__value { font: 300 2.6rem/1 var(--serif); letter-spacing: -.03em; }
.stat__sub { margin-top: 10px; font-size: .86rem; color: var(--ink-3); }
.stat__sub .delta { margin: 0; }
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 24px; }
.chart-panel { padding: 26px 26px 14px; }
.chart-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.trend { position: relative; }
.trend svg { display: block; width: 100%; height: 280px; overflow: visible; }
.trend .gridline { stroke: var(--grid); stroke-width: 1; }
.trend .baseline { stroke: var(--axis); stroke-width: 1; }
.trend .tick { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.trend .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .dot { stroke: var(--surface); stroke-width: 2; }
.trend .end-label { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.trend .crosshair { stroke: var(--axis); stroke-width: 1; }
.trend .single-note { fill: var(--ink-3); font-size: 12px; }
.tooltip { position: absolute; z-index: 5; min-width: 180px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .84rem; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); }
.tooltip__title { font-weight: 700; margin-bottom: 6px; }
.tooltip__row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.tooltip__row b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.tooltip__row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.table-panel { overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px; border-bottom: 1px solid var(--line); }
.table-toolbar__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 400px; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 14px; color: var(--ink-3); }
.search input { height: 44px; padding-left: 44px; font-size: .96rem; }
.search--lg { max-width: none; }
.search--lg input { height: 54px; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { padding: 12px 18px; background: var(--paper-2); color: var(--ink-2); font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-align: left; white-space: nowrap; }
.table td { padding: 14px 18px; border-top: 1px solid var(--line); white-space: nowrap; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: var(--paper); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__note { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.table__date { font-weight: 600; }
.table__time { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 400; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions .tool { width: 36px; height: 36px; color: var(--ink-2); }
.table-empty { padding: 36px; text-align: center; color: var(--ink-2); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.pagination:empty { display: none; }
.pagination__pages { display: flex; gap: 4px; align-items: center; }
.page-btn { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; font-size: .88rem; }
.page-btn:hover:not(:disabled) { border-color: var(--ink-3); }
.page-btn[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn .icon { width: 16px; height: 16px; }
.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); }
.dropdown__menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-size: .94rem; }
.dropdown__menu button:hover, .dropdown__menu button:focus-visible { background: var(--paper); box-shadow: none; }
.dropdown__menu .icon { color: var(--ink-3); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Learn & guides ---------- */
.features { display: grid; gap: clamp(72px, 10vw, 140px); }
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature--reverse .feature__media { order: 2; }
.feature__media { display: block; overflow: hidden; border-radius: var(--r-sm); }
.feature__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature__media:hover img { transform: scale(1.04); }
.feature__text .h2 { margin: 18px 0 16px; }
.feature__stat { margin: 22px 0 30px; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.feature__stat strong { color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }

.article-intro { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(36px, 6vw, 96px); align-items: end; }
.article-intro .h2 { margin-bottom: 20px; }
.pullstat { margin: 0; padding: 32px 0 0; border-top: 2px solid var(--ink); }
.pullstat__value { font: 300 clamp(3rem, 2.2rem + 3vw, 4.8rem)/1 var(--serif); letter-spacing: -.04em; color: var(--accent); margin-bottom: 14px; }
.pullstat figcaption { color: var(--ink-2); }
.pullstat figcaption span { display: block; margin-top: 10px; font-size: .86rem; color: var(--ink-3); }

.factor-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 80px); }
.factor-cols__title { margin-bottom: 18px; font: 600 .88rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.factors { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-bottom: 16px; }
.factors--fixed { grid-template-columns: 1fr; }
.factors li { padding: 18px 0; border-top: 1px solid var(--line-strong); }
.factors strong { display: block; font: 500 1.2rem/1.3 var(--serif); margin-bottom: 4px; }
.factors span { color: var(--ink-2); font-size: .96rem; }

.alert-panel { padding: clamp(28px, 4vw, 48px); border-radius: var(--r); background: var(--crit-soft); border-left: 5px solid var(--crit); }
.alert-panel__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--crit-text); }
.alert-panel__head .icon { width: 26px; height: 26px; }
.alert-panel__head .h3 { color: var(--ink); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.alert-panel__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; margin: 18px 0; padding-left: 20px; font-size: 1.05rem; }
.alert-panel__list li::marker { color: var(--crit); }
.alert-panel__note { color: var(--ink-2); font-size: .94rem; }

.checks { list-style: none; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 36px; font-size: 1.05rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); }
.checks li::after { content: ""; position: absolute; left: 7px; top: calc(.2em + 6px); width: 8px; height: 5px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.checks--compact { gap: 8px; margin-top: 22px; }
.checks--compact li { font-size: .98rem; }
.checks--muted li { color: var(--ink-2); }

.sources { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.sources ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 12px; }
.sources a { display: inline-flex; align-items: center; gap: 6px; font-size: .94rem; }

/* ---------- Prevention ---------- */
.habits { list-style: none; display: grid; gap: clamp(80px, 10vw, 140px); }
.habit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.habit--reverse .habit__media { order: 2; }
.habit__media img { width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; border-radius: var(--r-sm); }
.habit__num { font: 300 1.2rem var(--serif); color: var(--accent); margin-bottom: 10px; }
.habit__text .h2 { margin-bottom: 16px; }
.helps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; font-size: .9rem; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; font-size: .84rem; font-weight: 600; text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink); transition: border-color .2s, background-color .2s; }
.chip:hover { border-color: var(--ink-3); background: var(--surface); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__aside { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 24px; }
.faq__toc { display: grid; }
.faq__toc a { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.faq__toc a span { color: var(--ink-3); }
.faq__toc a:hover { color: var(--primary); }
.faq__group + .faq__group { margin-top: 56px; }
.faq__group .h3 { margin-bottom: 14px; }
.qa { border-top: 1px solid var(--line-strong); }
.qa:last-child { border-bottom: 1px solid var(--line-strong); }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; list-style: none; font: 400 1.2rem/1.35 var(--serif); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--primary); }
.qa__icon { transition: transform .3s var(--ease); color: var(--accent); }
.qa[open] .qa__icon { transform: rotate(45deg); }
.qa p { max-width: 42rem; padding-bottom: 24px; color: var(--ink-2); animation: fade .3s; }

/* ---------- About ---------- */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 18px; }
.model { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.model p { margin: 0; color: var(--ink-2); }
.model strong { color: var(--ink); margin-right: 4px; }
.model__head { display: flex; gap: 14px; align-items: flex-start; }
.model__head a { display: inline-flex; gap: 4px; align-items: center; }
.model__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 16px 0; border-block: 1px solid var(--line); }
.model__metrics dt { font-size: .76rem; color: var(--ink-3); font-weight: 600; }
.model__metrics dd { margin: 4px 0 0; font: 400 1.6rem/1 var(--serif); }
.notes { padding-left: 18px; display: grid; gap: 8px; font-size: .88rem; color: var(--ink-2); }
.privacy .h2 { margin-bottom: 40px; }
.privacy__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.privacy__grid .icon { width: 28px; height: 28px; color: #e7a07c; margin-bottom: 18px; }
.privacy__grid .h4 { margin-bottom: 8px; color: var(--deep-ink); }
.credits { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 36px; }
.credits li { display: flex; gap: 16px; align-items: center; font-size: .92rem; }
.credits__thumb { flex: none; }
.credits__thumb img { width: 88px; height: 64px; object-fit: cover; border-radius: 4px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12, 18, 16, .6); backdrop-filter: blur(4px); animation: fade .2s; }
.modal__panel { position: relative; width: min(500px, 100%); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 20px; padding: 28px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
.modal__panel--sm { width: min(420px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: center; }
.modal__title { font: 400 1.6rem/1.2 var(--serif); }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.setting__title { margin: 0; font-weight: 600; }
.setting__hint { margin: 2px 0 0; font-size: .86rem; color: var(--ink-3); }
.bmi-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 72px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--paper); }
.bmi-result__value { font: 300 2.2rem/1 var(--serif); }
body.modal-open { overflow: hidden; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: grid; gap: 10px; width: min(380px, calc(100% - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .94rem; animation: toastIn .35s var(--ease); }
.toast.is-leaving { animation: toastOut .25s var(--ease) forwards; }
.toast__icon { margin-top: 1px; }
.toast--success .toast__icon { color: var(--good-text); }
.toast--error .toast__icon { color: var(--crit-text); }
.toast--info .toast__icon { color: var(--primary); }
.toast__body { flex: 1; }
.toast__title { font-weight: 600; }
.toast__msg { color: var(--ink-2); }
.toast__action { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 700; font-size: .9rem; }
.toast .tool { width: 30px; height: 30px; margin: -4px -6px 0 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ---------- Footer ---------- */
.footer { background: var(--deep); color: var(--deep-ink); padding: clamp(72px, 9vw, 120px) 0 40px; }
.footer a { color: var(--deep-ink); }
.footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-bottom: clamp(48px, 6vw, 80px); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer__statement { max-width: 22ch; margin: 0; font: 300 clamp(2rem, 1.4rem + 2.4vw, 3.4rem)/1.1 var(--serif); letter-spacing: -.02em; }
.footer .btn--primary { background: #fbf7f0; color: #1d2622; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0; }
.wordmark--footer { font-size: 1.4rem; }
.footer__note { margin-top: 16px; max-width: 26rem; font-size: .92rem; color: var(--deep-ink-2); }
.footer__title { margin-bottom: 16px; font: 600 .82rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--deep-ink-2); }
.footer__links { list-style: none; display: grid; gap: 10px; }
.footer__links a { text-decoration: none; opacity: .9; }
.footer__links a:hover { opacity: 1; text-decoration: underline; }
.footer__legal { margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; color: var(--deep-ink-2); }

.noscript { margin: 0; padding: 14px var(--gutter); background: var(--warn-soft); color: var(--ink); text-align: center; font-weight: 600; position: relative; z-index: 70; }

/* ---------- Charts: series identity ---------- */
.s-heart { stroke: var(--series-heart); fill: var(--series-heart); }
.s-stroke { stroke: var(--series-stroke); fill: var(--series-stroke); }
.s-diabetes { stroke: var(--series-diabetes); fill: var(--series-diabetes); }
.trend .series.s-heart, .trend .series.s-stroke, .trend .series.s-diabetes { fill: none; }
.bg-heart { background: var(--series-heart); }
.bg-stroke { background: var(--series-stroke); }
.bg-diabetes { background: var(--series-diabetes); }
.img-failed { display: block; background: linear-gradient(135deg, #5d7a6e, #2f5d50); }
.img-failed img { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__cta { display: none; }
  .nav__links a { padding: 8px 9px; }
  .drivers, .models { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  :root { --nav-h: 68px; }
  .nav__links { display: none; }
  .nav__burger { display: inline-grid; }
  .nav__tools { margin-left: auto; }
  .split, .split--top, .feature, .habit, .article-intro, .factor-cols, .faq { grid-template-columns: 1fr; }
  .split--reverse .split__media, .feature--reverse .feature__media, .habit--reverse .habit__media { order: 0; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles > .tile:first-child:nth-last-child(3) { grid-column: 1 / -1; }
  .check { grid-template-columns: 1fr; margin-top: -80px; }
  .check__aside { position: static; }
  .risks { grid-template-columns: 1fr; }
  .whatif { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .faq__aside { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .privacy__grid { grid-template-columns: 1fr; }
  .actionbar__buttons .btn span { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .review, .figures, .facts, .tiles, .tiles--two, .habit-list, .factors, .alert-panel__list, .credits { grid-template-columns: 1fr; }
  .tile { min-height: 420px; }
  .tiles--small .tile, .tiles--two .tile { min-height: 320px; }
  .hero__actions .btn { width: 100%; }
  .scroll-cue { display: none; }
  .wordmark { font-size: 1.05rem; }
  .wizard__steps { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .wizard__steps li { font-size: 0; gap: 0; }
  .wizard__steps li[aria-current] { font-size: .86rem; gap: 8px; }
  .wizard__nav { flex-wrap: wrap; }
  .wizard__nav #fill-example { order: 3; width: 100%; justify-content: center; }
  .wizard__nav #step-next, .wizard__nav #submit-btn { flex: 1; }
  .indicator { grid-template-columns: 1fr auto; padding: 18px; }
  .indicator__value { grid-row: 2; }
  .indicator .pill { grid-row: 1 / span 2; grid-column: 2; }
  .stats { gap: 12px; }
  .stat { padding: 18px; }
  .stat__value { font-size: 2rem; }
  .actionbar { position: static; }
  .actionbar__inner { flex-wrap: wrap; }
  .note { max-width: none; flex-basis: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
  .pagination { flex-direction: column; }
  .unit-switch { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print: the report only ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav, .menu, .footer, .no-print, .toasts, .modal, .skip-link, .hero__photo, .hero__shade, .crumbs { display: none !important; }
  .hero { min-height: 0 !important; color: #000; background: none; }
  .hero__content { padding: 0 0 12pt; }
  .hero__title { font-size: 24pt; max-width: none; }
  .hero__lede, .hero__meta { color: #333; }
  .section { padding: 12pt 0; background: none !important; }
  .risk-card, .rec, .indicators, .driver-block { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .meter, .meter__fill, .pill, .driver__bar, .cond { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .js .reveal { opacity: 1; transform: none; }
}
