/* The Composite — Hybrid redesign v2
   Based on the current site's dark-mode vocabulary (DM Sans + Newsreader, blue accent, rounded cards, topic-hue pills)
   with editorial rhythm selectively borrowed (italic kickers, ruled sections, numbered items, serif headlines w/ italic accents)
*/

/* Self-hosted web fonts (same-origin, preloaded for above-the-fold text; latin-ext loads only when needed via unicode-range). */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dmsans-400-normal-latin-ext.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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dmsans-400-normal-latin.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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dmsans-500-normal-latin-ext.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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dmsans-500-normal-latin.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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/dmsans-600-normal-latin-ext.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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/dmsans-600-normal-latin.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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-400-normal-latin-ext.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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-400-normal-latin.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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-500-normal-latin-ext.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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-500-normal-latin.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-400-italic-latin-ext.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-400-italic-latin.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/newsreader-500-italic-latin-ext.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/newsreader-500-italic-latin.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/newsreader-600-italic-latin-ext.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/newsreader-600-italic-latin.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-400-normal-latin-ext.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-400-normal-latin.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/newsreader-500-normal-latin-ext.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/newsreader-500-normal-latin.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/newsreader-600-normal-latin-ext.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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/newsreader-600-normal-latin.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;
}

/* Metric-adjusted fallback faces: a local system font forced to match each web
   font's box metrics (size-adjust + ascent/descent/line-gap overrides computed
   from the real font files) so above-the-fold text does not reflow when
   Newsreader / DM Sans swap in. */
@font-face {
  font-family: 'Newsreader Fallback';
  src: local('Georgia');
  size-adjust: 96.05%;
  ascent-override: 76.53%;
  descent-override: 27.59%;
  line-gap-override: 0.00%;
}
@font-face {
  font-family: 'DM Sans Fallback';
  src: local('Arial');
  size-adjust: 105.58%;
  ascent-override: 93.96%;
  descent-override: 29.36%;
  line-gap-override: 0.00%;
}

:root {
  color-scheme: dark;
  /* Base colors — current site */
  --bg: #0c0a09;
  --bg-raised: #15120f;
  --bg-card: #15120f;
  --fg: #e7e5e4;
  --muted: #a8a29e;
  --border: #292524;
  --accent: #60a5fa;
  --accent-subtle: #0d1e3a;
  --accent-glow: rgba(96, 165, 250, 0.14);

  /* Gold italic accent from current hero */
  --gold: #d4b87a;

  --ff-sans: 'DM Sans', 'DM Sans Fallback', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-serif: 'Newsreader', 'Newsreader Fallback', ui-serif, Georgia, serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --container: 980px;
  --density-y: 1;
  --tx-fast: 160ms ease;
  --tx: 220ms ease;
}

[data-variant="ivory"] {
  color-scheme: light;
  --bg: #faf8f3;
  --bg-raised: #f2ede2;
  --bg-card: #ffffff;
  --fg: #1c1917;
  --muted: #6d6560;
  --border: #e0dbd0;
  --accent: #1d4ed8;
  --accent-subtle: #dbeafe;
  --accent-glow: rgba(29, 78, 216, 0.1);
  --gold: #b8923c;
}

[data-density="compact"] { --density-y: 0.75; }
[data-density="airy"] { --density-y: 1.3; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--ff-sans);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; transition: color var(--tx-fast); }
a:hover { color: var(--accent); }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
  width: 100%;
}

/* ===== Nav (close to current site) ===== */
.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  gap: var(--s-6);
}
.nav__brand {
  font-family: var(--ff-serif);
  font-weight: 600;
  font-style: italic;
  font-size: 22px;
  color: var(--fg);
  letter-spacing: -0.01em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.nav__brand,
.nav__link {
  text-decoration: none;
}
.nav__brand:hover { color: var(--accent); }
.nav__right { display: flex; align-items: center; gap: var(--s-6); }
.nav__links { display: flex; gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-block;
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
  padding: var(--s-2) 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
}
.nav__link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav__link[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.footer__subscribe {
  align-self: flex-start;
  margin-top: var(--s-4);
  padding: 8px 16px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--tx), color var(--tx);
}
.footer__subscribe:hover { background: var(--accent); color: var(--bg); }

/* ===== Page / sections ===== */
.page { padding-bottom: calc(var(--s-20) * var(--density-y)); }
.section { margin-top: calc(var(--s-16) * var(--density-y)); }
.section:first-child { margin-top: calc(var(--s-10) * var(--density-y)); }

.sect-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.sect-head__title {
  font-family: var(--ff-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.sect-head__title em { font-style: italic; font-weight: 500; color: var(--gold); }
.sect-head__rule { display: none; }
.sect-head__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.sect-head__link:hover { gap: 8px; }
.sect-head__link-arrow { transition: transform var(--tx-fast); display: inline-block; }
.sect-head__link:hover .sect-head__link-arrow { transform: translateX(2px); }

/* ===== Hero (restrained) ===== */
.hero {
  padding: calc(var(--s-12) * var(--density-y)) 0 calc(var(--s-8) * var(--density-y));
  border-bottom: 1px solid var(--border);
}
.hero__title {
  font-family: var(--ff-serif);
  font-size: clamp(32px, 2.3rem + 1.4vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-4);
  max-width: 22ch;
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--gold); font-weight: 500; }
.topic-spinner {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid hsl(var(--topic-hue, 210) 45% 40%);
  background: hsl(var(--topic-hue, 210) 40% 20%);
  color: hsl(var(--topic-hue, 210) 60% 82%);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--tx), box-shadow var(--tx);
}
.topic-spinner:hover { transform: scale(1.03); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.topic-spinner__icon {
  font-size: 13px;
  transition: transform .5s ease;
  display: inline-block;
}
.topic-spinner--spinning .topic-spinner__icon { animation: spin 0.7s linear infinite; }
.topic-spinner--spinning .topic-spinner__label {
  opacity: 0.5;
  transition: opacity 120ms ease;
}
@keyframes spin { to { transform: rotate(360deg); } }
[data-variant="ivory"] .topic-spinner {
  background: hsl(var(--topic-hue, 210) 60% 94%);
  color: hsl(var(--topic-hue, 210) 45% 28%);
  border-color: hsl(var(--topic-hue, 210) 40% 68%);
}

/* ===== Featured — Lead + digest (Concept B) ===== */
.featured {
  margin-top: var(--s-8);
}

/* Topic-tinted accent color derived from --topic-hue, falls back to accent */
.featured { --topic-accent: oklch(65% 0.11 var(--topic-hue, 210)); }

/* Section head: "New in <topic-spinner>" */
.featured__head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
  transition: opacity .3s ease;
}
.featured__head--dim { opacity: 0.5; }
.featured__eyebrow {
  margin: 0;
  font-family: var(--ff-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1.2;
  white-space: nowrap;
}

/* Visually hidden but available to assistive tech (e.g. control descriptions). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.featured__eyebrow .topic-spinner--inline { margin-left: 2px; }

/* Inline topic-spinner variant (used as italic word inside headline) */
.topic-spinner--inline {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--topic-accent);
  font-style: italic;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border-radius: 0;
  box-shadow: none !important;
  transition: color .3s ease;
  vertical-align: baseline;
}
.topic-spinner--inline:hover { transform: none; color: var(--topic-accent); }
.topic-spinner--inline .topic-spinner__label {
  padding-bottom: 0;
  border-bottom: none;
}
.topic-spinner--inline .topic-spinner__icon {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color var(--tx-fast), color var(--tx-fast);
  flex-shrink: 0;
}
.topic-spinner--inline:hover .topic-spinner__icon {
  border-color: var(--topic-accent);
  color: var(--topic-accent);
}

/* Body: lead + divider + digest */
.featured__body {
  display: grid;
  grid-template-columns: 1.3fr 1px 1fr;
  column-gap: var(--s-8);
  align-items: start;
  /* Reserve space so the JS-hydrated lead/digest does not shift content
     below it (above-the-fold CLS on the home page). */
  min-height: clamp(300px, 38vh, 400px);
}
.digest { padding-left: 0; }
.featured__body--dim { opacity: 0.55; filter: blur(2px); pointer-events: none; }
.featured__body--rotating { opacity: 0.3; transition: opacity 320ms ease; }
.featured__body { transition: opacity 420ms ease; }
.featured__divider {
  align-self: stretch;
  width: 1px;
  background: var(--border);
}

/* Lead paper */
.lead {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  cursor: pointer;
  padding: 0;
  text-align: left;
  outline: none;
}
.lead:focus-visible { outline: 2px solid var(--topic-accent); outline-offset: 6px; }
.lead__eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--topic-accent);
  transition: color .3s ease;
}
.lead__title {
  font-family: var(--ff-serif);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0;
  text-wrap: balance;
  /* A long unbroken token in a title must wrap, not widen the page. */
  overflow-wrap: anywhere;
  transition: color var(--tx-fast);
}
.lead:hover .lead__title { color: var(--topic-accent); }
.lead__meta {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}
.lead__date {
  font-family: var(--ff-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.lead__quote {
  margin: var(--s-2) 0 0;
  padding: 0;
  border-left: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
}
.lead__quote-mark {
  font-size: 14px;
  color: var(--topic-accent);
  line-height: 1.4;
  transition: color .3s ease;
}
.lead__quote-text {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
  color: var(--fg);
  max-width: 52ch;
}
.lead__read {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--s-3);
  transition: color var(--tx-fast);
  cursor: pointer;
}
.lead:hover .lead__read { color: var(--topic-accent); }

/* Digest (numbered list on the right) */
.digest {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.digest__item {
  display: block;
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--tx-fast);
  outline: none;
}
.digest__item:first-child { border-top: none; padding-top: 0; }
.digest__item:hover { background: color-mix(in oklab, var(--bg-raised) 40%, transparent); }
.digest__item:focus-visible { outline: 2px solid var(--topic-accent); outline-offset: 4px; }
.digest__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.digest__title {
  font-family: var(--ff-serif);
  font-size: 15px;
  line-height: 1.32;
  color: var(--fg);
  letter-spacing: -0.005em;
  transition: color var(--tx-fast);
}
.digest__item:hover .digest__title { color: var(--topic-accent); }
.digest__meta {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.digest__journal { color: var(--muted); }
.digest__dot { color: var(--border); margin: 0 4px; }

@media (max-width: 900px) {
  .featured__body { grid-template-columns: 1fr; gap: var(--s-6); }
  .featured__divider { display: none; }
  .digest { border-top: 1px solid var(--border); padding-top: var(--s-4); }
}


/* ===== Topic pills — serif italic on a soft hue wash ===== */
.topic-pill {
  display: inline-block;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  padding: 2px 9px 3px;
  border-radius: 3px;
  background: oklch(30% 0.05 var(--topic-hue, 210) / 0.28);
  color: oklch(78% 0.08 var(--topic-hue, 210));
  border: none;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background var(--tx-fast), color var(--tx-fast);
}
[data-variant="ivory"] .topic-pill {
  background: oklch(92% 0.04 var(--topic-hue, 210));
  color: oklch(38% 0.11 var(--topic-hue, 210));
}
.topic-pill--chip {
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 1px solid oklch(45% 0.06 var(--topic-hue, 210) / 0.55);
  padding: 2px 10px 3px;
}
.topic-pill--chip:hover {
  background: oklch(30% 0.05 var(--topic-hue, 210) / 0.28);
}
.topic-pill--chip[aria-pressed="true"] {
  background: oklch(38% 0.1 var(--topic-hue, 210));
  color: oklch(95% 0.02 var(--topic-hue, 210));
  border-color: oklch(55% 0.1 var(--topic-hue, 210));
}
[data-variant="ivory"] .topic-pill--chip {
  background: transparent;
  border-color: oklch(60% 0.1 var(--topic-hue, 210) / 0.55);
  color: oklch(40% 0.11 var(--topic-hue, 210));
}
[data-variant="ivory"] .topic-pill--chip:hover {
  background: oklch(92% 0.04 var(--topic-hue, 210));
}
[data-variant="ivory"] .topic-pill--chip[aria-pressed="true"] {
  background: oklch(40% 0.12 var(--topic-hue, 210));
  color: oklch(96% 0.02 var(--topic-hue, 210));
  border-color: oklch(40% 0.12 var(--topic-hue, 210));
}

.topic-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; }

/* ===== Article list (editorial, no accent stripe) ===== */
.article-list { display: flex; flex-direction: column; gap: 0; margin: 0 calc(-1 * var(--s-4)); }
.article-item {
  padding: calc(var(--s-4) * var(--density-y)) var(--s-4);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--tx-fast);
  border-top: 1px solid var(--border);
  border-left: none;
}
.article-list .article-item:last-child { border-bottom: 1px solid var(--border); }
.article-item:hover {
  background: color-mix(in oklab, var(--bg-raised) 50%, transparent);
}
.article-item[data-expanded="true"] {
  background: color-mix(in oklab, var(--bg-raised) 85%, transparent);
  padding-bottom: calc(var(--s-5) * var(--density-y));
}
.article-item[data-expanded="true"] + .article-item {
  border-top-width: 1px;
  margin-top: var(--s-4);
}

.article-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}
.article-head__journal {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.article-head__date {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.article-head__caret {
  /* now a real <button> — strip UA button chrome */
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  transition: transform var(--tx-fast);
  font-size: 11px;
}
.article-item[data-expanded="true"] .article-head__caret { transform: rotate(180deg); color: var(--fg); }

/* Citation-export checkbox, in a left gutter so the head row keeps its layout */
.article-item[data-cite-card] { position: relative; padding-left: calc(var(--s-4) + 30px); }
.article-check {
  position: absolute;
  top: calc(var(--s-4) * var(--density-y) - 3px);
  left: calc(var(--s-4) - 4px);
  width: 24px; height: 24px;
  display: grid; place-items: center;
  cursor: pointer;
}
.article-check__input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.article-check__box {
  position: relative;
  width: 15px; height: 15px;
  border: 1px solid var(--muted);
  border-radius: 3px;
  pointer-events: none;
  transition: border-color var(--tx-fast), background var(--tx-fast);
}
.article-check:hover .article-check__box { border-color: var(--accent); }
.article-check__input:focus-visible + .article-check__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.article-check__input:checked + .article-check__box { border-color: var(--accent); background: var(--accent); }
.article-check__input:checked + .article-check__box::after {
  content: "";
  position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.article-title {
  font-family: var(--ff-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--fg);
  margin: 0 0 var(--s-2);
  letter-spacing: -0.005em;
}
.article-item:hover .article-title { color: var(--accent); }
.article-authors {
  font-family: var(--ff-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 var(--s-2);
}
.article-summary {
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg);
  margin: 0;
  max-width: 70ch;
}

.article-expanded {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.article-item .article-expanded { display: none; }
.article-item[data-expanded="true"] .article-expanded { display: flex; }
.article-item[data-expanded="true"] .article-summary { display: none; }
.article-expanded__body {
  display: grid;
  grid-template-columns: 2fr 1px 1fr;
  gap: var(--s-6);
  align-items: start;
}
.article-expanded__rule { background: var(--border); align-self: stretch; }
.article-expanded__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: var(--s-2);
  font-weight: 500;
}
.article-expanded__abstract {
  font-family: var(--ff-serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
  max-width: 62ch;
  margin: 0;
}
.article-expanded__marg {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.marg-item { display: flex; flex-direction: column; gap: 2px; }
.marg-item__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.marg-item__val {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--fg);
}
.marg-item__val--link { color: var(--accent); cursor: pointer; }
.marg-item--actions { flex-direction: row; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }

/* ===== Composite summary (AI pull-quote) ===== */
.composite-summary {
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.composite-summary__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-3);
}
.composite-summary__mark {
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}
.composite-summary__tag {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  cursor: help;
}
.composite-summary__text {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--fg);
  letter-spacing: -0.005em;
  margin: 0;
  max-width: 52ch;
}

.summary-vote {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-top: var(--s-3);
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
}
.summary-vote__prompt { margin-right: var(--s-1); }
.summary-vote__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.summary-vote__btn--down svg { transform: scaleY(-1); }
.summary-vote__btn:hover:not(:disabled) { color: var(--accent); border-color: var(--border); }
.summary-vote__btn:disabled { cursor: default; opacity: 0.4; }
.summary-vote__btn[aria-pressed="true"] { color: var(--accent); opacity: 1; }

.survey {
  position: fixed;
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: 60;
  width: min(320px, calc(100vw - 2 * var(--s-4)));
  padding: var(--s-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.survey__close {
  position: absolute;
  top: 2px;
  right: 6px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.survey__close:hover { color: var(--fg); }
.survey__q {
  margin: 0 var(--s-5) var(--s-3) 0;
  font-family: var(--ff-serif);
  font-size: 16px;
  color: var(--fg);
}
.survey__choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.survey__choice {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--fg);
  font-family: var(--ff-mono);
  font-size: 11px;
  cursor: pointer;
}
.survey__choice:hover { border-color: var(--accent); color: var(--accent); }
.survey__other { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.survey__other[hidden] { display: none; }
.survey__input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}

.btn--sm { padding: 4px 10px; font-size: 11px; }

@media (max-width: 700px) {
  .article-expanded__body { grid-template-columns: 1fr; }
  .article-expanded__rule { display: none; }
}

/* Legacy rule kept below for safety */
.article-side {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.article-side dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  color: var(--muted);
  margin-top: var(--s-3);
  font-weight: 500;
}
.article-side dt:first-child { margin-top: 0; }
.article-side dd { margin: 0; color: var(--fg); font-size: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all var(--tx-fast);
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
.btn--primary { border-color: var(--accent); color: var(--accent); }
.btn--primary:hover { background: var(--accent); color: var(--bg); }
.btn--ghost { border-color: transparent; color: var(--muted); padding: 4px 0; }
.btn--ghost:hover { color: var(--accent); background: none; }

/* ===== Explore grid ===== */
.explore {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-4);
}
.explore__card {
  position: relative;
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: transparent;
  font: inherit;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--tx), transform var(--tx), box-shadow var(--tx);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  overflow: hidden;
}
.explore__card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--tx);
}
.explore__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.explore__card:hover::before { transform: scaleY(1); }
.explore__title {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.01em;
}
.explore__title em { color: var(--gold); font-style: italic; }
.explore__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  flex: 1;
}
.explore__arrow {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--tx-fast);
  margin-top: var(--s-2);
}
.explore__card:hover .explore__arrow { gap: 10px; }

@media (max-width: 800px) {
  .explore { grid-template-columns: 1fr; }
}

/* ===== Page heads for subpages ===== */
.page-head {
  padding: calc(var(--s-12) * var(--density-y)) 0 calc(var(--s-6) * var(--density-y));
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-8);
}
/* The filter bar has its own top padding; drop it after a page head so the
   gap under the head's rule matches the other pages. */
.page-head + .filters { padding-top: 0; }
.page-head__title {
  font-family: var(--ff-serif);
  font-size: clamp(32px, 2rem + 2vw, 48px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
}
.page-head__title em { font-style: italic; color: var(--gold); font-weight: 500; }
.page-head__sub {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
  line-height: 1.6;
}

/* ===== Filters ===== */
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--border);
}
.filters__group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filters__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.filters__input, .filters__select {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--fg);
  outline: none;
  transition: border-color var(--tx-fast);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.filters__input:focus, .filters__select:focus { border-color: var(--accent); }
.filters__input::placeholder { color: var(--muted); }

.filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}
.filter-result {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
  padding: var(--s-4) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.05em;
}
.filter-result strong { color: var(--fg); }

/* ===== Journals ===== */
.journal-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.j-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 80px;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4) var(--s-5);
  background: var(--bg);
  cursor: pointer;
  transition: background var(--tx-fast);
}
.j-row:hover { background: var(--bg-raised); }
.j-row__abbrev {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.j-row__name {
  font-family: var(--ff-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--fg);
  letter-spacing: -0.005em;
}
/* The journal name is a real disclosure <button> — strip UA button chrome
   so it renders exactly like the plain text it replaced. */
.j-row__toggle {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.j-row__pub {
  display: block;
  font-family: var(--ff-sans);
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.j-row__impact {
  font-family: var(--ff-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.j-row__impact-prefix {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 4px;
  vertical-align: 3px;
}
.j-row__impact-label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}
.j-row__actions { display: flex; justify-content: flex-end; }
.j-row__expanded {
  grid-column: 1 / -1;
  padding-top: var(--s-4);
  margin-top: var(--s-3);
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--s-6);
}
.j-row__expanded { display: none; }
.j-row[data-open="true"] .j-row__expanded {
  display: grid;
  grid-column: 1 / -1;
  padding-top: var(--s-4);
  margin-top: var(--s-3);
  border-top: 1px dashed var(--border);
  grid-template-columns: 2fr 1fr;
  gap: var(--s-6);
}
.j-row__expanded p { font-size: 14px; line-height: 1.6; color: var(--fg); margin: 0; max-width: 60ch; }

@media (max-width: 700px) {
  .j-row { grid-template-columns: 72px 1fr; align-items: start; }
  .j-row__abbrev { font-size: 20px; line-height: 0.9; overflow-wrap: anywhere; }
  .j-row__impact, .j-row__actions { grid-column: 2; text-align: left; justify-content: flex-start; }
  .j-row__expanded { grid-template-columns: 1fr; }
  .j-row[data-open="true"] .j-row__expanded { grid-template-columns: 1fr; }
}

/* ===== Year ribbon (archive) ===== */
.year-ribbon {
  padding: calc(var(--s-8) * var(--density-y)) 0 var(--s-4);
  margin-top: var(--s-8);
  border-top: 1px solid var(--border);
}
.year-ribbon:first-of-type { border-top: none; margin-top: 0; }
.year-ribbon__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-5);
  margin-bottom: var(--s-4);
}
.year-ribbon__year {
  font-family: var(--ff-serif);
  font-size: clamp(44px, 4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: var(--fg);
}
.year-ribbon__sub {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}

/* ===== Footer ===== */
.footer {
  padding: var(--s-12) 0 var(--s-6);
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  /* Sit the small FEEDBACK label on the same baseline as the brand. */
  align-items: baseline;
}
.footer__col strong {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  display: block;
  /* Puts the first link on the tagline's baseline once the label is
     baseline-aligned with the larger brand. */
  margin-bottom: 5px;
}
.footer__col a, .footer__col span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 2px 0;
}
.footer__col a:hover { color: var(--accent); }
.footer__brand {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: var(--s-1);
  letter-spacing: -0.01em;
}
.footer__brand-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (min-width: 701px) {
  .footer__inner { grid-template-columns: 1fr auto; }
}
.footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-6);
  border-top: 1px solid var(--border);
  margin-top: var(--s-8);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--ff-mono);
  letter-spacing: 0.05em;
}

/* ===== Anim ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp 550ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim--1 { animation-delay: .05s; }
.anim--2 { animation-delay: .12s; }
.anim--3 { animation-delay: .19s; }
.anim--4 { animation-delay: .26s; }

/* ===== Article modal ===== */
.modal-scrim {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--bg) 70%, black 30%);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: grid; place-items: center;
  padding: var(--s-6);
  animation: fadeUp 220ms ease-out both;
}
.modal-scrim[hidden] { display: none !important; }
.modal {
  position: relative;
  background: var(--surface, var(--bg));
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 720px; width: 100%;
  max-height: calc(100vh - var(--s-12));
  overflow-y: auto;
  padding: var(--s-10) var(--s-10) var(--s-8);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
}
.modal__close {
  position: absolute; top: var(--s-3); right: var(--s-4);
  background: none; border: none; color: var(--muted);
  font-size: 32px; line-height: 1; cursor: pointer;
  padding: 4px 10px; border-radius: 4px;
}
.modal__close:hover { color: var(--fg); background: var(--border); }
.modal__kicker {
  display: flex; gap: var(--s-2); align-items: center;
  font-family: var(--ff-sans); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3);
}
.modal__kicker-sep { opacity: .5; }
.modal__title {
  font-family: var(--ff-serif); font-weight: 500;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.15;
  letter-spacing: -0.01em; margin: 0 0 var(--s-3);
}
.modal__authors {
  font-family: var(--ff-serif); font-style: italic;
  color: var(--muted); margin: 0 0 var(--s-4); font-size: 16px;
}
.modal__topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-6); }
.modal__label {
  font-family: var(--ff-sans); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--s-2);
}
.modal__abstract {
  font-family: var(--ff-serif); font-size: 17px;
  line-height: 1.6; margin: 0 0 var(--s-6);
}
.modal__meta {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 6px var(--s-4);
  font-family: var(--ff-sans); font-size: 13px;
  padding-top: var(--s-4); border-top: 1px solid var(--border);
  margin: 0 0 var(--s-6);
}
.modal__meta dt { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; align-self: center; }
.modal__meta dd { margin: 0; color: var(--fg); }
.modal__meta code { font-family: var(--ff-mono, monospace); font-size: 12px; }
.modal__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Subscribe modal specifics */
.modal--sub { max-width: 580px; }
.modal__sub-intro {
  font-family: var(--ff-serif); font-size: 16px; line-height: 1.55;
  color: var(--muted); margin: 0 0 var(--s-5);
}
.feed-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: var(--s-5); }
.feed-row {
  display: grid; grid-template-columns: 130px 1fr auto;
  gap: var(--s-3); align-items: center;
  padding: var(--s-3) var(--s-4);
  background: var(--bg);
}
.feed-row__label { font-family: var(--ff-sans); font-size: 13px; font-weight: 500; color: var(--fg); }
.feed-row__url {
  font-family: var(--ff-mono, monospace); font-size: 12px;
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-row__btn { padding: 6px 12px; font-size: 12px; }
.modal__sub-foot {
  font-family: var(--ff-sans); font-size: 13px; color: var(--muted);
  padding-top: var(--s-4); border-top: 1px solid var(--border);
}

/* Citation export: selection bar + review dialog */
.cite-export {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-3);
  padding: 0 0 var(--s-4);
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.05em;
  color: var(--muted);
}
.cite-export strong { color: var(--fg); }
.cite-export__actions { display: flex; align-items: center; gap: var(--s-4); }
.cite-export .btn:disabled, .cite-export__run .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.cite-export .btn--primary:disabled:hover,
.cite-export__run .btn--primary[aria-disabled="true"]:hover { background: none; color: var(--accent); }
.modal--cite { max-width: 680px; }
.cite-review {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; margin-bottom: var(--s-5);
  max-height: 40vh; overflow-y: auto;
}
.cite-review__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-4); align-items: center;
  padding: var(--s-3) var(--s-4); background: var(--bg);
}
.cite-review__title { font-family: var(--ff-serif); font-size: 15px; line-height: 1.35; color: var(--fg); margin: 0 0 2px; }
.cite-review__meta, .cite-review__empty { font-family: var(--ff-sans); font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }
.cite-review__empty { padding: var(--s-4); background: var(--bg); }
.cite-review__note { font-family: var(--ff-sans); font-size: 12px; line-height: 1.5; font-style: italic; color: var(--fg); margin: 2px 0 0; }
.cite-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-5); }
.cite-options__group {
  border: 1px solid var(--border); border-radius: 6px;
  padding: var(--s-3) var(--s-4); margin: 0;
  display: flex; flex-direction: column; gap: var(--s-2); min-width: 0;
}
.cite-options__legend {
  font-family: var(--ff-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); padding: 0 var(--s-2);
}
.cite-options__option {
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--ff-sans); font-size: 13px; color: var(--fg); cursor: pointer;
}
.cite-options__option input { accent-color: var(--accent); margin: 0; }
/* Keep Export in view while the dialog scrolls (a long selection or a short
   phone screen would otherwise push it below the fold). */
.cite-export__run {
  position: sticky; bottom: calc(-1 * var(--s-8)); z-index: 1;
  margin: 0 calc(-1 * var(--s-10)) calc(-1 * var(--s-8));
  padding: var(--s-3) var(--s-10) var(--s-4);
  background: var(--surface, var(--bg)); border-top: 1px solid var(--border);
}
@media (max-width: 700px) {
  .modal--cite { padding: var(--s-8) var(--s-5) var(--s-5); }
  .modal--cite .cite-review { max-height: 28vh; margin-bottom: var(--s-4); }
  .modal--cite .cite-options { gap: var(--s-3); margin-bottom: var(--s-4); }
  .modal--cite .cite-export__run {
    bottom: calc(-1 * var(--s-5));
    margin: 0 calc(-1 * var(--s-5)) calc(-1 * var(--s-5));
    padding: var(--s-3) var(--s-5) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  }
  .modal--cite .cite-export__run .btn { flex: 1; justify-content: center; }
}

.copy-toast {
  position: fixed;
  bottom: var(--s-6);
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--radius);
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 13px;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.copy-toast[hidden] { display: none; }

/* Site announcement: one-line bar pinned to the bottom of the viewport.
   Fixed (not in flow) so revealing or dismissing it never shifts the page. */
.announce {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 2 * var(--s-4));
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  font-family: var(--ff-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg);
  z-index: 50;
}
.announce[hidden] { display: none; }
/* Slides up from below the viewport when site.js reveals it. */
.announce:not([hidden]) { animation: announce-in 450ms cubic-bezier(.2,.8,.2,1); }
@keyframes announce-in {
  from { transform: translate(-50%, calc(100% + var(--s-8))); opacity: 0; }
}
.announce__text { margin: 0; }
.announce__link { color: var(--accent); white-space: nowrap; }
.announce__close {
  flex: none;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
}
.announce__close:hover { color: var(--fg); }

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: var(--s-2) var(--s-4);
  z-index: 100;
  font-weight: 600;
  font-family: var(--ff-sans);
}
.skip-link:focus-visible { top: 0; }

.about { max-width: 64ch; }
.about__section + .about__section { margin-top: var(--s-8); }
.about__heading {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
}
.about p { margin: 0; }
.about__list { margin: 0; padding-left: var(--s-5); }
.about__list li + li { margin-top: var(--s-3); }
.about__list li::marker { color: var(--gold); }
.about a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.about .composite-summary__tag { cursor: default; }

.error-page {
  text-align: center;
  padding: calc(var(--s-24) * var(--density-y)) 0;
}
.error-code {
  font-family: var(--ff-serif);
  font-size: clamp(80px, 6vw + 4rem, 140px);
  font-weight: 500;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--s-4);
}
.error-title {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 2rem + 1.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
}
.error-message {
  font-size: 16px;
  color: var(--muted);
  margin: 0 auto var(--s-8);
  max-width: 460px;
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  .anim { animation: none; }
  .announce:not([hidden]) { animation: none; }
  .modal-scrim { animation: none; }
  .topic-spinner__icon { transition: none !important; }
  /* Stop the residual motion too: the spinner's keyframe rotation and the
     featured section's blur/fade sweeps. */
  .topic-spinner--spinning .topic-spinner__icon { animation: none !important; }
  .featured__body,
  .featured__head { transition: none !important; }
}

@media (max-width: 700px) {
  .nav__inner { flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) var(--s-6); min-height: auto; }
  .nav__right { width: 100%; min-width: 0; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
  .nav__links { gap: var(--s-3); font-size: 13px; flex-wrap: wrap; }

  .filters { grid-template-columns: 1fr; }

  .featured__eyebrow { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
  .topic-spinner--inline { white-space: normal; }

  .article-expanded { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--s-2); }
}

/* Five nav links fit on one row down to 320px only with a tighter gap. */
@media (max-width: 360px) {
  .nav__links { gap: var(--s-2); }
}
