/* ── Volcano grid ── */
.vol-grid {
  display: grid;
  grid-template-rows: 460px 320px;
  gap: 10px;
  min-width: 0;
}

.vol-row-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 460px;
  min-width: 0;
}

.vol-row-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  height: 320px;
  min-width: 0;
}

.vol-cell {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;        
  overflow: hidden;
}

.vol-cell-volcano  { grid-column: 1; grid-row: 1; }
.vol-cell-sunburst { grid-column: 2; grid-row: 1; }
.vol-cell-table {
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
}
.vol-cell-boxplot  { grid-column: 2; grid-row: 1; }
#volcano-boxplot {
  flex: 1;
  min-height: 0;
}


.vol-cell-table .vol-table-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.vol-table-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;        /* ← critical for flex scroll */
}

.vol-cell-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  flex-shrink: 0;       /* ← don't let title shrink */
}

/* ── count pills in scatter header ── */
.vol-counts {
  margin-left: auto;
  display: flex;
  gap: 5px;
  align-items: center;
}

.volcano-input {
  display: flex;
  align-items: center;
}

.volcano-input input[type="number"] {
  width: 60px;
  font-size: 11px;
  font-family: var(--mono);
  padding: 2px 5px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.stat-pill {
  padding: 1px 8px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}
.stat-pill.up { background: #d4edda; color: #1a6b35; }
.stat-pill.dn { background: #fddede; color: #8b1a1a; }
.stat-pill.ns { background: var(--surface-2); color: var(--text-3); }

/* ── Results table ── */
.results-table th.sortable       { cursor: pointer; user-select: none; }
.results-table th.sortable:hover { color: var(--accent); }
.results-table th.sorted-desc::after { content: ' ↓'; color: var(--accent); }
.results-table th.sorted-asc::after  { content: ' ↑'; color: var(--accent); }

.results-table tbody tr {
  border-bottom: 1px solid var(--border-lt);
  cursor: pointer;
  transition: background 0.1s;
}
.results-table tbody tr.selected { background: var(--accent-lt); }

.mono { font-family: var(--mono); }
.analyte-link       { color: var(--accent); text-decoration: none; }
.analyte-link:hover { text-decoration: underline; }
.fc-up { color: #1a6b35;}
.fc-dn { color: #8b1a1a;}

.dir-badge {
  display: inline-block;
  width: 18px; height: 18px; line-height: 18px;
  text-align: center; border-radius: 50%;
  font-size: 11px; font-weight: 700;
}
.dir-badge.dir-pos { background: #d4edda; color: #1a6b35; }
.dir-badge.dir-neg { background: #fddede; color: #8b1a1a; }
.dir-badge.dir-ns  { background: var(--surface-2); color: var(--text-3); }

.table-empty, .table-loading-row td {
  padding: 20px 10px;
  color: var(--text-3);
  font-style: italic;
  text-align: center;
}