/* The Commonwealth Project — commonwealthcorporation.org
   Shared stylesheet. Warm civic white-paper palette.            */

:root {
  --bg: #f5f1e8;
  --bg2: #fbf8f1;
  --bg3: #efe9da;
  --border: rgba(40,35,25,0.12);
  --border2: rgba(40,35,25,0.22);
  --text: #1f1b14;
  --text2: #4a4439;
  --text3: #847c6c;
  --red: #a8321f;
  --red2: #b71c1c;
  --red-bg: rgba(168,50,31,0.07);
  --gold: #9a7b1f;
  --gold-bg: rgba(154,123,31,0.08);
  --green: #2e7d52;
  --green-bg: rgba(46,125,82,0.08);
  --blue: #1d4e89;
  --blue2: #2563a8;
  --blue-bg: rgba(29,78,137,0.07);
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration-color: rgba(154,123,31,0.4); text-underline-offset: 3px; }
a:hover { color: var(--text); }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: var(--bg); padding: .5rem 1rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }

/* ── NAV ─────────────────────────────────────────── */
nav.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,241,232,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-brand {
  font-family: var(--serif); font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gold); white-space: nowrap; padding: 1rem 1.5rem 1rem 0; margin-right: 1rem;
  border-right: 1px solid var(--border); text-transform: uppercase; text-decoration: none;
}
.nav-brand:hover { color: var(--text); }
.nav-tab {
  color: var(--text2); font-family: var(--body); font-size: 13px; letter-spacing: 0.04em;
  padding: 1.1rem 1rem; white-space: nowrap; text-decoration: none; position: relative; transition: color .2s;
}
.nav-tab::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .2s;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--text); }
.nav-tab.active::after { transform: scaleX(1); }
.nav-tab.highlight { color: var(--red2); }
.nav-tab.highlight.active::after { background: var(--red2); }
.nav-tab.ext { color: var(--text3); }

/* ── LAYOUT ──────────────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; padding: 4rem 2rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; }
.block { scroll-margin-top: 80px; }
section.part { padding-top: 1rem; }

/* ── HERO ────────────────────────────────────────── */
.hero { padding: 5rem 2rem 2.5rem; max-width: 860px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--red2);
  text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero-eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(183,28,28,0.5); }
.hero h1 {
  font-family: var(--serif); font-weight: 700; color: var(--text);
  font-size: clamp(30px, 5vw, 50px); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 1.5rem;
}
.hero-hook {
  font-size: 21px; color: var(--text); line-height: 1.55; margin-bottom: 1.75rem; max-width: 680px;
  font-family: var(--serif); font-style: italic;
}
.hero-sub { font-size: 17px; color: var(--text2); line-height: 1.7; max-width: 680px; margin-bottom: 1.25rem; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.pillars {
  display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin: 1.75rem 0 1rem; font-family: var(--mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text3);
}
.pillars span { padding: .35rem .7rem; border: 1px solid var(--border2); }
.pillars span.fifth { border-color: var(--red); color: var(--red2); background: var(--red-bg); }

/* ── STAT GRID ───────────────────────────────────── */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); margin-bottom: 3rem;
}
.stat-cell { background: var(--bg2); padding: 1.5rem; }
.stat-cell-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 0.5rem;
}
.stat-cell-value { font-family: var(--serif); font-size: 32px; font-weight: 900; line-height: 1; margin-bottom: 0.3rem; }
.stat-cell-value.red { color: var(--red2); }
.stat-cell-value.gold { color: var(--gold); }
.stat-cell-sub { font-size: 12px; color: var(--text3); line-height: 1.4; }

/* ── CHART ───────────────────────────────────────── */
.chart-wrapper { background: var(--bg2); border: 1px solid var(--border); padding: 1.75rem 2rem 1.5rem; margin-bottom: 3rem; }
.chart-title { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.chart-sub { font-size: 12px; color: var(--text3); margin-bottom: 1rem; font-family: var(--mono); }
.chart-figure { position: relative; }
.chart-figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .75rem;
  font-size: 11px; color: var(--text2); font-family: var(--mono);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 22px; height: 0; border-top: 2px solid; flex-shrink: 0; }
.legend-dash { width: 22px; height: 0; border-top: 2px dashed; flex-shrink: 0; }
.legend-dot { width: 22px; height: 0; border-top: 2px dotted; flex-shrink: 0; }
.chart-caption { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--text); margin-top: 1rem; }
.chart-note { font-size: 12px; color: var(--text3); margin-top: .5rem; line-height: 1.55; }
.chart-tip {
  position: absolute; pointer-events: none; display: none;
  background: var(--bg2); border: 1px solid var(--border2); padding: .45rem .65rem;
  font-family: var(--mono); font-size: 11px; color: var(--text); line-height: 1.5; white-space: nowrap; z-index: 5;
}
.chart-tip b { color: var(--text3); font-weight: 400; display: block; }
.chart-toggle {
  background: none; border: 1px solid var(--border2); color: var(--text2); font-family: var(--mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: .4rem .75rem; cursor: pointer; margin-top: 1rem;
}
.chart-toggle:hover { border-color: var(--gold); color: var(--gold); }
.chart-table { display: none; margin-top: 1rem; max-height: 320px; overflow: auto; border: 1px solid var(--border); }
.chart-table.open { display: block; }
.chart-table table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.chart-table th, .chart-table td { padding: .35rem .75rem; border-bottom: 1px solid var(--border); text-align: right; color: var(--text2); }
.chart-table th { position: sticky; top: 0; background: var(--bg3); color: var(--text3); font-weight: 400; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.chart-table td:first-child, .chart-table th:first-child { text-align: left; }

/* ── TYPE ────────────────────────────────────────── */
.section-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 0.75rem;
}
h1, h2 { font-family: var(--serif); font-weight: 700; color: var(--text); }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin-bottom: 1rem; }
h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin-bottom: 0.75rem; }
h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; margin-top: 2rem; }
h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 0.5rem; margin-top: 1.5rem;
}
p { color: var(--text2); margin-bottom: 1rem; }
p strong { color: var(--text); font-weight: 600; }
p em { color: var(--text); font-style: italic; }
ul.plain { color: var(--text2); margin: 0.5rem 0 1.5rem 1.5rem; }
ul.plain li { margin-bottom: 0.5rem; }
ul.plain li strong { color: var(--text); }
.lead {
  font-size: 20px; line-height: 1.6; color: var(--text); font-family: var(--serif); font-style: italic; margin-bottom: 1.5rem;
}
.dek { font-size: 18px; color: var(--text); margin-bottom: 1.5rem; }
sup.fn { font-family: var(--mono); font-size: 10px; margin-left: 1px; }
sup.fn a { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold); }

/* ── MOVEMENTS ───────────────────────────────────── */
.movement { margin: 0 0 3.5rem; scroll-margin-top: 80px; }
.movement-marker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.75rem;
}
.movement-marker::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
.movement h2 { font-size: clamp(24px, 3.5vw, 34px); line-height: 1.15; margin-bottom: 1.25rem; }
.movement p { font-size: 17px; line-height: 1.8; }
.pull {
  font-family: var(--serif); font-size: clamp(22px, 3.5vw, 30px); font-weight: 700; line-height: 1.3;
  color: var(--text); margin: 2.5rem 0; padding-left: 1.5rem; border-left: 4px solid var(--red);
}
.pull.gold { border-left-color: var(--gold); }

/* ── TOC ─────────────────────────────────────────── */
.arg-toc { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.5rem 0; margin: 2rem 0 3rem; }
.arg-toc-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text3); margin-bottom: 1rem; }
.arg-toc a {
  display: flex; align-items: baseline; gap: 1rem; padding: 0.4rem 0; color: var(--text2);
  text-decoration: none; font-size: 15px; transition: color .2s;
}
.arg-toc a:hover { color: var(--gold); }
.arg-toc-num { font-family: var(--mono); font-size: 11px; color: var(--text3); flex-shrink: 0; width: 2rem; }
.arg-toc-q { color: var(--text3); font-style: italic; font-size: 14px; }

/* ── QUOTES, CALLOUTS ────────────────────────────── */
blockquote { border-left: 3px solid var(--gold); padding: 1rem 1.5rem; margin: 2rem 0; background: var(--gold-bg); }
blockquote p { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--text); margin: 0; line-height: 1.6; }
blockquote cite {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3); margin-top: 0.5rem; font-style: normal;
}
blockquote.red { border-left-color: var(--red); background: var(--red-bg); }
.callout { border: 1px solid var(--red); background: var(--red-bg); padding: 1.5rem; margin: 2rem 0; }
.callout p { font-family: var(--serif); font-size: 17px; color: var(--text); margin: 0; line-height: 1.6; }
.callout p + p { margin-top: .75rem; }
.callout.gold { border-color: var(--gold); background: var(--gold-bg); }
.callout.blue { border-color: var(--blue); background: var(--blue-bg); }
.callout.green { border-color: var(--green); background: var(--green-bg); }
.callout .mini { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--text3); margin-bottom: .6rem; }
.note-box { border: 1px solid var(--border); background: var(--gold-bg); padding: 1.5rem; margin: 2rem 0; }
.note-box p { margin-bottom: .75rem; }
.note-box p:last-child { margin-bottom: 0; }

/* ── GRIDS & CARDS ───────────────────────────────── */
.instruments {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); margin: 3rem 0;
}
.instrument-card { background: var(--bg2); padding: 1.75rem; text-decoration: none; display: block; transition: background .2s; color: inherit; }
.instrument-card:hover { background: var(--bg3); }
.instrument-num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: var(--text3); margin-bottom: 0.75rem; }
.instrument-name { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; line-height: 1.3; }
.instrument-name.red { color: var(--red2); }
.instrument-desc { font-size: 13px; color: var(--text3); line-height: 1.6; }
.instrument-desc strong { color: var(--text2); }
.restores { font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--green); margin: .9rem 0 .3rem; }
.restores-list { font-size: 12.5px; color: var(--text2); line-height: 1.5; list-style: none; }
.restores-list li::before { content: '— '; color: var(--text3); }
.instrument-badge {
  display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--red); color: var(--red2); margin-top: 0.9rem;
}
.instrument-badge.gold { border-color: var(--gold); color: var(--gold); }

.mechanisms { border: 1px solid var(--border); margin: 2.5rem 0; }
.mechanism { border-bottom: 1px solid var(--border); padding: 1.75rem; }
.mechanism:last-child { border-bottom: none; }
.mechanism-num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: var(--red2); margin-bottom: 0.5rem; }
.mechanism-num.gold { color: var(--gold); }
.mechanism-title { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.mechanism-body { font-size: 15px; color: var(--text2); line-height: 1.7; }
.mechanism-body em { color: var(--text); }

.phase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 2rem 0; }
.phase-card { background: var(--bg2); padding: 1.5rem; }
.phase-era { font-family: var(--mono); font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.5rem; }
.phase-title { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.phase-ratio { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--red2); margin-bottom: 0.5rem; }
.phase-ratio.small { font-size: 16px; }
.phase-body { font-size: 13px; color: var(--text2); line-height: 1.6; }
.phase-body strong { color: var(--text); }

.constituency { border-top: 1px solid var(--border); margin: 2rem 0; }
.constituency-row { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.constituency-name { font-family: var(--serif); font-weight: 700; color: var(--text); font-size: 16px; }
.constituency-loss { font-size: 15px; color: var(--text2); line-height: 1.65; }
.constituency-loss strong { color: var(--text); }

.tradition { border-left: 3px solid var(--gold); margin: 2rem 0; }
.tradition-row { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; padding: 1rem 0 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.tradition-row:last-child { border-bottom: none; }
.tradition-when { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--gold); padding-top: .3rem; }
.tradition-who { font-family: var(--serif); font-weight: 700; color: var(--text); font-size: 16px; margin-bottom: .2rem; }
.tradition-what { font-size: 14.5px; color: var(--text2); line-height: 1.6; }

.thinkers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 2rem 0; }
.thinker { background: var(--bg2); padding: 1.5rem; }
.thinker-q { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; }
.thinker-name { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.thinker-body { font-size: 14px; color: var(--text2); line-height: 1.65; }
.thinker-body em { color: var(--text); }
.synthesis { background: #1f2a3a; color: #e9e3d6; border-left: 4px solid var(--gold); padding: 1.75rem 2rem; margin: 2rem 0; }
.synthesis p { color: #e9e3d6; font-size: 16px; line-height: 1.7; }
.synthesis p:last-child { margin: 0; }
.synthesis em.term { color: #e2c46d; font-family: var(--serif); font-style: italic; }
.synthesis strong { color: #fff; }

.evidence { border: 1px solid var(--border); margin: 2rem 0; }
.evidence-row { display: grid; grid-template-columns: 1fr; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg2); }
.evidence-row:last-child { border-bottom: none; }
.evidence-head { font-family: var(--serif); font-weight: 700; color: var(--text); font-size: 16px; margin-bottom: .35rem; }
.evidence-body { font-size: 14.5px; color: var(--text2); line-height: 1.65; }
.evidence-body strong { color: var(--text); }

.concede { border: 1px solid var(--border2); background: var(--bg2); padding: 1.5rem 1.75rem; margin: 2rem 0; }
.concede h4 { margin-top: 0; }
.concede ol { color: var(--text2); margin-left: 1.25rem; font-size: 15px; line-height: 1.65; }
.concede ol li { margin-bottom: .6rem; }
.concede ol li strong { color: var(--text); }

.timeline { position: relative; margin: 2.5rem 0; padding-left: 2rem; border-left: 2px solid var(--border2); }
.timeline-item { margin-bottom: 2rem; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.45rem; top: 0.4rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.timeline-year { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 0.25rem; }
.timeline-title { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.timeline-body { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ── TABLES ──────────────────────────────────────── */
table.data { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 14px; }
table.data th {
  background: var(--bg3); color: var(--text3); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.75rem 1rem; text-align: left; border: 1px solid var(--border); font-weight: 400;
}
table.data td { padding: 0.9rem 1rem; border: 1px solid var(--border); color: var(--text2); vertical-align: top; line-height: 1.5; }
table.data tr:hover td { background: var(--bg3); }
table.data td.role, table.data td.tier-name { font-family: var(--serif); font-weight: 700; color: var(--text); white-space: nowrap; }
table.data td.number, table.data td.tier-ratio { font-family: var(--mono); font-size: 16px; font-weight: 600; white-space: nowrap; }
table.data td.number.red, .red-t { color: var(--red2); }
table.data td.number.gold, .gold-t { color: var(--gold); }
table.data td.number.green, .green-t { color: var(--green); }
table.data td.number.muted { color: var(--text3); font-weight: 400; font-size: 14px; }
.table-scroll { overflow-x: auto; }

/* ── LADDER ──────────────────────────────────────── */
.ladder { border: 1px solid var(--border); margin: 2rem 0; }
.rung { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg2); }
.rung:last-child { border-bottom: none; }
.rung-range { font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1.2; }
.rung-range small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; color: var(--text3); margin-top: .35rem; }
.rung-title { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.rung-body { font-size: 14.5px; color: var(--text2); line-height: 1.65; }
.rung.safe .rung-range { color: var(--green); }
.rung.disclose .rung-range { color: var(--gold); }
.rung.clawback .rung-range { color: #c05a1f; }
.rung.structural .rung-range { color: var(--red2); }

/* ── GAMING ──────────────────────────────────────── */
.gaming-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 2rem 0; }
.gaming-card { background: var(--bg2); padding: 1.5rem; }
.gaming-vector { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red2); margin-bottom: 0.4rem; }
.gaming-title { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.gaming-threat { font-size: 13px; color: var(--text2); margin-bottom: 0.75rem; line-height: 1.6; }
.gaming-fix-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--green); margin-bottom: 0.25rem; }
.gaming-fix { font-size: 13px; color: var(--text2); line-height: 1.6; border-left: 2px solid var(--green); padding-left: 0.75rem; }

/* ── ENFORCEMENT ─────────────────────────────────── */
.enforce-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 2rem 0; }
.enforce-card { background: var(--bg2); padding: 1.5rem; }
.enforce-icon { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text3); margin-bottom: 0.5rem; }
.enforce-title { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.enforce-body { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* ── FRAMEWORK LINES ─────────────────────────────── */
.framework-line { display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.framework-line:last-child { border-bottom: none; }
.framework-key { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text3); min-width: 200px; flex-shrink: 0; }
.framework-val { font-size: 14px; color: var(--text2); line-height: 1.5; }
.framework-val strong { color: var(--text); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn, .dl-btn {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold); padding: 0.65rem 1.25rem; text-decoration: none; cursor: pointer;
  background: none; transition: background .2s, color .2s; margin-top: 1.25rem; margin-right: 0.75rem;
}
.btn:hover, .dl-btn:hover { background: var(--gold); color: var(--bg); }
.btn.red { color: var(--red2); border-color: var(--red); }
.btn.red:hover { background: var(--red); color: #fff; }
.btn.muted { color: var(--text3); border-color: var(--border2); }
.btn.muted:hover { background: var(--bg3); color: var(--text); }

/* ── ACTIONS ─────────────────────────────────────── */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 2rem 0; }
.action { background: var(--bg2); padding: 1.5rem; }
.action-num { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; color: var(--gold); margin-bottom: .5rem; }
.action-title { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.action-body { font-size: 13.5px; color: var(--text2); line-height: 1.6; margin-bottom: .25rem; }
.action .btn { margin-top: .75rem; font-size: 10px; padding: .5rem .9rem; }

/* ── ABOUT ───────────────────────────────────────── */
.about-meta { font-size: 14px; color: var(--text2); line-height: 1.8; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.5rem; }
.about-meta strong { color: var(--text); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-right: .5rem; }

/* ── SOURCES ─────────────────────────────────────── */
.sources { font-size: 13.5px; color: var(--text2); line-height: 1.65; counter-reset: src; list-style: none; }
.sources li { padding: .5rem 0 .5rem 2.4rem; position: relative; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.sources li::before { counter-increment: src; content: counter(src); position: absolute; left: 0; top: .55rem; font-family: var(--mono); font-size: 11px; color: var(--gold); }
.sources li em { color: var(--text); }
.sources li .caveat { color: var(--text3); font-style: italic; }

/* ── MISC ────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }
.footnote {
  font-family: var(--mono); font-size: 11px; color: var(--text3); margin-top: 2rem; padding-top: 1rem;
  border-top: 1px solid var(--border); line-height: 1.6;
}
.footnote a { color: var(--text3); }
.crossref { border: 1px solid var(--border); background: var(--bg2); padding: 1.25rem 1.5rem; margin: 2rem 0; font-size: 14.5px; color: var(--text2); line-height: 1.65; }
.crossref .mini { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--text3); margin-bottom: .4rem; }
.next-prev { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.next-prev a { color: var(--gold); text-decoration: none; }
.next-prev a:hover { color: var(--text); }

footer.site { border-top: 1px solid var(--border); margin-top: 2rem; background: var(--bg3); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; font-size: 13.5px; color: var(--text2); line-height: 1.7; }
.footer-inner strong { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--text3); display: block; margin-bottom: .5rem; }
.footer-inner a { color: var(--text2); }
.footer-inner a:hover { color: var(--gold); }
.footer-legal { max-width: 1100px; margin: 0 auto; padding: 0 2rem 2rem; font-family: var(--mono); font-size: 10.5px; color: var(--text3); letter-spacing: .04em; line-height: 1.7; }

@media (max-width: 720px) {
  .container, .container-wide, .hero { padding-left: 1rem; padding-right: 1rem; }
  .nav-inner { padding: 0 1rem; }
  .phase-grid { grid-template-columns: 1fr; }
  .constituency-row, .tradition-row, .rung { grid-template-columns: 1fr; gap: .4rem; }
  .framework-line { flex-direction: column; gap: 0.25rem; }
  .framework-key { min-width: unset; }
  table.data { font-size: 12.5px; }
  .gaming-grid { grid-template-columns: 1fr; }
  .chart-wrapper { padding: 1.25rem 1rem; }
  .chart-figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart-figure svg { min-width: 640px; }
  .stat-cell-value { font-size: 28px; }
}
@media print {
  nav.site, .chart-toggle, .skip { display: none; }
  body { background: #fff; }
  a { color: inherit; }
}

/* ── Chart variants ──────────────────────────────── */
.chart-mob { display: none; }
@media (max-width: 720px) {
  .chart-desk { display: none; }
  .chart-mob { display: block; }
  .chart-figure { overflow: visible; }
  .chart-figure svg { min-width: 0; }
}

/* ── Control diagram ─────────────────────────────── */
.flow { border: 1px solid var(--border2); margin: 2rem 0; background: var(--bg2); }
.flow-head, .flow-row { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 0; }
.flow-head > div { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--text3); padding: .8rem 1rem; background: var(--bg3); border-bottom: 1px solid var(--border); }
.flow-head > div:nth-child(2) { color: var(--red2); }
.flow-head > div:nth-child(3) { color: var(--green); }
.flow-row > div { padding: 1rem; font-size: 14px; line-height: 1.6; color: var(--text2); }
.flow-row > div + div { border-left: 1px solid var(--border); }
.flow-tier { font-family: var(--serif); font-weight: 700; color: var(--text); font-size: 15px; }
.flow-now { background: var(--red-bg); }
.flow-model { background: var(--green-bg); }
.flow-link { display: flex; align-items: center; gap: .75rem; padding: .2rem 1rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text3); }
.flow-link::before { content: '↓'; color: var(--gold); font-size: 14px; }
.flow-row:last-child > div { border-bottom: none; }
@media (max-width: 720px) {
  .flow-head { display: none; }
  .flow-row { grid-template-columns: 1fr; }
  .flow-row > div + div { border-left: none; border-top: 1px solid var(--border); }
  .flow-tier { background: var(--bg3); padding-bottom: .6rem; }
  .flow-now::before { content: 'Now'; } .flow-model::before { content: 'Under the model'; }
  .flow-now::before, .flow-model::before { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; margin-bottom: .3rem; }
  .flow-now::before { color: var(--red2); } .flow-model::before { color: var(--green); }
}

.instruments.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
