/* jafo — "river" wall: time is the axis. Every incident is a bar from its first call to its last,
   aircraft fly above, radio flows below, now advances to the right.
   1rem == 10px at 1920x1080 and scales linearly with the screen (fits 1366 → 4K). */
:root {
  color-scheme: dark;
  --bg: #070b10;
  --bg-2: #0a1016;
  --lane: #0a0f15;
  --panel: #0c1219;
  --raise: #121a23;
  --line: rgba(150, 180, 210, 0.10);
  --line-2: rgba(150, 180, 210, 0.18);
  --text: #dde4ec;
  --text-2: #93a0ae;
  --text-3: #5e6b79;
  --ink: #081017;
  /* kind hues: same as the other walls and /live */
  --k-violence: #eb6263; --k-fire: #eb6263; --k-medical: #00a888;
  --k-traffic: #338ced; --k-property: #338ced; --k-suspicious: #338ced; --k-other: #8a929e;
  --accent: #79b4f2;           /* now */
  --live: #2fb35f;
  --warn: #f0a33a;
  --font: "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --axis-h: 3.8rem;
  --air-h: 4rem;
  --radio-h: 13.6rem;
  font-size: calc(min(100vw / 1920, 100vh / 1080) * 10);
}
.k-violence { --kc: var(--k-violence); } .k-fire { --kc: var(--k-fire); } .k-medical { --kc: var(--k-medical); }
.k-traffic { --kc: var(--k-traffic); } .k-property { --kc: var(--k-property); } .k-suspicious { --kc: var(--k-suspicious); }
.k-other { --kc: var(--k-other); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 400 2rem/1.3 var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden; cursor: none;
}
body.mouse { cursor: default; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg.g { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.g.fill { fill: currentColor; stroke: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------------- layout ---------------- */
#wall {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: 1fr 52rem;
  grid-template-rows: 8.4rem 1fr;
  grid-template-areas: "top top" "river rail";
  animation: drift 1440s ease-in-out infinite alternate;   /* burn-in care: a few px over minutes */
}
@keyframes drift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(3px, 2px); }
  50% { transform: translate(-2px, 4px); }
  75% { transform: translate(-4px, -1px); }
  100% { transform: translate(2px, -3px); }
}
@media (prefers-reduced-motion: reduce) { #wall { animation: none; } }

/* ---------------- top bar ---------------- */
.top {
  grid-area: top; display: flex; align-items: center; gap: 3.2rem;
  padding: 0 3.2rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0b1118, #080c12); min-width: 0;
}
.brand { display: flex; align-items: center; gap: 1.4rem; flex: none; }
.b1 { font-size: 2.6rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1; }
.b1 span { font-weight: 500; color: var(--text-2); letter-spacing: 0.04em; margin-left: 0.6rem; }
.b2 { font-size: 1.7rem; color: var(--text-3); margin-top: 0.4rem; letter-spacing: 0.02em; }
.heli-mark { height: 4.2rem; width: auto; flex: none; filter: drop-shadow(0 0 12px rgba(60,110,255,.35)); animation: heli-bob 6s ease-in-out infinite; }
@keyframes heli-bob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .heli-mark { animation: none; } }

.heads { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3.6rem; overflow: hidden; }
.hd { display: flex; flex-direction: column; gap: 0.3rem; white-space: nowrap; }
.hd .n { font-size: 3.8rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.hd .n small { font-size: 2rem; font-weight: 500; color: var(--text-2); margin-left: 0.6rem; }
.hd .l { font-size: 1.4rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.hd .up { color: var(--warn); } .hd .dn { color: var(--text-2); }
.hd.circ .n { color: var(--warn); }
.hd .mix { display: flex; gap: 1.4rem; font-size: 1.7rem; color: var(--text-2); }
.hd .mix span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hd .mix svg { width: 1.4rem; height: 1.4rem; }
.hd.lagbox .n { font-size: 2.2rem; color: var(--warn); }

.clock { flex: none; text-align: right; }
.c-time { font-family: var(--mono); font-size: 4rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.c-time small { font-size: 2.2rem; color: var(--text-3); margin-left: 0.2rem; }
.c-date { font-size: 1.6rem; color: var(--text-3); margin-top: 0.4rem; letter-spacing: 0.04em; }

/* ---------------- river ---------------- */
.river { grid-area: river; display: grid; grid-template-columns: 9.6rem 1fr; min-height: 0; min-width: 0; background: var(--lane); border-right: 1px solid var(--line); }
.gutter, .slide { display: grid; grid-template-rows: var(--axis-h) var(--air-h) 1fr var(--radio-h); }
.gutter { border-right: 1px solid var(--line); background: var(--bg-2); }
.gutter > div { display: flex; flex-direction: column; justify-content: center; padding: 0 1.2rem; border-bottom: 1px solid var(--line); }
.gutter span { font-size: 1.4rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.gl-inc { justify-content: flex-start !important; padding-top: 1.6rem !important; }
.gl-radio { justify-content: flex-start !important; padding-top: 0.8rem !important; gap: 0; border-bottom: 0 !important; }
.gl-radio span { margin-bottom: 0.6rem; line-height: 1.4rem; }
.gl-radio em { font-style: normal; font-size: 1.4rem; line-height: 2.2rem; height: 2.2rem; color: var(--text-3); }

.canvas { position: relative; overflow: hidden; min-width: 0; }
.slide { position: absolute; inset: 0; will-change: transform; }
.slide.shift { transition: transform 1.8s cubic-bezier(.4, 0, .2, 1); }
.slide > .axis { grid-row: 1; position: relative; border-bottom: 1px solid var(--line); }
.slide > .lane-air { grid-row: 2; position: relative; border-bottom: 1px solid var(--line); }
.slide > .lane-inc { grid-row: 3; position: relative; }
.slide > .lane-radio { grid-row: 4; position: relative; border-top: 1px solid var(--line-2); background: rgba(5, 8, 12, 0.5); }
.grid { position: absolute; inset: 0; pointer-events: none; }
.grid i { position: absolute; top: var(--axis-h); bottom: 0; width: 1px; background: rgba(150, 180, 210, 0.045); }
.grid i.maj { background: rgba(150, 180, 210, 0.10); }
.grid .future { position: absolute; top: 0; bottom: 0; right: -40rem; background: repeating-linear-gradient(135deg, transparent 0 0.8rem, rgba(150, 180, 210, 0.035) 0.8rem 0.9rem); }
.grid .gapband { position: absolute; top: var(--axis-h); bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 0.7rem, rgba(150, 180, 210, 0.05) 0.7rem 0.8rem); }
.axis span { position: absolute; bottom: 0.8rem; transform: translateX(-50%); font-family: var(--mono); font-size: 1.6rem; color: var(--text-2); white-space: nowrap; }
.axis span.min { color: var(--text-3); font-size: 1.4rem; }
.axis span.day { color: var(--text); font-family: var(--font); font-weight: 600; font-size: 1.7rem; }
.edge-fade { position: absolute; left: 0; top: 0; bottom: 0; width: 1.6rem; background: linear-gradient(90deg, var(--lane), transparent); pointer-events: none; z-index: 6; }

/* now */
.nowline { position: absolute; top: 0; bottom: 0; width: 0.3rem; margin-left: -0.15rem; background: var(--accent); z-index: 5; pointer-events: none;
  box-shadow: 0 0 1.6rem rgba(121, 180, 242, 0.55); transition: left 1s linear; }
.nowline span { position: absolute; top: 0.5rem; right: 0.8rem; background: var(--accent); color: var(--ink); font: 600 1.6rem/1 var(--mono); padding: 0.5rem 0.8rem; border-radius: 0.5rem; white-space: nowrap; }
.nowline::after { content: ""; position: absolute; left: -0.55rem; bottom: 0; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); }

/* incidents */
.bar { position: absolute; height: var(--bh, 3rem); }
.bar .body { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0.6rem; overflow: hidden; background: color-mix(in srgb, var(--kc) 30%, var(--lane)); }
.bar .body::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.5rem; background: var(--kc); z-index: 1; }
.seg { position: absolute; top: 0; bottom: 0; }
.seg.s-new { background: color-mix(in srgb, var(--kc) 10%, var(--lane)); box-shadow: inset 0 0 0 0.2rem var(--kc); border-radius: 0.6rem; }
.seg.s-en_route { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--kc) 42%, var(--lane)) 0 0.6rem, color-mix(in srgb, var(--kc) 16%, var(--lane)) 0.6rem 1.2rem); }
.seg.s-on_scene { background: color-mix(in srgb, var(--kc) 46%, var(--lane)); }
.seg.s-cleared { background: color-mix(in srgb, var(--kc) 22%, var(--lane)); }
.tick { position: absolute; bottom: 0; height: 30%; width: 0.2rem; margin-left: -0.1rem; background: rgba(230, 238, 246, 0.5); z-index: 1; }
.um { position: absolute; top: -0.5rem; width: 1rem; height: 1rem; margin-left: -0.5rem; transform: rotate(45deg); background: var(--text); border: 0.2rem solid var(--lane); z-index: 2; }
.um.u-en_route, .um.u-dispatched { background: var(--lane); border-color: var(--text); }
.tail { position: absolute; bottom: 0; height: 0.3rem; background: repeating-linear-gradient(90deg, var(--kc) 0 0.8rem, transparent 0.8rem 1.4rem); opacity: 0.9; }
.bar.quiet .tail { opacity: 0.4; }
.cap { position: absolute; top: 0; bottom: 0; width: 0.4rem; background: var(--text-2); border-radius: 0 0.2rem 0.2rem 0; }
.bar.open .pulse { position: absolute; bottom: -0.45rem; width: 1.2rem; height: 1.2rem; margin-left: -0.6rem; border-radius: 50%; background: var(--kc); box-shadow: 0 0 0 0 var(--kc); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kc) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 1.2rem transparent; } }
.bar.done .body { filter: saturate(0.5); opacity: 0.6; }
.bar.done .blab { opacity: 0.7; }
.bar.hi .blab b { font-weight: 700; }
.bar.focus .body { box-shadow: 0 0 0 0.25rem var(--kc), 0 0 2.4rem color-mix(in srgb, var(--kc) 45%, transparent); filter: none; opacity: 1; }
.blab { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 0.8rem; white-space: nowrap; z-index: 3; overflow: hidden; text-overflow: ellipsis; }
.blab b { font-size: 2rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; min-width: 0; text-shadow: 0 0 0.4rem var(--lane), 0 0 0.8rem var(--lane); }
.blab em { font-style: normal; font-size: 1.6rem; color: var(--text-2); flex: none; }
.blab .kg { width: 1.9rem; height: 1.9rem; color: var(--kc); flex: none; }
.blab.in .kg { color: var(--text); }
.blab .ab { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 1.5rem; color: var(--warn); flex: none; }
.blab .ab svg { width: 1.7rem; height: 1.7rem; }
.dot { position: absolute; width: 1rem; height: 1rem; border-radius: 50%; background: var(--kc); opacity: 0.55; margin-left: -0.2rem; }
.lane-empty { position: absolute; left: 2.4rem; top: 50%; transform: translateY(-50%); font-size: 2rem; color: var(--text-3); white-space: nowrap; }
.lane-empty.sm { font-size: 1.6rem; }
.more-note { position: absolute; left: 2rem; bottom: calc(var(--radio-h) + 0.8rem); z-index: 7; font-size: 1.5rem; color: var(--text-2); background: rgba(10, 15, 21, 0.92); border: 1px solid var(--line-2); border-radius: 0.6rem; padding: 0.4rem 1rem; }

/* air */
.abar { position: absolute; height: 3rem; }
.abar .trk { position: absolute; left: 0; right: 0; top: 50%; height: 0.3rem; margin-top: -0.15rem; border-radius: 0.2rem; background: rgba(221, 228, 236, 0.42); }
.abar.heli .trk { background: rgba(221, 228, 236, 0.7); height: 0.4rem; }
.abar.live .trk::after { content: ""; position: absolute; right: -0.5rem; top: -0.45rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--text); }
.abar.circ .trk { background: color-mix(in srgb, var(--warn) 70%, transparent); }
.abar.circ.live .trk::after { background: var(--warn); animation: ping2 2s ease-out infinite; }
@keyframes ping2 { 0% { box-shadow: 0 0 0 0 rgba(240,163,58,.7); } 80%, 100% { box-shadow: 0 0 0 1.2rem transparent; } }
.alab { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 0.6rem; white-space: nowrap; padding: 0 0.6rem; background: var(--lane); border-radius: 0.4rem; }
.alab b { font-size: 1.7rem; font-weight: 600; }
.alab em { font-style: normal; font-size: 1.5rem; color: var(--text-2); }
.alab .badge { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); border: 0.15rem solid currentColor; border-radius: 0.4rem; padding: 0.2rem 0.5rem; }
.ag { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ag.fillg { fill: currentColor; stroke: none; }

/* radio */
#radioCv { position: absolute; left: 0; top: 0; }
.gaps { position: absolute; inset: 0; pointer-events: none; }
.gap { position: absolute; top: 0.6rem; bottom: 3.6rem; display: flex; align-items: center; justify-content: center; }
.gap span { font: 500 1.5rem/1 var(--mono); color: var(--text-2); background: var(--lane); border: 1px solid var(--line-2); padding: 0.5rem 0.9rem; border-radius: 0.5rem; white-space: nowrap; }

/* ---------------- rail ---------------- */
.rail { grid-area: rail; display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 1.6rem 2.4rem 1rem; font-size: 1.5rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.sec-c { font-family: var(--mono); letter-spacing: 0; text-transform: none; color: var(--text-2); font-size: 1.6rem; }
.open { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.o-list { flex: 1; min-height: 0; overflow: hidden; padding: 0 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.card { position: relative; padding: 1.2rem 1.4rem 1.2rem 2rem; border-radius: 0.8rem; background: var(--raise); border: 1px solid transparent; flex: none; transition: border-color .6s, box-shadow .6s; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.5rem; border-radius: 0.8rem 0 0 0.8rem; background: var(--kc); }
.card.focus { border-color: color-mix(in srgb, var(--kc) 70%, transparent); box-shadow: 0 0 2rem color-mix(in srgb, var(--kc) 22%, transparent); }
.c-h { display: flex; align-items: flex-start; gap: 1rem; }
.c-h .kg { width: 2.2rem; height: 2.2rem; color: var(--kc); flex: none; margin-top: 0.3rem; }
.c-t { font-size: 2.3rem; font-weight: 600; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-m { display: flex; align-items: center; gap: 1rem; margin-top: 0.6rem; font-size: 1.6rem; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.c-m .loc { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.c-m .age { margin-left: auto; font-family: var(--mono); font-size: 1.5rem; color: var(--text-3); flex: none; }
.c-line { margin-top: 0.7rem; font-size: 1.8rem; line-height: 1.3; color: var(--text); opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-line time { font-family: var(--mono); font-size: 1.4rem; color: var(--text-3); margin-right: 0.6rem; }
.c-u { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; max-height: 3.2rem; overflow: hidden; }
.upill { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; padding: 0.2rem 0.8rem; border-radius: 0.5rem; background: rgba(150, 180, 210, 0.07); color: var(--text-2); white-space: nowrap; }
.upill svg { width: 1.2rem; height: 1.2rem; }
.st { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--text); flex: none; }
.st svg { width: 1.3rem; height: 1.3rem; }
.st-quiet, .st-new { color: var(--text-2); }
.o-more { font-size: 1.6rem; color: var(--text-3); padding: 0.4rem 0.6rem; flex: none; }
.empty { color: var(--text-3); font-size: 1.9rem; line-height: 1.4; padding: 0.6rem 0.8rem; }
.sky { flex: none; border-top: 1px solid var(--line); }
.a-list { padding: 0 2.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.arow { display: flex; align-items: center; gap: 1rem; font-size: 1.8rem; white-space: nowrap; overflow: hidden; }
.arow b { font-weight: 600; }
.arow em { font-style: normal; color: var(--text-2); font-size: 1.6rem; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.arow .badge { margin-left: auto; flex: none; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); border: 0.15rem solid currentColor; border-radius: 0.4rem; padding: 0.2rem 0.6rem; }
.arow .ag { color: var(--text-2); }
.arow.circ .ag { color: var(--warn); }

.meta { flex: none; border-top: 1px solid var(--line); padding: 1.2rem 2.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; font-size: 1.4rem; color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; font-size: 1.4rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 0.6rem; }
.legend i { display: inline-block; width: 2.4rem; height: 1.2rem; border-radius: 0.3rem; }
.legend i.kc { background: var(--kc); }
.legend i.l-new { box-shadow: inset 0 0 0 0.2rem var(--text-2); }
.legend i.l-en { background: repeating-linear-gradient(135deg, var(--text-2) 0 0.3rem, transparent 0.3rem 0.6rem); }
.legend i.l-on { background: var(--text-2); }
.legend i.l-tail { height: 0.3rem; background: repeating-linear-gradient(90deg, var(--text-2) 0 0.6rem, transparent 0.6rem 1rem); }
.meta-row { display: flex; align-items: center; gap: 1.6rem; }
.conn { display: inline-flex; align-items: center; gap: 0.7rem; font-size: 1.5rem; color: var(--text-2); }
.cdot { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--live); }
.conn.bad { color: var(--warn); }
.conn.bad .cdot { background: var(--warn); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.updated { font-family: var(--mono); font-size: 1.4rem; }
.lag { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.5rem; color: var(--text-2); }
.lag svg { width: 1.5rem; height: 1.5rem; color: var(--warn); }
.walls { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.walls a { color: var(--text-3); opacity: 0.75; }
.walls a.on { color: var(--text-2); opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }

/* Privacy markers ⟦•••⟧ */
.hid { display: inline-block; padding: 0 0.5em; border-radius: 0.3em; background: rgba(150, 180, 210, 0.12); color: var(--text-3); font-size: 0.8em; filter: blur(0.3px); }

/* Sensitive tag (wall opened with ?sensitive=show) */
.sens-tag { display: inline-block; vertical-align: 0.18em; font: 700 clamp(11px, 0.42em, 22px)/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em; text-transform: uppercase; color: #c26a00; border: 1.5px solid currentColor;
  border-radius: 0.5em; padding: 0.32em 0.6em; margin-right: 0.45em; white-space: nowrap; }
.blab .sens-tag { font-size: 1.2rem; vertical-align: 0; flex: none; margin-right: 0; }

@media (prefers-reduced-motion: reduce) {
  .bar.open .pulse, .abar.circ.live .trk::after, .conn.bad .cdot { animation: none; }
  .slide.shift { transition: none; }
}
