/* S-MESH NO2 Explorer. Layout: header, then the map with overlays and a rail of controls on the right;
   below 900 px the rail goes under the map. Map colours are data (fixed scales from the manifest);
   everything else follows the theme tokens below. */

:root {
  --bg: #eef1f3;
  --panel: #ffffff;
  --ink: #16202a;
  --ink-2: #46535e;
  --muted: #76828c;
  --line: #d7dde2;
  --accent: #b5452f;
  --accent-soft: #f6e3dc;
  --on-accent: #ffffff;
  --sea: #e3e9ee;
  --land: #f8f8f6;
  --nodata: #c9cdd1;
  --border: #59636b;
  --coast: #8a959d;
  --label: #1d2730;
  --label-halo: rgba(255, 255, 255, 0.85);
  --chart-1: #b5452f;
  --chart-2: #2c3e57;
  --chart-band: rgba(181, 69, 47, 0.16);
  --threshold: #6a7782;
  --chart-3: #9fb0c2;
  --chart-4: rgba(44, 62, 87, 0.5);
  --logo: #054055;
  --logo-plate: #f1f4f6;
  --chart-current: rgba(44, 62, 87, 0.08);
  --shadow: 0 1px 3px rgba(20, 30, 40, 0.12), 0 4px 14px rgba(20, 30, 40, 0.08);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-data: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1418; --panel: #171e24; --ink: #e6ecef; --ink-2: #b5c0c7; --muted: #7f8b93; --line: #2a353d;
    --accent: #e8836a; --accent-soft: #3a2621; --on-accent: #10161a;
    --sea: #0d1317; --land: #1f262c; --nodata: #3b444b; --border: #aeb9c0; --coast: #5d6a73;
    --label: #e6ecef; --label-halo: rgba(10, 14, 18, 0.85);
    --chart-1: #ef8c72; --chart-2: #b9cbe0; --chart-band: rgba(239, 140, 114, 0.18); --threshold: #93a0a9;
    --chart-3: #55677a; --chart-4: rgba(185, 203, 224, 0.5); --logo: #cfe2e8; --logo-plate: #eef1f3; --chart-current: rgba(185, 203, 224, 0.10);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1418; --panel: #171e24; --ink: #e6ecef; --ink-2: #b5c0c7; --muted: #7f8b93; --line: #2a353d;
  --accent: #e8836a; --accent-soft: #3a2621; --on-accent: #10161a;
  --sea: #0d1317; --land: #1f262c; --nodata: #3b444b; --border: #aeb9c0; --coast: #5d6a73;
  --label: #e6ecef; --label-halo: rgba(10, 14, 18, 0.85);
  --chart-1: #ef8c72; --chart-2: #b9cbe0; --chart-band: rgba(239, 140, 114, 0.18); --threshold: #93a0a9;
    --chart-3: #55677a; --chart-4: rgba(185, 203, 224, 0.5); --logo: #cfe2e8; --logo-plate: #eef1f3; --chart-current: rgba(185, 203, 224, 0.10);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
.num, .ticks, .timelabel, .stats td, .readout, .cell-meta, .range-inputs input { font-variant-numeric: tabular-nums; }

/* ---- Shell ---------------------------------------------------------------------------------- */
.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: 18px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
/* NILU logo: the wordmark as a mask, so it takes the theme's logo colour. */
.logo { display: inline-flex; align-self: center; flex: none; }
.logo-mark { display: block; height: 28px; aspect-ratio: 824 / 419; background: var(--logo);
  -webkit-mask: url("../img/nilu-logo.png?v=2") center / contain no-repeat; mask: url("../img/nilu-logo.png?v=2") center / contain no-repeat; }
.brand .logo { padding-right: 12px; border-right: 1px solid var(--line); }
.logo-about { margin: 4px 0 2px; }
.logo-about .logo-mark { height: 40px; }
.top h1 { margin: 0; font-size: 1.05rem; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.top .sub { color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.views { display: flex; gap: 4px; margin-left: auto; }
.views a { color: var(--ink-2); text-decoration: none; padding: 4px 10px; border-radius: 6px; font-size: 0.92rem; }
.views a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.top-tools { display: flex; align-items: center; gap: 8px; }
main { flex: 1; min-height: 0; }
.view { height: 100%; }
#view-map { display: grid; grid-template-columns: minmax(0, 1fr) 370px; height: 100%; }
.map-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
#view-map[hidden], #view-about[hidden] { display: none; }

/* ---- Map and overlays ------------------------------------------------------------------------ */
.mapcard { position: relative; min-height: 0; flex: 1; overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--sea); }
.overlay { position: absolute; z-index: 5; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.legend { left: 12px; bottom: 12px; padding: 10px 12px 8px; width: 300px; max-width: calc(100% - 24px); }
.legend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.legend .title { font-weight: 600; font-size: 0.88rem; }
.legend .units { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.legend-bar-wrap { position: relative; margin-top: 6px; }
.legend-bar { height: 12px; border-radius: 2px; }
.legend-thresholds { position: absolute; inset: 0; pointer-events: none; }
.legend-thresholds .thr { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1.5px solid var(--ink); pointer-events: auto; }
.legend-thresholds .thr::after { content: attr(data-short); position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 0.68rem; color: var(--ink-2); white-space: nowrap; }
.legend-bar-wrap.has-thr { margin-top: 18px; }
.ticks { position: relative; height: 16px; font-size: 0.75rem; color: var(--ink-2); margin-top: 2px; }
.ticks span { position: absolute; transform: translateX(-50%); }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }
.keys { display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; color: var(--ink-2); margin-top: 4px; }
.keys .period { text-align: right; }
.nowrap { white-space: nowrap; }
.keys i.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.swatch.nodata { background: var(--nodata); }
.legend-note { font-size: 0.75rem; color: var(--muted); margin-top: 3px; }
.legend-note:empty { display: none; }

.map-tools { top: 12px; left: 12px; display: flex; flex-direction: column; overflow: hidden; }
.map-tools button { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 1.05rem; }
.map-tools button + button { border-top: 1px solid var(--line); }
.map-tools button:hover { background: var(--accent-soft); }
.loading { top: 12px; left: 56px; padding: 5px 10px; font-size: 0.82rem; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.loading[hidden] { display: none; }
.spinner { width: 11px; height: 11px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.readout { right: 12px; bottom: 26px; padding: 6px 10px; font-size: 0.82rem; color: var(--ink-2); max-width: calc(100% - 340px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.readout b { color: var(--ink); font-size: 0.95rem; }

.ol-attribution { font-size: 0.7rem; }
.ol-attribution.ol-uncollapsible { bottom: 0; right: 0; border-radius: 6px 0 0 0; }
.ol-scale-line { left: auto; right: 14px; bottom: 64px; background: transparent; }
.ol-scale-line-inner { border-color: var(--ink-2); color: var(--ink-2); font-size: 0.7rem; }

/* ---- Rail ------------------------------------------------------------------------------------ */
.rail { overflow-y: auto; padding: 12px; border-left: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.card[hidden] { display: none; }
.card h2 { margin: 0; font-size: 0.95rem; font-weight: 650; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.field + .field { margin-top: 22px; }
#controls { padding: 16px 18px 14px; }
.label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.info { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font: italic 600 0.72rem/1 Georgia, serif; cursor: pointer; padding: 0; }
.info[aria-expanded="true"] { background: var(--accent-soft); color: var(--ink); }
.infotext { font-size: 0.82rem; line-height: 1.45; color: var(--ink-2); margin: 10px 0; padding: 8px 10px; background: var(--bg); border-radius: 6px; }
.label-row + .infotext { margin-top: 0; }
.field > .infotext:last-child { margin-bottom: 0; }
.note { font-size: 0.78rem; color: var(--muted); margin: 4px 0 0; }
.warn { font-size: 0.78rem; color: var(--accent); margin: 4px 0 0; }
.row { display: flex; align-items: center; gap: 6px; }
.grow { flex: 1; min-width: 0; }

.seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; padding: 5px 9px; cursor: pointer; font-size: 0.86rem; color: var(--ink-2); white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.seg button:disabled { opacity: 0.4; cursor: default; }
.seg.small button { padding: 3px 8px; font-size: 0.8rem; }
.seg[hidden] { display: none; }
#variable-buttons { margin-bottom: 8px; }

button { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 4px 9px; cursor: pointer; font-size: 0.85rem; }
button:hover:not(:disabled) { border-color: var(--muted); }
button.icon { padding: 3px 7px; line-height: 1.2; }
#play[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#theme-toggle { font-size: 1rem; }

.time-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.timelabel { font-size: 1.25rem; font-weight: 650; white-space: nowrap; }
.timesub { font-size: 0.78rem; color: var(--muted); }
.timesub:empty { display: none; }
#time-date { align-self: flex-start; margin-top: 8px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); font-size: 0.82rem; }
#time-date[hidden] { display: none; }
input[type="range"] { accent-color: var(--accent); }
.year-ticks { position: relative; height: 14px; margin: 0 62px 0 30px; font-size: 0.68rem; color: var(--muted); }
.year-ticks span { position: absolute; transform: translateX(-50%); }

.advanced { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.advanced summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-2); }
.advanced[open] summary { margin-bottom: 14px; }
.range-inputs { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.range-inputs input { width: 64px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.dash { color: var(--muted); }
select { width: 100%; margin-top: 5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
label.check { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; margin-top: 6px; }

/* ---- Cell card ------------------------------------------------------------------------------- */
.cell-meta { font-size: 0.8rem; color: var(--ink-2); margin: 4px 0 8px; }
.stats { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-bottom: 8px; }
.stats th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 2px 0; }
.stats td { text-align: right; padding: 2px 0; }
.stats tr.main td { font-size: 1.05rem; font-weight: 650; }
.stats caption { text-align: left; font-size: 0.78rem; color: var(--muted); padding-bottom: 3px; }
.muted { color: var(--muted); font-weight: 400; }

/* ---- Time-series panel (under the map) and the enlarged chart ---------------------------------- */
.ts-panel { flex: 0 0 auto; height: clamp(270px, 36vh, 420px); display: flex; flex-direction: column; background: var(--panel); border-top: 1px solid var(--line); padding: 8px 14px 6px; min-width: 0; }
.ts-panel[hidden] { display: none; }
.ts-head { display: flex; align-items: center; gap: 12px; }
.ts-head h2 { margin: 0; font-size: 0.95rem; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-tools { display: flex; gap: 6px; flex: none; }
#ts-expand { font-weight: 600; }
.ts-plots { position: relative; flex: 1; min-height: 0; margin-top: 4px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 0.76rem; color: var(--ink-2); margin-top: 4px; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; vertical-align: 3px; margin-right: 5px; border-radius: 1px; }
.chart-legend i.band { height: 10px; vertical-align: -1px; }
.chart-legend i.dot { width: 7px; height: 7px; border-radius: 50%; }
.chart-legend i.thr { height: 0; border-top: 1.5px dashed var(--threshold); }
.chart-legend i.current { background: var(--chart-current); outline: 1px solid var(--line); }
.uplot { font-family: var(--font-body); }
.u-legend { display: none; }
.u-axis { color: var(--ink-2); }
.u-over { cursor: crosshair; }
.chart-tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.8rem; box-shadow: var(--shadow); white-space: nowrap; z-index: 10; }
.chart-tip[hidden] { display: none; }
.chart-tip .tip-head { font-weight: 650; margin-bottom: 3px; }
.chart-tip table { border-collapse: collapse; }
.chart-tip th { font-weight: 400; color: var(--ink-2); text-align: left; padding: 1px 14px 1px 0; }
.chart-tip td { text-align: right; font-variant-numeric: tabular-nums; padding: 1px 0; }
.chart-tip b { font-size: 0.95rem; }
.chart-tip .u, .hovercard .u { color: var(--muted); font-size: 0.85em; }
.chart-tip .tip-foot { color: var(--muted); font-size: 0.72rem; margin-top: 4px; }

.ts-dialog { width: min(1280px, 94vw); height: min(820px, 88vh); max-width: none; max-height: none; padding: 14px 18px 10px; border: 0; border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.ts-dialog[open] { display: flex; flex-direction: column; }
.ts-dialog::backdrop { background: rgba(10, 15, 20, 0.55); }
.ts-dialog .ts-head h2 { font-size: 1.1rem; white-space: normal; }
.ts-dialog .chart-legend { font-size: 0.85rem; margin-top: 6px; }
.ts-dialog .ts-plots { margin-top: 8px; }
.ts-dialog .chart-tip { font-size: 0.9rem; }
.ts-dialog .note { font-size: 0.82rem; }

/* ---- Hover card on the map ------------------------------------------------------------------- */
.hovercard { position: absolute; left: 0; top: 0; z-index: 20; pointer-events: none; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 9px 12px 8px; min-width: 230px; max-width: 300px; font-size: 0.8rem; will-change: transform; }
.hovercard[hidden] { display: none; }
.hc-top { display: flex; align-items: baseline; gap: 7px; }
.hc-swatch { flex: none; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); align-self: center; }
.hc-value { font-size: 1.55rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hc-unit { color: var(--ink-2); font-size: 0.85rem; }
.hc-none { font-size: 1.05rem; font-weight: 600; color: var(--ink-2); }
.hc-sub { color: var(--ink-2); margin-top: 1px; }
.hc-rows { width: 100%; border-collapse: collapse; margin-top: 6px; border-top: 1px solid var(--line); }
.hc-rows th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 3px 10px 0 0; }
.hc-rows td { text-align: right; font-variant-numeric: tabular-nums; padding: 3px 0 0; white-space: nowrap; }
.hc-wait { color: var(--muted); }
.hc-foot { color: var(--muted); font-size: 0.74rem; margin-top: 5px; }
.hc-foot + .hc-foot { margin-top: 2px; }
.hc-hint { color: var(--ink-2); }
.readout[hidden] { display: none; }

/* ---- About ----------------------------------------------------------------------------------- */
#view-about { overflow-y: auto; }
.about { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.about-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.about-head .ref-box { margin: 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 22px 0; }
.about-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2px 16px 10px; min-width: 0; }
.about-card h2 { margin: 14px 0 6px; }
.about-card p, .about-card li { font-size: 0.93rem; }
.about-card ul { padding-left: 18px; }
.about-card pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.about-credits { display: flex; gap: 16px; align-items: center; margin-top: 28px; font-size: 0.85rem; color: var(--ink-2); }
.about .lead { font-size: 1.08rem; }
.about .intro h2 { margin: 0 0 6px; }
.intro .lead { margin: 0; }
.about h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.about li { margin-bottom: 6px; }
.about table { border-collapse: collapse; font-size: 0.9rem; margin: 8px 0; }
.about th, .about td { border-bottom: 1px solid var(--line); padding: 4px 12px 4px 0; text-align: left; }
.about td:not(:first-child), .about th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.about pre { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font: 0.8rem/1.5 var(--font-data); }
.about code { font-family: var(--font-data); font-size: 0.88em; }
.about a { color: var(--accent); }
.code-toggle summary { cursor: pointer; font-size: 0.9rem; color: var(--accent); margin: 0 0 10px; }
.code-toggle pre { margin-top: 0; }
.ref-box { border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; margin: 18px 0; box-shadow: var(--shadow); }
.ref-box p { margin: 4px 0; font-size: 0.92rem; }
.ref-label { font-size: 0.75rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.cite { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 0.92rem; }
.fig { margin: 22px 0; padding: 14px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.fig figcaption { font-size: 0.85rem; color: var(--ink-2); margin-top: 10px; }

/* Figure 1: flow diagram. */
.flow { display: flex; align-items: stretch; gap: 0; }
.flow-col { flex: 1 1 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.flow-label { font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: center; }
.node { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 0.84rem; font-weight: 600; text-align: center; background: var(--bg); }
.node small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--ink-2); margin-top: 2px; line-height: 1.3; }
.node-sat { border-color: var(--chart-2); }
.node-model { background: var(--accent-soft); border-color: var(--accent); }
.node-merged { border-color: var(--accent); }
.node-out { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.node-out small { color: var(--on-accent); opacity: 0.85; }
.flow-arrow { flex: 0 0 22px; position: relative; }
.flow-arrow::before { content: ""; position: absolute; left: 3px; right: 7px; top: 50%; border-top: 1.5px solid var(--muted); }
.flow-arrow::after { content: ""; position: absolute; right: 3px; top: calc(50% - 4px); border: 4.5px solid transparent; border-left: 6px solid var(--muted); border-right: 0; }

/* Figure 2: weights of the two kinds of mean. */


/* Acknowledgements: one card per funder, headed by the funder's logo. The funder logos are one-colour
   and drawn as masks in the text colour (black or white by theme); the EU emblem stays in colour.
   The project logos sit on a light plate so that they read in both themes (they have dark text).
   PHDSAT has no logo and is set in type. Wide screens: four columns sized to their content. */
.ack p { font-size: 0.93rem; margin: 0 0 12px; }
.ack-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .ack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .ack-grid { grid-template-columns: repeat(4, auto); } }
.ack-funder { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ack-head { display: flex; align-items: center; height: 42px; }
.ack-mark { display: block; height: 30px; background: var(--ink);
  -webkit-mask: var(--mark) left center / contain no-repeat; mask: var(--mark) left center / contain no-repeat; }
.ack-mark-rcn { --mark: url("../img/ack/rcn.svg"); aspect-ratio: 231 / 42; height: 29px; }
.ack-mark-esa { --mark: url("../img/ack/esa.svg"); aspect-ratio: 173 / 93; height: 42px; }
.ack-mark-nosa { --mark: url("../img/ack/nosa.svg"); aspect-ratio: 270.823 / 70.549; height: 36px; }
.ack-eu { gap: 9px; font-size: 0.8rem; line-height: 1.2; color: var(--ink); }
.ack-eu img { height: 34px; width: auto; }
.ack-sub { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: -4px; font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ack-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.ack-logo { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 9px; border-radius: 6px; background: var(--logo-plate); max-width: 100%; }
.ack-logo img { display: block; height: 30px; width: auto; max-width: 100%; }
.ack-logo-tall img { height: 42px; }
.ack-logo-heavy img { height: 24px; }
.ack-word { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.07em; color: #2c3e57; text-decoration: none; padding: 0 12px; }

/* Figure 3. */
.about-plots { position: relative; }
.about .chart-tip table { margin: 0; font-size: inherit; }
.about .chart-tip th, .about .chart-tip td { border: 0; padding: 1px 0; }
.about .chart-tip th { padding-right: 14px; text-align: left; }

/* ---- Small screens --------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .shell { height: auto; min-height: 100dvh; }
  #view-map { display: flex; flex-direction: column; height: auto; }
  .mapcard { height: 68vh; height: 68dvh; flex: none; }
  .map-col { display: block; }
  .ts-panel { height: 340px; }
  .hovercard { display: none; }
  .flow { flex-direction: column; }
  .about-head { grid-template-columns: 1fr; gap: 12px; }
  .about-credits { flex-direction: column; align-items: flex-start; gap: 4px; }
  .flow-arrow { flex-basis: 22px; }
  .flow-arrow::before { left: 50%; right: auto; top: 3px; bottom: 7px; border-top: 0; border-left: 1.5px solid var(--muted); }
  .flow-arrow::after { left: calc(50% - 4px); right: auto; top: auto; bottom: 3px; border: 4.5px solid transparent; border-top: 6px solid var(--muted); border-bottom: 0; }
  .rail { border-left: 0; overflow: visible; }
  .top { flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; }
  .top .sub { display: none; }
  .legend { width: 240px; padding: 8px 10px 6px; }
  .readout { left: 12px; right: 12px; bottom: auto; top: 12px; margin-left: 44px; max-width: none; white-space: normal; }
  .ol-scale-line { display: none; }
}
