/* =========================================================
   GLOBAL OPERATIONS MAP 2025–2026 — Stylesheet (map.html only)
   Design: "Tactical Briefing" — clinical precision meets
   editorial intelligence. Near-monochrome with surgical
   color punctuation for critical data.
   Shared tokens live in tokens.css — this file is map-page-only
   layout (note the html,body{overflow:hidden} below, which must
   never leak into the scrolling news pages).
   ========================================================= */

@import url('tokens.css?v=29');

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg0);
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */

#hdr {
  height: 54px;
  flex-shrink: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 18px;
  position: relative;
  z-index: 500;
}

/* Subtle scan-line overlay on header */
#hdr::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255,255,255,.015) 2px,
    rgba(255,255,255,.015) 4px
  );
  pointer-events: none;
}

.hdr-badge {
  background: var(--accent2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  position: relative;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.hdr-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--header-bright);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hdr-divider {
  width: 1px;
  height: 28px;
  background: var(--header-border);
  flex-shrink: 0;
}

.hdr-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hdr-stat-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--header-accent);
  line-height: 1;
  letter-spacing: .5px;
}

.hdr-stat-lbl {
  font-family: var(--font-display);
  font-size: 8px;
  color: var(--header-text);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

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

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hdr-source {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--header-text);
  letter-spacing: 1.5px;
}

/* ===== LAYOUT ===== */

#layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */

#sidebar {
  width: 288px;
  flex-shrink: 0;
  background: var(--bg1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  position: relative;
}

#sidebar.collapsed {
  width: 0;
  min-width: 0;
  border-right: none;
}

#sidebar.collapsed > *:not(#sb-toggle) {
  opacity: 0;
  pointer-events: none;
}

.sb-section {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}

.sb-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-label::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Country filter pills */

#country-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 4px;
}

.c-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  user-select: none;
}

.c-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.c-pill.off {
  opacity: .3;
  filter: grayscale(.85);
  transform: none;
  box-shadow: none;
}

/* Operation filter */

.op-sel-btns {
  display: flex;
  gap: 4px;
}

.op-sel-btn {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 3px 8px;
  background: var(--bg0);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  text-transform: uppercase;
}

.op-sel-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sb-section-ops .op-grid-scroll {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sb-section-ops .op-grid-scroll::-webkit-scrollbar {
  width: 4px;
}

.sb-section-ops .op-grid-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.op-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.op-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  user-select: none;
}

.op-row:hover {
  background: rgba(37, 99, 235, .04);
  border-color: rgba(37, 99, 235, .1);
}

.op-row.on {
  border-color: rgba(0, 0, 0, .06);
  background: rgba(0, 0, 0, .03);
}

.op-row.off {
  opacity: .35;
}

.op-row.on.op-zero {
  opacity: .3;
  border-color: transparent;
  background: transparent;
}

.op-row.on.op-zero .op-name {
  color: var(--text) !important;
}

.op-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}

.op-info {
  flex: 1;
  min-width: 0;
}

.op-name {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-period {
  font-size: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: .3px;
}

.op-country-tags {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.op-ctag {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.op-count {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg0);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

/* Incident list */

#inc-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

#inc-list-wrap::-webkit-scrollbar {
  width: 3px;
}

#inc-list-wrap::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.inc-item {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  margin-bottom: 2px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.inc-item:hover {
  background: rgba(37, 99, 235, .04);
}

.inc-item.selected {
  background: rgba(37, 99, 235, .06);
  border-left-color: var(--accent) !important;
  box-shadow: var(--shadow-sm);
}

.inc-icon-wrap {
  flex-shrink: 0;
  margin-top: 1px;
}

.inc-text {
  flex: 1;
  min-width: 0;
}

.inc-item-op {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2px;
  opacity: .85;
}

.inc-item-name {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--bright);
  line-height: 1.35;
}

.inc-item-meta {
  font-size: 8px;
  color: var(--text);
  margin-top: 3px;
  font-family: var(--font-mono);
  letter-spacing: .3px;
}

.inc-conf-dot {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ===== MAP AREA ===== */

#map-wrap {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--map-canvas-bg) !important;
}

/* Floating legend panels */

.float-panel {
  position: absolute;
  background: var(--map-panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  z-index: 900;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: var(--shadow-float);
}

#type-legend {
  top: 12px;
  left: 12px;
  min-width: 200px;
}

.fleg-title {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 2.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.fleg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.fleg-row:last-child {
  margin-bottom: 0;
}

.fleg-text {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--text2);
}

.fleg-note {
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1.4;
  color: var(--text);
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.oleg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.oleg-row:last-child {
  margin-bottom: 0;
}

.oleg-swatch {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.oleg-text {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--text2);
  white-space: nowrap;
}

/* ===== TIMELINE ===== */

#timeline-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--map-panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px 10px;
  width: min(700px, calc(100vw - 600px));
  z-index: 900;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: var(--shadow-float);
}

.tl-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tl-lbl {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

#tl-date {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .5px;
}

.tl-range {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tl-range-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.tl-range-field span {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.tl-range-field input[type="date"] {
  flex: 1;
  min-width: 0;
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}

.tl-range-field input[type="date"]:hover,
.tl-range-field input[type="date"]:focus {
  border-color: var(--accent);
}

/* Recolour the native calendar picker so it reads in both themes. */
.tl-range-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .7;
}

:root:not(.light-mode) .tl-range-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

#tl-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin-bottom: 6px;
  transition: background .2s;
}

#tl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg0);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px rgba(37, 99, 235, .35);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

#tl-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgba(37, 99, 235, .45);
}

.tl-marks {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tl-mark {
  font-size: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: color .15s, font-weight .15s;
  letter-spacing: .3px;
}

.tl-mark:hover, .tl-mark.active {
  color: var(--accent);
  font-weight: 600;
}

.tl-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.tl-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  text-transform: uppercase;
}

.tl-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}

.tl-btn.playing {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== RIGHT DETAIL PANEL ===== */

#detail {
  width: 348px;
  flex-shrink: 0;
  background: var(--bg1);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  position: relative;
}

#detail.collapsed {
  width: 0;
  min-width: 0;
  border-left: none;
}

#detail.collapsed > *:not(#det-toggle) {
  opacity: 0;
  pointer-events: none;
}

/* ===== PANEL COLLAPSE TOGGLES ===== */

.panel-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 52px;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text);
  font-size: 8px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  line-height: 1;
}

.panel-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}

.panel-toggle-left {
  left: 0;
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.panel-toggle-right {
  right: 0;
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.det-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: .18;
  padding: 24px;
  text-align: center;
}

.det-empty-icon {
  font-size: 36px;
}

.det-empty-txt {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.7;
}

#detail-scroll {
  flex: 1;
  overflow-y: auto;
}

#detail-scroll::-webkit-scrollbar {
  width: 3px;
}

#detail-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

/* Detail hero */

.det-hero {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.det-op-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.det-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--bright);
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: .3px;
}

.det-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text);
  letter-spacing: .3px;
}

.det-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.det-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .8px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  border: 1px solid;
  transition: transform .1s;
}

.badge:hover {
  transform: translateY(-1px);
}

/* Two looks only: `hot` for a kinetic tag (something was struck), neutral for
   everything else. The neutral rule matches the bare .badge class, so any
   colour name an older database.json still holds in badge_colors — blue, gold,
   teal, purple, orange, green, amber, cyan, brown, op — falls through to it and
   the palette stays tight whichever build is loaded. `red` is the legacy name
   for what is now `hot`. */
.badge,
.badge-quiet  { color: var(--text2);   border-color: var(--border2);         background: var(--bg1); }

.badge-hot,
.badge-red    { color: var(--accent2); border-color: rgba(192, 57, 43, .28); background: rgba(192, 57, 43, .07); }

/* Tabs */

.det-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  gap: 0;
}

.det-tab {
  flex: 1;
  padding: 9px 4px;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  text-align: center;
  user-select: none;
}

.det-tab:hover {
  color: var(--text2);
  background: rgba(0,0,0,.02);
}

.det-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(37, 99, 235, .03);
}

.det-tab-body {
  display: none;
  padding: 14px 16px;
}

.det-tab-body.active {
  display: block;
}

/* Route strip */

.route-strip {
  background: var(--bg0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-from, .route-to {
  flex: 1;
  min-width: 0;
}

.route-label {
  font-family: var(--font-display);
  font-size: 8px;
  color: var(--text);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
  font-weight: 500;
}

.route-val {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--bright);
  line-height: 1.2;
}

.route-arrow {
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Data rows */

.drow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(205, 209, 220, .5);
}

.drow:last-child {
  border-bottom: none;
}

.drow-k {
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--text);
  letter-spacing: .8px;
  text-transform: uppercase;
  width: 110px;
  flex-shrink: 0;
  padding-top: 1px;
  line-height: 1.5;
  font-weight: 500;
}

.drow-v {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--text2);
  flex: 1;
  line-height: 1.55;
}

.drow-v.hi     { color: var(--accent); font-weight: 700; }
.drow-v.danger { color: var(--accent2); font-weight: 700; }
/* Formerly gold / green / orange. Emphasis without a hue of its own — casualty
   and impact rows do not need three more colours to be readable. */
.drow-v.gold,
.drow-v.green,
.drow-v.orange { color: var(--bright); }

/* Assessment */

.assessment {
  background: var(--bg0);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 12px 14px;
  margin-top: 10px;
}

.assessment-title {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.assessment-body {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--text2);
  line-height: 1.7;
}

/* Sources */

.source-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(205, 209, 220, .5);
}

.source-item:last-child {
  border-bottom: none;
}

.source-name {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.source-type {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text);
}

a.source-link {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s;
}

a.source-link:hover {
  color: var(--bright);
  text-decoration: underline;
}

/* Imagery */

.img-block {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg2);
  box-shadow: var(--shadow-sm);
}

.img-label {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
}

.sat-img {
  width: 100%;
  display: block;
  filter: brightness(.93) contrast(1.04);
  transition: filter .3s;
}

.sat-img:hover {
  filter: brightness(1) contrast(1);
}

.img-err {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--text);
  padding: 20px;
  text-align: center;
}

.img-caption {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--text2);
  padding: 6px 10px 5px;
  line-height: 1.55;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.img-source {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text);
  padding: 2px 10px 6px;
  background: var(--bg2);
  letter-spacing: .3px;
}

/* ===== STATUS BAR ===== */

#stat-bar {
  display: flex;
  border-top: 1px solid var(--header-border);
  flex-shrink: 0;
  height: 32px;
  background: var(--header-bg);
  position: relative;
}

/* Matching scan-line overlay on status bar */
#stat-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255,255,255,.012) 2px,
    rgba(255,255,255,.012) 4px
  );
  pointer-events: none;
}

.stat-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-right: 1px solid var(--header-border);
  padding: 0 8px;
}

.stat-cell:last-child {
  border-right: none;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--header-accent);
  letter-spacing: .3px;
}

.stat-txt {
  font-family: var(--font-body);
  font-size: 8px;
  color: var(--header-text);
  letter-spacing: .3px;
}

/* ===== MAP OVERRIDES (Leaflet) ===== */

@keyframes ring-pulse {
  0%   { transform: scale(1);   opacity: .7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.leaflet-container {
  background: var(--map-canvas-bg) !important;
}

.leaflet-tile {
  will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
  will-change: transform;
}

.leaflet-bottom.leaflet-left {
  bottom: 22px !important;
  left: 14px !important;
}

.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--map-panel-bg) !important;
  color: var(--text2) !important;
  border-color: var(--border) !important;
  font-size: 15px !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  transition: all .15s !important;
}

.leaflet-control-zoom a:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

.leaflet-control-attribution {
  display: none !important;
}

.leaflet-tooltip {
  background: var(--map-panel-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text2) !important;
  font-family: var(--font-body) !important;
  font-size: 10px !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--radius-md) !important;
  padding: 8px 11px !important;
}

.leaflet-tooltip-top::before { border-top-color: var(--border) !important; }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--border) !important; }
.leaflet-tooltip-left::before { border-left-color: var(--border) !important; }
.leaflet-tooltip-right::before { border-right-color: var(--border) !important; }

.map-tooltip-inner b {
  font-family: var(--font-body);
  color: var(--bright);
  display: block;
  margin-bottom: 3px;
}

.map-tooltip-inner .tt-date {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  display: block;
  margin-top: 2px;
  letter-spacing: .3px;
}

.map-tooltip-inner .tt-type {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.city-marker {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.city-dot {
  width: 4px;
  height: 4px;
  background: #3b4860;
  border-radius: 50%;
  opacity: .45;
}

.city-name {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  color: rgba(30, 36, 53, .55);
  white-space: nowrap;
  letter-spacing: .5px;
  text-shadow: 0 1px 3px rgba(255, 255, 255, .85);
}

/* On the dark basemap, flip city labels to light text with a dark halo so
   they stay legible over dark tiles. */
:root:not(.light-mode) .city-name {
  color: rgba(220, 228, 245, .75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
}
:root:not(.light-mode) .city-dot {
  background: #8ea2c8;
  opacity: .6;
}

/* ===== NEWS TICKER ===== */

#news-ticker {
  height: 30px;
  flex-shrink: 0;
  background: #070d18;
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 490;
}

.ticker-label {
  padding: 0 12px;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: var(--header-accent);
  letter-spacing: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  border-right: 1px solid var(--header-border);
  height: 100%;
  display: flex;
  align-items: center;
  background: #070d18;
  z-index: 2;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 120s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: #a0b0c4;
  cursor: pointer;
  border-right: 1px solid rgba(26, 39, 68, .6);
  height: 30px;
  transition: color .15s;
  letter-spacing: .3px;
}

.ticker-item:hover { color: #e2e8f4; }

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

.ticker-time {
  font-size: 8px;
  color: #4a5a70;
  flex-shrink: 0;
  letter-spacing: .3px;
}

.ticker-text {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== TWEET / INTEL FEED SIDEBAR ===== */

.sb-section-tweets {
  display: flex;
  flex-direction: column;
  max-height: 280px;
}

#tweet-cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.tweet-cat-pill {
  font-size: 8px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .5px;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid;
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  user-select: none;
  text-transform: uppercase;
}

.tweet-cat-pill:hover {
  transform: translateY(-1px);
}

.tweet-cat-pill.off {
  opacity: .25;
  filter: grayscale(.85);
  transform: none;
}

.tweet-sent-pill {
  font-size: 8px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid currentColor;
  cursor: pointer;
  opacity: .7;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  user-select: none;
  text-transform: uppercase;
}

.tweet-sent-pill.off {
  opacity: .15;
}

#tweet-list-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

#tweet-list-wrap::-webkit-scrollbar { width: 3px; }
#tweet-list-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.tweet-item {
  padding: 7px 9px;
  border-left: 2px solid;
  margin-bottom: 3px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(0,0,0,.02);
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
}

.tweet-item:hover { background: rgba(37, 99, 235, .04); }

.tweet-item.breaking { background: rgba(220, 38, 38, .04); }

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

.tweet-cat-badge {
  font-size: 7px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: var(--radius-sm);
}

.tweet-time {
  font-size: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  flex: 1;
  letter-spacing: .3px;
}

.tweet-sev {
  display: flex;
  gap: 2px;
  align-items: center;
}

.sev-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background .15s;
}

.sev-dot.on { background: currentColor; }

.tweet-text {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--text2);
  line-height: 1.45;
}

.tweet-empty {
  padding: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--text);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* News toggle */
.news-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.news-toggle-lbl {
  font-size: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ===== GLOBAL SCROLLBAR ===== */

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== SUBTLE ENTRY ANIMATIONS ===== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.float-panel {
  animation: fadeInUp .4s cubic-bezier(.4,0,.2,1) both;
}

#timeline-bar {
  animation: fadeInUp .5s cubic-bezier(.4,0,.2,1) .1s both;
}

/* ===== SELECTION & FOCUS ===== */

::selection {
  background: rgba(37, 99, 235, .15);
  color: var(--bright);
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}
