/* ============================================================
   Iran-Israel OSINT Site — Light Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;700&display=swap');

:root {
  --bg-primary:    #f8f9fb;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f3f5f8;
  --border:        #dde1e8;
  --border-light:  #c4cad6;

  --iran-red:      #cc2936;
  --iran-orange:   #d4620e;
  --iran-amber:    #c08800;
  --israel-blue:   #2563eb;
  --israel-light:  #3b82f6;
  --us-green:      #16a34a;
  --us-teal:       #0d9488;
  --neutral-gray:  #64748b;
  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;

  --font-mono: 'IBM Plex Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'IBM Plex Sans Condensed', 'IBM Plex Sans', 'Arial Narrow', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  --transition: 0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--israel-blue); text-decoration: none; }
a:hover { color: var(--iran-red); text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* ---- Navigation ---- */
.site-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 32px;
}
.nav-brand:hover { text-decoration: none; color: var(--iran-red); }

.nav-brand .brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--iran-red), var(--iran-orange));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  flex: 1;
  flex-wrap: nowrap;
}

.nav-links > li > a,
.nav-dropdown > summary {
  display: block;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.nav-links > li > a:hover,
.nav-dropdown > summary:hover { color: var(--text-primary); background: var(--bg-primary); text-decoration: none; }
.nav-links > li > a.active,
.nav-dropdown > summary.active { color: var(--israel-blue); background: rgba(37, 99, 235, 0.08); font-weight: 500; }

/* Link inside summary (clickable label that also navigates) */
.nav-summary-link {
  color: inherit; text-decoration: none; font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.nav-summary-link:hover { color: inherit; text-decoration: none; }

/* Remove default details marker */
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::marker { display: none; content: ''; }
.nav-dropdown > summary::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  transition: transform 0.2s;
}
.nav-dropdown[open] > summary::after { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px 0;
  z-index: 1100;
  margin-top: 4px;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-menu a:hover { color: var(--text-primary); background: var(--bg-primary); text-decoration: none; }
.nav-dropdown-menu a.active { color: var(--israel-blue); background: rgba(37, 99, 235, 0.08); }
.nav-group-label {
  display: block;
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  pointer-events: none;
}
.nav-group-label + a { padding-top: 4px; }
.nav-dropdown-menu .nav-group-label:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  color: var(--text-primary);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-share-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.nav-share-x:hover { color: var(--text-primary); background: var(--bg-primary); }

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--us-teal);
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ---- Main Layout ---- */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

main.full-width {
  max-width: 100%;
  padding: 0;
}

/* ---- Page Header ---- */
/* ---- Breadcrumbs ---- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumbs a {
  color: var(--israel-blue);
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--border-light); }

.page-header {
  margin-bottom: 40px;
}

.page-header .label {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--iran-orange);
  margin-bottom: 10px;
}

.page-header h1 {
  font-size: clamp(24px, 4vw, 40px);
  margin-bottom: 12px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 700px;
}

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--iran-orange));
}

.stat-card .stat-label {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-color, var(--iran-orange));
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Section / Card ---- */
.section { margin-bottom: 48px; }
.section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--iran-orange);
  display: inline-block;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ---- Operation Summary Cards ---- */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.op-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.op-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }

.op-card .op-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.op-card .op-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid;
}
.op-badge.tp3 { color: var(--iran-orange); border-color: var(--iran-orange); background: rgba(212,98,14,0.06); }
.op-badge.tp4 { color: var(--iran-red); border-color: var(--iran-red); background: rgba(204,41,54,0.06); }

.op-card h3 { font-size: 17px; margin-bottom: 4px; }
.op-card .op-dates { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

.op-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.op-stat-item .val { font-size: 22px; font-weight: 700; font-family: var(--font-mono); }
.op-stat-item .lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tp3-color { color: var(--iran-orange); }
.tp4-color { color: var(--iran-red); }

.op-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ---- Impact Highlights List ---- */
.impact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.impact-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--iran-red);
}
.impact-list li::before { content: '//'; color: var(--iran-red); font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; margin-top: 1px; }

/* ---- Map Page ---- */
#map-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
}

#map-toolbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#map-toolbar .toolbar-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.layer-btn {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.layer-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.layer-btn.active { color: #fff; }
.layer-btn.active.launch { border-color: var(--iran-red); background: var(--iran-red); }
.layer-btn.active.il-targets { border-color: var(--israel-blue); background: var(--israel-blue); }
.layer-btn.active.us-bases { border-color: var(--us-green); background: var(--us-green); }

.layer-btn .dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.dot-red { background: var(--iran-red); }
.dot-blue { background: var(--israel-blue); }
.dot-green { background: var(--us-green); }
.dot-orange { background: var(--iran-orange); }

#map { flex: 1; }

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--text-primary) !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; }
.leaflet-popup-content { margin: 14px 16px !important; }

.popup-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.popup-type { font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.popup-type.launch { color: var(--iran-red); }
.popup-type.il-target { color: var(--israel-blue); }
.popup-type.us-base { color: var(--us-teal); }
.popup-row { font-size: 12px; color: var(--text-secondary); margin-bottom: 3px; }
.popup-row span { color: var(--text-muted); }

/* ---- Timeline ---- */
.timeline-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.filter-btn.active { background: var(--iran-orange); border-color: var(--iran-orange); color: #fff; }
.filter-btn.active.tp3 { background: var(--iran-orange); border-color: var(--iran-orange); }
.filter-btn.active.tp4 { background: var(--iran-red); border-color: var(--iran-red); }

.timeline-container { display: flex; flex-direction: column; gap: 8px; }

.wave-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 80px 60px 1fr auto;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.wave-card:hover { border-color: var(--border-light); background: var(--bg-card-hover); transform: translateX(2px); box-shadow: var(--shadow-md); }
.wave-card.tp3 { border-left: 3px solid var(--iran-orange); }
.wave-card.tp4 { border-left: 3px solid var(--iran-red); }

.wave-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.wave-num .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1;
}

.wave-op-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
}
.wave-op-badge.tp3 { background: rgba(212,98,14,0.1); color: var(--iran-orange); }
.wave-op-badge.tp4 { background: rgba(204,41,54,0.1); color: var(--iran-red); }

.wave-info h4 { font-size: 14px; margin-bottom: 3px; }
.wave-info .wave-meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.wave-info .wave-targets { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.wave-munitions {
  text-align: right;
  min-width: 80px;
}
.wave-munitions .count {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--iran-amber);
}
.wave-munitions .count-label { font-size: 10px; color: var(--text-muted); }

.weapon-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.pill {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid;
}
.pill.bm { border-color: rgba(204,41,54,0.3); color: var(--iran-red); background: rgba(204,41,54,0.05); }
.pill.drone { border-color: rgba(192,136,0,0.3); color: var(--iran-amber); background: rgba(192,136,0,0.05); }
.pill.cm { border-color: rgba(37,99,235,0.3); color: var(--israel-blue); background: rgba(37,99,235,0.05); }

/* ---- Data Table Page ---- */
.table-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  padding: 9px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
}
.search-box:focus { border-color: var(--israel-blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.search-box::placeholder { color: var(--text-muted); }

.select-filter {
  padding: 9px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
}
.select-filter:focus { border-color: var(--israel-blue); }

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead { background: var(--bg-primary); }
thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
thead th:hover { color: var(--text-primary); }
thead th.sort-asc::after { content: ' ↑'; color: var(--iran-orange); }
thead th.sort-desc::after { content: ' ↓'; color: var(--iran-orange); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-card-hover); }

tbody td { padding: 11px 14px; vertical-align: top; }

.td-wave { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.td-op .badge-tp3 { color: var(--iran-orange); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.td-op .badge-tp4 { color: var(--iran-red); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.td-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.td-munitions { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--iran-amber); }
.td-targets { font-size: 12px; color: var(--text-secondary); max-width: 260px; }
.td-intercept { font-family: var(--font-mono); font-size: 12px; }
.intercept-yes { color: var(--us-teal); }
.intercept-no { color: var(--neutral-gray); }

/* ---- About Page ---- */
.about-content { max-width: 760px; }
.about-content h2 { font-size: 22px; margin: 32px 0 14px; }
.about-content h2:first-child { margin-top: 0; }
.about-content h3 { font-size: 16px; margin: 20px 0 10px; }
.about-content p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.about-content ul { color: var(--text-secondary); font-size: 14px; padding-left: 20px; margin-bottom: 12px; }
.about-content li { margin-bottom: 6px; line-height: 1.6; }

.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}
.schema-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.schema-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.schema-table code {
  background: var(--bg-primary);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--israel-blue);
}

/* ---- Code & Mono blocks ---- */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-primary);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  color: var(--israel-blue);
}

.callout {
  background: rgba(212,98,14,0.05);
  border: 1px solid rgba(212,98,14,0.2);
  border-left: 3px solid var(--iran-orange);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 16px 0;
}
.callout strong { color: var(--iran-orange); }

.callout-with-logo { display: flex; gap: 16px; align-items: flex-start; }
.callout-logo { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: contain; flex-shrink: 0; background: #fff; padding: 4px; border: 1px solid rgba(255,255,255,0.1); }

/* ---- Analysis / Wiki Grid ---- */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.wiki-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.wiki-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.wiki-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border);
}

.wiki-card-body {
  padding: 16px 20px;
}

.wiki-card-body h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.wiki-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wiki-card-body .card-tag {
  display: inline-block;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 8px;
}
.card-tag.timing { background: rgba(37,99,235,0.08); color: var(--israel-blue); }
.card-tag.weapons { background: rgba(204,41,54,0.08); color: var(--iran-red); }
.card-tag.targets { background: rgba(22,163,74,0.08); color: var(--us-green); }
.card-tag.escalation { background: rgba(212,98,14,0.08); color: var(--iran-orange); }
.card-tag.interception { background: rgba(13,148,136,0.08); color: var(--us-teal); }

/* ---- PDF Embed ---- */
.pdf-container {
  width: 100%;
  height: 80vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.pdf-container iframe,
.pdf-container embed {
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-fallback {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}
.pdf-fallback a {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--iran-red);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
}
.pdf-fallback a:hover { background: #b12330; color: #fff; text-decoration: none; }

/* ---- Quick Link Cards ---- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.quick-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
  box-shadow: var(--shadow-sm);
}
.quick-link-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.quick-link-card .ql-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}
.quick-link-card .ql-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.quick-link-card .ql-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---- Data Files List ---- */
.data-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.data-file-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.data-file-link:hover { border-color: var(--border-light); background: var(--bg-card-hover); text-decoration: none; box-shadow: var(--shadow-md); }
.data-file-link .file-icon { font-size: 20px; flex-shrink: 0; }
.data-file-link .file-info { flex: 1; }
.data-file-link .file-name { font-size: 14px; font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }
.data-file-link .file-desc { font-size: 12px; color: var(--text-muted); }

/* ---- Network Graph ---- */
.net-container {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.net-container svg { display: block; }
.net-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.net-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.net-legend-line {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.net-tooltip {
  position: absolute;
  z-index: 10;
  background: #1a1a2e;
  color: #f0f0f0;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 280px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.net-tooltip strong { color: #f5a623; }
.net-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 8px;
  text-align: center;
}

/* ---- Footer ---- */
.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 900;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 4px rgba(0,0,0,0.06);
  padding: 10px 24px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--iran-red); }

.footer-clocks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}
.clock-item { display: flex; align-items: center; gap: 6px; }
.clock-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.clock-time { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.clock-sep { color: var(--border); }

.footer-text { font-size: 13px; }

/* ---- Loading Spinner ---- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--iran-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Utility ---- */
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--iran-orange); }
.text-red { color: var(--iran-red); }
.text-blue { color: var(--israel-blue); }
.text-green { color: var(--us-teal); }
.mono { font-family: var(--font-mono); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ---- Status dot (live badge) ---- */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--us-teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
  animation: pulse 2s ease-in-out infinite;
  margin-right: 6px;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
  50% { box-shadow: 0 0 0 6px rgba(13,148,136,0.05); }
}

/* ---- Export bar ---- */
.export-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.export-bar span {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.export-btn {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.export-btn:hover { border-color: var(--border-light); color: var(--text-primary); text-decoration: none; }

/* ---- X Share Button ---- */
.page-share-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-share svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.btn-share-x { background: #000; border-color: #000; }
.btn-share-x:hover { background: #333; border-color: #333; color: #fff; text-decoration: none; }
.btn-share-bsky { background: #0085ff; border-color: #0085ff; }
.btn-share-bsky:hover { background: #0070d6; border-color: #0070d6; color: #fff; text-decoration: none; }
.btn-share-wa { background: #25d366; border-color: #25d366; }
.btn-share-wa:hover { background: #1ebe57; border-color: #1ebe57; color: #fff; text-decoration: none; }

/* ---- Mobile sidebar overlay ---- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  /* Don't use display:none — it prevents the opacity transition */
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  touch-action: manipulation;
}

/* Sidebar header (close button row) — hidden on desktop */
.nav-sidebar-header {
  display: none;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  /* Hamburger */
  .nav-toggle { display: block; }

  .nav-inner {
    padding: 0 16px;
    height: 56px;
    flex-wrap: nowrap;
  }
  .nav-brand { margin-right: auto; }
  .nav-share-x { margin-left: 8px; order: 5; }
  .nav-badge { display: none; }

  /* ---- Sidebar drawer ---- */
  .nav-links {
    /* Reset flex layout — sidebar is a block panel */
    display: block;
    list-style: none;

    /* Position: slide in from left */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 85vw);
    z-index: 1100;

    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);

    /* Slide-in animation */
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Scrollable content */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    /* Padding gives room for content below the header */
    padding: 0 0 32px 0;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  /* Sidebar header row — visible only on mobile */
  .nav-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
  }

  .nav-sidebar-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    margin-right: -8px;
  }
  .nav-close:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
  }

  /* Top-level nav items — min 48px touch targets for mobile */
  .nav-links > li > a,
  .nav-dropdown > summary {
    display: flex;
    align-items: center;
    padding: 0 20px;
    min-height: 48px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    background: transparent;
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav-links > li:last-child > a { border-bottom: none; }
  .nav-links > li > a:hover,
  .nav-dropdown > summary:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
  }
  .nav-links > li > a.active {
    color: var(--israel-blue);
    background: rgba(37, 99, 235, 0.07);
    border-left: 3px solid var(--israel-blue);
    padding-left: 17px;
  }

  /* Accordion caret for dropdowns — rotates when open */
  .nav-dropdown > summary::after {
    margin-left: auto;
    flex-shrink: 0;
  }
  .nav-dropdown[open] > summary {
    color: var(--text-primary);
    background: var(--bg-primary);
  }
  .nav-dropdown[open] > summary.active {
    color: var(--israel-blue);
  }

  /* Mobile dropdown: accordion panel, not absolute */
  .nav-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    margin-top: 0;
    padding: 4px 0;
    border-radius: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
  }
  .nav-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0 20px 0 36px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    border-bottom: none;
    color: var(--text-secondary);
    white-space: normal;
    line-height: 1.3;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav-dropdown-menu a:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.04);
  }
  .nav-dropdown-menu a.active {
    color: var(--israel-blue);
    background: rgba(37, 99, 235, 0.06);
    font-weight: 600;
  }

  /* Prevent body scroll when sidebar is open (iOS-safe) */
  body.nav-open {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
  }

  /* Footer: smaller text on mobile */
  .footer-clocks { gap: 10px; }
  .clock-label { font-size: 9px; }
  .clock-time { font-size: 13px; }
  .footer-text { font-size: 11px; }
}

@media (max-width: 768px) {
  main { padding: 20px 16px; }
  .ops-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .wave-card { grid-template-columns: 60px 1fr auto; }
  .wave-op-badge { display: none; }
  .table-controls { gap: 8px; }
  .search-box { max-width: 100%; }
  .wiki-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .wave-card { grid-template-columns: 1fr; gap: 8px; }
  .page-header h1 { font-size: 22px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .quick-links { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; }
  .cta-row a { width: 100%; justify-content: center; }
}

/* ---- Chart containers (viz.js) ---- */
.chart-container { overflow: hidden; }
.chart-container canvas { max-width: 100%; }
.chart-container .chart-sub,
.chart-container .chart-desc { margin-bottom: 20px; }

/* ---- Responsive table card view ---- */
@media (max-width: 600px) {
  .sitrep-table thead th:nth-child(3),
  .sitrep-table thead th:nth-child(4),
  .sitrep-table tbody td:nth-child(3),
  .sitrep-table tbody td:nth-child(4) {
    display: none;
  }
}
