/* ═══════════════════════════════════════════════════
   SIGINT — Document Intelligence Platform
   Design: Dark intelligence dashboard
   Font pairing: DM Sans (UI) + JetBrains Mono (data)
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Surfaces */
  --bg-root: #0d1117;
  --bg-surface: #161b22;
  --bg-elevated: #1c2333;
  --bg-hover: #21283b;
  --bg-input: #0d1117;

  /* Borders */
  --border: rgba(125, 140, 165, 0.12);
  --border-active: rgba(125, 140, 165, 0.3);

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary: #545d68;
  --text-inverse: #0d1117;

  /* Accent — Amber (threat / urgency) */
  --amber-50: #fef3c7;
  --amber-200: #fde68a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-900: #78350f;

  /* Teal (insight / intelligence) */
  --teal-50: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-900: #134e4a;

  /* Red (critical / high-severity) */
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-900: #7f1d1d;
  --red-bg: rgba(239, 68, 68, 0.08);

  /* Green (grounded / safe) */
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-900: #14532d;

  /* Blue (info) */
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-900: #1e3a5f;

  /* Typography */
  --font-ui: 'DM Sans', -apple-system, sans-serif;
  --font-data: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─── */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  text-decoration: none;
  color: var(--text-primary);
}

.sidebar-brand .logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--amber-500), var(--teal-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-inverse);
}

.sidebar-brand .brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-nav { list-style: none; flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-nav a.active { background: var(--bg-hover); color: var(--amber-400); }

.main-content {
  padding: var(--space-xl);
  max-width: 1200px;
  overflow-y: auto;
}

/* ─── Page Header ─── */
.page-header {
  margin-bottom: var(--space-xl);
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-xs);
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-header .phase-tag {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

/* ─── Metric Tiles ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.metric-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.metric-tile .metric-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.metric-tile .metric-value {
  font-family: var(--font-data);
  font-size: 28px;
  font-weight: 700;
}

.metric-tile .metric-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ─── Triage Band Colors ─── */
.band-red { color: var(--red-400); }
.band-red .metric-value { color: var(--red-400); }
.band-amber { color: var(--amber-400); }
.band-amber .metric-value { color: var(--amber-400); }
.band-green { color: var(--green-400); }
.band-green .metric-value { color: var(--green-400); }

.triage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.triage-badge.red { background: var(--red-bg); color: var(--red-400); border: 1px solid rgba(239,68,68,0.2); }
.triage-badge.amber { background: rgba(245,158,11,0.08); color: var(--amber-400); border: 1px solid rgba(245,158,11,0.2); }
.triage-badge.green { background: rgba(34,197,94,0.08); color: var(--green-400); border: 1px solid rgba(34,197,94,0.2); }

/* ─── DIVS Score Bar ─── */
.divs-bar {
  height: 8px;
  background: var(--bg-root);
  border-radius: 4px;
  overflow: hidden;
  margin-top: var(--space-sm);
}

.divs-bar .fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.divs-bar .fill.red { background: linear-gradient(90deg, var(--red-600), var(--red-400)); }
.divs-bar .fill.amber { background: linear-gradient(90deg, var(--amber-600), var(--amber-400)); }
.divs-bar .fill.green { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }

/* ─── Entity List ─── */
.entity-list { list-style: none; }
.entity-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.entity-item:last-child { border-bottom: none; }
.entity-item:hover { background: var(--bg-hover); }
.entity-item a { color: var(--text-primary); text-decoration: none; flex: 1; display: flex; align-items: center; gap: var(--space-md); }

.entity-type-badge {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  min-width: 72px;
  text-align: center;
}

.entity-type-badge.company { background: rgba(59,130,246,0.1); color: var(--blue-400); }
.entity-type-badge.person { background: rgba(168,85,247,0.1); color: #a855f7; }
.entity-type-badge.partner { background: rgba(20,184,166,0.1); color: var(--teal-400); }
.entity-type-badge.facility { background: rgba(245,158,11,0.1); color: var(--amber-400); }
.entity-type-badge.carrier { background: rgba(34,197,94,0.1); color: var(--green-400); }
.entity-type-badge.location { background: rgba(125,140,165,0.08); color: var(--text-secondary); }

.entity-info .entity-name { font-weight: 600; font-size: 14px; }
.entity-info .entity-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.enriched-badge {
  font-family: var(--font-data);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(20,184,166,0.1);
  color: var(--teal-400);
  border: 1px solid rgba(20,184,166,0.2);
}

/* ─── Findings ─── */
.finding-card {
  border-left: 3px solid var(--border);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.finding-card.grounded { border-left-color: var(--green-500); }
.finding-card.derived { border-left-color: var(--amber-400); }
.finding-card.inferential { border-left-color: var(--red-400); }

.finding-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.finding-header .tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tier-dot.grounded { background: var(--green-500); }
.tier-dot.derived { background: var(--amber-400); }
.tier-dot.inferential { background: var(--red-400); }

.finding-header h3 { font-size: 14px; font-weight: 600; }
.finding-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.finding-meta {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-data);
}

.ic-badge {
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber-400);
}

/* ─── Profile Section ─── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.vulnerability-item {
  padding: var(--space-md);
  background: var(--bg-root);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--red-400);
  margin-bottom: var(--space-sm);
}

.vulnerability-item.critical { border-left-color: var(--red-500); background: var(--red-bg); }
.vulnerability-item.high { border-left-color: var(--amber-500); }
.vulnerability-item.medium { border-left-color: var(--blue-400); }

.vulnerability-item h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.vulnerability-item p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Outreach Emails ─── */
.email-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.email-header {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.email-header .lane-badge {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.lane-badge.direct { background: rgba(59,130,246,0.1); color: var(--blue-400); }
.lane-badge.vendor { background: rgba(20,184,166,0.1); color: var(--teal-400); }
.lane-badge.partner { background: rgba(168,85,247,0.1); color: #a855f7; }

.email-subject {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.email-subject span { color: var(--text-tertiary); font-weight: 400; margin-right: var(--space-sm); }

.email-body {
  padding: var(--space-lg);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.email-actions {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-sm);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--text-inverse);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-active);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-copy {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
}
.btn-copy:hover { border-color: var(--border-active); color: var(--text-primary); }

/* ─── Forms ─── */
.form-group { margin-bottom: var(--space-lg); }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}

.form-group .help-text {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ─── Upload Zone ─── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-elevated);
}

.upload-zone:hover {
  border-color: var(--amber-500);
  background: rgba(245,158,11,0.03);
}

.upload-zone .upload-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.upload-zone h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.upload-zone p {
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ─── Status Pipeline ─── */
.pipeline-status {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-xl);
}

.pipeline-step {
  flex: 1;
  padding: var(--space-md);
  background: var(--bg-elevated);
  text-align: center;
  position: relative;
}

.pipeline-step:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.pipeline-step:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.pipeline-step .step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}

.pipeline-step.active { background: rgba(245,158,11,0.08); }
.pipeline-step.active .step-label { color: var(--amber-400); }
.pipeline-step.complete { background: rgba(20,184,166,0.05); }
.pipeline-step.complete .step-label { color: var(--teal-400); }

/* ─── BLUF Banner ─── */
.bluf-banner {
  background: linear-gradient(135deg, rgba(20,184,166,0.08), rgba(245,158,11,0.05));
  border: 1px solid rgba(20,184,166,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.bluf-banner .bluf-label {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-400);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.bluf-banner .bluf-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ─── Analysis List ─── */
.analysis-list { list-style: none; }

.analysis-list-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.analysis-list-item:hover {
  border-color: var(--border-active);
  background: var(--bg-elevated);
}

.analysis-list-item .analysis-title { font-weight: 600; font-size: 14px; }
.analysis-list-item .analysis-date { font-size: 13px; color: var(--text-tertiary); font-family: var(--font-data); }

/* ─── Status Dot ─── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.pending { background: var(--text-tertiary); }
.status-dot.running { background: var(--amber-400); animation: pulse 1.5s infinite; }
.status-dot.complete { background: var(--green-500); }
.status-dot.failed { background: var(--red-500); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Cost Model ─── */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.cost-tile {
  background: var(--bg-root);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  border: 1px solid var(--border);
}

.cost-tile .cost-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.cost-tile .cost-value {
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 700;
}

.cost-tile.target {
  border-color: rgba(20,184,166,0.3);
  background: rgba(20,184,166,0.04);
}
.cost-tile.target .cost-value { color: var(--teal-400); }

/* ─── Section Tabs ─── */
.section-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.section-tab {
  padding: var(--space-md) var(--space-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-ui);
}

.section-tab:hover { color: var(--text-primary); }
.section-tab.active { color: var(--amber-400); border-bottom-color: var(--amber-400); }

/* ─── Data Table ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tr:hover td { background: var(--bg-hover); }
.data-table .mono { font-family: var(--font-data); font-size: 13px; }
.data-table .highlight { color: var(--amber-400); font-weight: 600; }

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-tertiary);
}

.empty-state h3 { font-size: 20px; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.empty-state p { font-size: 15px; margin-bottom: var(--space-lg); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .cost-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Usage Meter ─── */
.usage-meter {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.usage-meter .meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: var(--space-sm);
}

.usage-meter .meter-label .count {
  font-family: var(--font-data);
  font-weight: 700;
  color: var(--text-primary);
}

.usage-meter .meter-label .limit {
  color: var(--text-tertiary);
}

.usage-meter .meter-bar {
  height: 6px;
  background: var(--bg-root);
  border-radius: 3px;
  overflow: hidden;
}

.usage-meter .meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease, background 0.3s ease;
  background: var(--teal-500);
}

.usage-meter .meter-fill.warning { background: var(--amber-500); }
.usage-meter .meter-fill.critical { background: var(--red-500); }

.usage-meter .meter-footer {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ─── Discovery Page ─── */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: var(--space-xl);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.mode-tab {
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  color: var(--text-secondary);
}

.mode-tab:hover { background: var(--bg-hover); }
.mode-tab.active {
  background: var(--bg-elevated);
  color: var(--amber-400);
  box-shadow: inset 0 -2px 0 var(--amber-400);
}

.mode-tab h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: inherit;
}

.mode-tab p { font-size: 13px; color: var(--text-tertiary); }

.discovery-results { list-style: none; }

.discovery-result-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: all 0.15s ease;
}

.discovery-result-item:hover { border-color: var(--border-active); }

.discovery-result-item .doc-score {
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

.discovery-result-item .doc-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.discovery-result-item .doc-info p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.discovery-result-item .doc-info .doc-url {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-tertiary);
  word-break: break-all;
}

/* ─── Pipeline Live ─── */
.pipeline-live {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pipeline-live .live-header {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pipeline-live .live-header .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-400);
  animation: pulse 1.5s infinite;
}

.pipeline-live .live-body {
  padding: var(--space-lg);
  font-family: var(--font-data);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ─── Checkbox Styling ─── */
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--amber-500);
}
