:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --bg-raised: #ffffff;
  --bg-sunken: #f2efea;
  --ink: #1b1a17;
  --ink-soft: #5d5a53;
  --ink-faint: #8b8780;
  --rule: #e2ddd4;
  --rule-strong: #cdc6ba;

  --accent: #7a4b2a;
  --accent-soft: #f0e3d7;

  --ok: #1f6f43;
  --ok-soft: #dcefe2;
  --warn: #8a6206;
  --warn-soft: #f6ecd2;
  --bad: #97362c;
  --bad-soft: #f6e0dc;
  --none: #6f6b64;
  --none-soft: #eceae6;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-raised: #1d1b16;
    --bg-sunken: #100f0c;
    --ink: #f0ece4;
    --ink-soft: #b3ada1;
    --ink-faint: #837d72;
    --rule: #302c25;
    --rule-strong: #443f36;

    --accent: #d9a273;
    --accent-soft: #33261a;

    --ok: #6cc48f;
    --ok-soft: #16301f;
    --warn: #d7ab4d;
    --warn-soft: #322715;
    --bad: #e0857a;
    --bad-soft: #331b18;
    --none: #928c81;
    --none-soft: #24221d;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code, .mono { font-family: var(--mono); font-size: 0.9em; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(120% 140% at 12% -20%, var(--accent-soft) 0%, transparent 60%),
    var(--bg-raised);
  padding: 3rem 0 2.25rem;
}

.eyebrow {
  margin: 0 0 .4rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-faint);
}

.masthead h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.lede {
  max-width: 62ch;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.verdict {
  margin-top: 1.75rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1rem;
  padding: 1rem 1.4rem;
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--verdict-color, var(--none));
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.verdict .answer {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--verdict-color, var(--ink));
}
.verdict .detail { color: var(--ink-soft); }

/* ---------- nav ---------- */

.tabs {
  display: flex;
  gap: 1.5rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .92rem;
  overflow-x: auto;
}
.tabs a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--accent); }

/* ---------- sections ---------- */

section { padding: 2.75rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }

h2 {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}
h3 { margin: 1.75rem 0 .6rem; font-size: 1rem; }

.section-note {
  margin: 0 0 1.4rem;
  max-width: 70ch;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* ---------- tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .9rem;
}

.tile {
  padding: 1rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.tile .label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
}
.tile .value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: .2rem;
}
.tile .sub { font-size: .85rem; color: var(--ink-soft); }

.bar {
  margin-top: .6rem;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-sunken);
  overflow: hidden;
  display: flex;
}
.bar span { height: 100%; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin-top: 1.2rem;
  font-size: .85rem;
  color: var(--ink-soft);
}
.legend .swatch {
  display: inline-block;
  width: .7rem; height: .7rem;
  border-radius: 3px;
  margin-right: .35rem;
  vertical-align: -1px;
}

/* ---------- controls ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.2rem;
  align-items: center;
  margin-bottom: 1rem;
}
#filter {
  flex: 1 1 260px;
  padding: .5rem .75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
}
#filter:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { font-size: .9rem; color: var(--ink-soft); display: inline-flex; gap: .4rem; align-items: center; }

/* ---------- tables ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

table { border-collapse: collapse; width: 100%; font-size: .9rem; }

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-sunken);
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--rule-strong);
  cursor: pointer;
  white-space: nowrap;
}
thead th:hover { color: var(--accent); }
thead th.sorted::after { content: " ▾"; color: var(--accent); }
thead th.sorted.asc::after { content: " ▴"; }

tbody td {
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
tbody tr.row { cursor: pointer; }
tbody tr.row:hover { background: var(--bg-sunken); }
tbody tr.open { background: var(--bg-sunken); }
.num { text-align: right; }

.gene { font-weight: 650; }
.locus, .change { font-family: var(--mono); font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- chips & badges ---------- */

.chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.chip {
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .4rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 650;
  padding: .12rem .45rem;
  border-radius: 4px;
  white-space: nowrap;
}
.badge.ok    { background: var(--ok-soft);   color: var(--ok); }
.badge.warn  { background: var(--warn-soft); color: var(--warn); }
.badge.bad   { background: var(--bad-soft);  color: var(--bad); }
.badge.none  { background: var(--none-soft); color: var(--none); }

.tp-cells { display: flex; gap: .25rem; }
.tp-cell {
  min-width: 2.3rem;
  text-align: center;
  font-size: .7rem;
  font-weight: 650;
  padding: .12rem .3rem;
  border-radius: 4px;
}

/* ---------- sparkline ---------- */

.spark { display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.spark circle { fill: var(--accent); }

/* ---------- detail rows ---------- */

tr.detail > td { padding: 0; background: var(--bg-sunken); }
.detail-inner {
  padding: 1.1rem 1.2rem 1.4rem;
  border-bottom: 1px solid var(--rule-strong);
  display: grid;
  gap: 1.1rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.detail-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-raised);
  padding: .8rem .9rem;
}
.detail-card h4 {
  margin: 0 0 .5rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; font-size: .85rem; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; }

.seq {
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.7;
  word-break: break-all;
  background: var(--bg-sunken);
  border-radius: 6px;
  padding: .5rem .6rem;
  margin-top: .4rem;
}
.seq .hit {
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 700;
  border-radius: 2px;
  padding: 0 1px;
}
.peptide-list { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.peptide-list .epitope {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
  font-weight: 600;
}
.peptide-list span {
  font-family: var(--mono);
  font-size: .76rem;
  background: var(--bg-sunken);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .05rem .35rem;
}

/* ---------- run cards ---------- */

.run-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .9rem;
}
.run-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--none);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: .9rem 1rem;
}
.run-card.ok { border-left-color: var(--ok); }
.run-card.failed { border-left-color: var(--bad); }
.run-card h3 { margin: 0 0 .1rem; font-size: .98rem; }
.run-card .meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: .6rem; }
.steps { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.steps li {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: .12rem 0;
  border-bottom: 1px dotted var(--rule);
}
.steps li:last-child { border-bottom: 0; }
.steps .name { font-family: var(--mono); }
.steps .fail { color: var(--bad); font-weight: 650; }
.run-note {
  margin-top: .5rem;
  font-size: .78rem;
  color: var(--warn);
}
.run-error {
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--bad);
  font-family: var(--mono);
  word-break: break-word;
}

/* ---------- findings ---------- */

.finding-list { display: grid; gap: .9rem; max-width: 82ch; }
.finding {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--bad);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: .9rem 1.1rem 1rem;
}
.finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .7rem;
}
.finding-head h3 { margin: 0; font-size: 1rem; }
.finding-where {
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--ink-faint);
}
.finding p { margin: .5rem 0 0; color: var(--ink-soft); font-size: .92rem; }
.finding-fix strong { color: var(--ink); }

/* ---------- history ---------- */

.history-block { margin-top: 2rem; }
.history-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .87rem;
}
.history-row:last-child { border-bottom: 0; }
.history-row .date { font-family: var(--mono); color: var(--ink-soft); min-width: 6.5rem; }
.history-row .ver { font-family: var(--mono); color: var(--ink-faint); min-width: 7rem; }
.history-row .track {
  flex: 1;
  height: 8px;
  background: var(--bg-sunken);
  border-radius: 4px;
  overflow: hidden;
}
.history-row .track span { display: block; height: 100%; background: var(--ok); }

/* ---------- method / caveats ---------- */

.method { max-width: 76ch; padding-left: 1.2rem; color: var(--ink-soft); }
.method li { margin-bottom: .6rem; }
.method strong { color: var(--ink); }

.caveats {
  margin-top: 1.6rem;
  max-width: 76ch;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: .3rem 1.2rem 1rem;
}
.caveats ul { color: var(--ink-soft); padding-left: 1.1rem; margin: 0; }
.caveats li { margin-bottom: .45rem; }

/* ---------- footer ---------- */

footer {
  padding: 2rem 0 3rem;
  color: var(--ink-faint);
  font-size: .85rem;
}
footer p { margin: .25rem 0; }

.empty {
  padding: 1.5rem;
  color: var(--ink-soft);
  text-align: center;
  font-size: .92rem;
}

/* ---------- detail pages ---------- */

.masthead.compact { padding: 2.25rem 0 1.75rem; }
.masthead.compact h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.eyebrow a { color: var(--ink-faint); text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

.source-group {
  margin-bottom: 1.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1rem 1.2rem 1.2rem;
}
.source-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
.source-group h3 { margin: 0 0 .3rem; font-size: 1rem; }

.source-row {
  padding: .7rem 0;
  border-top: 1px solid var(--rule);
}
.source-row:first-of-type { border-top: 0; }
.source-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
}
.source-label { font-weight: 620; font-size: .93rem; }
.source-url {
  display: block;
  font-size: .78rem;
  word-break: break-all;
  margin: .15rem 0 .3rem;
}
.source-row p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .88rem; max-width: 78ch; }
.source-taken { color: var(--accent) !important; }

.kv.wide { grid-template-columns: minmax(9rem, auto) 1fr; gap: .3rem 1rem; }
.kv.wide dd { color: var(--ink-soft); }

/* ---------- bug reports ---------- */

.bug-list { display: grid; gap: 1.1rem; max-width: 86ch; }
.finding.bug { border-left-width: 4px; }
.bug-actions { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.button {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem .8rem;
  border-radius: 7px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg-raised);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.button.ghost { background: transparent; color: var(--accent); }
.button:hover { filter: brightness(1.08); }

.failure {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: .7rem 1rem;
  margin-bottom: .7rem;
}
.failure summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  font-size: .9rem;
}
.failure h4 {
  margin: .9rem 0 .3rem;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
}
pre.block {
  margin: 0;
  padding: .7rem .8rem;
  background: var(--bg-sunken);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  color: var(--ink-soft);
}

/* ---------- assay VAF grid ---------- */

#variant-table { font-size: .85rem; }

th.assay-group {
  text-align: center;
  border-left: 2px solid var(--rule-strong);
  font-size: .72rem;
}
th.assay-group .tested {
  margin-left: .35rem;
  font-size: .6rem;
  vertical-align: 1px;
}
th.assay-col {
  font-size: .68rem;
  letter-spacing: .03em;
  padding: .35rem .55rem;
  text-align: right;
}
th.assay-group.dna, th.assay-col.dna { color: var(--ink-faint); }

td.assay-cell {
  padding: .4rem .55rem;
  line-height: 1.25;
  white-space: nowrap;
}
td.assay-cell.dna { background: color-mix(in srgb, var(--bg-sunken) 55%, transparent); }
.vaf-value { font-family: var(--mono); font-size: .78rem; color: var(--ink-soft); }
.vaf-value.present { color: var(--ink); font-weight: 650; }
.vaf-value.zero { color: var(--ink-faint); }
.vaf-reads { font-family: var(--mono); font-size: .68rem; color: var(--ink-faint); }

/* Keep the identifying columns and the verdict in view while scrolling wide. */
th.sticky-col, td.sticky-col {
  position: sticky;
  background: var(--bg-raised);
  z-index: 2;
}
thead th.sticky-col { background: var(--bg-sunken); z-index: 4; }
th.sticky-col:nth-child(1), td.sticky-col:nth-child(1) { left: 0; }
th.sticky-col:nth-child(2), td.sticky-col:nth-child(2) { left: 5.5rem; }
th.sticky-right, td.sticky-right {
  position: sticky;
  right: 0;
  background: var(--bg-raised);
  border-left: 2px solid var(--rule-strong);
  z-index: 2;
}
thead th.sticky-right { background: var(--bg-sunken); z-index: 4; }
tbody tr.row:hover td.sticky-col,
tbody tr.row:hover td.sticky-right,
tbody tr.open td.sticky-col,
tbody tr.open td.sticky-right { background: var(--bg-sunken); }

/* ---------- live run status ---------- */

.live-run {
  margin: 1.2rem 0 -0.6rem;
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--none);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: .8rem 1rem;
}
.live-run.ok   { border-left-color: var(--ok); }
.live-run.warn { border-left-color: var(--warn); }
.live-run.bad  { border-left-color: var(--bad); }

.live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .8rem;
}
.live-title { font-weight: 620; font-size: .93rem; }
.live-link { font-size: .82rem; white-space: nowrap; }

.live-run.pulsing .badge.warn { animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .live-run.pulsing .badge.warn { animation: none; }
}

.live-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .6rem;
  margin-top: .8rem;
}
.live-job {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: .55rem .7rem;
  background: var(--bg-sunken);
}
.live-job-name { font-weight: 620; font-size: .85rem; }
.live-job-step {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--ink-soft);
  margin: .15rem 0 .35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-job .bar { margin: 0 0 .3rem; }
.live-note { margin-top: .5rem; font-size: .83rem; color: var(--ink-soft); }

/* ---------- copyable commands ---------- */

.copy-block { position: relative; margin-top: .5rem; }
.copy-button {
  position: absolute;
  top: .4rem;
  right: .4rem;
  font-size: .72rem;
  padding: .2rem .55rem;
  background: var(--bg-raised);
}
.step-row { display: block; }
.step-line { display: flex; justify-content: space-between; gap: .6rem; }
.step-command summary {
  cursor: pointer;
  font-size: .7rem;
  padding: .1rem 0 .2rem;
  list-style: none;
}
.step-command summary::before { content: "▸ "; }
.step-command[open] summary::before { content: "▾ "; }
.step-command pre.block { font-size: .68rem; }
.inventory-table th, .inventory-table td { padding: .5rem .8rem; }
.inventory-table td.num .vaf-value { font-size: .85rem; }
.assay-name { font-weight: 650; }
.assay-platform {
  font-weight: 400;
  font-size: .62rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-faint);
  margin-top: .05rem;
}
th.assay-group .tested { display: inline-block; margin-top: .2rem; font-size: .58rem; }

/* Platform / read-length / single-cell tags on the assay group headers. */
.assay-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  justify-content: center;
  margin-top: .2rem;
}
.assay-tags .tag {
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 0 .3rem;
  border-radius: 3px;
  background: var(--none-soft);
  color: var(--none);
  white-space: nowrap;
}
.assay-tags .tag.longread { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.assay-tags .tag.sc { background: var(--warn-soft); color: var(--warn); }

/* ---------- configuration audit ---------- */

.config-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .7rem;
  margin-bottom: 1.4rem;
}
.config-count {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--none);
  border-radius: 8px;
  background: var(--bg-raised);
  padding: .6rem .8rem;
}
.config-count.ok   { border-left-color: var(--ok); }
.config-count.warn { border-left-color: var(--warn); }
.config-n { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.config-label {
  margin-left: .4rem;
  font-size: .8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.config-count.ok .config-label   { color: var(--ok); }
.config-count.warn .config-label { color: var(--warn); }
.config-count.none .config-label { color: var(--none); }
.config-blurb { display: block; font-size: .78rem; color: var(--ink-soft); margin-top: .15rem; }

.config-row {
  padding: .65rem 0 .7rem;
  border-top: 1px solid var(--rule);
}
.config-row:first-of-type { border-top: 0; }
.config-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.config-name { font-weight: 620; font-size: .92rem; }
.config-value {
  font-size: .78rem;
  color: var(--ink);
  background: var(--bg-sunken);
  border-radius: 5px;
  padding: .2rem .45rem;
  margin-top: .3rem;
  display: inline-block;
  word-break: break-word;
}
.config-canonical { font-size: .8rem; color: var(--ink-soft); margin-top: .25rem; }
.config-why { margin: .3rem 0 0; font-size: .85rem; color: var(--ink-soft); max-width: 78ch; }
.absent-note {
  border-left: 3px solid var(--warn);
  padding-left: .7rem;
  margin-bottom: .8rem !important;
}

/* The Exacto verdict block: one square per sequencing sample, labelled, so the
   column cannot be misread as one square per biopsy. */
.tp-legend {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.tp-key {
  flex: 1;
  min-width: 2.9rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: none;
  white-space: nowrap;
}

/* "not run" is an empty slot, not a grey verdict: outlined rather than filled,
   so it cannot be misread as a statement about the data. */
.tp-cell.not-run {
  background: transparent !important;
  box-shadow: inset 0 0 0 1px var(--none);
  opacity: 0.75;
}

/* Engineering log: the reasoning behind every number on this page. */
.worklog { display: flex; flex-direction: column; gap: 0.9rem; }
.worklog-entry {
  /* Prose, not a data cell: reset the inherited table-ish typography. */
  white-space: normal;
  font-family: inherit;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--card);
}
.worklog-entry.worklog-results { border-left-color: var(--none); opacity: 0.85; }
.worklog-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.worklog-subject { font-weight: 650; }
.worklog-sha {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}
.worklog-sha:hover { text-decoration: underline; }
.worklog-body {
  margin: 0.4rem 0 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 72ch;
}

/* Paths to a contig: two funnels side by side, then the variant ladder. */
.path-funnels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
}
.path-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--card);
  white-space: normal;
}
.path-card.reads { border-top: 3px solid var(--ok); }
.path-card.assembly { border-top: 3px solid var(--warn); }
.path-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.path-label { font-weight: 680; font-size: 1.02rem; }
.path-sub { color: var(--ink-soft); font-size: .85rem; }
.path-desc {
  margin: .5rem 0 .9rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted);
}
.funnel { display: flex; flex-direction: column; gap: .45rem; }
.funnel-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.4fr) minmax(60px, 1fr) auto;
  gap: .6rem;
  align-items: center;
}
.funnel-label { display: flex; flex-direction: column; font-size: .82rem; }
.funnel-bar {
  height: 9px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}
.funnel-bar span {
  display: block;
  height: 100%;
  background: var(--ok);
  border-radius: 5px;
}
.path-card.assembly .funnel-bar span { background: var(--warn); }
.funnel-num { text-align: right; display: flex; flex-direction: column; }
.funnel-n { font-family: var(--mono); font-size: .84rem; font-weight: 600; }
.ladder-table { width: 100%; border-collapse: collapse; margin-top: .4rem; }
.ladder-table th, .ladder-table td {
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  white-space: normal;
}
.ladder-table th.num, .ladder-table td.num { text-align: right; }
.ladder-best { font-weight: 700; color: var(--ok); }
.path-verdict {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  padding: .9rem 1.1rem;
  background: var(--card);
}
.path-verdict h4 { margin: 0 0 .5rem; }
.path-note {
  margin: .7rem 0 0;
  font-size: .88rem;
  line-height: 1.55;
  max-width: 72ch;
}

.ladder-bad { color: var(--bad); font-weight: 650; }
.conjecture {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--none);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  background: var(--card);
  white-space: normal;
}
.conjecture h4 { margin: 1.1rem 0 .4rem; }
.conjecture h4:first-child { margin-top: 0; }
.conjecture p {
  margin: .5rem 0;
  font-size: .89rem;
  line-height: 1.6;
  max-width: 74ch;
  color: var(--muted);
}
.conjecture strong { color: var(--ink); }

/* Not .locus: that class is nowrap for table cells and would run this
   paragraph off the page. */
.conjecture-next {
  margin-top: .9rem;
  padding-top: .7rem;
  border-top: 1px dashed var(--line);
  font-size: .85rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 74ch;
  white-space: normal;
}

.legend-note {
  flex-basis: 100%;
  margin: .5rem 0 .2rem;
  font-size: .8rem;
  color: var(--ink-soft);
  white-space: normal;
  max-width: 74ch;
}

/* A miss on a single read is the same category as a miss on thousands, but far
   weaker evidence. Paler rather than a separate colour, so it still reads as a
   miss at a glance. */
.tp-cell.thin { opacity: .45; }

/* The single proteoform a caller would carry forward, with the vaccine peptide
   spelled out and the mutated residues marked inside it. */
.consensus {
  margin: .6rem 0 .8rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: 8px;
  background: var(--card);
  white-space: normal;
}
.consensus-head {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}
.consensus .seq { word-break: break-all; }
