:root {
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --panel-w: 400px;
  --gap: 14px;
  --radius: 14px;

  --houthi: #22c55e;
  --gov: #3b82f6;
  --contested: #f59e0b;
  --stc: #a78bfa;

  --t-airstrike: #ff4d4f;
  --t-missile: #ff8a3d;
  --t-clash: #e879f9;
  --t-maritime: #22d3ee;
  --t-territory: #facc15;
  --t-report: #94a3b8;
  --t-analysis: #64748b;

  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
}

:root, :root[data-theme="dark"] {
  --bg: #0a0e13;
  --card: rgba(14, 19, 26, 0.84);
  --card-solid: #10161e;
  --card-2: rgba(255, 255, 255, 0.04);
  --card-3: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #e7edf3;
  --text-2: #a7b3bf;
  --muted: #74828f;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --accent: #ff4d4f;
  --focus: #60a5fa;
}

:root[data-theme="light"] {
  --bg: #eef1f4;
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --card-2: rgba(15, 23, 42, 0.04);
  --card-3: rgba(15, 23, 42, 0.07);
  --border: rgba(15, 23, 42, 0.09);
  --border-2: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --shadow: 0 10px 34px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  --accent: #e11d48;
  --focus: #2563eb;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
[dir="rtl"] body, [dir="rtl"] { font-family: "IBM Plex Sans Arabic", var(--font); }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

#map { position: fixed; inset: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* ── Header ─────────────────────────────────────────────── */
.brand {
  position: fixed; top: var(--gap); inset-inline-start: var(--gap); z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px;
}
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(255,77,79,.22), rgba(255,77,79,.05)); border: 1px solid rgba(255,77,79,.35); }
.brand-mark span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,77,79,.6); animation: beacon 2s infinite; }
.brand-text h1 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text p { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.live-pill { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); color: var(--ok); font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
.live-pill small { color: var(--text-2); letter-spacing: 0; font-weight: 500; font-family: var(--mono); font-size: 10.5px; }
.live-pill.down { color: var(--warn); background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); }
.header-actions { display: flex; gap: 6px; margin-inline-start: 4px; }
.icon-btn { height: 30px; min-width: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; transition: background .15s; }
.icon-btn:hover { background: var(--card-3); }

/* ── KPIs ───────────────────────────────────────────────── */
.kpis { position: fixed; top: calc(var(--gap) + 66px); inset-inline-start: var(--gap); z-index: 4; display: flex; gap: 8px; }
.kpi { padding: 9px 12px 9px; min-width: 104px; display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; cursor: default; }
.kpi b { font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; }
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.kpi.bump b { animation: bump .6s ease; }

/* ── Panel ──────────────────────────────────────────────── */
.panel {
  position: fixed; top: var(--gap); bottom: var(--gap); inset-inline-end: var(--gap); width: var(--panel-w); z-index: 6;
  display: flex; flex-direction: column; overflow: hidden;
}
.sheet-handle { display: none; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.tab:hover { background: var(--card-2); color: var(--text); }
.tab.active { background: var(--card-3); color: var(--text); }
.tab em { font-style: normal; font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; min-width: 20px; text-align: center; }
.tab-body { display: none; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tab-body.active { display: flex; flex-direction: column; }
.tab-body::-webkit-scrollbar, .feed::-webkit-scrollbar { width: 8px; }
.tab-body::-webkit-scrollbar-thumb, .feed::-webkit-scrollbar-thumb { background: var(--card-3); border-radius: 8px; }

.filters { padding: 12px 12px 8px; display: grid; gap: 9px; border-bottom: 1px solid var(--border); background: var(--card-2); }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--card-solid); border: 1px solid var(--border); color: var(--muted); }
.search:focus-within { border-color: var(--focus); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; }
.search kbd { font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border-2); color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(5, 1fr); padding: 3px; border-radius: 10px; background: var(--card-solid); border: 1px solid var(--border); }
.seg.seg-3 { grid-template-columns: repeat(3, 1fr); }
.lang-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.lang-row .seg button { height: 24px; }
.seg button { height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 600; }
.seg button.on { background: var(--card-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text-2); font-size: 12px; font-weight: 500; transition: all .15s; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip b { font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-weight: 500; }
.chip.off { opacity: .45; }
.chip.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.chip:hover { border-color: var(--border-2); }

.toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 12.5px; color: var(--text-2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { width: 30px; height: 18px; border-radius: 999px; background: var(--card-3); border: 1px solid var(--border-2); position: relative; flex: none; transition: background .2s; }
.toggle span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.toggle input:checked + span { background: var(--focus); border-color: var(--focus); }
.toggle input:checked + span::after { transform: translateX(12px); background: #fff; }
[dir="rtl"] .toggle input:checked + span::after { transform: translateX(-12px); }
.toggle input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.toggle em { font-style: normal; }

/* ── Feed ───────────────────────────────────────────────── */
.feed { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; align-content: start; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ev {
  position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 10px 10px 10px;
  border-radius: 11px; border: 1px solid transparent; background: var(--card-2); cursor: pointer; transition: background .15s, border-color .15s;
}
.ev:hover { background: var(--card-3); border-color: var(--border); }
.ev.sel { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); }
.ev.fresh { animation: flashIn 1.6s ease; }
.ev-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); position: relative; }
.ev-icon svg { width: 16px; height: 16px; }
.ev.live .ev-icon::after { content: ""; position: absolute; inset: -4px; border-radius: 11px; border: 2px solid var(--c); opacity: 0; animation: ring 2s infinite; }
.ev-title { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-title[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--font); direction: rtl; text-align: start; }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.ev-meta .src { color: var(--text-2); font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-meta time { font-family: var(--mono); font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; border: 1px solid var(--border-2); color: var(--text-2); white-space: nowrap; }
.badge.official { color: #60a5fa; border-color: rgba(96,165,250,.4); background: rgba(96,165,250,.08); }
.badge.wire { color: #34d399; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.badge.major { color: #a5b4fc; border-color: rgba(165,180,252,.4); background: rgba(165,180,252,.08); }
.badge.party { color: #fbbf24; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.08); }
.badge.corr { color: var(--text); background: var(--card-3); }
.badge.ctl { border: 0; color: #fff; background: var(--sc); }
.loc { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); }
.loc svg { width: 11px; height: 11px; }
.ev-type { font-weight: 600; color: var(--c); }

/* ── Control tab ────────────────────────────────────────── */
.sec { padding: 14px 14px 6px; }
.sec h3 { margin: 0 0 10px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
[dir="rtl"] .sec h3 { letter-spacing: 0; }
.share { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--card-3); }
.share i { display: block; height: 100%; transition: width .6s ease; }
.share-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.share-legend div { padding: 8px 10px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); }
.share-legend b { display: block; font-family: var(--mono); font-size: 18px; font-weight: 600; }
.share-legend small { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; }
.share-legend small i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.asof { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--muted); }
.asof b { color: var(--text-2); font-family: var(--mono); font-weight: 500; }
.changes { list-style: none; margin: 0; padding: 0; position: relative; }
.changes::before { content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 6px; width: 2px; background: var(--border-2); border-radius: 2px; }
.chg { position: relative; padding: 0 0 14px 0; padding-inline-start: 22px; cursor: pointer; }
.chg::before { content: ""; position: absolute; top: 4px; inset-inline-start: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--card-solid); border: 2px solid var(--to); }
.chg:hover .chg-place { text-decoration: underline; }
.chg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.chg-date { font-family: var(--mono); color: var(--muted); font-size: 11px; }
.chg-place { font-weight: 600; font-size: 13px; }
.chg p { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.chg a { font-size: 11.5px; color: var(--muted); }
.st { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; color: #fff; background: var(--sc); }
.arrow { color: var(--muted); }
.govs { display: grid; gap: 4px; }
.gov-row { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.gov-row:hover { background: var(--card-2); }
.gov-row .bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--card-3); }
.note-box { margin: 6px 14px 16px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px dashed var(--border-2); color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ── Sources tab ────────────────────────────────────────── */
.src-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--card-2); margin-bottom: 6px; }
.src-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.src-row .dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.src-row .dot.error { background: var(--err); }
.src-row .dot.pending { background: var(--warn); }
.src-row b { font-size: 13px; font-weight: 600; display: block; }
.src-row small { color: var(--muted); font-size: 11.5px; display: block; margin-top: 2px; word-break: break-word; }
.src-row .when { font-family: var(--mono); font-size: 11px; color: var(--text-2); text-align: end; }

/* ── Ad slot (fixed; never re-rendered) ─────────────────── */
.ad-wrap { flex: none; padding: 6px 10px 4px; border-top: 1px solid var(--border); background: var(--card-2); }
.ad-label { display: block; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
[dir="rtl"] .ad-label { letter-spacing: 0; }
.ad-wrap ins.adsbygoogle, .ad-preview { display: block; width: 100%; height: 90px; border-radius: 8px; overflow: hidden; }
.ad-preview { display: grid; place-items: center; border: 1px dashed var(--border-2); color: var(--muted); font-size: 12px; text-align: center; }
/* Google's documented way to collapse a slot that received no ad */
.ad-wrap:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.panel-foot { flex: none; display: flex; justify-content: flex-end; padding: 4px 12px 6px; font-size: 11px; }
.panel-foot a { color: var(--muted); text-decoration: none; }
.panel-foot a:hover { color: var(--text); text-decoration: underline; }

/* ── Legend ─────────────────────────────────────────────── */
.legend { position: fixed; bottom: calc(var(--gap) + 84px); inset-inline-start: var(--gap); z-index: 4; width: 236px; overflow: hidden; }
.legend-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 0; background: transparent; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.legend-head svg { transition: transform .2s; }
.legend.collapsed .legend-head svg { transform: rotate(-90deg); }
.legend.collapsed .legend-body { display: none; }
.legend-body { padding: 0 12px 12px; display: grid; gap: 7px; }
.lg-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.lg-row b { font-family: var(--mono); font-size: 11.5px; color: var(--text); font-weight: 500; }
.sw { width: 20px; height: 13px; border-radius: 3px; border: 1px solid; }
.sw-houthi { background: color-mix(in srgb, var(--houthi) 45%, transparent); border-color: var(--houthi); }
.sw-gov { background: color-mix(in srgb, var(--gov) 45%, transparent); border-color: var(--gov); }
.sw-contested { border-color: var(--contested); background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--contested) 60%, transparent) 0 3px, transparent 3px 6px); }
.ln { height: 0; width: 20px; border-top: 3px solid #f8fafc; }
:root[data-theme="light"] .ln { border-top-color: #0f172a; }
.ln-soft { border-top-style: dashed; border-top-width: 2px; }
.lg-sep { height: 1px; background: var(--border); margin: 2px 0; }
.lg-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.lg-types span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.lg-types i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent); }
.pulse-sw { width: 12px; height: 12px; margin-inline-start: 4px; border-radius: 50%; background: var(--t-airstrike); position: relative; }
.pulse-sw::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--t-airstrike); animation: ring 2s infinite; }
.layers { display: grid; gap: 7px; }

/* ── Map tools ──────────────────────────────────────────── */
.map-tools { position: fixed; top: var(--gap); inset-inline-end: calc(var(--panel-w) + var(--gap) * 2); z-index: 4; display: flex; gap: 8px; align-items: center; }
.tool { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tool.toggle.mini { color: var(--text); }
.tool.toggle svg { color: var(--muted); flex: none; transition: color .2s; }
.tool.toggle input:checked ~ svg { color: var(--focus); }
button.tool:hover { background: var(--card-solid); }

/* ── Timeline ───────────────────────────────────────────── */
.timeline { position: fixed; bottom: var(--gap); inset-inline-start: var(--gap); inset-inline-end: calc(var(--panel-w) + var(--gap) * 2); height: 72px; z-index: 4; display: flex; align-items: stretch; gap: 10px; padding: 10px 12px 6px; }
.play { width: 38px; height: 38px; align-self: center; border-radius: 50%; border: 1px solid var(--border-2); background: var(--card-3); display: grid; place-items: center; flex: none; }
.play:hover { background: var(--accent); color: #fff; border-color: transparent; }
.play .i-pause, .timeline.playing .play .i-play { display: none; }
.timeline.playing .play .i-pause { display: block; }
.tl-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
#histogram { width: 100%; flex: 1; min-height: 0; display: block; cursor: crosshair; }
.tl-axis { position: relative; height: 14px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.tl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-cursor { position: absolute; top: -2px; bottom: 12px; width: 2px; background: var(--accent); display: none; pointer-events: none; }
.tl-cursor span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; padding: 2px 6px; border-radius: 5px; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.timeline.playing .tl-cursor, .timeline.hovering .tl-cursor { display: block; }

/* ── Tooltip & popups ───────────────────────────────────── */
.tooltip { position: fixed; z-index: 20; pointer-events: none; padding: 8px 10px; border-radius: 9px; background: var(--card-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; max-width: 260px; }
.tooltip.on { opacity: 1; transform: none; }
.tooltip b { display: block; font-size: 13px; }
.tooltip small { color: var(--muted); }
.tooltip .st { margin-top: 5px; }

.maplibregl-popup { max-width: 360px !important; z-index: 8; }
.maplibregl-popup-content { background: var(--card-solid); color: var(--text); border: 1px solid var(--border-2); border-radius: 13px; box-shadow: var(--shadow); padding: 0; font-family: var(--font); overflow: hidden; }
.maplibregl-popup-tip { border-top-color: var(--card-solid) !important; border-bottom-color: var(--card-solid) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; width: 28px; height: 28px; top: 4px; right: 4px; border-radius: 7px; }
[dir="rtl"] .maplibregl-popup-close-button { right: auto; left: 4px; }
.maplibregl-popup-close-button:hover { background: var(--card-3); color: var(--text); }
.pop { padding: 13px 14px 12px; max-height: 60vh; overflow-y: auto; }
.pop-kicker { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; padding-inline-end: 24px; }
.pop h4 { margin: 0 0 8px; font-size: 14.5px; line-height: 1.4; }
.pop h4[lang="ar"] { direction: rtl; font-family: "IBM Plex Sans Arabic", var(--font); }
.pop dl { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; font-size: 12.5px; }
.pop dt { color: var(--muted); }
.pop dd { margin: 0; color: var(--text-2); }
.pop .srcs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.pop .srcs li { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pop .srcs a { color: var(--text); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop .srcs a:hover { text-decoration: underline; }
.pop .mini-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.pop .mini-list li { font-size: 12px; color: var(--text-2); display: flex; gap: 6px; cursor: pointer; }
.pop .mini-list li:hover { color: var(--text); }
.pop .mini-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-top: 5px; flex: none; }
.pop .note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--card-2); color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.pop .btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 30px; padding: 0 11px; border-radius: 8px; background: var(--card-3); border: 1px solid var(--border-2); font-size: 12px; font-weight: 600; text-decoration: none; }
.pop .btn:hover { background: var(--accent); border-color: transparent; color: #fff; }
.pop .hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ── Map markers ────────────────────────────────────────── */
.pulse-marker { width: 16px; height: 16px; cursor: pointer; }
.pulse { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 16px var(--c); position: relative; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c); animation: shock 2.2s cubic-bezier(.2,.6,.3,1) infinite; }
.pulse::after { animation-delay: 1.1s; }
.pulse.boom::before { animation: boom 1.2s ease-out 1; }
.gov-label { pointer-events: none; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text); opacity: .6; text-shadow: 0 1px 3px var(--bg), 0 0 8px var(--bg); white-space: nowrap; }
[dir="rtl"] .gov-label { letter-spacing: 0; font-size: 12.5px; }

/* ── Toasts ─────────────────────────────────────────────── */
.toasts { position: fixed; bottom: calc(var(--gap) + 84px); left: calc((100vw - var(--panel-w) - var(--gap)) / 2); transform: translateX(-50%); z-index: 30; align-content: end; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 4px 1fr auto; gap: 11px; align-items: center; padding: 10px 10px 10px 0; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2); overflow: hidden; }
.toast.out { animation: toastOut .3s ease forwards; }
.toast .bar { align-self: stretch; background: var(--c); }
.toast small { display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--c); font-weight: 700; }
.toast p { margin: 2px 0 0; font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast button { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-2); background: var(--card-3); font-size: 12px; font-weight: 600; }

/* ── MapLibre chrome ────────────────────────────────────── */
.maplibregl-ctrl-bottom-right { right: calc(var(--panel-w) + var(--gap) * 2); bottom: calc(var(--gap) + 80px); }
[dir="rtl"] .maplibregl-ctrl-bottom-right { right: auto; left: calc(var(--panel-w) + var(--gap) * 2); }
.maplibregl-ctrl-group { background: var(--card) !important; border: 1px solid var(--border); border-radius: 10px !important; box-shadow: var(--shadow) !important; backdrop-filter: blur(12px); }
.maplibregl-ctrl-group button + button { border-top-color: var(--border) !important; }
:root[data-theme="dark"] .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-attrib { background: transparent !important; font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-bottom-left { display: none; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(255,77,79,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,77,79,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes ring { 0% { opacity: .8; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes shock { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.6); } }
@keyframes boom { 0% { opacity: 1; transform: scale(1); border-width: 4px; } 100% { opacity: 0; transform: scale(9); border-width: 1px; } }
@keyframes bump { 30% { transform: scale(1.25); color: var(--accent); } }
@keyframes flashIn { 0% { background: color-mix(in srgb, var(--c) 30%, transparent); transform: translateY(-6px); opacity: 0; } 20% { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
[dir="rtl"] .toasts { left: auto; right: calc((100vw - var(--panel-w) - var(--gap)) / 2); transform: translateX(50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1240px) {
  .kpi small { display: none; }
  .kpi { min-width: 64px; }
  .map-tools .toggle em { display: none; }
}
@media (max-width: 1040px) {
  :root { --panel-w: 360px; }
  .map-tools { top: auto; bottom: calc(var(--gap) + 84px); inset-inline-end: calc(var(--panel-w) + var(--gap) * 2); flex-direction: column; align-items: stretch; }
}
@media (max-width: 760px) {
  :root { --gap: 10px; }
  .brand { inset-inline-end: var(--gap); padding: 8px 10px; }
  .brand-text p { display: none; }
  .brand-text { flex: 1; min-width: 0; }
  .brand-text h1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .live-pill small { display: none; }
  .kpis { top: calc(var(--gap) + 58px); inset-inline-end: var(--gap); }
  .kpi { flex: 1; min-width: 0; padding: 7px 9px; }
  .kpi b { font-size: 16px; }
  .panel { top: auto; inset-inline: 0; bottom: 0; width: auto; height: 42vh; border-radius: 18px 18px 0 0; transition: height .3s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  .panel.expanded { height: 86vh; }
  .sheet-handle { display: grid; place-items: center; height: 20px; border: 0; background: transparent; flex: none; }
  .sheet-handle span { width: 40px; height: 4px; border-radius: 4px; background: var(--border-2); }
  .tabs { padding-top: 0; }
  .ad-wrap ins.adsbygoogle, .ad-preview { height: 50px; }
  .panel-foot { padding: 2px 12px 4px; }
  .legend { top: calc(var(--gap) + 116px); bottom: auto; width: 200px; }
  .timeline { display: none; }
  .map-tools { top: calc(var(--gap) + 116px); bottom: auto; inset-inline-end: var(--gap); flex-direction: column; align-items: flex-end; }
  .map-tools .tool { height: 30px; padding: 0 10px; font-size: 12px; }
  .maplibregl-ctrl-bottom-right { right: var(--gap); bottom: calc(42vh + 8px); }
  [dir="rtl"] .maplibregl-ctrl-bottom-right { left: var(--gap); }
  .toasts, [dir="rtl"] .toasts { top: calc(var(--gap) + 58px); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); align-content: start; }
}
