/* Transporter Variants: one stylesheet for both pages.
   Palette: cool lab-bench paper, deep slate ink, an amber lipid band for the
   membrane, and an eight-step crimson-to-teal evidence scale used everywhere a
   variant is coloured. */

:root {
  --paper: #f1f3f2;
  --surface: #ffffff;
  --sunk: #e6eae9;
  --ink: #17212a;
  --ink-2: #4b5961;
  --ink-3: #75828a;
  --rule: #cdd5d6;
  --lipid: #e7c56d;
  --lipid-head: #d5a943;
  --accent: #1c5d73;
  --accent-soft: #d6e7ec;
  --warn: #8a5a00;
  --warn-soft: #fbefd2;

  --pvs: #6e0e2e; --ps: #a61e44; --pm: #d2556f; --pp: #e9a0ae;
  --ind: #bfc4c7;
  --bp: #a7c7d8; --bm: #5b97b8; --bs: #1f567a;

  --act-lo: #3b1f5e; --act-mid: #9a5aa8; --act-hi: #ece4f0;
  --mech-expr: #b7791f; --mech-act: #2e7d5b;
  --dim3d: #d6dbde; --hl: #e3a008;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Consolas, monospace;

  --s-1: 0.8125rem; --s0: 1rem; --s1: 1.25rem; --s2: 1.5625rem; --s3: 1.953rem;
  --s4: 2.441rem; --s5: 3.052rem;
  --wrap: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f171c; --surface: #152026; --sunk: #1b2a31;
    --ink: #e3e9ea; --ink-2: #a3b1b6; --ink-3: #7d8c92; --rule: #2b3b42;
    --lipid: #8a6f2c; --lipid-head: #b89442;
    --accent: #7cc1d6; --accent-soft: #1d3b46;
    --warn: #f0c46a; --warn-soft: #3a2f16;
    --pvs: #ff7a98; --ps: #e8476d; --pm: #b8435e; --pp: #7e3a4c;
    --ind: #59656b;
    --bp: #3a5d70; --bm: #3f86ad; --bs: #6fb6de;
    --act-lo: #c58be0; --act-mid: #7d4c92; --act-hi: #2c2434;
    --mech-expr: #e0a54a; --mech-act: #5cc293; --dim3d: #3a474d; --hl: #f5b82e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f171c; --surface: #152026; --sunk: #1b2a31;
  --ink: #e3e9ea; --ink-2: #a3b1b6; --ink-3: #7d8c92; --rule: #2b3b42;
  --lipid: #8a6f2c; --lipid-head: #b89442;
  --accent: #7cc1d6; --accent-soft: #1d3b46;
  --warn: #f0c46a; --warn-soft: #3a2f16;
  --pvs: #ff7a98; --ps: #e8476d; --pm: #b8435e; --pp: #7e3a4c;
  --ind: #59656b;
  --bp: #3a5d70; --bm: #3f86ad; --bs: #6fb6de;
  --act-lo: #c58be0; --act-mid: #7d4c92; --act-hi: #2c2434;
  --mech-expr: #e0a54a; --mech-act: #5cc293; --dim3d: #3a474d; --hl: #f5b82e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
h2 { font-size: var(--s3); letter-spacing: -0.01em; }
h3 { font-size: var(--s1); font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.prose { max-width: 66ch; }
.prose p { font-size: 1.0625rem; line-height: 1.62; }
.muted { color: var(--ink-2); }
.small { font-size: var(--s-1); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; white-space: nowrap; }
.wordmark svg { flex: none; }
.topbar nav { display: flex; gap: 20px; margin-left: auto; }
.topbar nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.topbar nav a:hover { color: var(--ink); }
.topbar .search { flex: 1 1 360px; max-width: 420px; }
@media (max-width: 860px) {
  .topbar .wrap { gap: 6px 12px; flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; }
  .topbar nav { order: 3; width: 100%; margin-left: 0; gap: 18px; overflow-x: auto; }
  .topbar nav a { font-size: 0.9rem; white-space: nowrap; padding: 2px 0; }
  .topbar .search { flex: 1 1 200px; }
}
@media (max-width: 480px) { .topbar .wrap:has(.search) .wordmark span { display: none; } }
@media (max-width: 860px) { .doc section, section.band { scroll-margin-top: 110px; } }

/* ---------- search ---------- */
.search { position: relative; }
.search input {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px 8px 36px;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search .glass { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-lg input { font-size: 1.125rem; padding: 14px 16px 14px 44px; border-radius: 8px; }
.search-lg .glass { left: 15px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 30px -12px rgb(10 30 40 / 0.35);
  list-style: none; margin: 0; padding: 4px; z-index: 40; max-height: 60vh; overflow: auto;
}
.suggest li { padding: 8px 10px; border-radius: 5px; cursor: pointer; display: flex; gap: 12px; align-items: baseline; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--accent-soft); }
.suggest .sym { font-weight: 700; min-width: 6.5em; }
.suggest .nm { color: var(--ink-2); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .hint { color: var(--ink-3); font-size: var(--s-1); margin-left: auto; white-space: nowrap; }
.suggest .msg { color: var(--ink-2); cursor: default; }
.suggest .msg:hover { background: none; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px 56px; align-items: start; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.3rem); letter-spacing: -0.02em; font-weight: 500; }
.hero .lede { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; margin: 0 0 20px; line-height: 1.55; }
.hero .search { max-width: 620px; }
.hero .examples { margin: 10px 0 0; color: var(--ink-3); font-size: 0.92rem; }
.hero-figure { margin: 36px 0 0; }
.hero-figure .mapbox { min-height: calc(min(100vw - 48px, 1132px) * 0.273 + 48px); }
@media (max-width: 760px) { .hero-figure .mapbox { min-height: 0; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 32px; } }
.hero-figure figcaption { color: var(--ink-2); font-size: 0.92rem; max-width: 80ch; margin-top: 6px; }

/* ---------- sections ---------- */
section.band { padding: 72px 0; border-top: 1px solid var(--rule); }
section.band h2 { margin-bottom: 18px; max-width: 26ch; }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; gap: 28px; } section.band { padding: 52px 0; } }

/* coverage bar */
.cov { margin-top: 8px; }
.cov-bar { display: flex; height: 46px; border-radius: 4px; overflow: hidden; background: var(--sunk); }
.cov-bar > div { position: relative; min-width: 1px; }
.cov-bar .am { background: repeating-linear-gradient(135deg, var(--paper) 0 2px, transparent 2px 7px); position: absolute; inset: 0 auto 0 0; opacity: 0.7; }
.cov-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 18px; margin-top: 14px; font-size: 0.9rem; }
.cov-legend span.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.cov-legend b { font-weight: 600; }
.cov-note { display: flex; gap: 10px; align-items: center; margin-top: 18px; color: var(--ink-2); font-size: 0.92rem; }
.cov-note i { display: inline-block; width: 26px; height: 12px; background: repeating-linear-gradient(135deg, var(--paper) 0 2px, transparent 2px 7px), var(--ink-2); border: 1px solid var(--rule); }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 34px; border-top: 1px solid var(--rule); }
.figures > div { padding: 16px 18px 0 0; }
.figures b { display: block; font-family: var(--serif); font-size: var(--s3); font-weight: 500; line-height: 1.1; }
.figures span { color: var(--ink-2); font-size: 0.92rem; }
@media (max-width: 640px) { .figures { grid-template-columns: 1fr 1fr; } }

/* calibration */
.cal { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cal th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: var(--s-1); padding: 0 8px 8px 0; border-bottom: 1px solid var(--rule); }
.cal td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.cal td.n, .cal th.n { text-align: right; width: 5.5em; }
.cal td.pct { text-align: right; width: 4.5em; font-weight: 600; }
.cal .barcell { width: 46%; }
.cal .track { position: relative; height: 14px; background: var(--sunk); border-radius: 2px; }
.cal .fill { position: absolute; inset: 0 auto 0 0; border-radius: 2px; }
.cal .base { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px dashed var(--ink-2); }
.cal caption { caption-side: bottom; text-align: left; color: var(--ink-2); font-size: 0.88rem; padding-top: 10px; }
@media (max-width: 640px) { .cal .barcell { display: none; } }

/* evidence chip */
.ev { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.9rem; }
.ev::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.ev.strong-label { font-weight: 600; }

/* caveats */
.caveats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 10px; }
.caveats > div { padding: 18px 0; border-top: 1px solid var(--rule); }
.caveats h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.caveats p { color: var(--ink-2); margin: 0; max-width: 56ch; }
@media (max-width: 760px) { .caveats { grid-template-columns: 1fr; } }

/* browse */
.browse-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 18px; }
.browse-tools input { font: inherit; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); width: 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 0.88rem; color: var(--ink-2); background: transparent; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px; padding: 4px 11px; display: inline-flex; gap: 6px; align-items: center;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .ct { opacity: 0.7; font-size: 0.82rem; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.genes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.genes a { background: var(--surface); padding: 10px 12px 11px; text-decoration: none; color: var(--ink); display: block; min-width: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.genes a:hover { background: var(--accent-soft); }
.genes .g { font-weight: 700; }
.genes .n { float: right; color: var(--ink-3); font-size: var(--s-1); }
.genes .p { display: block; color: var(--ink-2); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minibar { display: flex; height: 5px; margin-top: 7px; border-radius: 1px; overflow: hidden; background: var(--sunk); }
.minibar > i { display: block; height: 100%; }
.more { margin-top: 14px; }
.btn {
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 6px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
}
.btn:hover { filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink-3); filter: none; }

/* downloads */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dl article { background: var(--surface); border: 1px solid var(--rule); padding: 26px 26px 24px; border-radius: 4px; display: flex; flex-direction: column; }
.dl article.routed { border-top: 4px solid var(--warn); }
.dl article.native { border-top: 4px solid var(--accent); }
.dl h2 { font-size: var(--s2); font-weight: 500; }
.lic { margin: 12px 0 14px; padding: 12px 14px; border-radius: 4px; font-size: 0.95rem; }
.native .lic { background: var(--accent-soft); }
.routed .lic { background: var(--warn-soft); }
.lic b { display: block; font-size: 1.05rem; }
.dl ul { padding-left: 1.1em; margin: 0 0 18px; color: var(--ink-2); }
.dl li { margin-bottom: 4px; }
.dl .btn { align-self: flex-start; margin-top: auto; }
.dl .sha { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); word-break: break-all; margin-top: 12px; }
.docs-links { margin-top: 22px; color: var(--ink-2); }
.docs-links a { margin-right: 14px; white-space: nowrap; }
@media (max-width: 820px) { .dl { grid-template-columns: 1fr; } }

/* columns reference */
.coltable { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin-top: 8px; }
.coltable td { border-top: 1px solid var(--rule); padding: 8px 14px 8px 0; vertical-align: top; }
.coltable td:first-child { white-space: nowrap; font-family: var(--mono); font-size: 0.85rem; }
.coltable td.which { color: var(--ink-3); white-space: nowrap; font-size: 0.85rem; }
@media (max-width: 640px) {
  .coltable, .coltable tbody, .coltable tr, .coltable td { display: block; }
  .coltable tr { border-top: 1px solid var(--rule); padding: 8px 0; }
  .coltable td { border: 0; padding: 1px 0; }
  .coltable td:first-child { white-space: normal; overflow-wrap: anywhere; font-weight: 600; }
}

/* cite */
.cite { background: var(--surface); border-left: 3px solid var(--accent); padding: 16px 20px; font-size: 1rem; max-width: 72ch; }
.cite + .cite { margin-top: 12px; }

/* home: key facts */
section.band.tight { padding: 30px 0 34px; }
.facts-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 40px; font-size: 1.02rem; color: var(--ink-2); }
.facts-row b { color: var(--ink); font-weight: 700; font-size: 1.18rem; margin-right: 4px; }
.startnote { margin: 16px 0 0; color: var(--ink-2); }
.section-intro { margin: -6px 0 18px; max-width: 70ch; }

/* top-bar current page */
.topbar nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* documentation pages */
.page { padding-top: 44px; }
.page h1, .doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.015em; margin-bottom: 12px; }
.lede-sm { font-size: 1.1rem; color: var(--ink-2); max-width: 66ch; margin-bottom: 30px; }
.pg-h2 { font-size: var(--s2); margin: 52px 0 14px; }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 80px; }
.toc { position: sticky; top: 84px; align-self: start; font-size: 0.93rem; }
.toc-h { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.doc { max-width: 74ch; }
.doc section { padding-top: 28px; margin-top: 18px; border-top: 1px solid var(--rule); scroll-margin-top: 70px; }
.doc section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.doc h2 { font-size: var(--s2); margin-bottom: 14px; }
.doc h3 { margin-bottom: 8px; }
.doc p { line-height: 1.65; }
.doc .cal { margin: 8px 0 16px; }
.doc .cal .barcell { width: 30%; }
#caltable td:last-child, #caltable th:last-child { white-space: nowrap; padding-left: 14px; }
.code { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); margin-top: 2px; }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
#thrtable .ev { font-size: 0.8rem; white-space: normal; }
#thrtable td:first-child { white-space: nowrap; }
.callout { background: var(--warn-soft); border-left: 3px solid var(--warn); padding: 14px 18px; margin: 18px 0; border-radius: 0 4px 4px 0; }
.callout p { margin: 0; }
.warn-t { color: var(--warn); font-weight: 600; }
.deflist { margin: 10px 0 18px; }
.deflist dt { font-weight: 700; margin-top: 16px; }
.deflist dd { margin: 4px 0 0; color: var(--ink-2); line-height: 1.6; }
ul.plain { padding-left: 1.2em; margin: 8px 0 16px; }
ul.plain li { margin-bottom: 8px; line-height: 1.6; }
.cite, .doc code, .page code, .dl li { overflow-wrap: anywhere; }
.xscroll { overflow-x: auto; }
@media (max-width: 640px) {
  #caltable td:last-child, #caltable th:last-child { white-space: normal; padding-left: 8px; }
  .cal .ev { white-space: normal; }
  .cal td, .cal th { font-size: 0.86rem; }
}
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px 14px; border-left: 0; }
  .toc li a { padding: 2px 0; border-left: 0; }
}

footer { border-top: 1px solid var(--rule); padding: 36px 0 60px; color: var(--ink-2); font-size: 0.9rem; }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
footer p { max-width: 70ch; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; } }

/* ---------- gene page ---------- */
.ghead { padding-top: 40px; padding-bottom: 6px; }
.ghead .fam { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 6px; }
.ghead .fam a { color: inherit; }
.ghead h1 { font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.ghead .pname { font-family: var(--serif); font-size: var(--s2); font-style: italic; color: var(--ink-2); margin-top: 6px; }
.ghead .facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; color: var(--ink-2); font-size: 0.95rem; }
.ghead .facts b { color: var(--ink); font-weight: 600; }
.ghead-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }

.trackbar { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 1px solid var(--rule); border-radius: 7px; padding: 3px; background: var(--paper); }
.seg button { font: inherit; font-size: 0.92rem; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgb(0 0 0 / 0.14); }
.seg button small { font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.trackbar .tnote { flex: 1 1 320px; font-size: 0.9rem; color: var(--ink-2); margin: 0; }

.evbar-h { margin: 22px 0 6px; font-size: 0.9rem; color: var(--ink-2); }
.evbar { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: var(--sunk); }
.evbar > i { display: block; }
.evlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 0.85rem; color: var(--ink-2); }

.panel { margin-top: 34px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 12px; }
.panel-head h2 { font-size: var(--s2); }
.panel-head p { margin: 0; color: var(--ink-2); font-size: 0.92rem; max-width: 70ch; }

/* protein map */
.mapbox { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
.map-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.map-controls label { font-size: 0.88rem; color: var(--ink-2); }
.map-controls .seg button { font-size: 0.86rem; padding: 5px 10px; }
.tag-exp { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 1px 6px; border-radius: 3px; margin-left: 5px; vertical-align: 1px; }
.wave { position: relative; padding: 4px 0 0; }
.wave svg { display: block; width: 100%; height: auto; touch-action: pan-x pan-y; user-select: none; }
.swipe-hint { display: none; }
@media (max-width: 760px) { .mol .molhint .more { display: none; } }
@media (max-width: 760px) {
  .wave { overflow-x: auto; overscroll-behavior-x: contain; }
  .wave svg { min-width: 760px; }
  .swipe-hint { display: block; margin: 4px 14px 0; font-size: 0.82rem; color: var(--ink-3); }
}
.wave .tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 0.82rem;
  padding: 7px 10px; border-radius: 5px; max-width: 300px; line-height: 1.4; z-index: 5; display: none;
}
.wave .tip b { font-weight: 700; }
.wave .zl { font: 600 11px var(--sans); fill: var(--ink-3); }
.wave .tick { font: 400 10.5px var(--sans); fill: var(--ink-3); text-anchor: middle; }
.wave .axis { stroke: var(--rule); stroke-width: 1; }
.wave .helix { fill: var(--surface); opacity: 0.38; }
.wave .tmn { font: 700 10.5px var(--sans); fill: var(--ink-2); text-anchor: middle; }
.fs { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.fs.act { fill: var(--ink); stroke: var(--surface); stroke-width: 1; }
.wave .vdots circle { stroke: var(--surface); stroke-width: 0.8; }
.wave .selline { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.6; }
.wave .selring { fill: none; stroke: var(--ink); stroke-width: 2; }
.wave .dom { fill: var(--sunk); stroke: var(--rule); }
.wave .motif { fill: var(--ink-2); }
.wave .domt { font: 600 11px var(--sans); fill: var(--ink-2); }
.wave .brush { fill: var(--accent); opacity: 0.12; }
.wave .partband { fill: var(--hl); opacity: 0.22; }
.wave .partedge { stroke: var(--hl); stroke-width: 2; }
.parthint { display: flex; gap: 8px; align-items: baseline; font-size: 0.86rem; color: var(--ink-2); margin: 0 0 8px; }
.sw-part { flex: none; width: 12px; height: 12px; border-radius: 2px; background: var(--hl); transform: translateY(1px); }
.mol .molreset { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 5px 11px; font-size: 0.85rem; background: var(--surface); }
.map-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding: 8px 14px 12px; font-size: 0.84rem; color: var(--ink-2); }
.scale { display: inline-flex; align-items: center; gap: 8px; margin-right: 18px; }
.scale .ramp { width: 160px; height: 10px; border-radius: 2px; }
.map-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); border-top: 1px solid var(--rule); }
.mol { position: relative; min-height: 440px; background: var(--paper); }
.mol .viewer { position: absolute; inset: 0; }
.mol .molmsg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--ink-2); font-size: 0.95rem; }
.mol .molhint { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: 0.78rem; color: var(--ink-2); pointer-events: none; background: color-mix(in srgb, var(--paper) 85%, transparent); padding: 4px 8px; border-radius: 4px; }
.resinfo { padding: 18px 20px; border-left: 1px solid var(--rule); font-size: 0.93rem; overflow: auto; max-height: 520px; }
.resinfo h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.resinfo .empty { color: var(--ink-2); }
.resinfo dl { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 5px 12px; margin: 8px 0 12px; }
.resinfo dt { color: var(--ink-3); }
.resinfo dd { margin: 0; }
.resinfo ul { list-style: none; padding: 0; margin: 6px 0 0; }
.resinfo li { padding: 5px 0; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 10px; }
.hot { margin-top: 14px; }
.hot li { cursor: pointer; }
.hot li:hover { color: var(--accent); }
@media (max-width: 900px) { .map-split { grid-template-columns: 1fr; } .resinfo { border-left: 0; border-top: 1px solid var(--rule); max-height: none; } .mol { min-height: 360px; } }

/* variant table */
.filters { display: grid; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; border-radius: 6px 6px 0 0; }
.filters .row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.filters .lbl { font-size: 0.85rem; color: var(--ink-3); min-width: 6.5em; }
.filters input[type="search"] { font: inherit; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); width: 340px; max-width: 100%; }
.check { display: inline-flex; gap: 7px; align-items: center; font-size: 0.92rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.active-filter { display: inline-flex; gap: 6px; align-items: center; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 0.88rem; }
.active-filter button { border: 0; background: transparent; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: 50%; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); }
table.vt { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 980px; }
.vt th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.82rem; padding: 10px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.vt th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.vt th button[data-dir]::after { content: "▲"; font-size: 0.65rem; }
.vt th button[data-dir="desc"]::after { content: "▼"; }
.vt th .sub { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.74rem; }
.vt td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.vt tr.v { cursor: pointer; }
.vt tr.v:hover td { background: var(--paper); }
.vt tr.v.open td { background: var(--accent-soft); }
.vt tr.hl td { box-shadow: inset 0 0 0 9999px rgb(231 197 109 / 0.22); }
.vt td.vcell { min-width: 21ch; max-width: 34ch; }
.vt .hg { font-family: var(--mono); font-size: 0.84rem; overflow-wrap: anywhere; }
.vt .pp { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.vt .rs { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); }
.vt .num { text-align: right; white-space: nowrap; }
.vt .sc { color: var(--ink-3); }
.vt .exp { color: var(--ink-2); font-style: italic; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 3px; padding: 1px 6px; margin: 2px 4px 0 0; white-space: nowrap; }
.badge.train { background: var(--warn-soft); color: var(--warn); }
.badge.noam { background: var(--sunk); color: var(--ink-2); }
.badge.am { background: var(--accent-soft); color: var(--accent); }
.badge.lis { background: var(--sunk); color: var(--ink-2); }
.vt tr.det td { background: var(--paper); padding: 16px 18px 18px; }
.det-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 30px; }
.det-grid dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 0.88rem; }
.det-grid dt { color: var(--ink-3); }
.det-grid dd { margin: 0; word-break: break-word; }
.det-grid h4 { margin: 0 0 6px; font-size: 0.86rem; }
.det-note { margin-top: 12px; font-size: 0.86rem; color: var(--ink-2); max-width: 90ch; }
.pager { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 6px 6px; font-size: 0.9rem; color: var(--ink-2); }
.pager .pg { display: flex; gap: 6px; align-items: center; }
.pager button { font: inherit; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 5px; padding: 4px 10px; cursor: pointer; }
.pager button:disabled { opacity: 0.4; cursor: default; }
.notice { padding: 12px 14px; border-radius: 5px; background: var(--warn-soft); color: var(--ink); font-size: 0.92rem; margin-top: 14px; }
.notice b { color: var(--warn); }
.loading { padding: 80px 0; color: var(--ink-2); }

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