* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #232733;
  --border: #2e3344;
  --text: #e2e4e9;
  --text-dim: #8b8fa3;
  --accent: #6c8aff;
  --header-h: 48px;
  --sidebar-w: 420px;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header { height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; gap: 12px; z-index: 1000; position: relative; }
.header h1 { font-size: 15px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.header .event-count { font-size: 12px; color: var(--text-dim); }
.layer-status { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.layer-dot { display: inline-flex; align-items: center; gap: 3px; color: var(--text-dim); }
.layer-dot .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.layer-dot .dot.green { background: #22c55e; }
.layer-dot .dot.yellow { background: #f59e0b; }
.layer-dot .dot.red { background: #ef4444; }
.layer-dot .dot.gray { background: #6b7280; }
.filter-toggle { display: none; background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.arc-toggle { background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.arc-toggle:hover { color: var(--text); border-color: var(--accent); }
.arc-toggle.active { color: var(--accent); border-color: var(--accent); }

/* Filters */
.filters { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: flex-end; align-items: center; }
.filters.hidden { display: none; }
@media (min-width: 769px) { .filters.hidden { display: flex; } }
.pill { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text-dim); transition: all 0.15s; user-select: none; white-space: nowrap; }
.pill.active { color: #fff; border-color: transparent; }
.pill:hover { opacity: 0.85; }

/* Layout */
.main { display: flex; height: calc(100vh - var(--header-h)); }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; min-height: 0; }
#storylinesPanel { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
#eventsPanel { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.sidebar-tabs { display: flex; border-bottom: 1px solid var(--border); }
.sidebar-tab { flex: 1; padding: 10px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.sidebar-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.sidebar-tab:hover { color: var(--text); }
.sidebar-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.sidebar-header h2 { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-header-copy { display: flex; flex-direction: column; gap: 2px; }
.sidebar-subtitle { font-size: 11px; color: var(--text-dim); }
.back-btn { display: none; background: none; border: none; color: var(--accent); font-size: 13px; cursor: pointer; padding: 0; }
.back-btn:hover { text-decoration: underline; }
.sidebar-search { padding: 8px 16px; border-bottom: 1px solid var(--border); }
.search-input { width: 100%; background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 6px; font-size: 12px; outline: none; }
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-dim); }
.event-list { flex: 1; overflow-y: auto; min-height: 0; }
.storylines-list { flex: 1; overflow-y: auto; min-height: 0; }
.loose-signals { border-top: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.sidebar-empty { padding: 16px; color: var(--text-dim); font-size: 13px; text-align: center; }
.sidebar-loading { padding: 16px; color: var(--text-dim); font-size: 13px; text-align: center; }
.sidebar-scope { padding: 8px 16px; border-bottom: 1px solid var(--border); }
.scope-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(108,138,255,0.12); color: var(--text); font-size: 11px; border: 1px solid rgba(108,138,255,0.25); }
.scope-clear-btn { background: none; border: none; color: var(--accent); font-size: 11px; cursor: pointer; padding: 0; }
.event-card { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; }
.event-card:hover { background: var(--surface2); }
.event-card.active { background: var(--surface2); border-left: 3px solid var(--accent); }
.event-card .type-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: #fff; margin-bottom: 4px; }
.event-card .summary { font-size: 13px; line-height: 1.4; margin-bottom: 4px; }
.event-card .meta { font-size: 11px; color: var(--text-dim); }
.event-card .dir-indicator { font-size: 10px; color: var(--accent); margin-left: 4px; }
.event-card-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.event-time-label { font-size: 11px; color: var(--text-dim); }
.event-storyline-link { font-size: 11px; color: var(--accent); margin-top: 4px; }

/* Storylines */
.storyline-card { border-bottom: 1px solid var(--border); }
.storyline-card.active { background: linear-gradient(180deg, rgba(108,138,255,0.08), rgba(108,138,255,0.02)); }
.storyline-card-hit { width: 100%; background: none; border: none; color: inherit; text-align: left; padding: 14px 16px 12px; cursor: pointer; }
.storyline-card-hit:hover { background: var(--surface2); }
.storyline-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
.storyline-label-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.storyline-label { font-size: 14px; font-weight: 600; line-height: 1.35; }
.storyline-meta { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }
.storyline-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.storyline-chip { font-size: 10px; color: var(--text-dim); border: 1px solid var(--border); background: rgba(255,255,255,0.03); padding: 3px 7px; border-radius: 999px; }
.storyline-urgency { font-size: 10px; color: #fecaca; border: 1px solid rgba(239,68,68,0.35); background: rgba(239,68,68,0.12); padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.storyline-expanded { padding: 0 16px 16px; border-top: 1px solid rgba(255,255,255,0.05); }
.storyline-summary { font-size: 13px; line-height: 1.5; color: var(--text); margin: 12px 0 10px; }
.storyline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.storyline-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 8px; }
.storyline-events { display: flex; flex-direction: column; gap: 6px; }
.storyline-event-row { width: 100%; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--text); border-radius: 8px; padding: 9px 10px; display: grid; grid-template-columns: 110px auto 1fr; gap: 8px; align-items: center; cursor: pointer; text-align: left; }
.storyline-event-row:hover { border-color: var(--accent); background: rgba(108,138,255,0.08); }
.storyline-event-row.active { border-color: var(--accent); background: rgba(108,138,255,0.12); }
.storyline-event-row.compact { grid-template-columns: 100px auto 1fr; padding: 8px 9px; }
.storyline-event-time { font-size: 10px; color: var(--text-dim); }
.storyline-event-badge { display: inline-flex; justify-content: center; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 700; text-transform: uppercase; color: #fff; }
.storyline-event-summary { font-size: 12px; line-height: 1.4; }
.storyline-inline-detail { margin-top: 10px; }
.storyline-more { font-size: 11px; color: var(--text-dim); padding: 0 2px; }
.loose-signals-card { padding: 12px 16px 14px; }
.loose-signals-toggle { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; background: none; border: none; color: inherit; cursor: pointer; text-align: left; padding: 0; }
.loose-signals-summary { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.loose-signals-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.loose-signals-latest { font-size: 10px; color: var(--text-dim); white-space: nowrap; }
.loose-signals-chevron { font-size: 10px; text-transform: uppercase; letter-spacing: 0.45px; color: var(--accent); border: 1px solid rgba(108,138,255,0.25); background: rgba(108,138,255,0.08); padding: 4px 7px; border-radius: 999px; }
.loose-signals-body { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.op-type-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
.op-event-count { font-size: 11px; color: var(--text-dim); font-weight: 600; }

/* Detail panel */
.detail-panel { display: none; flex: 1; overflow-y: auto; padding: 16px; }
.detail-panel.visible { display: block; }
.detail-panel h3 { font-size: 18px; margin-bottom: 6px; line-height: 1.35; }
.event-detail-shell.inline { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: rgba(255,255,255,0.02); }
.detail-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.detail-head-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.detail-field { margin-bottom: 10px; }
.detail-field .label { font-size: 11px; text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 2px; }
.detail-field .value { font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 8px; }
.detail-subvalue { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.detail-action-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 6px 9px; border-radius: 7px; font-size: 11px; cursor: pointer; transition: all 0.15s; }
.detail-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.detail-empty { color: var(--text-dim); font-size: 12px; }
.detail-priority { padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.priority-critical { background: rgba(239,68,68,0.2); color: #fecaca; }
.priority-high { background: rgba(249,115,22,0.2); color: #fdba74; }
.priority-normal { background: rgba(148,163,184,0.18); color: #cbd5e1; }
.priority-low { background: rgba(34,197,94,0.18); color: #bbf7d0; }
.detail-storyline-label { padding: 2px 8px; border-radius: 999px; font-size: 10px; background: rgba(108,138,255,0.12); color: var(--accent); border: 1px solid rgba(108,138,255,0.25); }
.source-group { margin-bottom: 12px; }
.source-group .perspective-tag { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 600; margin-bottom: 6px; }
.source-row { margin-bottom: 10px; }
.source-group .framing { font-size: 13px; line-height: 1.5; color: var(--text); margin-bottom: 4px; padding-left: 8px; border-left: 2px solid var(--border); }
.source-group .source-link { font-size: 11px; color: var(--accent); display: block; margin-top: 2px; }
.source-time { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.correlation-list { display: flex; flex-direction: column; gap: 8px; }
.correlation-card { border: 1px solid var(--border); background: rgba(255,255,255,0.03); border-radius: 8px; padding: 10px; }
.correlation-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.correlation-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--accent); }
.correlation-confidence { font-size: 10px; color: var(--text-dim); text-transform: uppercase; }
.correlation-note { font-size: 12px; line-height: 1.45; color: var(--text); }

/* Map */
.map-container { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

/* Timeline scrubber */
.timeline { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(90%, 640px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; z-index: 800; display: flex; flex-direction: column; gap: 4px; }
.timeline-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.timeline-title-group { display: flex; flex-direction: column; gap: 3px; }
.timeline-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); }
.timeline-date { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 0.3px; }
.timeline-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.timeline-presets { display: flex; gap: 4px; }
.timeline-preset { background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; transition: all 0.15s; }
.timeline-preset.active { color: var(--accent); border-color: var(--accent); }
.timeline-preset:hover { color: var(--text); }
.timeline-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: all 0.15s; }
.timeline-btn:hover { color: var(--text); border-color: var(--accent); }
.timeline-btn.active { color: var(--accent); border-color: var(--accent); }
.timeline-speed { background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); padding: 2px 6px; border-radius: 6px; font-size: 11px; cursor: pointer; height: 28px; }
.timeline-speed:focus { outline: none; border-color: var(--accent); }
.timeline-speed.hidden, .timeline-btn.hidden, .timeline-replay.hidden { display: none; }
.timeline-replay { display: flex; flex-direction: column; gap: 4px; }
.timeline-sparkline { width: 100%; height: 20px; display: block; }
.timeline-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--border); outline: none; margin: 2px 0; }
.timeline-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; }
.timeline-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }
.timeline-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); }

/* Mobile drawer */
@media (max-width: 768px) {
  .filter-toggle { display: block; }
  .filters { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px; z-index: 1001; flex-wrap: wrap; justify-content: flex-start; }
  .sidebar { display: none; }
  .map-container { width: 100%; }
  .arc-toggle { font-size: 10px; padding: 3px 6px; }
  .layer-status { display: none; }
  .maritime-panel { bottom: 65px; right: 8px; min-width: 140px; padding: 6px 8px; }
  .dashboard-panel { top: 38px; left: 4px; right: 4px; }
  .cluster-preview { top: 44px; right: 4px; left: 4px; width: auto; }
  .storyline-event-row { grid-template-columns: 1fr; }
  .detail-heading { flex-direction: column; }
  .timeline-header { flex-direction: column; align-items: stretch; }
  .timeline-controls { justify-content: flex-start; }
  .drawer { display: flex; flex-direction: column; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 2px solid var(--border); z-index: 1000; transition: max-height 0.25s ease; max-height: 54px; overflow: hidden; border-radius: 12px 12px 0 0; }
  .drawer.expanded { max-height: 55vh; }
  .drawer.full { max-height: 85vh; }
  .drawer-handle { text-align: center; padding: 8px; cursor: pointer; flex-shrink: 0; }
  .drawer-handle::before { content: ''; display: inline-block; width: 36px; height: 4px; background: var(--border); border-radius: 2px; }
  .drawer-handle .drawer-title { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
  .drawer-content { flex: 1; overflow-y: auto; }
  .timeline { bottom: 60px; }
}
@media (min-width: 769px) {
  .drawer { display: none; }
}

/* Leaflet overrides for dark theme */
.leaflet-container { background: #1a1d27; }
.dark-tooltip { background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; font-size: 12px !important; border-radius: 6px !important; padding: 6px 10px !important; box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important; }
.dark-tooltip::before { border-top-color: var(--border) !important; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-control-attribution { background: rgba(15,17,23,0.8) !important; color: var(--text-dim) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--text-dim) !important; }

/* Commodity ticker */
.commodity-ticker { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 14px; z-index: 800; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; align-items: stretch; white-space: nowrap; }
.commodity-ticker:hover { border-color: var(--accent); }
.commodity-ticker-row { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.commodity-ticker-foot { font-size: 10px; color: var(--text-dim); text-align: center; margin-top: 2px; }
.ticker-item strong { color: var(--text-dim); margin-right: 4px; }
.ticker-change { font-size: 11px; font-weight: 600; }
.ticker-change.up { color: #22c55e; }
.ticker-change.down { color: #ef4444; }
.ticker-sep { color: var(--border); margin: 0 2px; }
.ticker-loading { color: var(--text-dim); }
.commodity-chart { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; z-index: 800; }
.chart-commodity-selector { display: flex; gap: 4px; margin-bottom: 4px; }
.chart-commodity-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); padding: 2px 8px; border-radius: 4px; font-size: 10px; cursor: pointer; transition: all 0.15s; }
.chart-commodity-btn.active { color: var(--accent); border-color: var(--accent); }
.chart-commodity-btn:hover { color: var(--text); }
.commodity-chart-foot { text-align: center; font-size: 10px; color: var(--text-dim); margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }

/* Dashboard panel */
.dashboard-panel { position: absolute; top: 44px; left: 12px; right: 12px; max-height: calc(100% - 120px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; z-index: 900; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dashboard-header h2 { font-size: 18px; line-height: 1.3; }
.dashboard-context-pill { font-size: 11px; color: var(--accent); border: 1px solid rgba(108,138,255,0.25); background: rgba(108,138,255,0.08); border-radius: 999px; padding: 5px 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dashboard-module { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.dashboard-module-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.dashboard-module-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 3px; }
.dashboard-module h3 { font-size: 15px; }
.dashboard-status { font-size: 10px; padding: 4px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.4px; }
.dashboard-status.healthy { background: rgba(34,197,94,0.14); color: #bbf7d0; }
.dashboard-status.stale { background: rgba(245,158,11,0.14); color: #fde68a; }
.dashboard-status.error { background: rgba(239,68,68,0.14); color: #fecaca; }
.dashboard-status.unknown { background: rgba(107,114,128,0.14); color: #d1d5db; }
.dashboard-metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.dashboard-metric { background: rgba(15,17,23,0.24); border: 1px solid rgba(255,255,255,0.03); border-radius: 8px; padding: 8px; }
.dashboard-metric-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.dashboard-metric-label { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.dashboard-metric-value { font-size: 16px; font-weight: 700; color: var(--text); }
.dashboard-metric-value.small { font-size: 12px; line-height: 1.4; }
.dashboard-spark { display: block; width: 100%; }
.dashboard-metric-foot { font-size: 10px; color: var(--text-dim); margin-top: 4px; }
.dashboard-module-context { font-size: 12px; color: var(--text-dim); line-height: 1.45; margin-top: 10px; }
.dashboard-no-data { font-size: 10px; color: var(--text-dim); }
.dashboard-loading { padding: 24px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* Maritime panel */
.maritime-panel { position: absolute; bottom: 90px; right: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; z-index: 800; min-width: 160px; }
.maritime-header { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.maritime-label { font-size: 10px; text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.5px; font-weight: 600; }
.maritime-count { font-size: 20px; font-weight: 700; color: var(--text); }
.maritime-unit { font-size: 10px; color: var(--text-dim); }
.maritime-footer { font-size: 10px; color: var(--text-dim); margin-top: 4px; }
.maritime-spark { display: block; margin-top: 4px; }
.maritime-loading { color: var(--text-dim); font-size: 12px; }

/* Flight icons */
.flight-icon { background: none !important; border: none !important; }

/* GDELT popup */
.gdelt-popup { min-width: 220px; }
.gdelt-popup-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.gdelt-popup-meta { font-size: 11px; color: var(--text-dim); line-height: 1.4; margin-bottom: 8px; }
.gdelt-popup-stats { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text); margin-bottom: 8px; }

/* Cluster preview */
.cluster-preview { position: absolute; top: 56px; right: 12px; width: min(360px, calc(100% - 24px)); background: rgba(26,29,39,0.96); border: 1px solid var(--border); border-radius: 12px; padding: 12px; z-index: 950; box-shadow: 0 20px 40px rgba(0,0,0,0.35); backdrop-filter: blur(10px); }
.cluster-preview.hidden { display: none; }
.cluster-preview-header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.cluster-preview-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 3px; }
.cluster-preview-title { font-size: 15px; font-weight: 700; }
.cluster-preview-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 20px; line-height: 1; }
.cluster-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cluster-chip { font-size: 10px; padding: 4px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); }
.cluster-preview-actions { display: flex; gap: 6px; margin-bottom: 12px; }
.cluster-action-btn { flex: 1; background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 7px 8px; border-radius: 8px; font-size: 11px; cursor: pointer; transition: all 0.15s; }
.cluster-action-btn:hover { color: var(--accent); border-color: var(--accent); }
.cluster-preview-section { margin-top: 10px; }
.cluster-preview-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 6px; }
.cluster-storyline-row, .cluster-event-row { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 10px; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; margin-bottom: 6px; }
.cluster-storyline-row:hover, .cluster-event-row:hover { border-color: var(--accent); }
.cluster-event-row { flex-direction: column; align-items: flex-start; }
.cluster-event-type { font-size: 10px; text-transform: uppercase; font-weight: 700; }
.cluster-event-summary { font-size: 12px; line-height: 1.4; }

/* Drawer detail */
.drawer-detail { padding: 16px; }

/* Marker cluster overrides */
.marker-cluster-small { background-color: rgba(108, 138, 255, 0.3); }
.marker-cluster-small div { background-color: rgba(108, 138, 255, 0.6); }
.marker-cluster-medium { background-color: rgba(249, 115, 22, 0.3); }
.marker-cluster-medium div { background-color: rgba(249, 115, 22, 0.6); }
.marker-cluster-large { background-color: rgba(220, 38, 38, 0.3); }
.marker-cluster-large div { background-color: rgba(220, 38, 38, 0.6); }
.marker-cluster div { width: 30px; height: 30px; margin-left: 5px; margin-top: 5px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; }
.marker-cluster { width: 40px; height: 40px; border-radius: 50%; }
