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

:root {
  --bg-base:         #0a0e1a;
  --bg-surface:      #0f1629;
  --bg-surface-2:    #141e35;
  --bg-surface-3:    #1a2540;
  --border:          #1e2d4a;
  --border-bright:   #2a3d5e;
  --text-primary:    #e2e8f0;
  --text-secondary:  #94a3b8;
  --text-muted:      #475569;

  --teal:            #00e5c3;
  --teal-dim:        #00b89b;
  --teal-glow:       rgba(0, 229, 195, 0.15);
  --amber:           #f59e0b;
  --amber-dim:       #d97706;
  --amber-glow:      rgba(245, 158, 11, 0.15);
  --violet:          #a78bfa;
  --violet-glow:     rgba(167, 139, 250, 0.15);

  --pathogen:        #f87171;
  --biotech:         #34d399;
  --doe:             #fbbf24;
  --environmental:   #60a5fa;

  --tier-a:          #00e5c3;
  --tier-b:          #60a5fa;
  --tier-c:          #94a3b8;
  --no-call:         #4b5563;

  --font-display:    'Playfair Display', Georgia, serif;
  --font-sans:       'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:       'IBM Plex Mono', 'Courier New', monospace;

  --radius:          6px;
  --radius-lg:       12px;
  --transition:      150ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #_dash-app-content, ._dash-loading {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
  z-index: 1000;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.navbar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-surface-2);
  border-color: var(--border);
}

.nav-link.active {
  color: var(--teal) !important;
  background: var(--teal-glow);
  border-color: var(--teal-dim);
}

/* ── Page wrapper ── */
.page-content {
  margin-top: 56px;
  min-height: calc(100vh - 56px);
  padding: 28px 32px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ── Stat cards ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-color, var(--teal));
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-color, var(--teal));
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* ── Section headers ── */
.section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Panel / Card ── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* ── Charts row ── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.charts-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Tier badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-tier-A  { background: rgba(0,229,195,0.15);  color: var(--teal);   border: 1px solid var(--teal-dim); }
.badge-tier-B  { background: rgba(96,165,250,0.15); color: #60a5fa;       border: 1px solid #3b82f6; }
.badge-tier-C  { background: rgba(148,163,184,0.12);color: #94a3b8;       border: 1px solid #64748b; }
.badge-no-call { background: rgba(75,85,99,0.2);    color: #6b7280;       border: 1px solid #374151; }

.badge-dark    { background: var(--amber-glow);  color: var(--amber);  border: 1px solid var(--amber-dim); }
.badge-promo   { background: var(--violet-glow); color: var(--violet); border: 1px solid #7c3aed; }
.badge-other   { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }

.badge-signal  { background: rgba(251,191,36,0.1); color: #fbbf24; border: 1px solid #92400e; font-size: 10px; }

.badge-pathogen     { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid #dc2626; }
.badge-biotech      { background: rgba(52,211,153,0.12);  color: #34d399; border: 1px solid #059669; }
.badge-doe          { background: rgba(251,191,36,0.12);  color: #fbbf24; border: 1px solid #d97706; }
.badge-environmental{ background: rgba(96,165,250,0.12);  color: #60a5fa; border: 1px solid #3b82f6; }

/* ── Explorer layout ── */
.explorer-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

.filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: 72px;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

/* Dash component overrides */
.filter-panel .Select-control,
.filter-panel .Select-menu-outer {
  background: var(--bg-surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

.filter-panel .dash-checklist label,
.filter-panel .form-check-label {
  color: var(--text-primary) !important;
  font-size: 13px;
}

/* ── Detail drawer ── */
.detail-drawer {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 16px;
  overflow: hidden;
}

.detail-header {
  padding: 16px 20px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-cluster-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  flex: 0 0 100%;
  margin-bottom: 4px;
}

.detail-organism {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-annotation-text {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--teal-glow), transparent);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-annotation-body { flex: 1; }

.evidence-streams {
  padding: 16px 20px;
}

.evidence-stream {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg-surface-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--border-bright);
}

.evidence-stream.has-data {
  border-left-color: var(--teal-dim);
}

.evidence-stream-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.evidence-stream-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border-bright);
  font-size: 10px;
  color: var(--teal);
}

.evidence-stream-body {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.5;
}

.evidence-empty {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-sans);
}

.alt-signal-box {
  margin: 16px 20px;
  padding: 12px 14px;
  background: var(--amber-glow);
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius);
}

.alt-signal-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 6px;
}

.alt-signal-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.alt-signal-key {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Token usage (detail drawer) ── */
.token-box {
  margin: 16px 20px;
  padding: 12px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.token-box-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.token-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.token-metric {
  text-align: center;
  padding: 8px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.token-metric-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--teal);
}

.token-metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Feedback ── */
.feedback-section {
  padding: 0 20px 16px;
}

.fb-toggle-btn {
  flex: 0 0 auto;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-bright);
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.fb-toggle-btn:hover {
  background: var(--bg-surface-3);
  border-color: var(--teal-dim);
}

.fb-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.fb-panel.hidden { display: none; }

.fb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fb-field { margin-bottom: 12px; }

.fb-field-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.fb-input,
.fb-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.fb-input:focus,
.fb-textarea:focus { border-color: var(--teal-dim); }

.fb-input::placeholder,
.fb-textarea::placeholder { color: var(--text-muted); }

.fb-textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
}

.fb-vote {
  display: flex;
  gap: 8px;
}

.fb-vote label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.fb-vote input { margin-right: 4px; cursor: pointer; }

.fb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.fb-save-btn {
  background: var(--teal-glow);
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.fb-save-btn:hover { background: rgba(0, 229, 195, 0.22); }

.fb-status {
  font-size: 12px;
  color: var(--text-secondary);
}

.fb-tally {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.fb-tally-up   { color: var(--teal); }
.fb-tally-down { color: var(--pathogen); }
.fb-tally-count { color: var(--text-muted); }

.fb-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.fb-entry {
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fb-entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-entry-vote.up   { color: var(--teal); }
.fb-entry-vote.down { color: var(--pathogen); }

.fb-entry-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.fb-entry-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.fb-entry-comment {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Campaign token bar (Organisms page) ── */
.campaign-token-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.campaign-token-item {
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.campaign-token-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--teal);
}

.campaign-token-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Organism grid ── */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.org-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.org-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tile-color, var(--border));
  transition: height var(--transition);
}

.org-tile:hover {
  border-color: var(--tile-color, var(--border-bright));
  background: var(--bg-surface-2);
  transform: translateY(-1px);
}

.org-tile.selected {
  border-color: var(--tile-color, var(--teal));
  background: var(--bg-surface-2);
}

.org-tile.selected::before { height: 3px; }

.org-tile-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.org-tile-stats {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.org-tile-dark {
  font-size: 10px;
  color: var(--amber);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ── AG Grid overrides ── */
.ag-theme-alpine-dark .ag-root-wrapper {
  border-color: var(--border) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-surface) !important;
}

.ag-theme-alpine-dark {
  --ag-background-color: var(--bg-surface);
  --ag-odd-row-background-color: var(--bg-surface-2);
  --ag-header-background-color: var(--bg-surface-3);
  --ag-border-color: var(--border);
  --ag-row-hover-color: var(--bg-surface-3);
  --ag-selected-row-background-color: rgba(0,229,195,0.08);
  --ag-header-foreground-color: var(--text-secondary);
  --ag-foreground-color: var(--text-primary);
  --ag-font-family: 'IBM Plex Sans', sans-serif;
  --ag-font-size: 13px;
}

.ag-theme-alpine-dark .ag-header-cell-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--text-muted) !important;
}

/* Dark-function row highlight */
.ag-theme-alpine-dark .row-dark-function {
  background: rgba(245, 158, 11, 0.06) !important;
}

.ag-theme-alpine-dark .row-dark-function:hover {
  background: rgba(245, 158, 11, 0.12) !important;
}

/* Alt-signal row highlight (non-Tier-A with hidden evidence) */
.ag-theme-alpine-dark .row-alt-signal {
  background: rgba(167, 139, 250, 0.04) !important;
}

/* ── Inputs ── */
.search-input {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 12px;
}

.search-input:focus {
  border-color: var(--teal-dim);
}

.search-input::placeholder { color: var(--text-muted); }

/* ── Dropdown overrides ── */
.Select-control {
  background: var(--bg-surface-2) !important;
  border-color: var(--border) !important;
}
.Select-menu-outer { background: var(--bg-surface-2) !important; border-color: var(--border-bright) !important; }
.Select-option { color: var(--text-primary) !important; }
.Select-option:hover, .Select-option.is-focused { background: var(--bg-surface-3) !important; }
.Select-value-label { color: var(--text-primary) !important; }
.Select-placeholder { color: var(--text-muted) !important; }

/* ── Checklist ── */
.dash-checklist { display: flex; flex-direction: column; gap: 6px; }
.dash-checklist label { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-primary); font-size: 13px; }
.dash-checklist input[type=checkbox] { accent-color: var(--teal); }

/* ── Toggle / Switch ── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ── Records callout ── */
.record-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.record-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 3px solid var(--amber);
}

.record-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-style: italic;
}

.record-card-stat {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
}

.record-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Stratum group header ── */
.stratum-header {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
}

/* ── Organism profile ── */
.org-profile {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.org-profile-header {
  padding: 20px 24px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.org-profile-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  color: var(--text-primary);
}

.org-profile-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
}

.org-profile-stats-col {
  padding: 20px;
  border-right: 1px solid var(--border);
}

.org-profile-highlights-col {
  padding: 20px;
}

.profile-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.profile-stat-row:last-child { border-bottom: none; }

.profile-stat-key { color: var(--text-muted); }
.profile-stat-val { color: var(--text-primary); font-family: var(--font-mono); font-weight: 500; }

.highlight-row {
  padding: 8px 10px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  font-size: 12px;
  border-left: 3px solid var(--border);
}

.highlight-row.dark {
  background: var(--amber-glow);
  border-left-color: var(--amber-dim);
  color: var(--text-primary);
}

.highlight-row.promoted {
  background: var(--violet-glow);
  border-left-color: #7c3aed;
  color: var(--text-primary);
}

/* ── Per-organism narrative (results summary) ── */
.org-profile-narrative {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
}

.narrative-section-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--teal);
  border-bottom-color: var(--border-bright);
}

.narrative-strain {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.narrative-body {
  max-width: 900px;
}

.narrative-p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.narrative-p .narrative-lead { color: var(--text-primary); }
.narrative-body strong { color: var(--text-primary); font-weight: 600; }
.narrative-body em { color: var(--teal); font-style: italic; }

/* Whole-line bold → tracked subheader, echoing .section-header */
.narrative-subhead {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Featured leads → accent callout cards */
.narrative-callout {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.narrative-callout-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.narrative-callout-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

.narrative-callout-teal { border-left-color: var(--teal); }
.narrative-callout-teal .narrative-callout-label { color: var(--teal); }
.narrative-callout-violet { border-left-color: var(--violet); }
.narrative-callout-violet .narrative-callout-label { color: var(--violet); }

/* Protein bullet lists with gene tags */
.narrative-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.narrative-li {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--border);
  margin-bottom: 4px;
}

.narrative-gene-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--teal);
  background: var(--teal-glow);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 8px;
}

/* ── Plotly overrides ── */
.js-plotly-plot .plotly .bg { fill: transparent !important; }
.js-plotly-plot { background: transparent !important; }

/* ── Misc ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-left: 6px;
}

.export-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.export-btn:hover {
  border-color: var(--teal-dim);
  color: var(--teal);
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
  transition: color var(--transition);
}

.clear-btn:hover { color: var(--text-secondary); }
