/* Tactical Command Deck v2 — Obsidian dark, alarm red, finance amber, WCAG AA contrast, chamfered controls. */
:root {
  color-scheme: dark;
  --bg: #06080b;
  --panel: #0c1016;
  --panel2: #121821;
  --panel3: #18202c;
  --line: #1e2633;
  --line2: #2d3849;
  --line3: #425066;
  --text: #eef2f6;
  --muted: #aab6c4; /* ~8.8:1 on #0c1016 */
  --dim: #8493a5;   /* ~5.8:1 on #0c1016 — WCAG AA compliant */
  --red: #ff3b30;
  --red2: #b8241c;
  --red-bg: rgba(255, 59, 48, 0.14);
  --amber: #f5a623;
  --amber-bg: rgba(245, 166, 35, 0.14);
  --blue: #58b4e8;
  --grey: #9aa6b4;
  --out: #788492;
  --sans: "IBM Plex Sans", "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --mono: "Martian Mono", "Noto Sans TC", ui-monospace, monospace;
  --cut: 9px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; font: 14px/1.65 var(--sans); color: var(--text); font-feature-settings: "tnum";
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 100% 52px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 52px 100%,
    radial-gradient(100% 55% at 72% -8%, rgba(255, 59, 48, 0.11), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.fx::before {
  content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(180deg, transparent, rgba(255, 59, 48, 0.03) 72%, rgba(255, 255, 255, 0.04) 100%);
  animation: sweepy 11s linear infinite;
}
@keyframes sweepy { to { transform: translateY(calc(100vh + 120px)); } }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-color: rgba(88, 180, 232, 0.5); }
a:hover { color: #fff; text-decoration-color: var(--red); }
button, input, select { font: inherit; color: inherit; }
button, select, a, summary, [role="button"], [role="tab"] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: #000; }
h1, h2, h3 { margin: 0; }
.num { font-family: var(--mono); font-feature-settings: "tnum"; font-weight: 500; }
.wrap { max-width: 1340px; width: calc(100% - 44px); margin: 0 auto; }

/* HUD Frame */
.hud {
  --b: var(--line3); --k: 15px; position: relative;
  background:
    linear-gradient(var(--b), var(--b)) 0 0 / var(--k) 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 0 0 / 1px var(--k) no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 0 / var(--k) 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 0 / 1px var(--k) no-repeat,
    linear-gradient(var(--b), var(--b)) 0 100% / var(--k) 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 0 100% / 1px var(--k) no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 100% / var(--k) 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 100% / 1px var(--k) no-repeat,
    rgba(12, 16, 22, 0.92);
  box-shadow: inset 0 0 0 1px var(--line);
}
.panel { padding: 20px 22px; }

/* Alert Bar */
.alert {
  display: flex; align-items: stretch; gap: 14px; padding-right: 18px;
  border-bottom: 1px solid var(--red2); background: #160909; position: relative; z-index: 45;
}
.alert .lvl {
  padding: 9px 16px; color: #000; background: var(--red); font: 700 12px/1 var(--mono);
  letter-spacing: 0.06em; white-space: nowrap; display: flex; align-items: center;
}
.alert .lvl.hi {
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, #ff6c3f 10px 20px);
  background-size: 200% 100%; animation: hazard 1.3s linear infinite;
}
.alert .lvl.mid { background: var(--amber); }
.alert .lvl.lo { background: var(--grey); }
@keyframes hazard { to { background-position: -28px 0; } }
.alert .atext {
  flex: 1; min-width: 0; align-self: center; padding: 7px 0;
  color: #ffd4d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px;
}
.alert .atext b { font: 700 13px var(--mono); color: #fff; margin: 0 3px; }
.status {
  margin: 0; align-self: center; font: 500 11px/1.35 var(--mono); color: var(--muted);
  text-align: right; white-space: nowrap;
}
.status .warn { color: var(--amber); }
.status .err { color: #ff7c73; }
.status button { margin-left: 8px; padding: 3px 8px; --cut: 5px; }

/* Masthead + Ticker */
.mast {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6, 8, 11, 0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line2);
}
.mastrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 7px 0; flex-wrap: wrap; }
.name {
  font: 900 16px var(--sans); color: #fff; text-decoration: none; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.brand-sub { font: 500 10px var(--mono); color: var(--dim); border-left: 1px solid var(--line2); padding-left: 10px; }
.live { width: 9px; height: 9px; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); animation: live 1.7s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); } }
.regions { display: flex; gap: 5px; flex-wrap: wrap; }
.mast-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modes { display: flex; gap: 5px; flex-wrap: wrap; }
.tab-badge { font: 700 10px var(--mono); margin-left: 5px; padding: 1px 5px; background: rgba(245, 166, 35, 0.22); color: var(--amber); }
.modes button[aria-selected="true"] .tab-badge { background: rgba(0, 0, 0, 0.2); color: #000; }

/* Chamfered Tactical Controls */
.regions button, .modes button, .seg button, .more, .textbtn, .status button, .mini-ctrl, .chip-toggle {
  --sweep: var(--red); position: relative; border: 0; font: 600 12px var(--mono); letter-spacing: 0.03em;
  color: var(--muted); text-decoration: none; padding: 8px 12px; min-height: 36px; white-space: nowrap;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  background: linear-gradient(var(--sweep), var(--sweep)) no-repeat 0 0 / 0 100%, var(--panel2);
  box-shadow: inset 0 0 0 1px var(--line2);
  transition: background-size 0.28s cubic-bezier(0.6, 0, 0.2, 1), color 0.18s;
}
.regions button:not(:disabled):hover, .modes button:hover, .seg button:hover, .more:hover, .textbtn:hover, .status button:hover, .mini-ctrl:hover, .chip-toggle:hover {
  background-size: 100% 100%, auto; color: #000;
}
.regions button b { font: 700 11px var(--mono); margin-left: 6px; color: var(--dim); transition: color 0.18s; }
.regions button:hover b { color: #000; }
.regions button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(var(--sweep), var(--sweep)) no-repeat 0 0 / 0 100%, linear-gradient(var(--red), var(--red)) no-repeat 0 100% / 100% 2px, #1e0d10;
  box-shadow: inset 0 0 0 1px var(--red2);
}
.regions button[aria-pressed="true"]:hover { background-size: 100% 100%, 100% 2px, auto; }
.regions button[aria-pressed="true"] b { color: var(--red); }
.regions button[aria-pressed="true"]:hover b { color: #000; }
.regions button:disabled { cursor: default; opacity: 0.45; }
.modes button[aria-selected="true"] { color: #000; background: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg button { padding: 7px 11px; --cut: 6px; min-height: 34px; }
.seg button + button { margin-left: -1px; }
.seg button[aria-pressed="true"] { color: #000; background: var(--text); box-shadow: inset 0 0 0 1px var(--text); z-index: 1; }
.mini-ctrl { --cut: 6px; padding: 7px 10px; font-size: 11px; }
.mini-ctrl[aria-pressed="true"] { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.chip-toggle[aria-pressed="true"] { color: #000; background: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.textbtn { padding: 5px 10px; --cut: 6px; min-height: 32px; }
.regions button:active, .modes button:active, .seg button:active, .more:active { transform: translateY(1px); }

/* Always-Visible Global Company & Leak Lookup Bar */
.lookup-strip {
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.06), rgba(12, 16, 22, 0.96) 28%, rgba(12, 16, 22, 0.96));
  padding: 9px 0;
}
.lookup-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.lookup-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px 0 14px;
  background: #080b10;
  border: 1px solid var(--line3);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lookup-box:hover { border-color: var(--muted); }
.lookup-box:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 22px rgba(255, 59, 48, 0.16);
}
.lookup-prompt { font: 700 15px var(--mono); color: var(--red); flex-shrink: 0; }
.lookup-box input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none;
  font-size: 14px; color: #fff;
}
.lookup-box input:focus { outline: none; }
.lookup-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.lookup-box input::placeholder { color: var(--dim); }
.lookup-clear {
  border: 1px solid var(--line2); background: var(--panel2); color: var(--muted);
  padding: 4px 9px; font: 600 11px var(--mono); white-space: nowrap;
}
.lookup-clear:hover { border-color: var(--red); color: #fff; }
.lookup-kbd {
  font: 700 11px var(--mono); color: var(--dim);
  border: 1px solid var(--line2); background: var(--panel2);
  padding: 2px 7px; flex-shrink: 0;
}
.lookup-scope button { min-height: 44px; }

.lookup-panel {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  z-index: 65;
  background: #0a0e14;
  border: 1px solid var(--red2);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.82), inset 0 0 0 1px rgba(255, 59, 48, 0.15);
  max-height: min(72vh, 540px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lookup-verdict {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line2);
  background: #10151e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.verdict-main { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.verdict-dot { width: 9px; height: 9px; display: inline-block; flex-shrink: 0; }
.verdict-dot.hit { background: var(--red); box-shadow: 0 0 10px var(--red); }
.verdict-dot.warn { background: var(--amber); }
.verdict-dot.none { background: var(--blue); }
.verdict-main b { color: #fff; font-weight: 700; }
.lookup-results { overflow-y: auto; display: grid; }
.lookup-hit {
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: none; padding: 11px 16px;
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  transition: background 0.14s;
}
.lookup-hit:hover, .lookup-hit.sel { background: rgba(255, 59, 48, 0.12); }
.lookup-hit-meta { display: flex; flex-direction: column; gap: 3px; }
.lookup-hit-meta time { font: 500 11px var(--mono); color: var(--dim); }
.lookup-reg {
  display: inline-block; align-self: start;
  font: 700 10px var(--mono); padding: 1px 6px;
  background: var(--panel3); border: 1px solid var(--line3); color: #fff;
}
.lookup-reg.hk { border-color: var(--red2); color: #ffb3ad; background: rgba(255, 59, 48, 0.14); }
.lookup-hit-body { min-width: 0; display: grid; gap: 2px; }
.lookup-hit-title { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.38; }
.lookup-hit-title mark { background: rgba(245, 166, 35, 0.28); color: #fff; padding: 0 2px; }
.lookup-hit-sub { font-size: 12px; color: var(--dim); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lookup-hit-sub .sec-tag { font: 600 10px var(--mono); color: var(--amber); border: 1px solid rgba(245, 166, 35, 0.45); padding: 1px 5px; }
.lookup-hit-sub .imp-tag { font: 600 11px var(--mono); color: #ffb3ad; }

.lookup-empty { padding: 16px; display: grid; gap: 8px; }
.lookup-empty p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.65; }
.lookup-empty .empty-lead { font-size: 14px; font-weight: 700; color: #fff; }
.lookup-suggestions { padding: 12px 16px; display: grid; gap: 8px; }
.lookup-sug-label { font: 600 11px var(--mono); color: var(--dim); letter-spacing: 0.04em; }
.lookup-sug-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.lookup-sug-btn {
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  padding: 6px 11px; min-height: 34px; font-size: 12px; font-weight: 600;
}
.lookup-sug-btn:hover { border-color: var(--red); background: #1e1012; color: #fff; }
.lookup-foot {
  padding: 9px 16px; border-top: 1px solid var(--line); background: #080b10;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 500 11px var(--mono); color: var(--dim);
}

/* Ticker */
.ticker {
  display: flex; align-items: center; border-top: 1px solid var(--line); height: 34px;
  max-width: 100%; overflow: hidden; background: rgba(12, 16, 22, 0.85);
}
.ticker-tag {
  font: 700 10px var(--mono); color: var(--red); padding: 0 14px; flex-shrink: 0;
  border-right: 1px solid var(--line2); letter-spacing: 0.08em;
}
.ticker-vp {
  flex: 1; min-width: 0; overflow: hidden; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.tape { display: flex; width: max-content; animation: tape var(--dur, 64s) linear infinite; }
.ticker:hover .tape { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
.tick-i {
  display: flex; align-items: center; gap: 10px; padding: 0 24px; height: 34px; font-size: 13px;
  white-space: nowrap; border: 0; background: none; border-right: 1px solid var(--line); color: var(--text);
}
.tick-i time { font: 500 11px var(--mono); color: var(--dim); }
.tick-i i { width: 7px; height: 7px; background: var(--c); display: inline-block; }
.tick-i b { font: 700 11px var(--mono); color: var(--c); }
.tick-i:hover { background: rgba(255, 59, 48, 0.12); }

/* Main Deck Layout */
.deck { padding-top: 20px; display: grid; gap: 18px; }
.deck > *, .tab-pane, .tab-pane > * { min-width: 0; }
.tab-pane { display: grid; gap: 18px; }
.block { display: grid; gap: 18px; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.twocol > * { min-width: 0; }
.bhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.bhead h2 { font: 700 16px var(--sans); letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 9px; color: #fff; }
.bhead h2::before { content: ""; width: 5px; height: 16px; background: var(--red); clip-path: polygon(0 0, 100% 3px, 100% 100%, 0 calc(100% - 3px)); }
.subcap { display: block; font-size: 12px; color: var(--dim); margin-top: 3px; }
.count { font: 500 11px var(--mono); color: var(--dim); }
.caption { font-size: 12px; color: var(--dim); margin: 10px 0 0; }
.sp { margin-top: 24px; }
.readout {
  font-size: 13px; color: var(--muted); margin: 12px 0 0; min-height: 2em;
  border-top: 1px dashed var(--line2); padding-top: 10px;
  display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center;
}
.readout::before { content: ">"; font: 700 12px var(--mono); color: var(--red); }
.readout b { color: #fff; font-weight: 600; }
.readout time { font: 500 11px var(--mono); }
.readout .dim { color: var(--dim); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); gap: 18px; align-items: stretch; }
.eyebrow-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.kicker { font: 600 12px var(--mono); color: var(--red); margin: 0; letter-spacing: 0.06em; }
.scope-tag { font: 600 11px var(--mono); color: var(--muted); border: 1px solid var(--line2); padding: 2px 8px; }
.big-wrap { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.big { margin: 0; line-height: 0.88; display: flex; align-items: baseline; gap: 8px; }
.big .num {
  font-size: clamp(78px, 9.5vw, 136px); font-weight: 700; letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 35%, #a5b2c2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.big .u { font: 600 18px var(--sans); color: var(--muted); }
.big-copy h1 { font: 900 clamp(22px, 2.2vw, 28px)/1.2 var(--sans); color: #fff; }
.yes { margin: 8px 0 0; font-size: 14px; color: var(--muted); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.yes > .num { font-size: 36px; font-weight: 700; color: var(--red); line-height: 1; text-shadow: 0 0 22px rgba(255, 59, 48, 0.45); }

.gauge-box { margin-top: 16px; padding: 12px 14px; background: var(--panel2); border: 1px solid var(--line2); }
.gauge-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; gap: 8px; flex-wrap: wrap; }
.meter { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.meter i { height: 16px; background: #1e2632; border: 1px solid #2b3545; clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%); }
.meter i.on { background: #c5d0dc; border-color: #dee7f0; }
.meter i.on.a { background: var(--amber); border-color: #ffd382; box-shadow: 0 0 8px rgba(245, 166, 35, 0.35); }
.meter i.on.r { background: var(--red); border-color: #ff847d; box-shadow: 0 0 10px rgba(255, 59, 48, 0.5); }
.gauge-axis { display: flex; justify-content: space-between; font: 500 10px var(--mono); color: var(--dim); margin-top: 6px; }
.delta { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.delta b { font: 700 13px var(--mono); color: #fff; margin-right: 2px; }
.delta .up { color: #ff7c73; }
.hstat .note { margin: 8px 0 0; max-width: 58ch; }

.hot-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line2); }
.hot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font: 700 12px var(--sans); color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--amber); font: 600 12px var(--mono); padding: 2px 4px; }
.linkbtn:hover { color: #fff; text-decoration: underline; }
.hot-list { display: grid; gap: 6px; }
.hot-item {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; min-width: 0; text-align: left; border: 1px solid var(--line); background: var(--panel2);
  padding: 8px 10px; transition: border-color 0.18s, background 0.18s;
}
.hot-item:hover { border-color: var(--red); background: #1a1114; }
.hot-item time { font: 500 11px var(--mono); color: var(--dim); }
.hot-item .ht { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.radarbox { display: flex; flex-direction: column; }
.radar-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 6px 0; }
.radar { width: 100%; max-width: 390px; aspect-ratio: 1; display: block; cursor: crosshair; }
.rtag { margin: 4px 0 0; font: 500 11px var(--mono); color: var(--dim); text-align: center; }

/* Dual-Theatre & World Map */
.ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.corridor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 265px; gap: 14px; }
.world-grid { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 14px; }
.theatre, .rank-panel { background: var(--panel2); border: 1px solid var(--line2); padding: 10px 12px; min-width: 0; }
.theatre-head { display: flex; justify-content: space-between; align-items: center; font: 600 11px var(--mono); color: var(--muted); margin-bottom: 8px; }
.mapbox { position: relative; aspect-ratio: 1.42 / 1; background: radial-gradient(75% 75% at 50% 50%, rgba(255, 59, 48, 0.06), transparent 72%); overflow: hidden; }
.mapbox.world-wide { aspect-ratio: 2.2 / 1; border: 1px solid var(--line2); }
.worldmap { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.worldmap .land { stroke: #364152; stroke-width: 0.68; stroke-linecap: round; fill: none; }
.worldmap .grat { stroke: rgba(238, 242, 246, 0.06); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.worldmap .mkr { cursor: pointer; outline: none; }
.worldmap .dot { fill: var(--c); fill-opacity: 0.88; stroke: var(--c); stroke-width: 1; vector-effect: non-scaling-stroke; }
.worldmap .halo { fill: none; stroke: var(--c); stroke-opacity: 0.4; stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.worldmap .zero .dot { fill-opacity: 0.4; }
.worldmap .zero .halo { display: none; }
.worldmap .mkr.cur .halo { stroke: #fff; stroke-opacity: 0.85; stroke-dasharray: none; }
.worldmap .mkr:hover .dot, .worldmap .mkr.on .dot, .worldmap .mkr:focus-visible .dot { fill-opacity: 1; stroke: #fff; stroke-width: 2; }
.worldmap .mping { fill: none; stroke: var(--red); stroke-width: 1.5; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.5); opacity: 0; } }
.worldmap .mlab { fill: #f1f5f9; font-family: var(--sans); font-weight: 700; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapkey { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 10px; align-items: center; font: 500 10px var(--mono); color: var(--muted); background: rgba(6, 8, 11, 0.82); padding: 4px 8px; flex-wrap: wrap; }
.mapkey span { display: inline-flex; align-items: center; gap: 5px; }
.mapkey i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.rank { display: flex; flex-direction: column; gap: 3px; }
.rhead { font: 600 11px var(--mono); color: var(--dim); margin: 0 0 6px; letter-spacing: 0.04em; }
.rrow {
  display: grid; grid-template-columns: 22px 68px 1fr 34px; align-items: center; gap: 8px;
  border: 0; border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left;
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.14), transparent) no-repeat 0 0 / 0 100%;
  transition: background-size 0.25s;
}
.rrow:hover { background-size: 100% 100%; }
.rk { font: 600 10px var(--mono); color: var(--dim); }
.rnm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbar { height: 7px; background: var(--bg); border: 1px solid var(--line2); }
.rbar i { display: block; height: 100%; background: var(--c); }
.rrow .num { font-size: 13px; text-align: right; font-weight: 700; }

/* 60-day Stack */
.stack svg { display: block; width: 100%; overflow: visible; }
.stack .prior { fill: rgba(238, 242, 246, 0.02); }
.stack .split { stroke: var(--red2); stroke-dasharray: 3 3; }
.stack .tick { fill: var(--line2); }
.stack .tick.m { fill: var(--muted); }
.stack .ax { fill: var(--dim); font: 500 11px var(--sans); }
.stack .ax.hi { fill: #ff7c73; font-weight: 700; }
.stack .cell { cursor: pointer; transition: opacity 0.15s; }
.stack svg:hover .cell { opacity: 0.42; }
.stack svg .cell:hover { opacity: 1; stroke: #fff; stroke-width: 1.5; }

/* Log10 Top Impacts */
.log-ticks { display: flex; justify-content: space-between; font: 500 10px var(--mono); color: var(--dim); border-bottom: 1px solid var(--line2); padding-bottom: 4px; margin-bottom: 10px; }
.impacts { display: grid; gap: 12px; }
.ibar { display: block; width: 100%; min-width: 0; max-width: 100%; background: none; border: 0; padding: 0; text-align: left; }
.ibar .it { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; align-items: baseline; min-width: 0; }
.ibar .in { min-width: 0; flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibar .it .num { font-size: 13px; white-space: nowrap; font-weight: 700; flex-shrink: 0; }
.ibar .track { display: block; height: 8px; background: var(--panel2); border: 1px solid var(--line2); margin: 5px 0 3px; }
.ibar .track i { display: block; height: 100%; width: var(--w); background: var(--c); position: relative; }
.ibar .track i::after { content: ""; position: absolute; right: 0; top: -2px; bottom: -2px; width: 2px; background: #fff; }
.ibar small { font-size: 11px; color: var(--dim); }
.ibar:hover .in { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }

/* Proportional Status Bar + Cause Bar */
.prop-bar { display: flex; height: 22px; gap: 3px; margin: 10px 0 12px; }
.prop-seg { border: 0; padding: 0; min-width: 6px; transition: filter 0.15s; }
.prop-seg:hover { filter: brightness(1.25); }
.state-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.state-pill-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; min-height: 34px;
  background: var(--panel2); border: 1px solid var(--line2); color: var(--text); font-size: 12px;
}
.state-pill-btn:hover { border-color: var(--red); background: var(--panel3); }
.state-pill-btn i { width: 8px; height: 8px; display: inline-block; }
.causebar { display: flex; gap: 4px; margin-top: 10px; }
.cseg { flex-basis: 0; min-width: 64px; }
.cseg i { display: block; height: 15px; background: repeating-linear-gradient(-45deg, var(--line3) 0 4px, var(--panel2) 4px 8px); border: 1px solid var(--line2); }
.cseg.known i { background: var(--text); border: 0; }
.cseg.partial i { background: repeating-linear-gradient(-45deg, var(--amber) 0 4px, #7b5314 4px 8px); border: 0; }
.cseg .cl { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cseg .num { display: block; font-size: 20px; color: #fff; line-height: 1.15; font-weight: 700; }

/* Compact Active Tracks */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; display: inline-block; }
.tracks { display: grid; gap: 5px; max-height: 410px; overflow-y: auto; }
.track-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  width: 100%; min-width: 0; text-align: left; border: 1px solid var(--line); background: var(--panel2);
  padding: 8px 10px; transition: border-color 0.16s, background 0.16s;
}
.track-row:hover { border-color: var(--red); background: #1a1115; }
.track-row time { font: 500 11px var(--mono); color: var(--dim); }
.track-row .tn { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-dots { display: inline-flex; align-items: center; gap: 3px; }
.track-dots i { width: 8px; height: 8px; display: inline-block; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.track-dots small { font: 500 10px var(--mono); color: var(--dim); margin-left: 3px; }

/* Comparison + Small Multiples */
.cmphead { display: flex; align-items: baseline; gap: 20px; margin: 8px 0 16px; flex-wrap: wrap; }
.cmphead span { display: flex; align-items: baseline; gap: 6px; }
.cmphead .num { font-size: 44px; line-height: 1; font-weight: 700; }
.cmphead .y25 .num { color: var(--muted); font-size: 28px; }
.cmphead .yc .num { color: var(--red); font-size: 28px; }
.cmphead small { font: 500 11px var(--mono); color: var(--muted); }
.cmphead em { font: 700 13px var(--mono); font-style: normal; padding: 4px 8px; border: 1px solid var(--line3); }
.cmphead em.up { color: #000; background: var(--red); border-color: var(--red); }
.cmp {
  display: flex; gap: 16px; align-items: stretch; height: 190px; border-bottom: 1px solid var(--line3);
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%;
}
.cmp.eu { gap: 5px; }
.grp { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pair { flex: 1; display: flex; gap: 5px; align-items: flex-end; justify-content: center; }
.col { flex: 1; max-width: 52px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; background: none; border: 0; padding: 0; }
.cmp.eu .col { max-width: 36px; }
.col .v { font: 500 11px var(--mono); color: var(--muted); text-align: center; margin-bottom: 4px; }
.col.y26 .v { color: #fff; font-weight: 700; }
.col .fill { display: flex; flex-direction: column; justify-content: flex-end; height: var(--h); min-height: 2px; background: repeating-linear-gradient(-45deg, var(--line3) 0 3px, var(--line2) 3px 6px); }
.col.y26 .fill { background: var(--grey); }
.col .fill i { display: block; height: var(--hc); background: var(--red2); }
.col.y26 .fill i { background: var(--red); }
.col:hover .fill { outline: 1px solid #fff; outline-offset: 2px; }
.ml { font: 500 11px var(--mono); color: var(--muted); text-align: center; padding: 7px 0 0; margin-bottom: -26px; }
.cmp + .caption { margin-top: 34px; }
.caption i { display: inline-block; width: 9px; height: 9px; margin: 0 5px 0 0; vertical-align: -1px; }
.caption .k25 { background: repeating-linear-gradient(-45deg, var(--line3) 0 2px, var(--line2) 2px 4px); }
.caption .k26 { background: var(--grey); margin-left: 4px; }
.caption .kc { background: var(--red); margin-left: 4px; }

.smalls { display: grid; margin-top: 8px; }
.small {
  display: grid; grid-template-columns: 54px 1fr 128px; align-items: center; gap: 12px;
  padding: 11px 8px; border: 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left;
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.14), transparent) no-repeat 0 0 / 0 100%;
  transition: background-size 0.3s;
}
.small.key { padding: 0 8px 6px; border-bottom-color: var(--line3); cursor: default; }
.small .rn { font-weight: 700; font-size: 14px; }
.small svg { width: 100%; height: 30px; display: block; }
.small svg rect { fill: var(--line3); }
.small svg rect.base { fill: var(--line); }
.small svg rect.recent { fill: var(--grey); }
.small .rs { display: grid; grid-template-columns: repeat(3, 1fr); text-align: right; font-size: 12px; color: var(--dim); }
.small .rs .num { font-size: 13px; color: var(--text); }
.small .rs em.num { font-style: normal; color: #ff7c73; }
.small.key .rs * { font: 500 11px var(--sans); color: var(--dim); font-style: normal; }
.small[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--red); }
.small[aria-pressed="true"] svg rect.recent { fill: var(--red); }
.small:not(:disabled):not(.key):hover { background-size: 100% 100%; }

/* Finance Watch Tab */
.fin { --b: #9a392d; box-shadow: inset 0 0 0 1px #4b201b; }
.fin h2::after { content: "FINANCE WATCH"; font: 700 10px var(--mono); color: #000; background: var(--amber); padding: 3px 7px; margin-left: 6px; letter-spacing: 0.05em; }
.fstats { display: flex; gap: 10px; flex-wrap: wrap; }
.fs { background: var(--panel2); border: 1px solid var(--line2); padding: 9px 14px; min-width: 108px; }
.fs .num { font-size: 28px; line-height: 1.05; font-weight: 700; display: block; }
.fs span { font-size: 11px; color: var(--muted); }
.fs.hi .num { color: var(--amber); }
.fs.red .num { color: var(--red); }

.route-box { background: var(--panel2); border: 1px solid var(--line2); padding: 12px 14px; margin: 12px 0 14px; }
.route-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.route-bar { display: flex; height: 14px; gap: 3px; }
.route-bar .r-direct { background: var(--amber); }
.route-bar .r-supplier { background: var(--red); }
.route-bar .r-unknown { background: var(--line3); }
.route-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.route-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }

.fin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line2); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  border: 1px solid var(--line2); background: var(--panel2); color: var(--muted);
  padding: 6px 11px; min-height: 34px; font-size: 12px; font-weight: 600;
}
.fchip:hover { color: #fff; border-color: var(--amber); }
.fchip[aria-pressed="true"] { background: var(--amber); color: #000; border-color: var(--amber); }

.fgrid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; }
.fleft { min-width: 0; display: grid; gap: 14px; align-content: start; }
.subcard { background: var(--panel2); border: 1px solid var(--line); padding: 14px; }
.subcard h3 { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.fsub { display: grid; gap: 9px; }
.frow2 { display: grid; grid-template-columns: 96px 1fr 28px 54px; align-items: center; gap: 8px; font-size: 13px; }
.fbar { position: relative; height: 11px; background: var(--bg); border: 1px solid var(--line2); }
.fbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--grey); }
.fbar i.c { background: var(--red); }
.frow2 .num { text-align: right; font-weight: 700; }
.frow2 small { font-size: 11px; color: #ff7c73; }
.fstrip svg { display: block; width: 100%; overflow: visible; }
.fstrip .fdot { cursor: pointer; stroke: var(--bg); stroke-width: 1; }
.fstrip .fdot:hover { stroke: #fff; stroke-width: 1.5; }
.related-row { margin: 0; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.flist { display: grid; gap: 8px; max-height: 580px; overflow-y: auto; align-content: start; }
.fitem {
  display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 10px; align-items: start;
  width: 100%; text-align: left; border: 1px solid var(--line2); border-left: 3px solid var(--line3);
  padding: 11px 12px; background: var(--panel2); transition: border-color 0.18s, background 0.18s;
}
.fitem.confirmed { border-left-color: var(--red); }
.fitem:hover { border-color: var(--amber); background: #1a1612; }
.fitem time { font: 500 11px var(--mono); color: var(--dim); padding-top: 2px; }
.fbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ftags { display: flex; gap: 5px; flex-wrap: wrap; }
.ftags span { font: 600 10px var(--mono); padding: 2px 6px; border: 1px solid var(--line3); color: var(--muted); }
.ftags .geo { color: #fff; background: var(--line2); border-color: var(--line2); }
.ftags .sec { color: var(--amber); border-color: rgba(245, 166, 35, 0.45); }
.ftags .via { color: #ff7c73; border-color: var(--red2); background: var(--red-bg); }
.ft { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; }
.fp { font-size: 12px; color: var(--dim); }

/* Archive Tab */
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.prompt {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px;
  background: var(--panel2); border: 1px solid var(--line2);
}
.prompt:focus-within { border-color: var(--red); }
.prompt span { font: 700 14px var(--mono); color: var(--red); }
.prompt input { flex: 1; border: 0; background: none; height: 100%; font-size: 14px; }
.prompt input:focus { outline: none; }
.prompt input::placeholder { color: var(--dim); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row select {
  height: 40px; padding: 0 28px 0 12px; background-color: var(--panel2); border: 1px solid var(--line2);
  font: 500 12px var(--mono); min-width: 150px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23ff3b30' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.filter-row select:hover, .filter-row select:focus { border-color: var(--red); outline: none; }
.filter-row select option { background: var(--panel2); }
.cohort { font-size: 13px; color: #fff; border-left: 3px solid var(--red); padding: 4px 0 4px 10px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thead, .case-row { display: grid; grid-template-columns: 94px minmax(0, 1fr) 96px 146px 138px; gap: 14px; align-items: center; }
.thead { font: 600 11px var(--mono); color: var(--dim); padding: 8px 12px; border-bottom: 1px solid var(--line3); }
.cases-list { display: grid; }
.case-row {
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  padding: 12px; background: linear-gradient(90deg, rgba(255, 59, 48, 0.1), transparent 70%) no-repeat 0 0 / 0 100%;
  transition: background-size 0.28s; position: relative;
}
.case-row:hover { background-size: 100% 100%; }
.case-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--red); transform: scaleY(0); transition: transform 0.2s; }
.case-row.confirmed::before { transform: scaleY(0.45); }
.case-row:hover::before { transform: scaleY(1); }
.case-row time { font: 500 11px var(--mono); color: var(--muted); }
.case-row .tt { min-width: 0; }
.case-row .t { font-size: 14px; font-weight: 600; color: var(--text); display: block; line-height: 1.4; }
.case-row .pub { font-size: 12px; color: var(--dim); display: block; margin-top: 2px; }
.case-row .imp b { font: 700 12px var(--mono); display: block; }
.case-row .imp small { font-size: 11px; color: var(--dim); display: block; }
.more { display: block; width: 100%; margin-top: 14px; padding: 12px; text-align: center; }

/* Status Pill */
.st {
  font: 600 11px var(--sans); white-space: nowrap; --c: var(--grey); color: var(--c);
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  padding: 3px 8px; border: 1px solid var(--line3); background: rgba(255, 255, 255, 0.03);
}
.st::before { content: ""; width: 6px; height: 6px; background: var(--c); }
.st.confirmed { --c: var(--red); color: #ff7c73; background: var(--red-bg); border-color: var(--red2); }
.st.suspected { --c: var(--amber); color: #ffd17d; background: var(--amber-bg); border-color: rgba(245, 166, 35, 0.45); }
.st.unknown { --c: var(--grey); color: var(--muted); }
.st.no_evidence { --c: var(--blue); color: #9dd6f7; border-color: rgba(88, 180, 232, 0.45); }
.st.ruled_out { --c: var(--out); color: var(--dim); }

/* Method & Footer */
.method > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.method > summary::-webkit-details-marker { display: none; }
.method > summary h2::after { content: "[+]"; font: 500 12px var(--mono); color: var(--red); margin-left: 6px; }
.method[open] > summary h2::after { content: "[−]"; }
.health { display: flex; align-items: center; gap: 5px; font: 500 11px var(--mono); color: var(--muted); }
.health span { margin-left: 6px; }
.dot { width: 7px; height: 7px; background: var(--line3); display: inline-block; }
.dot.ok { background: var(--blue); }
.dot.bad { background: var(--amber); }
.method-grid { padding-top: 16px; }
.sources { list-style: none; padding: 0; margin: 0 0 12px; }
.sources li { display: grid; grid-template-columns: 14px 1fr auto; gap: 0 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sources small { grid-column: 2; font-size: 12px; color: var(--dim); }
.sources .bad { font: 600 10px var(--mono); color: var(--amber); grid-row: 1; grid-column: 3; }
.rules { margin: 0; }
.rules dt { font-weight: 700; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: #fff; }
.rules dt:first-child { border-top: 1px solid var(--line3); }
.rules dd { margin: 4px 0 12px; font-size: 13px; color: var(--muted); line-height: 1.75; }
.foot { display: flex; justify-content: space-between; gap: 14px; margin-top: 22px; padding: 16px 0 36px; font: 500 11px var(--mono); color: var(--dim); border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Slide-Over Case Dossier Drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(3, 5, 8, 0.72); backdrop-filter: blur(3px); }
.dossier-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(580px, 100vw);
  background: #0c1016; border-left: 1px solid var(--red2); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7);
  display: flex; flex-direction: column; animation: drawer-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes drawer-in { from { transform: translateX(36px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line2); background: #090d12; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.drawer-id { font: 600 11px var(--mono); color: var(--red); }
.drawer-actions { display: flex; gap: 8px; align-items: center; }
.drawer-close { border: 1px solid var(--line3); background: var(--panel2); color: #fff; padding: 6px 12px; font: 600 11px var(--mono); min-height: 34px; }
.drawer-close:hover { background: var(--red); color: #000; border-color: var(--red); }
.drawer-head h2 { font: 800 19px/1.35 var(--sans); color: #fff; }
.drawer-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 30px; display: grid; gap: 16px; align-content: start; }
.dos-box { background: var(--panel2); border: 1px solid var(--line2); padding: 12px 14px; }
.dos-sec h3 { font: 700 12px var(--mono); color: var(--red); letter-spacing: 0.04em; margin: 0 0 6px; }
.dos-sec h3 + p { margin-bottom: 12px; }
.dos-sec p { margin: 0 0 8px; font-size: 14px; line-height: 1.7; color: var(--text); }
.dos-sec .basis { font-size: 12px; color: var(--dim); }
.obs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.obs li { padding-left: 16px; border-left: 2px solid var(--line3); position: relative; }
.obs li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; background: var(--c, var(--grey)); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.obs .oh { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.obs .oh time { font: 700 12px var(--mono); color: #fff; }
.obs .fig { font-size: 13px; color: #fff; margin: 4px 0; }
.obs .fig b { font-family: var(--mono); color: #ff7c73; }
.obs .ref { font-size: 12px; color: var(--dim); margin: 2px 0; }
.obs .olinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; font-size: 12px; }

/* Sticky Mobile Quick-Dock */
.mob-dock {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(6, 8, 11, 0.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line2); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.mob-dock button {
  border: 1px solid var(--line2); background: var(--panel2); color: var(--muted);
  min-height: 44px; font: 700 12px var(--sans);
}
.mob-dock button[aria-pressed="true"] { background: var(--red); color: #000; border-color: var(--red); }

/* Reduced Motion */
body.calm *, body.calm *::before, body.calm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Responsive Breakpoints (1024 / 768 / 375 px) */
@media (max-width: 1120px) {
  .corridor-grid { grid-template-columns: 1fr 1fr; }
  .corridor-grid .rank-panel { grid-column: 1 / -1; }
  .world-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .hero, .twocol, .fgrid { grid-template-columns: 1fr; }
  .status { display: none; }
}
@media (max-width: 760px) {
  body { padding-bottom: 66px; }
  .wrap { width: calc(100% - 24px); }
  .panel { padding: 16px 14px; }
  .mast { position: relative; }
  .mastrow { gap: 8px 10px; }
  .name { order: 1; }
  .mast-right { order: 2; }
  .regions { order: 3; flex: 1 1 100%; }
  .brand-sub { display: none; }
  .modes { display: none; }
  .lookup-wrap { grid-template-columns: 1fr; gap: 8px; }
  .lookup-kbd { display: none; }
  .lookup-scope { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .lookup-scope button { min-height: 40px; text-align: center; }
  .lookup-hit { grid-template-columns: 1fr auto; gap: 6px 10px; padding: 11px 12px; }
  .lookup-hit-meta { flex-direction: row; align-items: center; gap: 8px; }
  .lookup-hit-body { grid-column: 1 / -1; }
  .mob-dock { display: grid; }
  .alert { padding-right: 10px; gap: 8px; }
  .alert .lvl { padding: 8px 10px; }
  .alert .atext { white-space: normal; line-height: 1.4; }
  .corridor-grid { grid-template-columns: 1fr; }
  .hot-item { grid-template-columns: 52px minmax(0, 1fr); gap: 6px; }
  .hot-item .st { grid-column: 1 / -1; justify-self: start; }
  .track-row { grid-template-columns: 56px minmax(0, 1fr); gap: 6px; }
  .track-row .track-dots, .track-row .st { grid-column: 1 / -1; justify-self: start; }
  .filter-row { display: grid; grid-template-columns: 1fr; }
  .filter-row select { width: 100%; }
  .thead { display: none; }
  .case-row { grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 10px; }
  .case-row .tt, .case-row .rec-cell, .case-row .imp { grid-column: 1 / -1; }
  .fitem { grid-template-columns: 1fr auto; }
  .fitem .fbody { grid-column: 1 / -1; }
  .flist { max-height: none; }
  .health span { display: none; }
  .small { grid-template-columns: 44px 1fr 112px; gap: 8px; }
}
