:root {
  --ink: #172a29;
  --muted: #617368;
  --faint: #9aa8a2;
  --accent: #20614f;
  --accent-dark: #124537;
  --accent-soft: #eaf3ed;
  --border: #e4e9e5;
  --ground: #f6f8f5;
  --white: #fff;
  --amber: #ad7420;
  --blue: #5888b9;
  --red: #b64c49;
  --shadow: 0 3px 16px #173d2c12;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font: 13px/1.5 var(--sans);
  overflow: hidden;
  background: var(--ground);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3e977c;
  outline-offset: 3px;
}
svg:not(.leaflet-zoom-animated) {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button {
  border: 0;
  background: none;
}
small {
  font-size: 11px;
}
strong {
  font-weight: 600;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  left: -1000px;
  top: 4px;
  background: white;
  z-index: 3000;
  padding: 10px;
}
.skip:focus {
  left: 10px;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 26px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: relative;
  z-index: 1200;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.7px;
  min-width: 267px;
}
.brand:hover {
  text-decoration: none;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: var(--accent-dark);
  color: #d7eadb;
}
.brand-icon svg {
  width: 22px;
  height: 22px;
}
.brand-light {
  font-weight: 400;
}
.brand small {
  display: block;
  font: 8px/1.8 var(--mono);
  letter-spacing: 1.9px;
  color: var(--muted);
  margin-top: 1px;
}
.scope-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.scope-nav > span {
  color: #adb8b1;
  display: flex;
}
.scope-nav > span svg {
  width: 12px;
}
.scope-nav button {
  font-size: 12px;
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 5px;
}
.scope-nav button:hover {
  background: var(--ground);
}
.scope-nav .active {
  color: var(--accent-dark);
  font-weight: 600;
  background: var(--accent-soft);
}
.pilot {
  font: 8px var(--mono);
  letter-spacing: 0.6px;
  background: #cfe4d4;
  padding: 3px 4px;
  border-radius: 3px;
  margin-left: 5px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover {
  background: var(--ground);
  text-decoration: none;
  border-color: #acbdb1;
}
.button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.button.primary:hover {
  background: var(--accent-dark);
}
.button.quiet {
  border-color: transparent;
  color: var(--muted);
}
.button svg {
  width: 15px;
  height: 15px;
}
.workspace {
  display: grid;
  grid-template-columns: 294px minmax(0, 1fr) 314px;
  height: calc(100dvh - 76px);
}
.sidebar,
.inspector {
  background: var(--white);
  z-index: 700;
  min-width: 0;
}
.sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}
.sidebar-heading {
  padding: 26px 21px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eyebrow {
  font: 9px var(--mono);
  letter-spacing: 1.15px;
  color: var(--muted);
  display: block;
}
.sidebar-heading h1 {
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: -0.9px;
  margin-top: 7px;
}
.sidebar-heading p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.region-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
}
.search-box {
  margin: 0 18px 20px;
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #dfe6e0;
  border-radius: 6px;
  background: var(--ground);
  padding: 10px 9px;
  gap: 7px;
}
.search-box svg {
  width: 15px;
  color: #809088;
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 10.5px;
  color: var(--ink);
}
.search-box kbd {
  color: var(--faint);
  font: 10px var(--mono);
  border: 1px solid var(--border);
  padding: 0 4px;
  border-radius: 3px;
}
.sidebar-tabs {
  display: flex;
  padding: 0 18px;
  gap: 15px;
  border-bottom: 1px solid var(--border);
}
.sidebar-tabs button {
  padding: 0 0 12px;
  font-size: 11px;
  position: relative;
  color: var(--muted);
}
.sidebar-tabs button[aria-selected="true"] {
  color: var(--accent-dark);
  font-weight: 600;
}
.sidebar-tabs button[aria-selected="true"]:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.sidebar-tabs button span {
  font: 9px var(--mono);
  padding: 1px 4px;
  border-radius: 3px;
  background: #f0f3ef;
  margin-left: 3px;
}
.sidebar-content {
  overflow: auto;
  flex: 1;
  padding: 18px;
}
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  font: 9px var(--mono);
  color: var(--muted);
}
.sidebar-footer button {
  margin-left: auto;
  padding: 0;
  height: 16px;
  color: var(--muted);
}
.sidebar-footer svg {
  width: 14px;
  height: 14px;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4c9877;
  flex-shrink: 0;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 9px var(--mono);
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 12px;
}
.section-label .count {
  letter-spacing: 0;
  background: #f2f4f0;
  padding: 2px 5px;
  border-radius: 4px;
}
.filter-row {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}
.filter-row select {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px;
  min-width: 0;
  font-size: 10px;
  flex: 1;
  background: white;
  color: var(--muted);
}
.facility-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  padding: 13px 12px;
  margin-bottom: 9px;
  display: flex;
  gap: 10px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.facility-card:hover {
  border-color: #96b3a1;
  background: #fafcf9;
}
.facility-card.selected {
  border-color: #639379;
  background: #f0f6f0;
}
.facility-mark {
  height: 30px;
  width: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.facility-mark.upcoming {
  background: #fbf2df;
  color: var(--amber);
}
.facility-mark svg {
  width: 16px;
  height: 16px;
}
.facility-copy {
  min-width: 0;
  flex: 1;
}
.facility-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.facility-copy .location {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.card-foot {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  height: 4px;
  width: 4px;
  background: #679878;
  border-radius: 50%;
  margin-right: 4px;
}
.status-dot.upcoming {
  background: var(--amber);
}
.tier-badge {
  font: 8px var(--mono);
  background: #f0f3ed;
  padding: 2px 4px;
  border-radius: 3px;
  color: #71816e;
}
.notice {
  font-size: 10px;
  line-height: 1.75;
  color: var(--muted);
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--ground);
  margin: 14px 0;
}
.notice.amber {
  background: #fffbf0;
  border-color: #eee1bd;
  color: #8d7133;
}
.notice strong {
  color: var(--ink);
}
.text-link {
  font-size: 10px;
  color: var(--accent);
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-top: 10px;
}
.text-link svg {
  height: 12px;
  width: 12px;
}
.empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  padding: 24px 5px;
  text-align: center;
}
.empty svg {
  height: 28px;
  width: 28px;
  margin: 0 auto 10px;
  display: block;
  color: var(--faint);
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}
.layer-group {
  margin-bottom: 22px;
}
.layer-row {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eff2ee;
  cursor: pointer;
}
.layer-row input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  margin: 0;
}
.layer-row .layer-line {
  width: 14px;
  height: 3px;
  border-radius: 3px;
}
.layer-row strong {
  font-size: 11px;
  display: block;
}
.layer-row small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.layer-row .layer-total {
  margin-left: auto;
  color: var(--faint);
  font: 9px var(--mono);
}
.heat-options {
  border: 1px solid var(--border);
  background: var(--ground);
  padding: 12px;
  border-radius: 7px;
}
.heat-options label {
  display: flex;
  gap: 8px;
  font-size: 11px;
  padding: 7px 0;
  align-items: center;
}
.heat-options input {
  accent-color: var(--accent);
}
.heat-options small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  display: block;
  margin-top: 6px;
}
.opacity-label {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  color: var(--muted);
  margin-top: 13px;
}
.heat-options input[type="range"] {
  width: 100%;
  margin: 10px 0 0;
}
.map-stage {
  position: relative;
  min-width: 0;
  background: #e5ede1;
}
#map {
  width: 100%;
  height: calc(100% - 28px);
  z-index: 1;
  background: #e9eee4;
}
.map-topline {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.map-topline > * {
  pointer-events: auto;
}
.view-badge {
  font: 8px var(--mono);
  letter-spacing: 0.9px;
  display: flex;
  gap: 7px;
  align-items: center;
  border: 1px solid #fff9;
  padding: 9px 10px;
  border-radius: 5px;
  background: #fffffff0;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.map-button {
  background: #fffffff0;
  border: 1px solid #fff9;
  box-shadow: var(--shadow);
  border-radius: 5px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
}
.map-button svg {
  width: 13px;
  height: 13px;
}
.map-toolbar {
  position: absolute;
  right: 20px;
  top: 80px;
  z-index: 500;
  background: white;
  padding: 5px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 8px;
}
.map-toolbar button {
  width: 31px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #66796e;
}
.map-toolbar button:hover {
  background: var(--ground);
  color: var(--accent);
}
.map-toolbar button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.toolbar-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 3px;
}
.map-bottomline {
  position: absolute;
  bottom: 60px;
  left: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.map-bottomline > * {
  pointer-events: auto;
}
.basemap-switch {
  display: flex;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 4px;
  border-radius: 6px;
  gap: 2px;
}
.basemap-switch button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  padding: 7px 9px;
  border-radius: 4px;
  color: var(--muted);
}
.basemap-switch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.basemap-switch svg {
  width: 12px;
  height: 12px;
}
.legend {
  padding: 12px;
  border: 1px solid #fff8;
  border-radius: 6px;
  background: #fffffff2;
  box-shadow: var(--shadow);
  width: 184px;
  font-size: 9px;
}
.legend-title {
  font-size: 10px;
  font-weight: 600;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.legend .gradient {
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    #a4d6b459,
    #64b783,
    #f5d969,
    #e18539,
    #bc5037
  );
  margin: 8px 0 4px;
}
.legend .legend-range {
  display: flex;
  justify-content: space-between;
  font: 8px var(--mono);
  color: var(--muted);
}
.legend-note {
  font-size: 8px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.5;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  color: var(--muted);
}
.legend-dot {
  height: 7px;
  width: 7px;
  border-radius: 2px;
  display: inline-block;
}
.map-status {
  height: 28px;
  background: #f8faf6;
  border-top: 1px solid #dde5d9;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 0 13px;
  font: 8px var(--mono);
  color: #7e8b80;
  white-space: nowrap;
}
.status-note {
  margin-left: auto;
}
.draw-hint {
  position: absolute;
  z-index: 650;
  top: 70px;
  left: 20px;
  max-width: calc(100% - 85px);
  background: var(--accent-dark);
  color: #fff;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 11px;
  box-shadow: var(--shadow);
}
.draw-hint button {
  color: #cfdfbd;
  margin-left: 12px;
  text-decoration: underline;
}
.inspector {
  border-left: 1px solid var(--border);
  overflow: auto;
}
.detail-top {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--border);
}
.detail-overline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.detail-overline .eyebrow {
  font-size: 8px;
}
.detail-close {
  display: grid;
  place-items: center;
  color: var(--muted);
  padding: 0;
}
.detail-close svg {
  height: 14px;
  width: 14px;
}
.detail-symbol {
  height: 46px;
  width: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid #dce8df;
  color: var(--accent);
  background: #f1f7f0;
  margin-bottom: 15px;
}
.detail-symbol svg {
  height: 23px;
  width: 23px;
}
.detail-top h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.detail-top p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.detail-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.tag {
  border: 1px solid #dfe7dc;
  color: #537d5f;
  background: #f0f7ed;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 8px;
}
.tag.amber {
  background: #fff9e9;
  border-color: #eee1bb;
  color: #a47731;
}
.detail-body {
  padding: 20px 22px;
}
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.metric {
  background: var(--ground);
  border: 1px solid var(--border);
  padding: 13px 11px;
  border-radius: 6px;
}
.metric strong {
  display: block;
  font: 25px/1.2 var(--sans);
  letter-spacing: -0.8px;
}
.metric span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.detail-section {
  margin-bottom: 23px;
}
.detail-section h3 {
  font: 9px var(--mono);
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
}
.detail-section p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.coverage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1ec;
  font-size: 10px;
}
.coverage-row span {
  color: var(--muted);
  font-size: 9px;
}
.coverage-row .available {
  color: var(--accent);
}
.step-card {
  display: flex;
  gap: 10px;
  padding: 12px 0;
}
.step-number {
  height: 20px;
  width: 20px;
  border: 1px solid #d5e0d6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 9px var(--mono);
  color: var(--accent);
  flex-shrink: 0;
}
.step-card strong {
  font-size: 11px;
}
.step-card p {
  font-size: 10px;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.6;
}
.full {
  width: 100%;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.actions > .button {
  flex: 1;
}
.facts {
  margin: 0;
}
.facts div {
  padding: 10px 0;
  border-bottom: 1px solid #edf1eb;
}
.facts dt {
  font: 8px var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.facts dd {
  margin: 5px 0 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.facts code {
  font: 10px var(--mono);
}
.form-field {
  display: block;
  margin-bottom: 14px;
  font-size: 10px;
  font-weight: 600;
}
.form-field input,
.form-field select,
.form-field textarea {
  margin-top: 6px;
  display: block;
  width: 100%;
  border: 1px solid #dce5da;
  border-radius: 5px;
  padding: 9px;
  font-size: 11px;
  color: var(--ink);
  background: var(--ground);
  font-weight: 400;
}
.form-field textarea {
  min-height: 65px;
  resize: vertical;
}
.form-field small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}
.command {
  background: #f0f4ee;
  border: 1px solid var(--border);
  padding: 11px;
  border-radius: 5px;
  font: 10px/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 12px;
}
.danger {
  color: var(--red);
}
.progress-track {
  height: 4px;
  border-radius: 3px;
  background: #e9eee6;
  margin: 9px 0;
}
.progress-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.source-card {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.source-card h4 {
  font-size: 11px;
}
.source-card p {
  font-size: 10px;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.7;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3000;
  max-width: min(550px, 90vw);
  padding: 13px 18px;
  border-radius: 8px;
  background: #173e33;
  color: #fff;
  box-shadow: 0 4px 24px #123a3140;
  font-size: 12px;
}
.toast button {
  color: #d9e9bb;
  text-decoration: underline;
  margin-left: 10px;
}
.fatal {
  position: fixed;
  inset: 100px 20%;
  z-index: 2000;
  padding: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.loading {
  padding: 25px;
  color: var(--muted);
}
.mobile-toggle {
  display: none;
}
.leaflet-container {
  font: 11px var(--sans);
}
.leaflet-container .leaflet-control-attribution {
  font-size: 8px;
  background: #ffffffc9;
  color: #738471;
}
.leaflet-control-scale {
  margin-bottom: 12px !important;
}
.leaflet-control-scale-line {
  font-size: 8px;
  border-color: #697d67;
  background: #ffffffc0;
}
.leaflet-tooltip {
  font: 11px var(--sans);
  border: 1px solid #dce6d8;
  padding: 7px 10px;
  border-radius: 5px;
  box-shadow: var(--shadow);
}
.facility-pin {
  background: var(--accent-dark);
  color: #fff;
  border: 2px solid white;
  border-radius: 7px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 9px #12362c35;
}
.facility-pin svg {
  width: 13px;
  height: 13px;
}
.facility-pin.selected {
  outline: 5px solid #20614f30;
  background: #348b67;
  z-index: 999 !important;
}
.facility-pin.government {
  background: #5680aa;
}
.facility-pin.upcoming {
  background: var(--amber);
}
.cluster-pin {
  border-radius: 50%;
  border: 2px solid white;
  box-shadow:
    0 0 0 5px #28765318,
    0 2px 8px #19493122;
  background: #397e61;
  color: #fff;
  display: grid;
  place-items: center;
  font: 11px var(--mono);
}
.leaflet-interactive:focus {
  outline: 2px solid #1b694d;
}
.draft-label {
  font: 10px var(--mono);
}
.search-hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.map-stage.satellite .leaflet-tile {
  filter: none;
}
.leaflet-tile {
  filter: saturate(0.78);
}
@media (min-width: 1550px) {
  .workspace {
    grid-template-columns: 310px minmax(0, 1fr) 340px;
  }
  .sidebar-heading {
    padding-top: 30px;
  }
  .detail-top,
  .detail-body {
    padding-left: 26px;
    padding-right: 26px;
  }
  .sidebar-content {
    padding: 20px;
  }
}
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 265px minmax(0, 1fr) 280px;
  }
  .topbar {
    padding: 0 18px;
    gap: 12px;
  }
  .brand {
    min-width: 245px;
  }
  .scope-nav {
    gap: 0;
  }
  .scope-nav button {
    padding: 7px;
  }
  .reports-link {
    display: none;
  }
  .sidebar-heading {
    padding: 21px 18px;
  }
  .detail-top,
  .detail-body {
    padding: 18px;
  }
  .map-bottomline {
    flex-wrap: wrap;
    left: 12px;
    right: 12px;
    bottom: 62px;
  }
  .legend {
    width: 162px;
  }
  .map-topline {
    left: 12px;
    right: 12px;
  }
  .view-badge {
    font-size: 7px;
  }
  .map-toolbar {
    right: 12px;
  }
  .status-note {
    display: none;
  }
}
@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .inspector {
    position: absolute;
    right: 15px;
    top: 146px;
    bottom: 90px;
    width: 290px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-radius: 9px;
    display: none;
  }
  .inspector.open {
    display: block;
  }
  .topbar .brand {
    min-width: 225px;
  }
  .scope-nav button {
    font-size: 10px;
  }
  .top-actions .button span:not([data-icon]) {
    display: none;
  }
  .top-actions {
    gap: 0;
  }
  .map-toolbar {
    top: 75px;
  }
  .legend {
    width: 184px;
  }
  .map-bottomline {
    flex-wrap: nowrap;
  }
  .inspector.open ~ .map-toolbar {
    display: none;
  }
}
@media (max-width: 660px) {
  .topbar {
    height: 105px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand {
    font-size: 17px;
    min-width: 0 !important;
  }
  .brand small {
    font-size: 7px;
  }
  .brand-icon {
    width: 31px;
    height: 31px;
  }
  .top-actions {
    position: absolute;
    right: 10px;
    top: 13px;
  }
  .scope-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .scope-nav button {
    font-size: 11px;
    padding: 5px 10px;
  }
  .workspace {
    height: calc(100dvh - 105px);
    display: block;
  }
  .map-stage {
    height: 100%;
  }
  .sidebar {
    position: absolute;
    top: 160px;
    left: 12px;
    bottom: 94px;
    z-index: 1000;
    width: min(300px, calc(100vw - 24px));
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 30px #12372d24;
    display: none;
  }
  .sidebar.open {
    display: flex;
  }
  .sidebar-heading {
    padding: 16px;
  }
  .sidebar-heading h1 {
    font-size: 22px;
  }
  .search-box {
    margin-bottom: 15px;
  }
  .inspector {
    top: 160px;
    right: 12px;
    bottom: 94px;
    z-index: 1000;
    width: min(314px, calc(100vw - 24px));
  }
  .map-topline {
    top: 13px;
    left: 12px;
    right: 12px;
  }
  .view-badge {
    font-size: 8px;
  }
  .map-toolbar {
    top: 64px;
  }
  .map-bottomline {
    bottom: 86px;
    align-items: end;
    gap: 8px;
  }
  .basemap-switch {
    flex-direction: column;
  }
  .basemap-switch button {
    padding: 6px;
  }
  .legend {
    width: 158px;
    padding: 10px;
  }
  .mobile-toggle {
    display: flex;
    position: absolute;
    z-index: 1100;
    left: 12px;
    bottom: 41px;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    background: #fff;
    padding: 10px 13px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 11px;
  }
  .map-status {
    font-size: 7px;
    gap: 12px;
  }
  .map-toolbar button {
    width: 31px;
    height: 34px;
  }
  .draw-hint {
    left: 12px;
    top: 60px;
    font-size: 10px;
  }
  .map-topline .map-button {
    font-size: 9px;
  }
  .map-topline .map-button svg {
    width: 12px;
  }
  .leaflet-control-scale {
    margin-bottom: 48px !important;
  }
  .toast {
    bottom: 20px;
    width: 90vw;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Constrain each independent scroll area; a national inventory must not grow the map. */
.workspace {
  grid-template-rows: minmax(0, 1fr);
}
.sidebar,
.sidebar-content,
.inspector,
.map-stage {
  min-height: 0;
}
.directory-filters {
  margin: 12px 0 18px;
  font-size: 12px;
}
.directory-filters summary {
  cursor: pointer;
  color: var(--ink);
  padding: 10px 0;
  font-weight: 600;
}
.directory-filters small,
.muted {
  color: #61736e;
  font-size: 11px;
  line-height: 1.7;
}
.saved-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.saved-row .facility-card {
  flex: 1;
  min-width: 0;
}
.compare-select {
  padding: 10px 2px;
  cursor: pointer;
}
.compare-select input {
  accent-color: #20614f;
  width: 17px;
  height: 17px;
}
.evidence-item {
  border-bottom: 1px solid #e2e8e4;
  padding: 12px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.evidence-item summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}
.evidence-item summary::before {
  content: "+";
  color: #426457;
}
.evidence-item[open] summary::before {
  content: "−";
}
.evidence-item p {
  margin: 10px 0;
  line-height: 1.7;
}
.evidence-item small {
  color: #61736e;
  line-height: 1.7;
  display: block;
}
.evidence-item .text-link {
  display: block;
  margin-top: 8px;
}
.research-list {
  padding-left: 17px;
  font-size: 12px;
  line-height: 1.7;
  color: #52645e;
}
.research-list li {
  padding: 4px 0;
}
.source-record {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  font-size: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8e4;
}
.source-record svg {
  width: 16px;
  flex-shrink: 0;
}
.research-dialog {
  border: 1px solid #dbe5df;
  border-radius: 16px;
  padding: 28px;
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  color: #1b3029;
  box-shadow: 0 20px 90px #0c261e44;
}
.research-dialog::backdrop {
  background: #112e2766;
  backdrop-filter: blur(3px);
}
.research-dialog > p {
  color: #52645e;
  font-size: 13px;
  line-height: 1.7;
}
.comparison-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.comparison-heading h2 {
  margin: 10px 0;
  font-size: 27px;
}
.comparison-heading svg {
  width: 20px;
  height: 20px;
}
.comparison-scroll {
  overflow-x: auto;
}
.comparison-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.comparison-scroll th,
.comparison-scroll td {
  padding: 16px 12px;
  border-bottom: 1px solid #e2e8e4;
  text-align: left;
  min-width: 155px;
}
.comparison-scroll thead {
  background: #eef5f0;
}
.comparison-scroll tbody th {
  font-weight: 500;
}
.discovery-link {
  white-space: nowrap;
}
@media (max-width: 660px) {
  .research-dialog {
    padding: 18px;
  }
  .discovery-link {
    padding: 8px;
  }
}
.draw-mode .leaflet-screening-pane *,
.draw-mode .leaflet-overlay-pane > canvas,
.draw-mode .facility-pin,
.draw-mode .cluster-pin {
  pointer-events: none !important;
}
