:root { --header-h: 64px; }

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

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
}

header h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .2px;
}

#map {
  position: absolute;
  inset: var(--header-h) 0 0 0; /* occupy space below header */
}

.legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(255,255,255,.9);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

.info-panel {
  position: absolute;
  z-index: 3;
  width: min(420px, 90vw);
  background: rgba(255,255,255,.95);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  padding: 14px 16px;
  color: #0f172a; /* slate-900 */
}

.info-panel.top-left { top: calc(var(--header-h) + 10px); left: 12px; }
.info-panel.top-right { top: calc(var(--header-h) + 10px); right: 12px; }

.info-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 6px;
}

.info-subtitle {
  font-size: 14px;
  color: #475569; /* slate-600 */
  margin-bottom: 12px;
}

.legend-wrap { margin: 8px 0 6px; }

.legend-bar {
  display: flex;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

.legend-bar > span {
  flex: 1;
}

.legend-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #334155; /* slate-700 */
  margin-top: 6px;
}

.info-source {
  font-size: 12px;
  margin-top: 10px;
}
.info-source a {
  color: #2563eb; /* blue-600 */
  text-decoration: underline;
}