  :root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #111114;
    --bg-tertiary: #18181c;
    --bg-card: #1a1a1f;
    --border: #2a2a32;
    --border-accent: #3a3a44;
    --text-primary: #e8e8ec;
    --text-secondary: #8a8a96;
    --text-tertiary: #5a5a66;
    --accent-red: #e63946;
    --accent-red-dim: rgba(230, 57, 70, 0.15);
    --accent-gold: #d4a853;
    --accent-gold-dim: rgba(212, 168, 83, 0.12);
    --accent-blue: #4a9eff;
    --accent-blue-dim: rgba(74, 158, 255, 0.12);
    --accent-green: #2dd4a0;
    --accent-green-dim: rgba(45, 212, 160, 0.1);
    --accent-purple: #b47aff;
    --accent-purple-dim: rgba(180, 122, 255, 0.12);
    --node-person: #e63946;
    --node-location: #4a9eff;
    --node-org: #d4a853;
    --node-document: #2dd4a0;
    --node-flight: #b47aff;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { background: var(--bg-primary); color: var(--text-primary); font-family: 'DM Sans', sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
  body.explorer-active { overflow: hidden; position: fixed; width: 100%; height: 100%; }
  body::after { content: ''; position: fixed; inset: 0; background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); pointer-events: none; z-index: 99999; opacity: 0.4; }

  #landingPage { transition: opacity 0.5s, transform 0.5s; }
  #landingPage.hidden { opacity: 0; transform: scale(0.98); pointer-events: none; position: absolute; }

  nav.landing-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; background: rgba(10,10,12,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); border-top: 2px solid var(--accent-red); }
  .nav-brand { display: flex; align-items: center; gap: 10px; }
  .nav-brand-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; position: relative; filter: drop-shadow(0 0 6px rgba(230,57,70,0.25)); transition: filter 0.3s; }
  .nav-brand-icon:hover { filter: drop-shadow(0 0 12px rgba(230,57,70,0.4)); }
  .nav-brand-icon svg { width: 100%; height: 100%; }
  .nav-brand-text { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; }
  .nav-brand-text span { color: var(--accent-red); }
  .nav-links { display: flex; gap: 32px; list-style: none; }
  .nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; transition: color 0.3s; }
  .nav-links a:hover { color: var(--text-primary); }
  .nav-cta, .btn-primary { background: var(--accent-red); color: white; border: none; padding: 8px 20px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; border-radius: 2px; cursor: pointer; transition: all 0.3s; }
  .nav-cta:hover, .btn-primary:hover { background: #cf2f3c; transform: translateY(-1px); }
  .btn-primary { padding: 14px 36px; font-size: 13px; }
  .btn-secondary { background: none; color: var(--text-primary); border: 1px solid var(--border-accent); padding: 14px 36px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; border-radius: 2px; cursor: pointer; transition: all 0.3s; }
  .btn-secondary:hover { border-color: var(--text-secondary); transform: translateY(-2px); }

  .hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 120px 40px 80px; position: relative; }
  .hero::before { content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%); width: 1200px; height: 1000px; background: radial-gradient(ellipse, rgba(230,57,70,0.08) 0%, rgba(180,122,255,0.03) 40%, transparent 70%); pointer-events: none; }
  .hero-classification { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border: 1px solid var(--accent-red); border-radius: 2px; margin-bottom: 40px; animation: fadeInDown 0.8s ease-out; background: rgba(230,57,70,0.06); box-shadow: 0 0 30px rgba(230,57,70,0.08); }
  .hero-classification-dot { width: 6px; height: 6px; background: var(--accent-red); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
  .hero-classification span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-red); }
  .hero h1 { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: clamp(48px,7vw,96px); line-height: 1.05; letter-spacing: -2px; margin-bottom: 24px; animation: fadeInUp 0.8s ease-out 0.2s both; text-shadow: 0 0 80px rgba(230,57,70,0.15); }
  .hero h1 em { font-style: italic; color: var(--accent-red); text-shadow: 0 0 40px rgba(230,57,70,0.3); }
  .hero-sub { font-family: 'Source Serif 4', serif; font-size: 20px; font-weight: 300; color: var(--text-secondary); max-width: 640px; line-height: 1.6; margin-bottom: 48px; animation: fadeInUp 0.8s ease-out 0.4s both; }
  .hero-stats { display: flex; gap: 48px; animation: fadeInUp 0.8s ease-out 0.6s both; }
  .hero-stat { text-align: center; }
  .hero-stat-value { font-family: 'IBM Plex Mono', monospace; font-size: 32px; font-weight: 700; display: block; }
  .hero-stat-label { font-size: 12px; font-weight: 500; color: var(--text-tertiary); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 4px; }
  .hero-scroll { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; animation: fadeInUp 1s ease-out 1s both; }
  .hero-scroll span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-tertiary); }
  .scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--accent-red), transparent); animation: scrollPulse 2s ease-in-out infinite; }

  .section { padding: 120px 40px; position: relative; }
  .section-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-red); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
  .section-label::before { content: ''; width: 24px; height: 1px; background: var(--accent-red); }
  .section-header { max-width: 800px; margin-bottom: 64px; }
  .section-header h2 { font-family: 'Source Serif 4', serif; font-size: clamp(32px,4vw,52px); font-weight: 600; line-height: 1.15; letter-spacing: -1px; margin-bottom: 16px; }
  .section-header p { font-size: 16px; color: var(--text-secondary); line-height: 1.7; max-width: 600px; }
  .graph-container-landing { width: 100%; height: 600px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; position: relative; overflow: hidden; cursor: grab; }
  .graph-container-landing:active { cursor: grabbing; }
  .graph-legend { position: absolute; top: 20px; left: 20px; background: rgba(10,10,12,0.9); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 4px; padding: 16px; }
  .graph-legend h4 { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 12px; }
  .legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .legend-dot { width: 8px; height: 8px; border-radius: 50%; }
  .legend-item span { font-size: 12px; color: var(--text-secondary); }
  .graph-info-panel { position: absolute; top: 20px; right: 20px; width: 280px; background: rgba(10,10,12,0.92); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 4px; padding: 20px; display: none; }
  .graph-info-panel.active { display: block; }
  .graph-info-panel h3 { font-family: 'Source Serif 4', serif; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
  .graph-info-panel .info-type { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
  .graph-info-panel .info-connections { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
  .graph-info-panel .info-connections strong { color: var(--text-primary); }
  .info-doc-count { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--accent-red-dim); border-radius: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent-red); margin-top: 12px; }

  .features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .feature-card { background: var(--bg-secondary); padding: 40px 32px; transition: background 0.3s; }
  .feature-card:hover { background: var(--bg-tertiary); }
  .feature-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 24px; border: 1px solid var(--border-accent); border-radius: 4px; }
  .feature-card h3 { font-family: 'Source Serif 4', serif; font-size: 20px; font-weight: 600; margin-bottom: 10px; }
  .feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
  .feature-tag { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; margin-top: 16px; }

  .pipeline-visual { display: flex; gap: 0; margin-top: 48px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .pipeline-stage { flex: 1; padding: 32px 24px; background: var(--bg-secondary); border-right: 1px solid var(--border); position: relative; transition: background 0.3s; }
  .pipeline-stage:last-child { border-right: none; }
  .pipeline-stage:hover { background: var(--bg-tertiary); }
  .pipeline-stage-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; color: var(--accent-red); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
  .pipeline-stage-num::after { content: ''; flex: 1; height: 1px; background: var(--border-accent); }
  .pipeline-stage h4 { font-family: 'Source Serif 4', serif; font-size: 17px; font-weight: 600; margin-bottom: 8px; }
  .pipeline-stage p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
  .pipeline-arrow { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; background: var(--bg-primary); border: 1px solid var(--border-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; font-size: 10px; color: var(--accent-red); }

  .cta-section { text-align: center; padding: 160px 40px; position: relative; }
  .cta-section::before { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(ellipse, rgba(230,57,70,0.05) 0%, transparent 70%); pointer-events: none; }
  .cta-section h2 { font-family: 'Source Serif 4', serif; font-size: clamp(36px,5vw,64px); font-weight: 700; line-height: 1.1; letter-spacing: -1px; margin-bottom: 20px; }
  .cta-section p { font-size: 17px; color: var(--text-secondary); max-width: 560px; margin: 0 auto 40px; line-height: 1.65; }
  .cta-buttons { display: flex; gap: 16px; justify-content: center; }
  .landing-footer { padding: 40px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
  .landing-footer p { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-tertiary); }
  .landing-footer a { color: var(--text-secondary); text-decoration: none; }
  .fade-in { opacity: 0; transform: translateY(32px); transition: all 0.7s cubic-bezier(0.16,1,0.3,1); }
  .fade-in.visible { opacity: 1; transform: translateY(0); }

  @keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
  @keyframes scrollPulse { 0%,100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

  /* ===================== EXPLORER ===================== */
  #explorerApp { display: none; position: fixed; inset: 0; z-index: 200; background: var(--bg-primary); opacity: 0; transition: opacity 0.4s; }
  #explorerApp.active { display: flex; flex-direction: column; }
  #explorerApp.visible { opacity: 1; }

  .explorer-topbar { height: 52px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 16px; flex-shrink: 0; }
  .explorer-topbar .nav-brand { cursor: pointer; }
  .topbar-sep { width: 1px; height: 24px; background: var(--border); }
  .topbar-search { flex: 1; max-width: 480px; display: flex; align-items: center; gap: 8px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px; padding: 6px 12px; position: relative; }
  .topbar-search input { flex: 1; background: none; border: none; outline: none; color: var(--text-primary); font-family: 'DM Sans', sans-serif; font-size: 13px; }
  .topbar-search input::placeholder { color: var(--text-tertiary); }
  .topbar-search.focused { border-color: var(--accent-purple); box-shadow: 0 0 0 2px rgba(180,122,255,0.15); }
  .topbar-search-kbd { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); background: var(--bg-primary); border: 1px solid var(--border); border-radius: 2px; padding: 1px 5px; line-height: 1; }
  /* Search Results Dropdown */
  .gs-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 440px; overflow-y: auto; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 800; display: none; }
  .gs-dropdown.open { display: block; }
  .gs-group { padding: 6px 0; border-bottom: 1px solid var(--border); }
  .gs-group:last-child { border-bottom: none; }
  .gs-group-title { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); padding: 4px 14px; }
  .gs-item { display: flex; align-items: center; gap: 10px; padding: 7px 14px; cursor: pointer; transition: background 0.1s; }
  .gs-item:hover, .gs-item.active { background: var(--bg-tertiary); }
  .gs-item-icon { width: 22px; height: 22px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
  .gs-item-icon.person { background: var(--accent-red-dim); color: var(--accent-red); }
  .gs-item-icon.location { background: var(--accent-blue-dim); color: var(--accent-blue); }
  .gs-item-icon.org { background: var(--accent-gold-dim); color: var(--accent-gold); }
  .gs-item-icon.flight { background: rgba(180,122,255,0.12); color: var(--accent-purple); }
  .gs-item-icon.doc { background: rgba(45,212,160,0.12); color: var(--accent-green); }
  .gs-item-icon.timeline { background: rgba(255,140,66,0.12); color: #ff8c42; }
  .gs-item-body { flex: 1; min-width: 0; }
  .gs-item-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gs-item-name mark { background: var(--accent-purple-dim); color: var(--accent-purple); border-radius: 1px; padding: 0 1px; }
  .gs-item-sub { font-size: 10px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gs-item-badge { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); flex-shrink: 0; }
  .gs-empty { padding: 20px 14px; text-align: center; color: var(--text-tertiary); font-size: 12px; }
  .gs-footer { padding: 6px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
  .gs-footer-hint { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); }
  .gs-footer-hint kbd { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 2px; padding: 0 4px; }
  .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
  .topbar-status { display: flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent-green); }
  .topbar-status-dot { width: 6px; height: 6px; background: var(--accent-green); border-radius: 50%; animation: pulse 2s infinite; }

  .explorer-body { display: flex; flex: 1; overflow: hidden; position: relative; }

  /* Sidebar Toggle Button */
  .sidebar-toggle { position: absolute; left: 220px; top: 50%; transform: translateY(-50%); z-index: 1000; background: var(--bg-card); border: 1px solid var(--border-accent); border-left: none; border-radius: 0 6px 6px 0; padding: 24px 8px; cursor: pointer; transition: all 0.3s; color: var(--text-secondary); font-size: 14px; box-shadow: 2px 0 8px rgba(0,0,0,0.3); }
  .sidebar-toggle:hover { background: var(--accent-purple-dim); color: var(--accent-purple); border-color: var(--accent-purple); box-shadow: 2px 0 12px rgba(180,122,255,0.4); }
  .sidebar-toggle-icon { display: block; transition: transform 0.3s; font-weight: bold; }

  .explorer-sidebar { width: 220px; background: var(--bg-secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; transition: all 0.3s; }
  .explorer-sidebar.collapsed { margin-left: -220px; }

  .explorer-body.sidebar-collapsed .sidebar-toggle { left: 0; }
  .explorer-body.sidebar-collapsed .sidebar-toggle-icon { transform: rotate(180deg); }
  .sidebar-section { padding: 16px 0; }
  .sidebar-section-title { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-tertiary); padding: 0 16px; margin-bottom: 8px; }
  .sidebar-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; transition: all 0.15s; border-left: 2px solid transparent; font-size: 13px; color: var(--text-secondary); }
  .sidebar-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
  .sidebar-item.active { background: var(--accent-red-dim); color: var(--accent-red); border-left-color: var(--accent-red); }
  .sidebar-item-icon { width: 18px; text-align: center; font-size: 14px; }
  .sidebar-item-badge { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 10px; background: var(--bg-tertiary); padding: 2px 6px; border-radius: 2px; color: var(--text-tertiary); }
  .sidebar-divider { height: 1px; background: var(--border); margin: 4px 16px; }
  .sidebar-stats { padding: 16px; border-top: 1px solid var(--border); margin-top: auto; }
  .sidebar-stat-row { display: flex; justify-content: space-between; padding: 4px 0; }
  .sidebar-stat-row span:first-child { font-size: 11px; color: var(--text-tertiary); }
  .sidebar-stat-row span:last-child { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text-secondary); }

  .explorer-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
  .explorer-view { display: none; flex: 1; overflow: hidden; flex-direction: column; }
  .explorer-view.active { display: flex; }
  .view-header { padding: 20px 28px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: space-between; flex-shrink: 0; }
  .view-header h2 { font-family: 'Source Serif 4', serif; font-size: 24px; font-weight: 600; }
  .view-header-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
  .view-header-actions { display: flex; gap: 8px; }
  .view-action-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 3px; background: none; color: var(--text-secondary); font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
  .view-action-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }
  .view-action-btn.active { border-color: var(--accent-red); color: var(--accent-red); background: var(--accent-red-dim); }

  .network-view-body { flex: 1; display: flex; overflow: hidden; position: relative; }
  .ng-canvas-wrap { flex: 1; position: relative; overflow: hidden; }
  .ng-canvas-wrap canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
  .ng-canvas-wrap canvas:active { cursor: grabbing; }
  .network-sidebar { width: 360px; background: var(--bg-secondary); border-left: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; }
  .network-sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-tertiary); }
  .ng-type-filters { display: flex; gap: 4px; flex-wrap: wrap; }
  .ng-type-btn { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--border); background: transparent; color: var(--text-tertiary); cursor: pointer; transition: all 0.15s; }
  .ng-type-btn.active { color: var(--text-primary); background: var(--bg-tertiary); }
  .ng-type-btn:hover { background: var(--bg-tertiary); }
  .ng-controls { position: absolute; bottom: 16px; left: 16px; display: flex; flex-direction: column; gap: 4px; z-index: 10; }
  /* Network Graph Legend */
  .ng-legend { position: absolute; bottom: 16px; right: 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; z-index: 10; min-width: 140px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
  .ng-legend-title { font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; font-size: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .ng-legend-arrow { font-size: 7px; transition: transform 0.2s; }
  .ng-legend.collapsed .ng-legend-arrow { transform: rotate(-90deg); }
  .ng-legend.collapsed .ng-legend-body { display: none; }
  .ng-legend.collapsed .ng-legend-title { margin-bottom: 0; }
  .ng-legend.collapsed { min-width: auto; }
  .ng-legend-item { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--text-secondary); }
  .ng-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .ng-legend-size { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text-tertiary); font-size: 9px; }
  .ng-legend-size-dots { display: flex; align-items: center; gap: 3px; }
  .ng-legend-size-dot { border-radius: 50%; background: var(--text-tertiary); opacity: 0.4; }
  /* Network Graph Search */
  .ng-search { position: absolute; top: 12px; left: 12px; z-index: 10; display: flex; align-items: center; gap: 0; }
  .ng-search input { width: 220px; padding: 7px 12px; font-size: 11px; font-family: 'IBM Plex Mono', monospace; background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); border-radius: 4px; outline: none; transition: border-color 0.15s; }
  .ng-search input:focus { border-color: var(--accent-purple); }
  .ng-search input::placeholder { color: var(--text-tertiary); }
  .ng-search-count { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); margin-left: 8px; white-space: nowrap; }
  .ng-ctrl-btn { width: 30px; height: 30px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-secondary); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .ng-ctrl-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .ng-tooltip { position: absolute; pointer-events: none; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; font-size: 11px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); display: none; z-index: 50; max-width: 220px; }
  .ng-tooltip.visible { display: block; }
  .ng-tooltip-name { font-weight: 600; margin-bottom: 2px; }
  .ng-tooltip-type { font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 1px; }
  .ng-tooltip-stat { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
  .entity-detail { padding: 20px; display: none; }
  .entity-detail.active { display: block; }
  .entity-detail-name { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 600; margin-bottom: 4px; }
  .entity-detail-type { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
  .entity-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
  .entity-stat-card { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; padding: 12px; }
  .entity-stat-card .val { font-family: 'IBM Plex Mono', monospace; font-size: 18px; font-weight: 700; display: block; }
  .entity-stat-card .lbl { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
  .entity-connections-title { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 10px; }
  .entity-connection-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; transition: color 0.2s; }
  .entity-connection-item:hover { color: var(--accent-red); }
  .entity-connection-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .entity-connection-strength { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .entity-placeholder { padding: 40px 20px; text-align: center; }
  .entity-placeholder p { color: var(--text-tertiary); font-size: 13px; line-height: 1.6; }
  .ed-flight-item { padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
  .ed-flight-item:hover { background: var(--bg-tertiary); }
  .ed-flight-route { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; color: var(--accent-purple); display: block; }
  .ed-flight-meta { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
  .ed-flight-pax { font-size: 10px; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }
  .ed-flight-note { font-size: 9px; color: var(--accent-gold); margin-top: 2px; display: block; }
  .ed-doc-item { padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
  .ed-doc-item:hover { background: var(--bg-tertiary); }
  .ed-doc-type { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 2px; display: inline-block; margin-bottom: 3px; }
  .ed-doc-title { font-size: 12px; color: var(--text-primary); line-height: 1.4; }
  .ed-doc-excerpt { font-size: 10px; color: var(--text-tertiary); margin-top: 3px; line-height: 1.4; max-height: 36px; overflow: hidden; }
  .ng-action-btn { display: block; width: 100%; margin-bottom: 6px; padding: 8px 12px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; cursor: pointer; text-align: left; transition: all 0.2s; color: var(--text-secondary); }
  .ng-action-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); background: var(--accent-purple-dim); }

  .docs-view-body { flex: 1; display: flex; overflow: hidden; }
  .docs-list { width: 420px; border-right: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; }
  .docs-filters { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 6px; flex-wrap: wrap; background: var(--bg-secondary); position: sticky; top: 0; z-index: 2; }
  .doc-filter-btn { padding: 4px 10px; border: 1px solid var(--border); border-radius: 2px; background: none; color: var(--text-secondary); font-family: 'IBM Plex Mono', monospace; font-size: 10px; cursor: pointer; transition: all 0.2s; }
  .doc-filter-btn:hover, .doc-filter-btn.active { border-color: var(--accent-red); color: var(--accent-red); background: var(--accent-red-dim); }
  .doc-filter-btn.doc-signal-btn:hover, .doc-filter-btn.doc-signal-btn.active { border-color: #2a9d8f; color: #2a9d8f; background: rgba(42,157,143,0.1); }
  .doc-filter-btn.doc-signal-btn[data-signal="C"]:hover, .doc-filter-btn.doc-signal-btn[data-signal="C"].active { border-color: #e63946; color: #e63946; background: rgba(230,57,70,0.1); }
  .doc-filter-btn.doc-signal-btn[data-signal="K"]:hover, .doc-filter-btn.doc-signal-btn[data-signal="K"].active { border-color: #f1a208; color: #f1a208; background: rgba(241,162,8,0.1); }
  .doc-filter-btn.doc-signal-btn[data-signal="N"]:hover, .doc-filter-btn.doc-signal-btn[data-signal="N"].active { border-color: #457b9d; color: #457b9d; background: rgba(69,123,157,0.1); }
  .doc-item { padding: 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
  .doc-item:hover { background: var(--bg-tertiary); }
  .doc-item.active { background: var(--accent-red-dim); border-left: 2px solid var(--accent-red); }
  .doc-item-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .doc-item-type { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; }
  .doc-item-type.court { background: var(--accent-red-dim); color: var(--accent-red); }
  .doc-item-type.email { background: var(--accent-blue-dim); color: var(--accent-blue); }
  .doc-item-type.fbi { background: var(--accent-gold-dim); color: var(--accent-gold); }
  .doc-item-type.deposition { background: var(--accent-purple-dim); color: var(--accent-purple); }
  .doc-item-type.flight { background: var(--accent-purple-dim); color: var(--accent-purple); }
  .doc-item-type.financial { background: var(--accent-green-dim); color: var(--accent-green); }
  .doc-item-date { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .doc-item-title { font-family: 'Source Serif 4', serif; font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
  .doc-item-excerpt { font-size: 12px; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .doc-item-excerpt mark { background: var(--accent-gold-dim); color: var(--accent-gold); padding: 0 2px; border-radius: 1px; }
  .doc-item-entities { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
  .doc-entity-chip { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 500; padding: 2px 6px; border-radius: 2px; border: 1px solid var(--border); color: var(--text-secondary); }

  .doc-viewer { flex: 1; overflow-y: auto; background: var(--bg-secondary); }
  .doc-viewer-header { padding: 24px 28px 16px; border-bottom: 1px solid var(--border); }
  .doc-viewer-header h3 { font-family: 'Source Serif 4', serif; font-size: 20px; font-weight: 600; margin-bottom: 4px; }
  .doc-viewer-meta { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-tertiary); display: flex; gap: 16px; }
  .doc-viewer-body { padding: 28px; }
  .doc-viewer-body p { font-family: 'Source Serif 4', serif; font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }
  .eh { background: var(--accent-red-dim); color: var(--accent-red); padding: 1px 4px; border-radius: 2px; cursor: pointer; font-weight: 500; }
  .eh:hover { background: rgba(230,57,70,0.3); }
  .eh.loc { background: var(--accent-blue-dim); color: var(--accent-blue); }
  .eh.org { background: var(--accent-gold-dim); color: var(--accent-gold); }
  .eh.dt { background: var(--accent-green-dim); color: var(--accent-green); }
  /* ═══ DOCUMENT INTELLIGENCE BRIEFING ═══ */
  .doc-intel-panel { border-bottom: 1px solid var(--border); background: var(--bg-primary); position: relative; overflow: hidden; }
  .doc-intel-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
  .doc-intel-panel.signal-C::before { background: linear-gradient(90deg, #e63946, #e63946 60%, transparent); }
  .doc-intel-panel.signal-K::before { background: linear-gradient(90deg, #f1a208, #f1a208 60%, transparent); }
  .doc-intel-panel.signal-N::before { background: linear-gradient(90deg, #457b9d, #457b9d 60%, transparent); }
  .doc-intel-panel.signal-R::before { background: linear-gradient(90deg, var(--border-accent), var(--border-accent) 40%, transparent); }
  .doc-intel-panel.signal-P::before { background: linear-gradient(90deg, var(--border), var(--border) 30%, transparent); }

  .doc-intel-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px 0; gap: 16px; }

  .doc-intel-signal { display: flex; align-items: center; gap: 8px; }
  .doc-intel-signal-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; animation: pulse 2s ease-in-out infinite; }
  .doc-intel-signal-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
  .doc-intel-signal-score { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 2px 7px; border-radius: 2px; font-weight: 600; }
  .doc-intel-signal-reason { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); font-style: italic; }

  .doc-intel-panel.signal-C .doc-intel-signal-dot { background: #e63946; box-shadow: 0 0 8px rgba(230,57,70,0.5); }
  .doc-intel-panel.signal-C .doc-intel-signal-label { color: #e63946; }
  .doc-intel-panel.signal-C .doc-intel-signal-score { background: rgba(230,57,70,0.15); color: #e63946; }
  .doc-intel-panel.signal-K .doc-intel-signal-dot { background: #f1a208; box-shadow: 0 0 8px rgba(241,162,8,0.5); }
  .doc-intel-panel.signal-K .doc-intel-signal-label { color: #f1a208; }
  .doc-intel-panel.signal-K .doc-intel-signal-score { background: rgba(241,162,8,0.15); color: #f1a208; }
  .doc-intel-panel.signal-N .doc-intel-signal-dot { background: #457b9d; box-shadow: 0 0 8px rgba(69,123,157,0.4); }
  .doc-intel-panel.signal-N .doc-intel-signal-label { color: #457b9d; }
  .doc-intel-panel.signal-N .doc-intel-signal-score { background: rgba(69,123,157,0.15); color: #457b9d; }
  .doc-intel-panel.signal-R .doc-intel-signal-dot { background: var(--text-tertiary); }
  .doc-intel-panel.signal-R .doc-intel-signal-label { color: var(--text-secondary); }
  .doc-intel-panel.signal-R .doc-intel-signal-score { background: var(--bg-tertiary); color: var(--text-secondary); }
  .doc-intel-panel.signal-P .doc-intel-signal-dot { background: var(--border-accent); animation: none; }
  .doc-intel-panel.signal-P .doc-intel-signal-label { color: var(--text-tertiary); }
  .doc-intel-panel.signal-P .doc-intel-signal-score { background: var(--bg-tertiary); color: var(--text-tertiary); }

  .doc-intel-metrics { display: flex; gap: 16px; }
  .doc-intel-metric { text-align: center; min-width: 48px; }
  .doc-intel-metric-v { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 700; color: var(--text-primary); }
  .doc-intel-metric-l { font-family: 'IBM Plex Mono', monospace; font-size: 8px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-tertiary); }

  .doc-intel-summary-wrap { padding: 12px 28px; }
  .doc-intel-summary-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
  .doc-intel-summary-label::before { content: ''; width: 16px; height: 1px; background: var(--accent-red); }
  .doc-intel-summary { font-family: 'Source Serif 4', serif; font-size: 14px; line-height: 1.65; color: var(--text-secondary); max-height: 4.95em; overflow: hidden; position: relative; }

  .doc-intel-entities-wrap { padding: 0 28px 14px; }
  .doc-intel-entities-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
  .doc-intel-entities { display: flex; flex-wrap: wrap; gap: 4px; }
  .doc-intel-entity { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; padding: 3px 8px; border-radius: 2px; cursor: pointer; transition: all 0.15s; border: 1px solid transparent; }
  .doc-intel-entity:hover { filter: brightness(1.3); }
  .doc-intel-entity.person { background: var(--accent-red-dim); color: var(--accent-red); border-color: rgba(230,57,70,0.15); }
  .doc-intel-entity.location { background: var(--accent-blue-dim); color: var(--accent-blue); border-color: rgba(74,158,255,0.15); }
  .doc-intel-entity.org { background: var(--accent-gold-dim); color: var(--accent-gold); border-color: rgba(212,168,83,0.15); }
  .doc-intel-entity.unknown { background: var(--bg-tertiary); color: var(--text-secondary); border-color: var(--border); }

  /* ═══ KEY FINDINGS ═══ */
  .doc-intel-findings-wrap { padding: 0 28px 14px; }
  .doc-intel-findings-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
  .doc-intel-findings-label::before { content: ''; width: 16px; height: 1px; background: #f1a208; }
  .doc-intel-findings { list-style: none; padding: 0; margin: 0; }
  .doc-intel-finding { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
  .doc-intel-finding::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #f1a208; flex-shrink: 0; margin-top: 6px; }
  /* ═══ DOCUMENT SORT CONTROLS ═══ */
  .doc-sort-controls { display: flex; align-items: center; gap: 4px; padding: 0 8px 6px; }
  .doc-sort-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-tertiary); margin-right: 4px; }
  .doc-sort-btn { padding: 3px 8px; border: 1px solid var(--border); border-radius: 2px; background: none; color: var(--text-tertiary); font-family: 'IBM Plex Mono', monospace; font-size: 9px; cursor: pointer; transition: all 0.15s; }
  .doc-sort-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
  .doc-sort-btn.active { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(69,123,157,0.1); }
  /* ═══ RELATED DOCUMENTS ═══ */
  .doc-related-item { padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: color 0.15s; }
  .doc-related-item:hover { color: var(--accent-red); }
  .doc-related-item:last-child { border-bottom: none; }
  .doc-related-title { font-size: 11px; line-height: 1.4; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .doc-related-meta { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); margin-top: 2px; }
  .doc-related-match { font-family: 'IBM Plex Mono', monospace; font-size: 8px; padding: 1px 4px; border-radius: 2px; background: rgba(230,57,70,0.1); color: var(--accent-red); }
  .doc-viewer-sidebar { width: 260px; border-left: 1px solid var(--border); overflow-y: auto; background: var(--bg-primary); padding: 20px; flex-shrink: 0; }
  .doc-sidebar-title { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 10px; }
  .doc-sidebar-entity { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 12px; color: var(--text-secondary); cursor: pointer; }
  .doc-sidebar-entity:hover { color: var(--text-primary); }
  .doc-sidebar-entity .dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
  .doc-source-link { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-secondary); cursor: pointer; margin-bottom: 6px; transition: border-color 0.15s, color 0.15s, background 0.15s; user-select: none; }
  .doc-source-link:hover { border-color: var(--accent-red); color: var(--accent-red); background: rgba(230,57,70,0.05); }
  .doc-source-link:active { transform: scale(0.98); }
  .doc-sidebar-section { margin-bottom: 24px; }

  /* ═══ FLIGHT EXPLORER — 3-panel layout ═══ */
  /* FLIGHTS - Map-First Layout */
  .flights-view-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

  /* Flight Filter Panel — Multi-row Layout */
  .fl-filter-panel { background: var(--bg-secondary); border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .fl-filter-row { display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
  .fl-filter-row-hero { padding: 14px 20px 8px; gap: 12px; }
  .fl-filter-row-secondary { padding: 6px 20px 10px; gap: 12px; border-top: 1px solid rgba(42,42,50,0.3); }
  .fl-filter-sep { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }
  .fl-filter-group { display: flex; flex-direction: column; gap: 4px; }
  .fl-filter-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-tertiary); }

  .fl-ac-chips { display: flex; gap: 5px; flex-wrap: wrap; }
  .fl-ac-chip { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 5px; }
  .fl-ac-chip:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .fl-ac-chip.active { background: var(--accent-purple-dim); border-color: var(--accent-purple); color: var(--accent-purple); }

  .fl-year-inputs { display: flex; align-items: center; gap: 8px; }

  /* Notable Passengers Bar */
  .fl-notable-bar { display: flex; align-items: center; gap: 5px; padding: 4px 20px 8px; flex-wrap: wrap; }
  .fl-notable-btn { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 4px 10px; border-radius: 3px; border: 1px solid rgba(230,57,70,0.2); background: rgba(230,57,70,0.05); color: var(--accent-red); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
  .fl-notable-btn:hover { background: rgba(230,57,70,0.15); border-color: var(--accent-red); }
  .fl-notable-btn.active { background: var(--accent-red); color: #fff; border-color: var(--accent-red); }
  .fl-notable-ct { font-size: 8px; opacity: 0.6; margin-left: 3px; }
  .fl-notable-btn.active .fl-notable-ct { opacity: 0.85; }

  .fl-filter-group-search { position: relative; flex: 1; min-width: 280px; }
  .fl-pax-search-compact { width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px; padding: 8px 14px; font-size: 13px; color: var(--text-primary); outline: none; font-family: 'DM Sans', sans-serif; transition: border-color 0.15s, box-shadow 0.15s; }
  .fl-pax-search-compact::placeholder { color: var(--text-tertiary); font-size: 12px; }
  .fl-pax-search-compact:focus { border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(157,78,221,0.1); }
  .fl-pax-search-compact:focus + div + .fl-pax-dropdown { display: block; }

  .fl-pax-dropdown { display: none; position: absolute; top: 100%; left: 0; width: 100%; min-width: 340px; margin-top: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); z-index: 100; max-height: 420px; overflow-y: auto; }
  .fl-pax-dropdown:hover { display: block; }
  .fl-pax-dropdown-header { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .fl-pax-dropdown-title { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-tertiary); }
  .fl-pax-dropdown .fl-pax-list { max-height: none; padding: 6px 14px; }

  .fl-filter-stats { margin-left: auto; flex-shrink: 0; }
  .fl-stats-toggle { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; padding: 5px 10px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.15s; }
  .fl-stats-toggle:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .fl-stats-toggle.active { background: var(--accent-purple-dim); border-color: var(--accent-purple); color: var(--accent-purple); }
  .fl-stats-toggle-arrow { font-size: 8px; transition: transform 0.2s; }
  .fl-stats-toggle.active .fl-stats-toggle-arrow { transform: rotate(180deg); }

  .fl-stats-panel { display: none; position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100; width: 280px; padding: 12px; }
  .fl-stats-panel.active { display: block; }
  .fl-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

  /* Full-Width Map Container */
  .fl-map-container { flex: 1; position: relative; overflow: hidden; background: #0a0a12; min-height: 280px; }
  .fl-map-full { width: 100%; height: 100%; z-index: 1; }

  .fl-map-loading { position: absolute; inset: 0; background: rgba(10,10,12,0.85); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1000; }
  .fl-map-loading.hidden { display: none; }
  .fl-loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent-purple); border-radius: 50%; animation: spin 0.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .fl-loading-text { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-secondary); margin-top: 12px; }

  /* Collapsible Flight Table */
  .fl-table-container { flex-shrink: 0; background: var(--bg-secondary); border-top: 1px solid var(--border); max-height: 45vh; display: flex; flex-direction: column; transition: max-height 0.3s; }
  .fl-table-container.collapsed { max-height: 44px; }

  .fl-table-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
  .fl-table-header:hover { background: var(--bg-tertiary); }

  .fl-table-title { display: flex; align-items: center; gap: 10px; }
  .fl-table-toggle-icon { font-size: 10px; color: var(--text-tertiary); transition: transform 0.2s; }
  .fl-table-container.collapsed .fl-table-toggle-icon { transform: rotate(-90deg); }
  .fl-table-title h4 { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-secondary); }

  .fl-table-actions { display: flex; gap: 8px; }
  .fl-table-btn { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; padding: 5px 10px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
  .fl-table-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }

  .fl-table-body { flex: 1; overflow-y: auto; }
  .fl-table-container.collapsed .fl-table-body { display: none; }

  .fl-table { width: 100%; border-collapse: collapse; }
  .fl-table th { background: var(--bg-tertiary); padding: 8px 12px; text-align: left; font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-tertiary); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
  .fl-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-primary); vertical-align: top; }
  .fl-table tbody tr { transition: background 0.15s; cursor: pointer; }
  .fl-table tbody tr:hover { background: var(--bg-tertiary); }
  .fl-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.01); }
  .fl-table tbody tr.hl { background: rgba(230,57,70,0.05); border-left: 3px solid var(--accent-red); }
  .fl-table tbody tr.hl:hover { background: rgba(230,57,70,0.08); }

  .fl-table-date { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-secondary); white-space: nowrap; }
  .fl-date-main { font-weight: 500; }
  .fl-date-dow { font-size: 9px; color: var(--text-tertiary); margin-top: 2px; }

  .fl-table-route { font-family: 'IBM Plex Mono', monospace; font-size: 11px; }
  .fl-route-main { display: flex; align-items: center; gap: 2px; font-weight: 600; }
  .fl-route-code { color: var(--text-primary); }
  .fl-table-route-arrow { color: var(--accent-purple); margin: 0 4px; }
  .fl-route-cities { font-size: 9px; color: var(--text-tertiary); margin-top: 3px; font-weight: 400; }
  .fl-route-dist { font-size: 8px; color: var(--text-tertiary); margin-top: 2px; font-weight: 400; opacity: 0.7; }
  .fl-route-intl { font-size: 7px; padding: 1px 4px; border-radius: 2px; background: rgba(230,57,70,0.1); color: var(--accent-red); font-weight: 700; letter-spacing: 0.5px; margin-left: 6px; }
  .fl-route-dom { font-size: 7px; padding: 1px 4px; border-radius: 2px; background: rgba(69,123,157,0.1); color: var(--accent-blue); font-weight: 600; letter-spacing: 0.5px; margin-left: 6px; }

  .fl-table-ac { font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
  .fl-ac-main { font-weight: 600; color: var(--text-primary); }
  .fl-ac-tail { font-size: 9px; color: var(--text-tertiary); margin-top: 1px; }
  .fl-ac-type { font-size: 8px; color: var(--text-tertiary); margin-top: 2px; opacity: 0.7; }

  .fl-table-pax-summary { font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
  .fl-pax-count { font-size: 14px; font-weight: 700; color: var(--text-primary); display: block; }
  .fl-pax-vip-count { font-size: 8px; padding: 1px 5px; border-radius: 2px; background: var(--accent-red-dim); color: var(--accent-red); font-weight: 600; display: inline-block; margin-top: 3px; }
  .fl-pax-reg-count { font-size: 8px; color: var(--text-tertiary); display: inline-block; margin-top: 3px; margin-left: 4px; }

  .fl-table-pax { display: flex; flex-wrap: wrap; gap: 4px; min-width: 200px; max-width: 600px; }

  .fl-table-details { text-align: center; width: 36px; }
  .fl-detail-btn { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; width: 26px; height: 26px; font-size: 12px; color: var(--text-tertiary); cursor: pointer; transition: all 0.15s; line-height: 1; }
  .fl-detail-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .fl-detail-btn.active { background: var(--accent-purple-dim); border-color: var(--accent-purple); color: var(--accent-purple); }

  /* Expandable detail row */
  .fl-detail-row { background: var(--bg-secondary) !important; cursor: default !important; }
  .fl-detail-row:hover { background: var(--bg-secondary) !important; }
  .fl-detail-row td { padding: 0 !important; border-bottom: 2px solid var(--accent-purple) !important; }
  .fl-detail-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 16px 20px; border-top: 1px solid var(--border); }
  .fl-detail-section { }
  .fl-detail-section-full { grid-column: 1 / -1; }
  .fl-detail-label { font-family: 'IBM Plex Mono', monospace; font-size: 8px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 4px; }
  .fl-detail-val { font-size: 12px; font-weight: 500; color: var(--text-primary); }
  .fl-detail-sub { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }

  .fl-detail-pax { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
  .fl-detail-pax-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 3px; font-size: 11px; transition: background 0.1s; }
  .fl-detail-pax-row:hover { background: var(--bg-tertiary); }
  .fl-detail-pax-row.notable { background: rgba(230,57,70,0.04); }
  .fl-detail-pax-row.notable:hover { background: rgba(230,57,70,0.08); }
  .fl-detail-pax-num { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); min-width: 20px; }
  .fl-detail-pax-name { color: var(--text-primary); cursor: pointer; font-weight: 500; }
  .fl-detail-pax-name:hover { color: var(--accent-red); text-decoration: underline; }
  .fl-detail-pax-badge { font-family: 'IBM Plex Mono', monospace; font-size: 7px; padding: 1px 5px; border-radius: 2px; background: var(--accent-red-dim); color: var(--accent-red); font-weight: 700; letter-spacing: 0.5px; }
  .fl-detail-pax-flights { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); margin-left: auto; }

  /* Legacy styles (hidden when using new layout) */
  .fl-left { display: none; }
  .fl-center { display: none; }
  .fl-right { display: none; }
  .fl-right-header { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
  .fl-right-header h4 { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); }
  .fl-right-header .fl-showing { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--accent-purple); }
  .fl-list { flex: 1; overflow-y: auto; }
  /* Left panel sections */
  .fl-section { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .fl-section-title { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
  .fl-section-title .fl-cnt { font-weight: 400; color: var(--accent-purple); }
  /* Aircraft chips */
  .fl-ac-list { display: flex; flex-direction: column; gap: 3px; }
  .fl-ac-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; font-size: 11px; }
  .fl-ac-item:hover { background: var(--bg-tertiary); }
  .fl-ac-item.active { background: rgba(180,122,255,0.06); border-color: rgba(180,122,255,0.2); }
  .fl-ac-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .fl-ac-name { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; }
  .fl-ac-type { font-size: 9px; color: var(--text-tertiary); }
  .fl-ac-cnt { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); }
  /* Year range */
  .fl-year-row { display: flex; align-items: center; gap: 6px; }
  .fl-year-input { width: 62px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px; padding: 5px 8px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-primary); text-align: center; outline: none; }
  .fl-year-input:focus { border-color: var(--accent-purple); }
  .fl-year-bars { display: flex; gap: 1px; height: 28px; align-items: flex-end; margin-top: 6px; }
  .fl-ybar { flex: 1; background: var(--accent-purple); opacity: 0.25; border-radius: 1px 1px 0 0; cursor: pointer; min-width: 2px; transition: opacity 0.2s; }
  .fl-ybar.in-range { opacity: 0.55; }
  .fl-ybar:hover { opacity: 0.8; }
  /* Dest filter */
  .fl-dest-chips { display: flex; flex-wrap: wrap; gap: 5px; }
  .fl-dest-chip { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 4px 9px; border-radius: 4px; background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
  .fl-dest-chip:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .fl-dest-chip.active { background: var(--accent-purple-dim); border-color: var(--accent-purple); color: var(--accent-purple); }
  /* Pax filter */
  .fl-pax-search { width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; padding: 4px 8px; font-size: 11px; color: var(--text-primary); outline: none; margin-bottom: 6px; font-family: 'DM Sans', sans-serif; }
  .fl-pax-search::placeholder { color: var(--text-tertiary); }
  .fl-pax-search:focus { border-color: var(--accent-purple); }
  .fl-pax-list { max-height: 240px; overflow-y: auto; }
  .fl-pax-item { display: flex; align-items: center; gap: 6px; padding: 5px 2px; cursor: pointer; font-size: 12px; color: var(--text-secondary); transition: all 0.15s; border-radius: 3px; white-space: nowrap; }
  .fl-pax-item:hover { color: var(--text-primary); background: var(--bg-tertiary); }
  .fl-pax-item.active { color: var(--accent-red); font-weight: 600; background: var(--accent-red-dim); }
  .fl-pax-item .fl-pax-n { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); margin-left: auto; padding-left: 12px; }
  .fl-pax-item.active .fl-pax-n { color: var(--accent-red); }
  .fl-pax-notable { color: var(--accent-red); }
  /* Stats */
  .fl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .fl-stat { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; padding: 6px 8px; }
  .fl-stat .v { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 700; display: block; }
  .fl-stat .l { font-size: 8px; color: var(--text-tertiary); margin-top: 1px; }
  /* Top routes */
  .fl-route-item { display: flex; align-items: center; gap: 5px; padding: 4px 0; }
  .fl-route-codes { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; min-width: 75px; }
  .fl-route-bar { flex: 1; height: 3px; background: var(--bg-primary); border-radius: 2px; overflow: hidden; }
  .fl-route-fill { height: 100%; background: var(--accent-purple); border-radius: 2px; }
  .fl-route-n { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); }
  /* Map overlays */
  .fl-map-legend { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; flex-wrap: wrap; z-index: 10; }
  .fl-map-chip { background: rgba(10,10,12,0.9); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 3px; padding: 4px 8px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; display: flex; align-items: center; gap: 4px; }
  .fl-map-chip .d { width: 5px; height: 5px; border-radius: 50%; }
  .fl-map-ctrls { position: absolute; bottom: 10px; left: 10px; display: flex; gap: 5px; z-index: 10; }
  .fl-map-btn { background: rgba(10,10,12,0.9); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 3px; padding: 4px 8px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
  .fl-map-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .fl-map-btn.active { border-color: var(--accent-purple); color: var(--accent-purple); background: rgba(180,122,255,0.08); }
  .fl-tooltip { position: absolute; display: none; background: rgba(10,10,12,0.97); border: 1px solid var(--accent-purple); border-radius: 4px; padding: 10px 14px; pointer-events: none; z-index: 100; max-width: 320px; min-width: 180px; backdrop-filter: blur(8px); }
  .fl-tooltip h5 { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--accent-purple); margin-bottom: 3px; font-weight: 700; }
  .fl-tooltip p { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
  /* Flight list items */
  .fl-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
  .fl-item:hover { background: var(--bg-tertiary); }
  .fl-item.hl { background: rgba(230,57,70,0.05); border-left: 3px solid var(--accent-red); }
  .fl-item.expanded { background: var(--bg-secondary); }
  .fl-item-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
  .fl-item-route { display: flex; align-items: center; gap: 5px; }
  .fl-item-code { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 700; }
  .fl-item-arrow { color: var(--accent-purple); font-size: 11px; }
  .fl-item-ac { font-family: 'IBM Plex Mono', monospace; font-size: 9px; padding: 2px 6px; border-radius: 2px; font-weight: 600; }
  .fl-item-ac.b727 { background: var(--accent-red-dim); color: var(--accent-red); }
  .fl-item-ac.g1159 { background: var(--accent-blue-dim); color: var(--accent-blue); }
  .fl-item-ac.hs125 { background: var(--accent-gold-dim); color: var(--accent-gold); }
  .fl-item-ac.g550 { background: rgba(255,140,66,0.12); color: #ff8c42; }
  .fl-item-mid { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .fl-item-date { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .fl-item-cities { font-size: 10px; color: var(--text-secondary); }
  .fl-item-pax { display: flex; flex-wrap: wrap; gap: 3px; }
  .fl-pax-chip { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 3px 7px; border-radius: 3px; background: rgba(180,122,255,0.05); color: var(--text-secondary); border: 1px solid rgba(180,122,255,0.1); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
  .fl-pax-chip:hover { background: rgba(180,122,255,0.15); color: var(--accent-purple); }
  .fl-pax-chip.notable { background: var(--accent-red-dim); color: var(--accent-red); border-color: rgba(230,57,70,0.2); font-weight: 600; }
  .fl-pax-chip.notable:hover { background: rgba(230,57,70,0.2); }
  .fl-pax-chip.unknown { background: var(--bg-tertiary); color: var(--text-tertiary); border-color: var(--border); font-style: italic; }
  .fl-item-note { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--accent-gold); margin-top: 4px; }
  .fl-item-expand { display: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
  .fl-item.expanded .fl-item-expand { display: block; }
  .fl-item-detail-row { display: flex; gap: 16px; margin-bottom: 4px; }
  .fl-item-detail-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); min-width: 65px; text-transform: uppercase; letter-spacing: 0.5px; }
  .fl-item-detail-val { font-size: 11px; color: var(--text-primary); }
  /* Bottom timeline */
  .fl-timeline { height: 48px; border-top: 1px solid var(--border); background: var(--bg-secondary); display: flex; align-items: center; padding: 0 14px; gap: 10px; flex-shrink: 0; }
  .fl-tl-label { font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: var(--text-tertiary); letter-spacing: 1px; min-width: 50px; }
  .fl-tl-track { flex: 1; height: 24px; display: flex; align-items: flex-end; gap: 1px; }
  .fl-tl-col { flex: 1; background: var(--accent-purple); opacity: 0.12; border-radius: 1px 1px 0 0; cursor: pointer; position: relative; transition: opacity 0.2s; }
  .fl-tl-col:hover { opacity: 0.5; }
  .fl-tl-col::after { content: attr(data-year); position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); font-family: 'IBM Plex Mono', monospace; font-size: 6px; color: var(--text-tertiary); display: none; }
  .fl-tl-col:nth-child(3n+1)::after { display: block; }
  @media(max-width:1200px) { .fl-left { width: 220px; } .fl-right { width: 320px; } }
  @media(max-width:900px) { .fl-left { display: none; } .fl-right { width: 280px; } }

  /* ═══ ENTITY PROFILE DRAWER ═══ */
  .ep-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .ep-backdrop.open { opacity: 1; pointer-events: auto; }
  .ep-drawer { position: fixed; top: 0; right: 0; width: 420px; height: 100vh; background: var(--bg-secondary); border-left: 1px solid var(--border); z-index: 901; transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(0,0,0,0.4); }
  .ep-drawer.open { transform: translateX(0); }
  .ep-header { padding: 20px 24px; border-bottom: 1px solid var(--border); position: relative; flex-shrink: 0; background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%); }
  .ep-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 3px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-tertiary); font-size: 12px; transition: all 0.2s; }
  .ep-close:hover { border-color: var(--accent-red); color: var(--accent-red); }
  .ep-type-badge { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; display: inline-block; margin-bottom: 8px; }
  .ep-type-badge.person { background: var(--accent-red-dim); color: var(--accent-red); }
  .ep-type-badge.location { background: var(--accent-blue-dim); color: var(--accent-blue); }
  .ep-type-badge.org { background: var(--accent-gold-dim); color: var(--accent-gold); }
  .ep-name { font-family: 'Source Serif 4', serif; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
  .ep-role { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
  .ep-body { flex: 1; overflow-y: auto; padding: 0; }
  .ep-stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
  .ep-stat { background: var(--bg-secondary); padding: 12px 8px; text-align: center; }
  .ep-stat-v { font-family: 'IBM Plex Mono', monospace; font-size: 18px; font-weight: 700; display: block; color: var(--accent-purple); }
  .ep-stat-l { font-size: 9px; color: var(--text-tertiary); letter-spacing: 0.5px; }
  .ep-section { padding: 16px 24px; border-bottom: 1px solid var(--border); }
  .ep-section-title { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; }
  .ep-bio { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
  .ep-goto-btn { display: block; width: 100%; margin-top: 10px; padding: 8px 12px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent-purple); cursor: pointer; text-align: left; transition: all 0.2s; }
  .ep-goto-btn:hover { border-color: var(--accent-purple); background: var(--accent-purple-dim); }
  .ep-flight-item { padding: 6px 0; border-bottom: 1px solid rgba(42,42,50,0.3); display: flex; align-items: center; gap: 8px; font-size: 11px; }
  .ep-flight-route { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 12px; }
  .ep-flight-date { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .ep-flight-note { font-size: 9px; color: var(--accent-gold); }
  .ep-doc-item { padding: 8px 0; border-bottom: 1px solid rgba(42,42,50,0.3); cursor: pointer; transition: color 0.15s; }
  .ep-doc-item:hover { color: var(--accent-red); }
  .ep-doc-item-type { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--accent-red); margin-right: 6px; }
  .ep-doc-item-title { font-size: 12px; font-weight: 500; }
  .ep-conn-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; transition: color 0.15s; font-size: 12px; color: var(--text-secondary); }
  .ep-conn-item:hover { color: var(--text-primary); }
  .ep-conn-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .ep-conn-strength { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .ep-loc-chip { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 3px 8px; border-radius: 2px; background: var(--accent-blue-dim); color: var(--accent-blue); margin: 2px; border: 1px solid rgba(74,158,255,0.15); }
  /* Make all entity names clickable throughout */
  [data-entity] { cursor: pointer; transition: color 0.15s; }
  [data-entity]:hover { text-decoration: underline; }
  .fl-pax-chip[data-entity]:hover { border-color: var(--accent-red); }
  .doc-entity-chip[data-entity] { cursor: pointer; }
  .doc-entity-chip[data-entity]:hover { background: var(--accent-red-dim); color: var(--accent-red); }
  @media(max-width:600px) { .ep-drawer { width: 100%; } }

  .timeline-view-body { flex: 1; overflow-y: auto; padding: 28px; }
  .timeline-track { position: relative; margin-left: 120px; border-left: 2px solid var(--border); padding-left: 32px; }
  .timeline-event { position: relative; margin-bottom: 32px; }
  .timeline-event::before { content: ''; position: absolute; left: -38px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent-red); background: var(--bg-primary); }
  .timeline-event.major::before { background: var(--accent-red); box-shadow: 0 0 12px rgba(230,57,70,0.4); }
  .timeline-year { position: absolute; left: -152px; top: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; color: var(--text-tertiary); width: 100px; text-align: right; }
  .timeline-event h4 { font-family: 'Source Serif 4', serif; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
  .timeline-event p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; max-width: 640px; }
  .timeline-event-tag { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; margin-top: 6px; }

  .ingestion-view-body { flex: 1; overflow-y: auto; padding: 28px; }
  .ingestion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
  .ingestion-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; padding: 24px; }
  .ingestion-card h4 { font-family: 'Source Serif 4', serif; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
  .ingestion-card-sub { font-size: 12px; color: var(--text-tertiary); margin-bottom: 16px; }
  .ingestion-progress-bar { width: 100%; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
  .ingestion-progress-fill { height: 100%; border-radius: 3px; transition: width 1.5s ease-out; }
  .ingestion-progress-meta { display: flex; justify-content: space-between; margin-top: 6px; }
  .ingestion-progress-meta span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-tertiary); }
  .ingestion-file { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); }
  .ingestion-file-status { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .ingestion-file-status.done { background: var(--accent-green); }
  .ingestion-file-status.processing { background: var(--accent-gold); animation: pulse 1.5s infinite; }
  .ingestion-file-name { font-family: 'IBM Plex Mono', monospace; font-size: 11px; flex: 1; }
  .ingestion-file-size { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }

  .pipeline-live { margin-top: 32px; }
  .pipeline-live h3 { font-family: 'Source Serif 4', serif; font-size: 20px; font-weight: 600; margin-bottom: 20px; }
  .pipeline-flow { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .pipeline-node { flex: 1; padding: 20px; background: var(--bg-secondary); border-right: 1px solid var(--border); position: relative; }
  .pipeline-node:last-child { border-right: none; }
  .pipeline-node-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .pipeline-node-title { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
  .pipeline-node-status { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 2px 6px; border-radius: 2px; }
  .pipeline-node-status.active { background: var(--accent-green-dim); color: var(--accent-green); }
  .pipeline-node-stat { font-family: 'IBM Plex Mono', monospace; font-size: 24px; font-weight: 700; }
  .pipeline-node-label { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
  .pipeline-node-arrow { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); z-index: 2; width: 14px; height: 14px; background: var(--bg-primary); border: 1px solid var(--border-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; color: var(--accent-red); }

  .entity-extraction-live { margin-top: 32px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .entity-extraction-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .entity-extraction-header h4 { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 1px; }
  .extraction-live-badge { display: flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--accent-green); }
  .extraction-live-dot { width: 6px; height: 6px; background: var(--accent-green); border-radius: 50%; animation: pulse 1.5s infinite; }
  .extraction-feed { max-height: 300px; overflow-y: auto; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
  .extraction-line { padding: 6px 20px; border-bottom: 1px solid rgba(42,42,50,0.3); display: flex; gap: 12px; transition: background 0.3s; }
  .extraction-line.new { background: rgba(230,57,70,0.05); }
  .extraction-time { color: var(--text-tertiary); min-width: 70px; }
  .extraction-action { color: var(--text-secondary); }
  .extraction-entity { color: var(--accent-red); font-weight: 500; }
  .extraction-entity.loc { color: var(--accent-blue); }
  .extraction-entity.org { color: var(--accent-gold); }
  .extraction-entity.doc { color: var(--accent-green); }

  /* ═══ GUIDED TOUR ═══ */
  .tour-overlay { position: fixed; inset: 0; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
  .tour-overlay.active { opacity: 1; pointer-events: auto; }
  .tour-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
  .tour-spotlight { position: absolute; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.7), 0 0 24px 4px rgba(230,57,70,0.25); transition: all 0.4s cubic-bezier(0.4,0,0.2,1); z-index: 1; pointer-events: none; }
  .tour-card { position: absolute; z-index: 2; width: 380px; background: var(--bg-secondary); border: 1px solid var(--border-accent); border-radius: 8px; box-shadow: 0 16px 48px rgba(0,0,0,0.6); transition: all 0.4s cubic-bezier(0.4,0,0.2,1); pointer-events: auto; }
  .tour-card-arrow { position: absolute; width: 12px; height: 12px; background: var(--bg-secondary); border: 1px solid var(--border-accent); transform: rotate(45deg); }
  .tour-card-arrow.top { top: -7px; left: 32px; border-right: none; border-bottom: none; }
  .tour-card-arrow.bottom { bottom: -7px; left: 32px; border-left: none; border-top: none; }
  .tour-card-arrow.left { left: -7px; top: 24px; border-right: none; border-top: none; }
  .tour-card-arrow.right { right: -7px; top: 24px; border-left: none; border-bottom: none; }
  .tour-card-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
  .tour-card-step { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--accent-red); background: var(--accent-red-dim); padding: 3px 8px; border-radius: 2px; }
  .tour-card-title { font-family: 'Source Serif 4', serif; font-size: 16px; font-weight: 600; }
  .tour-card-body { padding: 16px 20px; }
  .tour-card-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 10px; }
  .tour-card-body p:last-child { margin-bottom: 0; }
  .tour-card-tip { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: var(--bg-tertiary); border-radius: 4px; margin-top: 8px; }
  .tour-card-tip-icon { font-size: 14px; flex-shrink: 0; }
  .tour-card-tip span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
  .tour-card-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .tour-progress { display: flex; gap: 4px; }
  .tour-progress-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-accent); transition: all 0.3s; }
  .tour-progress-dot.active { background: var(--accent-red); }
  .tour-progress-dot.done { background: var(--accent-green); }
  .tour-card-actions { display: flex; gap: 8px; }
  .tour-btn { padding: 7px 16px; border-radius: 3px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; letter-spacing: 0.5px; }
  .tour-btn-skip { background: none; border: 1px solid var(--border); color: var(--text-tertiary); }
  .tour-btn-skip:hover { border-color: var(--text-secondary); color: var(--text-secondary); }
  .tour-btn-back { background: none; border: 1px solid var(--border); color: var(--text-secondary); }
  .tour-btn-back:hover { background: var(--bg-tertiary); color: var(--text-primary); }
  .tour-btn-next { background: var(--accent-red); border: 1px solid var(--accent-red); color: #fff; }
  .tour-btn-next:hover { background: #cf2f3c; }
  .tour-btn-done { background: var(--accent-green); border: 1px solid var(--accent-green); color: #0a0a0c; font-weight: 700; }
  .tour-btn-done:hover { background: #25b88e; }
  /* Welcome screen (full-screen card, no spotlight) */
  .tour-welcome { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
  .tour-welcome.active { opacity: 1; pointer-events: auto; }
  .tour-welcome-card { width: 520px; background: var(--bg-secondary); border: 1px solid var(--border-accent); border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,0.5); text-align: center; padding: 48px 40px 36px; position: relative; overflow: hidden; }
  .tour-welcome-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent-red), var(--accent-purple), var(--accent-blue)); }
  .tour-welcome-logo { width: 64px; height: 64px; margin: 0 auto 16px; filter: drop-shadow(0 0 20px rgba(230,57,70,0.3)); }
  .tour-welcome-logo svg { width: 100%; height: 100%; }
  .tour-welcome-brand { font-family: 'IBM Plex Mono', monospace; font-size: 24px; font-weight: 700; letter-spacing: 4px; margin-bottom: 8px; text-shadow: 0 0 40px rgba(230,57,70,0.2); }
  .tour-welcome-brand span { color: var(--accent-red); }
  .tour-welcome-sub { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-red); margin-bottom: 24px; padding: 4px 12px; border: 1px solid rgba(230,57,70,0.3); border-radius: 2px; display: inline-block; background: rgba(230,57,70,0.05); }
  .tour-welcome-card h2 { font-family: 'Source Serif 4', serif; font-size: 28px; font-weight: 600; margin-bottom: 12px; }
  .tour-welcome-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; max-width: 400px; margin: 0 auto 8px; }
  .tour-welcome-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0; text-align: left; }
  .tour-welcome-feat { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-tertiary); border-radius: 4px; border: 1px solid var(--border); }
  .tour-welcome-feat-icon { font-size: 16px; }
  .tour-welcome-feat span { font-size: 12px; font-weight: 500; }
  .tour-welcome-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }
  .tour-welcome-skip { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-tertiary); background: none; border: 1px solid var(--border); padding: 10px 24px; border-radius: 3px; cursor: pointer; transition: all 0.2s; }
  .tour-welcome-skip:hover { border-color: var(--text-secondary); color: var(--text-secondary); }
  .tour-welcome-start { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent-red); border: none; padding: 10px 32px; border-radius: 3px; cursor: pointer; transition: all 0.2s; letter-spacing: 1px; }
  .tour-welcome-start:hover { background: #cf2f3c; transform: translateY(-1px); }
  /* Tour relaunch button */
  .tour-relaunch { position: fixed; bottom: 20px; right: 20px; z-index: 500; background: var(--bg-card); border: 1px solid var(--border-accent); border-radius: 50%; width: 40px; height: 40px; display: none; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); transition: all 0.2s; }
  .tour-relaunch:hover { border-color: var(--accent-red); transform: scale(1.1); box-shadow: 0 4px 24px rgba(230,57,70,0.3); }
  .tour-relaunch.visible { display: flex; }

  @media (max-width: 1100px) {
    .features-grid { grid-template-columns: 1fr; }
    .pipeline-visual, .pipeline-flow { flex-direction: column; }
    .pipeline-stage, .pipeline-node { border-right: none; border-bottom: 1px solid var(--border); }
    .pipeline-arrow, .pipeline-node-arrow { display: none; }
    .hero-stats { flex-direction: column; gap: 24px; }
    .nav-links { display: none; }
    .ingestion-grid { grid-template-columns: 1fr; }
    .tour-card { width: 300px; }
    .tour-welcome-card { width: 90%; padding: 32px 24px; }
    .tour-welcome-features { grid-template-columns: 1fr; }
  }

  /* ═══════════════════════════════════════════════ */
  /* ═══ FEATURE PACK STYLES ═══ */
  /* ═══════════════════════════════════════════════ */

  /* ── Time-Lapse Panel ── */
  .fl-timelapse-btn { color: var(--accent-gold) !important; border-color: rgba(241,162,8,0.3) !important; }
  .fl-timelapse-btn:hover { background: rgba(241,162,8,0.15) !important; }
  .fl-timelapse-panel { display: none; position: absolute; bottom: 44px; left: 0; right: 0; background: rgba(10,10,12,0.92); backdrop-filter: blur(8px); padding: 10px 16px; z-index: 80; border-top: 1px solid var(--accent-gold); }
  .fl-timelapse-panel.active { display: block; }
  .fl-timelapse-info { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
  .fl-timelapse-date { font-family: 'IBM Plex Mono', monospace; font-size: 16px; font-weight: 700; color: var(--accent-gold); }
  .fl-timelapse-cnt { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .fl-timelapse-stop { font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 4px 12px; background: rgba(230,57,70,0.15); border: 1px solid rgba(230,57,70,0.3); border-radius: 3px; color: var(--accent-red); cursor: pointer; margin-left: auto; transition: all 0.15s; }
  .fl-timelapse-stop:hover { background: var(--accent-red); color: #fff; }
  .fl-timelapse-bar { height: 3px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; }
  .fl-timelapse-prog { height: 100%; background: var(--accent-gold); border-radius: 2px; transition: width 0.08s linear; width: 0; }

  /* ── Co-Passenger Matrix ── */
  .fl-matrix-container { background: var(--bg-secondary); border-top: 1px solid var(--border); }
  .fl-matrix-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .fl-matrix-body { padding: 16px; overflow-x: auto; }
  .matrix-wrap { overflow-x: auto; }
  .matrix-table { border-collapse: collapse; font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
  .matrix-table th, .matrix-table td { padding: 6px 8px; text-align: center; border: 1px solid var(--border); min-width: 56px; }
  .matrix-col-header { font-size: 8px; font-weight: 600; letter-spacing: 0.5px; color: var(--text-tertiary); writing-mode: vertical-rl; text-orientation: mixed; padding: 8px 4px !important; max-width: 56px; }
  .matrix-row-header { font-size: 9px; font-weight: 600; color: var(--text-secondary); text-align: right !important; padding-right: 10px !important; white-space: nowrap; }
  .matrix-cell { cursor: default; transition: transform 0.1s; font-size: 10px; font-weight: 600; }
  .matrix-cell:hover { transform: scale(1.15); z-index: 2; box-shadow: 0 0 8px rgba(230,57,70,0.4); }

  /* ── Entity Profile: Flight Analysis ── */
  .ep-analysis { }
  .ep-analysis-header { display: flex; gap: 12px; align-items: center; padding: 8px 0; margin-bottom: 8px; flex-wrap: wrap; }
  .ep-analysis-total { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 700; color: var(--accent-purple); padding: 3px 8px; background: var(--accent-purple-dim); border-radius: 3px; }
  .ep-analysis-range, .ep-analysis-airports { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .ep-analysis-section { margin-bottom: 12px; }
  .ep-analysis-label { font-family: 'IBM Plex Mono', monospace; font-size: 8px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
  .ep-year-chart { display: flex; flex-direction: column; gap: 3px; }
  .ep-year-bar-wrap { display: flex; align-items: center; gap: 6px; }
  .ep-year-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); min-width: 32px; text-align: right; }
  .ep-year-bar { flex: 1; height: 14px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; }
  .ep-year-fill { height: 100%; background: linear-gradient(90deg, var(--accent-purple), var(--accent-red)); border-radius: 2px; transition: width 0.3s ease; }
  .ep-year-count { font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; color: var(--text-secondary); min-width: 16px; }
  .ep-route-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 11px; }
  .ep-route-codes { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; color: var(--text-primary); min-width: 70px; }
  .ep-route-cities { font-size: 10px; color: var(--text-tertiary); flex: 1; }
  .ep-route-count { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; color: var(--accent-purple); }
  .ep-copax-grid { display: flex; flex-wrap: wrap; gap: 4px; }
  .ep-copax-chip { font-family: 'IBM Plex Mono', monospace; font-size: 9px; padding: 3px 8px; border-radius: 3px; background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
  .ep-copax-chip:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .ep-copax-chip.notable { background: var(--accent-red-dim); border-color: rgba(230,57,70,0.2); color: var(--accent-red); }
  .ep-copax-chip.notable:hover { border-color: var(--accent-red); }
  .ep-copax-chip em { font-style: normal; opacity: 0.6; margin-left: 2px; }
  .ep-aircraft-chip { font-family: 'IBM Plex Mono', monospace; font-size: 9px; padding: 2px 6px; background: var(--bg-tertiary); border-radius: 2px; color: var(--text-tertiary); }

  /* ── Entity Profile: Personal Timeline ── */
  .ep-timeline { border-left: 2px solid var(--border); padding-left: 16px; margin-left: 6px; }
  .ep-tl-event { position: relative; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.03); }
  .ep-tl-event:last-child { border-bottom: none; margin-bottom: 0; }
  .ep-tl-dot { position: absolute; left: -21px; top: 4px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-primary); }
  .ep-tl-event.flight .ep-tl-dot { border-color: var(--accent-purple); }
  .ep-tl-event.event .ep-tl-dot { border-color: var(--accent-red); background: var(--accent-red); }
  .ep-tl-date { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); margin-bottom: 2px; }
  .ep-tl-text { font-size: 11px; color: var(--text-primary); font-weight: 500; }
  .ep-tl-detail { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }

  /* ── Entity Profile: Export/Share Buttons ── */
  .ep-section-actions { display: flex; gap: 8px; padding: 16px 24px; }
  .ep-export-btn, .ep-share-btn { flex: 1; font-family: 'IBM Plex Mono', monospace; font-size: 10px; padding: 10px 12px; border-radius: 3px; cursor: pointer; transition: all 0.2s; text-align: center; }
  .ep-export-btn { background: var(--accent-red-dim); border: 1px solid rgba(230,57,70,0.2); color: var(--accent-red); }
  .ep-export-btn:hover { background: var(--accent-red); color: #fff; }
  .ep-share-btn { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary); }
  .ep-share-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }

  /* ── Timeline Enhancement ── */
  .tl-controls { display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
  .tl-search { flex: 1; max-width: 400px; padding: 7px 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); outline: none; }
  .tl-search:focus { border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(157,78,221,0.1); }
  .tl-search::placeholder { color: var(--text-tertiary); }
  .tl-stats { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary); }
  .tl-decade { margin-bottom: 32px; }
  .tl-decade-label { font-family: 'IBM Plex Mono', monospace; font-size: 24px; font-weight: 700; color: var(--accent-red); opacity: 0.3; margin-bottom: 16px; margin-left: 0; letter-spacing: 2px; }

  /* ── Keyboard Shortcut Hints ── */
  .sidebar-kb-hints { padding: 10px 16px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary); line-height: 2; opacity: 0.5; border-top: 1px solid var(--border); }
  .sidebar-kb-hints span { display: inline-block; padding: 1px 5px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 2px; font-size: 8px; font-weight: 600; margin-right: 2px; vertical-align: middle; }

  /* Old mobile responsive rules moved to comprehensive section at end of file */

  /* ═══ DOCUMENT FORMATTING ═══ */
  .doc-page-header {
    font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-tertiary);
    padding: 8px 12px; margin-bottom: 16px; border-left: 2px solid var(--border);
    background: var(--bg-primary); border-radius: 0 4px 4px 0; letter-spacing: 0.3px;
  }
  .doc-page-footer {
    font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary);
    text-align: right; padding: 8px 0; margin-top: 20px; border-top: 1px solid var(--border);
    letter-spacing: 1px; opacity: 0.6;
  }
  .doc-section-heading {
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700;
    color: var(--text-primary); margin: 28px 0 12px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border); letter-spacing: 0.5px; text-transform: uppercase;
  }
  .doc-footnote {
    font-family: 'IBM Plex Mono', monospace; font-size: 11px; line-height: 1.6;
    color: var(--text-tertiary); padding: 8px 12px; margin: 12px 0;
    border-left: 2px solid rgba(230,57,70,0.3); background: rgba(230,57,70,0.03);
    border-radius: 0 4px 4px 0;
  }
  .doc-footnote sup { color: var(--accent-red); font-weight: 600; margin-right: 4px; }
  .doc-viewer-body h4 + p { margin-top: 0; }
  .doc-viewer-body p + h4 { margin-top: 24px; }
  /* Better paragraph spacing for formatted docs */
  .doc-viewer-body p { text-align: justify; text-indent: 0; }
  .doc-viewer-body p + p { margin-top: 0; }

  /* ═══ INLINE IMAGES IN DOCUMENTS ═══ */
  .doc-inline-img {
    display: block; max-width: 100%; margin: 16px auto; border-radius: 6px;
    border: 1px solid var(--border); background: var(--bg-primary);
  }
  .doc-inline-img:hover { border-color: var(--accent-blue); cursor: zoom-in; }
  .doc-img-lightbox {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000;
    background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center;
    cursor: zoom-out; animation: fadeIn 0.2s ease;
  }
  .doc-img-lightbox img { max-width: 95vw; max-height: 95vh; border-radius: 8px; }

  /* ═══ FLIGHT COVERAGE INDICATOR ═══ */
  .fl-coverage-bar {
    display: flex; align-items: center; gap: 4px; padding: 6px 0; margin-bottom: 4px;
  }
  .fl-coverage-bar .fl-cov-label {
    font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--text-tertiary);
    white-space: nowrap; margin-right: 4px;
  }
  .fl-coverage-bar .fl-cov-years {
    display: flex; gap: 1px; flex: 1; align-items: flex-end; height: 20px;
  }
  .fl-cov-year {
    flex: 1; min-width: 0; border-radius: 1px 1px 0 0; position: relative;
    transition: background 0.2s; cursor: default;
  }
  .fl-cov-year:hover { opacity: 0.8; }
  .fl-cov-year[title]::after {
    content: attr(title); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: var(--text-primary);
    background: var(--bg-primary); border: 1px solid var(--border); padding: 2px 5px;
    border-radius: 3px; white-space: nowrap; pointer-events: none; opacity: 0;
    transition: opacity 0.15s;
  }
  .fl-cov-year:hover::after { opacity: 1; }
  .fl-cov-legend {
    display: flex; gap: 8px; margin-left: 8px;
  }
  .fl-cov-legend span {
    font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: var(--text-tertiary);
    display: flex; align-items: center; gap: 3px;
  }
  .fl-cov-legend-dot { width: 6px; height: 6px; border-radius: 1px; }

  /* ═══ FLIGHT-DOC CROSS-LINKS ═══ */
  .fl-detail-docs { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
  .fl-detail-docs-title {
    font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600;
    color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
  }
  .fl-doc-link {
    display: block; font-size: 11px; color: var(--accent-blue); cursor: pointer;
    padding: 2px 0; text-decoration: none;
  }
  .fl-doc-link:hover { text-decoration: underline; }

  /* ═══ MOBILE HAMBURGER & BOTTOM NAV ═══ */
  .mobile-menu-btn { display: none; background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: 20px; padding: 4px 10px; border-radius: 4px; cursor: pointer; line-height: 1; }
  .mobile-menu-btn:hover { color: var(--text-primary); border-color: var(--accent-purple); }
  .mobile-bottom-nav { display: none; }

  /* ═══ MOBILE APP SHELL ═══
     Layout model (mobile):
       #explorerApp  ← flex column, full viewport (100dvh)
         .explorer-topbar   ← order:1, 48px, flex-shrink:0
         .explorer-body     ← order:2, flex:1, overflow:hidden
           .explorer-main   ← flex:1, overflow:hidden
             .explorer-view ← flex:1, overflow-y:auto (scrolls here)
         .mobile-bottom-nav ← order:3, 52px, flex-shrink:0 (IN flex flow, not fixed)
     Sidebar = fixed overlay (off-canvas drawer)
     Entity profile = fixed overlay (full-screen drawer)
  ═══ */

  @media (max-width: 768px) {
    /* ── Mobile base fixes ── */
    body::after { display: none; }
    html, body { overscroll-behavior: none; }

    /* ── App shell ── */
    #explorerApp {
      inset: auto; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh;
    }
    #explorerApp.active {
      height: 100vh; height: 100dvh;
      overflow: hidden;
    }
    .explorer-topbar {
      order: 1; height: 52px; padding: 0 12px; gap: 10px; flex-shrink: 0;
    }
    .explorer-body {
      order: 2; flex: 1; overflow: hidden; min-height: 0;
    }
    .mobile-bottom-nav {
      order: 3; display: flex; flex-shrink: 0;
      height: 58px; padding: 4px 0;
      padding-bottom: env(safe-area-inset-bottom, 0px);
      background: var(--bg-secondary); border-top: 1px solid var(--border);
      position: relative; z-index: 10;
    }

    /* ── Top bar ── */
    .mobile-menu-btn { display: block; font-size: 22px; padding: 6px 12px; }
    .topbar-sep, .topbar-right { display: none; }
    .explorer-topbar .nav-brand-text { font-size: 13px; letter-spacing: 1.5px; }
    .explorer-topbar .nav-brand-icon svg { width: 26px; height: 26px; }
    .topbar-search { min-width: 0; flex: 1; padding: 6px 10px; max-width: none; }
    .topbar-search input { font-size: 16px; padding: 8px 6px; }
    .topbar-search-kbd { display: none; }

    /* ── Bottom nav items ── */
    .mobile-nav-item {
      flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 2px; padding: 6px 4px; font-size: 11px; font-family: 'IBM Plex Mono', monospace;
      color: var(--text-tertiary); cursor: pointer;
      -webkit-tap-highlight-color: transparent; min-height: 48px;
    }
    .mobile-nav-item span { font-size: 20px; line-height: 1; }
    .mobile-nav-item.active { color: var(--accent-red); }
    .mobile-nav-item:active { opacity: 0.7; }

    /* ── Sidebar overlay (off-canvas drawer) ── */
    .explorer-sidebar {
      position: fixed; top: 0; left: -300px; width: 300px;
      height: 100%; height: 100dvh;
      z-index: 9999; transition: left 0.25s ease; box-shadow: none;
      background: var(--bg-secondary); border-right: 1px solid var(--border);
    }
    .explorer-sidebar.mobile-open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,0.6); }
    .sidebar-item { font-size: 14px; padding: 14px 18px; }
    .sidebar-item-badge { font-size: 12px; }
    .sidebar-section-title { font-size: 11px; padding: 12px 18px 6px; }
    .sidebar-stats { font-size: 13px; }
    .sidebar-stat-row { padding: 8px 18px; }
    .mobile-sidebar-backdrop {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
      z-index: 9998; backdrop-filter: blur(2px);
    }
    .mobile-sidebar-backdrop.active { display: block; }
    .sidebar-toggle { display: none !important; }

    /* ── Content area ── */
    .explorer-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
    .explorer-view { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; min-height: 0; overscroll-behavior-y: contain; }
    .explorer-view.active { display: flex; flex-direction: column; }

    /* ── View headers ── */
    .view-header { flex-direction: column; padding: 14px 16px; gap: 8px; align-items: flex-start; flex-shrink: 0; }
    .view-header h2 { font-size: 20px; }
    .view-header-sub { font-size: 12px; line-height: 1.5; }
    .view-header-actions { flex-wrap: wrap; gap: 6px; }
    .ng-type-btn { font-size: 11px; padding: 6px 10px; }

    /* ── Search dropdown ── */
    .gs-dropdown { left: -12px; right: -12px; width: auto; max-width: 100vw; max-height: 60vh; }
    .gs-dropdown .gs-item { padding: 12px 14px; font-size: 13px; }

    /* ── Network view ── */
    .network-view-body { flex-direction: column; flex: 1; overflow-y: auto; }
    .ng-canvas-wrap { min-height: 50vh; flex-shrink: 0; }
    .network-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); flex-shrink: 0; }
    .network-sidebar-header { font-size: 14px; padding: 12px 16px; }
    .entity-detail-name { font-size: 16px; }
    .entity-detail-type { font-size: 12px; }
    .entity-connection-item { font-size: 13px; padding: 10px 12px; }
    .ng-legend { bottom: 10px; right: 10px; padding: 10px 12px; font-size: 11px; max-width: 160px; }
    .ng-legend.collapsed { padding: 8px 12px; }
    .ng-legend-item { font-size: 11px; margin: 4px 0; }
    .ng-search { top: 10px; left: 10px; right: 60px; }
    .ng-search input { width: 100%; font-size: 16px; padding: 10px 12px; }
    .ng-ctrl-btn { font-size: 18px; width: 40px; height: 40px; }

    /* ── Documents view ── */
    .docs-view-body { flex-direction: column; flex: 1; overflow: hidden; }
    .docs-list {
      width: 100%; max-height: 35vh; min-height: 120px;
      border-right: none; border-bottom: 1px solid var(--border);
      flex-shrink: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .docs-filters { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
    .doc-filter-btn { font-size: 12px; padding: 7px 12px; }
    .doc-sort-controls { padding: 6px 12px; }
    .doc-sort-btn { font-size: 12px; padding: 5px 10px; }
    .doc-sort-label { font-size: 12px; }
    #docSearchInput { font-size: 16px !important; padding: 10px 12px !important; }
    .doc-item { padding: 14px 16px; }
    .doc-item-title { font-size: 14px; line-height: 1.4; }
    .doc-item-meta { font-size: 12px; }
    .doc-item-excerpt { font-size: 13px; line-height: 1.5; }
    .doc-item-entities { font-size: 11px; }
    .doc-viewer { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
    .doc-viewer-header h3 { font-size: 16px; }
    .doc-viewer-header { padding: 14px 16px; }
    .doc-viewer-meta { font-size: 12px; flex-wrap: wrap; gap: 8px; }
    .doc-viewer-body { padding: 16px; font-size: 14px; line-height: 1.7; }
    .doc-viewer-sidebar { display: none; }
    .doc-intel-panel { display: none; }

    /* ── Flights view ── */
    .flights-panel { display: none; }
    .fl-filter-panel { padding: 10px 14px; flex-shrink: 0; }
    .fl-filter-label { font-size: 11px; }
    .fl-filter-row-hero { flex-direction: column; gap: 10px; }
    .fl-filter-row-secondary { flex-direction: column; gap: 10px; }
    .fl-filter-sep { display: none; }
    .fl-pax-search-compact { font-size: 16px; padding: 10px 12px; }
    .fl-ac-list, .fl-ac-chips { flex-wrap: wrap; gap: 6px; }
    .fl-ac-chip { font-size: 11px; padding: 6px 10px; }
    .fl-notable-bar { padding: 8px 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-shrink: 0; gap: 6px; }
    .fl-notable-btn { white-space: nowrap; padding: 8px 12px; font-size: 12px; }
    .fl-map-container { height: 38vh; min-height: 240px; flex-shrink: 0; }
    .fl-map-ctrls { flex-wrap: wrap; gap: 4px; padding: 6px; }
    .fl-map-btn { padding: 7px 12px; font-size: 12px; }
    .fl-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .fl-table { font-size: 13px; }
    .fl-table th { font-size: 11px; padding: 10px 12px; }
    .fl-table td { padding: 10px 12px; white-space: nowrap; }
    .fl-table th:nth-child(4), .fl-table td:nth-child(4) { display: none; }
    .fl-table th:nth-child(6), .fl-table td:nth-child(6) { display: none; }
    .fl-detail-content { grid-template-columns: 1fr; font-size: 13px; }
    .fl-coverage-bar { flex-direction: column; align-items: flex-start; }
    .fl-cov-label { font-size: 11px; }
    .fl-year-input { font-size: 16px; padding: 8px 10px; }
    .fl-pax-chip { font-size: 13px; padding: 6px 12px; }
    .fl-pax-item { font-size: 13px; padding: 10px 14px; }
    .fl-pax-dropdown-title { font-size: 13px; }
    .fl-stats-toggle { font-size: 13px; padding: 8px 14px; }
    .fl-stat .v { font-size: 16px; }
    .fl-stat .l { font-size: 11px; }
    .fl-section-title { font-size: 12px; }
    .fl-table-title h4 { font-size: 14px; }
    .fl-showing { font-size: 12px; }
    .fl-table-btn { font-size: 12px; padding: 6px 12px; }
    .fl-timelapse-date { font-size: 14px; }
    .fl-timelapse-cnt { font-size: 12px; }

    /* ── Entity profile (full-screen drawer) ── */
    .ep-drawer { width: 100% !important; max-width: 100vw; z-index: 9500; height: 100dvh; }
    .ep-backdrop { z-index: 9400; }
    .ep-header { padding: 18px 16px; }
    .ep-name { font-size: 22px; }
    .ep-type { font-size: 13px; }
    .ep-bio { font-size: 14px; line-height: 1.6; }
    .ep-section { padding: 16px; }
    .ep-section-title { font-size: 14px; margin-bottom: 12px; }
    .ep-stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ep-stat-value { font-size: 18px; }
    .ep-stat-label { font-size: 11px; }
    .ep-conn-item, .ep-doc-item { font-size: 13px; padding: 12px 14px; }
    .ep-goto-btn { font-size: 13px; padding: 12px 16px; }
    .ep-export-btn, .ep-share-btn { font-size: 13px; padding: 12px 16px; }
    .ep-section-actions { flex-direction: column; gap: 10px; }
    .ep-flight-summary { font-size: 13px; }
    .ep-close { font-size: 20px; width: 36px; height: 36px; }

    /* ── Timeline ── */
    .timeline-track { margin-left: 60px; }
    .timeline-year { left: -70px; font-size: 13px; }
    .timeline-event { padding: 14px 16px; font-size: 14px; line-height: 1.5; }
    .timeline-event-title { font-size: 14px; }
    .timeline-event-date { font-size: 12px; }
    .timeline-event-desc { font-size: 13px; line-height: 1.6; }
    .timeline-event-tag { font-size: 11px; padding: 4px 8px; }
    .tl-controls { flex-direction: column; align-items: stretch; padding: 12px 16px; gap: 8px; }
    .tl-controls label, .tl-controls select, .tl-controls input { font-size: 13px; }

    /* ── Matrix ── */
    .matrix-table { font-size: 11px; }
    .matrix-table th, .matrix-table td { padding: 6px 8px; min-width: 44px; }

    /* ── Landing page ── */
    nav.landing-nav { padding: 12px 16px; }
    .nav-links { display: none; }
    .nav-brand-text { font-size: 14px; }
    .nav-cta { font-size: 13px; padding: 10px 20px; }
    .hero { padding: 90px 24px 60px; min-height: 90vh; }
    .hero h1 { font-size: clamp(32px, 10vw, 48px); letter-spacing: -1px; }
    .hero-sub { font-size: 16px; line-height: 1.6; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .hero-stat-value { font-size: 26px; }
    .hero-stat-label { font-size: 12px; }
    .hero-classification span { font-size: 11px; letter-spacing: 2px; }
    .section { padding: 56px 20px; }
    .section-header h2 { font-size: clamp(24px, 6vw, 36px); }
    .section-header p { font-size: 15px; line-height: 1.6; }
    .features-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card h4 { font-size: 16px; }
    .feature-card p { font-size: 14px; line-height: 1.5; }
    .graph-container-landing { height: 300px; }
    .pipeline-stage h4 { font-size: 15px; }
    .pipeline-stage p { font-size: 13px; line-height: 1.5; }
    .pipeline-stage-num { font-size: 11px; }
    .cta-section h2 { font-size: clamp(22px, 6vw, 32px); }
    .cta-section p { font-size: 15px; line-height: 1.6; }
    .btn-primary, .btn-secondary { padding: 14px 28px; font-size: 13px; }
    .landing-footer { font-size: 13px; padding: 24px 16px; }
    .landing-footer p { font-size: 13px; }

    /* ── Tour ── */
    .tour-card { width: 300px; max-width: 92vw; }
    .tour-card p { font-size: 14px; line-height: 1.5; }
    .tour-welcome-card { width: 94%; padding: 28px 20px; }
    .tour-welcome-card h2 { font-size: 22px; }
    .tour-welcome-card p { font-size: 14px; line-height: 1.6; }
    .tour-welcome-features { grid-template-columns: 1fr; gap: 10px; }
    .tour-welcome-feat { font-size: 14px; padding: 12px 14px; }
    .tour-relaunch { bottom: 72px; z-index: 400; font-size: 18px; width: 40px; height: 40px; }
  }

  /* ── Extra small (iPhone SE, etc.) ── */
  @media (max-width: 480px) {
    .explorer-topbar .nav-brand-text { display: none; }
    .explorer-topbar { height: 48px; }
    .mobile-bottom-nav { height: 54px; }
    .mobile-nav-item { font-size: 10px; }
    .mobile-nav-item span { font-size: 18px; }
    .view-header h2 { font-size: 17px; }
    .view-header { padding: 10px 14px; gap: 6px; }
    .fl-notable-bar { display: none; }
    .fl-pax-search-compact { font-size: 16px; padding: 8px 10px; }
    .fl-map-container { height: 32vh; min-height: 220px; }
    .fl-table td { padding: 8px 10px; font-size: 12px; }
    .fl-table-route .fl-route-cities { display: none; }
    .fl-table-route .fl-route-dist { display: none; }
    .fl-ac-tail, .fl-ac-type { display: none; }
    .ep-analysis-header { flex-direction: column; gap: 6px; }
    .doc-item-excerpt { display: none; }
    .doc-item-entities { display: none; }
    .docs-list { max-height: 30vh; }
    .doc-viewer-body { font-size: 13px; padding: 14px; }
    .hero { padding: 70px 18px 40px; }
    .hero-classification { padding: 6px 14px; }
    .hero-classification span { font-size: 10px; letter-spacing: 2px; }
    .btn-primary, .btn-secondary { padding: 12px 24px; font-size: 12px; }
    .graph-container-landing { height: 240px; }
    .tour-relaunch { bottom: 66px; }
    .ep-name { font-size: 19px; }
    .ep-section-title { font-size: 13px; }
    .timeline-event { font-size: 13px; padding: 12px 14px; }
  }

  /* ── iOS safe area ── */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
      .mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
    }
  }

  /* ── Touch device optimizations ── */
  @media (hover: none) and (pointer: coarse) {
    .sidebar-item { padding: 14px 18px; min-height: 48px; font-size: 14px; }
    .doc-item { min-height: 52px; }
    .fl-table td { padding: 10px 12px; }
    .fl-map-btn { min-height: 40px; min-width: 40px; }
    .ng-ctrl-btn { min-width: 40px; min-height: 40px; }
    .fl-notable-btn { min-height: 40px; }
    .ep-conn-item, .ep-doc-item { min-height: 48px; display: flex; align-items: center; }
    .entity-connection-item { min-height: 48px; display: flex; align-items: center; }
  }
