/* ═══════════════════════════════════════════════════════════════
   Cuba Now · Operation Freedom — Mission Control CSS
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary:    #070a10;
  --bg-secondary:  #0c1018;
  --bg-tertiary:   #111827;
  --bg-widget:     #0d1420;
  --bg-header:     #080c14;

  --border-dim:    #162030;
  --border-mid:    #1e2e42;
  --border-bright: #2a3f5a;
  --border-glow:   #3a5575;

  --text-primary:  #b8ccd8;
  --text-bright:   #e2eef5;
  --text-muted:    #3f5060;
  --text-dim:      #253040;

  --red:           #ff2d2d;
  --red-dim:       #8b1414;
  --orange:        #ff8c00;
  --yellow:        #ffd700;
  --yellow-dim:    #7a6200;
  --blue:          #00c8ff;
  --blue-dim:      #004d66;
  --green:         #00e87a;
  --green-dim:     #005c30;
  --cyan:          #00ffcc;
  --purple:        #a78bfa;
  --gray:          #667788;
  --white:         #f0f6ff;

  --font-mono:     'Share Tech Mono', 'Courier New', monospace;
  --font-ui:       'Rajdhani', 'Arial Narrow', sans-serif;
  --font-display:  'Orbitron', 'Share Tech Mono', monospace;

  --alert-bar-h:   28px;
  --ticker-h:      30px;
  --header-h:      46px;
  --left-w:        215px;
  --right-w:       220px;
  --footer-h:      26px;
  --feed-h:        240px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 52px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); text-decoration: underline; }
ul { list-style: none; }
button { font-family: var(--font-mono); cursor: pointer; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

/* ── Alert Bar ─────────────────────────────────────────────── */
.alert-bar {
  height: var(--alert-bar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
  transition: background 0.4s;
  z-index: 100;
}
.alert-inactive { background: #0f1520; color: var(--text-muted); border-bottom: 1px solid var(--border-dim); }
.alert-info     { background: #0a1a2e; color: var(--blue);   border-bottom: 1px solid var(--blue-dim); }
.alert-warn     { background: #1a1200; color: var(--yellow); border-bottom: 1px solid var(--yellow-dim); }
.alert-critical { background: #1a0000; color: var(--red);    border-bottom: 1px solid var(--red-dim);
                  animation: alert-flash 1.5s ease-in-out infinite; }
.alert-icon     { font-size: 12px; flex-shrink: 0; }

@keyframes alert-flash {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Ticker ────────────────────────────────────────────────── */
#ticker-wrap {
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  gap: 0;
  background: #090d15;
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0;
  overflow: hidden;
  z-index: 99;
}
.ticker-label {
  flex-shrink: 0;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  border-right: 1px solid var(--border-mid);
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}
.ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-primary);
  animation: ticker-scroll 60s linear infinite;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-segment {
  padding: 0 28px;
  border-right: 1px solid var(--border-dim);
  color: var(--text-primary);
}
.ticker-segment .ts-source {
  color: var(--blue);
  font-size: 10px;
  margin-right: 6px;
}
.ticker-placeholder { padding: 0 20px; color: var(--text-muted); }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Top Nav Header ────────────────────────────────────────── */
#top-nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-mid);
  flex-shrink: 0;
  z-index: 98;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon {
  font-size: 18px;
  color: var(--red);
  line-height: 1;
}
.logo-text {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}
.logo-main {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
}
.logo-dot { color: var(--red); font-weight: 900; font-size: 16px; }
.logo-op  {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--red);
  letter-spacing: 0.1em;
}
.logo-sub {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  align-self: flex-end;
  padding-bottom: 1px;
}
.nav-tabs-wrap {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.nav-tab {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}
.nav-tab:hover, .nav-tab.active {
  background: var(--border-mid);
  color: var(--text-bright);
  border-color: var(--border-bright);
}
.nav-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.clock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.nav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.live-dot { background: var(--red); box-shadow: 0 0 8px var(--red), 0 0 16px #ff2d2d44;
            animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--red); }
  50%       { opacity: 0.4; box-shadow: 0 0 2px var(--red); }
}

/* ── Main Grid ─────────────────────────────────────────────── */
#main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: var(--left-w) 1fr var(--right-w);
  overflow: hidden;
  min-height: 0;
}

/* ── Panels ────────────────────────────────────────────────── */
#left-panel,
#right-panel {
  background: var(--bg-secondary);
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border-dim);
  scrollbar-width: thin;
}
#right-panel {
  border-right: none;
  border-left: 1px solid var(--border-dim);
}

/* ── Widget Base ───────────────────────────────────────────── */
.widget {
  border-bottom: 1px solid var(--border-dim);
  padding: 8px 10px;
}
.widget:last-child { border-bottom: none; }

.widget-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}
.wh-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.wh-icon   { font-size: 11px; }
.wh-badge  { margin-left: auto; }
.wh-status { margin-left: auto; font-size: 10px; font-weight: 700; font-family: var(--font-mono); }
.widget-sub {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  margin-top: -3px;
}

/* Badges */
.live-badge  { background: var(--red);    color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; letter-spacing: 0.1em; font-family: var(--font-mono); }
.state-badge { background: var(--red-dim); color: var(--red); font-size: 9px; font-weight: 700; padding: 1px 5px; letter-spacing: 0.1em; border: 1px solid var(--red-dim); font-family: var(--font-mono); }
.indep-badge { background: transparent; color: var(--blue); font-size: 9px; font-weight: 700; padding: 1px 5px; letter-spacing: 0.1em; border: 1px solid var(--blue-dim); font-family: var(--font-mono); }
.warn-badge  { background: transparent; color: var(--orange); font-size: 9px; font-weight: 700; padding: 1px 5px; letter-spacing: 0.1em; border: 1px solid #5a3000; font-family: var(--font-mono); }

/* ── System Status Grid ────────────────────────────────────── */
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.status-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-dim);
  padding: 5px 7px;
}
.sb-label {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-family: var(--font-ui);
  font-weight: 600;
}
.sb-value {
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
  font-family: var(--font-mono);
}
.status-active   { color: var(--green); }
.status-partial  { color: var(--yellow); }
.status-degraded { color: var(--orange); }
.status-critical { color: var(--red); animation: alert-flash 1s infinite; }
.status-unknown  { color: var(--gray); }

/* ── Signal List (used in Power / Internet / Weather) ──────── */
.signal-list { display: flex; flex-direction: column; gap: 3px; }
.signal-item {
  background: var(--bg-tertiary);
  border-left: 2px solid var(--border-mid);
  padding: 4px 6px;
  font-size: 10px;
  line-height: 1.3;
}
.signal-item.si-blackout  { border-left-color: var(--yellow); }
.signal-item.si-internet  { border-left-color: var(--blue); }
.signal-item.si-protest   { border-left-color: var(--red); }
.signal-item.si-repression{ border-left-color: var(--gray); }
.signal-item.si-weather   { border-left-color: var(--green); }
.signal-item.si-economy   { border-left-color: var(--orange); }
.signal-item.si-government{ border-left-color: var(--purple); }
.signal-title { color: var(--text-bright); display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.signal-meta  { color: var(--text-muted); font-size: 9px; margin-top: 1px; display: flex; gap: 6px; }
.signal-empty { color: var(--text-muted); font-size: 10px; padding: 4px 0; font-style: italic; }

/* ── OONI Mini ─────────────────────────────────────────────── */
.ooni-mini {
  margin-top: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-dim);
  padding: 5px 7px;
}
.om-label { font-size: 8px; color: var(--text-muted); letter-spacing: 0.1em; display: block; margin-bottom: 3px; font-family: var(--font-ui); font-weight: 600; }
.om-row   { display: flex; justify-content: space-between; font-size: 10px; padding: 1px 0; }
.om-val   { color: var(--yellow); font-weight: 700; }

/* ── Weather ───────────────────────────────────────────────── */
.weather-display {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-dim);
  padding: 7px 9px;
  margin-bottom: 6px;
}
.wd-city   { font-size: 10px; color: var(--text-bright); font-family: var(--font-ui); font-weight: 600; }
.wd-coords { font-size: 9px; color: var(--text-muted); }
.wd-temp   { font-size: 22px; font-family: var(--font-display); color: var(--white); margin: 3px 0 0; }
.wd-desc   { font-size: 9px; color: var(--text-muted); margin-bottom: 5px; }
.wd-details { display: flex; flex-direction: column; gap: 1px; }
.wdd-row   { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); }
.wdd-row span:last-child { color: var(--text-primary); }

/* ── Currency ──────────────────────────────────────────────── */
.currency-table { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.ct-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; background: var(--bg-tertiary); border: 1px solid var(--border-dim); }
.ct-pair { font-size: 10px; color: var(--text-muted); }
.ct-rate { font-size: 14px; font-family: var(--font-display); color: var(--yellow); font-weight: 700; }
.ct-official { font-size: 9px; color: var(--text-muted); text-align: center; }

/* ── Map Section ───────────────────────────────────────────── */
#map-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #06090f;
}
#map-header {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  background: var(--bg-header);
  flex-shrink: 0;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
}
.mh-left { display: flex; align-items: center; gap: 10px; }
.map-breadcrumb { color: var(--text-muted); font-size: 10px; }
.map-events-count { color: var(--red); font-size: 10px; }
.map-status-line  { color: var(--yellow); font-size: 10px; }
#map { flex: 1; }
#map-footer {
  padding: 4px 10px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-header);
  flex-shrink: 0;
  font-size: 9px;
  color: var(--text-muted);
}
.mf-legend { display: flex; gap: 10px; }
.leg-item  { display: flex; align-items: center; gap: 4px; }
.leg-dot   { width: 7px; height: 7px; border-radius: 50%; }

/* ── Leaflet overrides ─────────────────────────────────────── */
.leaflet-container { background: #06090f !important; }
.leaflet-control-attribution { background: rgba(0,0,0,0.7) !important; color: #445 !important; font-size: 8px !important; }
.leaflet-control-zoom a { background: #0d1420 !important; color: var(--text-primary) !important; border-color: var(--border-mid) !important; }
.leaflet-control-zoom a:hover { background: var(--border-mid) !important; }
.leaflet-popup-content-wrapper {
  background: #0d1420 !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8) !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
}
.leaflet-popup-tip { background: #0d1420 !important; }
.leaflet-popup-close-button { color: var(--text-muted) !important; }
.popup-cat   { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 3px; }
.popup-loc   { font-size: 13px; color: var(--white); font-family: var(--font-display); margin-bottom: 3px; }
.popup-title { font-size: 10px; color: var(--text-primary); line-height: 1.4; margin-bottom: 4px; }
.popup-meta  { font-size: 9px; color: var(--text-muted); display: flex; gap: 8px; }
.popup-sources { font-size: 9px; color: var(--blue); margin-top: 2px; }
.city-popup .popup-loc { color: var(--blue); }

/* ── Layer Key ─────────────────────────────────────────────── */
.layer-key { display: flex; flex-direction: column; gap: 3px; margin-bottom: 5px; }
.lk-row  { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-primary); }
.lk-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lk-count{ margin-left: auto; color: var(--text-muted); font-size: 9px; }
.map-hint { font-size: 9px; color: var(--text-muted); text-align: center; border-top: 1px solid var(--border-dim); padding-top: 4px; margin-top: 2px; }

/* ── Source List ───────────────────────────────────────────── */
.source-list { display: flex; flex-direction: column; gap: 2px; }
.source-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 2px 0;
  color: var(--text-primary);
}
.si-dot   { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.si-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-class { font-size: 8px; color: var(--text-muted); flex-shrink: 0; }
.si-lang  { font-size: 8px; color: var(--blue); flex-shrink: 0; margin-left: auto; }

/* ── News Lists (right panel) ──────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 3px; }
.news-item {
  border-left: 2px solid var(--border-mid);
  padding: 4px 6px;
  font-size: 10px;
  line-height: 1.35;
}
.ni-title { color: var(--text-bright); display: block; line-height: 1.3; }
.ni-title:hover { color: var(--blue); }
.ni-meta  { color: var(--text-muted); font-size: 9px; margin-top: 1px; display: flex; gap: 5px; flex-wrap: wrap; }
.ni-source-indep { color: var(--blue); }
.ni-source-state { color: var(--red); }

/* ── Video List ────────────────────────────────────────────── */
.video-list { display: flex; flex-direction: column; gap: 3px; }
.video-item {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 10px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border-dim);
}
.video-item:last-child { border-bottom: none; }
.vi-thumb {
  width: 50px;
  height: 36px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-dim);
}
.vi-thumb-placeholder {
  width: 50px;
  height: 36px;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}
.vi-info  { flex: 1; min-width: 0; }
.vi-title { color: var(--text-bright); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.vi-title:hover { color: var(--blue); }
.vi-meta  { font-size: 9px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 5px; }
.vi-state-badge { background: var(--red-dim); color: var(--red); font-size: 7px; padding: 1px 3px; font-weight: 700; }

/* ── Leadership ────────────────────────────────────────────── */
.leadership-list { display: flex; flex-direction: column; gap: 3px; }
.leader-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-dim);
  border-left: 2px solid var(--red-dim);
  padding: 4px 7px;
  font-size: 10px;
}
.li-name { color: var(--text-bright); font-weight: 600; display: block; }
.li-role { color: var(--text-muted); font-size: 9px; }
.li-since{ float: right; font-size: 8px; color: var(--text-dim); }

/* ── Keywords ──────────────────────────────────────────────── */
.keyword-grid { display: flex; flex-direction: column; gap: 3px; }
.kw-row { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-primary); padding: 2px 0; border-bottom: 1px solid var(--border-dim); }
.kw-row:last-child { border-bottom: none; }
.kw-dot     { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.kw-red     { background: var(--red); }
.kw-yellow  { background: var(--yellow); }
.kw-blue    { background: var(--blue); }
.kw-green   { background: var(--green); }
.kw-orange  { background: var(--orange); }
.kw-cyan    { background: var(--cyan); }
.kw-gray    { background: var(--gray); }
.kw-purple  { background: var(--purple); }

/* ── External Resources ────────────────────────────────────── */
.ext-list { display: flex; flex-direction: column; gap: 3px; }
.ext-list li { font-size: 10px; padding: 2px 0; border-bottom: 1px solid var(--border-dim); }
.ext-list li:last-child { border-bottom: none; }
.ext-list a { color: var(--blue); }
.ext-list a:hover { color: var(--cyan); }

/* ── Bottom Feed ───────────────────────────────────────────── */
#bottom-feed {
  height: var(--feed-h);
  border-top: 1px solid var(--border-mid);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
#feed-tab-bar {
  display: flex;
  align-items: center;
  gap: 1px;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-header);
  flex-shrink: 0;
  padding: 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
#feed-tab-bar::-webkit-scrollbar { display: none; }
.feed-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: all 0.15s;
}
.feed-tab:hover  { color: var(--text-primary); border-bottom-color: var(--border-bright); }
.feed-tab.active { color: var(--text-bright);  border-bottom-color: var(--red); }
.ft-dot   { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.ft-red    { background: var(--red); }
.ft-yellow { background: var(--yellow); }
.ft-blue   { background: var(--blue); }
.ft-orange { background: var(--orange); }
.ft-green  { background: var(--green); }
.ft-cyan   { background: var(--cyan); }
.ft-gray   { background: var(--gray); }
.ft-purple { background: var(--purple); }
.ft-count  {
  background: var(--border-mid);
  color: var(--text-muted);
  font-size: 8px;
  padding: 0 4px;
  border-radius: 2px;
  min-width: 16px;
  text-align: center;
}
.feed-tab.active .ft-count { background: var(--red-dim); color: var(--red); }
.feed-tab-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 9px;
  color: var(--text-muted);
}
.refresh-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 7px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.refresh-btn:hover { border-color: var(--blue); color: var(--blue); }

#feed-items {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-content: start;
  gap: 3px;
}
.feed-loading { color: var(--text-muted); font-size: 10px; padding: 10px; }

/* Feed Item Card */
.feed-item {
  background: var(--bg-widget);
  border: 1px solid var(--border-dim);
  border-left: 2px solid var(--border-mid);
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.4;
}
.feed-item:hover { border-color: var(--border-bright); }
.feed-item.fi-blackout   { border-left-color: var(--yellow); }
.feed-item.fi-internet   { border-left-color: var(--blue); }
.feed-item.fi-protest    { border-left-color: var(--red); }
.feed-item.fi-repression { border-left-color: var(--gray); }
.feed-item.fi-weather    { border-left-color: var(--green); }
.feed-item.fi-economy    { border-left-color: var(--orange); }
.feed-item.fi-government { border-left-color: var(--purple); }
.feed-item.fi-general    { border-left-color: var(--border-mid); }

.fi-header { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; flex-wrap: wrap; }
.fi-source { font-size: 9px; font-weight: 700; padding: 1px 4px; background: var(--bg-tertiary); }
.fi-source.src-indep { color: var(--blue); }
.fi-source.src-state { color: var(--red); }
.fi-state-badge { background: var(--red-dim); color: var(--red); font-size: 8px; font-weight: 700; padding: 1px 4px; letter-spacing: 0.05em; }
.fi-lang    { font-size: 8px; color: var(--text-muted); }
.fi-time    { margin-left: auto; font-size: 9px; color: var(--text-muted); }
.fi-title   { color: var(--text-bright); display: block; line-height: 1.35; margin-bottom: 2px; }
.fi-title:hover { color: var(--blue); }
.fi-summary { color: var(--text-muted); font-size: 9px; line-height: 1.4; }

/* Video feed items */
.feed-item.fi-video { display: flex; gap: 8px; }
.fv-thumb { width: 80px; height: 54px; object-fit: cover; flex-shrink: 0; background: var(--bg-tertiary); }
.fv-info { flex: 1; min-width: 0; }

/* ── Footer ────────────────────────────────────────────────── */
#site-footer {
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-dim);
  font-size: 9px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── Pulse ring for capital city marker ────────────────────── */
.capital-ring {
  border: 2px solid var(--red);
  border-radius: 50%;
  animation: ring-pulse 2s ease-out infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes ring-pulse {
  0%   { width: 12px; height: 12px; opacity: 1;   border-color: var(--red); }
  100% { width: 36px; height: 36px; opacity: 0;   border-color: transparent; }
}

/* ── Misc utility ──────────────────────────────────────────── */
.tag-pill {
  display: inline-block;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.tag-blackout   { background: #2a2000; color: var(--yellow); }
.tag-internet   { background: var(--blue-dim); color: var(--blue); }
.tag-protest    { background: #2a0000; color: var(--red); }
.tag-repression { background: #1a1a1a; color: var(--gray); }
.tag-weather    { background: var(--green-dim); color: var(--green); }
.tag-economy    { background: #2a1800; color: var(--orange); }
.tag-government { background: #1a0a2a; color: var(--purple); }

/* ── Scanlines overlay (subtle) ────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.03) 3px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── Blackout Heatmap ──────────────────────────────────────── */

/* Nav tab special style for the heatmap toggle */
.nav-tab-heat.active {
  background: linear-gradient(135deg, #3a1800, #5a2000);
  color: #ffcc00;
  border-color: #ff8800;
  box-shadow: 0 0 10px #ff880055, 0 0 2px #ff8800 inset;
  text-shadow: 0 0 8px #ffaa0099;
}
.nav-tab-heat {
  border-color: #5a3000;
  color: #ff9900;
}
.nav-tab-heat:hover {
  background: #2a1400;
  border-color: #ff8800;
  color: #ffcc00;
}

/* Leaflet tooltip for heat points */
.heat-tip-wrap .leaflet-tooltip {
  background: rgba(4, 8, 14, 0.92) !important;
  border: 1px solid #ff880066 !important;
  border-radius: 4px !important;
  padding: 0 !important;
  box-shadow: 0 2px 10px #ff440033 !important;
}
.heat-tip-wrap .leaflet-tooltip::before { display: none; }

.heat-tooltip {
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
}
.ht-loc {
  color: #ffcc00;
  font-weight: bold;
  font-size: 0.78rem;
  margin-bottom: 2px;
}
.ht-count { color: #ff9900; }
.ht-ts    { color: #778899; font-size: 0.67rem; }

/* Layer-key heatmap gradient swatch */
.lk-row-heat .lk-dot {
  width:  16px;
  height: 8px;
  border-radius: 3px;
  display: inline-block;
}

/* ── Heat Toggle Button (replaces removed nav-tab row) ──────── */
.heat-toggle-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px 0;
  background: #0d1a10;
  border: 1px solid #3a5520;
  border-radius: 3px;
  color: #88cc44;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.heat-toggle-btn:hover,
.heat-toggle-btn.heat-toggle-active {
  background: #1a3010;
  border-color: #ff8800;
  color: #ffcc00;
  box-shadow: 0 0 8px #ff880033;
}
