/* HL Intel client site. One accent (blue), calm neutrals, system fonts. Colours follow the dataviz reference
   palette (validated: blue #2a78d6 / red #e34948 pair passes every check on the light surface). */
:root {
  color-scheme: light;
  --plane: #f6f6f3;
  --surface: #ffffff;
  --surface-1: #fcfcfb;
  --surface-2: #f3f3ef;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #6b6a65;
  --muted: #898781;
  --hair: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-strong: #1c5cab;
  --accent-deep: #184f95;
  --accent-wash: #eef4fc;
  --accent-track: #cde2fb;
  --neg: #e34948;
  --deemph: #a9a8a1;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --good-wash: #e8f5e8;
  --warning-wash: #fdf4de;
  --critical-wash: #fbeaea;
  --neutral-wash: #efefeb;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 2px 8px rgba(11, 11, 11, 0.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--plane); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; outline: none; }
img, svg { max-width: 100%; }
a { color: var(--accent-strong); text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 0.9em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: 0.2em 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 0.08em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); padding: 12px; border-radius: var(--radius-s); overflow-x: auto; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--hair); margin: 24px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.xsmall { font-size: 0.8rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; }

/* skip link */
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-s); z-index: 100; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; }
.brand-text { font-size: 1rem; }
.brand-sub { color: var(--ink-2); font-weight: 400; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 8px 12px; border-radius: var(--radius-s); text-decoration: none; color: var(--ink-2); font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-wash); }

/* footer */
.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--border); padding: 20px 0 28px; font-size: 0.875rem; color: var(--ink-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-disclaimer strong { color: var(--ink); }

/* page scaffolding */
.page { padding-top: 28px; }
.page-head { margin-bottom: 24px; max-width: 820px; }
.page-head p { color: var(--ink-2); font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 650; color: var(--ink-2); margin: 0 0 6px; }
.breadcrumb { font-size: 0.9rem; margin-bottom: 12px; color: var(--ink-2); }
.breadcrumb a { color: var(--ink-2); }
.section { margin-top: 36px; }
.section > h2 { margin-bottom: 4px; }
.section-lede { color: var(--ink-2); margin-bottom: 14px; max-width: 820px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
:not(.grid) > .card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: 12px; }

/* states */
.state { padding: 48px 0; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.state-error { display: block; background: var(--critical-wash); border: 1px solid rgba(208, 59, 59, 0.35); color: var(--ink); border-radius: var(--radius); padding: 18px 20px; margin: 28px 0; overflow-wrap: anywhere; }
.state-error h1 { font-size: 1.25rem; }
.state-error p:last-child { margin-bottom: 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--hair); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } html { scroll-behavior: auto; } }

/* hero / answer */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.answer-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.answer-q { color: var(--ink-2); font-size: 1rem; margin-bottom: 14px; }
.hero-figure { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 3.6rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 8px; }
.hero-figure .from { color: var(--ink-2); font-weight: 500; }
.hero-figure .arrow { color: var(--muted); font-weight: 400; padding: 0 0.12em; }
.hero-figure .to { white-space: nowrap; }
.hero-sub { font-size: 1.15rem; margin-bottom: 6px; }
.hero-sub strong { font-weight: 650; }
.hero-range { color: var(--ink-2); margin-bottom: 14px; }
.know { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.know h2 { font-size: 1.05rem; margin-bottom: 12px; }
.know ol { list-style: none; padding: 0; margin: 0; counter-reset: know; }
.know li { position: relative; padding-left: 40px; margin: 0 0 14px; counter-increment: know; }
.know li:last-child { margin-bottom: 0; }
.know li::before { content: counter(know); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-strong); font-weight: 700; display: grid; place-items: center; font-size: 0.9rem; }
.know-title { display: block; font-weight: 650; }
.know-text { display: block; color: var(--ink-2); font-size: 0.93rem; }

/* callouts and banners */
.callout { border-left: 4px solid var(--accent); background: var(--accent-wash); padding: 12px 16px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 14px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 650; display: block; margin-bottom: 2px; }
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; border: 1px solid; }
.banner p { margin: 0; }
.banner p + p { margin-top: 6px; }
.banner-icon { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; color: #fff; margin-top: 1px; }
.banner-warn { background: var(--warning-wash); border-color: rgba(250, 178, 25, 0.6); }
.banner-warn .banner-icon { background: var(--warning); color: var(--ink); }
.banner-critical { background: var(--critical-wash); border-color: rgba(208, 59, 59, 0.4); }
.banner-critical .banner-icon { background: var(--critical); }
.banner-info { background: var(--accent-wash); border-color: rgba(42, 120, 214, 0.35); }
.banner-info .banner-icon { background: var(--accent); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-s); border: 1px solid var(--accent-strong); background: var(--accent-strong); color: #fff; font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--accent-deep); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--accent-strong); border-color: var(--axis); }
.btn-secondary:hover { background: var(--accent-wash); color: var(--accent-deep); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.copy-btn { font: inherit; font-size: 0.8rem; padding: 3px 9px; border-radius: 5px; border: 1px solid var(--axis); background: var(--surface); color: var(--ink-2); cursor: pointer; line-height: 1.3; white-space: nowrap; }
.copy-btn:hover { background: var(--surface-2); color: var(--ink); }
.copy-btn.is-done { border-color: var(--good); color: var(--ink); }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.addr { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr-full { font-family: var(--mono); font-size: 0.92rem; overflow-wrap: anywhere; word-break: break-all; }
.ext::after { content: " ↗"; font-size: 0.85em; }
.icon-link { text-decoration: none; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.icon-link:hover { background: var(--accent-wash); }
.addr.nowrap { flex-wrap: nowrap; }
.scroll-hint { display: none; font-size: 0.82rem; color: var(--ink-2); margin: 0 0 6px; }

/* status badges: colour + icon + text, never colour alone */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.02em; border: 1px solid transparent; white-space: nowrap; color: var(--ink); line-height: 1.6; }
.badge-icon { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.66rem; font-weight: 800; color: #fff; line-height: 1; }
.badge-VERIFIED { background: var(--good-wash); border-color: rgba(12, 163, 12, 0.35); }
.badge-VERIFIED .badge-icon { background: var(--good); }
.badge-PARTIAL { background: var(--warning-wash); border-color: rgba(250, 178, 25, 0.6); }
.badge-PARTIAL .badge-icon { background: var(--warning); color: var(--ink); }
.badge-UNVERIFIED { background: var(--critical-wash); border-color: rgba(208, 59, 59, 0.35); }
.badge-UNVERIFIED .badge-icon { background: var(--critical); }
.badge-INSUFFICIENT_DATA, .badge-unknown { background: var(--neutral-wash); border-color: var(--axis); }
.badge-INSUFFICIENT_DATA .badge-icon, .badge-unknown .badge-icon { background: var(--muted); }
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hair); font-size: 0.8rem; color: var(--ink-2); margin: 2px 4px 2px 0; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 7px; border-radius: 4px; background: var(--accent); color: #fff; vertical-align: 1px; margin-left: 6px; }
.passfail { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.passfail .badge-icon { width: 18px; height: 18px; font-size: 0.7rem; }
.pass .badge-icon { background: var(--good); }
.fail .badge-icon { background: var(--critical); }

.status-legend { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin: 0; padding: 0; list-style: none; }
.status-legend li { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 10px 12px; font-size: 0.9rem; color: var(--ink-2); }
.status-legend .badge { margin-bottom: 4px; }

/* stat tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.tile-label { font-size: 0.85rem; color: var(--ink-2); margin: 0 0 4px; }
.tile-value { font-size: 1.6rem; font-weight: 680; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 4px; overflow-wrap: anywhere; }
.tile-note { font-size: 0.8rem; color: var(--ink-2); margin: 0; }
.tile-value.untrusted, .untrusted { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: rgba(208, 59, 59, 0.75); }
.tile-value.untrusted { font-size: 1.35rem; }
.funnel { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); align-items: stretch; counter-reset: step; }
.funnel .tile { position: relative; }
.funnel .tile-value { font-size: 1.9rem; }

/* key/value lists */
dl.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--ink-2); font-size: 0.9rem; }
dl.kv dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; }
@media (max-width: 480px) { dl.kv { grid-template-columns: 1fr; gap: 0; } dl.kv dd { margin-bottom: 8px; } }

/* tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
caption { text-align: left; padding: 10px 12px 4px; font-weight: 600; color: var(--ink); caption-side: top; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
thead th { background: var(--surface-1); color: var(--ink-2); font-weight: 600; font-size: 0.82rem; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-highlight > * { background: var(--accent-wash); }
tr.is-highlight > :first-child { box-shadow: inset 4px 0 0 var(--accent); }
th[aria-sort] { padding: 0; }
.sort-btn { font: inherit; color: inherit; font-weight: 600; background: none; border: 0; padding: 8px 12px; width: 100%; text-align: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
th.num .sort-btn { justify-content: flex-end; }
.sort-btn:hover { color: var(--ink); background: var(--surface-2); }
.sort-ind { font-size: 0.75em; color: var(--muted); width: 1em; display: inline-block; }
.reason { display: block; font-size: 0.78rem; color: var(--ink-2); white-space: normal; text-align: right; min-width: 150px; }
td.wrap-text { min-width: 220px; }

/* collapsible sections */
details.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 12px; }
details.panel > summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; position: relative; border-radius: var(--radius); }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: ""; position: absolute; right: 22px; top: 22px; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform 0.15s; }
details.panel[open] > summary::after { transform: rotate(-135deg); top: 26px; }
details.panel > summary:hover { background: var(--surface-1); }
.panel-title { display: block; font-size: 1.12rem; font-weight: 650; margin: 0; }
.panel-sum { display: block; color: var(--ink-2); font-size: 0.93rem; margin-top: 2px; }
.panel-body { padding: 4px 20px 20px; border-top: 1px solid var(--hair); }
.panel-body > :first-child { margin-top: 16px; }
.panel-body h3 { margin-top: 22px; }
.panel-tools { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
details.more { margin-top: 10px; }
details.more > summary { cursor: pointer; color: var(--accent-strong); font-weight: 500; padding: 4px 0; }
details.more[open] > summary { margin-bottom: 8px; }

/* finding cards (behaviour) */
.finding { border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 12px 14px; background: var(--surface-1); }
.finding h4 { margin-bottom: 4px; }
.finding p { margin: 0 0 4px; font-size: 0.93rem; }
.verdict { display: inline-block; font-size: 0.78rem; font-weight: 650; padding: 1px 8px; border-radius: 4px; background: var(--neutral-wash); color: var(--ink); margin-top: 4px; }
.verdict.sig { background: var(--accent-wash); color: var(--accent-deep); }

/* plain lists with + / − markers */
.pm { list-style: none; padding: 0; margin: 0; }
.pm li { padding-left: 26px; position: relative; margin: 6px 0; }
.pm li::before { position: absolute; left: 0; top: 0.05em; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; }
.pm li.plus::before { content: "+"; background: var(--good-wash); color: #006300; }
.pm li.minus::before { content: "−"; background: var(--critical-wash); color: #a12a2a; }
.pm li.neutral::before { content: "?"; background: var(--neutral-wash); color: var(--ink-2); }
.pm .aside { display: block; font-size: 0.82rem; color: var(--ink-2); }

/* score meters */
.meter-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) 56px; gap: 12px; align-items: center; margin: 8px 0; }
.meter { height: 10px; background: var(--accent-track); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.is-na { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, var(--hair) 4px, var(--hair) 6px); }
@media (max-width: 480px) { .meter-row { grid-template-columns: 1fr 48px; } .meter-row .meter { grid-column: 1 / -1; grid-row: 2; } }

/* wallet cards */
.wallet-card { display: flex; flex-direction: column; gap: 10px; }
.wallet-card h2 { font-size: 1.15rem; margin: 0; }
.wallet-card h2 a { color: var(--ink); text-decoration: none; }
.wallet-card h2 a:hover { color: var(--accent-strong); text-decoration: underline; }
.wallet-card .role { color: var(--ink-2); font-size: 0.92rem; margin: 0; }
.wallet-card .card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.wallet-card dl.kv { font-size: 0.93rem; padding-top: 10px; border-top: 1px solid var(--hair); }
.wallet-card .card-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.wallet-card .card-note { font-size: 0.85rem; color: var(--ink-2); background: var(--surface-1); border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 8px 10px; margin: 0; }

/* nav cards on home */
.nav-card { display: block; text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
.nav-card:hover { color: var(--ink); border-color: var(--accent); box-shadow: 0 2px 12px rgba(42, 120, 214, 0.12); }
.nav-card h3 { color: var(--accent-strong); margin-bottom: 4px; }
.nav-card p { color: var(--ink-2); margin: 0; font-size: 0.93rem; }
.nav-card .go { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--accent-strong); font-size: 0.9rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 12px 14px 12px 50px; position: relative; margin: 0; font-size: 0.93rem; color: var(--ink-2); }
.steps li strong { color: var(--ink); display: block; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent-strong); font-weight: 700; font-size: 0.82rem; display: grid; place-items: center; }

/* charts */
figure.chart { margin: 0; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow); min-width: 0; }
.chart-title { font-weight: 650; font-size: 1rem; margin: 0 0 2px; }
.chart-sub { font-size: 0.86rem; color: var(--ink-2); margin: 0 0 10px; }
.chart-box { position: relative; width: 100%; touch-action: pan-y; }
.chart-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-2); margin: 0 0 8px; padding: 0; list-style: none; }
.chart-legend li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.key-line { width: 18px; height: 0; border-top: 2px solid; border-radius: 2px; display: inline-block; }
.key-rect { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key-band { width: 14px; height: 12px; display: inline-block; background: rgba(227, 73, 72, 0.10); border-left: 1px solid rgba(227, 73, 72, 0.5); border-right: 1px solid rgba(227, 73, 72, 0.5); }
.key-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px var(--surface); }
.chart-foot { font-size: 0.82rem; color: var(--ink-2); margin: 10px 0 0; }
.chart-hint { font-size: 0.78rem; color: var(--ink-2); margin: 6px 0 0; }
.tick text, .axis-label { fill: var(--ink-2); font-size: 11.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.grid-line { stroke: var(--hair); stroke-width: 1; shape-rendering: crispEdges; }
.base-line { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.ref-line { stroke: var(--ink-2); stroke-width: 1; stroke-opacity: 0.55; shape-rendering: crispEdges; }
.ref-label { fill: var(--ink-2); font-size: 11px; }
.s-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.s-accent { stroke: var(--accent); }
.s-deemph { stroke: var(--deemph); }
.s-area { fill: var(--accent); fill-opacity: 0.10; stroke: none; }
.dd-band { fill: var(--neg); fill-opacity: 0.08; }
.dd-edge { stroke: var(--neg); stroke-opacity: 0.45; stroke-width: 1; }
.mark-dot { stroke: var(--surface); stroke-width: 2; }
.mark-low { fill: var(--neg); }
.mark-end { fill: var(--accent); }
.mark-label { fill: var(--ink); font-size: 12px; font-weight: 600; }
.mark-label-sub { fill: var(--ink-2); font-size: 11px; }
.halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.xhair { stroke: var(--ink-2); stroke-width: 1; stroke-opacity: 0.6; pointer-events: none; shape-rendering: crispEdges; }
.xhair-dot { stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.bar-pos { fill: var(--accent); }
.bar-neg { fill: var(--neg); }
.bar-deemph { fill: var(--deemph); }
.bar-hit { fill: transparent; cursor: default; }
.bar-g.is-hover .bar-hit { fill: var(--ink); fill-opacity: 0.05; }
.bar-g.is-hover .bar-pos, .bar-g.is-hover .bar-neg, .bar-g.is-hover .bar-deemph { filter: brightness(1.12); }
.bar-label { fill: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-label-sub { fill: var(--ink-2); font-size: 11px; }
.bar-name { fill: var(--ink); font-size: 12.5px; }
.bar-name.is-strong { font-weight: 650; }
.tooltip { position: absolute; top: 0; left: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(11, 11, 11, 0.12); border-radius: 8px; padding: 8px 10px; font-size: 0.82rem; min-width: 150px; max-width: 260px; z-index: 5; opacity: 0; transition: opacity 0.08s; }
.tooltip.is-on { opacity: 1; }
.tt-date { color: var(--ink-2); margin-bottom: 4px; font-size: 0.78rem; }
.tt-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tt-key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tt-val { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tt-note { color: var(--ink-2); font-size: 0.76rem; margin-top: 4px; }

/* methodology */
.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px 16px; margin: 0; }
.glossary div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 10px 14px; }
.glossary dt { font-weight: 650; }
.glossary dd { margin: 2px 0 0; color: var(--ink-2); font-size: 0.93rem; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--axis); text-decoration: none; font-size: 0.9rem; background: var(--surface); }
.toc a:hover { background: var(--accent-wash); }
.md > p, .md > ul, .md > ol { max-width: 920px; }
.md h2 { font-size: 1.45rem; margin-top: 8px; }
.md h3 { font-size: 1.15rem; margin-top: 28px; }
.md h4, .md h5, .md h6 { font-size: 1rem; margin-top: 20px; }
.md li { margin: 6px 0; }
.md .table-wrap { margin: 10px 0 18px; }
.md table { font-size: 0.86rem; }
.md td { min-width: 90px; }
.doc { margin-top: 28px; }

/* small screens */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .header-inner { min-height: 0; gap: 6px; }
  .brand-sub { display: none; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: 2px 0; }
  .site-nav a { padding: 5px 9px; font-size: 0.88rem; white-space: nowrap; }
  .site-header { position: static; }
  html { scroll-padding-top: 12px; }
  .page { padding-top: 18px; }
  .card, .answer-card, .know, .chart-card { padding: 16px 14px; }
  details.panel > summary { padding: 14px 44px 14px 14px; }
  .panel-body { padding: 4px 14px 16px; }
  th, td { padding: 7px 9px; }
  .tile-value { font-size: 1.4rem; }
  .scroll-hint { display: block; }
}

@media print {
  .site-header, .site-nav, .copy-btn, .btn-row, .panel-tools, .skip-link { display: none !important; }
  details.panel { box-shadow: none; }
  body { background: #fff; }
}

@media (forced-colors: active) {
  .badge, .chip, .tag, .verdict { border: 1px solid CanvasText; }
  .meter > span { background: Highlight; }
}
