:root {
  --bg: #f6f5f2; --panel: #ffffff; --ink: #1d1d1f; --muted: #5f6368; --line: #e3e1dc;
  --hot: #d73027; --cool: #4575b4; --accent: #a50026;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.top h1 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.repo { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.banner { padding: 8px 16px; background: #fff3cd; border-bottom: 1px solid #e6c65c; font-weight: 600; }
.banner.synthetic { background: #ffd6d6; border-color: #d73027; }
.layout { flex: 1; display: grid; grid-template-columns: 1fr 400px; min-height: 0; }
.map-wrap { position: relative; min-height: 420px; }
#map { position: absolute; inset: 0; background: #dfe6ea; }
.map-controls { position: absolute; top: 10px; right: 10px; z-index: 500; background: rgba(255,255,255,.95); border-radius: 8px; padding: 8px 10px; box-shadow: 0 1px 4px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.map-controls .op input { width: 110px; vertical-align: middle; }
.panel { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px 24px; }
.panel h2 { font-size: 14px; margin: 18px 0 4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.note { color: var(--muted); font-size: 12.5px; margin: 4px 0 6px; }
.credits { margin-top: 14px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 11.5px; color: var(--muted); }
.kpi.main { grid-column: span 2; background: linear-gradient(90deg, #fff 0%, #fdeee9 100%); border-color: #f2c0b4; }
.kpi.main .v { color: var(--hot); font-size: 28px; }
.chart { position: relative; height: 210px; }
.chart.tall { height: 430px; }
.legend { background: rgba(255,255,255,.95); padding: 6px 8px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.2); font-size: 12px; }
.legend .bar { width: 180px; height: 10px; border-radius: 2px; margin: 4px 0 2px; }
.legend .ticks { display: flex; justify-content: space-between; }
.legend .sw { display: inline-block; width: 10px; height: 10px; background: #ff00ff; vertical-align: middle; margin-right: 4px; }
.empty { padding: 24px; color: var(--muted); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 2px; }
.seg button { flex: 1; border: 0; background: #fff; padding: 5px 8px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.epoch-title { font-weight: 700; margin: 0 0 8px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
th, td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; }
.model { font-size: 12.5px; background: #faf9f6; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.model b { font-variant-numeric: tabular-nums; }
.legend .row { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.legend .row i { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .map-wrap { height: 60vh; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .top h1 { font-size: 17px; }
}
