@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/figtree-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/figtree-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/figtree-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/syne-700-latin.woff2") format("woff2");
}

:root {
  --canvas: #070B14;
  --land: #0E1624;
  --water: #0A101C;
  --panel: #12192A;
  --elevated: #182234;
  --ink: #E8F4FF;
  --muted: #A8B8CC;
  --lime: #C6FF3D;
  --lime-hover: #D8FF70;
  --cyan: #3EE0FF;
  --cyan-hover: #14C8EA;
  --amber: #FFC857;
  --error: #FFB4C8;
  --input-border: #4E6888;
  --rule: #2A3A52;
  --focus: #3EE0FF;
  --radius-card: 20px;
  --radius-card-m: 16px;
  --radius-ctl: 12px;
  --header-h: 56px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; background: var(--canvas); color: var(--ink); }
body {
  font-family: Figtree, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 26px;
  min-height: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: 2px; }
a:hover { color: var(--lime-hover); }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.btn:focus-visible {
  outline: 3px solid #E8F4FF;
  box-shadow: 0 0 0 5px var(--canvas), 0 0 0 8px var(--cyan);
  outline-offset: 0;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--cyan); color: var(--canvas); padding: 8px 12px;
  border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #070B14f2;
  position: relative;
  z-index: 20;
}
.home .site-header { background: #070B14e6; }
.wordmark {
  font-family: Syne, Figtree, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark .accent { color: var(--cyan); }
.nav-desktop { display: flex; gap: 24px; align-items: center; }
.nav-desktop a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-desktop a:hover { color: var(--cyan); }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-mobile { display: none; background: var(--panel); border-top: 1px solid var(--rule); }
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: 14px 24px; color: var(--ink); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--rule);
}

/* Home hero */
.hero {
  position: relative;
  background: var(--land);
}
.home .hero {
  height: calc(100dvh - var(--header-h));
  min-height: 640px;
}
.map-stage {
  position: relative;
  background: var(--land);
  overflow: hidden;
}
.home .map-stage {
  width: 100%;
  height: 100%;
}
.hero-stack {
  position: absolute;
  top: 72px;
  left: max(24px, calc((100% - var(--max)) / 2));
  width: 400px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.hero-stack .search-card {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
}
.hero-stack .legend {
  position: relative;
  left: auto;
  bottom: auto;
  align-self: flex-start;
}
.home .map-stage .legend { display: none; }
.map-canvas, .map-skeleton {
  position: absolute; inset: 0;
}
.map-skeleton {
  background: var(--land);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.map-skeleton svg { width: min(920px, 92%); height: auto; color: var(--elevated); opacity: 0.9; }
.map-canvas { z-index: 1; }
.map-fail {
  position: absolute; inset: auto 16px 56px 16px; z-index: 4;
  background: var(--panel); color: var(--error); padding: 12px 16px;
  border-radius: var(--radius-ctl); border-left: 4px solid var(--amber);
  display: none;
}
.map-fail.show { display: block; }

.search-card {
  position: absolute;
  top: 72px;
  left: max(24px, calc((100% - var(--max)) / 2));
  width: 400px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: var(--radius-card);
  box-shadow: 0 0 8px rgba(62, 224, 255, 0.35);
  z-index: 5;
}
.search-card h1 {
  font-family: Syne, Figtree, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.search-card .lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 26px;
}
.field-label {
  display: block;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--input-border);
  background: var(--canvas);
  color: var(--ink);
  border-radius: var(--radius-ctl);
  padding: 12px 14px;
  font: 400 16px/22px Figtree, sans-serif;
}
.field-input::placeholder { color: #7E90A8; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 18px;
  background: var(--cyan); color: var(--canvas);
  border: 0; border-radius: var(--radius-ctl);
  font: 700 16px/22px Figtree, sans-serif;
  cursor: pointer; text-decoration: none;
  width: 100%;
}
.btn:hover { background: var(--cyan-hover); color: var(--canvas); transform: translateY(-2px); }
.notice {
  margin: 12px 0 0;
  padding: 8px 12px 8px 14px;
  border-left: 4px solid var(--amber);
  color: var(--muted);
  font-size: 16px;
  line-height: 22px;
}
.legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius-ctl);
  padding: 12px 16px;
  font-size: 16px;
  line-height: 22px;
}
.legend li { list-style: none; display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.legend ul { margin: 0; padding: 0; }
.swatch { display: inline-block; width: 14px; height: 14px; flex: 0 0 14px; box-sizing: border-box; }
.swatch-dot { background: var(--lime); border: 2px solid var(--canvas); border-radius: 50%; box-shadow: 0 0 8px var(--lime); }
.swatch-ring { border: 2px solid var(--lime); border-radius: 50%; background: rgba(198, 255, 61, 0.15); box-shadow: 0 0 8px rgba(198, 255, 61, 0.45); }
.swatch-dash { border-bottom: 3px dashed var(--amber); height: 0; width: 16px; }
.chip {
  position: absolute;
  right: 16px;
  bottom: 40px;
  z-index: 5;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  line-height: 22px;
  min-width: 220px;
  white-space: nowrap;
}
.chip b { color: var(--lime); font-weight: 700; }
.map-attrib {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 5;
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  background: rgba(7, 11, 20, 0.65);
  padding: 2px 6px;
  border-radius: 4px;
}
.map-attrib a { color: var(--muted); }

.results-sheet {
  display: none;
}
.results-list { margin: 0; padding: 0; list-style: none; }
.results-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.results-list .result-coords {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  font-weight: 400;
}
.results-list .result-dist {
  font-weight: 400;
  color: var(--muted);
}
.results-list a { font-weight: 600; }

/* Article / inner pages */
.wrap { width: min(var(--max), calc(100% - 100px)); margin: 0 auto; }
.page { padding: 32px 0 64px; }
.page h1 {
  font-family: Syne, Figtree, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 22ch;
}
.page h2 {
  font-family: Syne, Figtree, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 38px;
  margin: 48px 0 16px;
}
.page h3 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  margin: 24px 0 8px;
}
.page p, .page li { max-width: 70ch; }
.crumb {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 16px;
}
.crumb a { color: var(--muted); }
.takeaways {
  background: var(--panel);
  border-radius: var(--radius-card);
  border-left: 4px solid var(--lime);
  padding: 20px 24px;
  margin: 0 0 32px;
}
.takeaways h2 { font-size: 20px; line-height: 26px; margin: 0 0 12px; font-family: Figtree, sans-serif; }
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { margin: 8px 0; }
@media (min-width: 861px) {
  .takeaways ul {
    columns: 2;
    column-gap: 32px;
    padding-left: 20px;
  }
  .takeaways li {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 8px;
  }
}
.state-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 32px 40px;
  align-items: end;
  margin: 0 0 32px;
}
.state-hero h1 { margin: 0; max-width: 18ch; }
.state-stat { text-align: right; }
.state-stat-num {
  font-family: Syne, Figtree, sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--lime);
  text-shadow: 0 0 22px rgba(198, 255, 61, 0.45), 0 0 6px rgba(198, 255, 61, 0.7);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.state-stat-label {
  margin: 12px 0 4px;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
}
.state-stat-date { margin: 0; color: var(--muted); font-size: 16px; line-height: 22px; }
.state-map-block { margin: 0 0 32px; }
.state-map-block .notice { margin: 12px 0 0; }
.prose .table-wrap {
  overflow-x: auto;
  margin: 16px 0 28px;
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  min-height: 48px;
}
.prose th {
  background: var(--elevated);
  color: var(--ink);
  font-weight: 700;
}
.prose tbody tr:nth-child(odd) { background: var(--land); }
.prose tbody tr:nth-child(even) { background: var(--panel); }
.prose tbody tr:hover { box-shadow: inset 3px 0 0 var(--lime); }
.prose ol.sources { padding-left: 20px; }
.reviewed { color: var(--muted); font-size: 16px; }
.legal-line {
  margin: 32px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.state-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 0 0 32px;
}
.state-map {
  position: relative;
  height: 360px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--land);
  border: 1px solid var(--rule);
}
.state-map .map-canvas, .state-map .map-skeleton { border-radius: 16px; }
.count-banner {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-variant-numeric: tabular-nums;
}

.how-grid, .card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 24px;
}
.card h2, .card h3 { margin-top: 0; }

.below-hero { padding: 64px 0 96px; }
.below-hero h2 {
  font-family: Syne, Figtree, sans-serif;
  font-size: 32px;
  line-height: 38px;
  margin: 0 0 16px;
}

.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--rule);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  width: min(var(--max), calc(100% - 100px));
  margin: 0 auto;
}
.site-footer h2 {
  font-size: 16px; line-height: 22px; margin: 0 0 12px; font-family: Figtree, sans-serif;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.footer-copy {
  width: min(var(--max), calc(100% - 100px));
  margin: 32px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

code { font-size: 0.92em; color: var(--lime); }

.maplibregl-ctrl-attrib, .leaflet-control-attribution { display: none !important; }
.maplibregl-popup-content {
  background: var(--panel); color: var(--ink); border-radius: 12px;
  font-family: Figtree, sans-serif; font-size: 16px;
}
.maplibregl-popup-tip { border-top-color: var(--panel) !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .btn:hover { transform: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 52px; --radius-card: 16px; }
  .site-header { padding: 0 16px; }
  .wordmark { font-size: 15px; }
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .wrap, .footer-grid, .footer-copy { width: calc(100% - 32px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .how-grid, .card-grid, .state-split { grid-template-columns: 1fr; }

  .home .hero {
    display: flex; flex-direction: column;
    padding: 8px 16px 0;
    height: calc(100dvh - var(--header-h));
    min-height: 0;
  }
  .hero-stack {
    position: relative;
    top: auto; left: auto;
    width: 100%;
    gap: 0;
  }
  .search-card {
    position: relative;
    top: auto; left: auto;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-bottom: 12px;
  }
  .search-card h1 {
    font-size: 28px;
    line-height: 34px;
    max-width: none;
    margin-bottom: 8px;
  }
  .search-card .lead {
    margin-bottom: 8px;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }
  .state-hero { grid-template-columns: 1fr; }
  .state-stat { text-align: left; }
  .takeaways ul { display: block; columns: 1; }
  .home .map-stage {
    flex: 1 1 auto;
    height: auto;
    min-height: 180px;
    width: 100%;
    border-radius: 16px;
  }
  .legend { display: none; }
  .chip {
    right: 8px; bottom: 28px; min-width: 0;
    font-size: 14px; padding: 6px 10px;
  }
  .page { padding: 24px 0 48px; }
  .page h1 { font-size: 28px; line-height: 34px; max-width: none; }
  .page h2 { font-size: 24px; line-height: 30px; }
  .state-map { height: 260px; }
  .prose th, .prose td { min-width: 140px; }

  .results-sheet {
    display: block;
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 16px 16px 0 0;
    margin: 8px -16px 0;
    padding: 16px;
    flex: 0 0 auto;
    max-height: none;
    overflow: hidden;
  }
  .results-sheet header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 0;
  }
  .results-sheet .results-list,
  .results-sheet > .notice { display: none; }
  .results-sheet.expanded {
    max-height: 58vh;
    overflow: auto;
  }
  .results-sheet.expanded .results-list,
  .results-sheet.expanded > .notice { display: block; }
  .sheet-legend {
    display: flex;
    gap: 12px 16px;
    font-size: 14px;
    color: var(--muted);
    flex-wrap: wrap;
    grid-column: 1 / -1;
    padding: 4px 0 0;
    box-sizing: border-box;
    width: 100%;
  }
  .sheet-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
}


@media (min-width: 861px) {
  .sheet-legend { display: none; }
}

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

.inner .map-stage {
  height: 360px;
  border-radius: 16px;
  border: 1px solid var(--rule);
}
@media (max-width: 860px) {
  .inner .map-stage { height: 260px; }
}

/* MapLibre adds .maplibregl-map { position:relative; height:100% }, which
   collapsed our absolutely positioned container to 0 height. Keep it pinned. */
.map-stage #map-canvas,
.map-stage .maplibregl-map {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.map-skeleton { z-index: 0; }
.map-stage #map-canvas { z-index: 1; }
.map-stage .map-fail,
.map-stage .legend,
.map-stage .chip,
.map-stage .map-attrib { z-index: 6; }

.search-card h1 {
  font-size: clamp(28px, 2.8vw, 36px);
  line-height: 1.15;
}
@media (min-width: 861px) {
  .inner .legend { left: 16px; }
}
