:root {
  --canvas: #ece6db;
  --canvas-deep: #e2dacd;
  --paper: rgba(249, 244, 236, 0.96);
  --paper-strong: rgba(255, 251, 245, 0.98);
  --ink: #172126;
  --muted: #5d685f;
  --evergreen: #0f5f56;
  --evergreen-deep: #0a3f39;
  --evergreen-soft: rgba(15, 95, 86, 0.1);
  --copper: #c5643c;
  --navy: #2f557a;
  --gold: #a47e40;
  --hotspot: #9e342d;
  --border: rgba(73, 83, 78, 0.14);
  --line: rgba(72, 88, 97, 0.14);
  --shadow: 0 20px 50px rgba(36, 43, 48, 0.1);
  --shadow-soft: 0 12px 28px rgba(36, 43, 48, 0.07);
  --mono: "IBM Plex Mono", monospace;
  --sans: "Archivo", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 95, 86, 0.18) 0%, transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(197, 100, 60, 0.14) 0%, transparent 24%),
    linear-gradient(180deg, #f3ede1 0%, #e8e1d5 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      transparent 1px,
      transparent 30px
    );
  opacity: 0.18;
}

body::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 16%, transparent 84%, rgba(255, 255, 255, 0.2));
  opacity: 0.45;
}

body.system-halted {
  overflow: hidden;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.25rem;
  display: grid;
  gap: 1.15rem;
}

.hero,
.panel,
.metric-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1.45rem 1.55rem;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 251, 245, 0.96) 0%, rgba(242, 248, 245, 0.9) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -22% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 95, 86, 0.12) 0%, rgba(15, 95, 86, 0) 70%);
}

.hero-copy,
.hero-sign {
  position: relative;
  z-index: 1;
}

.eyebrow,
.meta,
label,
.status,
.map-tooltip-label {
  font-family: var(--mono);
}

.eyebrow {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2.25rem, 4vw, 3.45rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 9.5ch;
}

.subtitle {
  margin: 0.8rem 0 0;
  max-width: 42rem;
  color: #41515a;
  line-height: 1.45;
  font-size: 1rem;
}

.hero-badges {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #30454b;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.hero-sign {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-sign road-sign-display {
  width: min(100%, 520px);
}

.panel {
  background: var(--paper);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 1.05rem;
}

.controls {
  display: grid;
  gap: 0.9rem;
  background:
    linear-gradient(180deg, rgba(252, 248, 241, 0.96) 0%, rgba(247, 242, 233, 0.94) 100%);
}

.controls-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.72fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.control-group {
  display: grid;
  gap: 0.36rem;
}

.control-group-wide {
  min-width: 0;
}

label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.control-note {
  margin: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.7rem 0.78rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 95, 86, 0.1);
  background: rgba(255, 255, 255, 0.75);
  color: #365058;
  line-height: 1.4;
}

input,
select,
button {
  border-radius: 14px;
  min-height: 46px;
  padding: 0.68rem 0.8rem;
  font: inherit;
}

input,
select {
  border: 1px solid rgba(100, 111, 116, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

button {
  cursor: pointer;
  border: 1px solid rgba(10, 63, 57, 0.18);
  background:
    linear-gradient(180deg, var(--evergreen) 0%, var(--evergreen-deep) 100%);
  color: #f7f4ed;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(10, 63, 57, 0.18);
  filter: saturate(1.04);
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.button-row {
  display: flex;
  gap: 0.5rem;
}

.status {
  margin: 0;
  padding: 0.78rem 0.9rem;
  border-top: 1px solid rgba(74, 87, 93, 0.12);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  color: #44545d;
  font-size: 0.74rem;
  line-height: 1.45;
}

.quality-list {
  margin: 0;
  padding: 0.2rem 0 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.quality-list.hidden {
  display: none;
}

.quality-list li {
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: #385158;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.visitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 1rem;
}

.story-card,
.pulse-card {
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98) 0%, rgba(242, 247, 244, 0.94) 100%);
}

.story-card {
  display: grid;
  gap: 0.9rem;
}

.story-copy {
  display: grid;
  gap: 0.45rem;
}

.story-eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-headline {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 16ch;
}

.story-narrative {
  margin: 0;
  max-width: 50rem;
  color: #42545b;
  line-height: 1.55;
  font-size: 0.96rem;
}

.story-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.story-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 95, 86, 0.12);
  color: #31454b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.story-chip strong {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-chip span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.story-moments {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.story-moments li {
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 95, 86, 0.1);
  background: rgba(255, 255, 255, 0.62);
  color: #405159;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.pulse-card canvas {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.pulse-zone-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.pulse-empty {
  margin: 0;
  color: #56655f;
  line-height: 1.45;
}

.pulse-zone-card {
  padding: 0.74rem 0.82rem;
  border-radius: 17px;
  border: 1px solid rgba(15, 95, 86, 0.11);
  background: rgba(255, 255, 255, 0.64);
}

.pulse-zone-card-lead {
  background:
    linear-gradient(135deg, rgba(15, 95, 86, 0.12) 0%, rgba(255, 255, 255, 0.68) 72%);
}

.pulse-zone-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.pulse-zone-head p,
.pulse-zone-head strong,
.pulse-zone-line,
.pulse-zone-copy {
  margin: 0;
}

.pulse-zone-head p {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pulse-zone-head strong {
  font-size: 0.86rem;
  color: var(--evergreen-deep);
}

.pulse-zone-line {
  margin-top: 0.28rem;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.pulse-zone-copy {
  margin-top: 0.26rem;
  color: #55655e;
  font-size: 0.78rem;
  line-height: 1.45;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 0.95rem 1rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98) 0%, rgba(245, 240, 231, 0.92) 100%);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--card-accent, var(--evergreen));
}

.metric-card:nth-child(1) { --card-accent: var(--evergreen); }
.metric-card:nth-child(2) { --card-accent: var(--copper); }
.metric-card:nth-child(3) { --card-accent: var(--gold); }
.metric-card:nth-child(4) { --card-accent: var(--navy); }
.metric-card:nth-child(5) { --card-accent: var(--hotspot); }
.metric-card:nth-child(6) { --card-accent: #5a6e3b; }

.metric-card h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  margin: 0.6rem 0 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--ink);
}

.metric-meta {
  margin: 0.58rem 0 0;
  min-height: 2.5rem;
  color: #51615f;
  font-size: 0.78rem;
  line-height: 1.4;
}

.metric-small {
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.spatial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.92fr);
  gap: 1rem;
}

.side-stack {
  display: grid;
  gap: 1rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.card-head h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.meta {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-card {
  position: relative;
  padding: 1.05rem;
  background:
    linear-gradient(180deg, rgba(249, 244, 236, 0.98) 0%, rgba(242, 246, 244, 0.94) 100%);
}

#corridorMap {
  width: 100%;
  height: auto;
  min-height: 340px;
  display: block;
  border-radius: 20px;
  border: 1px solid rgba(15, 95, 86, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(244, 249, 246, 0.92) 100%);
}

.map-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 220px;
  max-width: min(320px, calc(100% - 2rem));
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background: rgba(255, 251, 245, 0.99);
  box-shadow: 0 18px 34px rgba(28, 39, 48, 0.18);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
}

.map-tooltip.hidden {
  display: none;
}

.map-tooltip-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.map-tooltip-subtitle {
  margin: 0.24rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.map-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem 0.72rem;
  margin-top: 0.76rem;
}

.map-tooltip-item {
  min-width: 0;
}

.map-tooltip-label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-tooltip-value {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}

.legend {
  margin: 0.82rem 0 0;
  color: #56655f;
  font-size: 0.84rem;
  line-height: 1.45;
}

.speed-limit-context {
  margin-top: 0.85rem;
  padding: 0.82rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(244, 248, 245, 0.72) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.speed-limit-context.hidden {
  display: none;
}

.speed-limit-context-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.speed-limit-context-head strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.98rem;
}

.speed-limit-context-head span {
  flex: 0 0 auto;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 95, 86, 0.1);
  color: var(--evergreen-deep);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.speed-limit-eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.speed-limit-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.speed-limit-metrics div {
  padding: 0.55rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 95, 86, 0.1);
  background: rgba(255, 255, 255, 0.58);
}

.speed-limit-metrics dt {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.speed-limit-metrics dd {
  margin: 0.18rem 0 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
}

.speed-limit-context p {
  margin: 0.68rem 0 0;
  color: #51615f;
  font-size: 0.78rem;
  line-height: 1.45;
}

.speed-limit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.72rem;
}

.speed-limit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #32464d;
  font-size: 0.72rem;
  font-weight: 650;
}

.speed-limit-chip i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.25rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(15, 95, 86, 0.12);
  color: var(--evergreen-deep);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(15, 95, 86, 0.1);
}

.mile-marker-crossbar {
  stroke: #172126;
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: 0.9;
}

.mile-marker-crossbar-end {
  stroke-width: 4;
}

.mile-marker-label {
  fill: #172126;
  paint-order: stroke;
  stroke: rgba(255, 251, 245, 0.92);
  stroke-width: 5px;
  stroke-linejoin: round;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mile-marker-label-end {
  font-size: 15px;
}

.speed-section-leader {
  stroke: #172126;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.speed-section-label {
  fill: #172126;
  paint-order: stroke;
  stroke: rgba(255, 251, 245, 0.92);
  stroke-width: 5px;
  stroke-linejoin: round;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.incident-legend {
  margin-top: 0.78rem;
  border: 1px solid rgba(15, 95, 86, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}

.incident-legend summary {
  cursor: pointer;
  padding: 0.72rem 0.85rem;
  color: #33464e;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.incident-legend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0 0.85rem 0.85rem;
}

.incident-legend-item {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 95, 86, 0.08);
  color: #2f4349;
}

.incident-legend-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(15, 95, 86, 0.15);
  color: var(--evergreen-deep);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.incident-legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 650;
}

.summary-card,
.hotspot-card,
.chart-card,
.anomalies,
.references {
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98) 0%, rgba(245, 240, 231, 0.92) 100%);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
}

.summary-stats div {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 95, 86, 0.12);
  border-radius: 16px;
  padding: 0.78rem 0.8rem;
}

.summary-stats dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-stats dd {
  margin: 0.34rem 0 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.zone-pager {
  min-height: 280px;
}

.zone-empty {
  margin: 0;
  color: #56655f;
  line-height: 1.45;
}

.zone-page {
  display: grid;
  gap: 0.8rem;
  animation: zoneFade 260ms ease-out;
}

.zone-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background:
    linear-gradient(135deg, rgba(15, 95, 86, 0.1) 0%, rgba(255, 255, 255, 0.66) 70%);
}

.zone-page-head strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
}

.zone-kicker {
  margin: 0;
  color: var(--evergreen-deep);
  font-size: clamp(1.12rem, 1.65vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.zone-stats {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.zone-stats div {
  padding: 0.68rem 0.72rem;
  border-radius: 15px;
  border: 1px solid rgba(15, 95, 86, 0.1);
  background: rgba(255, 255, 255, 0.6);
}

.zone-stats dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zone-stats dd {
  margin: 0.22rem 0 0;
  color: #263940;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.zone-history-card dd {
  display: grid;
  gap: 0.4rem;
}

.zone-history-card canvas {
  width: 100%;
  height: auto;
  min-height: 86px;
  border-radius: 12px;
  border: 1px solid rgba(15, 95, 86, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.zone-history-card span {
  color: #56655f;
  font-size: 0.74rem;
  font-weight: 650;
}

.zone-note {
  margin: 0;
  padding: 0.62rem 0.72rem;
  border-left: 3px solid rgba(15, 95, 86, 0.42);
  color: #495b60;
  font-size: 0.82rem;
  line-height: 1.42;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 0 14px 14px 0;
}

.zone-dots {
  display: flex;
  gap: 0.34rem;
  justify-content: center;
  padding-top: 0.1rem;
}

.zone-dots span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(15, 95, 86, 0.18);
}

.zone-dots span.active {
  width: 1.2rem;
  border-radius: 999px;
  background: var(--evergreen);
}

@keyframes zoneFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card canvas {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 95, 86, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #21313d;
}

.detail-list li {
  position: relative;
  margin: 0;
  padding: 0.65rem 0 0.65rem 1rem;
  line-height: 1.42;
  border-top: 1px solid rgba(85, 98, 94, 0.1);
}

.detail-list li:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 0.12rem;
  top: 1rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--evergreen);
}

.map-annotation {
  font-size: 12px;
  fill: #3f514c;
  font-weight: 700;
  font-family: var(--mono);
}

.map-placeholder {
  font-size: 18px;
  fill: #65727d;
  font-family: var(--mono);
}

.system-warning {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 24, 28, 0.58);
}

.system-warning.hidden {
  display: none;
}

.system-warning-card {
  width: min(100%, 640px);
  padding: 1.25rem 1.3rem;
  border-radius: 26px;
  border: 1px solid rgba(145, 40, 40, 0.18);
  background: rgba(255, 249, 245, 0.98);
  box-shadow: 0 28px 60px rgba(38, 25, 25, 0.22);
}

.system-warning-eyebrow {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #922929;
  font-family: var(--mono);
}

.system-warning-card h2 {
  margin: 0.42rem 0 0;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.system-warning-message,
.system-warning-meta {
  margin: 0.72rem 0 0;
  line-height: 1.45;
}

.system-warning-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1220px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .visitor-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spatial-grid,
  .notes-grid,
  .charts {
    grid-template-columns: 1fr;
  }

  .chart-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .controls-main,
  .spatial-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .button-row button {
    width: 100%;
  }

  .speed-limit-context-head,
  .speed-limit-metrics {
    grid-template-columns: 1fr;
  }

  .speed-limit-context-head {
    display: grid;
  }

  .speed-limit-context-head span {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .page {
    padding: 1rem 1rem 1.6rem;
  }

  .hero,
  .panel,
  .metric-card {
    border-radius: 20px;
  }

  .hero {
    padding: 1.15rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .story-headline {
    font-size: 1.55rem;
  }

  .metrics,
  .summary-stats,
  .map-tooltip-grid {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: 1.45rem;
  }

  .metric-small {
    font-size: 1rem;
  }

  .map-tooltip {
    max-width: calc(100% - 1.25rem);
    transform: translate(-50%, calc(-100% - 10px));
  }

  .incident-legend-grid {
    grid-template-columns: 1fr;
  }
}
