/* ==========================================================================
   DMV Pathway — site.css
   One stylesheet for the whole site, replacing the retired style.css.
   Palette derived from the site's existing theme colour #0a2540 (deep navy),
   with a warm gold accent and a tinted paper background.
   Custom properties, modular type scale, mobile-first, print styles.
   No framework, no JavaScript: layout and the mobile menu are CSS only.
   ========================================================================== */

:root {
  /* palette: deep / mid / tint from the theme colour */
  --navy-950: #061629;
  --navy-900: #0a2540;   /* theme colour */
  --navy-800: #123558;
  --navy-700: #17466f;
  --navy-600: #1f5a8a;
  --tint-100: #e8eef5;
  --tint-200: #d3dfec;
  --tint-300: #b9cbdf;
  /* accent gold (links, marks) */
  --gold-700: #8a5a08;
  --gold-600: #a86c0d;
  --gold-500: #c98a1f;
  --gold-300: #e3b04b;
  --gold-100: #f7e7c6;
  /* neutrals */
  --paper: #f7f5f0;
  --surface: #ffffff;
  --ink: #0f1b2a;
  --ink-soft: #2c3a4b;
  --muted: #4f5d6e;
  --line: #dcd9d0;
  --line-strong: #c5c1b6;
  /* semantic */
  --link: #17466f;
  --link-hover: #0a2540;
  --footer-bg: var(--navy-950);
  --footer-ink: #cfd9e5;
  --footer-muted: #a4b3c4;

  /* type scale (1.2 ratio) */
  --fs-xs: 0.78rem;
  --fs-sm: 0.85rem;
  --fs-base: 1.03rem;
  --fs-md: 1.13rem;
  --fs-lg: 1.3rem;
  --fs-xl: 1.5rem;
  /* section headings sit in the design bar's 1.4-1.6 rem band */
  --fs-2xl: 1.5rem;
  --fs-3xl: clamp(2rem, 1.6rem + 1.6vw, 2.4rem);
  --lh-tight: 1.15;
  --lh-body: 1.65;

  /* spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --container: 1160px;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.07);
  --shadow: 0 2px 4px rgba(10, 37, 64, 0.06), 0 14px 28px -16px rgba(10, 37, 64, 0.22);
  --shadow-lg: 0 4px 10px rgba(10, 37, 64, 0.06), 0 30px 60px -26px rgba(10, 37, 64, 0.3);
  --focus: 0 0 0 3px #ffffff, 0 0 0 6px var(--gold-500);

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
h4 { font-size: var(--fs-md); font-weight: 700; }
p { margin: 0 0 var(--sp-4); max-width: 72ch; }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
strong { color: var(--ink); font-weight: 650; }
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(23, 70, 111, 0.35);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--gold-700); text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy-900); color: #fff;
  padding: var(--sp-2) var(--sp-4); z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-4); }

/* ---------------------------------------------------------------- topbar */
.topbar {
  background: var(--navy-950);
  color: var(--footer-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--navy-800);
}
.topbar-inner {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.topbar p { margin: 0; max-width: none; color: inherit; }
.topbar-source { color: var(--gold-300); }
.topbar-source::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 6px; height: 6px; margin-right: 0.45rem; border-radius: 50%;
  background: var(--gold-500);
}
.topbar-note { color: var(--footer-muted); }

/* ---------------------------------------------------------------- header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  z-index: 30;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  padding-top: 0.6rem; padding-bottom: 0.6rem;
  position: relative;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: var(--navy-900);
  min-height: 44px;
}
.brand:hover { color: var(--navy-900); }
.brand-mark { flex: none; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-lg); letter-spacing: -0.01em; }
.brand-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-700); font-weight: 650; }

/* CSS-only mobile menu: hidden checkbox + burger label (no JS) */
.nav-toggle { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; }
.nav-toggle-label {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer; background: var(--surface);
}
.nav-toggle-label .bar { display: block; height: 2px; width: 100%; background: var(--navy-900); border-radius: 2px; }
.nav-toggle:focus-visible + .nav-toggle-label { box-shadow: var(--focus); }
.nav-toggle:checked + .nav-toggle-label { background: var(--tint-100); }

/* ---------------------------------------------------------------- main + hero */
.site-main { padding-top: var(--sp-5); padding-bottom: var(--sp-7); }
.site-main > * + * { margin-top: var(--sp-5); }

.hero {
  background: linear-gradient(150deg, var(--tint-100) 0%, #f4f7fb 55%, #fbf8f1 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: visible;
}
.hero-inner { display: grid; gap: var(--sp-5); padding: var(--sp-5) var(--sp-4) var(--sp-5); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.6rem); margin-bottom: var(--sp-3); }
.hero .lead { font-size: var(--fs-md); color: var(--ink-soft); margin-bottom: var(--sp-4); }
.hero-link { margin: var(--sp-4) 0 0; }
.hero-link a, .band-link a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 650; color: var(--navy-900);
  min-height: 44px;
}
.hero-link a::after, .band-link a::after { content: "\2192"; color: var(--gold-600); }
.hero-figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.hero-img, .band-img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.hero-figure figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.4rem; }

.eyebrow {
  display: inline-block; margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-700); background: var(--gold-100);
  padding: 0.25rem 0.65rem; border-radius: var(--radius-pill);
}

/* stat chips (numbers already on the page) */
.stat-chips {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  list-style: none; margin: var(--sp-2) 0 var(--sp-3); padding: 0;
}
.chip {
  display: inline-flex; align-items: baseline; gap: 0.4rem;
  background: var(--surface); border: 1px solid var(--tint-200);
  border-radius: var(--radius-pill); padding: 0.35rem 0.85rem;
  box-shadow: var(--shadow-sm);
}
.chip-num { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-lg); color: var(--navy-900); line-height: 1; }
.chip-label { font-size: var(--fs-sm); color: var(--muted); }

/* ---------------------------------------------------------------- hub-card nav */
.hub-cards {
  display: grid; grid-template-columns: 1fr; gap: var(--sp-3);
}
.hub-card {
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: var(--sp-4);
  text-decoration: none; color: var(--navy-900);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}
.hub-card:hover { border-color: var(--navy-600); border-left-color: var(--gold-600); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--navy-900); }
.hub-card-name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-md); }
.hub-card-desc { font-size: var(--fs-sm); color: var(--muted); }

/* ---------------------------------------------------------------- sections */
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.section > h2:first-child { margin-top: 0; }
.section > *:last-child { margin-bottom: 0; }
.section-tint { background: linear-gradient(180deg, #fbf8f1 0%, #ffffff 100%); border-color: var(--gold-100); }
.tint-wrap .section { background: linear-gradient(180deg, #fbf8f1 0%, #ffffff 100%); border-color: var(--gold-100); }

/* category card grid (jurisdictions) */
.card-grid {
  list-style: none; margin: var(--sp-4) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3);
}
.card-grid li { margin: 0; }
.card {
  display: flex; flex-direction: column; gap: 0.2rem;
  height: 100%; min-height: 60px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  text-decoration: none; color: var(--navy-900);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover, .card:focus-visible {
  border-color: var(--navy-600); transform: translateY(-1px);
  box-shadow: var(--shadow); color: var(--navy-900); text-decoration: none;
}
.card-name { font-weight: 650; line-height: 1.3; }
.card-tag { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- band (hub + detail + text pages) */
.band {
  display: grid; gap: var(--sp-4);
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 70%, var(--navy-700) 100%);
  color: #e8eef5;
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  border: 1px solid var(--navy-800);
  box-shadow: var(--shadow);
  overflow: visible;
}
.band h1 { color: #ffffff; }
.band p { color: #dbe5ef; }
.band a { color: #ffe2a6; text-decoration-color: rgba(255, 226, 166, 0.5); }
.band a:hover { color: #ffffff; }
.band .eyebrow { background: rgba(227, 176, 75, 0.18); color: #ffe2a6; border: 1px solid rgba(227, 176, 75, 0.35); }
.band .stat-chips { margin-top: 0; }
.band .chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }
.band .chip-num { color: #ffffff; }
.band .chip-label { color: #cfdceb; }
.band-figure { margin: 0; align-self: start; }
.band-img {
  width: 100%; height: auto; max-height: none;
  border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.16);
}
.band-text { background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 100%); }

/* ---------------------------------------------------------------- breadcrumbs */
.breadcrumbs { font-size: var(--fs-sm); color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: "\203A"; color: var(--line-strong); margin-right: 0.5rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--navy-900); font-weight: 600; }

/* ---------------------------------------------------------------- detail layout */
.detail-grid { display: grid; gap: var(--sp-4); }
.detail-aside h2 { font-size: var(--fs-md); }
.fact-tiles { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); margin: 0; }
.fact {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--gold-500);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.fact dt {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 650;
}
.fact dd { margin: 0.2rem 0 0; font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 700; color: var(--navy-900); word-break: break-word; }

/* contact / value block — long unhyphenated agency URLs MUST wrap (review defect #1) */
.contact-block {
  background: linear-gradient(90deg, #fdf8ec 0%, #ffffff 75%);
  border: 1px solid var(--gold-100);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-4);
  margin: 0 0 var(--sp-4);
  max-width: 100%;
}
.contact-block .label {
  display: block;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700;
}
.contact-block .value {
  margin-top: var(--sp-2);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.5;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-block .value a {
  color: var(--navy-900);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: inline;
  max-width: 100%;
}
.contact-block .value a:hover { color: var(--gold-700); }
.contact-tag {
  display: inline-block; margin-top: var(--sp-3);
  font-size: var(--fs-xs); font-weight: 650; color: var(--navy-800);
  background: var(--tint-100); border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
}

/* related jurisdictions */
.related-list { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.related-list a {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  min-height: 44px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-2) var(--sp-4);
  text-decoration: none; color: var(--navy-900);
}
.related-list a:hover { border-color: var(--navy-600); box-shadow: var(--shadow-sm); color: var(--navy-900); }
.rel-name { font-weight: 600; }
.rel-tag { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- data tables */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin: var(--sp-3) 0 0;
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 420px;
}
.data-table caption { text-align: left; padding: var(--sp-2) var(--sp-3); color: var(--muted); font-size: var(--fs-sm); }
.data-table th, .data-table td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table thead th {
  background: var(--navy-900); color: #ffffff;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em;
  position: sticky; top: 0; z-index: 2;
}
.data-table tbody th, .data-table td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface); box-shadow: 1px 0 0 var(--line);
  font-variant-numeric: tabular-nums;
}
.data-table thead th:first-child { background: var(--navy-900); z-index: 3; }
.data-table tbody tr:nth-child(even) > * { background: #f3f6fa; }
.data-table tbody tr:nth-child(even) th { background: #f3f6fa; }
.data-table tbody tr:hover > * { background: var(--gold-100); }
.data-table th { font-weight: 650; color: var(--navy-900); }
.data-table a { text-decoration: none; font-weight: 600; }
.data-table a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- source panel */
.source-panel {
  border: 1px dashed var(--line-strong);
  background: #fcfbf7;
  border-radius: var(--radius);
  padding: var(--sp-4);
  font-size: var(--fs-sm);
}
.source-panel .source-h {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  margin: 0 0 var(--sp-2);
}
.source-panel p { margin-bottom: var(--sp-2); color: var(--muted); max-width: 90ch; }
.source-panel p:last-child { margin-bottom: 0; }
.source-url { font-family: var(--font-mono); font-size: var(--fs-xs); }
.source-url a { overflow-wrap: anywhere; word-break: break-word; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: var(--sp-6);
  border-top: 4px solid var(--gold-500);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); padding-top: var(--sp-6); padding-bottom: var(--sp-5); }
.footer-col p { color: var(--footer-muted); font-size: var(--fs-sm); max-width: 38ch; }
.footer-brand { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-lg); color: #ffffff; margin: 0 0 0.1rem; }
.footer-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-300); font-weight: 650; margin: 0 0 var(--sp-3); }
.footer-h {
  color: #ffffff; font-family: var(--font-body); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
  margin: 0 0 var(--sp-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-col a { color: var(--footer-ink); text-decoration: none; font-size: var(--fs-sm); display: inline-flex; align-items: center; min-height: 44px; }
.footer-col a:hover { color: #ffffff; text-decoration: underline; }
.footer-source .footer-url { font-family: var(--font-mono); font-size: var(--fs-xs); }
/* restored live source line (the page's own data-asof paragraph) */
.source-line { font-size: var(--fs-sm); color: var(--muted); margin: var(--sp-3) 0 0; }
.source-line a { overflow-wrap: anywhere; word-break: break-word; }
/* applied to the page's own table markup when the generator's classes are absent */
.data-asof { font-size: var(--fs-sm); color: var(--muted); }
.page-state .band-copy, .page-states .band-copy, .page-home .band-copy { min-width: 0; }
.footer-source .footer-url a, .footer-mail a { overflow-wrap: anywhere; word-break: break-word; color: var(--gold-300); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: var(--sp-4); padding-bottom: var(--sp-5); }
.footer-bottom small { color: var(--footer-muted); font-size: var(--fs-xs); line-height: 1.6; display: block; max-width: 90ch; }

/* ==========================================================================
   >=768px  (tablet / desktop)
   ========================================================================== */
@media (min-width: 768px) {
  .container { padding-left: var(--sp-6); padding-right: var(--sp-6); }
  .topbar-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .hero-inner { grid-template-columns: 1.15fr 1fr; align-items: center; padding: var(--sp-6); }
  .hero-figure .hero-img { aspect-ratio: 3 / 2; object-fit: cover; }
  .hub-cards { grid-template-columns: repeat(3, 1fr); }
  .band { grid-template-columns: 1.5fr 1fr; align-items: center; padding: var(--sp-6); }
  .band-figure { max-width: 420px; justify-self: end; }
  .band-img { max-height: 260px; object-fit: cover; }
  .band-detail .band-figure { max-width: 300px; }
  .band-detail .band-img { max-height: 160px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .fact-tiles { grid-template-columns: 1fr; }
  .related-list { grid-template-columns: repeat(3, 1fr); }
  .related-list a { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .section { padding: var(--sp-6); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; padding-top: var(--sp-7); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .data-table { font-size: var(--fs-base); }
}

/* ==========================================================================
   >=1200px
   ========================================================================== */
@media (min-width: 1200px) {
  .hero h1 { font-size: 2.6rem; }
  .band { grid-template-columns: 1.7fr 1fr; }
  .band-detail { grid-template-columns: minmax(0, 1fr) 320px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .fact-tiles { grid-template-columns: 1fr; }
  .section { padding: var(--sp-7) var(--sp-6); }
}

/* ==========================================================================
   narrow phones (<=420px): no fixed heights anywhere, nothing clipped
   ========================================================================== */
@media (max-width: 420px) {
  .hero-inner, .band { padding: var(--sp-4) var(--sp-3); }
  .band-detail .band-img { max-height: 140px; object-fit: cover; }
  .band-text .band-img { max-height: 140px; object-fit: cover; }
  .hero-figure figcaption { font-size: 0.72rem; }
  .contact-block { padding: var(--sp-3); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .card { padding: var(--sp-2) var(--sp-3); min-height: 56px; }
  .chip { padding: 0.3rem 0.65rem; }
}

/* motion + accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  .card:hover, .hub-card:hover { transform: none; }
}

/* forced colours: keep borders visible */
@media (forced-colors: active) {
  .card, .hub-card, .section, .band, .source-panel { border: 1px solid CanvasText; }
}

/* ==========================================================================
   print
   ========================================================================== */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .skip-link, .footer-grid, .hub-cards, .related-list, .hero-figure, .band-figure { display: none !important; }
  .site-header { box-shadow: none; border-bottom: 1px solid #000; }
  .hero, .band, .section, .source-panel { border: 1px solid #999; box-shadow: none; background: #fff !important; color: #000; }
  .band h1, .band p, .band a, .hero h1 { color: #000 !important; }
  .table-wrap { overflow: visible; }
  .data-table { min-width: 0; font-size: 10pt; }
  .data-table thead th { background: #eee !important; color: #000; position: static; }
  .data-table tbody th, .data-table td:first-child { position: static; box-shadow: none; }
  .data-table thead { display: table-header-group; }
  .data-table tr { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #444; }
  .footer-bottom { border-top: 1px solid #000; padding-top: 8pt; }
  .footer-bottom small { color: #000; font-size: 8pt; }
}
/* ==========================================================================
   primary navigation — CSS-only mobile menu, inline row from 768px
   (appended 2026-11-13: the interrupted write stopped before these rules and
   the print block were emitted, leaving .primary-nav/.nav-list unstyled)
   ========================================================================== */
.primary-nav { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { margin: 0; }
.nav-list a {
  display: flex; align-items: center; min-height: 44px;
  padding: 0.5rem 0.35rem; text-decoration: none; font-weight: 600;
  color: var(--navy-900); border-radius: var(--radius-sm);
}
.nav-list a:hover { color: var(--gold-700); text-decoration: underline; }
.nav-list a[aria-current="page"] { color: var(--gold-700); text-decoration: underline; text-decoration-thickness: 2px; }
.nav-toggle:checked ~ .primary-nav {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 0.5rem var(--sp-4) 1rem; z-index: 40;
}
.nav-toggle:checked ~ .primary-nav a { border-bottom: 1px solid var(--line); }
.nav-toggle:checked ~ .primary-nav li:last-child a { border-bottom: 0; }
@media (min-width: 768px) {
  .primary-nav { display: block; margin-left: auto; }
  .nav-list { display: flex; flex-wrap: nowrap; gap: 0.25rem; }
  .nav-list a { padding: 0.5rem 0.75rem; }
  .nav-toggle, .nav-toggle-label { display: none; }
}

/* narrow phones (<=420px): page-level heading safety. The two-longest-territory
   H1 is short, but never allow a heading to widen the box. */
@media (max-width: 420px) {
  h1, h2, h3 { overflow-wrap: break-word; }
  .hero, .band, .section { border-radius: var(--radius); }
}

/* page-family body classes emitted on <body> */
body { font-size: var(--fs-base); }
body.page-state .site-main > * + *, body.page-states .site-main > * + *,
body.page-home .site-main > * + *, body.page-bycode .site-main > * + * { margin-top: var(--sp-4); }

/* ==========================================================================
   print
   ========================================================================== */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .skip-link, .footer-grid, .hub-cards, .related-list, .hero-figure, .band-figure,
  .nav-toggle, .nav-toggle-label, .primary-nav { display: none !important; }
  .site-header { position: static; box-shadow: none; border-bottom: 1px solid #000; }
  .hero, .band, .section, .source-panel {
    border: 1px solid #999; box-shadow: none; background: #fff !important; color: #000;
  }
  .band h1, .band p, .band a, .hero h1 { color: #000 !important; }
  .table-wrap { overflow: visible; }
  .data-table { min-width: 0; font-size: 10pt; }
  .data-table thead th { background: #eee !important; color: #000; position: static; }
  .data-table tbody th, .data-table td:first-child { position: static; box-shadow: none; }
  .data-table thead { display: table-header-group; }
  .data-table tr { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #444; }
  .footer-bottom { border-top: 1px solid #000; padding-top: 8pt; }
  .footer-bottom small { color: #000; font-size: 8pt; }
}
