/* Night-time Lights Ghana.
   Look: the AfDB-DI4A night-lights dashboard (dark "night" theme by default, gradient masthead, gold accents,
   light/dark toggle), with GSS branding: Century Gothic, blue #2E5CB8 key-message boxes, captions above charts,
   notes below, charts without embedded titles. */
:root {
  color-scheme: light;
  --font: "Century Gothic", "URW Gothic", "Avant Garde", "Questrial", "Segoe UI", system-ui, sans-serif;
  --page: #f9f9f7; --surface: #ffffff; --surface-2: #f2f1ed; --card-grad: var(--surface);
  --ink: #0b0b0b; --ink-2: #52514e; --ink-3: #7a7974;
  --rule: rgba(11, 11, 11, .10); --input-bd: #cfcec9; --th: #f6f6f4;
  --accent: #2E5CB8; --gold: #F5C242;
  --msg: #2E5CB8; --caption: #1F3A6E; --link: #2E5CB8; --tint: #eef3fb;
  --banner-bg: #fff8e6; --banner-bd: #f2d48a; --banner-ink: #5b4300;
  --err-bg: #fdecec; --err-bd: #efb1b1; --err-ink: #6b1414;
  --map-bg: #f4f6f9;
  --radius: 12px; --gutter: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #060a12; --surface: #0d141f; --surface-2: #131c2a; --card-grad: linear-gradient(180deg, #0f1724 0%, #0d141f 100%);
  --ink: #edf1f6; --ink-2: #b4bfcc; --ink-3: #8b97a7;
  --rule: rgba(160, 190, 230, .13); --input-bd: #34445a; --th: #111a27;
  --accent: #F5C242;
  --msg: #2E5CB8; --caption: #9ec0f5; --link: #8cb8f7; --tint: #131c2a;
  --banner-bg: #2a2210; --banner-bd: #5b4a1b; --banner-ink: #f8e3a6;
  --err-bg: #3a1414; --err-bd: #6b2a2a; --err-ink: #f6c9c9;
  --map-bg: #060a12;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--page); font-size: 15px; line-height: 1.55; overflow-x: hidden; }
.wrap { max-width: none; margin: 0; padding: 0 clamp(16px, 2.5vw, 40px); }   /* full page width */
a { color: var(--link); }
h1 { font-size: 1.55rem; margin: 1.4rem 0 .6rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--ink); padding: 8px; z-index: 2000; }
.skip:focus { left: 8px; }

/* ---------- masthead (night gradient in both themes, as in the AfDB template) ---------- */
.masthead { background: linear-gradient(120deg, #030915 0%, #0c1f45 50%, #1F3A6E 100%); color: #f4f1e8; border-bottom: 3px solid var(--gold); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: nowrap; }
.masthead .brand { flex: 1 1 auto; }
.masthead-right { flex: none; }
.cite-list li { margin: 8px 0; color: var(--ink-2); }
/* GSS brand lockup, as on Ghana in Numbers (ghin.statsghana.gov.gh): logo on a white disc, product name, "Ghana Statistical Service" */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; border-radius: 10px; }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.brand-logo { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 3px; display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.3); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.site-title { font-weight: 700; font-size: 1.12rem; color: #fff; letter-spacing: -.005em; }
.site-sub { font-size: .8rem; color: rgba(255, 255, 255, .75); margin-top: 2px; }
.masthead-right { display: flex; align-items: center; gap: 14px; }
.masthead-note { color: #c7d2e3; font-size: .85rem; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25);
  background: transparent; color: #f4f1e8; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.10); }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }

.tabbar { position: sticky; top: 0; z-index: 1000; background: var(--surface); border-bottom: 1px solid var(--rule); }
:root[data-theme="dark"] .tabbar { background: rgba(9, 14, 22, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 12px 10px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; font-size: .92rem; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }

/* ---------- generic ---------- */
main { padding-bottom: 48px; min-height: 60vh; }
.loading { padding: 40px 0; color: var(--ink-2); }
.banner { border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.banner-info { background: var(--banner-bg); border: 1px solid var(--banner-bd); color: var(--banner-ink); }
.banner-error { background: var(--err-bg); border: 1px solid var(--err-bd); color: var(--err-ink); }
.intro { max-width: 820px; }
.intro p, .lede { color: var(--ink-2); max-width: 860px; }
.panel { background: var(--card-grad); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 16px; margin-top: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.note { font-size: .8rem; font-style: italic; color: var(--ink-2); margin: 6px 0 0; }
.muted { color: var(--ink-2); }
.ctl-label { display: block; font-size: .8rem; font-weight: 700; margin: 12px 0 4px; }
select, input[type="search"], input[list], input[type="text"] {
  font: inherit; font-size: .92rem; width: 100%; padding: 8px 10px; border: 1px solid var(--input-bd); border-radius: 8px; background: var(--surface-2); color: var(--ink);
}
select:focus, input:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { display: inline-block; font: inherit; font-size: .85rem; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--link); color: var(--link); background: transparent; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--tint); }

/* ---------- hero (overview) ---------- */
.hero { margin: 20px 0 8px; border-radius: var(--radius); padding: 26px 26px 22px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 160% at 100% 0%, #2E5CB8 0%, #1F3A6E 38%, #071328 100%); border-bottom: 4px solid var(--gold); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9; background:
  radial-gradient(circle at 88% 22%, #ffde80 0 2px, transparent 3px), radial-gradient(circle at 80% 40%, #ffde80cc 0 1.5px, transparent 2.6px),
  radial-gradient(circle at 93% 55%, #ffde80aa 0 1.3px, transparent 2.4px), radial-gradient(circle at 72% 18%, #ffde8088 0 1px, transparent 2px),
  radial-gradient(circle at 85% 70%, #ffde80bb 0 1.6px, transparent 2.8px), radial-gradient(circle at 66% 33%, #ffde8077 0 1px, transparent 2.2px),
  radial-gradient(circle at 96% 80%, #ffde8099 0 1.2px, transparent 2.4px), radial-gradient(circle at 76% 62%, #ffde8066 0 1px, transparent 2.1px); }
.hero h1 { margin: 0 0 8px; color: #fff; max-width: 760px; position: relative; z-index: 1; }
.hero p { margin: 0; color: #dbe4f3; max-width: 760px; position: relative; z-index: 1; }
.hero { min-height: 0; }
.hero-cta { margin-top: 16px !important; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 700; }
.btn-gold:hover { background: #ffd666; }

/* ---------- map view switch (segmented control) ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--rule); margin: 0 0 12px; }
.seg button { font: inherit; font-size: .88rem; padding: 7px 14px; border-radius: 7px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.18), inset 0 -2px 0 var(--accent); }
.year-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.year-big { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-left: 6px; font-variant-numeric: tabular-nums; }
.btn.small { padding: 4px 10px; font-size: .8rem; margin-bottom: 4px; }
input[type="range"] { width: 100%; accent-color: var(--gold); margin: 6px 0 2px; }
.cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; font-size: .8rem; font-weight: 700; }
.cmp-row select { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin: 12px 0 4px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.ramp { height: 14px; border-radius: 4px; border: 1px solid var(--rule); }
.ramp-ticks { position: relative; height: 18px; font-size: .72rem; color: var(--ink-2); margin-top: 3px; }
.ramp-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ramp-ticks span:first-child { transform: none; }
.ramp-ticks span:last-child { transform: translateX(-100%); }
.map-wrap { display: grid; grid-template-columns: 1fr; gap: 8px; }
.map-wrap.split { grid-template-columns: 1fr 1fr; }
.map.night, .mini-map.night { background: #15171a; }
.map-badge { background: rgba(6, 10, 18, .78); color: #fff; font-weight: 700; font-size: 1.05rem; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(245, 194, 66, .5); font-family: var(--font); }
@media (max-width: 700px) { .map-wrap.split { grid-template-columns: 1fr; } .map-wrap.split .map { height: 360px; } }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin: 16px 0 8px; }
.kpi { background: var(--card-grad); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k-label { font-size: .8rem; color: var(--ink-2); }
.kpi .k-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .kpi .k-value { color: #fff; }
.kpi .k-sub { font-size: .8rem; color: var(--ink-2); }
.kpi .k-tag { display: inline-block; font-size: .7rem; padding: 1px 6px; border-radius: 999px; background: var(--banner-bg); border: 1px solid var(--banner-bd); color: var(--banner-ink); margin-left: 4px; }

/* ---------- report cards (overview) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 16px; }
.card { background: var(--card-grad); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.card h2 { margin-top: 0; font-size: 1.05rem; }
.card ul { padding-left: 18px; margin: 4px 0 14px; color: var(--ink-2); }
.card li { margin: 4px 0; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- figures (GSS: blue key message box, caption, chart, note) ---------- */
.figure { margin: 28px 0; }
.figrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.msg { background: var(--msg); color: #fff; font-weight: 700; padding: 12px 16px; border-radius: 6px; margin-bottom: 10px; }
.caption { color: var(--caption); font-weight: 700; font-variant: small-caps; font-size: 1rem; margin: 8px 0 6px; letter-spacing: .01em; }
.panel-label { font-size: .85rem; color: var(--ink-2); margin: 0 0 4px; }
.chart { width: 100%; height: 360px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.chart.tall { height: 520px; }
.chart.short { height: 280px; }
.fig-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; font-size: .85rem; }
.fig-tools select { width: auto; min-width: 220px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.data th { background: var(--th); font-weight: 700; position: sticky; top: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
details.more { margin: 12px 0; }
details.more summary { cursor: pointer; color: var(--link); font-weight: 700; padding: 6px 0; }

/* ---------- map ---------- */
.map-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.map-controls { position: sticky; top: 64px; }
.map { height: max(560px, calc(100vh - 230px)); border-radius: var(--radius); border: 1px solid var(--rule); background: var(--map-bg); }
.leaflet-container { font-family: var(--font); background: var(--map-bg); }
:root[data-theme="dark"] .leaflet-bar a { background: var(--surface-2); color: var(--ink); border-color: var(--rule); }
.ind-desc { font-size: .82rem; color: var(--ink-2); margin: 6px 0 4px; }
.legend { margin: 10px 0 4px; font-size: .82rem; }
.legend .row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.legend .sw { width: 22px; height: 14px; border-radius: 3px; flex: none; border: 1px solid var(--rule); }
.legend .ttl { font-weight: 700; margin-bottom: 4px; }
.selected { margin-top: 14px; font-size: .86rem; }
.selected .s-name { font-weight: 700; font-size: 1rem; }
.selected .s-val { font-size: 1.3rem; font-weight: 700; margin: 2px 0; }
.rank-list { margin: 0; padding-left: 26px; font-size: .88rem; }
.rank-list li { padding: 3px 0; border-bottom: 1px solid var(--rule); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .rv { float: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.leaflet-tooltip.dist-tip { font-family: var(--font); font-size: .82rem; border-radius: 6px; border: 1px solid var(--rule); box-shadow: 0 2px 8px #0003; background: var(--surface); color: var(--ink); }
.leaflet-tooltip.dist-tip::before { display: none; }

/* ---------- district profile ---------- */
.district-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.district-head > div { min-width: 280px; flex: 1; max-width: 420px; }
.d-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.d-title h1 { margin-bottom: 0; }
.d-grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.mini-map { height: 340px; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--map-bg); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; border: 1px solid var(--rule); background: var(--surface-2); }

/* ---------- methods ---------- */
.methods h2 { border-top: 1px solid var(--rule); padding-top: 18px; }
.methods ul { padding-left: 20px; }
.methods li { margin: 4px 0; }
.downloads li { margin: 6px 0; }
.downloads code { font-size: .85rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule); padding: 18px 0 28px; color: var(--ink-2); font-size: .8rem; background: var(--surface); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- confidence badges (status colours always with an icon and a text label) ---------- */
.conf { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); white-space: nowrap; vertical-align: 1px; }
.conf .ic { width: 12px; height: 12px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; line-height: 1; color: #fff; }
.conf-high .ic { background: #0ca30c; } .conf-medium .ic { background: #c98500; } .conf-low .ic { background: #d03b3b; }
.conf-why { display: block; font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
.card li { margin: 8px 0; }

/* ---------- downloads under charts and tables ---------- */
.dl-row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dl { white-space: nowrap; }
.dl { font: inherit; font-size: .75rem; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); cursor: pointer; }
.dl:hover { color: var(--ink); border-color: var(--link); }
.dl::before { content: "⤓ "; }

/* ---------- swipe (curtain) comparison ---------- */
.swipe-bar { position: absolute; top: 0; bottom: 0; width: 0; z-index: 650; pointer-events: none; }
.swipe-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: var(--gold); box-shadow: 0 0 10px rgba(245, 194, 66, .6); }
.swipe-handle { position: absolute; top: 50%; left: -18px; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; background: var(--gold);
  color: #1a1405; display: grid; place-items: center; font-weight: 700; font-size: 14px; pointer-events: auto; cursor: ew-resize; box-shadow: 0 2px 8px rgba(0,0,0,.4); touch-action: none; }
.swipe-handle:focus-visible { outline: 3px solid #fff; }
.swipe-tag { position: absolute; top: 12px; z-index: 640; background: rgba(6, 10, 18, .8); color: #fff; font-weight: 700; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(245, 194, 66, .5); pointer-events: none; }
.seg-small button { padding: 5px 12px; }

/* ---------- town names ---------- */
.town-label { color: #f4f1e8; font-size: 11.5px; font-weight: 700; white-space: nowrap; text-shadow: 0 0 3px #000, 0 0 6px #000; pointer-events: none; font-family: var(--font); }
.town-label::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #fff; margin-right: 4px; vertical-align: 1px; box-shadow: 0 0 0 1px #000; }
.map:not(.night) .town-label { color: #0b0b0b; text-shadow: 0 0 3px #fff, 0 0 6px #fff; }
.map:not(.night) .town-label::before { background: #0b0b0b; box-shadow: 0 0 0 1px #fff; }

/* ---------- media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin: 12px 0; }
.media-grid figure { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px; }
.media-grid img { width: 100%; border-radius: 8px; display: block; }
.media-grid figcaption { font-size: .82rem; color: var(--ink-2); margin-top: 6px; }
.figure .anim { width: 100%; background: #060a12; max-width: 820px; display: block; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--rule); }

/* grid and flex children must be allowed to shrink, or a chart/table forces the page wider than the screen */
.kpis > *, .cards > *, .grid > *, .figrow > *, .map-layout > *, .d-grid > *, .figure { min-width: 0; }
.chart, .js-plotly-plot, .plot-container { max-width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .map-layout, .d-grid { grid-template-columns: 1fr; }
  .map-controls { position: static; }
  .map { height: 460px; }
}
@media (max-width: 700px) {
  /* the tab bar scrolls sideways on narrow screens: fade the right edge to show there is more */
  .tabbar .tabs { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 40px; }
}
@media (max-width: 520px) {
  .masthead-note { display: none; }
  .masthead-inner { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .site-title { font-size: .95rem; }
  .site-sub { font-size: .72rem; }
  .brand-logo { width: 38px; height: 38px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .k-value { font-size: 1.2rem; }
  .kpi .k-label, .kpi .k-sub { font-size: .72rem; }
  .chart { height: 320px; }
  .chart.tall { height: 460px; }
  .fig-tools select { min-width: 0; width: 100%; }
  .hero { padding: 20px 18px 18px; }
}
@media print {
  .tabbar, .icon-btn, .fig-tools, .btn { display: none !important; }
}

/* ---------- overview: animation on the left, headline tiles on the right ---------- */
.ov-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); gap: 24px; align-items: stretch; }
.ov-top .figure { margin: 20px 0 0; }
.ov-top .figure .anim { max-width: 100%; max-height: 620px; width: auto !important; height: auto; margin: 0 auto; display: block; }
.ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; margin: 20px 0 0; align-content: stretch; }
.ov-kpis .kpi { display: flex; flex-direction: column; justify-content: center; }
.ov-kpis .k-value { font-size: 2.2rem; }
.ov-kpis .kpi .k-label { font-size: .86rem; }
.ov-kpis .kpi .k-sub { font-size: .84rem; }
@media (max-width: 1100px) {
  .ov-top { grid-template-columns: 1fr; gap: 0; }
  .ov-kpis { grid-auto-rows: auto; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
  .ov-kpis .k-value { font-size: 1.6rem; }
}
@media (max-width: 520px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-kpis .k-value { font-size: 1.2rem; }
}
@media (min-width: 1101px) { #ov-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- overview swipe map ---------- */
.ov-map { height: 620px; border-radius: var(--radius); border: 1px solid var(--rule); background: #15171a; }   /* night background in both themes, as on the image side */
.ov-legends { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; margin-top: 8px; }
.ov-legends .legend { margin: 4px 0; min-width: 260px; flex: 1 1 280px; }
.ov-legends .ramp-ticks { max-width: 100%; }
.row-inline { display: inline-flex; align-items: center; gap: 6px; margin: 2px 12px 2px 0; font-size: .8rem; }
@media (max-width: 1100px) { .ov-map { height: 520px; } }
@media (max-width: 520px) { .ov-map { height: 400px; } .ov-legends .legend { min-width: 0; } }

/* overview: key message above the headline tiles on the right */
.ov-right { display: flex; flex-direction: column; margin-top: 20px; min-width: 0; }
.ov-right .msg { margin-bottom: 12px; }
.ov-right .ov-kpis { margin: 0; flex: 1; }
@media (max-width: 1100px) { .ov-right { margin-top: 16px; } }
