:root {
  --bg: #0c1210;
  --raise: #16211c;
  --line: #2c4036;
  --text: #e8f3ec;
  --muted: #9eb3a6;
  --amber: #ffb020;
  --coral: #ff5d3a;
  --teal: #3ee0a2;
  --sky: #8ecbff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.45;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(12, 18, 16, 0.94);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
}
.brand { font-weight: 700; white-space: nowrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; }
.tabs a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.tabs a.active { background: var(--amber); color: #1a1206; font-weight: 700; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 56px; }
.banner {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #3a2416 0%, #17241e 58%);
  border: 1px solid #6a4324;
}
.banner h1 { margin: 0; font-size: 1.55rem; line-height: 1.28; font-weight: 700; }
.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.kpi {
  background: var(--raise);
  border: 1px solid var(--line);
  border-top: 3px solid var(--tone, var(--amber));
  border-radius: 14px;
  padding: 12px 12px 14px;
  min-width: 0;
}
.kpi .value {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
}
.kpi .value-long {
  font-size: 1.12rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.kpi .label { color: var(--muted); font-size: 0.86rem; margin-top: 6px; }
.kpi .detail { margin: 8px 0 0; font-size: 0.92rem; }
.chart-card, .map-card {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 10px;
  margin-top: 12px;
}
.chart-card h2, .meaning h2 { font-size: 1.08rem; line-height: 1.3; margin: 0 0 10px; }
.chart-card svg { width: 100%; height: auto; display: block; overflow: visible; }
.map-frame { width: 100%; }
.map-frame svg { width: 100%; height: auto; display: block; background: #101816; border-radius: 12px; }
.map-frame path.region { stroke: #0c1210; stroke-width: 0.6; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.pills button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}
.pills button[aria-pressed="true"] { background: var(--amber); color: #1a1206; border-color: var(--amber); }
.legend-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 8px;
  flex-wrap: wrap;
}
.legend-panel[hidden],
.chart-panel[hidden] {
  display: none !important;
}
.ramp { display: inline-flex; gap: 3px; }
.ramp i { width: 22px; height: 12px; display: inline-block; border-radius: 2px; }
.note { color: var(--muted); font-size: 0.9rem; }
.lede { margin: 14px 0 0; }
.meaning {
  margin-top: 14px;
  padding: 14px 16px;
  background: #12241c;
  border-left: 3px solid var(--teal);
  border-radius: 0 12px 12px 0;
}
.meaning p { margin: 0; }
.exact { margin-top: 14px; }
.exact summary { cursor: pointer; color: var(--sky); }
.exact table, .heat {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.exact th, .exact td, .heat th, .heat td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.heat-wrap { overflow-x: auto; }
.heat td { text-align: center; color: #f7fbff; font-weight: 650; min-width: 46px; }
.heat th { color: var(--text); white-space: nowrap; }
.heat-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 0.82rem; }
.heat-key { display: inline-flex; align-items: center; gap: 5px; }
.heat-key i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.sources { margin-top: 28px; color: var(--muted); font-size: 0.86rem; }
.sources a { color: var(--sky); }
.sources ul { padding-left: 18px; }
.clock { color: var(--text); }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banner h1 { font-size: 1.35rem; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 1.35rem; }
  .kpi .value-long { font-size: 1.12rem; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .wrap { padding: 0 12px 40px; }
}
