/* ==========================================================================
   scorethis.site — web UI
   Direction E: D's bold product layout, set in IBM Plex Serif + IBM Plex Mono,
   with instrument-like precision (hairlines, 2–6px radii, tabular numbers).

   One file. Tokens first (light, then dark), fonts, base, layout, components, print.
   No raw colour values below the token block. CSP is self-only: no inline styles,
   so every visual state is a class.

   Class map (templates/):
     base.html       .site-header .wordmark .site-nav .site-footer .skip .sprite
     index.html      .hero .display .lede .audit-form .url-input .preview .waffle--mini
                     .levels .level-card .band .facts .split
     progress.html   .run-head .run-grid .meter .leave-note .steps
     report.html     .report-head .report-meta .actions .share .expiry
                     .summary .score .criteria .waffle .cell .key .totals .total
                     .howto .toc .level-head .criterion .page-group .finding
                     .evidence .node .crop .code .selector .fix .checklist .check
                     .pages-table .about .spec
     failed/not_found .notice
   Level modifiers: .is-fail .is-review .is-manual .is-clear (always paired with a
   distinct glyph and a text label; colour is never the only signal).
   ========================================================================== */

/* ---------- 1. Tokens: light ---------- */
:root {
  color-scheme: light dark;

  /* Surfaces + text */
  --color-bg: #f6f5f1;
  --color-surface: #ffffff;
  --color-surface-2: #edebe4;
  --color-text: #0e1022;
  --color-text-muted: #4b4f63;
  --color-border: #d9d6cc;
  --color-border-strong: #767a8c;
  --color-rule: #0e1022;

  /* Brand + interaction */
  --color-accent: #2233c4;
  --color-accent-text: #ffffff;
  --color-accent-strong: #18249a;
  --color-accent-soft: #e6e9fb;
  --color-link: #2233c4;
  --color-focus: #c2410c;
  --color-focus-inverse: #ffffff;
  --color-band: #2233c4;
  --color-band-text: #ffffff;
  --color-band-muted: #dfe2ff;

  /* Result levels: fg >= 4.5:1 on bg, surface and own *-bg */
  --color-fail: #b3261e;
  --color-fail-bg: #fde7e4;
  --color-review: #8a4a00;
  --color-review-bg: #fcefd6;
  --color-manual: #5a3ea6;
  --color-manual-bg: #efeafb;
  --color-pass: #146b3a;
  --color-pass-bg: #e1f3e7;

  /* Code */
  --color-code-bg: #0e1022;
  --color-code-text: #e8eaf6;

  /* Type */
  --font-serif: "IBM Plex Serif", "Iowan Old Style", "Charter", "Bitstream Charter", Cambria, Georgia, ui-serif, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.1875rem, 1.12rem + 0.3vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.22rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.125rem, 1.5rem + 2.9vw, 3.75rem);
  --step-5: clamp(2.5rem, 1.4rem + 5vw, 5.5rem);
  --leading-tight: 1.04;
  --leading-snug: 1.2;
  --leading-body: 1.6;
  --measure: 66ch;
  --tracking-label: 0.08em;

  /* Space: 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --page-max: 76rem;
  --page-gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);

  /* Radius: precise, never pills */
  --radius-xs: 2px;
  --radius-s: 4px;
  --radius-m: 6px;

  --focus-width: 3px;
  --focus-offset: 2px;

  --motion-fast: 120ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 1b. Tokens: dark (screen only; print always uses light) ---------- */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b0c12;
    --color-surface: #14161e;
    --color-surface-2: #1e2130;
    --color-text: #f1f2f6;
    --color-text-muted: #a9adc0;
    --color-border: #2c2f3f;
    --color-border-strong: #7c8197;
    --color-rule: #f1f2f6;

    --color-accent: #8f9bff;
    --color-accent-text: #0b0c12;
    --color-accent-strong: #aeb6ff;
    --color-accent-soft: #1a1e3c;
    --color-link: #9ca7ff;
    --color-focus: #ff8a5c;
    --color-focus-inverse: #ffffff;
    --color-band: #1a2290;
    --color-band-text: #ffffff;
    --color-band-muted: #d3d7ff;

    --color-fail: #ff8f85;
    --color-fail-bg: #3a1614;
    --color-review: #f3b75a;
    --color-review-bg: #33240c;
    --color-manual: #c5aeff;
    --color-manual-bg: #261b3f;
    --color-pass: #6edc9b;
    --color-pass-bg: #0f2d1c;

    --color-code-bg: #05060a;
    --color-code-text: #e8eaf6;
  }
}

/* ---------- 2. Fonts (SIL OFL 1.1, self-hosted; licences in fonts/) ---------- */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-400.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-400i.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-400i.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-500.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-600.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-700.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ibm-plex-serif-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--space-5); }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-variant-numeric: lining-nums;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
p, ul, ol, dl, dd, figure, pre { margin: 0; }
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd, samp, .mono { font-family: var(--font-mono); font-size: 0.9em; font-variant-ligatures: none; }
strong { font-weight: 600; }
main:focus { outline: none; }

:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-xs);
}
.band :focus-visible { outline-color: var(--color-focus-inverse); }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: var(--space-4); top: -10rem; z-index: 10;
  background: var(--color-accent); color: var(--color-accent-text);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-s); font-weight: 600;
}
.skip:focus { top: var(--space-4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- 4. Layout + type helpers ---------- */
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-gutter); }
.narrow { max-width: 48rem; }
.section { padding-block: var(--space-8) 0; }

/* Instrument labels: mono, uppercase, tracked. */
.label {
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500; line-height: 1.4;
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted);
}
h2.label, h3.label { font-family: var(--font-mono); font-weight: 500; letter-spacing: var(--tracking-label); }
.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2);
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted);
}
.eyebrow__sep { color: var(--color-border-strong); }
.eyebrow .glyph { width: 1rem; height: 1rem; }
.display { font-size: var(--step-5); line-height: var(--leading-tight); letter-spacing: -0.03em; font-weight: 500; }
.h-section { font-size: var(--step-3); line-height: 1.1; letter-spacing: -0.022em; font-weight: 500; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--color-text-muted); max-width: 46ch; }
.lede strong { color: var(--color-text); }
.muted { color: var(--color-text-muted); }
.small { font-size: var(--step--1); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.url-text { font-family: var(--font-mono); overflow-wrap: anywhere; word-break: break-word; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-3); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-5); }

.section-head { display: grid; gap: var(--space-3); align-content: start; padding-top: var(--space-4); border-top: 1px solid var(--color-rule); }
.section-head .lede { margin-top: var(--space-1); }

/* ---------- 5. Header + footer ---------- */
.site-header { border-bottom: 1px solid var(--color-border); background: var(--color-bg); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5); padding-block: var(--space-2); }
.wordmark {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px;
  color: var(--color-text); text-decoration: none;
}
.wordmark__mark { width: 1.5rem; height: 1.5rem; color: var(--color-accent); }
.wordmark__text { font-family: var(--font-serif); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1; }
.wordmark__tld { color: var(--color-accent); }
/* "this" sits a touch off the text colour, toward grey (still far above 4.5:1). */
.wordmark__this { color: color-mix(in srgb, var(--color-text) 72%, var(--color-text-muted)); }
.wordmark:hover .wordmark__text { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-1); list-style: none; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--space-3);
  color: var(--color-text); text-decoration: none; border-radius: var(--radius-s);
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500;
}
.site-nav a:hover { background: var(--color-surface-2); text-decoration: underline; }

.site-footer { margin-top: var(--space-8); border-top: 1px solid var(--color-rule); padding-block: var(--space-6) var(--space-6); }
.site-footer__grid { display: grid; gap: var(--space-5); }
.footer-note { display: grid; gap: var(--space-3); max-width: var(--measure); color: var(--color-text-muted); font-size: var(--step--1); }
.footer-note__brand .wordmark__text { font-size: 1.25rem; color: var(--color-text); }
.footer-note__tag { color: var(--color-text); font-size: var(--step-0); }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--color-border);
  font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted);
}
.footer-legal a { display: inline-flex; align-items: center; min-height: 24px; color: var(--color-link); }

/* ---------- 6. Glyphs + level colours ---------- */
.glyph { width: 1.05em; height: 1.05em; flex: none; display: inline-block; }
.is-fail   { --lvl: var(--color-fail);   --lvl-bg: var(--color-fail-bg); }
.is-review { --lvl: var(--color-review); --lvl-bg: var(--color-review-bg); }
.is-manual { --lvl: var(--color-manual); --lvl-bg: var(--color-manual-bg); }
.is-clear  { --lvl: var(--color-pass);   --lvl-bg: var(--color-pass-bg); }
.is-fail .glyph, .is-review .glyph, .is-manual .glyph, .is-clear .glyph,
.is-fail.glyph, .is-review.glyph { color: var(--lvl); }

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-5);
  border: 1px solid var(--color-accent); border-radius: var(--radius-s);
  background: var(--color-accent); color: var(--color-accent-text);
  font: 600 var(--step-0)/1.2 var(--font-serif); text-decoration: none; cursor: pointer;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);
}
.btn:hover { background: var(--color-accent-strong); border-color: var(--color-accent-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn[hidden] { display: none; }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border-strong); }
.btn--secondary:hover { background: var(--color-surface-2); border-color: var(--color-text); }
.btn--xl { min-height: 56px; padding-inline: var(--space-6); font-size: var(--step-1); }

/* ---------- 8. Form ---------- */
.audit-form { margin-top: var(--space-6); max-width: 52rem; }
.field { display: grid; gap: var(--space-2); }
.field__label { font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.field__hint { color: var(--color-text-muted); font-size: var(--step--1); }
.field__error {
  display: flex; gap: var(--space-2); align-items: flex-start;
  color: var(--color-fail); font-weight: 600; font-size: var(--step-0); line-height: 1.45;
}
.field__error .glyph { margin-top: 0.2em; color: var(--color-fail); }
.audit-form__row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-1); }
.url-input {
  flex: 1 1 15rem; min-width: 0; min-height: 56px; padding: 0 var(--space-4);
  font: 400 var(--step-1)/1.2 var(--font-mono); color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-s);
  box-shadow: inset 0 1px 0 var(--color-border);
}
.url-input:hover { border-color: var(--color-text); }
.url-input:focus-visible { border-color: var(--color-accent); }
.field--error .url-input { border: 2px solid var(--color-fail); }
.audit-form__facts {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); list-style: none; padding: 0; margin-top: var(--space-4);
  font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted);
}
.audit-form__facts li { display: inline-flex; align-items: center; gap: var(--space-2); }
.audit-form__facts li::before { content: ""; width: 0.5rem; height: 0.5rem; border: 1px solid var(--color-pass); background: var(--color-pass-bg); }
@media (max-width: 40rem) {
  .audit-form__row > * { flex-basis: 100%; }
  .url-input { font-size: var(--step-0); }
}

/* ---------- 9. Landing ---------- */
.hero { padding-block: var(--space-7) 0; }
.hero .display { margin-top: var(--space-4); max-width: 17ch; }
.hero__body { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); margin-top: var(--space-6); align-items: start; }
@media (min-width: 64rem) { .hero__body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-7); } }
.preview { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: var(--space-5); }
.preview__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.preview__site { font-size: var(--step--1); color: var(--color-text-muted); }
.preview__score { font-weight: 500; font-size: var(--step-4); line-height: 1; letter-spacing: -0.03em; }
.preview__score span { font-size: 0.4em; color: var(--color-text-muted); letter-spacing: 0; }
.preview__cap { margin-top: var(--space-1); font-size: var(--step--1); color: var(--color-text-muted); }
.preview__caption { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--color-border); font-size: var(--step--1); color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: baseline; }

.levels { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); margin-top: var(--space-6); list-style: none; padding: 0; }
@media (min-width: 56rem) { .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.level-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--lvl);
  border-radius: var(--radius-m); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3);
}
.level-card__glyph { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-s); background: var(--lvl-bg); display: grid; place-items: center; }
.level-card__glyph .glyph { width: 1.35rem; height: 1.35rem; }
.level-card h3 { font-size: var(--step-2); }
.level-card p { color: var(--color-text-muted); }
.level-card .level-card__who {
  margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--color-border);
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--lvl);
}

.band { background: var(--color-band); color: var(--color-band-text); border-radius: var(--radius-m); padding: var(--space-7) var(--space-6); }
.band__grid { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 64rem) { .band__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-7); } }
.band h2 { font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.028em; font-weight: 500; }
.band p { color: var(--color-band-muted); font-size: var(--step-1); line-height: 1.5; max-width: 40ch; }
.band p strong { color: var(--color-band-text); }
@media (max-width: 40rem) { .band { padding: var(--space-6) var(--space-5); } }

.facts { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); margin-top: var(--space-6); border-top: 1px solid var(--color-border); }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { padding: var(--space-5) var(--space-5) var(--space-5) 0; border-bottom: 1px solid var(--color-border); }
@media (min-width: 48rem) { .fact + .fact { padding-left: var(--space-5); border-left: 1px solid var(--color-border); } .fact:nth-child(odd) { padding-left: 0; border-left: 0; } }
@media (min-width: 72rem) { .fact:nth-child(odd) { padding-left: var(--space-5); border-left: 1px solid var(--color-border); } .fact:first-child { padding-left: 0; border-left: 0; } }
.fact dt { display: grid; gap: var(--space-2); }
.fact__k { font-weight: 500; font-size: var(--step-4); line-height: 1; letter-spacing: -0.03em; }
.fact__t { font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text); }
.fact dd { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--step--1); line-height: 1.55; }

.split { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-7); } .split .prose { padding-top: var(--space-4); border-top: 1px solid var(--color-rule); } }
.split .prose { color: var(--color-text-muted); }

/* ---------- 10. Cards + chips ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: var(--space-6); }
@media (max-width: 40rem) { .card { padding: var(--space-5) var(--space-4); } }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2); max-width: 100%;
  min-height: 1.75rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-xs);
  background: var(--color-surface-2); color: var(--color-text);
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; line-height: 1.3;
}
.chip .mono, .chip code { font-size: 1em; }
.chip--level { background: var(--lvl-bg); color: var(--lvl); font-weight: 600; box-shadow: inset 0 0 0 1px var(--lvl); }
.chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.chip--rule { background: transparent; color: var(--color-text-muted); box-shadow: inset 0 0 0 1px var(--color-border); }
.chip__cap { text-transform: capitalize; }
.impact { display: inline-flex; gap: 2px; align-items: flex-end; height: 0.85rem; }
.impact i { width: 3px; background: currentColor; opacity: 0.22; }
.impact i:nth-child(1) { height: 35%; } .impact i:nth-child(2) { height: 55%; } .impact i:nth-child(3) { height: 78%; } .impact i:nth-child(4) { height: 100%; }
.impact[data-impact="critical"] i { opacity: 1; }
.impact[data-impact="serious"] i:nth-child(-n+3) { opacity: 1; }
.impact[data-impact="moderate"] i:nth-child(-n+2) { opacity: 1; }
.impact[data-impact="minor"] i:nth-child(1) { opacity: 1; }

/* ---------- 11. Progress ---------- */
.run-head { padding-block: var(--space-7) var(--space-6); display: grid; gap: var(--space-3); }
.run-head h1 { font-size: var(--step-4); line-height: 1.08; letter-spacing: -0.025em; font-weight: 500; overflow-wrap: anywhere; }
.run-head h1 .url-text { font-size: 0.66em; letter-spacing: -0.02em; font-weight: 400; }
.run-grid { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .run-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.meter { display: grid; gap: var(--space-4); }
.meter__count { font-weight: 500; font-size: clamp(4.5rem, 3rem + 6vw, 8rem); line-height: 0.9; letter-spacing: -0.045em; }
.meter__count span { font-size: 0.4em; color: var(--color-text-muted); letter-spacing: -0.01em; margin-left: 0.05em; }
.meter__status { font-size: var(--step-1); font-weight: 600; line-height: 1.4; }
.meter__note { color: var(--color-text-muted); }
progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 0.75rem; border: 0;
  border-radius: var(--radius-xs); background: var(--color-surface-2); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--color-border-strong); color: var(--color-accent);
}
progress::-webkit-progress-bar { background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
progress::-webkit-progress-value { background: var(--color-accent); }
progress::-moz-progress-bar { background: var(--color-accent); }
progress:indeterminate { background: repeating-linear-gradient(90deg, var(--color-accent) 0 8px, var(--color-surface-2) 8px 16px); }
progress:indeterminate::-webkit-progress-bar { background: repeating-linear-gradient(90deg, var(--color-accent) 0 8px, var(--color-surface-2) 8px 16px); }
.run-side { display: grid; gap: var(--space-6); }
.leave-note { padding: var(--space-5); border-radius: var(--radius-m); background: var(--color-accent-soft); display: grid; gap: var(--space-2); }
.leave-note a { overflow-wrap: anywhere; font-weight: 500; font-size: var(--step-1); }
.steps { list-style: none; padding: 0; margin-top: var(--space-3); border-top: 1px solid var(--color-border); }
.steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-3); border-bottom: 1px solid var(--color-border); }
.steps__n { font-family: var(--font-mono); font-size: var(--step--1); color: var(--color-text-muted); padding-top: 0.15em; }

/* ---------- 12. Report: head ---------- */
.report-head { padding-block: var(--space-7) var(--space-6); display: grid; gap: var(--space-5); }
.report-head h1 { font-size: clamp(1.75rem, 0.6rem + 5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; }
.report-head h1 .url-text { font-family: var(--font-serif); word-break: normal; }
.report-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-border); }
.report-meta > div { padding: var(--space-3) var(--space-4) var(--space-3) 0; }
.report-meta dt { font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); }
.report-meta dd { font-size: var(--step-0); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
@media (max-width: 40rem) { .actions .btn { flex: 1 1 100%; } }
.share { display: grid; gap: var(--space-2); max-width: 40rem; }
.share__input {
  width: 100%; min-height: 44px; padding: 0 var(--space-3);
  font: 400 var(--step--1)/1.2 var(--font-mono); color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-s);
}
.share__status:empty { display: none; }
.share__status { color: var(--color-pass); font-weight: 600; }
.share-print { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; }
.expiry { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--color-text-muted); font-size: var(--step--1); max-width: 70ch; }
.expiry svg { width: 1.125rem; height: 1.125rem; flex: none; margin-top: 0.15rem; color: var(--color-text); }
.expiry strong { color: var(--color-text); }

/* ---------- 13. Report: summary ---------- */
.summary__grid { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .summary__grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: var(--space-7); } }
.score { display: grid; gap: var(--space-3); align-content: start; }
.score__num { font-weight: 500; font-size: clamp(5rem, 3rem + 7vw, 8.5rem); line-height: 0.85; letter-spacing: -0.05em; }
.score__max { margin-left: 0.08em; font-size: 0.3em; letter-spacing: -0.01em; color: var(--color-text-muted); font-weight: 400; }
.score__caption { color: var(--color-text-muted); font-size: var(--step--1); line-height: 1.55; }
.score__caption strong { color: var(--color-text); }
.score__meter {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 0.5rem;
  background: var(--color-surface-2); border: 0; border-radius: var(--radius-xs); box-shadow: inset 0 0 0 1px var(--color-border-strong);
}
.score__meter::-webkit-meter-bar { background: var(--color-surface-2); border: 0; border-radius: var(--radius-xs); box-shadow: inset 0 0 0 1px var(--color-border-strong); height: 0.5rem; }
.score__meter::-webkit-meter-optimum-value, .score__meter::-webkit-meter-suboptimum-value, .score__meter::-webkit-meter-even-less-good-value { background: var(--color-accent); border-radius: 0; }
.score__meter::-moz-meter-bar { background: var(--color-accent); }

.criteria__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.criteria__head h3 { font-size: var(--step-2); }
.waffle { list-style: none; padding: 0; margin-top: var(--space-4); display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.cell {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-xs); padding: 5px;
  background: var(--lvl-bg); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--lvl);
  display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
}
.cell .glyph { width: 0.95rem; height: 0.95rem; }
.cell__id { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.cell.is-fail { box-shadow: inset 0 0 0 2px var(--color-fail); }
.cell.is-review { box-shadow: inset 0 0 0 2px var(--color-review); }
.cell.is-clear { background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-pass); }
.cell.is-manual { background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.cell.is-manual .cell__id, .cell.is-clear .cell__id { color: var(--color-text-muted); }
.waffle--mini { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; margin-top: var(--space-4); }
.waffle--mini .cell { padding: 0; align-items: center; justify-content: center; }
.waffle--mini .cell .glyph { width: 0.75rem; height: 0.75rem; }
@media (max-width: 64rem) { .waffle { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .waffle { grid-template-columns: repeat(5, minmax(0, 1fr)); } .waffle--mini { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2px; } .waffle--mini .cell .glyph { width: 0.55rem; height: 0.55rem; } }
.key { list-style: none; padding: 0; margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.key li { display: inline-flex; align-items: center; gap: var(--space-2); }
.key .glyph { width: 1rem; height: 1rem; }

.totals { list-style: none; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); margin-top: var(--space-4); }
@media (min-width: 48rem) { .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.total {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: end; height: 100%;
  padding: var(--space-5); border-radius: var(--radius-m); background: var(--lvl-bg); color: var(--color-text); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--lvl);
}
.total:hover { box-shadow: inset 0 0 0 2px var(--lvl); }
.total:hover .total__label { text-decoration: underline; }
.total__n { font-weight: 500; font-size: var(--step-4); line-height: 0.9; letter-spacing: -0.04em; }
.total__label { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; font-size: var(--step-1); color: var(--lvl); grid-column: 1 / -1; }
.total__sub { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text); }
.total__arrow { width: 1.25rem; height: 1.25rem; color: var(--lvl); align-self: start; grid-row: 1; grid-column: 2; }

.howto { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
@media (min-width: 56rem) { .howto { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: var(--space-5); } }
.howto .prose { color: var(--color-text-muted); }
.howto strong { color: var(--color-text); }

.toc { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
@media (min-width: 56rem) { .toc { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: var(--space-5); } }
.toc__list { list-style: none; padding: 0; columns: 2 22rem; column-gap: var(--space-6); }
.toc__list li { break-inside: avoid; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 var(--space-3); padding-block: var(--space-2); border-bottom: 1px solid var(--color-border); }
.toc__list a { display: inline-flex; gap: var(--space-3); align-items: baseline; min-height: 24px; }
.toc__sc { min-width: 3.25rem; color: var(--color-text); font-size: var(--step--1); }
.toc__counts { display: inline-flex; gap: var(--space-3); font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.04em; }
.toc__counts > span { display: inline-flex; gap: var(--space-1); align-items: center; color: var(--lvl); font-weight: 600; }

/* ---------- 14. Report: level sections + findings ---------- */
.level-head { display: grid; gap: var(--space-3); padding-bottom: var(--space-4); margin-bottom: var(--space-5); border-bottom: 2px solid var(--color-rule); }
@media (min-width: 56rem) { .level-head { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); align-items: end; } }
.level-head h2 { display: flex; align-items: center; gap: var(--space-3); font-size: var(--step-4); line-height: 1; letter-spacing: -0.03em; font-weight: 500; }
.level-head h2 .badge { display: grid; place-items: center; width: 0.9em; height: 0.9em; border-radius: var(--radius-s); background: var(--lvl-bg); box-shadow: inset 0 0 0 1px var(--lvl); flex: none; }
.level-head h2 .glyph { width: 0.5em; height: 0.5em; color: var(--lvl); }
.level-head h2 .count { color: var(--color-text-muted); font-weight: 400; }
.level-head p { color: var(--color-text-muted); }
.empty { padding: var(--space-5); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-m); color: var(--color-text-muted); max-width: var(--measure); }

.criterion { margin-top: var(--space-6); }
.criterion:first-of-type { margin-top: 0; }
.criterion__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.criterion__title { font-size: var(--step-2); line-height: 1.2; }
.criterion__sc { font-size: 0.75em; font-weight: 600; color: var(--lvl); margin-right: 0.25em; letter-spacing: -0.02em; }
.page-group { margin-top: var(--space-4); display: grid; gap: var(--space-3); }
.page-group__url { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; font-size: var(--step--1); font-weight: 500; }
.page-group__url .url-text { font-weight: 500; }

.finding { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--lvl); border-radius: var(--radius-m); overflow: hidden; }
.finding__head { padding: var(--space-5) var(--space-5) 0; display: grid; gap: var(--space-3); }
.finding__title { font-size: var(--step-1); line-height: 1.3; }
.finding__desc { padding: var(--space-3) var(--space-5) 0; max-width: 62ch; }
.evidence { padding: var(--space-4) var(--space-5) var(--space-5); display: grid; gap: var(--space-3); }
.evidence__count { padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.nodes { list-style: none; padding: 0; display: grid; gap: var(--space-4); }
.node { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 56rem) { .node { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); align-items: start; } .node--nocrop { grid-template-columns: minmax(0, 1fr); } }
.node + .node { padding-top: var(--space-4); border-top: 1px dashed var(--color-border); }
.crop { border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--color-border); background: var(--color-surface-2); }
.crop__frame { padding: var(--space-3); background: repeating-conic-gradient(var(--color-surface-2) 0 25%, var(--color-surface) 0 50%) 0 0 / 12px 12px; }
.crop img { width: 100%; max-height: 22rem; object-fit: contain; object-position: left top; outline: 2px dashed var(--lvl); outline-offset: 3px; }
.node__code { display: grid; gap: var(--space-2); min-width: 0; align-content: start; }
.code {
  background: var(--color-code-bg); color: var(--color-code-text); border-radius: var(--radius-s);
  padding: var(--space-3) var(--space-4); font-size: 0.8125rem; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: var(--space-1);
}
.code code { font-size: 1em; }
.selector { display: block; font-size: 0.8125rem; padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); background: var(--color-surface-2); overflow-wrap: anywhere; }
.node__note { margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--lvl); background: var(--lvl-bg); border-radius: 0 var(--radius-s) var(--radius-s) 0; display: grid; gap: var(--space-1); font-size: var(--step--1); }
.node__note .label { color: var(--color-text); }
.more { border: 1px solid var(--color-border); border-radius: var(--radius-s); }
.more > summary {
  cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4);
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500; color: var(--color-link);
}
.more > summary:hover { text-decoration: underline; }
.more[open] > summary { border-bottom: 1px solid var(--color-border); }
.more > .nodes { padding: var(--space-4); }
.fix { margin: 0 var(--space-5) var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; }
.fix a { font-weight: 600; display: inline-flex; align-items: center; min-height: 24px; }
.fix a::after { content: " →"; white-space: pre; }
.fix--print { font-size: var(--step--1); }
@media (max-width: 40rem) {
  .finding__head { padding: var(--space-4) var(--space-4) 0; }
  .finding__desc { padding: var(--space-3) var(--space-4) 0; }
  .evidence { padding: var(--space-4); }
  .fix { margin: 0 var(--space-4) var(--space-4); }
}

/* ---------- 15. Report: manual checklist ---------- */
.checklist { list-style: none; padding: 0; display: grid; gap: 0 var(--space-6); grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--color-border); }
@media (min-width: 64rem) { .checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check { padding: var(--space-5) 0; border-bottom: 1px solid var(--color-border); display: grid; gap: var(--space-2); align-content: start; }
.check__title { font-size: var(--step-1); line-height: 1.3; display: flex; gap: var(--space-2); align-items: baseline; }
.check__title::before { content: ""; flex: none; width: 0.7em; height: 0.7em; border: 2px solid var(--color-manual); border-radius: 50%; transform: translateY(0.02em); }
.check__refs { font-size: var(--step--2); letter-spacing: 0.02em; color: var(--color-text-muted); }
.check__how { overflow-wrap: anywhere; text-wrap: wrap; font-size: 0.9375rem; line-height: 1.55; }
.check__hints { margin-top: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: var(--radius-s); background: var(--color-manual-bg); display: grid; gap: var(--space-1); font-size: var(--step--1); }
.check__hints .label { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); }
.check__hints .label svg { width: 1rem; height: 1rem; color: var(--color-manual); }
.check__hints ul { padding-left: 1.1rem; }

/* ---------- 16. Report: pages table + about ---------- */
.section > .h-section { margin-bottom: var(--space-5); padding-top: var(--space-4); border-top: 2px solid var(--color-rule); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-m); border: 1px solid var(--color-border); background: var(--color-surface); }
.pages-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.pages-table th, .pages-table td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); vertical-align: top; }
.pages-table thead th { font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); background: var(--color-surface-2); }
.pages-table tbody th { font-weight: 400; }
.pages-table tbody tr:last-child > * { border-bottom: 0; }
.pages-table .n { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pages-table__title { display: block; font-weight: 600; font-size: var(--step-0); }
.pages-table .url-text { display: block; color: var(--color-text-muted); font-size: 0.8125rem; }
.pages-table__error { display: flex; gap: var(--space-2); align-items: flex-start; margin-top: var(--space-1); color: var(--color-fail); font-weight: 600; }
.pages-table__error .glyph { color: var(--color-fail); margin-top: 0.2em; }
@media (max-width: 40rem) {
  .pages-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pages-table, .pages-table tbody, .pages-table tr, .pages-table td, .pages-table th { display: block; width: 100%; }
  .pages-table tr { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
  .pages-table tbody tr:last-child { border-bottom: 0; }
  .pages-table th, .pages-table td { padding: var(--space-1) 0; border: 0; }
  .pages-table .n { text-align: left; }
  .pages-table td[data-label]::before { content: attr(data-label) ": "; color: var(--color-text-muted); font-family: var(--font-mono); font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.04em; }
}
.about__grid { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .about__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.spec { border-top: 1px solid var(--color-border); align-self: start; }
.spec > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-2); border-bottom: 1px solid var(--color-border); font-size: var(--step--1); }
.spec dt { font-family: var(--font-mono); font-size: var(--step--2); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); padding-top: 0.2em; }
.spec dd { overflow-wrap: anywhere; }

/* ---------- 17. Notices (failed, not found) ---------- */
.notice { margin-top: var(--space-7); padding: var(--space-6); background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--lvl, var(--color-accent)); border-radius: var(--radius-m); display: grid; gap: var(--space-4); }
.notice h1 { font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; }
.notice .eyebrow { color: var(--lvl, var(--color-text-muted)); }
.notice__detail { padding: var(--space-4); border-radius: var(--radius-s); background: var(--lvl-bg, var(--color-surface-2)); display: grid; gap: var(--space-1); }
.notice__detail .label { color: var(--color-text); }
.notice__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 40rem) { .notice { padding: var(--space-5) var(--space-4); } }

/* ---------- 18. Print (A4, what /r/{id}.pdf renders; also ?print=1 on screen) ---------- */
@page { size: A4; margin: 14mm 13mm 16mm; }
@media print {
  html { font-size: 87.5%; }
  body { background: #ffffff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .skip, .site-nav, .actions, .share, .expiry, .more > summary, #copy-link { display: none !important; }
  .site-header { border-bottom: 1px solid var(--color-rule); background: #ffffff; }
  .total__arrow { display: none; }
  .cell { padding: 3px; }
  .cell__id { font-size: 0.5rem; letter-spacing: -0.06em; }
  .site-footer { margin-top: var(--space-6); }
  .wrap { max-width: none; padding-inline: 0; }
  a { color: var(--color-text); }
  .report-head { padding-top: var(--space-5); }
  .summary__grid { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--space-6); }
  .waffle { grid-template-columns: repeat(11, minmax(0, 1fr)); }
  .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .howto, .toc { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
  .node { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
  .node--nocrop { grid-template-columns: minmax(0, 1fr); }
  .checklist { display: block; columns: 2; column-gap: 8mm; }
  .check { padding: var(--space-4) 0; }
  .section { padding-top: var(--space-7); }
  .more { border: 0; }
  .more > .nodes { padding: 0; }
  .card, .total, .finding, .node, .check, .level-card, .notice, .toc__list li, tr { break-inside: avoid; }
  .level-head, .criterion__head, .page-group__url, h2, h3, h4, h5 { break-after: avoid; }
  #fails, #review, #manual { break-before: page; }
}
.is-print .skip, .is-print .site-nav { display: none; }
