:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #1d2430;
  --muted: #667085;
  --line: #d8dee8;
  --accent: #2364aa;
  --accent-dark: #174f88;
  --warning: #9b3412;
  --warning-bg: #fff4ed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 58px;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.brand {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0;
}

.topbar nav {
  display: flex;
  gap: 18px;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

section {
  margin: 0 0 28px;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 21px;
}

h3 {
  font-size: 17px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  padding: 24px 0 8px;
}

.hero p {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
  max-width: 680px;
}

.visually-hidden {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-box,
.filters {
  align-items: center;
  display: flex;
  gap: 10px;
}

.search-box input,
.filters input,
.filters select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 0 12px;
}

.search-box input,
.filters input {
  flex: 1;
  min-width: 220px;
}

.scan-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.scan-form label {
  color: var(--ink);
  display: grid;
  font-weight: 750;
  gap: 6px;
}

.scan-form textarea,
.scan-form input,
.scan-form select {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.scan-form textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.scan-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.scan-controls label {
  min-width: 180px;
}

.scan-mode-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
}

.tf-scan-fields {
  display: grid;
  gap: 12px;
}

.evidence-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 10px 12px;
}

.evidence-filter legend {
  color: var(--ink);
  font-weight: 750;
  padding: 0 4px;
}

.evidence-filter > div {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.evidence-filter label {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-weight: 500;
  gap: 8px;
}

.evidence-filter input {
  min-height: auto;
  padding: 0;
}

.scan-summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.scan-evidence-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.scan-evidence-counts span {
  background: #eef5ff;
  border: 1px solid #cfe1fb;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 650;
  padding: 4px 9px;
}

.profile-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 14px;
  padding: 14px;
}

.profile-panel p {
  margin: 0 0 10px;
}

.profile-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 12px 0;
}

.profile-metrics div {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.profile-metrics strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.profile-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.profile-source-list,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.profile-source-list span {
  background: #eef5ff;
  border: 1px solid #cfe1fb;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 650;
  padding: 4px 9px;
}

.profile-plot {
  overflow-x: auto;
}

.fimo-profile-svg {
  display: block;
  min-width: 720px;
  width: 100%;
}

.fimo-profile-svg .plot-bg {
  fill: #fbfcfe;
}

.fimo-profile-svg .axis {
  stroke: #8391a7;
  stroke-width: 1.2;
}

.fimo-profile-svg .grid {
  stroke: #d8dee8;
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.fimo-profile-svg .profile-threshold {
  stroke: #9b3412;
  stroke-dasharray: 5 5;
  stroke-width: 1.2;
}

.fimo-profile-svg .profile-count-bars rect {
  fill: #cfe1fb;
  opacity: 0.55;
}

.fimo-profile-svg .profile-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.fimo-profile-svg .axis-label {
  fill: var(--muted);
  font-size: 12px;
}

.peak-table {
  margin-top: 12px;
}

.peak-table summary {
  cursor: pointer;
  font-weight: 750;
}

.peak-table .table-wrap {
  margin-top: 10px;
}

.scan-help {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding-bottom: 18px;
}

.scan-help p {
  margin: 0;
  max-width: 820px;
}

.motif-picker {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.motif-picker summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 21px;
  font-weight: 750;
  justify-content: space-between;
  list-style-position: inside;
}

.motif-picker summary .muted {
  font-size: 15px;
  font-weight: 400;
}

.motif-picker[open] summary {
  margin-bottom: 12px;
}

.motif-search input {
  flex: 1;
  min-width: 280px;
}

.motif-picker-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.motif-choice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.motif-choice > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.motif-choice > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.motif-choice p {
  margin: 0;
}

.motif-examples {
  color: var(--muted);
  font-size: 13px;
  max-height: 2.8em;
  overflow: hidden;
}

.choice-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.compact-motif-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 0;
}

button,
.button-link {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
  color: #ffffff;
  text-decoration: none;
}

button.secondary-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--accent);
}

button.secondary-button:hover {
  background: #eef5ff;
  color: var(--accent-dark);
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  display: inline-flex;
  font-weight: 650;
  min-height: 42px;
  padding: 0 14px;
}

.secondary-link:hover {
  background: #eef5ff;
  text-decoration: none;
}

.stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stats div,
.record-stats div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.stats strong,
.record-stats strong {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.stats span,
.record-stats span,
.muted {
  color: var(--muted);
}

.docs-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.docs-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.docs-panel summary {
  cursor: pointer;
  font-size: 21px;
  font-weight: 750;
}

.docs-panel[open] summary {
  margin-bottom: 12px;
}

.docs-panel ul {
  margin: 0;
  padding-left: 20px;
}

.docs-panel li + li {
  margin-top: 6px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.bar-row span {
  color: var(--muted);
  font-size: 13px;
}

.bar-track,
.mini-bar {
  background: #edf1f7;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.bar-track span,
.mini-bar span {
  background: var(--accent);
  display: block;
  height: 100%;
}

.mini-bar {
  min-width: 150px;
}

.legend-strip,
.evidence-guide article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.legend-grid,
.annotation-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.legend-grid div,
.annotation-grid div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.legend-grid strong,
.annotation-grid strong {
  display: block;
}

.legend-grid span,
.annotation-grid span,
.trust {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

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

.home-hero {
  border-bottom: 1px solid var(--line);
  padding: 32px 0 28px;
}

.home-hero-copy {
  max-width: 790px;
}

.home-lede {
  font-size: 20px;
  line-height: 1.35;
  margin: 0;
  max-width: 660px;
}

.home-context {
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 730px;
}

.home-search {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 24px;
  max-width: 780px;
}

.home-search input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 0 14px;
}

.home-search-examples {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.home-search-examples span,
.home-search-examples a {
  font-size: 13px;
}

.home-search-examples span {
  color: var(--muted);
}

.home-record-explainer {
  border-bottom: 1px solid var(--line);
  padding: 2px 0 26px;
}

.home-record-explainer p:last-child {
  color: var(--muted);
  margin: 0;
  max-width: 820px;
}

.home-section-head {
  align-items: baseline;
}

.home-route-grid,
.home-example-grid {
  display: grid;
  gap: 0 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-route {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 18px 0;
}

.home-route:first-child,
.home-route:nth-child(2) {
  border-top: 1px solid var(--line);
}

.home-route:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

.home-route strong {
  color: var(--accent);
  font-size: 18px;
}

.home-route > span:last-child,
.home-example span {
  color: var(--muted);
}

.home-route-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.home-example {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 0;
}

.home-example:nth-child(-n + 2) {
  border-top: 1px solid var(--line);
}

.home-example strong {
  font-size: 16px;
}

.home-evidence-note {
  background: #eef5ff;
  border: 1px solid #cfe0f5;
  padding: 14px 16px;
}

.home-evidence-note p,
.home-release p {
  color: var(--muted);
  margin: 0;
}

.home-evidence-note strong {
  color: var(--ink);
}

.home-release {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 16px;
}

.compact-legend {
  margin-bottom: 14px;
}

.evidence-guide {
  display: grid;
  gap: 14px;
}

.evidence-guide article > div {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.status {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 750;
  margin-left: 6px;
  padding: 2px 7px;
}

.status.reviewed {
  background: #e7f7ef;
  color: #12633d;
}

.section-head,
.record-head,
.motif-card-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.record-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.record-head p {
  margin: 0;
}

.record-note {
  background: #fff8e8;
  border: 1px solid #f4d27b;
  border-radius: 6px;
  color: #7a4d00;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 10px !important;
  max-width: 720px;
  padding: 8px 10px;
}

.record-stats {
  display: flex;
  gap: 12px;
}

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

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.wide-table table {
  min-width: 1280px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f0f3f8;
  font-size: 13px;
  font-weight: 750;
}

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

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  background: #e9f2ff;
  border: 1px solid #c8ddf8;
  border-radius: 999px;
  color: #164d82;
  padding: 4px 10px;
}

.region-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.region-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.region-panel p {
  margin: 10px 0 0;
}

.domain-track {
  background: #edf1f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 14px;
  margin-top: 4px;
  overflow: hidden;
  position: relative;
}

.domain-track span {
  background: var(--accent);
  border-radius: 999px;
  display: block;
  height: 100%;
  position: absolute;
  top: 0;
}

.domain-track-labels,
.region-stats {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
  margin-top: 6px;
}

.region-stats {
  justify-content: flex-start;
}

.region-stats span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
}

.region-motif-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.region-motif-list li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding-top: 8px;
}

.region-motif-list a {
  overflow-wrap: anywhere;
}

.region-motif-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.evidence-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 12px;
}

.evidence-group summary {
  cursor: pointer;
  font-weight: 750;
  padding: 14px 16px;
}

.evidence-group summary span {
  color: var(--muted);
  font-weight: 600;
  margin-left: 8px;
}

.motif-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 0 16px 16px;
}

.motif-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.motif-card-head {
  align-items: flex-start;
  gap: 10px;
}

.motif-card-head a {
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.motif-card-head span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.motif-card .mono {
  overflow-wrap: anywhere;
}

.external-links,
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.external-links {
  margin-top: 8px;
}

.external-links a {
  background: #f0f6ff;
  border: 1px solid #c8ddf8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 8px;
}

.source-links div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 220px;
  padding: 12px;
}

.source-links a,
.source-links span {
  display: block;
}

.source-links span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.consensus {
  overflow-wrap: anywhere;
}

.warning {
  background: var(--warning-bg);
  border: 1px solid #ffd6c2;
  border-radius: 6px;
  color: var(--warning);
  padding: 8px 10px;
}

.pwm-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  padding: 16px;
}

.pwm-svg {
  display: block;
  max-width: 100%;
  min-width: 360px;
}

.pwm-svg.compact {
  min-width: 0;
  width: 100%;
}

.sequence-logo {
  background: #ffffff;
}

.logo-axis {
  stroke: #8b95a5;
  stroke-width: 1;
}

.logo-axis-label,
.logo-position-label {
  fill: #596170;
  font-size: 10px;
}

.logo-letter {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 0.3px;
}

.viewer-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.viewer {
  height: min(68vh, 680px);
  min-height: 420px;
  width: 100%;
}

.viewer-status {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
}

@media (max-width: 800px) {
  .topbar {
    padding: 0 16px;
  }

  .page {
    padding: 18px;
  }

  .hero,
  .stats {
    grid-template-columns: 1fr;
  }

  .home-search,
  .home-route-grid,
  .home-example-grid {
    grid-template-columns: 1fr;
  }

  .home-route:nth-child(2),
  .home-example:nth-child(2) {
    border-top: 0;
  }

  .filters,
  .search-box,
  .record-head,
  .record-stats {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 28px;
  }
}


.matrix-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.matrix-badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 8px;
}

.matrix-badge.ready {
  background: #e7f7ef;
  border: 1px solid #b8e5ce;
  color: #12633d;
}

.matrix-badge.blocked {
  background: #fff4ed;
  border: 1px solid #ffd6c2;
  color: #9b3412;
}

.matrix-badge.model-only {
  background: #eef5ff;
  border: 1px solid #cfe1fb;
  color: #174f88;
}

.semantic-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 10px;
}

.semantic-grid div {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
}

.semantic-grid span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.semantic-grid strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.inline-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 750;
  margin-left: 6px;
  padding: 2px 7px;
}

.inline-badge.pending,
.matrix-badge.pending {
  background: #fff8e6;
  border: 1px solid #f4d27b;
  color: #7a4d00;
}

.semantic-counts {
  margin-top: 14px;
}

.scientific-hero {
  align-items: center;
}

.decision-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
}

.decision-card > p {
  margin: 12px 0 0;
}

.decision-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: 12px;
}

.decision-grid div,
.primary-list-preview {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.decision-grid span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.decision-grid strong {
  display: block;
  margin-top: 3px;
}

.decision-caveat {
  color: var(--warning);
}

.primary-list-preview {
  margin-top: 12px;
}

.primary-list-preview p,
.primary-list-preview ul {
  margin: 0 0 8px;
}

.primary-list-preview li {
  overflow-wrap: anywhere;
}

.scan-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 8px;
}

.scan-status.yes {
  background: #e7f7ef;
  border: 1px solid #b8e5ce;
  color: #12633d;
}

.scan-status.no {
  background: #fff4ed;
  border: 1px solid #ffd6c2;
  color: #9b3412;
}

.matrix-acgt-table {
  min-width: max-content;
  width: auto;
}

.matrix-acgt-table th,
.matrix-acgt-table td {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}

.matrix-acgt-table th:first-child,
.matrix-acgt-table tbody th {
  position: sticky;
  left: 0;
  text-align: left;
  z-index: 1;
}

.matrix-acgt-table tbody th {
  background: var(--panel);
}

/* ModCREDB compact prediction/search table patch */
.search-results-table {
  font-size: 14px;
  min-width: 1040px;
  table-layout: fixed;
}
.search-results-table th,
.search-results-table td {
  padding: 8px 9px;
}
.search-col-id { width: 100px; }
.search-col-gene { width: 95px; }
.search-col-protein { width: 230px; }
.search-col-prediction { width: 150px; }
.search-col-scan { width: 62px; }
.search-col-pwm { width: 64px; }
.search-col-3d { width: 56px; }
.search-col-pfam { width: 205px; }
.search-col-caveat { width: 190px; }
.search-results-table .protein-cell,
.search-results-table .pfam-cell,
.search-results-table .caveat-cell {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.search-results-table .number-cell {
  text-align: center;
}
.search-results-table .prediction-cell {
  font-weight: 750;
}
.motif-table {
  table-layout: fixed;
}
.motif-table th:nth-child(1),
.motif-table td:nth-child(1) { width: 290px; overflow-wrap: anywhere; }
.motif-table th:nth-child(2),
.motif-table td:nth-child(2) { width: 160px; }
.motif-table th:nth-child(3),
.motif-table td:nth-child(3) { width: 135px; }
.motif-table th:nth-child(4),
.motif-table td:nth-child(4) { width: 180px; overflow-wrap: anywhere; }
.motif-table th:nth-child(5),
.motif-table td:nth-child(5) { width: 180px; }
.motif-table th:nth-child(6),
.motif-table td:nth-child(6) { width: 220px; }
.motif-table th:nth-child(7),
.motif-table td:nth-child(7) { width: 95px; }
.motif-records-table {
  font-size: 14px;
  table-layout: fixed;
}
.motif-records-table th,
.motif-records-table td {
  padding: 8px 9px;
}
.motif-records-table th:nth-child(1),
.motif-records-table td:nth-child(1) { width: 135px; overflow-wrap: anywhere; }
.motif-records-table th:nth-child(2),
.motif-records-table td:nth-child(2) { width: 85px; }
.motif-records-table th:nth-child(3),
.motif-records-table td:nth-child(3) { width: 105px; }
.motif-records-table th:nth-child(4),
.motif-records-table td:nth-child(4) { width: 160px; overflow-wrap: anywhere; }
.motif-records-table th:nth-child(5),
.motif-records-table td:nth-child(5) { width: 60px; text-align: center; }
.motif-records-table th:nth-child(6),
.motif-records-table td:nth-child(6) { width: 185px; }
.motif-records-table th:nth-child(7),
.motif-records-table td:nth-child(7) { width: 210px; }
.motif-records-table th:nth-child(8),
.motif-records-table td:nth-child(8) { width: 100px; }


/* ModCREDB scrollable/collapsible data tables */
.table-wrap {
  max-height: min(62vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 var(--line);
}
.data-disclosure {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 18px 0;
  overflow: hidden;
}
.data-disclosure > summary {
  align-items: center;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
}
.data-disclosure > summary::-webkit-details-marker { display: none; }
.data-disclosure > summary::before {
  color: var(--accent);
  content: "▸";
  flex: 0 0 auto;
  font-weight: 900;
  transition: transform .12s ease;
}
.data-disclosure[open] > summary::before { transform: rotate(90deg); }
.data-disclosure-summary-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  margin-right: auto;
}
.data-disclosure-summary-meta {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}
.data-disclosure-body {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}
.data-disclosure-body > .table-wrap { margin: 0; }
@media (max-width: 800px) {
  .table-wrap { max-height: min(68vh, 520px); }
  .data-disclosure > summary { align-items: flex-start; }
  .data-disclosure-summary-meta { text-align: left; }
}
