/* ==========================================================================
   Home page: the map is the page (js/map/*). Loaded after style.css on the home page only.
   ========================================================================== */
.page-map { --air: #b79cf2; --ship: #8cc4f2; --ship-lo: #ff3b1f; --alert: var(--lv3); } /* --ship-lo: tanker "low", a hot scarlet kept apart from --war */
.page-map .foot { display: none; } /* the nav is in the header */

/* ---------- layout ---------- */
.mapview { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg); }
.map-col { position: relative; min-width: 0; }
.map-box { position: relative; background: var(--m-sea); height: min(64svh, 130vw); min-height: 320px; overflow: hidden; touch-action: none; }
#map { display: block; width: 100%; height: 100%; cursor: grab; }
#map:active { cursor: grabbing; }
.map-err { position: absolute; inset: auto 16px 16px 16px; background: var(--raised); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow); font-size: .875rem; }
@media (min-width: 1000px) {
  .mapview { grid-template-rows: calc(100svh - var(--hdr) - var(--scrub-h)) auto; }
  .map-box { height: 100%; min-height: 520px; }
  .scrub { padding-inline: 24px; min-height: var(--scrub-h); }
  /* the map fills the viewport exactly, so the demo-data notice floats over it instead of pushing it down */
  .page-map .mock { position: absolute; z-index: 8; top: calc(var(--hdr) + 14px); inset-inline-end: 72px; max-width: 360px; margin: 0; padding: 6px 10px; font-size: .75rem; line-height: 1.4; background: var(--raised); box-shadow: var(--shadow); }
}
@media (max-width: 999px) { .map-box { height: 62svh; } .map-foot { inset-block-end: 28px; } }

/* ---------- level card over the map (level.js) ---------- */
.map-head { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 5; max-width: min(420px, calc(100% - 84px)); pointer-events: none;
  padding: 8px 12px 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--m-land) 78%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.map-head .k { display: block; font-size: .8125rem; color: var(--m-mute); font-weight: 500; }
.map-head .h { display: block; font-size: clamp(1rem, .9rem + .4vw, 1.1875rem); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--m-ink); text-wrap: balance; }
.map-head .h.war { color: var(--war); }
.map-head .k, .map-head .h { text-shadow: 0 0 6px var(--m-sea), 0 0 2px var(--m-sea), 0 0 1px var(--m-sea); }
.map-head .h .lvb i { width: .3em; }
.map-head .h small { font-size: .8125rem; font-weight: 400; color: var(--m-mute); }
.map-head .stale { color: var(--war); }
.map-head .prov { color: var(--m-ink); font-weight: 600; pointer-events: auto; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.map-head .info { pointer-events: auto; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--m-mute); font: inherit; font-size: .75rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* score bar, 7 daily strike bars, pending-change dots (tooltips need pointer events) */
.map-head .viz { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 5px; }
.map-head .viz > span { display: inline-flex; align-items: center; gap: 5px; pointer-events: auto; cursor: default; }
.map-head .viz svg { display: block; overflow: visible; direction: ltr; }
.map-head .viz b { font-size: .8125rem; font-weight: 600; color: var(--m-ink); line-height: 1; }
.map-head .viz .mk { stroke: var(--m-ink); stroke-width: 2; }
.map-head .viz .b0, .map-head .viz b.c0 { fill: var(--war); color: var(--war); }
.map-head .viz .b1, .map-head .viz b.c1 { fill: var(--m-ink); color: var(--m-ink); }
.map-head .viz .b9 { fill: var(--m-mute); opacity: .5; }
.map-head .viz b.c1 { font-weight: 500; opacity: .85; }
.map-head .pend { color: var(--c); font-size: .8125rem; gap: 3px; }
.map-head .pend circle { fill: none; stroke: var(--c); stroke-width: 1.5; }
.map-head .pend circle.f { fill: var(--c); }
/* level badge: colour bar + name */
.lvb { display: inline-flex; align-items: center; gap: .35em; font-weight: 500; letter-spacing: -.01em; }
.lvb i { display: inline-block; width: .5em; height: 1em; border-radius: 2px; background: var(--c); flex: none; }

/* ---------- zoom buttons and preparation panel (base.js, prep.js) ---------- */
.map-tools { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; z-index: 6; display: flex; flex-direction: column; gap: 8px; align-items: end; }
.map-tools .grp { display: flex; flex-direction: column; background: var(--raised); border-radius: var(--r-sm); box-shadow: var(--shadow); overflow: hidden; }
.map-tools button { font: inherit; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; }
.map-tools .grp button + button { border-block-start: 1px solid var(--line); }
.map-tools button:hover { background: var(--surface); }
.map-tools svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.prep-pan { background: var(--raised); border-radius: var(--r-sm); box-shadow: var(--shadow); font-size: .8125rem; max-width: min(340px, calc(100vw - 100px)); }
.prep-pan > summary { cursor: pointer; padding: 7px 10px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.prep-pan > summary b { display: inline-grid; place-items: center; min-width: 1.5em; margin-inline-start: 4px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .75rem; }
.pp-body { padding: 0 12px 10px; max-height: min(56svh, 460px); overflow-y: auto; }
.pp-body > p { margin: 0 0 6px; font-size: .75rem; }
.pp-body .k { color: var(--ink-2); }
/* grid: label | 30-day axis with event dots | count | ↑/↓ ; rows with details expand */
#prep-list { list-style: none; margin: 0; padding: 0; }
#prep-list li { display: block; padding: 0; border-block-start: 1px solid var(--line); line-height: 1.4; }
#prep-list summary, #prep-list .pr { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.2em; gap: 8px; align-items: center; padding: 6px 0; line-height: 1.3; }
#prep-list summary { cursor: pointer; list-style: none; }
#prep-list summary::-webkit-details-marker { display: none; }
#prep-list summary .pl::after { content: " ›"; color: var(--ink-3); }
#prep-list details[open] summary .pl::after { content: " ‹"; }
#prep-list summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
#prep-list .pl { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#prep-list .pv { font-size: .9375rem; font-weight: 300; text-align: end; }
#prep-list details > p { margin: 0 0 8px; color: var(--ink-2); font-size: .75rem; overflow-wrap: anywhere; }
#prep-list li.k { padding: 7px 0; }
#prep-list a, .pop a { color: var(--ink-2); }
.map-tools svg.pax { display: block; width: 92px; height: 12px; overflow: visible; direction: ltr; fill: none; stroke: none; } /* undo .map-tools svg icon sizing */
.pax line { stroke: var(--line-2); stroke-width: 1; } .pax line.t { stroke: var(--ink-3); stroke-opacity: .5; }
.pax circle { fill: var(--ink); fill-opacity: .8; }

/* ---------- layer chips + compact key at the map foot (key.js) ---------- */
.map-foot { position: absolute; inset-inline: 12px; inset-block-end: 12px; z-index: 5; display: flex; gap: 6px; align-items: end; pointer-events: none; }
.map-foot > * { pointer-events: auto; }
.chips { display: flex; gap: 6px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; } /* one row; narrow screens scroll it sideways */
.chips::-webkit-scrollbar { display: none; }
.chips > *, #src-b { flex: none; }
button.chip { min-height: 30px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: .8125rem; display: inline-flex; align-items: center; gap: 7px; background: var(--raised); border-color: var(--line); color: var(--ink-2); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
button.chip svg { width: 14px; height: 14px; overflow: visible; flex: none; }
button.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.chip[aria-pressed="true"] svg .g { fill: var(--bg); stroke: var(--bg); }
button.chip svg .g { fill: var(--ink-2); stroke: var(--ink-2); }
.chip-sel { flex: none; max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block !important; padding-inline: 11px 11px; }
.chip-sel::after { content: ' ▴'; }
/* conflict list: opens upward from the map foot */
.conf-l { position: absolute; inset-block-end: calc(100% + 6px); inset-inline-start: 0; z-index: 6; min-width: 16em; max-width: min(24em, calc(100vw - 24px)); max-height: min(62svh, 480px); overflow-y: auto; padding: 6px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.conf-l p { margin: 8px 8px 2px; font-size: .6875rem; color: var(--m-mute); text-transform: uppercase; letter-spacing: .04em; }
.conf-l button { display: block; width: 100%; text-align: start; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: .8125rem; cursor: pointer; }
.conf-l button.sub { padding-inline-start: 20px; color: var(--ink-2); }
.conf-l button:hover, .conf-l button:focus-visible { background: var(--surface); }
.conf-l button[aria-selected="true"] { font-weight: 600; color: var(--ink); }
.keyline { display: none; } /* source of the legend popover only */
@media (min-width: 1000px) { .map-foot { inset-inline: 16px; inset-block-end: 16px; } }

/* ---------- map marks ---------- */
#map, #scrub-svg, .keyline svg, .chip svg { direction: ltr; } /* geometry is never mirrored; text-anchor must mean left */
.land { fill: var(--m-land); stroke: var(--m-border); stroke-width: .5; vector-effect: non-scaling-stroke; }
.land.focus { fill: var(--m-focus-land); stroke: var(--m-mute); stroke-width: 1.2; }
.c-lbl { font: 500 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; fill: var(--m-mute); }
.c-lbl.focus { font-size: 13px; font-weight: 600; fill: var(--m-ink); letter-spacing: .2em; }
.sea-lbl { font: italic 400 11px var(--sans); letter-spacing: .04em; fill: var(--m-mute); opacity: .9; }
.c-lbl, .sea-lbl, .p-lbl, .t-lbl { paint-order: stroke; stroke: var(--m-halo); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.sea-lbl { stroke: var(--m-sea); }
:lang(ar) .c-lbl, :lang(fa) .c-lbl, :lang(he) .c-lbl { letter-spacing: 0; font-size: 12px; }
:lang(ar) .c-lbl.focus, :lang(fa) .c-lbl.focus, :lang(he) .c-lbl.focus { font-size: 14px; }
.p-lbl { font: 400 11px var(--sans); fill: var(--m-ink); }
.p-lbl.capital { font-weight: 500; }
.p-lbl.chk { font-style: italic; fill: var(--m-mute); stroke: var(--m-sea); }
.t-lbl { font: 500 10.5px var(--sans); fill: var(--m-ink); }
.place { fill: var(--m-land); stroke: var(--m-ink); stroke-width: 1.2; cursor: pointer; }
.place.capital { fill: var(--m-ink); stroke: var(--m-halo); stroke-width: 1.5; }
.place.city { fill: var(--m-mute); stroke: none; }
.place.nuclear_site { fill: var(--m-land); stroke: var(--m-ink); stroke-width: 1.4; }
.place.us_base { fill: var(--m-ink); stroke: var(--m-halo); }
.air { fill: var(--m-ink); fill-opacity: .07; stroke: none; pointer-events: none; }
.air.key { fill-opacity: .2; }
/* airspace closed by the state: its own colour (not --war: that is strikes), solid outline; partial = dashed */
.shut { stroke: var(--air); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; fill: url(#hatch-air); cursor: pointer; }
.shut.airspace_partial { stroke-dasharray: 5 3; }
.shut:focus-visible { stroke: var(--focus); stroke-width: 2.5; }
.zone { stroke: var(--m-ink); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; fill: url(#hatch); cursor: pointer; }
.zone.new { stroke: var(--war); }
.zone:focus { stroke: var(--m-ink); stroke-dasharray: none; stroke-width: 2; fill-opacity: .9; }
.zone:focus-visible { stroke: var(--focus); stroke-width: 2.5; }
.track { fill: var(--m-ink); stroke: var(--m-halo); stroke-width: 1.2; cursor: pointer; }
.track.aircraft, .track.bomber { fill: var(--m-land); stroke: var(--m-ink); stroke-width: 1.4; }
.tk.stale .track { fill: var(--m-land); stroke: var(--m-mute); }
.dep { fill: var(--m-land); stroke: var(--m-ink); stroke-width: 1.3; stroke-linejoin: round; cursor: pointer; }
.dep.ordered { fill: var(--m-ink); stroke: var(--m-halo); }
.strike { fill: var(--m-hit); stroke: var(--m-halo); stroke-width: 1; cursor: pointer; }
.strike.old { fill: none; stroke: var(--m-hit); stroke-width: 1.2; }
.cluster circle { fill: var(--m-hit); stroke: var(--m-halo); stroke-width: 1.5; cursor: pointer; }
.cluster.old circle { fill: var(--m-land); stroke: var(--m-hit); stroke-width: 1.5; }
.cluster text { font: 600 11px var(--sans); fill: var(--on-war); text-anchor: middle; dominant-baseline: central; pointer-events: none; font-variant-numeric: tabular-nums; }
.cluster.old text { fill: var(--m-hit); }
/* provisional (from a news feed, not checked yet): dashed outline */
.cluster.prov circle.dot { stroke: var(--m-ink); stroke-width: 1.5; stroke-dasharray: 2.5 2; }
.pulse { fill: none; stroke: var(--m-hit); stroke-width: 1.5; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: pulse 1.6s ease-out 2; opacity: 0; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
/* weekly lanes rasters cross-fade: a hard swap each Monday read as lanes flashing on and off (per-cell AIS noise ~20%/week) */
.L-lanes .lz { transition: opacity .6s; }
@media (prefers-reduced-motion: reduce) { .L-lanes .lz { transition: none; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; opacity: .8; transform: scale(1.7); } }
/* mouse focus on an SVG mark draws the UA outline around its bounding box (a huge square on zones); keyboard focus keeps its stroke */
#map .mark:focus, .mark:focus-visible, .cluster:focus-visible { outline: none; }
.mark:focus-visible, .cluster:focus-visible circle { stroke: var(--focus); stroke-width: 3; }
.hit { fill: transparent; stroke: none; }
@media (forced-colors: active) {
  .strike, .cluster circle { fill: Highlight; }
  .land { fill: Canvas; stroke: CanvasText; }
}

/* focus countries: advisory wash (not clickable) and badge (countries.js) */
.cty-fill { fill: var(--m-ink); pointer-events: none; }
.cb { cursor: pointer; }
.cb .lead { stroke: var(--m-mute); stroke-width: 1; pointer-events: none; }
.cb rect { fill: var(--raised); stroke: var(--m-halo); stroke-width: 1.5; }
.cb rect.a1, .cb rect.a2 { stroke: var(--m-mute); stroke-width: 1; } /* else a raised square vanishes on land */
.cb rect.a3 { fill: var(--lv3); } .cb rect.a4 { fill: var(--war); }
.cb text { font: 600 9.5px var(--sans); text-anchor: middle; dominant-baseline: central; fill: var(--ink); pointer-events: none; font-variant-numeric: tabular-nums; }
.cb rect.a3 + text, .cb rect.a4 + text { fill: var(--bg); }
.cb:focus-visible { outline: none; } .cb:focus-visible rect { stroke: var(--focus); stroke-width: 3; }

/* tanker gauges and lanes (ships.js), Israel alerts and claims (alerts.js) */
.L-lanes image { pointer-events: none; transition: opacity .3s; }
.sg { cursor: pointer; --c: var(--ship); }
.sg.mid { --c: var(--lv3); } .sg.lo { --c: var(--ship-lo); } .sg.few, .sg.nod { --c: var(--m-mute); }
.sg .halo { fill: var(--m-sea); fill-opacity: .55; }
.sg .lead { stroke: var(--m-mute); stroke-width: 1; stroke-dasharray: 2 2; }
.sg .ring { fill: none; stroke: var(--c); stroke-opacity: .35; stroke-width: 3; }
.sg .arc, .sg .disc { fill: var(--c); }
.sg.nod .ring, .sg.few .ring { stroke-opacity: 1; stroke-width: 1.2; stroke-dasharray: 2 2; }
.sg:focus-visible { outline: none; } .sg:focus-visible .ring { stroke: var(--focus); stroke-opacity: 1; }
.alr { fill: var(--alert); fill-opacity: .35; stroke: var(--alert); stroke-width: 1; cursor: pointer; }
.alr.fresh { fill-opacity: .8; }
.clm { fill: none; stroke: var(--m-mute); stroke-width: 1.5; stroke-dasharray: 3 2; cursor: pointer; }

/* signals (signals.js): IODA internet ring on the Iran/Iraq badges, US airlift gauge at the western edge */
.net { fill: none; stroke: var(--lv2); stroke-width: 2; pointer-events: none; }
.net.s1 { stroke-width: 1.5; stroke-dasharray: 3 2; }
.air-g { --c: var(--lv1); position: absolute; z-index: 4; left: 12px; inset-block-start: 28%; display: flex; align-items: center; gap: 7px; min-height: 34px; max-width: min(320px, calc(100% - 24px)); padding: 4px 8px; border: 1px solid var(--line); border-inline-start: 3px solid var(--c); border-radius: var(--r-sm); background: color-mix(in srgb, var(--m-sea) 86%, transparent); color: var(--m-ink); font: inherit; font-size: .8125rem; text-align: start; line-height: 1.25; cursor: pointer; }
.air-g.mid { --c: var(--lv2); } .air-g.hi { --c: var(--lv3); } .air-g.nod { --c: var(--m-mute); border-inline-start-style: dashed; }
.air-g svg { flex: none; width: 16px; height: 16px; fill: var(--c); }
.air-g .arr { width: 16px; height: 10px; fill: none; stroke: var(--c); stroke-width: 1.5; }
/* the gauge sits at the western map edge (geography is never mirrored): LTR box, RTL text inside */
[dir="rtl"] .air-g { direction: ltr; } [dir="rtl"] .air-g > span { direction: rtl; text-align: right; }
.air-g small { display: block; font-size: .6875rem; color: var(--m-mute); }
.air-g b { font-weight: 600; color: var(--c); font-variant-numeric: tabular-nums; }
.air-g.ok b, .air-g.nod b { color: var(--m-ink); }
.air-g i { font-style: normal; color: var(--m-mute); }
.air-g:focus-visible { outline: 2px solid var(--focus); }
.air-k path { fill: var(--m-ink); }

/* ---------- popover (pop.js) and instant tooltip ---------- */
.pop { position: absolute; z-index: 20; inline-size: max-content; max-inline-size: min(320px, calc(100% - 24px)); max-block-size: calc(100% - 16px); overflow-y: auto; background: var(--raised); color: var(--ink); border-radius: var(--r-md); padding: 12px 14px; padding-inline-end: 36px; font-size: .8125rem; line-height: 1.45; box-shadow: var(--shadow); border: 1px solid var(--line); }
.pop p { margin: 2px 0; }
.pop p:first-child { font-size: .9375rem; }
.pop .k { color: var(--ink-2); }
.pop ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 220px; overflow-y: auto; }
.pop li { padding: 6px 0; border-block-start: 1px solid var(--line); }
.pop .x { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.pop .x:hover { background: var(--surface); color: var(--ink); }
.pop .src { margin-top: 8px; font-size: .6875rem; }
.pop ul.key-l { max-height: min(50svh, 360px); }
.pop .key-l li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; align-items: start; }
.pop .key-l svg { width: 22px; height: 14px; margin-top: 3px; overflow: visible; direction: ltr; }
.spark-s { display: block; max-width: 100%; height: auto; margin-top: 6px; direction: ltr; }
.spark-s path { fill: none; stroke: var(--ship); stroke-width: 1.5; }
.spark-s .b { stroke: var(--m-mute); stroke-dasharray: 3 3; }
.spark-s .b.p { stroke-dasharray: 1 3; }
.air-sp circle { fill: var(--ship); }
.tip { position: fixed; z-index: 50; max-inline-size: min(300px, calc(100vw - 16px)); background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px 9px; font-size: .75rem; line-height: 1.4; pointer-events: none; }
.tip[hidden] { display: none; }

/* ---------- timeline under the map (scrub.js) ---------- */
.scrub { position: sticky; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block-start: 1px solid var(--line); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 16px; align-items: center; }
.scrub-ctl { display: flex; align-items: center; gap: 8px; flex: none; }
#play { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--ink); color: var(--bg); border: 0; display: grid; place-items: center; font-size: 0; }
#play svg { width: 16px; height: 16px; fill: currentColor; }
#play:hover { opacity: .88; }
.speed select { min-height: 32px; font-size: .8125rem; padding-inline: 8px 24px; border-color: var(--line); }
.scrub-date { font-weight: 600; font-size: .9375rem; min-width: 6.5em; min-height: 32px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
#scrub-st:empty { display: none; }
/* fixed width = the longest level name, so the track (and the day under the pointer) never shifts as the level changes */
#scrub-st { min-inline-size: 70px; } :lang(ru) #scrub-st { min-inline-size: 106px; }
#scrub-st .lvb { font-size: .8125rem; }
.scrub-track { position: relative; flex: 1; height: 56px; min-width: 0; direction: ltr; } /* time runs left to right in every language */
#scrub-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* the track takes the pointer itself (zoom window, pinch); the hidden range input keeps keyboard and screen readers */
#scrub-in { position: absolute; inset: -6px 0; width: 100%; height: calc(100% + 12px); margin: 0; opacity: 0; pointer-events: none; }
.scrub-track { cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.scrub-z { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.scrub-z:hover { background: var(--surface); }
.scrub-z svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.scrub-z .za, .scrub-z.on .zi { display: none; }
.scrub-z.on .za { display: inline; }
.scrub-track:has(#scrub-in:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.scrub-cap { display: none; }
[dir="rtl"] .scrub-cap { direction: rtl; text-align: right; } /* the track is LTR; its caption follows the page language */
.sp-ar { fill-opacity: .18; stroke: none; }
.sp-ln { fill: none; stroke-width: 1.4; stroke-linejoin: round; }
.sp-thr { stroke: var(--ink-3); stroke-opacity: .45; stroke-width: 1; stroke-dasharray: 2 3; }
.sp-base { stroke: var(--line-2); stroke-width: 1; }
.sp-cur { stroke: var(--ink); stroke-width: 1.5; }
.sp-knob { fill: var(--bg); stroke: var(--ink); stroke-width: 2; }
.sp-yr { font: 500 10px var(--sans); fill: var(--ink-2); }
.sp-mo { stroke: var(--line-2); stroke-width: 1; }
.sp-dt { stroke: var(--ink-3); stroke-width: 1; }
.sp-prov { fill: url(#sp-hatch); pointer-events: none; }
.sp-hl { stroke: var(--ink-3); stroke-opacity: .35; stroke-width: 1.5; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .scrub { gap: 10px; padding-inline: 12px; }
  .scrub-date { font-size: .75rem; min-width: 0; width: 8.6em; padding: 2px 4px; }
  .speed { display: none; }
  /* level badge under the date, so the track keeps its width */
  .scrub-ctl { display: grid; grid-template-columns: auto auto; column-gap: 8px; row-gap: 3px; align-items: center; }
  #play { grid-row: span 2; }
  #scrub-st { font-size: .625rem; padding: 0 6px 0 5px; justify-self: start; }
  #scrub-st { min-inline-size: 80px; } :lang(ru) #scrub-st { min-inline-size: 117px; }
  .scrub-track { height: 62px; }
  .scrub-z { width: 36px; height: 44px; margin-inline-start: -4px; }
  #scrub-svg { height: calc(100% - 14px); }
  .scrub-cap { display: block; position: absolute; inset-inline: 0; inset-block-end: 0; margin: 0; font-size: .625rem; line-height: 1; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
  .map-foot { inset-inline: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-inline: 12px 0; padding-block: 2px 4px; }
  #src-b { margin-inline-end: 12px; margin-block-end: 4px; min-height: 40px; }
  .chips::-webkit-scrollbar { display: none; }
  button.chip { flex: none; min-height: 40px; }
  .conf-l { inset-inline-start: 12px; }
  .page-map .mock { margin-block: 8px; font-size: .75rem; }
  .map-head { inset-block-start: 12px; inset-inline-start: 12px; }
  .map-tools { inset-block-start: 12px; inset-inline-end: 12px; }
  .pop .x { width: 40px; height: 40px; top: 2px; inset-inline-end: 2px; }
  .pop { padding-inline-end: 44px; }
  .air-g { inset-block-start: auto; inset-block-end: 112px; max-width: 250px; }
}
/* link from the map down to the server-rendered situation block (#now) */
.to-now { display: none; position: absolute; z-index: 3; inset-block-end: 14px; inset-inline-end: 14px; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--raised) 88%, transparent); color: var(--ink-2); font-size: .8125rem; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; }
@media (min-width: 1000px) { .to-now { display: block; } } /* below 1000px the map is 64svh and the page scrolls on its own */
.to-now:hover { color: var(--ink); }
.map-foot .to-now { position: static; margin-inline-start: auto; align-self: end; }
