:root {
  --navy: #0E203B;
  --red: #E11D2E;
  --slate: #6B7280;
  --light: #F8FAFC;
  --bg: #0A1628;
  --panel: #0E203B;
  --panel-2: #152A4A;
  --border: #243B5C;
  --text: #F8FAFC;
  --muted: #6B7280;
  --accent: #E11D2E;
  --accent-2: #E11D2E;
  --danger: #E11D2E;
  --chip: #152A4A;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; }

.top {
  padding: 1rem 1.25rem .75rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0E203B, var(--bg));
}
.brand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand-logo-link { display: inline-flex; line-height: 0; }
.brand-logo { display: block; height: auto; }
.brand-logo-h { width: min(280px, 70vw); }
.brand-logo-s { display: none; width: 72px; }
.brand-meta { display: flex; flex-direction: column; gap: .15rem; }
.brand-domain { color: var(--slate); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 520px) {
  .brand-logo-h { display: none; }
  .brand-logo-s { display: block; }
}
.tagline { margin: .55rem 0 0; color: var(--slate); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }

.controls {
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
}
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.filters select, .filters input[type="search"] {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem .6rem;
  min-width: 10rem;
  font-size: .95rem;
}
.filters .search input { min-width: 16rem; }
.filters .check { flex-direction: row; align-items: center; gap: .4rem; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); padding-bottom: .35rem; }
.stats { color: var(--muted); font-size: .9rem; }

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 0;
  min-height: 0;
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  #map { height: 360px !important; }
}

.feed-pane, .map-pane { padding: 1rem 1.25rem; min-height: 0; }
.feed-pane { border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.feed-pane h2, .map-pane h2 { margin: 0 0 .75rem; font-size: 1rem; }
.muted { color: var(--muted); font-weight: 400; font-size: .85rem; }

.feed {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-height: calc(100vh - 220px);
  padding-right: .25rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem 1rem;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  box-shadow: var(--shadow);
}
.card:hover, .card:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}
.card.active { border-color: var(--accent-2); }
.card-title { font-weight: 600; margin: 0 0 .35rem; line-height: 1.3; }
.card-addr { color: var(--muted); font-size: .9rem; margin: 0 0 .55rem; }
.meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chip {
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .75rem;
  color: var(--text);
}
.chip.stage-permit_issued { border-color: #3d6bb3; }
.chip.stage-inspection_active { border-color: var(--red); color: #F8FAFC; }
.chip.stage-co_issued { border-color: var(--red); color: #F8FAFC; }
.chip.stage-permit_applied { border-color: #8a7dff; }
.chip.unmapped { border-color: #665; color: #c9b8a0; }
.chip.score { background: #152A4A; border-color: #E11D2E; color: #F8FAFC; }
.source-link { margin-left: auto; font-size: .8rem; color: var(--accent); text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.card-date { width: 100%; color: var(--muted); font-size: .75rem; margin-top: .35rem; }

#map {
  height: calc(100vh - 260px);
  min-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0A1628;
}
.map-note { color: var(--muted); font-size: .8rem; margin: .5rem 0 0; }

.foot {
  border-top: 1px solid var(--border);
  padding: .7rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: .85rem;
  background: var(--panel);
}

.detail {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  width: min(720px, 94vw);
  max-height: 90vh;
  padding: 0;
  box-shadow: var(--shadow);
}
.detail::backdrop { background: rgba(0,0,0,.55); }
.detail .close {
  position: absolute;
  right: .6rem;
  top: .4rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.detail .close:hover { color: var(--text); }
#detail-body { padding: 1.25rem 1.35rem 1.5rem; overflow: auto; max-height: 90vh; }
#detail-body h3 { margin: 0 1.5rem .35rem 0; }
#detail-body .addr { color: var(--muted); margin: 0 0 1rem; }
.grid {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: .35rem .75rem;
  font-size: .92rem;
}
.grid .k { color: var(--muted); }
.grid .v { word-break: break-word; }
.section { margin-top: 1.1rem; }
.section h4 {
  margin: 0 0 .5rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
}
.unknown { color: #8a97ad; font-style: italic; }
.empty {
  color: var(--muted);
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.leaflet-container { background: #0A1628; font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-popup-content a { color: var(--accent); }


.founding-cta {
  color: var(--light);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  font-weight: 600;
}
.founding-cta:hover { color: var(--red); }
.founding-cta[data-stripe-pending="1"] { opacity: .85; pointer-events: none; }
.founding-note { color: var(--slate); }







.brand-wordmark {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-wordmark .wm-atl { color: #F8FAFC; }
.brand-wordmark .wm-radar { color: #E11D2E; }

.subhead {
  margin: .35rem 0 0;
  color: #F8FAFC;
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  max-width: 40rem;
  opacity: 0.9;
}

.layout {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}
.map-pane { order: 1; }
.feed-pane { order: 2; border-right: none; border-left: 1px solid var(--border); }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .map-pane { order: -1; }
  .feed-pane { border-left: none; border-top: 1px solid var(--border); }
  #map { height: 360px !important; }
}


.card-parties {
  color: var(--muted);
  font-size: .82rem;
  margin: 0 0 .5rem;
  line-height: 1.35;
}
