/* Dark theme for the research site. Chart colours were validated for colour-blind separation
   on --surface: star #3987e5, dust #d95926, archive limits #199e70. */
:root {
  --bg: #080d19; --surface: #0f1729; --surface-2: #152039; --plate: #050912;
  --ink: #eef1f6; --ink2: #b9c2d3; --muted: #8a95ab; --rule: #1e2a44;
  --accent: #9d8cff; --accent-soft: rgba(157, 140, 255, .14); --accent-line: rgba(157, 140, 255, .38); --link: #b8adff;
  --star: #3987e5; --dust: #d95926; --limit: #199e70;
  --climate: #4cc79a; --climate-soft: #0f2a20;
  --warn: #f2c14e; --warn-soft: #2a220c;
  --topbar-h: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 32px 48px; }
main.story { padding-top: 0; }
a { color: var(--link); }
p { margin: 0 0 14px; }
h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.06; margin: 0 0 14px; letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.18; margin: 56px 0 14px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }
code { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
figure { margin: 0; }
ul { margin: 0 0 12px; padding-left: 20px; }
li { margin-bottom: 6px; }

/* chrome */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(8, 13, 25, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; min-height: var(--topbar-h); padding-block: 8px; }
.brand { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; font-size: 17px; }
.topbar nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.topbar nav a { color: var(--ink2); text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar nav a:hover { color: var(--ink); }
.topbar nav a[aria-current="page"] { color: var(--accent); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); }
.sitefoot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.sitefoot .wrap { padding-block: 22px 40px; }
.preview-banner { background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--rule); }
.preview-banner .wrap { padding-block: 9px; }

/* scroll reveal: hidden only when JS runs, never for reduced motion */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.zoom { transform: scale(.94); }
.js .reveal.left { transform: translateX(-36px); }
.js .reveal.right { transform: translateX(36px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* hero */
.hero-band { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-band canvas.stars, .hero-band canvas.backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-band .wrap { position: relative; }
.home-hero .wrap { padding-block: 88px 72px; }
.story-hero { min-height: calc(100svh - var(--topbar-h)); display: flex; align-items: flex-end; }
.story-hero .wrap { padding-block: 64px 56px; width: 100%; }
.story-hero header { max-width: 860px; }
.story-hero .sub { font-size: clamp(18px, 2.6vw, 23px); color: var(--ink2); max-width: 720px; margin: 0 0 18px; }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: .1em; font-size: 13px; text-transform: uppercase; margin: 0 0 10px; }
.ids { color: var(--muted); margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.status { display: inline-block; margin-top: 16px; padding: 5px 12px; border-radius: 8px; line-height: 1.4; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; border: 1px solid var(--accent-line); }
.approval { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.approval.staged { color: var(--warn); font-weight: 600; }
.cue { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; color: var(--muted); font-size: 14px; text-decoration: none; }
.cue::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .cue::after { animation: none; } }
.lede { font-size: clamp(19px, 2.4vw, 23px); color: var(--ink2); max-width: 760px; margin: 0 0 8px; line-height: 1.5; }

/* chapters */
.chapter { padding-block: 40px 24px; }
.chapter > .wrap > h2:first-child, .chapter-head h2 { margin-top: 0; }
.chapter-head { max-width: 760px; margin-bottom: 28px; }
.chapter-num { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 8px; }
.prose { max-width: 720px; font-size: 18px; color: var(--ink2); }
.prose b { color: var(--ink); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }

/* key numbers */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 0; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 18px 16px; }
.tile .num { display: block; font-size: 32px; font-weight: 750; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile .num.hot { color: var(--accent); }
.tile .lab { display: block; margin-top: 6px; color: var(--ink2); font-size: 14.5px; line-height: 1.4; }

/* scrollytelling */
.scrolly { position: relative; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; }
.scrolly .graphic { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--topbar-h) + 16px); height: calc(100svh - var(--topbar-h) - 32px); display: flex; flex-direction: column; justify-content: center; }
.scrolly .steps { grid-column: 1; grid-row: 1; padding-block: 18vh 30vh; }
.step { min-height: 72svh; display: flex; align-items: center; }
.step .card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px 8px; opacity: .38; transition: opacity .5s, border-color .5s; }
.step.is-active .card { opacity: 1; border-color: #34466e; }
.step .card h3 { font-size: 19px; }
.step .card p { color: var(--ink2); }
.step .card p b { color: var(--ink); }
.no-js .step .card { opacity: 1; }

/* charts */
.chart-fig { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 14px 14px 10px; }
.chart-fig .chart-title { font-size: 15px; font-weight: 650; color: var(--ink); margin: 2px 4px 4px; }
.chart { position: relative; width: 100%; height: min(62svh, 520px); }
.chart.short { height: 300px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-fig figcaption { color: var(--muted); font-size: 13px; padding: 8px 4px 2px; }
.viz text { fill: var(--ink2); font: 12.5px/1 Inter, ui-sans-serif, system-ui, sans-serif; }
.viz .axis line, .viz .axis path { stroke: #2a3754; }
.viz .grid line { stroke: #1a2540; }
.viz .axis-title { fill: var(--muted); font-size: 12.5px; }
.viz .label { fill: var(--ink); font-weight: 600; font-size: 13.5px; }
.viz .label.big { font-size: 22px; font-weight: 750; }
.viz .label.muted { fill: var(--ink2); font-weight: 500; }
.viz .layer { opacity: 0; transition: opacity .7s ease; }
.viz .layer.on { opacity: 1; }
.viz .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.4, .1, .2, 1); }
.viz .layer.on .draw { stroke-dashoffset: 0; }
.viz .dim { opacity: .16; transition: opacity .7s; }
.viz .hit { fill: transparent; cursor: pointer; }
.viz .pop { transform-box: fill-box; transform-origin: center; transform: scale(.2); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.viz .layer.on .pop, .reveal.in .viz .pop { transform: scale(1); }
.viz .glow { filter: drop-shadow(0 0 6px rgba(240, 138, 75, .9)); }
@media (prefers-reduced-motion: reduce) {
  .viz .layer, .viz .draw, .viz .pop { transition: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 4px 0; font-size: 13px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.legend i.dot { width: 10px; height: 10px; border-radius: 50%; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: #1c2846; border: 1px solid #344670; color: var(--ink); border-radius: 10px; padding: 8px 11px; font-size: 13.5px; line-height: 1.45; max-width: 260px; box-shadow: 0 8px 28px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .15s; }
.tip.on { opacity: 1; }
.tip b { color: #fff; }
.tip .k { color: var(--muted); }

/* images */
.plate { background: var(--plate); border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); }
.plate img { display: block; width: 100%; height: auto; }
figcaption { color: var(--ink2); font-size: 15px; padding: 10px 2px 0; }
figcaption b { color: var(--ink); }
.credit { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.gallery .wide { grid-column: 1 / -1; }

/* checks */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; margin: 0; }
.checks .tick { width: 30px; height: 30px; border-radius: 50%; background: #0f2a20; color: var(--climate); display: grid; place-items: center; font-weight: 800; }
.checks p { margin: 2px 0 0; color: var(--ink2); font-size: 15.5px; }

/* cards and lists */
.domains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.domain { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 20px 12px; border-top: 4px solid var(--accent); }
.domain.climate { border-top-color: var(--climate); }
.domain h2 { margin: 0 0 6px; font-size: 22px; }
.domain h2 a { color: inherit; text-decoration: none; }
.count { color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 16px; }
.card-link { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color .25s, transform .25s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-link img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--plate); }
.card-link .body { padding: 14px 16px 16px; }
.card-link h3 { margin: 8px 0 6px; font-size: 19px; line-height: 1.3; }
.card-link p { margin: 0; color: var(--ink2); font-size: 15px; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--rule); border-radius: 12px; padding: 18px; margin-top: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent); }
.badge.climate { background: var(--climate-soft); color: var(--climate); }
.badge.staged { background: var(--warn-soft); color: var(--warn); }
.badge.plain { background: transparent; color: var(--muted); border: 1px solid var(--rule); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.principles section { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px 6px; }
.principles p { color: var(--ink2); font-size: 15.5px; }
.note { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 10px; padding: 16px 18px 6px; }
.callout { background: linear-gradient(135deg, #16213d, #1d1730); border: 1px solid #34466e; border-radius: 16px; padding: 24px 24px 12px; }
.callout h3 { color: var(--accent); font-size: 20px; }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: 13.5px; }

/* data downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dl { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px 12px; }
.dl.primary { border-color: var(--accent-line); background: linear-gradient(135deg, #18152e, #151d33); grid-column: 1 / -1; }
.dl h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 16px; margin: 0 0 4px; }
.dl h3 a { text-decoration: none; }
.dl h3 a:hover { text-decoration: underline; }
.fmt { font: 700 11.5px/1.6 ui-monospace, Menlo, monospace; color: var(--ink2); border: 1px solid var(--rule); border-radius: 6px; padding: 0 6px; }
.size { color: var(--muted); font-size: 13px; font-weight: 500; }
.dl p { margin: 0; color: var(--ink2); font-size: 14.5px; }
.dl details { margin-top: 10px; padding: 8px 10px; }
.dl details table { font-size: 12.5px; }
.dl details .tablewrap { margin-top: 8px; }
.cite-box { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; font-size: 15px; color: var(--ink2); }
.copy { margin-top: 10px; background: var(--surface-2); color: var(--ink); border: 1px solid #34466e; border-radius: 8px; padding: 6px 12px; font: 600 13.5px/1.2 inherit; cursor: pointer; }
.copy:hover { border-color: var(--accent); }

/* sources */
.muted { color: var(--muted); font-size: 13.5px; }
.sources { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--rule); }
.sources h3 { margin: 24px 0 10px; }
.refs { padding-left: 22px; font-size: 14.5px; }
.refs li { margin-bottom: 6px; overflow-wrap: anywhere; }
details { margin-top: 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; }
details summary { cursor: pointer; font-weight: 600; }
details p { font-size: 14px; color: var(--ink2); margin-top: 10px; }
.srcblock { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px 6px; margin-bottom: 14px; }
.srcblock h3 { margin-bottom: 4px; }
.srcblock p { font-size: 15px; }

@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .domains, .principles, .split, .gallery { grid-template-columns: 1fr; }
  .split { gap: 24px; }
  /* scrolly on phones: the chart stays pinned at the top, step cards slide over the lower half */
  .scrolly { display: block; }
  .scrolly .graphic { position: sticky; top: var(--topbar-h); height: calc(100svh - var(--topbar-h)); justify-content: flex-start; padding-top: 10px; z-index: 1; }
  .scrolly .steps { position: relative; z-index: 2; margin-top: calc(-100svh + var(--topbar-h)); padding-block: 62svh 30svh; pointer-events: none; }
  .step { min-height: 85svh; align-items: flex-end; }
  .step .card { pointer-events: auto; background: rgba(15, 23, 41, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 1; }
  .step:not(.is-active) .card { opacity: .5; }
  .chart { height: 46svh; }
  .chart.short { height: 260px; }
}
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--rule); padding: 6px 0; }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 4px 12px; }
  table.stack td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
  .tile .num { font-size: 27px; }
  .topbar nav { gap: 2px 14px; }
  .topbar nav a { font-size: 14px; }
}
.downloads { align-items: start; }
.dl details table { width: auto; white-space: nowrap; }
.dl details td, .dl details th { padding: 5px 10px; }

/* ---------- reader view toggle ---------- */
.viewtoggle { display: inline-flex; margin-top: 22px; background: var(--surface); border: 1px solid #2a3a5e; border-radius: 999px; padding: 4px; gap: 2px; }
.viewtoggle a { padding: 7px 16px; border-radius: 999px; color: var(--ink2); text-decoration: none; font-weight: 650; font-size: 14.5px; }
.viewtoggle a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.viewtoggle a:not([aria-current]):hover { color: var(--ink); }
.disclaimer { display: block; margin-top: 8px; }

/* ---------- scroll-drawn scenes (everyone view) ---------- */
.scene-intro { max-width: 760px; padding-top: 72px; }
.scrub { position: relative; height: 620svh; }
.scrub.short { height: 400svh; }
.scrub .stage { position: sticky; top: var(--topbar-h); height: calc(100svh - var(--topbar-h)); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.scrub .canvas { position: relative; height: min(78svh, 640px); }
.scrub .canvas svg { width: 100%; height: 100%; display: block; overflow: visible; }
.scrub figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.scrub figure .canvas { flex: 1; }
.scene-credit { color: var(--muted); font-size: 12px; padding: 4px 0 0; }
.scene-credit .credit { margin: 0; font-size: 12px; }
.caps { position: relative; min-height: 260px; }
.cap { position: absolute; inset: 0 auto auto 0; width: 100%; opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; pointer-events: none; }
.cap.on { opacity: 1; transform: none; pointer-events: auto; }
.cap h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 0 0 10px; letter-spacing: -.01em; }
.cap p { font-size: clamp(17px, 1.8vw, 20px); color: var(--ink2); line-height: 1.55; }
.cap p b { color: var(--ink); }
.cap .big { display: block; font-size: clamp(44px, 7vw, 76px); font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -.02em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.no-js .scrub, .scrub.static { height: auto; }
.no-js .scrub .stage, .scrub.static .stage { position: relative; top: 0; height: auto; padding-block: 24px; }
.no-js .caps, .scrub.static .caps { min-height: 0; }
.no-js .cap, .scrub.static .cap { position: static; opacity: 1; transform: none; margin-bottom: 18px; }
.scrub.static .canvas { height: 60svh; }

/* chalk drawing style */
.sketch text, .sketch .hand { font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; }
.sketch .chalk { fill: none; stroke: #ece6d6; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.sketch .chalk.thin { stroke-width: 1.5; }
.sketch .chalk.warm { stroke: #f08a4b; }
.sketch .chalk.cool { stroke: #6ea6f0; }
.sketch .note { fill: #ece6d6; font-size: 24px; }
.sketch .note.warm { fill: #f5a06a; }
.sketch .note.cool { fill: #8dbaf5; }
.sketch .note.small { font-size: 19px; fill: #c9c2b0; }
.sketch .fadein { opacity: 0; }

/* plain-language panels */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 20px; }
.fact .ic { font-size: 30px; line-height: 1; display: block; margin-bottom: 10px; }
.fact h3 { font-size: 19px; margin-bottom: 6px; }
.fact p { color: var(--ink2); font-size: 16px; margin: 0; }
.cta { margin: 64px auto 24px; text-align: center; max-width: 640px; }
.cta a.button { display: inline-block; margin-top: 12px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 999px; }
.cta a.button:hover { background: var(--accent); color: #fff; }
.mini-sources { color: var(--muted); font-size: 14px; border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 48px; }

@media (max-width: 860px) {
  .scrub .stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; padding-bottom: 14px; }
  .scrub .canvas { height: auto; min-height: 0; }
  .scrub figure { order: 1; min-height: 0; }
  .caps { order: 2; min-height: 200px; background: rgba(15, 23, 41, .94); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px 2px; }
  .cap { inset: 14px auto auto 16px; width: calc(100% - 32px); }
  .no-js .cap, .scrub.static .cap { width: auto; }
  .cap h3 { font-size: 22px; }
  .cap p { font-size: 16.5px; }
  .cap .big { font-size: 44px; }
  .sketch .note { font-size: 21px; }
  .sketch .note.small { font-size: 17px; }
  .facts { grid-template-columns: 1fr; }
}

/* per-area colour (from site.json) and reader notices */
.domain { border-top-color: var(--area, var(--accent)); }
.badge.area { color: var(--area); background: color-mix(in srgb, var(--area) 16%, transparent); }
.area-notice { margin: 16px 0 6px; max-width: 760px; background: var(--warn-soft); border: 1px solid #5a4716; color: #f6dc9a; border-radius: 10px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.hero-band.glow { background:
  radial-gradient(60% 70% at 80% 25%, color-mix(in srgb, var(--area) 20%, transparent), transparent 70%),
  radial-gradient(50% 60% at 10% 90%, color-mix(in srgb, var(--area) 9%, transparent), transparent 70%), var(--bg); }

/* never let a drawing that runs past its frame widen the page */
html, body { overflow-x: clip; }
.scrub .canvas { overflow: clip; overflow-clip-margin: 24px; }

/* ---------- violet accent on the dark theme (#9d8cff, 7:1 on the background) ---------- */
body { background:
  radial-gradient(1100px 520px at 88% -8%, rgba(157, 140, 255, .075), transparent 62%),
  radial-gradient(900px 480px at -10% 105%, rgba(157, 140, 255, .04), transparent 60%), var(--bg);
  background-attachment: fixed; }
::selection { background: rgba(157, 140, 255, .38); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { text-decoration-color: rgba(232, 149, 122, .45); text-underline-offset: 2px; }
a:hover { color: #d2caff; text-decoration-color: currentColor; }
.topbar { border-bottom-color: transparent; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--rule), rgba(157, 140, 255, .55) 50%, var(--rule)); }
.brand::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px; vertical-align: 1px;
  border: 2.5px solid var(--accent); border-radius: 50%; box-shadow: 4px 4px 0 -2.5px var(--accent); }
.topbar nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 2px; }
.status { border-color: var(--accent-line); }
.viewtoggle { border-color: var(--accent-line); }
.viewtoggle a[aria-current="page"] { background: var(--accent); color: #120f24; }
.cta a.button { background: var(--accent); color: #120f24; }
.cta a.button:hover { background: #b8adff; color: #120f24; }
.copy { border-color: var(--accent-line); }
.copy:hover { background: var(--accent); color: #120f24; }
.card-link:hover, .dl:hover { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(157, 140, 255, .18), 0 10px 30px rgba(157, 140, 255, .08); }
.step.is-active .card { border-color: var(--accent-line); }
.dl.primary { border-color: var(--accent-line); }
.note { border-left-color: var(--accent); }
.checks .tick { background: rgba(157, 140, 255, .14); color: var(--accent); }
html { scrollbar-color: #3b3431 transparent; }

/* cards: the title link covers the card; credit links sit above it */
.card-link h3 a.stretch { color: inherit; text-decoration: none; }
.card-link h3 a.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link .credit a { position: relative; z-index: 2; }

/* simple home page: title, one line, a list of findings */
.home-hero.simple { min-height: 0; }
.home-hero.simple .wrap { padding-block: 104px 44px; max-width: 860px; }
.home-hero.simple .lede { max-width: 640px; }
.home-hero.simple h1 { margin-bottom: 10px; }
.home-list { padding-block: 8px 64px; max-width: 860px; }
.flist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.flist li { border-bottom: 1px solid var(--rule); }
.flist a { display: grid; grid-template-columns: 92px 1fr; gap: 4px 20px; padding: 22px 4px; color: inherit; text-decoration: none; transition: background .2s; }
.flist a:hover { background: rgba(157, 140, 255, .05); }
.flist a:hover .fl-title { color: var(--accent); }
.fl-area { grid-row: 1 / span 2; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--area); padding-top: 4px; }
.fl-title { font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); transition: color .2s; }
.fl-sum { color: var(--ink2); font-size: 15.5px; line-height: 1.5; }
.fl-staged { font-size: 12px; font-weight: 600; color: #f2c14e; border: 1px solid rgba(242, 193, 78, .45); border-radius: 999px; padding: 1px 8px; margin-left: 8px; vertical-align: 2px; }
.home-areas { margin-top: 26px; color: var(--ink2); }
.footnav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; }
.footnav a { color: var(--ink2); font-weight: 600; text-decoration: none; }
.footnav a:hover { color: var(--ink); }
.footnav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 560px) {
  .flist a { grid-template-columns: 1fr; padding: 18px 2px; }
  .fl-area { grid-row: auto; padding-top: 0; }
}
