/* Alibi console, Design 1.0: a dark operations floor in the logo's crimson and iron, glass panels over a live globe.
   Crimson is the brand and alerts, ice-blue is anything you can select, amber warns. Threat-type colours follow the
   Okabe-Ito palette, which stays distinguishable with colour blindness. Every text colour passes WCAG AA on --bg. */
:root {
  /* surfaces, darkest first */
  --bg: #06080b; --panel: #0b1017; --panel-2: #111821; --raise: #18212c;
  --glass: rgba(10, 14, 20, 0.74); --glass-strong: rgba(7, 10, 15, 0.92);
  --line: rgba(148, 163, 184, 0.14); --line-2: rgba(148, 163, 184, 0.26);
  /* text */
  --ink: #e8eef5; --muted: #a9b5c2; --dim: #8b98a7;
  /* brand and interaction */
  --brand: #e5383b; --brand-hi: #ff5a5f; --brand-soft: rgba(229, 56, 59, 0.14);
  --accent: #7dd3fc; --accent-soft: rgba(125, 211, 252, 0.12); --blue: var(--accent); --blue-soft: var(--accent-soft);
  --amber: #f5a524;
  /* severity, worst first */
  --sev-critical: #ff4d4f; --sev-high: #ff8a3d; --sev-medium: #f5a524; --sev-low: #3fb950; --sev-info: #7dd3fc;
  --ok: var(--sev-low); --warn: var(--sev-medium); --orange: var(--sev-high); --risk: var(--sev-critical);
  --risk-soft: rgba(255, 77, 79, 0.14);
  /* threat types (Okabe-Ito) */
  --c2: #d55e00; --dl: #e69f00; --tor: #cc79a7; --drop: #f0e442; --cable: #56b4e9;
  /* type, spacing, shape, depth, motion */
  --sans: "Plex Sans", "Segoe UI", system-ui, sans-serif; --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  --hud: "Chakra Petch", "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 4px; --r-lg: 6px;
  --e1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.35);
  --e2: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 60px rgba(0, 0, 0, 0.55);
  --t-fast: 120ms; --t: 200ms; --t-slow: 320ms; --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --bar-h: 48px;
  color-scheme: dark;
}
::selection { background: var(--brand-soft); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; }
h1, h2 { font-family: var(--hud); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
h1 { font-size: 22px; }
h2 { font-size: 20px; }
.mono, .num, .bar .n, .tl-stat b, .toplist b { font-family: var(--mono); }
.mono, .num, .bar .n, .tl-stat b, .toplist b, .kpi .v, td, .meta { font-variant-numeric: tabular-nums slashed-zero; }
.muted { color: var(--muted); }
.fineprint { color: var(--dim); font-size: 12px; }
.label { font: 600 11px var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.err { color: var(--risk); font-size: 13px; }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 1000; height: var(--bar-h); display: flex; align-items: center; gap: 18px;
  padding: 0 16px; background: var(--glass-strong); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px var(--hud); letter-spacing: 0.3em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mark { width: 32px; height: 32px; display: block; filter: drop-shadow(0 0 10px rgba(229, 56, 59, 0.35)); }
.brand .word { display: flex; flex-direction: column; line-height: 1; }
.brand small { margin-top: 4px; font: 600 9px var(--hud); letter-spacing: 0.24em; color: var(--dim); text-transform: uppercase; }

/* ---- pages ---- */
.page { max-width: 1320px; margin: 16px auto 24px; padding: 20px 22px 28px; background: rgba(6, 8, 11, 0.74);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.page .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12, 17, 24, 0.86); }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head .sub { color: var(--muted); margin: 0; font-size: 13px; }
.updated { margin: 0 0 10px; font: 11px var(--mono); color: var(--dim); }
.panel { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  margin: 0 0 12px; box-shadow: var(--e1); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
/* HUD corner brackets: top left and bottom right */
.panel::before, .panel::after { content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none; opacity: 0.75; }
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: var(--r); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); border-bottom-right-radius: var(--r); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .panel { background: var(--panel); } }
@media (prefers-reduced-transparency: reduce) { .panel, .ov.panel, .ov .panel { background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.panel > h3, details.panel > summary h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 600 11.5px var(--hud); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin: -12px -14px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.panel > h3::before, details.panel > summary h3::before { content: ""; width: 6px; height: 6px; flex: none; margin-right: -2px;
  background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.panel > h3, details.panel > summary h3 { justify-content: flex-start; }
.panel > h3 > .meta, .panel > h3 > button, .panel > h3 > a, details.panel > summary h3::after { margin-left: auto; }
.panel h3 .meta { font: 11px var(--mono); letter-spacing: 0; text-transform: none; color: var(--dim); }
details.panel > summary { list-style: none; cursor: pointer; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel:not([open]) > summary h3 { margin-bottom: -12px; border-bottom: 0; }
details.panel > summary h3::after { content: "+"; font: 13px var(--mono); color: var(--dim); }
details.panel[open] > summary h3::after { content: "−"; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.grid2 > .panel, .grid3 > .panel { margin: 0 0 12px; }
.grid2.flat { gap: 18px; }
.callout { border-left: 3px solid var(--blue); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 12px; overflow: hidden; box-shadow: var(--e1); }
.kpi { background: var(--panel); padding: 14px 16px; }
.kpi .v { font: 600 26px/1.1 var(--hud); color: #fff; letter-spacing: 0.01em; }
.kpi .l { color: var(--muted); font-size: 12px; margin-top: 3px; }

.bars { display: flex; flex-direction: column; gap: 5px; }
.bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 84px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bar .track { background: var(--panel-2); height: 10px; border-radius: 1px; overflow: hidden; }
.bar .fill { background: var(--blue); height: 100%; }
.bar .n { text-align: right; color: var(--ink); font-size: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.list li span:last-child { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.spark i { flex: 1; background: var(--c2); opacity: 0.85; min-height: 1px; }
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.modules a { display: block; background: var(--panel); padding: 10px 12px; color: var(--ink); }
.modules a:hover { background: var(--raise); text-decoration: none; }
.modules b { display: block; font-size: 13px; }
.modules span { color: var(--muted); font-size: 12px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font: 600 11px var(--hud); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line-2); padding: 7px 8px; }
.table td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
.table tbody tr:hover td { background: var(--panel-2); }
.num { text-align: right; white-space: nowrap; }
tr.click { cursor: pointer; }
tr.detail td { background: var(--panel-2); color: var(--muted); font-size: 12.5px; }
.tag { display: inline-block; font: 500 11px var(--mono); padding: 0 6px; border-radius: 2px; background: var(--risk-soft); color: var(--risk); }
.field { width: 100%; max-width: 360px; height: 30px; padding: 0 10px; margin-bottom: 8px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 13px var(--sans); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); font: 500 12.5px var(--sans); cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06121a; font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.icon { width: 34px; justify-content: center; padding: 0; font-size: 12px; }
.btn.on { border-color: var(--blue); color: var(--blue); }
button.link { border: 0; background: none; color: var(--blue); cursor: pointer; font: 12px var(--sans); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips button { height: 28px; padding: 0 11px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel);
  color: var(--muted); font: 12.5px var(--sans); cursor: pointer; }
.chips button:hover { color: var(--ink); }
.chips button.on { border-color: var(--blue); color: var(--ink); background: var(--blue-soft); }
.chips.small button { height: 26px; font-size: 12px; }

/* ---- forms and verdict ---- */
.form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.form select, .form input[type=number], label.inline input { display: block; width: 100%; margin-top: 3px; height: 30px; padding: 0 8px;
  border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 13px var(--sans); }
.form label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
label.inline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 8px 0; }
label.inline input { width: 80px; margin: 0; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 2px; font: 700 12px var(--hud); letter-spacing: 0.14em; }
.LOW { background: rgba(63, 185, 80, .15); color: var(--ok); }
.MEDIUM { background: rgba(210, 153, 34, .15); color: var(--warn); }
.HIGH { background: rgba(240, 136, 62, .15); color: var(--orange); }
.CRITICAL { background: var(--risk-soft); color: var(--risk); }
.verdict .say { font-size: 17px; font-weight: 600; margin: 10px 0 4px; }
.verdict ul { padding-left: 18px; margin: 6px 0; }
.meter { height: 6px; background: var(--panel-2); overflow: hidden; margin: 8px 0 4px; }
.meter > div { height: 100%; transition: width .5s; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 10px; font-size: 13px; }
.facts div { background: var(--panel-2); padding: 7px 9px; }
.facts b { display: block; font: 500 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.howto { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.howto summary { cursor: pointer; color: var(--blue); }
.trip-map { height: 300px; }
.leaflet-container { background: var(--bg); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed a { color: var(--ink); font-weight: 500; }
.feed small { display: block; color: var(--dim); font: 11px var(--mono); }
.feed li.vid { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: start; }
.feed li.vid img { width: 112px; aspect-ratio: 16/9; object-fit: cover; background: var(--line); }
.sources li { margin-bottom: 5px; font-size: 13px; }
.place { background: var(--blue-soft); border-left: 2px solid var(--blue); padding: 7px 10px; margin-bottom: 10px; font-size: 13px; }
.rank { font: 12px var(--mono); color: var(--blue); }
.journey { padding-left: 20px; margin: 6px 0; font-size: 13px; }
.journey button { border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 12px; }
.hop { border-left: 2px solid var(--line-2); padding: 3px 0 3px 9px; margin: 7px 0; font-size: 12.5px; }
.hop.LOW { border-color: var(--ok); background: none; color: var(--ink); }
.hop.MEDIUM { border-color: var(--warn); background: none; color: var(--ink); }
.hop.HIGH, .hop.CRITICAL { border-color: var(--risk); background: none; color: var(--ink); }
.toplist { margin: 0; padding-left: 22px; font-size: 12.5px; }
.toplist li { padding: 2px 0; }
.toplist li span { display: inline-block; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.toplist li b { float: right; font-weight: 400; }

/* ---- globe stage: the globe fills the screen, panels float over it ---- */
.stage-tab { padding: 0; }
.stage { position: fixed; z-index: 2; top: var(--bar-h); left: var(--rail-w); right: 0; bottom: 0; pointer-events: none; }
.stage > * { pointer-events: auto; }
#globe { position: absolute; inset: 0; cursor: grab; }
#globe.flat { cursor: crosshair; display: grid; place-items: center; }
#globe.flat img { max-width: 100%; max-height: 100%; }
.ov { position: absolute; z-index: 5; }
.ov.panel, .ov .panel { background: var(--glass); box-shadow: var(--e2); }
.ov-left { top: 12px; left: 12px; width: 340px; max-height: calc(100% - 108px); overflow: auto; margin: 0; scrollbar-width: thin; }
.ov-left > .panel { margin-bottom: 10px; }
.ov-right { top: 12px; right: 12px; width: 320px; max-height: calc(100% - 120px); overflow: auto; }
.ov-right .panel { margin-bottom: 10px; }
.ov-bottom { left: 12px; right: 12px; bottom: 12px; margin: 0; display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.ov-close, .ov-toggles { display: none; }
.group { padding: 8px 0; border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: 0; }
.group .label { margin-bottom: 6px; }
.radio-list { display: flex; flex-direction: column; gap: 2px; }
.radio-list button { text-align: left; border: 0; background: none; color: var(--muted); padding: 5px 8px; font: 12.5px var(--sans);
  border-left: 2px solid transparent; cursor: pointer; }
.radio-list button:hover { color: var(--ink); background: var(--panel-2); }
.radio-list button.on { color: var(--ink); border-left-color: var(--blue); background: var(--blue-soft); }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); padding: 3px 0; cursor: pointer; }
.checks .n { margin-left: auto; font: 11px var(--mono); color: var(--dim); }
.sw { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.sw.c2 { background: var(--c2); } .sw.dl { background: var(--dl); } .sw.tor { background: var(--tor); }
.sw.drop { background: var(--drop); } .sw.cable { background: var(--cable); border-radius: 1px; }
.legend { font-size: 12px; color: var(--muted); }
.legend b { font-weight: 500; color: var(--ink); }
.legend .bins { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; margin-top: 6px; }
.legend .bins span { display: flex; align-items: center; gap: 6px; font: 11.5px var(--mono); }
.legend .bins i { width: 14px; height: 9px; flex: none; }
.about summary { cursor: pointer; font-size: 12px; color: var(--blue); }
.about p { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.timeline .tl-main { flex: 1; min-width: 0; }
.tl-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.tl-head .mono { font-size: 11px; color: var(--ink); }
.hist { display: flex; align-items: flex-end; gap: 1px; height: 30px; }
.hist i { flex: 1; background: var(--line-2); min-height: 1px; }
.hist i.past { background: var(--c2); }
.tl-stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 62px; }
.tl-stat b { font: 600 18px var(--hud); }
.tour-caption { position: absolute; z-index: 6; left: 50%; top: 18px; transform: translateX(-50%); max-width: min(560px, 80%);
  background: rgba(11, 14, 18, 0.9); border: 1px solid var(--line-2); border-left: 3px solid var(--blue); padding: 9px 14px; font-size: 14px; }
.tour-caption .label { display: block; margin-bottom: 2px; }
.globe-tip { background: rgba(11, 14, 18, 0.95); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 7px 9px; font-size: 12px; line-height: 1.5; }
.globe-tip.floating { position: absolute; z-index: 7; pointer-events: none; max-width: 260px; }
.globe-poster { position: absolute; inset: 0; display: grid; place-items: center; }
.globe-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .45; }
.globe-poster span { position: relative; font: 12px var(--mono); color: var(--muted); background: rgba(0,0,0,.6); padding: 5px 10px; }

/* ---- loading, errors ---- */
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.is-loading .kpis:empty, .is-loading .bars:empty, .is-loading tbody:empty, .is-loading .feed:empty, .is-loading .list:empty, .is-loading .spark:empty {
  min-height: 80px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.is-loading tbody:empty { display: block; }
.load-error { border-color: var(--risk); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.empty { margin: 4px 0; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .is-loading .kpis:empty, .is-loading .bars:empty { animation: none; } }

.foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 14px 16px 22px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }

/* ---- phones and tablets: the globe stays full screen, panels become sheets ---- */
@media (max-width: 900px) {
  .topbar { gap: 10px; padding: 0 10px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .ov-left, .ov-right { display: none; top: auto; left: 8px; right: 8px; bottom: 116px; width: auto; max-height: 55%; }
  .ov-left.open, .ov-right.open { display: block; }
  .ov-close { display: inline; }
  .ov-toggles { display: flex; gap: 6px; position: absolute; z-index: 6; top: 10px; left: 10px; }
  .ov-bottom { left: 8px; right: 8px; bottom: 8px; flex-wrap: wrap; gap: 8px; }
  .timeline .tl-main { flex-basis: 100%; order: -1; }
  .tl-stat { min-width: 0; }
  .facts { grid-template-columns: 1fr; }
  .tour-caption { top: 52px; }
}
@media (max-width: 560px) {
  .brand { letter-spacing: 0.1em; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 18px; }
}
body.on-globe .foot { display: none; }
/* OpenStreetMap tiles dimmed to match the dark console (display filter only; same map data) */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }
/* icons: Lucide, drawn with the text colour */
.ico { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; stroke: currentColor; fill: none; }
.btn .ico { width: 15px; height: 15px; }
.btn.icon .ico { width: 16px; height: 16px; }
.ov-close .ico, .journey button .ico { width: 14px; height: 14px; }
/* ---- module rail: icons on the left, labels on hover, counts of what is new ---- */
:root { --rail-w: 64px; }
.rail { position: fixed; z-index: 990; top: var(--bar-h); bottom: 0; left: 0; width: var(--rail-w); display: flex; flex-direction: column;
  align-items: center; gap: 4px; padding: 12px 0; background: var(--glass-strong); border-right: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
main, .foot { margin-left: var(--rail-w); }
.rail a { position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: var(--dim); border: 1px solid transparent;
  border-radius: var(--r); transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast); }
.rail a .ico { width: 21px; height: 21px; }
.rail a:hover { color: var(--ink); background: var(--accent-soft); text-decoration: none; }
.rail a.on { color: var(--accent); background: var(--accent-soft); border-color: rgba(125, 211, 252, 0.25); }
.rail a.on::before { content: ""; position: absolute; left: -11px; top: 9px; bottom: 9px; width: 3px; background: var(--brand);
  box-shadow: 0 0 12px var(--brand); }
.rail .lbl { position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); padding: 5px 9px; white-space: nowrap;
  font: 600 11px var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); background: var(--glass-strong);
  border: 1px solid var(--line-2); border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast); }
.rail a:hover .lbl, .rail a:focus-visible .lbl { opacity: 1; transform: translate(0, -50%); }
.rail .count { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 15px; padding: 0 4px; border-radius: 2px;
  font: 600 9.5px/15px var(--mono); color: #fff; background: var(--brand); text-align: center; }
.rail .sep { width: 28px; height: 1px; background: var(--line); margin: 6px 0; }
@media (max-width: 900px) {
  :root { --rail-w: 0px; --rail-h: 58px; }
  .rail { top: auto; bottom: 0; right: 0; width: auto; height: calc(var(--rail-h) + env(safe-area-inset-bottom)); flex-direction: row;
    justify-content: space-around; padding: 0 4px env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--line); }
  .rail a { width: 40px; height: 44px; }
  .rail a .ico { width: 20px; height: 20px; }
  .rail a.on::before { left: 8px; right: 8px; top: -8px; bottom: auto; width: auto; height: 3px; }
  .rail .lbl, .rail .sep { display: none; }
  main, .foot { padding-bottom: calc(var(--rail-h) + env(safe-area-inset-bottom)); }
  .stage, .world { bottom: calc(var(--rail-h) + env(safe-area-inset-bottom)); }
}
/* ---- HUD status strip ---- */
.hud { display: flex; align-items: stretch; height: 32px; margin-left: 10px; border: 1px solid var(--line); border-radius: var(--r); }
.hud .cell { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-right: 1px solid var(--line); white-space: nowrap;
  font: 600 10.5px var(--hud); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.hud .cell:last-child { border-right: 0; }
.hud .k { position: relative; top: 1px; }
.hud .v { font: 500 12.5px var(--mono); letter-spacing: 0; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.hud .clock .v { font-size: 14px; color: #fff; }
.hud .live .v { font: 700 11px var(--hud); letter-spacing: 0.18em; color: var(--brand-hi); }
.hud .live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: live-pulse 1.6s infinite; }
.hud .live.stale .v { color: var(--amber); }
.hud .live.stale .dot { background: var(--amber); animation: none; }
.hud .warn, .hud .warn .v { color: var(--amber); }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 56, 59, 0.65); } 70% { box-shadow: 0 0 0 9px rgba(229, 56, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 56, 59, 0); } }
@media (prefers-reduced-motion: reduce) { .hud .live .dot { animation: none; } }
@media (max-width: 1360px) { .hud .map { display: none; } }
@media (max-width: 1180px) { .hud .data { display: none; } .brand small { display: none; } }
@media (max-width: 900px) { .hud .feeds { display: none; } .hud { margin-left: auto; } .hud .cell { padding: 0 9px; } }
@media (max-width: 560px) { .hud .clock .k { display: none; } }
/* ---- the world: the live globe sits behind every module ---- */
.world { position: fixed; z-index: 0; top: var(--bar-h); left: var(--rail-w); right: 0; bottom: 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #0f1622 0%, #05070a 72%); transition: filter var(--t-slow) var(--ease); }
body.on-sheet .world { filter: brightness(0.4) saturate(0.8); pointer-events: none; }
main, .foot { position: relative; z-index: 1; }
@media (max-width: 900px) { .page { margin: 0; border-radius: 0; border-width: 0 0 1px; } }
@media (prefers-reduced-transparency: reduce) { .page { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
/* ---- live situation: the headline numbers over the globe ---- */
.situation .hero { display: flex; align-items: flex-end; gap: 10px; }
.situation .hero b { font: 700 52px/0.9 var(--hud); letter-spacing: 0.01em; background: linear-gradient(180deg, #fff 25%, #ffb3b5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.situation .delta { margin-bottom: 5px; padding: 3px 6px; font: 600 11px var(--mono); color: var(--brand-hi); background: var(--brand-soft);
  border: 1px solid rgba(229, 56, 59, 0.35); border-radius: 2px; }
.situation .hero-l { margin: 8px 0 0; font-size: 13px; font-weight: 500; }
.situation .hero-s { margin: 2px 0 0; font: 12px var(--mono); color: var(--dim); }
.spark.mini { height: 44px; margin: 12px 0 4px; gap: 2px; }
.spark.mini i { background: linear-gradient(180deg, var(--brand-hi), rgba(229, 56, 59, 0.25)); opacity: 1; }
.situation .axis { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--dim); }
.kgrid { display: grid; grid-template-columns: 1fr 1fr; margin: 12px -14px -12px; border-top: 1px solid var(--line); }
.kgrid .kpi { background: none; padding: 11px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kgrid .kpi:nth-child(2n) { border-right: 0; }
.kgrid .kpi:nth-last-child(-n + 2) { border-bottom: 0; }
.kgrid .kpi .v { font-size: 22px; }
.kgrid .kpi .l { font-size: 11.5px; line-height: 1.35; }
/* ---- search trigger and command palette ---- */
.search { margin-left: auto; display: flex; align-items: center; gap: 9px; width: 340px; height: 34px; padding: 0 8px 0 11px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(255, 255, 255, 0.03); color: var(--dim);
  font: 13px var(--sans); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast); }
.search:hover { border-color: var(--accent); color: var(--muted); }
.search span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 10.5px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px;
  padding: 1px 5px; background: rgba(255, 255, 255, 0.03); }
.palette { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: start center; padding-top: 12vh;
  background: rgba(3, 4, 6, 0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.palette[hidden] { display: none; }
.palette-box { width: min(680px, calc(100vw - 24px)); padding: 0; margin: 0; background: var(--glass-strong); box-shadow: var(--e2);
  animation: pop var(--t) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.985); } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--line); }
.palette-input .ico { width: 18px; height: 18px; color: var(--accent); }
.palette-input input { flex: 1; height: 100%; border: 0; background: none; color: var(--ink); font: 15px var(--sans); outline: none; }
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); cursor: pointer; }
.palette-list li .k { width: 74px; flex: none; font: 600 10px var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.palette-list li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list li[aria-selected="true"] { background: var(--accent-soft); color: #fff; }
.palette-list li[aria-selected="true"] .k { color: var(--accent); }
.palette-list li.none { color: var(--dim); cursor: default; }
.palette-detail:empty { display: none; }
.palette-detail { max-height: 38vh; overflow: auto; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.palette-detail h3 { font: 600 15px var(--mono); margin: 0 0 6px; }
.palette-detail h4 { margin: 10px 0 4px; font: 600 11px var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.palette-detail ul { margin: 0; padding-left: 18px; }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }
@media (max-width: 900px) {
  .search { width: 36px; padding: 0; justify-content: center; margin-left: 8px; }
  .search span, .search kbd { display: none; }
  .palette { padding-top: 8px; }
  .palette-foot { display: none; }
}
/* ---- keyboard shortcuts ---- */
.hbtn { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 8px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(255, 255, 255, 0.03); color: var(--dim); cursor: pointer; }
.hbtn:hover { color: var(--accent); border-color: var(--accent); }
.help-box { width: min(520px, calc(100vw - 24px)); padding: 12px 14px 16px; }
.help-box .ico { width: 15px; height: 15px; }
.keys { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 4px 0 0; font-size: 13px; }
.keys dt { text-align: right; }
.keys dd { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .hbtn { display: none; } }
/* ---- the wire: a ticker of the newest real events ---- */
:root { --wire-h: 34px; }
body { padding-bottom: var(--wire-h); }
.stage, .world { bottom: var(--wire-h); }
.wire { position: fixed; z-index: 995; left: var(--rail-w); right: 0; bottom: 0; height: var(--wire-h); display: flex; align-items: stretch;
  background: var(--glass-strong); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.wire-label { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-right: 1px solid var(--line);
  font: 700 11px var(--hud); letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand-hi); }
.wire-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: live-pulse 1.6s infinite; }
.wire-track { flex: 1; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.wire-run { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 34px; white-space: nowrap; padding-left: 20px;
  animation: wire-scroll var(--wire-dur, 90s) linear infinite; }
.wire:hover .wire-run, .wire:focus-within .wire-run { animation-play-state: paused; }
@keyframes wire-scroll { to { transform: translateX(-50%); } }
.wire-item { display: inline-flex; align-items: baseline; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted);
  font: 12.5px var(--sans); }
.wire-item:hover em { color: #fff; text-decoration: underline; }
.wire-item b { font: 700 10px var(--hud); letter-spacing: 0.16em; }
.wire-item time { font: 11px var(--mono); color: var(--dim); }
.wire-item em { font-style: normal; color: var(--ink); }
.wire-item.c2 b { color: var(--c2); } .wire-item.dl b { color: var(--dl); } .wire-item.kev b { color: var(--amber); }
.wire-item.breach b { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .wire-run { animation: none; position: static; } .wire-track { overflow-x: auto; } }
@media (max-width: 900px) { :root { --wire-h: 0px; } .wire { display: none; } }
