/* RCMBench — site styles. No external requests. */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/publicsans.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/publicsans-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fbfaf6;
  --surface: #ffffff;
  --tint: #f3f0e8;
  --ink: #101a2b;
  --ink-2: #333e50;
  --muted: #566173;
  --rule: #d9d5ca;
  --rule-2: #c4bfb1;
  --navy: #1b365d;
  --link: #1a4a8c;
  --right: #1b365d;
  --unable: #7b8596;
  --wrong: #b3261e;
  --amber-bg: #fdf4d7;
  --amber-ink: #5a4200;
  --amber-rule: #b98900;
  --band-bg: #101a2b;
  --band-ink: #f1eee6;
  --band-link: #ffffff;
  --focus: #1a4a8c;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --pad: clamp(1.125rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1220; --surface: #141b2d; --tint: #182036;
    --ink: #ece9e1; --ink-2: #cdd1db; --muted: #9ea8ba;
    --rule: #2a334a; --rule-2: #3a4560;
    --navy: #a9c4ea; --link: #9fc2f6;
    --right: #a9c4ea; --unable: #7d89a3; --wrong: #ff8a7a;
    --amber-bg: #2a2410; --amber-ink: #f0d98c; --amber-rule: #c9a227;
    --band-bg: #060a14; --band-ink: #d9d6ce; --band-link: #ffffff;
    --focus: #9fc2f6;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1220; --surface: #141b2d; --tint: #182036;
  --ink: #ece9e1; --ink-2: #cdd1db; --muted: #9ea8ba;
  --rule: #2a334a; --rule-2: #3a4560;
  --navy: #a9c4ea; --link: #9fc2f6;
  --right: #a9c4ea; --unable: #7d89a3; --wrong: #ff8a7a;
  --amber-bg: #2a2410; --amber-ink: #f0d98c; --amber-rule: #c9a227;
  --band-bg: #060a14; --band-ink: #d9d6ce; --band-link: #ffffff;
  --focus: #9fc2f6;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.62;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Disclosure band ---------- */
.band { background: var(--band-bg); color: var(--band-ink); font-size: 0.8125rem; line-height: 1.45; }
.band .wrap { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.band b { font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.6875rem; margin-right: 0.5em; color: #fff; }
.band a { color: var(--band-link); white-space: nowrap; }

/* ---------- Masthead ---------- */
.mast { border-bottom: 1px solid var(--rule); background: var(--bg); }
.mast .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; margin-right: auto; padding: 0.5rem 0; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; letter-spacing: -0.01em; line-height: 1; font-variation-settings: "opsz" 36; }
.brand span i { font-style: normal; font-weight: 400; }
.mark-frame { fill: none; stroke: var(--ink); }
.mark-cell { fill: var(--ink); }
.mark-miss { fill: var(--wrong); }
.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; padding: 0.55rem 0.7rem; border-radius: 3px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.theme { appearance: none; border: 1px solid var(--rule-2); background: transparent; color: var(--ink-2); width: 2.5rem; height: 2.5rem; border-radius: 3px; cursor: pointer; display: inline-grid; place-items: center; flex: none; }
.theme:hover { background: var(--tint); color: var(--ink); }
.theme svg { width: 18px; height: 18px; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme .i-moon { display: none; }
}
@media (max-width: 900px) {
  .mast .wrap { gap: 0 1rem; padding-right: 0; padding-left: 0; }
  .brand { margin-left: var(--pad); }
  .theme { margin-right: var(--pad); }
  .nav { order: 3; flex: 1 0 100%; overflow-x: auto; padding: 0 calc(var(--pad) - 0.7rem); border-top: 1px solid var(--rule); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 0.75rem 0.7rem; }
}

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.2rem + 4.2vw, 3.75rem); line-height: 1.04; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.12; letter-spacing: -0.012em; font-variation-settings: "opsz" 48; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.005em; font-variation-settings: "opsz" 28; font-weight: 600; }
h4 { font-family: var(--sans); font-size: 0.9375rem; font-weight: 700; line-height: 1.35; }
.eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.9rem; display: block; }
.lede { font-family: var(--serif); font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.42rem); line-height: 1.45; color: var(--ink-2); font-variation-settings: "opsz" 24; max-width: 40em; }
.prose { max-width: 42.5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose h3 { margin: 2rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--muted); }
.small { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(2.75rem, 6vw, 4.75rem) 0; border-top: 1px solid var(--rule); }
.section.first { border-top: 0; }
.section-h { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); max-width: 46em; }
.section-h p { color: var(--ink-2); margin: 0; }
.sec-no { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.sec-no b { color: var(--ink); font-weight: 500; margin-right: 0.6em; }

.pagehead { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.pagehead h1 { max-width: 17em; margin-bottom: 1.25rem; font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.25rem); }

/* two-column doc layout with sticky contents */
.doc { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.toc { position: sticky; top: 1.5rem; font-size: 0.875rem; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.toc h2 { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 0.6rem; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: grid; grid-template-columns: 1.6rem 1fr; padding: 0.32rem 0; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc); font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding-top: 0.1em; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.doc-body > section { padding: 0 0 clamp(2.5rem, 5vw, 3.75rem); margin-bottom: clamp(2.5rem, 5vw, 3.75rem); border-bottom: 1px solid var(--rule); }
.doc-body > section:last-child { border-bottom: 0; margin-bottom: 0; }
.doc-body h2 { margin-bottom: 1rem; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 1.5rem; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 480px) { .toc ol { columns: 1; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.75rem, 7vw, 5.5rem) 0 clamp(2.75rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero h1 { margin-bottom: 1.5rem; }
.hero .lede { margin-bottom: 2rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.875rem; padding: 0.6rem 1.15rem; border: 1px solid var(--ink); border-radius: 3px; font-weight: 600; font-size: 0.9375rem; text-decoration: none; color: var(--ink); background: transparent; line-height: 1.2; }
.btn:hover { background: var(--tint); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--navy); border-color: var(--navy); }
.arrow::after { content: "\2192"; margin-left: 0.4em; }
a.more { font-weight: 600; text-decoration: none; }
a.more:hover { text-decoration: underline; }

/* ---------- Notice (Issue #1) ---------- */
.notice { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); background: var(--surface); }
.notice .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: center; padding-top: 1.35rem; padding-bottom: 1.35rem; }
.notice .when { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; font-weight: 500; font-variation-settings: "opsz" 36; white-space: nowrap; }
.notice .when small { display: block; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; font-weight: 400; }
.notice p { margin: 0; color: var(--ink-2); font-size: 0.975rem; max-width: 44em; }
@media (max-width: 820px) { .notice .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Principle grid ---------- */
.cols { display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.cols > div { padding: 1.25rem 1.5rem 0.5rem 0; border-right: 1px solid var(--rule); margin-right: 1.5rem; }
.cols > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.cols h3 { margin: 0.5rem 0 0.5rem; }
.cols p { color: var(--ink-2); font-size: 0.975rem; margin: 0 0 0.75rem; }
.cols .k { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; }
@media (max-width: 900px) {
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols > div:nth-child(2n) { border-right: 0; margin-right: 0; padding-right: 0; }
  .cols > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols > div { border-right: 0; margin-right: 0; padding-right: 0; }
  .cols > div:nth-child(n+2) { border-top: 1px solid var(--rule); }
}
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (max-width: 820px) { .two, .three { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Tags and labels ---------- */
.tag { display: inline-block; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.2rem 0.5rem; border: 1px solid var(--rule-2); border-radius: 2px; color: var(--ink-2); line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.tag.probe, .tag.ph { background: var(--amber-bg); border-color: var(--amber-rule); color: var(--amber-ink); }
.tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.use { border-color: var(--navy); color: var(--navy); }
.tag.plan { border-style: dashed; }

/* ---------- Callouts ---------- */
.callout { border: 1px solid var(--rule); border-left: 3px solid var(--ink); background: var(--surface); padding: 1.25rem 1.4rem; border-radius: 0 3px 3px 0; }
.callout > :last-child { margin-bottom: 0; }
.callout h3, .callout h4 { margin-bottom: 0.5rem; }
.callout p, .callout li { color: var(--ink-2); font-size: 0.975rem; }
.callout ul, .callout ol { margin: 0; padding-left: 1.2rem; }
.callout li { margin-bottom: 0.35rem; }
.callout.coi { border-left-color: var(--wrong); }
.callout.limits { background: var(--amber-bg); border-color: var(--amber-rule); border-left-color: var(--amber-rule); }
.callout.limits p, .callout.limits li, .callout.limits h3, .callout.limits h4 { color: var(--amber-ink); }

/* Placeholder / preview frame */
.ph-frame { border: 1.5px dashed var(--amber-rule); border-radius: 3px; padding: 0 1.25rem 1.25rem; background: var(--surface); }
.ph-frame > .ph-label { display: table; margin: 0 0 1.1rem -1.25rem; background: var(--amber-bg); color: var(--amber-ink); border-right: 1.5px dashed var(--amber-rule); border-bottom: 1.5px dashed var(--amber-rule); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.65rem; border-radius: 2px 0 3px 0; line-height: 1.5; }
@media (max-width: 560px) { .ph-frame { padding: 0 0.75rem 0.9rem; } .ph-frame > .ph-label { margin-left: -0.75rem; } tbody th { min-width: 8.5rem !important; } th, td { padding: 0.6rem 0.6rem !important; } }
.ph-frame > :last-child { margin-bottom: 0; }
.banner-ph { background: var(--amber-bg); color: var(--amber-ink); border-top: 1px solid var(--amber-rule); border-bottom: 1px solid var(--amber-rule); font-size: 0.9375rem; }
.banner-ph .wrap { padding-top: 0.8rem; padding-bottom: 0.8rem; }
.banner-ph b { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 0.6em; font-weight: 500; }

/* ---------- Ruling record (specimen) ---------- */
.record { background: var(--surface); border: 1px solid var(--rule-2); border-top: 3px solid var(--ink); border-radius: 0 0 3px 3px; font-size: 0.9rem; }
.record header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--rule); }
.record header b { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.record dl { margin: 0; padding: 0.25rem 1.1rem; }
.record dl > div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.record dl > div:last-child { border-bottom: 0; }
.record dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding-top: 0.2em; }
.record dd { margin: 0; color: var(--ink); line-height: 1.45; }
.record dd .mono { word-break: break-all; }
.record dd small { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 0.15rem; }
.record .ruling { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 650; }
.record footer { padding: 0.75rem 1.1rem; border-top: 1px solid var(--rule); background: var(--tint); font-size: 0.8125rem; color: var(--ink-2); line-height: 1.45; }
.empty { color: var(--amber-ink); background: var(--amber-bg); border: 1px dashed var(--amber-rule); border-radius: 2px; padding: 0.05rem 0.4rem; font-size: 0.8125rem; display: inline-block; }

/* ---------- Figures / charts ---------- */
.fig { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: 1.35rem 1.4rem 1.2rem; }
.fig + .fig { margin-top: 1.5rem; }
.fig-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem; margin-bottom: 0.3rem; }
.fig-h h3, .fig-h h4 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.fig-sub { font-size: 0.875rem; color: var(--muted); margin: 0 0 1.2rem; line-height: 1.5; }
.fig-note { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; margin: 1rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.fig-note b { color: var(--ink-2); font-weight: 650; }
@media (max-width: 560px) { .fig { padding: 1.1rem 1rem 1rem; } }

.gridrow { padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.gridrow:first-of-type { border-top: 0; padding-top: 0; }
.gridrow-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.15rem 1rem; margin-bottom: 0.45rem; font-size: 0.9rem; line-height: 1.35; }
.gridrow-h .arm { color: var(--ink); font-weight: 600; }
.gridrow-h .arm small { font-weight: 400; color: var(--muted); font-size: 0.8125rem; margin-left: 0.35em; }
.gridrow-h .score { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; }
.gridrow svg { display: block; width: 100%; height: auto; }
.gridrow.pub { margin-top: 0.4rem; border-top: 1px dashed var(--rule-2); }
.statelabels { display: block; width: 100%; height: auto; }
.c-r { fill: var(--right); }
.c-u { fill: none; stroke: var(--unable); stroke-width: 1.25; }
.c-u-l { stroke: var(--unable); stroke-width: 1.25; }
.c-w { fill: var(--wrong); }
.c-w-l { stroke: var(--surface); stroke-width: 1.6; stroke-linecap: square; }
.c-q { fill: none; stroke: var(--right); stroke-width: 1.25; }
.c-t { fill: var(--tint); }
.c-txt { fill: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; }

.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-size: 0.8125rem; color: var(--ink-2); margin: 0.9rem 0 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend svg { width: 14px; height: 14px; flex: none; }

.bars { display: grid; gap: 0; }
.bar { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3.4rem; gap: 0.3rem 1rem; align-items: center; padding: 0.6rem 0; border-top: 1px solid var(--rule); font-size: 0.9rem; }
.bar:first-child { border-top: 0; }
.bar .lbl { line-height: 1.3; color: var(--ink); font-weight: 600; }
.bar .lbl small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
.bar svg { display: block; width: 100%; height: 12px; }
.bar .val { font-family: var(--mono); font-size: 0.875rem; text-align: right; color: var(--ink); }
@media (max-width: 640px) {
  .bar { grid-template-columns: minmax(0, 1fr) 3.4rem; }
  .bar .lbl { grid-column: 1 / -1; }
}

/* ---------- Tables ---------- */
.tbl-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--surface); }
.tbl-wrap:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; line-height: 1.4; }
.tbl { margin: 0; }
.tbl > .tbl-wrap { border-top: 0; }
.tbl figcaption { text-align: left; padding: 0.9rem 0.8rem 0.8rem; font-size: 0.875rem; color: var(--muted); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); background: var(--surface); line-height: 1.5; }
.tbl figcaption .tag { margin: 0.1rem 0; }
.tbl figcaption strong { color: var(--ink); font-family: var(--serif); font-size: 1.15rem; font-weight: 600; display: inline-block; margin-right: 0.5rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font-family: var(--mono); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; border-bottom: 1px solid var(--rule-2); line-height: 1.35; }
thead th.n { white-space: normal; min-width: 4.5rem; max-width: 8rem; }
tbody th { font-weight: 600; color: var(--ink); min-width: 12rem; }
tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
td.n, th.n { text-align: right; font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.bad { color: var(--wrong); font-weight: 500; }
tr.pub th, tr.pub td { border-top: 1px dashed var(--rule-2); background: var(--tint); }
td .tag { margin: 0 0.2rem 0.2rem 0; }
.tbl-note { font-size: 0.8125rem; color: var(--muted); margin: 0.75rem 0 0; line-height: 1.5; }
table.plain td, table.plain th { padding-left: 0.9rem; padding-right: 0.9rem; }
table.plain tbody th { min-width: 9rem; }
table.plain td:last-child { min-width: 11rem; }
td.hash { font-family: var(--mono); font-size: 0.75rem; word-break: break-all; min-width: 15rem; color: var(--ink-2); }

.em-cell { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.em-cell svg { width: 28px; height: 28px; flex: none; }

/* ---------- Definition rows (tracks, policy) ---------- */
.rows { border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 15rem); gap: 0.5rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.row .no { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--muted); font-variation-settings: "opsz" 48; font-variant-numeric: lining-nums; }
.row h3 { margin-bottom: 0.4rem; }
.row h3 small { font-family: var(--sans); font-weight: 400; font-size: 0.9375rem; color: var(--muted); margin-left: 0.4rem; letter-spacing: 0; }
.row p { color: var(--ink-2); margin: 0 0 0.6rem; font-size: 0.975rem; }
.row dl { margin: 0.6rem 0 0; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.35rem 1rem; font-size: 0.9rem; }
.row dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding-top: 0.22em; }
.row dd { margin: 0; color: var(--ink-2); }
.row .meta { font-size: 0.875rem; color: var(--ink-2); }
.row .meta .when { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); line-height: 1.2; display: block; margin: 0.15rem 0 0.5rem; font-variation-settings: "opsz" 28; }
.row .meta .k { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); display: block; }
.row .meta svg { display: block; width: 100%; height: 14px; margin: 0.4rem 0 0.6rem; }
.row .meta p { font-size: 0.8125rem; color: var(--muted); margin: 0.4rem 0 0; line-height: 1.45; }
.row.compact { grid-template-columns: 2.6rem minmax(0, 1fr) auto; padding: 0.95rem 0; align-items: baseline; }
.row.compact .no { font-size: 1.35rem; }
.row.compact h3 { font-size: 1.1rem; margin: 0; }
.row.compact p { margin: 0.15rem 0 0; font-size: 0.9rem; color: var(--muted); }
.row.compact .meta { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 0.8125rem; }
@media (max-width: 820px) {
  .row { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .row .no { font-size: 1.6rem; }
  .row .meta { grid-column: 2; }
  .row.compact { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .row.compact .meta { grid-column: 2; text-align: left; }
}
@media (max-width: 560px) { .row dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } .row dd { margin-bottom: 0.5rem; } }
.tl-track { stroke: var(--rule-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-tick { stroke: var(--rule-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-mark { fill: var(--ink); }
.tl-months { display: flex; font-family: var(--mono); font-size: 0.625rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.tl-months span { overflow: hidden; }

/* numbered policy list */
.policy { list-style: none; counter-reset: pol; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.policy > li { counter-increment: pol; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 0.25rem 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.policy > li::before { content: counter(pol); font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; color: var(--muted); font-variant-numeric: lining-nums; }
.policy h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.policy p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.policy .tag { margin-top: 0.15rem; }
@media (max-width: 640px) {
  .policy > li { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .policy > li > .tag { grid-column: 2; justify-self: start; }
}

/* steps */
.steps { list-style: none; counter-reset: st; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.steps li { counter-increment: st; padding: 1.1rem 1.5rem 1.1rem 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: "Step " counter(st); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.45rem; }
.steps h4 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.925rem; }

/* contact block */
.contact { border: 1px solid var(--rule-2); border-top: 3px solid var(--ink); background: var(--surface); padding: clamp(1.4rem, 3vw, 2.1rem); }
.contact h2 { margin-bottom: 0.6rem; font-size: 1.65rem; }
.contact p { color: var(--ink-2); max-width: 38em; }
.contact .mail { font-family: var(--mono); font-size: 1rem; }
.contact ul { padding-left: 1.2rem; color: var(--ink-2); margin: 0 0 1.25rem; }
.contact li { margin-bottom: 0.3rem; }

/* stat line */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stats > div { padding: 1.1rem 1.25rem 1.1rem 0; border-right: 1px solid var(--rule); margin-right: 1.25rem; }
.stats > div:last-child { border-right: 0; margin-right: 0; }
.stats .v { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); line-height: 1; font-variation-settings: "opsz" 60; font-variant-numeric: lining-nums; display: block; margin-bottom: 0.45rem; }
.stats .v small { font-size: 0.5em; color: var(--muted); }
.stats p { font-size: 0.875rem; color: var(--ink-2); margin: 0; line-height: 1.45; }
@media (max-width: 640px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats > div { border-right: 0; margin-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule); }
  .stats > div:last-child { border-bottom: 0; }
}

/* ---------- Footer ---------- */
.foot { border-top: 2px solid var(--ink); margin-top: clamp(2rem, 5vw, 4rem); padding: 2.5rem 0 3rem; font-size: 0.875rem; color: var(--ink-2); background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.foot h2 { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 0.7rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.1rem; }
.foot li a { display: inline-block; padding: 0.3rem 0; }
.foot a { color: var(--ink-2); }
.foot p { max-width: 34em; line-height: 1.55; }
.foot .fine { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8125rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; justify-content: space-between; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* 404 */
.nf { padding-top: clamp(4rem, 12vw, 9rem); padding-bottom: clamp(4rem, 12vw, 9rem); }
.nf .code { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.09em; color: var(--muted); text-transform: uppercase; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .nav a, .theme { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
}
@media print {
  .band, .nav, .theme, .foot ul { display: none; }
  body { background: #fff; color: #000; }
}
