/* =============================================================================
   AI Adoption Atlas — styles
   Family look shared with The Engagement Atlas: warm paper, berry accent,
   serif headlines, restrained editorial layout, full dark mode.
   ========================================================================== */
:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
  /* data palette — colour-blind-safe (distinct in hue AND lightness) */
  --c-use: var(--cp-accent);
  --c-plan: var(--cp-warning);
  --c-none: var(--cp-border);
  --c-dot: var(--cp-text-soft);
  --c-trust: var(--cp-link);
  --c-distrust: var(--cp-warning);
  --c-fav: var(--cp-success);
  --c-cat1: var(--cp-accent); --c-cat2: var(--cp-link); --c-cat3: var(--cp-warning); --c-cat4: var(--cp-success); --c-cat5: var(--cp-text-soft); --c-cat6: var(--cp-danger); --c-cat7: var(--cp-border-strong);
  --serif: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --sans: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  --mast-h: 60px;
  --pad: clamp(20px, 5vw, 64px);
}
html[data-theme="dark"], .chapter-night {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--mast-h) + 12px); -webkit-text-size-adjust: 100%; }
html.reduced-motion { scroll-behavior: auto; }
body { margin: 0; background: var(--cp-bg); color: var(--cp-text); font-family: var(--sans); line-height: 1.6; font-size: 16px; transition: background-color .4s ease, color .4s ease; }
::selection { background: var(--cp-highlight); color: var(--cp-text); }
a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--cp-accent); }
a:hover { color: var(--cp-accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 3px; border-radius: 4px; }
svg :focus-visible { outline: none; }
em { font-style: italic; color: var(--cp-accent); }
.muted { color: var(--cp-text-muted); }
.small { font-size: 13px; }
.missing { color: var(--cp-text-soft); border-bottom: 1px dotted currentColor; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -80px; background: var(--cp-surface); padding: 12px 16px; z-index: 100; border-radius: 8px; box-shadow: var(--cp-shadow); }
.skip:focus { top: 16px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }
.eyebrow { text-transform: uppercase; letter-spacing: .17em; font-size: 11px; font-weight: 700; color: var(--cp-text-muted); margin: 0 0 8px; }

/* ---------------------------------- masthead -------------------------------- */
.masthead { position: fixed; inset: 0 0 auto 0; z-index: 40; background: color-mix(in srgb, var(--cp-bg) 82%, transparent); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--cp-border); }
.masthead-inner { height: var(--mast-h); display: flex; align-items: center; gap: 24px; padding: 0 var(--pad); max-width: 1600px; margin: 0 auto; }
.brand { text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .16em; white-space: nowrap; }
.brand-symbol { color: var(--cp-accent); margin-right: 10px; font-size: 18px; vertical-align: -2px; }
.chapter-nav { margin-left: auto; }
.chapter-nav ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.chapter-nav a { --p: 0; position: relative; display: flex; align-items: baseline; gap: 6px; padding: 8px 9px; text-decoration: none; font-size: 12px; color: var(--cp-text-muted); border-radius: 6px; transition: color .2s ease, background-color .2s ease; }
.chapter-nav a::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 3px; height: 2px; background: var(--cp-accent); transform-origin: left; transform: scaleX(var(--p)); opacity: .35; }
.chapter-nav a[aria-current="location"] { color: var(--cp-text); }
.chapter-nav a[aria-current="location"]::after { opacity: 1; }
.chapter-nav a:hover { color: var(--cp-accent); background: var(--cp-accent-soft); }
.nav-n { font: 10px var(--mono); color: var(--cp-accent); }
.nav-current { display: none; font: 12px var(--mono); color: var(--cp-text-muted); margin-left: auto; white-space: nowrap; }
.theme-button { font-size: 12px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--cp-border-strong); background: transparent; cursor: pointer; }
.theme-button:hover { border-color: var(--cp-accent); color: var(--cp-accent); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress-bar { height: 100%; background: var(--cp-accent); transform-origin: left; transform: scaleX(0); }
@media (max-width: 1080px) { .nav-label { display: none; } .chapter-nav a { padding: 8px 7px; } }
@media (max-width: 760px) { .chapter-nav { display: none; } .nav-current { display: block; } .masthead-inner { gap: 12px; } .brand { font-size: 11px; letter-spacing: .12em; } }

/* --------------------------------- fixture badge ---------------------------- */
.fixture-badge { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px); padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--cp-text); border: 1.5px dashed var(--c-plan); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c-plan) 16%, var(--cp-bg)) 0 8px, var(--cp-bg) 8px 16px); box-shadow: var(--cp-shadow); }
.fixture-badge .fb-icon { color: var(--c-plan); }
.fixture-badge .fb-detail { font-weight: 400; color: var(--cp-text-muted); font-size: 11px; }
.chart-badge { position: absolute; top: 12px; right: 12px; z-index: 3; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--c-plan); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c-plan) 18%, var(--cp-bg-elevated)) 0 6px, var(--cp-bg-elevated) 6px 12px); color: var(--cp-text); cursor: help; }
.stage .chart-badge, .stage-panel .chart-badge { top: calc(var(--mast-h) + 14px); right: var(--pad); }
.stage-panel { position: absolute; inset: 0; pointer-events: none; }
.stage-panel .chart-badge { pointer-events: auto; }

/* ------------------------------ scrolly (00–01) ----------------------------- */
.scrolly { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0;
  background: radial-gradient(1200px 700px at 75% 40%, color-mix(in srgb, var(--cp-accent) 6%, transparent), transparent 70%), var(--cp-bg); }
#field { position: absolute; inset: 0; display: block; touch-action: pan-y; }
.stage-overlay { position: absolute; inset: 0; pointer-events: none; }
.stage-legend { position: absolute; left: var(--grid-left, 50%); top: calc(var(--grid-top, 20%) - 44px); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--cp-text-muted); opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.stage-legend b { color: var(--cp-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.stage-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.stage-legend i { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }
.lg.use i { background: var(--c-use); } .lg.plan i { background: var(--c-plan); } .lg.none i { background: var(--c-none); }
.lg.ring i { border: 2px solid var(--c-use); background: transparent; }
.grid-frame { position: absolute; left: calc(var(--grid-left, 50%) - 12px); right: calc(var(--grid-right, 5%) - 12px); top: calc(var(--grid-top, 20%) - 12px); bottom: calc(var(--grid-bottom, 20%) - 12px); border: 1.5px dashed var(--cp-border-strong); border-radius: 10px; opacity: 0; transition: opacity .6s ease; }
.grid-frame-label { position: absolute; right: 12px; bottom: -11px; padding: 0 8px; background: var(--cp-bg); font: 11px var(--mono); color: var(--cp-text-muted); }
.stage.is-grid .stage-legend { opacity: 1; transform: none; }
.stage.is-break .grid-frame { opacity: 1; }
.year-ticker { position: absolute; left: var(--grid-left, 50%); top: calc(100% - var(--grid-bottom, 20%) + 22px); display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.stage.is-grid .year-ticker { opacity: 1; pointer-events: auto; }
.yt { font: 12px var(--mono); padding: 5px 10px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--cp-text-muted); cursor: pointer; }
.yt:hover { border-color: var(--cp-border-strong); }
.yt[aria-pressed="true"] { background: var(--cp-text); color: var(--cp-bg); }
.tick-break { color: var(--cp-accent); font-weight: 700; padding: 0 6px; }

.steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: var(--mast-h) var(--pad) 0; }
.step:last-child { min-height: 130vh; }
.step-card, .hero-card { pointer-events: auto; }
.step-card { width: min(400px, 38vw); background: var(--cp-panel); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--cp-border); border-left: 3px solid var(--cp-accent); border-radius: 4px 14px 14px 4px; padding: 26px 28px; box-shadow: var(--cp-shadow); opacity: .35; transform: translateY(16px); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.step.is-active .step-card { opacity: 1; transform: none; }
.step-title { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 12px; }
.step-body { margin: 0 0 16px; color: var(--cp-text-muted); font-size: 15px; }
.step-body strong { color: var(--c-use); }
.step-stat { margin: 0; display: flex; align-items: baseline; gap: 10px; border-top: 1px solid var(--cp-border); padding-top: 12px; }
.step-stat strong { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; color: var(--c-use); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.step-stat span { font-size: 12px; color: var(--cp-text-muted); }
.step-break .step-card { border-left-style: dashed; }
.break-flag { font: 11px var(--mono); color: var(--cp-accent); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 8px; }
.chapter-label { font: 12px var(--mono); color: var(--cp-accent); margin: 0 0 14px; display: flex; align-items: center; gap: 12px; letter-spacing: .02em; }
.chapter-label::after { content: ""; width: 40px; height: 1px; background: var(--cp-accent); }

.step-hero { align-items: center; }
.hero-card { max-width: 820px; padding: 0 0 6vh; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 140px); line-height: .94; letter-spacing: -.045em; margin: 18px 0 26px; }
.hero-title em { display: block; font-style: italic; color: var(--cp-accent); }
.standfirst { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; letter-spacing: -.015em; max-width: 640px; margin: 0 0 22px; }
.hero-note { border-left: 2px solid var(--cp-accent); padding-left: 18px; color: var(--cp-text-muted); font-size: 14px; max-width: 460px; margin: 0 0 32px; background: color-mix(in srgb, var(--cp-bg) 70%, transparent); }
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--cp-accent); padding-bottom: 6px; }
.cue-arrow { color: var(--cp-accent); display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.hero-card > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-card > *:nth-child(2) { animation-delay: .08s; } .hero-card > *:nth-child(3) { animation-delay: .18s; } .hero-card > *:nth-child(4) { animation-delay: .28s; } .hero-card > *:nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* --------------------------------- chapters --------------------------------- */
.chapter { position: relative; padding: clamp(80px, 12vh, 140px) 0; border-top: 1px solid var(--cp-border); background: var(--cp-bg); }
.chapter-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: 40px; }
.chapter-head .chapter-label { grid-column: 1 / -1; margin: 0; }
.chapter-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -.035em; margin: 0; }
.dek { margin: 0; color: var(--cp-text-muted); font-size: 16px; max-width: 560px; }
.chapter-tint { background: var(--cp-bg-elevated); }
.chapter-night { background: radial-gradient(900px 500px at 70% 30%, var(--cp-accent-soft), transparent 70%), var(--cp-bg-elevated); color: var(--cp-text); border-top: 0; }
.chapter-night .panel { background: var(--cp-panel); }
.provisional { grid-column: 1 / -1; justify-self: start; margin: 4px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cp-text); padding: 5px 12px; border-radius: 999px; border: 1px dashed var(--cp-border-strong); }

.panel { position: relative; border: 1px solid var(--cp-border); border-radius: 16px; background: var(--cp-bg-elevated); padding: clamp(18px, 2.4vw, 32px); }
.analysis-note { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-left: 2px solid var(--cp-accent); color: var(--cp-text-muted); font-size: 13px; }
.load-error { margin: 120px auto; max-width: 720px; padding: 24px; color: var(--cp-danger); border: 1px solid var(--cp-border); }
.panel.is-fixture { padding-top: 56px; border-style: dashed; border-color: color-mix(in srgb, var(--c-plan) 60%, var(--cp-border)); }
.panel-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
.panel-main { min-width: 0; }
.panel-h { font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -.01em; margin: 0 0 12px; line-height: 1.25; }
.followup-panel { margin-top: 32px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--cp-text-muted); }
.field select { min-height: 38px; border-radius: 10px; border: 1px solid var(--cp-border-strong); background: var(--cp-bg); padding: 6px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--cp-border-strong); background: transparent; font-size: 13px; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, opacity .2s ease; }
.chip small { color: var(--cp-text-muted); font-size: 11px; }
.chip[aria-pressed="false"] { opacity: .55; }
.chip[aria-pressed="false"] .chip-swatch { background: transparent !important; }
.chip:hover { border-color: var(--cp-accent); }
.chip-swatch { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--sc); background: var(--sc); display: inline-block; flex: none; }
.s-use { --sc: var(--c-use); } .s-trust { --sc: var(--c-trust); } .s-distrust { --sc: var(--c-distrust); } .s-fav { --sc: var(--c-fav); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--cp-surface-soft); border: 1px solid var(--cp-border); }
.seg-btn { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font-size: 13px; cursor: pointer; color: var(--cp-text-muted); transition: background-color .2s ease, color .2s ease; }
.seg-btn:hover { color: var(--cp-text); }
.seg-btn[aria-pressed="true"] { background: var(--cp-text); color: var(--cp-bg); }
.segmented.small .seg-btn { padding: 5px 10px; font-size: 12px; }
.chart-host { position: relative; width: 100%; min-height: 120px; }
.chart-host svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-caption { color: var(--cp-text-muted); font-size: 12px; margin: 14px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--cp-text-muted); margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-item .swatch { width: 22px; height: 3px; background: var(--mc); border-radius: 2px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-line { width: 24px; height: 0; border-top: 3px solid var(--cp-text-muted); display: inline-block; border-radius: 2px; }
.pull { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; letter-spacing: -.015em; max-width: 880px; margin: 48px 0 0; padding-left: 24px; border-left: 3px solid var(--cp-accent); }
.data-details { margin-top: 28px; border-top: 1px solid var(--cp-border); padding-top: 12px; }
.data-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--cp-text-muted); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; color: var(--cp-text-muted); margin-bottom: 8px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--cp-border); padding: 8px 10px; text-align: left; vertical-align: top; }
.data-details > div { overflow-x: auto; }

/* --------------------------------- svg basics -------------------------------- */
svg text { font-family: var(--sans); fill: var(--cp-text-muted); font-size: 12px; }
svg .tick { font-size: 11px; font-variant-numeric: tabular-nums; }
svg .tick-year { font: 12px var(--mono); fill: var(--cp-text); }
svg .tick-year.is-b { fill: var(--cp-accent); }
svg .grid-line { stroke: var(--cp-border); stroke-width: 1; }
svg .axis-note { font-size: 11px; font-style: italic; }
svg .axis-title { font-size: 12px; fill: var(--cp-text); font-weight: 600; }

/* ------------------------------- ch2 trust chart ----------------------------- */
.series .line { fill: none; stroke: var(--sc); stroke-width: 3.2; stroke-linecap: round; }
.series .ribbon { fill: var(--sc); fill-opacity: .16; }
.series .pt { fill: var(--cp-bg-elevated); stroke: var(--sc); stroke-width: 2.4; transition: r .2s ease; }
.series .pt.is-active { fill: var(--sc); r: 7; }
.series .pt-b { stroke-dasharray: 3 2; }
.series .whisker { stroke: var(--sc); stroke-width: 2; opacity: .6; }
.hatch-bg { fill: transparent; }
.hatch-line { stroke: var(--cp-accent); stroke-width: 1.4; opacity: .28; }
.gap-wedge { stroke: none; }
.gap-label { font-family: var(--serif); font-style: italic; font-size: 15px; fill: var(--cp-accent); paint-order: stroke; stroke: var(--cp-bg-elevated); stroke-width: 4px; }
.series-break line { stroke: var(--cp-accent); stroke-width: 1.5; stroke-dasharray: 5 5; }
.series-break text { font: 10px var(--mono); fill: var(--cp-accent); text-transform: uppercase; letter-spacing: .1em; }
.end-label .end-name { fill: var(--sc); font-weight: 700; font-size: 13px; }
.end-label .end-pop { font-size: 11px; }
.scrubber line { stroke: var(--cp-text); stroke-width: 1.2; stroke-dasharray: 2 3; }
.scrub-chip rect { fill: var(--cp-text); }
.scrub-chip text { fill: var(--cp-bg); font: 12px var(--mono); }
.scrub-handle { fill: var(--cp-accent); stroke: var(--cp-bg-elevated); stroke-width: 3; cursor: grab; transition: r .15s ease; }
.scrub-handle:hover, .scrub-handle:focus { r: 13; }
.scrub-handle:focus-visible { stroke: var(--cp-text); stroke-width: 3; }
.scrub-overlay { fill: transparent; cursor: ew-resize; }
svg.is-dragging .scrub-handle { cursor: grabbing; }
.readout { border-left: 1px solid var(--cp-border); padding-left: 28px; display: flex; flex-direction: column; gap: 16px; }
.ro-year { font-family: var(--serif); font-size: 56px; line-height: 1; letter-spacing: -.03em; }
.ro-b { font: 11px var(--mono); color: var(--cp-accent); vertical-align: middle; border: 1px dashed var(--cp-accent); border-radius: 999px; padding: 2px 8px; letter-spacing: 0; }
.ro-row { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: start; }
.ro-row .chip-swatch { margin-top: 6px; }
.ro-label { display: block; font-size: 13px; color: var(--cp-text-muted); }
.ro-label small { font-size: 11px; }
.ro-val { display: block; font-family: var(--serif); font-size: 36px; line-height: 1.05; color: var(--sc); font-variant-numeric: tabular-nums; }
.ro-row.is-na .ro-val { font-size: 22px; color: var(--cp-text-soft); }
.ro-ci { display: block; font-size: 11px; color: var(--cp-text-muted); font-variant-numeric: tabular-nums; }
.ro-gap { margin-top: 4px; padding: 14px 16px; border-radius: 12px; background: var(--cp-accent-soft); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.ro-gap strong { font-family: var(--serif); font-weight: 400; font-size: 28px; color: var(--cp-accent); }

/* ---------------------------- ch3 experience chart -------------------------- */
#exp-chart svg.s-trust { --sc: var(--c-trust); } #exp-chart svg.s-distrust { --sc: var(--c-distrust); } #exp-chart svg.s-fav { --sc: var(--c-fav); }
.col-head { font: 12px var(--mono); fill: var(--cp-text); }
.row-head { font-family: var(--serif); font-size: 17px; fill: var(--cp-text); }
.row-head .row-sub { font-family: var(--sans); font-size: 11px; fill: var(--cp-text-muted); }
.waffle { cursor: default; outline: none; }
.waffle-hit { fill: transparent; stroke: transparent; transition: fill .2s ease; }
.waffle:hover .waffle-hit, .waffle:focus .waffle-hit { fill: var(--cp-accent-soft); stroke: var(--cp-border-strong); }
.waffle .dot { fill: var(--cp-border); }
.waffle .dot.on { fill: var(--sc); }
.cell-val { font-family: var(--serif); font-size: 18px; fill: var(--cp-text); }
.cell-ci { font-size: 10px; }
.ridge-area { fill: var(--sc); }
.ridge-line { fill: none; stroke: var(--sc); stroke-width: 2; }
.ridge-base { stroke: var(--cp-border-strong); stroke-width: 1; }
.ridge-val { font-size: 11px; fill: var(--cp-text); font-variant-numeric: tabular-nums; }
.gap-note { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 0; font-size: 13px; color: var(--cp-text-muted); }
.gap-note strong { color: var(--cp-accent); font-family: var(--serif); font-size: 17px; font-weight: 400; }

/* ------------------------------ ch4 segments -------------------------------- */
.orbit { fill: none; stroke: var(--cp-border-strong); stroke-dasharray: 2 6; opacity: .7; }
.orbit-inner { opacity: .35; }
.orbit-core { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .2em; fill: var(--cp-text-soft); }
.sdot { transition: opacity .3s ease; stroke: var(--cp-bg-elevated); stroke-width: .6; }
.sdot.is-dim { opacity: .18; }
.seg-label { transition: opacity .3s ease; pointer-events: none; }
.seg-label.is-dim { opacity: .35; }
.seg-label-name { font-family: var(--serif); font-size: 15px; fill: var(--cp-text); paint-order: stroke; stroke: var(--cp-bg-elevated); stroke-width: 4px; }
.seg-label-share { font: 11px var(--mono); paint-order: stroke; stroke: var(--cp-bg-elevated); stroke-width: 4px; }
.seg-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.seg-item { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--cp-border); background: transparent; cursor: pointer; font-size: 13px; transition: border-color .2s ease, background-color .2s ease; }
.seg-item:hover, .seg-item[aria-pressed="true"] { border-color: var(--seg); background: color-mix(in srgb, var(--seg) 12%, transparent); }
.seg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--seg); }
.seg-share { font: 11px var(--mono); color: var(--cp-text-muted); }
.profile { border-left: 1px solid var(--cp-border); padding-left: 28px; }
.profile-name { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 10px; color: var(--cp-text); }
#seg-profile .profile-name { color: var(--seg); }
.profile-share { font-size: 13px; color: var(--cp-text-muted); margin: 0 0 12px; }
.profile-share strong { font-family: var(--serif); font-size: 26px; font-weight: 400; color: var(--cp-text); }
.profile-desc { font-size: 14px; margin: 0 0 18px; }
.pbar { margin: 0 0 12px; }
.pbar-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 4px; }
.pbar-line b { font-variant-numeric: tabular-nums; }
.pbar-track { height: 6px; border-radius: 4px; background: var(--cp-surface-soft); overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 4px; background: var(--seg, var(--cp-accent)); transition: width .6s cubic-bezier(.2,.7,.2,1); }

/* ------------------------------ ch5 models ---------------------------------- */
.m-logit { --mc: var(--c-trust); } .m-gbm { --mc: var(--c-use); } .m-rf { --mc: var(--c-plan); } .m-other { --mc: var(--c-cat5); }
.fs-note { font-size: 12px; margin: -6px 0 14px; min-height: 1em; }
.duel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.matter-band { fill: var(--cp-accent-soft); stroke: var(--cp-accent); stroke-dasharray: 3 3; stroke-opacity: .5; }
.matter-label { font-size: 11px; font-style: italic; fill: var(--cp-accent); }
.baseline-line { stroke: var(--c-trust); stroke-width: 1.5; stroke-dasharray: 4 3; }
.mname { font-size: 13px; fill: var(--cp-text); font-weight: 600; }
.mpill { font: 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; fill: var(--c-trust); }
.mwhisk { stroke: var(--mc); stroke-width: 3; stroke-linecap: round; opacity: .45; }
.mdot { fill: var(--mc); stroke: var(--cp-bg-elevated); stroke-width: 2.5; }
.mval { font: 14px var(--mono); fill: var(--cp-text); }
.mrow { cursor: default; }
.verdict { border-left: 1px solid var(--cp-border); padding-left: 24px; }
.verdict-num span { display: block; font-size: 12px; color: var(--cp-text-muted); }
.verdict-num strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.verdict-num.is-pass strong { color: var(--c-use); } .verdict-num.is-fail strong { color: var(--cp-text); }
.verdict-num small { display: block; font: 12px var(--mono); color: var(--cp-text-muted); }
.verdict-text { font-size: 14px; margin: 14px 0 0; }
.model-grid { display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); gap: 40px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--cp-border); }
.calib-host { max-width: 440px; }
.diag { stroke: var(--cp-text-soft); stroke-dasharray: 4 4; }
.cal-line { fill: none; stroke: var(--mc); stroke-width: 2.5; }
.cal-pt { fill: var(--mc); stroke: var(--cp-bg-elevated); stroke-width: 1.5; }
.cal-whisk { stroke: var(--mc); opacity: .45; stroke-width: 2; }
.shap-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.shap-head .panel-h { margin: 0; }
.slabel { font-size: 13px; fill: var(--cp-text); }
.strack { fill: var(--cp-surface-soft); }
.sbar { fill: var(--mc); }
.swhisk { stroke: var(--cp-text); stroke-width: 1.4; }
.srank { font: 11px var(--mono); }

/* ------------------------------ ch6 network --------------------------------- */
.net-host { border-radius: 16px; background: radial-gradient(600px 400px at 50% 50%, var(--cp-sheen), transparent 70%); }
.nlink { stroke: var(--cp-text-soft); stroke-opacity: .35; stroke-linecap: round; transition: stroke-opacity .25s ease, stroke .25s ease; }
.nnode { cursor: pointer; outline: none; transition: opacity .25s ease; }
.nhalo { fill: transparent; stroke: var(--cp-accent); stroke-width: 2; opacity: 0; transition: opacity .2s ease; }
.ncirc { stroke: var(--cp-bg-elevated); stroke-width: 1.5; }
.nnode:focus-visible .nhalo, .nnode.is-focus .nhalo { opacity: 1; }
.nlabel { font-size: 12px; fill: var(--cp-text); paint-order: stroke; stroke: var(--cp-bg-elevated); stroke-width: 4px; pointer-events: none; }
svg.is-isolating .nnode:not(.is-on) { opacity: .14; }
svg.is-isolating .nlink { stroke-opacity: .06; }
svg.is-isolating .nlink.is-on { stroke: var(--cp-accent); stroke-opacity: .9; }
.partners { list-style: none; padding: 0; margin: 8px 0 16px; }
.partners li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 0; border-bottom: 1px solid var(--cp-border); font-size: 13px; }
.partners b { font: 13px var(--mono); color: var(--cp-accent); }
.partners small { grid-column: 1 / -1; font: 11px var(--mono); color: var(--cp-text-muted); }

/* ------------------------------ ch7 limits ---------------------------------- */
.caveats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 36px; margin-bottom: 56px; }
.caveat { border-top: 2px solid var(--cp-accent); padding-top: 18px; }
.caveat-n { font: 11px var(--mono); color: var(--cp-accent); display: block; margin-bottom: 14px; }
.caveat h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 8px; letter-spacing: -.01em; }
.caveat p { margin: 0; font-size: 14px; color: var(--cp-text-muted); }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; border-top: 1px solid var(--cp-border-strong); padding-top: 32px; }
.method-list { margin: 0; padding-left: 20px; color: var(--cp-text-muted); font-size: 14px; }
.method-list li { margin-bottom: 10px; }
.attribution { font-size: 14px; color: var(--cp-text-muted); }
.attribution a, .source-links a { color: var(--cp-accent); }
.source-links { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: 14px; }

.footer { border-top: 1px solid var(--cp-border-strong); padding: 48px 0 96px; background: var(--cp-bg); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-name { font-family: var(--serif); font-size: 30px; letter-spacing: -.02em; margin: 0 0 6px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 0; align-self: center; }
.footer-links a { font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--cp-accent); padding-bottom: 4px; }
.footer-links a span { color: var(--cp-accent); }

.tooltip { position: fixed; z-index: 60; pointer-events: none; max-width: 300px; padding: 10px 14px; background: var(--cp-surface); color: var(--cp-text); border: 1px solid var(--cp-border-strong); border-radius: 10px; font-size: 12px; line-height: 1.5; box-shadow: var(--cp-shadow); }
.noscript { padding: 24px var(--pad); }

/* -------------------------------- reveals ----------------------------------- */
html.js .reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
html.js .reveal-up.is-in { opacity: 1; transform: none; }
.caveats .reveal-up:nth-child(3n+2) { transition-delay: .08s; } .caveats .reveal-up:nth-child(3n) { transition-delay: .16s; }

/* ------------------------------- responsive --------------------------------- */
@media (max-width: 1080px) {
  .panel-split, .duel-grid { grid-template-columns: 1fr; }
  .readout, .profile, .verdict { border-left: 0; padding-left: 0; border-top: 1px solid var(--cp-border); padding-top: 20px; }
  .readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .ro-year { grid-column: 1 / -1; }
  .ro-gap { grid-column: 1 / -1; }
  .model-grid { grid-template-columns: 1fr; }
  .caveats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .chapter-head { grid-template-columns: 1fr; margin-bottom: 28px; }
  .step { align-items: flex-end; padding: var(--mast-h) 14px 7vh; }
  .step-card { width: 100%; padding: 18px 20px; }
  .step-title { font-size: 24px; }
  .step-body { font-size: 14px; margin-bottom: 10px; }
  .step-stat strong { font-size: 34px; }
  .step-hero { align-items: center; padding-bottom: 0; }
  .hero-card { padding-bottom: 0; }
  .hero-note { background: color-mix(in srgb, var(--cp-bg) 82%, transparent); }
  .stage-legend { top: calc(var(--grid-top, 20%) - 38px); left: 7%; right: 7%; gap: 4px 12px; font-size: 11px; }
  .year-ticker { left: 7%; top: calc(100% - var(--grid-bottom, 50%) + 10px); }
  .yt { padding: 4px 8px; font-size: 11px; }
  .panel { border-radius: 14px; }
  .caveats, .method-grid { grid-template-columns: 1fr; gap: 28px; }
  .ro-year { font-size: 44px; }
  .ro-val { font-size: 30px; }
  .verdict-num strong { font-size: 42px; }
  .fixture-badge { left: auto; right: 8px; bottom: 8px; padding: 6px 12px; font-size: 11px; max-width: 70vw; }
  .panel.is-fixture { padding-top: clamp(18px, 2.4vw, 32px); }
  .fixture-badge .fb-detail { display: none; }
  .chart-badge { position: static; display: inline-block; margin-bottom: 10px; }
  .stage .chart-badge { position: absolute; top: calc(var(--mast-h) + 8px); right: 12px; }
  .chip { font-size: 12px; padding: 6px 10px; }
  .chip small { display: none; }
}

/* ---------------------------- reduced motion -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
html.reduced-motion *, html.reduced-motion *::before, html.reduced-motion *::after { animation: none !important; transition: none !important; }
html.reduced-motion .reveal-up { opacity: 1; transform: none; }
html.reduced-motion .step-card { opacity: 1; transform: none; }

/* --------------------------------- print ------------------------------------ */
@media print {
  :root, html[data-theme="dark"], .chapter-night { color-scheme: light; }
  body { background: var(--cp-bg); color: var(--cp-text); font-size: 11pt; }
  .masthead, .skip, .tooltip, .scroll-cue, .year-ticker, #field, .stage-overlay, .scrub-handle, .scrubber, .seg-list, .controls, .theme-button { display: none !important; }
  .fixture-badge { position: static; display: inline-flex !important; margin: 12px; box-shadow: none; }
  .fixture-badge[hidden] { display: none !important; }
  .stage { position: relative; height: auto; min-height: 0; background: none; }
  .steps { margin-top: 0; }
  .step { min-height: 0 !important; padding: 12pt 0; display: block; }
  .step-card { opacity: 1 !important; transform: none !important; width: auto; box-shadow: none; backdrop-filter: none; background: var(--cp-surface); }
  #adoption-table.sr-only, #adoption-table { position: static !important; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; margin: 0 0 12pt; }
  .hero-title { font-size: 48pt; }
  .chapter { padding: 18pt 0; page-break-inside: auto; border-top: 1px solid var(--cp-border); }
  .chapter-night { background: var(--cp-bg) !important; color: var(--cp-text); }
  .ncirc { stroke: var(--cp-bg); } .nlabel { stroke: var(--cp-bg); fill: var(--cp-text); }
  .panel, .caveat, figure { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
  .reveal-up { opacity: 1 !important; transform: none !important; }
  .chart-host g[clip-path] { clip-path: none !important; }
  .waffle .dot.on { opacity: 1 !important; }
  .end-labels { opacity: 1 !important; }
  .data-details { display: block; }
  .data-details > div { display: block !important; }
  .footer { padding-bottom: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: var(--cp-text-muted); word-break: break-all; }
  .footer-links a::after, .source-links a::after { content: " (" attr(href) ")"; }
}
