/* ==========================================================================
   Skill to Gene — an annotated guide to arXiv:2604.15097
   Manuscript/journal design system. Zero JS. Light mode only.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --paper: #f7f3ea;
  --paper-raised: #fcfaf4;
  --paper-deep: #efe8d8;
  --ink: #23201a;
  --ink-2: #57503f;
  --ink-3: #6f6550;
  --accent: #8f2d1e;
  --accent-deep: #6e2013;
  --accent-wash: #f2e2da;
  --rule: #ddd3bf;
  --rule-strong: #2a261e;
  --gene-bg: #eee7d5;
  --bar-neutral: #9c8d6f;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --prose-max: 72ch;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
}

::selection { background: var(--accent); color: var(--paper-raised); }

img, svg { max-width: 100%; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 8px 14px; z-index: 99; font-family: var(--mono); font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- masthead ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.topbar .container {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 7px; padding-bottom: 7px;
  min-width: 0;
}
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--accent-deep); }

.brand-row .container {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; padding-top: 26px; padding-bottom: 22px;
  flex-wrap: wrap; min-width: 0;
}
.brand {
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.04;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand .arrow { color: var(--accent); font-weight: 500; }
.brand-sub {
  font-style: italic;
  color: var(--ink-2);
  font-size: 15.5px;
  margin-top: 6px;
  max-width: 56ch;
}
.brand-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.7;
  white-space: nowrap;
}
.brand-id strong { color: var(--accent-deep); font-weight: 500; }

.site-nav {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper-raised);
}
.site-nav .container {
  display: flex; flex-wrap: wrap; gap: 2px 22px;
  padding-top: 0; padding-bottom: 0; min-width: 0;
}
.site-nav a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent-deep); }
.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--rule); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 48px;
  padding: 54px 0 46px;
  min-width: 0;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 18px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 26px; height: 2px;
  background: var(--accent);
  vertical-align: 4px;
  margin-right: 12px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 18px;
}
.hero h1 em { font-style: italic; font-weight: 500; color: var(--accent-deep); }
.hero .deck {
  font-size: 19.5px;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 20px;
  max-width: 34em;
}
.hero .lede { margin: 0; max-width: 62ch; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  margin-top: 26px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.03em;
}

/* paper card */
.paper-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 26px 28px 22px;
  align-self: start;
  min-width: 0;
}
.paper-card .pc-kind {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px;
}
.paper-card h2 {
  font-size: 21.5px; line-height: 1.3; font-weight: 600;
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.paper-card .pc-authors { font-style: italic; color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
.paper-card dl {
  margin: 0 0 18px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
}
.paper-card dl > div {
  display: flex; gap: 12px; justify-content: space-between;
  padding: 6.5px 0; border-bottom: 1px solid var(--rule); min-width: 0;
}
.paper-card dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); padding-top: 3px; white-space: nowrap; }
.paper-card dd { margin: 0; text-align: right; color: var(--ink-2); min-width: 0; }
.pc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  padding: 7px 13px;
  color: var(--ink);
  background: var(--paper);
}
.pc-links a:hover { background: var(--ink); color: var(--paper); }
.pc-links a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pc-links a.primary:hover { background: var(--accent-deep); }

/* stat strip */
.stat-strip { border-bottom: 1px solid var(--rule); background: var(--paper-raised); }
.stat-strip .container {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-top: 0; padding-bottom: 0; min-width: 0;
}
.stat {
  padding: 20px 20px 18px;
  border-left: 1px solid var(--rule);
  min-width: 0;
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat .n {
  font-size: 27px; font-weight: 600; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.stat .n .u { font-size: 16px; font-weight: 500; color: var(--ink-2); }
.stat .cap { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
.stat .n.acc { color: var(--accent-deep); }

/* ---------- prose ---------- */
main { padding-bottom: 8px; }
.section { padding: 52px 0 8px; }
.prose { max-width: var(--prose-max); }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-of-type { font-size: 18.5px; }
h2.sec {
  font-size: 27px; font-weight: 600; letter-spacing: -0.012em;
  line-height: 1.22;
  margin: 0 0 8px;
}
.overline {
  display: block;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 10px;
}
.overline::before {
  content: ""; display: block; width: 34px; height: 2px;
  background: var(--accent); margin-bottom: 10px;
}
h3 { font-size: 19.5px; font-weight: 600; margin: 1.9em 0 0.5em; letter-spacing: -0.008em; }
h2.sub-h { font-size: 19.5px; font-weight: 600; margin: 1.9em 0 0.5em; letter-spacing: -0.008em; }
.byline {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 14px 0 6px;
}
.byline a { color: inherit; }
.byline a:hover { color: var(--accent-deep); }
.section-head { max-width: var(--prose-max); margin-bottom: 22px; }

/* two-col prose + sidenote */
.duo {
  display: grid;
  grid-template-columns: minmax(0, var(--prose-max)) minmax(220px, 300px);
  gap: 44px;
  justify-content: space-between;
  align-items: start;
}
.duo > * { min-width: 0; }
.gep-wrap > *, .distill > * { min-width: 0; }
.table-scroll { max-width: 100%; }
.booktabs.wrap td, .booktabs.wrap th { white-space: normal; }
.booktabs.wrap td:first-child { white-space: normal; }
.sidenote {
  font-size: 14px; line-height: 1.6; color: var(--ink-2);
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  margin: 4px 0 22px;
}
.sidenote .sn-no { font-family: var(--mono); font-size: 11px; color: var(--accent-deep); letter-spacing: 0.08em; display: block; margin-bottom: 3px; }
.sidenote p { margin: 0 0 0.7em; }
.sidenote p:last-child { margin-bottom: 0; }

/* blockquote (abstract) */
.paper-quote {
  border-top: 2px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
  padding: 26px 30px 20px;
  margin: 26px 0;
  max-width: none;
}
.paper-quote p {
  font-size: 18px; font-style: italic; line-height: 1.66;
  margin: 0 0 10px; color: var(--ink);
}
.paper-quote cite {
  display: block; font-style: normal;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ---------- figures ---------- */
.fig {
  margin: 34px 0;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule-strong);
  padding: 26px 28px 18px;
  min-width: 0;
}
.fig figcaption {
  border-top: 1px solid var(--rule);
  margin-top: 20px; padding-top: 12px;
  font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
}
.fig figcaption strong { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink); font-weight: 600; }

/* ---------- booktabs tables ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
table.booktabs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.booktabs caption {
  caption-side: top; text-align: left;
  font-size: 13px; color: var(--ink-2); font-style: italic;
  padding-bottom: 9px;
}
.booktabs thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-2);
  border-top: 2px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 8px 12px;
  text-align: right;
}
.booktabs thead th:first-child { text-align: left; }
.booktabs tbody td {
  padding: 7.5px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  color: var(--ink-2);
  white-space: nowrap;
}
.booktabs tbody td:first-child { text-align: left; color: var(--ink); white-space: normal; }
.booktabs tbody tr:last-child td { border-bottom: 2px solid var(--rule-strong); }
.booktabs td.best { color: var(--accent-deep); font-weight: 600; }
.booktabs td.worst { color: var(--ink); }
.booktabs .sub { font-size: 12px; color: var(--ink-3); }
.tbl-note { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.55; }
.tbl-note + .tbl-note { margin-top: 3px; }
tr.hl td { background: var(--accent-wash); }

/* ---------- gene card ---------- */
.gene-card {
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.75;
  background: var(--gene-bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 18px 0;
  overflow-x: auto;
  white-space: pre;
  color: var(--ink);
}
.gene-card .g-tag { color: var(--accent-deep); font-weight: 600; }
.gene-card .g-avoid { color: var(--accent-deep); }
.code-block {
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.75;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 16px 20px;
  margin: 18px 0;
  overflow-x: auto;
  white-space: pre;
  color: var(--ink-2);
}

/* ---------- figure 1: distillation animation ---------- */
.distill {
  display: grid;
  grid-template-columns: 1.06fr 74px 0.94fr;
  gap: 0;
  align-items: stretch;
  min-width: 0;
}
.d-side { min-width: 0; }
.d-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 12px; line-height: 1.5;
}
.d-label strong { color: var(--ink-2); font-weight: 600; }
.d-doc {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 14px 16px;
}
.d-line {
  display: block;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--ink-2);
  background: var(--paper-deep);
  border-left: 2px solid var(--rule);
  padding: 6px 10px; margin: 5px 0;
  position: relative;
}
.d-line.noise { color: var(--ink-3); border-left-color: var(--paper-deep); }
.d-line.key { border-left-color: var(--accent); color: var(--ink); background: var(--accent-wash); }
.d-note {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  margin-top: 12px; letter-spacing: 0.04em;
}
.d-note.acc { color: var(--accent-deep); }
.d-mid {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 0 6px; min-width: 0;
}
.d-mid svg { overflow: visible; }
.d-mid .d-beam {
  stroke-dasharray: 6 6;
}
.d-midcap {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
  writing-mode: vertical-rl;
}
.gene-card.mini { margin: 0; white-space: normal; font-size: 12px; line-height: 1.7; }
.gene-card.mini .g-field { display: block; overflow-wrap: anywhere; }
.gene-card.mini .g-step { padding-left: 16px; }

/* animation: shared 11s cycle */
@keyframes lineFlash {
  0%, 7%   { background: var(--paper-deep); }
  10%, 16% { background: #fff; box-shadow: 0 0 0 1px var(--rule); }
  22%, 100%{ background: var(--paper-deep); }
}
@keyframes lineFlashKey {
  0%, 7%   { background: var(--accent-wash); }
  10%, 16% { background: #f7d9cd; }
  24%, 100%{ background: var(--accent-wash); }
}
@keyframes beamRun {
  0%, 30%  { stroke-dashoffset: 0; opacity: 0.35; }
  33%      { opacity: 1; }
  48%      { stroke-dashoffset: -48; opacity: 1; }
  58%, 100%{ stroke-dashoffset: -48; opacity: 0.35; }
}
@keyframes fieldIn {
  0%, 40%  { opacity: 0.25; }
  50%, 88% { opacity: 1; }
  100%     { opacity: 0.25; }
}
@keyframes cardPulse {
  0%, 46%  { border-left-color: var(--accent); }
  52%, 92% { border-left-color: var(--accent-deep); box-shadow: -2px 0 0 0 var(--accent-deep); }
  100%     { border-left-color: var(--accent); box-shadow: none; }
}
.distill.live .d-line   { animation: lineFlash 11s infinite; }
.distill.live .d-line.key { animation: lineFlashKey 11s infinite; }
.distill.live .d-line:nth-child(1) { animation-delay: 0.12s; }
.distill.live .d-line:nth-child(2) { animation-delay: 0.24s; }
.distill.live .d-line:nth-child(3) { animation-delay: 0.36s; }
.distill.live .d-line:nth-child(4) { animation-delay: 0.48s; }
.distill.live .d-line:nth-child(5) { animation-delay: 0.6s; }
.distill.live .d-line:nth-child(6) { animation-delay: 0.72s; }
.distill.live .d-line:nth-child(7) { animation-delay: 0.84s; }
.distill.live .d-beam { animation: beamRun 11s infinite; }
.distill.live .g-field { animation: fieldIn 11s infinite; }
.distill.live .gene-card { animation: cardPulse 11s infinite; }
.distill.live .g-field:nth-child(2) { animation-delay: 4.55s; }
.distill.live .g-field:nth-child(3) { animation-delay: 4.75s; }
.distill.live .g-field:nth-child(4) { animation-delay: 4.95s; }
.distill.live .g-field:nth-child(5) { animation-delay: 5.15s; }
.distill.live .g-field:nth-child(6) { animation-delay: 5.35s; }
.distill.live .g-field:nth-child(7) { animation-delay: 5.55s; }

/* ---------- figure 3: GEP wheel ---------- */
.gep-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(240px, 1fr); gap: 40px; align-items: center; min-width: 0; }
.gep-wheel {
  position: relative;
  width: 340px; height: 340px;
  margin: 8px auto;
}
.gep-ring {
  position: absolute; inset: 34px;
  border: 1.5px solid var(--rule);
  border-radius: 50%;
}
.gep-ring::after {
  content: "";
  position: absolute; inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  animation: wheelSpin 11s linear infinite;
}
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.gep-node {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translate(0, -128px) rotate(calc(var(--i) * -60deg));
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 7px 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.gep-node::before {
  content: counter(gep) ". ";
  counter-increment: gep;
  color: var(--accent-deep);
  font-weight: 600;
}
.gep-wheel { counter-reset: gep; }
@keyframes nodePulse {
  0%, 11%  { background: var(--paper-deep); color: var(--ink-2); border-color: var(--rule); }
  15%, 24% { background: var(--accent); color: #fff; border-color: var(--accent-deep); }
  29%, 100%{ background: var(--paper-deep); color: var(--ink-2); border-color: var(--rule); }
}
.gep-live .gep-node { animation: nodePulse 10.8s infinite; animation-delay: calc(var(--i) * 1.8s); }
.gep-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
  font-size: 13px; font-style: italic; color: var(--ink-3);
  width: 130px; line-height: 1.45;
}
.gep-steps { list-style: none; margin: 0; padding: 0; }
.gep-steps li {
  padding: 9px 0 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  min-width: 0;
}
.gep-steps li:last-child { border-bottom: none; }
.gep-steps .st-name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--accent-deep); font-weight: 600; padding-top: 2px; }
.gep-steps .st-desc { color: var(--ink-2); }

/* ---------- figure 2: dot plot ---------- */
.dotplot { margin: 4px 0 0; }
.dp-axis {
  position: relative; height: 0;
  border-top: 1px solid var(--rule-strong);
  margin: 0 8px;
}
.dp-ticks { position: relative; height: 16px; margin: 6px 8px 0; }
.dp-ticks span {
  position: absolute;
  left: calc((var(--tv) - 44) / (58 - 44) * 100%);
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
}
.dp-ticks span:first-child { transform: none; }
.dp-ticks span:last-child { transform: translateX(-100%); }
.dp-row {
  display: grid;
  grid-template-columns: 200px 1fr 64px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  min-width: 0;
}
.dp-name { font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.dp-name small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; }
.dp-lane { position: relative; height: 22px; min-width: 0; }
.dp-lane::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--rule);
}
.dp-base {
  position: absolute; top: -2px; bottom: -2px; left: calc((51.0 - 44) / (58 - 44) * 100%);
  width: 1.5px; background: var(--ink-3);
}
.dp-dot {
  position: absolute; top: 50%; left: calc((var(--v) - 44) / (58 - 44) * 100%);
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bar-neutral);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--paper-raised);
}
.dp-dot.em { background: var(--accent); }
.dp-val {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  text-align: right; font-variant-numeric: tabular-nums;
}
.dp-val.em { color: var(--accent-deep); font-weight: 600; }
.dp-note { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin: 10px 0 0 8px; letter-spacing: 0.04em; }
@keyframes dotIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.dotplot.live .dp-dot { animation: dotIn 0.5s both; }
.dotplot.live .dp-row:nth-child(1) .dp-dot { animation-delay: 0.05s; }
.dotplot.live .dp-row:nth-child(2) .dp-dot { animation-delay: 0.18s; }
.dotplot.live .dp-row:nth-child(3) .dp-dot { animation-delay: 0.31s; }
.dotplot.live .dp-row:nth-child(4) .dp-dot { animation-delay: 0.44s; }
.dotplot.live .dp-row:nth-child(5) .dp-dot { animation-delay: 0.57s; }
.dotplot.live .dp-row:nth-child(6) .dp-dot { animation-delay: 0.70s; }
.dotplot.live .dp-row:nth-child(7) .dp-dot { animation-delay: 0.83s; }
.dotplot.live .dp-row:nth-child(8) .dp-dot { animation-delay: 0.96s; }

/* headline bars (index) */
.hbars { display: grid; gap: 12px; margin: 6px 0 0; min-width: 0; }
.hb-row { display: grid; grid-template-columns: 118px 1fr 58px; gap: 12px; align-items: center; min-width: 0; }
.hb-name { font-size: 13.5px; }
.hb-name small { display: block; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.hb-track { position: relative; height: 20px; background: var(--paper-deep); min-width: 0; }
.hb-fill {
  position: absolute; inset: 0 auto 0 0;
  width: calc(var(--w) / 60 * 100%);
  background: var(--bar-neutral);
}
.hb-fill.em { background: var(--accent); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hbars.live .hb-fill { transform-origin: left; animation: grow 0.9s 0.15s both cubic-bezier(0.25, 0.6, 0.3, 1); }
.hbars.live .hb-row:nth-child(2) .hb-fill { animation-delay: 0.3s; }
.hbars.live .hb-row:nth-child(3) .hb-fill { animation-delay: 0.45s; }
.hb-val { font-family: var(--mono); font-size: 12.5px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hb-val.em { color: var(--accent-deep); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--rule); padding: 20px 0 14px; max-width: none; }
.faq-item:first-of-type { border-top: 2px solid var(--rule-strong); }
.faq-item h3 { margin: 0 0 10px; font-size: 18px; }
.faq-item h3 .qn { font-family: var(--mono); font-size: 12px; color: var(--accent-deep); font-weight: 600; margin-right: 10px; }
.faq-item p { margin: 0 0 0.9em; font-size: 15.5px; color: var(--ink-2); }
.faq-item p:last-child { margin-bottom: 0; }

/* ---------- commentary list ---------- */
.cmt-list { list-style: none; margin: 0; padding: 0; }
.cmt-list li {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}
.cmt-list li:first-child { border-top: 2px solid var(--rule-strong); }
.cmt-no { font-family: var(--mono); font-size: 13px; color: var(--accent-deep); font-weight: 600; padding-top: 3px; }
.cmt-body h2.cmt-title { margin: 0 0 4px; font-size: 16.5px; font-weight: 600; }
.cmt-body h2.cmt-title a { text-decoration: none; color: var(--ink); }
.cmt-body h2.cmt-title a:hover { color: var(--accent-deep); text-decoration: underline; }
.cmt-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 7px; }
.cmt-body p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- reading path ---------- */
.read-path {
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  padding: 22px 26px;
  margin: 40px 0 12px;
  min-width: 0;
}
.read-path .rp-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-deep); margin: 0 0 10px; }
.read-path ol { margin: 0; padding-left: 20px; font-size: 15.5px; columns: 2; column-gap: 40px; }
.read-path li { margin-bottom: 6px; break-inside: avoid; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 64px;
  border-top: 2px solid var(--rule-strong);
  background: var(--paper-deep);
  font-size: 13.5px;
}
.site-footer .container { padding-top: 30px; padding-bottom: 34px; min-width: 0; }
.site-footer .f-brand { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.site-footer .f-brand .arrow { color: var(--accent); }
.site-footer p { margin: 0 0 10px; color: var(--ink-2); max-width: 88ch; line-height: 1.62; }
.footer-disclosure { color: var(--ink-3); font-size: 12.5px; }
.site-footer nav {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase;
}
.site-footer nav a { color: var(--ink-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent-deep); }

/* ---------- figure 4: checkpoint meter ---------- */
.ckpt-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr); gap: 40px; align-items: center; min-width: 0; }
.ckpt-meter { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 0; min-width: 0; }
.ckpt-cell {
  width: 34px; height: 34px;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  position: relative;
  font-family: var(--mono); font-size: 11px; color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.ckpt-cell.on {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #fff;
}
@keyframes cellOn {
  0%, 3%   { background: var(--paper-deep); border-color: var(--rule); color: transparent; }
  6%, 82%  { background: var(--accent); border-color: var(--accent-deep); color: #fff; }
  88%, 100%{ background: var(--paper-deep); border-color: var(--rule); color: transparent; }
}
.ckpt-live .ckpt-cell.on { animation: cellOn 12s infinite; }
.ckpt-live .ckpt-cell.on:nth-child(1) { animation-delay: 0.30s; }
.ckpt-live .ckpt-cell.on:nth-child(2) { animation-delay: 0.60s; }
.ckpt-live .ckpt-cell.on:nth-child(3) { animation-delay: 0.90s; }
.ckpt-live .ckpt-cell.on:nth-child(4) { animation-delay: 1.20s; }
.ckpt-live .ckpt-cell.on:nth-child(5) { animation-delay: 1.50s; }
.ckpt-live .ckpt-cell.on:nth-child(6) { animation-delay: 1.80s; }
.ckpt-live .ckpt-cell.on:nth-child(7) { animation-delay: 2.10s; }
.ckpt-live .ckpt-cell.on:nth-child(8) { animation-delay: 2.40s; }
.ckpt-live .ckpt-cell.on:nth-child(9) { animation-delay: 2.70s; }
.ckpt-readout {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  margin-top: 14px; font-variant-numeric: tabular-nums;
}
.ckpt-readout strong { color: var(--accent-deep); font-weight: 600; }

/* ---------- figure 5: gene version lane ---------- */
.vlane-wrap { min-width: 0; }
.vlane {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr;
  gap: 0;
  align-items: stretch;
  min-width: 0;
}
.v-node {
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 12px 14px;
  font-family: var(--mono); font-size: 12px; line-height: 1.55;
  color: var(--ink-2);
  min-width: 0;
}
.v-node .v-step { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.v-node.v-strong { border-left: 3px solid var(--accent); }
.v-arrow {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
}
.v-arrow::before {
  content: "";
  display: block; width: 100%; height: 1.5px;
  background: var(--rule-strong);
  position: relative;
}
.v-arrow::after {
  content: "";
  position: absolute; right: 4px; top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid var(--rule-strong);
  border-right: 1.5px solid var(--rule-strong);
  transform: translateY(-50%) rotate(45deg);
}
.v-arrow .v-alabel {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
@keyframes vPulse {
  0%, 8%   { border-color: var(--rule); background: var(--paper-deep); color: var(--ink-2); }
  12%, 78% { border-color: var(--accent-deep); background: var(--accent); color: #fff; }
  84%, 100%{ border-color: var(--rule); background: var(--paper-deep); color: var(--ink-2); }
}
@keyframes aPulse {
  0%, 8%   { background: var(--rule-strong); }
  12%, 78% { background: var(--accent); }
  84%, 100%{ background: var(--rule-strong); }
}
.vlane-live .v-node { animation: vPulse 9.6s infinite; }
.vlane-live .v-node:nth-child(1) { animation-delay: 0s; }
.vlane-live .v-node:nth-child(3) { animation-delay: 2.4s; }
.vlane-live .v-node:nth-child(5) { animation-delay: 4.8s; }
.vlane-live .v-arrow::before { animation: aPulse 9.6s infinite; }
.vlane-live .v-arrow:nth-child(2)::before { animation-delay: 1.2s; }
.vlane-live .v-arrow:nth-child(4)::before { animation-delay: 3.6s; }
.vbranch {
  margin-top: 14px;
  border: 1px dashed var(--accent);
  background: transparent;
  padding: 10px 14px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  color: var(--ink-3);
  min-width: 0;
}
.vbranch .vb-tag { color: var(--accent-deep); font-weight: 600; letter-spacing: 0.06em; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; padding-top: 40px; }
  .brand-id { text-align: left; white-space: normal; }
  .duo { grid-template-columns: 1fr; gap: 8px; }
  .sidenote { border-left: none; border-top: 1px solid var(--rule); padding: 12px 0 0; max-width: 62ch; }
  .gep-wrap { grid-template-columns: 1fr; }
  .stat-strip .container { grid-template-columns: repeat(2, 1fr); }
  .stat { padding-left: 0; border-left: none; border-top: 1px solid var(--rule); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(even) { border-left: 1px solid var(--rule); padding-left: 20px; }
  .distill { grid-template-columns: 1fr; gap: 18px; }
  .d-mid { flex-direction: row; padding: 4px 0; }
  .d-midcap { writing-mode: horizontal-tb; }
  .read-path ol { columns: 1; }
  .gep-wheel { transform: scale(0.92); transform-origin: top center; }
  .ckpt-wrap { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar .container span:first-child { display: none; }
  .hb-row { grid-template-columns: 92px 1fr 52px; }
  .dp-row { grid-template-columns: 130px 1fr 52px; }
  .fig { padding: 18px 16px 14px; }
  .paper-quote { padding: 20px 18px 16px; }
  .gep-wheel { width: 300px; height: 300px; }
  .gep-node { transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translate(0, -112px) rotate(calc(var(--i) * -60deg)); }
  .gep-ring { inset: 28px; }
  .vlane { grid-template-columns: 1fr; gap: 12px; }
  .v-arrow { min-height: 30px; }
  .v-arrow::before { width: 1.5px; height: 100%; }
  .v-arrow::after { right: 50%; top: auto; bottom: 4px; transform: translateX(50%) rotate(135deg); }
  .v-arrow .v-alabel { left: auto; right: 10px; top: 50%; transform: translateY(-50%); }
  .ckpt-cell { width: 27px; height: 27px; font-size: 10px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .distill.live .d-line,
  .distill.live .d-line.key,
  .distill.live .d-beam,
  .distill.live .g-field,
  .distill.live .gene-card,
  .gep-live .gep-node,
  .gep-ring::after,
  .dotplot.live .dp-dot,
  .hbars.live .hb-fill,
  .ckpt-live .ckpt-cell.on,
  .vlane-live .v-node,
  .vlane-live .v-arrow::before {
    animation: none !important;
  }
  .distill.live .g-field { opacity: 1 !important; }
  .ckpt-live .ckpt-cell.on {
    background: var(--accent); border-color: var(--accent-deep); color: #fff;
  }
  .vlane-live .v-node:nth-child(5) {
    background: var(--accent); border-color: var(--accent-deep); color: #fff;
  }
}
