:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef2f4;
  --line: #cdd6dc;
  --text: #152026;
  --muted: #60717c;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --danger: #b42318;
  --warning: #9a6700;
  --ok: #157347;
  --shadow: 0 18px 40px rgba(22, 34, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #edf3f2;
  padding: 20px 28px 20px 20px;
}

.brand h1,
.brand p,
.workspace-header h2,
.workspace-header p,
.section-heading h2 {
  margin: 0;
}

.brand h1 {
  font-size: 24px;
  line-height: 1.15;
}

.brand p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.panel.compact {
  gap: 10px;
}

.app-tabs {
  display: flex;
  gap: 6px;
}

.app-tab {
  flex: 1;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.app-tab.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2 {
  font-size: 16px;
}

.section-heading.inline {
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field-hint {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 11px;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.45;
}

.primary-action {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.primary-action:hover:not(:disabled) {
  background: var(--accent-strong);
}

.text-button {
  min-height: 30px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

#single-mode {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-examples {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-examples-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.examples-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.example-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.example-pill {
  min-height: 28px;
  border-color: #b9d9d5;
  border-radius: 999px;
  background: #eef9f7;
  color: var(--accent-strong);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.example-pill:hover {
  border-color: var(--accent);
  background: #dff4f1;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.workspace-header h2 {
  font-size: 22px;
}

.workspace-header p {
  margin-top: 6px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
}

.status-box.error {
  border-color: #f3b4af;
  background: #fff4f2;
  color: var(--danger);
}

.status-box.info {
  border-color: #b9d9d5;
  background: #eef9f7;
}

/* Results view tabs (Results / No result) — browser-tab affordance: each
   tab is its own raised shape with top-rounded corners, sitting on a
   baseline rule; the active tab's bottom edge matches the panel
   background below it so it visually fuses with the content, exactly
   like a Chrome tab. */
.results-view-tabs {
  display: flex;
  gap: 4px;
  margin: 22px 0 0;
  border-bottom: 1px solid var(--line);
  padding: 0 4px;
}

.results-view-tabs .mode-tab {
  flex: initial;
  position: relative;
  top: 1px;
  min-height: 34px;
  padding: 7px 18px;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #e7edec;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.results-view-tabs .mode-tab:hover {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.06);
}

.results-view-tabs .mode-tab.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  border-bottom: 1px solid var(--surface);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
  font-weight: 700;
  z-index: 1;
}

.results-view-tabs .mode-tab.active:hover {
  background: var(--surface);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
}

/* Gene index + results layout */

.results-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 12px;
  margin-top: 16px;
}

.gene-index {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 130px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 4px 0;
}

.gene-index:empty {
  display: none;
}

.gene-index-item {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 5px 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  min-height: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s, color 0.1s;
}

.gene-index-item:hover {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--line);
}

.gene-index-item.active {
  background: var(--surface-strong);
  color: var(--accent);
  border-color: var(--line);
}

.results-window {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow-y: auto;
  overflow-x: hidden;
}

.empty-state {
  display: grid;
  min-height: 100%;
  place-content: center;
  padding: 20px;
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  font-size: 18px;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.annotation-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.annotation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfc;
}

.annotation-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.annotation-heading {
  min-width: 0;
}

.annotation-card h3 {
  margin: 0;
  font-size: 18px;
}

.annotation-card .subtle {
  color: var(--muted);
  font-size: 13px;
}

.annotation-card-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cache-badge-slot {
  display: flex;
  justify-content: flex-end;
}

.cache-badge-slot:empty {
  display: none;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.review-badge.high {
  border-color: #b8dec9;
  background: #dff3e8;
  color: var(--ok);
}

.review-badge.medium {
  border-color: #d4c39b;
  background: #fff6db;
  color: #7c5a00;
}

.review-badge.context {
  border-color: #b9d9d5;
  background: #eef9f7;
  color: var(--accent-strong);
}

.review-badge.low {
  border-color: #d6dce1;
  background: #f2f5f7;
  color: var(--muted);
}

.review-badge.cache-badge {
  border-color: #b9d9d5;
  background: #eef9f7;
  color: var(--accent-strong);
}

.review-badge.quality-info {
  border-color: #b9d9d5;
  background: #eef9f7;
  color: var(--accent-strong);
}

.review-badge.quality-warning {
  border-color: #d4c39b;
  background: #fff6db;
  color: #7c5a00;
}

.review-badge.quality-critical {
  border-color: #e5b0aa;
  background: #fdecea;
  color: var(--danger);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
}

.status-value {
  font-size: 13px;
  font-weight: 700;
}

.status-yes {
  color: var(--ok);
}

.status-no {
  color: var(--muted);
}

.status-unknown {
  color: var(--muted);
}

.annotation-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lazy-field-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0;
}

.lazy-field-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
}

.lazy-field-summary::-webkit-details-marker {
  display: none;
}

.lazy-field-summary::after {
  content: "▸";
  color: var(--accent);
  font-size: 11px;
}

.lazy-field-row[open] .lazy-field-summary::after {
  content: "▾";
}

.lazy-field-value {
  padding: 0 12px 12px;
}

.inline-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.inline-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid #cbd5db;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field-row-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-row-value {
  display: inline-block;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Same rounded-pill language as .review-badge/.citation-link elsewhere
   in the card, so a parsed list of cancer-type entries reads as a
   designed element instead of raw "- " text lines. */
.cancer-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cancer-type-chip {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  background: var(--surface-strong);
  line-height: 1.3;
}

.cancer-type-chip-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.cancer-type-chip-context {
  font-size: 12px;
  color: var(--muted);
}

/* Rationale is the primary signal on the card — same accent-border
   callout treatment already used for supporting-quote blocks, so it
   reads as "the important one" using a pattern already established
   elsewhere in this app rather than a new visual language. */
.field-row-highlight {
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: var(--surface-strong);
  padding: 10px 14px;
}

.field-row-highlight .field-row-label {
  color: var(--accent-strong);
}

.field-row-highlight .field-row-value {
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
}

.benchmark-report {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.metric-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.benchmark-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}

.benchmark-table th,
.benchmark-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.benchmark-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.benchmark-table tr:last-child td {
  border-bottom: 0;
}

/* Input mode tabs */

.input-mode-tabs {
  display: flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  background: var(--surface-strong);
}

.mode-tab {
  flex: 1;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 26px;
  padding: 3px 10px;
  transition: background 0.12s, color 0.12s;
}

.mode-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

/* Required star */

.required-star {
  color: var(--danger);
  font-weight: 700;
}

/* Breakpoint collapsible */

.breakpoint-section {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface-strong);
  margin-top: 4px;
}

.breakpoint-section summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breakpoint-section summary::-webkit-details-marker {
  display: none;
}

.breakpoint-section summary::after {
  content: "▸";
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.15s ease;
}

.breakpoint-section[open] summary::after {
  transform: rotate(90deg);
}

.breakpoint-section[open] summary {
  margin-bottom: 10px;
}

.optional-tag {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
}

.breakpoint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Queue */

#fusion-queue {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--surface-strong);
  font-size: 12px;
}

.queue-fusion {
  font-weight: 700;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-meta {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 11px;
}

.queue-remove {
  width: 22px;
  min-height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.queue-remove:hover {
  color: var(--danger);
}

/* Batch spreadsheet grid */

body.batch-active .app-shell {
  grid-template-columns: minmax(500px, min(920px, 67vw)) 1fr;
}

.batch-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.batch-grid-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.batch-grid {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 12px;
  table-layout: fixed;
}

/* Header row */

.grid-rn {
  width: 28px;
  background: var(--surface-strong);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  user-select: none;
}

.batch-grid tbody .grid-rn {
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}

.grid-th {
  background: var(--surface-strong);
  border-bottom: 2px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 5px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  user-select: none;
}

.grid-th:last-of-type {
  border-right: none;
}

.grid-th-required {
  color: var(--accent);
}

.grid-th-optional {
  font-style: italic;
  font-weight: 600;
}

.grid-del-header {
  width: 30px;
  background: var(--surface-strong);
  border-bottom: 2px solid var(--line);
}

/* Data cells */

.grid-cell {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0;
}

.grid-cell input {
  display: block;
  width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 5px 7px;
  font-size: 12px;
  outline: none;
  min-height: 0;
}

.grid-cell input:focus {
  background: #eef9f7;
  box-shadow: inset 0 0 0 2px var(--accent);
  position: relative;
  z-index: 1;
}

.grid-cell-required input::placeholder {
  color: #a8c9c5;
}

.grid-del-cell {
  width: 30px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.grid-del-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  min-height: 0;
  padding: 2px 5px;
  font-size: 14px;
  line-height: 1;
}

.grid-del-btn:hover {
  color: var(--danger);
}

/* Remove bottom border from last row */
.batch-grid tbody tr:last-child .grid-cell,
.batch-grid tbody tr:last-child .grid-del-cell,
.batch-grid tbody tr:last-child .grid-rn {
  border-bottom: none;
}

.batch-grid-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.batch-legend {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

/* Supporting evidence section */

.supporting-evidence {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.supporting-evidence-heading {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.retrieval-details {
  margin-bottom: 8px;
}

.retrieval-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.retrieval-summary:hover,
.retrieval-summary:focus-visible {
  background: var(--surface-strong);
}

.retrieval-summary::-webkit-details-marker {
  display: none;
}

.retrieval-summary::after {
  content: "▸ show";
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.15s ease;
}

details[open] > .retrieval-summary::after {
  content: "▾ hide";
}

.quote-details {
  margin-top: 8px;
}

.evidence-card-details {
  margin-top: 8px;
}

.evidence-card-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
}

.evidence-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.evidence-card-topline a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.evidence-card h5 {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.35;
}

.evidence-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.evidence-card .evidence-card-meta {
  font-weight: 700;
}

.evidence-card blockquote {
  margin: 7px 0 0;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.quote-details .quote-list {
  margin-top: 7px;
}

.retrieval-count-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.retrieval-info-icon {
  font-size: 13px;
  color: var(--muted);
  cursor: help;
  line-height: 1;
}

.retrieval-pmid-grid {
  margin-top: 7px;
}

.citation-links {
  margin-bottom: 10px;
}

.citation-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.citation-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 8px;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.citation-link:hover {
  background: #eef9f7;
  border-color: var(--accent);
}

.quote-list {
  display: grid;
  gap: 7px;
}

.supporting-quote {
  margin: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  background: var(--surface-strong);
}

.supporting-quote p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
  color: var(--text);
}

.supporting-quote cite {
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  color: var(--muted);
}

.supporting-quote cite a {
  color: var(--accent);
  text-decoration: none;
}

.supporting-quote cite a:hover {
  text-decoration: underline;
}

/* Domains & treatments — reuses the same collapsible disclosure pattern as
   Supporting Evidence (.retrieval-details/.retrieval-summary) so a curator
   who already knows that affordance recognizes it here immediately. */
.domain-context-body {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.domain-partners {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.domain-partner-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}

.domain-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Same rounded-pill language as .review-badge, colored by domain status. */
.domain-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.domain-chip-retained {
  border-color: #b8dec9;
  background: #dff3e8;
  color: var(--ok);
}

.domain-chip-disrupted {
  border-color: #d4c39b;
  background: #fff6db;
  color: #7c5a00;
}

.domain-chip-lost {
  border-color: #d6dce1;
  background: #f2f5f7;
  color: var(--muted);
}

.domain-kinase-callout {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.fusion-knowledge {
  margin-top: 12px;
}

.fusion-knowledge-sources {
  margin-top: 5px;
  font-size: 11px;
}

.hidden {
  display: none !important;
}

/* Feedback modal — generic modal chrome (backdrop/header/footer/icon
   button) plus feedback-specific field/button styling. */

.feedback-button {
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  z-index: 20;
}

.feedback-modal {
  width: min(560px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-header h2 {
  margin: 0;
}

.modal-header p {
  margin-top: 6px;
  color: var(--muted);
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.feedback-run-context {
  margin: 16px 0 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: var(--surface-strong);
  padding: 8px 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
}

.feedback-field {
  display: block;
  margin-top: 14px;
}

.feedback-field span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feedback-field select,
.feedback-field textarea,
.feedback-field input {
  width: 100%;
}

.feedback-field textarea {
  resize: vertical;
  font-family: inherit;
}

.install-output {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
}

.install-output.error {
  border-color: #f3b4af;
  background: #fff4f2;
}

.install-output h3 {
  margin: 0 0 8px;
}

.install-output p {
  margin: 8px 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    min-height: 80vh;
  }

  .results-layout {
    flex-direction: column;
  }

  .gene-index {
    flex-direction: row;
    width: auto;
    flex-wrap: wrap;
    overflow-x: auto;
  }

  .results-window {
    min-height: 60vh;
  }

  .annotation-fields {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    flex-direction: column;
  }
}
