/* Curated markers and DEG candidates share five wider columns. */
html[data-theme] .marker-console .marker-console-heading {
  padding: 24px 0 12px;
  border: 0;
  background: transparent;
}
.marker-breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; color: var(--bioatlas-muted); font-size: .82rem; }
.marker-breadcrumb a { color: inherit; text-decoration: none; }
.marker-breadcrumb a:hover { color: var(--bioatlas-accent); text-decoration: underline; }
.marker-console .marker-console-heading h1 { font-size: 1.75rem; }
.marker-console .marker-workspace { padding-top: 24px; }
.marker-console .marker-search-control .form-control { width: 250px; }
.marker-catalog-header { margin-top: 16px; }
.marker-catalog-tabs { display: flex; gap: 22px; margin-top: 0; border-bottom: 1px solid var(--bioatlas-line); }
.marker-catalog-tabs a { padding: 10px 2px; border-bottom: 2px solid transparent; color: var(--bioatlas-muted); text-decoration: none; font-size: .9rem; font-weight: 600; }
.marker-catalog-tabs a[aria-current] { border-color: var(--bioatlas-accent); color: var(--bioatlas-accent); }
html[data-theme="dark"] .marker-catalog-tabs a[aria-current] { border-color: #7cc9ec; color: #7cc9ec; }
.marker-catalog-note { margin: 10px 0 0; color: var(--bioatlas-muted); font-size: .76rem; line-height: 1.65; overflow-wrap: anywhere; }
.marker-catalog-evidence { display: block; margin-top: 6px; font-size: .65rem; color: var(--bioatlas-muted); }
.marker-catalog-evidence-tag { display: inline-block; margin-bottom: 12px; padding: 3px 8px; border-radius: 4px; background: var(--bioatlas-soft); color: var(--drawer-action); font-size: .75rem; }
.marker-catalog-source { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: .76rem; }
.marker-catalog-source dt { color: var(--drawer-muted); font-weight: 400; }
.marker-catalog-source dd { margin: 0; color: var(--drawer-text); overflow-wrap: anywhere; }
.marker-catalog-stats-scroll { overflow: auto; max-height: 380px; }
.marker-source-download { display: block; width: fit-content; overflow-wrap: anywhere; color: var(--drawer-action); text-underline-offset: 3px; font-size: .8rem; line-height: 1.6; }
.marker-statistics-status { margin: 12px 0; color: var(--drawer-muted); font-size: .75rem; }
.marker-statistics-pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.marker-statistics-pager .btn { border: 1px solid var(--drawer-line); color: var(--drawer-action); background: transparent; }
.marker-statistics-pager .btn:hover:not(:disabled) { background: var(--bioatlas-soft); }
.marker-catalog-stats { width: 100%; font-size: .7rem; font-variant-numeric: tabular-nums; }
.marker-catalog-stats th, .marker-catalog-stats td { padding: 8px 7px; border-bottom: 1px solid var(--drawer-line); color: var(--drawer-text); }
.marker-catalog-stats th { font-size: .65rem; font-weight: 600; overflow-wrap: normal; min-width: 64px; }
.marker-catalog-stats th.marker-stat-field { white-space: nowrap; overflow-wrap: normal; }
.marker-catalog-stats td { white-space: nowrap; }
.marker-catalog-stats th:first-child, .marker-catalog-stats td:first-child { padding-left: 0; }
/* Rows grow with the page; horizontal overflow must not create a rounding-only vertical scrollbar. */
.marker-console .marker-table-scroll { overflow-y: hidden; }
.marker-console .marker-table { min-width: 800px; font-size: .86rem; }
.marker-console .marker-table th:nth-child(1) { width: 9%; }
.marker-console .marker-table th:nth-child(2) { width: 17%; }
.marker-console .marker-table th:nth-child(3) { width: 25%; }
.marker-console .marker-table th:nth-child(4) { width: 37%; }
.marker-console .marker-table th:nth-child(5) { width: 12%; }
.marker-console .marker-table thead th {
  padding: 15px 14px;
  background: var(--bioatlas-soft);
  color: var(--bioatlas-ink);
  font-size: .8rem;
}
.marker-console .marker-table tbody td { padding: 15px 14px; }
.marker-primary-gene { font: 500 .89rem ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.marker-cell-type {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: #e7f4f1;
  color: #176859;
  font-size: .8rem;
  line-height: 1.5;
}
.marker-console .marker-pill-list-row > span,
.marker-console .marker-inline-expansion > span {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bioatlas-ink);
  font-size: .78rem;
  font-weight: 400;
}
.marker-console .marker-pill-list-row > span:not(:last-of-type)::after,
.marker-console .marker-inline-expansion > span:not(:last-of-type)::after { content: ","; }
.marker-console .marker-pill-list-row { gap: 4px 6px; }
.marker-console .marker-inline-expansion {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bioatlas-line);
  gap: 5px 6px;
}
.marker-inline-expansion[hidden] { display: none; }
.marker-console .marker-detail-button {
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--bioatlas-accent);
  font-size: .8rem;
}
.marker-console .marker-detail-button:hover,
.marker-console .marker-detail-button:focus-visible { background: transparent; text-decoration: underline; }
.marker-console .marker-detail-button::after { content: " →"; }
.marker-pubmed-link { display: block; width: fit-content; margin-top: 5px; color: var(--bioatlas-accent); text-underline-offset: 3px; }
.offcanvas.marker-detail-drawer {
  --drawer-line: #edf2f6;
  --drawer-text: #16242f;
  --drawer-muted: #6b7c8c;
  --drawer-action: #365f8f;
  --drawer-gene-bg: #e3f3f1;
  --drawer-gene-text: #0b6e66;
  --drawer-shadow: 0 1px 2px rgb(14 42 67 / 6%), 0 3px 10px rgb(14 42 67 / 5%);
  width: min(560px, 94vw) !important;
  background: var(--bioatlas-surface);
  color: var(--drawer-text);
  box-shadow: -18px 0 50px rgb(10 30 50 / 22%);
}
html[data-theme] .marker-detail-drawer .marker-detail-header {
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-color: var(--drawer-line);
  background: var(--bioatlas-surface);
}
html[data-theme] .marker-detail-drawer .marker-detail-header h2 {
  color: var(--drawer-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}
.marker-drawer-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--bioatlas-line);
  border-radius: 50%;
  background: var(--bioatlas-surface);
  color: var(--drawer-muted);
  transition: background .15s, border-color .15s, color .15s;
}
.marker-drawer-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.marker-drawer-close:is(:hover, :focus-visible) { border-color: var(--drawer-action); color: var(--drawer-action); background: var(--bioatlas-soft); }
.marker-detail-drawer .marker-detail-body { min-height: 0; padding: 20px 22px; overscroll-behavior: contain; }
.marker-detail-body .marker-breadcrumb { margin-bottom: 14px; font-size: .78rem; line-height: 1.7; }
.marker-detail-body .marker-breadcrumb a { color: var(--drawer-action); }
.marker-detail-body .marker-breadcrumb [aria-current] { color: var(--drawer-text); }
.marker-detail-identity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 0 0 16px; }
.marker-detail-identity > div { min-width: 0; padding: 13px 15px; border: 1px solid var(--drawer-line); border-radius: 10px; background: var(--bioatlas-surface); }
.marker-detail-identity dt { margin-bottom: 3px; color: var(--drawer-muted); font-size: .75rem; line-height: 1.7; font-weight: 400; }
.marker-detail-identity dd { margin: 0; color: var(--drawer-text); font-size: .91rem; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
.marker-detail-identity > div:last-child { grid-column: 1 / -1; }
.marker-detail-drawer .marker-detail-section,
.marker-detail-drawer .marker-detail-section + .marker-detail-section {
  margin: 0 0 14px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--drawer-line);
  border-radius: 10px;
  background: var(--bioatlas-surface);
  box-shadow: var(--drawer-shadow);
}
.marker-detail-panel-head { padding: 14px 18px; border-bottom: 1px solid var(--drawer-line); }
.marker-detail-drawer .marker-detail-panel-head h3 { margin: 0; color: var(--drawer-text); font-size: .875rem; font-weight: 700; line-height: 1.7; }
.marker-detail-panel-body { padding: 18px; }
.marker-detail-body .marker-pill-list-detail { gap: 7px; }
.marker-detail-body .marker-pill-list-detail span {
  min-height: 0;
  padding: 3px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--drawer-gene-bg);
  color: var(--drawer-gene-text);
  font: 500 .75rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.marker-detail-body .marker-reference-list { margin: 0; padding: 0; list-style: none; font-size: .84rem; line-height: 1.75; }
.marker-detail-body .marker-reference-list li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.marker-detail-body .marker-reference-list li::before { content: "[" attr(value) "]"; padding-top: 2px; color: var(--drawer-muted); font: .75rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; }
.marker-detail-body .marker-reference-list li + li { margin-top: 0; border-top: 1px dashed var(--drawer-line); }
.marker-reference-body { min-width: 0; }
.marker-reference-citation { margin: 0; color: var(--drawer-text); font-weight: 400; overflow-wrap: anywhere; }
.marker-detail-body .marker-pubmed-link { margin-top: 6px; color: var(--drawer-action); font-size: .8rem; text-decoration: none; }
.marker-detail-body .marker-pubmed-link:hover { text-decoration: underline; }
.marker-detail-footer { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--drawer-line); background: var(--bioatlas-surface); }
.marker-detail-drawer .marker-detail-footer .btn { min-height: 38px; padding: 7px 14px; border-radius: 7px; font-size: .875rem; line-height: 1.5; font-weight: 600; }
html[data-theme] .marker-detail-drawer .marker-detail-footer .marker-copy-button { border: 1px solid var(--drawer-action); background: var(--drawer-action); color: #fff; }
html[data-theme] .marker-detail-drawer .marker-detail-footer .marker-copy-button:hover { filter: brightness(.92); }
.marker-detail-footer .marker-drawer-dismiss { border: 1px solid var(--drawer-action); background: transparent; color: var(--drawer-action); }
.marker-detail-footer .marker-drawer-dismiss:hover { background: var(--bioatlas-soft); color: var(--drawer-action); }
html[data-theme="dark"] .marker-cell-type { color: #a4ded8; background: #244846; }
html[data-theme="dark"] .marker-console .marker-table .marker-primary-gene { color: #e2edf5; }
html[data-theme="dark"] .marker-console .marker-table thead th { color: #eaf3f9; background: #263f51; }
html[data-theme="dark"] .marker-console .marker-detail-button { color: #7cc9ec; background: transparent; }
html[data-theme="dark"] .marker-console .marker-pill-list-row > span,
html[data-theme="dark"] .marker-console .marker-inline-expansion > span { color: #e2edf5; background: transparent; }
html[data-theme="dark"] .marker-console .marker-pill-list .marker-pill-more { color: #7cc9ec; }
html[data-theme="dark"] .marker-detail-drawer .marker-pubmed-link { color: #7cc9ec; }
html[data-theme="dark"] .offcanvas.marker-detail-drawer {
  --drawer-line: #304859;
  --drawer-text: #e3edf5;
  --drawer-muted: #a6b8c8;
  --drawer-action: #83bee6;
  --drawer-gene-bg: #173f3c;
  --drawer-gene-text: #a5dfd5;
  --drawer-shadow: 0 1px 2px rgb(0 0 0 / 18%), 0 3px 10px rgb(0 0 0 / 13%);
}
html[data-theme="dark"] .marker-detail-drawer .marker-detail-footer .marker-copy-button { color: #102637; }
@media (max-width: 767px) {
  html[data-theme] .marker-console .marker-console-heading { padding-top: 18px; }
  .marker-breadcrumb { margin-bottom: 14px; }
  .marker-console .marker-workspace { padding-top: 16px; }
  .marker-detail-drawer .marker-detail-body { padding: 18px 16px; }
  html[data-theme] .marker-detail-drawer .marker-detail-header { padding-inline: 16px; }
  .marker-detail-identity { gap: 10px; }
  .marker-detail-identity > div { padding: 12px; }
  .marker-detail-panel-head, .marker-detail-panel-body { padding: 14px; }
  .marker-detail-footer { padding-inline: 16px; }
  .marker-console .marker-pagination-bar { gap: 12px; }
  .marker-console .pagination { flex-wrap: wrap; gap: 3px; }
  .marker-console .marker-results-tools { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .marker-console .marker-search-field,
  .marker-console .marker-sort-field,
  .marker-console .marker-search-control .form-control,
  .marker-console .marker-sort-field .form-select { width: 100%; }
}
