:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f3;
  color: #1f2528;
}

* {
  box-sizing: border-box;
}

html,
body,
.shell,
.map-stage,
#map {
  min-height: 100%;
}

html,
body {
  height: 100%;
  margin: 0;
}

button {
  font: inherit;
}

.shell {
  width: 100%;
}

.map-stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

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

.panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(28 38 42 / 16%);
  border-radius: 8px;
  background: rgb(255 255 252 / 94%);
  box-shadow: 0 16px 48px rgb(28 38 42 / 18%);
  backdrop-filter: blur(10px);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #596166;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.15;
}

.count {
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1f2528;
  color: white;
  font-size: 1.05rem;
  font-weight: 750;
  text-align: center;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
  color: #535d61;
  font-size: 0.82rem;
}

.stats span {
  padding: 5px 8px;
  border: 1px solid rgb(28 38 42 / 12%);
  border-radius: 999px;
  background: rgb(255 255 255 / 68%);
}

.incident-list {
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  border-top: 1px solid rgb(28 38 42 / 12%);
  list-style: none;
}

.incident {
  border-bottom: 1px solid rgb(28 38 42 / 10%);
}

.incident button {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 12px;
  align-items: center;
  border: 0;
  padding: 10px 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.incident button::before {
  content: "";
  width: 10px;
  height: 52px;
  border-radius: 999px;
  background: #8b5d1f;
}

.incident.weather button::before {
  background: #bd3b2f;
}

.incident.volume button::before {
  background: #2c6f8e;
}

.incident button:hover,
.incident button:focus-visible {
  background: rgb(44 111 142 / 10%);
  outline: none;
}

.incident-name,
.incident-meta,
.incident-scope {
  min-width: 0;
  display: block;
  grid-column: 2;
}

.incident-name {
  font-size: 0.95rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.incident-meta {
  margin-top: 3px;
  color: #586266;
  font-size: 0.78rem;
}

.incident-scope {
  margin-top: 4px;
  color: #475156;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 18px;
}

.empty-state .incident-name,
.empty-state .incident-meta {
  grid-column: auto;
}

.mapboxgl-popup-content {
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgb(28 38 42 / 20%);
}

.mapboxgl-popup-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.mapboxgl-popup-content dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin: 0 0 10px;
}

.mapboxgl-popup-content dt {
  color: #596166;
}

.mapboxgl-popup-content dd {
  margin: 0;
  font-weight: 650;
}

.mapboxgl-popup-content a {
  color: #255f7a;
  font-weight: 700;
}

.stop-marker {
  min-width: 42px;
  height: 28px;
  border: 2px solid white;
  border-radius: 999px;
  background: #8b5d1f;
  color: white;
  box-shadow: 0 8px 20px rgb(28 38 42 / 28%);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.stop-marker.weather {
  background: #bd3b2f;
}

.stop-marker.volume {
  background: #2c6f8e;
}

@media (max-width: 720px) {
  .panel {
    top: auto;
    bottom: 12px;
    left: 12px;
    width: calc(100vw - 24px);
    max-height: 42vh;
  }

  .panel-header {
    padding: 14px 14px 8px;
  }

  h1 {
    font-size: 1.12rem;
  }

  .stats {
    padding: 0 14px 10px;
  }

  .incident button {
    min-height: 68px;
    padding: 9px 12px;
  }
}
