/* Unfold: design tokens ------------------------------------------------ */
:root {
  --ink: #1d2340;
  --ink-2: #4b5277;
  --ink-3: #6d7497;
  --paper: #f3f5fa;
  --surface: #ffffff;
  --sunk: #e8ecf5;
  --line: #d9dfed;
  --lagoon: #1c7a74;
  --lagoon-ink: #ffffff;
  --lagoon-soft: #d7efec;
  --plum: #6a2c63;
  --plum-soft: #f2e3ef;
  --dawn: #f2b38a;
  --sky: #b9c6f0;
  --danger: #a3294e;
  --danger-soft: #fbe6ec;
  --warn-soft: #fdf0e3;
  --t0: #2f9d8f;
  --t1: #8198e3;
  --t2: #e8a063;
  --t3: #b23a5b;
  --focus: #3b5bdb;
  --shadow: 0 1px 0 rgba(29, 35, 64, .04), 0 18px 40px -24px rgba(29, 35, 64, .28);
  --r-pill: 999px;
  --r-xl: 36px;
  --r-lg: 22px;
  --r-md: 12px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9ebf7; --ink-2: #b3b9d6; --ink-3: #8e95b6; --paper: #10132a; --surface: #181c37; --sunk: #1f2442;
    --line: #2d3355; --lagoon: #5fc4ba; --lagoon-ink: #0b1f1d; --lagoon-soft: #173a3d; --plum: #d796cd; --plum-soft: #34203f;
    --danger: #ff8fae; --danger-soft: #3b1a2a; --warn-soft: #3a2a1e; --t0: #4fc1b2; --t1: #9aaef0; --t2: #f0b07b; --t3: #e2708f;
    --focus: #9db1ff; --shadow: 0 1px 0 rgba(0,0,0,.2), 0 18px 40px -24px rgba(0,0,0,.7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e9ebf7; --ink-2: #b3b9d6; --ink-3: #8e95b6; --paper: #10132a; --surface: #181c37; --sunk: #1f2442;
  --line: #2d3355; --lagoon: #5fc4ba; --lagoon-ink: #0b1f1d; --lagoon-soft: #173a3d; --plum: #d796cd; --plum-soft: #34203f;
  --danger: #ff8fae; --danger-soft: #3b1a2a; --warn-soft: #3a2a1e; --t0: #4fc1b2; --t1: #9aaef0; --t2: #f0b07b; --t3: #e2708f;
  --focus: #9db1ff; --shadow: 0 1px 0 rgba(0,0,0,.2), 0 18px 40px -24px rgba(0,0,0,.7); color-scheme: dark;
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 68ch; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; font-variation-settings: "wdth" 100; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--r-md); z-index: 50; }
.skip:focus { top: 1rem; }
.muted { color: var(--ink-2); }
.small { font-size: .92rem; }

/* Buttons --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .7rem 1.4rem; border-radius: var(--r-pill); border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lagoon); color: var(--lagoon-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--lagoon) 86%, var(--ink)); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 40px; padding: .4rem 1rem; font-size: .95rem; }
.linkbtn { background: none; border: 0; padding: .4rem .2rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); }

/* Header ---------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 800 1.35rem/1 var(--display); letter-spacing: -.03em; text-decoration: none; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { white-space: nowrap; text-decoration: none; padding: .5rem .8rem; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 700; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.nav .help-link { color: var(--danger); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
@media (max-width: 680px) {
  .nav a.hide-sm { display: none; }
  .nav { gap: 0; }
  .nav a { padding: .45rem .5rem; font-size: .9rem; }
  .top .wrap { gap: .5rem; }
  .brand { font-size: 1.15rem; }
}

/* Hero ------------------------------------------------------------------ */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 9.5ch; margin-bottom: .35em; }
.hero-lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 36ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-trust { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--ink-2); font-size: .95rem; list-style: none; padding: 0; }
.hero-trust li { display: flex; align-items: center; gap: .45rem; }
.hero-trust svg { width: 18px; height: 18px; color: var(--lagoon); flex: none; }
.demo { position: relative; display: grid; place-items: center; padding: 1.5rem 0; }
.demo-glow { position: absolute; inset: -12%; z-index: 0; filter: blur(52px); opacity: .85; pointer-events: none; }
.demo-glow i { position: absolute; display: block; border-radius: 50%; }
.demo-glow i:nth-child(1) { width: 58%; height: 58%; left: -2%; top: 2%; background: #9fe6d9; animation: float1 18s ease-in-out infinite alternate; }
.demo-glow i:nth-child(2) { width: 54%; height: 54%; right: 0; top: 12%; background: #b9c6f0; animation: float2 22s ease-in-out infinite alternate; }
.demo-glow i:nth-child(3) { width: 46%; height: 46%; left: 22%; bottom: 0; background: #ffd7b8; animation: float1 26s ease-in-out infinite alternate-reverse; }
@keyframes float1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8%, -6%, 0) scale(1.12); } }
@keyframes float2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-7%, 7%, 0) scale(.95); } }
.demo-card { position: relative; z-index: 1; width: 100%; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 30px; padding: clamp(1.4rem, 3vw, 2rem); box-shadow: 0 30px 60px -32px rgba(29, 35, 64, .45); }
.demo-step { margin: 0 0 .9rem; font-weight: 700; font-size: .85rem; color: var(--ink-3); }
.demo-step::after { content: ""; display: block; margin-top: .4rem; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--lagoon) 0 8%, var(--sunk) 8%); }
.demo-stem { margin: 0 0 .3rem; font-size: .95rem; color: var(--ink-2); }
.demo-q { margin: 0 0 1.1rem; font: 700 clamp(1.15rem, 1.8vw, 1.45rem)/1.25 var(--display); letter-spacing: -.02em; }
.demo-opts { display: grid; gap: .5rem; }
.demo-opt { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 52px; padding: .5rem 1rem .5rem .6rem; text-align: left; font-weight: 700; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .12s, background-color .12s, transform .12s; }
.demo-opt:hover { border-color: var(--lagoon); background: var(--lagoon-soft); transform: translateX(3px); }
.demo-opt .key { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; color: var(--ink-2); }
.demo-foot { margin: 1.1rem 0 0; font-size: .88rem; color: var(--ink-3); }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .demo { padding: .5rem 0 0; }
  .hero h1 { max-width: 12ch; }
}

/* Help strip ------------------------------------------------------------ */
.strip { background: var(--ink); color: var(--paper); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: 1rem 0; }
.strip p { margin: 0; }
.strip a { color: inherit; font-weight: 700; }
.strip .num { font: 700 1.1rem var(--display); white-space: nowrap; }

/* Sections -------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .4rem 0 0; color: var(--ink-2); }
.search { position: relative; width: min(100%, 360px); }
.search input { width: 100%; min-height: 50px; padding: .6rem 1rem .6rem 2.8rem; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.search svg { position: absolute; left: 1rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-3); }

/* Directory ------------------------------------------------------------- */
.directory { display: grid; gap: .5rem; }
.group { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 1rem 2.5rem; padding: 1.75rem 0; border-top: 1px solid var(--line); }
.group-head h3 { margin: 0 0 .3rem; }
.group-head p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.pills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .75rem; }
.pill { position: relative; display: flex; flex-direction: column; justify-content: center; gap: .15rem; min-height: 84px; padding: .9rem 3.6rem .9rem 1.6rem; border-radius: 44px; text-decoration: none; background: color-mix(in srgb, var(--accent, #1c7a74) 14%, var(--surface)); color: var(--ink); transition: background-color .15s; }
.pill:hover { background: color-mix(in srgb, var(--accent, #1c7a74) 28%, var(--surface)); }
.pill-name { font: 700 1.1rem/1.2 var(--display); letter-spacing: -.01em; }
.pill-meta { font-size: .9rem; color: var(--ink-2); }
.pill-go { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); transition: transform .2s; }
.pill:hover .pill-go { transform: rotate(90deg); }
.pill-go svg { width: 16px; height: 16px; }
.pill-done { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700; color: var(--ink-2); }

/* Category cards */
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.cat { display: flex; flex-direction: column; height: 100%; gap: .35rem; padding: 1.6rem 1.6rem 1.3rem; border-radius: 28px; text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border: 1.5px solid transparent; transition: border-color .15s, background-color .15s; }
.cat:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: var(--accent); }
.cat h3 { margin: 0 0 .1rem; }
.cat > p { margin: 0 0 .6rem; color: var(--ink-2); font-size: .95rem; }
.cat-list { list-style: none; margin: 0 0 1rem; padding: 0; font-size: .95rem; color: var(--ink-2); display: grid; gap: .15rem; }
.cat-list li { position: relative; padding-left: 1rem; }
.cat-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cat-go { margin-top: auto; font-weight: 700; font-size: .92rem; color: var(--accent); }
:root[data-theme="dark"] .cat-go, :root[data-theme="dark"] .cat-list li::before { filter: brightness(1.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-go, :root:not([data-theme="light"]) .cat-list li::before { filter: brightness(1.7); } }
.related a { background: color-mix(in srgb, var(--accent, #1c7a74) 16%, var(--surface)); }
.empty-search { padding: 2rem 0; color: var(--ink-2); }
@media (max-width: 760px) { .group { grid-template-columns: 1fr; } }

/* Steps / promise / faq ------------------------------------------------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { counter-increment: s; position: relative; padding-top: 3.8rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; font: 800 1.2rem var(--display); background: var(--dawn); color: #3b2414; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.4rem; left: 3.6rem; right: -1.2rem; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .steps li:not(:last-child)::after { display: none; } }
.promise { background: var(--surface); border-radius: var(--r-xl); padding: clamp(1.75rem, 4vw, 3.25rem); display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem 3rem; align-items: start; }
.promise dl { margin: 0; display: grid; gap: 1.25rem; }
.promise dt { font: 700 1.15rem var(--display); }
.promise dd { margin: .2rem 0 0; color: var(--ink-2); }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }
.faq > * { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; font: 700 1.12rem var(--display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; font-size: 1.6rem; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: .6rem; }

/* Page header (inner pages) -------------------------------------------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 18ch; }
.page-head h1[style*="--accent"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 8px; text-underline-offset: 12px; }
.page-head p { font-size: 1.15rem; color: var(--ink-2); }
.crumb { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; color: var(--ink-2); text-decoration: none; margin-bottom: 1.25rem; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 16px; height: 16px; }

/* Test intro ------------------------------------------------------------ */
.intro { display: grid; grid-template-columns: 1.3fr .9fr; gap: 2.5rem; align-items: start; padding-bottom: 4rem; }
.intro-facts { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.intro-facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: .45rem 1rem; font-weight: 700; font-size: .95rem; }
.aside { background: var(--surface); border-radius: var(--r-lg); padding: 1.5rem; border: 1px solid var(--line); }
.aside h3 { font-size: 1.1rem; }
.aside p { font-size: .95rem; color: var(--ink-2); }
.aside p:last-child { margin: 0; }
.resume { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: var(--r-md); background: var(--lagoon-soft); display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.resume p { margin: 0; flex: 1 1 14rem; }
@media (max-width: 820px) { .intro { grid-template-columns: 1fr; } }

/* Runner ---------------------------------------------------------------- */
.runner { max-width: 760px; margin: 0 auto; padding: 1.5rem 0 4rem; }
.run-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.run-count { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timer { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; padding: .3rem .8rem; border-radius: var(--r-pill); background: var(--sunk); }
.timer.low { background: var(--danger-soft); color: var(--danger); }
.track { height: 8px; border-radius: 8px; background: var(--sunk); overflow: hidden; margin-bottom: 2rem; }
.track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--lagoon), var(--sky), var(--dawn)); background-size: 760px 100%; transition: width .35s cubic-bezier(.2,.7,.2,1); }
.qcard { background: var(--surface); border-radius: var(--r-xl); padding: clamp(1.5rem, 4vw, 2.75rem); box-shadow: var(--shadow); }
.qcard.enter { animation: qin .32s cubic-bezier(.2,.7,.2,1); }
@keyframes qin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stem { color: var(--ink-2); margin-bottom: .6rem; font-size: 1rem; }
.qtext { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -.02em; }
.qtext:focus, [tabindex="-1"]:focus { outline: none; }
.opts { display: grid; gap: .6rem; }
.opts.grid4 { grid-template-columns: repeat(2, 1fr); }
.opt { display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 58px; padding: .7rem 1.1rem .7rem .75rem; text-align: left; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .12s, background-color .12s; font-weight: 700; }
.opt:hover { border-color: var(--lagoon); }
.opt .key { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.opt[aria-checked="true"] { border-color: var(--lagoon); background: var(--lagoon-soft); }
.opt[aria-checked="true"] .key { background: var(--lagoon); color: var(--lagoon-ink); border-color: var(--lagoon); }
.survey-run .opt:hover, .survey-run .opt[aria-checked="true"] { border-color: var(--plum); }
.survey-run .opt[aria-checked="true"] { background: var(--plum-soft); }
.survey-run .opt[aria-checked="true"] .key { background: var(--plum); border-color: var(--plum); color: #fff; }
.opt-visual { justify-content: flex-start; border-radius: var(--r-lg); min-height: 74px; }
.opt-visual svg { color: var(--ink); }
.run-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.run-hint { color: var(--ink-3); font-size: .9rem; margin: 0; }
.seq, .mx { display: flex; gap: .6rem; flex-wrap: wrap; margin: -0.5rem 0 1.5rem; color: var(--ink); }
.seq-cell, .mx-cell { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 16px; background: var(--sunk); }
.seq-q { font: 800 2rem var(--display); color: var(--ink-3); border: 2px dashed var(--line); background: transparent; }
.mx { display: grid; grid-template-columns: repeat(3, 76px); }
@media (max-width: 560px) {
  .opts.grid4 { grid-template-columns: 1fr; }
  .seq-cell { width: 56px; height: 56px; }
  .seq-cell svg { width: 42px; height: 42px; }
  .run-hint { display: none; }
}

/* Results --------------------------------------------------------------- */
.result { padding-bottom: 4rem; }
.result .page-head { padding-top: 1.5rem; }
.result-grid > div > * + * { margin-top: 1.5rem; }
.result-hero { border-radius: var(--r-xl); padding: clamp(1.75rem, 4.5vw, 3.25rem); background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.result-hero::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 90%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 22%, transparent), transparent); pointer-events: none; }
.result-hero > * { position: relative; }
.result-kicker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink-2); margin-bottom: .75rem; }
.tone-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); flex: none; }
.result-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 16ch; }
.result-hero .lead { font-size: 1.15rem; max-width: 60ch; }
.score-line { font: 700 1.15rem var(--display); margin: 1.5rem 0 .75rem; }
.score-line span { color: var(--ink-2); font-weight: 500; }
.scale { position: relative; margin: 0 0 .5rem; padding-top: 2.4rem; }
.scale-bar { display: flex; gap: 4px; height: 14px; }
.scale-bar span { border-radius: 8px; background: var(--seg); opacity: .35; }
.scale-bar span.on { opacity: 1; }
.scale-marker { position: absolute; top: 0; translate: -50% 0; display: flex; flex-direction: column; align-items: center; animation: slidein 1s cubic-bezier(.2,.7,.2,1) both; }
.scale-marker b { font: 800 .95rem var(--display); background: var(--ink); color: var(--paper); border-radius: var(--r-pill); padding: .15rem .6rem; white-space: nowrap; }
.scale-marker i { width: 2px; height: 14px; background: var(--ink); }
@keyframes slidein { from { left: 0; opacity: 0; } }
.scale-legend { display: flex; gap: 4px; font-size: .8rem; color: var(--ink-2); }
.scale-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.result-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.5rem; margin-top: 1.5rem; align-items: start; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); }
.panel + .panel { margin-top: 1.5rem; }
.panel h2 { font-size: 1.45rem; }
.panel ul { margin: 0; padding-left: 1.2rem; }
.panel li { margin-bottom: .55rem; }
.panel li::marker { color: var(--lagoon); }
@media (max-width: 860px) { .result-grid { grid-template-columns: 1fr; } }
.alert { border-radius: var(--r-lg); padding: 1.25rem 1.4rem; margin-bottom: 1.5rem; display: grid; gap: .5rem; }
.alert h2 { font-size: 1.3rem; margin: 0; }
.alert p { margin: 0; }
.alert-crisis { background: var(--danger-soft); border: 2px solid var(--danger); }
.alert-crisis h2 { color: var(--danger); }
.alert-medical { background: var(--warn-soft); border: 1.5px solid var(--t2); }
.subs { display: grid; gap: 1.1rem; }
.sub-row { display: grid; gap: .35rem; }
.sub-top { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; }
.sub-top span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meter { height: 10px; border-radius: 10px; background: var(--sunk); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 10px; background: var(--t0); }
.meter i.hit { background: var(--t2); }
.sub-note { font-size: .92rem; color: var(--ink-2); margin: 0; }
.sub-note a { font-weight: 700; color: var(--lagoon); }
.insights { display: grid; gap: .9rem; }
.insight { border-left: 4px solid var(--tone); padding: .2rem 0 .2rem 1rem; }
.insight h3 { font-size: 1.12rem; margin-bottom: .25rem; }
.insight p { margin: 0; color: var(--ink-2); }
.answers { margin: 0; display: grid; gap: .8rem; }
.answers div { display: grid; gap: .1rem; }
.answers dt { color: var(--ink-2); font-size: .92rem; }
.answers dd { margin: 0; font-weight: 700; }
.source { font-size: .88rem; color: var(--ink-3); margin-top: 1rem; }
.panel .related, .related { padding-left: 0; }
.related { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.related a { display: inline-block; padding: .5rem 1rem; border-radius: var(--r-pill); text-decoration: none; font-weight: 700; color: var(--ink); }
.consent { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1rem; }
.consent input { width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--plum); }

/* Help box -------------------------------------------------------------- */
.helpbox { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); padding: 1.4rem; }
.helpbox h2, .helpbox h3 { font-size: 1.25rem; margin-bottom: .75rem; }
.help-country { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: 1rem; }
.help-country label { font-weight: 700; }
.help-country select { min-height: 44px; padding: .4rem 2.2rem .4rem .9rem; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--paper); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236d7497' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.lines a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.1rem; border-radius: var(--r-md); background: var(--danger-soft); text-decoration: none; }
.lines a:hover { outline: 2px solid var(--danger); }
.lines .ln-name { font-weight: 700; }
.lines .ln-num { font: 800 1.2rem var(--display); color: var(--danger); white-space: nowrap; }
.emergency { margin: 1rem 0 0; font-size: .95rem; }
.global-link { margin: .75rem 0 0; font-size: .95rem; color: var(--ink-2); }

/* Results page ---------------------------------------------------------- */
.history { display: grid; gap: .75rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.hist { display: grid; grid-template-columns: 1fr minmax(8rem, 14rem) auto; gap: 1rem 1.5rem; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 1.1rem 1.4rem; border: 1px solid var(--line); }
.hist h3 { font-size: 1.15rem; margin: 0 0 .15rem; }
.hist p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.hist .tone-label { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
@media (max-width: 680px) { .hist { grid-template-columns: 1fr; } }
.empty { text-align: left; padding: 2.5rem; border-radius: var(--r-xl); background: var(--surface); border: 1.5px dashed var(--line); }

/* Prose pages ----------------------------------------------------------- */
.prose { max-width: 72ch; padding-bottom: 4rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose li { margin-bottom: .4rem; }
.sources { font-size: .95rem; color: var(--ink-2); }
.help-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: start; padding-bottom: 4rem; }
@media (max-width: 820px) { .help-grid { grid-template-columns: 1fr; } }
.help-steps { padding-left: 1.2rem; }
.help-steps li { margin-bottom: .75rem; }

/* Footer ---------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--ink-2); font-size: .95rem; }
.foot .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: flex-end; align-content: start; }
.foot nav a { font-weight: 700; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
@media (max-width: 680px) { .foot .wrap { grid-template-columns: 1fr; } .foot nav { justify-content: flex-start; } }

/* Motion & print -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .top, .foot, .strip, .result-actions, .skip, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .result-hero, .panel, .helpbox { box-shadow: none; border: 1px solid #ccc; }
  .scale-bar span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
