:root {
  --bg: #f6f1e7;
  --surface: #fbf8f2;
  --surface-2: #efe6d3;
  --ink: #1c1a16;
  --muted: #5b554a;
  --faint: #8a8275;
  --line: rgba(28, 26, 22, 0.12);
  --green: #1f4d3a;
  --green-ink: #163829;
  --gold: #b8862b;
  --gold-soft: #f1e3c2;
  --red: #9e3128;

  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;

  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  --text-hero: clamp(2.6rem, 1.6rem + 4.6vw, 5.5rem);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --wrap: 1180px;
  --prose: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 0.4rem; text-decoration: none; color: var(--ink); }
.brand-mark { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }
.brand-mark span { color: var(--green); font-style: italic; font-weight: 500; }
.nav { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: var(--text-sm); font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--green); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

/* Type */
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-lg); line-height: 1.3; }
p { margin: 0 0 1.05em; }
.kicker { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.8rem; }
.lede { font-size: var(--text-lg); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.meta { font-size: var(--text-xs); color: var(--faint); }
.prose { max-width: var(--prose); }
.prose p, .prose li { color: #2a2721; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
strong { font-weight: 600; }
sup.fn { font-size: 0.68em; line-height: 0; margin-left: 1px; }
sup.fn a { text-decoration: none; color: var(--faint); font-weight: 600; }
sup.fn a:hover { color: var(--green); }

/* Hero */
.hero { position: relative; min-height: 78vh; display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,20,16,0.15) 0%, rgba(14,20,16,0.25) 40%, rgba(14,20,16,0.78) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-block: 4rem 3.5rem; }
.hero h1 { color: #fff; font-size: var(--text-hero); max-width: 14ch; }
.hero .lede { color: rgba(255,255,255,0.88); margin-top: 1.2rem; }
.hero .kicker { color: #f0d79c; }

.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--text-2xl); max-width: 20ch; }
.page-head .lede { margin-top: 1rem; }

/* Bottom line box */
.bottom-line {
  background: var(--green); color: #f3efe5; border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem); margin-block: clamp(2rem, 5vw, 3rem);
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start;
}
.bottom-line .label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #f0d79c; padding-top: 0.3rem; white-space: nowrap; }
.bottom-line p { margin: 0; font-size: var(--text-lg); line-height: 1.55; }
.bottom-line p + p { margin-top: 0.7rem; }
@media (max-width: 640px) { .bottom-line { grid-template-columns: 1fr; gap: 0.6rem; } }

/* Explainer box */
.unpack {
  background: var(--gold-soft); border-radius: var(--radius-md); padding: 1.25rem 1.4rem 1.1rem; margin: 1.6rem 0;
  max-width: var(--prose);
}
.unpack .tag { display: inline-flex; align-items: center; gap: 0.45rem; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #6b4d12; margin-bottom: 0.5rem; }
.unpack .tag::before { content: ""; width: 8px; height: 8px; background: var(--gold); border-radius: 50%; }
.unpack h4 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 600; margin: 0 0 0.4rem; }
.unpack p { font-size: var(--text-sm); line-height: 1.6; color: #3b3424; margin-bottom: 0.6em; }
.unpack p:last-child { margin-bottom: 0; }

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section.tight { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.section-head { margin-bottom: 1.6rem; max-width: 60ch; }
.section-head h2 + p { margin-top: 0.7rem; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 88px; font-size: var(--text-sm); border-left: 1px solid var(--line); padding-left: 1.2rem; }
.toc p { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { margin-bottom: 0.45rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--green); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .toc { display: none; } }

/* Era (history) */
.era { padding-block: 2.2rem; border-top: 1px solid var(--line); }
.era:first-of-type { border-top: 0; padding-top: 0.5rem; }
.era-dates { font-family: var(--font-display); font-size: var(--text-lg); color: var(--gold); font-weight: 500; margin-bottom: 0.2rem; }
.era h2 { margin-bottom: 1rem; }

.timeline { list-style: none; margin: 1.2rem 0 1.4rem; padding: 0; max-width: var(--prose); }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--line); font-size: var(--text-sm); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-weight: 600; color: var(--green); }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 0.15rem; } }

.figure-wide { margin: 2rem 0; }
.figure-wide img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--radius-lg); }
.figure-wide figcaption { font-size: var(--text-xs); color: var(--faint); margin-top: 0.5rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 1.3rem 1.3rem 1.1rem; }
.stat .num { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .what { font-size: var(--text-sm); font-weight: 600; margin-top: 0.35rem; }
.stat .note { font-size: var(--text-xs); color: var(--faint); margin-top: 0.25rem; line-height: 1.45; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .stats { grid-template-columns: 1fr; } }

/* Bars */
.bars { max-width: var(--prose); margin: 1.4rem 0; }
.bar-row { display: grid; grid-template-columns: 11rem 1fr 4rem; gap: 0.8rem; align-items: center; font-size: var(--text-sm); padding: 0.45rem 0; }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 999px; }
.bar-fill.gold { background: var(--gold); }
.bar-fill.grey { background: #a59c8c; }
.bar-row .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr 3.5rem; } .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* Home features */
.features { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 1.2rem; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(60, 45, 20, 0.08); color: var(--ink); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card .body { padding: 1.3rem 1.4rem 1.5rem; }
.card h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.card .go { margin-top: 0.9rem; font-size: var(--text-sm); font-weight: 600; color: var(--green); }
.card.big { grid-row: span 2; }
.card.big img { aspect-ratio: 4 / 3; }
.card.dark { background: var(--green); color: #f3efe5; border-color: transparent; }
.card.dark h3 { color: #fff; }
.card.dark p { color: rgba(243, 239, 229, 0.82); }
.card.dark .go { color: #f0d79c; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } .card.big { grid-row: auto; } }

.coming { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.coming div { padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--line); }
.coming strong { display: block; font-size: var(--text-base); }
.coming span { font-size: var(--text-sm); color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.4rem 2rem; padding: 1.6rem 0; border-block: 1px solid var(--line); }
.facts dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; }
.facts dd { margin: 0.25rem 0 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; }

/* News */
.story { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 1.2rem; padding-block: 2rem; border-top: 1px solid var(--line); max-width: 820px; }
.story .n { font-family: var(--font-display); font-size: var(--text-xl); color: var(--gold); font-weight: 700; line-height: 1; }
.story .cat { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 0.35rem; }
.story h2 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; line-height: 1.35; margin-bottom: 0.7rem; }
.story .why { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.9rem 1.1rem; font-size: var(--text-sm); margin-top: 0.4rem; }
.story .why b { color: var(--green); }
@media (max-width: 520px) { .story { grid-template-columns: 1fr; gap: 0.4rem; } }

.watch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem 1.6rem; max-width: 820px; }
.watch ul { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.watch li { margin-bottom: 0.4rem; font-size: var(--text-sm); }

/* Sources */
.sources { border-top: 1px solid var(--line); padding-block: 2.5rem 1rem; }
.sources h2 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; margin-bottom: 1rem; }
.sources ol { margin: 0; padding-left: 1.4rem; font-size: var(--text-xs); color: var(--muted); columns: 2 340px; column-gap: 2.5rem; }
.sources li { margin-bottom: 0.5rem; break-inside: avoid; line-height: 1.5; }
.sources a { color: var(--muted); word-break: break-word; }
.verified { font-size: var(--text-xs); color: var(--faint); margin-top: 1rem; }

/* Footer */
.site-footer { background: #1a1c17; color: #cfc8b8; padding-block: 3rem 2rem; margin-top: 3rem; font-size: var(--text-sm); }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-footer .brand-mark { color: #fff; }
.site-footer .brand-mark span { color: #f0d79c; }
.site-footer h3 { color: #fff; font-size: var(--text-sm); font-weight: 600; margin-bottom: 0.6rem; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: #cfc8b8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .small { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.2rem; font-size: var(--text-xs); color: #9c9584; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Header on small screens: brand on one line, nav on its own row */
.brand-mark { white-space: nowrap; }
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0.2rem; padding-block: 0.6rem 0.2rem; }
  .brand-mark { font-size: 1.2rem; }
  .nav { width: 100%; justify-content: space-between; margin-inline: -0.5rem; width: calc(100% + 1rem); }
  .nav a { padding-inline: 0.5rem; }
}

/* Data tables */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
table.data caption { text-align: left; padding: 0.9rem 1rem 0.4rem; font-weight: 600; color: var(--ink); }
table.data th, table.data td { padding: 0.55rem 1rem; text-align: left; border-top: 1px solid var(--line); }
table.data thead th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Mobile nav: wrap onto two rows as the site grows */
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; justify-content: flex-start; overflow: visible; row-gap: 0.15rem; column-gap: 0.1rem; }
  .nav a { padding: 0.4rem 0.55rem; }
}

/* Separate consecutive footnote markers */
sup.fn + sup.fn::before { content: ","; color: var(--faint); }
