:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #172033;
  --muted: #667085;
  --line: #dfe4ec;
  --surface: #ffffff;
  --accent: #3159d9;
  --accent-dark: #2447b9;
  --accent-soft: #eef2ff;
  --success: #12715b;
  --success-soft: #e8f6f1;
  --warning: #9a5b08;
  --warning-soft: #fff4dd;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f5f7fb; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(49, 89, 217, 0.26); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.52; }
.app-shell { min-height: 100vh; }
.topbar { height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 30px; background: #111827; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-block { display: flex; align-items: center; min-width: 0; }
.brand-heading { margin: 0; line-height: 0; }
.brand-link { display: inline-block; border-radius: 8px; }
.brand-link:focus-visible { outline: 3px solid #a7c7ff; outline-offset: 4px; }
.brand-logo { display: block; width: auto; height: 80px; border-radius: 8px; background: #fff; object-fit: contain; }
.privacy-chip { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.07); color: #e7ebf3; font-size: 12.5px; font-weight: 600; }
.privacy-dot { width: 8px; height: 8px; border-radius: 999px; background: #52d7a5; box-shadow: 0 0 0 4px rgba(82,215,165,.12); }
.workspace { display: grid; grid-template-columns: 238px minmax(0,1fr); min-height: calc(100vh - 96px); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 24px 14px 18px; display: flex; flex-direction: column; }
.sidebar-label { padding: 0 12px 10px; color: #98a2b3; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.workflow-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #475467; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 9px; text-align: left; font-size: 13.5px; font-weight: 600; }
.nav-item:hover { background: #f8fafc; color: #344054; }
.nav-item.active { background: var(--accent-soft); color: #2748bd; }
.nav-index { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #d0d5dd; border-radius: 7px; font-size: 11px; background: #fff; color: #667085; }
.nav-item.active .nav-index { background: var(--accent); border-color: var(--accent); color: #fff; }
.sidebar-status { margin-top: auto; border-top: 1px solid #eaecf0; padding: 18px 10px 0; display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start; }
.sidebar-status strong, .sidebar-status span { display: block; }
.sidebar-status strong { font-size: 11.5px; line-height: 1.4; color: #344054; }
.sidebar-status span { margin-top: 3px; font-size: 10.5px; color: #98a2b3; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; margin-top: 4px; background: #f79009; }
.status-dot.ok { background: #12b76a; }
.main-content { width: min(1320px, 100%); padding: 38px 44px 56px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 24px; }
.page-heading h2 { margin: 4px 0 8px; color: var(--navy); font-size: clamp(25px, 3vw, 34px); line-height: 1.14; letter-spacing: -.035em; }
.page-heading p { margin: 0; max-width: 760px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: .1em; font-weight: 800; }
.local-card { flex: 0 0 260px; border: 1px solid #b8e6d4; background: #effaf6; border-radius: 12px; padding: 13px 15px; }
.local-card strong, .local-card span { display: block; }
.local-card strong { color: #146c57; font-size: 13px; margin-bottom: 4px; }
.local-card span { color: #4d7167; font-size: 11.5px; line-height: 1.45; }
.action-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); margin-bottom: 18px; }
.action-copy h3, .card h3 { margin: 0 0 5px; color: #253047; font-size: 15px; }
.action-copy p, .card-heading p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.button-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.button-row.compact { gap: 3px; }
.primary-button, .secondary-button, .text-button, .danger-text-button, .icon-button { border-radius: 8px; font-weight: 700; transition: .14s ease; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 9px 14px; font-size: 12.5px; box-shadow: 0 1px 2px rgba(49,89,217,.22); }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.secondary-button { border: 1px solid #cfd5df; background: #fff; color: #344054; padding: 9px 14px; font-size: 12.5px; }
.secondary-button:hover { background: #f8fafc; }
.text-button, .danger-text-button { border: 0; background: transparent; padding: 7px 9px; font-size: 11.5px; }
.text-button { color: var(--accent); }
.danger-text-button { color: var(--danger); }
.icon-button { border: 0; background: transparent; width: 30px; height: 30px; color: #98a2b3; font-size: 18px; }
.icon-button:hover { background: #f2f4f7; color: #475467; }
.error-banner { margin-bottom: 18px; border: 1px solid #fecdca; background: #fef3f2; color: #912018; border-radius: 10px; padding: 11px 13px; font-size: 12.5px; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 14px 15px; }
.summary-card > span { display: block; color: #667085; font-size: 11.5px; margin-bottom: 7px; }
.summary-card strong { display: block; color: #253047; font-size: 20px; letter-spacing: -.02em; }
.summary-card small { display: block; margin-top: 5px; color: #98a2b3; font-size: 10.5px; line-height: 1.35; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.modality-list { display: flex; flex-wrap: wrap; gap: 8px; }
.modality-pill { display: flex; gap: 12px; align-items: center; padding: 7px 9px 7px 11px; border: 1px solid #e1e6ef; background: #fafbfc; border-radius: 8px; font-size: 11.5px; color: #475467; }
.modality-pill strong { min-width: 24px; padding: 2px 6px; border-radius: 6px; text-align: center; background: #eef2ff; color: #3159d9; font-size: 10.5px; }
.table-card { padding-bottom: 8px; }
.table-scroll { overflow: auto; max-height: 430px; border: 1px solid #eaecf0; border-radius: 9px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #667085; font-weight: 700; text-align: left; padding: 9px 11px; border-bottom: 1px solid #e4e7ec; white-space: nowrap; }
td { padding: 9px 11px; border-bottom: 1px solid #f0f2f5; color: #475467; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.file-name { display: block; max-width: 410px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #344054; font-weight: 600; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; font-size: 10px; font-weight: 800; }
.tag.success { background: var(--success-soft); color: var(--success); }
.tag.warning { background: var(--warning-soft); color: var(--warning); }
.tag.neutral { background: #f2f4f7; color: #475467; }
.empty-state, .empty-results { min-height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #667085; }
.empty-state { border: 1px dashed #d0d5dd; border-radius: 9px; background: #fcfcfd; }
.empty-state strong { color: #344054; font-size: 13px; margin: 4px 0; }
.empty-state span { font-size: 11.5px; max-width: 480px; }
.empty-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; background: #eef2ff; color: #3159d9; font-size: 20px; margin-bottom: 7px; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 5px 2px 0; }
.page-actions strong, .page-actions span { display: block; }
.page-actions strong { color: #344054; font-size: 12px; }
.page-actions span { margin-top: 3px; color: #98a2b3; font-size: 10.5px; }
.migration-card { max-width: 820px; padding: 26px; }
.migration-card h3 { margin-top: 13px; font-size: 19px; }
.migration-card > p { color: #667085; font-size: 13px; line-height: 1.65; max-width: 720px; }
.migration-checks { margin-top: 20px; display: grid; gap: 9px; }
.migration-checks > div { display: flex; gap: 10px; align-items: center; color: #475467; font-size: 12px; }
.check { width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; background: #f2f4f7; color: #667085; font-weight: 800; }
.check.done { background: #eaf7f2; color: #12715b; }
.docs-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.docs-grid .card { margin: 0; }
.docs-grid p, .empty-results p { color: #667085; font-size: 12.5px; line-height: 1.6; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { padding-inline: 9px; }
  .sidebar-label, .nav-item > span:last-child, .sidebar-status div { display: none; }
  .nav-item { justify-content: center; padding-inline: 0; }
  .nav-index { width: 34px; height: 34px; }
  .sidebar-status { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
  .main-content { padding-inline: 26px; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .topbar { height: auto; min-height: 80px; padding: 8px 12px; }
  .brand-logo { height: 64px; }
  .privacy-chip { font-size: 0; padding: 9px; }
  .workspace { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 10; border-right: 0; border-bottom: 1px solid var(--line); padding: 7px 10px; overflow-x: auto; }
  .sidebar-label, .sidebar-status { display: none; }
  .workflow-nav { display: flex; min-width: max-content; }
  .nav-item { width: auto; padding: 6px; }
  .nav-index { width: 30px; height: 30px; }
  .main-content { padding: 24px 16px 40px; }
  .page-heading, .action-panel, .page-actions { flex-direction: column; align-items: stretch; }
  .local-card { flex-basis: auto; }
  .summary-grid, .docs-grid { grid-template-columns: 1fr; }
  .button-row > button { flex: 1; }
}
select { font: inherit; }
select:focus-visible { outline: 3px solid rgba(49, 89, 217, 0.26); outline-offset: 2px; }
.notice-banner { margin-bottom: 18px; display: flex; gap: 8px; align-items: baseline; border: 1px solid #fedf89; background: #fffaeb; color: #7a4d08; border-radius: 10px; padding: 11px 13px; font-size: 12.5px; }
.notice-banner span { color: #8a641f; }
.notice-banner code { font-size: 11px; background: rgba(255,255,255,.75); border: 1px solid #f5d48c; border-radius: 4px; padding: 1px 4px; }
.config-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.config-block { border: 1px solid #e4e7ec; background: #fbfcfe; border-radius: 10px; padding: 14px; min-width: 0; }
.config-block.stacked { display: grid; gap: 13px; }
.config-block.muted-block { background: #f9fafb; }
.config-block > div > strong, .config-heading strong { display: block; color: #344054; font-size: 12.5px; }
.config-block > div > span, .config-heading small { display: block; margin-top: 3px; color: #7b8494; font-size: 10.5px; line-height: 1.45; }
.config-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.config-block label:not(.check-label), .form-grid label { display: grid; gap: 5px; color: #667085; font-size: 10.5px; font-weight: 700; }
.config-block select, .form-grid select { width: 100%; min-width: 0; border: 1px solid #d0d5dd; background: #fff; color: #344054; border-radius: 8px; padding: 8px 28px 8px 9px; font-size: 11.5px; }
.check-label { display: flex; gap: 9px; align-items: flex-start; color: #344054; }
.check-label input { margin-top: 2px; accent-color: var(--accent); }
.check-label span { min-width: 0; }
.check-label strong, .check-label small { display: block; }
.check-label strong { color: #344054; font-size: 12px; }
.check-label small { margin-top: 3px; color: #98a2b3; font-size: 10.5px; line-height: 1.4; font-weight: 500; }
.standalone-check { margin-top: 14px; padding: 12px 13px; border-radius: 9px; background: #f8fafc; border: 1px solid #eaecf0; }
.run-row { margin-top: 16px; padding-top: 15px; border-top: 1px solid #eaecf0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.run-row strong, .run-row span { display: block; }
.run-row strong { color: #344054; font-size: 11.5px; }
.run-row span { margin-top: 3px; color: #98a2b3; font-size: 10.5px; }
.progress-card { margin-bottom: 18px; padding: 13px 15px; background: #eef2ff; border: 1px solid #d7defb; border-radius: 10px; display: grid; grid-template-columns: minmax(0,1fr) minmax(180px, 38%); gap: 16px; align-items: center; }
.progress-copy strong, .progress-copy span { display: block; }
.progress-copy strong { color: #3047a6; font-size: 11.5px; }
.progress-copy span { color: #6675af; font-size: 10.5px; margin-top: 3px; }
.progress-card progress { width: 100%; height: 8px; accent-color: var(--accent); }
.inline-status { display: flex; gap: 12px; align-items: center; min-height: 52px; }
.inline-status strong, .inline-status span { display: block; }
.inline-status strong { color: #344054; font-size: 12px; }
.inline-status span { margin-top: 3px; color: #98a2b3; font-size: 10.5px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d0d5dd; border-top-color: var(--accent); animation: insight-spin .8s linear infinite; }
@keyframes insight-spin { to { transform: rotate(360deg); } }
.compact-grid { margin: 0 0 14px; }
.details-block { border-top: 1px solid #eaecf0; padding-top: 12px; }
.details-block summary { cursor: pointer; color: #475467; font-size: 11.5px; font-weight: 700; }
.metadata-preview { margin-top: 10px; max-height: 260px; }
.qc-table { max-height: 460px; }
.result-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 26px 0 12px; }
.result-heading h3 { margin: 3px 0 4px; color: #253047; font-size: 18px; }
.result-heading p { margin: 0; color: #667085; font-size: 11.5px; }
.result-card { display: flex; justify-content: space-between; gap: 22px; align-items: center; }
.result-card h3 { margin-top: 10px; }
.result-card p { margin: 5px 0 0; color: #667085; font-size: 12px; line-height: 1.55; }
@media (max-width: 1120px) {
  .config-grid { grid-template-columns: 1fr 1fr; }
  .config-block:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .config-grid, .form-grid { grid-template-columns: 1fr; }
  .config-block:first-child { grid-column: auto; }
  .run-row, .result-heading, .result-card, .progress-card { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
}

/* W3 metadata-defined corrected expression comparison */
.compare-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.exclusion-grid, .expression-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.multi-select { min-height: 104px; padding-right: 8px !important; }
.config-block input[type="number"], .form-grid input[type="number"] {
  width: 100%; min-width: 0; border: 1px solid #d0d5dd; background: #fff; color: #344054;
  border-radius: 8px; padding: 8px 9px; font-size: 11.5px;
}
.advanced-settings { margin-top: 14px; border: 1px solid #e4e7ec; border-radius: 10px; background: #fbfcfe; padding: 11px 13px; }
.advanced-settings summary { cursor: pointer; color: #475467; font-size: 11.5px; font-weight: 700; }
.advanced-settings > p { margin: 9px 0 0; color: #98a2b3; font-size: 10.5px; line-height: 1.45; }
.advanced-grid { margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analysis-warnings { display: grid; gap: 6px; margin: 0 0 14px; }
.analysis-warnings > div { border: 1px solid #fedf89; background: #fffaeb; color: #7a4d08; border-radius: 8px; padding: 8px 10px; font-size: 10.5px; line-height: 1.45; }
.plot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.plot-card { border: 1px solid #e4e7ec; border-radius: 10px; background: #fcfcfd; min-width: 0; overflow: hidden; }
.plot-heading { padding: 11px 12px 9px; border-bottom: 1px solid #eaecf0; }
.plot-heading strong, .plot-heading span { display: block; }
.plot-heading strong { color: #344054; font-size: 11.5px; }
.plot-heading span { margin-top: 3px; color: #98a2b3; font-size: 9.5px; line-height: 1.4; }
.plot-scroll { overflow: auto; max-width: 100%; background: #fff; }
.dendro-scroll { max-height: 620px; }
.science-plot { display: block; width: 100%; min-width: 520px; height: auto; }
.science-plot.dendrogram { min-width: 720px; }
.plot-axis { stroke: #d0d5dd; stroke-width: 1; }
.plot-label, .dendro-label { fill: #667085; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 10px; }
.dendro-label { font-size: 8px; }
.dendro-line { stroke: #98a2b3; stroke-width: 1; fill: none; }
.case-point { fill: #3159d9; stroke: #fff; stroke-width: 1; }
.control-point { fill: #12a078; stroke: #fff; stroke-width: 1; }
.plot-legend { display: flex; gap: 14px; padding: 8px 12px 10px; color: #667085; font-size: 9.5px; }
.plot-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.plot-empty { min-height: 140px; display: grid; place-items: center; padding: 20px; color: #98a2b3; font-size: 11px; text-align: center; }
.comparison-result { margin-bottom: 20px; }
.result-details { margin-top: 12px; }
.differential-table { margin-top: 10px; max-height: 520px; }
.table-note, .method-note { margin: 8px 0 0; color: #98a2b3; font-size: 9.5px; line-height: 1.45; }

@media (max-width: 1120px) {
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .compare-grid .config-block:first-child { grid-column: 1 / -1; }
  .plot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .compare-grid, .exclusion-grid, .expression-source-grid, .advanced-grid { grid-template-columns: 1fr; }
  .compare-grid .config-block:first-child { grid-column: auto; }
}

/* W3 interactive scientific plots */
.plot-shell { min-width: 0; }
.plot-toolbar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid #eaecf0; background: #fff; }
.plot-tool-button { min-width: 30px; min-height: 28px; padding: 4px 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #344054; font: inherit; font-size: 10px; font-weight: 600; cursor: pointer; }
.plot-tool-button:hover { background: #f9fafb; }
.plot-tool-button:focus-visible, .plot-legend-button:focus-visible { outline: 2px solid #3159d9; outline-offset: 2px; }
.plot-toolbar-hint { margin-left: auto; color: #98a2b3; font-size: 9px; }
.interactive-plot-scroll { max-height: 620px; cursor: grab; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.interactive-plot-scroll.is-dragging { cursor: grabbing; user-select: none; }
.interactive-plot-scroll .science-plot { transform-origin: top left; }
.plot-legend { flex-wrap: wrap; }
.plot-legend-button { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 4px 7px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #667085; font: inherit; font-size: 9.5px; cursor: pointer; }
.plot-legend-button:hover { background: #f9fafb; border-color: #eaecf0; }
.plot-legend-button.is-hidden { opacity: 0.42; text-decoration: line-through; }
.legend-dot.case-point { background: #3159d9; }
.legend-dot.control-point { background: #12a078; }
@media (max-width: 720px) {
  .plot-toolbar { flex-wrap: wrap; }
  .plot-toolbar-hint { width: 100%; margin-left: 0; }
  .plot-tool-button, .plot-legend-button { min-height: 36px; }
}

/* W4 longitudinal patient-signature workflow */
.longitudinal-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.longitudinal-result { margin-bottom: 20px; }
.longitudinal-tree-card { margin: 14px 0; }
.longitudinal-tree-note { padding: 8px 12px; border-bottom: 1px solid #eaecf0; background: #fff; color: #667085; font-size: 9.5px; }
.longitudinal-dendrogram-scroll { max-height: 680px; overflow: auto; background: #fff; }
.science-plot.longitudinal-dendrogram { width: auto; min-width: 980px; height: auto; }
.longitudinal-leaf-label { font-size: 9px; }
.longitudinal-table { max-height: 520px; }
@media (max-width: 720px) {
  .longitudinal-role-grid { grid-template-columns: 1fr; }
}

/* W5 significant-hit post-selection workflow */
.hit-settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.significant-result { margin-bottom: 20px; }
.hit-heatmap-card { margin-top: 14px; overflow: hidden; }
.significant-heatmap-scroll { overflow: auto; max-width: 100%; max-height: 680px; background: #fff; border-top: 1px solid #eaecf0; }
.significant-heatmap { border-collapse: separate; border-spacing: 0; font-size: 9px; width: max-content; min-width: 100%; }
.significant-heatmap th, .significant-heatmap td { border-right: 1px solid rgba(255,255,255,.45); border-bottom: 1px solid rgba(255,255,255,.45); }
.heatmap-feature-head, .heatmap-feature-label { position: sticky; left: 0; z-index: 3; min-width: 170px; max-width: 240px; padding: 5px 8px; background: #fff; text-align: left; border-right: 1px solid #eaecf0 !important; }
.heatmap-feature-head { top: 0; z-index: 5; vertical-align: bottom; }
.heatmap-annotation-label { top: 88px; }
.heatmap-feature-label strong { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; font-size: 9.5px; }
.heatmap-feature-label span { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #98a2b3; font-size: 8px; }
.heatmap-sample-head { position: sticky; top: 0; z-index: 2; width: 15px; min-width: 15px; height: 88px; background: #fff; vertical-align: bottom; padding: 0; }
.heatmap-sample-head span { display: inline-block; max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); color: #667085; font-size: 7.5px; padding: 4px 2px; }
.heatmap-group-cell { position: sticky; top: 88px; z-index: 2; width: 15px; min-width: 15px; height: 8px; padding: 0; }
.heatmap-group-cell.case-heat { background: #3159d9; }
.heatmap-group-cell.control-heat { background: #12a078; }
.heatmap-cell { width: 15px; min-width: 15px; height: 15px; padding: 0; }
.heatmap-scale { display: flex; align-items: center; gap: 7px; padding: 8px 12px 10px; color: #667085; font-size: 9px; border-top: 1px solid #eaecf0; background: #fff; }
.heatmap-scale small { margin-left: 4px; color: #98a2b3; }
.heatmap-gradient { width: 140px; height: 9px; border-radius: 999px; background: linear-gradient(90deg, rgba(49,89,217,.88), rgba(255,255,255,1), rgba(196,60,60,.88)); border: 1px solid #eaecf0; }
@media (max-width: 900px) {
  .hit-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .hit-settings-grid { grid-template-columns: 1fr; }
}

/* UX1 local project persistence, drag/drop, and browser History */
.project-heading-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.project-heading-actions .local-card { flex-basis: 260px; }
.state-actions { justify-content: flex-end; }
.input-drop-zone { transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.input-drop-zone.is-dragover { border-color: #3159d9; background: #f5f7ff; box-shadow: 0 0 0 3px rgba(49,89,217,.10); }
.drop-hint { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; margin: 0 0 12px; border: 1px dashed #c9d2e1; border-radius: 9px; background: #fbfcfe; color: #667085; pointer-events: none; }
.drop-hint-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #eef2ff; color: #3159d9; font-size: 16px; font-weight: 800; }
.drop-hint strong, .drop-hint span { display: block; }
.drop-hint strong { color: #344054; font-size: 11px; }
.drop-hint span { margin-top: 2px; color: #98a2b3; font-size: 9.5px; }
.history-card { padding-bottom: 10px; }
.history-list { display: grid; }
.history-entry { display: flex; align-items: center; gap: 18px; padding: 14px 2px; border-top: 1px solid #eaecf0; }
.history-entry:first-child { border-top: 0; }
.history-entry-main { min-width: 0; flex: 1; }
.history-entry-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.history-entry-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; font-size: 12px; }
.history-entry-main > span, .history-entry-main > small { display: block; margin-top: 4px; color: #667085; font-size: 10.5px; line-height: 1.4; }
.history-entry-main > small { color: #98a2b3; font-size: 9.5px; }
.history-entry-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .project-heading-actions { justify-content: flex-start; }
  .state-actions { justify-content: flex-start; }
  .history-entry { align-items: flex-start; flex-direction: column; }
  .history-entry-actions { width: 100%; justify-content: flex-start; }
}

/* Coordinate-aware scientific plot interaction. */
.coordinate-plot { overflow: hidden; }
.coordinate-plot .science-plot { min-width: 0; }
.plot-grid-line { stroke: #eef1f5; stroke-width: 1; }
.plot-tick { fill: #7b8798; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 8.5px; }
.coordinate-plot.is-dragging { cursor: grabbing; }

/* UX2 analysis exploration, tables, docs, and fixed navigation */
@media (min-width: 721px) {
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: start; }
}
.privacy-chip > span:last-child { display: grid; gap: 1px; }
.privacy-chip strong { font-size: 11px; line-height: 1.2; color: #f2f4f7; white-space: nowrap; }
.privacy-chip small { font-size: 9px; line-height: 1.25; color: #aeb8cc; font-weight: 500; white-space: nowrap; }
.scatter-point-label { fill: #344054; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 8.5px; font-weight: 650; paint-order: stroke; stroke: rgba(255,255,255,.94); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.volcano-up { fill: #d64545; stroke: #fff; stroke-width: .8; }
.volcano-down { fill: #3159d9; stroke: #fff; stroke-width: .8; }
.volcano-neutral { fill: #b8c0cc; stroke: #fff; stroke-width: .6; opacity: .72; }
.legend-dot.volcano-up { background: #d64545; }
.legend-dot.volcano-down { background: #3159d9; }
.legend-dot.volcano-neutral { background: #b8c0cc; }
.volcano-cutoff-line { stroke: #7b8798; stroke-width: 1; stroke-dasharray: 5 4; fill: none; pointer-events: none; }
.threshold-card { border-color: #d8def7; }
.threshold-grid { max-width: 620px; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 7px; }
.table-tools label { flex: 1 1 320px; max-width: 520px; }
.table-search, .docs-search-card input[type="search"] { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #344054; padding: 8px 10px; font: inherit; font-size: 11.5px; }
.table-match-count { flex: 0 0 auto; color: #98a2b3; font-size: 9.5px; }
.sortable-table-header { cursor: pointer; user-select: none; padding-right: 22px; }
.sortable-table-header::after { content: '↕'; margin-left: 6px; color: #b0b8c5; font-size: 9px; }
.sortable-table-header[data-sort-direction="asc"]::after { content: '↑'; color: #3159d9; }
.sortable-table-header[data-sort-direction="desc"]::after { content: '↓'; color: #3159d9; }
.sortable-table-header:focus-visible { outline: 2px solid #3159d9; outline-offset: -2px; }
.docs-search-card { display: grid; grid-template-columns: minmax(180px, 260px) minmax(260px, 1fr) auto; align-items: center; gap: 16px; }
.docs-search-card label strong, .docs-search-card label span { display: block; }
.docs-search-card label strong { color: #344054; font-size: 12px; }
.docs-search-card label span { margin-top: 3px; color: #98a2b3; font-size: 10px; }
.docs-search-card small { color: #667085; font-size: 10px; white-space: nowrap; }
.docs-toc { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.docs-toc a { display: inline-flex; padding: 5px 8px; border: 1px solid #dfe4ec; border-radius: 7px; background: #fff; color: #475467; font-size: 9.5px; text-decoration: none; }
.docs-toc a:hover { border-color: #bdc8e8; color: #2748bd; }
.docs-methods { display: grid; gap: 14px; }
.docs-section { scroll-margin-top: 18px; }
.docs-section > p { margin: 10px 0 0; color: #58657a; font-size: 12.5px; line-height: 1.7; }
.docs-section[hidden] { display: none; }
.docs-anchor { text-decoration: none; font-size: 15px; }
.docs-references { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eaecf0; }
.docs-references > strong { display: block; color: #475467; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.docs-references ol { margin: 7px 0 0; padding-left: 20px; }
.docs-references li, .docs-references p { margin: 4px 0; color: #667085; font-size: 10.5px; line-height: 1.5; }
.docs-references a { color: #3159d9; text-decoration: none; }
.docs-references a:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .docs-search-card { grid-template-columns: 1fr; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-tools label { max-width: none; width: 100%; }
  .privacy-chip small { display: none; }
}

/* UX3 global resource settings */
.system-chip { cursor: pointer; text-align: left; }
.system-chip:hover { border-color: rgba(255,255,255,.45); }
.resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.resource-grid label { display: flex; flex-direction: column; gap: 7px; }
.resource-grid input { width: 100%; }
.resource-check { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; font-size: 12px; color: #475467; }
.resource-actions { margin-top: 18px; }
@media (max-width: 720px) { .resource-grid { grid-template-columns: minmax(0, 1fr); } }

/* UX5: browser memory reading is distinct from system RAM. */
.resource-memory-status { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 6px; font-size: 12px; }
.resource-memory-status strong { color: #344054; }
.resource-memory-status span { color: #667085; }

/* UX6: fixed desktop navigation, with the status always visible. */
@media (min-width: 721px) {
  .topbar { position: sticky; top: 0; z-index: 30; }
  .workspace { grid-template-columns: 238px minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 96px; bottom: 0; left: 0; width: 238px;
    height: calc(100dvh - 96px); min-height: 0; overflow: hidden;
  }
  .workflow-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
  .sidebar-status { flex: 0 0 auto; margin-top: 0; }
  .main-content { grid-column: 2; min-width: 0; }
}
.state-reconnect-panel {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 18px; padding: 14px 16px;
  border: 1px solid #cbd7ed; border-radius: 10px; background: #f8faff;
}
.state-reconnect-panel > div { flex: 1 1 310px; min-width: 0; }
.state-reconnect-panel strong, .state-reconnect-panel span, .state-reconnect-panel small { display: block; }
.state-reconnect-panel strong { font-size: 12.5px; color: #253047; }
.state-reconnect-panel span { margin-top: 4px; font-size: 12px; color: #475467; }
.state-reconnect-panel small { margin-top: 6px; font-size: 11px; color: #667085; }
.state-reconnect-warning { flex-basis: 100%; }

/* M1: local XLSX merger */
.merge-metric-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 9px 0 15px; }
.merge-metric-list .check-label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.merge-settings-grid { margin-bottom: 12px; }
.merge-settings-grid select { max-width: 410px; }
#merge-progress:not(:empty) { margin: 14px 0; padding: 10px 12px; background: #f5f8ff; color: #30435e; border-radius: 8px; font-size: 12px; }
.muted-note { color: #667085; font-size: 11px; line-height: 1.6; margin-top: 12px; }
@media (max-width: 720px) { .merge-metric-list { grid-template-columns: 1fr; } }

/* MD1 — local sample metadata workspace. Keep the table compact for large cohorts. */
.metadata-start-grid { grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.6fr); }
.metadata-start-buttons { align-self: end; }
.metadata-summary-grid { margin-top: 6px; }
.metadata-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.metadata-action-grid { grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto; align-items: end; margin: 14px 0; }
.metadata-columns { margin-top: 16px; }
.metadata-check { align-self: end; padding: 10px 0; }
.metadata-list-meta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; margin: 12px 0 9px; }
.metadata-grid-scroll { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.metadata-editor-table { border-collapse: separate; border-spacing: 0; min-width: 100%; width: max-content; }
.metadata-editor-table thead th { position: sticky; top: 0; z-index: 2; background: #f3f6fb; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.metadata-editor-table th, .metadata-editor-table td { padding: 5px 8px; border-right: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; font-size: 12px; max-width: 380px; }
.metadata-editor-table tr:hover td { background: #f9fbff; }
.metadata-editor-table td:first-child { background: #f8fafc; color: var(--muted); }
.metadata-editor-table input { min-width: 110px; width: 170px; padding: 7px 8px; border: 1px solid transparent; border-radius: 5px; color: var(--navy); background: transparent; font: inherit; }
.metadata-editor-table input:hover { border-color: #d0d9e9; background: #fff; }
.metadata-editor-table input:focus { background: #fff; border-color: #3159d9; outline: 2px solid rgba(49,89,217,.18); }
.metadata-editor-table .mapping-sample { width: 230px; }
.metadata-sort { padding: 2px 4px; margin-left: 4px; border: 0; background: transparent; color: var(--accent); }
.metadata-row-index { min-width: 45px; }
@media (max-width: 920px) {
  .metadata-start-grid, .metadata-filter-grid, .metadata-action-grid { grid-template-columns: 1fr; }
  .metadata-start-buttons { flex-wrap: wrap; }
}

/* MD2 — continuous, virtualized tables. Keep header and row heights stable. */
.metadata-grid-scroll { height: min(520px, 64vh); max-height: none; overscroll-behavior: contain; }
.metadata-editor-table { border-collapse: separate; border-spacing: 0; }
.metadata-editor-table tbody tr:not(.virtual-spacer) { height: 48px; }
.metadata-editor-table tbody tr:not(.virtual-spacer) td { height: 48px; padding-top: 0; padding-bottom: 0; box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metadata-editor-table tbody input { box-sizing: border-box; max-width: 100%; }
.metadata-editor-table .metadata-row-index { width: 62px; }
.metadata-editor-table .danger-text-button { white-space: nowrap; }
.table-scroll[data-dynamic-table] { height: min(520px, 64vh); max-height: none; overscroll-behavior: contain; }
.table-scroll[data-dynamic-table] tbody tr:not(.virtual-spacer) { height: 40px; }
.table-scroll[data-dynamic-table] tbody tr:not(.virtual-spacer) td { height: 40px; box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.virtual-spacer { height: auto !important; pointer-events: none; }
.virtual-spacer td { padding: 0 !important; border: 0 !important; background: transparent !important; height: 0; }
@media (max-width: 720px) {
  .metadata-grid-scroll, .table-scroll[data-dynamic-table] { height: min(420px, 58vh); }
}

/* Worked Docs examples: compact by default; expand with keyboard or pointer. */
.docs-toy-example { margin-top: 15px; border: 1px solid #dbe5f5; background: #f8faff; border-radius: 10px; overflow: clip; }
.docs-toy-example > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 14px; color: #1d3e7b; font-size: 12px; font-weight: 700; list-style: none; }
.docs-toy-example > summary::-webkit-details-marker { display: none; }
.docs-toy-example > summary::after { content: '+'; margin-left: auto; font-size: 16px; }
.docs-toy-example[open] > summary::after { content: '−'; }
.docs-toy-example > summary:focus-visible { outline: 3px solid rgba(49,89,217,.4); outline-offset: -3px; }
.docs-toy-marker { flex: 0 0 auto; display: inline-grid; place-items: center; padding: 3px 5px; background: #e4ecff; border-radius: 5px; color: #3159d9; font-size: 9px; letter-spacing: .03em; }
.docs-toy-content { padding: 4px 14px 14px; color: #4b5870; font-size: 12px; line-height: 1.6; }
.docs-toy-question { margin: 4px 0 12px; font-weight: 600; color: #283b58; }
.docs-toy-table-wrap { width: 100%; overflow-x: auto; border-radius: 8px; border: 1px solid #dce4f2; }
.docs-toy-table { width: 100%; border-collapse: collapse; background: white; font-size: 11px; }
.docs-toy-table th { text-align: left; background: #f0f4fb; color: #344565; font-weight: 700; }
.docs-toy-table td, .docs-toy-table th { padding: 9px 10px; border-bottom: 1px solid #edf1f7; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.docs-toy-table tr:last-child td { border-bottom: 0; }
.docs-toy-subheading { display: block; margin-top: 13px; color: #263c5d; }
.docs-toy-steps { padding-left: 22px; margin: 6px 0 12px; }
.docs-toy-steps li { padding: 2px 0; }
.docs-toy-meaning, .docs-toy-limit { margin: 8px 0; }
.docs-toy-meaning { padding: 9px 11px; background: #eaf5f1; border-radius: 7px; color: #23604d; }
.docs-toy-limit { color: #855c1c; }
.docs-toy-note { display: block; margin-top: 9px; font-size: 10px; color: #68748b; }
@media (max-width: 720px) { .docs-toy-content { padding-inline: 10px; } .docs-toy-table td, .docs-toy-table th { padding: 7px 8px; } }

/* MD4 visual-first teaching examples: vector graphics, no chart dependencies. */
.docs-toy-marker { min-width: 35px; letter-spacing: .05em; }
.docs-toy-example > summary { font-size: 12.5px; }
.docs-toy-content { padding-top: 8px; }
.docs-toy-question { font-size: 13px; }
.docs-visual-figure { margin: 12px 0 15px; padding: 12px; background: #fff; border: 1px solid #dbe5f1; border-radius: 10px; }
.docs-visual-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 9px; }
.docs-visual-head strong { font-size: 13px; color: #273b5b; }
.docs-visual-head span { color: #68758d; font-size: 10.5px; white-space: nowrap; }
.docs-visual-overflow { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.docs-visual-svg { display: block; width: 100%; min-width: 500px; height: auto; border-radius: 10px; }
.docs-visual-figure figcaption { margin-top: 8px; color: #415571; font-size: 12px; line-height: 1.6; }
.docs-visual-figure figcaption strong { color: #1d467f; }
.docs-visual-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 12px; background: #f5f8fd; border: 1px solid #e2eaf6; border-radius: 9px; margin-top: 9px; }
.docs-visual-controls label { flex: 1 1 190px; display: grid; gap: 5px; color: #344769; font-size: 11.5px; font-weight: 700; }
.docs-visual-controls input[type="range"] { width: 100%; accent-color: #3159d9; cursor: pointer; }
.docs-visual-controls output { font-variant-numeric: tabular-nums; }
.docs-visual-count { width: 100%; font-size: 12px; color: #176b56; font-weight: 700; }
.docs-toy-math { border: 1px solid #dce5f2; background: #fff; border-radius: 8px; margin: 13px 0 8px; }
.docs-toy-math > summary { color: #2854a7; cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 12px; }
.docs-toy-math > summary:focus-visible { outline: 3px solid rgba(49,89,217,.35); outline-offset: -3px; }
.docs-toy-math[open] { padding-bottom: 12px; }
.docs-toy-math .docs-toy-table-wrap, .docs-toy-math .docs-toy-subheading, .docs-toy-math .docs-toy-steps { margin-inline: 12px; }
.docs-toy-meaning { margin: 10px 0; }
@media (max-width: 720px) {
  .docs-visual-figure { padding: 9px; }
  .docs-visual-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .docs-visual-svg { min-width: 540px; }
  .docs-visual-controls { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .docs-visual-controls input { scroll-behavior: auto; }
}

/* UX10: focused results overview. Full result plots and tables remain in Detailed Results. */
.results-view-switch { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:.9rem 0 1.15rem; }
.results-view-switch button { border:1px solid #cbd5e1; border-radius:999px; background:transparent; color:inherit; padding:.55rem 1rem; font:inherit; font-weight:650; cursor:pointer; }
.results-view-switch button[aria-pressed="true"] { background:#2755d7; border-color:#2755d7; color:#fff; }
.results-view-switch button:focus-visible, .overview-open-details:focus-visible { outline:3px solid #f59e0b; outline-offset:3px; }
.results-nav-note { color:#64748b; font-size:.89rem; margin:.5rem 0 1.2rem; }
.overview-intro { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; }
.overview-intro h3 { font-size:1.2rem; margin:.35rem 0 .55rem; }
.overview-intro p { color:#526174; max-width:65ch; }
.overview-at-a-glance { flex:none; min-width:115px; text-align:center; padding:1rem; border:1px solid #dbe7f2; border-radius:12px; }
.overview-at-a-glance strong { display:block; font-size:2rem; color:#2454c5; line-height:1.15; }
.overview-at-a-glance span { display:block; font-size:.74rem; color:#64748b; }
.overview-modality-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1rem 0; align-items:start; }
.overview-modality { min-width:0; padding:1.2rem; }
.overview-modality-heading { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:space-between; align-items:start; }
.overview-modality-heading h3 { font-size:1.12rem; margin:.2rem 0 .6rem; }
.overview-kicker { color:#64748b; font-size:.75rem; }
.overview-summary-row { display:grid; grid-template-columns:minmax(110px,0.38fr) 1fr; gap:1rem; margin:.3rem 0 1rem; }
.overview-big-number strong { display:block; font-size:1.7rem; line-height:1.1; color:#1d4ed8; }
.overview-big-number span { display:block; font-size:.79rem; font-weight:700; }
.overview-big-number small { font-size:.7rem; color:#64748b; }
.overview-takeaway { font-size:.83rem; line-height:1.45; margin:0; color:#334155; }
.overview-chart-wrap { width:100%; overflow-x:auto; }
.overview-figure { margin:0; width:100%; }
.overview-svg { display:block; width:100%; height:auto; min-width:280px; }
.overview-svg-name { font:600 13px system-ui,-apple-system,sans-serif; fill:#334155; }
.overview-svg-small { font:11px system-ui,-apple-system,sans-serif; fill:#64748b; }
.overview-svg-tick { font:10px system-ui,-apple-system,sans-serif; fill:#64748b; }
.overview-figure figcaption { display:flex; flex-wrap:wrap; gap:.5rem .9rem; margin:.25rem 0 .6rem; font-size:.72rem; line-height:1.4; color:#64748b; }
.overview-legend { display:inline-flex; align-items:center; gap:.25rem; }
.overview-legend i { display:inline-block; height:8px; width:8px; border-radius:50%; background:var(--legend-color); }
.overview-footer { display:flex; gap:1rem; align-items:center; justify-content:space-between; border-top:1px solid #e2e8f0; padding-top:.8rem; }
.overview-footer p { font-size:.74rem; margin:0; color:#64748b; line-height:1.45; max-width:55ch; }
.overview-footer button { flex-shrink:0; font-size:.8rem; }
.overview-errors p { overflow-wrap:anywhere; }
.overview-method-note { font-size:.78rem; color:#64748b; margin:1.1rem 0; }
.overview-detail-charts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr)); gap:1rem; margin:1rem 0; }
.overview-extra-plot { margin:1rem 0; }
.overview-empty { padding:1rem; color:#64748b; }
.result-ready-card { display:flex; gap:1.2rem; align-items:center; justify-content:space-between; }
.result-ready-card p { margin:.3rem 0; color:#64748b; }
@media (max-width:1120px) { .overview-modality-grid { grid-template-columns:1fr; } }
@media (max-width:650px) { .overview-summary-row{grid-template-columns:1fr;} .overview-footer{align-items:start; flex-direction:column;} .overview-intro{align-items:start; flex-direction:column;} .result-ready-card{align-items:start; flex-direction:column;} }

/* UX11: responsive result controls. Zoom is limited to the plot; science stays unchanged. */
.overview-card-tools { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:.4rem; margin:.6rem 0 .9rem; padding:.5rem 0; border-top:1px solid #e2e8f0; }
.overview-card-tools .results-plot-tools, .overview-card-tools .results-table-tools { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; }
.overview-card-tools .results-table-tools { padding-left:.4rem; border-left:1px solid #cbd5e1; }
.overview-heading-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:.45rem; }
.overview-expand-button { padding:.3rem .65rem !important; border:1px solid #cbd5e1; border-radius:8px; background:#fff; font-weight:650; cursor:pointer; color:#1d4ed8; }
.overview-modality.overview-expanded { grid-column:1 / -1; width:100%; }
.overview-expanded .overview-chart-wrap { max-width:1200px; margin:auto; }
.overview-expanded .overview-figure { max-width:1200px; }
.overview-figure .overview-svg { cursor:zoom-in; touch-action:pan-y; }
.overview-figure .overview-svg[data-zoom]:not([data-zoom="1.00"]) { cursor:grab; }
.overview-figure .overview-svg.overview-panning { cursor:grabbing; user-select:none; }
.overview-plot-hint { margin:.15rem auto .15rem 0; font-size:.72rem; color:#64748b; }
.results-plot-tools, .results-table-tools { display:flex; gap:.35rem; flex-wrap:wrap; align-items:center; }
.results-export-button { font:inherit; font-size:.75rem !important; line-height:1.2; padding:.3rem .5rem !important; white-space:normal; border:1px solid #cbd5e1; border-radius:7px; background:#fff; color:#243b60; cursor:pointer; }
.results-export-button:hover, .overview-expand-button:hover { background:#eff6ff; border-color:#7ba5ec; }
.results-export-button:focus-visible, .overview-expand-button:focus-visible { outline:3px solid #f59e0b; outline-offset:2px; }
.results-export-button:disabled { opacity:.65; cursor:wait; }
.results-export-error { flex:1 1 100%; margin:.4rem 0; color:#b91c1c; font-size:.76rem; }
.comparison-result .card-heading { flex-wrap:wrap; }
.comparison-result .card-heading > .results-table-tools { flex:1 1 100%; padding-top:.4rem; border-top:1px solid #e2e8f0; }
.comparison-result .plot-heading .results-plot-tools { margin-top:.5rem; }
@media (max-width:650px) {
  .overview-modality.overview-expanded { grid-column:auto; }
  .overview-card-tools .results-table-tools { border-left:0; padding-left:0; }
  .overview-plot-hint { width:100%; }
}


/* UX13 — state actions stay visible in the banner on every workflow page. */
.topbar-state-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
.topbar-state-button {
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid rgba(225, 232, 245, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar-state-button:hover { background: rgba(255,255,255,0.20); }
.topbar-state-button:focus-visible { outline: 3px solid #91b7ff; outline-offset: 2px; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 9px; }
  .topbar-state-actions { order: 3; flex: 1 0 100%; justify-content: flex-end; }
  .topbar-state-button { min-height: 34px; }
}

/* UX14: compact, optional input-format guide at the start of Project. */
.project-guide-panel { margin: -5px 0 18px; }
.project-guide-details { border: 1px solid #dbe4f5; background: #fff; border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.project-guide-summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; }
.project-guide-summary::-webkit-details-marker { display: none; }
.project-guide-summary:focus-visible { outline: 3px solid rgba(49,89,217,.32); outline-offset: -3px; }
.project-guide-summary:hover { background: #f8faff; }
.project-guide-symbol { width: 31px; height: 31px; display: inline-grid; place-items: center; border: 1px solid #bfd0fa; border-radius: 50%; color: #3159d9; font-size: 16px; font-weight: 700; flex: 0 0 auto; background: #f2f5ff; }
.project-guide-summary-copy { display: grid; gap: 3px; min-width: 0; }
.project-guide-summary-copy strong { color: #253047; font-size: 14px; }
.project-guide-summary-copy small { color: #667085; font-size: 12px; line-height: 1.45; }
.project-guide-action { margin-left: auto; white-space: nowrap; font-size: 12px; color: #3159d9; font-weight: 700; }
.project-guide-chevron { display: inline-block; margin-left: 5px; transition: transform .15s ease; }
.project-guide-details[open] .project-guide-chevron { transform: rotate(180deg); }
.project-guide-content { border-top: 1px solid #e8ecf4; padding: 16px 18px 18px; }
.project-guide-lead { margin: 0 0 14px; line-height: 1.5; color: #475467; font-size: 12.5px; }
.project-guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.project-guide-lower { margin-top: 14px; }
.project-guide-subsection { min-width: 0; padding: 14px; border: 1px solid #e5eaf3; border-radius: 10px; background: #fbfcff; }
.project-guide-subsection h4 { margin: 0 0 9px; color: #253047; font-size: 13px; }
.project-guide-tree, .project-guide-metadata { overflow: auto; max-width: 100%; margin: 0 0 9px; background: #f1f4f9; border: 1px solid #e2e8f1; border-radius: 8px; padding: 11px; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; color: #263653; white-space: pre; }
.project-guide-metadata { font-size: 11.3px; }
.project-guide-note { margin: 7px 0 0; font-size: 11.5px; line-height: 1.55; color: #667085; }
.project-guide-table-scroll { overflow-x: auto; width: 100%; }
.project-guide-table { width: 100%; border-collapse: collapse; font-size: 11.5px; text-align: left; }
.project-guide-table th, .project-guide-table td { border-bottom: 1px solid #e5eaf3; padding: 7px 5px; vertical-align: top; }
.project-guide-table thead th { color: #58657e; }
.project-guide-table tbody th { color: #263653; font-weight: 600; white-space: nowrap; }
.project-guide-table code, .project-guide-note code, .project-guide-checklist code { font: 10.8px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; word-break: break-word; }
.project-guide-checklist { margin: 0; padding-left: 18px; font-size: 11.5px; line-height: 1.65; color: #475467; }
.project-guide-checklist li + li { margin-top: 6px; }
.project-guide-footnote { border-top: 1px solid #e5eaf3; padding-top: 12px; margin: 14px 0 0; font-size: 11.5px; line-height: 1.55; color: #475467; }
@media (max-width: 880px) { .project-guide-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .project-guide-summary { flex-wrap: wrap; } .project-guide-action { margin: 2px 0 0 43px; } .project-guide-content { padding: 12px; } }

/* UX14/R1: optional sample-first alternative. */
.project-guide-bulk-note { margin: 0 0 10px; color: #344054; }
.project-guide-alternative { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e5eaf3; }
.project-guide-alternative > summary { cursor: pointer; color: #3159d9; font-size: 11.5px; font-weight: 700; padding: 4px 0; }
.project-guide-alternative > summary:focus-visible { outline: 2px solid #3159d9; outline-offset: 3px; }
.project-guide-alternative > .project-guide-note { margin: 8px 0; }
.project-guide-alternative > .project-guide-tree { margin-top: 10px; }

/* UX15 — small, accessible feedback controls. This adds no analytics or upload. */
.topbar-feedback-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.topbar-feedback-actions .topbar-state-button { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; cursor:pointer; }
.topbar-state-actions { margin-left:0; }
.feedback-dialog { width:min(620px, calc(100vw - 32px)); max-height:min(84vh, 850px); padding:0; border:1px solid #cbd5e1; border-radius:14px; color:#1e293b; background:#fff; box-shadow:0 20px 60px #02061755; }
.feedback-dialog::backdrop { background:rgba(15,23,42,.58); }
.feedback-dialog-inner { padding:24px; display:grid; gap:13px; overflow-y:auto; max-height:80vh; }
.feedback-dialog h2 { font-size:20px; margin:0; }
.feedback-dialog p { margin:0; line-height:1.5; }
.feedback-dialog label { display:grid; gap:5px; font-weight:600; font-size:13px; }
.feedback-dialog input:not([type=radio]):not([type=checkbox]), .feedback-dialog textarea { box-sizing:border-box; width:100%; font:inherit; color:#1e293b; border:1px solid #cbd5e1; border-radius:7px; padding:9px; }
.feedback-dialog textarea { min-height:80px; resize:vertical; }
.feedback-dialog .feedback-types { display:flex; gap:18px; flex-wrap:wrap; padding:0; margin:0; border:0; }
.feedback-dialog .feedback-types label { display:flex; flex-direction:row; align-items:center; }
.feedback-dialog .feedback-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.feedback-dialog .feedback-actions button { padding:8px 12px; border-radius:8px; border:1px solid #cbd5e1; cursor:pointer; }
.feedback-dialog .feedback-actions .feedback-primary { background:#3156df; color:#fff; border-color:#3156df; }
.feedback-dialog .feedback-note { font-size:12px; color:#475569; }
.feedback-dialog .feedback-note a { color:#244dba; }
.feedback-dialog #feedback-form-error { font-size:13px; color:#7c3aed; }
.feedback-dialog .feedback-optin { display:flex; flex-direction:row; align-items:center; }
.feedback-dialog [hidden] { display:none !important; }
@media(max-width:760px){ .topbar { flex-wrap:wrap; gap:8px; } .topbar-feedback-actions { order:3; margin-left:0; } .topbar-state-actions { order:4; flex:1 0 auto; justify-content:flex-start; } .feedback-dialog-inner { padding:16px; } }

/* I0: keep every receptor/immune evidence table full width and legible. */
.h0-modality-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.h0-modality-card { display: block; min-width: 0; max-width: 100%; }
.h0-modality-card .config-heading { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.h0-modality-card .details-block { display: block; min-width: 0; max-width: 100%; margin-top: 12px; }
.h0-hits-scroll { width: 100%; max-width: 100%; max-height: 380px; overflow-x: auto; overflow-y: auto; }
.h0-hits-scroll table { width: 100%; min-width: 865px; table-layout: auto; }
.h0-hits-scroll thead th { position: sticky; top: 0; z-index: 3; background: #f8fafc; white-space: nowrap; }
.h0-hits-scroll tbody td { white-space: normal; overflow-wrap: anywhere; }
.h0-hits-scroll tbody td:nth-child(2) { min-width: 180px; }
.h0-hits-scroll thead th:nth-child(1) { min-width: 150px; }
.h0-hits-scroll thead th:nth-child(n+4) { min-width: 115px; }
.integrative-selector { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0; }
.integrative-selector label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #e1e6ef; border-radius: 8px; padding: 7px 11px; background: #fbfcff; font-size: 12px; }
.integrative-selector input { accent-color: #3159d9; }
.integrative-evidence .table-scroll { max-height: 420px; }
.integrative-evidence-table th, .integrative-evidence-table td { white-space: nowrap; }
.integrative-evidence-table th:first-child, .integrative-evidence-table td:first-child { min-width: 165px; }
.integrative-evidence-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
.integrative-message { margin-top: 10px; font-size: 12px; line-height: 1.55; color: #667085; }
@media (max-width: 720px) { .h0-modality-card { padding: 12px; } .integrative-selector label { flex: 1 1 180px; } }

/* I1 source-alignment review: the scientific rows are not truncated. */
.i1-role-grid { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.i1-alignment .integrative-selector { margin: 1rem 0; }
.i1-alignment-scroll { max-height: 560px; overflow: auto; }
.i1-alignment-scroll table { width: max-content; min-width: 1540px; table-layout: fixed; }
.i1-alignment-scroll th { min-width: 124px; position: sticky; top: 0; z-index: 2; }
.i1-alignment-scroll td { vertical-align: top; min-width: 124px; }
.i1-alignment-scroll td small, .i1-alignment-scroll th small { display: block; opacity: .72; font-size: .73rem; margin-top: .2rem; overflow-wrap: anywhere; }
.i1-source-status { display: inline-block; font-size: .78rem; font-weight: 600; }
.i1-status-present { color: #146b43; }
.i1-status-missing, .i1-status-source-error { color: #98520a; }
.i1-status-ambiguous { color: #ad3232; }
.i1-status-not-selected { color: #667085; }
@media (max-width: 720px) { .i1-alignment-scroll { max-height: 420px; } }

/* I2A full distance-fusion review */
.i2-distance-fusion .form-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.i2-result-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(230px, 1fr); gap: 16px; margin: 16px 0; }
.i2-result-grid > * { min-width: 0; }
.i2-heatmap-scroll { max-height: 620px; overflow: auto; }
.i2-fusion-heatmap { min-width: 420px; }
.i2-neighbors { max-height: 440px; overflow: auto; }
.i2-neighbors th { position: sticky; top: 0; z-index: 2; }
@media (max-width: 830px) { .i2-result-grid { grid-template-columns: minmax(0, 1fr); } }
/* Joint multi-modal ordination: full clustered matrix, no display row cap. */
.joint-structure-plots { grid-template-columns: minmax(0,1fr); }
.joint-structure .plot-card, .joint-structure .plot-shell { min-width:0; }
.joint-structure .joint-point { fill:#576fae; fill-opacity:.8; stroke:#ffffff; stroke-width:.8; }
.joint-cluster-scroll { overflow:auto; max-width:100%; max-height:660px; padding:8px; border:1px solid var(--border,#dce1e9); border-radius:8px; }
.joint-cluster-scroll .joint-dendrogram { display:block; }
.joint-dendrogram g { fill:none; stroke:#5c6c85; stroke-width:1; }
#joint-structure-heatmap { display:block; max-width:none; height:auto; image-rendering:auto; }
.joint-structure .check-label { margin-top:10px; }

/* Large joint-distance viewer. The distance data and original linkage order do not change with zoom. */
.joint-structure .joint-heatmap-card { min-width:0; min-height: 790px; }
.joint-heatmap-viewer { position:relative; width:100%; min-width:0; border:1px solid #d5ddec; border-radius:11px; background:#fff; padding:12px; box-sizing:border-box; }
.joint-heatmap-toolbar { position:sticky; top:0; z-index:5; display:flex; align-items:center; flex-wrap:wrap; gap:10px; background:rgba(255,255,255,.97); border-bottom:1px solid #e2e7f0; padding:7px 4px 11px; }
.joint-heatmap-toolbar > strong { font-size:13px; margin-right:auto; }
.joint-heatmap-toolbar-actions { display:flex; gap:6px; flex-wrap:wrap; }
.joint-heatmap-toolbar .secondary-button { min-height:32px; padding:5px 9px; font-size:12px; }
.joint-heatmap-toolbar label { display:flex; gap:7px; align-items:center; font-size:12px; }
.joint-heatmap-toolbar select { font-size:12px; min-width:168px; max-width:220px; padding:5px 8px; }
.joint-heatmap-color-key { display:grid; grid-template-columns:minmax(190px,1fr) minmax(160px,1.2fr); gap:6px 18px; align-items:center; padding:10px 4px 5px; }
#joint-heatmap-key-title { font-size:12px; font-weight:600; }
.joint-heatmap-gradient { height:12px; border:1px solid #c5cede; border-radius:5px; background:linear-gradient(90deg,rgb(253,253,252),rgb(72,72,252)); }
.joint-heatmap-key-numbers { grid-column:2; display:flex; justify-content:space-between; gap:8px; font-size:11px; color:#3f506d; }
.joint-heatmap-color-key small { grid-column:1/-1; font-size:11px; color:#485973; }
.joint-heatmap-instructions { margin:7px 4px 8px; }
.joint-heatmap-scroll { width:100%; height:min(76vh,750px); min-height:590px; overflow:auto; overscroll-behavior:contain; border:1px solid #e4e8ef; border-radius:7px; background:#f9fafc; padding:8px; box-sizing:border-box; }
.joint-heatmap-grid { display:grid; gap:0; width:max-content; height:max-content; min-width:0; position:relative; }
#joint-top-tree { grid-column:3; grid-row:1; }
#joint-column-labels { grid-column:3; grid-row:2; }
#joint-left-tree { grid-column:1; grid-row:3; }
#joint-row-labels { grid-column:2; grid-row:3; }
.joint-heatmap-matrix-wrap { grid-column:3; grid-row:3; display:block; position:relative; width:max-content; height:max-content; }
.joint-heatmap-grid canvas { display:block; max-width:none !important; image-rendering:auto; }
#joint-heatmap-matrix { touch-action:none; user-select:none; cursor:crosshair; }
.joint-heatmap-selection { position:absolute; z-index:2; pointer-events:none; border:2px solid #e57c29; background:rgba(242,168,55,.2); box-sizing:border-box; }
.joint-heatmap-selection[hidden] { display:none; }
.joint-heatmap-status { font-size:12px; color:#273951; font-weight:600; padding:10px 2px 4px; overflow-wrap:anywhere; margin:0; }
#joint-heatmap-window-description { font-size:11px; margin:2px 2px 5px; }
.joint-heatmap-viewer.is-expanded { position:fixed; inset:1.3vh 1vw; width:98vw; height:97.4vh; z-index:9999; padding:16px 20px; border:1px solid #b4c3d9; box-shadow:0 0 0 120vmax rgba(5,14,32,.60),0 18px 40px rgba(5,14,32,.25); overflow:auto; background:#fff; }
.joint-heatmap-viewer.is-expanded .joint-heatmap-scroll { height:calc(100vh - 285px); max-height:none; min-height:260px; }
.joint-heatmap-viewer.is-expanded .joint-heatmap-toolbar { top:-16px; }
.joint-heatmap-viewer.is-expanded .joint-heatmap-toolbar #joint-heatmap-expand { background:#263e64; color:#fff; }
@media(max-width:730px) {
  .joint-heatmap-viewer { padding:8px; }
  .joint-heatmap-toolbar { align-items:stretch; }
  .joint-heatmap-toolbar-actions { width:100%; }
  .joint-heatmap-color-key { grid-template-columns:1fr; }
  .joint-heatmap-key-numbers { grid-column:1; }
  .joint-heatmap-scroll { height:60vh; min-height:440px; }
  .joint-heatmap-viewer.is-expanded { inset:0; width:100vw; height:100dvh; padding:10px; }
  .joint-heatmap-viewer.is-expanded .joint-heatmap-scroll { height:calc(100dvh - 280px); }
}

/* Local multi-modal source calculation: visible, bounded, accessible progress. */
.i2b-execution-controls { align-items: end; margin: 10px 0 13px; }
.i2b-execution-controls > label { max-width: 250px; }
.i2b-progress-panel { border: 1px solid #bfcdf8; background: #f5f8ff; border-radius: 10px; padding: 12px 14px; margin: 12px 0 17px; }
.i2b-progress-heading,.i2b-progress-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.i2b-progress-heading strong { color: #2447b9; font-size: 13px; }
.i2b-progress-heading span { color: #3159d9; font-size: 12px; font-weight: 700; }
.i2b-progress-panel progress { display: block; width: 100%; height: 12px; margin: 7px 0 12px; accent-color: #3159d9; }
.i2b-progress-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 9px; }
.i2b-progress-row { border: 1px solid #dae3f7; border-left: 4px solid #b1bfd6; border-radius: 7px; background: white; padding: 9px; min-width: 0; }
.i2b-progress-row[data-status="running"] { border-left-color: #3159d9; background: #f9fbff; }
.i2b-progress-row[data-status="complete"] { border-left-color: #12715b; }
.i2b-progress-row[data-status="failed"] { border-left-color: #b42318; }
.i2b-progress-row strong { color: #253047; font-size: 12px; }
.i2b-progress-row [data-i2b-state] { color: #667085; font-size: 11px; font-weight: 700; }
.i2b-progress-row[data-status="running"] [data-i2b-state] { color: #3159d9; }
.i2b-progress-row[data-status="running"] [data-i2b-state]::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border: 2px solid #a5b4fc; border-top-color: #3159d9; border-radius: 50%; animation: i2b-spin .85s linear infinite; }
@keyframes i2b-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .i2b-progress-row[data-status="running"] [data-i2b-state]::before { animation: none; } }
.i2b-progress-row[data-status="complete"] [data-i2b-state] { color: #12715b; }
.i2b-progress-row[data-status="failed"] [data-i2b-state] { color: #b42318; }
.i2b-progress-row progress { height: 9px; margin: 7px 0; }
.i2b-progress-row small { display: block; color: #3159d9; font-size: 11px; overflow-wrap: anywhere; }
.i2b-progress-highlight { margin: 8px 0; color: #2447b9; font-size: 12px; font-weight: 700; }

/* Post-fit biological interpretation. Source bytes stay on the local device. */
.biological-findings { margin-top: 18px; }
.bio-options { margin: 14px 0 12px; }
.bio-scatter { width: min(100%,720px); margin: 0 auto 12px; }
.bio-scatter svg { display: block; width: 100%; height: auto; }
.bio-legend { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 7px 0 14px; }
.bio-legend span { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; color: #475467; overflow-wrap: anywhere; }
.bio-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.bio-feature-progress { display: block; width: 100%; height: 12px; margin: 12px 0; accent-color: #3159d9; }
.bio-feature-details { margin-top: 18px; }
.biological-findings .table-scroll { max-height: 560px; }


/* Combined post-fit biological findings dashboard. No source data leaves the browser. */
.bio-dashboard-top { display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:14px;margin-top:12px;align-items:start; }
.bio-dashboard-top > * { min-width:0; }
.bio-all-modality-card { min-width:0; }
.bio-modality-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;margin:12px 0; }
.bio-modality-tile { min-width:0;border:1px solid #e1e6ee;border-radius:9px;padding:11px;background:#fbfcff;display:flex;flex-direction:column;gap:5px; }
.bio-modality-tile strong { color:#182d46;font-size:12px;overflow-wrap:anywhere; }
.bio-modality-tile > span { display:flex;align-items:baseline;justify-content:space-between;gap:4px;font-size:11px;color:#475467; }
.bio-modality-tile > span b { font-variant-numeric:tabular-nums;color:#233451; }
.bio-modality-tile small { font-size:10px;color:#66768d;overflow-wrap:anywhere; }
.bio-modality-unavailable { background:#f7f8fb;opacity:.78; }
.bio-meter { height:7px;border-radius:10px;background:#e9edf5;overflow:hidden; }
.bio-meter i { display:block;height:100%;border-radius:10px; }
.bio-feature-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 10px; }
.bio-feature-heading h4 { margin:0 0 5px; }
.bio-feature-heading p { color:#64748b;font-size:12px;max-width:680px; }
.bio-feature-heading .primary-button { flex-shrink:0; }
.bio-feature-section { margin-top:14px; }
.bio-feature-section-title { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px; }
.bio-feature-section-title > label { display:flex;align-items:center;gap:8px;color:#475467;font-size:12px; }
.bio-rank-columns { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:10px; }
.bio-feature-column { min-width:0;background:#fbfcff;border:1px solid #e1e6ee;border-radius:9px;padding:11px; }
.bio-feature-column h5 { font-size:13px;margin:0 0 4px;color:#1e3656; }
.bio-feature-column > small { display:block;color:#657589;margin-bottom:10px; }
.bio-rank-axis { display:flex;justify-content:space-between;margin-left:36%;margin-right:55px;color:#66768b;font-size:10px; }
.bio-rank-row { display:grid;grid-template-columns:minmax(80px,36%) minmax(0,1fr) 48px;gap:7px;align-items:center;min-height:29px; }
.bio-rank-name { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px; }
.bio-signal-link { border:0;background:none;text-align:left;padding:0;font:inherit;color:#1c4eac;cursor:pointer;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:underline;text-underline-offset:2px; }
.bio-signal-link:focus-visible { outline:2px solid #3159d9;outline-offset:2px; }
.bio-rank-track { height:14px;background:#f2f5fb;border-radius:3px;position:relative;overflow:hidden; }
.bio-rank-track .bio-rank-zero { position:absolute;left:50%;top:0;bottom:0;width:1px;background:#9ba9bb;z-index:1; }
.bio-rank-track b { height:8px;top:3px;position:absolute;border-radius:2px; }
.bio-rank-score { text-align:right;font-size:10px;color:#43536c;font-variant-numeric:tabular-nums; }
.bio-feature-selection { margin:14px 0; }
.bio-feature-selection label { display:flex;gap:9px;align-items:center;font-size:12px;flex-wrap:wrap; }
.bio-feature-selection select { max-width:100%;min-width:240px; }
.bio-feature-legend { display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap;color:#66768d;font-size:10px; }
.bio-feature-legend i { display:inline-block;width:130px;max-width:38%;height:11px;border-radius:6px;background:linear-gradient(90deg,rgb(235,239,250),rgb(36,79,223)); }
.bio-full-table { margin-top:17px; }
.bio-exports { margin-top:15px; }
.biological-findings .bio-findings-summary { margin-bottom:12px; }
@media(max-width:1180px) { .bio-dashboard-top { grid-template-columns:minmax(0,1fr); } .bio-modality-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .bio-rank-columns,.bio-modality-grid {grid-template-columns:minmax(0,1fr)} .bio-feature-heading {flex-direction:column;align-items:stretch} .bio-feature-selection label {display:block} .bio-feature-selection select {width:100%;min-width:0} }

/* Post-fit, source-backed feature overview and exact sample inspection. */
.bio-native-section { margin-top: 22px; border-top: 1px solid #e0e6ef; padding-top: 18px; }
.bio-native-section h4 { margin: 14px 0 8px; }
.bio-native-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(235px,1fr)); gap: 12px; margin: 12px 0 18px; }
.bio-native-modality { border: 1px solid #dde4f0; background: #fbfcff; border-radius: 10px; padding: 12px; min-width: 0; }
.bio-native-modality > strong, .bio-native-modality > span { display: block; }
.bio-native-modality > strong { font-size: 13px; }
.bio-native-modality > span { margin: 4px 0 12px; font-size: 11px; color: #5b6880; }
.bio-native-rank { display:grid; grid-template-columns: minmax(0,1fr) minmax(76px,1.2fr) 39px; gap: 8px; align-items: center; margin: 8px 0; font-size: 11px; }
.bio-native-rank > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bio-native-rank .bio-rank-track { height: 13px; }
.bio-native-rank small { font-variant-numeric:tabular-nums; text-align:right; }
.bio-native-section > label { display:block; margin: 12px 0; }
.bio-native-section select { max-width: min(100%,620px); min-width: 190px; }
.bio-native-plot { margin: 14px auto 18px; width: min(100%,740px); }
.bio-native-plot svg { display:block; width:100%; height:auto; }
.bio-native-plot figcaption { color:#586781; font-size:11px; margin-top:8px; }
.bio-native-section .table-scroll { max-height: 480px; overflow:auto; }
@media (max-width:680px) { .bio-native-grid { grid-template-columns: 1fr; } }

/* Compact top-level workflow and separate scientific detail view. */
.integrative-entry{margin-bottom:16px}
.integrative-entry .integrative-main-action{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.integrative-entry .integrative-run-description{max-width:74ch}
.integrative-entry .integrative-top-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.integrative-entry .integrative-run-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(195px,1fr));gap:9px;margin-top:16px}
.integrative-entry .integrative-step{padding:10px 12px;border:1px solid var(--border-color,#e0e5ef);border-radius:9px;background:#fff;display:flex;gap:8px;align-items:flex-start}
.integrative-entry .integrative-step[data-status=running]{border-color:#3e64d5;background:#eef3ff}
.integrative-entry .integrative-step[data-status=complete]{border-color:#8bcab5;background:#f0faf6}
.integrative-entry .integrative-step[data-status=warning]{border-color:#e0b864;background:#fff9ea}
.integrative-entry .integrative-step[data-status=failed]{border-color:#d17b83;background:#fff2f3}
.integrative-entry .integrative-step p{margin:0;font-size:.8rem}
.integrative-entry .integrative-step small{display:block;color:#5b6b83;font-size:.72rem;margin-top:4px;overflow-wrap:anywhere}
.integrative-entry .integrative-step-marker{font-weight:700;color:#3159d9}
.integrative-entry .integrative-step[data-status=complete] .integrative-step-marker{color:#16846a}
.integrative-entry .integrative-step[data-status=failed] .integrative-step-marker{color:#b33b4d}
.integrative-tab-controls{display:flex;gap:8px;align-items:center;border-bottom:1px solid #dce4ef;margin:16px 0 0;padding:0 0 8px}
.integrative-tab-controls button{border-radius:8px;padding:9px 18px;cursor:pointer;border:1px solid #d9e1ed;background:#fff;color:#203353}
.integrative-tab-controls button[aria-selected=true]{background:#3159d9;border-color:#3159d9;color:#fff}
.integrative-overview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin:16px 0}
.integrative-overview-grid>*{min-width:0}
.integrative-overview-section{margin-top:18px;border-top:1px solid #e7ecf4;padding-top:14px}
.integrative-insight-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:10px;margin:12px 0}
.integrative-insight-card{border:1px solid #e1e6f0;border-radius:8px;padding:12px;display:grid;gap:5px;min-width:0}
.integrative-insight-card strong{font-size:.84rem;color:#233b5c}
.integrative-insight-card span,.integrative-insight-card small{font-size:.76rem;color:#53627b;overflow-wrap:anywhere}
.integrative-overview .bio-rank-columns{max-width:100%}
.integrative-detail-layout{display:grid;gap:14px}
@media(max-width:980px){.integrative-overview-grid{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.integrative-entry *{scroll-behavior:auto}}

/* Single-action integrative overview: primary inputs are visible without the detailed workflow. */
.integrative-main-settings { margin: 1rem 0; border: 1px solid var(--border, #dce3ed); border-radius: .7rem; background: var(--surface-subtle, #f8faff); padding: 1rem; }
.integrative-settings-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem; margin-bottom: .8rem; }
.integrative-settings-heading span { color: var(--muted, #69778c); font-size: .8rem; }
.integrative-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .7rem; }
.integrative-settings-grid label { min-width: 0; display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; }
.integrative-settings-grid input, .integrative-settings-grid select { width: 100%; min-width: 0; font-weight: 400; }
.integrative-settings-modalities { display: flex; gap: .4rem .65rem; flex-wrap: wrap; margin: 1rem 0 .65rem; }
.integrative-settings-modalities .check-label { font-size: .8rem; }
.integrative-one-patient { margin-bottom: .45rem; }
.integrative-diagnostics { border-left: 4px solid var(--warning, #c27721); }
.integrative-diagnostics .analysis-warnings { overflow-wrap: anywhere; }
.integrative-diagnostics .table-scroll { max-height: 290px; overflow: auto; }
.integrative-overview .analysis-warnings { margin-bottom: .85rem; }
@media (max-width: 700px) { .integrative-settings-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 470px) { .integrative-settings-grid { grid-template-columns: minmax(0,1fr); } }

/* Researcher-first integrative Overview, presentation only. */
.integrative-study-summary .summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.integrative-study-takeaway{margin:12px 0 4px;padding:12px 14px;border-left:3px solid #3159d9;background:#f5f8ff;border-radius:5px;color:#253b58;font-size:.86rem;line-height:1.55}
.integrative-advanced-settings{margin:10px 0;border:1px solid #d7e0ed;border-radius:7px;background:#fff;padding:10px 12px}
.integrative-advanced-settings summary,.integrative-step-disclosure summary{cursor:pointer;font-size:.84rem;font-weight:650;color:#24427e}
.integrative-advanced-settings[open] summary{margin-bottom:10px}
.integrative-advanced-settings .method-note{margin:0 0 10px}
.integrative-step-disclosure{margin:12px 0;padding:10px 12px;border:1px solid #b6d8c8;background:#f2faf7;border-radius:8px}
.integrative-step-disclosure[open] .integrative-run-steps{margin-top:12px}
.integrative-ablation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:9px;margin:10px 0}
.integrative-ablation-tile{display:grid;align-content:start;gap:7px;padding:11px;border:1px solid #e0e6f0;border-radius:8px;background:#fbfcff;min-width:0}
.integrative-ablation-tile strong{font-size:.79rem;color:#263a59;overflow-wrap:anywhere}
.integrative-ablation-tile span{font-size:.74rem;color:#58697f;display:flex;justify-content:space-between;gap:6px}
.integrative-ablation-tile b{color:#1d3557;font-variant-numeric:tabular-nums}
.integrative-ablation-tile small{color:#805c31;overflow-wrap:anywhere}
.integrative-plot-metadata{display:flex;justify-content:flex-end;margin:9px 0}
.integrative-plot-metadata label,.integrative-sample-inspection label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.79rem;font-weight:600;color:#38506f}
.integrative-plot-metadata select,.integrative-sample-inspection select{min-width:0;max-width:100%;font-weight:400}
.integrative-interactive-scatter svg{width:100%;height:auto;display:block;touch-action:none;user-select:none}
.integrative-interactive-scatter svg text{font:12px system-ui,sans-serif;fill:#485775}
.integrative-interactive-scatter .integrative-point-label{fill:#132d4f;paint-order:stroke;stroke:#fff;stroke-linejoin:round;pointer-events:none;font-weight:650}
.integrative-plot-tools{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:8px 0}
.integrative-plot-tools button{padding:5px 9px;background:#fff;border:1px solid #d4deee;border-radius:6px;color:#24427e;cursor:pointer;font-size:.72rem}
.integrative-plot-tools button:focus-visible{outline:2px solid #3159d9}
.integrative-plot-tools small{font-size:.69rem;color:#5d6c80;flex:1 1 130px}
.integrative-annotation-legend,.integrative-cluster-legend{justify-content:flex-start;gap:9px;margin:6px 0}
.integrative-annotation-legend span,.integrative-cluster-legend span{font-size:.72rem;color:#52647b}
.integrative-sample-inspection{border-top:1px solid #e1e8f0;margin-top:10px;padding:11px 1px 0;display:grid;gap:5px}
.integrative-sample-inspection p{margin:3px 0;overflow-wrap:anywhere}
@media(max-width:1050px){.integrative-study-summary .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.integrative-study-summary .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.integrative-ablation-grid{grid-template-columns:minmax(0,1fr)}}

.integrative-distant-observations{margin-top:9px;padding-top:8px;border-top:1px solid #e6ebf3}
.integrative-distant-observations summary{cursor:pointer;color:#3159d9;font-size:.78rem;font-weight:600}
.integrative-distant-observations table{font-size:.75rem}
.integrative-distant-observations .secondary-button{padding:4px 7px;font-size:.74rem}

/* Post-fit cohort inclusion and small-cluster quality review. */
.integrative-overview-coverage{margin-top:14px}
.integrative-cluster-caution{margin:12px 0;padding:11px 13px;border:1px solid #f3d3a0;border-left:3px solid #b77727;background:#fffaf1;border-radius:8px;font-size:.84rem;line-height:1.6;color:#634a2a}
.integrative-cluster-caution button{margin:4px 0 0 9px;font-size:.78rem;white-space:normal}
.integrative-coverage p.method-note{font-size:.84rem;line-height:1.55}
.integrative-coverage-reasons{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:12px 0}
.integrative-coverage-reasons>div{display:grid;gap:3px;border:1px solid #dfe6f0;border-radius:8px;padding:11px 12px;min-width:0}
.integrative-coverage-reasons strong{font-size:1.15rem;color:#1f3454;font-variant-numeric:tabular-nums}
.integrative-coverage-reasons span{font-size:.79rem;color:#526480}
.integrative-coverage-detail{margin:9px 0;padding:10px 12px;border:1px solid #dfe6ef;border-radius:8px;background:#fcfdff;min-width:0}
.integrative-coverage-detail summary{font-size:.85rem;font-weight:650;color:#294570;cursor:pointer}
.integrative-coverage-detail[open] summary{margin-bottom:11px}
.integrative-coverage-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:8px 0}
.integrative-coverage-controls label{font-size:.81rem;font-weight:650;color:#38506f}
.integrative-coverage-controls input{min-width:190px;flex:1 1 210px}
.integrative-coverage-controls span{font-size:.8rem;color:#536580}
.integrative-coverage-table{max-height:355px;overflow:auto}
.integrative-coverage-table table{width:max-content;min-width:100%;font-size:.8rem}
.integrative-coverage-table th{position:sticky;top:0;z-index:1;background:#f3f6fb}
.integrative-coverage-table th button{cursor:pointer;background:transparent;border:0;font:inherit;font-weight:650;color:#28416a;text-align:left;padding:3px}
.integrative-coverage-table td{overflow-wrap:anywhere;max-width:310px}
.integrative-interactive-scatter [data-integrative-point]{cursor:pointer;outline:0}
.integrative-interactive-scatter [data-integrative-point]:focus-visible{stroke:#1d3557;stroke-width:2.5}
.integrative-sample-metadata{padding:10px;border:1px solid #dfe6ef;background:#f8faff;border-radius:8px;max-height:240px;overflow:auto}
.integrative-sample-metadata[hidden]{display:none}
.integrative-sample-metadata dl{display:grid;grid-template-columns:minmax(115px,35%) minmax(0,1fr);gap:6px 12px;margin:8px 0 0;font-size:.8rem}
.integrative-sample-metadata dt{font-weight:650;color:#304463;overflow-wrap:anywhere}
.integrative-sample-metadata dd{margin:0;overflow-wrap:anywhere}

/* Uniform navigation for plots that support a spatial viewport. */
.plot-nav-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:6px 8px;background:#fbfcff;border-bottom:1px solid #e4e9f3}
.plot-nav-button{background:#fff;border:1px solid #cfdaea;border-radius:6px;padding:5px 8px;font:600 11px system-ui,sans-serif;color:#304563;min-height:29px;cursor:pointer}
.plot-nav-button:hover{background:#edf3ff}
.plot-nav-button.is-active,.plot-nav-button[aria-pressed="true"]{background:#e7eeff;border-color:#5576df;color:#173eae}
.plot-nav-button:focus-visible{outline:2px solid #3159d9;outline-offset:2px}
.plot-nav-hint{font-size:10px;color:#53667f;flex:1 1 160px}
.plot-navigation-enabled{cursor:grab;touch-action:pan-y;user-select:none}
.plot-navigation-enabled[data-plot-mode="box"]{cursor:crosshair}
.plot-navigation-enabled[data-plot-mode="pan"]:active{cursor:grabbing}
.plot-navigation-selection{fill:rgba(59,103,229,.15);stroke:#2d5cdb;stroke-width:1.5;stroke-dasharray:5 3;vector-effect:non-scaling-stroke;pointer-events:none}
.plot-navigation-point-label{fill:#243852;font-weight:650;font-family:system-ui,sans-serif;paint-order:stroke;stroke:#fff;stroke-linejoin:round;pointer-events:none}
.integrative-interactive-scatter .plot-nav-toolbar{margin:5px 0 8px}
.plot-shell .plot-toolbar{padding:0;border-bottom:0}
.plot-shell .plot-toolbar .plot-nav-toolbar{width:100%;box-sizing:border-box}
.overview-card-tools .plot-nav-toolbar{padding:2px 0;background:transparent;border:0}
.bio-feature-plot .plot-nav-toolbar,.bio-native-plot .plot-nav-toolbar,.longitudinal-dendrogram-scroll .plot-nav-toolbar,.i2-heatmap-scroll .plot-nav-toolbar{margin-bottom:5px}
.joint-heatmap-toolbar .secondary-button.is-active,.joint-heatmap-toolbar [aria-pressed="true"]{background:#e7eeff;border-color:#5274df;color:#183c9e}
#joint-heatmap-matrix{cursor:crosshair;touch-action:pan-y}
.joint-heatmap-viewer:has(#joint-heatmap-mode-pan[aria-pressed="true"]) #joint-heatmap-matrix{cursor:grab}
@media(max-width:680px){.plot-nav-toolbar{gap:4px;padding:6px}.plot-nav-button{font-size:10px}.plot-nav-hint{flex-basis:100%}}

/* Table heatmap: adjust display cell size only; retain every measured value. */
.significant-heatmap{--plot-heatmap-cell:15px;--plot-heatmap-header:88px}
.significant-heatmap .heatmap-cell{width:var(--plot-heatmap-cell);min-width:var(--plot-heatmap-cell);height:var(--plot-heatmap-cell)}
.significant-heatmap .heatmap-sample-head{width:var(--plot-heatmap-cell);min-width:var(--plot-heatmap-cell);height:var(--plot-heatmap-header)}
.significant-heatmap .heatmap-annotation-label,.significant-heatmap .heatmap-group-cell{top:var(--plot-heatmap-header)}
.significant-heatmap .heatmap-group-cell{width:var(--plot-heatmap-cell);min-width:var(--plot-heatmap-cell)}
.plot-navigation-table-selection{position:fixed;z-index:9990;pointer-events:none;border:2px dashed #3159d9;background:rgba(49,89,217,.13);box-sizing:border-box}

/* Coordinate-only scatter navigation; fixed frame, ticks and marker size. */
.plot-coordinate-gridline{stroke:#e8edf5;stroke-width:.7;vector-effect:non-scaling-stroke}
.plot-coordinate-tick{font:10px system-ui,sans-serif;fill:#566982;pointer-events:none}
.integrative-interactive-scatter .plot-coordinate-tick{font-size:10px;fill:#566982}

/* Guided post-fit biological interpretation. Read-only data products and navigation. */
.biological-next-steps{scroll-margin-top:18px}
.biological-next-steps .card-heading{align-items:start;margin-bottom:12px}
.bio-next-steps-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.bio-next-step{border:1px solid #dce5f0;border-radius:9px;padding:14px;background:#fbfcff;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.bio-next-step strong{font-size:.9rem;color:#203a5a}
.bio-next-step p{font-size:.81rem;line-height:1.5;color:#4d5e77;margin:0;overflow-wrap:anywhere}
.bio-next-step .secondary-button{margin-top:auto;max-width:100%;white-space:normal;text-align:left}
.bio-next-step .bio-next-caution{color:#895824}
.bio-next-review{border-top:1px solid #e3e9f1;padding:16px 0;scroll-margin-top:14px}
.bio-next-review h5{font-size:.93rem;margin:0 0 8px;color:#243a59}
.bio-next-review .method-note{font-size:.82rem;line-height:1.6}
.bio-next-evidence-table,.bio-next-feature-table{max-height:340px;overflow:auto;margin:10px 0}
.bio-next-evidence-table table,.bio-next-feature-table table{min-width:690px;width:100%;font-size:.8rem}
.bio-next-evidence-table th,.bio-next-feature-table th{position:sticky;top:0;z-index:1;background:#f3f6fb;text-align:left}
.bio-next-evidence-table td,.bio-next-feature-table td{overflow-wrap:anywhere;max-width:220px}
.bio-next-controls,.bio-next-actions{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:12px 0}
.bio-next-controls label,.bio-next-actions label{display:grid;gap:5px;font-size:.81rem;font-weight:650;color:#344b6b;flex:1 1 155px;min-width:0}
.bio-next-controls input,.bio-next-controls select,.bio-next-actions select{width:100%;max-width:100%;box-sizing:border-box}
.bio-next-actions button{min-height:32px;white-space:normal;text-align:left}
#bio-next-count,#bio-next-export-status{font-size:.79rem;color:#405a7a;margin:8px 0}
#bio-next-export-status[hidden]{display:none}
@media(max-width:720px){.bio-next-steps-grid{grid-template-columns:minmax(0,1fr)}.bio-next-evidence-table table,.bio-next-feature-table table{min-width:650px}}

.bio-next-expand{display:block}
.bio-next-expand>summary{font-size:.93rem;font-weight:650;cursor:pointer;color:#244375;list-style-position:inside}
.bio-next-expand[open]>summary{margin-bottom:12px}
.bio-next-expand>summary:focus-visible{outline:2px solid #3159d9;outline-offset:3px}

.biological-next-steps .method-note{color:#50637e}
.biological-next-steps #bio-next-export-status{background:#f3f8ff;border-left:3px solid #4268c9;padding:8px 10px;border-radius:4px}

/* Offline pathway enrichment. Results do not imply independent validation. */
.pathway-panel{border:1px solid #dce5f0;border-radius:9px;background:#fcfdff;padding:14px;margin:14px 0}
.pathway-panel h5{margin:0 0 8px;font-size:.95rem;color:#253c61}
.pathway-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:10px;margin:12px 0}
.pathway-grid label{display:grid;gap:5px;color:#354d6d;font-size:.81rem;font-weight:650;min-width:0}
.pathway-grid input,.pathway-grid select{max-width:100%;width:100%;box-sizing:border-box;min-width:0}
.pathway-panel a{color:#2456bf;text-decoration:underline}
.pathway-set-summary{display:grid;align-content:center;border:1px solid #dce5ed;border-radius:7px;padding:8px 10px;gap:5px;min-width:0}
.pathway-set-summary strong{font-size:.87rem;color:#244267}
.pathway-set-summary span{overflow-wrap:anywhere;font-size:.77rem;color:#536681}
.pathway-options{border:1px solid #dde7f3;border-radius:7px;padding:8px 12px;margin:13px 0}
.pathway-options summary{font-weight:650;color:#254775;cursor:pointer;font-size:.84rem}
.pathway-controls{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;align-items:center}
.pathway-controls button{white-space:normal;text-align:left}
.pathway-status{background:#f0f5ff;border-left:3px solid #476de0;padding:8px 10px;color:#2f466c;font-size:.81rem;line-height:1.5}
.pathway-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:12px 0}
.pathway-summary>div{padding:9px 10px;background:#fff;border:1px solid #dce6f2;border-radius:8px;display:grid;gap:4px}
.pathway-summary small{color:#536680}.pathway-summary strong{color:#203d65;font-size:1.13rem}
.pathway-results h6{font-size:.87rem;margin:12px 0 8px}
.pathway-bars{display:grid;gap:6px;margin:10px 0 15px}
.pathway-bar-row{display:grid;grid-template-columns:minmax(130px,33%) 1fr 70px;gap:8px;align-items:center;font-size:.78rem;color:#425671}
.pathway-bar-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pathway-bar-track{height:10px;background:#e9eef7;border-radius:8px;overflow:hidden}
.pathway-bar-track>div{height:100%;border-radius:8px;background:#426be3}
.pathway-search{display:flex;justify-content:space-between;align-items:end;flex-wrap:wrap;gap:9px;font-size:.8rem;margin:12px 0}
.pathway-search label{display:grid;gap:4px;flex:1 1 230px}
.pathway-search input{max-width:480px}
.pathway-table{max-height:420px;overflow:auto}
.pathway-table table{width:100%;min-width:780px;font-size:.78rem}
.pathway-table th{position:sticky;top:0;z-index:1;background:#f3f6fb}
.pathway-table td{vertical-align:top;overflow-wrap:anywhere;max-width:300px}
.pathway-table td small{display:block;font-size:.69rem;color:#61748b;margin-top:3px}
.pathway-warnings{margin:12px 0;padding:10px;background:#f9fbff;border:1px solid #e1e7f0;border-radius:7px}
.pathway-warnings summary{font-size:.81rem;color:#2b4672;cursor:pointer}
@media(max-width:650px){.pathway-bar-row{grid-template-columns:minmax(90px,33%) 1fr 48px;gap:4px}}

/* Integrative Analysis: guided Pathways view (P1/P2; no science changes). */
.integrative-pathways-view { min-width: 0; }
.pathway-guided-step { border: 1px solid var(--line, #dfe4ec); border-radius: 10px; margin: 0.85rem 0; padding: 1rem; background: var(--surface, #fff); min-width: 0; }
.pathway-step-heading { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .7rem; }
.pathway-step-heading h6 { margin: 0 0 .3rem; font-size: 1rem; }
.pathway-step-heading p { margin: 0; color: var(--muted, #667085); font-size: .85rem; }
.pathway-step-index { border-radius: 50%; width: 1.9rem; height: 1.9rem; min-width: 1.9rem; display: inline-flex; align-items: center; justify-content: center; background: #e9efff; color: #264cca; font-weight: 750; }
.pathway-guided-notice { padding: .85rem 1rem; background: #f5f8ff; border-left: 3px solid #4567d8; border-radius: 6px; margin: .8rem 0; }
.pathway-guided-notice button { margin-left: .7rem; }
.integrative-pathways-view .pathway-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.integrative-pathways-view .pathway-gmt-picker { min-width: 0; }
.integrative-pathways-view .pathway-panel { width: 100%; max-width: none; }
.integrative-pathways-view .pathway-panel > h5 { margin-top: .7rem; }
@media (max-width: 640px) { .pathway-guided-step { padding: .75rem; } .pathway-step-heading h6 { font-size: .94rem; } .pathway-guided-notice button { display: block; margin: .65rem 0 0; } }

/* Pathways P3: read-only exact-gene inspector and score-scale chart. */
.pathway-evidence-banner { border-left: 3px solid #365cdb; padding: .9rem 1rem; margin: 1rem 0; background: #f3f6ff; border-radius: 6px; color: #243353; }
.pathway-evidence-banner p { margin: .45rem 0; font-size: .88rem; }
.pathway-evidence-banner small { display: block; overflow-wrap: anywhere; color: #515f78; }
.pathway-score-chart { min-width: 0; margin: 1rem 0; }
.pathway-score-chart h6 { margin: 0 0 .45rem; }
.pathway-chart-choice { display: grid; grid-template-columns: minmax(110px, 1.15fr) minmax(80px, 1.5fr) 60px 65px; align-items: center; gap: .5rem; width: 100%; margin: 0; padding: .35rem .45rem; border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.pathway-chart-choice:hover,.pathway-chart-choice.is-selected { border-color: #b6c7fa; background: #f0f4ff; }
.pathway-chart-choice:focus-visible,.pathway-table-choice:focus-visible { outline: 2px solid #4266df; outline-offset: 2px; }
.pathway-chart-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .83rem; }
.pathway-score-track { position: relative; height: 12px; border-radius: 3px; background: #edf1fa; overflow: hidden; }
.pathway-score-track-signed::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid #7e8a9b; }
.pathway-score-bar { position: absolute; height: 100%; top: 0; border-radius: 3px; background: #365cdb; }
.pathway-score-track-signed .pathway-score-bar.positive { left: 50%; }
.pathway-score-track-signed .pathway-score-bar.negative { right: 50%; background: #dd586c; }
.pathway-score-track:not(.pathway-score-track-signed) .pathway-score-bar { left: 0; }
.pathway-score-value,.pathway-score-q { font-size: .75rem; text-align: right; font-variant-numeric: tabular-nums; color: #3c4c69; }
.pathway-table-choice { border: 0; background: none; color: #254bbd; font: inherit; font-weight: 650; cursor: pointer; text-align: left; padding: .2rem; }
.pathway-table-choice.is-selected { text-decoration: underline; }
.pathway-gene-inspector { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line, #dfe4ec); border-radius: 9px; min-width: 0; }
.pathway-inspector-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; flex-wrap: wrap; }
.pathway-inspector-heading h6 { margin: 0 0 .3rem; font-size: 1.05rem; }
.pathway-inspector-stats { display: flex; gap: .65rem; flex-wrap: wrap; font-size: .8rem; font-weight: 650; }
.pathway-inspector-stats span { background: #f3f6fc; border-radius: 5px; padding: .3rem .5rem; }
.pathway-inspector-table { max-height: 390px; overflow: auto; margin: .7rem 0; }
.pathway-inspector-table th { position: sticky; top: 0; background: #f4f6fb; z-index: 1; }
.pathway-gene-inspector-empty { color: var(--muted, #667085); }
@media (max-width: 680px) { .pathway-chart-choice { grid-template-columns: minmax(78px,1fr) minmax(75px,1fr) 45px 49px; gap: .25rem; } .pathway-chart-name,.pathway-score-value,.pathway-score-q { font-size: .69rem; } .pathway-gene-inspector { padding: .7rem; } }

/* Pathways P3.1: compact inspector controls and visible source provenance. */
.pathway-inspector-controls { display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; margin:.65rem 0 .35rem; font-size:.85rem; }
.pathway-inspector-controls label { display:inline-flex; align-items:center; gap:.35rem; font-weight:650; cursor:pointer; }
.pathway-inspector-controls span { color:var(--muted,#667085); font-variant-numeric:tabular-nums; }
.pathway-provenance-notice { margin:.6rem 0; line-height:1.5; }

/* P5: pathway/gene membership networks. Plot marker radii and labels do not scale during zoom. */
.pathway-network { margin: 1rem 0 1.25rem; padding: 1rem; border: 1px solid var(--line,#dfe4ec); border-radius: 10px; min-width: 0; }
.pathway-network-heading h6 { margin: 0 0 .25rem; font-size: 1rem; }
.pathway-network-heading p { margin: 0 0 .6rem; }
.pathway-network-controls { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: .7rem; align-items: end; margin: .6rem 0; }
.pathway-network-controls label { min-width: 0; display: flex; flex-direction: column; gap: .22rem; font-size: .76rem; font-weight: 650; }
.pathway-network-controls label select,.pathway-network-controls label input:not([type="checkbox"]) { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.pathway-network-controls label.pathway-network-checkbox { flex-direction: row; align-items: center; gap: .4rem; }
.pathway-network-advanced { margin: .4rem 0 .6rem; }
.pathway-network-advanced summary { cursor: pointer; font-size: .82rem; font-weight: 650; }
.pathway-network-summary { font-size: .82rem; color: var(--muted,#667085); padding: .4rem 0; }
.pathway-network-tools,.pathway-network-export { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0; }
.pathway-network-tools [aria-pressed="true"] { border-color:#315dce; color:#315dce; background:#eaf0ff; }
.pathway-network-canvas { width: 100%; min-height: 280px; aspect-ratio: 1000 / 570; max-height: 650px; position: relative; border: 1px solid var(--line,#dfe4ec); border-radius: 8px; overflow: hidden; touch-action: none; user-select: none; }
.pathway-network-svg { display: block; height: 100%; width: 100%; }
.pathway-network-svg [data-network-node]:focus { outline: none; filter: drop-shadow(0 0 3px #315dce); }
.pathway-network-selection { position:absolute; box-sizing:border-box; border:1.5px dashed #315dce; background:rgba(49,93,206,.1); pointer-events:none; }
.pathway-network-inspection { margin: .55rem 0; padding: .55rem .7rem; background:var(--surface-subtle,#f5f7fb); border:1px solid var(--line,#dfe4ec); border-radius:6px; font-size:.82rem; white-space:normal; overflow-wrap:anywhere; }
@media (max-width: 640px) {
 .pathway-network { padding: .55rem; }
 .pathway-network-controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .pathway-network-tools button,.pathway-network-export button { font-size:.76rem; }
 .pathway-network-canvas { aspect-ratio: 1.3; }
}

/* P5.1: expand the existing live pathway plot. The canvas is moved, not cloned. */
.pathway-network-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.pathway-network-heading > div { min-width:0; }
.pathway-network-expand { white-space:nowrap; }
.pathway-network-home { min-width:0; }
.pathway-network-dialog { box-sizing:border-box; width:min(1400px,96vw); max-width:none; height:min(940px,94dvh); max-height:94dvh; padding:0; border:1px solid var(--line,#dfe4ec); border-radius:12px; box-shadow:0 22px 70px rgba(12,23,45,.3); color:inherit; background:var(--surface,#fff); }
.pathway-network-dialog::backdrop { background:rgba(12,24,45,.65); }
.pathway-network-dialog[open] { display:flex; flex-direction:column; }
.pathway-network-dialog-heading { padding:.7rem 1rem; border-bottom:1px solid var(--line,#dfe4ec); display:flex; justify-content:space-between; align-items:center; gap:1rem; flex:none; }
.pathway-network-dialog-heading h6 { margin:0; font-size:1.06rem; }
.pathway-network-dialog-heading p { margin:.15rem 0 0; font-size:.78rem; color:var(--muted,#667085); }
.pathway-network-dialog-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; }
.pathway-network-modal-stage { display:flex; flex-direction:column; flex:1; min-height:0; overflow:auto; padding:.5rem 1rem .85rem; }
.pathway-network-modal-stage .pathway-network-tools { flex:none; margin:.25rem 0 .5rem; }
.pathway-network-modal-stage .pathway-network-canvas { box-sizing:border-box; flex:1 1 auto; min-height:240px; max-height:none; height:auto; aspect-ratio:auto; width:100%; }
.pathway-network-modal-stage .pathway-network-inspection { flex:none; margin:.5rem 0; }
.pathway-network-modal-stage .pathway-network-help { flex:none; font-size:.75rem; margin:.15rem 0; }
.pathway-network-modal-stage .pathway-network-export { flex:none; margin:.15rem 0; }
.pathway-network-modal-stage .pathway-network-svg { width:100%; height:100%; }
@media (max-width:640px) {
  .pathway-network-heading { flex-wrap:wrap; }
  .pathway-network-dialog { width:99vw; height:96dvh; max-height:96dvh; border-radius:6px; }
  .pathway-network-dialog-heading { align-items:flex-start; padding:.5rem; }
  .pathway-network-dialog-heading h6 { font-size:.9rem; }
  .pathway-network-dialog-heading p { font-size:.69rem; }
  .pathway-network-modal-stage { padding:.4rem; }
  .pathway-network-modal-stage .pathway-network-canvas { min-height:180px; }
}


/* P5.2: readable network labels, explicit symbols and descriptive component focus. */
.pathway-network-labels { pointer-events:none; user-select:none; }
.pathway-network-legend { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; padding:.55rem .7rem; background:var(--surface-subtle,#f6f8fc); border:1px solid var(--line,#e0e6ef); border-radius:8px; margin:.55rem 0; font-size:.75rem; }
.pathway-network-legend > strong { color:var(--ink,#1a263d); }
.pathway-network-legend > span { display:inline-flex; gap:.4rem; align-items:center; white-space:nowrap; }
.pathway-network-legend > small { flex-basis:100%; line-height:1.45; color:var(--muted,#67738a); }
.pathway-network-swatch { display:inline-block; width:.7rem; height:.7rem; border-radius:50%; border:1px solid #fff; box-shadow:0 0 0 1px #c5d0df; flex:none; }
.pathway-network-swatch.pathway-positive { background:#315dce; }
.pathway-network-swatch.pathway-negative { background:#d97735; }
.pathway-network-swatch.pathway-gene { background:#7787a6; }
.pathway-network-components { border:1px solid var(--line,#e0e6ef); border-radius:8px; padding:.4rem .7rem; margin:.45rem 0; min-width:0; }
.pathway-network-components > summary { cursor:pointer; font-weight:600; font-size:.8rem; }
.pathway-network-components > label { display:flex; flex-direction:column; gap:.25rem; margin:.6rem 0; font-size:.75rem; max-width:36rem; }
.pathway-network-components select { max-width:100%; }
.pathway-network-group-detail { font-size:.75rem; line-height:1.45; overflow-wrap:anywhere; }
.pathway-network-group-detail > p { margin:.4rem 0; }
.pathway-network-group-paths { display:flex; flex-wrap:wrap; gap:.3rem; max-height:12rem; overflow:auto; }
.pathway-network-group-paths > button { font-size:.72rem; text-align:left; max-width:min(22rem,100%); overflow-wrap:anywhere; }
.pathway-network-modal-stage .pathway-network-legend, .pathway-network-modal-stage .pathway-network-components { flex:none; }
@media (max-width:640px) {
 .pathway-network-legend { gap:.4rem .65rem; padding:.4rem; font-size:.7rem; }
 .pathway-network-components { padding:.4rem; }
}

/* P5.3: visible selection evidence and accessible connected-group navigation. */
.pathway-network-focus { display:flex; flex-wrap:wrap; align-items:end; gap:.55rem .8rem; margin:.5rem 0; padding:.55rem .7rem; border:1px solid var(--line,#dce4ef); border-radius:8px; background:var(--surface-subtle,#f5f8fe); }
.pathway-network-focus label { flex:1 1 16rem; display:flex; flex-direction:column; gap:.2rem; font-size:.78rem; font-weight:600; }
.pathway-network-focus select { width:100%; min-width:0; }
.pathway-network-focus-status { flex:1 1 100%; font-size:.76rem; color:var(--muted,#53627d); }
.pathway-network-inspection { border:1px solid #b8c9ed; border-left:3px solid #315dce; background:#f4f7ff; border-radius:7px; padding:.65rem .8rem; margin:.55rem 0; font-size:.78rem; overflow-wrap:anywhere; }
.pathway-network-inspection > p { margin:.35rem 0; line-height:1.45; }
.pathway-network-inspection .method-note { font-size:.76rem; }
.pathway-network-node-heading { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem .65rem; }
.pathway-network-node-heading > strong { font-size:.86rem; }
.pathway-network-inspection [data-network-open-pathway] { margin:.35rem .35rem .15rem 0; max-width:100%; white-space:normal; text-align:left; }
.pathway-network-connected-list { display:flex; gap:.3rem; flex-wrap:wrap; max-height:8rem; overflow:auto; }
.pathway-network-dialog .pathway-network-inspection { flex:none; }
.pathway-network-dialog .pathway-network-focus { flex:none; }
@media (max-width:640px) { .pathway-network-focus { padding:.45rem; } .pathway-network-inspection { padding:.5rem; } }

.pathway-network-modal-stage .pathway-network-inspection { order:2; }
.pathway-network-modal-stage .pathway-network-canvas { order:3; }
