* { box-sizing: border-box; }

body {
  margin: 0;
  background: #0b0f1a;
  color: #e8edf5;
  font-family: "Manrope", "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif;
  font-size: 1rem;
}

#app-layout { padding-top: 40px; }

/* ── Site header ─────────────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: rgba(6, 10, 22, 0.96);
  border-bottom: 1px solid rgba(92, 224, 255, 0.12);
  z-index: 1200;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hdr-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  gap: 0;
}

.hdr-logo {
  font-family: "Manrope", "Roboto Mono", monospace;
  font-size: 15px;
  font-weight: 800;
  color: rgba(92, 224, 255, 0.9);
  text-decoration: none;
  letter-spacing: 0.16em;
  flex-shrink: 0;
  margin-right: 24px;
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.hdr-logo-left { color: #e2e8f0; }
.hdr-logo-right { color: #38bdf8; }
.hdr-logo:hover { color: #fff; }

.hdr-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.hdr-link {
  padding: 5px 10px;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.hdr-link:hover  { color: #e2e8f0; background: rgba(255,255,255,0.06); }
.hdr-link.active { color: rgba(92,224,255,0.9); }
.desktop-only { display: inline-block; }

.hdr-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.hdr-lang {
  display: flex;
  gap: 2px;
}
.hdr-lang-btn {
  background: none;
  border: 1px solid transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.hdr-lang-btn:hover  { color: #e2e8f0; }
.hdr-lang-btn.active { color: rgba(92,224,255,0.9); border-color: rgba(92,224,255,0.3); }

.hdr-burger {
  display: none;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}

.hdr-map-btn {
  display: none;
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.hdr-map-btn:hover { color: #e2e8f0; }

.desktop-only { display: inline-block; }

/* ── Severity badges ─────────────────────────────────────────────────────── */
.sev-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1.5;
}
.sev-low     { background: rgba(100,116,139,0.25); color: #94a3b8; border: 1px solid rgba(100,116,139,0.35); }
.sev-medium  { background: rgba(251,191,36,0.15);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.3);  }
.sev-high    { background: rgba(249,115,22,0.15);  color: #fb923c; border: 1px solid rgba(249,115,22,0.3);  }
.sev-extreme { background: rgba(239,68,68,0.18);   color: #f87171; border: 1px solid rgba(239,68,68,0.35);  }

/* ── Event link in feed ──────────────────────────────────────────────────── */
.ni-event-link {
  display: inline-block;
  font-size: 10px;
  color: rgba(92,224,255,0.6);
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.15s;
}
.ni-event-link:hover { color: rgba(92,224,255,1); }
.ni-event-link-lg {
  font-size: 12px;
  padding: 5px 0;
}

/* ── Expanded actions row ────────────────────────────────────────────────── */
.exp-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Static page shared layout ───────────────────────────────────────────── */
.static-page {
  min-height: 100vh;
  background: #060a16;
  color: #e2e8f0;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  padding-top: 44px;
}

.static-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.static-hero {
  margin-bottom: 48px;
}
.static-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(92,224,255,0.7);
  margin-bottom: 12px;
}
.static-h1 {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: #f1f5f9;
  margin: 0 0 16px;
}
.static-lead {
  font-size: 18px;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 640px;
  margin: 0;
}

.static-section { margin-bottom: 48px; }
.static-h2 {
  font-size: 22px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── shared page nav ─────────────────────────────────────────────────────── */
.page-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: rgba(6,10,22,0.97);
  border-bottom: 1px solid rgba(92,224,255,0.12);
}
.page-nav a { color: #64748b; text-decoration: none; font-size: 13px; }
.page-nav a:hover { color: #e2e8f0; }

/* ── Adjust app-layout for header ───────────────────────────────────────── */
#app-layout {
  padding-top: 44px;
}

@media (max-width: 768px) {
  .hdr-nav {
    display: none;
    position: fixed;
    top: 44px; left: 0; right: 0;
    background: rgba(6,10,22,0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(92,224,255,0.12);
    gap: 4px;
  }
  .hdr-nav.open { display: flex; }
  .hdr-burger   { display: block; }
  .hdr-link     { padding: 8px 4px; font-size: 14px; }

  #app-layout {
    height: calc(100vh - 44px);
    padding-top: 44px;
  }
  #news-panel { height: calc(100vh - 44px); }
}

/* ── Anomaly pulse animation ─────────────────────────────────────────────── */
@keyframes anomaly-ripple {
  0%   { transform: scale(1);   opacity: 0.7; }
  60%  { opacity: 0.15; }
  100% { transform: scale(2.8); opacity: 0;   }
}

/* ── App layout ──────────────────────────────────────────────────────────── */
#app-layout {
  display: flex;
  width: 100vw;
  height: calc(100vh - 44px);
  overflow: hidden;
}

/* ── News panel ──────────────────────────────────────────────────────────── */
#news-panel {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
  flex: 0 0 340px;
  height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  background: #0b0f1a;
  border-right: 1px solid rgba(92, 224, 255, 0.12);
  z-index: 100;
  overflow: hidden;
}

#news-panel-top {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.np-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(92, 224, 255, 0.1);
}

#news-filters {
  padding: 8px 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

#news-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(92,224,255,0.2) transparent;
}

#news-list::-webkit-scrollbar { width: 4px; }
#news-list::-webkit-scrollbar-track { background: transparent; }
#news-list::-webkit-scrollbar-thumb { background: rgba(92,224,255,0.2); border-radius: 2px; }

#news-footer {
  flex-shrink: 0;
  padding: 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.ni-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: #475569;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-align: center;
}

.ni-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(56,189,248,0.18);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: ni-spin 0.8s linear infinite;
}

@keyframes ni-spin {
  to { transform: rotate(360deg); }
}

.show-more-btn {
  width: 100%;
  text-align: center;
  padding: 8px;
}

/* ── Map container ───────────────────────────────────────────────────────── */
#map-container {
  flex: 1;
  position: relative;
  min-width: 0;
  height: 100vh;
}

#map {
  width: 100%;
  height: 100%;
}

/* Map top buttons (desktop: only labels toggle visible; mobile: also "Feed" button) */
.map-top-btns {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1001;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── News items ──────────────────────────────────────────────────────────── */
.news-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  background: transparent;
}

.news-item:hover { background: rgba(92,224,255,0.04); }
.ni-pin-btn {
  display: inline-flex;
  align-items: center;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 2px;
  transition: color 0.15s;
}
.ni-pin-btn:hover { color: #5ce0ff; }
.news-item.open  { background: rgba(92,224,255,0.06); }
.news-item.ni-active {
  background: #0d2137;
  border-left: 2px solid #38bdf8;
  box-shadow: inset 0 0 0 1px #1e4a6e;
}
.news-item.ni-active .ni-type { text-shadow: 0 0 8px currentColor; }

.ni-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.ni-date {
  font-size: 16px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.03em;
}

.ni-sev-badge {
  margin-left: auto;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ni-badge { font-size: 16px; }

.ni-title {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.ni-icon  { font-size: 22px; }

.ni-type {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.ni-geo {
  font-size: 16px;
  color: rgba(255,255,255,0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.ni-preview {
  font-size: 17px;
  color: rgba(255,255,255,0.5);
  line-height: 1.55;
  margin: 3px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Expanded news item ──────────────────────────────────────────────────── */
.ni-expanded { overflow: hidden; }

.exp-body {
  padding: 10px 10px 10px 12px;
  margin-top: 8px;
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
  font-size: 17px;
}

.exp-type {
  font-weight: bold;
  font-size: 19px;
  margin-bottom: 6px;
  font-family: "Roboto Mono", "Courier New", monospace;
}

.exp-data { margin-bottom: 8px; }

.exp-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 17px;
  font-family: "Roboto Mono", "Courier New", monospace;
}

.exp-row span:first-child { color: #64748b; }
.exp-row span:last-child  { color: #e2e8f0; text-align: right; word-break: break-all; }

.exp-geo {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

/* story tabs */
.exp-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #2d3f55;
  margin-bottom: 0;
}

.ni-tab-btn {
  padding: 4px 12px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid transparent;
  transition: all 0.1s;
}

.ni-tab-btn.active {
  background: #1e3a5a;
  color: #e2e8f0;
  border-bottom: 2px solid rgba(92,224,255,0.8);
  font-weight: 600;
}

.ni-tab-pane {
  padding: 8px;
  background: #0f1e30;
  border-radius: 0 4px 4px 4px;
  font-size: 19px;
  line-height: 1.65;
  color: #e2e8f0;
  font-family: "Google Sans", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(92,224,255,0.15) transparent;
}

/* sources */
.exp-sources { margin-top: 6px; }

.exp-sources-label {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #475569;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-family: "Roboto Mono", "Courier New", monospace;
}

.exp-source { margin-bottom: 6px; }

.exp-source-meta {
  display: block;
  font-size: 15px;
  color: #475569;
  font-family: "Roboto Mono", "Courier New", monospace;
}

.exp-source-link {
  font-size: 16px;
  color: #93c5fd;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-source-link:hover { text-decoration: underline; }

/* "show on map" button */
.ni-map-btn {
  margin-top: 10px;
  width: 100%;
  padding: 7px;
  background: rgba(92,224,255,0.08);
  border: 1px solid rgba(92,224,255,0.25);
  color: rgba(92,224,255,0.9);
  border-radius: 5px;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}

.ni-map-btn:hover {
  background: rgba(92,224,255,0.15);
  border-color: rgba(92,224,255,0.5);
}

/* ── Control panel ───────────────────────────────────────────────────────── */
#control-panel {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(92, 224, 255, 0.18);
  border-radius: 10px;
  padding: 10px 10px 8px;
  width: 200px;
  font-size: 16px;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(92,224,255,0.06);
  transition: width 0.2s, padding 0.2s;
}

#control-panel.collapsed {
  width: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: inline-flex;
  align-items: flex-start;
}

#ctrl-collapse-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(92,224,255,0.25);
  border-radius: 8px;
  color: rgba(92,224,255,0.75);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

#control-panel.collapsed #ctrl-collapse-btn {
  font-size: 15px;
  color: rgba(92,224,255,0.9);
}

#ctrl-collapse-btn:hover {
  color: rgba(92,224,255,1);
  background: rgba(92,224,255,0.12);
  border-color: rgba(92,224,255,0.45);
}

#ctrl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 2px 4px;
}

#ctrl-panel-body { padding: 0 8px 6px; padding-top: 24px; }

#control-panel.collapsed #ctrl-panel-body { display: none !important; }
#control-panel.collapsed #ctrl-header { padding: 0; }
#control-panel.collapsed .section-label { display: none; }

.panel-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(92, 224, 255, 0.9);
}

.panel-section { margin-bottom: 12px; }

.section-label {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.ctrl-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.ctrl-btn:hover {
  background: rgba(92,224,255,0.1);
  border-color: rgba(92,224,255,0.35);
  color: rgba(92,224,255,0.9);
}

.ctrl-btn.active {
  background: rgba(92,224,255,0.12);
  border-color: rgba(92,224,255,0.45);
  color: rgba(92,224,255,1);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Legend ──────────────────────────────────────────────────────────────── */
.legend { display: flex; flex-direction: column; gap: 4px; }

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 15px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px currentColor;
}

/* ── Anomaly popup ───────────────────────────────────────────────────────── */
.anomaly-popup .leaflet-popup-content-wrapper {
  background: rgb(6, 12, 22) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.9) !important;
  padding: 0 !important;
  border-radius: 8px !important;
  z-index: 9999 !important;
  max-height: calc(90vh - 40px) !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(92,224,255,0.2) transparent !important;
}

.anomaly-popup .leaflet-popup-content-wrapper::-webkit-scrollbar { width: 4px; }
.anomaly-popup .leaflet-popup-content-wrapper::-webkit-scrollbar-track { background: transparent; }
.anomaly-popup .leaflet-popup-content-wrapper::-webkit-scrollbar-thumb { background: rgba(92,224,255,0.2); border-radius: 2px; }

/* OSINT block inside popup — fixed height + scroll */
.anomaly-popup .osint-scroll {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(92,224,255,0.15) transparent;
}

/* Story tab pane inside popup — fixed height + scroll */
.anomaly-popup .story-scroll {
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(92,224,255,0.15) transparent;
}

.anomaly-popup { z-index: 9999 !important; }

.anomaly-popup .leaflet-popup-content { margin: 0 !important; }

.anomaly-popup .leaflet-popup-tip-container { display: none; }

/* ── Service status ──────────────────────────────────────────────────────── */
.status-badge {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.status-ok      { color: #4ade80; background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.25); }
.status-running { color: #fbbf24; background: rgba(251,191,36,0.1);  border: 1px solid rgba(251,191,36,0.25); animation: blink 1s infinite; }
.status-error   { color: #f87171; background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); }
.status-unknown { color: #94a3b8; background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.15); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.status-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

/* ── About button ────────────────────────────────────────────────────────── */
.about-btn {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ── About modal overlay ─────────────────────────────────────────────────── */
.about-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  /* Force own compositor layer — fixes iOS Safari overflow:hidden containment bug */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  isolation: isolate;
  background: rgba(4, 8, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.about-box {
  width: 100%;
  max-width: 740px;
  background: #080e1c;
  border: 1px solid rgba(92, 224, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 16px 64px rgba(0,0,0,0.8), 0 0 0 1px rgba(92,224,255,0.06);
  overflow: hidden;
  flex-shrink: 0;
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(92, 224, 255, 0.1);
  background: rgba(92, 224, 255, 0.03);
  gap: 12px;
}

.about-title-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-logo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(92, 224, 255, 0.95);
}

.about-sub {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

.about-lang-switcher {
  display: flex;
  gap: 3px;
}

.about-lang-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s;
}

.about-lang-btn.active {
  background: rgba(92,224,255,0.12);
  border-color: rgba(92,224,255,0.45);
  color: rgba(92,224,255,1);
}

.about-pane { display: none; }
.about-pane.active { display: block; }

.about-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
  flex-shrink: 0;
}

.about-close:hover {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
}

.about-content {
  padding: 24px 28px 32px;
  max-height: calc(90vh - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(92,224,255,0.2) transparent;
}

.about-content::-webkit-scrollbar { width: 4px; }
.about-content::-webkit-scrollbar-track { background: transparent; }
.about-content::-webkit-scrollbar-thumb { background: rgba(92,224,255,0.2); border-radius: 2px; }

.about-pane h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(92,224,255,0.9);
  text-transform: uppercase;
  margin: 24px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(92,224,255,0.12);
}

.about-pane h3 {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin: 16px 0 6px;
  letter-spacing: 0.04em;
}

.about-pane p {
  font-size: 19px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin: 0 0 10px;
}

.about-pane ul {
  margin: 6px 0 10px 0;
  padding-left: 18px;
}

.about-pane li {
  font-size: 19px;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}

.about-pane strong { color: rgba(255,255,255,0.88); }

.about-lead {
  font-size: 20px !important;
  color: rgba(255,255,255,0.75) !important;
  line-height: 1.65 !important;
  font-style: italic;
  border-left: 3px solid rgba(92,224,255,0.45);
  padding-left: 12px;
  margin-bottom: 20px !important;
}

.about-code {
  background: #040810;
  border: 1px solid rgba(92,224,255,0.12);
  border-radius: 5px;
  padding: 10px 14px;
  font-family: "Roboto Mono", "Courier New", monospace;
  font-size: 16px;
  color: rgba(92,224,255,0.75);
  margin: 8px 0 12px;
  overflow-x: auto;
  line-height: 1.6;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 17px;
}

.about-table th {
  text-align: left;
  color: rgba(255,255,255,0.35);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.about-table td {
  padding: 5px 8px;
  color: rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.about-table td:first-child {
  color: rgba(92,224,255,0.8);
  font-family: "Roboto Mono", "Courier New", monospace;
  font-size: 16px;
  white-space: nowrap;
}

.about-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}

.about-stack span {
  background: rgba(92,224,255,0.06);
  border: 1px solid rgba(92,224,255,0.18);
  color: rgba(92,224,255,0.7);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 15px;
  font-family: "Roboto Mono", "Courier New", monospace;
  letter-spacing: 0.03em;
}

.about-footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 16px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ── Case modal ─────────────────────────────────────────────────────────── */
.case-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 99998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 40px;
  background: rgba(4, 8, 18, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
}

.case-overlay.hidden { display: none; }

.case-box {
  width: 100%;
  max-width: 860px;
  background: #070d1a;
  border: 1px solid rgba(92,224,255,0.25);
  border-radius: 12px;
  box-shadow: 0 16px 64px rgba(0,0,0,0.75), 0 0 0 1px rgba(92,224,255,0.08);
  overflow: hidden;
}

.case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(92,224,255,0.14);
  background: linear-gradient(90deg, rgba(92,224,255,0.08), rgba(92,224,255,0.02));
}

.case-kicker {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(92,224,255,0.8);
  margin-bottom: 4px;
}

.case-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  color: #e8edf5;
  letter-spacing: 0.03em;
}

.case-sub {
  margin-top: 6px;
  font-size: 16px;
  color: rgba(255,255,255,0.45);
}

.case-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.case-close:hover {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
}

.case-header-right {
  display: flex;
  align-items: center;ы
  gap: 10px;
}

.case-lang-switcher {
  display: flex;
  gap: 6px;
}

.case-lang-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.12s;
}

.case-lang-btn.active {
  background: rgba(92,224,255,0.14);
  border-color: rgba(92,224,255,0.4);
  color: rgba(92,224,255,0.95);
}

.case-content {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  line-height: 1.7;
}

.case-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 18px 24px;
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px;
}

.case-list-item {
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.case-list-item:hover {
  border-color: rgba(92,224,255,0.3);
  color: rgba(255,255,255,0.95);
}

.case-list-item.active {
  background: rgba(92,224,255,0.1);
  border-color: rgba(92,224,255,0.5);
  color: rgba(92,224,255,0.95);
  box-shadow: 0 0 0 1px rgba(92,224,255,0.25);
}

.case-list-title {
  font-size: 16px;
  font-weight: 700;
}

.case-list-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}

.case-lead {
  margin: 0;
  font-size: 19px;
  color: rgba(255,255,255,0.7);
}

.case-section h3 {
  margin: 0 0 8px;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(92,224,255,0.85);
}

.case-section p {
  margin: 0;
  color: rgba(255,255,255,0.72);
}

.case-section ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.72);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.case-grid div {
  background: rgba(92,224,255,0.06);
  border: 1px solid rgba(92,224,255,0.18);
  border-radius: 8px;
  padding: 10px 12px;
}

.case-grid span {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}

.case-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  color: #e8edf5;
}

.case-section.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}

.case-metric {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(92,224,255,0.14);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #e8edf5;
}

.metric-value.accent { color: rgba(92,224,255,0.95); }

.case-section ul li { margin-bottom: 6px; }
.case-section ul li:last-child { margin-bottom: 0; }

/* ── Mobile toggle button ────────────────────────────────────────────────── */
.mobile-toggle-btn { display: none; }
.mobile-map-fab {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 2100;
  background: rgba(10,14,26,0.94);
  border: 1px solid rgba(92,224,255,0.45);
  color: rgba(92,224,255,0.95);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  gap: 8px;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  cursor: pointer;
  display: none;
}
.mobile-map-fab i { font-size: 16px; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #app-layout { position: relative; padding-top: 40px; }

  #news-panel {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: none !important;
    z-index: 200;
    padding-top: 48px;
    height: calc(100vh - 40px);
    overflow-y: auto;
  }

  #map-container {
    position: absolute;
    top: 40px; left: 0;
    width: 100%;
    display: none;
    height: calc(100vh - 40px);
  }

  /* switching classes */
  #map-container.map-active { display: block; }
  #news-panel.map-active    { display: none; }

  .mobile-toggle-btn { display: block; }

  /* "Карта" button inside news header */
  #btn-to-map {
    font-size: 16px;
    padding: 5px 10px;
  }

  #btn-to-news, .map-about-btn {
    background: rgba(10,14,26,0.92);
    border: 1px solid rgba(92,224,255,0.35);
    color: rgba(92,224,255,0.95);
    border-radius: 6px;
    padding: 8px 13px;
    font-size: 17px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }


  .mobile-map-fab { display: none; }
  .hdr-map-btn { display: inline-flex; }
  .hdr-lang { order: 1; }
  .hdr-map-btn { order: 2; }
  .hdr-burger { order: 3; }
  .desktop-only { display: none; }
  .desktop-only { display: none; }

  /* Case modal mobile */
  .case-box { max-width: 100%; }
  .case-header { flex-direction: column; align-items: flex-start; }
  .case-title  { font-size: 19px; }
/* ── Case content styles ──────────────────────────────────────────────────── */
.case-tags { display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px; }
.case-tag { padding:3px 10px;background:#0a1929;border:1px solid #1e3a5a;border-radius:20px;color:#38bdf8;font-size:12px; }

.case-stat-row { display:flex;gap:12px;margin:16px 0;flex-wrap:wrap; }
.case-stat { flex:1;min-width:80px;background:#0a1929;border:1px solid #1e3a5a;border-radius:8px;padding:12px;text-align:center; }
.case-stat-val { display:block;font-size:22px;font-weight:700;color:#38bdf8; }
.case-stat-label { display:block;font-size:11px;color:#64748b;margin-top:2px; }

.case-text h2 { color:#e2e8f0;font-size:17px;margin:20px 0 8px;border-bottom:1px solid #1e3a5a;padding-bottom:6px; }
.case-text p { color:#94a3b8;font-size:15px;line-height:1.75;margin-bottom:12px; }
.case-text ul { color:#94a3b8;font-size:15px;line-height:1.75;padding-left:20px;margin-bottom:12px; }
.case-text li { margin-bottom:8px; }
.case-text strong { color:#e2e8f0; }
.case-text em { color:#64748b; }

.case-quote { margin:20px 0;padding:14px 18px;border-left:3px solid #38bdf8;background:#0a1929;border-radius:0 8px 8px 0; }
.case-quote p,.case-quote { color:#cbd5e1;font-size:15px;font-style:italic;line-height:1.7;margin:0; }
.case-quote cite { display:block;margin-top:8px;font-size:12px;color:#64748b;font-style:normal; }

.case-sources-block { margin-top:24px;border-top:1px solid #1e3a5a;padding-top:16px; }
.case-sources-label { font-size:11px;text-transform:uppercase;letter-spacing:0.1em;color:#64748b;margin-bottom:10px; }
.case-source { display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px;gap:12px; }
.case-source a { color:#93c5fd;text-decoration:none;font-size:13px; }
.case-source a:hover { text-decoration:underline; }
.case-source-date { color:#475569;font-size:12px;white-space:nowrap;flex-shrink:0; }

.case-map-btn { margin-top:20px;width:100%;padding:12px;border:1px solid #1e3a5a;border-radius:8px;
  background:transparent;color:#93c5fd;font-size:15px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:8px; }
.case-map-btn:hover { background:#0a1929; }

.case-list-sev { font-size:13px;font-weight:700;color:#f87171;white-space:nowrap;min-width:42px; }
.case-list-info { flex:1;min-width:0; }
.case-list-date { font-size:11px;color:#475569;margin-top:2px; }

  .case-content { padding: 18px 16px 22px; }
  .case-section.two-col { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .case-list { order: 2; flex-direction: row; flex-wrap: wrap; }
  .case-list-item { flex: 1 1 160px; }
}

/* ── Anomaly detail modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}
.modal-overlay.hidden { display: none; }

.anomaly-modal {
  position: relative;
  width: 560px;
  max-width: 96vw;
  height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
  background: #060c16;
  border: 1px solid #1e3a5a;
  border-radius: 12px;
  overflow-y: auto;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: #1e3a5a transparent;
}

.modal-close {
  position: sticky;
  top: 0;
  align-self: flex-end;
  background: none;
  border: none;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
}
.modal-close:hover { color: #e2e8f0; }

#modal-body {
  flex: 0 0 auto;
  min-height: 0;
}

#modal-map {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #1e3a5a;
}

@media (max-width: 768px) {
  .anomaly-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    height: 100dvh;
    max-height: none;
  }
}

/* ── Panel status bar ────────────────────────────────────────────────────── */
#panel-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.15);
}

#panel-status-bar .status-badge {
  font-size: 11px;
  padding: 2px 7px;
  margin: 0;
  flex-shrink: 0;
}

#panel-status-bar .status-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Severity slider row ─────────────────────────────────────────────────── */
#sev-filter-row {
  padding: 0 2px;
}

.sev-filter-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.sev-filter-val {
  font-size: 12px;
  color: rgba(92,224,255,0.9);
  white-space: nowrap;
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

#sev-slider {
  flex: 1;
  min-width: 0;
  accent-color: rgba(92,224,255,0.8);
  cursor: pointer;
  height: 4px;
}

/* ── Labels toggle button on map ─────────────────────────────────────────── */
#btn-labels-toggle {
  font-size: 13px;
  padding: 5px 9px;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
}
#btn-labels-toggle:hover  { opacity: 1; }
#btn-labels-toggle.active { opacity: 1; color: rgba(92,224,255,0.95); }

/* ── Map legend Leaflet control ──────────────────────────────────────────── */
.map-legend-ctrl {
  background: rgba(8, 12, 24, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(92,224,255,0.14);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 80px !important;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.mlc-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.mlc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px currentColor;
}

/* mobile: hide legend to save space */
@media (max-width: 768px) {
  .map-legend-ctrl { display: none; }
  #btn-labels-toggle { display: none; }
  #control-panel { display: none; }
}
