/*! gl1-seq Atlas 1.4.1 | Apache-2.0 | © 2026 Bioinformatics LLC and Decentralized Science Labs LLC | includes gl1-seq 5.11.18 code (Unlicense) | terms of use: terms.html */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* gl1-seq Genome. One accent (Giemsa violet, the stain that bands chromosomes); nucleotide colours
   follow the field's convention, so colour in the tracks always carries data. */
:root {
  --paper: #f4f6f5;
  --panel: #ffffff;
  --sunk: #e9eeec;
  --ink: #17212b;
  --ink-2: #4c5c6b;
  --ink-3: #7d8b97;
  --rule: #d3dbe0;
  --rule-2: #e3e8eb;
  --accent: #6a3e9e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(106, 62, 158, 0.12);
  --ok: #1d7a57;
  --ok-soft: rgba(29, 122, 87, 0.12);
  --bad: #b3261e;
  --bad-soft: rgba(179, 38, 30, 0.1);
  --nt-a: #2e9a43;
  --nt-c: #2f62d6;
  --nt-g: #d1860f;
  --nt-t: #cf3a2f;
  --nt-n: #a2acb4;
  --v-ins: #c0367b;
  --v-del: #2f3b47;
  --v-cx: #8a5a17;
  --band-dark: #3b2e4a;
  --band-light: #efe9f5;
  --mask: rgba(23, 33, 43, 0.16);
  --leaf-a: #c9d3da;
  --leaf-b: #9fb0bd;
  --cq-1: #2a78d6;   /* missense and in-frame */
  --cq-2: #eb6834;   /* truncating, start or stop */
  --cq-3: #1baf7a;   /* splice site */
  --font-ui: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-data: "JetBrains Mono", "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --s-1: 11.5px; --s-2: 13px; --s-3: 15px; --s-4: 18px; --s-5: 22px; --s-6: 28px;
  --radius: 4px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #151b22;
  --panel: #1c242d;
  --sunk: #121820;
  --ink: #e2e8ee;
  --ink-2: #a9b6c2;
  --ink-3: #75828e;
  --rule: #2c3743;
  --rule-2: #24303b;
  --accent: #a685d6;
  --accent-ink: #160f20;
  --accent-soft: rgba(166, 133, 214, 0.16);
  --ok: #57c497;
  --ok-soft: rgba(87, 196, 151, 0.14);
  --bad: #f08a80;
  --bad-soft: rgba(240, 138, 128, 0.12);
  --nt-a: #59c06b;
  --nt-c: #6b93ef;
  --nt-g: #eba63c;
  --nt-t: #f06a5f;
  --nt-n: #6c7781;
  --v-ins: #e56aa6;
  --v-del: #d5dde5;
  --v-cx: #d39b4f;
  --band-dark: #cbb6ea;
  --band-light: #2a2236;
  --mask: rgba(226, 232, 238, 0.18);
  --leaf-a: #33404c;
  --leaf-b: #4b5b69;
  --cq-1: #3987e5;
  --cq-2: #d95926;
  --cq-3: #199e70;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151b22; --panel: #1c242d; --sunk: #121820; --ink: #e2e8ee; --ink-2: #a9b6c2; --ink-3: #75828e;
    --rule: #2c3743; --rule-2: #24303b; --accent: #a685d6; --accent-ink: #160f20; --accent-soft: rgba(166, 133, 214, 0.16);
    --ok: #57c497; --ok-soft: rgba(87, 196, 151, 0.14); --bad: #f08a80; --bad-soft: rgba(240, 138, 128, 0.12);
    --nt-a: #59c06b; --nt-c: #6b93ef; --nt-g: #eba63c; --nt-t: #f06a5f; --nt-n: #6c7781;
    --v-ins: #e56aa6; --v-del: #d5dde5; --v-cx: #d39b4f; --band-dark: #cbb6ea; --band-light: #2a2236;
    --mask: rgba(226, 232, 238, 0.18); --leaf-a: #33404c; --leaf-b: #4b5b69; --cq-1: #3987e5; --cq-2: #d95926; --cq-3: #199e70; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 var(--s-2)/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- shell */
#gsq-genome { height: 100%; }
.app { display: grid; grid-template-rows: 48px 1fr; height: 100vh; min-height: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--rule); background: var(--panel); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--s-3); letter-spacing: 0.01em; white-space: nowrap; }
.brand svg { flex: none; }
.brand small { font-weight: 400; color: var(--ink-3); font-size: var(--s-2); }
.source-pill { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); font-size: var(--s-1); }
.source-pill b { color: var(--ink); font-weight: 600; }
.source-pill .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.verified { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: var(--s-1); white-space: nowrap; }
.top .spacer { flex: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--rule); background: transparent; border-radius: var(--radius); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }

.body { display: grid; grid-template-columns: 272px 1fr; min-height: 0; }
.rail { border-right: 1px solid var(--rule); background: var(--panel); overflow: auto; min-height: 0; }
.rail section { padding: 14px 16px; border-bottom: 1px solid var(--rule-2); }
.rail h2 { margin: 0 0 8px; font-size: var(--s-2); font-weight: 600; color: var(--ink); }
.rail h2 .faint { font-weight: 400; }
.asm-name { font-size: var(--s-3); font-weight: 600; line-height: 1.3; }
.hash { font-family: var(--font-data); font-size: var(--s-1); color: var(--ink-3); word-break: break-all; }
.hash[title] { cursor: help; }
.seq-list { list-style: none; margin: 0; padding: 0; }
.seq-list li button { display: grid; grid-template-columns: 1fr auto; gap: 6px; width: 100%; padding: 5px 8px; border: 0; background: none; text-align: left; border-radius: var(--radius); cursor: pointer; }
.seq-list li button:hover { background: var(--sunk); }
.seq-list li button[aria-current="true"] { background: var(--accent-soft); color: var(--ink); }
.seq-list .len { color: var(--ink-3); font-family: var(--font-data); font-size: var(--s-1); }
.seq-list .bar { grid-column: 1 / -1; height: 3px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.seq-list .bar i { display: block; height: 100%; background: var(--ink-3); }
.genome-filter { width: 100%; padding: 6px 8px; border: 1px solid var(--rule); background: var(--paper); border-radius: var(--radius); margin-bottom: 8px; }
.genome-list { list-style: none; margin: 0; padding: 0; }
.genome-list li label { display: grid; grid-template-columns: 16px 10px 1fr auto; align-items: center; gap: 8px; padding: 5px 4px; border-radius: var(--radius); cursor: pointer; }
.genome-list li label:hover { background: var(--sunk); }
.genome-list .sw { width: 10px; height: 10px; border-radius: 2px; }
.genome-list .n { font-family: var(--font-data); font-size: var(--s-1); color: var(--ink-3); }
.genome-list .withdrawn { text-decoration: line-through; color: var(--ink-3); }
.rail .note { font-size: var(--s-1); color: var(--ink-3); margin: 8px 0 0; }

.main { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--rule); background: var(--panel); }
.tabs button { padding: 11px 12px 10px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.view { overflow: auto; min-height: 0; }
.pane { padding: 16px 20px 32px; max-width: 1400px; }
.pane h3 { margin: 0 0 4px; font-size: var(--s-4); font-weight: 600; }
.pane .lede { margin: 0 0 16px; color: var(--ink-2); max-width: 72ch; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--rule); background: var(--panel); border-radius: var(--radius); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.5; cursor: default; }
.field { display: grid; gap: 4px; }
.field > span { font-size: var(--s-1); color: var(--ink-2); }
.field input, .field select, select.inline, input.inline { padding: 6px 8px; border: 1px solid var(--rule); background: var(--panel); border-radius: var(--radius); min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.seg button { padding: 5px 10px; border: 0; background: var(--panel); cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- browse */
.browse { display: grid; grid-template-rows: auto auto auto 1fr; min-height: 100%; }
.ideo { padding: 14px 20px 4px; background: var(--panel); border-bottom: 1px solid var(--rule-2); }
.ideo-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.ideo-head h3 { margin: 0; font-size: var(--s-5); font-weight: 600; letter-spacing: -0.01em; }
.ideo-head .muted { font-size: var(--s-2); }
.ideo canvas { display: block; width: 100%; height: 64px; cursor: pointer; touch-action: none; }
.locus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--rule-2); background: var(--paper); }
.locus input.where { width: 300px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); font: 500 var(--s-3) var(--font-data); }
.locus .span { color: var(--ink-3); font-family: var(--font-data); font-size: var(--s-1); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; font-size: var(--s-1); color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.tracks { position: relative; background: var(--panel); }
.tracks canvas { display: block; width: 100%; touch-action: none; cursor: grab; }
.tracks canvas.dragging { cursor: grabbing; }
.tip { position: fixed; z-index: 20; pointer-events: none; max-width: 420px; padding: 8px 10px; background: var(--ink); color: var(--paper); border-radius: var(--radius); font-size: var(--s-1); line-height: 1.5; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.tip .mono { font-size: var(--s-1); }
.drawer { border-top: 1px solid var(--rule); padding: 12px 20px 20px; background: var(--paper); }
.drawer h4 { margin: 0 0 6px; font-size: var(--s-3); font-weight: 600; }
/* a picked base stays in view below the tracks, however many haplotypes are drawn */
.drawer.picked { position: sticky; bottom: 0; z-index: 2; max-height: 42vh; overflow: auto; background: var(--panel); box-shadow: 0 -6px 16px -12px var(--ink); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: -12px; background: var(--panel); padding: 2px 0; }
.drawer-head h4 { margin: 0; }
.drawer-head .icon-btn { width: 26px; height: 26px; }
.drawer table { border-collapse: collapse; }
.drawer td, .drawer th { padding: 3px 14px 3px 0; text-align: left; font-weight: 400; vertical-align: top; }
.drawer th { color: var(--ink-2); }
.drawer tr.differs th { color: var(--ink); font-weight: 600; }
.drawer .note { margin: 8px 0 0; font-size: var(--s-1); color: var(--ink-3); }
.busy-line { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; animation: slide 1.1s linear infinite; }
@keyframes slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .busy-line { animation: none; background: var(--accent-soft); } }

/* ---------------------------------------------------------------- tables, matrices */
table.data { border-collapse: collapse; width: 100%; font-size: var(--s-2); }
table.data th, table.data td { padding: 6px 10px; border-bottom: 1px solid var(--rule-2); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--ink-2); font-weight: 500; border-bottom-color: var(--rule); position: sticky; top: 0; background: var(--paper); }
table.data td.mono { font-size: var(--s-1); }
table.data tbody tr:hover { background: var(--sunk); }
table.data tr.clickable { cursor: pointer; }
.gt { display: inline-block; min-width: 34px; padding: 1px 6px; border-radius: 3px; font: 500 var(--s-1) var(--font-data); text-align: center; }
.gt.g0 { color: var(--ink-3); }
.gt.g1 { background: var(--accent-soft); color: var(--ink); }
.gt.g2 { background: var(--accent); color: var(--accent-ink); }
.matrix { border-collapse: collapse; font-size: var(--s-1); }
.matrix th { font-weight: 500; color: var(--ink-2); padding: 4px 6px; white-space: nowrap; }
.matrix td { width: 54px; height: 30px; text-align: center; font-family: var(--font-data); border: 2px solid var(--paper); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.block { margin: 22px 0 0; min-width: 0; overflow-x: auto; }   /* a table wider than the screen scrolls in its block */
.block > h4 { margin: 0 0 8px; font-size: var(--s-3); font-weight: 600; }
.scroll { max-height: 460px; overflow: auto; border-top: 1px solid var(--rule); }

/* ---------------------------------------------------------------- rebuild */
.steps { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 6px; max-width: 760px; }
.steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule-2); }
.steps li .st { font-family: var(--font-data); color: var(--ink-3); }
.steps li.done .st { color: var(--ok); }
.steps li.now .st { color: var(--accent); }
.steps li.fail .st { color: var(--bad); }
.verdict { margin: 18px 0; padding: 16px 18px; border-left: 4px solid var(--ok); background: var(--ok-soft); max-width: 900px; }
.verdict.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.verdict h4 { margin: 0 0 8px; font-size: var(--s-4); }
.verdict .ids { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: var(--s-1); }
.verdict .ids .mono { word-break: break-all; }
.progress { height: 6px; background: var(--rule-2); border-radius: 3px; overflow: hidden; max-width: 760px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.15s; }

/* ---------------------------------------------------------------- start */
.start { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.start-card { width: min(760px, 100%); }
.start-card h1 { margin: 18px 0 6px; font-size: var(--s-6); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.start-card p.lede { margin: 0 0 22px; color: var(--ink-2); font-size: var(--s-3); max-width: 64ch; }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); }
.ways > div { padding: 18px; }
.ways > div + div { border-left: 1px solid var(--rule); }
.ways h2 { margin: 0 0 4px; font-size: var(--s-3); font-weight: 600; }
.ways p { margin: 0 0 12px; color: var(--ink-2); font-size: var(--s-2); }
.ways .field { margin-bottom: 10px; }
.drop { display: grid; place-items: center; gap: 6px; padding: 18px; border: 1.5px dashed var(--rule); border-radius: 6px; text-align: center; color: var(--ink-2); cursor: pointer; margin-bottom: 12px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.start .err { margin-top: 14px; color: var(--bad); white-space: pre-wrap; }
.start .foot { margin-top: 18px; font-size: var(--s-1); color: var(--ink-3); max-width: 72ch; }
@media (max-width: 760px) {
  .ways { grid-template-columns: 1fr; }
  .ways > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .body { grid-template-columns: 1fr; }
  .rail { max-height: none; overflow: visible; border-right: 0; border-bottom: 1px solid var(--rule); }
  .genome-list { max-height: 30vh; overflow: auto; }
  .app { height: auto; min-height: 100vh; grid-template-rows: auto 1fr; }
  /* two rows: the name and the buttons, then where objects come from and what was verified */
  .top { flex-wrap: wrap; gap: 6px 12px; padding: 8px 16px; }
  .top .spacer { order: 1; }
  .top .icon-btn { order: 2; }
  .top::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  .source-pill { order: 4; }
  .verified { order: 5; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .source-pill .mono { max-width: 120px; }
  .brand small { display: none; }
  .tabs { overflow-x: auto; }
}
pre.json { margin: 0; padding: 10px 12px; background: var(--sunk); border-radius: var(--radius); font: var(--s-1)/1.5 var(--font-data); overflow: auto; max-height: 260px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: var(--s-2); }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; min-width: 0; }
.kv dd.mono { font-size: var(--s-1); word-break: break-all; }

/* ---------------------------------------------------------------- genes */
.btn.small { padding: 2px 8px; font-size: var(--s-1); }
.tip .faint-tip { opacity: 0.72; }
.drawer .gd-line { margin: 2px 0 8px; color: var(--ink-2); font-size: var(--s-1); }
.drawer .gd-actions { margin-bottom: 10px; }
.genes-pane { max-width: 1560px; }
.genes-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.gene-map { margin: 4px 0 18px; padding: 10px 0 6px; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); }
.gene-map canvas { display: block; width: 100%; height: 96px; }
.gm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: var(--s-1); color: var(--ink-2); }
.gm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gm-k { display: inline-block; width: 12px; height: 8px; border-radius: 1px; }
.gm-k.coding { background: var(--ink-2); }
.gm-k.nc { background: var(--ink-3); opacity: 0.55; }
.gm-k.win { background: var(--accent-soft); border: 1px solid var(--accent); }
.genes-layout { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.gene-list { position: sticky; top: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: calc(100vh - 150px); min-height: 0; }
.gl-controls { display: grid; gap: 8px; }
.gl-controls input[type="search"] { width: 100%; padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); font: 500 var(--s-3) var(--font-ui); }
.gl-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gl-filters select { padding: 5px 6px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: var(--s-2); cursor: pointer; }
.gl-status { margin: 8px 0 6px; font-size: var(--s-1); color: var(--ink-3); }
.gl-rows { overflow: auto; min-height: 120px; border-top: 1px solid var(--rule); }
.gl-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "sym pos" "bt imp" "desc desc"; gap: 1px 10px; width: 100%; padding: 7px 10px 8px; border: 0; border-bottom: 1px solid var(--rule-2); background: none; text-align: left; cursor: pointer; }
.gl-row:hover { background: var(--sunk); }
.gl-row[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.gl-row .sym { grid-area: sym; font-weight: 600; font-size: var(--s-3); letter-spacing: 0.01em; }
.gl-row .pos { grid-area: pos; justify-self: end; color: var(--ink-3); font-size: var(--s-1); align-self: center; }
.gl-row .bt { grid-area: bt; color: var(--ink-2); font-size: var(--s-1); }
.gl-row .imp { grid-area: imp; justify-self: end; display: inline-flex; align-items: center; gap: 5px; font-size: var(--s-1); color: var(--ink); white-space: nowrap; }
.gl-row .desc { grid-area: desc; color: var(--ink-3); font-size: var(--s-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 9px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); cursor: pointer; font-size: var(--s-1); }
.chip:hover { border-color: var(--ink-3); }
.gene-panel { min-width: 0; }
.gp-empty { padding: 28px 0; max-width: 60ch; }
.gp-empty h3 { margin: 0 0 6px; font-size: var(--s-4); }
.gp-head { padding-bottom: 14px; border-bottom: 1px solid var(--rule-2); }
.gp-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.gp-title h3 { margin: 0; font-size: var(--s-6); font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.pill { display: inline-block; padding: 1px 9px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); font-size: var(--s-1); }
.gp-desc { margin: 6px 0 4px; font-size: var(--s-3); color: var(--ink); max-width: 70ch; }
.gp-loc { margin: 0 0 12px; color: var(--ink-2); font-size: var(--s-1); }
.gp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.gp-actions a.ext { font-size: var(--s-2); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.gp-actions a.ext:hover { border-bottom-color: var(--accent); }
.tag { display: inline-block; margin: 1px 0; padding: 0 6px; border-radius: 3px; background: var(--sunk); color: var(--ink-2); font-size: 11px; line-height: 18px; white-space: nowrap; }
.tag.mane { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
table.tx-table tr[data-tx] { cursor: pointer; }
table.tx-table td.tags { text-align: left; white-space: normal; min-width: 120px; }
table.tx-table tr.sel { background: var(--accent-soft); }
table.tx-table .radio { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 1.5px solid var(--ink-3); border-radius: 50%; vertical-align: -1px; }
table.tx-table tr.sel .radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.svg-scroll { overflow-x: auto; overflow-y: hidden; }
.svg-scroll > svg { min-width: 620px; }
svg.structure { display: block; width: 100%; height: auto; max-height: 110px; overflow: visible; }
svg.structure .axis-faint { stroke: var(--rule-2); stroke-width: 1; }
svg.structure .ex-utr { fill: var(--ink-3); }
svg.structure .ex-cds { fill: var(--accent); }
svg.structure .intron { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
svg.structure .ex-num { fill: var(--ink-3); font: 10px var(--font-data); text-anchor: middle; }
svg.structure .tick line { stroke: var(--ink); stroke-width: 1.2; }
svg.structure .tick circle { fill: var(--ink); stroke: var(--panel); stroke-width: 2; paint-order: stroke; }
svg.structure .tick { cursor: default; }
.block .note, .gene-panel .note { margin: 6px 0 0; font-size: var(--s-1); color: var(--ink-3); }
.protein { font: var(--s-1)/1.75 var(--font-data); padding: 10px 12px; background: var(--sunk); border-radius: var(--radius); overflow-x: auto; }
.protein .pl { display: grid; grid-template-columns: 7ch max-content; }
.protein .pn { color: var(--ink-3); text-align: right; padding-right: 1.5ch; user-select: none; }
.protein .ps { word-spacing: 0.7ch; white-space: pre; }
.protein .chg { background: var(--accent); color: var(--accent-ink); border-radius: 2px; }
.protein .met { color: var(--accent); font-weight: 700; }
.protein .stop { color: var(--bad); font-weight: 700; }
.protein .sec { text-decoration: underline; font-weight: 700; }
.same-up, .diff-up { margin: 0 0 10px; font-size: var(--s-2); }
.same-up .ok-mark { color: var(--ok); font-weight: 700; margin-right: 4px; }
.diff-up { color: var(--ink); padding-left: 10px; border-left: 3px solid var(--rule); }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 4px; font-size: var(--s-1); color: var(--ink-2); }
.legend-row .lg { display: inline-flex; align-items: center; gap: 5px; }
svg.lollipop { display: block; width: 100%; height: auto; overflow: visible; margin-bottom: 10px; }
svg.lollipop .backbone { fill: var(--sunk); stroke: var(--rule); }
svg.lollipop .axis { stroke: var(--ink-3); }
svg.lollipop .axis-label { fill: var(--ink-3); font: 11px var(--font-data); text-anchor: middle; }
svg.lollipop .axis-label.start { text-anchor: start; }
svg.lollipop .axis-label.end { text-anchor: end; }
svg.lollipop .stem { stroke: var(--ink-3); stroke-width: 1.5; }
svg.lollipop .hit { stroke: transparent; stroke-width: 14; }
svg.lollipop .lp circle, svg.lollipop .lp path { stroke: var(--panel); stroke-width: 2; paint-order: stroke; }
svg.lollipop .lp:hover .stem, svg.lollipop .lp:focus .stem { stroke: var(--ink); }
svg.lollipop .lp:focus { outline: none; }
svg.lollipop .lp:focus circle, svg.lollipop .lp:focus path { stroke: var(--ink); }
.lp-truncating { fill: var(--cq-2); }
.lp-changing { fill: var(--cq-1); }
.lp-splice { fill: var(--cq-3); }
svg.mk { flex: none; vertical-align: -2px; }
svg.mk circle, svg.mk path { stroke: var(--panel); stroke-width: 1.5; paint-order: stroke; }
.cq { display: inline-flex; align-items: center; gap: 6px; }
table.cq-table td.hgvs { text-align: left; white-space: normal; overflow-wrap: anywhere; min-width: 160px; max-width: 520px; }
.mk-none { display: inline-block; width: 12px; }
.frames { display: grid; gap: 10px; }
.frame h5 { margin: 0 0 3px; font-size: var(--s-2); font-weight: 600; }
.frame h5 .faint { font-weight: 400; }
.frame .residues { font: var(--s-1)/1.6 var(--font-data); word-break: break-all; padding: 8px 10px; background: var(--sunk); border-radius: var(--radius); max-height: 180px; overflow: auto; }
.frame .residues.three { word-break: normal; overflow-wrap: anywhere; }
.frame .residues .orf { background: var(--accent-soft); }
.frame .residues b.met { color: var(--accent); }
.frame .residues b.stop { color: var(--bad); }
#tr-text { width: 100%; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); font-size: var(--s-1); resize: vertical; }
#tr-out { margin-top: 12px; }
/* the gene across genomes */
.ch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.ch-head h4 { margin: 0 6px 0 0; }
.ch-summary { margin: 4px 0 12px; font-size: var(--s-2); color: var(--ink-2); }
.ch-summary b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.ch-h { margin: 18px 0 6px; font-size: var(--s-2); font-weight: 650; color: var(--ink); }
.ch-h .faint { font-weight: 400; }
.ch-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 8px; }
.ch-scroll { max-height: 420px; overflow: auto; }
table.data td.lefty, table.data th.lefty { text-align: left; }
table.data td.hgvs { white-space: normal; overflow-wrap: anywhere; min-width: 120px; max-width: 360px; }
table.data td.carriers { white-space: normal; min-width: 160px; max-width: 320px; color: var(--ink-2); font-size: var(--s-1); }
table.data td.share { min-width: 92px; position: relative; font-variant-numeric: tabular-nums; }
table.data td.share .bar { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; background: var(--rule-2); border-radius: 2px; }
table.data td.share .bar::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--accent); border-radius: 2px; }
table.ch-prot tr[data-prot] { cursor: pointer; }
.tag.warn { background: var(--bad-soft); color: var(--bad); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.imp-pill { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; line-height: 18px; font-weight: 600; border: 1px solid currentColor; }
.imp-high { color: var(--cq-2); }
.imp-moderate { color: var(--cq-1); }
.imp-low { color: var(--cq-3); }
.imp-modifier { color: var(--ink-3); }
.chip.imp[aria-pressed="false"] { opacity: 0.45; text-decoration: line-through; }
.chip.imp[aria-pressed="true"] { border-color: currentColor; }
table.ch-var td.allele { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
table.ch-var td.terms { white-space: normal; min-width: 120px; }
table.ch-var td.gc { padding: 4px 4px; text-align: center; font: 10px/1 var(--font-data); letter-spacing: 1px; color: var(--ink-3); border-left: 1px solid var(--panel); }
table.ch-var td.gc.g1 { background: var(--accent-soft); color: var(--ink); }
table.ch-var td.gc.g2 { background: var(--accent); color: var(--accent-ink); }
table.ch-var th.gc-h { padding: 4px 4px; vertical-align: bottom; height: 86px; text-align: center; }
table.ch-var th.gc-h span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: var(--s-1); max-height: 80px; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.gt-canvas-wrap { overflow-x: auto; margin-top: 8px; border: 1px solid var(--rule-2); border-radius: var(--radius); }
.gt-canvas-wrap canvas { display: block; }
.al { font: var(--s-1)/1.55 var(--font-data); background: var(--sunk); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; white-space: pre; max-height: 520px; overflow-y: auto; }
.al-block { margin-bottom: 12px; }
.al-block:last-child { margin-bottom: 0; }
.al-ruler { color: var(--ink-3); display: block; }
.al-row { display: block; }
.al-row.hl { background: var(--accent-soft); }
.al-lab { color: var(--ink-2); font-weight: 600; }
.k-same { color: var(--ink-3); }
.k-sub { background: rgba(42, 120, 214, 0.18); color: var(--ink); border-radius: 2px; }
.k-ins { background: rgba(192, 54, 123, 0.18); color: var(--ink); border-radius: 2px; }
.k-del { color: var(--cq-2); font-weight: 700; }
.k-pad, .k-end { color: var(--rule); }
.al-legend { margin-top: 6px; }
.al-legend .lg span { font-family: var(--font-data); padding: 0 3px; }
.ch-dl { margin-top: 14px; gap: 8px; flex-wrap: wrap; }
svg.ch-plot { margin: 4px 0 2px; max-height: 150px; }
.svg-scroll > svg.ch-plot { min-width: 480px; }
svg.ch-plot .cp circle { stroke: var(--panel); stroke-width: 1.6; paint-order: stroke; }
svg.ch-plot .cp circle.imp-high { fill: var(--cq-2); }
svg.ch-plot .cp circle.imp-moderate { fill: var(--cq-1); }
svg.ch-plot .cp circle.imp-low { fill: var(--cq-3); }
svg.ch-plot .cp circle.imp-modifier { fill: var(--ink-3); }
svg.ch-plot .cp:hover .stem, svg.ch-plot .cp:focus .stem { stroke: var(--ink); }
svg.ch-plot .cp:focus { outline: none; }
svg.ch-plot .cp:focus circle { stroke: var(--ink); }
.btn.small { padding: 2px 8px; font-size: var(--s-1); }
@media (max-width: 980px) {
  .genes-layout { grid-template-columns: 1fr; }
  .gene-list { position: static; max-height: none; }
  .gl-rows { max-height: 50vh; }
}
@media (forced-colors: active) {
  .lp-truncating, .lp-changing, .lp-splice { fill: CanvasText; }
}

/* gl1-seq Atlas. The genome browser's components (app.css, loaded first) in gl1-seq's own colours, as on
   gl1-seq.com: blue-black ink on white, one cobalt accent, teal for the genomes' deltas; nucleotide
   colours by the field's convention, so colour in the tracks still carries data. Geist and Geist Mono
   (self-hosted; their @font-face is written by web/build.py). The atlas adds a page frame: a header with
   the dapps and the search, a reading column, and on the front page the genome drawn as a circle. */

:root {
  --paper: #f6f8fb; --panel: #ffffff; --sunk: #eef1f7; --ink: #09101e; --ink-2: #38404d; --ink-3: #606a78;
  --rule: #cdd3dc; --rule-2: #e3e6ec; --accent: #0a4ac5; --accent-2: #00359f; --accent-ink: #ffffff; --accent-soft: #e6f1ff;
  --teal: #2c8e9e; --teal-soft: rgba(44, 142, 158, 0.12);
  --band-dark: #1e3a7a; --band-light: #e7eefb; --leaf-a: #c9d5e8; --leaf-b: #9fb3d6;
  --chr-a: #1f4fb8; --chr-b: #5f8ddb; --chr-x: #173a8a;
  --font-ui: "Geist", "Avenir Next", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-data: "Geist Mono", "JetBrains Mono", "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --radius: 6px;
}
:root[data-theme="dark"] {
  --paper: #0b1120; --panel: #111a2c; --sunk: #0a0f1b; --ink: #e6ebf3; --ink-2: #b0bccd; --ink-3: #7e8ba0;
  --rule: #26324a; --rule-2: #1c2740; --accent: #80b7ff; --accent-2: #b3d3ff; --accent-ink: #061229; --accent-soft: rgba(128, 183, 255, 0.15);
  --teal: #5cc2d1; --teal-soft: rgba(92, 194, 209, 0.14);
  --band-dark: #a9c6f5; --band-light: #1b2741; --leaf-a: #2a3854; --leaf-b: #3e5175;
  --chr-a: #6f9fe8; --chr-b: #3b67b8; --chr-x: #9cc1f7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1120; --panel: #111a2c; --sunk: #0a0f1b; --ink: #e6ebf3; --ink-2: #b0bccd; --ink-3: #7e8ba0;
    --rule: #26324a; --rule-2: #1c2740; --accent: #80b7ff; --accent-2: #b3d3ff; --accent-ink: #061229; --accent-soft: rgba(128, 183, 255, 0.15);
    --teal: #5cc2d1; --teal-soft: rgba(92, 194, 209, 0.14);
    --band-dark: #a9c6f5; --band-light: #1b2741; --leaf-a: #2a3854; --leaf-b: #3e5175;
    --chr-a: #6f9fe8; --chr-b: #3b67b8; --chr-x: #9cc1f7;
  }
}

body { background: var(--paper); }
#atlas { min-height: 100vh; display: flex; flex-direction: column; }
.at-skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--panel); border: 1px solid var(--rule); }
.at-skip:focus { left: 12px; }
a { text-underline-offset: 2px; }
.small { font-size: var(--s-1); }

/* ---------------------------------------------------------------- start-up and errors */
.at-boot { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.at-boot-card { width: min(460px, 100%); display: grid; gap: 10px; justify-items: start; }
.at-boot-card.wide { width: min(720px, 100%); }
.at-boot-card h1 { margin: 6px 0 0; font-size: var(--s-6); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.at-boot-card .busy-line { width: 100%; }
.at-boot-step { margin: 0; color: var(--ink-2); }
.at-custom { margin-top: 8px; }
.at-custom summary { cursor: pointer; color: var(--ink-2); }

/* ---------------------------------------------------------------- header */
.at-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 56px;
  background: var(--panel); border-bottom: 1px solid var(--rule); }
.at-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: var(--s-3); white-space: nowrap; }
.at-brand b { font-weight: 650; }
.at-brand .at-mark { flex: none; }
.at-mark { display: inline-flex; align-items: center; gap: 2px; height: 22px; }
.at-mark i { display: block; height: 20px; border-radius: 2px; background: var(--accent); width: 6px; }
.at-mark i:nth-child(2) { width: 13px; opacity: 0.55; }
.at-mark i:nth-child(3) { width: 4px; opacity: 0.82; }
.at-boot-card .at-mark { height: 34px; gap: 3px; }
.at-boot-card .at-mark i { height: 32px; width: 10px; }
.at-boot-card .at-mark i:nth-child(2) { width: 21px; }
.at-boot-card .at-mark i:nth-child(3) { width: 7px; }
.at-dapps-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; }
.at-dapps-btn svg { flex: none; }
.at-dapps-btn:hover { background: var(--accent-2); color: var(--accent-ink); }
:root[data-theme="dark"] .at-dapps-btn:hover { color: #061229; }
.at-dapps-btn[aria-current="page"] { box-shadow: 0 0 0 3px var(--accent-soft); }
.at-nav { display: flex; gap: 2px; min-width: 0; }
.at-nav a { padding: 8px 10px; color: var(--ink-2); text-decoration: none; border-radius: var(--radius); font-weight: 500; white-space: nowrap; }
.at-nav a:hover { color: var(--ink); background: var(--sunk); }
.at-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.at-search { position: relative; flex: 1; max-width: 440px; margin-left: auto; display: flex; align-items: center; }
.at-search svg { position: absolute; left: 10px; color: var(--ink-3); pointer-events: none; }
.at-search input { width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); font-size: var(--s-2); }
.at-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.at-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; list-style: none; margin: 0; padding: 4px; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.35); max-height: 60vh; overflow: auto; }
.at-suggest li { display: grid; grid-template-columns: 64px 1fr; gap: 0 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.at-suggest li[aria-selected="true"], .at-suggest li:hover { background: var(--accent-soft); }
.at-suggest .t, .at-hits .t { font-weight: 600; }
.at-suggest .s, .at-hits .s { grid-column: 2; color: var(--ink-3); font-size: var(--s-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k { grid-row: span 2; align-self: start; justify-self: start; padding: 1px 6px; border-radius: 3px; font-size: 11px; background: var(--sunk); color: var(--ink-2); }
.k-gene { background: var(--accent-soft); color: var(--ink); }
.k-protein { background: rgba(42, 120, 214, 0.13); color: var(--ink); }
.k-genome { background: var(--ok-soft); color: var(--ink); }
.k-locus { background: rgba(209, 134, 15, 0.16); color: var(--ink); }
.at-src { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border: 1px solid var(--rule); border-radius: 999px; white-space: nowrap; cursor: help; }
.at-src b { display: block; font-size: var(--s-1); font-weight: 600; line-height: 1.2; }
.at-src small { display: block; color: var(--ink-3); font-size: 11px; line-height: 1.2; }
.at-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); flex: none; }

/* ---------------------------------------------------------------- the page */
.at-main { flex: 1; outline: none; }
.at-page { max-width: 1600px; margin: 0 auto; padding: 28px clamp(16px, 2.4vw, 40px) 56px; }
.at-pagehead { margin-bottom: 18px; }
.at-h1 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 36px); font-weight: 650; letter-spacing: -0.022em; line-height: 1.12; }
.at-h1.mono, .at-idh { font-size: clamp(14px, 2vw, 20px); word-break: break-all; letter-spacing: 0; }
.lede { margin: 0 0 12px; color: var(--ink-2); font-size: var(--s-3); line-height: 1.55; max-width: 76ch; }
.at-crumbs { margin: 0 0 6px; color: var(--ink-3); font-size: var(--s-1); }
.at-crumbs a { color: var(--ink-2); }
.at-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.at-pills .pill { text-decoration: none; }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--bad); border-color: var(--bad); }
.at-actions { margin-top: 14px; align-items: center; }
.at-actions a.ext, .row a.ext { font-size: var(--s-2); text-decoration: none; border-bottom: 1px solid var(--accent-soft); margin-left: 4px; }
.at-actions a.ext:hover { border-bottom-color: var(--accent); }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-ink); }
.btn.small { padding: 3px 9px; font-size: var(--s-1); }
.block > h2 { margin: 0 0 8px; font-size: var(--s-4); font-weight: 600; letter-spacing: -0.01em; }
.block > h2 .faint, .block > h2 .mono { font-weight: 400; font-size: var(--s-2); }
.at-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.at-split > * { min-width: 0; }   /* a wide table or sequence scrolls in its block, not the page */
.at-flow > .block:first-child { margin-top: 0; }
.at-aside { position: sticky; top: 72px; display: grid; gap: 18px; font-size: var(--s-2); }
.at-aside section { padding: 14px 16px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 6px; }
.at-aside h3 { margin: 0 0 8px; font-size: var(--s-2); font-weight: 600; }
.at-aside .note { margin: 8px 0 0; font-size: var(--s-1); color: var(--ink-3); }
.at-dl { display: flex; flex-wrap: wrap; gap: 6px; }
.at-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.at-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.at-kv dt { color: var(--ink-3); }
.at-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.at-kv.wide { max-width: 980px; margin: 16px 0; }
.note { color: var(--ink-3); font-size: var(--s-1); }
.at-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0 0 16px; }
.field.grow { flex: 1; min-width: 220px; }
.field.grow input { width: 100%; }
table.at-table td.desc { white-space: normal; min-width: 220px; max-width: 520px; color: var(--ink-2); }
table.at-table a.sym { font-weight: 600; text-decoration: none; }
table.at-table tr.withdrawn td { color: var(--ink-3); }
.at-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 860px; }
.at-hits a { display: grid; grid-template-columns: 70px 1fr; gap: 0 12px; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.at-hits a:hover { background: var(--panel); }

/* ---------------------------------------------------------------- the front page */
.fp { max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 2.4vw, 40px); }
.fp-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 40px; align-items: center; padding: 44px 0 18px; }
.fp-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px 5px 9px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--panel); color: var(--ink-2); font-size: var(--s-1); }
.fp-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.fp-hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 58px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }
.fp-hero h1 span { color: var(--accent); }
.fp-lede { margin: 20px 0 0; max-width: 60ch; font-size: clamp(16px, 1.45vw, 18.5px); line-height: 1.55; color: var(--ink-2); }
.fp-lede b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.fp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.fp-cta .btn { padding: 10px 16px; font-size: var(--s-3); border-radius: 999px; }
.fp-cta .btn.primary:hover { filter: none; background: var(--accent-2); border-color: var(--accent-2); }
.fp-keys { margin: 16px 0 0; color: var(--ink-3); font-size: var(--s-1); }
.fp-keys kbd { padding: 1px 6px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; background: var(--panel); font: 11px var(--font-data); color: var(--ink-2); }
.fp-circle { position: relative; width: min(100%, 520px); justify-self: center; }
.fp-circle svg { display: block; width: 100%; height: auto; overflow: visible; }
.fp-circle .arc { fill: none; cursor: pointer; transition: opacity 0.15s; }
.fp-circle .arc.dim { opacity: 0.28; }
.fp-circle .lbl { font: 500 11.5px var(--font-data); fill: var(--ink-3); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.fp-circle .lbl.on { fill: var(--ink); font-weight: 600; }
.fp-circle .ring { fill: none; }
.fp-circle .core { fill: var(--accent-soft); }
.fp-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; width: 34%; }
.fp-center b { display: block; font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.035em; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.fp-center span { display: block; margin-top: 2px; font: 500 11px var(--font-data); color: var(--accent); letter-spacing: 0.02em; }
.fp-center small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.fp-layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 14px 0 0; background: var(--rule-2); border: 1px solid var(--rule-2); border-radius: 10px; overflow: hidden; }
.fp-layers > div { display: grid; grid-template-columns: 22px 1fr; gap: 3px 10px; align-content: start; padding: 15px 18px 16px; background: var(--panel); }
.fp-layers svg { margin-top: 1px; }
.fp-layers b { font-size: var(--s-2); font-weight: 600; color: var(--ink-2); }
.fp-layers strong { grid-column: 2; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.fp-layers .teal strong { color: var(--teal); }
.fp-layers span { grid-column: 2; color: var(--ink-2); font-size: var(--s-1); line-height: 1.4; font-variant-numeric: tabular-nums; }
.fp-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 26px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fp-facts > div { padding: 16px 16px 15px 0; display: grid; gap: 3px; }
.fp-facts > div + div { padding-left: 16px; border-left: 1px solid var(--rule-2); }
.fp-facts b { font-size: clamp(19px, 1.9vw, 25px); font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.fp-facts span { color: var(--ink-2); font-size: var(--s-1); line-height: 1.35; }
.fp-facts .busy-line { grid-column: 1 / -1; }
.fp-sec { padding: 46px 0 8px; }
.fp-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 30px; margin: 0 0 18px; }
.fp-head h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.fp-head p { margin: 8px 0 0; max-width: 70ch; color: var(--ink-2); line-height: 1.55; }
.fp-head a { white-space: nowrap; font-weight: 500; }

/* how gl1-seq works, and where the blockchain fits */
.fp-how { padding: 40px 0 0; }
.fp-how h2 { margin: 0 0 14px; font-size: var(--s-5); font-weight: 600; letter-spacing: -0.02em; }
.fp-how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--accent); }
.fp-how-grid > div { padding: 14px 18px 4px 0; }
.fp-how-grid > div + div { padding-left: 18px; border-left: 1px solid var(--rule-2); }
.fp-how-grid b { display: block; font-size: var(--s-3); font-weight: 600; }
.fp-how-grid p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--s-2); line-height: 1.55; }
.fp-how-grid .chain b { color: var(--teal); }
.fp-how-more { margin: 12px 0 0; font-size: var(--s-2); }
@media (max-width: 1080px) {
  .fp-how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-how-grid > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .fp-how-grid { grid-template-columns: minmax(0, 1fr); }
  .fp-how-grid > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule-2); }
}

/* the dapps, on the front page and on their own page */
.dapps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--rule-2); border-radius: 12px; overflow: hidden; }
/* hairlines between the cards (outside each card, so a row that is not full ends in white, and the
   frame clips the lines at its edges) */
.dapp { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-content: start; padding: 20px 20px 18px; background: var(--panel); color: var(--ink); text-decoration: none; min-height: 148px;
  box-shadow: 1px 0 0 0 var(--rule-2), 0 1px 0 0 var(--rule-2); }
.dapp:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel)); }
.dapp:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dapp .ic { grid-row: span 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.dapp.teal .ic { background: var(--teal-soft); color: var(--teal); }
.dapp b { font-size: var(--s-4); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.dapp p { margin: 0; color: var(--ink-2); font-size: var(--s-2); line-height: 1.5; }
.dapp .go { margin-top: 6px; color: var(--accent); font-size: var(--s-1); font-weight: 600; }
.dapp .go::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg) translateY(-1px); }
.dapp .ed { position: absolute; top: 14px; right: 14px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3); font-size: 11px; }
.dapps-group { margin: 30px 0 10px; display: flex; align-items: baseline; gap: 12px; }
.dapps-group h2 { margin: 0; font-size: var(--s-4); font-weight: 600; letter-spacing: -0.01em; }
.dapps-group span { color: var(--ink-3); font-size: var(--s-2); }

.fp-band { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; }
.fp-band h2, .fp-trust h2 { margin: 0 0 14px; font-size: var(--s-5); font-weight: 600; letter-spacing: -0.02em; }
.fp-eds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fp-ed { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px 20px; border: 1px solid var(--rule-2); border-radius: 12px; background: var(--panel); }
.fp-ed.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fp-ed b { font-size: var(--s-3); }
.fp-ed .host { font: 12px var(--font-data); color: var(--accent); }
.fp-ed p { margin: 0; color: var(--ink-2); font-size: var(--s-2); line-height: 1.5; }
.fp-ed .here { position: absolute; top: 16px; right: 16px; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.fp .btn { border-radius: 999px; padding: 8px 15px; }
.fp-trust { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; padding: 30px 0 52px; margin-top: 40px; border-top: 1px solid var(--rule); }
.fp-trust p { color: var(--ink-2); line-height: 1.6; max-width: 70ch; }
.at-chain { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: var(--s-1); align-content: start; }
.at-chain dt { color: var(--ink-3); }
.at-chain dd { margin: 0; overflow-wrap: anywhere; }
.at-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.at-chip { display: grid; gap: 2px; padding: 10px 13px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 8px; text-decoration: none; color: var(--ink); }
.at-chip:hover { border-color: var(--accent); }
.at-chip b { font-size: var(--s-3); }
.at-chip span { color: var(--ink-3); font-size: var(--s-1); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.at-more { margin: 12px 0 0; display: flex; gap: 16px; font-size: var(--s-2); }
.at-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.at-fam { display: grid; gap: 4px; padding: 8px 10px 10px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 8px; text-decoration: none; color: var(--ink); }
.at-fam:hover { border-color: var(--accent); }
.at-fam > span { display: grid; font-size: var(--s-1); }
.at-ped { width: 100%; max-width: 220px; height: auto; }
.at-ped line { stroke: var(--ink-3); stroke-width: 1.4; }
.at-ped .p { fill: var(--panel); stroke: var(--ink); stroke-width: 1.4; }
.at-ped .c { fill: var(--teal-soft); stroke: var(--teal); stroke-width: 1.6; }
.at-ped text { font: 11px var(--font-data); fill: var(--ink-2); }

/* ---------------------------------------------------------------- the genome page: chromosomes painted, scaffolds listed */
.at-chroms { margin: 18px 0 0; display: grid; gap: 10px; }
.at-chrom { scroll-margin-top: 80px; border-radius: 8px; padding: 4px 0; }
.at-chrom.hl { background: var(--accent-soft); }
.at-chrom canvas { display: block; width: 100%; cursor: crosshair; }
.at-chrom-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 2px 8px; }
.at-chrom-head a { color: var(--ink); text-decoration: none; font-size: var(--s-3); }
.at-chrom-hint { margin-left: auto; font-size: var(--s-1); }
.at-scafs { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 24px; margin: 8px 0 0; padding: 0; list-style: none; }
.at-scafs li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--rule-2); font-size: var(--s-1); }
.at-scafs li a { font-family: var(--font-data); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-scafs li span { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-scafhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 26px 0 4px; }
.at-scafhead h2 { margin: 0; font-size: var(--s-4); font-weight: 600; }
.at-scafhead p { margin: 0; color: var(--ink-2); font-size: var(--s-2); }

/* ---------------------------------------------------------------- genes, proteins */
.at-sym { font-size: clamp(32px, 4.4vw, 46px); }
.at-entry { font-size: 0.55em; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.at-gene .block, .at-protein .block, .at-genome .block { margin-top: 26px; }
.at-gene .block:first-child { margin-top: 0; }
.at-comp { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 3px 8px; margin: 12px 0 0; font: 11px var(--font-data); color: var(--ink-2); }
.at-comp span { display: grid; grid-template-columns: 12px 1fr; align-items: center; gap: 0 4px; }
.at-comp i { grid-column: 1 / -1; display: block; height: 3px; width: var(--w); background: var(--accent); opacity: 0.7; border-radius: 2px; }
.at-comp b { color: var(--ink); }

/* ---------------------------------------------------------------- genomes */
.at-famgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0 0 22px; }
.at-famcard { padding: 12px 14px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 6px; display: grid; gap: 6px; }
.at-famhead { display: grid; gap: 2px; font-size: var(--s-1); }
.at-famhead b { font-size: var(--s-2); }
.at-famlinks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--s-2); }
tr.rb td { background: var(--paper); white-space: normal; text-align: left; }
tr.rb .verdict { margin: 8px 0; }

/* ---------------------------------------------------------------- variants */
.at-gchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.at-gchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel);
  font-size: var(--s-1); cursor: pointer; }
.at-gchip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.at-sum { margin: 0 0 8px; color: var(--ink-2); }
.at-sum b { color: var(--ink); }
/* 1.3.2: a table flows with the page, so the page has one scroll bar and no box of its own scrolls inside it;
   its header row stays under the top bar while the table passes */
.at-page .scroll, .at-page .ch-scroll, .at-page .at-vscroll { max-height: none !important; overflow: visible; }
.at-page table.data thead th { top: 56px; z-index: 3; background: var(--paper); box-shadow: inset 0 -1px 0 var(--rule); }
.at-vtable td { vertical-align: top; }
.gts { white-space: nowrap; }
/* genotype marks in the variants table (.gt is the genome browser's genotype pill) */
.at-gt { display: inline-block; width: 10px; height: 10px; margin-right: 3px; border-radius: 50%; border: 1.4px solid var(--ink-3); vertical-align: -1px; }
.at-gt-1 { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); border-color: var(--accent); }
.at-gt-2 { background: var(--accent); border-color: var(--accent); }
.at-gt-1.hemi { background: var(--accent); }
td.gts { white-space: nowrap; }

/* ---------------------------------------------------------------- verify, objects, apps */
.at-vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.at-vgrid .block { margin-top: 18px; }
.at-vgrid p { color: var(--ink-2); max-width: 64ch; }
.verdict.neutral { border-left-color: var(--ink-3); background: var(--sunk); }
.at-bases { word-break: break-all; font-size: var(--s-1); line-height: 1.6; max-width: 900px; }
.at-hex { word-break: break-all; color: var(--ink-3); }
.at-idform textarea { width: 100%; max-width: 900px; padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); font: var(--s-1)/1.5 var(--font-data); }
.at-code { padding: 14px 16px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 6px; overflow: auto; font: var(--s-1)/1.6 var(--font-data); }
.at-routes td { white-space: normal; }
.verb { display: inline-block; min-width: 40px; font: 600 11px var(--font-data); color: var(--accent); }
.at-prose { max-width: 820px; }
.at-prose p, .at-prose li { line-height: 1.65; color: var(--ink-2); }

/* ---------------------------------------------------------------- footer */
.at-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 18px 24px 26px; border-top: 1px solid var(--rule);
  color: var(--ink-3); font-size: var(--s-1); background: var(--panel); }
.at-foot > div:first-child { max-width: 80ch; }
.at-foot b { color: var(--ink-2); }
.at-foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.at-foot-legal { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 12px; border-top: 1px solid var(--rule-2); color: var(--ink-3); }
.at-foot-legal a { color: var(--ink-2); }
.at-foot-terms { flex-basis: 100%; margin: 0; color: var(--ink-3); font-size: var(--s-1); line-height: 1.5; }
.at-foot-terms a { color: var(--ink-2); }
.fp-head-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.at-foot-dapps { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 0 0 12px; margin: 0 0 4px; border-bottom: 1px solid var(--rule-2); }
.at-foot-dapps b { margin-right: 4px; color: var(--ink); }
.at-foot-dapps a { color: var(--ink-2); text-decoration: none; }
.at-foot-dapps a:hover { color: var(--accent); }
#verified-count { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); }

/* ---------------------------------------------------------------- the Clinical Gene Atlas (1.4.0) */
.k-clinical { background: var(--teal-soft); color: var(--ink); }
.cg-head .lede { max-width: 92ch; }
.cg-notice { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--panel); color: var(--ink-2); font-size: var(--s-1); max-width: 100%; }
.cg-notice svg { flex: none; color: var(--ink-3); }
.cg-bar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin: 18px 0 10px; }
.cg-bar .field.grow { max-width: 420px; }
.cg-sets a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; color: var(--ink-2); text-decoration: none; background: var(--panel); }
.cg-sets a + a { border-left: 1px solid var(--rule); }
.cg-sets a[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.cg-sets a b, .cg-chip b { font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cg-sum { margin: 0 0 10px; color: var(--ink-2); max-width: 92ch; }
.cg-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.cg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel);
  color: var(--ink-2); cursor: pointer; font: inherit; font-size: var(--s-1); }
.cg-chip:hover { border-color: var(--ink-3); }
.cg-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.cg-custom { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0 0 14px; max-width: 900px; }
.cg-custom textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); font: var(--s-2)/1.5 var(--font-data); }
.cg-screen { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--panel); }
.cg-screen .note { margin: 6px 0 0; }
.cg-run { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.cg-prog { height: 4px; margin-top: 10px; border-radius: 2px; background: var(--rule-2); overflow: hidden; }
.cg-prog i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.cg-views { margin: 0 0 12px; }
/* outcomes: the gene pages' consequence colours */
.hp { display: block; height: 7px; min-width: 7px; border-radius: 2px; background: var(--oc, var(--rule-2)); }
.o-lof { --oc: var(--cq-2); } .o-splice { --oc: var(--cq-3); } .o-mis { --oc: var(--cq-1); } .o-nc { --oc: var(--teal); }
.o-silent { --oc: var(--rule); } .o-ref { --oc: var(--rule-2); }
.hp.o-none { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--rule) 3px 4px); }
.hp.o-wait { background: var(--sunk); }
.cg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; color: var(--ink-2); font-size: var(--s-1); }
.cg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cg-legend .hp { width: 18px; }
.cg-mini { display: flex; width: 120px; height: 7px; border-radius: 2px; overflow: hidden; background: var(--rule-2); margin: 3px 0 4px; }
.cg-mini i { display: block; height: 100%; background: var(--oc); }
.cg-mini i + i { box-shadow: -1px 0 0 var(--panel); }
.cg-genes td { vertical-align: top; }
.cg-genes td.cg-why { white-space: normal; min-width: 180px; max-width: 300px; font-size: var(--s-1); color: var(--ink-2); }
.cg-genes .desc { max-width: 240px; white-space: normal; }
.cg-drugs { color: var(--ink-2); }
.cg-links a { display: inline-block; margin: 0 9px 2px 0; white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--accent-soft); line-height: 1.45; }
.cg-links a:hover { border-bottom-color: var(--accent); }
table.data td.cg-links { white-space: normal; min-width: 150px; max-width: 220px; }
tr.cg-row { cursor: pointer; }
tr.cg-row.open > td { background: var(--sunk); }
tr.cg-missing td { color: var(--ink-3); }
tr.cg-more > td { padding: 14px 16px 18px; background: var(--sunk); white-space: normal; text-align: left; }
.cg-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; }
.cg-more-grid h4 { margin: 0 0 8px; font-size: var(--s-2); font-weight: 600; }
.cg-more-grid h4 + h4, .cg-more-grid ul + h4 { margin-top: 14px; }
.cg-acts { margin-top: 10px; gap: 6px; align-items: center; }
.cg-mxbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 8px; }
.cg-mxbar .cg-legend, .cg-mxbar .cg-groups { margin: 0; }
.cg-only { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: var(--s-1); }
table.cg-mx { width: auto; }
table.cg-mx th.fam { text-align: center; font-size: var(--s-1); color: var(--ink-3); border-bottom: 1px solid var(--rule-2); border-left: 1px solid var(--rule); }
table.cg-mx th.gname { text-align: center; padding: 4px 4px 6px; font-size: var(--s-1); line-height: 1.2; }
table.cg-mx th.gname a { color: var(--ink); text-decoration: none; font-family: var(--font-data); }
table.cg-mx th.gname small { display: block; color: var(--ink-3); font-weight: 400; }
table.cg-mx td.cx { padding: 4px 6px; cursor: pointer; }
table.cg-mx td.cx .pair { display: grid; gap: 2px; width: 40px; margin: 0 auto; }
table.cg-mx td.cx:hover { background: var(--accent-soft); }
table.cg-mx tbody tr:hover { background: transparent; }
table.cg-mx tbody tr:hover td { background: var(--sunk); }
.cg-vars td { vertical-align: top; }
.cg-vars td.hgvs { max-width: 300px; }
.imp-high.tag { background: rgba(235, 104, 52, 0.14); color: var(--ink); }
.imp-moderate.tag { background: rgba(42, 120, 214, 0.13); color: var(--ink); }
.cg-tform { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 0 0 12px; }
.cg-tform input[type="number"] { width: 110px; }
.cg-tsum { margin: 0 0 10px; overflow-wrap: anywhere; }
.cg-bed { max-height: 420px; margin-top: 12px; white-space: pre; }
.cg-saved { overflow-wrap: anywhere; }
.cg-dl { margin-bottom: 4px; }
.cg-hap { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; min-width: 140px; max-width: 240px; white-space: normal; }
.cg-hap .mono, table.data.cg-vars td.hgvs, table.data.cg-vars td.mono { overflow-wrap: anywhere; white-space: normal; }
.cg-hap .hp { margin-top: 5px; width: 18px; }
.cg-hap .tag { margin-top: 3px; }
.cg-rep td { vertical-align: top; }
.cg-rep td.cg-copies { white-space: normal; min-width: 120px; max-width: 180px; color: var(--ink-2); }
table.data.cg-rep td { white-space: normal; }
table.data.cg-rep td:last-child { white-space: nowrap; }
table.data.cg-rep td.cg-from { min-width: 130px; max-width: 200px; }
.cg-rep td.cg-copies.k-het, .cg-rep td.cg-copies.k-hom, .cg-rep td.cg-copies.k-trans, .cg-rep td.cg-copies.k-hemi, .cg-rep td.cg-copies.k-mono { color: var(--ink); font-weight: 550; }
.cg-rep td.cg-why { white-space: normal; min-width: 110px; max-width: 180px; color: var(--ink-2); }
table.data.cg-vars td.cg-links { min-width: 120px; max-width: 170px; white-space: normal; }
.cg-vars td.cg-links a { display: inline-block; }
.cg-ctx { padding: 14px 16px; background: var(--panel); border: 1px solid var(--rule-2); border-left: 3px solid var(--teal); border-radius: 6px; }
.cg-ctx p { margin: 0 0 8px; }
.cg-ctx .cg-links a { display: inline-block; margin: 0 9px 4px 0; }
@media (max-width: 1080px) { .cg-more-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- 1.4.1: reading type, wider pages */
/* A type scale for reading (the atlas's pages only; the genome browser keeps its own): 14 px text,
   tables at 13.5 px with figures in columns, headers that stay legible, a measure for prose. */
#atlas { --s-1: 12.5px; --s-2: 14px; --s-3: 15.5px; --s-4: 19px; --s-5: 23px; --s-6: 30px; font-size: var(--s-2); line-height: 1.55; }
.at-page { max-width: 2000px; padding: 32px clamp(16px, 3vw, 64px) 72px; }
.fp { max-width: 2000px; padding: 0 clamp(16px, 3vw, 64px); }
.at-h1 { font-size: clamp(28px, 2.3vw, 40px); letter-spacing: -0.024em; }
.lede { font-size: 16px; line-height: 1.6; max-width: 96ch; }
.block > h2 { font-size: 20px; letter-spacing: -0.012em; }
.at-aside { font-size: 13.5px; }
.at-split { grid-template-columns: minmax(0, 1fr) clamp(280px, 19vw, 360px); gap: clamp(24px, 2.2vw, 40px); }
.note { font-size: 12.5px; line-height: 1.5; }
.at-page table.data { font-size: 13.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.at-page table.data th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.at-page table.data th, .at-page table.data td { padding: 8px 12px; }
.at-page table.data td.mono, .at-page table.data .mono { font-size: 12.5px; }
.tag { font-size: 11.5px; line-height: 19px; padding: 0 7px; }
.pill { font-size: 12.5px; padding: 2px 10px; }
.btn { font-size: 13.5px; }
.btn.small { font-size: 12.5px; }
.seg button, .cg-sets a { font-size: 13.5px; }
/* the Clinical Gene Atlas, laid out across the page's width (1.4.1) */
.cg-viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 0 0 6px; }
.cg-viewbar .cg-legend { margin: 0; }
.cg-viewbar .cg-views { margin: 0; }
.cg-dlbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cg-dlh { color: var(--ink-3); font-size: 12.5px; margin-right: 2px; }
#csaved, #rsaved { margin: 0 0 12px; }
.cg-view { min-width: 0; }
/* a table wider than its block scrolls sideways in it (main.mjs marks it); its header row then scrolls with it.
   A block that fits does not scroll, so a table's header row stays under the top bar and never on its first row. */
.at-page .block { overflow: visible; }
.at-page .scroll.at-wide, .at-page .ch-scroll.at-wide, .at-page .at-vscroll.at-wide, .at-page .block.at-wide { overflow-x: auto; }
.at-page .at-wide table.data thead th { position: static; }
.cg-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; margin-top: 32px; }
.cg-info section { padding: 16px 18px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: 8px; font-size: 13.5px; }
.cg-info h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.cg-info .at-kv { margin-top: 10px; }
table.data.cg-genes td { white-space: normal; }
table.data.cg-genes td:first-child { min-width: 150px; max-width: 240px; }
table.data.cg-genes td.cg-why { min-width: 200px; max-width: 320px; }
table.data.cg-genes td.cg-loc { min-width: 230px; }
table.data.cg-genes td.cg-loc > div { margin-top: 4px; }
table.data.cg-genes td.cg-prot { min-width: 140px; white-space: nowrap; }
.cg-mol { margin-top: 3px; font-size: 12.5px; }
table.data.cg-genes td[data-gc] { min-width: 170px; }
table.data.cg-genes td.cg-links { min-width: 170px; max-width: 260px; }
.cg-gcell .small { display: block; line-height: 1.35; }
@media (min-width: 1680px) { .dapps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* the top bar: one row where the dapps' names and a full search box fit beside each other (1440 px and
   wider); else two, the brand, search and buttons above and the dapps' names below; on a phone three */
:root { --at-top-h: 56px; }
.at-page table.data thead th { top: var(--at-top-h); }
.at-aside { top: calc(var(--at-top-h) + 16px); }
.at-chrom { scroll-margin-top: calc(var(--at-top-h) + 24px); }
@media (min-width: 881px) and (max-width: 1439px) {
  :root { --at-top-h: 97px; }
  .at-top { flex-wrap: wrap; height: auto; column-gap: 14px; row-gap: 0; }
  .at-brand { height: 56px; }
  .at-search { order: 2; max-width: 620px; margin-left: 28px; }
  .at-dapps-btn { order: 3; margin-left: auto; }
  .at-src { order: 4; }
  #theme { order: 5; }
  .at-nav { order: 6; flex-basis: 100%; height: 40px; margin: 0 -10px; overflow-x: auto; scrollbar-width: none; }
  .at-nav a { padding: 10px 10px 11px; }
}
@media (max-width: 640px) {
  /* the Clinical Gene Atlas on a phone: the sets two by two, the notice on one line with its mark */
  .cg-sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-sets a { justify-content: space-between; }
  .cg-sets a + a { border-left: 0; }
  .cg-sets a:nth-child(2n) { border-left: 1px solid var(--rule); }
  .cg-sets a:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .cg-notice { flex-wrap: nowrap; align-items: flex-start; }
  .cg-notice svg { margin-top: 2px; }
  .cg-viewbar .seg { flex-wrap: wrap; }
}
/* the page's summary for readers and crawlers that run no scripts; the atlas draws itself in its place */
.js .at-seo { display: none; }
.at-seo { color: var(--ink); }
.at-seo h1 { font-size: 30px; letter-spacing: -0.02em; line-height: 1.2; }
.at-seo h2 { font-size: 19px; margin: 26px 0 8px; }
.at-seo dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 18px 0; }
.at-seo dt { color: var(--ink-3); }
.at-seo dd { margin: 0; }
.at-seo ul { padding-left: 20px; }
.at-seo li { margin: 3px 0; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 1080px) {
  .fp-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 32px; }
  .fp-circle { width: min(100%, 460px); }
  .fp-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fp-facts > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .fp-facts > div:nth-child(n + 4) { border-top: 1px solid var(--rule-2); }
  .dapps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .at-split { grid-template-columns: minmax(0, 1fr); }
  /* a table wider than a narrow screen scrolls sideways in its block; its header row then scrolls with it */
  .at-page .scroll, .at-page .ch-scroll, .at-page .at-vscroll { overflow-x: auto; }
  .at-page table.data thead th { position: static; }
  .at-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
}
@media (max-width: 880px) {
  .at-top { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 8px 12px; }
  .at-nav { order: 6; width: 100%; overflow-x: auto; margin: 0 -16px; padding: 0 10px; scrollbar-width: none; }
  .at-search { order: 5; max-width: none; flex-basis: 100%; }
  .at-src { order: 3; }
  #theme { order: 4; }
  .fp-band, .fp-trust, .at-vgrid { grid-template-columns: 1fr; }
  .at-page, .fp { padding-left: 16px; padding-right: 16px; }
  .at-dapps-btn { order: 2; margin-left: auto; }
  .at-chrom-hint { display: none; }
}
@media (max-width: 640px) {
  .dapps, .fp-eds { grid-template-columns: minmax(0, 1fr); }
  .fp-layers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-layers > div { grid-template-columns: minmax(0, 1fr); padding: 13px 14px 14px; }
  .fp-layers strong, .fp-layers span { grid-column: 1; }
  .dapp { min-height: 0; }
}
@media (max-width: 560px) {
  .fp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-facts > div:nth-child(n) { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-2); }
  .fp-facts > div:nth-child(2n) { border-left: 1px solid var(--rule-2); padding-left: 14px; }
  .fp-facts > div:nth-child(-n + 2) { border-top: 0; }
  .at-src small, .at-src b { display: none; }
  .at-src { padding: 9px; }
  .at-brand span { font-size: var(--s-2); }
}
@media print {
  .at-top, .at-foot, .at-actions, .at-search { display: none !important; }
}

/* ---------------------------------------------------------------- alignments */
.alv { display: grid; gap: 6px; margin-top: 8px; }
.alv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.alv-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--s-2); color: var(--ink-2); cursor: pointer; }
.alv-nav { display: inline-flex; align-items: center; gap: 2px; }
.alv-nav .icon-btn { font-size: 17px; line-height: 1; width: 28px; height: 26px; }
.alv-where { font: 11.5px var(--font-data); margin-left: 6px; }
.alv-dl { margin-left: auto; display: inline-flex; gap: 6px; }
.alv-ov { width: 100%; height: 16px; display: block; cursor: pointer; touch-action: none; }
.alv-body { display: grid; grid-template-columns: max-content minmax(0, 1fr); border: 1px solid var(--rule-2); border-radius: 6px; background: var(--panel); overflow: hidden; }
.alv-names { border-right: 1px solid var(--rule-2); max-width: min(260px, 38vw); }
.alv-name { height: 17px; line-height: 17px; padding: 0 10px; font: 11.5px var(--font-data); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alv-name.ref { color: var(--ink); font-weight: 600; }
.alv-scroll { overflow-x: auto; overflow-y: hidden; min-width: 0; }
.alv-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.alv-spacer { position: relative; }
.alv-cv { position: sticky; left: 0; top: 0; display: block; }
.alv-foot { margin: 0; }

/* ---------------------------------------------------------------- the Align app */
.al-form { display: grid; gap: 16px; max-width: 1000px; }
.al-query, .al-subject { display: grid; gap: 4px; }
.al-query textarea, .al-subject textarea { width: 100%; padding: 10px 12px; font: 12.5px/1.45 var(--font-data); border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); color: var(--ink); resize: vertical; }
.al-query textarea:focus, .al-subject textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.al-kind { margin-left: 8px; font-weight: 500; color: var(--accent); }
.al-targets { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.al-targets legend { padding: 0; margin: 0 0 6px; font-size: var(--s-1); color: var(--ink-2); }
.al-target { position: relative; display: block; cursor: pointer; }
.al-target input { position: absolute; opacity: 0; pointer-events: none; }
.al-target span { display: grid; gap: 3px; height: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); }
.al-target small { color: var(--ink-3); font-size: var(--s-1); line-height: 1.35; }
.al-target:hover span { border-color: var(--ink-3); }
.al-target input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.al-target input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.al-target.off span { opacity: 0.5; }
.al-opts { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.al-opts [hidden] { display: none; }
.st-axis { display: flex; justify-content: space-between; margin: -2px 0 6px; font: 10.5px var(--font-data); color: var(--ink-3); }
.al-opts .al-subject { flex: 1 1 100%; }
.al-go { align-items: center; }
#al-out { margin-top: 22px; }
.al-hits tr[data-hit] { cursor: pointer; }
.al-hits tr.sel td { background: var(--accent-soft); }
.al-hits tr[data-hit]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.al-detail { margin-top: 18px; }
.al-detail .row { margin: 6px 0 10px; }
pre.pw { margin: 0; padding: 12px 14px; overflow-x: auto; font: 12px/1.5 var(--font-data); background: var(--panel); border: 1px solid var(--rule-2); border-radius: 6px; color: var(--ink); }
pre.pw b { color: var(--bad); font-weight: 700; }
pre.pw i { color: var(--ink-3); font-style: normal; }
.pw-n { color: var(--ink-2); }
.pw-c { color: var(--ink-3); }
.pw-m { color: var(--accent); }

/* ---------------------------------------------------------------- structures on GenesisL1 */
.st-lead { margin: 0 0 8px; line-height: 1.6; max-width: 84ch; }
.st-map { display: block; width: 100%; height: auto; margin: 4px 0 6px; }
.st-map .st-held, .st-legend .st-held { fill: var(--accent); background: var(--accent); }
.st-map .st-none { fill: var(--sunk); }
.st-map .st-chain, .st-legend .st-chain { fill: var(--ok); background: var(--ok); }
.st-map .st-ipfs, .st-legend .st-ipfs { fill: var(--ink-3); background: var(--ink-3); }
.st-map .st-pred, .st-legend .st-pred { fill: var(--nt-g); background: var(--nt-g); }
.st-map .st-var { stroke: var(--bad); stroke-width: 2; vector-effect: non-scaling-stroke; }
.st-legend .st-varkey { background: var(--bad); width: 3px !important; }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-2); margin: 0 0 4px; }
.st-legend i { display: inline-block; width: 18px; height: 7px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.st-h3 { margin: 18px 0 6px; font-size: var(--s-3); font-weight: 600; }
.st-more { margin-top: 12px; }
.st-more summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.st-cons { display: block; width: 100%; height: 34px; margin: 2px 0; }
.st-cons rect { fill: var(--accent); }
.st-vars td.lefty.small { white-space: normal; min-width: 160px; }
.linklike { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

@media (max-width: 720px) {
  .alv-dl { margin-left: 0; }
  .al-targets { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- structures in 3D (mol3d.mjs) */
.m3 { margin: 6px 0 18px; }
.m3:empty { display: none; }
.m3-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 14px; margin-bottom: 8px; }
.m3-pick { min-width: 0; flex: 1 1 320px; }
.m3-pick select { width: 100%; max-width: 640px; }
.m3-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m3-acts [aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.m3-stage { position: relative; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); overflow: hidden; }
.m3-canvas { display: block; width: 100%; height: clamp(320px, 56vh, 580px); touch-action: none; cursor: grab; }
.m3-canvas:active { cursor: grabbing; }
.m3-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.m3-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; pointer-events: none; }
.m3-msg[hidden] { display: none; }
.m3-tip { position: absolute; z-index: 2; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--panel); font-size: 12px; pointer-events: none; white-space: nowrap; }
.m3-info { margin: 6px 0 6px; color: var(--ink-2); line-height: 1.5; }
.m3-vlist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m3-v { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); color: var(--ink);
  font: 12px var(--font-data); cursor: pointer; }
.m3-v i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.m3-v:hover, .m3-v:focus-visible { border-color: var(--accent); }
