/* The AntJanus Dispatch — broadsheet system */

:root {
  --paper-100: #f5f1e6;
  --paper-200: #ebe5d5;
  --paper-300: #ddd5c0;
  --ink-900: #16140f;
  --ink-700: #3a362d;
  --ink-600: #57514a;
  --slate-600: #364f6a;
  --slate-300: #9dbbdb;
  --red-700: #8f2a1c;
  --red-300: #f09482;
  --night-100: #121110;
  --night-200: #1b1a17;
  --night-300: #26241f;
  --night-ink: #ebe4d3;
  --night-dim: #b3ab99;

  --bg: var(--paper-100);
  --bg-raised: var(--paper-200);
  --bg-sunk: var(--paper-300);
  --text: var(--ink-900);
  --text-body: var(--ink-700);
  --text-dim: var(--ink-600);
  --rule: var(--ink-900);
  --rule-soft: #b9b09a;
  --spot: var(--slate-600);
  --alert: var(--red-700);
  --code-bg: var(--paper-200);
  --img-filter: grayscale(1) contrast(1.08) sepia(0.12);
  --dot: rgba(22, 20, 15, 0.22);

  --font-flag: "UnifrakturMaguntia", "Old English Text MT", serif;
  --font-hed: "Playfair Display", "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-sans: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --measure: 66ch;
  --gutter: 1.5rem;
  --page: 1320px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: var(--night-100);
  --bg-raised: var(--night-200);
  --bg-sunk: var(--night-300);
  --text: var(--night-ink);
  --text-body: #d9d2c1;
  --text-dim: var(--night-dim);
  --rule: #d9d2c1;
  --rule-soft: #4a463d;
  --spot: var(--slate-300);
  --alert: var(--red-300);
  --code-bg: var(--night-200);
  --img-filter: grayscale(1) contrast(1.05) brightness(0.85);
  --dot: rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night-100);
    --bg-raised: var(--night-200);
    --bg-sunk: var(--night-300);
    --text: var(--night-ink);
    --text-body: #d9d2c1;
    --text-dim: var(--night-dim);
    --rule: #d9d2c1;
    --rule-soft: #4a463d;
    --spot: var(--slate-300);
    --alert: var(--red-300);
    --code-bg: var(--night-200);
    --img-filter: grayscale(1) contrast(1.05) brightness(0.85);
    --dot: rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: url("assets/newsprint-texture.png");
  background-size: 900px auto;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
:root[data-theme="dark"] body { background-blend-mode: multiply; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--spot); }
:focus-visible { outline: 3px solid var(--spot); outline-offset: 3px; }
h1, h2, h3, h4 { color: var(--text); margin: 0; font-family: var(--font-hed); font-weight: 800; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--bg); padding: 0.75rem 1rem; z-index: 50; font-family: var(--font-sans); }
.skip:focus { left: 1rem; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 2rem; }

/* ---------- folio / masthead ---------- */
.folio {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-sans); font-size: 0.875rem; letter-spacing: 0.04em;
  color: var(--text-dim); padding: 0.65rem 0; border-bottom: 1px solid var(--rule);
}
.folio span { white-space: nowrap; }
.folio .folio-mid { text-transform: uppercase; }
.edition-toggle {
  font: 600 0.875rem/1 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase;
  background: transparent; color: var(--text); border: 1px solid var(--rule);
  padding: 0.7rem 0.9rem; min-height: 44px; cursor: pointer; display: inline-flex; gap: 0.5rem; align-items: center;
}
.edition-toggle:hover { background: var(--text); color: var(--bg); }
.edition-toggle svg { width: 16px; height: 16px; }

.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; padding: 1.5rem 0 1rem; }
.flag {
  font-family: var(--font-flag); font-weight: 400; color: var(--text);
  font-size: clamp(2.5rem, 5.4vw, 5rem); line-height: 1.05; text-align: center; letter-spacing: 0.01em;
  text-decoration: none; display: block;
}
.flag:hover { color: var(--text); }
.flag-sub { text-align: center; font-family: var(--font-body); font-style: italic; color: var(--text-dim); font-size: 1.0625rem; margin-top: 0.5rem; }
.ear {
  border: 1px solid var(--rule); padding: 0.75rem 1rem; font-family: var(--font-sans); font-size: 0.875rem;
  color: var(--text-body); width: 12.5rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center; line-height: 1.4;
}
.ear.right { justify-self: end; }
.ear b { display: block; font-family: var(--font-hed); font-size: 1.5rem; color: var(--text); line-height: 1.1; }
.ear svg { flex: none; }
.seal { width: 56px; height: 56px; color: var(--text); }

.masthead.compact { grid-template-columns: auto 1fr auto; padding: 1rem 0 0.75rem; }
.masthead.compact .flag { font-size: clamp(2rem, 4vw, 3.25rem); text-align: left; }
.masthead.compact .section-slug { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.875rem; font-weight: 700; color: var(--text); text-align: right; }

.sections {
  border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; justify-content: center; flex-wrap: wrap;
}
.sections a {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--text); padding: 0.8rem 1.1rem; min-height: 44px; display: inline-flex; align-items: center;
  border-left: 1px solid var(--rule-soft);
}
.sections a:first-child { border-left: 0; }
.sections a:hover { background: var(--bg-raised); color: var(--text); }
.sections a[aria-current="page"] { background: var(--text); color: var(--bg); }
.teasers {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; justify-content: center;
  font-family: var(--font-sans); font-size: 0.9375rem; padding: 0.6rem 0; border-bottom: 3px double var(--rule);
}
.teasers b { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.875rem; color: var(--alert); }
.teasers a { text-decoration: none; }
.teasers a:hover { text-decoration: underline; }

/* ---------- headline hierarchy ---------- */
.kicker {
  display: inline-block; font-family: var(--font-sans); font-weight: 700; font-size: 0.875rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--spot); margin-bottom: 0.5rem;
}
.kicker.red { color: var(--alert); }
.hed-banner { font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: 0.98; font-weight: 900; letter-spacing: -0.015em; }
.hed-1 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.04; font-weight: 900; letter-spacing: -0.01em; }
.hed-2 { font-size: clamp(1.5rem, 2.2vw, 1.95rem); line-height: 1.12; font-weight: 800; }
.hed-3 { font-size: 1.3rem; line-height: 1.2; font-weight: 700; }
.hed-4 { font-family: var(--font-body); font-size: 1.15rem; line-height: 1.25; font-weight: 700; }
.hed-italic { font-style: italic; font-weight: 700; }
.hed-banner a, .hed-1 a, .hed-2 a, .hed-3 a, .hed-4 a { text-decoration: none; }
.hed-banner a:hover, .hed-1 a:hover, .hed-2 a:hover, .hed-3 a:hover, .hed-4 a:hover { text-decoration: underline; text-decoration-thickness: 2px; color: var(--text); }
.deck { font-family: var(--font-body); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--text-body); margin: 0.75rem 0 1rem; }
.deck.lg { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }
.byline {
  font-family: var(--font-sans); font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim);
  display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0.5rem 0 1rem;
}
.byline strong { color: var(--text); font-weight: 700; }
.dateline { font-family: var(--font-sans); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.summary { font-size: 1.0625rem; color: var(--text-body); margin: 0.35rem 0 0.5rem; }
.meta { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-dim); letter-spacing: 0.03em; }
.more { font-family: var(--font-sans); font-weight: 700; font-size: 0.9375rem; text-decoration: none; color: var(--spot); display: inline-flex; min-height: 44px; align-items: center; }
.more:hover { text-decoration: underline; }
.jump { font-family: var(--font-sans); font-size: 0.875rem; font-style: normal; font-weight: 600; color: var(--spot); }

.standing {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 4px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.55rem 0 0.45rem; margin: 2.75rem 0 1.5rem;
}
.standing h2 { font-family: var(--font-sans); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.125rem; }
.standing .standing-deck { font-style: italic; color: var(--text-dim); font-size: 1.0625rem; margin: 0; flex: 1; }
.standing .more { min-height: 0; }

/* ---------- grid + column rules ---------- */
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.row > * { padding: 0 var(--gutter); min-width: 0; }
.row > *:first-child { padding-left: 0; }
.row > *:last-child { padding-right: 0; }
.row.ruled > * + * { border-left: 1px solid var(--rule-soft); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; } .span-9 { grid-column: span 9; } .span-12 { grid-column: span 12; }

.stack > * + * { border-top: 1px solid var(--rule-soft); margin-top: 1.1rem; padding-top: 1.1rem; }
.cutoff { border: 0; border-top: 1px solid var(--rule); margin: 1.75rem 0; }
.cutoff.double { border-top: 3px double var(--rule); }

/* ruled auto grid (hairline trick) */
.rgrid { overflow: hidden; }
.rgrid-in { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: -1px 0 0 -1px; }
.rgrid-in > * { border-left: 1px solid var(--rule-soft); border-top: 1px solid var(--rule-soft); padding: 1.1rem 1.25rem 1.25rem; min-width: 0; }
.rgrid-in.w320 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rgrid-in.w220 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.textcols { column-count: 2; column-gap: 2.5rem; column-rule: 1px solid var(--rule-soft); }
.textcols.three { column-count: 3; }
.textcols p { text-align: justify; hyphens: auto; }
.textcols > * { break-inside: avoid-column; }

.dropcap::first-letter {
  font-family: var(--font-hed); font-weight: 900; float: left; font-size: 4.4em; line-height: 0.82;
  padding: 0.06em 0.1em 0 0; color: var(--text);
}

/* ---------- figures ---------- */
.photo { position: relative; margin: 0 0 1rem; }
.photo .frame { position: relative; overflow: hidden; background: var(--bg-sunk); }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); }
.photo .frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 0.8px, transparent 1.1px); background-size: 4px 4px; mix-blend-mode: multiply;
}
.photo.color img { filter: none; }
.ratio-16x9 .frame { aspect-ratio: 16 / 9; }
.ratio-3x2 .frame { aspect-ratio: 3 / 2; }
.ratio-4x5 .frame { aspect-ratio: 4 / 5; }
.ratio-1x1 .frame { aspect-ratio: 1 / 1; }
.ratio-21x9 .frame { aspect-ratio: 21 / 9; }
.cutline { font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.45; color: var(--text-dim); margin-top: 0.5rem; }
.cutline b { color: var(--text); }
.credit { display: block; text-align: right; font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-top: 0.25rem; }

/* ---------- fold ---------- */
.fold { display: flex; align-items: center; gap: 1rem; margin: 2.5rem 0 0; color: var(--text-dim); font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.2em; text-transform: uppercase; }
.fold::before, .fold::after { content: ""; flex: 1; border-top: 1px dashed var(--rule-soft); }

/* ---------- boxes ---------- */
.box { border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 3px; padding: 1.25rem 1.4rem; margin: 4px; }
.box.inverse { background: var(--text); color: var(--bg); outline-color: var(--text); }
.box.inverse h2, .box.inverse h3 { color: var(--bg); }
.box.inverse .kicker { color: var(--bg); opacity: 0.85; }
.box.inverse a:not(.btn) { color: var(--bg); }
.box-label { font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; color: var(--text-dim); border-bottom: 1px solid var(--rule-soft); padding-bottom: 0.4rem; margin-bottom: 0.9rem; }
.box.inverse .box-label { color: var(--bg); border-color: currentColor; opacity: 0.85; }

.statbox { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 1.25rem 0; }
.statbox > div { padding: 0.8rem 0.4rem; text-align: center; min-width: 0; }
.statbox > div + div { border-left: 1px solid var(--rule-soft); }
.statbox b { display: block; font-family: var(--font-hed); font-weight: 900; font-size: 2rem; line-height: 1; color: var(--text); font-variant-numeric: lining-nums; }
.statbox span { font-family: var(--font-sans); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; overflow-wrap: anywhere; color: var(--text-dim); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.7rem 1.2rem;
  font: 700 0.9375rem/1 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  background: var(--text); color: var(--bg); border: 1px solid var(--text); cursor: pointer; transition: background 150ms, color 150ms;
}
.btn:hover { background: var(--spot); border-color: var(--spot); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--text); color: var(--bg); }
.box.inverse .btn { background: var(--bg); color: var(--text); border-color: var(--bg); }
.box.inverse .btn:hover { background: transparent; color: var(--bg); }
.link-quiet { font-family: var(--font-sans); font-weight: 600; font-size: 0.9375rem; color: var(--text-dim); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.link-quiet:hover { color: var(--spot); text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-top: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0.6rem 0 0; }
.tags li, .tag {
  font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--rule-soft); padding: 0.2rem 0.5rem; color: var(--text-body); text-decoration: none; display: inline-block;
}
a.tag:hover { border-color: var(--text); color: var(--text); }
.badge { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.15rem 0.45rem; border: 1px solid currentColor; color: var(--alert); vertical-align: middle; }
.badge.solid { background: var(--alert); color: var(--bg); border-color: var(--alert); }

/* ---------- stories ---------- */
.story { min-width: 0; }
.story .photo { margin-bottom: 0.9rem; }
.brief .hed-4 { margin-bottom: 0.25rem; }
.numbered { counter-reset: n; list-style: none; padding: 0; margin: 0; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.25rem; padding: 0.8rem 0; border-top: 1px solid var(--rule-soft); }
.numbered li:first-child { border-top: 0; padding-top: 0; }
.numbered li::before { content: counter(n); font-family: var(--font-hed); font-weight: 900; font-size: 1.8rem; line-height: 1; color: var(--text); }

/* agate tables */
.agate { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.9375rem; }
.agate caption { text-align: left; font-family: var(--font-sans); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.875rem; padding-bottom: 0.4rem; color: var(--text); }
.agate th { text-align: left; font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); border-bottom: 2px solid var(--rule); padding: 0.45rem 0.6rem 0.45rem 0; }
.agate td { border-bottom: 1px solid var(--rule-soft); padding: 0.6rem 0.6rem 0.6rem 0; vertical-align: top; }
.agate td.num, .agate th.num { text-align: right; font-variant-numeric: tabular-nums; }
.agate td a { font-weight: 600; }
.agate .up { color: var(--spot); font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* classifieds */
.classifieds { column-count: 4; column-gap: 0; column-rule: 1px solid var(--rule-soft); }
.classified { break-inside: avoid; padding: 0 1.1rem 1.25rem; }
.classified h3 { font-family: var(--font-sans); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.35rem; margin-bottom: 0.5rem; }
.classified p { font-size: 1rem; margin-bottom: 0.4rem; }
.classified .cat { font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--alert); font-weight: 700; }

/* section fronts (inside pages) */
.section-front { padding: 2rem 0 1.25rem; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: end; }
.section-front .section-name { font-family: var(--font-hed); font-style: italic; font-weight: 900; font-size: clamp(3.2rem, 9vw, 8rem); line-height: 0.9; letter-spacing: -0.02em; }
.section-front .section-letter { font-family: var(--font-sans); font-weight: 800; letter-spacing: 0.2em; font-size: 0.875rem; text-transform: uppercase; color: var(--alert); display: block; margin-bottom: 0.5rem; }
.section-front .deck { margin: 0.9rem 0 0; }

/* ---------- forms ---------- */
.field { display: flex; gap: 0; flex-wrap: wrap; margin-top: 0.75rem; }
.field input[type="email"], .field input[type="search"] {
  flex: 1 1 12rem; min-height: 44px; padding: 0.6rem 0.8rem; font: 1rem var(--font-body); color: var(--text);
  background: var(--bg); border: 1px solid var(--rule); border-right: 0; border-radius: 0;
}
.field .btn { flex: none; }
.form-note { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-dim); margin-top: 0.5rem; min-height: 1.3em; }
.form-note.ok { color: var(--spot); font-weight: 600; }
.form-note.err { color: var(--alert); font-weight: 600; }
.box.inverse input[type="email"] { background: var(--text); color: var(--bg); border-color: var(--bg); }
.box.inverse .form-note { color: var(--bg); }
.box.inverse ::placeholder { color: var(--bg); opacity: 0.7; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; font-family: var(--font-sans); font-size: 0.875rem; margin-top: 0.6rem; }
.check input { width: 20px; height: 20px; margin-top: 0.1rem; accent-color: var(--spot); }

/* ---------- footer ---------- */
.colophon { border-top: 3px double var(--rule); margin-top: 4rem; padding-top: 2rem; padding-bottom: 1rem; }
.colophon .flag { font-size: clamp(2rem, 4vw, 3rem); text-align: left; }
.colophon h2 { font-family: var(--font-sans); font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.6rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.35rem; }
.colophon ul { list-style: none; padding: 0; margin: 0; font-family: var(--font-sans); font-size: 1rem; }
.colophon li a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; }
.colophon li a:hover { text-decoration: underline; }
.colophon .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 0.8rem; font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-dim); }

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--alert); z-index: 40; }
.article-head { text-align: center; max-width: 60rem; margin: 2.5rem auto 1.5rem; }
.article-head .hed-banner { font-size: clamp(2.4rem, 5.6vw, 4.8rem); }
.article-head .byline { justify-content: center; }
.article-layout { display: grid; grid-template-columns: 15rem minmax(0, var(--measure)) 17rem; gap: 0; justify-content: center; margin-top: 2rem; }
.article-layout > * { padding: 0 2rem; }
.article-layout > aside:first-child { padding-left: 0; border-right: 1px solid var(--rule-soft); }
.article-layout > aside:last-child { padding-right: 0; border-left: 1px solid var(--rule-soft); }
.rail-sticky { position: sticky; top: 1.5rem; }
.toc h2 { font-family: var(--font-sans); font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 2px solid var(--rule); padding-bottom: 0.35rem; margin-bottom: 0.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 1.6rem 1fr; padding: 0.45rem 0; text-decoration: none; font-family: var(--font-sans); font-size: 0.9375rem; line-height: 1.35; border-bottom: 1px solid var(--rule-soft); color: var(--text-body); }
.toc a::before { content: counter(t); font-family: var(--font-hed); font-weight: 900; color: var(--text-dim); }
.toc a[aria-current="true"] { color: var(--text); font-weight: 700; }
.toc a[aria-current="true"]::before { color: var(--alert); }
.toc-mobile { display: none; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
.toc-mobile summary { font-family: var(--font-sans); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.875rem; padding: 0.8rem 0; cursor: pointer; min-height: 44px; }

.prose { font-size: 1.125rem; line-height: 1.7; color: var(--text-body); }
.prose > p:first-of-type { }
.prose h2 { font-size: 2rem; line-height: 1.15; margin: 2.6rem 0 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--rule); scroll-margin-top: 1.5rem; }
.prose ol, .prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.35rem; }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--code-bg); padding: 0.08em 0.3em; border: 1px solid var(--rule-soft); }
.prose a { color: var(--spot); }
.prose blockquote { margin: 1.75rem 0; padding: 0; }
.callout { border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.9rem 0 0.9rem; margin: 1.75rem 0; font-size: 1.0625rem; }
.callout .callout-label { display: block; font-family: var(--font-sans); font-weight: 800; font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--alert); margin-bottom: 0.35rem; }
.callout p { margin: 0; }
.callout.why { border-left: 0; padding-left: 0; }
.callout.why p { font-family: var(--font-hed); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--text); }
.callout.letters { border: 1px dashed var(--rule); padding: 1rem 1.2rem; background: var(--bg-raised); }
.callout.letters .callout-label { color: var(--spot); display: flex; gap: 0.5rem; align-items: center; }
.callout.editor { border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 3px; padding: 1rem 1.2rem; margin: 4px 4px 2rem; }

.listing { margin: 1.75rem 0; border: 1px solid var(--rule); background: var(--code-bg); }
.listing-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding: 0 0 0 0.9rem; font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.listing-head b { color: var(--text); }
.copy-btn { font: 700 0.8125rem/1 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; background: transparent; color: var(--text); border: 0; border-left: 1px solid var(--rule); min-height: 44px; padding: 0 1rem; cursor: pointer; }
.copy-btn:hover { background: var(--text); color: var(--bg); }
.listing pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.6; color: var(--text); tab-size: 2; }
.listing .c { color: var(--text-dim); font-style: italic; }
.listing .s { color: var(--spot); }
.listing .k { font-weight: 600; color: var(--alert); }

.filed { margin-top: 3rem; border-top: 3px double var(--rule); padding-top: 1rem; }
.share { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.rail-block + .rail-block { margin-top: 2rem; }
.rail .hed-4 { font-size: 1.05rem; }
.endmark { display: inline-block; width: 0.65em; height: 0.65em; background: var(--text); margin-left: 0.3em; vertical-align: baseline; }

/* ---------- patterns ---------- */
.controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: end; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0; margin-bottom: 0; }
.controls label.lbl { font-family: var(--font-sans); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 0.35rem; color: var(--text); }
.controls input[type="search"], .controls select {
  width: 100%; min-height: 44px; padding: 0.55rem 0.8rem; font: 1.0625rem var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--rule); border-radius: 0;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; grid-column: 1 / -1; }
.pill { font: 600 0.875rem/1 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; background: transparent; color: var(--text); border: 1px solid var(--rule); padding: 0 0.9rem; min-height: 44px; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.pill:hover { background: var(--bg-raised); }
.pill[aria-pressed="true"]:hover { background: var(--spot); border-color: var(--spot); }
.count-line { display: flex; gap: 1rem; align-items: center; font-family: var(--font-sans); font-size: 0.9375rem; padding: 0.7rem 0; min-height: 44px; }
.count-line button { font: 600 0.9375rem var(--font-sans); background: none; border: 0; color: var(--spot); text-decoration: underline; cursor: pointer; min-height: 44px; }
.p-card .p-num { font-family: var(--font-hed); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--text); font-variant-numeric: lining-nums; }
.p-card .p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.4rem; }
.p-card .hed-3 { margin: 0.25rem 0 0.4rem; }
.p-card p { font-size: 1rem; }
.empty { text-align: center; padding: 3rem 1rem; border-bottom: 1px solid var(--rule); }
.empty[hidden] { display: none; }

.three-ways { display: grid; grid-template-columns: repeat(3, 1fr); }
.three-ways > div { padding: 0 1.25rem; }
.three-ways > div:first-child { padding-left: 0; }
.three-ways > div + div { border-left: 1px solid var(--rule-soft); }

.panes { border: 1px solid var(--rule); margin-top: 1.5rem; }
.panes-bar { display: flex; justify-content: space-between; align-items: stretch; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.panes-tabs { display: flex; flex-wrap: wrap; }
.panes-tabs [role="tab"] { font: 700 0.875rem/1 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; background: transparent; color: var(--text-body); border: 0; border-right: 1px solid var(--rule-soft); padding: 0 1.1rem; min-height: 48px; cursor: pointer; }
.panes-tabs [role="tab"][aria-selected="true"] { background: var(--text); color: var(--bg); }
.panes-actions { display: flex; }
.panes-actions button { font: 700 0.8125rem/1 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; background: transparent; color: var(--text); border: 0; border-left: 1px solid var(--rule-soft); padding: 0 1rem; min-height: 48px; cursor: pointer; }
.panes-actions button:hover { background: var(--bg-raised); }
.panes-actions button[hidden] { display: none; }
.pane { padding: 1.5rem; }
.pane[hidden] { display: none; }
.pane pre { margin: 0; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.6; overflow-x: auto; color: var(--text); background: var(--code-bg); padding: 1rem; border: 1px solid var(--rule-soft); }
.pane .note { font-family: var(--font-sans); font-size: 0.9375rem; color: var(--text-dim); margin-bottom: 0.9rem; }
.prompt-text { max-width: var(--measure); font-size: 1.125rem; line-height: 1.7; }

/* live stat strip demo (the pattern itself) */
.hss { --surface: var(--bg); --border: var(--rule); --accent: var(--spot); }
.hss-caption { font-family: var(--font-sans); font-size: 0.9375rem; color: var(--text-dim); margin: 0 0 0.6rem; }
.hss-strip { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); overflow: hidden; grid-template-columns: 1fr; margin-bottom: 1.75rem; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss-tile { background: var(--surface); padding: 0.9rem 1rem; min-width: 0; text-align: left; border: 0; font: inherit; color: var(--text); }
.hss-tile .l { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--text-dim); display: block; overflow-wrap: anywhere; }
.hss-tile .v { font-family: var(--font-hed); font-weight: 900; font-size: 1.6rem; font-variant-numeric: tabular-nums lining-nums; display: block; line-height: 1.2; }
.hss-tile .v.missing { color: var(--text-dim); }
.hss-tile .u { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-dim); display: block; overflow-wrap: anywhere; }
button.hss-tile { cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: var(--bg-raised); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); box-shadow: inset 0 -3px 0 var(--accent); }
.hss-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule-soft); }
.hss-list li span:last-child { font-family: var(--font-sans); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); white-space: nowrap; }
.hss-status { font-family: var(--font-sans); font-size: 0.9375rem; margin-top: 0.75rem; color: var(--text); }

.two-col-list { columns: 2; column-gap: 2rem; padding-left: 1.2rem; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: 13rem minmax(0, 1fr); }
  .article-layout > aside:last-child { grid-column: 1 / -1; border-left: 0; border-top: 3px double var(--rule); padding: 2rem 0 0; margin-top: 2.5rem; }
  .article-layout > aside:last-child .rail-sticky { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
  .article-layout > aside:last-child .rail-block + .rail-block { margin-top: 0; }
  .classifieds { column-count: 2; }
}

@media (max-width: 960px) {
  .page { padding: 0 1.25rem; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > [class*="span-"] { grid-column: 1 / -1; padding: 0; }
  .row.ruled > * + * { border-left: 0; border-top: 1px solid var(--rule-soft); margin-top: 1.5rem; padding-top: 1.5rem; }
  .row.ruled.split-md { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead { grid-template-columns: 1fr; }
  .ear { display: none; }
  .masthead.compact { grid-template-columns: 1fr auto; }
  .masthead.compact .ear { display: none; }
  .textcols, .textcols.three { column-count: 1; }
  .textcols p { text-align: left; }
  .section-front { grid-template-columns: 1fr; gap: 1rem; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-layout > * { padding: 0; }
  .article-layout > aside:first-child { display: none; }
  .toc-mobile { display: block; }
  .three-ways { grid-template-columns: 1fr; }
  .three-ways > div { padding: 0.9rem 0; }
  .three-ways > div + div { border-left: 0; border-top: 1px solid var(--rule-soft); }
  .folio .folio-mid { display: none; }
}

@media (max-width: 640px) {
  .page { padding: 0 1rem; }
  body { font-size: 1.0625rem; }
  .classifieds { column-count: 1; }
  .classified { padding: 0 0 1.25rem; }
  .sections { display: grid; grid-template-columns: repeat(3, 1fr); }
  .sections a { justify-content: center; padding: 0.6rem 0.4rem; font-size: 0.875rem; letter-spacing: 0.05em; border-left: 1px solid var(--rule-soft); border-top: 1px solid var(--rule-soft); }
  .sections a:nth-child(3n+1) { border-left: 0; }
  .sections a:nth-child(-n+3) { border-top: 0; }
  .teasers { display: none; }
  .masthead { padding: 1rem 0 0.75rem; }
  .statbox b { font-size: 1.6rem; }
  .statbox span { font-size: 0.8125rem; }
  .rgrid-in, .rgrid-in.w320, .rgrid-in.w220 { grid-template-columns: minmax(0, 1fr); }
  .rgrid-in > * { padding: 1.1rem 0; border-left: 0; }
  .two-col-list { columns: 1; }
  .controls { grid-template-columns: 1fr; }
  .masthead.compact .section-slug { display: none; }
  .masthead.compact { grid-template-columns: 1fr; }
  .folio { font-size: 0.8125rem; }
  .flag-sub { font-size: 1rem; }
  .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- utilities ---------- */
.lead { padding-top: 1.75rem; }
.rail-head { font-family: var(--font-sans); font-size: 1rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border-top: 4px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.5rem 0 0.4rem; margin: 0 0 1rem; }
.btn-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.box p { margin-top: 0.6rem; }
.colophon p { margin-top: 0.75rem; }
.toc + .rail-block { margin-top: 2rem; }
.rail-block .link-quiet { margin-top: 0.5rem; }
.listing code { background: none; border: 0; padding: 0; font-size: inherit; }
.masthead.compact .flag { white-space: nowrap; }
@media (max-width: 400px) { .masthead.compact .flag { font-size: 1.85rem; } }

/* ---------- section-page components ---------- */
.picks { margin-top: 2rem; }
.picks .standing-deck, .lower .standing-deck { font-style: italic; color: var(--text-dim); margin: -0.5rem 0 0.75rem; }
.more-head { margin-top: 2.25rem; }
.archive { list-style: none; padding: 0; margin: 0; }
.archive li { break-inside: avoid; padding: 0 0 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--rule-soft); }
.archive .meta { margin: 0 0 0.2rem; }
.archive .summary { margin-bottom: 0; }
.lower { margin-top: 2.75rem; }
.subject-index { list-style: none; padding: 0; margin: 0; column-count: 3; column-gap: 1.5rem; column-rule: 1px solid var(--rule-soft); font-family: var(--font-sans); }
.subject-index li { break-inside: avoid; }
.subject-index a { display: flex; justify-content: space-between; gap: 0.5rem; min-height: 40px; align-items: center; text-decoration: none; border-bottom: 1px dotted var(--rule-soft); font-size: 1rem; }
.subject-index a:hover { color: var(--spot); }
.subject-index .count { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.notice-strip { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding: 1rem 0; font-size: 1.2rem; font-family: var(--font-body); color: var(--text); }
.notice-strip p { margin: 0; }
.notice-strip .kicker { margin: 0 0.6rem 0 0; }
.spaced { margin-top: 1.75rem; border-top: 1px solid var(--rule); }
.forthcoming { margin-top: 2rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.jump-row { border-bottom: 0; border-top: 0; justify-content: flex-start; padding: 0.9rem 0; }
.jump-row a { min-height: 32px; display: inline-flex; align-items: center; }
.market { margin-top: 2rem; border-top: 3px double var(--rule); padding-top: 1rem; }
.market .summary { font-family: var(--font-body); font-size: 1rem; margin: 0.15rem 0 0; }
.career-bar { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); }
.career-bar li { padding: 0.7rem 0.6rem; border-left: 1px solid var(--rule-soft); font-family: var(--font-sans); }
.career-bar li:first-child { border-left: 0; padding-left: 0; background: none; }
.career-bar li:first-child b { color: var(--alert); }
.career-bar b { display: block; font-size: 0.9375rem; color: var(--text); line-height: 1.25; }
.career-bar span { font-size: 0.875rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.roles { padding-left: 1.1rem; margin: 0.4rem 0 0.9rem; font-size: 1rem; }
.roles li { margin-bottom: 0.4rem; }
.from-files { margin-top: 2rem; }
.proverbs { margin-top: 3rem; padding: 2rem; }
.proverb-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem 2rem; }
.proverb-list blockquote { margin: 0; }
.proverb-list p { font-family: var(--font-hed); font-style: italic; font-weight: 700; font-size: 1.45rem; line-height: 1.3; margin: 0; }
.box.inverse .more { color: var(--bg); }
.hedcut .frame::before { content: ""; position: absolute; inset: 0; z-index: 1; background: url("assets/hedcut-portrait.png") center / cover no-repeat; }
.profile-lead { margin-top: 2rem; }
.profile-lead .hed-banner { margin-bottom: 0.25rem; }
.closing { margin-top: 3rem; }
p.hed-3 { font-family: var(--font-body); font-weight: 400; font-size: 1.3rem; line-height: 1.45; color: var(--text); }

@media (max-width: 960px) {
  .career-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .career-bar li { border-top: 1px solid var(--rule-soft); }
  .career-bar li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .subject-index { column-count: 2; }
  .plain-list.two { grid-template-columns: 1fr; }
  .archive.textcols { column-count: 1; }
}

/* ---------- pattern pages ---------- */
ol.rgrid-in { list-style: none; padding: 0; }
.rgrid-in > [hidden] { display: none; }
.p-card .tags { margin-top: 0.4rem; }
.reach { padding-top: 1.25rem; margin-bottom: 0.5rem; }
.reach .two-col-list { margin: 0; font-size: 1.0625rem; }
.spaced-box { margin-top: 2rem; }
.pane code { font-family: var(--font-mono); }
.pane .note code, .prompt-text code { font-size: 0.9em; background: var(--code-bg); padding: 0.05em 0.3em; border: 1px solid var(--rule-soft); }
.hss-list li[hidden] { display: none; }
@media (max-width: 640px) {
  .panes-tabs [role="tab"] { padding: 0 0.75rem; }
  .pane { padding: 1rem; }
  .hss-strip.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 21rem) and (max-width: 41.99rem) {
  .hss-strip.five > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
