/* ── Variables ────────────────────────────────────────────────────────── */
:root {
  --blue:    #2563eb;
  --green:   #16a34a;
  --amber:   #d97706;
  --red:     #dc2626;
  --grey:    #9ca3af;
  --surface: #f8fafc;
  --border:  #e2e8f0;
}

body { background: var(--surface); }

/* ── Stat cards ───────────────────────────────────────────────────────── */
.stat-card { border: 1px solid var(--border); border-radius: 10px; }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #64748b; font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-unit  { font-size: 1rem; font-weight: 400; color: #64748b; }

/* ── Health badges ────────────────────────────────────────────────────── */
.health-badge {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
}

.health-big-badge {
  border: 2px solid; border-radius: 10px; padding: .6rem 1rem;
  text-align: center; min-width: 90px;
}
.health-big-score { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.health-big-label { font-weight: 700; font-size: .9rem; }
.health-big-sub   { font-size: .7rem; color: #64748b; }

/* ── Map ──────────────────────────────────────────────────────────────── */
#map { z-index: 0; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }

/* ── Responsive chart containers ─────────────────────────────────────── */
.chart-wrap { position: relative; }

/* ── Navbar tweaks ────────────────────────────────────────────────────── */
.navbar { box-shadow: 0 1px 4px rgba(0,0,0,.15); }

/* ── Map legend pill ─────────────────────────────────────────────────── */
.legend-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.legend-dot  { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ── Leaflet popup chart ─────────────────────────────────────────────── */
.leaflet-popup-content { min-width: 280px; padding: 0 !important; }
.popup-header { padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
.popup-chart  { height: 180px; }
.popup-footer { padding: .5rem .8rem; font-size: .8rem; color: #64748b; }

/* ── Utility ──────────────────────────────────────────────────────────── */
.font-monospace { font-family: 'SFMono-Regular', Consolas, monospace; }
.card-header { font-size: .9rem; }
