/* The front page: one rail per day; beside it a map of Melbourne and, under the map, the
   summary card. This is the Radar theme, dark only; assets/neon.css lays the Neon theme over
   it and is the default. Warm colours mean harm and nothing else; cyan means changed in the
   last 2 hours; how lit a story's text is says how much coverage it got.
   One spacing value, --space, sets every page edge, every gap between cards and every card's
   padding: 20px on a desktop and 16px on a phone. Inside a card, groups sit --space-in apart. */

:root {
  color-scheme: dark;
  --bg: #090c10;
  --bg-2: #0e1319;
  --bg-3: #131a22;
  --line: #1b222c;
  --rail: #2a333f;
  --text: #e8edf4;
  --muted: #8f9aab;
  --dim: #56616f;
  --faint: #343d49;
  --fresh: #5ed6ff;
  --fresh-dim: rgba(94, 214, 255, 0.14);
  /* --died and --injured come from src/pipeline/harm.ts, set in the page's head. */
  --none: #4d5663;
  --warn: #ffb13d;
  --alarm: #ff4d5e;
  --official: #7fd7ff;
  --outlet: #d5dce6;
  --outlet-x: #9aa6b6;
  --anon: #5c6775;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --col-gutter: 3px;
  --col-when: 74px;
  --col-rail: 20px;
  --col-who: 124px;
  --gap: 12px;
  --top-h: 0px;
  --space: 20px;
  --space-in: 16px;
  /* The cards' surfaces: the timeline's card, and anything raised on it such as the drawer. */
  --surface: #0e1319;
  --surface-raised: #131a22;
  /* How strong the map's lines are, 0 to 1, the captain's settings: the Yarra leads, the bay's edge sits below it. */
  --river-k: 0.8;
  --road-k: 0.25;
  --coast-k: 0.35;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.35; }
body { -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: linear-gradient(to bottom, rgba(9, 12, 16, 0.98), rgba(9, 12, 16, 0.94)); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-inner { max-width: 1600px; margin: 0 auto; padding: 10px var(--space) 8px; display: grid; grid-template-columns: auto auto 1fr; column-gap: 14px; align-items: center; }
.brand { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--muted); text-decoration: none; white-space: nowrap; }
.brand b { color: var(--text); font-weight: 600; }
.live { font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fresh); box-shadow: 0 0 8px var(--fresh); animation: pulse 2.2s ease-in-out infinite; }
.live .dot.stale { background: var(--warn); box-shadow: none; animation: none; }
.live time { color: var(--warn); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.act { justify-self: end; display: flex; align-items: center; gap: 6px; }
.btn { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--rail); color: var(--muted); }
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn.primary { color: var(--fresh); border-color: rgba(94, 214, 255, 0.45); }
.btn.refresh { display: inline-grid; place-items: center; padding: 3px 7px; }
.btn.refresh[aria-busy="true"] svg { animation: spin 1s linear infinite; }
.btn.refresh:disabled { cursor: progress; }
.theme-pick { appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.theme-pick option { color: #111; background: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- troubles ---------- */
.trouble { max-width: 1600px; margin: 8px auto 0; padding: 0 var(--space); display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--warn); }
.trouble i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); transform: translateY(-1px); }
.trouble.failed { color: var(--alarm); }
.trouble.failed i { background: var(--alarm); }
.offline-note { display: none; }
body.offline .offline-note { display: flex; }

/* ---------- stream ---------- */
main { max-width: 1600px; margin: 0 auto; padding: var(--space) var(--space) 120px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space); align-items: start; }
#stream { min-width: 0; position: relative; z-index: 1; }

/* ---------- map ---------- */
.mapcol { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; }
/* The map's own head holds only the phone sheet's Close button. */
.maphead { display: none; justify-content: flex-end; padding: 8px 12px; }
.mapbox { flex: 1; min-height: 0; position: relative; }
.mapbox svg { width: 100%; height: 100%; display: block; }
/* The map zooms, so lines are drawn in screen pixels: --px is the whole map's pixels per km and
   --zk how far in it is (1 at the whole map), both set by timeline.js. Lines keep their weight. */
#map { cursor: grab; touch-action: none; }
#map:active { cursor: grabbing; }
.water { fill: #0e1f2e; }
.island { fill: var(--bg-2); }
.coast, .road, .st, .yarra { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.coast { stroke: #3a6684; stroke-width: calc((0.12 + 0.4 * var(--coast-k)) * var(--px, 4) * 1px); stroke-opacity: calc(0.15 + 1.2 * var(--coast-k)); }
.road.mw { stroke: #3a4858; stroke-width: calc((0.3 + 0.8 * var(--road-k)) * var(--px, 4) * 1px); stroke-opacity: calc(0.25 + 3 * var(--road-k)); }
.road.tr { stroke: #273240; stroke-width: calc((0.18 + 0.48 * var(--road-k)) * var(--px, 4) * 1px); stroke-opacity: calc(0.25 + 3 * var(--road-k)); }
/* Primary and secondary roads, faint across the whole map and firmer zoomed in; the grid reads only up close. */
.st.sec { stroke: #232c38; stroke-width: calc(0.16px * var(--px, 4)); stroke-opacity: calc(1.1 - 0.5 * var(--zk, 1)); }
.st.pri { stroke: #2b3644; stroke-width: calc(0.22px * var(--px, 4)); stroke-opacity: calc(1.1 - 0.4 * var(--zk, 1)); }
.st.grid { stroke: #3a4757; stroke-width: 1px; }
.yarra { stroke: #3a6684; stroke-width: calc((0.2 + 0.25 * var(--river-k)) * var(--px, 4) * 1px); stroke-opacity: calc(0.15 + 1.2 * var(--coast-k)); }
.yarra-lbl { font-family: var(--mono); font-size: 1.9px; font-style: italic; fill: #4f86a8; }
.plc { font-family: var(--mono); font-size: 2.1px; fill: var(--dim); }
.callmk { fill: var(--faint); opacity: 0.6; }
.mk { cursor: pointer; transition: opacity 0.35s; }
.mk circle { vector-effect: non-scaling-stroke; }
.mk .dot { stroke: var(--bg); stroke-width: calc(0.7px * var(--px, 4)); }
.mk .dot.died { fill: var(--died); }
.mk .dot.injured { fill: var(--injured); }
.mk .dot.none { fill: var(--bg-3); stroke: var(--none); }
/* A point known only to the suburb draws soft: it says "somewhere here", no more. */
.mk.soft .dot { fill-opacity: 0.55; stroke-dasharray: 2 1.6; stroke: var(--muted); stroke-width: calc(0.35px * var(--px, 4)); }
.mk .hit { fill: transparent; }
.mk.dim { opacity: 0.28; }
.mk.off, .callmk.off { display: none; }
.mk.hot .dot { stroke: var(--fresh); stroke-width: calc(0.9px * var(--px, 4)); stroke-dasharray: none; }
.mk .halo { fill: none; stroke: #fff; stroke-width: calc(0.5px * var(--px, 4)); opacity: 0.85; }
.mk .lbl { font-family: var(--mono); font-size: 4px; fill: var(--text); paint-order: stroke; stroke: var(--bg-2); stroke-width: 1.6px; stroke-linejoin: round; display: none; }
.mk.hot .lbl, .mk:hover .lbl { display: block; }
.mk.pop .dot { animation: pop 0.8s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes pop { 0% { transform: scale(0); } 55% { transform: scale(1.8); } 100% { transform: scale(1); } }
.mapnote { position: absolute; left: 12px; right: 12px; bottom: 10px; font-family: var(--mono); font-size: 9.5px; color: var(--dim); pointer-events: none; }
.mapzoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.mapzoom .btn { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; font-size: 15px; line-height: 1; background: var(--bg-2); }
.mapbtn { display: none; }
.story.hl { background: var(--fresh-dim); }
/* The right-hand column: the live map, and the summary card under it. */
.side { min-width: 0; }
@media (min-width: 1100px) {
  /* The page ends --space below the timeline's card, so the column beside it never rides up. */
  main { grid-template-columns: minmax(0, 1fr) 380px; padding-bottom: var(--space); }
  .side { position: sticky; top: calc(var(--top-h) + var(--space)); height: calc(100vh - var(--top-h) - 2 * var(--space)); display: flex; flex-direction: column; gap: var(--space); z-index: 1; }
  .side .mapcol { flex: 1 1 0; min-height: 220px; }
  .side .sumcard { flex: none; }
}
@media (max-width: 1099px) {
  /* Narrow: the summary is the first card on the page, and the map sheet holds the map alone. */
  .side { display: contents; }
  .sumcard { order: -1; margin-bottom: var(--space); }
  .mapcol { position: fixed; left: 0; right: 0; bottom: 0; height: 56vh; z-index: 25; border-radius: 14px 14px 0 0; transform: translateY(100%); transition: transform 0.3s ease; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); visibility: hidden; }
  .mapcol.open { transform: none; visibility: visible; }
  .maphead { display: flex; }
  .mapbtn { display: inline-block; }
}

/* ---------- days ---------- */
.day { position: relative; margin-top: 18px; }
.day:first-child { margin-top: 0; }
.dayhead { position: sticky; top: var(--top-h); z-index: 10; background: var(--bg); display: grid; grid-template-columns: auto 1fr auto; column-gap: 16px; align-items: end; padding: 10px 0 8px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
.dayname { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--text); white-space: nowrap; display: flex; align-items: baseline; gap: 10px; line-height: 1.1; }
.dayname .date { color: var(--muted); letter-spacing: 0.04em; font-size: 12px; }
.daystats { font-family: var(--mono); font-size: 11.5px; line-height: 1.1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daystats .died { color: var(--died); }
.daystats .injured { color: var(--injured); }
.daystats .sep { color: var(--faint); margin: 0 5px; }
.dayright { display: flex; align-items: center; gap: 12px; }
.density { display: grid; grid-template-columns: repeat(24, 7px); column-gap: 2px; height: 16px; align-items: end; }
.cell { position: relative; height: 100%; display: flex; align-items: flex-end; border-radius: 1px; cursor: pointer; }
.cell i { display: block; width: 100%; border-radius: 1px; background: var(--none); min-height: 2px; }
.cell.h-died i { background: var(--died); }
.cell.h-injured i { background: var(--injured); }
.cell.h-calls i { background: var(--faint); }
.cell.empty i { background: var(--line); min-height: 2px; }
.cell.future i { background: transparent; border-top: 1px dashed var(--line); min-height: 1px; }
.cell.cur::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -4px; height: 2px; background: var(--fresh); }
.cell:hover i { filter: brightness(1.4); }
.day.collapsed .rows { display: none; }
.rows { position: relative; }
.placeholder { margin: 0; padding: 12px 0 12px calc(var(--col-gutter) + var(--col-when) + var(--col-rail) + 3 * var(--gap)); font-size: 12.5px; color: var(--dim); font-style: italic; }

/* ---------- entries ---------- */
.entry { position: relative; display: grid; grid-template-columns: var(--col-gutter) var(--col-when) var(--col-rail) minmax(0, 1fr) var(--col-who); column-gap: var(--gap); align-items: start; }
.entry > div { padding: 7px 0; min-width: 0; }
.gutter { padding: 0 !important; align-self: stretch; border-radius: 2px; }
.entry.fresh .gutter { background: var(--fresh); box-shadow: 0 0 10px rgba(94, 214, 255, 0.35); }
.story { cursor: pointer; outline: none; }
.story:hover, .story:focus-visible { background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.025) 10%, rgba(255, 255, 255, 0.025) 90%, transparent); }
.story:focus-visible .title .txt { text-decoration: underline; text-decoration-color: var(--faint); }
.when { font-family: var(--mono); text-align: right; }
.when .t { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: 0.01em; line-height: 1.1; }
.when.reported .t { color: var(--muted); font-weight: 500; }
.when .basis { font-size: 10px; color: var(--dim); margin-top: 3px; letter-spacing: 0.02em; white-space: nowrap; }
.when.happened .basis { color: var(--muted); }
.rail { position: relative; align-self: stretch; padding: 0 !important; }
.rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--rail); }
.entry.band .rail::before { background: repeating-linear-gradient(to bottom, var(--rail) 0 3px, transparent 3px 8px); }
.node { position: absolute; left: 50%; top: 11px; width: 10px; height: 10px; border-radius: 50%; transform: translateX(-50%); background: var(--none); box-shadow: 0 0 0 3px var(--bg); }
.node.died { background: var(--died); width: 13px; height: 13px; top: 10px; box-shadow: 0 0 0 3px var(--bg), 0 0 14px 3px color-mix(in srgb, var(--died) 45%, transparent); }
.node.injured { background: var(--injured); width: 11px; height: 11px; top: 11px; }
.node.none { background: var(--bg); border: 2px solid var(--none); }
.node.fold { width: 8px; height: 8px; top: 13px; background: var(--bg); border: 1.5px dotted var(--dim); }
.node.now { background: var(--fresh); width: 8px; height: 8px; top: 8px; box-shadow: 0 0 0 3px var(--bg), 0 0 10px 2px rgba(94, 214, 255, 0.6); }
.what { font-size: 14px; color: var(--text); }
.title { min-width: 0; }
.title .txt { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.story.open .title .txt { white-space: normal; }
/* Line 2: the harm icon and tag icons, then the suburb in grey. */
.line2 { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; height: 18px; }
.line2 .icons { display: inline-flex; gap: 3px; flex: none; }
.line2 .icons:empty { display: none; }
.line2 .suburb { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-inline { display: none; }
.tag-mark { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border: 1px solid var(--faint); border-radius: 3px; }
.tag-mark .ti { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* Harm leads line 2 as a filled tile, so it reads apart from the outlined tags after it. */
.harm-mark { border-color: transparent; }
.harm-mark .ti { width: 12px; height: 12px; stroke-width: 1.7; }
.harm-mark.died { background: color-mix(in srgb, var(--died) 18%, transparent); }
.harm-mark.injured { background: color-mix(in srgb, var(--injured) 16%, transparent); }
/* Profile is how lit the text is. A row comes up to full when hovered or open. */
.p-high { opacity: 1; }
.p-medium { opacity: 0.72; }
.p-low { opacity: 0.5; }
.story.open .what, .story:hover .what, .story:focus-visible .what, .story.open .who, .story:hover .who, .story:focus-visible .who { opacity: 1; }
.who { text-align: right; white-space: nowrap; }
.src { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.more { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-left: 5px; }
.src i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.src.official i { background: var(--official); border-radius: 1px; }
.src.outlet i { background: var(--outlet); }
.src.outlet_account i { background: linear-gradient(90deg, var(--outlet-x) 50%, transparent 50%); border: 1px solid var(--outlet-x); }
.src.anonymous_account i { background: transparent; border: 1px solid var(--anon); }
.src.official { color: var(--official); }
.src.anonymous_account { color: var(--anon); }

/* ---------- folded calls: as quiet as possible ---------- */
.entry.fold { opacity: 0.6; cursor: pointer; }
.entry.fold .what { font-size: 12px; color: var(--dim); }
.entry.fold .fold-head { display: block; line-height: 1.5; }
.entry.fold .fold-head > span { display: inline; margin-right: 7px; }
.entry.fold .fold-head .n { font-family: var(--mono); color: var(--muted); }
.entry.fold .fold-head .x { color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.entry.fold .calls { display: none; margin-top: 6px; }
.entry.fold.open { opacity: 0.85; }
.entry.fold.open .calls { display: block; }
.call { display: flex; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--dim); padding: 3px 0; border-top: 1px dashed var(--line); text-decoration: none; }
.call:hover .cp { color: var(--text); }
.call .cp { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry.fold.bump { animation: bump 1.2s ease-out; }
@keyframes bump { 0% { background: var(--fresh-dim); } 100% { background: transparent; } }

/* ---------- the untimed band ---------- */
.entry.band > div { padding: 4px 0; }
.entry.band .what { font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.06em; }

/* ---------- now ---------- */
.entry.now .when .t { color: var(--fresh); font-size: 12px; font-weight: 600; }
.entry.now .when .basis { color: var(--fresh); opacity: 0.7; }
/* The now line, with the refresh button at its left. */
.entry.now .what { position: relative; padding: 6px 0; min-height: 30px; display: flex; align-items: center; }
.entry.now .what::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(to right, rgba(94, 214, 255, 0.6), rgba(94, 214, 255, 0)); }
.entry.now .btn.refresh { position: relative; background: var(--bg); padding: 2px 6px; }

/* ---------- the drawer under an open row ---------- */
.detail { display: none; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-left: 2px solid var(--rail); border-radius: 0 6px 6px 0; background: var(--bg-2); font-size: 12px; color: var(--muted); cursor: auto; }
.story.open .detail { display: block; }
.detail .drow { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 3px 0; }
.detail .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--dim); text-transform: uppercase; padding-top: 2px; }
.detail .q { color: var(--text); font-style: italic; }
.detail .srcline { font-family: var(--mono); font-size: 11px; }
.detail .srcline b { color: var(--text); font-weight: 500; }
.detail .srcline a.srcname { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.detail .srcline a.srcname:hover { text-decoration-color: var(--muted); }
/* A vetting mark from the Sources tab. Watch is amber; excluded is grey, and its items leave stories at the next merge. */
.detail .vet { text-transform: uppercase; letter-spacing: 0.04em; }
.detail .vet.trusted { color: var(--official); }
.detail .vet.watch { color: var(--warn); }
.detail .vet.excluded { color: var(--dim); }
.detail .full { color: var(--fresh); font-family: var(--mono); font-size: 11px; }
.story.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--fresh-dim); } 100% { background: transparent; } }
.ghost { position: absolute; left: 0; right: 0; font-family: var(--mono); font-size: 10.5px; color: var(--fresh); padding: 6px 0 6px calc(var(--col-gutter) + var(--col-when) + var(--col-rail) + 3 * var(--gap)); border-top: 1px dashed rgba(94, 214, 255, 0.35); border-bottom: 1px dashed rgba(94, 214, 255, 0.35); pointer-events: none; animation: ghost 4s ease-out forwards; z-index: 2; background: var(--bg); }
@keyframes ghost { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- floating ---------- */
.pill { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--top-h) + 10px); z-index: 30; font-family: var(--mono); font-size: 11.5px; color: #061218; background: var(--fresh); padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 20px rgba(94, 214, 255, 0.35); }

/* ---------- tag names on a long press (assets/tag-tip.js) ---------- */
.tag-tip { position: fixed; left: 0; top: 0; z-index: 40; padding: 3px 8px; border-radius: 4px; background: var(--bg-3); border: 1px solid var(--rail); font-family: var(--mono); font-size: 11px; color: var(--text); pointer-events: none; white-space: nowrap; }

/* ---------- the bridge: the timeline and the map as one shape ---------- */
/* On a wide screen the timeline's card, the gap beside the map and the map's card are one shape
   (drawBridge in timeline.js): .fused paints its one background and .fused-edge its one border,
   so the cards' own backgrounds and borders step aside. Radar's timeline takes the card form
   here, its surfaces turned to the card's so day headings, rail rings and the drawer match it. */
.fused, .fused-edge, .fused-shadow { display: none; }
@media (min-width: 1100px) {
  .fused, .fused-edge, .fused-shadow { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
  .fused-shadow { z-index: 0; overflow: visible; }
  .fused-shadow path { fill: none; }
  .fused { z-index: 0; background: var(--surface); }
  .fused-edge { z-index: 5; overflow: visible; }
  .fused-edge path { fill: none; stroke: var(--line); stroke-width: 1px; }
  #stream { --bg: var(--surface); --bg-2: var(--surface-raised); border: 1px solid transparent; border-radius: 10px; padding: calc(var(--space) - 10px) var(--space) var(--space); }
  .side .mapcol { background: transparent; border-color: transparent; }
}

/* ---------- the summary card ---------- */
.sumcard { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.sum { display: flex; flex-direction: column; gap: var(--space-in); padding: var(--space); min-width: 0; }
.kind-off { display: none !important; }
.sum .died { color: var(--died); }
.sum .injured { color: var(--injured); }
.sum .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sum .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.sum [title] { cursor: help; }
.sum .ti { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* The heading is the time span's dropdown and its dates, read the way a day heading reads. */
.sumhead { display: flex; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--text); white-space: nowrap; line-height: 1.1; }
.sumhead .date { color: var(--muted); letter-spacing: 0.04em; font-size: 12px; }
.sumhead .span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sumpick { appearance: none; -webkit-appearance: none; background: transparent; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: uppercase; cursor: pointer; }
.sumpick option { color: #111; background: #fff; text-transform: none; }
.sumpick:focus-visible { outline: 1px solid var(--fresh); outline-offset: 3px; border-radius: 2px; }
.sumhead .span svg { width: 9px; height: 6px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sumhead .span:hover svg { stroke: var(--text); }
.sumhead .kreset { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--fresh); }
.sumhead .kreset:active, .kchip:active { transform: translateY(1px); }
/* Kinds: every one starts on; a click switches one off, a second click back on. */
.sb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 8px; border: 1px solid var(--rail); border-radius: 999px; font-family: var(--mono); font-size: 11px; color: var(--muted); transition: opacity 0.12s, border-color 0.12s; }
.kchip .num { color: var(--text); font-variant-numeric: tabular-nums; }
.kchip:hover { border-color: var(--muted); }
.kchip.off { opacity: 0.35; border-style: dashed; }
.kchip.others .nm { color: var(--dim); }
.sb-lead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1; }
.sb-lead .num { font-size: 22px; }
.sb-lead .sep { color: var(--faint); }
/* One bar a day: died, injured, other stories, then rescue call-outs, from the bottom up. */
.sb-daily { display: flex; flex-direction: column; gap: 6px; }
.sb-bars { height: 84px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 2px; align-items: end; }
.sb-bar { height: 100%; display: flex; flex-direction: column-reverse; cursor: pointer; }
.sb-bar i { display: block; width: 100%; }
.sb-bar i:last-child { border-radius: 1px 1px 0 0; }
.sb-bar .d { background: var(--died); }
.sb-bar .j { background: var(--injured); }
.sb-bar .s { background: var(--none); }
.sb-bar .r { background: var(--faint); }
.sb-bar.zero::after { content: ""; display: block; height: 2px; background: var(--line); }
.sb-bar.future { border-bottom: 1px dashed var(--line); cursor: default; }
.sb-bar:not(.future):hover i { filter: brightness(1.4); }
.sb-bar.cur { box-shadow: 0 2px 0 var(--fresh); }
.sb-axis, .sb-hax { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; color: var(--dim); line-height: 1; }
/* The mini map and the hour strip share a row of one height, tops and bottoms level. */
.sb-where { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: var(--space-in); align-items: stretch; }
.mm svg { display: block; width: 100%; height: auto; border-radius: 6px; overflow: hidden; }
.mm-land { fill: var(--bg-3); }
.mm-water { fill: #0e1f2e; }
.mm-coast { fill: none; stroke: #3a6684; stroke-width: 0.8px; vector-effect: non-scaling-stroke; opacity: 0.8; }
.mm-road { fill: none; stroke: var(--rail); stroke-width: 0.6px; vector-effect: non-scaling-stroke; opacity: 0.6; }
.mm-yarra { fill: none; stroke: #3a6684; stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0.8; }
.mm-c { fill: var(--none); fill-opacity: 0.85; stroke: var(--bg-2); stroke-width: 0.5px; vector-effect: non-scaling-stroke; }
.mm-c.died { fill: var(--died); }
.mm-c.injured { fill: var(--injured); }
.sb-when { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sb-when .density { flex: 1; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: 1px; height: auto; min-height: 40px; }
.sb-when .cell { cursor: help; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --col-when: 54px; --col-rail: 16px; --gap: 8px; }
  :root { --space: 16px; --space-in: 14px; }
  .top-inner { padding: 8px var(--space) 6px; grid-template-columns: auto 1fr auto; column-gap: 10px; }
  .brand { font-size: 11px; }
  .live { font-size: 10.5px; gap: 5px; }
  .btn { padding: 4px 8px; }
  .title .txt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .story.open .title .txt { display: block; -webkit-line-clamp: unset; }
  main { padding: var(--space) var(--space) 110px; }
  .dayhead { grid-template-columns: 1fr auto; row-gap: 4px; }
  .daystats { grid-column: 1 / -1; grid-row: 2; font-size: 10.5px; white-space: normal; }
  .density { grid-template-columns: repeat(24, 5px); column-gap: 1px; }
  .entry { grid-template-columns: var(--col-gutter) var(--col-when) var(--col-rail) minmax(0, 1fr); }
  .entry > div { padding: 8px 0; }
  .who { display: none; }
  .src-inline { display: inline-flex; margin-left: auto; flex: none; padding-left: 4px; }
  .when .t { font-size: 13.5px; }
  .when .basis { font-size: 9px; }
  .what { font-size: 13.5px; }
  .entry.fold .what { font-size: 12px; }
  .detail .drow { grid-template-columns: 1fr; gap: 2px; }
}
