@font-face {
  font-family: "Manrope";
  src: url("assets/holon/fonts/Manrope-Variable.woff2") format("woff2"), url("assets/holon/fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/holon/fonts/IBMPlexMono-Regular.woff2") format("woff2"), url("assets/holon/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/holon/fonts/IBMPlexMono-Medium.woff2") format("woff2"), url("assets/holon/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --electric: #2233bb;
  --electric-hover: #182899;
  --electric-soft: #e4e6f8;
  --midnight: #08082a;
  --ink: #1c2045;
  --copy: #3a4468;
  --muted: #666e8e;
  --paper: #f8f5fa;
  --raised: #eaeaf3;
  --hover: #dfdfec;
  --panel: #ffffff;
  --rule: rgba(8, 8, 42, 0.08);
  --rule-strong: rgba(8, 8, 42, 0.17);
  --positive: #007f73;
  --positive-soft: #d9eeea;
  --info: #2f6fba;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --content-max: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--copy);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.62;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

body.demo-only {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.demo-main {
  width: 100%;
  margin: 0 auto;
}

.demo-only .explorer-section {
  padding: 0;
  border: 0;
}

.demo-only .explorer-shell {
  box-shadow: none;
}

/* The host frame owns the border and clipping when this viewer is embedded. */
.is-embedded .demo-only .explorer-shell {
  border: 0;
  border-radius: 0;
}

a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: var(--electric); color: #fff; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--electric) 38%, transparent); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--midnight);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.75rem;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* The guide's ambient field: light, static, and absent from the data surface. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0, #000 23rem, transparent 52rem);
  mask-image: linear-gradient(#000 0, #000 23rem, transparent 52rem);
}

.atmosphere-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 5rem 5rem;
  opacity: 0.32;
  -webkit-mask-image: radial-gradient(ellipse at 50% 8rem, #000 0, transparent 61%);
  mask-image: radial-gradient(ellipse at 50% 8rem, #000 0, transparent 61%);
}

.atmosphere-horizon { display: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(68px);
  opacity: 0.17;
}

.orb-one { top: -18rem; left: -14rem; width: 44rem; height: 44rem; background: #c0dcff; }
.orb-two { top: -13rem; right: -13rem; width: 40rem; height: 40rem; background: #e0d8f0; }
.orb-three { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand { display: inline-flex; min-width: max-content; align-items: center; gap: 0.9rem; }
.brand img { width: 7.5rem; height: auto; }
.brand-rule { width: 1px; height: 1.15rem; background: var(--rule-strong); }
.brand-product,
.header-meta,
.eyebrow,
.hero-tags,
.ledger-topline,
.console-label,
.gene-count,
.gene-index,
.gene-insight-topline,
.mode-chip,
.map-label,
.region-flag,
.legend-card,
.view-controls,
.site-footer,
.flow-index {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand-product { color: var(--copy); }
.header-meta { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.625rem; }
.header-divider { width: 1px; height: 0.85rem; background: var(--rule-strong); }
.live-dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--positive) 12%, transparent); }

main,
.site-footer { width: min(calc(100% - (var(--gutter) * 2)), var(--content-max)); margin: 0 auto; }

.hero {
  display: grid;
  min-height: 31rem;
  align-items: center;
  padding: clamp(4rem, 9vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem);
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
  gap: clamp(2.5rem, 7vw, 8rem);
}

.eyebrow { display: flex; align-items: center; gap: 0.625rem; margin: 0 0 1rem; color: var(--muted); }
.eyebrow-line { width: 1.375rem; height: 1px; background: var(--electric); }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--midnight); line-height: 1.08; }

h1 {
  max-width: 14ch;
  margin-bottom: 1.55rem;
  font-size: clamp(2.9rem, 6.2vw, 5.75rem);
  font-weight: 400;
  letter-spacing: -0.05em;
}

h1 em { color: var(--electric); font-style: normal; }

.hero-lede { max-width: 41rem; margin-bottom: 1.5rem; color: var(--copy); font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.65; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.625rem; }
.hero-tags span { padding: 0.38rem 0.6rem; border: 1px solid var(--rule-strong); background: color-mix(in srgb, var(--paper) 82%, transparent); }

.experiment-ledger {
  align-self: end;
  padding: 1.35rem;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.ledger-topline { display: flex; justify-content: space-between; padding-bottom: 0.85rem; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 0.6rem; }
.ledger-name { margin: 1.25rem 0; color: var(--midnight); font-size: 1.18rem; font-weight: 570; letter-spacing: -0.025em; }
.experiment-ledger dl { display: grid; margin: 0; grid-template-columns: 1fr; }
.experiment-ledger dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.72rem 0; border-top: 1px solid var(--rule); }
.experiment-ledger dt { color: var(--muted); font-size: 0.73rem; }
.experiment-ledger dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 0.68rem; text-align: right; }

.explorer-section { padding: clamp(3.75rem, 8vw, 7rem) 0; border-top: 1px solid var(--rule-strong); }
.section-heading { display: grid; align-items: end; margin-bottom: 2.35rem; grid-template-columns: minmax(0, 1fr) minmax(15rem, 25rem); gap: 2rem; }
.section-heading .eyebrow { margin-bottom: 0.75rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 450; letter-spacing: -0.045em; }
.section-aside { max-width: 28rem; margin: 0; padding-bottom: 0.4rem; color: var(--muted); font-size: 0.9rem; }

/* The embedded explorer shares the draft's soft cards and Manrope controls. */
.explorer-shell {
  display: grid;
  overflow: hidden;
  border: 1px solid #dde1ee;
  border-radius: 24px;
  background: #fcfcff;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
}
.viewer-panel { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid #dde1ee; }
.panel-statusbar { display: flex; min-height: 66px; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 16px 20px; color: var(--copy); font-size: 13px; font-weight: 500; line-height: 1.5; }
.signal-id { display: inline-flex; align-items: center; gap: 9px; }
/* Reserve the longest status so toggling GT cannot reflow the toolbar. */
.mode-readout { display: inline-grid; }
.mode-readout > span { grid-area: 1 / 1; }
.mode-readout-sizing { visibility: hidden; }
.signal-pulse { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--positive); }
[data-status-gene] { padding: 5px 10px; border: 1px solid #dde1ee; border-radius: 999px; background: #f1f3fa; color: var(--ink); font-size: 12px; white-space: nowrap; }

.map-figure { display: flex; flex: 1; flex-direction: column; justify-content: center; min-width: 0; margin: 0; padding: 16px; }
.map-stage { position: relative; flex: none; aspect-ratio: var(--map-aspect, 3 / 2); overflow: hidden; border-radius: 16px; background: #d8d5de; isolation: isolate; }
.histology-layer,
.expression-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.histology-layer { z-index: 1; opacity: 0.84; filter: saturate(0.78) contrast(1.04); }
/* Keep high-expression blue visible over the pale histology. */
.expression-layer { mix-blend-mode: normal; image-rendering: pixelated; }
.ground-truth-layer { z-index: 3; opacity: var(--gt-opacity, 1); }
.prediction-layer { z-index: 2; opacity: var(--prediction-opacity, 0); }
.map-stage:not(.gt-hidden) .prediction-layer { clip-path: var(--prediction-outside-roi); }
.gt-footprint { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gt-footprint rect { fill: none; stroke: #fff; stroke-width: 1.15; stroke-dasharray: 4 5; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 1px rgba(8, 8, 42, .45)); }
.gt-hidden .gt-footprint,
.gt-hidden .region-flag { visibility: hidden; }
.map-vignette { position: absolute; z-index: 4; inset: 0; background: linear-gradient(180deg, rgba(3, 4, 18, 0.45), transparent 23%, transparent 70%, rgba(3, 4, 18, 0.62)); pointer-events: none; }
.map-grid, .map-corners { display: none; }

.map-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding: 18px 4px 2px; }
.map-label { display: grid; gap: 4px; color: var(--copy); font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1.45; letter-spacing: 0; text-transform: none; }
.map-label [data-slide-code] { color: var(--muted); font-size: 11px; font-weight: 400; }
.legend-card { flex: 0 0 154px; padding: 10px 12px; border: 1px solid #e0e3ed; border-radius: 12px; background: #f4f5fa; color: var(--copy); font-family: var(--sans); font-size: 11px; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.legend-card > strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 600; }
.map-stage .legend-card { position: absolute; right: 12px; bottom: 12px; z-index: 7; width: 148px; border-radius: 8px; background: rgba(248, 249, 253, .94); }
.legend-ramp { display: block; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 255, 255, .5) 0%, rgba(242, 245, 253, .823529) 35%, rgba(220, 229, 248, .823529) 55%, rgba(158, 183, 232, .823529) 75%, rgba(85, 118, 204, .823529) 90%, rgba(34, 51, 187, .823529) 100%); }
.legend-labels { display: flex; justify-content: space-between; margin-top: 5px; }

.gene-panel { display: flex; min-width: 0; padding: 24px; flex-direction: column; background: linear-gradient(155deg, #f7f8fe, #f1f3fa); }
.sample-selector { padding-bottom: 22px; }
.sample-selector-label, .gene-list-label { margin: 0 0 12px; color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; text-transform: none; }
.sample-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sample-option { position: relative; display: inline-flex; min-height: 44px; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #dce0ed; border-radius: 12px; background: #ffffffc9; color: var(--copy); cursor: pointer; font-size: 14px; font-weight: 500; line-height: 1.4; transition: border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease); }
.sample-option:hover { border-color: #a5b0df; color: var(--ink); }
.sample-option.active { border-color: #b4bced; background: #e9edff; color: var(--electric); }
.sample-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sample-option:focus-within { outline: 2px solid var(--electric); outline-offset: 2px; }
.sample-check { position: relative; width: 15px; height: 15px; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; }
.sample-option.active .sample-check::after { position: absolute; inset: 3px; border-radius: 50%; background: currentColor; content: ''; }
.gene-list-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; }
.gene-list-label span { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.gene-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; }
.gene-button { display: flex; width: 100%; min-width: 0; min-height: 46px; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #dde1ee; border-radius: 10px; background: #ffffffbd; color: var(--copy); text-align: left; transition: color 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease); }
.gene-button:hover { border-color: #a5b0df; background: #f0f2ff; color: var(--ink); }
.gene-button.active { border-color: #a7b2e9; background: #e5eaff; color: var(--electric); box-shadow: 0 5px 16px -12px #2233bb70; }
.gene-index { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #eef0f7; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0; }
.gene-button.active .gene-index { background: var(--electric); color: #fff; }
.gene-symbol { font-family: var(--sans); font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; }
.gene-list-empty { grid-column: 1 / -1; font-size: 14px; }

.reveal-controls { margin: 0 0 22px; padding: 16px; border: 1px solid #dde1ee; border-radius: 14px; background: #ffffffb8; }
.reveal-controls-head { margin-bottom: 4px; }
.reveal-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; color: var(--copy); font-size: 13px; line-height: 1.5; }
.reveal-label strong { color: var(--electric); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.reveal-controls > input[type='range'] { display: block; width: 100%; height: 32px; margin: 0; accent-color: var(--electric); cursor: ew-resize; }
.gene-panel-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 22px; }
.gt-toggle { position: relative; display: inline-flex; min-height: 44px; align-items: center; gap: 12px; color: var(--copy); cursor: pointer; font-size: 13px; font-weight: 500; line-height: 1.5; }
.gt-toggle input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gt-toggle-check { position: relative; width: 36px; height: 22px; flex: 0 0 auto; border: 1px solid #b5bdd1; border-radius: 999px; background: #e2e6f0; transition: background 160ms var(--ease), border-color 160ms var(--ease); }
.gt-toggle-check::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #08082a26; content: ''; transition: transform 160ms var(--ease); }
.gt-toggle input:checked + .gt-toggle-check { border-color: var(--positive); background: var(--positive); }
.gt-toggle input:checked + .gt-toggle-check::after { transform: translateX(14px); }
.gt-toggle input:focus-visible + .gt-toggle-check { outline: 2px solid var(--electric); outline-offset: 3px; }
.gt-toggle-copy { display: grid; gap: 2px; }
.gt-toggle-copy small { color: var(--muted); font-size: 11px; font-weight: 400; }


.evidence-strip { display: grid; align-items: center; padding: clamp(3.75rem, 8vw, 7rem) 0; border-top: 1px solid var(--rule-strong); grid-template-columns: minmax(0, 0.85fr) minmax(26rem, 1.15fr); gap: clamp(2.5rem, 7vw, 7.5rem); }
.scope-copy h2 { margin: 0; font-size: clamp(2rem, 3.6vw, 3.5rem); font-weight: 450; letter-spacing: -0.05em; }
.scope-flow { display: grid; grid-template-columns: minmax(7rem, 1fr) 2rem minmax(7rem, 1fr) 2rem minmax(7rem, 1fr); }
.scope-flow > div { min-height: 8rem; padding: 0.85rem 0.35rem 0.5rem 0.85rem; border-top: 2px solid var(--electric); border-left: 1px solid var(--rule-strong); }
.scope-flow > div:nth-of-type(2) { border-top-color: var(--positive); }
.scope-flow .future-step { border-top-color: var(--muted); border-top-style: dashed; }
.flow-index { display: block; margin-bottom: 1.25rem; color: var(--muted); font-size: 0.58rem; }
.scope-flow strong { display: block; color: var(--midnight); font-size: 0.95rem; font-weight: 570; letter-spacing: -0.03em; line-height: 1.15; }
.scope-flow p { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }
.flow-line { align-self: start; height: 1px; margin-top: 0.85rem; background: var(--rule-strong); }
.flow-line.future { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 9px); }

.site-footer { display: flex; min-height: 5rem; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule-strong); color: var(--muted); font-size: 0.6rem; }

@media (max-width: 880px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 2rem; }
  .experiment-ledger { max-width: 30rem; }
  .explorer-shell { grid-template-columns: 1fr; }
  .viewer-panel { border-right: 0; }
  .gene-panel { border-top: 1px solid #dde1ee; }
  .gene-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gene-panel-footer { margin-top: 0; }
  .section-heading,
  .evidence-strip { grid-template-columns: 1fr; }
  .section-aside { padding: 0; }
}

@media (max-width: 620px) {
  body.demo-only { display: block; padding: 0; }
  .demo-main { width: 100%; }
  .explorer-shell { border-radius: 18px; }
  .gene-panel { padding: 20px; }
  .gene-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { min-height: 4.25rem; }
  .brand img { width: 6.25rem; }
  .brand-rule { margin: 0 0.08rem; }
  .header-meta span:not(.live-dot) { display: none; }
  .header-divider { display: none; }
  h1 { font-size: clamp(2.75rem, 14vw, 4.25rem); }
  .hero { padding-top: 3.75rem; }
  .map-stage { width: 100%; min-height: 0; }
  .map-figure { padding: 12px; }
  .map-stage .legend-card { width: 128px; right: 8px; bottom: 8px; padding: 8px 10px; }
  .map-stage { border-radius: 12px; }
  .map-caption { flex-wrap: wrap; gap: 12px; padding-top: 14px; }
  .legend-card { flex-basis: 140px; }
  .panel-statusbar { min-height: 62px; padding: 14px 16px; font-size: 12px; }
  .scope-flow { gap: 0.7rem; grid-template-columns: 1fr; }
  .scope-flow > div { min-height: 5.8rem; }
  .flow-line { display: none; }
  .site-footer { align-items: start; flex-direction: column; justify-content: center; font-size: 0.52rem; line-height: 1.35; }
}

@media (max-width: 380px) {
  .gene-panel { padding: 16px; }
  .gene-button { gap: 6px; padding-inline: 8px; }
  .map-caption { align-items: stretch; flex-direction: column; }
  .legend-card { flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Sequencing coverage is shown only while ground truth is enabled. */
.region-flag {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  top: var(--region-label-top, 40px);
  left: var(--region-label-left, 16px);
  max-width: calc(100% - 24px);
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px;
  background: rgba(248,245,250,.94);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  pointer-events: none;
}
@media (max-width: 600px) {
  .region-flag { font-size: 11px; padding: 5px 7px; }
}

/* Narrow screens: a compact control deck directly under a size-capped map, so the
   slide and every control fit on one screen together. */
@media (max-width: 880px) {
  .map-figure { padding: 12px 12px 0; }
  .map-stage { width: min(100%, 630px); margin-inline: auto; }
  .gene-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "reveal reveal"
      "sample toggle"
      "label label"
      "genes genes";
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px 16px;
    border-top: 0;
    background: transparent;
  }
  .reveal-controls {
    grid-area: reveal;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    margin: 0;
    padding: 4px 14px;
    border-radius: 12px;
  }
  .reveal-controls-head { margin: 0; }
  .reveal-label { justify-content: flex-start; gap: 8px; }
  .reveal-label strong { min-width: 4ch; font-size: 15px; }
  .sample-selector { grid-area: sample; padding: 0; }
  .sample-selector-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .sample-options { max-width: 300px; gap: 6px; }
  .sample-option { min-height: 40px; padding: 8px 12px; }
  .gene-panel-footer { grid-area: toggle; margin: 0; padding: 0; }
  .gene-list-label { grid-area: label; margin: 2px 0 -2px; font-size: 14px; }
  .gene-list { grid-area: genes; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .gene-button { min-height: 40px; justify-content: center; padding: 6px; }
  .gene-index { display: none; }
  .gene-symbol { font-size: 13px; }
}

@media (max-width: 620px) {
  .gt-toggle-copy small { display: none; }
}

@media (max-width: 480px) {
  .gene-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "reveal"
      "sample"
      "toggle"
      "label"
      "genes";
  }
  .reveal-controls { grid-template-columns: minmax(0, 1fr); padding: 8px 14px 2px; }
  .reveal-controls > input[type='range'] { height: 28px; }
  .sample-options { max-width: none; }
  .gt-toggle { min-height: 36px; }
  .gene-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Four chips fit the longest gene symbols down to this frame width. */
@media (max-width: 335px) {
  .gene-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
