/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0c12;
  --bg2:        #0f1219;
  --bg3:        #141824;
  --bg4:        #1a2030;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);
  --accent:     #3b82f6;
  --accent-red: #e53e5b;
  --accent-ora: #f59e0b;
  --accent-grn: #10b981;
  --accent-tea: #06b6d4;
  --accent-pur: #8b5cf6;
  --text:       #dde4f0;
  --text2:      #a8b4cc;
  --muted:      #5a6a88;
  --radius:     10px;
  --radius-sm:  6px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);

  /* Section color tokens */
  --col-red:    #e53e5b;
  --col-blue:   #3b82f6;
  --col-green:  #10b981;
  --col-orange: #f59e0b;
  --col-teal:   #06b6d4;
  --col-yellow: #eab308;
  --col-purple: #8b5cf6;
  --col-gray:   #64748b;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Particle canvas ── */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10,12,18,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo-svg {
  width: 100%;
  height: 100%;
  color: var(--accent-red);
  filter: drop-shadow(0 0 8px rgba(229,62,91,0.4));
  animation: logo-pulse 3s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%,100% { filter: drop-shadow(0 0 8px rgba(229,62,91,0.4)); }
  50%      { filter: drop-shadow(0 0 16px rgba(229,62,91,0.7)); }
}
.title-group { display: flex; flex-direction: column; gap: 1px; }
.site-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
.site-subtitle {
  font-size: 10px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-red);
  font-family: 'JetBrains Mono', monospace;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: live-blink 1.4s ease-in-out infinite;
}
@keyframes live-blink {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(229,62,91,0.5); }
  50%      { opacity: 0.4; box-shadow: 0 0 0 4px rgba(229,62,91,0); }
}
.header-datetime {
  font-size: 10px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.header-countdown {
  font-size: 10px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.header-countdown b { color: var(--text2); }

/* ── Warning bar ── */
.warning-bar {
  background: rgba(245,158,11,0.08);
  border-bottom: 1px solid rgba(245,158,11,0.18);
  color: var(--accent-ora);
  font-size: 11px;
  font-weight: 500;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  letter-spacing: 0.02em;
}

/* ── News ticker ── */
.ticker-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  height: 32px;
  position: relative;
  z-index: 10;
}
.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--accent-red);
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
}
#tickerContent {
  display: inline-block;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text2);
  font-family: 'JetBrains Mono', monospace;
  padding-left: 100%;
}
@keyframes ticker-run {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Tabs ── */
.conflict-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 10px 20px 0;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  letter-spacing: 0.03em;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text2); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent-red); }
.tab-btn svg { opacity: 0.7; }
.tab-btn.active svg { opacity: 1; color: var(--accent-red); }

/* ── Main layout ── */
.site-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
  position: relative;
  z-index: 1;
}
.conflict-panel { display: block; }
.conflict-panel.hidden { display: none; }

.main-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar-col { position: static; max-height: none; }
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  animation: countIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}
.stat-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  animation: countIn 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
.stat-card--alert .stat-value { color: var(--accent-red); }
.stat-card--intensity .stat-value { color: var(--accent); font-size: 36px; }
.stat-value--split { font-size: 32px; letter-spacing: -0.02em; }
.stat-sep { color: var(--muted); font-weight: 400; }
.split-missiles { color: var(--accent-red); }
.split-drones { color: var(--accent); }
.meta-missiles { color: rgba(229,62,91,0.75); }
.meta-drones { color: rgba(59,130,246,0.75); }
.tab-flags { font-size: 13px; letter-spacing: -1px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif; }
.tab-flags img.emoji { height: 1.1em; width: 1.1em; vertical-align: -0.15em; display: inline; margin: 0 1px; }
@keyframes countIn {
  from { opacity: 0; transform: scale(0.8) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.stat-meta {
  font-size: 10px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Sections content ── */
.sections-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-block {
  border-bottom: 1px solid var(--border);
  animation: sectionIn 0.4s ease both;
}
@keyframes sectionIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}
.section-header:hover { padding-left: 4px; }

.section-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.flag--red    { background: var(--col-red); }
.flag--blue   { background: var(--col-blue); }
.flag--green  { background: var(--col-green); }
.flag--orange { background: var(--col-orange); color: #1a1a1a; }
.flag--teal   { background: var(--col-teal); }
.flag--yellow { background: var(--col-yellow); color: #1a1a1a; }
.flag--purple { background: var(--col-purple); }
.flag--gray   { background: var(--col-gray); }

.section-title-wrap { flex: 1; min-width: 0; }
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  transition: var(--transition);
}
.section-header:hover .section-title { color: white; }
.section-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.section-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.section-block.open .section-chevron { transform: rotate(90deg); }

.section-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, padding 0.3s ease;
  padding-bottom: 0;
}
.section-block.open .section-body {
  max-height: 6000px;
  opacity: 1;
  padding-bottom: 18px;
}

/* Executive summary always open */
.section-block--executive .section-body {
  max-height: 6000px;
  opacity: 1;
  padding-bottom: 18px;
}
.section-block--executive .section-chevron { display: none; }

/* Executive summary box */
.section-summary-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text2);
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, var(--bg3) 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59,130,246,0.15);
  border-left: 3px solid var(--accent);
}

.section-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-point {
  display: flex;
  gap: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text2);
  animation: pointIn 0.35s ease both;
  background: rgba(255,255,255,0.018);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  border-left: 2px solid var(--point-accent, var(--accent));
  transition: background var(--transition), border-color var(--transition);
  overflow: hidden;
}
.section-point:hover {
  background: rgba(255,255,255,0.034);
  border-color: rgba(255,255,255,0.08);
  border-left-color: var(--point-accent, var(--accent));
}
@keyframes pointIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.section-point-inner {
  padding: 9px 12px;
  flex: 1;
}

/* Key developments */
.key-dev-list { display: flex; flex-direction: column; gap: 8px; }
.key-dev-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.65;
  animation: pointIn 0.35s ease both;
  padding: 10px 12px;
  background: rgba(234,179,8,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(234,179,8,0.1);
  border-left: 2px solid var(--col-yellow);
}
.key-dev-num {
  font-size: 9px;
  font-weight: 800;
  color: var(--col-yellow);
  font-family: 'JetBrains Mono', monospace;
  min-width: 16px;
  padding-top: 2px;
  margin-top: 1px;
}
.key-dev-text {
  flex: 1;
  font-weight: 500;
  color: var(--text);
}

/* Threat / assessment prose sections */
.section-prose {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text2);
  padding: 14px 16px;
  background: rgba(229,62,91,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(229,62,91,0.12);
  border-left: 3px solid var(--accent-red);
}
.section-prose.prose--regional {
  border-left-color: var(--col-teal);
  background: rgba(6,182,212,0.04);
  border-color: rgba(6,182,212,0.12);
  border-left-color: var(--col-teal);
}
.section-prose.prose--intel {
  border-left-color: var(--accent-pur);
  background: rgba(139,92,246,0.04);
  border-color: rgba(139,92,246,0.12);
  border-left-color: var(--accent-pur);
}
/* Highlight PRIMARY RISK / SECONDARY RISK labels */
.section-prose strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Sidebar ── */
.sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 2px;
}
.sidebar-col::-webkit-scrollbar { width: 3px; }
.sidebar-col::-webkit-scrollbar-track { background: transparent; }
.sidebar-col::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

.sidebar-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  animation: sectionIn 0.4s ease both;
}
.sidebar-card-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Charts ── */
.chart-card { padding: 12px 14px; }
.chart-container { height: 70px; position: relative; }
.chart-container--tall { height: 120px; }
.chart-container--channels { height: 175px; }
.chart-card--tall { }

/* ── Sections nav ── */
.sections-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sections-nav-item {
  font-size: 10px;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  font-family: 'JetBrains Mono', monospace;
}
.sections-nav-item:hover { color: var(--text2); background: rgba(255,255,255,0.04); }
.sections-nav-item.active { color: var(--accent); background: rgba(59,130,246,0.08); }

/* ── Sources list ── */
.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sources-list li a {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  text-decoration: none;
  display: block;
  padding: 3px 4px;
  border-radius: 3px;
  transition: background var(--transition), color var(--transition);
}
.sources-list li a:hover { background: rgba(59,130,246,0.08); color: var(--text); }

/* ── Source tags in content ── */
.src-tags { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-left: 2px; }
.src-tag {
  display: inline-block;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  text-decoration: none;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 3px;
  padding: 1px 4px;
  transition: background var(--transition), color var(--transition);
}
.src-tag:hover { background: rgba(59,130,246,0.2); color: var(--text); }

/* ── Section count badge ── */
.section-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 5px;
  margin-left: 6px;
  font-family: 'JetBrains Mono', monospace;
  vertical-align: middle;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 20px;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 4px;
}
.site-footer p {
  font-size: 11px;
  color: var(--muted);
}
.footer-disclaimer {
  font-size: 10px;
  color: #3d4a5c;
}

/* ── Scroll-to-top button ── */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), color var(--transition), background var(--transition);
  pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--bg4); color: var(--text); }

/* ── Panel controls ── */
.panel-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-top: 14px;
}
.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-sentiment {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
}
.panel-sentiment[data-sentiment="escalating"]    { color: var(--accent-red); background: rgba(229,62,91,0.12);  border: 1px solid rgba(229,62,91,0.25); }
.panel-sentiment[data-sentiment="volatile"]       { color: var(--accent-ora); background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); }
.panel-sentiment[data-sentiment="active"]         { color: var(--accent-ora); background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); }
.panel-sentiment[data-sentiment="tense"]          { color: var(--accent-ora); background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.2); }
.panel-sentiment[data-sentiment="stable"]         { color: var(--accent-grn); background: rgba(16,185,129,0.12);  border: 1px solid rgba(16,185,129,0.25); }
.panel-sentiment[data-sentiment="de-escalating"] { color: var(--accent-tea); background: rgba(6,182,212,0.12);  border: 1px solid rgba(6,182,212,0.25); }
.panel-ctrl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.section-filter {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 11px;
  padding: 5px 10px;
  outline: none;
  width: 160px;
  transition: border-color var(--transition), width var(--transition);
}
.section-filter::placeholder { color: var(--muted); }
.section-filter:focus { border-color: var(--accent); width: 200px; }
.section-filter::-webkit-search-cancel-button { filter: invert(0.5); }

.ctrl-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.ctrl-btn:hover { border-color: var(--border2); color: var(--text); background: var(--bg4); }

/* ── Copy button per section ── */
.section-copy-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.section-header:hover .section-copy-btn { opacity: 1; }
.section-copy-btn:hover { color: var(--accent); background: rgba(59,130,246,0.1); }

/* ── Refresh toast ── */
.refresh-toast {
  position: fixed;
  bottom: 72px;
  right: 24px;
  z-index: 400;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--accent-grn);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.refresh-toast.show { opacity: 1; transform: translateY(0); }

/* ── Sources modal ── */
.sources-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sources-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.sources-modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 280px;
  max-width: 380px;
  width: 92vw;
  max-height: 72vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.sources-modal-backdrop.open .sources-modal {
  transform: scale(1) translateY(0);
}
.sources-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sources-modal-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sources-modal-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}
.sources-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}
.sources-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.sources-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sources-modal-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.sources-modal-list li a:hover { background: rgba(59,130,246,0.1); color: var(--text); }
.sources-modal-count {
  font-size: 9px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-left: 8px;
}
.source-item { display: flex; align-items: center; }
.source-item--biased > a { flex: 1; }
.source-warn {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  cursor: help;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.15s;
  vertical-align: middle;
}
.source-warn:hover { opacity: 1; }
.src-tag--biased { border-color: rgba(245,158,11,0.4) !important; color: #d4a847 !important; }
.src-tag-warn { margin-left: 2px; }
.src-tag-img {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3);
  border-radius: 4px; padding: 2px 5px; margin-left: 3px; cursor: pointer;
  color: var(--accent); vertical-align: middle; line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}
.src-tag-img:hover { background: rgba(59,130,246,0.25); border-color: rgba(59,130,246,0.6); }
/* JS-driven tooltip */
.source-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(15,18,25,0.97);
  border: 1px solid rgba(245,158,11,0.4);
  color: #d4a847;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  padding: 7px 11px;
  border-radius: 6px;
  max-width: 230px;
  line-height: 1.55;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.source-tooltip.visible { opacity: 1; }
/* Click-intercept warning popup */
.source-warn-popup {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
.source-warn-popup-inner {
  background: var(--bg2);
  border: 1px solid rgba(245,158,11,0.45);
  border-radius: var(--radius);
  padding: 22px 24px;
  max-width: 340px;
  width: 92vw;
}
.source-warn-popup-icon { margin-bottom: 10px; }
.source-warn-popup-title {
  font-size: 12px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #f59e0b; margin-bottom: 8px; letter-spacing: 0.05em;
}
.source-warn-popup-body {
  font-size: 11px; color: var(--text2); line-height: 1.6; margin-bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
}
.source-warn-popup-actions { display: flex; gap: 8px; justify-content: flex-end; }
.source-warn-cancel {
  background: transparent; border: 1px solid var(--border2);
  color: var(--muted); font-family: 'JetBrains Mono', monospace;
  font-size: 10px; padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--transition);
}
.source-warn-cancel:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.source-warn-continue {
  background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4);
  color: #f59e0b; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; padding: 6px 12px; border-radius: var(--radius-sm);
  text-decoration: none; cursor: pointer;
  transition: background var(--transition);
}
.source-warn-continue:hover { background: rgba(245,158,11,0.25); }
/* Chart disclaimer */
.chart-disclaimer {
  font-size: 9px; color: var(--muted); font-family: 'JetBrains Mono', monospace;
  margin-top: 5px; line-height: 1.4; opacity: 0.7;
}
/* Media buttons inside section points */
.section-point-imgs {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 5px 12px 7px;
}
.src-img-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 2px solid var(--point-accent, var(--accent));
  color: var(--muted); font-size: 9px; font-family: 'JetBrains Mono', monospace;
  padding: 2px 7px 2px 5px; border-radius: 0 3px 3px 0; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s; white-space: nowrap;
}
.src-img-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  border-left-color: var(--point-accent, var(--accent));
  color: var(--text);
}
.src-img-btn--tg { text-decoration: none; }

/* Lightbox */
.media-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.88); display: flex;
  align-items: center; justify-content: center; cursor: default;
  animation: fadeIn 0.15s ease;
}
.media-lightbox-inner { max-width: min(680px, 96vw); max-height: 92vh; text-align: center; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.media-lightbox-local img { max-width: 100%; max-height: 82vh; border-radius: 8px; display: block; margin: 0 auto; object-fit: contain; }
.media-lightbox-embed { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.media-lightbox-embed iframe { width: 100%; min-height: 380px; border-radius: 8px; }
.media-lightbox-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-bottom: 4px;
}
.media-lightbox-close {
  display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; font-family: 'JetBrains Mono', monospace;
  cursor: pointer; padding: 4px 10px; border-radius: 4px; background: rgba(255,255,255,0.07);
}
.media-lightbox-close:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.media-lightbox-open-link {
  color: var(--accent); font-size: 11px; font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
}
.media-lightbox-open-link:hover { text-decoration: underline; }
.media-lightbox-caption {
  color: var(--muted); font-size: 10px; font-family: 'JetBrains Mono', monospace;
  margin-top: 8px;
}
.stat-card--clickable { cursor: pointer; }
.stat-card--clickable:hover { border-color: var(--accent); }

/* ── Section flag icons ── */
.section-flag--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: white;
}
.section-flag--icon svg { display: block; }

/* ── Alert stat pulse ── */
@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,62,91,0); }
  50%       { box-shadow: 0 0 18px 4px rgba(229,62,91,0.18), inset 0 0 12px rgba(229,62,91,0.06); }
}
.stat-card--pulsing { animation: alert-pulse 2.8s ease-in-out infinite; }

/* ── Threat level bar ── */
.threat-level-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.threat-level-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.threat-level-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1), background 0.8s ease;
}
.threat-level-caption {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}
