/* LIVE MONITOR — its own identity: night-vision satellite, phosphor HUD, monospace. */
body.live { --ink: #d9f5e6; --ink-2: #9cc4ae; --ink-3: #7aa58f; --line: rgba(62,240,160,.14); --line-2: rgba(62,240,160,.3);
  --panel: rgba(2,10,7,.78); --panel-solid: #03100b; overflow: hidden; background: #010302; }
body.live .brand b { color: var(--live); }
#app { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: #010302; }
.scan { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    repeating-linear-gradient(to bottom, rgba(62,240,160,.025) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 110% 85% at 50% 50%, transparent 55%, rgba(0,0,0,.7) 100%);
}
.live .panel { border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.7), inset 0 0 0 1px rgba(62,240,160,.04); }
.live .eyebrow { color: var(--live); opacity: .85; }

/* status strip */
.strip {
  position: absolute; z-index: 20; top: 60px; left: 18px; right: 18px;
  display: flex; align-items: stretch; gap: 8px; flex-wrap: nowrap;
  font: 500 11px/1.25 var(--f-mono); color: var(--ink-2);
}
.strip .cell { padding: 9px 12px; display: flex; align-items: center; gap: 10px; }
.clock b { font: 600 18px/1 var(--f-mono); color: var(--ink); letter-spacing: .02em; }
.clock small { display: block; font-size: 9.5px; letter-spacing: .18em; color: var(--ink-3); margin-bottom: 3px; }
.feed { min-width: 0; flex: 1 1 0; }
.feed > div { min-width: 0; }
.feed .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refresh { flex: none; }
.feed .lamp { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.feed[data-health="ok"] .lamp { background: var(--live); box-shadow: 0 0 10px var(--live); animation: pulse 2s infinite; }
.feed[data-health="stale"] .lamp { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.feed[data-health="down"] .lamp { background: var(--down); box-shadow: 0 0 8px var(--down); }
.feed[data-health="pending"] .lamp, .feed[data-health="off"] .lamp { background: transparent; border: 1.5px solid var(--ink-3); }
.feed .nm { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.feed .st { font-weight: 700; letter-spacing: .12em; }
.feed[data-health="ok"] .st { color: var(--live); }
.feed[data-health="stale"] .st { color: var(--warn); }
.feed[data-health="down"] .st { color: var(--down); }
.feed[data-health="pending"] .st, .feed[data-health="off"] .st { color: var(--ink-3); }
.feed .sub { color: var(--ink-3); font-size: 10.5px; }
.refresh { margin-left: auto; }
.banner { position: absolute; z-index: 25; top: 124px; left: 50%; transform: translateX(-50%);
  background: #2a0b0e; border: 1px solid var(--down); color: #ffd6da; padding: 9px 14px; border-radius: 6px;
  font: 500 12px/1.4 var(--f-mono); display: none; max-width: calc(100% - 32px); }
.banner.show { display: block; }

/* columns */
.col { position: absolute; z-index: 12; top: 128px; bottom: 18px; width: 360px; display: flex; flex-direction: column; overflow: hidden; }
.col.left { left: 18px; }
.col.right { right: 18px; }
.col .scroll { overflow-y: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: #3ef0a033 transparent; flex: 1; }
.col h2 { font: 400 26px/1.1 var(--f-display); margin: 6px 0 4px; color: var(--ink); }
.col .lead { font-size: 12px; color: var(--ink-2); margin: 0 0 12px; line-height: 1.45; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.kpis div { background: var(--panel-solid); padding: 10px; }
.kpis b { display: block; font: 500 24px/1 var(--f-mono); color: var(--ink); }
.kpis b.hot { color: var(--alert); text-shadow: 0 0 14px rgba(255,90,54,.5); }
.kpis span { font-size: 10px; color: var(--ink-3); letter-spacing: .06em; line-height: 1.3; display: block; margin-top: 5px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list button { width: 100%; text-align: left; background: rgba(62,240,160,.03); border: 1px solid var(--line); border-radius: 4px; padding: 10px 11px; cursor: pointer; transition: border-color .2s, background .2s; }
.list button:hover, .list button.sel { border-color: var(--line-2); background: rgba(62,240,160,.07); }
.list .r1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.list .nm { font-weight: 600; font-size: 13px; color: var(--ink); }
.list .n { font: 700 13px var(--f-mono); color: var(--alert); white-space: nowrap; }
.list .r2 { font: 400 11px/1.45 var(--f-mono); color: var(--ink-3); margin-top: 4px; }
.empty { font: 12px/1.5 var(--f-mono); color: var(--ink-3); padding: 14px; border: 1px dashed var(--line-2); border-radius: 4px; }
.src { font: 400 10.5px/1.5 var(--f-mono); color: var(--ink-3); margin-top: 12px; }
.src a { color: var(--ink-2); }

table.wx { width: 100%; border-collapse: collapse; font: 11.5px/1.3 var(--f-mono); table-layout: auto; }
table.wx th, table.wx td { padding-left: 3px !important; padding-right: 3px !important; }
table.wx th { text-align: left; font-weight: 500; font-size: 9.5px; letter-spacing: .14em; color: var(--ink-3); padding: 6px 4px; border-bottom: 1px solid var(--line); position: sticky; top: -16px; background: var(--panel-solid); }
table.wx th.r, table.wx td.r { text-align: right; }
table.wx td { padding: 7px 4px; border-bottom: 1px solid rgba(62,240,160,.06); color: var(--ink-2); vertical-align: middle; }
table.wx tr { cursor: pointer; }
table.wx tr:hover td, table.wx tr.sel td { background: rgba(62,240,160,.06); color: var(--ink); }
table.wx td .site { color: var(--ink); font-family: var(--f-sans); font-size: 12px; display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.wx td .stt { font-size: 10px; color: var(--ink-3); }
.arrow { display: inline-block; width: 12px; text-align: center; color: var(--live); }
.rain { color: #7cc7ff; }

.chart-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.chart-box h3 { margin: 0 0 4px; font: 600 12px var(--f-sans); color: var(--ink); }
.chart-box .hint { font: 10.5px/1.4 var(--f-mono); color: var(--ink-3); margin-bottom: 8px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--ink-3); font: 9.5px var(--f-mono); }
.chart .axis line, .chart .axis path { stroke: rgba(62,240,160,.12); }
.chart .grid line { stroke: rgba(62,240,160,.07); }
.tip { position: absolute; pointer-events: none; z-index: 5; background: #000; border: 1px solid var(--line-2); padding: 6px 8px; border-radius: 4px; font: 11px/1.4 var(--f-mono); color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .12s; }

/* bottom history dock */
.dock { position: absolute; z-index: 11; left: 396px; right: 396px; bottom: 18px; padding: 12px 16px 10px; }
.dock .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* fire markers */
.fire { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #fff3c4 0 20%, #ff7a2e 45%, rgba(255,60,30,0) 72%); position: relative; }
.fire::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid rgba(255,90,54,.8); animation: ring 2.2s ease-out infinite; }
@keyframes ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.live .maplibregl-popup-content { font-family: var(--f-mono); font-size: 12px; }

@media (max-width: 1180px) {
  .col { width: 320px; }
  .dock { left: 354px; right: 354px; }
}
@media (max-width: 960px) {
  body.live { overflow: auto; overflow-x: hidden; }
  #app { position: relative; inset: auto; }
  #map { position: relative; height: 62vh; }
  .scan { height: 62vh; }
  .strip { position: relative; top: auto; left: auto; right: auto; padding: 64px 12px 8px; background: #010302; flex-wrap: wrap; }
  .feed { flex: 1 1 260px; }
  .strip .clock, .strip .refresh { flex: 1 1 30%; }
  .col, .dock { position: relative; top: auto; bottom: auto; left: auto; right: auto; width: auto; margin: 10px 12px; max-height: none; }
  .col .scroll { overflow: visible; }
  .col.left, .col.right { left: auto; right: auto; }
  .banner { top: 70px; }
}

.pass-box { font: 11.5px/1.5 var(--f-sans); color: var(--ink-2); background: rgba(62,240,160,.05); border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; margin: 0 0 12px; }
.pass-box b { color: var(--ink); }
table.wx td small.km { display: block; font-size: 9.5px; color: var(--ink-3); }
