:root {
  --paper:     #f7f3ea;
  --paper-2:   #fefcf7;
  --ink:       #132238;
  --muted:     #4b5b72;
  --line:      #d8d3c8;
  --teal:      #0b8f8c;
  --orange:    #f48c06;
  --red:       #d94841;
  --gold:      #ffbe0b;
  --card:      rgba(255,255,255,0.85);
  --shadow:    0 12px 40px rgba(10,28,48,0.10);
  --shadow-sm: 0 4px 16px rgba(10,28,48,0.07);
  --radius:    16px;
  --radius-sm: 10px;
  --max-w:     1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.72;
  font-size: 16px;
}

/* ── Typography ─────────────────────────────────────────────── */
h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.02em;
}
h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 700;
  margin-bottom: .6rem;
  letter-spacing: -.01em;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .4rem;
  font-family: system-ui, sans-serif;
  color: var(--ink);
}
h4 {
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: .3rem;
  font-family: system-ui, sans-serif;
  color: var(--ink);
}
p { color: var(--muted); margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--teal); }
strong { color: var(--ink); }
code {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: .82em;
  background: rgba(0,0,0,.055);
  padding: 1px 5px;
  border-radius: 4px;
}
ul, li { list-style: none; }

/* ── Section kicker ─────────────────────────────────────────── */
.section-kicker {
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .5rem;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(148deg, #0c2840 0%, #0b8f8c 100%);
  color: white;
  padding: 5.5rem 1.5rem 4.5rem;
  text-align: center;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; }
.hero h1    { color: white; margin-bottom: 1.2rem; }
.eyebrow {
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: .9rem;
}
.subtitle {
  font-size: 1.08rem;
  color: rgba(255,255,255,.84);
  max-width: 660px;
  margin: 0 auto 2.8rem;
  line-height: 1.68;
}

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.stat-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 1.1rem 2rem;
  min-width: 140px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.stat-num {
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: .3rem;
  letter-spacing: -.02em;
}
.stat-label {
  font-family: system-ui, sans-serif;
  font-size: .73rem;
  color: rgba(255,255,255,.68);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Sections ───────────────────────────────────────────────── */
.content-section { padding: 4rem 1.5rem; }
.alt-bg { background: var(--paper-2); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 780px;
  margin-bottom: 2rem;
  line-height: 1.72;
}

/* ── Chart card ─────────────────────────────────────────────── */
.chart-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.chart-card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.chart-caption {
  font-family: system-ui, sans-serif;
  font-size: .82rem;
  color: var(--muted);
  margin-top: .7rem;
  font-style: italic;
  line-height: 1.5;
}
.chart-centered-wrap {
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge-pass {
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  background: #e0f5ef;
  color: #0a6b50;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge-fail {
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  background: #fde8e8;
  color: #9b2929;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── What is Nomic ──────────────────────────────────────────── */
.nomic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-top: 1rem;
}
@media (max-width: 720px) { .nomic-grid { grid-template-columns: 1fr; } }
.nomic-block {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.8rem;
}
.nomic-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: system-ui, sans-serif;
  font-size: .88rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 2px solid rgba(11,143,140,.3);
  padding-bottom: 1px;
  transition: border-color .2s;
}
.nomic-link:hover { border-color: var(--teal); }
.diff-list {
  margin: .6rem 0 .8rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.diff-list li {
  padding-left: 1.1rem;
  position: relative;
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.55;
}
.diff-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* ── Final result ───────────────────────────────────────────── */
.result-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
@media (max-width: 720px) { .result-split { grid-template-columns: 1fr; } }
.result-table-wrap { overflow-x: auto; }
.result-table {
  border-collapse: collapse;
  width: 100%;
  font-family: system-ui, sans-serif;
  font-size: .85rem;
}
.result-table th {
  text-align: left;
  padding: .4rem .7rem;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  font-weight: 600;
  white-space: nowrap;
}
.result-table td { padding: .45rem .7rem; border-bottom: 1px solid var(--line); }
.num-cell { text-align: center; font-family: system-ui, sans-serif; font-weight: 600; }
.result-text p { font-size: .95rem; }

/* ── Carousel ───────────────────────────────────────────────── */
.carousel-outer {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius);
}
.carousel-track {
  display: flex;
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.round-header {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .3rem 0 .1rem;
  flex-wrap: wrap;
}
.round-badge {
  font-family: system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal);
  background: rgba(11,143,140,.1);
  padding: 3px 10px;
  border-radius: 999px;
}
.round-sub {
  font-family: system-ui, sans-serif;
  font-size: .82rem;
  color: var(--muted);
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.2rem;
}
.carousel-btn {
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: .45rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--teal);
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.carousel-btn:hover:not(:disabled) { background: var(--teal); color: white; }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-dots { display: flex; gap: .6rem; }
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background .2s;
}
.carousel-dot.active { background: var(--teal); }

/* ── Turn cards ─────────────────────────────────────────────── */
.turn-card {
  display: flex;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.turn-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem .7rem;
  min-width: 50px;
  flex-shrink: 0;
  text-align: center;
}
.turn-num {
  color: white;
  font-family: system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.turn-body { padding: .9rem 1.2rem; flex: 1; min-width: 0; }
.turn-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}
.turn-proposer {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}
.turn-sep { color: var(--line); font-size: .8rem; flex-shrink: 0; }
.turn-title {
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
}
.turn-spacer { flex: 1; }
.turn-row {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .25rem;
  flex-wrap: wrap;
}
.turn-label {
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  min-width: 74px;
  flex-shrink: 0;
}
.turn-votes {
  font-family: system-ui, sans-serif;
  font-size: .83rem;
  color: var(--muted);
}
.turn-delta { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.delta-pill {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
}
.delta-none {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  color: var(--muted);
}
.turn-mech { display: flex; align-items: center; }
.mech-change {
  font-family: system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--teal);
}
.mech-none {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  color: var(--muted);
}
.turn-note {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .5rem;
  margin-bottom: 0;
  line-height: 1.6;
  border-top: 1px solid var(--line);
  padding-top: .5rem;
}

/* ── Player cards ───────────────────────────────────────────── */
.player-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 820px) { .player-cards { grid-template-columns: 1fr; } }
.player-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
  border-top: 4px solid transparent;
}
.teal-top   { border-color: var(--teal); }
.orange-top { border-color: var(--orange); }
.red-top    { border-color: var(--red); }
.player-card-header {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: .8rem;
}
.player-name-lg {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.player-model {
  font-family: system-ui, sans-serif;
  font-size: .75rem;
  color: var(--muted);
}
.player-note {
  background: rgba(11,143,140,.07);
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  padding: .65rem .9rem;
  margin-top: .8rem;
  font-family: system-ui, sans-serif;
  font-size: .83rem;
  color: var(--muted);
  line-height: 1.55;
}
.player-note strong { color: var(--ink); }

/* ── Voting analysis ────────────────────────────────────────── */
.voting-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 1.5rem;
}
@media (max-width: 680px) { .voting-split { grid-template-columns: 1fr; gap: 1.5rem; } }
.voting-table-wrap { overflow-x: auto; }
.voting-table {
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: .88rem;
  white-space: nowrap;
}
.voting-table th {
  text-align: left;
  padding: .4rem 1.1rem .4rem .7rem;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  font-weight: 600;
}
.voting-table td { padding: .5rem 1.1rem .5rem .7rem; border-bottom: 1px solid var(--line); }
.voting-text p { font-size: .95rem; }

/* ── Three-col insight cards ────────────────────────────────── */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 1.5rem;
}
@media (max-width: 720px) { .three-col { grid-template-columns: 1fr; } }
.insight-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem;
  border-top: 4px solid var(--line);
}
.teal-accent   { border-color: var(--teal); }
.orange-accent { border-color: var(--orange); }
.red-accent    { border-color: var(--red); }

/* ── Rule Evolution ─────────────────────────────────────────── */
.rule-evo-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.72;
}
.m3-centered {
  max-width: 600px;
  margin: 0 auto;
}
.m3-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
}
.m3-card h3 { margin-bottom: 1.1rem; }
.m3-timeline { display: flex; flex-direction: column; gap: .1rem; }
.m3-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.m3-row:last-child { border-bottom: none; }
.m3-left {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.m3-dot-base {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .5;
}
.m3-dot-change {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.m3-label {
  font-family: system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.m3-right { display: flex; flex-direction: column; gap: .1rem; }
.m3-change {
  font-family: system-ui, sans-serif;
  font-size: .86rem;
  font-weight: 600;
}
.m3-note {
  font-family: system-ui, sans-serif;
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Evidence cards ─────────────────────────────────────────── */
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 1rem;
}
@media (max-width: 680px) { .evidence-grid { grid-template-columns: 1fr; } }
.evidence-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.3rem;
}
.evidence-tag {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: .5rem;
}

/* ── Limitations ────────────────────────────────────────────── */
.two-col-narrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}
@media (max-width: 700px) { .two-col-narrow { grid-template-columns: 1fr; } }
.limit-list {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: .8rem;
}
.limit-list li {
  padding-left: 1.1rem;
  position: relative;
  font-family: system-ui, sans-serif;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.55;
}
.limit-list li::before { content: "–"; position: absolute; left: 0; color: var(--teal); }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: #0c2840;
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  font-family: system-ui, sans-serif;
  font-size: .8rem;
}
footer p    { color: rgba(255,255,255,.5); margin-bottom: .3rem; }
.footer-sub { font-size: .74rem; color: rgba(255,255,255,.35); }
