/* Swarmchasing site styles. One sheet for every page; colours are tokens on
   :root with a selected dark set (not an automatic flip). The page CSP allows
   this file only: no inline styles anywhere.

   Breakpoints: three widths, and every width query uses one of them (CSS
   cannot name them, so they are written out; the page scripts that ask
   for a width use the same numbers):
     phone    max-width: 720px   (min-width: 721px above it)  one column,
              cards for tables, the header in two rows, folded figures
     tablet   max-width: 960px   (min-width: 961px above it)  the workbench
              steps through its panes, docs drop the side navigation
     laptop   max-width: 1260px  (min-width: 1261px above it)  the workbench
              puts context under its panes, docs drop the table of contents
   Other queries are about the device, not the width: hover, reduced
   motion, colour scheme, a short screen (max-height) and print. */

:root {
  color-scheme: light;
  --surface-0: #f6f5f2;
  --surface-1: #fcfcfb;
  --surface-2: #f0efec;
  --border: #dddcd6;
  /* Form controls' edges: 3:1 or more on every surface (WCAG 1.4.11). */
  --control-border: #85837c;
  --hairline: rgba(11, 11, 11, 0.10);
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #6d6c66;
  --axis: #76746e;
  --grid: #e7e6e1;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-strong: #1c5cab;
  --on-accent: #ffffff;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --pause: rgba(82, 81, 78, 0.10);
  --band: rgba(98, 80, 214, 0.18);
  --band-line: #6250d6;
  --critical: #c0322f;
  --serious: #b0501e;
  /* Tiers: apart in lightness as well as hue (about 2:1 between them in
     both themes), each at least 4.5:1 on every surface. Marks add a shape
     cue: significant is filled, suggestive a ring around a light tint. */
  --tier-sig: #7a1a1a;
  --tier-sug: #a64d0a;
  --warning: #fab219;
  --good: #0ca30c;
  --good-ink: #006300;
  --code-bg: #efeee9;
  --q1: #cde2fb; --q2: #9ec5f4; --q3: #5598e7; --q4: #256abf; --q5: #104281;
  --q-ink-light: #0b0b0b; --q-ink-dark: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 10px;
  --scroll-shade: rgba(11, 11, 11, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-0: #0f0f0e;
    --surface-1: #1a1a19;
    --surface-2: #232321;
    --border: #33332f;
    --control-border: #75736c;
    --hairline: rgba(255, 255, 255, 0.10);
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #9a998f;
    --axis: #898781;
    --grid: #2c2c2a;
    --accent: #3987e5;
    --accent-ink: #86b6ef;
    --accent-strong: #3987e5;
    --on-accent: #0b0b0b;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --pause: rgba(195, 194, 183, 0.10);
    --band: rgba(144, 133, 233, 0.22);
    --band-line: #9085e9;
    --critical: #ef6b6b;
    --serious: #ec835a;
    --tier-sig: #ee6868;
    --tier-sug: #f5c773;
    --good-ink: #34b934;
    --code-bg: #262624;
    --q1: #1b3150; --q2: #184f95; --q3: #256abf; --q4: #5598e7; --q5: #9ec5f4;
    --q-ink-light: #f0efec; --q-ink-dark: #0b0b0b;
    --shadow: none;
    --scroll-shade: rgba(240, 239, 236, 0.16);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-0: #0f0f0e;
  --surface-1: #1a1a19;
  --surface-2: #232321;
  --border: #33332f;
  --control-border: #75736c;
  --hairline: rgba(255, 255, 255, 0.10);
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #9a998f;
  --axis: #898781;
  --grid: #2c2c2a;
  --accent: #3987e5;
  --accent-ink: #86b6ef;
  --accent-strong: #3987e5;
  --on-accent: #0b0b0b;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --pause: rgba(195, 194, 183, 0.10);
  --band: rgba(144, 133, 233, 0.22);
  --band-line: #9085e9;
  --critical: #ef6b6b;
  --serious: #ec835a;
  --tier-sig: #ee6868;
  --tier-sug: #f5c773;
  --good-ink: #34b934;
  --code-bg: #262624;
  --q1: #1b3150; --q2: #184f95; --q3: #256abf; --q4: #5598e7; --q5: #9ec5f4;
  --q-ink-light: #f0efec; --q-ink-dark: #0b0b0b;
  --shadow: none;
  --scroll-shade: rgba(240, 239, 236, 0.16);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--surface-0); color: var(--text-primary);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-wrap: break-word;
}
main { flex: 1; outline: none; }
/* main is also .wrap, whose shorthand padding would zero these. */
main, main.wrap { padding-top: 28px; padding-bottom: 56px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1640px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
h2 { font-size: 19px; line-height: 1.3; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
/* Monospace for code and for fields that hold records, logs or JSON
   (`.mono`); prose fields and controls use the page's font. */
code, pre, .mono { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; font-size: 13px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: break-word; }
@media (min-width: 721px) { td code { white-space: nowrap; } }
pre { overflow-x: auto; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.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; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 20; background: var(--surface-1); padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); }
.skip:focus { top: 8px; }
.hint { color: var(--text-muted); font-size: 13px; margin: 4px 0 8px; font-weight: normal; }
.warn { color: var(--text-primary); border-left: 3px solid var(--serious); padding-left: 8px; }
.note { color: var(--text-secondary); border-left: 3px solid var(--accent); padding-left: 8px; }
.nowrap { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Header / footer ──────────────────────────────────────────────────── */
.site-head { background: var(--surface-1); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-primary); text-decoration: none; white-space: nowrap; font-size: 16px; }
.brand-mark { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--accent) 0 30%, transparent 32%), radial-gradient(circle at 70% 60%, var(--serious) 0 22%, transparent 24%), radial-gradient(circle at 40% 78%, var(--critical) 0 16%, transparent 18%); border: 1px solid var(--border); }
.brand[aria-current="page"] { color: var(--text-primary); }
.site-nav { flex: 1; min-width: 0; }
.site-nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 16px 10px 14px; color: var(--text-secondary); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 14px; }
.site-nav a:hover { color: var(--text-primary); }
.site-nav a[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 600; }
/* Report a swarm: the one action in the nav, set apart from the menus. */
.site-nav .nav-report { margin-left: auto; }
.site-nav .nav-report a { color: var(--accent-ink); font-weight: 600; }
.theme-toggle { flex: none; position: relative; width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; color: var(--text-secondary); }
/* The icon shows the look now: a sun for light, a moon for dark (site.js
   sets data-look). Before site.js runs it is a half-filled disc. A small
   "A" in the corner marks a look that follows the system (data-auto). */
.theme-toggle span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-toggle[data-look="light"] span {
  width: 8px; height: 8px; border: 0; background: currentColor;
  box-shadow: 0 -7px 0 -2.5px currentColor, 0 7px 0 -2.5px currentColor, 7px 0 0 -2.5px currentColor, -7px 0 0 -2.5px currentColor,
    5px 5px 0 -2.5px currentColor, -5px -5px 0 -2.5px currentColor, 5px -5px 0 -2.5px currentColor, -5px 5px 0 -2.5px currentColor;
}
.theme-toggle[data-look="dark"] span { width: 15px; height: 15px; border: 0; background: transparent; box-shadow: inset -5px -3px 0 0 currentColor; transform: translateX(-2px) rotate(-20deg); }
.theme-toggle[data-auto="true"]::after {
  content: "A"; content: "A" / ""; position: absolute; right: 2px; bottom: 1px; font: 700 9px/1 system-ui, sans-serif; color: var(--text-secondary);
}
.site-foot { border-top: 1px solid var(--border); background: var(--surface-1); color: var(--text-muted); font-size: 13px; padding: 20px 0; }
.site-foot p { margin: 4px 0; }
/* The header and footer keep one edge on every page, the wide pages'
   (workbench, docs), so the brand and nav never move between pages. */
.site-head > .wrap, .site-foot > .wrap { max-width: 1640px; }
/* Report a swarm's second link: on phones it joins the brand's row. */
.head-report { display: none; }
@media (max-width: 720px) {
  /* Not sticky on phones: it would cover the workbench's step bar and
     take a quarter of the screen. Two rows: the brand, Report a swarm and
     the theme; then the nav. */
  .site-head { position: static; }
  .head-row { flex-wrap: wrap; gap: 0 12px; }
  .brand { padding: 12px 0 4px; }
  .head-report {
    display: inline-flex; align-items: center; min-height: 32px; margin: 6px 0 0 auto;
    color: var(--accent-ink); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  }
  .head-report[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .theme-toggle { margin-top: 6px; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 8px; }
  .site-nav .nav-report { display: none; }
  .site-nav a { padding: 8px 9px 10px; }
}

/* ── Controls ─────────────────────────────────────────────────────────── */
button, .button {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.3;
}
button:hover:not(:disabled), .button:hover { border-color: var(--axis); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
/* A control waiting on the engine says so with aria-busy. */
button[aria-busy="true"], button:disabled[aria-busy="true"] { cursor: progress; }
button.primary, .button.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); font-weight: 600; }
.button.ghost { border-color: transparent; background: none; color: var(--accent-ink); }
/* A button that reads as a link in running text (it acts in the page). */
button.link-button { display: inline; background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; font: inherit; line-height: inherit; cursor: pointer; }
textarea, input, select {
  width: 100%; background: var(--surface-0); color: var(--text-primary);
  border: 1px solid var(--control-border); border-radius: 7px; padding: 8px;
  font-family: inherit; font-size: 14px;
}
textarea.mono, input.mono { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; font-size: 13px; }
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; margin: 0; accent-color: var(--accent); }
textarea { resize: vertical; }
label { font-weight: 600; font-size: 13px; color: var(--text-secondary); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.row[hidden] { display: none; }
.row > select, .row > input { width: auto; flex: 0 1 auto; }
.row > .grow, .row label.grow { flex: 1 1 200px; }
.row label { display: flex; flex-direction: column; gap: 3px; }
.row label select, .row label input { width: 100%; }
/* A checkbox and its text on one line, the box centred on the text. */
label.check, .row label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; }
.row label.check input { width: auto; flex: none; }
button.small { font-size: 12px; padding: 3px 9px; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.callout { background: var(--surface-1); border: 1px solid var(--border); border-left: 4px solid var(--warning); border-radius: 8px; padding: 10px 14px; color: var(--text-secondary); max-width: 80ch; }
.callout-card { border-left: 4px solid var(--accent); }
.empty { border-style: dashed; }

/* ── Pills, chips, badges, flags ─────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; color: var(--text-primary); font-weight: 600; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--text-muted)); flex: none; }
.pill.active { --dot: var(--critical); }
.pill.contained { --dot: var(--serious); }
/* Tiers: significant a filled dot, suggestive a ring. */
.pill.significant { --dot: var(--tier-sig); }
.pill.suggestive { --dot: var(--tier-sug); }
.pill.suggestive::before { background: transparent; box-shadow: inset 0 0 0 2px var(--dot); }
.pill.noise, .pill.historical { --dot: var(--text-muted); }
/* Declared agent identity classes (the identity page). */
.pill.id-signature_verified, .pill.id-ip_verified, .pill.id-in_range { --dot: var(--good); }
.pill.id-signature_present, .pill.id-claimed { --dot: var(--accent); }
.pill.id-signature_failed { --dot: var(--serious); }
.pill.id-spoofed { --dot: var(--critical); }
.pill.id-none { --dot: var(--text-muted); }
.alert.id-spoofed { border-left-color: var(--critical); max-width: none; }
tr.id-row-spoofed > td:first-child { box-shadow: inset 3px 0 0 var(--critical); }
.id-counts dd.id-alarm .big { color: var(--critical); }
table.id-files td.url code { overflow-wrap: anywhere; white-space: normal; }
.chip { display: inline-block; background: var(--code-bg); border-radius: 5px; padding: 0 6px; margin: 1px 3px 1px 0; font-size: 12px; font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
/* A rule id that links to its row on the rules page. */
a.rule-link { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
a.rule-link:hover { text-decoration-color: currentColor; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--border); white-space: nowrap; }
.flag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 5px; margin-right: 4px; border: 1px solid var(--border); }
.flag.sig::before { content: "◆ "; content: "◆ " / ""; color: var(--tier-sig); }
.flag.link::before { content: "+ "; content: "+ " / ""; color: var(--accent-ink); }
.flag.correction { border-color: var(--serious); }
.flag.correction::before { content: "✎ "; content: "✎ " / ""; }
.flag.retraction { border-color: var(--critical); color: var(--critical); }
.flag.retraction::before { content: "⊘ "; content: "⊘ " / ""; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-secondary); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* A URL wraps anywhere it must; a host never breaks inside a label. */
td.url { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; min-width: 220px; }
td.host { font-family: ui-monospace, Consolas, monospace; white-space: nowrap; }
tr.sel td { background: var(--code-bg); }
tr.pick { cursor: pointer; }
tr.pick:hover td, tr.pick:focus-visible td { background: var(--surface-2); }
tr.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
td.changed { font-weight: 650; background: var(--code-bg); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--text-secondary); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv ul { margin: 0; padding-left: 18px; }
@media (max-width: 720px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}

/* ── Page heads, prose ───────────────────────────────────────────────── */
.page-head { margin-bottom: 18px; }
.page-head.compact .lede { margin-bottom: 4px; }
.lede { color: var(--text-secondary); max-width: 76ch; font-size: 16px; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.prose { max-width: 76ch; }
.prose li { margin-bottom: 4px; }
.prose table { margin: 8px 0 16px; }
.prose pre.code, pre.code { background: var(--code-bg); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.prose blockquote, blockquote { margin: 10px 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--border); color: var(--text-secondary); }
.prose h2 { padding-top: 6px; }
.anchor { margin-left: 6px; color: var(--text-muted); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .anchor:focus { opacity: 1; }
/* Touch screens have no hover: show the anchor faintly, with a larger target. */
@media (hover: none) {
  .anchor { opacity: 0.55; display: inline-block; min-width: 32px; padding: 0 8px; text-align: center; }
}

/* Docs: nav | article | toc */
.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 210px; gap: 32px; align-items: start; }
.doc-nav { margin-left: -8px; }
.doc-nav, .toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; font-size: 13px; }
.doc-nav ul, .toc ol { list-style: none; margin: 0 0 14px; padding: 0; }
.doc-nav a, .toc a { display: block; padding: 3px 8px; border-radius: 6px; color: var(--text-secondary); text-decoration: none; }
.doc-nav a:hover, .toc a:hover { background: var(--surface-2); color: var(--text-primary); }
.doc-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text-primary); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.toc li.l3 a { padding-left: 20px; }
.nav-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 6px 8px; }
.doc { min-width: 0; }
.doc-src { margin-top: 32px; }
@media (max-width: 1260px) {
  .doc-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .doc-nav { position: static; order: 2; max-height: none; border-top: 1px solid var(--border); padding-top: 16px; margin-left: 0; }
}

/* ── Landing ─────────────────────────────────────────────────────────── */
.hero { padding: 4px 0 12px; }
.hero h1 { font-size: 40px; }
.mission { font-size: 19px; line-height: 1.5; max-width: 62ch; color: var(--text-primary); }
.ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.notice-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.notice-cards .card { margin: 0; }
.steps-list { padding-left: 22px; max-width: 76ch; }
.steps-list li { margin-bottom: 6px; }
.meta { color: var(--text-secondary); font-size: 13px; }
@media (max-width: 720px) { .hero h1 { font-size: 32px; } .mission { font-size: 17px; } }
/* The public's card spans the row under the others: heading and text, then
   its links, side by side where there is room. */
.audience-wide { grid-column: 1 / -1; }
@media (min-width: 961px) {
  ul.audiences > li.audience-wide { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: center; }
  ul.audiences > li.audience-wide > h2, ul.audiences > li.audience-wide > p:not(.ctas) { grid-column: 1; }
  ul.audiences > li.audience-wide > .ctas { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
/* The notices at a glance, under the hero. */
.notice-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px;
  margin: 20px 0 0; padding: 10px 14px; background: var(--surface-1); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 8px; font-size: 14px; color: var(--text-secondary);
}
.notice-strip p { margin: 0; }
.notice-strip strong { color: var(--text-primary); }
.ns-links { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.ns-links a { display: inline-flex; align-items: center; min-height: 28px; }
/* How notices work, in plain words (the notices page). */
.plain { max-width: 84ch; margin-top: 28px; scroll-margin-top: 72px; }
.plain-list { margin: 0; }
.plain-list dt { font-weight: 650; margin-top: 12px; }
.plain-list dt:first-child { margin-top: 0; }
.plain-list dd { margin: 2px 0 0; color: var(--text-secondary); }
/* The evaluation in sentences, ahead of its intervals. */
.plain-tiers { margin: 0 0 10px; padding-left: 20px; font-size: 15px; }
.plain-tiers li { margin-bottom: 8px; }
.plain > .hint:last-child { margin-bottom: 0; }
.page-head + .plain { margin-top: 0; }

/* ── Filters ─────────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 3px; flex: 1 1 150px; }
.filters label.grow { flex: 1 1 260px; }
.filters label.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; padding-bottom: 8px; flex: none; min-height: 32px; }
.filters label.check input { width: auto; }
.filters .hint { flex-basis: 100%; margin: 0; }
.filters .filter-actions { margin: 0; flex: none; }
/* The filters need the page script; without it the table is the index. */
html:not(.js) [data-notice-filters] { display: none; }

/* ── Notices ─────────────────────────────────────────────────────────── */
.notice-table td:first-child { min-width: 220px; }
/* Phones: one card per notice, each cell labelled. */
@media (max-width: 720px) {
  .notice-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .notice-table, .notice-table tbody, .notice-table tr, .notice-table td { display: block; }
  .notice-table tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  .notice-table tr[hidden] { display: none; }
  .notice-table td { border: 0; padding: 2px 0; min-width: 0 !important; }
  .notice-table td[data-label] { position: relative; padding-left: 84px; }
  .notice-table td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 3px; color: var(--text-muted); font-size: 12px; }
}
.notice { max-width: 84ch; }
.notice.retracted h1 { text-decoration: line-through; text-decoration-color: var(--critical); }
.banner { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); }
.banner.retraction { border-color: var(--critical); border-left-width: 4px; }
.timeline { list-style: none; margin: 0 0 24px; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 16px 24px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; }
.t-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-1); border: 2px solid var(--axis); }
.t-published .t-dot { border-color: var(--accent); background: var(--accent); }
.t-status .t-dot { border-color: var(--serious); }
.t-statement .t-dot { border-color: var(--series-3); }
.timeline li.flagged .t-dot { border-color: var(--critical); background: var(--critical); }
.t-head { margin: 0 0 4px; font-size: 13px; color: var(--text-secondary); }
.t-kind { font-weight: 700; color: var(--text-primary); }
.timeline li.flagged .t-kind { color: var(--critical); }
.timeline li.flagged .t-kind::before { content: "! "; }
.verbatim { white-space: pre-wrap; margin: 0; }
.statement { margin: 4px 0 0; }
.statement blockquote { margin: 0; font-size: 15px; color: var(--text-primary); border-left-color: var(--series-3); }
.statement figcaption { font-size: 12px; color: var(--text-muted); padding-left: 17px; margin-top: 4px; }
.notice-body { border-top: 1px solid var(--border); padding-top: 8px; overflow-wrap: anywhere; }

/* ── Rules ───────────────────────────────────────────────────────────── */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.rule-kind { margin-top: 22px; }
.rule-kind[hidden] { display: none; }
.rule-kind > h2 { font-size: 17px; margin: 0 0 8px; text-transform: capitalize; }
.rule-kind > h2 .hint { text-transform: none; font-size: 13px; }
.rule-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
/* A rule is a row (id, weight, flags) that opens on the rest. */
/* The head (id, weight, flags) wraps in its own column, so the chevron
   stays on the first line however long the id; a closed row adds its
   description cut to one line. */
.rule-fold > summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; min-height: 44px; padding: 8px 14px;
  cursor: pointer; list-style: none;
}
.rule-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.rule-gist { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-fold[open] > summary .rule-gist { display: none; }
.rule-fold > summary::-webkit-details-marker { display: none; }
.rule-fold > summary::after {
  content: ""; grid-column: 2; grid-row: 1; align-self: start; margin-top: 6px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg);
}
.rule-fold[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.rule-fold > summary:hover h3 code { text-decoration: underline; }
.rule-fold > summary .flag { margin: 0; font-size: 11.5px; }
.rule-w { font-size: 12px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.rule-body { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 12px; }
.rule-card h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.rule-card h3 code { background: none; padding: 0; font-weight: 700; }
.rule-card p { margin: 0; font-size: 13.5px; }
/* Targets a finger can hit: links in a card, and the URL test's toggle. */
.rule-body a { display: inline-block; min-height: 24px; line-height: 24px; }
.rule-test > summary { min-height: 28px; display: flex; align-items: center; }
details.explain { margin: 4px 0 0; max-width: 76ch; }
details.explain > summary { cursor: pointer; color: var(--accent-ink); font-size: 14px; font-weight: 600; min-height: 28px; display: inline-flex; align-items: center; }
details.explain > p { color: var(--text-secondary); font-size: 14.5px; margin: 8px 0 0; }
.rule-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 12px; }
.rule-meta div { display: flex; gap: 4px; }
.rule-meta dt { color: var(--text-muted); }
.rule-meta dd { margin: 0; font-weight: 600; }
.pattern { margin: 2px 0 0; background: var(--code-bg); border-radius: 6px; padding: 6px 8px; font-size: 12px; white-space: pre-wrap; word-break: break-all; max-height: 120px; overflow: auto; }
.rule-card:target { outline: 2px solid var(--accent); }
.editor details > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.editor textarea { margin-top: 4px; }

/* ── Evaluation ──────────────────────────────────────────────────────── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.tier-card h3 { margin-top: 0; }
.tier-card h3::first-letter { text-transform: uppercase; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.stats dt { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.stats dd { margin: 0; }
.stats .big { font-size: 30px; font-weight: 650; letter-spacing: -0.01em; }
.confusion { table-layout: fixed; }
.confusion caption { text-align: left; font-size: 12px; color: var(--text-muted); padding-bottom: 4px; }
.confusion td { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.confusion td span { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.confusion td.tp, .confusion td.tn { box-shadow: inset 3px 0 0 var(--good); }
.confusion td.fp, .confusion td.fn { box-shadow: inset 3px 0 0 var(--critical); }
.legend { font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.legend .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.key.s-agent { background: var(--series-1); }
.key.s-benign { background: var(--series-2); }
.key.s-sig { background: var(--tier-sig); }
.key.s-sug { background: transparent; box-shadow: inset 0 0 0 2px var(--tier-sug); }
.key.s-miss { background: var(--grid); border: 1px solid var(--axis); }
.as-table { margin: 6px 0 16px; }
.as-table summary { cursor: pointer; color: var(--accent-ink); font-size: 13px; }
.better, .worse { font-size: 12px; font-weight: 700; }
.better { color: var(--good-ink); }
.better::before { content: "▲ "; content: "▲ " / ""; }
.worse { color: var(--critical); }
.worse::before { content: "▼ "; content: "▼ " / ""; }
.changes li { margin-bottom: 4px; font-size: 13px; }

/* ── Charts ──────────────────────────────────────────────────────────── */
.chart-box { margin: 8px 0; }
.chart-box figcaption { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-muted); font-size: 12px; font-family: system-ui, sans-serif; }
.chart .label { fill: var(--text-secondary); font-size: 12px; }
.chart .note { fill: var(--text-muted); font-size: 12px; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .lane { stroke: var(--grid); stroke-width: 1; }
.chart .pause { fill: var(--pause); }
.chart .band { fill: var(--band); stroke: var(--band-line); stroke-width: 1; stroke-dasharray: 3 2; }
.chart .run, .chart .bar { fill: var(--series-1); }
.chart .s-agent { fill: var(--series-1); }
.chart .s-benign { fill: var(--series-2); }
.chart .s-miss { fill: var(--grid); stroke: var(--axis); stroke-width: 0.5; }
.chart .hit { fill: transparent; }
.chart [tabindex] { cursor: pointer; outline: none; }
.chart [tabindex]:focus-visible { stroke: var(--text-primary); stroke-width: 2; }
.chart .sel { stroke: var(--text-primary); stroke-width: 2; }
.chart .dim { opacity: 0.28; }
.chart .active { opacity: 0.75; }
.chart .lane-label { fill: var(--text-secondary); font-size: 12px; cursor: pointer; }
.chart .lane-label.sel { fill: var(--text-primary); font-weight: 700; stroke: none; }
.chart .node { stroke: var(--surface-1); stroke-width: 2; }
.chart .node.sel { stroke: var(--text-primary); stroke-width: 3; }
.chart .node-label { fill: var(--text-primary); font-size: 12px; font-weight: 600; pointer-events: none; }
.chart .edge { stroke-width: 2; fill: none; stroke: var(--axis); }
.chart .edge.pause { stroke: var(--band-line); stroke-dasharray: 5 3; fill: none; }
.chart .edge.chain { stroke: var(--series-1); }
.chart .edge.dialect { stroke: var(--series-3); stroke-dasharray: 2 3; }
.chart .edge.soft { stroke: var(--series-2); stroke-dasharray: 8 3; }
/* A candidate fleet: its clusters side by side on a light band. */
.chart .fleet-band path { fill: none; stroke: var(--band); stroke-width: 54; stroke-linecap: round; stroke-linejoin: round; }
.chart .band-label { fill: var(--text-secondary); font-weight: 650; paint-order: stroke; stroke: var(--surface-1); stroke-width: 4px; stroke-linejoin: round; }
.chart .edge.fleet {stroke: var(--text-secondary); stroke-width: 3; opacity: 0.5; }
/* Soft links: one style per kind; a kind without one keeps .soft's. */
.chart .edge.soft.sk-rerun { stroke: var(--series-1); stroke-dasharray: 10 3; }
.chart .edge.soft.sk-preamble { stroke: var(--series-3); stroke-dasharray: 6 2 2 2; }
.chart .edge.soft.sk-path-set { stroke: var(--series-2); stroke-dasharray: 2 2; }
.chart .edge.soft.sk-encoding { stroke: var(--axis); stroke-dasharray: 4 4; }
.chart .edge.soft.sk-fan-out { stroke: var(--band-line); stroke-dasharray: 1 3; stroke-linecap: round; }
.chart .edge.soft.sk-cut-length { stroke: var(--text-secondary); stroke-dasharray: 6 3; }
.chart .edge.soft.sk-header-set { stroke: var(--series-3); stroke-dasharray: 10 2 2 2; }
.chart .edge.soft.sk-escalation { stroke: var(--critical); stroke-dasharray: none; }
.chart .edge.soft.sk-common-feature { stroke: var(--axis); stroke-dasharray: 1 4; stroke-linecap: round; }
.chart .edge.soft.sk-shared-secret { stroke: var(--critical); stroke-dasharray: 8 3; }
.chart .edge.soft.sk-relay-stack { stroke: var(--series-1); stroke-dasharray: 2 4; stroke-linecap: round; }
.chart .edge.soft.sk-callback-service { stroke: var(--series-3); stroke-dasharray: 3 3; }
.chart .edge.soft.sk-scaffold { stroke: var(--series-3); stroke-dasharray: 14 3; }
.chart .edge.soft.sk-scaffold-lineage { stroke: var(--series-3); stroke-dasharray: 14 3 2 3; }
.chart .edge.soft.sk-prompt-echo { stroke: var(--series-1); stroke-dasharray: 4 2; }
.chart .edge.soft.sk-co-activity { stroke: var(--band-line); stroke-dasharray: 6 6; }
.chart .edge.soft.sk-co-target { stroke: var(--series-2); stroke-dasharray: 12 4; }
.chart .edge.soft.sk-ordered-co-target { stroke: var(--series-2); stroke-dasharray: 12 3 2 3; }
/* Tier marks: significant filled; suggestive a ring around a light tint of
   its colour, so the two differ in shape and lightness, not hue alone. */
.chart :is(.run, .node, .dot).tier-significant, .chart .s-sig { fill: var(--tier-sig); }
.chart :is(.run, .node, .dot).tier-suggestive, .chart .s-sug { fill: var(--tier-sug); fill-opacity: 0.3; stroke: var(--tier-sug); stroke-width: 1.75; }
.chart :is(.run, .node, .dot).tier-noise { fill: var(--text-muted); }
.chart :is(.run, .node, .dot).sel { stroke: var(--text-primary); stroke-width: 2.5; }
.chart :is(.run, .node, .dot)[tabindex]:focus-visible { stroke: var(--text-primary); stroke-width: 2.5; }
svg.chart.key-line { display: inline-block; width: 26px; height: 10px; margin-right: 5px; vertical-align: -1px; overflow: visible; }
.chart .edge-hit { stroke: transparent; stroke-width: 12; fill: none; cursor: pointer; }
.chart .cell { stroke: var(--surface-1); stroke-width: 2; }
.chart .q0 { fill: var(--surface-2); }
.chart .q1 { fill: var(--q1); } .chart .q2 { fill: var(--q2); } .chart .q3 { fill: var(--q3); }
.chart .q4 { fill: var(--q4); } .chart .q5 { fill: var(--q5); }
.chart .cell-v { font-size: 11px; pointer-events: none; }
.chart .cell-v.on-light { fill: var(--q-ink-light); }
.chart .cell-v.on-dark { fill: var(--q-ink-dark); }
.chart .dot { stroke: var(--surface-1); stroke-width: 1; }
.legend-ramp { display: inline-flex; gap: 2px; vertical-align: middle; }
.legend-ramp i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.legend-ramp .q1 { background: var(--q1); } .legend-ramp .q2 { background: var(--q2); } .legend-ramp .q3 { background: var(--q3); }
.legend-ramp .q4 { background: var(--q4); } .legend-ramp .q5 { background: var(--q5); }
.key.k-sig { background: var(--tier-sig); border-radius: 50%; }
.key.k-sug { background: transparent; box-shadow: inset 0 0 0 2px var(--tier-sug); border-radius: 50%; }
.key.k-noise { background: var(--text-muted); border-radius: 50%; }
.key.k-pause { background: var(--pause); border: 1px solid var(--axis); }
.key.k-band { background: var(--band); border: 1px dashed var(--band-line); }
.chart-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.chart-tools button { font-size: 12px; padding: 3px 9px; }
.chart-buttons { display: inline-flex; gap: 6px; flex-wrap: wrap; }
/* Runs fitted to activity: an idle stretch is a narrow hatched gap. */
.chart .idle-gap { fill: var(--surface-2); stroke: var(--grid); stroke-dasharray: 2 3; }
.chart .gap-mark { fill: none; stroke: var(--axis); stroke-width: 1.4; }
.zoom-tools button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tip {
  position: fixed; pointer-events: none; z-index: 30; max-width: 320px; background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; font-size: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); overflow-wrap: anywhere;
}

/* ── Workbench ───────────────────────────────────────────────────────── */
.steps { display: none; }
.workbench { display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(280px, 340px); gap: 16px; align-items: start; }
.pane { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow); }
.pane > h2 { margin-top: 0; font-size: 17px; }
.pane-sub { font-size: 14px; margin: 18px 0 6px; }
.pane-input { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
/* Short screens: no sticky panes, so nothing scrolls inside a pane. */
@media (max-height: 820px) {
  .pane-input, .pane-context { position: static; max-height: none; overflow: visible; }
}
.pane-context { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
.pane-report { margin-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 6px; }
.tile { background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.tile .v { font-size: 22px; font-weight: 650; }
.tile .k { color: var(--text-secondary); font-size: 12px; }
.cluster-list { display: flex; flex-direction: column; gap: 4px; }
.cluster-row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 8px; align-items: center; text-align: left; width: 100%;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font-size: 13px;
}
.cluster-row[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: var(--surface-2); }
.cluster-row .cid { font-weight: 700; }
.cluster-row .crecs { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cluster-row .ctargets { grid-column: 2 / 4; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; }
.viz-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: 10px; }
.viz-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--text-secondary); padding: 8px 10px; white-space: nowrap; font-size: 13.5px; }
.viz-tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 600; }
/* Tabs wider than the pane fade out at the side with more to scroll to
   (analyze.js sets data-fade from the scroll position). */
.viz-tabs { scrollbar-width: thin; }
.viz-tabs[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.viz-tabs[data-fade="start"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.viz-tabs[data-fade="both"] {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.viz-panel { min-height: 160px; }
/* The empty views pane: what will show, and the example to try. */
.viz-panel .empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px 0; max-width: 60ch; }
.viz-panel .empty-state p { margin: 0; color: var(--text-secondary); }
.viz-panel .empty-state .hint { margin-bottom: 8px; }
.none-found { margin-top: 12px; }
.none-found span[title] { text-decoration: underline dotted var(--axis); text-underline-offset: 3px; cursor: help; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; min-height: 4px; }
.filter-bar .chip-btn { font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.filter-bar .chip-btn::after { content: " ×"; color: var(--text-muted); }
.report { white-space: pre-wrap; word-break: break-word; background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 560px; overflow: auto; margin: 10px 0 0; }
.claims { margin-top: 10px; }
.claims summary { cursor: pointer; color: var(--text-secondary); font-size: 14px; }
.detail { overflow-wrap: anywhere; }
.detail h3 { font-size: 15px; margin: 14px 0 6px; }
.mini-bars { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: minmax(0, max-content) minmax(40px, 1fr) auto; gap: 3px 8px; align-items: center; }
.mini-bars li { display: contents; }
.mini-bars .mb-label { font-size: 12px; }
.mini-bars .mb-track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.mini-bars .fill { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.mini-bars .mb-n { font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.ctx-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ctx-head h3 { margin: 0; }
.layer { border-left: 2px solid var(--border); padding: 4px 0 4px 10px; margin: 8px 0; }
.layer .via { color: var(--text-muted); font-size: 12px; }
.layer.d1 { margin-left: 14px; } .layer.d2 { margin-left: 28px; } .layer.d3 { margin-left: 42px; } .layer.d4 { margin-left: 56px; }
.verdict { font-weight: 600; margin: 0 0 8px; }
.verdict::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--dot); }
.verdict.ok { --dot: var(--good); }
.verdict.ok::after { content: " ✓"; content: " ✓" / ""; }
.verdict.bad { --dot: var(--critical); }
.diffs { margin: 0 0 8px; padding-left: 20px; font-size: 13px; overflow-wrap: anywhere; }
.loading { color: var(--text-secondary); }
.loading::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1260px) {
  .workbench { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr); }
  .pane-context { grid-column: 1 / -1; position: static; max-height: none; }
}
@media (max-width: 960px) {
  html.js .steps { display: flex; position: sticky; top: 0; z-index: 5; gap: 4px; background: var(--surface-0); padding: 8px 0; margin-bottom: 8px; overflow-x: auto; }
  .steps button { flex: 1 0 auto; font-size: 13px; padding: 7px 8px; }
  .steps button span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); font-size: 11px; font-weight: 700; }
  .steps button[aria-current="step"] { border-color: var(--accent); background: var(--surface-1); font-weight: 600; }
  .steps button[aria-current="step"] span { background: var(--accent-strong); color: var(--on-accent); }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .pane-input, .pane-context { position: static; max-height: none; }
  html.js [data-pane]:not(.on) { display: none; }
  /* A pane scrolled to sits below the sticky step bar. */
  [data-pane] { scroll-margin-top: 58px; }
  .pane-report { margin-top: 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Static charts keep a legible minimum width and scroll inside their box
   on narrow screens; the page itself never scrolls sideways. */
.chart-box.scroll-x, .chart-box:has(> svg.bars) { overflow-x: auto; }
.chart-box.scroll-x svg.swim, .chart-box > svg.bars { min-width: 620px; }
table.records .chip { overflow-wrap: normal; white-space: nowrap; }
/* Wide tables scroll in their box rather than squeezing into tall rows. */
table.records, #case-out table { min-width: 640px; }
#endpoints table { min-width: 860px; }
table.records td.rules { min-width: 150px; max-width: 280px; }
table.records td.url { min-width: 180px; }
/* The records and endpoints, at full width under the three panes. */
.pane-tables { margin-top: 16px; }
.pane-tables .sub-head:first-child .pane-sub { margin-top: 0; }
.pane-tables h2.pane-sub { font-size: 16px; }
.table-tools { margin-top: 2px; align-items: flex-end; }
.table-tools label.grow { flex: 1 1 260px; max-width: 520px; }
svg.chart.heat, svg.chart.rhythm { width: auto; max-width: none; }
.flag.artifact::before { content: "✎ "; content: "✎ " / ""; color: var(--text-muted); }
.stats.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ── Bundle viewer: attribution labels and claim tags ────────────────── */
.conf { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.conf::before { content: ""; width: 10px; height: 10px; border-radius: 2px; border: 1px solid var(--axis); background: var(--conf, transparent); flex: none; }
.conf.confirmed { --conf: var(--q5); }
.conf.suspected { --conf: var(--q3); }
.conf.possible { --conf: var(--q1); }
.claim-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); white-space: nowrap; }
table.layers th[scope="row"] { white-space: nowrap; color: var(--text-primary); }

/* ── Navigation groups ───────────────────────────────────────────────── */
.site-nav > ul { align-items: stretch; }
.nav-group { position: relative; }
.nav-group summary {
  list-style: none; cursor: pointer; padding: 16px 10px 14px; color: var(--text-secondary); font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav-group details[open] summary::after { transform: translateY(1px) rotate(225deg); }
.nav-group summary:hover { color: var(--text-primary); }
.nav-group summary.current { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 600; }
.nav-menu {
  display: block; position: absolute; top: 100%; left: 0; z-index: 20; width: max-content; min-width: 280px; max-width: min(380px, calc(100vw - 16px)); list-style: none; margin: 0; padding: 6px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}
.nav-menu a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--text-primary); white-space: normal; border: 0; font-size: 14px; }
.nav-menu a span { color: var(--text-muted); font-size: 12.5px; }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--surface-2); }
.nav-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); background: var(--surface-2); }
@media (max-width: 720px) {
  .site-nav > ul { flex-wrap: wrap; }
  .nav-group summary { padding: 8px 9px 10px; }
  /* The menu drops below the whole nav row, spanning the screen less a gutter. */
  .site-nav { position: relative; }
  .nav-group { position: static; }
  .nav-menu { position: absolute; top: 100%; left: 8px; right: 8px; width: auto; min-width: 0; max-width: none; }
}

/* ── Landing: hero and the method walk ───────────────────────────────── */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 6px; }
.method-strip { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.method-strip a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; text-decoration: none;
  background: var(--surface-1); border: 1px solid var(--border); color: var(--text-primary); font-size: 13.5px; font-weight: 600;
}
.method-strip a:hover { border-color: var(--accent); }
.method-strip .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-strong); color: var(--on-accent); font-size: 12px; }
.walk { margin-top: 36px; scroll-margin-top: 72px; }
/* The step strip takes the walk's full width, so all eight fit one row on
   a wide screen; the prose under it keeps a reading measure. */
.walk-head { max-width: none; }
.walk-head > p { max-width: 84ch; }
.walk-head nav { margin-bottom: 12px; }
.walk-head h2 { font-size: 24px; margin-top: 0; }
.synthetic-banner { border: 1px dashed var(--axis); border-radius: 8px; padding: 8px 12px; background: var(--surface-1); color: var(--text-secondary); font-size: 14px; }
.synthetic-banner strong { color: var(--text-primary); }
.live-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.live-box[hidden] { display: none; }
.live-box .hint { flex-basis: 100%; margin: 0; }
.walk-steps { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 18px; }
.walk-step {
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.75fr); gap: 8px 28px; align-items: start;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  scroll-margin-top: 72px;
}
.walk-step .step-text h3 { font-size: 20px; margin: 0 0 8px; }
.walk-step .step-text p { font-size: 14.5px; }
.step-n { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-ink); margin: 0 0 2px; }
.fm-ref { font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.rec-url code { display: block; font-size: 12px; padding: 6px 8px; word-break: break-all; }
.walk-fig { margin: 0; min-width: 0; }
.walk-step .live-slot { grid-column: 1 / -1; border-top: 1px dashed var(--border); padding-top: 12px; min-width: 0; }
.walk-step .live-slot[hidden] { display: none; }
.live-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--good-ink); margin: 0 0 6px; }
.walk-foot { margin-top: 16px; color: var(--text-secondary); max-width: 84ch; }
.cluster-pick button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 600; }
.latest { margin-top: 36px; }
.example-notice { border-style: dashed; max-width: 92ch; }
.example-notice h3 { margin-top: 6px; }
.example-notice .notice-body { border-top: 0; padding-top: 0; }
.example-notice .more summary { cursor: pointer; color: var(--accent-ink); font-size: 14px; margin: 8px 0; }
@media (max-width: 960px) {
  .walk-step { grid-template-columns: minmax(0, 1fr); padding: 14px; }
}
.scroll-x { overflow-x: auto; max-width: 100%; }
.walk-fig .scroll-x svg.swim, .walk-fig .scroll-x svg.swarm { min-width: 660px; }
.walk-fig .scroll-x svg.scope-fig { min-width: 620px; }
.walk-fig svg.layers-fig, .walk-fig svg.score-fig, .walk-fig svg.ladder-fig { min-width: 0; }
@media (max-width: 720px) {
  .walk-fig > svg.chart { min-width: 600px; }
  .walk-fig { overflow-x: auto; }
}

/* Walk figures */
.chart .lbox { fill: var(--surface-0); stroke: var(--border); stroke-width: 1; }
.chart .lbox.d0 { fill: var(--surface-2); }
.chart .lbox.d1 { stroke: var(--q2); } .chart .lbox.d2 { stroke: var(--q3); }
.chart .lbox.d3, .chart .lbox.d4, .chart .lbox.d5, .chart .lbox.d6 { stroke: var(--q4); }
.chart .via { fill: var(--accent-ink); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; }
.chart .mono { fill: var(--text-primary); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.chart .mono-sm { fill: var(--text-secondary); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.chart .arrow { fill: none; stroke: var(--axis); stroke-width: 1.5; }
.chart .track { fill: var(--surface-2); }
.chart .seg.s1 { fill: var(--series-1); } .chart .seg.s2 { fill: var(--series-3); } .chart .seg.s3 { fill: var(--band-line); }
.chart .seg-v { fill: #fff; font-size: 11px; font-weight: 700; }
.chart .seg.dropped { fill: none; stroke: var(--axis); stroke-width: 1.5; stroke-dasharray: 3 2; }
.chart .scope-band.r1 { fill: var(--surface-2); } .chart .scope-band.r0 { fill: var(--surface-0); }
.chart .sqm.no { fill: var(--axis); }
.chart .sqm.q-payload { fill: var(--axis); }
.chart .sqm.q-agent { fill: var(--accent); }
.chart .sqm.q-scope { fill: var(--serious); stroke: var(--critical); stroke-width: 1.5; }
.chart .sqm.q-coord { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 2; }
.chart .tc.fail { fill: var(--serious); }
.chart .tc.pass { fill: none; stroke: var(--good); stroke-width: 1.8; }
.chart .tc.not-assessable { fill: none; stroke: var(--axis); stroke-width: 1.3; stroke-dasharray: 2 2; }
.chart .finding.scope-exceeded { fill: var(--serious); font-weight: 700; }
.chart .finding.in-scope { fill: var(--good-ink); font-weight: 700; }
.chart .threshold { stroke-width: 2; stroke-dasharray: 4 3; }
.chart .threshold.th-sug { stroke: var(--tier-sug); }
.chart .threshold.th-sig { stroke: var(--tier-sig); stroke-dasharray: none; }
.chart .rung-band { fill: var(--surface-0); }
.chart .rung-band.r1, .chart .rung-band.r3, .chart .rung-band.r5 { fill: var(--surface-2); }
.chart .rung-code { fill: var(--text-primary); font-weight: 700; font-size: 12px; }
.chart .reach { fill: none; stroke: var(--text-secondary); stroke-width: 2; stroke-dasharray: 3 2; }
.chart .cap-line { stroke: var(--text-secondary); stroke-width: 1.5; stroke-dasharray: 2 3; }
.chart .band-row { fill: var(--surface-0); stroke: var(--border); }
.chart .band-row.confirmed { fill: var(--q4); } .chart .band-row.suspected { fill: var(--q2); } .chart .band-row.possible { fill: var(--q1); }
.chart .band-row.none { fill: none; stroke-dasharray: 4 3; }
.chart .band-text { fill: var(--text-primary); font-size: 12.5px; dominant-baseline: middle; }
.chart .band-row.confirmed ~ .band-text { fill: var(--text-primary); }
.chart .flow-box { fill: var(--surface-0); stroke: var(--border); stroke-width: 1.5; }
.chart .flow-box.f1 { stroke: var(--accent); } .chart .flow-box.f2 { stroke: var(--serious); } .chart .flow-box.f3 { stroke: var(--text-primary); }
.chart .flow-who { fill: var(--text-primary); font-size: 14px; font-weight: 700; }
.chart .flow-when { fill: var(--text-secondary); font-size: 12px; }
/* Interaction edges: one style per kind (S1–S6), width by strength. */
.chart .sedge { fill: none; stroke: var(--axis); stroke-width: 2.2; }
.chart .sedge.sk-shared_sink { stroke: var(--series-1); }
.chart .sedge.sk-handoff { stroke: var(--critical); stroke-dasharray: 9 3; }
.chart .sedge.sk-synchronized_start { stroke: var(--band-line); stroke-dasharray: 2 3; stroke-linecap: round; }
.chart .sedge.sk-role_sequence { stroke: var(--series-3); stroke-dasharray: 7 2 2 2; }
.chart .sedge.sk-disjoint_partition { stroke: var(--series-2); stroke-dasharray: 4 4; }
.chart .sedge.sk-dispatch_star { stroke: var(--series-1); stroke-dasharray: 1 3; stroke-linecap: round; }
.chart .sedge.st-weak { stroke-width: 1.4; }
.chart .sedge.st-moderate { stroke-width: 2.4; }
.chart .sedge.st-strong { stroke-width: 3.6; }
.chart .sedge.dim { opacity: 0.2; }

/* ── Workbench additions ─────────────────────────────────────────────── */
.zoom-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.zoom-tools button { font-size: 12px; padding: 3px 9px; min-width: 30px; }
.zoom-tools .hint { margin: 0; }
/* A horizontal drag zooms on touch too; a vertical one still scrolls the page. */
.chart .brush-area { fill: transparent; cursor: crosshair; touch-action: pan-y; }
.chart .brush { fill: var(--band); stroke: var(--band-line); stroke-width: 1; pointer-events: none; }
.chart .pause, .chart .grid, .chart .lane { pointer-events: none; }
svg.chart.zoomable { touch-action: pan-y; }
svg.chart.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ladder-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; background: var(--surface-0); }
.ladder-box h4 { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.ladder { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.rung { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 8px; align-items: center; padding: 4px 8px; border-radius: 6px; border: 1px solid transparent; font-size: 13px; color: var(--text-muted); }
.rung .rung-code { font-weight: 700; font-variant-numeric: tabular-nums; }
.rung.reached { color: var(--text-primary); background: var(--surface-2); }
.rung.current { border-color: var(--accent); background: var(--surface-1); box-shadow: inset 3px 0 0 var(--accent); }
.rung.held { border: 1px dashed var(--axis); color: var(--text-secondary); }
.rung-signals { grid-column: 2 / -1; margin: 2px 0; padding-left: 16px; font-size: 12.5px; }
.badge.cap { border-style: dashed; }
.corr { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 999px; border: 1px solid var(--border); }
.corr.multi_source, .corr.operator_confirmed { border-color: var(--good); }
.ctx-section h4, .internal-review summary { font-size: 14px; }
.ctx-section { margin: 12px 0; }
.attr-box table.layers { min-width: 520px; }
.internal-review { margin: 12px 0; border: 1px dashed var(--serious); border-radius: 8px; padding: 6px 10px; background: var(--surface-0); }
.internal-review summary { cursor: pointer; font-weight: 600; color: var(--text-secondary); }
.internal-review ul { padding-left: 18px; font-size: 13px; }
.ladder-live { margin-top: 8px; }
.internal-review li.base-rated > strong { color: var(--text-secondary); font-weight: 600; }

/* ── Scope (SC-FM 15): observed payload and inferred scope look different ── */
.scope-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface-0); }
.scope-box h4 { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scope-finding { font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); }
.scope-finding.f-scope_exceeded { border: 2px solid var(--serious); color: var(--serious); }
.scope-finding.f-in_scope { border-color: var(--good); color: var(--good-ink); }
.scope-finding.f-not_assessable { border-style: dashed; color: var(--text-muted); }
.scope-qs { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
.sq { display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-1); font-size: 12.5px; }
.sq .sq-label { font-weight: 650; }
.sq .sq-ans { font-size: 15px; font-weight: 700; }
.sq .sq-how { color: var(--text-muted); font-size: 11.5px; }
.sq.no { color: var(--text-muted); background: var(--surface-0); }
.sq.no .sq-ans { font-weight: 500; }
.sq-payload.yes { border-color: var(--axis); }
.sq-agent.yes { border-color: var(--accent); }
.sq-scope.yes { border: 2px solid var(--serious); box-shadow: inset 4px 0 0 var(--serious); }
.sq-scope.yes .sq-ans { color: var(--serious); }
.sq-coord.yes { border-style: dashed; border-color: var(--accent); }
ol.scope-tests { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.scope-tests .st { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-1); }
.scope-tests .st-fail { border-color: var(--serious); box-shadow: inset 3px 0 0 var(--serious); }
.scope-tests .st-not_assessable { border-style: dashed; background: var(--surface-0); }
.scope-tests .st-head { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.scope-tests .st-head .outcome { margin-left: auto; }
.scope-tests .st-detail { color: var(--text-secondary); }
.scope-tests .st-recs { margin-top: 2px; }
.outcome { font-weight: 650; white-space: nowrap; }
.outcome.o-fail { color: var(--serious); }
.outcome.o-pass { color: var(--good-ink); }
.outcome.o-not_assessable { color: var(--text-muted); font-weight: 500; }
.rec-ref { font-size: 12px; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 999px; font-family: ui-monospace, Consolas, monospace; }

/* ── Field Manual as hypertext ───────────────────────────────────────── */
a.fm-link { font-variant-numeric: tabular-nums; white-space: nowrap; }
a.gloss { color: inherit; text-decoration: underline dotted var(--axis); text-underline-offset: 3px; }
a.gloss:hover { color: var(--accent-ink); }
dfn { font-style: normal; font-weight: 650; scroll-margin-top: 80px; }
dfn:target, td:target { background: var(--code-bg); outline: 2px solid var(--accent); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 32px 0 6px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; background: var(--surface-1); }
.pager a:hover { border-color: var(--accent); }
.pager-next { text-align: right; grid-column: 2; }
.pager .hint { margin: 0; }
.fm-search { margin-bottom: 18px; }
.fm-chapter h2 { font-size: 17px; }
.fm-chapter h2 a { color: var(--text-primary); text-decoration: none; }
.fm-list { list-style: none; padding: 0; margin: 0 0 8px; columns: 2 320px; column-gap: 28px; }
.fm-list li { break-inside: avoid; padding: 3px 0; }
.fm-list a { text-decoration: none; }
.fm-id { display: inline-block; min-width: 62px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--text-muted); }

/* ── Rules: test a URL ───────────────────────────────────────────────── */
.rule-test summary { cursor: pointer; font-size: 13px; color: var(--accent-ink); }
.rule-test .row { margin-top: 6px; }
.rt-out { font-size: 13px; overflow-wrap: anywhere; }
.rt-out .verdict { margin: 6px 0 2px; }
.rt-out ul { margin: 0; padding-left: 18px; }

/* ── Evaluation: non-synthetic numbers and forest plots ──────────────── */
.non-synthetic { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.non-synthetic h4 { margin: 0 0 8px; font-size: 14px; }
.chart.forest .ci { stroke: var(--text-secondary); stroke-width: 2; }
.chart.forest .pt { fill: var(--series-1); stroke: var(--surface-1); stroke-width: 1.5; }
.chart.forest .sep { stroke: var(--border); stroke-width: 1; }
.chart-box.scroll-x > svg.forest { min-width: 640px; }
.walk-step > *, .walk, .walk-steps { min-width: 0; max-width: 100%; }
.hero, .walk-head { overflow-wrap: anywhere; }

/* ── Shared page parts ───────────────────────────────────────────────── */
/* Audience cards: `.audience` is one card (a link, li, section or
   article); a list or block of them lays out as a grid. A `ul.audience`
   or `ol.audience` is itself the grid, its items the cards. */
:is(ul, ol, div, nav, section):has(> .audience + .audience),
ul.audience, ol.audience {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px;
  list-style: none; padding: 0; margin: 18px 0 0;
}
.audience:not(ul, ol), ul.audience > li, ol.audience > li {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); color: var(--text-primary);
}
.audience:not(ul, ol) > *, ul.audience > li > *, ol.audience > li > * { margin-top: 0; margin-bottom: 0; }
.audience h2, .audience h3 { font-size: 16px; }
.audience p { color: var(--text-secondary); font-size: 14px; }
a.audience { text-decoration: none; }
a.audience:hover, .audience:has(a:hover) { border-color: var(--accent); }
a.audience strong, a.audience h2, a.audience h3 { color: var(--accent-ink); }

/* An error or empty result the reader must act on. */
.alert {
  background: var(--surface-1); border: 1px solid var(--border); border-left: 4px solid var(--serious);
  border-radius: 8px; padding: 12px 14px; margin: 10px 0; color: var(--text-primary); max-width: 84ch;
}
.alert > :first-child { margin-top: 0; }
.alert > :last-child { margin-bottom: 0; }
.alert h2, .alert h3, .alert h4 { font-size: 15px; margin: 0 0 6px; }
.alert pre, .alert code { overflow-wrap: anywhere; white-space: pre-wrap; }
.alert ul { margin: 4px 0; padding-left: 18px; }
.alert[hidden], .warn[hidden] { display: none; }

/* Per-card status on the tools page. */
.card-status { font-size: 13px; color: var(--text-secondary); margin: 6px 0 0; min-height: 1.5em; }
.card-status:empty { min-height: 0; margin: 0; }
.card-status.error, .card-status[data-state="error"] { color: var(--critical); }
.card-status.ready, .card-status[data-state="ready"] { color: var(--good-ink); }

/* Notices: what to do if one concerns you, and the newest on the landing. */
.notice-aside {
  background: var(--surface-1); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 12px 14px; margin: 16px 0; max-width: 84ch; font-size: 14px; color: var(--text-secondary);
}
.notice-aside h2, .notice-aside h3 { font-size: 15px; margin: 0 0 6px; color: var(--text-primary); }
.notice-aside > :last-child { margin-bottom: 0; }
.notice-aside ul { margin: 4px 0 0; padding-left: 18px; }
.latest-notices { margin-top: 24px; }
.latest-notices > h2:first-child { margin-top: 0; }

/* Notice filters: the date pair sits together in one fieldset. */
.filters fieldset { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; flex: 2 1 300px; min-width: 0; border: 0; margin: 0; padding: 0; }
.filters fieldset legend { float: left; width: 100%; padding: 0; margin: 0 0 3px; font-weight: 600; font-size: 13px; color: var(--text-secondary); }
/* From and To sit beside their inputs, so the legend lines up with the
   other filters' labels and every input shares one baseline. */
.filters fieldset label { flex: 1 1 130px; min-width: 0; flex-direction: row; align-items: center; gap: 6px; }
.filters fieldset label input { flex: 1 1 auto; min-width: 0; }
.filters > label { white-space: nowrap; }

/* Docs on narrow screens: the page's sections, collapsed, above the text. */
details.on-this-page { display: none; }
@media (max-width: 1260px) {
  details.on-this-page { display: block; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); font-size: 14px; }
  details.on-this-page > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; color: var(--text-secondary); }
  details.on-this-page[open] > summary { border-bottom: 1px solid var(--border); }
  details.on-this-page :is(ol, ul) { list-style: none; margin: 0; padding: 6px 4px 8px; max-height: 50vh; overflow: auto; }
  details.on-this-page a { display: block; padding: 4px 8px; border-radius: 6px; text-decoration: none; }
  details.on-this-page a:hover { background: var(--surface-2); }
  details.on-this-page li.l3 a { padding-left: 22px; }
}

/* Evaluation figures lead with the interval; the point estimate is the
   smaller line under it. */
.stats .big { font-size: clamp(20px, 1.2vw + 12px, 28px); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats dd > .big + :is(span, div, small, p) { display: block; color: var(--text-secondary); font-size: 13px; }
.stats .point { display: block; color: var(--text-secondary); font-size: 13px; }

/* Workbench: the loaded records collapse to one line after a run. */
.input-collapsed {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px;
  background: var(--surface-0); border: 1px dashed var(--axis); border-radius: 8px; padding: 8px 10px; font-size: 13.5px;
}
.input-collapsed[hidden] { display: none; }
/* The empty workbench: one dashed area to paste into, drop a file on, or
   start from the example. */
.dropzone { border: 1.5px dashed var(--axis); border-radius: 10px; padding: 10px; background: var(--surface-0); }
.dropzone.over { border-color: var(--accent); background: var(--surface-2); }
.dropzone .drop-lead { margin: 0 0 2px; font-size: 13.5px; color: var(--text-secondary); }
.dropzone .drop-actions { margin: 0 0 8px; }
.dropzone textarea { background: var(--surface-1); }
.dropzone #drop-status { margin: 6px 0 0; }
/* A set of files in place of the text box, and what was read from each. */
.row label[hidden] { display: none; }
.file-set { background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.file-set p { margin: 0 0 4px; }
.file-set .row { margin-top: 4px; }
.file-summary { margin: 8px 0; font-size: 13.5px; }
.file-summary summary { cursor: pointer; font-weight: 600; }
table.files { min-width: 560px; }
table.files td.file-name { overflow-wrap: anywhere; min-width: 160px; }
table.files td.file-note { color: var(--text-secondary); overflow-wrap: anywhere; }
ul.skipped { margin: 0 0 4px; padding-left: 18px; overflow-wrap: anywhere; }
/* A running analysis: a bar, the stage with its counts, and Cancel. */
.run-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; font-size: 13.5px; color: var(--text-secondary); }
.run-progress[hidden] { display: none; }
.run-progress progress { width: 120px; height: 8px; accent-color: var(--accent); }
.run-progress .run-stage { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sub-head .pane-sub { margin-bottom: 6px; }
table.endpoints td.hits { white-space: nowrap; }
.input-collapsed button { font-size: 13px; padding: 4px 10px; }
.tile { padding: 8px; min-width: 0; }
.tile .k { line-height: 1.25; font-size: 11.5px; overflow-wrap: break-word; hyphens: auto; }
.tile .v { line-height: 1.2; font-variant-numeric: tabular-nums; }

/* Scroll cue: shades at the edges a figure or table can scroll toward.
   The covers move with the content (local), the shades stay (scroll), so
   a shade shows only where more content is hidden. No script needed. */
.scroll-x, .walk-fig, .scroll {
  --scroll-bg: var(--surface-0);
  background:
    linear-gradient(to right, var(--scroll-bg) 30%, transparent) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--scroll-bg) 30%, transparent) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shade), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shade), transparent) right center / 12px 100% no-repeat scroll;
  background-color: var(--scroll-bg);
}
:is(.card, .pane, .walk-step, .rule-card, .notice-aside, .alert) :is(.scroll-x, .walk-fig, .scroll) { --scroll-bg: var(--surface-1); }
.scroll-hint { display: none; }
@media (max-width: 720px) {
  .scroll-hint { display: block; color: var(--text-muted); font-size: 12.5px; margin: 4px 0 6px; }
  .scroll-hint[hidden] { display: none; }
  .walk-fig.wide-min svg.chart:not(.key-line) { min-width: 600px; }
  .walk-fig.wide-min { overflow-x: auto; }
}

/* Records and endpoints on phones: one card per row, each cell labelled. */
@media (max-width: 720px) {
  :is(table.records, table.endpoints, table.layers, table.cards) { min-width: 0 !important; }
  :is(table.records, table.endpoints, table.layers, table.cards) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  :is(table.records, table.endpoints, table.layers, table.cards), :is(table.records, table.endpoints, table.layers, table.cards) :is(tbody, tr, td, th[scope="row"]) { display: block; width: 100%; }
  :is(table.records, table.endpoints, table.layers, table.cards) tr { border-bottom: 1px solid var(--border); padding: 8px 4px; }
  :is(table.records, table.endpoints, table.layers, table.cards) tr[hidden] { display: none; }
  :is(table.records, table.endpoints, table.layers, table.cards) :is(td, th[scope="row"]) { border: 0; padding: 2px 0; min-width: 0 !important; }
  :is(table.records, table.endpoints, table.layers, table.cards) td.num { text-align: left; }
  :is(table.records, table.endpoints, table.layers, table.cards) td[data-label] { position: relative; padding-left: 92px; }
  :is(table.records, table.endpoints, table.layers, table.cards) td[data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 3px; width: 84px;
    color: var(--text-muted); font-size: 12px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 400;
  }
  :is(table.records, table.endpoints, table.layers, table.cards) td.url { overflow-wrap: anywhere; }
  :is(table.endpoints) td.host { white-space: normal; overflow-wrap: anywhere; }
  table.records .chip { white-space: normal; overflow-wrap: anywhere; }
  /* The head cells (tier, score, time, cluster) open the card on one line,
     before the rules and the URL that follow them in the table. */
  table.records tbody tr:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; }
  table.records td.rc-head { order: -1; }
  table.records td.rules { max-width: none; }
  :is(table.records, table.endpoints, table.layers, table.cards) tr.sel { background: var(--code-bg); }
  /* A record card opens on one line: tier, score, time and cluster. */
  :is(table.records, table.cards) td.rc-head[data-label] { display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0; margin: 0 12px 4px 0; vertical-align: middle; }
  :is(table.records, table.cards) td.rc-head[data-label]::before { content: none; }
  :is(table.records, table.cards) td.rc-head.rc-lab[data-label]::before { content: attr(data-label); position: static; width: auto; }
  /* Attribution: the layer heads its group of candidates. */
  table.layers tr { border-bottom: 0; padding: 2px 4px; }
  table.layers tr:has(> th[scope="row"]) { border-top: 1px solid var(--border); padding-top: 8px; }
  table.layers th[scope="row"] { font-size: 13.5px; padding-bottom: 4px; }
  /* A candidate is two lines: who, then its label, evidence and tag. */
  table.layers td[data-label] { padding-left: 0; }
  table.layers td[data-label]::before { content: none; }
  table.layers td:is([data-label="Label"], [data-label="Evidence"], [data-label="Tag"]) { display: inline-block; width: auto; margin-right: 10px; color: var(--text-secondary); }
  table.layers td[data-label="Party"] { font-weight: 600; }
  /* A file read without a problem has no problem line. */
  table.files td.file-note:empty { display: none; }
}
.conf-pair { white-space: nowrap; }

/* Workbench records: the URL column keeps a readable share of a wide table. */
@media (min-width: 721px) {
  table.records td.url { width: 50%; }
  table.records :is(th, td) { padding: 6px 7px; }
}
@media (min-width: 1261px) {
  .workbench { grid-template-columns: minmax(280px, 300px) minmax(0, 1fr) minmax(260px, 300px); }
}
.more-rows { margin: 8px 0 0; }
.lede-card { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 6px; }

/* Text-heavy walk figures keep their drawn width on phones and scroll in
   their box, so their labels stay at the size they were drawn. */
@media (max-width: 720px) {
  :is(.walk-fig, .walk-fig.wide-min) svg.chart:is(.layers-fig, .score-fig, .ladder-fig, .bands-fig, .flow-fig) { min-width: 720px; }
}

/* Folded figures on the landing: a compact "Show the figure" control on
   phones (home.js closes them there); open above 720 px, where the
   control is not shown. The notice filters fold the same way. */
details.fig-fold { margin: 0; min-width: 0; }
:is(details.fig-fold, details.filters-fold) > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; cursor: pointer; list-style: none;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface-1); color: var(--accent-ink); font-size: 14px; font-weight: 600;
}
:is(details.fig-fold, details.filters-fold) > summary::-webkit-details-marker { display: none; }
:is(details.fig-fold, details.filters-fold) > summary::before {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg);
}
:is(details.fig-fold, details.filters-fold)[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
:is(details.fig-fold, details.filters-fold) > summary:hover { border-color: var(--accent); }
details.fig-fold[open] > summary { margin-bottom: 8px; }
details.filters-fold { margin: 0 0 12px; }
details.filters-fold[open] > summary { margin-bottom: 10px; }
@media (min-width: 721px) {
  :is(details.fig-fold, details.filters-fold)[open] > summary { display: none; }
}

/* A notice's stage: indicators only, or named. */
.notice-stage { display: inline-block; font-size: 13px; color: var(--text-secondary); margin: 2px 0 0; }
.notice-stage::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--accent); vertical-align: 1px; }
:is(p, div).notice-stage { display: block; }

/* Touch screens: small disclosure controls and checkboxes get a target
   large enough for a finger. */
@media (hover: none) {
  :is(.as-table, .rule-test, .claims, .more, .internal-review, .editor details) > summary { min-height: 32px; padding: 6px 0; box-sizing: border-box; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
}

/* Print: the page's text, not its controls. The operators' guide and the
   notices print on plain paper with their links spelled out. */
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --surface-0: #ffffff; --surface-1: #ffffff; --surface-2: #f4f4f4; --border: #bbbbbb;
    --text-primary: #000000; --text-secondary: #222222; --text-muted: #444444;
    --accent-ink: #000000; --code-bg: #f1f1f1; --shadow: none;
  }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.45; display: block; }
  .site-head, .site-foot, .skip, .doc-nav, .toc, .on-this-page, .theme-toggle, .tip, .page-ref, .doc-src,
  .filters-fold, details.filters-fold, button, .button, .ctas, .live-box, .steps, [data-notice-none] { display: none !important; }
  main, main.wrap, .wrap, .wrap.wide { max-width: none; padding: 0; margin: 0; }
  .doc-layout { display: block; }
  .card, .callout-card, .pane, .notice-aside, .alert { box-shadow: none; border-color: #bbb; background: #fff !important; break-inside: avoid; }
  /* Folded sections print open. */
  details::details-content { content-visibility: visible; display: contents; }
  details > summary { list-style: none; font-weight: 600; }
  h1, h2, h3 { break-after: avoid; }
  tr, figure, pre, blockquote { break-inside: avoid; }
  .scroll, .scroll-x, .walk-fig { overflow: visible !important; background: none !important; }
  table { width: 100%; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after, .notice-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
  .pill, .chip, .badge { border: 1px solid #888; background: none !important; color: #000 !important; }
}

/* ── Check my logs ─────────────────────────────────────────────────── */
.verdict-line { font-size: 15px; max-width: 80ch; }
.next-steps { padding-left: 20px; max-width: 80ch; }
.next-steps li { margin: 6px 0; }
