/* BloxToolbox, "the pocket annual" (approved 2026-11-07, v2 mockups).
   A children's fact-and-records annual printed in two colours: black ink plus one spot yellow, with flat screens
   of that yellow. No boxes except true objects (a tool, an input, the answer slot). Dark is the back cover: ink
   ground, paper type, and the yellow kept for the mark, the figures, the primary action and the answer slot.
   Gabarito for display, Lexend for reading and figures (tabular). One sheet for every page.

   Legacy token names (--bg-*, --ink-0..3, --line, --accent, --amber, --mono, --sans ...) are kept as aliases on
   purpose: the inline SVG charts from scripts/figures.py and three tool pages' own <style> blocks read them.

   Contents: 1 tokens  2 base  3 type  4 layout  5 masthead  6 footer  7 controls  8 tables  9 page heads
   10 prose  11 figures  12 homepage  13 limiteds  14 tools  15 tools index  16 blog  17 glossary  18 info pages
   19 404  20 search results  21 utilities  22 responsive */

/* ---------------------------------------------------------------- 1 tokens */
:root {
  color-scheme: light;
  --paper: #FFFFFF; --ink: #1A1A17; --ink-2: #55524A; --rule: #DAD6CB; --rule-strong: #8C877A;
  --spot: #FFCD1C; --spot-tint: #FFF1B8; --on-spot: #1A1A17; --on-spot-2: #3D3A31; --spot-rule: #C9A100;
  --zebra: #FFF9E0; --field: #FFFDF3; --placeholder: #6B675D; --code: #F4F1E6;
  --mast: var(--spot); --mast-ink: #1A1A17; --mast-ink-2: #3D3A31; --mark: #1A1A17;
  --go: #1A1A17; --go-ink: #FFFFFF; --go-hover: #3A372F;
  --rec: var(--spot); --rec-ink: #1A1A17; --rec-ink-2: #3D3A31; --rec-rule: #C9A100; --rec-fig: #1A1A17;
  --foot: #1A1A17; --foot-ink: #F4F1E6; --foot-ink-2: #D6D1C2; --foot-rule: #4A4840;
  --shadow: 0 2px 0 rgba(26, 26, 23, .08);

  --display: "Gabarito", "Lexend", sans-serif;
  --text: "Lexend", "Gabarito", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 96px;
  --t-meta: 14px; --t-small: 16px; --t-body: 18px; --t-item: 20px; --t-h3: 21px; --t-head: 25px; --t-h2: 30px;
  --t-h2a: 28px; --t-h1: 38px; --t-mark: 34px;
  --measure: 58ch;
  --r: 6px;
  --gutter: 32px;
  --wide: 1240px;
  --narrow: 760px;

  /* legacy aliases (charts, page <style> blocks) */
  --bg-0: var(--paper); --bg-1: var(--zebra); --bg-2: var(--code);
  --ink-0: var(--ink); --ink-1: var(--ink); --ink-3: var(--placeholder);
  --line: var(--rule); --line-strong: var(--rule-strong);
  --accent: var(--ink); --accent-ink: var(--ink); --amber: var(--spot);
  --up: var(--ink); --down: var(--ink); --flat-fill: var(--rule-strong);
  --success: #2F8F4E; --danger: var(--ink-2); --focus: var(--ink);
  --sans: var(--text); --mono: var(--text);
}
/* dark: the back cover */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1A1A17; --ink: #F4F1E6; --ink-2: #B5AF9F; --rule: #3A372F; --rule-strong: #8F897B;
  --spot-tint: #3A3216;
  --zebra: #211F19; --field: #22201B; --placeholder: #A8A293; --code: #2A2721;
  --mast: #23211C; --mast-ink: #F4F1E6; --mast-ink-2: #B5AF9F; --mark: #FFCD1C;
  --go: #FFCD1C; --go-ink: #1A1A17; --go-hover: #FFDD5C;
  --rec: #23211C; --rec-ink: #F4F1E6; --rec-ink-2: #B5AF9F; --rec-rule: #3A372F; --rec-fig: #FFCD1C;
  --foot: #11110F; --foot-ink: #F4F1E6; --foot-ink-2: #B5AF9F; --foot-rule: #3A372F;
  --shadow: 0 2px 0 rgba(0, 0, 0, .3); --success: #5CC98A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1A1A17; --ink: #F4F1E6; --ink-2: #B5AF9F; --rule: #3A372F; --rule-strong: #8F897B;
    --spot-tint: #3A3216;
    --zebra: #211F19; --field: #22201B; --placeholder: #A8A293; --code: #2A2721;
    --mast: #23211C; --mast-ink: #F4F1E6; --mast-ink-2: #B5AF9F; --mark: #FFCD1C;
    --go: #FFCD1C; --go-ink: #1A1A17; --go-hover: #FFDD5C;
    --rec: #23211C; --rec-ink: #F4F1E6; --rec-ink-2: #B5AF9F; --rec-rule: #3A372F; --rec-fig: #FFCD1C;
    --foot: #11110F; --foot-ink: #F4F1E6; --foot-ink-2: #B5AF9F; --foot-rule: #3A372F;
    --shadow: 0 2px 0 rgba(0, 0, 0, .3); --success: #5CC98A;
  }
}

/* ---------------------------------------------------------------- 2 base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--text); font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
::selection { background: var(--spot); color: var(--on-spot); }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { background: var(--spot-tint); text-decoration-thickness: 2px; }
:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
a:focus-visible { background: var(--spot); color: var(--on-spot); }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s6) 0; }
code, kbd, samp {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em;
  background: var(--code); border-radius: 4px; padding: 2px 6px; overflow-wrap: anywhere;
}
sup { line-height: 0; }
p, li, dd, figcaption, caption { text-wrap: pretty; }

/* ---------------------------------------------------------------- 3 type */
h1, h2, h3, h4 { font-family: var(--display); color: inherit; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-h1); font-weight: 900; line-height: 1.12; }
h2 { font-size: var(--t-h2); font-weight: 900; line-height: 1.15; }
h3 { font-size: var(--t-h3); font-weight: 800; line-height: 1.3; }
h4 { font-size: var(--t-body); font-weight: 800; line-height: 1.35; }
p { margin: 0 0 var(--s4); }
strong, b { font-weight: 600; }
small { font-size: var(--t-meta); }
.tnum, .num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 4 layout */
.shell { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.shell--narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
main { display: block; padding-bottom: var(--s5); }

.breadcrumb { padding-top: var(--s5); font-size: var(--t-meta); line-height: 1.5; color: var(--ink-2); }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb__sep { display: inline-block; padding: 0 var(--s2); color: var(--ink-2); }

/* ---------------------------------------------------------------- 5 masthead: the yellow band */
.band { position: relative; background: var(--mast); color: var(--mast-ink); border-bottom: 4px solid var(--spot); }
.band a { color: var(--mast-ink); }
.band a:hover { background: none; }
.band__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s6);
  padding-top: var(--s5); padding-bottom: var(--s3);
}
.mark { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; color: var(--mark); text-decoration: none; }
.band .mark { color: var(--mark); }
.mark:hover { background: none; }
.mark__svg { flex: none; display: block; }
.mark__svg rect { fill: currentColor; }
.mark__name { font: 900 var(--t-mark)/1 var(--display); letter-spacing: -.01em; }
.mark__name b { font-weight: 600; }
.band__tag { flex: 1 1 280px; max-width: 46ch; margin: 0; font-size: var(--t-meta); line-height: 1.45; color: var(--mast-ink-2); }
.find { position: relative; flex: 0 1 320px; min-width: 0; margin-left: auto; margin-right: calc(88px + var(--s4)); }
.find input, .mast__input {
  display: block; width: 100%; min-height: 44px; padding: 0 var(--s3);
  font: 400 var(--t-small) var(--text); color: var(--ink);
  background: var(--paper); border: 2px solid var(--mast-ink); border-radius: var(--r);
}
.find input::placeholder { color: var(--placeholder); opacity: 1; }
.find input::-webkit-search-cancel-button { filter: grayscale(1); cursor: pointer; }
.nav { padding-bottom: var(--s2); }
.nav__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s5); }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 800 var(--t-h3)/1 var(--display); color: var(--mast-ink); text-decoration: none;
}
.band .nav__link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav__link[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; text-decoration-color: var(--mast-ink);
}
:root[data-theme="dark"] .nav__link[aria-current="page"] { text-decoration-color: var(--spot); }
/* The toggle sits in the menu row in the markup (older cached layout.js looks for it there) and is drawn on the
   wordmark row, at the right edge of the content column. */
.toggle {
  position: absolute; top: var(--s5); right: calc((100% - min(100%, var(--wide) + 2 * var(--gutter))) / 2 + var(--gutter));
  min-width: 88px; min-height: 44px; padding: 0 var(--s4);
  font: 600 var(--t-meta) var(--text); color: var(--mast-ink);
  background: none; border: 2px solid var(--mast-ink); border-radius: var(--r); cursor: pointer;
}
.toggle:hover, .toggle[aria-pressed="true"] { background: var(--mast-ink); color: var(--mast); }
.toggle:focus-visible { outline-color: var(--mast-ink); }

/* ---------------------------------------------------------------- 6 footer: the black back cover */
.foot { margin-top: var(--s9); background: var(--foot); color: var(--foot-ink); padding: var(--s8) 0 var(--s6); }
.foot a { color: var(--foot-ink); }
.foot a:hover { background: none; color: var(--spot); }
.foot a:focus-visible { outline-color: var(--spot); color: var(--on-spot); background: var(--spot); }
.foot__grid { display: grid; grid-template-columns: 3fr 4fr 2fr 2fr; gap: var(--s6) var(--s7); }
.foot .mark { color: var(--spot); }
.foot .mark__name { font-size: 28px; }
.foot__blurb { margin: var(--s3) 0 0; max-width: 40ch; font-size: var(--t-small); line-height: 1.55; color: var(--foot-ink-2); }
.foot__h { font: 800 var(--t-small)/1.3 var(--display); color: var(--spot); margin: 0 0 var(--s2); }
.foot__list { list-style: none; margin: 0; padding: 0; font-size: var(--t-meta); }
.foot__list li { margin: 0; break-inside: avoid; }
.foot__list a { display: inline-block; padding: 5px 0; line-height: 1.5; text-decoration: none; }
.foot__list a:hover { text-decoration: underline; }
.foot__col--tools .foot__list { columns: 2; column-gap: var(--s5); }
.foot__legal {
  margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--foot-rule);
  font-size: var(--t-meta); line-height: 1.55; color: var(--foot-ink-2); max-width: 80ch;
}
.foot__legal p { margin: 0; }
.foot__legal p + p { margin-top: var(--s2); }
.foot__legal a { color: var(--foot-ink); }

/* ---------------------------------------------------------------- 7 controls */
label { font-weight: 600; font-size: var(--t-small); }
input[type="number"], input[type="text"], input[type="search"], input[type="date"], input[type="url"], select, textarea {
  width: 100%; min-height: 48px; padding: 8px var(--s3);
  border: 2px solid var(--ink); border-radius: var(--r); background: var(--field); color: var(--ink);
  font: 400 var(--t-body)/1.3 var(--text); font-variant-numeric: tabular-nums;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); vertical-align: -4px; }
select { padding-right: 32px; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); border: 2px solid var(--go); border-radius: var(--r);
  background: var(--go); color: var(--go-ink); cursor: pointer;
  font: 600 var(--t-small)/1.2 var(--text); text-decoration: none;
}
.btn:hover { background: var(--go-hover); border-color: var(--go-hover); color: var(--go-ink); text-decoration: none; }
.btn.btn--ghost, .btn.btn--line, #route-links .btn:not(.btn--primary) {
  background: var(--paper); color: var(--ink); border-color: var(--ink);
}
.btn.btn--ghost:hover, .btn.btn--line:hover, #route-links .btn:not(.btn--primary):hover { background: var(--spot-tint); color: var(--ink); }
.btn.btn--sm { min-height: 44px; padding: 0 var(--s4); }
.btn--primary { background: var(--go); color: var(--go-ink); border-color: var(--go); }
.btn:disabled { opacity: .55; cursor: default; }
.btn[aria-disabled="true"], #route-links .btn[aria-disabled="true"] {
  color: var(--ink-2); background: transparent; border-style: dashed; border-color: var(--ink-2); pointer-events: none;
}

/* ---------------------------------------------------------------- 8 tables */
.table-wrap, .table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dt, .writeup table, .tool-writeup table, .ip-body table, .mini-table, .gid-table {
  width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.4;
}
.dt caption, .writeup caption, .tool-writeup caption, .ip-body caption, table caption {
  caption-side: bottom; text-align: left; padding-top: var(--s2);
  font-size: var(--t-meta); line-height: 1.5; color: var(--ink-2);
}
.dt thead th, .writeup thead th, .tool-writeup thead th, .ip-body thead th, .mini-table th, .gid-table th {
  padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 2px solid var(--ink); vertical-align: bottom; text-align: left;
  font: 600 var(--t-small)/1.3 var(--text); color: var(--ink);
}
.dt td, .dt tbody th, .writeup td, .tool-writeup td, .ip-body td, .mini-table td, .gid-table td {
  padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; text-align: left;
}
.dt tr > :last-child, .writeup tr > :last-child, .tool-writeup tr > :last-child, .mini-table tr > :last-child { padding-right: 0; }
.dt tbody th { font-weight: 500; }
.dt tbody tr:nth-child(even), .writeup tbody tr:nth-child(even), .tool-writeup tbody tr:nth-child(even),
.ip-body tbody tr:nth-child(even), .mini-table tbody tr:nth-child(even) { background: var(--zebra); }
.dt .n, .mini-table .num, .mini-table .wl-num, .writeup td.tnum, .writeup td.num, .tool-writeup td.tnum,
.ip-body td.tnum, td.tnum, th.tnum, td.n, th.n {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dt thead th.n { white-space: normal; }
.writeup table, .tool-writeup table { margin: var(--s2) 0 var(--s5); }
.writeup td, .tool-writeup td { font-variant-numeric: tabular-nums; }
.up, .down, .flat { color: inherit; }
.flat { color: var(--ink-2); }
.dt .up, .dt .down, .dt .flat { white-space: nowrap; }
.dt .d { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- 9 page heads */
.page-head, .tool-header, .ip-hero, .gd-hero, .bl-hero, .gl-hero, .db-hero {
  padding: var(--s5) 0 var(--s5); margin-bottom: var(--s6); border-bottom: 4px solid var(--ink);
}
.page-title, .tool-header h1, .ip-hero__title, .gd-hero__title, .bl-hero__title, .gl-hero__title, .db-hero__title, .er-title {
  font: 900 var(--t-h1)/1.1 var(--display); margin: 0; max-width: 28ch;
}
.ip-hero__title em, .gl-hero__title em, .gd-hero__title em { font-style: normal; color: inherit; }
.page-lede, .tool-header__lede, .ip-hero__lede, .gd-hero__lede, .bl-hero__lede, .gl-hero__lede, .db-hero__lede {
  margin: var(--s3) 0 0; max-width: 54ch; font-size: 20px; line-height: 1.55; color: var(--ink);
}
.page-dates, .updated-stamp, .ip-hero__updated, .gl-hero__updated {
  display: block; margin: var(--s3) 0 0; max-width: 68ch; font-size: var(--t-meta); line-height: 1.55; color: var(--ink-2);
}
.updated-stamp a, .page-dates a { color: var(--ink-2); }
/* section names that sit in a few heads: plain words in the meta voice, after the breadcrumb, never a label strip */
.ip-hero__eyebrow, .gd-hero__eyebrow, .bl-hero__eyebrow, .gl-hero__eyebrow, .db-hero__game, .er-tag {
  display: block; margin: 0 0 var(--s3); font-size: var(--t-small); font-weight: 500; line-height: 1.4; color: var(--ink-2);
}
.db-hero__top { margin: 0; }
.review-line { margin: var(--s2) 0 0; font-size: var(--t-meta); color: var(--ink-2); }
.review-line a { color: var(--ink-2); }

/* ---------------------------------------------------------------- 10 prose */
.writeup, .tool-writeup, .ip-body, .prose { font-size: var(--t-body); line-height: 1.6; min-width: 0; overflow-wrap: break-word; }
.writeup > *, .tool-writeup > *, .ip-body > *, .prose > * { max-width: var(--measure); }
.writeup > table, .tool-writeup > table, .ip-body > table, .writeup > .table-wrap, .writeup > figure,
.writeup > .fig, .tool-writeup > .table-scroll, .writeup > .table-scroll, .tool-writeup > .table-wrap,
.ip-body > .table-wrap, .writeup > .atlas-lookup { max-width: 100%; }
.writeup > .atlas-lookup { max-width: 560px; }
.writeup h2, .tool-writeup h2, .ip-body h2 { margin: var(--s8) 0 var(--s3); font-size: var(--t-h2a); font-weight: 900; line-height: 1.2; scroll-margin-top: var(--s4); }
.writeup h3, .tool-writeup h3, .ip-body h3 { margin: var(--s6) 0 var(--s2); font-size: var(--t-h3); font-weight: 800; }
.writeup > h2:first-child, .tool-writeup > h2:first-child, .ip-body > h2:first-child { margin-top: var(--s2); }
.writeup p, .tool-writeup p, .ip-body p, .prose p { margin: 0 0 var(--s4); }
.writeup ul, .writeup ol, .tool-writeup ul, .tool-writeup ol, .ip-body ul, .ip-body ol { margin: var(--s3) 0 var(--s4); padding-left: 1.2em; }
.writeup li, .tool-writeup li, .ip-body li { margin: var(--s2) 0 0; }
.writeup li::marker, .ip-body li::marker, .tool-writeup li::marker { color: var(--ink); }
.writeup .muted, .tool-writeup .muted, .ip-body .muted { color: var(--ink-2); font-size: var(--t-small); }
.prose strong, .writeup strong { font-weight: 600; }
blockquote { margin: var(--s5) 0; padding: 0 0 0 var(--s4); border-left: 4px solid var(--spot); color: var(--ink); }

/* FAQ: ruled disclosure rows (prerender builds FAQPage JSON-LD from them) */
.writeup details, .tool-writeup details, .ip-body details { max-width: var(--measure); border-top: 1px solid var(--rule); padding: 0; }
.writeup details:last-of-type, .tool-writeup details:last-of-type { border-bottom: 1px solid var(--rule); }
.writeup details + h2, .tool-writeup details + h2 { margin-top: var(--s8); }
.writeup summary, .tool-writeup summary, .ip-body summary {
  position: relative; display: flex; align-items: center; list-style: none; cursor: pointer;
  min-height: 52px; padding: var(--s3) 40px var(--s3) 0; font-weight: 600; font-size: var(--t-body); line-height: 1.45;
}
.writeup summary::-webkit-details-marker, .tool-writeup summary::-webkit-details-marker, .ip-body summary::-webkit-details-marker { display: none; }
.writeup summary::after, .tool-writeup summary::after, .ip-body summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font: 600 24px/1 var(--display); color: var(--ink);
}
.writeup details[open] > summary::after, .tool-writeup details[open] > summary::after, .ip-body details[open] > summary::after { content: "\2212"; }
.writeup details > :not(summary), .tool-writeup details > :not(summary), .ip-body details > :not(summary) { margin: 0 0 var(--s4); }
.writeup summary:hover, .tool-writeup summary:hover { background: var(--spot-tint); }

/* callouts: a pale yellow screen, never a coloured side rule */
.callout, .note {
  margin: var(--s4) 0; padding: var(--s3) var(--s4); border-radius: var(--r);
  background: var(--zebra); font-size: var(--t-small); line-height: 1.55; max-width: var(--measure);
}
.callout--warn, .note--warn { background: var(--spot-tint); font-weight: 500; }

/* ---------------------------------------------------------------- 11 figures (scripts/figures.py) */
.fig { margin: var(--s5) 0 var(--s6); }
.fig__title, .fig figure > h3 { font: 800 var(--t-small)/1.35 var(--display); margin: 0 0 var(--s3); max-width: 52ch; }
.fig__svg { display: block; width: 100%; height: auto; }
.fig__cap, .fig figcaption { margin-top: var(--s2); font-size: var(--t-meta); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
/* chart lettering: the narrower display face, never under 14px (the charts draw 10 to 13px labels in a 640-unit
   box; Gabarito at 14px is about as wide as the old mono face at 12px, so no label grows into its neighbour) */
.fig__svg text { font-family: var(--display) !important; font-variant-numeric: tabular-nums; }
.fig__svg text[style*=" 10px "], .fig__svg text[style*=" 10.5px "], .fig__svg text[style*=" 11px "],
.fig__svg text[style*=" 12px "], .fig__svg text[style*=" 13px "] { font-size: 14px !important; }
/* two-colour charts: the yellow spot is a fill and always carries an ink edge, so it reads on paper */
.fig__svg [style*="var(--amber"]:not(line):not(text):not(path):not([r="2.2"]), .fig__svg [style*="var(--success"]:not(line):not(text):not(path) {
  stroke: var(--ink); stroke-width: .75px;
}
.fig__svg text[style*="var(--amber"], .fig__svg text[style*="var(--success"] { fill: var(--ink) !important; }
.fig__svg line[style*="var(--amber"], .fig__svg path[style*="var(--amber"] { stroke: var(--ink) !important; }
/* value-band rows (limiteds:bands, drawn as HTML): spot-yellow bars with an ink edge */
.bands { margin: 0 0 var(--s1); }
.bands__row { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s2); }
.bands__label { flex: 0 0 112px; font-size: var(--t-meta); color: var(--ink); }
.bands__track { flex: 1 1 auto; min-width: 0; }
.bands__bar { display: block; min-width: 4px; height: 16px; background: var(--spot); box-shadow: inset 0 0 0 1px var(--ink); }
.bands__num { flex: 0 0 40px; text-align: right; font-size: var(--t-small); font-weight: 600; }
/* classed charts (homepage, lead story) */
.f-ink { fill: var(--ink); } .f-spot { fill: var(--spot); } .f-tint { fill: var(--spot-tint); } .f-paper { fill: var(--paper); }
.f-mute { fill: var(--ink-2); } .f-rule { fill: var(--rule); }
.s-ink { stroke: var(--ink); } .s-spot { stroke: var(--spot); } .s-rule { stroke: var(--rule); }
svg .on-spot { fill: var(--on-spot); }
svg .lbl { paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.chart { display: block; width: 100%; height: auto; max-width: 500px; font-family: var(--text); }
.chart text { font-family: var(--text); }

/* ---------------------------------------------------------------- 12 homepage */
/* opening spread: H1 and deck, the lead story and the latest rows on the left, the featured list on the right */
.open {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "intro shead" "intro side" "lead side" "posts side"; grid-template-rows: auto 1fr auto auto;
  gap: 0 var(--s8); padding-top: var(--s7);
}
.open > #home-featured, .open .feat { display: contents; }
.open__intro { grid-area: intro; }
.open__h1 { font: 900 var(--t-h1)/1.12 var(--display); max-width: 20ch; }
.open__deck { margin: var(--s3) 0 0; max-width: var(--measure); color: var(--ink-2); }
.feat__head { grid-area: shead; align-self: start; padding-top: var(--s4); border-top: 4px solid var(--ink); }
.feat__head h2 { font-size: var(--t-head); font-weight: 900; line-height: 1.2; }
.feat__intro { margin: var(--s2) 0 0; font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
.feat .entries { grid-area: side; align-self: start; margin-top: var(--s5); }

/* the lead story */
.lead {
  grid-area: lead; display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "title title" "text text" "tag meta" "fig fig";
  margin-top: var(--s7); padding-top: var(--s4); border-top: 4px solid var(--ink);
}
.lead .gx-card__tag { grid-area: tag; }
.lead__title { grid-area: title; font: 900 var(--t-h2)/1.15 var(--display); max-width: 28ch; }
.lead__title a { text-decoration: none; }
.lead__title a:hover { background: var(--spot); color: var(--on-spot); }
.lead__text { grid-area: text; margin: var(--s3) 0 0; max-width: var(--measure); }
.lead .gx-card__foot { grid-area: meta; }
.lead .fig { grid-area: fig; margin: var(--s5) 0 0; }

/* entries: ruled rows, the whole row is the link; the topic word sits in the meta line, never above the title */
.entries { list-style: none; margin: 0; padding: 0; }
.gx-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "title title" "desc desc" "tag foot";
  align-content: start; padding: var(--s4) 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none;
}
.gx-card:hover { background: none; color: var(--ink); }
.gx-card:hover .gx-card__title, .gx-card:focus-visible .gx-card__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.gx-card:focus-visible { background: var(--spot-tint); color: var(--ink); }
.gx-card__title { grid-area: title; font: 800 var(--t-item)/1.25 var(--display); max-width: 34ch; }
.gx-card__desc { grid-area: desc; margin: var(--s1) 0 0; max-width: var(--measure); font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
.gx-card__tag, .gx-card__foot { margin-top: var(--s2); font-size: var(--t-meta); line-height: 1.5; color: var(--ink-2); }
.gx-card__tag { grid-area: tag; font-weight: 500; }
.gx-card__tag::after { content: "\00b7"; padding: 0 var(--s2); }
.gx-card__foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s4); }
.gx-card__cta { margin-left: auto; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.entries > li:first-child > .gx-card, .gx-grid > .gx-card:first-child { border-top: 0; }
.feat .entries > li:first-child > .gx-card { padding-top: 0; }
.lead .gx-card__tag, .lead .gx-card__foot { margin-top: var(--s2); }

/* latest analysis: dated rows, the date in the margin */
.latest { grid-area: posts; margin-top: var(--s8); }
.sec-head, .sec__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s5);
  padding-top: var(--s4); border-top: 4px solid var(--ink);
}
.sec-head__title { font: 900 var(--t-h2)/1.15 var(--display); }
.latest .sec-head__title { font-size: var(--t-head); }
.sec-head__link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-small); }
.sec-lead { margin: var(--s2) 0 0; max-width: var(--measure); color: var(--ink-2); }
.rows { margin-top: var(--s3); }
.rows .gx-card {
  grid-template-columns: 172px minmax(0, 1fr); grid-template-areas: "date title" "tag desc" "cta desc";
  grid-template-rows: auto auto 1fr; gap: 0 var(--s5);
}
.rows .gx-card__foot { display: contents; }
.rows .gx-card__foot > span:first-child { grid-area: date; padding-top: 3px; font-size: var(--t-meta); font-weight: 500; color: var(--ink); white-space: nowrap; }
.rows .gx-card__tag { margin-top: var(--s1); }
.rows .gx-card__tag::after { content: none; }
.rows .gx-card__cta { grid-area: cta; justify-self: start; align-self: start; margin: var(--s1) 0 0; font-size: var(--t-meta); }
.rows .gx-card__desc { margin-top: var(--s1); }

/* sections */
.hsec { padding-top: var(--s9); }

/* the records band: the yellow page (in dark: the black page with yellow figures) */
.recband { margin-top: var(--s9); background: var(--rec); color: var(--rec-ink); padding: var(--s7) 0 var(--s6); border-block: 4px solid var(--spot); }
.recband__in { display: flex; flex-direction: column; }
.recband .sec-head { border-top-color: var(--rec-ink); }
.recband .sec-head__title { font-size: var(--t-h2); }
.records { order: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s7); margin: var(--s5) 0 0; }
.rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--s4); align-items: baseline; padding: var(--s4) 0; border-top: 1px solid var(--rec-rule); }
.rec dt { font-weight: 500; }
.rec dd { margin: 0; }
.rec__fig { grid-column: 2; grid-row: 1 / span 2; font: 900 var(--t-h1)/1 var(--display); text-align: right; color: var(--rec-fig); white-space: nowrap; }
.rec__note { grid-column: 1; font-size: var(--t-small); line-height: 1.5; color: var(--rec-ink-2); }
.recband .src { order: 3; margin: var(--s3) 0 0; font-size: var(--t-meta); line-height: 1.5; color: var(--rec-ink-2); max-width: 80ch; }

/* paired tables and the figure rows under them */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s7); margin-top: var(--s6); }
.tbl-h { font: 800 var(--t-h3)/1.3 var(--display); margin: 0 0 var(--s2); }
.dual { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6) var(--s7); margin-top: var(--s7); }
.dual .fig, .hsec .fig { margin: 0; }
.fig__note { margin: 0 0 var(--s3); max-width: 62ch; font-size: var(--t-meta); line-height: 1.5; color: var(--ink-2); }
.hsec .fig--range { margin-top: var(--s7); }
.fig--range { margin-top: var(--s7); display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: var(--s2) var(--s7); align-items: start; }
.fig--range .tbl-h { grid-column: 1 / -1; }
.fig--range figcaption { margin-top: 0; }

/* tools index on the homepage: a book index in three columns */
.az { columns: 3 260px; column-gap: var(--s7); margin-top: var(--s6); }
.az__group { padding-bottom: var(--s5); }
.az__h { break-after: avoid; break-inside: avoid; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); font: 900 var(--t-head)/1.1 var(--display); padding-bottom: var(--s2); border-bottom: 2px solid var(--ink); margin: 0 0 var(--s2); }
.az__count { font: 500 var(--t-meta) var(--text); color: var(--ink-2); }
.az ul { list-style: none; margin: 0; padding: 0; }
.az li { padding: var(--s2) 0; break-inside: avoid; }
.az a { font-weight: 600; }
.az li span { display: block; font-size: var(--t-meta); color: var(--ink-2); line-height: 1.45; }
.desk-note .writeup { margin-top: var(--s2); }
.home-prose { margin-top: var(--s5); }

/* ---------------------------------------------------------------- 13 limiteds */
.page-head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s5) var(--s7); }
.page-head__text { flex: 1 1 560px; min-width: 0; }
.figs-wrap { flex: 0 1 520px; min-width: 0; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 0 var(--s5); margin: 0; }
.figs__item { padding: var(--s3) 0; border-top: 1px solid var(--rule); min-width: 0; }
.figs dt { font-size: var(--t-meta); line-height: 1.3; color: var(--ink-2); }
.figs dd { margin: var(--s1) 0 0; font: 900 30px/1.1 var(--display); white-space: nowrap; }
.block-h { margin: 0 0 var(--s3); font: 900 var(--t-head)/1.2 var(--display); }
.lim-layout__aside .block-h, .lim-explain__aside .block-h, .lim-block .block-h { font-size: var(--t-h3); font-weight: 800; }
.lim-layout { display: flex; flex-wrap: wrap; gap: var(--s7) var(--s8); padding-top: 2px; }
.lim-layout__main { flex: 1 1 640px; min-width: 0; }
.lim-layout__aside { flex: 1 1 340px; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--s6); }
.dt--ranked td, .dt--ranked tbody th { padding-top: 6px; padding-bottom: 6px; font-size: 15px; }
.dt__rank { width: 2.6em; color: var(--ink-2); font-size: var(--t-meta) !important; }
.dt--compact td, .dt--compact tbody th { padding-top: 7px; padding-bottom: 7px; font-size: 15px; }
.lim-more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s4); }
.lim-more__note { margin: 0; font-size: var(--t-meta); color: var(--ink-2); }
.lim-more__note a { color: var(--ink-2); }

.panel { border: 2px solid var(--ink); border-radius: 10px; padding: var(--s5); }
.lim-watch .block-h { font-size: var(--t-h3); margin-bottom: var(--s2); }
.lim-watch > p { font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); margin: 0 0 var(--s3); }
.lim-watch .updated-stamp { margin: 0 0 var(--s3); }
.lim-watch .input-group { margin: 0; }
.lim-watch label { display: block; margin-bottom: var(--s2); }
.lim-watch .wl-search-wrap { position: relative; }
.lim-watch .mini-table { margin-top: var(--s4); font-size: 15px; }
.lim-watch #wl-empty { margin: var(--s3) 0 0; font-size: var(--t-small); color: var(--ink-2); }
.lim-watch #wl-error { margin: var(--s3) 0 0; padding: var(--s3); background: var(--spot-tint); border-radius: var(--r); font-size: var(--t-small); }
.lim-watch .wl-totals { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s3) 0 var(--s1); font-size: var(--t-small); font-weight: 600; }
.lim-watch .wl-totals strong { font: 900 22px/1.2 var(--display); }
.lim-watch .wl-totals .wl-muted { flex-basis: 100%; font-weight: 400; }
.lim-watch .wl-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s3); }
.lim-watch > p.muted { margin: var(--s3) 0 0; font-size: var(--t-meta) !important; }
.wl-results, .calc-page .tc-results, .calc-page .gh-results {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: var(--s1);
  max-height: 320px; overflow-y: auto; background: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow);
}
.wl-result, .calc-page .tc-result, .calc-page .gh-result {
  display: flex; justify-content: space-between; gap: var(--s4); width: 100%; min-height: 44px; padding: var(--s2) var(--s3); text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink); font: 15px/1.35 var(--text); cursor: pointer;
}
.wl-result:last-child, .calc-page .tc-result:last-child, .calc-page .gh-result:last-child { border-bottom: 0; }
.wl-result:hover, .wl-result:focus-visible, .calc-page .tc-result:hover, .calc-page .gh-result:hover { background: var(--spot-tint); }
.wl-result:disabled, .calc-page .tc-result:disabled { opacity: .55; cursor: default; }
.wl-muted, .calc-page .tc-muted, .calc-page .gh-muted { color: var(--ink-2); font-size: .9em; opacity: 1; }
.wl-creator { display: block; }
.wl-num { text-align: right; white-space: nowrap; }
.wl-remove, .calc-page .tc-remove {
  width: 32px; height: 32px; padding: 0; border: 2px solid var(--ink); border-radius: var(--r);
  background: var(--paper); color: var(--ink); cursor: pointer; font: 600 16px/1 var(--text);
}
.wl-remove:hover, .calc-page .tc-remove:hover { background: var(--spot-tint); }

.lim-pending { margin-top: var(--s7); padding: var(--s4) 0 var(--s5); border-top: 4px solid var(--ink); border-bottom: 1px solid var(--rule); }
.lim-pending .block-h { font-size: var(--t-head); margin-bottom: var(--s2); }
.lim-pending-note { max-width: var(--measure); font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); margin: 0 0 var(--s3); }
.lim-disclosure > summary {
  display: inline-flex; align-items: center; min-height: 48px; list-style: none; cursor: pointer; line-height: 1.45;
  padding: var(--s2) var(--s4); border: 2px solid var(--ink); border-radius: var(--r); font-weight: 600; font-size: var(--t-small);
}
.lim-disclosure > summary::-webkit-details-marker { display: none; }
.lim-disclosure > summary:hover { background: var(--spot-tint); }
.lim-disclosure__why { font-weight: 400; color: var(--ink-2); font-size: var(--t-meta); }
.lim-disclosure[open] > summary { margin-bottom: var(--s4); }

.lim-explain { display: flex; flex-wrap: wrap; gap: var(--s7) var(--s8); margin-top: var(--s7); }
.lim-explain__body { flex: 1 1 600px; min-width: 0; }
.lim-explain__aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--s6); padding-top: 6px; }
.related { list-style: none; margin: 0; padding: 0; }
.related li { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.related li:first-child { border-top: 1px solid var(--rule); }
.related a { font-weight: 600; font-size: var(--t-small); text-decoration: none; }
.related a:hover { text-decoration: underline; }
.related span { display: block; margin-top: 2px; font-size: var(--t-meta); color: var(--ink-2); }

/* ---------------------------------------------------------------- 14 tools: the worksheet */
/* Tool pages with an "On this page" rail: the rail takes a left column and stays in view; under 900px it drops
   into the flow, after the tool and before the article. */
.calc-page main > .shell--narrow:has(> .tp__rail) {
  position: relative; max-width: calc(var(--wide) + 2 * var(--gutter));
  padding-left: calc(var(--gutter) + 220px + var(--s8));
}
.calc-page main > .shell--narrow:has(> .tp__rail) > * { max-width: var(--narrow); }
.tp__rail { position: absolute; top: 0; bottom: 0; left: var(--gutter); width: 220px; padding-top: 112px; }
.calc-page main > .shell--narrow:has(> .tp__rail) > .breadcrumb { margin-left: calc(-220px - var(--s8)); max-width: none; }
.tp__rail nav { position: sticky; top: var(--s5); }
.tp__rail h2 { font: 800 var(--t-small)/1.3 var(--display); margin: 0 0 var(--s2); }
.tp__rail ol { list-style: none; margin: 0; padding: 0; font-size: var(--t-meta); line-height: 1.35; }
.tp__rail li a { display: block; padding: 7px 0 7px var(--s3); text-decoration: none; color: var(--ink-2); box-shadow: inset 2px 0 0 var(--rule); }
.tp__rail li a:hover { color: var(--ink); background: var(--spot-tint); box-shadow: inset 2px 0 0 var(--ink); }

.rail-anchor { display: block; height: 0; scroll-margin-top: var(--s4); }
.tool-header { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.tool-shell {
  margin: var(--s6) 0 var(--s2); padding: var(--s6); border: 2px solid var(--ink); border-radius: 10px; background: var(--paper);
}
.tool-shell + .tool-shell { margin-top: var(--s5); }
.tool-shell > .tool-result__label:first-child { font: 800 var(--t-h3)/1.3 var(--display); color: var(--ink); margin: 0 0 var(--s1); }
.tool-shell h2, .tool-shell h3 { font: 800 var(--t-h3)/1.3 var(--display); margin: 0 0 var(--s3); }
.tool-shell label { display: block; margin: 0 0 var(--s2); font: 800 var(--t-h3)/1.3 var(--display); }
.tool-shell .input-group label, .tool-shell .input-group--2 label, .tool-shell .input-group--3 label { font: 600 var(--t-small)/1.3 var(--text); }
.tool-shell label.row { display: inline-flex; margin: 0; font: 500 var(--t-small)/1.4 var(--text); }
.tool-shell > input[type="text"], .tool-shell > input[type="url"] { min-height: 56px; padding: 0 var(--s4); text-overflow: ellipsis; }
.tool-shell input[type="number"], .tool-shell input[type="date"], .tool-shell select { max-width: 360px; }
.tool-shell .input-group--2 input, .tool-shell .input-group--3 input, .tool-shell .input-group--2 select, .tool-shell .input-group--3 select { max-width: none; }
.input-group { display: grid; gap: var(--s4) var(--s5); }
.input-group--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.input-group--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.tool-result { padding-top: var(--s4); border-top: 1px solid var(--rule); }
/* results: a row of ruled figures */
.tool-result__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0 var(--s5); }
.tool-result__cell { min-width: 0; padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.tool-result__label { font-size: var(--t-meta); font-weight: 500; line-height: 1.35; color: var(--ink-2); }
.tool-result__value { margin: var(--s1) 0 2px; font: 900 26px/1.15 var(--display); overflow-wrap: anywhere; color: var(--ink); }
.tool-result__sub { font-size: var(--t-meta); line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.tool-result > .tool-result__value { font-size: 34px; }
/* the answer slot: one big answer on the spot yellow */
.answer {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s5);
  padding: var(--s4) var(--s5); background: var(--spot); color: var(--on-spot); border-radius: var(--r);
}
.answer .tool-result__label { font: 600 var(--t-small)/1.3 var(--text); color: var(--on-spot); }
.answer .tool-result__value { margin: 0; font: 900 44px/1.05 var(--display); letter-spacing: .01em; color: var(--on-spot); }
.tool-result--answer { padding-top: 0; border-top: 0; margin-top: var(--s5); }
.tool-result--answer .note { margin: var(--s3) 0 0; background: none; padding: 0; font-size: var(--t-small); }
.tool-result--answer .note.note--warn { padding: var(--s3) var(--s4); background: var(--spot-tint); }
.tool-result--answer #route-links { margin-top: var(--s4); gap: var(--s3); }
.tool__fine { margin: var(--s3) 0 0; font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); max-width: var(--measure); }
.tool-shell .row { gap: var(--s3) var(--s4); }
.tool-shell .muted { color: var(--ink-2); }
.pos, .neg { color: inherit; }
tr.is-best td, tr.is-best th, .is-best { background: var(--spot-tint); }
tr.is-best td:first-child { font-weight: 600; }
.calc-page .tool-shell > .muted, .calc-page .tool-shell p { max-width: var(--measure); }
.calc-page .writeup, .calc-page .tool-writeup { margin-top: var(--s7); }
.atlas-lookup { margin-top: var(--s5); padding: var(--s5); border: 2px solid var(--ink); border-radius: 10px; }
.atlas-lookup label { display: block; font: 800 var(--t-small)/1.3 var(--display); margin-bottom: var(--s2); }

/* three tool pages carry their own <style> blocks (left byte-for-byte; a verifier pins one); restyled from here */
.calc-page .tc-grid { gap: var(--s5); }
.calc-page .tc-side { border: 2px solid var(--ink); border-radius: 10px; padding: var(--s5); }
.calc-page .tc-side h2 { font-size: var(--t-h3); font-weight: 800; }
.calc-page th.tc-num { font-size: var(--t-small); }
.calc-page .tc-total strong { font: 900 24px/1.2 var(--display); }
.calc-page .tc-actions button { border-radius: var(--r); border: 2px solid var(--ink); font-weight: 600; padding: 0 var(--s4); min-height: 44px; color: var(--ink); background: var(--paper); }
.calc-page .tc-actions button:hover { background: var(--spot-tint); }
.calc-page #tc-verdict { border: 0; border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--spot); color: var(--on-spot); }
.calc-page #tc-error, .calc-page #gh-error { border: 0; border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--spot-tint); }
.calc-page #psc-note { border: 0; border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--zebra); }
.calc-page .gh-popular { gap: var(--s2); }
.calc-page .gh-chip { display: inline-flex; align-items: center; min-height: 44px; border-radius: var(--r); border: 2px solid var(--ink); padding: 0 var(--s3); font-size: var(--t-meta); color: var(--ink); background: var(--paper); }
.calc-page .gh-chip:hover { background: var(--spot-tint); }
.calc-page .gh-chip--on { color: var(--on-spot); font-weight: 600; background: var(--spot); }
.calc-page .gh-current { font: 900 var(--t-head)/1.2 var(--display); margin: var(--s5) 0 var(--s2); }
.calc-page .gh-stats { gap: 0 var(--s5); margin: var(--s2) 0 var(--s4); }
.calc-page .gh-stat { border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none; padding: var(--s3) 0; }
.calc-page .gh-stat__label { text-transform: none; letter-spacing: 0; font-size: var(--t-meta); font-weight: 500; color: var(--ink-2); }
.calc-page .gh-stat__value { font: 900 24px/1.2 var(--display); }
.calc-page .gh-stat__sub { font-family: var(--text); font-size: 13px; }
.calc-page .gh-chart-wrap { border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); }
.calc-page .gh-line { stroke: var(--ink); stroke-width: 2; }
.calc-page .gh-dot { fill: var(--ink); stroke: var(--paper); }
.calc-page .gh-active { fill: var(--spot); stroke: var(--ink); }
.calc-page .gh-tip { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); backdrop-filter: none; color: var(--ink); box-shadow: var(--shadow); }
.calc-page .gh-caption { color: var(--ink-2); font-size: var(--t-meta); }
.calc-page .gh-data summary { color: var(--ink); font-weight: 600; font-size: var(--t-small); }
.calc-page .gid-table td, .calc-page .gid-table th { padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--rule); }

/* ---------------------------------------------------------------- 15 tools index */
.tools-index__cat {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  margin: var(--s7) 0 0; padding-bottom: var(--s2); border-bottom: 2px solid var(--ink); font: 900 var(--t-head)/1.2 var(--display);
}
.tools-index > .tools-index__cat:first-child { margin-top: var(--s2); }
.tools-index__count { font: 500 var(--t-meta) var(--text); color: var(--ink-2); }
.lp-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 0 var(--s8); }
.lp-tool {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "desc" "top";
  align-content: start; gap: 2px; padding: var(--s3) 0; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.lp-tool:hover { background: none; color: var(--ink); }
.lp-tool:hover .lp-tool__name { text-decoration: underline; text-underline-offset: 3px; }
.lp-tool:focus-visible { background: var(--spot-tint); color: var(--ink); }
.lp-tool__name { grid-area: name; font: 800 var(--t-item)/1.3 var(--display); }
.lp-tool__desc { grid-area: desc; margin: 0; font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); }
.lp-tool__top { grid-area: top; display: flex; gap: 0; font-size: var(--t-meta); color: var(--ink-2); }
.lp-tool__top span + span::before { content: "\00b7"; margin: 0 var(--s2); }

/* ---------------------------------------------------------------- 16 blog */
.gx-grid { display: block; margin-top: 0; }
.gd-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; }
.gd-progress__bar { display: block; height: 100%; width: var(--progress, 0%); background: var(--spot); }
.gd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s6); margin-top: var(--s4); font-size: var(--t-meta); color: var(--ink-2); }
.gd-meta__byline { display: flex; flex-direction: column; gap: 2px; }
.gd-meta__author { font-weight: 600; color: var(--ink); }
.gd-meta__sub { color: var(--ink-2); }
.gd-meta__divider { align-self: stretch; width: 1px; background: var(--rule); }
.gd-meta__stats { display: flex; gap: 0 var(--s6); }
.gd-meta__stat { display: flex; flex-direction: column-reverse; gap: 2px; }
.gd-meta__stat-num { font: 800 var(--t-small)/1.3 var(--display); color: var(--ink); }
.gd-meta__stat-label { font-size: var(--t-meta); color: var(--ink-2); }
.gd-toc { margin: 0 0 var(--s6); padding: var(--s3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.gd-toc__summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 44px; list-style: none; cursor: pointer; font: 800 var(--t-body)/1.3 var(--display); }
.gd-toc__summary::-webkit-details-marker { display: none; }
.gd-toc__count { font: 500 var(--t-meta) var(--text); color: var(--ink-2); }
.gd-toc__list { margin: var(--s2) 0 0; padding-left: 1.4em; font-size: var(--t-small); }
.gd-toc__item { margin: var(--s1) 0; break-inside: avoid; }
.gd-toc__item::marker { color: var(--ink-2); font-size: var(--t-meta); }
.byline--bio { margin: var(--s7) 0 0; padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: var(--t-small); color: var(--ink-2); max-width: var(--measure); }
.byline--bio p { margin: 0; }
.byline__author { color: var(--ink-2); }

/* ---------------------------------------------------------------- 17 glossary */
.gl-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin: 0 0 var(--s4); }
.gl-search__field { flex: 1 1 320px; max-width: 520px; }
.gl-search__count { font-size: var(--t-small); color: var(--ink-2); }
.gl-search__count strong { color: var(--ink); font-weight: 600; }
.gl-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 0 var(--s8); border-top: 4px solid var(--ink); }
.gl-term { padding: var(--s4) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: var(--s4); }
.gl-term:target { background: var(--spot-tint); }
.gl-term__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.gl-term__title { font: 800 var(--t-h3)/1.3 var(--display); }
.gl-term__anchor { font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; padding: 0 var(--s1); }
.gl-term__anchor:hover { color: var(--ink); }
.gl-term__def { margin: var(--s1) 0 0; font-size: var(--t-small); line-height: 1.6; color: var(--ink); max-width: var(--measure); }
.gl-empty { grid-column: 1 / -1; padding: var(--s6) 0; color: var(--ink-2); }
.gl-empty__icon { display: none; }

/* ---------------------------------------------------------------- 18 info pages */
.ip-toc { margin: 0 0 var(--s6); padding: var(--s3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ip-toc__summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font: 800 var(--t-body)/1.3 var(--display); }
.ip-toc__list { margin: var(--s2) 0 0; padding-left: 1.4em; columns: 2 260px; column-gap: var(--s7); font-size: var(--t-small); }
.ip-toc__list li { break-inside: avoid; margin: var(--s1) 0; }
.editor-box { margin: 0 0 var(--s7); padding: var(--s5) var(--s5) var(--s2); border: 2px solid var(--ink); border-radius: 10px; max-width: var(--measure); }
.editor-box h2 { margin: 0 0 var(--s2) !important; font-size: var(--t-h3); }
.editor-box p { font-size: var(--t-small); }
.ip-cards { display: grid; grid-template-columns: minmax(0, 1fr); max-width: var(--measure); }
.ip-card { padding: var(--s5) 0; border-bottom: 1px solid var(--rule); }
.ip-card:first-child { padding-top: 0; }
.ip-card__tag { display: block; font-size: var(--t-meta); font-weight: 500; color: var(--ink-2); margin: 0 0 var(--s1); }
.ip-card__title { font: 800 var(--t-h3)/1.3 var(--display); margin: 0 0 var(--s2); }
.ip-card__body { margin: 0 0 var(--s2); font-size: var(--t-small); line-height: 1.6; }
.ip-card__action { font-weight: 600; }
.corr-log { max-width: var(--measure); }
.corr-entry { padding: var(--s4) 0 var(--s1); border-top: 1px solid var(--rule); scroll-margin-top: var(--s4); }
.corr-entry:first-child { border-top: 0; padding-top: 0; }
.corr-entry:target { background: var(--spot-tint); }
.corr-entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin: 0 0 var(--s2) !important; font-size: var(--t-h3) !important; font-weight: 800 !important; }
.corr-entry__kind { font: 500 var(--t-meta) var(--text); color: var(--ink-2); }
.corr-entry__head .muted { color: var(--ink); }
.corr-note { color: var(--ink-2); }

/* ---------------------------------------------------------------- 19 404 */
.er-wrap { padding-top: var(--s8); padding-bottom: var(--s6); }
.er-num {
  display: inline-block; margin: var(--s2) 0 var(--s5); padding: var(--s2) var(--s5);
  font: 900 96px/1 var(--display); background: var(--spot); color: var(--on-spot); border-radius: var(--r);
}
.er-sub { margin: var(--s3) 0 var(--s5); max-width: 56ch; font-size: 20px; line-height: 1.5; }
.er-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------------------------------------------------------------- 20 search results (masthead) */
.search-results {
  position: absolute; z-index: 70; top: calc(100% + 4px); left: 0; right: 0; min-width: 260px;
  max-height: 60vh; overflow-y: auto; background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow);
}
.band .search-results a, .search-results__item {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  min-height: 44px; padding: var(--s3); border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; line-height: 1.35;
}
.search-results__item:last-child { border-bottom: 0; }
.band .search-results a:hover, .search-results__item:hover, .search-results__item[aria-selected="true"] { background: var(--spot-tint); color: var(--ink); }
.search-results__name { font-weight: 600; font-size: var(--t-small); }
.search-results__meta { flex: none; font-size: var(--t-meta); color: var(--ink-2); }
.search-results__empty { margin: 0; padding: var(--s3); font-size: var(--t-small); color: var(--ink-2); }

/* ---------------------------------------------------------------- 21 utilities */
.muted { color: var(--ink-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-1 { margin-top: var(--s2); }
.mt-2 { margin-top: var(--s4); }
.mt-3 { margin-top: var(--s5); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.row--between { justify-content: space-between; }
.ad-slot:empty { display: none; }

/* ---------------------------------------------------------------- 22 responsive */
@media (max-width: 1100px) {
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .open { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "lead" "shead" "side" "posts"; grid-template-rows: none; }
  .feat__head { margin-top: var(--s8); }
  .pair, .dual, .records, .fig--range { grid-template-columns: minmax(0, 1fr); }
  .recband { padding-left: 0; padding-right: 0; }
  .foot__grid > :first-child { grid-column: 1 / -1; }
  .calc-page main > .shell--narrow:has(> .tp__rail) { padding-left: var(--gutter); max-width: calc(var(--narrow) + 2 * var(--gutter)); }
  .calc-page main > .shell--narrow:has(> .tp__rail) > .breadcrumb { margin-left: 0; }
  .tp__rail { position: static; width: auto; padding-top: var(--s6); }
  .tp__rail nav { position: static; }
  .tp__rail ol { columns: 2; column-gap: var(--s5); }
  .tp__rail li { break-inside: avoid; }
  .tool-shell { padding: var(--s4); }
}
@media (max-width: 760px) {
  .dt, .writeup table, .tool-writeup table { font-size: 15px; }
  .writeup > table, .tool-writeup > table, .ip-body > table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dt td, .dt tbody th, .dt thead th { padding-right: var(--s2); }
  .dt__rank { width: 1.8em; }
  .dt--ranked tbody th, .dt--pending tbody th { min-width: 150px; }
  .table-wrap caption { max-width: calc(100vw - 2 * var(--gutter)); }
  .gd-meta__divider { display: none; }
}
@media (max-width: 560px) {
  :root { --t-h1: 29px; --t-h2: 25px; --t-h2a: 24px; --t-head: 22px; --t-h3: 19px; --t-item: 19px; --t-mark: 26px; --s9: 64px; --s8: 48px; }
  .band__row { gap: var(--s3) var(--s4); padding-top: var(--s4); }
  .band__tag { order: 4; flex: 1 1 100%; max-width: none; }
  .find { order: 3; flex: 1 1 100%; margin: 0; }
  .toggle { top: var(--s4); right: var(--gutter); min-width: 76px; }
  .nav { padding-bottom: var(--s1); }
  .nav__row { gap: 0 var(--s4); }
  .nav__link { font-size: 18px; }
  .rows .gx-card { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "title title title" "desc desc desc" "tag date cta"; grid-template-rows: auto; gap: 0; }
  .rows .gx-card__tag { margin-top: var(--s2); }
  .rows .gx-card__tag::after { content: "\00b7"; padding: 0 var(--s2); }
  .rows .gx-card__foot > span:first-child { padding-top: 0; margin-top: var(--s2); font-weight: 400; color: var(--ink-2); }
  .rows .gx-card__cta { justify-self: end; margin-top: var(--s2); }
  .page-lede, .tool-header__lede, .ip-hero__lede, .gd-hero__lede, .bl-hero__lede, .gl-hero__lede, .db-hero__lede { font-size: var(--t-body); }
  .tp__rail ol { columns: 1; }
  .tp__rail li a { display: flex; align-items: center; min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
  .answer .tool-result__value { font-size: 34px; }
  #route-links .btn { flex: 1 1 100%; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .foot__list a { display: flex; align-items: center; min-height: 44px; padding: 0; }
  .er-num { font-size: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .find, .nav, .foot__grid, .gd-progress, .lim-more, .toggle, .tp__rail { display: none !important; }
  .band, .recband, .foot { background: none; color: #000; }
  body { font-size: 11pt; }
  a { text-decoration: none; }
}
