@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Miranda+Sans:wght@400;500;600&display=swap');

:root {
  /* base */
  --ink: #191b1e;
  --paper: #faf9f6;
  --canvas: #ecebe7;
  --accent: #0e5a4a;
  --accent-hover: #0a4237;
  --muted: #5a5e63;
  --muted-2: #8a8e93;
  --line: #dcdad4;
  --line-soft: #e6e4de;
  --text-2: #3a3e43;
  /* semantic */
  --text-body: var(--ink);
  --text-secondary: var(--text-2);
  --text-caption: var(--muted);
  --surface-page: var(--canvas);
  --surface-card: var(--paper);
  --surface-inverse: var(--ink);
  --text-inverse: var(--paper);
  --border-card: var(--line);
  --border-divider: var(--line-soft);
  --interactive: var(--accent);
  /* type */
  --font-serif: 'Merriweather', Georgia, serif;
  --font-sans: 'Miranda Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  font-family: var(--font-sans);
  color: var(--text-body);
}

a { color: var(--interactive); }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--interactive);
}

.btn {
  display: inline-flex;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 28px;
  cursor: pointer;
  background: var(--interactive);
  color: var(--text-inverse);
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); color: var(--text-inverse); }

.arrow-link {
  font-size: 14px;
  text-decoration: none;
}

/* Header */
.site-header { border-bottom: 1px solid var(--border-card); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 21px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a:not(.btn) {
  font-size: 13.5px;
  color: var(--text-caption);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--text-body); }
.btn-nav {
  background: var(--ink);
  font-size: 13px;
  padding: 9px 20px;
}
.btn-nav:hover { background: var(--text-2); }

/* Hero */
.hero { border-bottom: 1px solid var(--border-card); }
.hero .container {
  padding-top: 88px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 54px;
  line-height: 1.12;
  text-wrap: pretty;
}
.hero-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 520px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.hero-note {
  font-size: 12.5px;
  color: var(--text-caption);
}

/* Edition preview card */
.edition-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-card);
  background: var(--surface-card);
  box-shadow: 24px 24px 0 var(--canvas);
}
.edition-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.edition-date {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.streak-pill {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--interactive);
  color: var(--text-inverse);
  padding: 2px 10px;
  border-radius: 999px;
}
.edition-lead {
  padding: 18px 20px;
  background: var(--surface-inverse);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edition-lead-kicker {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.edition-lead-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text-inverse);
}
.edition-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.edition-row-title {
  font-size: 13px;
  font-weight: 500;
}
.edition-row-tag {
  font-size: 11px;
  color: var(--text-caption);
  white-space: nowrap;
}
.edition-progress {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edition-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-caption);
}
.progress-track { height: 3px; background: var(--border-divider); }
.progress-fill { height: 3px; background: var(--interactive); }

/* How it works */
.how { background: var(--canvas); border-bottom: 1px solid var(--border-card); }
.how .container {
  padding-top: 72px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.section-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}
.section-intro h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-number {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
  color: var(--interactive);
}
.step h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
}
.step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Threads */
.threads { border-bottom: 1px solid var(--border-card); }
.threads .container {
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.threads-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.threads-copy h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
}
.threads-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.timeline {
  border: 1px solid var(--border-card);
  background: var(--surface-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.timeline-item { display: flex; gap: 14px; }
.timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 12px;
}
.timeline-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface-card);
}
.timeline-dot-current {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--interactive);
}
.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--border-card);
}
.timeline-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 18px;
}
.timeline-item:last-child .timeline-body { padding-bottom: 0; }
.timeline-year { font-size: 11px; color: var(--text-caption); }
.timeline-year-current { color: var(--interactive); }
.timeline-event { font-size: 14px; font-weight: 500; }
.timeline-item:last-child .timeline-event { font-weight: 600; }

/* Closing CTA */
.cta { background: var(--surface-inverse); }
.cta .container {
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.cta h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.25;
  color: var(--text-inverse);
  max-width: 640px;
}
.cta p {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
}
.cta .btn { margin-top: 6px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--text-2);
  background: var(--surface-inverse);
}
.site-footer .container {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer span,
.site-footer a {
  font-size: 12px;
  color: var(--muted-2);
  text-decoration: none;
}
.site-footer a:hover { color: var(--paper); }
.footer-links { display: flex; gap: 20px; }

/* ============================================================
   Deep dive (article page)
   ============================================================ */
.dd-backbar { border-bottom: 1px solid var(--border-divider); }
.dd-backbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.dd-back {
  font-size: 13px;
  color: var(--text-caption);
  text-decoration: none;
}
.dd-back:hover { color: var(--text-body); }
.dd-backbar-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-caption);
}

.dd-measure {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Article header */
.dd-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 44px;
  padding-bottom: 12px;
}
.dd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
}
.tag-solid { background: var(--interactive); color: var(--text-inverse); }
.tag-outline { color: var(--text-caption); border: 1px solid var(--border-card); }
.dd-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(27px, 4.5vw, 38px);
  line-height: 1.2;
  text-wrap: pretty;
}
.dd-meta { font-size: 13px; color: var(--text-caption); }

/* Prose column */
.dd-prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
  font-size: 17px;
  line-height: 1.7;
}
.dd-prose > p { margin: 0; }
.dd-prose > p strong { font-weight: 600; }
.dd-h {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}

/* Bordered stack list (reform waves, PYQs) */
.dd-list { border: 1px solid var(--border-card); display: flex; flex-direction: column; }
.dd-list-head { padding: 14px 18px; border-bottom: 1px solid var(--border-divider); }
.dd-list-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--interactive);
}
.dd-list-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dd-list-row:last-child { border-bottom: 0; }
.dd-list-text { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* Statute tree */
.dd-tree { display: flex; flex-direction: column; }
.dd-tree-item { display: flex; gap: 14px; }
.dd-tree-rail { display: flex; flex-direction: column; align-items: center; }
.dd-node { width: 10px; height: 10px; margin-top: 6px; }
.dd-node-filled { background: var(--interactive); }
.dd-node-open { background: var(--surface-card); border: 1.5px solid var(--ink); }
.dd-tree-line { width: 1.5px; flex: 1; background: var(--border-card); }
.dd-tree-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 18px;
}
.dd-tree-item:last-child .dd-tree-body { padding-bottom: 0; }
.dd-tree-title { font-size: 14px; font-weight: 600; }
.dd-tree-text { font-size: 13px; line-height: 1.55; color: var(--text-caption); }
.dd-tree-text a { font-size: 12.5px; }

/* Case table (reform by court order) */
.dd-cases { border: 1px solid var(--border-card); display: flex; flex-direction: column; }
.dd-case {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.dd-case:last-child { border-bottom: 0; }
.dd-case-year {
  font-size: 13px;
  font-weight: 600;
  color: var(--interactive);
  white-space: nowrap;
  min-width: 62px;
}
.dd-case-text { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* By the numbers */
.dd-stats {
  background: var(--canvas);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dd-stats-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.dd-stats-row { display: flex; gap: 24px; }
.dd-stat { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dd-stat-num { font-family: var(--font-serif); font-weight: 900; font-size: 28px; }
.dd-stat-cap { font-size: 13px; line-height: 1.45; color: var(--text-caption); }

/* Callout (exam angle) */
.dd-callout {
  border: 1px solid var(--ink);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dd-callout-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.dd-callout p { margin: 0; font-size: 14px; line-height: 1.6; }

/* PYQ rows */
.dd-pyq {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dd-pyq:last-child { border-bottom: 0; }
.dd-pyq-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.dd-pyq-text { font-size: 14px; line-height: 1.6; }
.dd-pyq-text em { color: var(--text-caption); }

/* Linkages band */
.dd-linkages { background: var(--canvas); border-top: 1px solid var(--border-card); }
.dd-linkages .dd-measure {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dd-linkages-head { display: flex; flex-direction: column; gap: 4px; }
.dd-linkages-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
}
.dd-card { background: var(--surface-card); border: 1px solid var(--border-card); }
.dd-card-graph { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.dd-card-graph-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dd-card-graph-head span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--interactive);
}
.dd-card-graph-head a { font-size: 12px; text-decoration: none; }
.dd-card-graph svg { display: block; width: 100%; height: auto; }

.dd-thread-head { padding: 14px 20px; border-bottom: 1px solid var(--border-divider); }
.dd-thread-head span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--interactive);
}
.dd-thread-link {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
}
.dd-thread-link:last-child { border-bottom: 0; }
.dd-thread-link:hover { color: var(--text-body); background: var(--paper); }
.dd-thread-meta { color: var(--text-caption); font-size: 12px; white-space: nowrap; }

/* Bottom CTA */
.dd-cta { padding-top: 24px; padding-bottom: 56px; }
.dd-cta .btn { width: 100%; justify-content: center; padding: 14px; }

/* ============================================================
   Today's edition (daily feed)
   ============================================================ */
.te-shell {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Intro */
.te-intro {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.te-intro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.te-date {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.te-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
}
.te-sub { font-size: 13.5px; color: var(--text-secondary); }

/* Tabs */
.te-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-card);
  margin-top: 18px;
}
.te-tab {
  font-size: 13.5px;
  color: var(--text-caption);
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.te-tab:hover { color: var(--text-body); }
.te-tab-active {
  color: var(--text-body);
  font-weight: 600;
  border-bottom-color: var(--interactive);
}
.te-tab-active:hover { color: var(--text-body); }

/* Feed */
.te-feed { background: var(--canvas); }
.te-feed .te-shell {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.te-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  color: inherit;
  text-decoration: none;
}
.te-card:hover { border-color: var(--muted-2); color: inherit; }
.te-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.te-kicker {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.te-card-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
}
.te-card-sum {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.te-card-foot {
  border-top: 1px solid var(--border-divider);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.te-card-meta { font-size: 12px; color: var(--text-caption); }
.te-card-read { font-size: 12px; color: var(--interactive); text-decoration: none; }

/* Lead (inverse) card */
.te-card-lead { background: var(--surface-inverse); border-color: var(--surface-inverse); }
.te-card-lead:hover { border-color: var(--text-2); }
.te-card-lead .te-kicker { color: var(--muted-2); }
.te-card-lead .te-card-title { color: var(--text-inverse); }
.te-card-lead .te-card-sum { color: var(--muted-2); }
.te-card-lead .te-card-foot { border-top-color: var(--text-2); }
.te-card-lead .te-card-meta { color: var(--muted-2); }
.te-card-lead .te-card-read { color: var(--text-inverse); }

/* Read state, applied by assets/meridian.js. A finished story recedes rather
   than disappearing — the reader should still be able to find it again, so
   this is a lowered emphasis, not a hidden card. */
.te-card.is-read { border-color: var(--border-divider); }
.te-card.is-read .te-card-title,
.te-card.is-read .te-card-sum { opacity: 0.62; }
.te-card.is-read .te-card-read { opacity: 1; font-variant-numeric: tabular-nums; }
.te-card-lead.is-read { opacity: 0.9; }

/* A locked quiz is visibly not-yet rather than broken. */
.is-locked { opacity: 0.5; cursor: default; }
.is-locked:hover { color: inherit; }

@media (prefers-reduced-motion: no-preference) {
  .progress-fill { transition: width 240ms ease-out; }
}

/* Progress / continue bar */
.te-progress { background: var(--surface-card); border-top: 1px solid var(--border-card); }
.te-progress .te-shell {
  padding-top: 14px;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.te-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-caption);
}
.te-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px;
  text-decoration: none;
}
.te-continue:hover { background: var(--text-2); color: var(--text-inverse); }

/* ============================================================
   Story (single article view)
   ============================================================ */
/* Source links inside the article meta line */
.dd-meta a { color: var(--text-caption); text-decoration: underline; }
.dd-meta a:hover { color: var(--text-body); }

/* Original sources box */
.st-sources { border: 1px solid var(--border-card); display: flex; flex-direction: column; }
.st-sources-head { padding: 12px 16px; border-bottom: 1px solid var(--border-divider); }
.st-source {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-body);
  text-decoration: none;
}
.st-source:last-child { border-bottom: 0; }
.st-source:hover { color: var(--text-body); background: var(--canvas); }
.st-source-src { color: var(--text-caption); font-size: 11px; white-space: nowrap; }

/* Dive deeper band */
.st-deeper { background: var(--canvas); border-top: 1px solid var(--border-card); }
.st-deeper .dd-measure {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.st-deeper-head { display: flex; flex-direction: column; gap: 4px; }
.st-deeper-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
}

/* Thread cards */
.st-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.st-card-head { display: flex; justify-content: space-between; align-items: center; }
.st-card-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--interactive);
}
.st-card-note { font-size: 12px; color: var(--text-caption); }

/* Flow thread (reuses .timeline-* inner classes without the outer frame) */
.st-flow { display: flex; flex-direction: column; }
a.timeline-event { color: var(--text-body); text-decoration: none; }
a.timeline-event:hover { color: var(--interactive); }

/* Tension thread (VS) */
.st-vs { display: flex; align-items: stretch; }
.st-vs-side { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.st-vs-side.is-left { padding-right: 14px; }
.st-vs-side.is-right { padding-left: 14px; }
.st-vs-term { font-size: 12px; font-weight: 600; }
.st-vs-desc { font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.st-vs-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.st-vs-line { width: 1px; flex: 1; background: var(--border-card); }
.st-vs-label { font-size: 10px; letter-spacing: 0.1em; color: var(--text-caption); }
.st-thread-links { display: flex; flex-direction: column; gap: 6px; }
.st-thread-links a { font-size: 12.5px; text-decoration: none; }

/* Footer CTA */
.st-footer { border-top: 1px solid var(--border-card); }
.st-footer .dd-measure {
  padding-top: 16px;
  padding-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px;
  background: var(--interactive);
  color: var(--text-inverse);
  text-decoration: none;
  cursor: pointer;
}
.st-cta:hover { background: var(--accent-hover); color: var(--text-inverse); }
.st-next { font-size: 12px; color: var(--text-caption); text-align: center; }

/* Responsive */
@media (max-width: 960px) {
  .hero .container,
  .threads .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero .container { padding-top: 56px; padding-bottom: 64px; }
  .hero-copy h1 { font-size: 40px; }
  .steps { grid-template-columns: 1fr; }
  .edition-card { box-shadow: 12px 12px 0 var(--canvas); }
}

@media (max-width: 640px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .dd-measure { padding-left: 20px; padding-right: 20px; }
  .dd-head { padding-top: 32px; }
  .dd-stats-row { flex-direction: column; gap: 16px; }
  .site-nav a:not(.btn) { display: none; }
  .hero-copy h1 { font-size: 32px; }
  .hero-actions { flex-wrap: wrap; }
  .site-footer .container {
    flex-direction: column;
    gap: 12px;
  }
}

/* ---------------------------------------------------------------- Quiz --- */

.qz { padding-bottom: 64px; }
.qz-intro { padding: 28px 0 20px; display: flex; flex-direction: column; gap: 6px; }
.qz-intro .dd-back { margin-bottom: 6px; }

.qz-lock {
  border: 1px solid var(--border-card);
  border-radius: 4px;
  background: var(--surface-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.qz-lock-text { color: var(--text-secondary); max-width: 46ch; }

.qz-form { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.qz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; width: 100%; }

.qz-q {
  border: 1px solid var(--border-card);
  border-radius: 4px;
  background: var(--surface-card);
  padding: 22px;
}
.qz-q fieldset { border: 0; margin: 0; padding: 0; }
.qz-stem {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.45;
  padding: 0 0 14px;
  display: flex;
  gap: 10px;
}
.qz-num {
  color: var(--text-caption);
  font-family: var(--font-sans, inherit);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.qz-opt {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.qz-opt:hover { background: var(--surface-page); }
.qz-opt input { margin: 0; accent-color: var(--accent); }
.qz-opt-text { font-size: 15px; }

/* Marked after grading. Colour is not the only signal — the weight change and
   the leading mark carry it for anyone who cannot separate the hues. */
.qz-opt.is-correct { border-color: var(--accent); background: rgba(14, 90, 74, 0.06); }
.qz-opt.is-correct .qz-opt-text { font-weight: 600; }
.qz-opt.is-correct .qz-opt-text::after { content: " ✓"; color: var(--accent); }
.qz-opt.is-wrong { border-color: #a3372f; background: rgba(163, 55, 47, 0.06); }
.qz-opt.is-wrong .qz-opt-text::after { content: " ✕"; color: #a3372f; }

.qz-reveal { margin-top: 14px; border-top: 1px solid var(--border-divider); padding-top: 12px; }
.qz-reveal summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--interactive);
  list-style: none;
}
.qz-reveal summary::-webkit-details-marker { display: none; }
.qz-reveal summary::before { content: "▸ "; }
.qz-reveal[open] summary::before { content: "▾ "; }
.qz-explain { font-size: 14.5px; color: var(--text-secondary); margin: 10px 0 0; max-width: 62ch; }
.qz-source { font-size: 13px; display: inline-block; margin-top: 8px; }
.qz-note { font-size: 13.5px; color: var(--text-caption); }

.qz-result {
  border-top: 1px solid var(--border-card);
  padding-top: 20px;
  margin-top: 8px;
}
.qz-score { font-family: var(--font-serif); font-size: 19px; }
.qz-revisit { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

/* ------------------------------------------- Topic, archive, corrections --- */

.tp, .ar, .cx { padding-bottom: 72px; }
.tp-head { padding: 28px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.tp-head .dd-back { margin-bottom: 6px; }
.tp-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 38px;
  line-height: 1.15;
}
.tp-aka { margin: 0; font-size: 13px; color: var(--text-caption); }

.tp-body { padding: 18px 0 8px; }
.tp-body p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.72;
  max-width: 66ch;
  color: var(--text-body);
}

.tp h2, .cx h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 32px 0 14px;
}
.tp-nodes, .tp-edges, .tp-list, .cx-list, .ar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.tp-node { font-size: 14px; color: var(--text-secondary); }
.tp-edges li { display: flex; gap: 12px; align-items: baseline; font-size: 14.5px; }
.tp-edge-kind {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
  min-width: 148px;
}
.tp-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-divider);
}
.tp-list-meta { font-size: 12px; color: var(--text-caption); white-space: nowrap; }
.tp-empty { font-size: 14.5px; color: var(--text-caption); }

.ar-item {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-divider);
}
.ar-date { font-family: var(--font-serif); font-size: 17px; text-decoration: none; }
.ar-meta { font-size: 12px; color: var(--text-caption); }
.ar-lead { font-size: 14px; color: var(--text-secondary); }
.ar-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 8px 0; }
.ar-empty p { color: var(--text-secondary); max-width: 52ch; }

.cx-policy p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); max-width: 66ch; }
.cx-item { padding-bottom: 14px; border-bottom: 1px solid var(--border-divider); }
.cx-date {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
  display: block;
}
.cx-story { font-family: var(--font-serif); font-size: 16px; }
.cx-note { font-size: 14.5px; color: var(--text-secondary); margin: 6px 0 0; max-width: 66ch; }

/* --------------------------------------------- Standing pages & signup --- */

.pg { padding-bottom: 72px; }
.pg-head { padding: 28px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.pg-head .dd-back { margin-bottom: 6px; }
.pg-updated { margin: 0; font-size: 12px; color: var(--text-caption); }
.pg-body { padding-top: 8px; }
.pg-body h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  margin: 34px 0 12px;
}
.pg-body p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-secondary);
  max-width: 66ch;
  margin: 0 0 16px;
}

.signup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  max-width: 460px;
  margin-top: 4px;
}
/* Visible label rather than a placeholder standing in for one: a placeholder
   disappears the moment the field has content, which is when it is most
   needed. */
.signup-label { font-size: 12.5px; color: var(--muted-2); align-self: flex-start; }
.signup-row { display: flex; gap: 8px; width: 100%; }
.signup-input {
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--muted);
  background: var(--surface-card);
  color: var(--text-body);
  border-radius: 0;
}
.signup-input:focus-visible { outline: 2px solid var(--interactive); outline-offset: 1px; }
.signup-note { font-size: 12px; color: var(--muted-2); margin: 2px 0 0; align-self: flex-start; }
.signup-status { font-size: 13.5px; margin: 6px 0 0; align-self: flex-start; }
.signup-status.is-error { color: #ffb4ac; }

@media (max-width: 560px) {
  .signup-row { flex-direction: column; }
}

/* ------------------------------------------------------------ Not found --- */

.nf { padding: 64px 0 96px; }
.nf-body { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.nf-body p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); max-width: 54ch; }
.nf-actions { display: flex; align-items: center; gap: 18px; margin-top: 8px; }

/* ------------------------------------------------------- Accessibility --- */

/* Off-screen until focused. The first tab stop on every page. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  padding: 12px 20px;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: var(--text-inverse);
}

/* A visible focus ring on everything focusable. :focus-visible keeps it off
   for mouse clicks, so this costs the pointer user nothing. Applied to the
   default ring rather than removing outlines anywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
  border-radius: 1px;
}
/* On the ink surfaces the accent ring is nearly invisible. */
.cta a:focus-visible,
.cta button:focus-visible,
.cta input:focus-visible,
.site-footer a:focus-visible,
.te-card-lead:focus-visible {
  outline-color: var(--paper);
}

/* Respect a stated preference for less motion. The site has little of it, but
   what it has should stop. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Targets big enough to hit. The quiz options are the tightest thing here. */
.qz-opt { min-height: 44px; align-items: center; }
.te-tab, .qz-reveal summary { min-height: 32px; display: inline-flex; align-items: center; }

/* ------------------------------------------------- Small screens, cont. --- */
/* The page types added after the original three (topic, archive, corrections,
   standing pages, quiz, not-found) need the same treatment the originals got. */

@media (max-width: 640px) {
  .tp-title { font-size: 28px; }

  /* A 148px label column plus a topic name does not fit a 320px screen. */
  .tp-edges li { flex-direction: column; gap: 2px; }
  .tp-edge-kind { min-width: 0; }

  /* Title and meta side by side squeezes the title to a few characters. */
  .tp-list li { flex-direction: column; gap: 4px; }
  .tp-list-meta { white-space: normal; }

  .qz-q { padding: 18px 16px; }
  .qz-stem { font-size: 16px; }
  .qz-form { align-items: stretch; }
  .qz-submit { width: 100%; justify-content: center; }

  .nf-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ar-item { padding: 14px 0; }
}

/* The nav collapses its links at 640px, leaving only the brand and the button.
   Below that the button itself needs to stop crowding the wordmark. */
@media (max-width: 380px) {
  .brand-name { font-size: 18px; }
  .btn-nav { padding: 8px 14px; font-size: 12px; }
  .te-shell { padding-left: 16px; padding-right: 16px; }
}
