/* ============================================================
   Report stylesheet
   Warm editorial / Anthropic-inspired. Single page, print-friendly.
   No external assets: system fonts, inline SVG only.
   ============================================================ */

:root {
  --canvas: #f0eee6;
  --paper: #faf9f5;
  --paper-warm: #f5e3c7;
  --ink: #141413;
  --ink-soft: #3d3d3a;
  --muted: #6c6a64;
  --faint: #8e8b82;
  --hairline: #d9d5c9;
  --hairline-soft: #e6e2d7;
  --clay: #d97757;
  --clay-deep: #b55233;
  --sky: #6a9bcc;
  --olive: #788c5d;
  --sand: #e8e6dc;
  --amber: #a9762f;
  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max: 1220px;
  --measure: 76ch;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--clay);
  color: var(--paper);
}

a {
  color: var(--clay-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--clay-deep);
  outline-offset: 3px;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: 6px;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(240, 238, 230, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--sans);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--clay);
  border-radius: 50%;
  color: var(--clay-deep);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--clay);
  border-radius: 999px;
  color: var(--clay-deep);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-link {
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: none;
}

.topbar-link:hover {
  color: var(--ink);
}

/* ---------- Masthead ---------- */

.masthead {
  padding: 5rem 2rem 3.5rem;
  border-bottom: 1px solid var(--hairline);
}

.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

h1 {
  max-width: 13ch;
  margin: 0 0 1.3rem;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6.4vw, 5.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.deck {
  max-width: 62ch;
  margin: 0 0 1.8rem;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--muted);
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-row .icon {
  color: var(--clay-deep);
}

.meta-note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Layout ---------- */

.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

.layout > main {
  min-width: 0;
}

article {
  max-width: var(--measure);
}

/* ---------- Table of contents ---------- */

.toc {
  position: sticky;
  top: 5rem;
  font-family: var(--sans);
  border-left: 1px solid var(--hairline);
  padding-left: 1.25rem;
}

.toc-title {
  margin: 0 0 1rem;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  padding-top: 0.12rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--faint);
}

.toc a:hover,
.toc a.is-active {
  color: var(--ink);
}

.toc a.is-active::before {
  color: var(--clay-deep);
}

.toc-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--faint);
}

/* ---------- Sections and prose ---------- */

section {
  scroll-margin-top: 2rem;
  margin-bottom: 4.5rem;
}

.section-label {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

h2 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3 {
  margin: 2rem 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0 0 1.15rem;
}

.lede {
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.short-list {
  margin: 1.5rem 0 2rem;
  padding-left: 1.4rem;
}

.short-list li {
  margin-bottom: 0.9rem;
  padding-left: 0.3rem;
}

.short-list li::marker {
  color: var(--clay-deep);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
}

.small {
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Stat cards ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 2rem 0 2.25rem;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-height: 9.5rem;
  padding: 1.2rem 1.1rem;
  background: var(--paper);
}

.stat-icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--clay-deep);
}

.stat-value {
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.71rem;
  line-height: 1.4;
  color: var(--muted);
}

.stat-source {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.stat--accent .stat-value {
  color: var(--clay-deep);
}

/* ---------- Gate diagram ---------- */

.gate {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.5rem;
  align-items: stretch;
  margin: 2rem 0;
  font-family: var(--sans);
}

.gate-step {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 8rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.gate-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--clay-deep);
}

.gate-step strong {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
}

.gate-step small {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--faint);
}

.gate-arrow {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 1rem;
}

/* ---------- Statute box ---------- */

.statute {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  overflow: hidden;
}

.statute-label {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}

.statute p {
  margin: 0 0 0.75rem;
}

.statute p:last-child {
  margin-bottom: 0;
}

.statute em {
  color: var(--paper-warm);
  font-style: normal;
}

/* ---------- Callouts and quotes ---------- */

.callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--clay);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

.callout--dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  border-left-color: var(--clay);
}

.callout--dark .callout-label {
  color: var(--clay);
}

.callout--dark .small {
  color: #b0aea5;
}

.callout--dark a {
  color: var(--paper-warm);
}

.pullquote {
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.pullquote p {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-indent: -0.45em;
}

.pullquote p::before {
  content: "\201C";
  color: var(--clay);
}

.pullquote cite {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-style: normal;
  color: var(--muted);
}

/* ---------- Figures and charts ---------- */

.figure {
  margin: 2.5rem 0;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  break-inside: avoid;
}

.figure-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--sans);
}

.fig-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

.fig-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.figure-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline-soft);
  font-family: var(--sans);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
}

figcaption strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* Chart primitives */

.chart-label {
  fill: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
}

.chart-value {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

.chart-legend {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.chart-note {
  fill: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.axis-line {
  stroke: var(--hairline);
  stroke-width: 1;
}

.grid-line {
  stroke: var(--hairline-soft);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.bar-unpaid,
.swatch-unpaid {
  fill: var(--clay);
}

.bar-paid,
.swatch-paid {
  fill: var(--olive);
}

.bar-clay {
  fill: var(--clay);
}

.seg-assured,
.swatch-assured {
  fill: var(--olive);
}

.seg-geo,
.swatch-geo {
  fill: var(--sky);
}

.seg-none,
.swatch-none {
  fill: var(--clay);
}

.seg-label {
  fill: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

.seg-label-dark {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Tables ---------- */

.table-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.81rem;
  line-height: 1.45;
}

thead th {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

tbody td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(217, 119, 87, 0.04);
}

.reg-name {
  font-weight: 600;
  color: var(--ink);
}

.reg-prov {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip--high {
  background: rgba(217, 119, 87, 0.14);
  border-color: rgba(217, 119, 87, 0.3);
  color: #8f3f24;
}

.chip--med {
  background: rgba(169, 118, 47, 0.13);
  border-color: rgba(169, 118, 47, 0.3);
  color: #6f4c18;
}

.chip--low {
  background: rgba(120, 140, 93, 0.15);
  border-color: rgba(120, 140, 93, 0.32);
  color: #4c5f36;
}

/* ---------- Timeline ---------- */

.timeline {
  position: relative;
  margin: 2rem 0 2.5rem;
  padding-left: 1.6rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: var(--hairline);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.63rem;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clay);
  border: 2px solid var(--canvas);
}

.timeline-date {
  margin: 0 0 0.2rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

.timeline-title {
  margin: 0 0 0.2rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
}

.timeline-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Part dividers ---------- */

.part {
  margin: 5.5rem 0 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

.part:first-of-type {
  margin-top: 0;
}

.part-label {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

.part h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
}

.part-deck {
  max-width: 60ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- TOC part labels ---------- */

.toc li.toc-part {
  counter-increment: none;
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

.toc li.toc-part:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.toc li.toc-part::before {
  content: none;
}

/* ---------- Extended components ---------- */

.stat-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

.stat-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.callout--note {
  border-left-color: var(--sky);
}

.callout--note .callout-label {
  color: #3d6f96;
}

.case {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--paper-warm);
  border: 1px solid #e3c9a0;
  border-radius: var(--radius);
}

.case-label {
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a5a1f;
}

.case h3 {
  margin-top: 0;
}

.source-list {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.77rem;
  line-height: 1.55;
}

.source-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.source-list li:last-child {
  border-bottom: 0;
}

.source-list a {
  word-break: break-word;
}

.glossary {
  margin: 2rem 0;
  display: grid;
  gap: 0;
}

.glossary dt {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
}

.glossary dd {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.data-note {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--sand);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.77rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.data-note strong {
  font-weight: 600;
}

.figure--compact {
  padding: 1rem 1rem 0.8rem;
}

.figure--compact figcaption {
  margin-top: 0.7rem;
}

.timeline--wide .timeline-item {
  margin-bottom: 1.8rem;
}

.appendix h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.appendix h3 {
  margin-top: 2.5rem;
}

.kicker-note {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.seg-other,
.swatch-other {
  fill: var(--sand);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 2rem;
  padding: 3.5rem 2rem;
  background: var(--ink);
  color: var(--paper);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
}

.footer h2 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  color: var(--paper);
}

.footer p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #c9c6bd;
}

.footer-kicker {
  margin-bottom: 0.6rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}

.footer a {
  color: var(--paper-warm);
}

.footer-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #3d3d3a;
  font-family: var(--sans);
  font-size: 0.68rem;
  color: #8e8b82;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .toc {
    position: static;
    padding: 1rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .toc ol {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-grid--three,
  .stat-grid--two {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .masthead {
    padding: 3rem 1.25rem 2.5rem;
  }

  .topbar-inner {
    padding: 0.75rem 1.25rem;
  }

  .topbar-link {
    display: none;
  }

  .layout {
    padding: 2.5rem 1.25rem 4rem;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .gate-arrow {
    height: 1.25rem;
    transform: rotate(90deg);
  }

  .gate-step {
    min-height: auto;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .figure-scroll svg {
    min-width: 620px;
  }

  .footer {
    padding: 2.5rem 1.25rem;
  }

  .meta-note {
    margin-left: 0;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 17px;
  }

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

  h1 {
    font-size: 2.4rem;
  }

  .meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- AI slop warning modal ---------- */

.slop-modal[hidden] {
  display: none;
}

.slop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.slop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 19, 0.66);
  backdrop-filter: blur(5px);
}

.slop-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  padding: 2rem 2rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-top: 6px solid var(--clay);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.slop-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.slop-modal__close:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.slop-modal__kicker {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay-deep);
}

.slop-modal__title {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--clay-deep);
}

.slop-modal__lede {
  margin: 0 0 1rem;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink);
}

.slop-modal__body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.slop-modal__body p {
  margin: 0 0 0.8rem;
}

.slop-modal__body ul {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
}

.slop-modal__body li {
  margin-bottom: 0.4rem;
}

.slop-modal__body a {
  color: var(--clay-deep);
}

.slop-modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hairline);
}

.slop-modal__button {
  appearance: none;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.slop-modal__button:hover {
  border-color: var(--clay-deep);
  background: var(--clay-deep);
}

.slop-modal__hint {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  color: var(--faint);
}

.slop-modal__button:focus-visible,
.slop-modal__close:focus-visible {
  outline: 2px solid var(--clay-deep);
  outline-offset: 3px;
}

body.slop-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .slop-modal {
    padding: 0.75rem;
  }

  .slop-modal__panel {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .slop-modal__title {
    font-size: 2rem;
  }
}

/* ---------- Print ---------- */

@media print {
  :root {
    --canvas: #ffffff;
    --paper: #ffffff;
    --hairline: #cccccc;
    --hairline-soft: #e5e5e5;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .topbar,
  .toc,
  .skip,
  .slop-modal,
  .no-print {
    display: none !important;
  }

  .masthead {
    padding: 0 0 1.5rem;
    border-bottom: 1px solid #cccccc;
  }

  .layout {
    display: block;
    max-width: none;
    padding: 1.5rem 0;
  }

  article {
    max-width: none;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .figure,
  .callout,
  .statute,
  .table-wrap,
  .timeline-item {
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  .footer {
    background: #ffffff;
    color: #000000;
    border-top: 1px solid #cccccc;
  }

  .footer h2 {
    color: #000000;
  }

  .footer p,
  .footer-note {
    color: #333333;
  }
}
