/* Built by scripts/build-site.ts: self-hosted fonts (@fontsource, OFL), web/tokens.css, web/styles.css. */

/* pt-serif-cyrillic-ext-700-normal */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/pt-serif-cyrillic-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* pt-serif-cyrillic-700-normal */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/pt-serif-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* pt-serif-latin-ext-700-normal */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/pt-serif-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* pt-serif-latin-700-normal */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/pt-serif-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* frank-ruhl-libre-hebrew-700-normal */
@font-face {
  font-family: 'Frank Ruhl Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/frank-ruhl-libre-hebrew-700-normal.woff2) format("woff2");
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}

/* frank-ruhl-libre-latin-ext-700-normal */
@font-face {
  font-family: 'Frank Ruhl Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/frank-ruhl-libre-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* frank-ruhl-libre-latin-700-normal */
@font-face {
  font-family: 'Frank Ruhl Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/frank-ruhl-libre-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-sans-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-cyrillic-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-sans-cyrillic-ext-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/ibm-plex-sans-cyrillic-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-latin-ext-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-sans-hebrew-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-hebrew-cyrillic-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-hebrew-hebrew-400-normal */
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-hebrew-hebrew-400-normal.woff2) format("woff2");
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}

/* ibm-plex-sans-hebrew-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-hebrew-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-hebrew-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-sans-hebrew-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-mono-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-mono-cyrillic-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-mono-cyrillic-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-mono-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ibm-plex-mono-cyrillic-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/ibm-plex-mono-cyrillic-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-mono-cyrillic-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-mono-latin-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Hallmark · tokens · genre: editorial · theme: Almanac, tuned (see design.md § System for every delta from the catalog)
 * axes: paper light (L 94%) / display roman-serif (PT Serif 700) / accent cool ink-blue (hue 250)
 * styles.css uses only these names; raw values there are limited to @media breakpoints, the 1px visually-hidden box
 * and forced-colors system colours.
 */
:root {
  /* colour · Almanac palette; accent-ink corrected for text on accent; backdrop + accent-press added */
  --color-paper:        oklch(94% 0.008 245);
  --color-paper-2:      oklch(91% 0.010 245);
  --color-paper-3:      oklch(86% 0.012 240);
  --color-rule:         oklch(74% 0.012 240);
  --color-rule-2:       oklch(38% 0.018 240);
  --color-muted:        oklch(46% 0.014 245);
  --color-neutral:      oklch(28% 0.016 245);
  --color-ink-2:        oklch(20% 0.018 245);
  --color-ink:          oklch(16% 0.020 245);
  --color-accent:       oklch(38% 0.135 250);
  --color-accent-press: oklch(30% 0.110 250);
  --color-accent-ink:   oklch(97% 0.006 245);
  --color-focus:        oklch(38% 0.135 250);
  --color-backdrop:     oklch(16% 0.020 245 / 0.42);

  /* type · families and weights (only these weights are drawn by styles.css) */
  --font-display: "PT Serif", "Frank Ruhl Libre", ui-serif, Georgia, serif;
  --font-body:    "IBM Plex Sans", "IBM Plex Sans Hebrew", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;
  --display-weight: 700;
  --weight-body:    400;
  --weight-label:   500;
  --weight-strong:  600;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-display:   clamp(2.25rem, 3.5vw + 1rem, 3.75rem);
  --text-display-s: clamp(1.5rem, 2vw + 1rem, 2.25rem);

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;
  --tracking-display: -0.014em;
  --tracking-label:   0.06em;
  --tracking-src:     0.02em;
  --underline-offset: 0.18em;

  /* space · 2px base, named */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 7rem;

  /* layout */
  --page-max:    84rem;
  --page-gutter: clamp(1rem, 4vw, 3rem);
  --measure:     64ch;
  --rule-hair:   1px;
  --rule-strong: 2px;

  /* component geometry */
  --radius-card:  0;
  --radius-pill:  0;
  --radius-input: 0;
  --control-height: 2.75rem;
  --bar-height:     3.5rem;
  --control-min:    18rem;
  --menu-min:       14rem;
  --facts-max:      52rem;
  --facts-label:    16rem;
  --stack-label:    8.5rem;
  --dialog-width:   40rem;
  --dialog-max-h:   min(80dvh, 40rem);
  --icon-size:      0.9rem;
  --sheet-intrinsic-h: 60rem;
  --toolbar-offset: 0px; /* app.js sets the measured toolbar height on <html> */

  /* states */
  --focus-width:  2px;
  --focus-offset: 2px;
  --press-offset: 1px;
  --disabled-opacity: 0.55;
  --hit-pad: calc((var(--control-height) - 1lh) / 2); /* resolves per element: pads a text line up to 44px */

  /* motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 100ms;
  --dur-short: 190ms;
  --dur-long:  360ms;

  --z-base:       1;
  --z-raised:     10;
  --z-dropdown:   100;
  --z-sticky:     200;
  --z-sticky-nav: 300;
  --z-modal:      400;
  --z-toast:      500;
  --z-tooltip:    600;
}


/* Hallmark · genre: editorial · macrostructure: Long Document (content) + Index-First (index) + record (Long Document head · F3 spec sheet · S3 sticky head) · design-system: design.md · designed-as-app · theme: Almanac (tuned) · tone: documentary · anchor hue: 245 · nav: N13 · footer: Ft4 · enrichment: none */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · H4: on phones the rankings table starts below the lede and distribution facts (generator order) · E4: checked on the rebuilt site at 320/375/700/780/1280 px (last CSS edits via injected overrides); forced-colors and screen readers not tested */
/* Hallmark · gates: contrast: pass (40–41) · nav: N13 · footer: Ft4 · slop: pass (42–45) · honest: pass (46, home fact links say what the query returns) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · states: pass (26) · mobile: pass (34, 50–57) */

*, *::before, *::after { box-sizing: border-box; }
[hidden]:not([hidden="until-found"]) { display: none !important; }
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-height) + var(--space-2xl)); /* sticky bar + sticky table head */
}
body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; }
a { color: var(--color-accent); text-decoration-thickness: var(--rule-hair); text-underline-offset: var(--underline-offset); }
@media (hover: hover) { a:hover { text-decoration-thickness: var(--rule-strong); } }
:where(a):active { color: var(--color-accent-press); }
[aria-disabled="true"] { opacity: var(--disabled-opacity); cursor: not-allowed; }
:focus { outline: none; }
:focus-visible { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link { position: absolute; inset-inline-start: var(--space-md); inset-block-start: calc(-1 * var(--space-4xl)); z-index: var(--z-tooltip); display: inline-flex; align-items: center; min-height: var(--control-height); padding-inline: var(--space-sm); background: var(--color-ink); color: var(--color-paper); }
.skip-link:focus-visible { inset-block-start: var(--space-xs); }
.skip-link:active { transform: translateY(var(--press-offset)); }

.shell { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-gutter); }

/* ---------- N13 bar ---------- */
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
.bar__inner { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--bar-height); }
.brand { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: var(--control-height); margin-inline-end: auto; color: var(--color-ink); text-decoration: none; white-space: nowrap; }
.brand__name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-md); line-height: var(--lh-tight); }
.brand__sub { overflow-x: clip; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); letter-spacing: var(--tracking-label); }
@media (hover: hover) { .brand:hover .brand__name { color: var(--color-accent); } }
.brand:active .brand__name { color: var(--color-accent-press); }
@media (max-width: 23.49rem) { .brand__years { display: none; } }

.search-pill {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  min-width: var(--control-height); height: var(--control-height); padding-inline: var(--space-sm);
  background: var(--color-paper-2); color: var(--color-muted);
  border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-input);
  font: inherit; font-size: var(--text-sm); cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
@media (hover: hover) {
  .search-pill:hover { background: var(--color-paper-3); color: var(--color-neutral); }
  .search-pill:hover .search-pill__kbd { color: var(--color-neutral); }
}
.search-pill:active { transform: translateY(var(--press-offset)); }
.search-pill:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.search-pill__icon { position: relative; flex: none; width: var(--icon-size); height: var(--icon-size); border: var(--rule-strong) solid currentColor; border-radius: 50%; }
.search-pill__icon::after { content: ""; position: absolute; inset-inline-start: calc(var(--icon-size) * 0.69); inset-block-start: calc(var(--icon-size) * 0.8); width: calc(var(--icon-size) * 0.45); height: var(--rule-strong); background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.search-pill__text, .search-pill__kbd { display: none; }
.search-pill__kbd { font-family: var(--font-mono); font-size: var(--text-xs); border: var(--rule-hair) solid var(--color-rule); padding-inline: var(--space-2xs); color: var(--color-muted); }

.bar__nav { display: none; }
.bar__menu { position: relative; }
.bar__menu > summary { display: inline-flex; align-items: center; height: var(--control-height); padding-inline: var(--space-sm); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); cursor: pointer; list-style: none; font-size: var(--text-sm); white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out); }
.bar__menu > summary::-webkit-details-marker { display: none; }
.bar__menu[open] > summary { background: var(--color-paper-2); }
@media (hover: hover) { .bar__menu > summary:hover { background: var(--color-paper-3); } }
.bar__menu > summary:active { transform: translateY(var(--press-offset)); }
.bar__menu-list { position: absolute; inset-inline-end: 0; top: calc(100% + var(--space-2xs)); z-index: var(--z-dropdown); display: grid; min-width: var(--menu-min); margin: 0; padding: var(--space-2xs) 0; list-style: none; background: var(--color-paper); border: var(--rule-hair) solid var(--color-rule-2); }
.bar__menu-list a { display: block; padding: var(--space-sm) var(--space-md); color: var(--color-ink); text-decoration: none; white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out); }
.bar__menu-list a:focus-visible { outline-offset: calc(-1 * var(--focus-width)); }
@media (hover: hover) { .bar__menu-list a:hover { background: var(--color-paper-2); } }
.bar__menu-list a:active { background: var(--color-paper-3); }
.bar__menu-list a[aria-current="page"] { color: var(--color-accent); font-weight: var(--weight-strong); }

@media (min-width: 40rem) {
  .search-pill { min-width: var(--control-min); }
  .search-pill__text { display: inline; }
  .search-pill__kbd { display: inline; margin-inline-start: auto; }
}
@media (min-width: 60rem) {
  .bar__inner { gap: var(--space-lg); }
  .brand { margin-inline-end: 0; }
  .search-pill { margin-inline-start: var(--space-lg); }
  .bar__menu { display: none; }
  .bar__nav { display: flex; gap: var(--space-lg); margin-inline-start: auto; }
  .bar__nav a { position: relative; color: var(--color-ink); text-decoration: none; white-space: nowrap; font-size: var(--text-sm); padding-block: var(--space-xs); border-bottom: var(--rule-strong) solid transparent; }
  .bar__nav a::before { content: ""; position: absolute; inset-inline: 0; inset-block: calc((100% - var(--control-height)) / 2); } /* 44px hit area, box unchanged */
  .bar__nav a[aria-current="page"] { color: var(--color-accent); border-bottom-color: var(--color-accent); }
  .bar__nav a:active { color: var(--color-accent-press); }
}
@media (min-width: 60rem) and (hover: hover) { .bar__nav a:hover { color: var(--color-accent); } }

/* ---------- page head ---------- */
main { display: block; padding-block: var(--space-xl) var(--space-3xl); }
.page-head { display: grid; gap: var(--space-sm); max-width: var(--measure); margin-bottom: var(--space-2xl); }
.meta-line { margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); letter-spacing: var(--tracking-label); overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); font-style: normal; color: var(--color-ink); min-width: 0; overflow-wrap: anywhere; }
h1 { margin: 0; font-size: var(--text-display); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h1.is-long { font-size: var(--text-xl); line-height: var(--lh-snug); letter-spacing: 0; }
h2 { margin: 0 0 var(--space-md); font-size: var(--text-xl); line-height: var(--lh-snug); }
h3 { margin: 0 0 var(--space-xs); font-size: var(--text-md); line-height: var(--lh-snug); }
.lede { margin: 0; font-size: var(--text-md); line-height: var(--lh-relaxed); color: var(--color-ink-2); }
p { max-width: var(--measure); }
.he-block { max-width: var(--measure); text-align: start; }

/* ---------- sections: uneven rhythm on purpose ---------- */
.section { margin-top: var(--space-2xl); }
.section + .section { margin-top: var(--space-3xl); }
.section.section--tight { margin-top: var(--space-xl); }
.section > p { margin-block: 0 var(--space-md); }
.note { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- Long Document prose ---------- */
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 var(--space-md); line-height: var(--lh-relaxed); }
.prose h2 { margin-top: var(--space-2xl); }
.prose ul, .prose ol { margin: 0 0 var(--space-md); padding-inline-start: var(--space-lg); line-height: var(--lh-relaxed); }
.prose li + li { margin-top: var(--space-2xs); }
.formula { margin: 0 0 var(--space-md); padding-block: var(--space-sm); border-block: var(--rule-hair) solid var(--color-rule-2); font-family: var(--font-mono); font-size: var(--text-sm); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Index-First list ---------- */
.index { margin: 0; padding: 0; list-style: none; border-top: var(--rule-strong) solid var(--color-ink); }
.index__row { border-bottom: var(--rule-hair) solid var(--color-rule); }
.index__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-md); padding-block: var(--space-md); color: var(--color-ink); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
@media (hover: hover) { .index__link:hover { background: var(--color-paper-2); } }
.index__link:active { background: var(--color-paper-3); }
.index__title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-lg); line-height: var(--lh-snug); color: var(--color-accent); }
.index__count { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-ink-2); text-align: end; white-space: nowrap; }
.index__desc { grid-column: 1 / -1; margin: 0; color: var(--color-muted); font-size: var(--text-sm); max-width: var(--measure); }
@media (max-width: 23.99rem) {
  .index__link { grid-template-columns: minmax(0, 1fr); }
  .index__count { text-align: start; }
}

/* ---------- F3 spec sheet (facts) ---------- */
.facts { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; border-top: var(--rule-strong) solid var(--color-ink); max-width: var(--facts-max); }
.facts__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xs) var(--space-lg); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.facts dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 40rem) { .facts__row { grid-template-columns: var(--facts-label) minmax(0, 1fr); align-items: baseline; } }

/* ---------- figures: tabular, never broken inside a number ---------- */
/* numbers keep their NBSP groups; .figure-sub moves to the next line as a whole and wraps only between words (it can hold a phrase) */
.figure { font-family: var(--font-mono); font-weight: var(--weight-label); font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.figure-sub { display: inline-block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; overflow-wrap: normal; }

/* ---------- toolbar (filter · sort · live count) ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-sm) var(--space-lg); margin-bottom: var(--space-md); }
.field { display: grid; gap: var(--space-2xs); min-width: 0; }
.field__label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.field__control { height: var(--control-height); min-width: min(var(--control-min), 100%); max-width: 100%; padding-inline: var(--space-sm); background: var(--color-paper); color: var(--color-ink); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-input); font: inherit; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
@media (hover: hover) { .field__control:hover { background: var(--color-paper-2); } }
.field__control:active { background: var(--color-paper-3); }
.field__control:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.live-count { margin: 0; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-ink-2); }
@media (max-width: 39.99rem) {
  /* one control per row, so a selected value (e.g. the sort direction) is never cut off */
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); padding-block: var(--space-xs); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .toolbar .field__control { width: 100%; min-width: 0; }
}
@media (max-width: 39.99rem) and (min-height: 36rem) {
  /* the thead is hidden on phones, so a one-control toolbar is the pinned orientation aid (S3);
     two stacked controls would pin a third of the screen. app.js puts the pinned height into --toolbar-offset (0 when none). */
  html { scroll-padding-top: calc(var(--bar-height) + var(--toolbar-offset) + var(--space-xs)); }
  .toolbar:not(:has(.field ~ .field)) { position: sticky; top: var(--bar-height); z-index: var(--z-sticky); }
}

/* ---------- tables ---------- */
.sheet-wrap { width: 100%; }
.sheet { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.sheet caption { text-align: start; padding-bottom: var(--space-xs); color: var(--color-muted); }
.sheet thead th { position: sticky; top: var(--bar-height); z-index: var(--z-sticky); background: var(--color-paper); text-align: start; vertical-align: bottom; padding: var(--space-sm) var(--space-sm) var(--space-xs); border-bottom: var(--rule-strong) solid var(--color-ink); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.sheet td { padding: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: top; min-width: 0; overflow-wrap: anywhere; }
.sheet td a { position: relative; }
.sheet td a::before { content: ""; position: absolute; inset-inline: 0; inset-block: calc((100% - var(--control-height)) / 2); } /* 44px hit area inside the row padding */
.sheet tbody tr { transition: background-color var(--dur-micro) var(--ease-out); }
@media (hover: hover) { .sheet tbody tr:not(.sheet__group):hover { background: var(--color-paper-2); } }
.sheet .num { text-align: end; font-family: var(--font-mono); }
.sheet .mono { font-family: var(--font-mono); }
.sheet td.mono, .sheet td.num, .sheet .pending { overflow-wrap: normal; }

/* faction group rows (vote pages) */
.sheet__group th { padding: var(--space-lg) var(--space-sm) var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule-2); text-align: start; vertical-align: bottom; font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-md); line-height: var(--lh-snug); color: var(--color-ink); overflow-wrap: anywhere; }
.sheet__group-sum { margin-inline-start: var(--space-xs); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-body); letter-spacing: var(--tracking-label); color: var(--color-muted); overflow-wrap: normal; }

/* cards below 48rem: the 7-column tables (rankings, monthly vote lists) need about 45rem of content width */
@media (max-width: 47.99rem) {
  .sheet--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sheet--stack tbody tr { display: block; padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
  /* label floats in the start padding, so any inline content (figure + sub, word + Hebrew) flows as one value */
  .sheet--stack td { display: flow-root; padding-block: var(--space-2xs); padding-inline: calc(var(--stack-label) + var(--space-sm)) 0; border: 0; }
  .sheet--stack td::before { content: attr(data-label); float: inline-start; width: var(--stack-label); margin-inline-start: calc(-1 * (var(--stack-label) + var(--space-sm))); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); overflow-wrap: anywhere; }
  .sheet--stack td a { display: inline-block; padding-block: var(--hit-pad); }
  .sheet--stack td a::before { content: none; }
  .sheet--stack td:has(a)::before { padding-block-start: var(--hit-pad); }
  .sheet--stack .num { text-align: start; }
  .sheet--stack tbody tr.sheet__group { padding-block: var(--space-lg) var(--space-xs); border-bottom: var(--rule-strong) solid var(--color-ink); }
  .sheet--stack .sheet__group th { display: block; padding: 0; border: 0; }
}

/* ---------- honest placeholders + sources ---------- */
.pending { display: inline-flex; align-items: baseline; gap: var(--space-xs); max-width: 100%; padding: var(--space-3xs) var(--space-xs); background: var(--color-paper-3); color: var(--color-neutral); font-size: var(--text-sm); }
.pending__dash { font-family: var(--font-mono); }
.src { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-src); white-space: nowrap; }
.src::after { content: "\00A0\2197"; content: "\00A0\2197" / ""; }
.sources { margin: var(--space-md) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-2xs); }
.sources li { overflow-wrap: anywhere; }
.code-word { font-weight: var(--weight-strong); }
.code-he { color: var(--color-muted); font-size: var(--text-xs); margin-inline-start: var(--space-2xs); }

details.more { margin-top: var(--space-md); max-width: var(--measure); }
details.more > summary { display: flex; align-items: center; gap: var(--space-xs); min-height: var(--control-height); color: var(--color-accent); cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; content: "+" / ""; font-family: var(--font-mono); }
details.more[open] > summary::before { content: "\2212"; content: "\2212" / ""; }
@media (hover: hover) { details.more > summary:hover { text-decoration: underline; text-decoration-thickness: var(--rule-hair); text-underline-offset: var(--underline-offset); } }
details.more > summary:active { color: var(--color-accent-press); }
details.more[open] > summary { margin-bottom: var(--space-sm); }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding-block: var(--space-2xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
.plain-list a { display: inline-flex; align-items: center; min-height: var(--control-height); }

/* ---------- Ft4 colophon ---------- */
.colophon { border-top: var(--rule-strong) solid var(--color-ink); padding-block: var(--space-xl) var(--space-2xl); }
.colophon p { margin: 0; max-width: var(--measure); font-family: var(--font-mono); font-size: var(--text-xs); line-height: var(--lh-relaxed); color: var(--color-neutral); overflow-wrap: anywhere; }

/* ---------- search dialog (N13) ---------- */
.search { width: min(var(--dialog-width), calc(100% - 2 * var(--space-md))); max-height: var(--dialog-max-h); margin: var(--space-3xl) auto auto; padding: 0; border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink); }
.search::backdrop { background: var(--color-backdrop); }
.search[open] { animation: search-in var(--dur-short) var(--ease-out); }
@keyframes search-in { from { opacity: 0; } to { opacity: 1; } }
.search__inner { display: grid; grid-template-areas: "field" "status" "results" "foot"; grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: calc(var(--dialog-max-h) - 2 * var(--rule-hair)); }
.search__field { grid-area: field; display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.search__input { flex: 1; min-width: 0; height: var(--control-height); padding-inline: var(--space-sm); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-paper); color: var(--color-ink); font: inherit; transition: background-color var(--dur-micro) var(--ease-out); }
.search__input::placeholder { color: var(--color-muted); opacity: 1; }
@media (hover: hover) { .search__input:hover { background: var(--color-paper-2); } }
.search__input:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.search__input:disabled::placeholder { color: var(--color-rule-2); }
.search__close { height: var(--control-height); padding-inline: var(--space-sm); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper-2); color: var(--color-ink); font: inherit; font-size: var(--text-sm); cursor: pointer; white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out); }
@media (hover: hover) { .search__close:hover { background: var(--color-paper-3); } }
.search__close:active { transform: translateY(var(--press-offset)); }
.search__close:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
/* status sits above the list visually (stays above the phone keyboard); in the DOM it follows the listbox */
.search__status { grid-area: status; margin: 0; padding: var(--space-xs) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.search__results { grid-area: results; overflow-y: auto; overscroll-behavior: contain; padding-block: var(--space-2xs); }
.search__results:empty { padding-block: 0; }
.search__group { margin: var(--space-sm) var(--space-md) var(--space-2xs); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.search__item { display: grid; align-content: center; gap: var(--space-3xs); min-height: var(--control-height); padding: var(--space-xs) var(--space-md); color: var(--color-ink); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.search__item:focus-visible { outline-offset: calc(-1 * var(--focus-width)); }
@media (hover: hover) { .search__item:hover { background: var(--color-paper-2); } }
.search__item:active { background: var(--color-paper-3); }
.search__item[aria-selected="true"] { background: var(--color-paper-2); box-shadow: inset var(--rule-strong) 0 0 var(--color-accent); }
.search__item-sub { font-size: var(--text-xs); color: var(--color-muted); }
.search__foot { grid-area: foot; display: none; gap: var(--space-md); padding: var(--space-xs) var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }
@media (min-width: 40rem) { .search__foot { display: flex; } }
@media (max-width: 39.99rem) {
  .search { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; }
  .search__inner { height: 100%; max-height: none; }
}

@media (forced-colors: active) {
  .search__item[aria-selected="true"] { outline: var(--focus-width) solid Highlight; outline-offset: calc(-1 * var(--focus-width)); }
}

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