/* colorgears.com — self-hosted web fonts (D97 / Q34a; replaced again 2026-09-28, operator Q5a)

   Every src is a same-origin /fonts/<file> served from sites/colorgears.com/public/fonts by staticDir, so no
   visitor request leaves the site (CSP default-src 'self').

   Three variable families, each in TWO subsets — latin and vietnamese — split by unicode-range, so an English
   page never downloads the Vietnamese file and Vietnamese text (stacked marks: ặ ẫ ở ự) renders the moment it
   appears (every glyph verified with fontTools):
     Bricolage Grotesque Variable — display: wght 200–800 × wdth 75–100 × opsz 12–96;
     Mona Sans Variable — text, UI and data: wght 200–900 × wdth 75–125, tabular figures (+ italic);
     Geist Mono Variable — code and measured values: wght 100–900.
   All named "<Family> Variable" (fontsource's own names) so none collides with an engine family.

   Vendored the oldbooks way: @fontsource-variable/{bricolage-grotesque,mona-sans,geist-mono}@5.3.0 fetched with
   `npm pack` into a scratch dir (NOT a plinth dependency — D17), each .woff2 copied as
   <file>-<sha256 base64url, 8 chars>.woff2 with fontsource's own unicode-range kept. SIL OFL 1.1 licences sit next
   to the files (LICENSE-<package>.txt). Every face is proven to serve 200 font/woff2 by tests/self-hosted-fonts.test.ts. */

/* bricolage-grotesque-vietnamese-standard-normal */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(/fonts/bricolage-grotesque-vietnamese-standard-normal-7l_kpc7E.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* bricolage-grotesque-latin-standard-normal */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(/fonts/bricolage-grotesque-latin-standard-normal-p1aILYp4.woff2) format('woff2-variations');
  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;
}

/* mona-sans-vietnamese-standard-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/fonts/mona-sans-vietnamese-standard-normal-BxrOHq7O.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* mona-sans-latin-standard-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/fonts/mona-sans-latin-standard-normal-XqN0BjPl.woff2) format('woff2-variations');
  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;
}

/* mona-sans-vietnamese-standard-italic */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/fonts/mona-sans-vietnamese-standard-italic-xPJT4Cyn.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* mona-sans-latin-standard-italic */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/fonts/mona-sans-latin-standard-italic-aZn4KzHp.woff2) format('woff2-variations');
  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;
}

/* geist-mono-vietnamese-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geist-mono-vietnamese-wght-normal-05tgiJqU.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* geist-mono-latin-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geist-mono-latin-wght-normal-aErVtTH4.woff2) format('woff2-variations');
  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;
}

/* colorgears.com — the ONE public stylesheet (design-system rebuild 2026-09-28, operator Q13b).

   The public pages load exactly two sheets, in this order: colorgears-fonts.css (faces) and this file.
   They do NOT load the engine design core or the colorgears skin (that skin now serves the admin only),
   so everything a public page shows — including the markup the engine writes into it (the instrument
   form, markdown body classes, the no-JS notice) — is styled here.

   World: "Periodic Table of Signals". Every check is an element tile; the site is one full-width table.
   Light only (operator rule). Every page container is full width (operator rule): the only width caps
   below are the ~70ch prose measure (an inner text column, Q11a) and floating cards/popovers. */

@layer reset, tokens, base, layout, components, pages, utilities;

/* ─────────────────────────────── reset ─────────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
  ol, ul { padding: 0; }
  img, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  table { border-collapse: collapse; }
  [hidden] { display: none !important; }
}

/* ─────────────────────────────── tokens ─────────────────────────────── */
@layer tokens {
  :root {
    color-scheme: light;

    /* Paper, sheet, ink */
    --paper: #f6f7f9;
    --sheet: #ffffff;
    --ink: #0d1117;
    --ink-2: #3b4452;
    --ink-3: #5c6675;
    --rule: #d6dbe2;
    --rule-soft: #e7eaef;

    /* The ONE reserved marker: active / focus / you-are-here. Never a decoration. */
    --marker: #ffe14d;
    --marker-ink: #0d1117;
    --on-ink: #ffffff; /* text/marks on an ink or status fill */

    /* Eight groups — one per report section. Hue (numbers, bars) + tint (tile ground). Each group is
       ALSO carried by a drawn shape and a bar pattern, so colour is never the only signal. */
    --g-essential: #1d5bd8;   --g-essential-tint: #e7eefc;
    --g-crawl: #0f7445;       --g-crawl-tint: #e1f3e9;
    --g-performance: #8f5a06; --g-performance-tint: #fbefd9;
    --g-technical: #6636c0;   --g-technical-tint: #eee7fb;
    --g-security: #b3340f;    --g-security-tint: #fce8e1;
    --g-social: #b81f6f;      --g-social-tint: #fae4ef;
    --g-dns: #0b737c;         --g-dns-tint: #ddf2f3;
    --g-tech: #4e5968;        --g-tech-tint: #eceef1;

    /* Status — always paired with a drawn glyph and a word */
    --st-pass: #11773a;  --st-pass-tint: #e2f3e8;
    --st-warn: #9a5b00;  --st-warn-tint: #fdf0d6;
    --st-fail: #c0161b;  --st-fail-tint: #fde4e4;
    --st-info: #3b4452;  --st-info-tint: #eceef1;

    /* Type */
    --font-display: 'Bricolage Grotesque Variable', 'Mona Sans Variable', system-ui, sans-serif;
    --font-sans: 'Mona Sans Variable', system-ui, sans-serif;
    --font-mono: 'Geist Mono Variable', ui-monospace, 'Cascadia Code', monospace;
    --fs-display: clamp(3rem, 1.2rem + 4.4vw, 6rem);
    --fs-h1: clamp(2.25rem, 1.2rem + 2.8vw, 4rem);
    --fs-h2: clamp(1.75rem, 1.1rem + 1.9vw, 3rem);
    --fs-h3: 1.1875rem;
    --fs-body: 1rem;
    --fs-dense: 0.875rem;
    --fs-small: 0.8125rem;
    --fs-micro: 0.6875rem;

    /* Space — 4px base; more above a heading than below it */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
    --gutter: clamp(16px, 2.4vw, 40px);
    --measure: 70ch;

    /* The tile unit — the one geometry */
    --tile-gap: 6px;
    --radius: 3px;

    /* Depth — offset + blur, only on lift */
    --lift: 0 14px 30px -10px rgb(13 17 23 / 0.28), 0 2px 6px rgb(13 17 23 / 0.08);
    --lift-sm: 0 6px 14px -6px rgb(13 17 23 / 0.22);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* The spectrum: all eight groups side by side — used only where a surface is about every check at once
       (masthead, colophon, the close, ledger rules). Swiss grid hairlines sit at 9% ink. */
    --spectrum: linear-gradient(90deg, var(--g-essential) 0 12.5%, var(--g-crawl) 12.5% 25%, var(--g-performance) 25% 37.5%, var(--g-technical) 37.5% 50%, var(--g-security) 50% 62.5%, var(--g-social) 62.5% 75%, var(--g-dns) 75% 87.5%, var(--g-tech) 87.5% 100%);
    --grid-line: color-mix(in srgb, var(--ink) 9%, transparent);
  }
}

/* ─────────────────────────────── base ─────────────────────────────── */
@layer base {
  html { background: var(--paper); scroll-padding-top: 72px; }
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    font-stretch: 100%;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  ::selection { background: var(--marker); color: var(--marker-ink); }
  h1, h2, h3, h4 { font-weight: 720; line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
  h1, h2 { font-family: var(--font-display); font-weight: 760; letter-spacing: -0.03em; }
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); font-stretch: 100%; letter-spacing: -0.01em; }
  p { text-wrap: pretty; }
  a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
  a:hover { text-decoration-color: var(--ink); }
  :focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--marker); border-radius: var(--radius); }
  code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.875em; font-variant-ligatures: none; }
  hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s6) 0; }
  input::placeholder { color: var(--ink-3); opacity: 1; }
  input { caret-color: var(--ink); }
  html { scrollbar-color: var(--rule) transparent; scrollbar-width: thin; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--rule); border: 3px solid var(--paper); border-radius: 6px; }
}

/* ─────────────────────────────── layout: fixed regions ─────────────────────────────── */
@layer layout {
  .skip-link {
    position: absolute; left: var(--s2); top: -100px; z-index: 100;
    padding: var(--s2) var(--s4); background: var(--marker); color: var(--marker-ink);
    font-weight: 700; text-decoration: none; border-radius: var(--radius);
  }
  .skip-link:focus { top: var(--s2); }

  /* Masthead — the same fixed region on every page */
  .masthead {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: var(--s5);
    padding: 0 var(--gutter);
    min-height: 60px;
    background: var(--paper);
    border-bottom: 0;
  }
  .masthead::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--spectrum); }
  .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
  .brand__mark { width: 30px; height: 30px; flex: none; }
  .brand__word { font-family: var(--font-display); font-weight: 800;  font-size: 1.125rem; letter-spacing: -0.015em; }
  .masthead__nav { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
  .masthead__nav a {
    position: relative; padding: var(--s2) var(--s3);
    font-size: var(--fs-dense); font-weight: 600; font-stretch: 94%; white-space: nowrap;
    text-decoration: none; color: var(--ink-2); border-radius: var(--radius);
  }
  .masthead__nav a:hover { color: var(--ink); background: var(--rule-soft); }
  .masthead__nav a[aria-current="page"] { color: var(--ink); }
  .masthead__nav a[aria-current="page"]::after {
    content: ''; position: absolute; left: var(--s3); right: var(--s3); bottom: 2px; height: 4px; background: var(--marker);
  }
  .masthead .btn { margin-left: var(--s2); }

  /* Colophon — the closing fixed region */
  .colophon {
    margin-top: auto;
    display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s5);
    padding: var(--s8) var(--gutter) var(--s5);
    position: relative; background: var(--sheet); border-top: 0;
    font-size: var(--fs-dense);
  }
  .colophon::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--spectrum); }
  .colophon__lead { display: grid; gap: var(--s3); align-content: start; }
  .colophon__lead p { color: var(--ink-2); max-width: 46ch; }
  .colophon h2 { font-size: var(--fs-micro); font-stretch: 87%; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s3); }
  .colophon ul { list-style: none; display: grid; gap: var(--s2); }
  .colophon a { text-decoration: none; color: var(--ink-2); }
  .colophon a:hover { color: var(--ink); text-decoration: underline; }
  .colophon__base {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3);
    padding-top: var(--s5); border-top: 1px solid var(--rule-soft); color: var(--ink-3); font-size: var(--fs-small);
  }

  main { display: block; width: 100%; }
  .page { padding: 0 var(--gutter) var(--s9); container-type: inline-size; }
  .page--home { padding-bottom: 0; }
  .intro, .article__head, .report-head, .lost, .check-error { --col: calc((100cqw - 17 * var(--tile-gap)) / 18); position: relative; }
  .intro::before, .article__head::before, .report-head::before, .lost::before, .check-error::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 10px; border-top: 2px solid var(--ink);
    background: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px calc(var(--col) + var(--tile-gap)));
  }
  .article__head::before { grid-column: 1 / -1; }
  .article__head { padding-top: calc(var(--s5) + 10px); }
  .intro, .report-head, .lost, .check-error { margin-top: var(--s6); }
  .report-head::before, .lost::before { grid-column: 1 / -1; } /* clear the sticky masthead's spectrum rule so the column ruler shows */
  .band { padding-block: var(--s8); container-type: inline-size; --col: calc((100cqw - 17 * var(--tile-gap)) / 18); }
  .band + .band { border-top: 1px solid var(--rule); }
  .band--sheet { background: var(--sheet); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }

  @media (max-width: 860px) {
    .masthead { gap: var(--s3); flex-wrap: wrap; padding-block: var(--s2); }
    .masthead__nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 0; }
    .masthead__nav a { padding: var(--s2) 6px; font-size: 0.8125rem; }
    .masthead__nav a[aria-current="page"]::after { left: 6px; right: 6px; }
    .masthead .btn { margin-left: auto; }
    .colophon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .colophon__lead { grid-column: 1 / -1; }
  }
}

/* ─────────────────────────────── components ─────────────────────────────── */
@layer components {

  /* Buttons */
  .btn, .instrument-form button {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    min-height: 44px; padding: 0 var(--s5);
    font-weight: 700; font-stretch: 100%; font-size: var(--fs-dense); letter-spacing: 0.01em;
    text-decoration: none; border-radius: var(--radius); border: 1px solid var(--ink);
    background: var(--ink); color: var(--on-ink);
    transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 160ms;
  }
  .btn:hover, .instrument-form button:hover { transform: translateY(-1px); box-shadow: var(--lift-sm); }
  .btn:active, .instrument-form button:active { transform: translateY(0); box-shadow: none; }
  .btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
  .btn--ghost:hover { border-color: var(--ink); background: var(--sheet); }
  .btn--sm { min-height: 36px; padding: 0 var(--s4); }
  .btn svg { width: 16px; height: 16px; }

  /* The check form — engine markup (routes.ts renderFormBody / instrumentForm) */
  .instrument-form { display: flex; gap: var(--s2); align-items: stretch; width: 100%; }
  .instrument-form__field { flex: 1; display: block; min-width: 0; }
  .instrument-form__field > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .instrument-form input {
    width: 100%; min-height: 52px; padding: 0 var(--s4);
    font-family: var(--font-mono); font-size: 0.9375rem;
    background: var(--sheet); border: 1px solid var(--ink); border-radius: var(--radius);
  }
  .instrument-form input:focus { outline: none; box-shadow: 0 0 0 3px var(--marker), 0 0 0 4px var(--ink); }
  .instrument-form button { min-height: 52px; padding: 0 var(--s6); font-size: var(--fs-body); }
  .instrument-form__intro { color: var(--ink-2); max-width: 62ch; }

  /* ── The element tile ── */
  .el {
    --g: var(--g-tech); --gt: var(--g-tech-tint); --pat: none;
    position: relative;
    container-type: inline-size;
    display: grid; grid-template-rows: auto 1fr auto;
    min-width: 0;
    padding: 5px 6px 5px;
    background: var(--gt);
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--g) 30%, transparent);
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms;
  }
  .el::before { /* group bar: colour + pattern */
    content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0;
    background: var(--pat), var(--g);
  }
  .el__num { font-size: max(9px, 13cqw); font-weight: 700; color: var(--g); line-height: 1; padding-top: 3px; }
  .el__sym { font-family: var(--font-display); align-self: center; justify-self: center; font-size: 34cqw; font-weight: 800; font-stretch: 100%; letter-spacing: -0.03em; line-height: 1; }
  .el__name { font-size: max(8px, 12cqw); font-stretch: 75%; font-weight: 600; color: var(--ink-2); line-height: 1.1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  @container (max-width: 58px) { .el__name { display: none; } .el__sym { font-size: 38cqw; } }
  a.el:hover, a.el:focus-visible { transform: translateY(-3px); box-shadow: var(--lift); z-index: 6; background: var(--sheet); }
  a.el:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; box-shadow: 0 0 0 7px var(--marker), var(--lift); }

  /* Element card — the signature: hover/focus lifts a tile into its full card (CSS only) */
  .el__card {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 7;
    width: min(300px, 80vw);
    display: grid; gap: var(--s2);
    padding: var(--s4);
    background: var(--sheet); color: var(--ink);
    border: 1px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--lift);
    font-size: var(--fs-small); line-height: 1.45; text-align: left;
    display: none; opacity: 0; transform: translateY(-4px);
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), display 180ms allow-discrete;
    pointer-events: none;
  }
  .el--end .el__card { left: auto; right: 0; }
  .el--up .el__card { top: auto; bottom: calc(100% + 8px); }
  a.el:hover .el__card, a.el:focus-visible .el__card { display: grid; opacity: 1; transform: none; }
  @starting-style { a.el:hover .el__card, a.el:focus-visible .el__card { opacity: 0; transform: translateY(-4px); } }
  /* Touch and narrow screens: no hover cards — every tile links to its reference row, which carries the same card. */
  @media (hover: none), (max-width: 760px) { a.el .el__card { display: none !important; } }
  .el__card { border-color: var(--g); }
  .el__card-head {
    position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s3); align-items: center;
    margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s1); padding: calc(var(--s3) + 5px) var(--s4) var(--s3);
    background: var(--gt); border-bottom: 1px solid color-mix(in srgb, var(--g) 30%, transparent); border-radius: var(--radius) var(--radius) 0 0;
  }
  .el__card-head::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--pat), var(--g); border-radius: var(--radius) var(--radius) 0 0; }
  .el__card-sym { font-family: var(--font-display); grid-row: span 2; font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
  .el__card-num { font-size: var(--fs-micro); font-weight: 700; color: var(--g); }
  .el__card-name { font-weight: 750; font-size: var(--fs-dense); line-height: 1.25; }
  .el__card dl { display: grid; gap: var(--s2); }
  .el__card dt { font-size: var(--fs-micro); font-weight: 700; font-stretch: 87%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
  .el__card dd { color: var(--ink-2); }
  .el__card dd.el__card-value { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink); overflow-wrap: anywhere; }

  /* Group identities: hue, tint, bar pattern */
  .g-essential   { --g: var(--g-essential);   --gt: var(--g-essential-tint);   --pat: none; }
  .g-crawl       { --g: var(--g-crawl);       --gt: var(--g-crawl-tint);       --pat: repeating-linear-gradient(135deg, rgb(255 255 255 / 0.55) 0 2px, transparent 2px 5px); }
  .g-performance { --g: var(--g-performance); --gt: var(--g-performance-tint); --pat: radial-gradient(circle, rgb(255 255 255 / 0.7) 0.9px, transparent 1.2px) 0 0 / 4px 4px; }
  .g-technical   { --g: var(--g-technical);   --gt: var(--g-technical-tint);   --pat: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.55) 0 1px, transparent 1px 2px); }
  .g-security    { --g: var(--g-security);    --gt: var(--g-security-tint);    --pat: repeating-linear-gradient(45deg, rgb(255 255 255 / 0.5) 0 1px, transparent 1px 4px), repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.5) 0 1px, transparent 1px 4px); }
  .g-social      { --g: var(--g-social);      --gt: var(--g-social-tint);      --pat: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.55) 0 2px, transparent 2px 5px); }
  .g-dns         { --g: var(--g-dns);         --gt: var(--g-dns-tint);         --pat: conic-gradient(rgb(255 255 255 / 0.55) 25%, transparent 0 50%, rgb(255 255 255 / 0.55) 0 75%, transparent 0) 0 0 / 4px 4px; }
  .g-techstack   { --g: var(--g-tech);        --gt: var(--g-tech-tint);        --pat: repeating-linear-gradient(90deg, transparent 0 6px, rgb(255 255 255 / 0.7) 6px 7px); }

  /* Non-check tiles: ink edition (untagged pages/posts) and spectrum edition (about every check) */
  .el--ink { --g: var(--ink); --gt: var(--sheet); --pat: none; }
  .el--spectrum { --g: var(--ink); --gt: var(--sheet); }
  .el--spectrum::before { background: var(--spectrum); height: 6px; }

  /* Tile status (report) — word + glyph + colour, never colour alone */
  .el__status {
    display: flex; align-items: center; justify-content: center; gap: 3px;
    margin: 3px -6px -5px; padding: 2px 0;
    font-size: max(8px, 11cqw); font-weight: 750; font-stretch: 87%; letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .el__status svg { width: max(8px, 12cqw); height: max(8px, 12cqw); flex: none; }
  .el.is-pass .el__status { color: var(--st-pass); box-shadow: inset 0 2px 0 var(--st-pass); }
  .el.is-warn .el__status { color: var(--on-ink); background: var(--st-warn); }
  .el.is-fail .el__status { color: var(--on-ink); background: var(--st-fail); }
  .el.is-info .el__status { color: var(--st-info); box-shadow: inset 0 1px 0 var(--rule); }
  .el.is-absent { background: var(--sheet); border-style: dashed; border-color: var(--rule); }
  .el.is-absent::before { opacity: 0.25; }
  .el.is-absent .el__sym, .el.is-absent .el__name { color: var(--ink-3); }
  .el.is-fail { border-color: var(--st-fail); }
  .el.is-warn { border-color: var(--st-warn); }

  /* ── The periodic table ── */
  .ptable-wrap { container-type: inline-size; }
  .ptable {
    --tile: calc((100cqw - 17 * var(--tile-gap)) / 18);
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    grid-auto-rows: var(--tile);
    gap: var(--tile-gap);
    background: repeating-linear-gradient(to right, transparent 0 calc(var(--tile) + var(--tile-gap) / 2 - 0.5px), var(--grid-line) 0 calc(var(--tile) + var(--tile-gap) / 2 + 0.5px), transparent 0 calc(var(--tile) + var(--tile-gap)));
  }
  .ptable__notch {
    background: var(--paper); /* the grid hairlines stop at the notch — never behind text (Q3a) */
    grid-row: 1 / span 3; grid-column: 3 / span 10;
    display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--tile) * 0.16);
    padding: 0 calc(var(--tile) * 0.25) calc(var(--tile) * 0.08);
    min-width: 0;
  }
  .ptable__title, .ptable__notch h1 { font-family: var(--font-display);
    font-size: clamp(2rem, calc(var(--tile) * 0.8), 5.75rem);
     font-weight: 800; letter-spacing: -0.035em; line-height: 0.92;
  }
  .ptable__title--sm { font-size: clamp(1.75rem, calc(var(--tile) * 0.62), 4rem); }
  .ptable__notch .instrument-form__intro { font-size: clamp(0.9375rem, calc(var(--tile) * 0.22), 1.25rem); line-height: 1.35; }
  .ptable__sub { font-size: clamp(0.9375rem, calc(var(--tile) * 0.24), 1.3125rem); color: var(--ink-2); max-width: 54ch; line-height: 1.35; }
  .ptable__notch .instrument-form input, .ptable__notch .instrument-form button { min-height: clamp(48px, calc(var(--tile) * 0.72), 64px); }
  .r1 { grid-row: 1; } .r2 { grid-row: 2; } .r3 { grid-row: 3; } .r4 { grid-row: 4; }
  .c1 { grid-column: 1; } .c2 { grid-column: 2; } .c3 { grid-column: 3; } .c4 { grid-column: 4; } .c5 { grid-column: 5; } .c6 { grid-column: 6; }
  .c7 { grid-column: 7; } .c8 { grid-column: 8; } .c9 { grid-column: 9; } .c10 { grid-column: 10; } .c11 { grid-column: 11; } .c12 { grid-column: 12; }
  .c13 { grid-column: 13; } .c14 { grid-column: 14; } .c15 { grid-column: 15; } .c16 { grid-column: 16; } .c17 { grid-column: 17; } .c18 { grid-column: 18; }

  /* f-block: detached rows, offset like the lanthanides */
  .fblock { margin-top: calc(var(--tile-gap) * 4); }
  .fblock .ptable { grid-auto-flow: row; }
  .fblock__row-label { background: var(--paper); align-self: stretch; display: flex; align-items: center; justify-content: flex-end;
    grid-column: 1 / span 2; align-self: center; justify-self: end; padding-right: var(--s2);
    font-size: var(--fs-micro); font-weight: 700; font-stretch: 87%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); text-align: right; line-height: 1.2;
  }
  .fblock__end { grid-column: span 6; }

  /* Legend tile — how to read a tile */
  .el--legend { background: var(--sheet); border: 1px dashed var(--ink-3); }
  .el--legend::before { display: none; }
  .el--legend .el__sym { font-size: 22cqw; color: var(--ink-3); }

  /* Narrow screens: the silhouette folds into group order, 9 then 6 columns */
  @container (max-width: 980px) {
    .ptable { --tile: calc((100cqw - 8 * var(--tile-gap)) / 9); grid-template-columns: repeat(9, minmax(0, 1fr)); }
    .ptable > .el { grid-row: auto; grid-column: auto; }
    .ptable { grid-auto-rows: auto; }
    .ptable > .el, .ptable > .el--legend { aspect-ratio: 1 / 1; }
    .ptable__notch { grid-row: auto; grid-column: 1 / -1; justify-content: flex-start; padding: 0 0 var(--s5); }
    .ptable__title { font-size: clamp(2.25rem, 8cqw, 4rem); }
    .fblock__row-label { grid-column: 1 / -1; justify-self: start; justify-content: flex-start; text-align: left; }
    .fblock__row-label:empty, .fblock__end { display: none; }
    .ptable:not(.ptable--f) > .g-essential { order: 1; } .ptable:not(.ptable--f) > .g-crawl { order: 2; } .ptable:not(.ptable--f) > .g-performance { order: 3; }
    .ptable:not(.ptable--f) > .g-technical { order: 4; } .ptable:not(.ptable--f) > .g-security { order: 5; } .ptable:not(.ptable--f) > .g-social { order: 6; }
    .ptable:not(.ptable--f) > .g-dns { order: 7; } .ptable:not(.ptable--f) > .g-techstack { order: 8; }
  }
  @container (max-width: 560px) {
    .ptable { --tile: calc((100cqw - 5 * var(--tile-gap)) / 6); grid-template-columns: repeat(6, minmax(0, 1fr)); }
  }

  /* Key strip — the fixed legend under every table */
  .key { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--tile-gap); margin-top: var(--s4); }
  .key__item {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s2);
    padding: var(--s2) var(--s3); background: var(--gt); border: 1px solid color-mix(in srgb, var(--g) 30%, transparent); border-radius: var(--radius);
    font-size: var(--fs-small); text-decoration: none; color: var(--ink);
  }
  a.key__item:hover { border-color: var(--ink); }
  .key__swatch { position: relative; width: 22px; height: 22px; border-radius: 2px; background: var(--sheet); border: 1px solid color-mix(in srgb, var(--g) 35%, transparent); overflow: hidden; }
  .key__swatch::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--pat), var(--g); }
  .key__swatch svg { position: absolute; left: 50%; top: 58%; translate: -50% -50%; width: 11px; height: 11px; color: var(--g); }
  .key__name { font-weight: 650; font-stretch: 94%; line-height: 1.2; }
  .key__meta { color: var(--ink-3); font-size: var(--fs-micro); font-weight: 600; }
  .key__item > .grades, .key__item > .key__ungraded { grid-column: 1 / -1; }
  .key__ungraded { font-size: var(--fs-micro); color: var(--ink-3); font-weight: 600; }
  .key__item > .grades span { min-width: 0; height: 22px; font-size: var(--fs-micro); }

  /* Grade strip — a grade is always read against its full A–F scale */
  .grades { display: inline-grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .grades span {
    display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px;
    font-size: var(--fs-small); font-weight: 700; color: var(--ink-3);
    background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px;
  }
  .grades span.is-current { background: var(--marker); color: var(--marker-ink); border-color: var(--ink); font-weight: 850; }
  .grades--lg span { min-width: 40px; height: 40px; font-size: var(--fs-body); }

  /* Status pill (lists, tables) */
  .status { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 2px; font-size: var(--fs-micro); font-weight: 750; font-stretch: 87%; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
  .status svg { width: 11px; height: 11px; }
  .status--pass { color: var(--st-pass); background: var(--st-pass-tint); }
  .status--warn { color: var(--st-warn); background: var(--st-warn-tint); }
  .status--fail { color: var(--st-fail); background: var(--st-fail-tint); }
  .status--info, .status--unknown { color: var(--st-info); background: var(--st-info-tint); }

  /* Mini tile (lists, ledgers) */
  .mini { font-family: var(--font-display);
    --g: var(--g-tech); --gt: var(--g-tech-tint); --pat: none;
    position: relative; display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; background: var(--gt); border: 1px solid color-mix(in srgb, var(--g) 30%, transparent); border-radius: var(--radius);
    font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--ink); overflow: hidden;
  }
  .mini::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pat), var(--g); }
  .mini small { position: absolute; top: 4px; left: 4px; font-size: 8px; font-weight: 700; color: var(--g); line-height: 1; }
  .mini--ink { --g: var(--ink); --gt: var(--sheet); }

  /* Data table */
  .table-scroll, .data-scroll { width: 100%; overflow-x: auto; }
  .data {
    width: 100%; font-size: var(--fs-dense); font-stretch: 94%; background: var(--sheet);
    border: 1px solid var(--rule); border-radius: var(--radius);
  }
  .data th, .data td { padding: var(--s2) var(--s3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
  .data thead th { font-size: var(--fs-micro); font-weight: 700; font-stretch: 87%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); border-bottom-color: var(--rule); }
  .data tbody tr:hover { background: var(--rule-soft); }
  .data tbody tr:target { background: color-mix(in srgb, var(--marker) 45%, var(--sheet)); }
  .data td.mono, .data .mono { font-family: var(--font-mono); font-size: 0.78rem; overflow-wrap: anywhere; }
  .data tbody[class*="g-"] th[scope="rowgroup"] { background: var(--gt); }
  .data th[scope="rowgroup"] { background: var(--paper); font-size: var(--fs-small); font-weight: 750; padding-top: var(--s4); }
  .data .sym { width: 1%; font-weight: 800; white-space: nowrap; }
  .data .sym .mini { width: 34px; height: 34px; font-size: 0.875rem; }
  .data .mini small { display: none; }

  /* Notices */
  .notice { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; padding: var(--s4) var(--s5); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
  .notice svg { width: 20px; height: 20px; margin-top: 2px; }
  .notice--warn { background: var(--st-warn-tint); border-color: color-mix(in srgb, var(--st-warn) 45%, transparent); }
  .notice--warn svg { color: var(--st-warn); }
  .notice strong { display: block; font-weight: 750; }
  .nojs-notice { padding: var(--s3) var(--gutter); font-size: var(--fs-small); color: var(--ink-3); background: var(--sheet); border-top: 1px solid var(--rule-soft); }

  /* Check error (engine markup, routes.ts) */
  .check-redirect-notice__hops { margin-top: var(--s2); padding-left: 1.3em; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); overflow-wrap: anywhere; }
  .check-redirect-notice__status { color: var(--ink-3); }
  .bm-0 { fill: var(--g-essential); } .bm-1 { fill: var(--g-crawl); } .bm-2 { fill: var(--g-performance); } .bm-3 { fill: var(--g-technical); }
  .bm-4 { fill: var(--g-security); } .bm-5 { fill: var(--g-social); } .bm-6 { fill: var(--g-dns); } .bm-7 { fill: var(--g-tech); }
  .check-error { display: grid; gap: var(--s4); padding: var(--s7) 0; max-width: none; }
  .check-error__title { font-family: var(--font-display); font-size: var(--fs-h1);  }
  .check-error__body { font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; }
  .check-error .instrument-form { max-width: 880px; }

  /* Section header row */
  .head { position: relative; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3) var(--s6); margin-bottom: var(--s6); padding-top: calc(var(--s5) + 10px); }
  .band > .head::before { /* Swiss column ruler: a tick on every one of the table's 18 columns */
    content: ''; position: absolute; inset: 0 0 auto 0; height: 10px; border-top: 2px solid var(--g, var(--ink));
    background: repeating-linear-gradient(to right, var(--g, var(--ink)) 0 1px, transparent 1px calc(var(--col) + var(--tile-gap)));
  }
  .band > .head > div { max-width: calc(var(--col) * 10 + var(--tile-gap) * 9); }
  @media (max-width: 860px) { .band > .head > div { max-width: none; } }
  .head p { color: var(--ink-2); max-width: 64ch; }
  .head h2 + p, .head h1 + p { margin-top: var(--s2); }
}

/* ─────────────────────────────── prose (markdown bodies) ─────────────────────────────── */
@layer components {
  .prose { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
  .prose > * + * { margin-top: 1.1em; }
  .prose h2 { font-size: 1.625rem;  margin-top: 2.2em; scroll-margin-top: 80px; }
  .prose h3 { font-size: 1.25rem; margin-top: 1.8em; scroll-margin-top: 80px; }
  .prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
  .prose ul, .prose ol { padding-left: 1.3em; }
  .prose li + li { margin-top: 0.4em; }
  .prose li::marker { color: var(--ink-3); font-weight: 600; }
  .prose a { text-decoration-color: var(--ink-3); text-decoration-thickness: 2px; }
  .prose a:hover { text-decoration-thickness: 3px; }
  .prose strong { font-weight: 700; }
  .prose :not(pre) > code { padding: 0.1em 0.35em; background: var(--sheet); border: 1px solid var(--rule); border-radius: 3px; font-size: 0.84em; overflow-wrap: anywhere; }
  .prose pre { padding: var(--s4) var(--s5); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; font-size: 0.84rem; line-height: 1.6; }
  .prose blockquote { padding-left: var(--s5); border-left: 1px solid var(--ink); color: var(--ink-2); }
  .prose hr { margin: 2.4em 0; }
  .prose table { width: 100%; font-size: var(--fs-dense); background: var(--sheet); border: 1px solid var(--rule); }
  .prose th, .prose td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--rule-soft); text-align: left; }
  .prose th { font-weight: 700; background: var(--paper); }
  .prose img { border-radius: var(--radius); }
  .prose .caption, .prose figcaption { font-size: var(--fs-small); color: var(--ink-3); margin-top: var(--s2); }
  .prose .heading-permalink { margin-left: 0.3em; color: var(--ink-3); text-decoration: none; opacity: 0; }
  .prose h2:hover .heading-permalink, .prose h3:hover .heading-permalink, .prose .heading-permalink:focus-visible { opacity: 1; }
  .prose .faq__item { padding: var(--s4) 0; border-top: 1px solid var(--rule); }
  .prose .faq__q { font-weight: 700; }
  .prose .faq__a { margin-top: var(--s2); color: var(--ink-2); }
  .prose .term { font-weight: 700; }
  .prose .sidenote { display: block; margin: var(--s3) 0; padding: var(--s3) var(--s4); font-size: var(--fs-small); color: var(--ink-2); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
  .prose .sidenote-ref, .prose .note-num { font-size: 0.75em; font-weight: 700; vertical-align: super; line-height: 0; }
  .lead { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
}

/* ─────────────────────────────── pages ─────────────────────────────── */
@layer pages {

  /* Home + Web Insights: the table band */
  .table-band { padding-top: var(--s7); }
  .table-band .key { margin-top: var(--s5); }

  /* Groups ledger: one full-width row per group — swatch, name, what it covers, its real tiles */
  .gledger { position: relative; list-style: none; padding: 0; display: grid; gap: var(--tile-gap); padding-top: calc(4px + var(--tile-gap)); }
  .gledger::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--spectrum); }
  .gledger__row { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: var(--s3) var(--tile-gap); align-items: center; padding: var(--s4) var(--s4); background: var(--gt); border-radius: var(--radius); }
  .gledger__row > .key__swatch { grid-column: 1; }
  .gledger__text { grid-column: 2 / span 5; }
  .gledger__tiles { grid-column: 7 / -1; }
  .gledger__row > .key__swatch { width: 34px; height: 34px; }
  .gledger__row > .key__swatch svg { width: 15px; height: 15px; }
  .gledger__text h3 { font-size: 1.0625rem; }
  .gledger__text p { font-size: var(--fs-dense); color: var(--ink-2); margin-top: 2px; }
  .gledger__tiles { display: flex; flex-wrap: wrap; gap: var(--tile-gap); }
  .gledger__tiles .el { width: 64px; height: 68px; }
  @media (max-width: 980px) { .gledger__row { grid-template-columns: auto 1fr; } .gledger__row > .key__swatch { grid-column: 1; } .gledger__text { grid-column: 2; } .gledger__tiles { grid-column: 1 / -1; } }

  /* Anatomy: the sample tile annotated — pins on the tile, the same pins on the callouts */
  .anatomy__figure { margin: 0; justify-self: center; }
  .anatomy__tile { position: relative; }
  .anatomy__tile .el__name { white-space: normal; font-stretch: 75%; text-overflow: clip; font-size: 13px; }
  .anatomy__pin { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: var(--fs-micro); font-weight: 800; flex: none; }
  .anatomy__tile > .anatomy__pin { position: absolute; z-index: 2; box-shadow: 0 0 0 3px var(--paper); }
  .anatomy__pin--num { top: 10px; left: -13px; }
  .anatomy__pin--sym { top: 38%; right: -13px; }
  .anatomy__pin--name { bottom: 64px; left: -13px; }
  .anatomy__pin--status { bottom: 12px; right: -13px; }
  .anatomy__callouts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s6); }
  .anatomy__callouts li { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; }
  .anatomy__callouts h3 { font-size: 1.0625rem; }
  .anatomy__callouts p { font-size: var(--fs-dense); color: var(--ink-2); margin-top: 2px; }
  @media (max-width: 860px) { .anatomy__callouts { grid-template-columns: 1fr; } }

  /* Readings table on narrow screens: value wraps under the check, the full A–F strip stays visible */
  @media (max-width: 640px) {
    .readings .data thead { display: none; }
    .readings .data tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px var(--s3); align-items: center; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--rule-soft); }
    .readings .data td, .readings .data th { padding: 0; border: 0; }
    .readings .data td.mono { grid-column: 2 / -1; }
    .readings .data th[scope="rowgroup"] { grid-column: 1 / -1; }
    .readings .data tr:first-child { background: var(--paper); }
  }

  /* How a reading works — three states of one tile, not three icon cards */
  .band--g { background: var(--gt); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .band--g .head p { color: var(--ink-2); }
  .anatomy { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: var(--s6) var(--tile-gap); align-items: center; }
  .anatomy > .anatomy__figure { grid-column: 1 / span 6; }
  .anatomy > .anatomy__callouts { grid-column: 8 / -1; }
  .anatomy__tile { width: min(100%, 260px); aspect-ratio: 1; }
  .anatomy__tile .el { width: 100%; height: 100%; padding: 14px 16px; }
  .anatomy__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tile-gap); counter-reset: step; }
  .anatomy__step { padding: var(--s5); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); display: grid; gap: var(--s3); align-content: start; }
  .anatomy__step h3 { font-size: 1.0625rem; }
  .anatomy__step p { font-size: var(--fs-dense); color: var(--ink-2); }
  .anatomy__step .mini { width: 52px; height: 52px; }
  .anatomy__caption { margin-top: var(--s3); font-size: var(--fs-small); color: var(--ink-3); }
  .anatomy dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); font-size: var(--fs-dense); }
  .anatomy dt { font-weight: 700; }
  .anatomy dd { color: var(--ink-2); }
  @media (max-width: 980px) { .anatomy { grid-template-columns: 1fr; } .anatomy > .anatomy__figure, .anatomy > .anatomy__callouts { grid-column: 1; } }

  .band--spectrum { position: relative; }
  .band--spectrum::before { content: ''; position: absolute; top: 0; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1); height: 12px; background: var(--spectrum); }
  .close { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: var(--s6) var(--tile-gap); align-items: end; }
  .close > h2 { grid-column: 1 / span 10; } .close > .close__form { grid-column: 11 / -1; }
  .close h2 { font-family: var(--font-display); font-size: var(--fs-display);  font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
  .close__form { display: grid; gap: var(--s3); }
  .close__form p { color: var(--ink-2); }
  @media (max-width: 860px) { .close { grid-template-columns: 1fr; } .close > h2, .close > .close__form { grid-column: 1; } }

  /* Web Insights: check reference */
  .reference .data td:nth-child(3), .reference .data td:nth-child(4) { min-width: 26ch; }

  /* Report */
  .report-head {
    display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(320px, 0.9fr); gap: var(--s5) var(--s6); align-items: center;
    padding: var(--s6) 0 var(--s5);
  }
  .report-head__grade .el { width: 116px; height: 124px; padding: 8px 10px; }
  .report-head__grade .el__sym { font-size: 52px; }
  .report-head h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 1rem + 1.4vw, 2.5rem);  }
  .report-head h1 .mono { display: block; font-family: var(--font-mono); font-weight: 600; font-size: 0.62em; letter-spacing: 0; color: var(--ink-2); overflow-wrap: anywhere; margin-top: var(--s2); }
  .report-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s3); font-size: var(--fs-small); color: var(--ink-3); }
  .report-head__again { display: grid; gap: var(--s2); }
  .report-head__again p { font-size: var(--fs-small); color: var(--ink-3); }
  .report-head__again .instrument-form input, .report-head__again .instrument-form button { min-height: 44px; }
  .report-head__again .instrument-form button { padding: 0 var(--s4); font-size: var(--fs-dense); }
  @media (max-width: 1100px) { .report-head { grid-template-columns: auto minmax(0, 1fr); } .report-head__again { grid-column: 1 / -1; } }

  .report-body { display: grid; grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.6fr); gap: var(--s6); align-items: start; margin-top: var(--s7); }
  @media (max-width: 1100px) { .report-body { grid-template-columns: 1fr; } }
  .fixes { position: sticky; top: 76px; display: grid; gap: var(--s3); }
  .fixes h2, .readings h2 { font-size: 1.375rem; }
  .fixes ol { list-style: none; display: grid; gap: var(--tile-gap); counter-reset: fix; }
  .fix { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); padding: var(--s3) var(--s4); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
  .fix .mini { grid-row: span 3; }
  .fix__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-weight: 700; font-size: var(--fs-dense); }
  .fix__title a { text-decoration: none; }
  .fix__detail { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); overflow-wrap: anywhere; }
  .fix__advice { font-size: var(--fs-dense); color: var(--ink-2); }
  .fixes__none { padding: var(--s5); background: var(--st-pass-tint); border-radius: var(--radius); color: var(--st-pass); font-weight: 650; }
  .readings { display: grid; gap: var(--s3); min-width: 0; }

  /* Article: full-width page, ~70ch prose column, working side rails */
  .article {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(0, var(--measure)) minmax(260px, 1fr);
    gap: var(--s7);
    padding-top: var(--s7);
  }
  .article__head { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding-bottom: var(--s6); border-bottom: 1px solid var(--ink); }
  .article__head > div { grid-column: 2; display: grid; gap: var(--s4); }
  .article__head .el { width: 88px; height: 94px; padding: 6px 8px; }
  .article__head .el__sym { font-size: 36px; }
  .article__head h1 { font-family: var(--font-display); font-size: var(--fs-h1);  letter-spacing: -0.03em; }
  .article__meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--fs-small); color: var(--ink-3); }
  .article__meta a { color: var(--ink-2); }
  .article__rail { position: sticky; top: 84px; align-self: start; display: grid; gap: var(--s6); font-size: var(--fs-small); }
  .article__rail h2 { font-size: var(--fs-micro); font-stretch: 87%; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s3); }
  .toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--rule); }
  .toc a { display: block; padding: 4px var(--s3); margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
  .toc a:hover { color: var(--ink); border-left-color: var(--ink); }
  .toc .toc__sub a { padding-left: var(--s5); font-size: var(--fs-micro); }
  .rail-check { display: grid; gap: var(--s3); padding: var(--s4); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
  .rail-check p { color: var(--ink-2); }
  .rail-check .instrument-form { flex-direction: column; }
  .rail-check .instrument-form input, .rail-check .instrument-form button { min-height: 42px; font-size: var(--fs-small); }
  .adjacent { display: grid; gap: var(--tile-gap); }
  .adjacent a { display: grid; gap: 2px; padding: var(--s3); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
  .adjacent a:hover { border-color: var(--ink); }
  .adjacent span { font-size: var(--fs-micro); color: var(--ink-3); font-weight: 650; }
  .article__children { grid-column: 2; }
  @media (max-width: 1180px) {
    .article { grid-template-columns: minmax(0, var(--measure)) minmax(240px, 1fr); }
    .article__head { grid-template-columns: subgrid; }
    .article__head > div { grid-column: 1; }
    .article__rail--toc { display: none; }
    .article__children { grid-column: 1; }
  }
  @media (max-width: 860px) {
    .article { grid-template-columns: 1fr; gap: var(--s6); }
    .article__rail { position: static; }
  }

  /* Blog index: a ledger of tiles, not a card grid */
  .ledger { display: grid; border-top: 4px solid; border-image: var(--spectrum) 1; list-style: none; padding: 0; }
  .ledger__row {
    display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 3fr) auto; gap: var(--s3) var(--s6); align-items: center;
    padding: var(--s4) 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink);
  }
  .ledger__row:hover { background: var(--rule-soft); }
  .ledger__row .mini { width: 56px; height: 56px; font-size: 1.375rem; }
  .ledger__title { font-weight: 720; font-size: 1.1875rem; font-stretch: 104%; line-height: 1.2; letter-spacing: -0.01em; }
  .ledger__desc { color: var(--ink-2); font-size: var(--fs-dense); }
  .ledger__date { font-size: var(--fs-small); color: var(--ink-3); white-space: nowrap; }
  @media (max-width: 860px) { .ledger__row { grid-template-columns: auto 1fr; } .ledger__desc, .ledger__date { grid-column: 2; } }
  .pager { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s6); font-size: var(--fs-small); color: var(--ink-3); }

  /* Intro header for index-type pages */
  .intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: end; padding: var(--s7) 0 var(--s6); }
  .intro .el { width: 96px; height: 104px; padding: 6px 8px; }
  .intro .el__sym { font-size: 40px; }
  .intro h1 { font-family: var(--font-display); font-size: var(--fs-display);  font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
  .intro p { margin-top: var(--s3); }

  /* Tools index */
  .tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--tile-gap); }
  .tool { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); padding: var(--s5); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
  .tool:hover { border-color: var(--ink); box-shadow: var(--lift-sm); }
  .tool .el { width: 84px; height: 90px; grid-row: span 3; }
  .tool .el__sym { font-size: 32px; }
  .tool h2 { font-family: var(--font-display); font-size: 1.375rem; }
  .tool p { color: var(--ink-2); font-size: var(--fs-dense); }

  /* 404 */
  .lost { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s7); align-items: start; padding-top: var(--s8); }
  .lost > .el { width: 200px; height: 214px; padding: 12px 14px; }
  .lost > .el .el__sym { font-size: 84px; }
  .lost h1 { font-family: var(--font-display); font-size: var(--fs-display);  font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
  .lost .lead { margin-top: var(--s4); }
  .lost__links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--tile-gap); margin-top: var(--s6); }
  .lost__links a { display: grid; gap: 2px; padding: var(--s4); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
  .lost__links a:hover { border-color: var(--ink); }
  .lost__links span { font-size: var(--fs-small); color: var(--ink-3); }
  @media (max-width: 760px) { .lost { grid-template-columns: 1fr; } .lost > .el { width: 140px; height: 150px; } .lost > .el .el__sym { font-size: 58px; } }

  /* Specimen (admin-only design-system page) */
  .spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--tile-gap); }
  .swatch { display: grid; gap: 4px; padding: var(--s3); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); font-size: var(--fs-small); }
  .swatch i { display: block; height: 56px; border-radius: 2px; border: 1px solid rgb(13 17 23 / 0.08); }
  .swatch code { font-size: var(--fs-micro); color: var(--ink-3); }
  .spec-tiles > .el { grid-row: auto; grid-column: auto; }
  .spec-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 84px)); grid-auto-rows: 90px; gap: var(--tile-gap); }
  .sw-paper { background: var(--paper); } .sw-sheet { background: var(--sheet); } .sw-ink { background: var(--ink); } .sw-ink-2 { background: var(--ink-2); }
  .sw-ink-3 { background: var(--ink-3); } .sw-rule { background: var(--rule); } .sw-rule-soft { background: var(--rule-soft); } .sw-marker { background: var(--marker); } .sw-marker-ink { background: var(--marker-ink); } .sw-on-ink { background: var(--on-ink); }
  .sw-st-pass { background: var(--st-pass); } .sw-st-warn { background: var(--st-warn); } .sw-st-fail { background: var(--st-fail); } .sw-st-info { background: var(--st-info); }
  .sw-st-pass-tint { background: var(--st-pass-tint); } .sw-st-warn-tint { background: var(--st-warn-tint); } .sw-st-fail-tint { background: var(--st-fail-tint); } .sw-st-info-tint { background: var(--st-info-tint); }
  .swatch .key__swatch { width: 100%; height: 56px; }
  .spec-mark { width: 96px; height: 96px; }
  .spec-h { margin: var(--s6) 0 var(--s3); }
  .type-row { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); overflow-wrap: anywhere; gap: var(--s5); align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--rule-soft); }
  .type-row code { font-size: var(--fs-micro); color: var(--ink-3); }
}

/* ─────────────────────────────── motion — one authored moment ─────────────────────────────── */
@layer utilities {
  @media (prefers-reduced-motion: no-preference) {
    .ptable--assemble > .el { animation: el-in 620ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 14ms); }
    @keyframes el-in { from { opacity: 0.25; transform: translateY(8px) scale(0.96); } }
  }
  .i1 { --i: 1 } .i2 { --i: 2 } .i3 { --i: 3 } .i4 { --i: 4 } .i5 { --i: 5 } .i6 { --i: 6 } .i7 { --i: 7 } .i8 { --i: 8 } .i9 { --i: 9 }
  .i10 { --i: 10 } .i11 { --i: 11 } .i12 { --i: 12 } .i13 { --i: 13 } .i14 { --i: 14 } .i15 { --i: 15 } .i16 { --i: 16 } .i17 { --i: 17 } .i18 { --i: 18 }
  .i19 { --i: 19 } .i20 { --i: 20 } .i21 { --i: 21 } .i22 { --i: 22 } .i23 { --i: 23 } .i24 { --i: 24 } .i25 { --i: 25 } .i26 { --i: 26 } .i27 { --i: 27 }
  .i28 { --i: 28 } .i29 { --i: 29 } .i30 { --i: 30 } .i31 { --i: 31 } .i32 { --i: 32 } .i33 { --i: 33 } .i34 { --i: 34 } .i35 { --i: 35 } .i36 { --i: 36 }

  .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mono { font-family: var(--font-mono); }
  .muted { color: var(--ink-3); }
  .stack > * + * { margin-top: var(--s4); }
}
