:root {
  color-scheme: dark;
  --navy: #0b1a29;
  --navy-soft: rgba(11, 26, 41, 0.92);
  --green: #3b8f47;
  --green-light: #78cb75;
  --cyan: #37d8e8;
  --gold: #ffd34f;
  --orange: #ff8c3a;
  --text: #f7fafc;
  --muted: #b9c6d2;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--navy);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; }

.topbar {
  position: relative;
  z-index: 1000;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: var(--navy-soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.brand div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand strong {
  overflow: hidden;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.view-buttons {
  display: flex;
  gap: 7px;
}

.view-buttons button,
#dismiss-intro {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

.view-buttons button {
  padding: 9px 13px;
  font-size: 12px;
}

.view-buttons button:hover,
.view-buttons button:focus-visible,
.view-buttons button.active {
  border-color: var(--green-light);
  background: var(--green);
  outline: none;
}

main {
  position: relative;
  height: calc(100% - 74px);
}

#map {
  position: absolute;
  inset: 0;
  background: #162330;
}

.map-intro {
  position: absolute;
  z-index: 800;
  top: 24px;
  left: 24px;
  width: min(410px, calc(100vw - 48px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(11, 26, 41, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.map-intro.hidden {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.map-intro h1 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 34px);
  line-height: 1.08;
}

.map-intro p:not(.eyebrow) {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

#dismiss-intro {
  padding: 10px 15px;
  border-color: transparent;
  background: var(--green);
}

.status-card {
  position: absolute;
  z-index: 700;
  right: 20px;
  bottom: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(11, 26, 41, 0.88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.status-card div {
  display: grid;
  gap: 2px;
}

.status-card strong { font-size: 12px; }
.status-card small { color: var(--muted); font-size: 10px; }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-light);
  box-shadow: 0 0 0 5px rgba(120, 203, 117, 0.14);
}

.disclaimer {
  position: absolute;
  z-index: 700;
  right: 14px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(11, 26, 41, 0.72);
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
}

.leaflet-control-layers,
.leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px !important;
  background: rgba(11, 26, 41, 0.91) !important;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(10px);
}

.leaflet-control-layers-expanded {
  padding: 12px 14px;
}

.leaflet-control-layers-separator {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.leaflet-control-layers label {
  margin: 5px 0;
  font-size: 12px;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(11, 26, 41, 0.91) !important;
  color: #fff !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #102437;
  color: #fff;
}

.leaflet-popup-content {
  margin: 14px 16px;
  line-height: 1.4;
}

.leaflet-popup-content strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green-light);
}

.leaflet-tooltip.site-label {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  background: rgba(11, 26, 41, 0.88);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.74) !important;
  font-size: 9px !important;
}

@media (max-width: 760px) {
  .topbar {
    height: 106px;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .brand span:last-child { display: none; }

  .view-buttons {
    position: absolute;
    right: 12px;
    bottom: 10px;
    left: 12px;
  }

  .view-buttons button {
    flex: 1;
    padding: 7px 6px;
    font-size: 10px;
  }

  main { height: calc(100% - 106px); }

  .map-intro {
    top: 12px;
    left: 12px;
    width: calc(100vw - 24px);
    padding: 17px;
  }

  .map-intro h1 { font-size: 23px; }

  .status-card { display: none; }
  .disclaimer { right: 6px; bottom: 5px; font-size: 8px; }
}
