/* Recore website. One stylesheet, no build step, no remote assets: the site
   opens from a clone as well as from GitHub Pages. The cell colours are the
   report's, so the page teaches the report's visual language. */

/* Dark by default, whatever the system says; light only when chosen with the
   toggle, which the report shares (its key is recore.theme). */
:root {
  --bg: #0c0d10;
  --bg-elev: #15171c;
  --bg-subtle: #1b1d23;
  --ink: #f3f4f6;
  --ink-soft: #d6d8de;
  --muted: #a2a5b0;
  --line: #262830;
  --line-strong: #383b45;
  --brand-a: #02a79e;
  --brand-b: #0265ba;
  --brand-c: #3912c0;
  --grad-a: #35d4c8;
  --grad-b: #5aa8ff;
  --grad-c: #a493ff;
  --accent: #5aa2ff;
  --accent-hover: #86baff;
  --accent-soft: #14243b;
  --on-accent: #0a1220;
  --code-bg: #090a0d;
  --code-border: #23262e;
  --code-ink: #e6e8ef;
  --code-muted: #8b90a0;
  --code-flag: #7cc4ff;
  --code-value: #f4c27a;
  --copy-border: rgba(255, 255, 255, 0.16);
  --copy-bg: rgba(255, 255, 255, 0.06);
  --copy-hover: rgba(255, 255, 255, 0.14);
  --copy-done: #8ef0bf;
  --present: #5d6676;
  --rescue: #4b9bff;
  --nsc: #ff9a2e;
  --kept: #ff4f80;
  --absent: #1f2128;
  --absent-stroke: #454856;
  --ok: #3fcf8e;
  --note: #e0a030;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --bg-subtle: #f3f4f6;
  --ink: #16171d;
  --ink-soft: #3d3f48;
  --muted: #5f616b;
  --line: #e4e5e9;
  --line-strong: #cfd1d7;
  --grad-a: #02a79e;
  --grad-b: #0265ba;
  --grad-c: #3912c0;
  --accent: #0b5cc4;
  --accent-hover: #0849a0;
  --accent-soft: #e8f0fc;
  --on-accent: #ffffff;
  --code-bg: #f4f5f7;
  --code-border: #e1e3e8;
  --code-ink: #1d2230;
  --code-muted: #6b7182;
  --code-flag: #0b5cc4;
  --code-value: #9a4f00;
  --copy-border: rgba(16, 18, 27, 0.14);
  --copy-bg: rgba(255, 255, 255, 0.8);
  --copy-hover: #ffffff;
  --copy-done: #0f7a52;
  --present: #b3bbc7;
  --rescue: #0f6fd6;
  --nsc: #e07b00;
  --kept: #c01048;
  --absent: #eef0f3;
  --absent-stroke: #d2d5db;
  --ok: #0f7a52;
  --note: #b7791f;
  --shadow: 0 1px 2px rgba(16, 18, 27, 0.06), 0 8px 24px rgba(16, 18, 27, 0.06);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

:not(pre) > code {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  overflow-wrap: anywhere;
}

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

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 750;
}

h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--bg-elev);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  height: 34px;
  width: auto;
  display: block;
}

.logo-light {
  display: none !important;
}

:root[data-theme="light"] .logo-light {
  display: block !important;
}

:root[data-theme="light"] .logo-dark {
  display: none !important;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.93rem;
  padding: 7px 10px;
  border-radius: 8px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-subtle);
}

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  flex: none;
}

.gh-link:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.gh-link svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 420px) {
  .gh-link span {
    display: none;
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .nav .nav-optional {
    display: none;
  }
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn-ghost {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

/* ── Hero ── */

.hero {
  padding: 64px 0 40px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 18px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-c));
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--grad-a) 0%, var(--grad-b) 45%, var(--grad-c) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.16rem;
  color: var(--ink-soft);
  margin-top: 20px;
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.reads {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.reads b {
  color: var(--ink-soft);
  font-weight: 600;
}

/* The animated matrix: genes across, genomes down. */

.demo {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}

.demo-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.demo-step {
  font-weight: 650;
  color: var(--ink-soft);
}

.demo-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.mini-btn {
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink-soft);
  font: 600 0.78rem var(--font);
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
}

.mini-btn:hover {
  color: var(--ink);
}

.grid .cell:hover {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.cell-tip {
  position: absolute;
  z-index: 5;
  max-width: 250px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.cell-tip b {
  display: block;
  margin-bottom: 2px;
}

.grid {
  --cols: 16;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 4px;
  position: relative;
}

.cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--present);
  transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
}

.cell.gap {
  background: var(--absent);
  box-shadow: inset 0 0 0 1px var(--absent-stroke);
}

.cell.scan {
  box-shadow: inset 0 0 0 2px var(--accent);
  transform: scale(1.08);
}

.cell.rescued {
  background: var(--rescue);
  box-shadow: none;
  transform: scale(1);
}

.cell.kept {
  background: var(--absent);
  box-shadow: inset 0 0 0 2px var(--kept);
  background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--kept) 45%, transparent) 3px 4.5px);
  transform: scale(1);
}

.cell.searched {
  transform: scale(1);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chip {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  flex: none;
}

.chip.present {
  background: var(--present);
}

.chip.rescued {
  background: var(--rescue);
}

.chip.kept {
  box-shadow: inset 0 0 0 2px var(--kept);
  background-image: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--kept) 45%, transparent) 2px 3px);
}

.chip.absent {
  background: var(--absent);
  box-shadow: inset 0 0 0 1px var(--absent-stroke);
}

.chip.nsc {
  background: var(--nsc);
}

.chip.notsearched {
  background: var(--absent);
  box-shadow: inset 0 0 0 1px var(--absent-stroke);
  background-image: repeating-linear-gradient(45deg, transparent 0 2px, var(--absent-stroke) 2px 3px);
}

.tally {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.tally div {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}

.tally b {
  display: block;
  font-size: 1.5rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.tally .t-rescued b {
  color: var(--rescue);
}

.tally .t-kept b {
  color: var(--kept);
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero {
    padding-top: 40px;
  }
}

/* ── Sections ── */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: baseline;
  margin-bottom: 30px;
}

.num {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 750;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #0274b8, var(--brand-c));
  align-self: start;
  margin-top: 2px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.04rem;
}

.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 820px) {
  .cols-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ── Code ── */

.code {
  position: relative;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius-sm);
  border: 1px solid var(--code-border);
}

.code pre {
  margin: 0;
  padding: 16px 64px 16px 18px;
  overflow-x: auto;
  line-height: 1.6;
  font-size: 0.86rem;
  tab-size: 2;
}

/* A one-line command that would hide under the copy button wraps instead;
   what is copied is the text, not the wrapping. */
.code.one-line pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code .p {
  color: var(--code-muted);
  user-select: none;
}

.code .c {
  color: var(--code-muted);
}

.code .f {
  color: var(--code-flag);
}

.code .v {
  color: var(--code-value);
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--copy-border);
  background: var(--copy-bg);
  color: var(--code-ink);
  font: 600 0.78rem var(--font);
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.copy:hover {
  background: var(--copy-hover);
}

.copy.done {
  color: var(--copy-done);
  border-color: currentColor;
}

.code-title {
  font: 600 0.75rem var(--font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--code-muted);
  padding: 10px 18px 0;
}

.code-title + pre {
  padding-top: 8px;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-subtle);
  font: 600 0.8em var(--mono);
  text-align: center;
  color: var(--ink);
}

.out {
  margin-top: 10px;
  background: var(--bg-subtle);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: pre;
  overflow-x: auto;
}

.out .ok {
  color: var(--ok);
  font-weight: 700;
}

/* ── Tabs ── */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-soft);
  font: 600 0.86rem var(--font);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.tabpanel[hidden] {
  display: none;
}

/* ── Command builder ── */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .builder {
    grid-template-columns: minmax(0, 1fr);
  }
}

.q {
  margin-bottom: 22px;
}

.q-title {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.98rem;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg button {
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  font: 600 0.9rem var(--font);
  padding: 8px 13px;
  border-radius: 9px;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.seg button[aria-pressed="true"] code {
  background: color-mix(in srgb, var(--on-accent) 14%, transparent);
  border-color: transparent;
  color: inherit;
}

.opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  margin-bottom: 8px;
  cursor: pointer;
}

.opt:hover {
  border-color: var(--line-strong);
}

.opt input[type="checkbox"],
.opt input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.opt b {
  font-weight: 650;
  font-size: 0.95rem;
}

.opt small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.opt .inline-input {
  grid-column: 2;
  margin-top: 6px;
}

.inline-input,
.num-input {
  font: 0.9rem var(--mono);
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
  max-width: 220px;
}

.num-input {
  width: 84px;
}

.row-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.explain {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
}

.explain li {
  display: grid;
  grid-template-columns: minmax(150px, max-content) 1fr;
  gap: 12px;
  color: var(--ink-soft);
}

.explain code {
  white-space: nowrap;
  justify-self: start;
}

@media (max-width: 560px) {
  .explain li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

.tree {
  margin-top: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: 0.83rem/1.65 var(--mono);
  color: var(--ink-soft);
  white-space: pre;
  overflow-x: auto;
}

.tree .hl {
  color: var(--accent);
  font-weight: 700;
}

.tree .cm {
  color: var(--muted);
}

.tool-note {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.tool-note:empty {
  display: none;
}

/* ── Output cards ── */

.files {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .files {
    grid-template-columns: minmax(0, 1fr);
  }
}

.file {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file .ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.file .ico svg {
  width: 19px;
  height: 19px;
}

.file code {
  font-size: 0.78rem;
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
}

.file p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Report preview ── */

.report-frame {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-elev);
}

.report-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.report-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  display: inline-block;
}

.report-bar span {
  margin-left: 6px;
  font-family: var(--mono);
}

.report-bar a {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Says that what it sits next to was made from synthetic data. */
.tag-synthetic {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--note) 60%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--note) 14%, transparent);
  color: var(--ink-soft);
  font: 650 0.72rem/1.35 var(--font);
  font-style: normal;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.report-stage {
  position: relative;
}

.report-stage:not(.live) iframe {
  pointer-events: none;
}

.report-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding-bottom: 28px;
  border: 0;
  background: linear-gradient(to bottom, transparent 60%, color-mix(in srgb, var(--bg) 65%, transparent));
  cursor: pointer;
  font: inherit;
}

.report-cover span {
  background: var(--accent);
  color: var(--on-accent);
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 650;
  box-shadow: var(--shadow);
}

.report-stage.live .report-cover {
  display: none;
}

.report-mobile {
  display: none;
  padding: 32px 20px;
  text-align: center;
  color: var(--ink-soft);
}

@media (max-width: 700px) {
  .report-stage {
    display: none;
  }

  /* The message that replaces the frame says it is synthetic data. */
  .report-bar .tag-synthetic {
    display: none;
  }

  .report-mobile {
    display: grid;
    gap: 14px;
    justify-items: center;
  }
}

.report-frame iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: var(--bg-elev);
}

.hints {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hints div {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.hints b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

@media (max-width: 760px) {
  .report-frame iframe {
    height: 560px;
  }

  .hints {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Policies ── */

.policies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 820px) {
  .policies {
    grid-template-columns: minmax(0, 1fr);
  }
}

.policy {
  position: relative;
  /* A button centres what it holds; the cards read from the top. */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
}

.policy:hover {
  border-color: var(--line-strong);
}

.policy[aria-pressed="true"] {
  border: 2px solid var(--accent);
  padding: 19px;
}

.badge {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

.policy-name {
  display: block;
  font-weight: 700;
}

.policy-name code {
  font-size: 1.02rem;
  background: none;
  border: none;
  padding: 0;
}

.policy-text {
  display: block;
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin-top: 8px;
}

.policy .meter {
  display: flex;
  gap: 3px;
  margin-top: 14px;
}

.policy .meter i {
  flex: 1;
  height: 8px;
  border-radius: 3px;
  background: var(--absent);
  box-shadow: inset 0 0 0 1px var(--absent-stroke);
}

.policy .meter i.on {
  background: var(--rescue);
  box-shadow: none;
}

.policy .meter-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
}

/* What the chosen policy puts back, out of ten genes Recore found. */

.evidence {
  margin-top: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.ev-head {
  font-weight: 650;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.ev-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 5px 0;
}

.ev-cells {
  display: flex;
  gap: 5px;
}

.ev-cell {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--absent);
  box-shadow: inset 0 0 0 1px var(--absent-stroke);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.ev-cell.rescued {
  background: var(--rescue);
  box-shadow: none;
  transform: scale(1.06);
}

.ev-cell.kept {
  background: var(--absent);
  box-shadow: inset 0 0 0 2px var(--kept);
  background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--kept) 45%, transparent) 3px 4.5px);
}

.ev-label {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.ev-sum {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--muted);
}

.ev-sum b {
  color: var(--ink);
}

/* ── Where the project lives ── */

.cta {
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in srgb, var(--brand-b) 22%, transparent), transparent 70%),
    radial-gradient(60% 120% at 100% 100%, color-mix(in srgb, var(--brand-c) 22%, transparent), transparent 70%);
}

.cta-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta p {
  color: var(--ink-soft);
  margin-top: 8px;
}

.cta .actions {
  margin-top: 0;
}

/* ── FAQ ── */

.faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
}

.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.faq summary > span {
  flex: 1;
}

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

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .ans {
  padding: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  display: grid;
  gap: 10px;
}

/* ── Footer ── */

.foot {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: 0.9rem;
  color: var(--muted);
}

.foot .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.foot h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.foot blockquote {
  margin: 0;
  color: var(--ink-soft);
}

.foot .doi {
  margin: 10px 0 0;
}

@media (max-width: 760px) {
  .foot .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Reference page ── */

.ref-hero {
  padding: 48px 0 8px;
}

.ref-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ref-hero p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1.06rem;
}

.ref-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.ref-nav a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
}

.ref-nav a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.ref-section {
  padding: 48px 0 8px;
}

.ref-section h2 {
  margin-bottom: 8px;
}

.ref-section > .wrap > p {
  color: var(--muted);
  margin-bottom: 18px;
}

.filter {
  width: 100%;
  max-width: 420px;
  font: 0.95rem var(--font);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink);
  margin-bottom: 18px;
}

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

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

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

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg-subtle);
  font-weight: 700;
}

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

td code {
  white-space: nowrap;
}

td.wrap-code code {
  white-space: normal;
}

.group-row td {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.def {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.yes {
  color: var(--ok);
  font-weight: 700;
}

.no-results {
  padding: 16px;
  color: var(--muted);
  display: none;
}

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

@media (max-width: 860px) {
  .deep {
    grid-template-columns: minmax(0, 1fr);
  }
}

.deep a {
  display: block;
  text-decoration: none;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--ink);
}

.deep a:hover {
  border-color: var(--accent);
}

.deep a b {
  display: block;
  margin-bottom: 2px;
}

.deep a span {
  display: block;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cell {
    transition: none;
  }
}

/* ── Documentation pages ── */

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 210px;
  gap: 44px;
  padding-top: 32px;
  padding-bottom: 72px;
}

.docs-home {
  grid-template-columns: 230px minmax(0, 1fr);
}

@media (max-width: 1180px) {
  .docs-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .docs-layout,
  .docs-home {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 18px;
  }
}

.docs-nav,
.docs-toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 0.92rem;
}

/* A sticky box stacks on its own, so the sidebar sits above the text it
   spreads its search results over. */
.docs-nav {
  z-index: 10;
}

/* The page list and the contents scroll on their own; the search box does
   not, so its results can spread over the page instead of being cut off. */
.docs-menu,
.docs-toc {
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.docs-toc {
  max-height: calc(100vh - 96px);
}

@media (max-width: 860px) {
  .docs-nav {
    position: static;
  }

  .docs-menu {
    max-height: none;
  }
}

.docs-search {
  position: relative;
  margin-bottom: 16px;
}

.docs-search input {
  width: 100%;
  font: 0.92rem var(--font);
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--ink);
}

.docs-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: -160px;
  top: calc(100% + 6px);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 60vh;
  overflow: auto;
}

@media (max-width: 860px) {
  .docs-results {
    right: 0;
  }
}

.docs-results a {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink);
}

.docs-results a:hover,
.docs-results a:focus,
.docs-results a.active {
  background: var(--bg-subtle);
  outline: none;
}

.docs-results b {
  display: block;
  font-size: 0.9rem;
}

.docs-results small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 2px;
}

.docs-results mark {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: inherit;
  border-radius: 3px;
}

.docs-results .none {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.docs-menu summary {
  display: none;
}

@media (max-width: 860px) {
  .docs-menu {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-elev);
    padding: 4px 14px 8px;
  }

  .docs-menu summary {
    display: list-item;
    cursor: pointer;
    font-weight: 650;
    padding: 8px 0;
  }
}

.docs-section {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 16px 0 6px;
}

.docs-nav ul,
.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav li a {
  display: block;
  padding: 5px 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  text-decoration: none;
}

.docs-nav li a:hover {
  background: var(--bg-subtle);
  color: var(--ink);
}

.docs-nav li a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.docs-toc p {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.docs-toc li a {
  display: block;
  padding: 3px 0 3px 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}

.docs-toc li.toc-3 a {
  padding-left: 22px;
  font-size: 0.86rem;
}

.docs-toc li a:hover {
  color: var(--ink);
}

.docs-toc li a.active {
  border-left-color: var(--accent);
  color: var(--ink);
}

/* Long-form text. */

.prose {
  min-width: 0;
  max-width: 780px;
}

.prose .crumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.prose .crumb a {
  color: var(--muted);
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2.2em 0 0.7em;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.8em 0 0.6em;
}

.prose h4,
.prose h5,
.prose h6 {
  font-size: 1rem;
  margin: 1.5em 0 0.5em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 80px;
  /* Headings that are file names have no spaces to break at. */
  overflow-wrap: anywhere;
}

.prose .anchor {
  margin-left: 8px;
  color: var(--line-strong);
  text-decoration: none;
  opacity: 0;
  font-weight: 500;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose h4:hover .anchor,
.prose .anchor:focus {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose .code,
.prose .table-wrap,
.prose .flow,
.prose .figure {
  margin: 0 0 1.1em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin: 0.3em 0;
}

.prose li > ul,
.prose li > ol,
.prose li > .code {
  margin: 0.5em 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-subtle);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  color: var(--ink-soft);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose .table-wrap {
  font-size: 0.9rem;
}

.prose td code {
  white-space: normal;
}

.prose .figure img {
  max-width: 100%;
  height: auto;
}

.only-light {
  display: none;
}

:root[data-theme="light"] .only-light {
  display: inline;
}

:root[data-theme="light"] .only-dark {
  display: none;
}

.prose .edit {
  margin-top: 2.5em;
  font-size: 0.9rem;
}

.prose .edit a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.prose .edit svg {
  width: 16px;
  height: 16px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.pager a {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
}

.pager a:hover {
  border-color: var(--accent);
}

.pager a span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

/* A mermaid flowchart, as its steps. */

.flow {
  list-style: none;
  padding: 0 !important;
  counter-reset: step;
}

.flow-step {
  position: relative;
  padding-left: 34px;
  margin: 0 0 14px !important;
}

.flow-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 0.72rem var(--font);
  color: #fff;
  background: linear-gradient(135deg, #0274b8, var(--brand-c));
}

.flow-box {
  display: inline-block;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 8px 12px;
}

.flow-decision .flow-box {
  border-style: dashed;
  border-color: var(--accent);
}

.flow-box b {
  display: block;
}

.flow-box span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.flow-next {
  list-style: none;
  padding: 4px 0 0 12px !important;
  margin: 0 !important;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.flow-next li {
  margin: 2px 0;
}

.flow-next i {
  color: var(--muted);
}

.docs-group {
  font-size: 1.1rem !important;
  margin: 1.6em 0 0.7em !important;
}

/* ── How it works: the illustrated walk through one cell ── */

.nav-wide {
  white-space: nowrap;
}

@media (max-width: 1060px) {
  .nav .nav-wide {
    display: none;
  }
}

.how-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
}

.how {
  padding: 8px 0 24px;
}

.how-pick {
  margin: 18px 0 22px;
}

.how-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .how-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  position: sticky;
  top: 84px;
}

.how-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: 600 0.95rem var(--font);
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
}

.how-steps button:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

.how-steps .n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  font-size: 0.8rem;
  flex: none;
}

.how-steps button.done .n {
  border-color: var(--accent);
  color: var(--accent);
}

.how-steps button[aria-current="step"] {
  color: var(--ink);
  background: var(--bg-elev);
  border-color: var(--line);
}

.how-steps button[aria-current="step"] .n {
  background: linear-gradient(135deg, #0274b8, var(--brand-c));
  border-color: transparent;
  color: #fff;
}

@media (max-width: 900px) {
  .how-steps {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .how-steps button span:not(.n) {
    display: none;
  }

  .how-steps button {
    padding: 4px;
  }
}

.how-stage-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.how-progress {
  height: 4px;
  background: var(--bg-subtle);
}

.how-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-c));
  transition: width 0.4s ease;
}

.stage {
  display: block;
  width: 100%;
  height: auto;
  background:
    radial-gradient(70% 90% at 50% 30%, color-mix(in srgb, var(--brand-b) 10%, transparent), transparent 75%),
    var(--bg-elev);
  border-bottom: 1px solid var(--line);
  font-family: var(--font);
}

.how-text {
  padding: 20px 24px 6px;
}

.how-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.how-text h2 {
  font-size: 1.5rem;
  margin: 6px 0 8px;
}

.how-text p {
  color: var(--ink-soft);
  max-width: 62ch;
}

.how-control:not(:empty) {
  margin-top: 14px;
}

.how-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 20px;
  flex-wrap: wrap;
}

.how-nav [data-next] {
  margin-left: auto;
}

.how-nav button:disabled {
  opacity: 0.45;
  cursor: default;
}

.how-note {
  margin-top: 16px;
  max-width: 80ch;
}

/* Things in the drawings. */

.stage text {
  fill: var(--ink);
}

.stage .axis {
  fill: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.stage .small-label {
  fill: var(--muted);
  font-size: 15px;
}

.stage .col-label,
.stage .row-label {
  fill: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.stage .is-x {
  fill: var(--rescue);
}

.stage .big-num {
  font-size: 26px;
  font-weight: 750;
}

.stage .gene path {
  stroke: color-mix(in srgb, var(--ink) 25%, transparent);
  stroke-width: 1;
}

.stage .gene-label {
  font-size: 14px;
  font-weight: 650;
  fill: #0b0d12;
}

.stage .gx path { fill: var(--rescue); }
.stage .gx .gene-label { fill: #fff; }
.stage .ga path { fill: #3fb6a8; }
.stage .gb path { fill: #e2a03f; }
.stage .gc path { fill: #9a8cf8; }
.stage .gd path { fill: #ec7fae; }
.stage .ge path { fill: #8fa88a; }
.stage .gf path { fill: #b49b7a; }
.stage .gg path { fill: #7d93b3; }
.stage .gh path { fill: #a98bb0; }
.stage .go path { fill: var(--nsc); }

.stage .gp path {
  fill: var(--bg-subtle);
  stroke: var(--line-strong);
  stroke-width: 2;
}

.stage .gp .gene-label {
  fill: var(--ink-soft);
}

.stage .gx-ghost path {
  fill: transparent;
  stroke: var(--rescue);
  stroke-dasharray: 5 4;
  stroke-width: 2;
}

.stage .gx-ghost .gene-label {
  fill: var(--rescue);
}

.stage .contig {
  stroke: var(--line-strong);
  stroke-width: 4;
  stroke-linecap: round;
}

.stage .m-present { fill: var(--present); }
.stage .m-empty { fill: var(--absent); stroke: var(--absent-stroke); }
.stage .m-put { fill: var(--rescue); }
.stage .m-state { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }

.stage .m-target {
  fill: var(--absent);
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 6 4;
  animation: target-pulse 1.6s ease-in-out infinite;
}

.stage .m-question {
  fill: var(--accent);
  font-size: 22px;
  font-weight: 800;
}

.stage .callout path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.stage .callout-text {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.stage .file path {
  fill: var(--bg-subtle);
  stroke: var(--line-strong);
  stroke-width: 2;
}

.stage .file .file-fold {
  fill: none;
}

.stage .file-line {
  fill: var(--line-strong);
}

.stage .base-a { fill: #3fb6a8; }
.stage .base-c { fill: #5aa8ff; }
.stage .base-g { fill: #e2a03f; }
.stage .base-t { fill: #ec7fae; }

.stage .flow-arrow,
.stage .guide {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.stage .guide {
  stroke-dasharray: 1;
  opacity: 0.7;
}

.stage .bact {
  fill: color-mix(in srgb, var(--grad-a) 10%, var(--bg-elev));
  stroke: color-mix(in srgb, var(--grad-a) 55%, transparent);
  stroke-width: 3;
}

.stage .chromosome {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 3;
  stroke-dasharray: 2 6;
}

.stage .arc {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.stage .arc.ga { stroke: #3fb6a8; }
.stage .arc.gb { stroke: #e2a03f; }
.stage .arc.gc { stroke: #9a8cf8; }
.stage .arc.gd { stroke: #ec7fae; }
.stage .arc.gp { stroke: var(--line-strong); }

.stage .lens circle {
  fill: color-mix(in srgb, var(--bg-elev) 55%, transparent);
  stroke: var(--ink);
  stroke-width: 4;
}

.stage .lens line {
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
}

.stage .glow {
  fill: none;
  stroke: var(--rescue);
  stroke-width: 4;
}

.stage .panel rect {
  fill: var(--bg-subtle);
  stroke: var(--line);
}

.stage .badge-svg rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.stage .badge-svg text {
  fill: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.stage .badge-svg.is-good rect { fill: color-mix(in srgb, var(--ok) 16%, var(--bg-elev)); stroke: var(--ok); }
.stage .badge-svg.is-good text { fill: var(--ok); }
.stage .badge-svg.is-bad rect { fill: color-mix(in srgb, var(--kept) 14%, var(--bg-elev)); stroke: var(--kept); }
.stage .badge-svg.is-bad text { fill: var(--kept); }
.stage .badge-svg.is-muted rect { fill: var(--bg-subtle); stroke: var(--line-strong); }
.stage .badge-svg.is-muted text { fill: var(--muted); }

.stage .bracket {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.stage .is-el rect { fill: #8b5cf6; }
.stage .is-el text { fill: #fff; font-size: 13px; font-weight: 800; }

.stage .cross path {
  stroke: var(--kept);
  stroke-width: 5;
  stroke-linecap: round;
}

.stage .stop-sign polygon { fill: var(--kept); }
.stage .stop-sign text { fill: #fff; font-size: 8px; font-weight: 800; }
.stage .stop-tick { fill: var(--kept); }

.stage .track .faint {
  opacity: 0.4;
}

.stage .link {
  fill: none;
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.stage .link-good { stroke: var(--ok); }
.stage .link-bad { stroke: var(--kept); stroke-dasharray: 0.04 0.03; }

.stage .chip-svg rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2;
}

.stage .chip-svg text {
  fill: var(--accent);
  font: 700 14px var(--mono);
}

.stage .chip-svg text.long,
.stage .state-label.long {
  font-size: 12px;
}

.stage .gate text {
  fill: var(--muted);
  font: 700 15px var(--mono);
}

.stage .gate .frame {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 3;
}

.stage .gate .door {
  fill: var(--bg-subtle);
  stroke: var(--line);
}

.stage .gate.allows .door {
  fill: color-mix(in srgb, var(--rescue) 16%, var(--bg-subtle));
}

.stage .gate.is-on text { fill: var(--accent); }
.stage .gate.is-on .frame { stroke: var(--accent); }
.stage .gate:not(.is-on) > * { opacity: 0.45; }

.stage .r-put { fill: var(--rescue); }

.stage .result-head {
  fill: var(--ink);
  font-weight: 700;
}

.stage .r-kept {
  fill: var(--absent);
  stroke: var(--kept);
  stroke-width: 3;
}

.stage .doc .doc-bg {
  fill: var(--bg-subtle);
  stroke: var(--line-strong);
}

.stage .token {
  fill: var(--accent);
}

.stage .file-line.is-x {
  fill: var(--rescue);
}

.stage .doc .doc-title {
  font: 700 14px var(--mono);
  fill: var(--ink-soft);
}

.stage .state-label {
  font-family: var(--mono);
  fill: var(--accent);
  font-weight: 700;
}

.stage .tsv-key {
  font: 600 11px var(--mono);
  fill: var(--muted);
}

.stage .tsv-val {
  font: 700 13px var(--mono);
  fill: var(--ink);
}

.stage .hl {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}

/* On a phone the drawing is about half its drawn size: give it the whole
   width and larger labels. */
@media (max-width: 600px) {
  .how-stage-card {
    margin: 0 -24px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .stage .small-label,
  .stage .axis,
  .stage .gate text {
    font-size: 18px;
  }

  .stage .gene-label { font-size: 16px; }
  .stage .badge-svg text { font-size: 19px; }
  .stage .chip-svg text { font-size: 16px; }
  .stage .col-label,
  .stage .row-label { font-size: 19px; }
  .stage .callout-text { font-size: 21px; }
}

/* How things arrive. */

.stage .in-fade { animation: in-fade 0.6s ease both; }
.stage .in-pop { animation: in-pop 0.45s cubic-bezier(.3,1.4,.6,1) both; transform-box: fill-box; transform-origin: center; }
.stage .in-rise { animation: in-rise 0.6s ease both; }
.stage .in-draw { animation: in-draw 0.9s ease both; }
.stage .in-pulse { animation: in-pulse 1.4s ease-in-out 3 both; transform-box: fill-box; transform-origin: center; }

@keyframes in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes in-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes in-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes in-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes in-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(1.25); } }
@keyframes target-pulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .stage *,
  .stage *::before {
    animation: none !important;
    transition: none !important;
  }
}
