@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:      #64748b;

  --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) !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
}

.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-secondary);
  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;
  z-index: 100;
  overflow: visible;
}

.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 .dash-radioitems 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-secondary);
  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-secondary);
  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-section-header {
  margin-top: 16px;
  padding: 14px 16px 12px;
  background: var(--teal-glow);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius);
  margin-bottom: 0;
}

.fb-section-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.fb-section-icon {
  font-size: 16px;
  color: var(--teal);
  flex-shrink: 0;
}

.fb-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.01em;
  flex: 1;
}

.fb-section-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.fb-tally-inline {
  margin-top: 0;
}

.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;
}

/* Rows are clickable — show pointer and a left-border accent on hover */
.ag-theme-alpine-dark .ag-row {
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: border-color 100ms ease;
}

.ag-theme-alpine-dark .ag-row:hover {
  border-left-color: var(--teal-dim);
}

.ag-theme-alpine-dark .ag-row-selected {
  border-left-color: var(--teal) !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;
  color: var(--text-primary) !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-secondary);
  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-secondary); }
.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);
}

/* Clickable highlight row (links to review detail page) */
.highlight-row-link {
  display: block;
  text-decoration: none !important;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition);
}

.highlight-row-link:hover {
  filter: brightness(1.15);
  transform: translateX(2px);
}

.highlight-row-link:hover .highlight-row-cta {
  opacity: 1;
}

.highlight-row-annotation {
  display: block;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 5px;
}

.highlight-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.highlight-row-id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #60a5fa;
}

.highlight-row-cta {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition);
  white-space: nowrap;
}

/* ── 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); }

/* ── Inline tooltip icon ── */
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: help;
  position: relative;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: var(--bg-surface-3);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-primary);
  white-space: normal;
  width: 220px;
  line-height: 1.5;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.tooltip-icon:hover::after { opacity: 1; }

/* Filter panel tooltips open rightward so they render over the table */
.filter-panel .tooltip-icon::after {
  left: 0;
  transform: none;
  z-index: 10000;
}

/* ── Start page workflow steps ── */
.start-workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

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

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

.workflow-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,229,195,0.12);
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

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

.workflow-step-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Workflow step as a clickable link */
.workflow-step-link {
  text-decoration: none !important;
  display: block;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.workflow-step-link:hover {
  transform: translateY(-2px);
  border-color: var(--step-color, var(--teal-dim)) !important;
  background: var(--bg-surface-2) !important;
}

.workflow-step-link .workflow-step-title {
  color: var(--text-primary);
}

.workflow-step-link .workflow-step-body {
  color: var(--text-secondary);
}

.workflow-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 9px 20px;
  background: var(--teal-glow);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius);
  color: var(--teal) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--transition);
}

.workflow-cta:hover {
  background: rgba(0,229,195,0.22);
}

/* ── Explorer sidebar hint ── */
.explorer-hint {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal-dim);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.explorer-hint span {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Prominent feedback button ── */
.fb-prominent {
  background: var(--teal-glow) !important;
  border-color: var(--teal-dim) !important;
  color: var(--teal) !important;
  font-size: 12px !important;
  padding: 7px 14px !important;
}

.fb-prominent:hover {
  background: rgba(0,229,195,0.22) !important;
}

.fb-invite {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

/* ── Chart caption ── */
.chart-caption {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

/* ── Filter label with tooltip ── */
.filter-label-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════════════
   reviewer-v2 — evidence-focused review interface
   ══════════════════════════════════════════════════════════════════ */

/* ── % Identity badges ── */
.identity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
  min-width: 52px;
}

.identity-badge-high {
  background: rgba(0,229,195,0.18);
  color: var(--teal);
  border: 1px solid var(--teal-dim);
}

.identity-badge-mid {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid var(--amber-dim);
}

.identity-badge-low {
  background: rgba(148,163,184,0.12);
  color: var(--text-secondary);
  border: 1px solid #64748b;
}

/* ── Evidence grid ── */
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .evidence-grid { grid-template-columns: 1fr; }
}

/* ── Evidence panel (one evidence type) ── */
.evidence-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.evidence-panel-header {
  padding: 12px 16px 10px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
}

.evidence-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

.evidence-panel-sub {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.evidence-panel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evidence-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

/* ── Homolog row (pangenome + paperblast hits) ── */
.homolog-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.homolog-row:hover { border-color: var(--border-bright); }

.homolog-meta {
  flex: 1;
  min-width: 0;
}

.homolog-species {
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homolog-detail {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  font-family: var(--font-mono);
}

.homolog-core-chip {
  font-size: 9px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.homolog-core-chip.core {
  background: rgba(0,229,195,0.12);
  color: var(--teal);
  border: 1px solid var(--teal-dim);
}

.homolog-core-chip.aux {
  background: rgba(148,163,184,0.1);
  color: var(--text-muted);
  border: 1px solid #64748b;
}

.homolog-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 4px;
}

/* ── Fitness card ── */
.fitness-card {
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fitness-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.fitness-organism {
  font-size: 12px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  flex: 1;
}

.fitness-exp-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
  border: 1px solid #3b82f6;
}

.fitness-exp-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.fitness-scores {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.fitness-score-label { color: var(--text-muted); }

.fitness-score-neg  { color: #f87171; font-weight: 700; }
.fitness-score-pos  { color: var(--teal); font-weight: 700; }
.fitness-score-neutral { color: var(--text-secondary); font-weight: 600; }

/* ── Cofitness section ── */
.cofitness-section {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.cofitness-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.cofitness-toggle:hover { color: var(--text-secondary); }

.cofitness-table {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
}

.cofitness-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 3px 6px 3px 0;
  border-bottom: 1px solid var(--border);
}

.cofitness-table td {
  padding: 3px 6px 3px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* ── IPR domain table ── */
.ipr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.ipr-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 4px 8px 4px 0;
  border-bottom: 1px solid var(--border);
}

.ipr-table td {
  padding: 5px 8px 5px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.4;
}

.ipr-table td:last-child { color: var(--text-primary); }

.ipr-db-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  white-space: nowrap;
}

.ipr-position {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Review detail page header ── */
.review-header {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 20px;
}

/* .review-header-top removed — back-link is now a standalone element above the header */

.review-cluster-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
}

.review-organism {
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.review-back-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.review-back-link:hover { color: var(--teal) !important; }

/* ── Annotation card ── */
.annotation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.annotation-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 10px;
}

.annotation-card-text {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.65;
  font-weight: 400;
}

.annotation-notice-amber {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--amber-glow);
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.annotation-notice-amber strong { color: var(--amber); }

.annotation-notice-teal {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--teal-glow);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.annotation-notice-teal strong { color: var(--teal); }

/* ── Collapsed sections (DB annotations, reasoning) ── */
.collapsible-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  overflow: hidden;
}

.collapsible-toggle {
  width: 100%;
  background: var(--bg-surface-2);
  border: none;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: background var(--transition);
}

.collapsible-toggle:hover { background: var(--bg-surface-3); }

.collapsible-toggle-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}

.collapsible-toggle-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.collapsible-toggle-chevron {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 150ms ease;
}

.collapsible-body {
  padding: 14px 16px;
}

/* ── DB annotations panel ── */
.db-annotations-panel { font-size: 12px; }

.db-annotation-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.db-annotation-row:last-child { border-bottom: none; }

.db-annotation-key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 160px;
}

.db-annotation-val { color: var(--text-primary); line-height: 1.5; }

/* ── Reasoning trace ── */
.reasoning-trace {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.55;
  background: var(--bg-surface-2);
  border-radius: var(--radius);
  padding: 10px 12px;
}

/* ── Feedback type radio ── */
.fb-type-radio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.fb-type-radio label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.fb-type-radio label:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}

.fb-type-radio input[type=radio]:checked + span,
.fb-type-radio label:has(input:checked) {
  border-color: var(--teal-dim);
  background: var(--teal-glow);
  color: var(--teal);
}

/* ── Review queue: evidence icon row ── */
.evidence-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.ev-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.ev-icon.has { background: rgba(0,229,195,0.15); color: var(--teal); border: 1px solid var(--teal-dim); }
.ev-icon.missing { background: rgba(148,163,184,0.08); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Show-more expander ── */
.show-more-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 4px 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: all var(--transition);
}

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

/* ── Protein sequence display ── */
.protein-sequence-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 10px 0 0;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre;
  word-break: break-all;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.seq-copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 4px 12px;
  cursor: pointer;
  transition: all var(--transition);
}

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

.seq-copy-btn:active {
  background: rgba(0,229,195,0.08);
}

/* ── IPR coverage column ── */
.ipr-cov {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 3px;
}
.ipr-cov-high { color: var(--teal);   background: rgba(0,229,195,0.10); }
.ipr-cov-mid  { color: var(--amber);  background: rgba(245,158,11,0.10); }
.ipr-cov-low  { color: var(--text-muted); background: rgba(148,163,184,0.08); }

/* ── IPR HMM coords and e-value ── */
.ipr-hmm-coords {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.ipr-evalue {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* ── Gene Neighborhood Panel ── */
.neighborhood-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* New Radix-based dcc.Dropdown overrides (Dash 2.18+) */
/* Trigger button */
.neighborhood-selector button.dash-dropdown {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
  border-radius: var(--radius) !important;
  width: 100%;
}
.neighborhood-selector button.dash-dropdown:hover {
  border-color: var(--border-bright) !important;
}
.neighborhood-selector .dash-dropdown-value-item span {
  color: var(--text-primary) !important;
}
/* Menu portal — rendered at body level, no parent scope available */
.dash-dropdown-content {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius) !important;
  z-index: 9999;
}

/* Search input inside the menu */
.dash-dropdown-content input,
.dash-dropdown-content input:focus,
.dash-dropdown-content input:active,
.dash-dropdown-search,
.dash-dropdown-search input,
.dash-dropdown-search input:focus {
  background: var(--bg-surface-3) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  outline: none !important;
  box-shadow: 0 0 0 1px var(--border-bright) !important;
  border-radius: var(--radius) !important;
}
.dash-dropdown-content input::placeholder { color: var(--text-muted) !important; }
/* Wrapper around the search icon + input */
.dash-dropdown-content > div:first-child,
.dash-dropdown-search-container {
  background: var(--bg-surface-3) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Option items — class + role fallback */
.dash-dropdown-item,
.dash-dropdown-content [role="option"] {
  color: var(--text-primary) !important;
  font-size: 12px !important;
  background: transparent !important;
}
.dash-dropdown-item *,
.dash-dropdown-content [role="option"] * {
  color: var(--text-primary) !important;
}
.dash-dropdown-item[data-highlighted],
.dash-dropdown-item:hover,
.dash-dropdown-content [role="option"][data-highlighted],
.dash-dropdown-content [role="option"]:hover {
  background: var(--bg-surface-3) !important;
  color: var(--text-primary) !important;
}

.neighborhood-selector-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.neighborhood-track {
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 0 14px;
  margin-bottom: 10px;
}

.gene-block {
  position: relative;
  min-width: 76px;
  max-width: 108px;
  padding: 6px 6px 5px;
  border-radius: 3px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  text-align: center;
  cursor: default;
  flex-shrink: 0;
}

.gene-block.gene-focal {
  background: rgba(0, 229, 195, 0.07);
  border-color: var(--teal);
  border-width: 2px;
}

.gene-strand-arrow {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 3px;
}

.gene-focal .gene-strand-arrow {
  color: var(--teal);
}

.gene-name {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.gene-focal .gene-name {
  color: var(--teal);
}

.gene-product {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 3px;
  word-break: break-word;
}

/* Marks where the contig ends — the assembly stops, so no further flanking genes
   exist. Meaningful signal, so it reads at text-muted rather than border weight. */
.boundary-marker {
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0 4px;
  cursor: default;
  flex-shrink: 0;
}

.neighborhood-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.neighborhood-meta b {
  color: var(--text-secondary);
}

/* Explains that the track is ordered by genome coordinate, not transcription. */
.neighborhood-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 10px;
}

/* ── Review Summary page ── */

/* One filter row scoping every section below it — never per-chart filters. */
.reviews-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

.reviews-filter { min-width: 0; }

.reviews-filter-toggle {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.reviews-table-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 7px 0;
}

.reviews-table-toggle input[type="checkbox"] {
  accent-color: var(--teal);
  cursor: pointer;
}

.panel-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Names the unit of measure above each chart — the two paired charts look alike
   but count different things, so neither may go unlabelled. */
.panel-microlabel {
  font-size: 11px;
  color: var(--text-muted);
  margin: 10px 0 2px;
  letter-spacing: 0.02em;
}

/* Panel-level legend, shared by a paired row of charts. */
.reviews-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  margin-bottom: 4px;
}

.reviews-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.reviews-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Table twin for every chart, so no value is reachable only by hovering. */
.review-table-wrap {
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.review-table th {
  position: sticky;
  top: 0;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-bright);
  white-space: nowrap;
}

.review-table td {
  padding: 7px 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.review-table tbody tr:hover td { background: var(--bg-surface-2); }

.reviews-empty {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
}

.reviews-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.reviews-empty-body {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.reviews-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 12px auto 0;
  line-height: 1.6;
}

/* ── STRING association network ──────────────────────────────────────────────
   Two colours carry meaning here and nothing else does: teal marks an
   association resting on experimental or curated evidence, amber marks a hub.
   Every other partner is deliberately neutral, so scanning the list surfaces
   the ones worth weighting rather than a wall of equally-coloured chips. */

.string-homolog {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
}

.string-homolog-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
}

.string-homolog-full {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.string-homolog-org {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: auto;
}

.string-og {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.string-og-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--violet);
}

.string-og-desc {
  font-size: 12px;
  color: var(--text-primary);
  flex: 1 1 220px;
}

.string-og-species {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.string-partner-caption {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.string-partner-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.string-partner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.string-partner:hover { border-color: var(--border-bright); }

/* The score is the number, not a bar — a 700-floored export has no honest
   zero point to draw from. */
.string-score {
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-surface-3);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
}

.string-score-direct {
  color: var(--teal);
  border-color: var(--teal-dim);
  background: var(--teal-glow);
}

.string-partner-meta { flex: 1; min-width: 0; }

.string-partner-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.string-partner-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
}

.string-hub-chip {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--amber);
  background: var(--amber-glow);
  border: 1px solid var(--amber-dim);
  cursor: help;
}

.string-partner-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 3px 0 5px;
}

.string-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.string-channel {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text-muted);
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  white-space: nowrap;
  cursor: help;
}

.string-channel-direct {
  color: var(--teal);
  border-color: var(--teal-dim);
  background: var(--teal-glow);
}

/* A PaperBLAST hit whose citation never resolved to a PubMed record. Muted and
   unboxed so it reads as the absence of a link rather than a second kind of
   one — it sits where the PMID chip would be. */
.pb-uncited {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-style: italic;
  cursor: help;
}
