:root {
  --bg: #fbf3e8;
  --paper: #fbf3e8;
  --ink: #424242;
  --ink-light: #7a746b;
  --rule: #e2d6c6;
  --accent: #cf864b;
  --accent-soft: #e2b48c;
  --accent-deep: #9a5a2f;
  --accent-warm: #c9a27a;
  --teal: #8a9388;
  --surface: #f3ebe2;
  --panel-w: 380px;
  --map-tile-filter: grayscale(85%) brightness(1.05) contrast(0.9) sepia(12%);
  /** Full-map export: html2canvas often renders hotter than on-screen; nudge toward live view. Use `none` to disable. */
  --map-export-canvas-filter: saturate(0.82) contrast(0.96) brightness(0.99);
  --rule-light: #dfd6ca;
  --ink-faint: #949085;
  --accent-dust: #a67c52;
  /** <strong> emphasis — deep orange, higher contrast than body text on paper */
  --strong-orange: #a63d0f;
  /** Card / CTA corner radius — matches `.home-analysis-cta__link` */
  --radius-cta: 12px;
  --radius-cta-sm: 8px;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}
body.home-page {
  overflow-x: hidden;
}
a { color: inherit; }

/* ── Masthead / Nav ── */
.masthead {
  background: var(--ink);
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.masthead-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.masthead-logo img {
  height: 35px;
}
.masthead-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.masthead-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 60px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(245, 243, 238, 0.55);
  text-decoration: none;
  letter-spacing: 0.5px;
  line-height: 1;
  transition: color 0.15s;
}
.masthead-nav a:visited {
  color: rgba(245, 243, 238, 0.55);
}
.masthead-nav a:hover {
  color: var(--bg);
}
.masthead-nav a.active {
  color: var(--bg);
}
.masthead-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 2px;
  background: var(--accent);
}

/* ── Footer ── */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 64px 56px;
  border-top: 3px solid var(--accent);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 40px 72px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 52px;
}
.footer-left {
  max-width: 560px;
}
.footer .masthead-logo img {
  height: 44px;
  opacity: 0.95;
}
.footer-lede {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 400;
  line-height: 1.25;
  color: #fff;
  margin: 20px 0 14px;
  letter-spacing: -0.02em;
}
.footer-desc {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  max-width: 42ch;
}
.footer-aside {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-cta);
  padding: 28px 28px 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.footer-aside-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 8px;
}
.footer-meta {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 18px;
}
.footer-team {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-team li {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-team li:last-child { border-bottom: none; padding-bottom: 0; }
.footer-team li:first-child { padding-top: 0; }

/* ── Responsive ── */
@media (max-width: 920px) {
  .masthead {
    padding-left: 24px;
    padding-right: 24px;
  }
  .masthead-nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .footer {
    padding: 0 28px 44px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 40px;
  }
  .footer-desc {
    max-width: none;
  }
}

/* ── Optional tagline (some pages) ── */
.masthead-tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: rgba(245, 243, 238, 0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Sticky analysis sub-nav (dimension pages: visible) ── */
.section-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding: 0 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 60px;
  z-index: 999;
}
.section-nav a {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.3px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  line-height: 1;
}
.section-nav a:hover {
  color: var(--ink);
}
.section-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Analysis hub: sub-nav hidden until card click */
.section-nav.section-nav--hub {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-nav.section-nav--hub.visible {
  height: 48px;
  opacity: 1;
}

/* ── Page headers ── */
.page-header {
  padding: 56px 64px 40px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.page-header--hub {
  padding: 72px 64px 64px;
}
.page-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-header h1,
.page-header--hub h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 42px;
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.1;
}
.page-header--hub h1 {
  font-size: 48px;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.page-header p,
.page-header--hub p {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.75;
}

/* ── Analysis hub cards ── */
.cards-stage {
  padding: 80px 64px 120px;
  display: flex;
  gap: 24px;
  align-items: stretch;
}
.dim-card {
  flex: 1;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  padding: 40px 36px 36px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dim-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dim-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(66, 66, 66, 0.12);
  border-color: transparent;
}
.dim-card:hover::before {
  transform: scaleX(1);
}
.dim-card.activating {
  transform: scale(0.97);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ink-light);
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0.6;
}
.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon svg {
  width: 36px;
  height: 36px;
}
.dim-card .card-icon svg {
  stroke: var(--accent);
}
.card-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--accent);
}
.card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  line-height: 1.2;
}
.card-subtitle {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.2;
  color: var(--ink-light);
}
.card-cta {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent);
  transition: gap 0.2s;
}
.dim-card:hover .card-cta {
  gap: 12px;
}
.card-cta-arrow {
  font-size: 16px;
  line-height: 1;
}

.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}
.page-transition-overlay.active {
  pointer-events: all;
}
.transition-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  transform-origin: center;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.1s 0.55s;
}

/* ── Data / analysis sections (geography, time, outcome, demographics) ── */
.data-section {
  padding: 64px;
  border-bottom: 1px solid var(--rule);
}
.data-section:nth-child(odd) {
  background: var(--paper);
}
.data-section:nth-child(even) {
  background: var(--bg);
}
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.section-desc {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 40px;
}

.analysis-block {
  margin-top: 28px;
  margin-bottom: 0;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(251, 243, 232, 0.94), rgba(255, 253, 249, 0.98));
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-cta);
}
/* Geography lead: same title→box gap as other analysis tabs (28px); box→table like demographics rhythm */
.geography-page .analysis-block--lead {
  margin-top: 28px;
  margin-bottom: 52px;
}
.geography-page .analysis-block--takeaway {
  margin-top: 28px;
  margin-bottom: 0;
}
.geography-page .analysis-stack {
  margin-bottom: 0;
}

/* Same gap as Demographics intro → “By Race” (52px). Use .section-title + .analysis-block — :first-of-type does not match (first div is .section-label). */
.time-page #temporal > .section-title + .analysis-block,
.outcome-page #outcomes > .section-title + .analysis-block {
  margin-bottom: 52px;
}
.analysis-kicker {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: none;
  margin-bottom: 14px;
}
.analysis-block p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-light);
  margin-bottom: 12px;
}
.analysis-block p:last-child {
  margin-bottom: 0;
}

/* Analysis tabs — map CTA below Key Takeaway */
.analysis-block.analysis-cta-block {
  margin-top: 40px;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: none;
  border-left: none;
  text-align: center;
}
.analysis-page-cta {
  display: block;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 32px 32px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(251, 243, 232, 0.94), rgba(255, 253, 249, 0.98));
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  box-shadow: 0 8px 26px rgba(66, 66, 66, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.analysis-page-cta:hover {
  border-color: var(--accent-warm);
  box-shadow: 0 12px 34px rgba(66, 66, 66, 0.09);
  transform: translateY(-2px);
}
.analysis-page-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.analysis-page-cta__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}
.analysis-page-cta__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-light);
  display: block;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 48px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
}
.table-wrap--scroll {
  max-height: 470px;
  overflow-y: auto;
}
.geography-page .table-wrap {
  max-height: 470px;
  overflow-y: auto;
  margin-bottom: 48px;
}
.geography-page tbody tr.district-table-row {
  cursor: pointer;
}
.geography-page tbody tr.district-table-row:hover {
  background: rgba(216, 177, 138, 0.12);
}
.geography-page tbody tr.district-row-selected {
  background: rgba(216, 177, 138, 0.22);
  box-shadow: inset 3px 0 0 var(--accent-deep);
}
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ink);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead tr {
  background: var(--ink);
  color: var(--bg);
}
thead th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
}
tbody tr {
  border-bottom: 1px solid var(--rule);
}
tbody tr:hover {
  background: var(--surface);
}
tbody td {
  padding: 11px 16px;
  color: var(--ink);
}
tbody td.num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}
tbody td.accent {
  color: var(--accent);
  font-weight: 600;
}
/* Stop-reason abbreviations (e.g. BOLO/APB, MPC, DUI) — table + chart tooltips */
.stop-reason-gloss {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--ink-light);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
}
.stop-reason-gloss span {
  display: block;
}
.stop-reason-gloss span + span {
  margin-top: 2px;
}
.pct-bar-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pct-bar {
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  min-width: 2px;
}
.pct-bar.teal {
  background: var(--teal);
}
.pct-bar.warm {
  background: var(--accent-warm);
}
#demographics .pct-bar.teal {
  background: #e2b0a0;
}

.analysis-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.analysis-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: stretch;
}
.analysis-chart,
.analysis-note {
  height: 100%;
}
.analysis-note {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.analysis-note h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--ink);
}
.analysis-note p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-light);
  margin-bottom: 18px;
}
.analysis-note p:last-child {
  margin-bottom: 0;
}
.analysis-note p.analysis-note-caveat {
  font-size: 13px;
  line-height: 1.65;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--rule-light);
  color: var(--ink-faint);
}
/*
 * Analysis prose: parent <p> uses ink-light; emphasis must stay visibly orange.
 * Use literal hex + !important so Leaflet/third-party CSS and stale caches cannot flatten strong back to grey.
 */
.data-section .analysis-block p strong,
.data-section .analysis-note p strong {
  color: #a63d0f !important;
  font-weight: 600 !important;
}
.chart-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  padding: 24px;
}
.chart-card.wide {
  grid-column: span 2;
}
.chart-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: space-between;
}
.chart-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.chart-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}
.time-page .chart-title,
.outcome-page .chart-title,
.demographics-page .chart-title {
  font-size: 22px;
}
/* Ensure chart titles and side notes stay selectable (overlay canvas must not use an oversized hit box; see time.html car layer). */
.time-page .chart-header,
.time-page .analysis-note {
  user-select: text;
}
.chart-subline {
  font-size: 13px;
  color: var(--ink-light);
  margin: -8px 0 12px;
  line-height: 1.5;
}
.chart-wrap {
  position: relative;
  height: 320px;
  width: 100%;
}
.chart-wrap--scroll {
  height: auto;
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
}

/* Outcome — hit-rate list: no inner scrollbar; height follows content. */
.outcome-page .chart-wrap--c3b {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

/* Outcome page — arrest-risk bubble chart: custom reason chips (replaces canvas legend). */
.c3a-bubble-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 14px;
  justify-content: center;
  padding-top: 4px;
}
.c3a-bubble-legend__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-cta-sm);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-light);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.c3a-bubble-legend__btn:hover {
  transform: scale(1.06);
}
.c3a-bubble-legend__btn:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}
.c3a-bubble-legend__btn.is-dimmed {
  opacity: 0.45;
}
.c3a-bubble-legend__btn.is-dimmed:hover {
  opacity: 0.85;
}
.c3a-bubble-legend__btn.is-active {
  opacity: 1;
  font-weight: 600;
  color: var(--ink);
  border-color: var(--rule);
  background: var(--surface);
}
.c3a-bubble-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid;
  flex-shrink: 0;
  box-sizing: border-box;
}
.c3a-bubble-legend__label {
  max-width: 200px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Outcome — Search contraband hit rate: hover tooltip (matches Chart.js dark tooltip on time.html). */
.c3b-hit-tooltip {
  position: fixed;
  z-index: 12000;
  display: none;
  pointer-events: none;
  min-width: 132px;
  max-width: min(248px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
}
.c3b-hit-tooltip__title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
  word-wrap: break-word;
}
.c3b-hit-tooltip__body {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}
.c3b-hit-tooltip__line + .c3b-hit-tooltip__line {
  margin-top: 3px;
}
.c3b-hit-tooltip__gloss-block {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.c3b-hit-tooltip__gloss {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
}

/* Search contraband hit rate — hover: active row pops; others squeeze toward top/bottom with spring easing. */
.c3b-hit-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 2px 8px;
  overflow-x: visible;
  transition: gap 0.42s cubic-bezier(0.33, 1.38, 0.32, 1);
}
.c3b-hit-stack.c3b-hit-stack--hovering {
  gap: 5px;
}
.c3b-hit-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 0;
  transform: scale(1) translateY(0);
  opacity: 1;
  transition:
    transform 0.46s cubic-bezier(0.33, 1.42, 0.32, 1),
    opacity 0.38s ease;
}
.c3b-hit-stack--hovering .c3b-hit-row--active {
  z-index: 2;
  transform: scale(1.035);
  opacity: 1;
  transition:
    transform 0.48s cubic-bezier(0.34, 1.55, 0.36, 1),
    opacity 0.35s ease;
}
.c3b-hit-stack--hovering .c3b-hit-row--above {
  transform-origin: center top;
  transform: scale(0.9) translateY(-7px);
  opacity: 0.68;
}
.c3b-hit-stack--hovering .c3b-hit-row--below {
  transform-origin: center bottom;
  transform: scale(0.9) translateY(7px);
  opacity: 0.68;
}

.map-wrap {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-cta);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.geography-page .district-boundary-map-wrap {
  position: relative;
}
.geography-page .district-boundary-map-inner {
  width: 100%;
  height: 100%;
}
.geography-page .district-boundary-reset-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 700;
  padding: 7px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  background: rgba(251, 243, 232, 0.94);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta-sm);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.geography-page .district-boundary-reset-btn:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--accent-warm);
}
.map-wrap .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--paper);
  font-family: 'DM Sans', sans-serif;
}
.map-wrap .leaflet-tile {
  filter: var(--map-tile-filter);
}
.map-wrap .leaflet-control-zoom {
  border: 1px solid var(--rule) !important;
  border-radius: 6px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
.map-wrap .leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--ink-light) !important;
  border-bottom: 1px solid var(--rule) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 16px !important;
  line-height: 26px !important;
  width: 28px !important;
  height: 28px !important;
}
.map-wrap .leaflet-control-zoom a:hover {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.map-wrap .leaflet-control-attribution {
  background: rgba(251, 243, 232, 0.88) !important;
  color: var(--ink-light) !important;
  font-size: 10px !important;
  border-top: 1px solid var(--rule) !important;
  border-radius: 0 6px 0 0 !important;
  padding: 2px 8px !important;
}
.map-wrap .leaflet-control-attribution a {
  color: var(--accent-deep) !important;
}
.district-map-divicon {
  background: transparent !important;
  border: none !important;
}
.district-map-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  pointer-events: none;
}
.district-map-name-line {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-shadow: 0 0 6px rgba(251, 243, 232, 0.95), 0 0 2px #fbf3e8;
}
.geography-page .leaflet-tooltip.district-pct-tooltip {
  padding: 8px 12px !important;
  border: 1px solid var(--rule) !important;
  border-radius: 6px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12px !important;
  color: var(--ink) !important;
  background: rgba(251, 243, 232, 0.96) !important;
}
.geography-page .district-tooltip-inner strong {
  font-weight: 600;
  font-size: 12px;
}
.geography-page .district-tooltip-pct {
  font-size: 11px;
  color: var(--ink-light);
}

.demo-subsection-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
#demographics .demo-subsection-label--after-intro {
  margin-top: 52px;
}

.ideas-box {
  background: var(--ink);
  color: var(--bg);
  padding: 40px 48px;
  margin-top: 64px;
  border-radius: var(--radius-cta);
}
.ideas-box h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  margin-bottom: 16px;
}
.ideas-box ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 40px;
}
.ideas-box li {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(251, 243, 232, 0.72);
  padding-left: 16px;
  position: relative;
}
.ideas-box li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Resources ── */
.resources-main {
  padding: 64px 64px 96px;
}
.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.resource-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.resource-card:hover {
  transform: translateY(-2px);
  border-color: rgba(207, 134, 75, 0.45);
  box-shadow: 0 10px 24px rgba(48, 48, 48, 0.06);
}
.resource-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.resource-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.resource-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  white-space: nowrap;
}
.resource-link:hover {
  color: var(--accent);
}
.resource-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  letter-spacing: -0.4px;
  line-height: 1.1;
  color: var(--ink);
}
.resource-summary {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-light);
}
.resource-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--ink-light);
  background: rgba(251, 243, 232, 0.6);
}

.resources-page .page-header h1 {
  font-size: 48px;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
  .page-header,
  .page-header--hub {
    padding: 48px 24px 40px;
  }
  .page-header h1,
  .page-header--hub h1 {
    font-size: 34px;
  }
  .cards-stage {
    flex-direction: column;
    padding: 40px 24px 80px;
  }
  .section-nav {
    padding: 0 24px;
  }
  .data-section {
    padding: 40px 24px;
  }
  .analysis-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .ideas-box ul {
    grid-template-columns: 1fr;
  }
}

/* ── Home (index.html) ── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-bottom: none;
}
/* First viewport ≈ masthead + hero row; scroll reveals pull quote and CTA below. */
@media (min-width: 901px) {
  body.home-page .hero {
    grid-template-rows: minmax(calc(100vh - 60px), auto);
    grid-template-rows: minmax(calc(100svh - 60px), auto);
  }
}
.hero > .hero-left {
  grid-column: 1;
  grid-row: 1;
}
.hero > .hero-right {
  grid-column: 2;
  grid-row: 1;
}
.hero-left {
  padding: 72px 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  min-width: 0;
}
body.home-page .hero-left {
  position: relative;
  z-index: 2;
  overflow-x: clip;
  max-width: 100%;
}
.hero-intro {
  flex: 1;
  min-height: 0;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1,
.hero-left h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 30px;
}
.hero h1 em,
.hero-left h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero h1.hero-heading-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 22px;
  font-size: unset;
  line-height: 1;
  letter-spacing: normal;
}
.hero-heading-lockup__word {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(34px, 3.9vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
/* Logo above hero tagline — sized to pair with the serif headline block below. */
.hero-heading-lockup__logo {
  height: clamp(44px, 5.5vw, 72px);
  width: auto;
  max-width: min(88%, 340px);
  display: block;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}
/* Hero lead: three lines; first two = headline scale, third slightly smaller so it fits the left column. */
.hero-tagline {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.03em;
  max-width: 100%;
}
.hero-tagline__line {
  display: block;
  max-width: 100%;
}
.hero-tagline__line--lg {
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.1;
  letter-spacing: -1px;
}
.hero-tagline__line--sm {
  font-size: clamp(25px, 2.35vw, 42px);
  color: var(--accent);
  line-height: 1.1;
  margin-top: 0.06em;
}
.hero-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-light);
  max-width: 480px;
  margin-bottom: 0;
}
.hero-scroll-hint {
  margin-top: 48px;
  padding-top: 28px;
  flex-shrink: 0;
}
.hero-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-light);
  font-family: 'DM Serif Display', serif;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.22s ease, transform 0.22s ease;
}
.hero-scroll-label {
  transition: text-shadow 0.22s ease, transform 0.22s ease;
}
.read-on::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--accent-deep);
  border-bottom: 2px solid var(--accent-deep);
  transform: rotate(-45deg);
  transform-origin: 50% 50%;
  margin-right: 10px;
  margin-bottom: 2px;
  transition: transform 0.22s ease, filter 0.22s ease;
}
.hero-scroll-link:hover {
  color: var(--ink);
  transform: scale(1.045);
}
.hero-scroll-link:hover .hero-scroll-label {
  text-shadow: 0 5px 14px rgba(66, 66, 66, 0.16), 0 2px 5px rgba(66, 66, 66, 0.08);
}
.hero-scroll-link.read-on:hover::before {
  transform: rotate(-45deg) scale(1.12);
  filter: drop-shadow(0 4px 10px rgba(66, 66, 66, 0.18));
}
.hero-scroll-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Home index — subtle staggered fade-in (headline, body, Read on) */
@keyframes home-hero-fade-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
body.home-page .hero-left .eyebrow {
  animation: home-hero-fade-rise 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
body.home-page .hero-left .hero-tagline {
  animation: home-hero-fade-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
body.home-page .hero-left .hero-body {
  animation: home-hero-fade-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
body.home-page .hero-left .hero-scroll-hint {
  animation: home-hero-fade-rise 0.92s cubic-bezier(0.22, 1, 0.36, 1) 0.58s both;
}

/* Anchor targets for in-page scroll (masthead offset). */
#home-questions,
#home-analysis-cta {
  scroll-margin-top: 84px;
}

/* ── Home — preview questions strip (between Hero and Pull quote) ── */
.home-questions {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 96px 64px 80px;
}
.home-questions__inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: min(68vh, 640px);
  display: flex;
  flex-direction: column;
}
.home-questions__line {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  color: var(--ink-light);
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-size: clamp(28px, 3.2vw, 48px);
  max-width: 36ch;
}
.home-questions__line--q1 {
  align-self: flex-start;
  text-align: left;
  margin-bottom: 0.45em;
}
.home-questions__line--q2 {
  align-self: flex-end;
  text-align: right;
  margin-bottom: 0.45em;
  max-width: 40ch;
}
.home-questions__line--q3 {
  align-self: flex-start;
  text-align: left;
  margin-bottom: 0;
}
.home-questions__spacer {
  flex: 1 1 auto;
  min-height: 56px;
  width: 100%;
}
.home-questions__answer {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 400;
  color: var(--accent);
  line-height: 1.3;
  margin: 0;
  text-align: center;
  align-self: center;
  max-width: 36ch;
  padding-top: 8px;
}
/* Before first play: hidden (JS adds --anim-ready). After --played: looping keyframe animation */
.home-questions--anim-ready:not(.home-questions--played) .home-questions__line,
.home-questions--anim-ready:not(.home-questions--played) .home-questions__answer {
  opacity: 0;
}
.home-questions--anim-ready:not(.home-questions--played) .home-questions__line--from-left {
  transform: translate3d(-3rem, 0, 0);
}
.home-questions--anim-ready:not(.home-questions--played) .home-questions__line--from-right {
  transform: translate3d(3rem, 0, 0);
}
.home-questions--anim-ready:not(.home-questions--played) .home-questions__answer {
  transform: translate3d(0, 2rem, 0);
}
.home-questions--played {
  /* All lines out by 46%; 60–100% = 4s blank @ 10s cycle */
  --hq-cycle: 10s;
}
.home-questions--played .home-questions__line--q1 {
  animation: hq-loop-left var(--hq-cycle) cubic-bezier(0.42, 0, 0.2, 1) infinite;
}
.home-questions--played .home-questions__line--q2 {
  animation: hq-loop-right var(--hq-cycle) cubic-bezier(0.42, 0, 0.2, 1) infinite;
}
.home-questions--played .home-questions__line--q3 {
  animation: hq-loop-left-q3 var(--hq-cycle) cubic-bezier(0.42, 0, 0.2, 1) infinite;
}
.home-questions--played .home-questions__answer {
  animation: hq-loop-answer var(--hq-cycle) cubic-bezier(0.42, 0, 0.2, 1) infinite;
}
@keyframes hq-loop-left {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  2% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  11% {
    opacity: 1;
    transform: none;
  }
  32% {
    opacity: 1;
    transform: none;
  }
  46% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  47%,
  59.9% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  60%,
  99.9% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
}
@keyframes hq-loop-right {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(3.25rem, 0, 0);
  }
  7% {
    opacity: 0;
    transform: translate3d(3.25rem, 0, 0);
  }
  15% {
    opacity: 1;
    transform: none;
  }
  32% {
    opacity: 1;
    transform: none;
  }
  46% {
    opacity: 0;
    transform: translate3d(3.25rem, 0, 0);
  }
  47%,
  59.9% {
    opacity: 0;
    transform: translate3d(3.25rem, 0, 0);
  }
  60%,
  99.9% {
    opacity: 0;
    transform: translate3d(3.25rem, 0, 0);
  }
}
@keyframes hq-loop-left-q3 {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  12% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  19% {
    opacity: 1;
    transform: none;
  }
  32% {
    opacity: 1;
    transform: none;
  }
  46% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  47%,
  59.9% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
  60%,
  99.9% {
    opacity: 0;
    transform: translate3d(-3.25rem, 0, 0);
  }
}
@keyframes hq-loop-answer {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(0, 2.25rem, 0);
  }
  17% {
    opacity: 0;
    transform: translate3d(0, 2.25rem, 0);
  }
  26% {
    opacity: 1;
    transform: none;
  }
  32% {
    opacity: 1;
    transform: none;
  }
  46% {
    opacity: 0;
    transform: translate3d(0, 2.25rem, 0);
  }
  47%,
  59.9% {
    opacity: 0;
    transform: translate3d(0, 2.25rem, 0);
  }
  60%,
  99.9% {
    opacity: 0;
    transform: translate3d(0, 2.25rem, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-questions--played .home-questions__line,
  .home-questions--played .home-questions__answer {
    animation: none !important;
  }
  .home-questions__line,
  .home-questions__answer {
    opacity: 1 !important;
    transform: none !important;
  }
}
.entry-bridge {
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
  padding: 96px 64px 104px;
}
/* CTAs sit directly under the hero video column — tight to the black CTA strip */
.entry-bridge.entry-bridge--hero {
  padding: 28px 64px 96px;
  border-top: 1px solid rgba(251, 243, 232, 0.12);
}
.entry-bridge-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  justify-content: center;
}
.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  box-sizing: border-box;
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(251, 243, 232, 0.45);
  padding: 22px 36px 24px;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(20px, 2.35vw, 26px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.cta-primary .cta-primary-arrow,
.cta-secondary .cta-primary-arrow {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 400;
  opacity: 0.65;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cta-primary:hover,
.cta-secondary:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.cta-primary:hover .cta-primary-arrow,
.cta-secondary:hover .cta-primary-arrow {
  opacity: 1;
  transform: translateX(3px);
}
.cta-primary:focus-visible,
.cta-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-outline {
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-cta-sm);
  color: var(--ink-light);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-outline:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.hero-right {
  background: var(--surface);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  min-height: 520px;
}
body.home-page .hero-right {
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
}
.hero-right::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--paper) 0%,
    color-mix(in srgb, var(--paper) 55%, transparent) 4%,
    color-mix(in srgb, var(--paper) 0%, transparent) 9%
  );
}
.sf-sketch {
  position: absolute;
  inset: 0;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  z-index: 0;
}
/* Hero video (index only): flex so column height tracks the text column */
body.home-page .hero-right > .sf-sketch.sf-sketch--video {
  position: relative;
  inset: auto;
  flex: 1 1 0;
  min-height: 200px;
  width: 100%;
  min-width: 0;
  align-self: stretch;
}
.sf-sketch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
/* Cover + top anchor; script sets px box for reliable cover in all browsers */
.sf-sketch--video .hero-preview-video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
  object-fit: cover;
  object-position: center top;
  background: transparent;
  outline: none;
}
body.home-page .hero-right > .hero-video-mute {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(48, 48, 48, 0.14);
  border-radius: 50%;
  background: rgba(250, 249, 246, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.hero-video-mute:hover {
  background: rgba(250, 249, 246, 0.92);
  border-color: rgba(48, 48, 48, 0.22);
}
.hero-video-mute:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.hero-video-mute__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-video-mute__icon--off {
  opacity: 0;
}
.hero-video-mute--muted .hero-video-mute__icon--on {
  opacity: 0;
}
.hero-video-mute--muted .hero-video-mute__icon--off {
  opacity: 1;
}
.sf-bg {
  width: 100%;
  height: 800px;
  overflow: hidden;
  position: relative;
  margin-top: -60px;
}
.sf-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}
.sf-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--paper) 0%,
    color-mix(in srgb, var(--paper) 52%, transparent) 18%,
    color-mix(in srgb, var(--paper) 22%, transparent) 42%,
    color-mix(in srgb, var(--paper) 0%, transparent) 62%
  );
}
.hero-stats-bottom {
  position: absolute;
  left: 48px;
  bottom: 48px;
  right: 48px;
  z-index: 2;
}
.map-inset-label {
  position: absolute;
  top: 48px;
  left: 48px;
  z-index: 2;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: var(--ink-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-stats {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  width: min(920px, calc(100% - 96px));
}
.h-stat {
  min-height: 120px;
  padding: 22px 24px;
  background: rgba(250, 249, 246, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-cta-sm);
}
.h-stat-n {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  line-height: 0.9;
  color: var(--ink);
  margin-bottom: 8px;
}
.h-stat-n span {
  font-size: 26px;
  line-height: 1;
  position: relative;
  top: -0.08em;
  margin-left: 2px;
  color: var(--accent);
}
.h-stat-l {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #303030;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sf-sketch svg {
  width: 100%;
  height: 100%;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.col-panel {
  padding: 56px 48px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.col-panel:last-child {
  border-right: none;
}
.col-number {
  font-family: 'DM Serif Display', serif;
  font-size: 72px;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 16px;
  position: absolute;
  top: 36px;
  right: 40px;
}
.col-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.col-panel h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 12px;
}
.col-panel p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-light);
  margin-bottom: 24px;
}
.mini-chart {
  margin-top: 20px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ink-light);
}
.bar-fill {
  height: 8px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.7;
}
.bar-fill.teal {
  background: var(--teal);
}
.bar-fill.warm {
  background: var(--accent-warm);
}
.pullout {
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 60px;
  border-top: 1px solid var(--rule);
  padding: 100px 64px 100px;
  flex-direction: column;
  text-align: center;
}
.pullout-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}
.pullout-text {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  line-height: 1.4;
  color: var(--ink);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.pullout-text em {
  font-style: italic;
  color: var(--accent);
}
.pullout-meta {
  flex-shrink: 0;
  text-align: center;
  margin-top: 8px;
}
.pullout-meta .big-num {
  font-family: 'DM Serif Display', serif;
  font-size: 64px;
  color: var(--ink-light);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.pullout-meta .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: rgba(245, 243, 238, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.5;
}
.pullout-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.pullout-brand img {
  height: 80px;
  width: auto;
  display: block;
  opacity: 0.85;
}
.pullout-brand span {
  font-family: 'DM Serif Display', serif;
  font-size: 50px;
  color: var(--ink);
}

/* Brand row + Guided CTA: column width matches “StopAtlas does.” */
.pullout-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}
.pullout-cta-stack .pullout-brand {
  margin-top: 40px;
}
.pullout-cta-stack .home-tour-cta {
  width: 100%;
  max-width: none;
}
.pullout-cta-stack .home-analysis-cta__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 268px;
  box-sizing: border-box;
}

/* Home — large card CTA (Guided uses `.home-analysis-cta__link` for shared styling) */
.home-analysis-cta__link {
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 36px 40px 40px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(251, 243, 232, 0.94), rgba(255, 253, 249, 0.98));
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  box-shadow: 0 10px 32px rgba(66, 66, 66, 0.07);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.home-analysis-cta__link:hover {
  border-color: var(--accent-warm);
  box-shadow: 0 14px 40px rgba(66, 66, 66, 0.1);
  transform: translateY(-2px);
}
.home-analysis-cta__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.home-analysis-cta__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: block;
  margin-bottom: 14px;
  color: var(--ink);
}
.home-analysis-cta__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-light);
  display: block;
  max-width: 36em;
  margin: 0 auto;
}

/* Guided tour: same card + typography as `.home-analysis-cta__link` (shared class on `<button>`). */
.home-tour-cta {
  width: 100%;
  max-width: 700px;
  margin: 12px auto 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.pullout-cta-stack .home-tour-cta {
  margin-top: 36px;
}
.home-tour-cta__btn {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

.tour-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tour-start-btn:hover {
  background: var(--accent);
  color: #fbf3e8;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body.home-page .hero-left .eyebrow,
  body.home-page .hero-left .hero-tagline,
  body.home-page .hero-left .hero-body,
  body.home-page .hero-left .hero-scroll-hint {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-scroll-link {
    transition: color 0.15s ease;
  }
  .hero-scroll-link:hover {
    transform: none;
  }
  .hero-scroll-label {
    transition: color 0.15s ease;
  }
  .read-on::before {
    transition: none;
  }
  .hero-scroll-link:hover .hero-scroll-label {
    text-shadow: none;
  }
  .hero-scroll-link.read-on:hover::before {
    transform: rotate(-45deg);
    filter: none;
  }
  .cta-primary:hover .cta-primary-arrow,
  .cta-secondary:hover .cta-primary-arrow {
    transform: none;
  }
  .home-analysis-cta__link:hover {
    transform: none;
  }
  .analysis-page-cta:hover {
    transform: none;
  }
  .map-data-sources-btn:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .hero > .hero-left {
    grid-column: 1;
    grid-row: 1;
    border-bottom: 1px solid var(--rule);
    min-height: calc(100vh - 60px);
  }
  .hero > .hero-right {
    grid-column: 1;
    grid-row: 2;
    min-height: 42vh;
  }
  .home-questions {
    padding: 72px 32px 60px;
  }
  .home-questions__inner {
    min-height: min(58vh, 520px);
  }
}

@media (max-width: 640px) {
  .entry-bridge {
    padding: 64px 24px 72px;
  }
  .entry-bridge.entry-bridge--hero {
    padding: 24px 24px 64px;
  }
  .entry-bridge-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .home-questions {
    padding: 48px 24px 40px;
  }
  .home-questions__inner {
    min-height: min(56vh, 480px);
  }
  .home-questions__line {
    font-size: clamp(22px, 5.5vw, 34px);
  }
  .home-questions__answer {
    font-size: clamp(22px, 5vw, 36px);
  }
  .pullout {
    padding: 72px 24px 80px;
  }
  .pullout-cta-stack .home-tour-cta {
    margin-top: 28px;
  }
  .home-analysis-cta__link {
    padding: 28px 22px 32px;
  }
  .pullout-cta-stack .home-analysis-cta__link {
    min-height: 228px;
  }
}

/* ── Map explorer (map.html): layout + panel UI ── */
body.map-app {
  margin: 0;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
}
body.map-app .masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
}
.shell {
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
}
.map-stage {
  flex: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  /* Fill shell height so #map’s flex:1 works (was broken when #map moved inside this wrapper). */
  display: flex;
  flex-direction: column;
}
/** Bottom-right link to Resources — same visual language as `.home-analysis-cta__link`.
 * Must live inside `#map` with z-index above Leaflet’s `.leaflet-bottom` (1000) or flex paint order can hide a sibling of `#map`. */
.map-data-sources-btn {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 1500;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px 16px;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(251, 243, 232, 0.94), rgba(255, 253, 249, 0.98));
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta);
  box-shadow: 0 10px 32px rgba(66, 66, 66, 0.07);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.map-data-sources-btn:hover {
  border-color: var(--accent-warm);
  box-shadow: 0 14px 40px rgba(66, 66, 66, 0.1);
  transform: translateY(-2px);
}
.map-data-sources-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
body.map-app .leaflet-container a.map-data-sources-btn {
  color: var(--ink);
}
.map-search-overlay {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(560px, calc(100% - 32px));
  pointer-events: none;
}
.map-search-wrap-top {
  pointer-events: auto;
}
.map-search-wrap-top .search-input {
  padding: 11px 14px 11px 38px;
  border-radius: var(--radius-cta-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.map-search-wrap-top .search-results {
  max-height: min(340px, 42vh);
  overflow-y: auto;
}
.panel {
  width: var(--panel-w);
  flex-shrink: 0;
  background: var(--paper);
  border-right: 1px solid var(--rule);
  border-radius: 0 var(--radius-cta) var(--radius-cta) 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}
.panel-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--rule-light);
  flex-shrink: 0;
}
.panel-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.search-wrap {
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 9px 10px 9px 34px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input::placeholder {
  color: var(--ink-faint);
}
.search-input:focus {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(199, 124, 63, 0.12);
}
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow: hidden;
  display: none;
}
.search-results.open {
  display: block;
}
.search-result-item {
  padding: 9px 14px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--rule-light);
  transition: background 0.1s;
  color: var(--ink);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--surface);
}
.search-result-item small {
  display: block;
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 1px;
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.panel-body::-webkit-scrollbar {
  width: 4px;
}
.panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.panel-body::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 2px;
}
.filter-section {
  margin-bottom: 22px;
}
.filter-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-label .clear-btn {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.filter-label .clear-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.chip {
  padding: 5px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta-sm);
  cursor: pointer;
  color: var(--ink-light);
  transition: all 0.12s;
  user-select: none;
  line-height: 1;
}
.chip:hover {
  border-color: var(--accent-warm);
  color: var(--ink);
}
.chip.active {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  color: white;
}
.filter-hint {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.35;
  margin: -2px 0 10px;
}
.chip-group-years .chip {
  font-size: 10px;
  padding: 4px 7px;
}
.map-data-banner {
  font-size: 11px;
  line-height: 1.45;
  padding: 10px 12px;
  margin: -4px 0 14px;
  border-radius: var(--radius-cta-sm);
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
}
.map-data-banner.hidden {
  display: none;
}
.map-data-banner.banner-error {
  border-color: var(--accent);
  background: rgba(207, 134, 75, 0.1);
}
.map-data-banner.banner-warn {
  border-color: var(--accent-warm);
  background: rgba(199, 124, 63, 0.1);
}
.map-data-banner.banner-info {
  border-color: var(--teal);
  background: rgba(138, 147, 136, 0.12);
}
.map-data-banner code {
  font-size: 10px;
  word-break: break-all;
}
.time-range-wrap {
  padding: 4px 0;
}
.time-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.time-selected {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--accent-warm);
  font-weight: 500;
  margin-bottom: 6px;
  min-height: 16px;
}
.dual-slider {
  position: relative;
  height: 20px;
}
.dual-slider input[type='range'] {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  outline: none;
  top: 8px;
}
.dual-slider input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--paper);
  border: 2px solid var(--accent-warm);
  border-radius: 50%;
  pointer-events: all;
  cursor: pointer;
}
.dual-slider input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--paper);
  border: 2px solid var(--accent-warm);
  border-radius: 50%;
  pointer-events: all;
  cursor: pointer;
}
.slider-track {
  position: absolute;
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  top: 8px;
  left: 0;
  right: 0;
}
.slider-fill {
  position: absolute;
  height: 4px;
  background: var(--accent-warm);
  border-radius: 2px;
  top: 8px;
}
.view-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta-sm);
  overflow: hidden;
}
.view-btn {
  flex: 1;
  padding: 8px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-light);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  letter-spacing: 0.02em;
}
.view-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.panel-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--rule-light);
  background: var(--surface);
  flex-shrink: 0;
}
.stats-row {
  display: flex;
  gap: 12px;
}
.stat {
  flex: 1;
}
.stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3px;
}
.hint-text {
  font-size: 10px;
  color: var(--ink-faint);
  font-style: italic;
  margin-top: 10px;
  line-height: 1.5;
}
.map-export-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-light);
}
.map-export-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.export-format-btn {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  padding: 8px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-light);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.export-format-btn:hover:not(:disabled) {
  border-color: var(--accent-warm);
  color: var(--ink);
  background: var(--paper);
}
.export-format-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
#map {
  flex: 1;
  min-height: 0;
  position: relative;
}
body.map-app .leaflet-tile {
  filter: var(--map-tile-filter);
}
.stop-tooltip {
  background: var(--paper) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  padding: 10px 14px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12px !important;
  color: var(--ink) !important;
  max-width: 260px;
  white-space: normal;
}
.stop-tooltip::before {
  display: none !important;
}
.tooltip-loc {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 6px;
}
.tooltip-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--ink-light);
}
.tooltip-key {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  min-width: 60px;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.badge-reason {
  background: rgba(199, 124, 63, 0.12);
  color: var(--accent-warm);
}
.badge-outcome-warning {
  background: rgba(230, 126, 34, 0.12);
  color: #c87212;
}
.badge-outcome-citation {
  background: rgba(207, 134, 75, 0.12);
  color: var(--accent);
}
.badge-outcome-arrest {
  background: rgba(46, 44, 42, 0.12);
  color: var(--ink);
}
.badge-outcome-release {
  background: rgba(138, 147, 136, 0.15);
  color: var(--teal);
}
@keyframes markerFadeIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.leaflet-interactive {
  transition: opacity 0.3s;
}
.leaflet-pane .highlight-pulse {
  animation: pulse 1.5s ease-out infinite;
}
@keyframes pulse {
  0% {
    r: attr(r);
    opacity: 0.9;
  }
  100% {
    r: calc(attr(r) * 1.8);
    opacity: 0;
  }
}
.reset-all {
  display: block;
  text-align: center;
  font-size: 10px;
  color: var(--accent);
  cursor: pointer;
  margin-top: 6px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.explore-hint {
  position: absolute;
  bottom: 104px;
  right: 20px;
  background: rgba(251, 243, 232, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  border-radius: var(--radius-cta-sm);
  padding: 10px 14px;
  font-size: 11px;
  color: var(--ink-light);
  max-width: 220px;
  line-height: 1.5;
  z-index: 800;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: opacity 0.5s;
}
.explore-hint strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-warm);
  margin-bottom: 4px;
}
.explore-hint.hidden {
  opacity: 0;
  pointer-events: none;
}
body.map-app .leaflet-control-zoom {
  border: 1px solid var(--rule) !important;
  border-radius: 6px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
body.map-app .leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--ink-light) !important;
  border-bottom: 1px solid var(--rule) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 16px !important;
  line-height: 26px !important;
  width: 28px !important;
  height: 28px !important;
}
body.map-app .leaflet-control-zoom a:hover {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.map-loading {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  transition: opacity 0.6s;
}
.map-loading.done {
  opacity: 0;
  pointer-events: none;
}
.loading-inner {
  text-align: center;
}
.loading-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}
.loading-dots span {
  width: 7px;
  height: 7px;
  background: var(--accent-warm);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dotBounce {
  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.loading-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.filter-divider {
  height: 1px;
  background: var(--rule-light);
  margin: 6px 0 18px;
}

strong {
  color: var(--strong-orange, #a63d0f);
  font-weight: 600;
}
