:root {
  --bg:#0e1117;
  --fg:#e6edf3;
  --muted:#8b949e;
  --accent:#2ea043;
  --card:#161b22;
}

* {
  box-sizing: border-box;
}

html, body {
  height:100%;
  overflow:hidden;
}

body {
  margin:0;
  font:14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--fg);
  background:var(--bg);
}

header {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  background:#0b0f14;
  border-bottom:1px solid #1f2630;
}

header h1 {
  font-size:16px;
  margin:0;
  font-weight:600;
}

.controls {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

input[type="number"] {
  width:90px;
  padding:6px 8px;
  border-radius:8px;
  border:1px solid #30363d;
  background:var(--card);
  color:var(--fg);
}

button {
  padding:8px 12px;
  border:0;
  border-radius:8px;
  background:var(--accent);
  color:white;
  font-weight:600;
  cursor:pointer;
}

button:disabled {
  opacity:.6;
  cursor:not-allowed;
}

main {
  display:grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - 52px);
}

aside {
  border-right:1px solid #1f2630;
  background:#0b0f14;
  overflow:auto;
}

.panel {
  padding:12px 12px 8px;
  border-bottom:1px solid #1f2630;
}

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

#map {
  width:100%;
  height:100%;
}

.badge {
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:#1f6feb;
  color:#fff;
  font-size:12px;
  font-weight:600;
}

.clusterCard {
  padding:12px;
  border-bottom:1px solid #1f2630;
}

.row {
  display:flex;
  justify-content:space-between;
  margin:6px 0;
  color:#c9d1d9;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.legend {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}

.swatch {
  width:12px;
  height:12px;
  border-radius:3px;
  display:inline-block;
  margin-right:6px;
  border:1px solid #0004;
}

/* Impact card (distance & carbon), table-like but styled as cards */
#impact {
  margin-top:6px;
}

.impactRow {
  margin-bottom:10px;
}

.impactLabel {
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  margin-bottom:4px;
}

.impactColumns {
  display:flex;
  gap:8px;
}

.impactCol {
  flex:1;
  background:var(--card);
  border-radius:10px;
  padding:8px 10px;
  border:1px solid #1f2630;
}

.impactColTitle {
  font-size:11px;
  color:var(--muted);
  margin-bottom:2px;
}

.impactColValue {
  font-size:14px;
}

.impactPositive {
  color:#3fb950;
  font-weight:700;
}

.impactNegative {
  color:#f85149;
  font-weight:700;
}