/* =====================================================================
   Rasad — design system
   Palette: night-ink slate base, saffron signal accent (the colour of a
   watch-fire / lantern — "rasad" means to keep watch), severity scale.
   Type: Noto Kufi Arabic for headings & brand, IBM Plex Sans Arabic for
   text, IBM Plex Mono only for machine data (CVE IDs, IPs, hashes).
   All spacing uses logical properties so RTL/LTR flip automatically.
   ===================================================================== */

:root {
  --bg: #0f1823;
  --bg-2: #131e2b;
  --panel: #16222f;
  --panel-2: #1b2938;
  --line: #233346;
  --line-2: #2d4057;
  --ink: #dde5ee;
  --ink-2: #a9b7c6;
  --mute: #7a8ca0;
  --signal: #e9a23b;        /* saffron */
  --signal-ink: #1b1306;
  --signal-soft: rgba(233, 162, 59, .14);
  --link: #8cc4e8;

  --crit: #ec5b5b;
  --high: #f08a3e;
  --med: #d8b84a;
  --low: #5fb3a8;
  --ok: #5cbf86;
  --info: #7aa7d9;

  --map-0: #1c2a3a;
  --map-1: #3a3a33;
  --map-2: #6b5228;
  --map-3: #a86f22;
  --map-4: #e9a23b;
  --map-sea: #0f1823;

  --r-lg: 10px;
  --r: 6px;
  --r-sm: 4px;

  --f-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-text: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --rail-w: 248px;
  --top-h: 56px;
  --tab-h: 62px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef1f5;
  --bg-2: #e6eaf0;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --line: #dde3ea;
  --line-2: #c9d2dc;
  --ink: #15212e;
  --ink-2: #3b4a5b;
  --mute: #66768a;
  --signal: #b8730f;
  --signal-ink: #ffffff;
  --signal-soft: rgba(184, 115, 15, .11);
  --link: #1f6aa5;
  --crit: #c93636; --high: #c9631b; --med: #a88611; --low: #2f8a7e; --ok: #2e8c56; --info: #3d6fa8;
  --map-0: #dfe5ec; --map-1: #f1e3c8; --map-2: #e6c487; --map-3: #d39a3f; --map-4: #b8730f; --map-sea: #eef1f5;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef1f5; --bg-2: #e6eaf0; --panel: #ffffff; --panel-2: #f5f7fa; --line: #dde3ea; --line-2: #c9d2dc;
    --ink: #15212e; --ink-2: #3b4a5b; --mute: #66768a; --signal: #b8730f; --signal-ink: #fff; --signal-soft: rgba(184,115,15,.11); --link: #1f6aa5;
    --crit: #c93636; --high: #c9631b; --med: #a88611; --low: #2f8a7e; --ok: #2e8c56; --info: #3d6fa8;
    --map-0: #dfe5ec; --map-1: #f1e3c8; --map-2: #e6c487; --map-3: #d39a3f; --map-4: #b8730f; --map-sea: #eef1f5;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 40px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.6 var(--f-text);
  font-feature-settings: "kern"; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-size: 14.5px; line-height: 1.55; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
svg { display: block; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; margin: 0; line-height: 1.35; letter-spacing: 0; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-family: var(--f-text); letter-spacing: -.01em; }
.mono, code, kbd { font-family: var(--f-mono); font-size: .88em; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mute { color: var(--mute); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--signal); color: var(--signal-ink); padding: 6px 12px; border-radius: var(--r); z-index: 99; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-2); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; color: var(--signal); flex: none; }
.brand-mark path { transform-origin: 16px 16px; animation: sweep 6s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-family: var(--f-head); font-size: 22px; font-weight: 700; }
html[lang="en"] .brand-text b { font-family: var(--f-text); font-weight: 600; font-size: 20px; letter-spacing: .01em; }
.brand-text small { color: var(--mute); font-size: 12px; }

#nav { padding: 4px 10px 12px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; padding: 0 10px 6px; color: var(--mute); font-size: 12px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: var(--r);
  color: var(--ink-2); font-size: 14px; text-decoration: none !important; position: relative;
}
.nav-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-link:hover { background: var(--panel); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--signal-soft); color: var(--ink); }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); }
[dir="rtl"] .nav-link[aria-current="page"]::before { border-radius: 3px 0 0 3px; }
.nav-link[aria-current="page"] svg { color: var(--signal); opacity: 1; }
.nav-link .badge { margin-inline-start: auto; font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--panel-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nav-link .badge.hot { background: color-mix(in srgb, var(--crit) 22%, transparent); color: var(--crit); }
.rail-foot { padding: 12px 18px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.rail-foot .row { display: flex; justify-content: space-between; gap: 8px; }
.rail-foot b { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.icon-btn { width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-btn:hover { border-color: var(--line-2); }
.menu-btn { display: none; }
.lang-btn { height: 36px; min-width: 40px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 13px; }

.threat { display: flex; align-items: center; gap: 9px; padding: 0 12px 0 10px; height: 36px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); font-size: 13px; white-space: nowrap; flex: none; }
.threat .lamp { width: 10px; height: 10px; border-radius: 50%; background: var(--mute); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); color: var(--mute); }
.threat[data-level="green"] .lamp { background: var(--ok); color: var(--ok); }
.threat[data-level="yellow"] .lamp { background: var(--med); color: var(--med); }
.threat[data-level="orange"] .lamp { background: var(--high); color: var(--high); }
.threat[data-level="red"] .lamp { background: var(--crit); color: var(--crit); }
.threat small { color: var(--mute); }

.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.search:focus-within { border-color: var(--signal); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--mute); stroke-width: 1.8; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; }
.search input::placeholder { color: var(--mute); }

.clocks { display: flex; gap: 14px; margin-inline-start: auto; font-size: 12.5px; color: var(--mute); white-space: nowrap; }
.clocks b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; font-family: var(--f-mono); font-size: 12.5px; margin-inline-start: 5px; }
.live-pill { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; }
.live-pill i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--ok); opacity: 0; animation: ping 2.4s ease-out infinite; }
.live-pill.off i { background: var(--mute); } .live-pill.off i::after { display: none; }
@keyframes ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* ticker */
.ticker { height: 34px; border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; display: flex; align-items: center; font-size: 13px; position: relative; }
.ticker-label { flex: none; height: 100%; display: flex; align-items: center; gap: 7px; padding: 0 14px; white-space: nowrap; background: var(--signal); color: var(--signal-ink); font-weight: 600; font-size: 12.5px; z-index: 2; }
.ticker-label svg { width: 15px; height: 15px; }
.ticker-track { display: flex; gap: 36px; white-space: nowrap; padding-inline-start: 24px; animation: tick 160s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track > span { display: inline-flex; align-items: baseline; gap: 8px; }
.ticker-track a { color: var(--ink-2); }
.ticker-track a:hover { color: var(--ink); }
.ticker-track .src { color: var(--signal); font-size: 12px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
[dir="rtl"] .ticker-track { animation-name: tick-rtl; }
@keyframes tick-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

main { padding: 20px 20px 40px; outline: none; min-width: 0; flex: 1; }
.foot { padding: 18px 20px 28px; border-top: 1px solid var(--line); color: var(--mute); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

/* -------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 72ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }

/* --------------------------------------------------------------- panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; display: flex; flex-direction: column; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); min-height: 46px; }
.panel-h h2 { font-size: 14.5px; font-weight: 600; flex: 1; min-width: 0; }
html[lang="en"] .panel-h h2 { font-size: 14px; }
.panel-h .meta { font-size: 12px; color: var(--mute); white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.panel-h .meta a { color: var(--mute); }
.panel-b { padding: 12px 14px; min-width: 0; flex: 1; }
.panel-b.flush { padding: 0; }
.panel-b.scroll { overflow-y: auto; max-height: 460px; scrollbar-width: thin; }
.panel-f { padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--mute); flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--crit); } .dot.warn { background: var(--med); }

/* -------------------------------------------------------- situation bar */
.sitbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); margin-bottom: 14px; overflow: hidden; }
.sit { padding: 13px 16px 12px; border-inline-start: 1px solid var(--line); min-width: 0; text-decoration: none !important; color: inherit; display: block; }
.sit:first-child { border-inline-start: 0; }
a.sit:hover { background: var(--panel-2); }
.sit .v { font-family: var(--f-mono); font-size: 26px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; display: block; color: var(--ink); }
.sit .v.alert { color: var(--crit); }
.sit .l { font-size: 12.5px; color: var(--ink-2); display: block; margin-top: 4px; line-height: 1.35; }
.sit .d { font-size: 11.5px; color: var(--mute); }
.sit .spark { margin-top: 6px; height: 18px; width: 100%; }
.sit .spark path { fill: none; stroke: var(--signal); stroke-width: 1.4; }

/* ----------------------------------------------------------------- map */
.map-wrap { position: relative; aspect-ratio: 2 / 1; min-height: 240px; max-width: 100%; background: var(--map-sea); border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.map-wrap svg { width: 100%; height: 100%; cursor: grab; outline: none; }
.map-wrap svg.dragging { cursor: grabbing; }
.map-wrap svg:focus-visible { box-shadow: inset 0 0 0 2px var(--signal); }
.map-wrap .sphere { fill: var(--map-sea); }
.map-wrap .grat { fill: none; stroke: var(--line); stroke-width: .5; opacity: .55; vector-effect: non-scaling-stroke; }
.map-wrap .country { fill: var(--map-0); stroke: var(--map-sea); stroke-width: .6; vector-effect: non-scaling-stroke; transition: fill .35s, opacity .25s; }
.map-wrap .country[data-l="1"] { fill: var(--map-1); } .map-wrap .country[data-l="2"] { fill: var(--map-2); }
.map-wrap .country[data-l="3"] { fill: var(--map-3); } .map-wrap .country[data-l="4"] { fill: var(--map-4); }
.map-wrap .country.has { cursor: pointer; }
.map-wrap .country:hover { stroke: var(--ink); stroke-width: 1.2; }
.map-wrap .country.sel { stroke: var(--ink); stroke-width: 1.8; }
.map-wrap .country.dim { opacity: .45; }
.map-wrap .bubble { fill: color-mix(in srgb, var(--crit) 55%, transparent); stroke: var(--crit); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s; }
.map-wrap .bubble:hover { fill: color-mix(in srgb, var(--crit) 80%, transparent); }
.map-wrap .pulse { fill: var(--crit); pointer-events: none; }
.map-wrap .pulse-ring { fill: none; stroke: var(--crit); stroke-width: 1; vector-effect: non-scaling-stroke; animation: ring 2.6s ease-out infinite; transform-box: fill-box; transform-origin: center; pointer-events: none; }
@keyframes ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(4.5); opacity: 0; } }
.map-tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 11px; font-size: 12.5px; box-shadow: 0 10px 28px rgba(0,0,0,.28); z-index: 5; min-width: 150px; max-width: 240px; opacity: 0; transition: opacity .12s; display: flex; flex-direction: column; gap: 2px; }
.map-tip.on { opacity: 1; }
.map-tip b { font-weight: 600; font-size: 13px; }
.map-tip span { color: var(--ink-2); }
.map-tip strong { color: var(--ink); font-weight: 500; }
.map-ctrl { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.map-btn { width: 30px; height: 30px; border-radius: var(--r); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.map-btn:hover { border-color: var(--signal); }
.map-btn svg { width: 16px; height: 16px; }
.map-legend { position: absolute; inset-inline-start: 10px; bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line); padding: 5px 9px; border-radius: var(--r); z-index: 3; }
.map-legend i { width: 16px; height: 8px; display: inline-block; border-radius: 1px; }
.map-legend i[data-l="1"] { background: var(--map-1); } .map-legend i[data-l="2"] { background: var(--map-2); } .map-legend i[data-l="3"] { background: var(--map-3); } .map-legend i[data-l="4"] { background: var(--map-4); }
.map-legend .lg-bubble { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--crit) 55%, transparent); border: 1px solid var(--crit); }
.map-hint { position: absolute; inset-inline-start: 10px; top: 10px; transition: opacity .3s; font-size: 11px; color: var(--mute); background: color-mix(in srgb, var(--panel) 85%, transparent); padding: 3px 8px; border-radius: var(--r); z-index: 2; max-width: 46%; text-align: end; }
@media (max-width: 640px) { .map-hint { display: none; } .map-ctrl { top: 8px; inset-inline-end: 8px; } .map-btn { width: 34px; height: 34px; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 4px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-inline-start: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--signal-soft); color: var(--ink); }

/* --------------------------------------------------------------- lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.list > li:last-child { border-bottom: 0; }
.list.compact > li { padding: 8px 14px; }
.item-t { color: var(--ink); font-weight: 500; display: block; line-height: 1.45; overflow-wrap: anywhere; }
a.item-t:hover { color: var(--link); text-decoration: none; }
.item-m { font-size: 12px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; align-items: center; }
.item-s { font-size: 13px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-new { animation: flash 2.5s ease-out; }
@keyframes flash { 0% { background: var(--signal-soft); } 100% { background: transparent; } }
.tr-orig { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; direction: ltr; text-align: start; }

.row-line { display: flex; align-items: center; gap: 10px; }
.bars { padding: 4px 0; }
.bar-row { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 3rem; gap: 10px; align-items: center; padding: 6px 14px; font-size: 13px; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { display: block; height: 8px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; background: var(--signal); border-radius: 2px; }
.bar-row .n { text-align: end; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }

/* -------------------------------------------------------------- chips */
.chip { unicode-bidi: plaintext; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.sev-CRITICAL { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); background: color-mix(in srgb, var(--crit) 10%, transparent); }
.chip.sev-HIGH { color: var(--high); border-color: color-mix(in srgb, var(--high) 40%, transparent); background: color-mix(in srgb, var(--high) 10%, transparent); }
.chip.sev-MEDIUM { color: var(--med); border-color: color-mix(in srgb, var(--med) 40%, transparent); background: color-mix(in srgb, var(--med) 10%, transparent); }
.chip.sev-LOW { color: var(--low); border-color: color-mix(in srgb, var(--low) 40%, transparent); background: color-mix(in srgb, var(--low) 10%, transparent); }
.chip.kev { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
.chip.signal { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 40%, transparent); background: var(--signal-soft); }
.chip.ok { color: var(--ok); }
.score { font-family: var(--f-mono); font-weight: 500; font-size: 12.5px; min-width: 2.8em; text-align: center; padding: 1px 6px; border-radius: var(--r-sm); display: inline-block; }
.score.sev-CRITICAL { background: var(--crit); color: #fff; } .score.sev-HIGH { background: var(--high); color: #fff; }
.score.sev-MEDIUM { background: var(--med); color: #1a1505; } .score.sev-LOW { background: var(--low); color: #04201c; } .score.sev-NONE { background: var(--panel-2); color: var(--mute); }

/* ------------------------------------------------------------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters .grow { flex: 1; min-width: 180px; }
.field { height: 34px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 0 10px; min-width: 0; }
.field:focus { outline: none; border-color: var(--signal); }
select.field { padding-inline-end: 28px; }
textarea.field { height: auto; padding: 10px; resize: vertical; width: 100%; font-family: var(--f-mono); font-size: 13px; line-height: 1.5; direction: ltr; text-align: left; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; cursor: pointer; color: var(--ink-2); }
.pill:hover { border-color: var(--line-2); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn { height: 34px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--mute); }
.btn.primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* --------------------------------------------------------------- table */
.tbl-wrap { overflow-x: auto; scrollbar-width: thin; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 500; color: var(--mute); font-size: 12.5px; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.tbl th[data-sort] { cursor: pointer; } .tbl th[data-sort]:hover { color: var(--ink); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--panel-2); }
.tbl .wrap { min-width: 220px; max-width: 520px; }
.tbl .nowrap { white-space: nowrap; }
.tbl td.mono { font-size: 12.5px; }
.ioc { font-family: var(--f-mono); font-size: 12.5px; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.copy { border: 0; background: transparent; color: var(--mute); cursor: pointer; padding: 2px 4px; border-radius: 3px; font-size: 11.5px; }
.copy:hover { color: var(--ink); background: var(--panel-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mute); }

/* ------------------------------------------------------------- states */
.state { padding: 28px 16px; text-align: center; color: var(--mute); font-size: 13.5px; }
.state .btn { margin-top: 10px; }
.skel { display: block; height: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--panel-2) 0%, var(--line) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: sk 1.4s linear infinite; margin: 10px 14px; }
.skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.w40 { width: 40%; }
@keyframes sk { to { background-position: -200% 0; } }

/* ----------------------------------------------------- cards (content) */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card h3 { font-size: 15px; font-weight: 600; font-family: var(--f-text); }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--link); }
.card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.card .foot-row { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* --------------------------------------------------------- ATT&CK matrix */
.matrix { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.mx-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mx-head { background: var(--ink); color: var(--bg); padding: 8px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600; min-height: 58px; }
.mx-head small { display: block; font-weight: 400; opacity: .75; font-family: var(--f-mono); font-size: 11px; }
.mx-cell { text-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; font-size: 12px; cursor: pointer; line-height: 1.35; color: var(--ink-2); }
.mx-cell:hover { border-color: var(--signal); color: var(--ink); }
.mx-cell .mono { display: block; font-size: 10.5px; color: var(--mute); }
.mx-cell.hit { background: var(--signal-soft); border-color: var(--signal); color: var(--ink); }

/* -------------------------------------------------------------- tools */
.tool-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.tool-nav { position: sticky; top: calc(var(--top-h) + 48px); display: flex; flex-direction: column; gap: 2px; }
.tool-nav button { text-align: start; border: 0; background: transparent; padding: 8px 10px; border-radius: var(--r); cursor: pointer; color: var(--ink-2); font-size: 13.5px; }
.tool-nav button:hover { background: var(--panel); color: var(--ink); }
.tool-nav button[aria-current="true"] { background: var(--signal-soft); color: var(--ink); }
.tool-body { display: flex; flex-direction: column; gap: 12px; }
.tool-body label.lab { display: block; font-size: 12.5px; color: var(--mute); margin-bottom: 5px; }
.out { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-family: var(--f-mono); font-size: 12.5px; direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 44px; }
.kv { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0; font-size: 13px; }
.kv > div { padding: 7px 10px; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--mute); }
.meter { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; transition: width .25s, background .25s; }
.cvss-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.cvss-grid fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px 10px; margin: 0; min-width: 0; }
.cvss-grid legend { font-size: 12.5px; color: var(--ink-2); padding: 0 4px; }
.cvss-grid .opts { display: flex; flex-wrap: wrap; gap: 4px; }
.cvss-grid .opts button { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r-sm); padding: 3px 8px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.cvss-grid .opts button[aria-pressed="true"] { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }

/* -------------------------------------------------------- glossary */
.gl-item { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 16px; }
.gl-item dt b { display: block; font-size: 15px; font-weight: 600; }
.gl-item dt span { display: block; color: var(--mute); font-size: 13px; direction: ltr; text-align: start; }
html[dir="rtl"] .gl-item dt span { text-align: right; }
.gl-item dd { margin: 0; color: var(--ink-2); font-size: 14px; }
.gl-item dd .en { display: block; margin-top: 4px; color: var(--mute); font-size: 13px; direction: ltr; text-align: start; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.az button { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 12.5px; }
.az button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* --------------------------------------------------- frameworks / tree */
.fw-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.fw-list { display: flex; flex-direction: column; max-height: calc(100vh - 160px); overflow-y: auto; position: sticky; top: calc(var(--top-h) + 48px); scrollbar-width: thin; }
.fw-list button { text-align: start; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 14px; cursor: pointer; color: var(--ink-2); }
.fw-list button:hover { background: var(--panel-2); }
.fw-list button[aria-current="true"] { background: var(--signal-soft); color: var(--ink); }
.fw-list button small { display: block; color: var(--mute); font-size: 11.5px; }
.fw-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.fw-item > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.fw-item > summary::-webkit-details-marker { display: none; }
.fw-item > summary .code { font-family: var(--f-mono); font-size: 12px; color: var(--signal); min-width: 4.5em; direction: ltr; }
.fw-item > summary b { font-weight: 600; }
.fw-item p { margin: 6px 0 0; color: var(--ink-2); font-size: 13.5px; padding-inline-start: calc(4.5em + 10px); }
.fw-children { list-style: none; margin: 8px 0 0; padding: 0 calc(4.5em + 10px) 0 0; }
[dir="ltr"] .fw-children { padding: 0 0 0 calc(4.5em + 10px); }
.fw-children li { padding: 5px 0; font-size: 13.5px; display: flex; gap: 10px; color: var(--ink-2); }
.fw-children .code { font-family: var(--f-mono); font-size: 11.5px; color: var(--mute); min-width: 5em; direction: ltr; }

/* ---------------------------------------------------------- roadmap */
.steps { list-style: none; counter-reset: s; margin: 8px 0 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px; padding-inline-start: 34px; font-size: 13.5px; color: var(--ink-2); }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 11.5px; color: var(--ink); font-family: var(--f-mono); }
.steps li::after { content: ""; position: absolute; inset-inline-start: 11px; top: 24px; bottom: 2px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }

/* --------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--ink-2); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--signal); }

/* ---------------------------------------------------------- status */
.status-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.svc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.svc .row-line b { font-weight: 600; flex: 1; }
.svc small { color: var(--mute); font-size: 12px; }
.svc.minor { border-color: color-mix(in srgb, var(--med) 45%, var(--line)); }
.svc.major, .svc.critical { border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }

/* --------------------------------------------------- tabbar + drawer */
.tabbar { display: none; }
.scrim { display: none; }
.drawer[hidden] { display: none; }

.toast { position: fixed; inset-inline-start: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r); font-size: 13px; z-index: 80; animation: toast 2.2s forwards; }
[dir="rtl"] .toast { transform: translateX(50%); }
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

.prose { max-width: 72ch; color: var(--ink-2); }
.prose h2 { color: var(--ink); font-size: 18px; margin: 26px 0 8px; }
.prose p, .prose li { font-size: 14.5px; }
.note { border-inline-start: 3px solid var(--signal); background: var(--signal-soft); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; font-size: 13.5px; color: var(--ink-2); }
[dir="rtl"] .note { border-radius: var(--r) 0 0 var(--r); }

/* ===================================================== responsive */
@media (max-width: 1280px) {
  .sitbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sit:nth-child(4) { border-inline-start: 0; }
  .sit:nth-child(n+4) { border-top: 1px solid var(--line); }
  .clocks .utc { display: none; }
}
@media (max-width: 1100px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
  .clocks { display: none; }
}
@media (max-width: 960px) {
  :root { --top-h: 54px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 300px); z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  [dir="rtl"] .rail { transform: translateX(100%); }
  body.nav-open .rail { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 10, 16, .55); z-index: 55; }
  .menu-btn { display: grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .threat small { display: none; }
  .live-pill span { display: none; }
  main { padding: 14px 12px calc(var(--tab-h) + 24px); }
  .foot { padding-bottom: calc(var(--tab-h) + 20px); }
  .tool-grid, .fw-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; padding-bottom: 4px; }
  .tool-nav button { white-space: nowrap; border: 1px solid var(--line); }
  .fw-list { position: static; max-height: 260px; border: 1px solid var(--line); border-radius: var(--r); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--mute); border: 0; background: transparent; text-decoration: none !important; cursor: pointer; }
  .tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [aria-current="page"] { color: var(--signal); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .search { display: none; }
  .search.open { display: flex; position: absolute; inset-inline: 10px; top: 9px; max-width: none; z-index: 3; }
  .threat { flex: 1; min-width: 0; overflow: hidden; }
  .threat span { overflow: hidden; text-overflow: ellipsis; }
  .sitbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sit:nth-child(n) { border-inline-start: 1px solid var(--line); border-top: 1px solid var(--line); }
  .sit:nth-child(odd) { border-inline-start: 0; }
  .sit:nth-child(-n+2) { border-top: 0; }
  .sit .v { font-size: 22px; }
  .span-3 { grid-column: span 12; }
  .page-head h1 { font-size: 20px; }
  .map-wrap { aspect-ratio: 1.6 / 1; min-height: 200px; }
  .gl-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; font-size: 12px; }
  .bar-row { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 2.6rem; }
  .ticker { height: 32px; }
  .ticker-label span { display: none; }
  .tbl { font-size: 13px; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker-track { animation: none; overflow-x: auto; }
}
@media print {
  .rail, .topbar, .ticker, .tabbar, .foot { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
}
.copy svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; }
/* map panels: let the map fill the panel height so it lines up with its neighbour */
#p-map .panel-b, #rmap .panel-b, #om .panel-b { display: flex; flex-direction: column; }
#p-map .map-wrap, #rmap .map-wrap, #om .map-wrap { flex: 1; aspect-ratio: auto; min-height: clamp(220px, 34vw, 400px); }
.demo-bar { background: var(--signal-soft); color: var(--ink); border-bottom: 1px solid var(--line); padding: 7px 20px; font-size: 12.5px; text-align: center; }

/* clickable bars */
.bar-row.clickable { cursor: pointer; border-radius: var(--r-sm); }
.bar-row.clickable:hover { background: var(--panel-2); }
.bar-row.clickable:hover .fill { filter: brightness(1.12); }
.bar-row.active { background: var(--signal-soft); }

/* column chart */
.cols { position: relative; overflow-x: clip; padding: 10px 14px 4px; padding-inline-start: 44px; }
.cols-grid { position: absolute; inset: 10px 14px 26px; inset-inline-start: 44px; pointer-events: none; }
.cols-grid span { position: absolute; inset-inline: 0; border-top: 1px dashed var(--line); }
.cols-grid em { position: absolute; inset-inline-end: calc(100% + 6px); top: -8px; font-style: normal; font-size: 10.5px; color: var(--mute); }
.cols-bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: var(--h); direction: ltr; }
[dir="rtl"] .cols-bars, [dir="rtl"] .cols-x { flex-direction: row-reverse; }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; border: 0; padding: 0; background: transparent; cursor: default; position: relative; min-width: 0; }
.col i { display: block; width: 100%; min-height: 2px; background: color-mix(in srgb, var(--signal) 55%, var(--panel-2)); border-radius: 2px 2px 0 0; transition: background .15s, height .5s cubic-bezier(.2,.8,.2,1); }
.col.last i { background: var(--signal); }
.col:hover i, .col:focus-visible i { background: var(--ink); }
.col-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 9px; font-size: 12px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 4; display: flex; flex-direction: column; gap: 1px; color: var(--ink); text-align: center; }
.col-tip b { font-weight: 500; color: var(--ink-2); font-size: 11.5px; }
.col-tip small { color: var(--mute); font-size: 11px; }
.col:hover .col-tip, .col:focus-visible .col-tip { opacity: 1; }

.cols-x { display: flex; gap: 3px; margin-top: 6px; height: 16px; }
.cols-x span { flex: 1; font-size: 10.5px; color: var(--mute); text-align: center; white-space: nowrap; overflow: visible; min-width: 0; }

/* donut */
.donut { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 14px; }
.donut svg { width: 130px; height: 130px; }
.donut path { stroke: var(--panel); stroke-width: 1.5; transition: opacity .15s; cursor: pointer; }
.donut .dim { opacity: .3; }
.donut-n { font-family: var(--f-mono); font-size: 20px; fill: var(--ink); }
.donut-s { font-size: 9px; fill: var(--mute); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.donut-legend button { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3em; gap: 8px; align-items: center; border: 0; background: transparent; padding: 5px 6px; border-radius: var(--r-sm); font-size: 13px; color: var(--ink-2); text-align: start; cursor: pointer; }
.donut-legend button:disabled { cursor: default; color: var(--ink-2); }
.donut-legend button:hover:not(:disabled) { background: var(--panel-2); }
.donut-legend button.dim { opacity: .45; }
.donut-legend i { width: 10px; height: 10px; border-radius: 2px; }
.donut-legend em { font-style: normal; color: var(--mute); font-size: 11.5px; text-align: end; }
@media (max-width: 420px) { .donut { grid-template-columns: 100px minmax(0, 1fr); } .donut svg { width: 100px; height: 100px; } }

/* detail sheet */
.drawer { position: fixed; z-index: 70; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; transition: transform .22s ease, opacity .22s; opacity: 0;
  top: 0; bottom: 0; inset-inline-end: 0; width: min(460px, 100vw); border-block: 0; border-inline-end: 0; transform: translateX(30px); }
[dir="rtl"] .drawer { transform: translateX(-30px); }
.drawer.on { transform: none !important; opacity: 1; }
body.sheet-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 10, 16, .5); z-index: 65; }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); }
.sheet-h h2 { flex: 1; font-size: 17px; min-width: 0; }
.sheet-h .icon-btn svg { stroke-width: 2; }
.sheet-b { flex: 1; overflow-y: auto; padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.sheet-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sheet-stats div { padding: 10px 12px; border-inline-start: 1px solid var(--line); }
.sheet-stats div:first-child { border-inline-start: 0; }
.sheet-stats b { display: block; font-family: var(--f-mono); font-size: 20px; font-weight: 500; }
.sheet-stats span { font-size: 12px; color: var(--mute); }
.sheet-b h3 { font-size: 14px; margin: 4px 0 -4px; }
.sheet-b .list { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
@media (max-width: 640px) {
  .drawer { top: auto; inset-inline: 0; bottom: 0; width: 100%; max-height: 82vh; border-radius: 14px 14px 0 0; border: 1px solid var(--line-2); border-bottom: 0; transform: translateY(40px) !important; }
  .drawer.on { transform: none !important; }
  .sheet-h { padding-top: 14px; }
  .sheet-h::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line-2); }
}

.link-btn { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font: inherit; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

.map-wrap.used .map-hint { opacity: 0; pointer-events: none; }
/* top bar never overflows: search and threat pill shrink first */
.topbar > * { flex-shrink: 0; }
.topbar .search { flex: 1 1 auto; min-width: 120px; }
.topbar .threat { flex-shrink: 1; min-width: 0; overflow: hidden; }
.topbar .threat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 1280px) { .threat small { display: none; } }
@media (max-width: 760px) { .live-pill { display: none; } }
