:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --surface-3: #e7e5df;
  --ink: #171b1a;
  --muted: #66706c;
  --faint: #8d9692;
  --line: #d9d9d3;
  --line-strong: #b9bdb8;
  --accent: #087e72;
  --accent-ink: #046258;
  --accent-soft: #d8efe9;
  --gold: #eebd54;
  --coral: #ef5c62;
  --green: #19a985;
  --blue: #176fd1;
  --violet: #7d4ac6;
  --magenta: #d44192;
  --danger: #b63842;
  --header-h: 72px;
  --mono: "Space Mono", ui-monospace, monospace;
  --sans: "Manrope", "Avenir Next", sans-serif;
}

[data-theme="dark"] {
  --bg: #111514;
  --surface: #191e1c;
  --surface-2: #202624;
  --surface-3: #2a302e;
  --ink: #f3f5f2;
  --muted: #aeb7b3;
  --faint: #838e89;
  --line: #323936;
  --line-strong: #4b5551;
  --accent: #43c8aa;
  --accent-ink: #70dfc5;
  --accent-soft: #173b33;
  --danger: #fa7b83;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; min-height: 36px; padding: 7px 12px; }
button:hover { border-color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -0.04em; }
h2 { margin-bottom: 6px; font-size: 16px; line-height: 1.3; letter-spacing: -0.015em; }
h3 { margin-bottom: 4px; font-size: 14px; }
p { color: var(--muted); }
svg { display: block; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 16px; top: -100px; z-index: 200; background: var(--ink); color: var(--bg); padding: 8px 12px; text-decoration: none; }
.skip-link:focus { top: 10px; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 250px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  color: #fff;
  background: #050706;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; color: #fff; text-decoration: none; }
.brand img { width: 42px; height: 48px; }
.brand > span { display: grid; line-height: 1.05; }
.brand strong { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.brand > span > span { margin-top: 4px; color: rgba(255,255,255,.65); font-size: 11px; }
.primary-nav { display: flex; justify-content: center; height: 100%; gap: 6px; }
.primary-nav a { position: relative; display: flex; align-items: center; padding: 0 10px; color: rgba(255,255,255,.68); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.primary-nav a:hover, .primary-nav a.is-active { color: #fff; }
.primary-nav a.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: linear-gradient(90deg, #f2c960, #ef5c62, #16b98b, #1c72d6, #8a45cc, #db4296); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.search-trigger { display: inline-flex; align-items: center; justify-content: center; width: 38px; min-width: 38px; padding: 0; color: rgba(255,255,255,.76); background: #121615; border-color: rgba(255,255,255,.25); }
.search-trigger:hover, .topbar .icon-button:hover { color: #fff; border-color: rgba(255,255,255,.7); }
.search-trigger svg, .atlas-search svg, .dialog-search-row svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
kbd { font-family: var(--mono); font-size: 10px; color: var(--faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.search-trigger kbd { display: none; }
.search-trigger span { display: none; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 36px; padding: 0; }
.topbar .icon-button { color: rgba(255,255,255,.76); background: #121615; border-color: rgba(255,255,255,.25); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.icon-button > span { position: absolute; right: -4px; top: -5px; min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 9px; background: #fff; color: #050706; font: 700 9px var(--mono); }

main { min-height: 100vh; padding-top: var(--header-h); }
.view { min-height: calc(100vh - var(--header-h)); }
.view-heading { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 32px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.view-heading::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold), var(--coral), var(--green), var(--blue), var(--violet), var(--magenta)); }
.view-heading > div:first-child { max-width: 720px; }
.view-heading p { max-width: 700px; margin-bottom: 0; }

.brand-masthead { position: relative; isolation: isolate; height: clamp(240px, 23vw, 320px); overflow: hidden; background: #17365c url("public/brand-field.webp") center / cover no-repeat; }
.brand-masthead::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(255,246,215,.06), transparent 38%, rgba(20,7,74,.12)); pointer-events: none; }
.brand-chemistry { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.chemistry { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chemistry text { fill: currentColor; stroke: none; font: 22px var(--sans); }
.chemistry-left { color: rgba(82,52,78,.58); }
.chemistry-right { color: rgba(255,255,255,.64); }
.brand-lockup { position: absolute; z-index: 2; left: 50%; top: 50%; display: flex; align-items: center; gap: clamp(18px, 2vw, 32px); transform: translate(-50%, -50%); color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.38); white-space: nowrap; }
.brand-lockup img { width: clamp(108px, 10vw, 156px); height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.2)); }
.brand-tagline { display: grid; font-size: clamp(36px, 4vw, 61px); font-weight: 300; line-height: 1.04; letter-spacing: -.045em; }
.explore-intro { position: relative; display: grid; grid-template-columns: minmax(300px, .78fr) minmax(420px, 1.22fr); align-items: end; gap: 18px 44px; padding: 26px 32px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.explore-intro::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--coral), var(--green), var(--blue), var(--violet), var(--magenta)); opacity: .72; }
.explore-intro p { max-width: 680px; margin-bottom: 0; }
.atlas-search { height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 15px; background: var(--surface); text-align: left; }
.atlas-search span { flex: 1; color: var(--muted); }
.corpus-line { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font: 12px var(--sans); }
.corpus-line strong { color: var(--ink); font-weight: 700; }
.explore-layout { display: grid; grid-template-columns: 232px minmax(410px, 1fr); min-height: 620px; }
.explore-layout.has-selection { grid-template-columns: 232px minmax(410px, 1fr) 390px; }
.explore-layout:not(.has-selection) .record-panel { display: none; }
.facet-panel, .record-panel { padding: 20px; background: var(--surface); }
.facet-panel { border-right: 1px solid var(--line); }
.record-panel { border-left: 1px solid var(--line); }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-heading > span { color: var(--muted); font: 11px var(--mono); white-space: nowrap; }
.text-button { border: 0; background: transparent; min-height: auto; padding: 3px; color: var(--accent-ink); font-weight: 700; }
.field-label, form label { display: block; margin: 14px 0 6px; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); padding: 8px 10px; }
input, select { min-height: 38px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
fieldset { margin: 18px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
fieldset label, .check-row { display: flex !important; align-items: center; gap: 8px; min-height: 36px; margin: 0; font-size: 12px; font-weight: 500; cursor: pointer; }
fieldset label span { margin-left: auto; color: var(--faint); font: 11px var(--mono); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); }
.filter-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
.result-panel { min-width: 0; padding: 17px 0 30px; }
.results-toolbar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.results-toolbar h2 { margin: 0; }
.results-toolbar label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.results-toolbar select { width: auto; min-height: 32px; padding: 4px 26px 4px 8px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; min-height: 10px; padding: 3px 20px 7px; }
.filter-chip { min-height: 27px; padding: 3px 8px; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-size: 10px; }
.result-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.result-item { border-bottom: 1px solid var(--line); }
.result-item.is-active { box-shadow: inset 3px 0 var(--accent); }
.result-item button { position: relative; width: 100%; min-height: 0; padding: 15px 20px 16px; border: 0; border-radius: 0; background: transparent; text-align: left; }
.result-item button:hover, .result-item.is-active button { background: var(--surface-2); }
.result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 7px; color: var(--muted); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .01em; }
.evidence-mark { color: var(--accent-ink); font-weight: 700; }
.result-item h3 { margin-bottom: 6px; font-size: 16px; line-height: 1.4; }
.result-item p { display: -webkit-box; overflow: hidden; margin-bottom: 10px; color: var(--muted); font-size: 14px; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inline-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.inline-tag { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 11px var(--mono); }
.result-open-cue { display: inline-flex; align-items: center; min-height: 30px; margin-top: 6px; color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.load-more { display: block; margin: 18px auto 0; }
.record-panel { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow: auto; }
.empty-detail { display: grid; justify-items: start; padding: 60px 15px 0; }
.empty-detail svg { width: 42px; fill: none; stroke: var(--line-strong); stroke-width: 1.4; margin-bottom: 18px; }
.empty-detail p { font-size: 12px; }
.record-detail header { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.record-detail h2 { font-size: 18px; line-height: 1.35; }
.record-detail .record-actions, .button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.record-detail dl, .peptide-detail dl, .protein-detail dl { margin: 15px 0; }
.record-detail dl > div, .peptide-detail dl > div, .protein-detail dl > div { display: grid; grid-template-columns: 95px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--faint); font-size: 10px; font-weight: 700; }
dd { margin: 0; font-size: 11px; overflow-wrap: anywhere; }
.identifier-links { display: grid; gap: 6px; }
.identifier-links a { color: var(--accent-ink); }
.claim-boundary { margin: 16px 0; padding: 10px; background: var(--surface-2); border-left: 3px solid var(--gold); color: var(--muted); font-size: 10px; }

.molecule-view, .target-view { display: grid; grid-template-columns: 252px minmax(500px, 1fr) 320px; grid-template-rows: minmax(0, 1fr); height: calc(100vh - var(--header-h)); overflow: hidden; }
.catalog-panel, .target-list-panel { display: flex; flex-direction: column; min-width: 0; padding: 18px 14px 0; background: var(--surface); border-right: 1px solid var(--line); }
.catalog-panel h1, .target-list-panel h1 { font-size: 19px; letter-spacing: -.025em; }
.catalog-panel > input, .target-list-panel > input { margin: 10px 0; }
.segmented, .tool-group, .search-scope { display: flex; align-items: center; gap: 2px; }
.segmented { flex: 0 0 auto; min-height: 37px; overflow-x: auto; margin: 0 -2px 10px; }
.segmented button, .tool-group button, .search-scope button { min-height: 31px; padding: 5px 8px; border-color: transparent; background: transparent; color: var(--muted); font-size: 10px; white-space: nowrap; }
.segmented button.is-active, .tool-group button.is-active, .search-scope button.is-active { background: var(--surface-3); color: var(--ink); }
.peptide-list, .protein-list { flex: 1; min-height: 0; margin: 0 -14px; overflow: auto; border-top: 1px solid var(--line); }
.peptide-option, .protein-option { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; min-height: 50px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.peptide-option:hover, .protein-option:hover, .peptide-option.is-active, .protein-option.is-active { background: var(--surface-2); }
.peptide-option strong, .protein-option strong { display: block; font-size: 12px; }
.peptide-option small, .protein-option small { display: block; margin-top: 2px; color: var(--faint); font: 9px var(--mono); }
.peptide-option > span:last-child, .protein-option > span:last-child { color: var(--accent-ink); font: 10px var(--mono); }
.molecule-workspace, .protein-workspace { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: grid; grid-template-rows: 60px minmax(0, 1fr) auto; background: #101817; color: #f3f5f3; }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 18px; border-bottom: 1px solid #2b3532; }
.workspace-toolbar h2 { margin: 0 0 2px; font-size: 18px; }
.workspace-toolbar span { color: #9daba5; font: 10px var(--mono); }
.workspace-toolbar .tool-group button { color: #aeb9b5; }
.workspace-toolbar .tool-group button.is-active { color: #fff; background: #2b3532; }
.workspace-toolbar .tool-group { gap: 0; overflow: hidden; border: 1px solid #34413d; border-radius: 8px; }
.workspace-toolbar .tool-group button { border-radius: 0; }
.workspace-toolbar .tool-group button + button { border-left: 1px solid #34413d; }
.molecule-stage-wrap, .protein-stage-wrap { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 45%, #23312e 0, #111918 58%, #0c1211 100%); }
.molecule-stage-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle, #000, transparent 72%); }
#molecule-stage, #protein-stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#molecule-stage:active, #protein-stage:active { cursor: grabbing; }
.stage-instructions { position: absolute; top: 14px; left: 16px; color: #74817d; font: 9px var(--mono); pointer-events: none; }
.stage-status { position: absolute; right: 16px; top: 14px; color: #95a49e; font: 9px var(--mono); }
.stage-status.is-loading::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border: 1px solid #93cdbd; border-top-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.structure-disclaimer { position: absolute; left: 16px; bottom: 14px; max-width: 430px; padding: 7px 9px; background: rgba(8, 14, 13, .8); border: 1px solid #2a3733; color: #9aa8a2; font-size: 9px; }
.residue-track { display: flex; align-items: stretch; min-height: 92px; border-top: 1px solid #2b3532; background: #141c1a; }
.residue-card { flex: 1; min-width: 72px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 0 10px; padding: 12px; border: 0; border-right: 1px solid #2b3532; border-radius: 0; background: transparent; color: #e5ebe8; text-align: left; }
.residue-card:hover, .residue-card.is-active { background: #202b28; }
.residue-letter { grid-row: 1 / 3; align-self: center; font: 700 25px var(--mono); }
.residue-card strong { font-size: 10px; }
.residue-card small { color: #85938e; font: 8px var(--mono); }
.peptide-detail, .protein-detail { overflow: auto; padding: 20px; background: var(--surface); border-left: 1px solid var(--line); }
.peptide-detail h2, .protein-detail h2 { font-size: 20px; }
.detail-kicker { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--faint); font: 9px var(--mono); }
.sequence-display { margin: 13px 0; padding: 12px; background: var(--surface-2); font: 700 20px var(--mono); letter-spacing: .22em; }
.sequence-residue { border-bottom: 3px solid var(--residue-color); }
.detail-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 9px; }
.source-mini-list { display: grid; gap: 0; }
.source-mini { width: 100%; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.source-mini strong { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.source-mini span { color: var(--faint); font: 8px var(--mono); }
.compare-tray { position: fixed; z-index: 90; left: 270px; right: 338px; bottom: 16px; min-height: 54px; display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.compare-tray > div:first-child { display: grid; min-width: 95px; }
.compare-tray > div:first-child span { color: var(--faint); font-size: 9px; }
#compare-items { flex: 1; display: flex; gap: 6px; }
.compare-item { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; background: var(--surface-2); font-size: 10px; }
.compare-item button { min-height: 0; padding: 0; border: 0; background: transparent; }
.primary-button { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.primary-button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.section-explainer { margin: 0 0 4px; font-size: 10px; line-height: 1.5; }
.protein-workspace { grid-template-rows: 60px minmax(0, 1fr) 92px; }
.protein-stage-wrap { background: radial-gradient(circle at 45% 45%, #21302c 0, #111918 58%, #0c1211 100%); }
.structure-legend { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 7px; color: #8b9994; font: 9px var(--mono); }
.structure-legend span { width: 80px; height: 3px; background: linear-gradient(90deg, #24d6ac, #1478d4, #9b57d0, #f05b6d); }
.relationship-strip { display: flex; align-items: center; gap: 14px; padding: 12px 18px; overflow: auto; border-top: 1px solid #2b3532; background: #141c1a; }
.relationship-node { flex: 0 0 auto; min-width: 105px; padding-left: 10px; border-left: 2px solid var(--node-color, #43c8aa); }
.relationship-node strong { display: block; font-size: 10px; }
.relationship-node span { color: #85938e; font: 8px var(--mono); }
.relationship-divider { color: #5d6965; }
.protein-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }

.lineage-view, .timeline-view, .community-view { min-height: calc(100vh - var(--header-h)); }
.lineage-view { height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; overflow: hidden; }
.lineage-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.lineage-stage { min-width: 0; overflow: hidden; background: var(--surface); }
.lineage-stage svg { width: 100%; height: 100%; }
.lineage-link { stroke: var(--line-strong); stroke-width: 1.1; transition: opacity 120ms ease, stroke-width 120ms ease, stroke 120ms ease; }
.lineage-link.is-background { opacity: 0; }
.lineage-link.is-related { opacity: .95; stroke: var(--accent); stroke-width: 2.2; }
.lineage-link.is-muted { opacity: .04; }
.lineage-branch-label { fill: var(--muted); font: 700 11px var(--mono); letter-spacing: .08em; }
.lineage-node { cursor: pointer; }
.lineage-node circle { fill: color-mix(in srgb, var(--node-color) 8%, var(--surface)); stroke: var(--node-color); stroke-width: 2; }
.lineage-node.is-core circle { fill: var(--ink); stroke: var(--ink); }
.lineage-node text { fill: var(--ink); font: 600 10px var(--sans); pointer-events: none; }
.lineage-node.is-core text { fill: var(--bg); }
.lineage-node.is-muted { opacity: .16; }
.lineage-node:focus { outline: none; }
.lineage-node:focus-visible circle { stroke-width: 4; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--node-color) 65%, transparent)); }
.lineage-node.is-selected circle { stroke-width: 4; }
.lineage-detail { overflow: auto; padding: 22px; border-left: 1px solid var(--line); background: var(--surface); }
.lineage-detail h2 { font-size: 20px; }
.lineage-relationship { color: var(--accent-ink); font: 10px var(--mono); }
.connection-list { margin: 12px 0 0; padding: 0; list-style: none; }
.connection-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }


.learn-view { background: var(--surface); }
.learn-hero {
  position: relative;
  isolation: isolate;
  min-height: 440px;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 62px clamp(28px, 7vw, 110px);
  color: #fff;
  background: #142c4e url("public/brand-field.webp") center 43% / cover no-repeat;
}
.learn-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(4,8,8,.86) 0%, rgba(5,10,10,.67) 48%, rgba(5,8,16,.16) 78%), linear-gradient(0deg, rgba(3,7,7,.6), transparent 52%); }
.learn-hero::after { content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--coral), var(--green), var(--blue), var(--violet), var(--magenta)); }
.learn-hero-copy { max-width: 820px; }
.learn-hero h1 { max-width: 720px; margin-bottom: 18px; color: #fff; font-size: clamp(46px, 6vw, 78px); font-weight: 500; line-height: .98; letter-spacing: -.055em; }
.learn-hero p { max-width: 760px; margin-bottom: 22px; color: rgba(255,255,255,.94); font-size: 17px; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.learn-hero button { min-height: 44px; padding-inline: 16px; color: #fff; background: rgba(5,8,8,.58); border-color: rgba(255,255,255,.42); }
.learn-hero .primary-button { color: #111; background: #fff; border-color: #fff; }
.learn-corpus-summary { display: flex; flex-wrap: wrap; gap: 7px 22px; margin-top: 28px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.44); color: rgba(255,255,255,.92); font-size: 12px; }
.learn-corpus-summary strong { color: #fff; font: 700 15px var(--mono); }
.learn-content { max-width: 1320px; margin: 0 auto; padding: 12px clamp(22px, 4vw, 56px) 80px; }
.learn-content > section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.learn-content > section > header { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(340px, 1.28fr); gap: 28px; margin-bottom: 26px; }
.learn-content > section > header h2, .learn-policy h2 { font-size: clamp(25px, 3vw, 38px); font-weight: 500; line-height: 1.15; letter-spacing: -.035em; }
.learn-content > section > header p { max-width: 620px; margin: 5px 0 0; font-size: 14px; }
.learn-route-list { border-top: 1px solid var(--line-strong); }
.learn-route-list button { width: 100%; min-height: 92px; display: grid; grid-template-columns: 180px minmax(260px, 1fr) minmax(260px, 1fr); align-items: center; gap: 24px; padding: 18px 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.learn-route-list button:hover { background: var(--surface-2); }
.learn-route-list span { color: var(--accent-ink); font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.learn-route-list strong { font-size: 15px; line-height: 1.45; }
.learn-route-list small { color: var(--muted); font-size: 12px; line-height: 1.55; }
.learn-school-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.learn-school-grid article { min-width: 0; padding: 26px 28px 30px 0; }
.learn-school-grid article + article { padding-right: 0; padding-left: 28px; border-left: 1px solid var(--line); }
.learn-school-grid h3 { font-size: 18px; }
.learn-school-grid article > p { min-height: 66px; font-size: 12px; }
.learn-person-list, .learn-latest-records { min-height: 312px; margin: 18px 0; border-top: 1px solid var(--line); }
.learn-person-list button, .learn-latest-records button { width: 100%; min-height: 44px; display: grid; gap: 2px; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.learn-person-list button:hover, .learn-latest-records button:hover { background: var(--surface-2); }
.learn-person-list span, .learn-latest-records strong { font-size: 11px; }
.learn-person-list small, .learn-latest-records small { display: block; color: var(--faint); font: 9px var(--mono); }
.learn-latest-records button { grid-template-columns: 48px 1fr; gap: 12px; }
.learn-latest-records time { color: var(--accent-ink); font: 10px var(--mono); }
.learn-policy { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(340px, 1.28fr); gap: 28px; }
.learn-policy > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-strong); }
.learn-policy p { margin: 0; padding: 18px 18px 0 0; font-size: 12px; }
.learn-policy p + p { padding-left: 18px; border-left: 1px solid var(--line); }
.learn-policy strong { display: block; margin-bottom: 6px; color: var(--ink); }

.record-excerpt { font-size: 12px; line-height: 1.6; }
.record-status-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.record-status-line span { padding: 3px 6px; border: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); }
.record-status-line .source-context { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.metadata-grid .metadata-wide { grid-template-columns: 95px 1fr; }
.author-links button { min-height: 0; padding: 0 2px; border: 0; background: transparent; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.record-detail .connection-list { display: grid; margin: 8px 0 18px; }
.record-detail .connection-list button, .related-records button { width: 100%; min-height: 34px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--accent-ink); text-align: left; }
.related-records { display: grid; }
.related-records button { display: grid; grid-template-columns: 42px 1fr; gap: 8px; color: var(--ink); font-size: 10px; }
.related-records button span { color: var(--faint); font: 9px var(--mono); }
.record-detail footer { display: flex; gap: 8px; margin-top: 18px; }
.record-detail footer .is-saved { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }

.lineage-view { height: auto; overflow: visible; }
.lineage-layout { flex: none; height: min(680px, calc(100vh - var(--header-h) - 172px)); min-height: 520px; }
.lineage-policy { margin-top: 10px !important; padding-left: 10px; border-left: 3px solid var(--gold); font-size: 11px; }
.lineage-evidence { margin: 18px 0; padding: 12px; background: var(--surface-2); border-left: 3px solid var(--accent); font-size: 11px; }
.lineage-evidence strong { display: block; margin-bottom: 4px; color: var(--ink); }
.lineage-detail article > dl, .contributor-detail dl { margin: 16px 0; }
.lineage-detail article > dl > div, .contributor-detail dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lineage-records, .contributor-records { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.lineage-records button, .contributor-records button { width: 100%; min-height: 44px; display: grid; grid-template-columns: 44px 1fr; align-items: start; gap: 10px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.lineage-records button:hover, .contributor-records button:hover { background: var(--surface-2); }
.lineage-records button > span:first-child, .contributor-records time { color: var(--faint); font: 9px var(--mono); }
.lineage-connections { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.lineage-connections h3 { margin-bottom: 8px; }
.lineage-connections button { width: 100%; min-height: 40px; display: grid; gap: 1px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.lineage-connections button:hover { background: var(--surface-2); }
.lineage-connections span { font-size: 11px; }
.lineage-connections small { color: var(--muted); font: 9px var(--mono); }
.contributor-directory { max-width: 1320px; margin: 0 auto; padding: 48px clamp(22px, 4vw, 56px) 78px; }
.contributor-directory > header { display: grid; grid-template-columns: minmax(340px, 1fr) 280px; gap: 10px 32px; align-items: end; margin-bottom: 20px; }
.contributor-directory h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -.035em; }
.contributor-directory header p { max-width: 680px; margin-bottom: 0; font-size: 12px; }
.contributor-directory header label { margin: 0; }
.contributor-directory header input { margin-top: 6px; }
#contributor-count { grid-column: 1 / -1; color: var(--faint); font: 10px var(--mono); }
.contributor-layout { height: 640px; display: grid; grid-template-columns: 360px minmax(0, 1fr); border: 1px solid var(--line); background: var(--surface); }
.contributor-list { min-width: 0; overflow: auto; border-right: 1px solid var(--line); }
.contributor-list > button { width: 100%; min-height: 48px; display: grid; gap: 2px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.contributor-list > button:hover, .contributor-list > button.is-active { background: var(--surface-2); box-shadow: inset 3px 0 var(--accent); }
.contributor-list span { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.contributor-list small { color: var(--faint); font: 8px var(--mono); }
.contributor-empty { padding: 24px 14px; color: var(--muted); }
.contributor-detail { min-width: 0; overflow: auto; padding: 26px 30px; }
.contributor-detail h2 { margin-top: 4px; font-size: 26px; }
.contributor-detail article > p { max-width: 720px; font-size: 12px; }
.contributor-records button { grid-template-columns: 48px 1fr; padding-block: 10px; }
.contributor-records strong, .contributor-records small { display: block; }
.contributor-records strong { font-size: 11px; line-height: 1.45; }
.contributor-records small { margin-top: 3px; color: var(--faint); font: 8px var(--mono); }
.load-contributor-records { width: 100%; display: flex; justify-content: space-between; margin-top: 14px; background: var(--surface-2); }
.load-contributor-records span { color: var(--faint); font: 9px var(--mono); }
.timeline-controls { display: flex; align-items: center; gap: 8px; }
.timeline-controls label { color: var(--muted); font-size: 10px; }
.timeline-controls select { width: auto; min-width: 150px; }
.timeline-chart { display: flex; align-items: end; gap: 2px; height: 190px; padding: 24px 32px 0; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.year-column { position: relative; flex: 1 0 14px; min-width: 12px; height: 150px; display: flex; align-items: end; }
.year-bar { width: 100%; min-height: 1px; border: 0; border-radius: 1px 1px 0 0; padding: 0; background: var(--accent); opacity: .68; }
.year-bar:hover, .year-bar.is-active { opacity: 1; background: var(--coral); }
.year-label { position: absolute; left: 0; bottom: -20px; color: var(--faint); font: 7px var(--mono); transform: rotate(-50deg); transform-origin: top left; }
.timeline-readout { display: flex; justify-content: space-between; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.timeline-readout span { color: var(--muted); font-size: 11px; }
.timeline-stream { max-width: 980px; margin: 0 auto; padding: 0 28px 60px; list-style: none; }
.timeline-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline-item time { font: 12px var(--mono); }
.timeline-item button { padding: 0; min-height: 0; border: 0; background: transparent; text-align: left; }
.timeline-item h3 { margin-bottom: 5px; font-size: 13px; }
.timeline-item p { margin: 0; font-size: 11px; }
.timeline-item > span { color: var(--faint); font: 8px var(--mono); }

.community-grid { display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(340px, .85fr); max-width: 1180px; margin: 0 auto; padding: 28px 28px 70px; gap: 28px 38px; }
.research-path-panel, .contribution-panel, .principles-panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.research-path-panel > p, .contribution-panel > p { font-size: 11px; }
.path-list { min-height: 130px; margin-top: 18px; border-top: 1px solid var(--line); }
.path-empty { padding: 28px 0; color: var(--faint); font-size: 11px; }
.path-item { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.path-handle { color: var(--faint); font: 10px var(--mono); }
.path-item strong { display: block; font-size: 11px; }
.path-item span { color: var(--faint); font: 8px var(--mono); }
.path-item button { min-height: 28px; padding: 2px 7px; }
.path-item.is-dragging { opacity: .45; }
.path-actions { display: flex; gap: 4px; }
.path-actions button:disabled { opacity: .35; cursor: default; }
form label span { color: var(--faint); font-weight: 400; }
.contribution-status { margin-top: 12px; color: var(--accent-ink); font-size: 11px; }
.principles-panel { grid-column: 1 / -1; }
.source-parity-statement { max-width: 900px; margin: 12px 0 0; padding: 11px 14px; color: var(--muted); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); border-left: 3px solid var(--accent); font-size: 12px; line-height: 1.6; }
.source-parity-statement strong { color: var(--ink); }
.principles-panel dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 15px 0 0; border-top: 1px solid var(--line); }
.principles-panel dl > div { padding: 14px; border-right: 1px solid var(--line); }
.principles-panel dl > div:last-child { border-right: 0; }
.principles-panel dt { color: var(--ink); font-size: 11px; }
.principles-panel dd { margin-top: 4px; color: var(--muted); line-height: 1.55; }

.mobile-nav { display: none; }
dialog { width: min(720px, calc(100vw - 32px)); max-height: min(780px, calc(100vh - 32px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 34px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(8,12,11,.52); backdrop-filter: blur(3px); }
dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
dialog header h2 { margin-bottom: 2px; font-size: 18px; }
dialog header p { margin: 0; font-size: 11px; }
.search-dialog { width: min(760px, calc(100vw - 24px)); transform: translateY(-12vh); }
.dialog-search-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.dialog-search-row input { min-height: 44px; padding: 0; border: 0; background: transparent; font-size: 18px; }
.dialog-search-row input:focus { outline: 0; }
.key-button { min-height: 27px; padding: 3px 7px; color: var(--muted); font: 9px var(--mono); }
.search-scope { padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.search-results { min-height: 260px; max-height: 470px; overflow: auto; }
.search-result { width: 100%; display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.search-result:hover, .search-result.is-selected { background: var(--surface-2); }
.search-result > span:first-child { color: var(--faint); font: 8px var(--mono); text-transform: uppercase; }
.search-result strong { display: block; font-size: 12px; }
.search-result small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.search-result > span:last-child { color: var(--faint); font: 8px var(--mono); }
.search-empty { padding: 56px 20px; text-align: center; color: var(--faint); }
.search-dialog footer { display: flex; align-items: center; gap: 14px; padding: 9px 14px; color: var(--faint); font-size: 9px; border-top: 1px solid var(--line); }
.search-dialog footer span:last-child { margin-left: auto; }
.comparison-dialog { width: min(980px, calc(100vw - 32px)); }
#comparison-table { overflow: auto; padding: 18px; }
.comparison-grid { display: grid; grid-template-columns: 140px repeat(var(--columns), minmax(160px, 1fr)); min-width: 680px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.comparison-grid > div { min-height: 52px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; }
.comparison-label { color: var(--faint); font: 9px var(--mono); background: var(--surface-2); }
.share-dialog { width: min(1040px, calc(100vw - 32px)); }
.share-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; padding: 20px; }
#share-canvas { width: 100%; height: auto; background: #0e1715; border: 1px solid var(--line); }
.share-controls label { margin-top: 0; margin-bottom: 14px; }
.record-dialog { width: min(620px, calc(100vw - 24px)); padding: 20px; }
.dialog-close-inline { float: right; min-height: 30px; margin: -8px -8px 10px 12px; }
.residue-empty { display: grid; place-items: center; width: 100%; min-height: 80px; padding: 12px; color: #85938e; font-size: 10px; text-align: center; }
.relationship-node:is(button) { min-height: 42px; padding: 0 0 0 10px; border-width: 0 0 0 2px; border-radius: 0; background: transparent; color: #f3f5f3; text-align: left; }
.relationship-node:is(button):hover { background: #202b28; }
.body-map-dialog { width: min(900px, calc(100vw - 24px)); }
.body-map-layout { display: grid; grid-template-columns: minmax(340px, 1fr) 330px; min-height: 560px; }
.body-figure { display: grid; place-items: center; min-height: 560px; padding: 20px; background: #101817; }
.body-figure svg { width: min(100%, 430px); height: 520px; }
.body-outline { fill: rgba(255,255,255,.035); stroke: #56645f; stroke-width: 2; stroke-linejoin: round; }
.body-hotspot { cursor: pointer; }
.body-hotspot circle { fill: #101817; stroke: #78928a; stroke-width: 2; }
.body-hotspot text { fill: #91a09b; font: 9px var(--sans); }
.body-hotspot:hover circle, .body-hotspot:focus circle { stroke: #fff; stroke-width: 3; }
.body-hotspot.is-active circle { fill: url(#body-spectrum); stroke: #fff; stroke-width: 3; }
.body-hotspot.is-active text { fill: #fff; font-weight: 700; }
#body-map-detail { overflow: auto; padding: 22px; border-left: 1px solid var(--line); }
#body-map-detail h2 { font-size: 20px; }
.body-peptide-list { display: grid; margin-top: 16px; border-top: 1px solid var(--line); }
.body-peptide-list button { display: grid; gap: 2px; min-height: 52px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.body-peptide-list button:hover, .body-peptide-list button.is-active { background: var(--surface-2); }
.body-peptide-list button span { color: var(--faint); font: 9px var(--mono); }
.mobile-more-dialog { width: min(430px, calc(100vw - 24px)); }
.mobile-more-dialog nav { display: grid; padding: 12px; }
.mobile-more-dialog nav button { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: 24px; max-width: calc(100vw - 32px); padding: 9px 13px; color: #fff; background: #171b1a; border-radius: 7px; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity 150ms ease, transform 150ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 190px 1fr auto; }
  .primary-nav a { padding-inline: 7px; font-size: 11px; }
  .search-trigger { min-width: 38px; width: 38px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .explore-layout, .explore-layout.has-selection { grid-template-columns: 220px minmax(420px, 1fr); }
  .record-panel { display: none; }
  .molecule-view, .target-view { grid-template-columns: 224px minmax(450px, 1fr) 285px; }
  .compare-tray { left: 242px; right: 302px; }
}

@media (max-width: 920px) {
  :root { --header-h: 58px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar { grid-template-columns: 1fr auto; padding: 0 14px; }
  .brand img { width: 28px; height: 32px; }
  .primary-nav { display: none; }
  .topbar-actions #collection-button { display: none; }
  .mobile-nav { position: fixed; z-index: 100; inset: auto 0 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 98%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
  .mobile-nav a, .mobile-nav button { display: grid; place-content: center; gap: 1px; min-height: 0; padding: 4px; border: 0; border-radius: 0; background: transparent; color: var(--ink); opacity: .76; font-size: 12px; text-align: center; text-decoration: none; }
  .mobile-nav span { display: grid; place-items: center; min-height: 20px; font: 16px var(--mono); }
  .mobile-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .mobile-nav .is-active { color: var(--accent-ink); opacity: 1; font-weight: 700; box-shadow: inset 0 2px var(--accent); }
  .brand-masthead { height: 220px; }
  .brand-lockup img { width: 92px; }
  .brand-tagline { font-size: 34px; }
  .explore-intro { grid-template-columns: 1fr; padding: 22px 18px 18px; }
  .corpus-line { grid-column: auto; }
  .explore-layout { display: block; }
  .facet-panel { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .facet-panel .panel-heading, .facet-panel .filter-note { grid-column: 1 / -1; }
  .result-panel { padding-top: 12px; }
  .molecule-view, .target-view { display: grid; grid-template-columns: 188px minmax(430px, 1fr); height: calc(100vh - var(--header-h) - 58px); overflow-x: auto; }
  .peptide-detail, .protein-detail { display: none; }
  .compare-tray { left: 204px; right: 16px; bottom: 72px; }
  .lineage-view { height: auto; display: block; overflow: visible; }
  .lineage-layout { grid-template-columns: 1fr; height: auto; }
  .lineage-stage { height: 540px; }
  .lineage-detail { border-left: 0; border-top: 1px solid var(--line); }
  .view-heading { display: block; padding: 22px 18px 18px; }
  .view-heading .tool-group, .timeline-controls { margin-top: 16px; overflow-x: auto; }
  .community-grid { grid-template-columns: 1fr; padding: 18px; }
  .principles-panel { grid-column: auto; }
  .principles-panel dl { grid-template-columns: 1fr 1fr; }
  .principles-panel dl > div:nth-child(even) { border-right: 0; }
  .share-layout { grid-template-columns: 1fr; }
  .learn-hero { min-height: 390px; padding: 44px 24px; }
  .learn-hero h1 { font-size: clamp(42px, 9vw, 64px); }
  .learn-content > section > header, .learn-policy { grid-template-columns: 1fr; gap: 8px; }
  .learn-route-list button { grid-template-columns: 150px 1fr; gap: 8px 20px; }
  .learn-route-list small { grid-column: 2; }
  .learn-policy > div { grid-template-columns: 1fr; }
  .learn-policy p, .learn-policy p + p { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .lineage-layout { height: auto; min-height: 0; }
  .contributor-layout { height: auto; grid-template-columns: 300px minmax(0, 1fr); }
  .contributor-list, .contributor-detail { height: 560px; }
}

@media (max-width: 620px) {
  h1 { font-size: 27px; }
  .topbar .brand > span > span { display: none; }
  .topbar-actions { gap: 5px; }
  .topbar .icon-button { width: 44px; height: 44px; }
  .topbar .search-trigger { width: 44px; height: 44px; min-width: 44px; }
  .brand-masthead { height: 150px; }
  .brand-chemistry { width: 150%; max-width: none; transform: translateX(-16.5%); }
  .brand-lockup { gap: 11px; }
  .brand-lockup img { width: 60px; }
  .brand-tagline { font-size: 22px; letter-spacing: -.03em; }
  .results-toolbar select { min-height: 44px; }
  .result-meta { gap: 6px 9px; font-size: 12px; line-height: 1.45; }
  .evidence-mark { font-weight: 700; }
  .inline-tag { font-size: 11px; }
  .corpus-line { gap: 5px 11px; font-size: 12px; line-height: 1.5; }
  .atlas-search { min-width: 0; }
  .atlas-search kbd { display: none; }
  .facet-panel { display: none; }
  .results-toolbar { padding-inline: 14px; }
  .result-item button { padding-inline: 14px; }
  .result-item h3 { display: block; overflow: visible; }
  .result-open-cue { padding: 5px 0; font-size: 12px; }
  .molecule-view, .target-view { display: block; height: auto; overflow: visible; }
  .catalog-panel, .target-list-panel { height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .catalog-panel > input, .target-list-panel > input { min-height: 44px; }
  .segmented { min-height: 42px; }
  .segmented button { min-height: 40px; font-size: 11px; }
  .peptide-option.is-active, .protein-option.is-active { border-left: 3px solid var(--accent); }
  .peptide-option small, .protein-option small { font-size: 10px; }
  .peptide-option > span:last-child, .protein-option > span:last-child { font-size: 11px; }
  .molecule-workspace, .protein-workspace { height: calc(100vh - var(--header-h) - 58px); min-height: 540px; }
  .peptide-detail, .protein-detail { display: block; max-height: none; overflow: visible; padding: 18px; border-top: 1px solid var(--line); border-left: 0; }
  .peptide-detail .button-row button, .protein-detail .button-row button { min-height: 44px; }
  .workspace-toolbar { padding-inline: 12px; }
  .workspace-toolbar .tool-group button:nth-last-child(-n+2) { display: none; }
  .workspace-toolbar .tool-group button { min-height: 44px; padding-inline: 11px; }
  .stage-instructions { top: 12px; left: 12px; right: 12px; overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
  .stage-status { top: 32px; left: 12px; right: 12px; overflow: hidden; font-size: 9px; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
  .residue-card { min-width: 64px; padding: 9px; }
  .structure-disclaimer { right: 12px; max-width: none; }
  .compare-tray { left: 12px; right: 12px; bottom: 70px; }
  #compare-items, .compare-tray > div:first-child span { display: none; }
  .view-heading { padding: 20px 14px 16px; }
  .lineage-stage { height: 460px; }
  .lineage-view .tool-group button { min-height: 44px; font-size: 11px; }
  .timeline-controls select { min-height: 44px; }
  .timeline-chart { padding-inline: 14px; }
  .timeline-readout { padding-inline: 14px; }
  .timeline-stream { padding-inline: 14px; }
  .timeline-item { grid-template-columns: 54px 1fr; gap: 10px; }
  .timeline-item > span { display: none; }
  .community-grid { padding-inline: 12px; }
  .community-view button, .community-view input, .community-view select { min-height: 44px; }
  .principles-panel dl { grid-template-columns: 1fr; }
  .principles-panel dl > div { border-right: 0; }
  .search-dialog { transform: none; }
  .search-result { grid-template-columns: 50px 1fr; }
  .search-result > span:last-child { display: none; }
  .search-dialog footer span:last-child { display: none; }
  .body-map-layout { grid-template-columns: 1fr; max-height: calc(100vh - 130px); overflow: auto; }
  .body-figure { min-height: 390px; padding: 10px; }
  .body-figure svg { height: 370px; }
  #body-map-detail { border-left: 0; border-top: 1px solid var(--line); }
  .path-item { grid-template-columns: 22px 1fr; }
  .path-actions { grid-column: 2; }
  .learn-hero { min-height: 410px; align-items: end; padding: 34px 16px; background-position: 58% center; }
  .learn-hero::before { background: linear-gradient(90deg, rgba(3,7,7,.88), rgba(4,9,10,.72)), linear-gradient(0deg, rgba(2,6,6,.76), rgba(5,8,12,.42)); }
  .learn-hero h1 { font-size: 42px; }
  .learn-hero p { font-size: 14px; line-height: 1.55; }
  .learn-hero .button-row { display: grid; }
  .learn-hero button { width: 100%; }
  .learn-corpus-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .learn-content { padding-inline: 14px; }
  .learn-content > section { padding-block: 36px; }
  .learn-route-list button { min-height: 0; grid-template-columns: 1fr; gap: 5px; padding: 16px 2px; }
  .learn-route-list small { grid-column: auto; }
  .learn-school-grid { grid-template-columns: 1fr; }
  .learn-school-grid article, .learn-school-grid article + article { padding: 22px 0; border-left: 0; }
  .learn-school-grid article + article { border-top: 1px solid var(--line); }
  .learn-school-grid article > p, .learn-person-list, .learn-latest-records { min-height: 0; }
  .contributor-directory { padding: 34px 12px 70px; }
  .contributor-directory > header { grid-template-columns: 1fr; }
  #contributor-count { grid-column: auto; }
  .contributor-layout { display: block; }
  .contributor-list { height: 310px; border-right: 0; border-bottom: 1px solid var(--line); }
  .contributor-detail { height: auto; min-height: 440px; padding: 20px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
