/* Wiedenheft Lab — "Mountains and Molecules"
   Layout: night-sky bands (hero, page heads, feature bands, footer) carry a gold contour field
   that reads as both mountain topography and cryo-EM density; content sits on a cool paper
   ground in a 1240px grid. Display: Archivo expanded. Reading: Source Serif 4. Data: IBM Plex Mono.
   See docs/design.md. */
:root {
  --paper: #F5F3EE;
  --surface: #FFFEFB;
  --ink: #1C2433;
  --ink-2: #3F4756;
  --muted: #616A78;
  --line: #DEDAD2;
  --line-2: #C9C4B9;
  --link: #1E56B0;
  --night: #46679A;
  --night-2: #55779F;
  --night-deep: #3B5886;
  --specimen: #1E3050;
  --on-night: #FFFFFF;
  --on-night-2: #EEF2F8;
  --gold: #ECAA20;
  --gold-2: #FFE7A3;
  --gold-ink: #1D1400;
  --xray: #2F5F9E;
  --cryo: #B8790A;
  --accent-text: #8A5800;
  --bar: #2F5F9E;
  --todo-bg: #FFF3CF;
  --todo-ink: #6B4300;
  --todo-line: #D9A53A;
  --shadow: 0 1px 2px rgb(10 23 48 / 0.06), 0 8px 24px -12px rgb(10 23 48 / 0.18);

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step-0: 1.0625rem;
  --step-1: clamp(1.15rem, 1.08rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.85rem, 1.4rem + 2vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.5rem + 3.6vw, 4.4rem);
  --step-5: clamp(2.5rem, 1.3rem + 4.8vw, 5.3rem);
  --radius: 6px;
  --gutter: clamp(16px, 4vw, 44px);
  --maxw: 1240px;
  --header-h: 72px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B2A44; --surface: #22344F; --ink: #E9EEF5; --ink-2: #C0CBDA; --muted: #9CA9BC;
    --line: #33476A; --line-2: #435A80; --link: #A6C6F5; --night: #3A5888; --night-2: #46659A; --night-deep: #2E4873;
    --gold: #F0B43A; --gold-2: #F6D27A; --xray: #7FA2DB; --cryo: #BC8314; --accent-text: #E7B04E; --bar: #7FA2DB;
    --todo-bg: #3A2B07; --todo-ink: #F6D47E; --todo-line: #8F6B1D;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B2A44; --surface: #22344F; --ink: #E9EEF5; --ink-2: #C0CBDA; --muted: #9CA9BC;
  --line: #33476A; --line-2: #435A80; --link: #A6C6F5; --night: #3A5888; --night-2: #46659A; --night-deep: #2E4873;
  --gold: #F0B43A; --gold-2: #F6D27A; --xray: #7FA2DB; --cryo: #BC8314; --accent-text: #E7B04E; --bar: #7FA2DB;
  --todo-bg: #3A2B07; --todo-ink: #F6D47E; --todo-line: #8F6B1D;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -12px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}
/* Night surfaces re-map the text tokens so every component reads correctly on them. */
.site-header, .hero, .page-head, .band-night, .explorer-band, .site-footer {
  --ink: var(--on-night); --ink-2: var(--on-night-2); --muted: #E3E9F2;
  --line: rgb(255 255 255 / 0.25); --line-2: rgb(255 255 255 / 0.4);
  --link: var(--gold-2); --surface: var(--night-2); --bar: var(--gold); --xray: #5F8BD3; --cryo: #BC8314; --accent-text: var(--gold-2);
  color: var(--ink);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--serif);
  font-optical-sizing: auto; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, picture, canvas, svg { display: block; max-width: 100%; }
picture img { width: 100%; height: 100%; object-fit: cover; }
a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--sans); font-stretch: 112%; font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 105%; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }
.i { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.12em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: var(--radius); font: 700 1rem var(--sans); }
.skip:focus { top: 12px; }
.wrap {
  width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.eyebrow {
  font: 500 0.78rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); }
.crumbs::before { display: none; }
.eyebrow a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.45em; }
.eyebrow a:hover { color: var(--ink); }
.eyebrow .sep { opacity: 0.5; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 64ch; }
.prose { max-width: 66ch; }
.prose p + p { margin-top: 0.9em; }
.note { margin-top: 1.25rem; }
.text-link { font: 600 1rem/1.3 var(--sans); text-decoration: none; display: inline-flex; align-items: center; gap: 0.45em; }
.text-link:hover { text-decoration: underline; }
.pdb { font-family: var(--mono); font-size: 0.82em; font-weight: 500; letter-spacing: 0.02em; }
.num { font-family: var(--mono); font-weight: 500; color: var(--accent-text); font-size: 0.85em; }

/* ---------------------------------------------------------------- placeholders */
.todo {
  display: inline; background: var(--todo-bg); color: var(--todo-ink); border: 1px dashed var(--todo-line);
  border-radius: 4px; padding: 0.08em 0.45em; font: 400 0.8em/1.75 var(--mono);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.todo::before { content: "TO ADD · "; font-weight: 500; letter-spacing: 0.04em; }
.ph {
  margin: 0; width: 100%; max-width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 0.6rem; text-align: center; padding: 1.25rem; border: 2px dashed var(--todo-line); border-radius: 10px;
  color: var(--todo-ink); background: repeating-linear-gradient(-45deg, var(--ph-stripe, var(--todo-bg)) 0 12px, transparent 12px 24px);
}
.hero .ph, .page-head .ph, .band-night .ph { --ph-stripe: rgb(240 180 58 / 0.12); }
.ph-tag { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; background: var(--todo-bg); padding: 0.45em 0.7em; border-radius: 3px; border: 1px solid var(--todo-line); }
.ph-label { font: 400 0.92rem/1.4 var(--sans); max-width: 30ch; background: var(--todo-bg); padding: 0.3em 0.6em; border-radius: 3px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 48px; padding: 0.7em 1.35em;
  font: 700 1rem/1.15 var(--sans); font-stretch: 105%; text-decoration: none; border-radius: 999px;
  border: 1.5px solid transparent; transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--gold); color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--link); color: #fff; }
.btn-night { background: var(--night); color: #fff; }
.btn-night:hover { background: #55779F; }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--night); border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; padding-top: env(safe-area-inset-top, 0px); }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -18px rgb(0 0 0 / 0.7); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.95rem; color: var(--ink); margin-right: auto; min-width: 0; }
.brand a { color: inherit; text-decoration: none; display: flex; align-items: center; min-width: 0; }
.brand-msu { color: var(--ink); flex: none; }
.brand-lab { gap: 0.7rem; }
.lab-logo { width: auto; height: 42px; flex: none; border-radius: 9px; background: #fff; padding: 3px 7px; box-sizing: border-box; }
.brand-lab:hover .brand-name { opacity: 0.85; }
.msu-logo { width: 128px; height: auto; flex: none; }
.msu-word { fill: currentColor; }
.msu-gold { fill: #ECAA20; }
.msu-gold2 { fill: #EDD57C; }
.brand-sep { width: 1px; height: 34px; background: var(--line-2); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font: 800 1.22rem/1.05 var(--sans); font-stretch: 118%; letter-spacing: -0.01em; white-space: nowrap; }
.brand-dept { font: 400 0.66rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav ul { list-style: none; display: flex; gap: 0; }
.site-nav a { display: block; white-space: nowrap; padding: 0.55rem 0.54rem; text-decoration: none; color: var(--ink-2); font: 600 0.95rem/1.2 var(--sans); border-radius: 999px; transition: color 0.15s, background-color 0.15s; }
.site-nav a:hover { color: var(--ink); background: rgb(255 255 255 / 0.07); }
.site-nav ul a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.site-nav .util { display: inline-flex; align-items: center; gap: 0.45em; border: 1px solid var(--line-2); color: var(--gold-2); padding: 0.5rem 0.9rem; font-size: 0.88rem; }
.site-nav .util:hover, .site-nav .util[aria-current="page"] { border-color: var(--gold); background: rgb(0 0 0 / 0.14); color: var(--gold-2); }
.nav-toggle { display: none; }
/* light / dark switch: shows the mode it switches to */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin-left: -0.75rem;
  /* on narrow screens it sits beside the menu button */
  cursor: pointer; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; color: var(--gold-2);
  transition: border-color 0.15s, background-color 0.15s;
}
.theme-toggle:hover { border-color: var(--gold); background: rgb(0 0 0 / 0.14); }
.theme-toggle .i { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.no-js .theme-toggle { display: none; }
@media (max-width: 1330px) {
  .theme-toggle { margin-left: 0; width: 46px; height: 46px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; cursor: pointer;
    border: 1px solid var(--line-2); background: transparent; border-radius: 999px; color: var(--ink);
  }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s ease; border-radius: 2px; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0.75rem;
    background: var(--night); border-bottom: 1px solid var(--line); box-shadow: 0 30px 40px -20px rgb(0 0 0 / 0.6);
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-right, 0px)) 1.5rem max(var(--gutter), env(safe-area-inset-left, 0px));
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 0.95rem 0.25rem; font-size: 1.15rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav ul a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); padding-left: 0.9rem; }
  .site-nav .util { align-self: flex-start; }
  .no-js .site-nav { display: flex; position: static; box-shadow: none; }
}
@media (max-width: 560px) {
  .msu-logo { width: 84px; }
  .lab-logo { height: 30px; padding: 2px 5px; border-radius: 7px; }
  .brand { gap: 0.6rem; }
  .brand-lab { gap: 0.5rem; }
  .brand-sep { height: 28px; }
  .brand-name { font-size: 0.98rem; }
  .brand-dept { display: none; }
}

/* ---------------------------------------------------------------- contour canvases */
.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero > :not(.contours), .page-head > :not(.contours), .band-night > :not(.contours), .site-footer > :not(.contours) { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- hero */
.hero { background: var(--night); position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero::after, .page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1; background: linear-gradient(90deg, var(--gold), rgb(236 170 32 / 0.25) 55%, transparent); }
.contours { color: rgb(240 180 58); --c-major: 0.34; --c-minor: 0.14; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.hero h1 { font-size: var(--step-5); font-stretch: 116%; line-height: 0.98; margin-top: 1.1rem; max-width: 13ch; }
.hero-lede { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.1rem; }
.hero-visual { position: relative; }
.hero-stats { padding-bottom: clamp(2rem, 4vw, 3rem); }
.stats { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats li + li { border-left: 1px solid var(--line); }
.stats a { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem 1.25rem 0.25rem; text-decoration: none; color: var(--ink); height: 100%; }
.stats li:first-child a { padding-left: 0; }
.stats a:hover .stat-n { color: var(--gold-2); }
.stat-n { font: 800 clamp(2rem, 1.4rem + 2.2vw, 3.3rem)/1 var(--sans); font-stretch: 112%; letter-spacing: -0.03em; transition: color 0.15s; }
.stat-l { font: 400 0.9rem/1.35 var(--sans); color: var(--ink-2); }

/* ---------------------------------------------------------------- molecule viewer */
.mol { margin: 0; --mol-bg: var(--specimen); }
.mol-stage { position: relative; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--mol-bg); }
.mol-poster { position: absolute; inset: 0; transition: opacity 0.4s ease; }
.mol-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.mol-canvas.dragging { cursor: grabbing; }
.mol.ready .mol-poster { opacity: 0; }
.mol:not(.ready) .mol-canvas { pointer-events: none; }
.mol-hint {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 0.5em;
  font: 400 0.72rem/1 var(--mono); letter-spacing: 0.04em; color: #C9D5EA; background: rgb(4 11 28 / 0.65);
  padding: 0.55em 0.8em; border-radius: 999px; opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.mol.ready .mol-stage:hover .mol-hint, .mol.ready .mol-canvas:focus-visible ~ .mol-hint { opacity: 1; }
.mol-cap { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.9rem; }
.mol-id { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55em; font: 400 0.78rem/1.4 var(--mono); color: var(--muted); }
.mol-id .pdb { color: var(--gold-2); font-size: 1em; }
.mol-name { font: 600 0.98rem/1.35 var(--sans); color: var(--ink); }
.mol-hero { --mol-bg: transparent; }
.mol-hero .mol-stage { border-radius: 0; overflow: visible; }
.mol-hero .mol-poster { opacity: 0.0001; }
.no-js .mol-hero .mol-poster { opacity: 1; border-radius: 50%; overflow: hidden; }
.mol-hero .mol-cap { border-left: 2px solid var(--gold); padding-left: 0.9rem; margin-top: 0; max-width: 36ch; }
.m-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.m-dot.xray { background: var(--xray); }
.m-dot.cryo { background: var(--cryo); }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-flush-top { padding-top: 0; }
.section-surface { background: var(--surface); border-block: 1px solid var(--line); }
.band-night { background: var(--night); position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head > div { display: flex; flex-direction: column; gap: 0.9rem; }
.section-head-tight { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 1.5rem; }
.section-head-tight h2 { font-size: var(--step-2); }
.section-intro { color: var(--ink-2); max-width: 54ch; font-size: 1.06rem; }
.section-link { font: 600 0.95rem/1.2 var(--sans); text-decoration: none; white-space: nowrap; display: inline-flex; gap: 0.4em; align-items: center; }
.section-link::after { content: "→"; }
.section-link:hover { text-decoration: underline; }
.small-h { font-size: var(--step-1); margin-bottom: 1.4rem; }
.band-foot { margin-top: 2.5rem; }

/* ---------------------------------------------------------------- page heads */
.page-head { background: var(--night); position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(2.75rem, 6vw, 5rem); }

.page-head h1 { margin-top: 1rem; max-width: 18ch; font-stretch: 116%; }
.page-head .lede { margin-top: 1.25rem; }
.page-head .note { margin-top: 1.5rem; }
.theme-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.theme-nav a { display: inline-flex; gap: 0.55em; align-items: center; padding: 0.55rem 1rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); text-decoration: none; font: 600 0.92rem/1.2 var(--sans); }
.theme-nav a:hover { border-color: var(--gold); }

/* ---------------------------------------------------------------- home: themes */
.theme-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.75rem); }
.theme-card {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tc-visual { position: relative; background: var(--specimen); min-height: 260px; }
.tc-visual .tc-img img { object-fit: contain; }
.tc-visual .tc-img { position: absolute; inset: 0; transition: transform 0.5s ease; }
.theme-card:hover .tc-img { transform: scale(1.05) rotate(-2deg); }
.tc-num { position: absolute; left: 12px; top: 10px; font: 500 0.8rem/1 var(--mono); color: var(--gold-2); }
.tc-body { display: flex; flex-direction: column; gap: 0.6rem; padding: clamp(1.1rem, 2vw, 1.6rem); min-width: 0; }
.tc-kicker { font: 500 0.72rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tc-body h3 { font-size: var(--step-2); font-stretch: 110%; font-weight: 800; }
.tc-body p:not(.tc-kicker):not(.tc-meta) { color: var(--ink-2); font-size: 0.98rem; }
.tc-meta { margin-top: auto; padding-top: 0.6rem; display: flex; justify-content: space-between; align-items: center; font: 500 0.78rem/1 var(--mono); color: var(--muted); }
.tc-meta .i { color: var(--link); width: 1.3em; height: 1.3em; transition: transform 0.2s; }
.theme-card:hover .tc-meta .i { transform: translateX(4px); }

/* ---------------------------------------------------------------- home: pipeline */
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.pipe-step { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.pipe-visual { position: relative; }
.pipe-canvas { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #0B0D12; outline: 1px solid var(--line); }
.pipe-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pipe-step .mol-stage { outline: 1px solid var(--line); }
.pipe-text { display: flex; flex-direction: column; gap: 0.55rem; }
.pipe-n { display: flex; align-items: baseline; gap: 0.7rem; font: 800 var(--step-1)/1.2 var(--sans); font-stretch: 110%; color: var(--ink); }
.pipe-n span { font: 500 0.8rem/1 var(--mono); color: var(--gold); }
.pipe-text > p:not(.pipe-n):not(.pipe-tools) { color: var(--ink-2); font-size: 0.97rem; }
.pipe-tools a { font: 400 0.8rem/1.4 var(--mono); color: var(--gold-2); text-decoration: none; display: inline-flex; gap: 0.5em; align-items: center; }
.pipe-tools a:hover { text-decoration: underline; }
.pipe-step:not(:last-child) .pipe-visual::after {
  content: ""; position: absolute; right: calc(-1 * clamp(1rem, 2vw, 1.5rem)); top: 50%; width: clamp(1rem, 2vw, 1.5rem); height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---------------------------------------------------------------- home: recent */
.recent { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.paper-cards { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.paper-card { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; position: relative; transition: border-color 0.2s, box-shadow 0.2s; }
.paper-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.paper-journal { display: flex; justify-content: space-between; gap: 1rem; font: italic 600 0.86rem/1.3 var(--serif); color: var(--accent-text); }
.paper-journal span:last-child { font: 500 0.76rem/1.3 var(--mono); font-style: normal; }
.paper-journal span:last-child { color: var(--muted); }
.paper-title { font: 700 1.05rem/1.3 var(--sans); color: var(--ink); text-decoration: none; letter-spacing: -0.005em; }
.paper-title::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.paper-title:hover { color: var(--link); }
.paper-authors { margin-top: auto; font: 400 0.86rem/1.45 var(--sans); color: var(--muted); }
.paper-authors b { color: var(--ink-2); font-weight: 650; }
.latest-structs { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.latest-structs a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: center; text-decoration: none; color: var(--ink); padding: 0.5rem; margin: -0.5rem; border-radius: 10px; transition: background-color 0.15s; }
.latest-structs a:hover { background: var(--surface); }
.ls-img { width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--specimen); }
.ls-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ls-body .pdb { color: var(--accent-text); font-size: 0.78rem; }
.ls-name { font: 700 1rem/1.3 var(--sans); }
.ls-meta { font: 400 0.78rem/1.4 var(--mono); color: var(--muted); }

/* ---------------------------------------------------------------- home: team */
.team { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.team-text { display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start; }
.team-text > p:not(.eyebrow) { color: var(--ink-2); }
.team-counts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; font: 400 0.95rem/1.3 var(--sans); color: var(--ink-2); }
.team-counts li { display: flex; align-items: baseline; gap: 0.4rem; }
.team-counts .n { font: 800 1.6rem/1 var(--sans); font-stretch: 112%; color: var(--ink); }
.faces { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem 0.75rem; width: 100%; padding-block: 0.4rem; }
.faces a { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center; text-decoration: none; color: var(--ink); padding: 0.3rem; border-radius: 8px; }
.faces a:hover { background: var(--paper); }
.face { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--line); }
.face img { object-position: 50% 20%; }
.face-name { font: 600 0.85rem/1.2 var(--sans); min-width: 0; align-self: end; }
.face-role { font: 400 0.72rem/1.25 var(--sans); color: var(--muted); min-width: 0; align-self: start; }

/* ---------------------------------------------------------------- alumni */
.alumni-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.map-fig { margin: 0; }
.alumni-map { width: 100%; height: auto; overflow: visible; }
.am-land { fill: #6283B3; }
.am-border { fill: none; stroke: var(--night); stroke-width: 0.8; }
.am-mt { fill: #86A4CF; stroke: var(--gold); stroke-width: 1; }
.am-arc { fill: none; stroke: var(--gold); stroke-width: 1.4; opacity: 0.75; stroke-linecap: round; }
.js .am-arc { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .map-fig.in .am-arc { animation: draw 1.6s cubic-bezier(.3,.6,.2,1) forwards; }
.am-arc:nth-child(3n + 1) { animation-delay: 0.1s !important; }
.am-arc:nth-child(3n + 2) { animation-delay: 0.25s !important; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.am-hit { fill: transparent; }
.am-dot { fill: var(--gold); stroke: var(--night); stroke-width: 2; }
.am-pt { cursor: pointer; outline: none; }
.am-pt:hover .am-dot, .am-pt:focus-visible .am-dot { fill: var(--gold-2); }
.am-pt:focus-visible .am-hit { stroke: var(--gold); stroke-width: 2; }
.am-home .am-dot { fill: #fff; }
.am-n { fill: var(--night); font: 700 13px var(--sans); pointer-events: none; }
.am-label { fill: var(--on-night-2); font: 500 17px var(--sans); pointer-events: none; }
.am-label-home { fill: #fff; font-weight: 800; font-size: 20px; }
.am-label-abroad { fill: var(--gold-2); }
.map-cap { margin-top: 0.9rem; font: 400 0.8rem/1.5 var(--mono); color: var(--muted); }
.alumni-side { display: flex; flex-direction: column; gap: 1.25rem; }
.bars-fig { margin: 0; }
.chart-cap { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1rem; }
.chart-title { font: 700 1rem/1.3 var(--sans); color: var(--ink); }
.chart-sub { font: 400 0.82rem/1.4 var(--sans); color: var(--muted); }
.hbars { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.bar-row { display: grid; grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr) 2rem; gap: 0.75rem; align-items: center; }
.bar-label { font: 400 0.88rem/1.25 var(--sans); color: var(--ink-2); }
.bar-track { height: 12px; display: block; }
.bar { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 4px; }
.js .bars-fig .bar { transform-origin: left; transform: scaleX(0); transition: transform 0.9s cubic-bezier(.3,.6,.2,1); }
.js .bars-fig.in .bar { transform: scaleX(1); }
.bar-v { font: 500 0.9rem/1 var(--mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.fac-h { font-size: 1rem; margin-top: 0.75rem; }
.fac-list { list-style: none; display: flex; flex-direction: column; }
.fac-list li { display: flex; flex-direction: column; gap: 0.05rem; padding-block: 0.55rem; border-top: 1px solid var(--line); }
.al-name { font: 600 0.98rem/1.3 var(--sans); }
.al-now { font: 400 0.88rem/1.4 var(--sans); color: var(--ink-2); }

/* ---------------------------------------------------------------- join band (home) */
.join-band { background: var(--gold); color: var(--gold-ink); --accent-text: var(--gold-ink); --ink: var(--gold-ink); --ink-2: #3D2C00; --muted: #5C4300; --line: rgb(29 20 0 / 0.2); }
.join-band .eyebrow::before { background: var(--gold-ink); }
.join-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3rem, 6vw, 5rem); align-items: center; }
.join-grid h2 { margin-top: 0.9rem; font-size: var(--step-3); max-width: 16ch; }
.join-grid > div > p:not(.eyebrow) { margin-block: 1.1rem 1.6rem; max-width: 50ch; color: var(--ink-2); }
.join-stages { list-style: none; display: flex; flex-direction: column; }
.join-stages a { display: grid; grid-template-columns: 12rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding-block: 1.1rem; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 400 0.98rem/1.4 var(--sans); }
.join-stages li:last-child a { border-bottom: 1px solid var(--line); }
.join-stages a::after { content: "→"; font-weight: 700; transition: transform 0.2s; }
.join-stages a:hover::after { transform: translateX(4px); }
.js-h { font: 800 1.1rem/1.2 var(--sans); font-stretch: 110%; }

/* ---------------------------------------------------------------- funders */
.funders { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0 2rem; }
.funders li { display: flex; flex-direction: column; gap: 0.15rem; padding-block: 0.85rem; border-top: 1px solid var(--line); }
.fund-name { font: 600 0.98rem/1.35 var(--sans); }
.fund-name a { color: var(--ink); }
.fund-detail { font: 400 0.76rem/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- research */
.arms-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.arms-text { display: flex; flex-direction: column; gap: 1rem; }
.arms-text p:not(.eyebrow) { color: var(--ink-2); }
.arms-fig { margin: 0; }
.arms-fig svg { width: 100%; height: auto; overflow: visible; }
.ad-cell-a { stop-color: var(--surface); }
.ad-cell-b { stop-color: var(--paper); }
.ad-wall { fill: none; stroke: var(--line-2); stroke-width: 10; }
.ad-membrane { stroke: var(--ink-2); stroke-width: 1.5; }
.ad-capsid { fill: var(--surface); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.ad-capsid-d { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.ad-tail { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.ad-sheath { stroke: var(--ink); stroke-width: 1.4; }
.ad-base { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.ad-fiber { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.ad-dna { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.ad-cut { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.ad-cplx { fill: none; stroke: var(--xray); stroke-width: 24; stroke-linecap: round; }
.ad-guide { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.ad-attack { fill: none; stroke: var(--xray); stroke-width: 2.2; stroke-dasharray: 3 5; stroke-linecap: round; }
.ad-arrowhead { fill: var(--xray); }
.ad-acr { fill: var(--cryo); stroke: var(--surface); stroke-width: 2.5; stroke-linejoin: round; }
.ad-pill { fill: var(--surface); stroke: var(--xray); stroke-width: 1.5; }
.ad-pill-more { stroke: var(--line-2); stroke-dasharray: 3 3; }
.ad-pill-t { fill: var(--ink-2); font: 500 11.5px var(--mono); }
.ad-mini { fill: var(--muted); font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.ad-num { fill: var(--ink); }
.ad-num-t { fill: var(--paper); font: 700 12px var(--sans); }
.ad-call-t { fill: var(--ink); font: 600 13.5px var(--sans); }
.ad-lead { stroke: var(--muted); stroke-width: 1; }
.ad-cap { fill: var(--muted); font: 400 11.5px var(--sans); }

.themes { display: flex; flex-direction: column; gap: clamp(4rem, 8vw, 7rem); }
.theme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; scroll-margin-top: calc(var(--header-h) + 24px); }
.theme:nth-child(even) .theme-visual { order: 2; }
.theme-visual { display: flex; flex-direction: column; gap: 0.9rem; position: sticky; top: calc(var(--header-h) + 24px); }
.mol-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mol-tabs button {
  display: inline-flex; align-items: baseline; gap: 0.5em; cursor: pointer; text-align: left; max-width: 100%;
  padding: 0.5rem 0.85rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); border-radius: 999px; font: 500 0.85rem/1.3 var(--sans);
}
.mol-tabs button .pdb { color: var(--accent-text); }
.mol-tabs button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.mol-tabs .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24ch; }
.theme-note { font: 400 0.8rem/1.5 var(--mono); color: var(--muted); }
.theme-text { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.theme-text h2 { font-size: var(--step-3); }
.theme-text .lede { color: var(--ink); }
.theme-text .body { color: var(--ink-2); }
.kp-h { font: 500 0.8rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.75rem; }
.key-papers { list-style: none; display: flex; flex-direction: column; }
.key-papers li { display: flex; flex-direction: column; gap: 0.15rem; padding-block: 0.75rem; border-top: 1px solid var(--line); }
.key-papers li:last-child { border-bottom: 1px solid var(--line); }
.key-papers a { font: 600 1rem/1.35 var(--sans); color: var(--ink); text-decoration: none; }
.key-papers a:hover { color: var(--link); text-decoration: underline; }
.key-papers span { font: 400 0.8rem/1.4 var(--mono); color: var(--muted); }
.methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem clamp(1.25rem, 2.5vw, 2.25rem); }
.method { display: flex; flex-direction: column; gap: 0.55rem; padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.m-n { font: 500 0.8rem/1 var(--mono); color: var(--accent-text); }
.method p:not(.m-n) { color: var(--ink-2); font-size: 0.97rem; }
.movies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.movie { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.movie-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.movie-thumb picture { height: 100%; transition: transform 0.4s ease; }
.movie-thumb:hover picture { transform: scale(1.04); }
.play { position: absolute; left: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.6); }
.play::after { content: ""; position: absolute; left: 18px; top: 14px; border-left: 14px solid var(--gold-ink); border-block: 9px solid transparent; }
.movie h3 { font-size: 1.02rem; line-height: 1.3; font-stretch: 100%; }
.movie h3 a { color: var(--ink); text-decoration: none; }
.movie h3 a:hover { text-decoration: underline; }
.movie-desc summary { cursor: pointer; font: 500 0.85rem/1.3 var(--sans); color: var(--link); }
.movie-desc p { margin-top: 0.5rem; font-size: 0.92rem; color: var(--ink-2); }
.pdbs { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; font: 500 0.75rem/1 var(--mono); }
.pdbs > span { color: var(--muted); letter-spacing: 0.08em; margin-right: 0.2rem; }
.pdbs a { padding: 0.35em 0.55em; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pdbs a:hover { border-color: var(--link); }

/* ---------------------------------------------------------------- structures page */
.explorer-band { background: var(--night); padding-block: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.explorer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.mol-explorer .mol-stage { border-radius: 14px; outline: 1px solid var(--line); }
.explorer-info { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ex-kicker { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-2); }
.ex-title { font-size: var(--step-3); }
.ex-facts { margin: 0.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ex-facts div { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.ex-facts dt { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ex-facts dd { margin: 0.45rem 0 0; font: 700 1.15rem/1.2 var(--sans); }
.ex-paper { color: var(--ink-2); }
.ex-journal { font: 400 0.82rem var(--mono); color: var(--muted); white-space: nowrap; }
.chart { margin: 0; }
.chart-box { overflow-x: auto; }
.chart svg { width: 100%; height: auto; min-width: 560px; max-width: none; overflow: visible; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font: 400 0.85rem/1.3 var(--sans); color: var(--ink-2); margin-top: 0.35rem; }
.chart .legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { stroke: var(--line-2); stroke-width: 1; }
.ch-tick { fill: var(--muted); font: 400 11.5px var(--mono); }
.ch-val { fill: var(--ink); font: 600 12px var(--mono); }
.ch-bar { fill: var(--bar); transition: opacity 0.15s; }
.ch-target { fill: transparent; }
.ch-hit { outline: none; }
.ch-hit[data-show] { cursor: pointer; }
.chart-pubs .ch-hit:hover .ch-bar, .chart-pubs .ch-hit:focus-visible .ch-bar { opacity: 0.72; }
.ch-hit:focus-visible .ch-target { stroke: var(--gold); stroke-width: 2; }
.ch-dot { stroke: var(--paper); stroke-width: 2; transition: r 0.15s; }
.ch-dot.xray { fill: var(--xray); }
.ch-dot.cryo { fill: var(--cryo); }
.ch-hit:hover .ch-dot, .ch-hit:focus-visible .ch-dot, .ch-hit.active .ch-dot { r: 8; }
.ch-note-line { stroke: var(--line-2); stroke-width: 1; }
.ch-note { fill: var(--ink-2); font: 500 11.5px var(--sans); }
.tip {
  position: fixed; z-index: 80; pointer-events: none; max-width: 300px; padding: 0.55rem 0.75rem; border-radius: 8px;
  background: #0A1730; color: #EEF2F8; font: 400 0.82rem/1.4 var(--sans); box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.5);
  opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; border: 1px solid #22365C;
}
.tip.on { opacity: 1; transform: none; }
.tip b { font-weight: 700; display: block; margin-bottom: 0.25rem; }
.tip ul { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; color: #C3CEE0; }
.s-tools { margin-bottom: 1.5rem; }
.s-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1.25rem; }
.s-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; scroll-margin-top: calc(var(--header-h) + 24px); }
.s-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.s-card.active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.s-thumb { display: block; padding: 0; border: 0; background: var(--specimen); aspect-ratio: 1 / 1; cursor: pointer; overflow: hidden; width: 100%; }
.s-thumb picture { transition: transform 0.4s ease; height: 100%; }
.s-card:hover .s-thumb picture { transform: scale(1.05); }
.s-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.s-id { display: flex; align-items: center; gap: 0.5em; font: 400 0.76rem/1.3 var(--mono); color: var(--muted); }
.s-id .pdb { color: var(--ink); font-size: 0.9rem; margin-right: 0.15rem; }
.s-title { font-size: 1rem; line-height: 1.3; font-stretch: 100%; }
.s-meta { font: 400 0.8rem/1.4 var(--sans); color: var(--ink-2); }
.s-links { margin-top: auto; padding-top: 0.4rem; display: flex; gap: 1rem; font: 600 0.82rem/1 var(--sans); }
.s-links a { text-decoration: none; display: inline-flex; gap: 0.3em; align-items: center; }
.s-links a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45em; min-height: 40px; padding: 0.4rem 0.9rem; cursor: pointer;
  font: 600 0.88rem/1 var(--sans); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 999px;
  transition: background-color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--ink-2); }
.chip > span:last-child { font: 400 0.76rem/1 var(--mono); color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] > span:last-child { color: var(--paper); opacity: 0.75; }

/* ---------------------------------------------------------------- people */
.pi { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pi-photo { position: relative; isolation: isolate; }
.pi-photo .portrait, .pi-photo .ph { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; display: block; }
.pi-photo::after { content: ""; position: absolute; inset: auto -14px -14px auto; width: 60%; height: 60%; border: 2px solid var(--gold); border-radius: 12px; z-index: -1; }
.pi-text { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.pull { margin: 0.25rem 0; font: italic 400 clamp(1.8rem, 1.3rem + 2vw, 2.8rem)/1.1 var(--serif); color: var(--accent-text); }
.pull p::before { content: "\201C"; }
.pull p::after { content: "\201D"; }
.links { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font: 600 0.88rem/1.5 var(--sans); }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links-strong { gap: 0.5rem; align-items: center; }
.links-strong a { display: inline-flex; padding: 0.5rem 1rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); }
.links-strong a:hover { border-color: var(--gold); text-decoration: none; }
.section-head .team-counts { justify-content: flex-end; }
.people-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem clamp(1rem, 2.5vw, 2rem); }
.person { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.person-photo { margin-bottom: 0.6rem; }
.person .portrait, .person .ph { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; display: block; background: var(--line); }
.person .portrait img { transition: transform 0.5s ease; }
.person:hover .portrait img { transform: scale(1.03); }
.person .role { font: 500 0.72rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.person h3 { font-size: 1.2rem; }
.bio { font-size: 0.95rem; color: var(--ink-2); line-height: 1.55; }
.bio p + p { margin-top: 0.6em; }
.bio.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bio-toggle { align-self: flex-start; background: none; border: 0; padding: 0.15rem 0; font: 600 0.88rem/1.2 var(--sans); color: var(--link); cursor: pointer; }
.group-photo { margin-top: clamp(2.5rem, 5vw, 4rem); }
.al-tools { margin-bottom: 1.5rem; }
.al-dir { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; }
.al-item { display: flex; flex-direction: column; gap: 0.15rem; padding-block: 0.85rem; border-top: 1px solid var(--line); }
.al-links { font-size: 0.8rem; margin-top: 0.2rem; }

/* ---------------------------------------------------------------- publications */
.chart-pubs { padding: clamp(1rem, 2.5vw, 1.75rem); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.pub-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; margin-bottom: 1rem;
  position: sticky; top: var(--header-h); z-index: 5; background: var(--paper); padding-block: 0.9rem; border-bottom: 1px solid var(--line);
}
.search { flex: 1 1 300px; min-width: 0; position: relative; display: block; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search input {
  width: 100%; min-height: 46px; padding: 0.6rem 1rem 0.6rem 2.6rem; font: 400 1rem var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
}
.search input:focus { outline: 3px solid color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 0; border-color: var(--ink-2); }
.pub-count { font: 400 0.82rem var(--mono); color: var(--muted); margin-left: auto; }
.pub-legend { font: 400 0.85rem/1.4 var(--sans); color: var(--muted); margin-bottom: 2rem; }
.pub-legend b { color: var(--ink); }
.pub-legend u, .pub-authors u { text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.year-group { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.5rem; }
.year-group + .year-group { margin-top: 2.75rem; }
.year { position: sticky; top: calc(var(--header-h) + 90px); align-self: start; display: flex; flex-direction: column; gap: 0.25rem; font: 800 var(--step-3)/1 var(--sans); font-stretch: 112%; color: var(--ink); padding-top: 1.1rem; }
.year-n { font: 400 0.78rem/1 var(--mono); color: var(--muted); letter-spacing: 0; }
.pubs { list-style: none; display: flex; flex-direction: column; }
.pub { padding-block: 1.15rem; border-top: 1px solid var(--line); }
.pub-body { min-width: 0; }
.pub-title { font: 700 1.08rem/1.35 var(--sans); color: var(--ink); text-decoration: none; letter-spacing: -0.005em; }
.pub-title:hover { color: var(--link); text-decoration: underline; }
.pub-authors { margin-top: 0.35rem; font: 400 0.9rem/1.5 var(--sans); color: var(--muted); overflow-wrap: anywhere; }
.pub-authors b { color: var(--ink); font-weight: 700; }
.pub-authors u { color: var(--ink-2); }
.pub-meta { margin-top: 0.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; font: 400 0.88rem/1.4 var(--sans); color: var(--muted); }
.pub-meta a { font-weight: 600; text-decoration: none; }
.pub-meta a:hover { text-decoration: underline; }
.pill { font: 500 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 0.4em 0.6em; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink); }
.pill.preprint { border-color: var(--cryo); color: var(--accent-text); }
.pill.review { border-color: var(--xray); color: var(--xray); }
.pub-empty { color: var(--muted); padding-block: 2rem; font-family: var(--sans); }

/* ---------------------------------------------------------------- join */
.join-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.offer { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.offer li { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.75rem clamp(1rem, 2.5vw, 2rem) 2rem 0; border-bottom: 1px solid var(--line); }
.offer li:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.offer li:not(:nth-child(3n + 1)) { padding-left: clamp(1rem, 2.5vw, 2rem); }
.offer-n { font: 800 clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem)/1 var(--sans); font-stretch: 112%; color: var(--accent-text); letter-spacing: -0.02em; }
.offer p:not(.offer-n) { color: var(--ink-2); font-size: 0.97rem; }
.apply { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.apply-how { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--header-h) + 24px); }
.checklist { list-style: none; counter-reset: c; display: flex; flex-direction: column; gap: 0.7rem; }
.checklist li { counter-increment: c; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.5rem; }
.checklist li::before { content: counter(c, decimal-leading-zero); font: 500 0.82rem/1.9 var(--mono); color: var(--accent-text); }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stage-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.stage-card h3 { font-size: 1.25rem; padding-bottom: 0.8rem; border-bottom: 2px solid var(--gold); }
.stage-card p { color: var(--ink-2); font-size: 0.95rem; }
.fellow-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; font: 500 0.9rem/1.35 var(--sans); }
.fellow-list li { padding-left: 0.85rem; border-left: 2px solid var(--line-2); }
.fellow-list a { text-decoration: none; }
.fellow-list a:hover { text-decoration: underline; }
.train { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); }
.train header { display: flex; flex-direction: column; gap: 1rem; }
.train header p:not(.eyebrow) { color: var(--ink-2); }
/* the lab logo fills the space under the heading; light-ground logo in light mode, gold-LAB outlined logo in dark */
.train-logo { width: min(100%, 360px); height: auto; margin-block: auto; }
.theme-dark-only { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-dark-only { display: block; } :root:not([data-theme="light"]) .theme-light-only { display: none; } }
:root[data-theme="dark"] .theme-dark-only { display: block; }
:root[data-theme="dark"] .theme-light-only { display: none; }
@media (max-width: 900px) { .train .train-logo { display: none !important; } }  /* columns stack: no empty space to fill; beats the theme rules */
.skills { list-style: none; counter-reset: s; display: flex; flex-direction: column; }
.skills li { counter-increment: s; }
.skills a { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.25rem 1rem; padding-block: 1.1rem; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: baseline; }
.skills li:last-child a { border-bottom: 1px solid var(--line); }
.skills a::before { content: counter(s, decimal-leading-zero); grid-row: 1 / 3; font: 500 0.85rem/1.6 var(--mono); color: var(--accent-text); }
.skills a::after { content: "→"; grid-column: 3; grid-row: 1; color: var(--link); transition: transform 0.2s; }
.skills a:hover::after { transform: translateX(4px); }
.skills b { font: 700 1.12rem/1.3 var(--sans); }
.skills span { grid-column: 2; color: var(--ink-2); font-size: 0.97rem; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); }
.two-col > div { display: flex; flex-direction: column; gap: 1rem; }
.two-col h2 { font-size: var(--step-2); }
.highlights { list-style: none; display: flex; flex-direction: column; }
.highlights li { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: 0.75rem; padding-block: 0.85rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.97rem; }
.hl-year { font: 500 0.88rem/1.7 var(--mono); color: var(--accent-text); }
.montana-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.montana-grid > div:first-child { display: flex; flex-direction: column; gap: 1rem; }
.montana-grid p:not(.eyebrow) { color: var(--ink-2); }

/* ---------------------------------------------------------------- outreach, contact */
.outreach { display: flex; flex-direction: column; gap: clamp(3.5rem, 7vw, 5.5rem); }
.out-item { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.out-item:nth-child(even) .out-media { order: 2; }
.out-media .photo { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.out-media .photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.out-text { display: flex; flex-direction: column; gap: 1rem; max-width: 60ch; min-width: 0; }
.out-text p:not(.eyebrow) { color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.out-more { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; }
.out-more > div { display: flex; flex-direction: column; gap: 0.8rem; max-width: 60ch; }
.out-more p:not(.eyebrow) { color: var(--ink-2); }
.transcript { font-size: 1.08rem; max-width: 70ch; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-list { margin: 0; display: flex; flex-direction: column; }
.contact-list div { padding-block: 1.15rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; }
.contact-list div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font: 500 0.74rem/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; font: 500 1.12rem/1.5 var(--sans); }
.contact-map { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.mt-fig { margin: 0; background: var(--night); border-radius: 12px; padding: 1rem; width: 100%; }
.mt-map { width: 100%; height: auto; overflow: hidden; }
.mt-nb { fill: #0B1C40; stroke: var(--night); stroke-width: 1; }
.mt-state { fill: #13295C; stroke: var(--gold); stroke-width: 1.5; }
.mt-dot { fill: var(--gold); }
.mt-ring { fill: none; stroke: var(--gold); opacity: 0.55; }
.mt-ys { fill: #7FA7D9; }
.mt-label { fill: #fff; font: 700 15px var(--sans); }
.mt-label-sm { font: 400 12px var(--sans); fill: #B4C1D6; }
.mt-state-name { fill: #2B4478; font: 800 38px var(--sans); letter-spacing: 0.25em; }

/* ---------------------------------------------------------------- lab handbook (docs) */
.page-head-docs h1 { font-size: var(--step-3); }
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr) 200px; gap: clamp(1.5rem, 3.5vw, 3.5rem); padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem); align-items: start; }
.docnav { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.docnav summary { display: none; }
.docnav-h { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 1.4rem 0 0.6rem; }
.docnav details > .docnav-h:first-of-type { margin-top: 0; }
.docnav ul, .doc-toc ol { list-style: none; display: flex; flex-direction: column; }
.docnav a { display: block; padding: 0.38rem 0.75rem; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font: 500 0.92rem/1.35 var(--sans); }
.docnav a:hover { color: var(--ink); border-left-color: var(--line-2); }
.docnav a[aria-current="page"] { color: var(--ink); border-left-color: var(--gold); font-weight: 700; background: linear-gradient(90deg, rgb(236 170 32 / 0.12), transparent); }
.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.doc-toc a { display: block; padding: 0.3rem 0; color: var(--muted); text-decoration: none; font: 400 0.85rem/1.35 var(--sans); }
.doc-toc a:hover, .doc-toc a.on { color: var(--ink); }
.doc-toc a.on { font-weight: 600; }
.doc-toc .lvl3 a { padding-left: 0.85rem; }
.doc { min-width: 0; max-width: 78ch; font-size: 1.04rem; }
.doc a { overflow-wrap: anywhere; }
.doc > * + * { margin-top: 1rem; }
.doc h2 { font-size: var(--step-2); margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.doc > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 1.2rem; margin-top: 2rem; scroll-margin-top: calc(var(--header-h) + 24px); }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc li + li { margin-top: 0.35rem; }
.doc li > ul, .doc li > ol { margin-top: 0.35rem; }
.doc li::marker { color: var(--accent-text); }
.doc code { font: 400 0.86em var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.1em 0.35em; overflow-wrap: anywhere; }
.doc pre {
  position: relative; margin-top: 1.1rem; background: #0A1328; color: #DCE5F3; border-radius: 10px; padding: 1.1rem 1.25rem;
  overflow-x: auto; font: 400 0.86rem/1.6 var(--mono); tab-size: 4; border: 1px solid #1B2A47;
}
.doc pre code { background: none; border: 0; padding: 0; font-size: 1em; color: inherit; overflow-wrap: normal; }
.copy {
  position: absolute; top: 8px; right: 8px; font: 500 0.72rem/1 var(--mono); letter-spacing: 0.04em; padding: 0.5em 0.75em;
  background: #16233F; color: #C9D5EA; border: 1px solid #263A62; border-radius: 6px; cursor: pointer; opacity: 0.85;
}
.copy:hover { opacity: 1; border-color: var(--gold); }
.doc figure { margin: 1.25rem 0 0; }
.doc img { border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: zoom-in; max-height: 560px; width: auto; }
.doc li img { margin-block: 0.75rem; }
.doc-note, .doc-source { font: 400 0.88rem/1.5 var(--sans); color: var(--muted); padding: 0.9rem 1rem; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 8px 8px 0; }
.doc-source { margin-top: 3rem !important; }
.doc-source code { font-size: 0.85em; }
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem !important; }
.doc-pager a { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font: 700 1rem/1.3 var(--sans); background: var(--surface); }
.doc-pager a:hover { border-color: var(--gold); }
.doc-pager span { font: 400 0.75rem/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.doc-pager .next { text-align: right; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgb(4 11 28 / 0.9); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--night); position: relative; overflow: hidden; isolation: isolate; font: 400 0.95rem/1.55 var(--sans); color: var(--ink-2); padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer .contours { opacity: 0.7; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-top::after, .footer-base::before { content: ""; position: absolute; left: max(var(--gutter), env(safe-area-inset-left, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); height: 1px; background: var(--line); }
.footer-top::after { bottom: 0; }
.footer-base::before { top: 0; }
.f-mark { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.5rem); font: 800 clamp(2.2rem, 1.4rem + 3.5vw, 4.6rem)/1 var(--sans); font-stretch: 120%; letter-spacing: -0.03em; color: var(--ink); }
.f-logo { width: clamp(64px, 6vw, 96px); height: auto; border-radius: 50%; background: #fff; flex: none; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding-block: 2.5rem; }
.f-col { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.ft-h { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); }
.f-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.f-col ul + .ft-h { margin-top: 0.75rem; }
.footer-base { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1.5rem 2.25rem; font-size: 0.82rem; color: var(--muted); }
.msu-logo-footer { width: 150px; height: auto; color: #fff; }

/* ---------------------------------------------------------------- v3: welcome hero */
.h1-pre { display: block; font: italic 400 0.42em/1.1 var(--serif); letter-spacing: 0; color: var(--gold-2); margin-bottom: 0.15em; font-stretch: 100%; }
.hero h1 { max-width: 11ch; }
.hero-do { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.hero-do-h { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.what-we-do { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.what-we-do a {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.45rem 0.85rem; border-radius: 999px; text-decoration: none;
  background: rgb(255 255 255 / 0.06); border: 1px solid var(--line-2); color: var(--ink); font: 600 0.9rem/1.2 var(--sans);
  transition: border-color 0.15s, background-color 0.15s;
}
.what-we-do a:hover { border-color: var(--gold); background: rgb(236 170 32 / 0.1); }

/* ---------------------------------------------------------------- v3: bench */
.bench { display: flex; flex-direction: column; gap: 1.5rem; }
.bench-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.bench:not(.bench-js) .bench-tabs { display: none; }
.bench-tabs [role="tab"] {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.9rem 1rem; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-2); transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.bench-tabs [role="tab"]:hover { border-color: var(--line-2); color: var(--ink); }
.bench-tabs [role="tab"][aria-selected="true"] { background: var(--night); border-color: var(--night); color: #fff; box-shadow: inset 0 -3px 0 var(--gold), 0 10px 24px -14px rgb(6 20 51 / 0.7); }
.bt-n { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
[aria-selected="true"] .bt-n { color: var(--gold-2); }
.bt-t { font: 700 1.02rem/1.25 var(--sans); }
.bench-panel { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.bench:not(.bench-js) .bench-panel + .bench-panel { margin-top: 3rem; }
/* the live TreeMapper app needs room: text first, then the window across the full width */
#panel-bioinformatics, .topic-panel[data-topic="bioinformatics"] { grid-template-columns: minmax(0, 1fr) !important; }
#panel-bioinformatics .bench-visual, .topic-panel[data-topic="bioinformatics"] .bench-visual { order: 2; }
#panel-bioinformatics .bench-text {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0.8rem 4rem; align-items: start; padding-top: 0;
  grid-template-areas: "eye ." "h3 links" "p links" "techs links";
}
#panel-bioinformatics .bench-text > .eyebrow { grid-area: eye; }
#panel-bioinformatics .bench-text > h3 { grid-area: h3; }
#panel-bioinformatics .bench-text > p:not(.eyebrow) { grid-area: p; }
#panel-bioinformatics .bench-text > .techs { grid-area: techs; align-self: start; }
#panel-bioinformatics .bench-text > .bench-links { grid-area: links; align-self: start; margin-top: 0.3rem; padding-left: 1.5rem; border-left: 1px solid var(--line); }
.topic-panel[data-topic="bioinformatics"] .bench-text { max-width: 72ch; }
@media (max-width: 900px) { #panel-bioinformatics .bench-text { display: flex; } }
.bench-text { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; padding-top: 0.4rem; }
.bench-text h3 { font-size: var(--step-2); }
.bench-text > p:not(.eyebrow) { color: var(--ink-2); }
.techs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.techs li { font: 500 0.8rem/1.2 var(--sans); padding: 0.4rem 0.7rem; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); }
.bench-links { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.4rem; }
.bench-links a { font: 600 0.95rem/1.3 var(--sans); text-decoration: none; display: inline-flex; gap: 0.4em; align-items: center; }
.bench-links a:hover { text-decoration: underline; }
.bench-links .i { width: 1.1em; height: 1.1em; }
.sim-note, .tm-note { font: 400 0.78rem/1.5 var(--mono); color: var(--muted); }

/* TreeMapper window */
.skip-demo { position: absolute; left: -9999px; }
.skip-demo:focus { position: static; display: inline-block; margin-bottom: 0.6rem; padding: 0.5rem 0.9rem; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font: 600 0.9rem/1 var(--sans); }
.tm-window { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); }
.tm-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.8rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.tm-dots { display: inline-flex; gap: 6px; }
.tm-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.tm-dots i:nth-child(1) { background: #EE6A5F; } .tm-dots i:nth-child(2) { background: #F5BE4F; } .tm-dots i:nth-child(3) { background: #62C554; }
.tm-title { font: 500 0.8rem/1 var(--mono); color: var(--muted); margin-right: auto; }
.tm-open { font: 600 0.82rem/1 var(--sans); text-decoration: none; display: inline-flex; gap: 0.35em; align-items: center; }
.tm-frame { position: relative; aspect-ratio: 1100 / 640; min-height: 420px; background: #EEF3F2; }
.tm-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; transition: opacity 0.4s; }
.js .tm-frame:not(.ready) iframe { opacity: 0; }
.tm-loading { position: absolute; inset: 0; display: grid; place-items: center; font: 500 0.85rem/1 var(--mono); color: #5F6D82; }
.tm-frame.ready .tm-loading, .no-js .tm-loading { display: none; }
.tm-note { padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .tm-frame { aspect-ratio: auto; height: 520px; } }
.tm-frame.phone { height: auto; min-height: 0; aspect-ratio: auto; background: var(--paper); }
.tm-frame.phone .tm-loading { display: none; }
.tm-phone { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem 1.25rem; font: 400 1rem/1.5 var(--serif); color: var(--ink-2); }
.tm-phone-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* plaque assay */
.plaque-sim { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1rem, 2.5vw, 1.5rem); border-radius: 12px; background: var(--night); color: #E7EDF6; --muted: #E3E9F2; }
.ps-dishes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.5rem); }
.ps-dishes figure { margin: 0; display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
.ps-dishes canvas { width: 100%; max-width: 300px; aspect-ratio: 1 / 1; }
.ps-dishes figcaption { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; font: 400 0.9rem/1.3 var(--sans); text-align: center; }
.ps-dishes figcaption span { font: 500 0.85rem/1.3 var(--mono); color: var(--gold-2); }
.ps-ctl { display: flex; flex-direction: column; gap: 0.5rem; font: 500 0.9rem/1.3 var(--sans); }
.ps-ctl b { font-family: var(--mono); color: var(--gold-2); margin-left: 0.4em; }
.ps-ctl input { width: 100%; accent-color: var(--gold); }
.ps-eop { font: 400 0.95rem/1.5 var(--serif); color: #EEF2F8; }

/* gel */
.gel-sim { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1rem, 2.5vw, 1.5rem); border-radius: 12px; background: var(--night); color: #E7EDF6; --muted: #E3E9F2; }
.gs-gel svg { width: 100%; height: auto; }
.gel-bg { fill: #0E1622; stroke: #22314A; }
.gel-well { fill: #050A12; }
.gel-band { fill: #F4F1D0; filter: drop-shadow(0 0 3px rgb(244 241 208 / 0.65)); transition: opacity 0.6s ease; }
.gel-ladder { opacity: 0.6; }
.gel-lbl { fill: #EEF2F8; font: 500 11px var(--mono); }
.gel-bp { fill: #E3E9F2; font: 400 10px var(--mono); }
.gs-ctl { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gs-ctl button { padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.25); background: transparent; color: #E7EDF6; font: 600 0.88rem/1 var(--sans); cursor: pointer; min-height: 40px; }
.gs-ctl button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.gs-cap { font: 400 0.95rem/1.5 var(--serif); color: #EEF2F8; min-height: 3em; }

/* mini pipeline */
.mini-pipe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; padding: clamp(1rem, 2.5vw, 1.5rem); border-radius: 12px; background: var(--night); }
.mini-step { display: flex; flex-direction: column; gap: 0.5rem; }
.mini-step p { font: 500 0.78rem/1 var(--mono); color: #EEF2F8; letter-spacing: 0.04em; }
.mini-step .pipe-canvas { outline: 1px solid rgb(255 255 255 / 0.1); }
.mol-mini .mol-stage { border-radius: 10px; outline: 1px solid rgb(255 255 255 / 0.1); }

/* ---------------------------------------------------------------- v3: figures */
.fig { width: 100%; height: auto; display: block; }
.theme-fig { margin: 0; padding: clamp(0.75rem, 2vw, 1.25rem); border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.fig .f-kicker { fill: var(--accent-text); font: 500 11px var(--mono); letter-spacing: 0.12em; }
.fig .f-h { fill: var(--ink); font: 800 19px var(--sans); }
.fig .f-gene { stroke: var(--surface); stroke-width: 1.5; }
.fig .f-g1 { fill: #4F82D1; } .fig .f-g2 { fill: #2F5F9E; } .fig .f-g3 { fill: #7FA8E8; }
.fig .f-gl { fill: #fff; font: 600 11.5px var(--mono); }
.fig .f-leader { fill: var(--line-2); }
.fig .f-rep { fill: var(--ink-2); }
.fig .f-sp { stroke: none; }
.fig .f-sp-new { fill: var(--gold); } .fig .f-sp1 { fill: #E98C8C; } .fig .f-sp2 { fill: #9FD3C7; } .fig .f-sp3 { fill: #C9B6F2; } .fig .f-sp4 { fill: #A9C46A; }
.fig .f-small { fill: var(--muted); font: 500 11px var(--mono); }
.fig .f-note { fill: var(--ink-2); font: 400 12.5px var(--sans); }
.fig .f-lead { stroke: var(--muted); stroke-width: 1; }
.fig .f-arrow { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 4 4; }
.fig .f-ahead { fill: var(--gold); }
.fig .f-rna { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.fig .f-rna-in { stroke-width: 2.5; }
.fig .f-cplx { fill: var(--xray); }
.fig .f-dna { stroke: var(--ink-2); stroke-width: 5; stroke-linecap: round; }
.fig .f-cut { stroke: var(--cryo); stroke-width: 3; stroke-linecap: round; }
.fig .f-plate { fill: var(--line); }
.fig .f-lawn { fill: #E6DBB8; }
.fig .f-plq circle { fill: #3A342A; }
.fig .f-dish-t { fill: var(--ink); font: 700 14px var(--sans); }
.fig .f-in { fill: #fff; font: 600 12.5px var(--sans); }
.fig .f-vrna { fill: none; stroke: #E98C8C; stroke-width: 4; stroke-linecap: round; }
.fig .f-coa circle { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.fig .f-glow { fill: rgb(98 197 84 / 0.25); }
.fig .f-glow-core { fill: #62C554; }
.fig .f-num { fill: var(--ink); }
.fig .f-num-t { fill: var(--paper); font: 700 12px var(--sans); }
.fig .f-step { fill: var(--ink); font: 700 14px var(--sans); }
.tc-visual-fig { background: var(--paper); border-right: 1px solid var(--line); }
.tc-visual-fig .tc-num { color: var(--accent-text); }
.tc-fig { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1.75rem 1rem 1rem; min-width: 0; }
.tc-fig svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
.tc-fig .fig text { display: none; }
.tc-fig .fig .f-h, .tc-fig .fig .f-kicker { display: none; }
.related { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.9rem; margin-top: 0.5rem; font: 500 0.88rem/1.4 var(--sans); }
.related > span { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); width: 100%; }
.related a { text-decoration: none; }
.related a:hover { text-decoration: underline; }
.related .pdb { color: var(--accent-text); }

/* ---------------------------------------------------------------- v3: news */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.75rem); }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 24px); }
.news-photo { margin: 0; position: relative; aspect-ratio: 4 / 3; background: var(--line); overflow: hidden; }
.news-photo .news-img { position: absolute; inset: 0; }
.news-photo .news-img img { object-position: 50% 30%; transition: transform 0.5s ease; }
.news-card:hover .news-img img { transform: scale(1.03); }
.news-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem 0.9rem 0.6rem; font: 400 0.78rem/1.35 var(--sans); color: #fff; background: linear-gradient(transparent, rgb(4 11 28 / 0.75)); }
.news-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.2rem 1.25rem 1.4rem; }
.news-meta { display: flex; justify-content: space-between; font: 500 0.72rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.news-meta span:last-child { color: var(--muted); }
.news-body .news-h { font-size: 1.12rem; line-height: 1.3; font-stretch: 102%; }
.news-text { font-size: 0.95rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: auto; padding-top: 0.25rem; font: 600 0.85rem/1.3 var(--sans); }
.news-links a { text-decoration: none; display: inline-flex; gap: 0.3em; align-items: center; }
.news-links a:hover { text-decoration: underline; }
.news-list { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2.5rem); }
.news-big { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.news-big .news-photo { aspect-ratio: auto; min-height: 320px; }
.news-big .news-body { padding: clamp(1.25rem, 3vw, 2.25rem); justify-content: center; }
.news-big .news-h { font-size: var(--step-2); }
.news-big .news-text { -webkit-line-clamp: unset; display: block; font-size: 1.02rem; }
.news-gallery { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 2rem; }
.news-extra { margin: 0; }
.news-extra .news-img { display: block; aspect-ratio: 4092 / 1658; border-radius: 12px; overflow: hidden; }
.news-extra figcaption { margin-top: 0.6rem; font: 400 0.85rem/1.4 var(--sans); color: var(--muted); }

/* ---------------------------------------------------------------- v3: structures teaser */
.teaser-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.teaser-grid > div { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.teaser-grid p:not(.eyebrow) { color: var(--ink-2); }
.struct-teaser .latest-structs a:hover { background: rgb(255 255 255 / 0.06); }
.struct-teaser .ls-body .pdb { color: var(--gold-2); }

.theme-fig .fig .f-long { display: none; }
.out-photo { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.out-photo picture { height: 100%; }
.movie-strip { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; flex: 1 1 520px; max-width: 720px; }
.movie-strip a { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.movie-strip picture { height: 100%; }
.movie-strip .play { width: 36px; height: 36px; left: 10px; bottom: 10px; }
.movie-strip .play::after { left: 14px; top: 11px; border-left-width: 11px; border-block-width: 7px; }
.apply-more { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .movie-strip { gap: 0.5rem; }
  .movie-strip .play { width: 26px; height: 26px; left: 6px; bottom: 6px; }
  .movie-strip .play::after { left: 10px; top: 8px; border-left-width: 8px; border-block-width: 5px; }
}
.archive { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.archive summary { cursor: pointer; font: 600 0.92rem/1.3 var(--sans); color: var(--ink-2); }
.archive[open] summary { margin-bottom: 0.6rem; }
.archive .fellow-list { margin-top: 0.6rem; }
.funding-full { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0.25rem 1.25rem; }
.funding-full summary { cursor: pointer; padding: 1rem 0; font: 700 1.02rem/1.3 var(--sans); }
.funding-full[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.fl-cols { columns: 3 260px; column-gap: 2.5rem; padding-block: 1rem 1.5rem; }
.fl-cols section { break-inside: avoid-column; margin-bottom: 1.5rem; }
.fl-cols h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.fl-cols ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; font: 500 0.9rem/1.35 var(--sans); }
.fl-cols a { text-decoration: none; }
.fl-cols a:hover { text-decoration: underline; }
.fl-sub { font: 500 0.7rem/1 var(--mono) !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.6rem; }
.workflow { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.4rem; }
.workflow ol { list-style: none; counter-reset: w; display: flex; flex-direction: column; }
.workflow li { counter-increment: w; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.5rem; padding-block: 0.65rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.98rem; }
.workflow li:last-child { border-bottom: 1px solid var(--line); }
.workflow li::before { content: counter(w, decimal-leading-zero); font: 500 0.8rem/1.9 var(--mono); color: var(--accent-text); }
.fig-cap { margin-top: 0.75rem; font: 400 0.88rem/1.5 var(--sans); color: var(--muted); }
.note-top { margin: -1rem 0 1.5rem; }
@media (max-width: 700px) {
  .topic-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .theme-fig .fig .f-note, .theme-fig .fig .f-small { display: none; }
}

@media (max-width: 380px) {
  .msu-logo { width: 80px; }
  .lab-logo { display: none; }
  .brand { gap: 0.55rem; min-width: 0; }
  .brand-name { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; }
  .header-row { gap: 0.75rem; }
}
/* phones: the brand, the light/dark switch and the menu button share one row */
@media (max-width: 560px) {
  .header-row { gap: 0.5rem; }
  .header-row .theme-toggle, .header-row .nav-toggle { width: 40px; height: 40px; flex: none; }
}
@media (max-width: 420px) {
  .header-row .theme-toggle, .header-row .nav-toggle { width: 38px; height: 38px; }
  .msu-logo { width: 70px; }
  .brand { gap: 0.45rem; }
  .brand-lab { gap: 0.4rem; }
  .brand-name { font-size: 0.92rem; }
  .lab-logo { height: 22px; padding: 1px 3px; border-radius: 5px; }
}
@media (max-width: 380px) { .msu-logo { width: 72px; } }
@media (max-width: 340px) { .brand .brand-msu, .brand-sep { display: none; } }

/* ---------------------------------------------------------------- responsive */
@media (min-width: 601px) and (max-width: 1180px) {
  .news-grid > :nth-child(n + 3) { display: none; }
}
@media (max-width: 1180px) {
  .bench-panel { grid-template-columns: minmax(0, 1fr); }
  .bench-text { max-width: 70ch; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: 220px minmax(0, 1fr); }
  .doc-toc { display: none; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .pipe-step:nth-child(2) .pipe-visual::after { display: none; }
  .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .apply { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .theme-card { grid-template-columns: minmax(0, 1fr); }
  .tc-visual { aspect-ratio: 16 / 9; min-height: 0; width: 100%; }
  .tc-visual .tc-img img { object-fit: contain; }
}
@media (max-width: 900px) {
  .bench-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-big, .teaser-grid { grid-template-columns: minmax(0, 1fr); }
  .news-big .news-photo { min-height: 0; aspect-ratio: 4 / 3; }
  .hero-grid, .team, .alumni-grid, .join-grid, .theme, .pi, .apply, .train, .two-col, .out-item, .contact, .arms-grid, .explorer, .recent, .join-head, .montana-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .section-head-tight { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .section-head .team-counts { justify-content: flex-start; }
  .hero-visual { max-width: 460px; justify-self: center; width: 100%; }
  .theme:nth-child(even) .theme-visual, .out-item:nth-child(even) .out-media { order: 0; }
  .theme-visual { position: static; }
  .theme-visual .mol { max-width: 520px; }
  .pi-photo { max-width: 340px; }
  .apply-how { position: static; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docnav { position: static; max-height: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0.25rem 1rem; }
  .docnav summary { display: list-item; cursor: pointer; padding: 0.75rem 0; font: 600 0.95rem var(--sans); }
  .docnav details > ul:last-child { margin-bottom: 1rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .year { position: static; flex-direction: row; align-items: baseline; gap: 0.75rem; font-size: var(--step-2); }
  .al-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer li:not(:nth-child(3n)) { border-right: 0; }
  .offer li:not(:nth-child(3n + 1)) { padding-left: 0; }
  .offer li:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 1.25rem; }
  .offer li:nth-child(even) { padding-left: 1.25rem; }
  .movies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(3) a { padding-left: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.75rem 0.9rem; }
  .person h3 { font-size: 1.02rem; }
  .person .bio { font-size: 0.88rem; }
  .mini-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; padding: 0.75rem; }
  .theme-cards, .paper-cards, .movies, .methods, .people-grid, .al-dir, .pipeline { grid-template-columns: minmax(0, 1fr); }
  .pipe-step .pipe-visual::after { display: none; }
  .pipe-visual { max-width: 360px; }
  .faces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer { grid-template-columns: minmax(0, 1fr); }
  .offer li:nth-child(n) { border-right: 0; padding-inline: 0; }
  .bar-row { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 1.75rem; }
  .join-stages a { grid-template-columns: minmax(0, 1fr) auto; }
  .join-stages a > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .join-stages a::after { grid-column: 2; grid-row: 1; }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .pub-tools { position: static; }
  .pub-count { margin-left: 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-pager { grid-template-columns: minmax(0, 1fr); }
  .stats a { padding-inline: 0.9rem; }
  .person { max-width: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .am-arc { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .bars-fig .bar { transform: none; }
}
@media print {
  .site-header, .site-footer, .contours, .nav-toggle, .theme-toggle, .pub-tools, .docnav, .doc-toc, .copy { display: none !important; }
}

/* ---------------------------------------------------------------- research topic tabs + topic pages */
.topic-tabs { margin-top: 2rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.topic-tabs ul { list-style: none; display: flex; gap: 0.35rem; border-bottom: 1px solid var(--line); min-width: max-content; }
.topic-tabs a {
  display: block; padding: 0.75rem 1rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  font: 600 0.95rem/1.2 var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.topic-tabs a:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.topic-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.page-head .topic-tabs + * { margin-top: 0; }
.topic { display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); }
.topic-panel { display: grid !important; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.topic-panel .bench-text { display: flex; flex-direction: column; gap: 1rem; }
.topic-panel .bench-text h2 { font-size: var(--step-3); }
.topic-papers { max-width: 860px; }
.topic-papers > p { margin-top: 1rem; }
@media (max-width: 900px) { .topic-panel { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- v4: lab's own hero, structure ring, topo on paper */
.hero h1 { font-size: clamp(2rem, 1.3rem + 2vw, 3rem); line-height: 1.06; max-width: 22ch; font-stretch: 112%; margin-top: 0; }
.overview { margin-top: 1.6rem; max-width: 60ch; }
.overview-h { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 0.7rem; display: flex; align-items: center; gap: 0.6em; }
.overview-h::before { content: ""; width: 22px; height: 2px; background: var(--gold); }
.overview p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; }
@media (min-width: 1181px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }

.ring { position: relative; display: flex; flex-direction: column; gap: 0.6rem; }
.ring-stage { list-style: none; position: relative; aspect-ratio: 1 / 1; width: 100%; }
.ring-item { position: absolute; left: 50%; top: 50%; width: 92%; aspect-ratio: 1; transform-origin: 50% 50%; will-change: transform; }
.ring:not(.ring-live) .ring-item { transform: translate(-50%, -50%); }
.ring:not(.ring-live) .ring-item:not(:first-child) { display: none; }
.ring-item:not(.is-front) { cursor: pointer; }
.ring-item:not(.is-front) .mol-canvas { pointer-events: none; }
.ring-item:not(.is-front) .mol-hint { display: none; }
/* the floor of the ring: a faint ellipse the structures travel around */
.ring-stage::before { content: ""; position: absolute; left: 14%; right: 14%; top: 30%; height: 34%; border: 1px solid rgb(240 180 58 / 0.2); border-radius: 50%; }
.mol-ring { --mol-bg: transparent; }
.mol-ring .mol-stage { border-radius: 0; overflow: visible; }
.mol-ring .mol-poster { opacity: 0.0001; }
.no-js .mol-ring .mol-poster { opacity: 1; border-radius: 50%; overflow: hidden; }
.ring-ui { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.ring-btn {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgb(255 255 255 / 0.06); border: 1px solid var(--line-2); color: var(--ink); transition: border-color 0.15s, background-color 0.15s;
}
.ring-btn:hover { border-color: var(--gold); background: rgb(236 170 32 / 0.12); }
.ring-btn .i { width: 20px; height: 20px; }
.ring-btn[data-step="-1"] .i { transform: scaleX(-1); }
.ring-caps { min-height: 6.6rem; border-left: 2px solid var(--gold); padding-left: 0.9rem; }
.ring-cap .mol-id { margin: 0; }
.ring-cap .pdb { color: var(--gold-2); text-decoration: none; }
.ring-cap .pdb:hover { text-decoration: underline; }
.ring-name { font: 800 1.35rem/1.15 var(--sans); font-stretch: 110%; margin-top: 0.25rem; }
.ring-desc { font: 400 0.92rem/1.45 var(--sans); color: var(--ink-2); margin-top: 0.3rem; max-width: 46ch; }
.ring-dots { display: flex; gap: 0.5rem; justify-content: center; }
.ring-dot { width: 26px; height: 26px; border: 0; padding: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ring-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background-color 0.15s, transform 0.15s; }
.ring-dot[aria-current="true"]::before { background: var(--gold); transform: scale(1.3); }
.no-js .ring-ui, .no-js .ring-dots { display: none; }

/* topographic lines continue faintly on paper sections */
.topo { position: relative; isolation: isolate; overflow: hidden; }
.topo > :not(.contours) { position: relative; z-index: 1; }
.topo > .contours, .page-contours { color: rgb(70 78 92); --c-major: 0.13; --c-minor: 0.055; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topo > .contours, :root:not([data-theme="light"]) .page-contours { color: rgb(240 180 58); --c-major: 0.1; --c-minor: 0.04; } }
:root[data-theme="dark"] .topo > .contours, :root[data-theme="dark"] .page-contours { color: rgb(240 180 58); --c-major: 0.1; --c-minor: 0.04; }
/* Every page but Home: the same topology as Home's sections, as one field behind the page */
.page-contours { position: fixed; inset: 0; z-index: -1; }
@media (max-width: 1180px) {
  .ring { max-width: 520px; margin-inline: auto; }
}
.tc-pdb { position: absolute; left: 12px; bottom: 10px; font: 500 0.74rem/1 var(--mono); letter-spacing: 0.04em; color: var(--gold-2); }
.theme-more { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; font: 600 1rem/1.3 var(--sans); }
.theme-more span { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.theme-more a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.4em; }
.theme-more a:hover { text-decoration: underline; }
.theme-text-only { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
@media (min-width: 1261px) and (max-width: 1420px) {
  .brand-dept { display: none; }
  .site-nav a { padding-inline: 0.5rem; }
  .header-row { gap: 1rem; }
}

/* news photos: show the whole photo (no cropped heads); a soft blurred copy fills the frame behind it */
.news-photo { background: #46679A; }
.news-photo::before { content: ""; position: absolute; inset: -24px; background: var(--photo) center / cover no-repeat; filter: blur(22px) saturate(0.9) brightness(0.55); }
.news-photo .news-img img { object-fit: contain; object-position: 50% 50%; }
.news-card:hover .news-img img { transform: none; }
.news-photo figcaption { z-index: 1; }
.am-inset-bg { fill: rgb(255 255 255 / 0.04); stroke: rgb(255 255 255 / 0.22); stroke-width: 1; }
.am-inset-land { fill: #6283B3; stroke: var(--night); stroke-width: 0.5; }
.am-inset-h { fill: var(--on-night-2); font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.am-arc-abroad { stroke-dasharray: 0.012 0.012; }
.js .am-arc-abroad { stroke-dasharray: 0.012 0.012; stroke-dashoffset: 0; }
.am-label-abroad { font-size: 14px; }
/* alumni: the map gets the full width; numbers and faculty list sit underneath */
.alumni-wide { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.alumni-wide .alumni-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.alumni-wide .fac-h { margin-top: 0; }
@media (max-width: 800px) { .alumni-wide .alumni-side { grid-template-columns: minmax(0, 1fr); } }
.page-research .page-head h1 { max-width: 24ch; font-size: var(--step-4); }
.theme-wide {
  margin-top: clamp(1rem, 2.4vw, 1.75rem); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr) auto; gap: 0.4rem 2rem; align-items: center;
  padding: clamp(1.1rem, 2vw, 1.5rem) clamp(1.1rem, 2vw, 1.6rem); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.theme-wide:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.theme-wide .tc-kicker { grid-column: 1; grid-row: 1; }
.tw-title { grid-column: 1; grid-row: 2; font: 800 var(--step-1)/1.15 var(--sans); font-stretch: 110%; }
.tw-text { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-2); font-size: 0.98rem; }
.theme-wide .i { grid-column: 3; grid-row: 1 / span 2; color: var(--link); width: 1.3em; height: 1.3em; }
@media (max-width: 800px) { .theme-wide { grid-template-columns: minmax(0, 1fr) auto; } .tw-text { grid-column: 1; grid-row: 3; } .theme-wide .i { grid-column: 2; } }
/* spot assay */
.spot-sim { display: flex; flex-direction: column; gap: 0.9rem; padding: clamp(1rem, 2.5vw, 1.5rem); border-radius: 12px; background: #15171B; color: #E7EDF6; --muted: #9AA3B2; }
.ss-axis { display: grid; grid-template-columns: 7.5rem repeat(8, minmax(0, 1fr)); font: 500 0.78rem/1 var(--mono); color: #C9D2DF; text-align: center; align-items: end; }
.ss-axis > span:first-child { text-align: left; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ss-plates { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); }
.ss-rows { display: grid; grid-template-rows: 1fr 1fr; font: 600 0.82rem/1.25 var(--sans); color: #E7EDF6; }
.ss-rows span { display: flex; align-items: center; padding-right: 0.6rem; }
.ss-plates canvas { width: 100%; aspect-ratio: 8 / 2.3; }
.ss-ctl { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ss-ctl button { font: 600 0.9rem/1.2 var(--sans); padding: 0.6rem 1rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.25); background: transparent; color: #E7EDF6; cursor: pointer; }
.ss-ctl button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.ss-eop { font: 400 0.98rem/1.5 var(--serif); color: #D5DDEA; }
.spot-sim .sim-note { color: var(--muted); }
@media (max-width: 560px) { .ss-axis, .ss-plates { grid-template-columns: 4.8rem repeat(8, minmax(0, 1fr)); } .ss-plates { grid-template-columns: 4.8rem minmax(0, 1fr); } .ss-axis { font-size: 0.62rem; } .ss-rows { font-size: 0.72rem; } }
/* placeholders stay modest until the real photo arrives */
.ph { max-height: 300px; }
/* structures sit on a deep navy stage so their colours stay saturated on the lighter blue */
.ring-stage::after { content: ""; position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #2A4269 0%, #1E3050 70%); box-shadow: inset 0 0 0 1px rgb(255 231 163 / 0.28), 0 30px 60px -30px rgb(10 20 40 / 0.6); z-index: -1; pointer-events: none; }
.ring-stage::before { display: none; }
.ring-stage { isolation: isolate; }
.mol-explorer .mol-stage, .theme-visual .mol-stage, .pipe-step .mol-stage, .mol-mini .mol-stage { background: var(--specimen); }

/* justified reading text (hyphenated so narrow columns don't open rivers) */
.overview p, .lede, .section-intro, .tc-body p:not(.tc-kicker):not(.tc-meta), .tw-text, .bench-text > p:not(.eyebrow), .theme-text .lede, .theme-text .body,
.news-text, .team-text > p:not(.eyebrow), .prose p, .doc p, .ring-desc, .pi-bio p, .member-bio, .offer li > p:not(.offer-n), .stage-card > p, .ss-eop, .tm-note, .sim-note,
.join-grid p, .teaser-grid p, .out-text p, .alumni-band .section-intro, .bio p, .pi-text p, .two-col > div > p:not(.eyebrow) {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
/* titles: flush left and allowed to run the full width of their column, so their right edge
   lines up with the justified text beside or below them (justifying 2-4 word lines opened huge gaps) */
h1, h2, h3 { text-wrap: pretty; }
.hero h1, .page-head h1, .page-research .page-head h1, .join-grid h2 { max-width: none; }
.hero-text { max-width: 640px; }
.overview { max-width: none; }
.page-head .lede, .page-head h1 { max-width: 860px; }
/* the intro beside a section title runs to the grid edge, so it lines up with the cards below */
.section-head .section-intro { max-width: none; justify-self: stretch; }
.tc-body p:not(.tc-kicker):not(.tc-meta) { font-size: 0.95rem; }
/* group photo */
.group-fig { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.group-fig .photo { display: block; width: 100%; height: 100%; }
.group-fig .photo img { object-fit: cover; }


/* ================================================================ v5: specimens on paper
   Structures sit directly on the page (transparent posters, neutral fog) instead of in navy boxes;
   boxes and borders give way to hairlines and whitespace; the blue keeps depth with a gradient. */
.site-header { background: var(--night-deep); }
.site-header.scrolled { background: var(--night-deep); }
.hero-v5, .page-head { background: linear-gradient(180deg, var(--night-deep) 0%, var(--night) 62%); }
.hero-v5 .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4.5rem); min-height: min(86vh, 920px); }
.hero-v5 .eyebrow { color: var(--gold-2); }
.hero-v5 h1 { margin-top: 1rem; font-size: clamp(2.2rem, 1.2rem + 2.6vw, 3.7rem); line-height: 1.02; }
.hero-v5 .hero-visual { max-width: 640px; width: 100%; justify-self: end; }
.hero-v5 .ring { max-width: none; }
.hero-v5 .ring-stage::before { display: block; left: -4%; right: -4%; top: -4%; bottom: -4%; height: auto; border: 1px solid rgb(255 231 163 / 0.22); border-radius: 50%; }
.hero-v5 .ring-stage::after { box-shadow: inset 0 0 0 1px rgb(255 231 163 / 0.3), 0 40px 80px -30px rgb(10 20 40 / 0.7); }
.stats-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-strip .stats { border-top: 0; }
.stats-strip .stats a { padding-block: 1.6rem 1.4rem; }
.stats-strip .stat-n { color: var(--ink); }
.stats-strip .stats a:hover .stat-n { color: var(--link); }
.stats-strip .stat-l { color: var(--ink-2); }
.section-ruled { border-top: 1px solid var(--line); }

/* floating viewers */
.mol-float { --mol-bg: transparent; }
.mol-float .mol-stage { border-radius: 0; overflow: visible; background: transparent; outline: 0; }
.theme-visual .mol-float .mol-stage { background: transparent; }
.mol-float .mol-hint { background: rgb(28 36 51 / 0.8); }

/* specimen gallery */
.specimens { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.specimen { display: flex; flex-direction: column; gap: 0.5rem; height: 100%; min-width: 0; text-decoration: none; color: var(--ink); border-top: 2px solid var(--ink); padding-top: 0.85rem; }
.sp-n { font: 500 0.8rem/1 var(--mono); color: var(--accent-text); }
.sp-visual { display: block; aspect-ratio: 1; margin: 0.2rem -5% 0.1rem; transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
.sp-img { display: block; width: 100%; height: 100%; }
.sp-img img { object-fit: contain; }
.specimen:hover .sp-visual { transform: translateY(-6px) scale(1.035); }
.sp-pdb { font: 400 0.74rem/1.35 var(--mono); color: var(--muted); }
.sp-kicker { font: 500 0.7rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-top: 0.3rem; }
.specimen h3 { font-size: var(--step-1); font-stretch: 110%; }
.specimen:hover h3 { color: var(--link); }
.sp-text { font: 400 0.95rem/1.5 var(--serif); color: var(--ink-2); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.sp-more { margin-top: auto; padding-top: 0.7rem; display: inline-flex; align-items: center; gap: 0.5em; font: 500 0.76rem/1 var(--mono); color: var(--muted); }
.sp-more > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-more .i { flex: none; width: 1.25em; height: 1.25em; color: var(--link); transition: transform 0.2s; }
.specimen:hover .sp-more .i { transform: translateX(4px); }
.specimen-wide { margin-top: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr) auto; gap: 0.4rem 2.5rem; align-items: center; padding-top: 1.1rem; border-top: 2px solid var(--ink); text-decoration: none; color: var(--ink); }
.specimen-wide .sp-kicker { grid-column: 1; grid-row: 1; margin: 0; }
.sw-title { grid-column: 1; grid-row: 2; font: 800 var(--step-1)/1.15 var(--sans); font-stretch: 110%; }
.sw-text { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-2); font-size: 0.98rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.specimen-wide .i { grid-column: 3; grid-row: 1 / span 2; width: 1.3em; height: 1.3em; color: var(--link); transition: transform 0.2s; }
.specimen-wide:hover .i { transform: translateX(4px); }
.specimen-wide:hover .sw-title { color: var(--link); }

/* news: one lead story, the rest as rows */
.news-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.news-lead { border: 0; border-radius: 0; background: transparent; }
.news-lead .news-photo { aspect-ratio: 16 / 10; border-radius: 14px; }
.news-lead .news-body { padding: 1.25rem 0 0; }
.news-lead .news-h { font-size: var(--step-2); line-height: 1.15; }
.news-lead .news-text { -webkit-line-clamp: 5; font-size: 1rem; }
.news-rows { list-style: none; display: flex; flex-direction: column; }
.news-rows a { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.1rem; padding-block: 1.25rem; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: center; }
.news-rows li:last-child a { border-bottom: 1px solid var(--line); }
.nr-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #46679A; isolation: isolate; }
.nr-photo::before { content: ""; position: absolute; inset: -20px; background: var(--photo) center / cover no-repeat; filter: blur(18px) saturate(0.9) brightness(0.55); }
.nr-photo .news-img { position: absolute; inset: 0; }
.nr-photo img { object-fit: contain; }
.nr-body { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.nr-h { font: 700 1.02rem/1.3 var(--sans); }
.nr-text { font: 400 0.9rem/1.45 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-rows a:hover .nr-h { color: var(--link); }

/* recent papers: hairline list */
.paper-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 4vw, 4rem); }
.paper-row { display: flex; flex-direction: column; gap: 0.5rem; padding-block: 1.1rem 1.2rem; border-top: 1px solid var(--line); position: relative; }
.paper-row:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
.paper-row .paper-title { font-size: 1.08rem; }
.paper-row .paper-title::after { border-radius: 0; }

/* people: the group photo takes the full width */
.group-wide { aspect-ratio: 21 / 9; border-radius: 16px; }
.group-wide .photo img { object-position: 50% 42%; }
.team-strip { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 5vw, 5rem); margin-top: clamp(1.75rem, 3vw, 2.75rem); align-items: start; }
.team-strip-left { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.team-strip .team-counts { gap: 0.9rem 2rem; }
.team-strip .team-counts .n { font-size: 2.3rem; }
.team-strip .faces { padding: 0; }
.faces-pi { display: block; width: auto; }
.faces-pi a { grid-template-columns: 96px minmax(0, 1fr); column-gap: 1rem; padding: 0; }
.faces-pi .face { width: 96px; height: 96px; }
.faces-pi .face-name { font-size: 1.15rem; }
.faces-pi .face-role { font-size: 0.85rem; }

/* join band: bigger, plainer */
.join-grid h2 { font-size: var(--step-4); }

@media (max-width: 1180px) {
  .specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-v5 .hero-grid { min-height: 0; }
}
@media (max-width: 900px) {
  .news-feature, .team-strip, .hero-v5 .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-v5 .hero-visual { justify-self: center; max-width: 520px; }
  .hero-v5 .hero-text { max-width: none; }
  .group-wide { aspect-ratio: 16 / 9; }
  .specimen-wide { grid-template-columns: minmax(0, 1fr) auto; }
  .sw-text { grid-column: 1; grid-row: 3; }
  .specimen-wide .i { grid-column: 2; }
}
@media (max-width: 600px) {
  .paper-list { grid-template-columns: minmax(0, 1fr); }
  .paper-row:nth-last-child(2) { border-bottom: 0; }
  .news-rows a { grid-template-columns: 100px minmax(0, 1fr); }
  .specimens { gap: 1.25rem 1rem; }
  .specimen h3 { font-size: 1.05rem; }
  .sp-text { font-size: 0.88rem; text-align: left; }
}
@media (max-width: 480px) {
  .specimens { grid-template-columns: minmax(0, 1fr); }
  .sp-visual { max-width: 300px; margin-inline: auto; width: 100%; }
}

/* ---- v5 on the inner pages: the same language everywhere */
.section-surface { background: transparent; border-block: 0; border-top: 1px solid var(--line); }
.group-top { margin-bottom: clamp(2rem, 4vw, 3rem); }
/* structures: a specimen board instead of 30 boxes */
.s-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.75rem); }
.s-card { background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0; overflow: visible; padding-top: 0.75rem; }
.s-card:hover { box-shadow: none; transform: none; }
.s-card.active { box-shadow: none; border-top-color: var(--gold); }
.s-card.active .s-id .pdb { color: var(--accent-text); }
.s-thumb { background: transparent; margin: 0.25rem -6% 0.4rem; width: 112%; border-radius: 0; transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
.s-thumb picture img { object-fit: contain; }
.s-card:hover .s-thumb { transform: translateY(-5px) scale(1.04); }
.s-card:hover .s-thumb picture { transform: none; }
.s-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.s-body { padding: 0; }
.s-id .pdb { font-weight: 500; }
.s-title { font-size: 1.02rem; }
.s-links { font-size: 0.8rem; }
.explorer-band { background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%); border-top: 0; }
/* publications chart: a figure, not a card */
.chart-pubs { padding: 0; background: transparent; border: 0; border-radius: 0; border-top: 1px solid var(--line); padding-top: 1.25rem; }
/* join: apply columns as hairline columns, not cards */
.stages { gap: 0 clamp(1.25rem, 3vw, 2.5rem); border-top: 2px solid var(--ink); }
.stage-card { background: transparent; border: 0; border-radius: 0; padding: 1.1rem 0 1.5rem; }
.stage-card + .stage-card { border-left: 1px solid var(--line); padding-left: clamp(1.25rem, 3vw, 2.5rem); margin-left: calc(-1 * clamp(1.25rem, 3vw, 2.5rem)); }
.stage-card h3 { border-bottom: 0; padding-bottom: 0; }
.funding-full { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 0.25rem 0; }
/* news page: stories separated by rules, photos rounded */
.news-list { gap: 0; }
.news-list .news-card { border: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--line); padding-block: clamp(1.75rem, 3.5vw, 3rem); gap: clamp(1.5rem, 4vw, 3.5rem); }
.news-list .news-card:last-child { border-bottom: 1px solid var(--line); }
.news-big .news-photo { border-radius: 14px; min-height: 0; aspect-ratio: 4 / 3; align-self: start; }
.news-big .news-body { padding: 0; justify-content: flex-start; }
.news-gallery { margin-top: clamp(2rem, 4vw, 3rem); }
/* handbook: plainer notes and pager */
.doc-note, .doc-source { background: transparent; border-radius: 0; padding-block: 0.3rem; }
.doc-pager a { background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding-inline: 0; }
.doc-pager a:hover { border-top-color: var(--gold); }
@media (max-width: 1180px) {
  .stage-card + .stage-card { border-left: 0; padding-left: 0; margin-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .s-thumb { margin-inline: 0; width: 100%; }
}


/* ================================================================ v5 review fixes (2026-10-22)
   Home: smaller hero title, ring clear of its caption, drag hint inside the disc, tighter section rhythm,
   compact footer. Shared by every page. */
/* hero title: four lines on a laptop instead of six */
.hero-v5 h1 { font-size: clamp(1.85rem, 1.1rem + 1.6vw, 2.55rem); line-height: 1.07; max-width: none; }
.hero-v5 .hero-grid { min-height: 0; padding-block: clamp(2.25rem, 4.5vw, 3.75rem); align-items: center; }
/* the disc sits higher and leaves room for the caption below it */
.hero-v5 .ring { gap: 1.1rem; }
.hero-v5 .ring-stage { margin-top: -0.5rem; margin-bottom: 1.75rem; }
.hero-v5 .ring-ui { position: relative; z-index: 2; }
/* "Drag to rotate" sits centred under the molecule, inside the disc */
.mol-ring .mol-hint, .mol-float .mol-hint { left: 50%; bottom: 7%; transform: translateX(-50%); white-space: nowrap; }
/* section rhythm: less air above and below each divider */
.section { padding-block: clamp(2.5rem, 4.6vw, 4rem); }
.band-night { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.section-head { margin-bottom: clamp(1.5rem, 2.8vw, 2.25rem); }
.section-head-tight { margin-bottom: 1.25rem; }
.join-band { padding-block: clamp(2rem, 3.6vw, 3rem); }
.join-band .join-grid { padding-block: 0; }
/* compact footer: one row, then the MSU line */
.footer-row { display: grid; grid-template-columns: auto minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1fr); gap: 1.25rem clamp(2rem, 5vw, 4.5rem); padding-block: 1.75rem 1.4rem; align-items: start; font-size: 0.9rem; line-height: 1.5; }
.f-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }  /* logo above the name, filling the column's height */
.f-brand .f-logo { width: auto; height: 80px; border-radius: 0; background: none; }
@media (max-width: 900px) { .f-brand { flex-direction: row; align-items: center; gap: 0.9rem; } .f-brand .f-logo { height: 72px; } }
.f-name { font: 800 1.15rem/1.1 var(--sans); font-stretch: 112%; color: var(--ink); }
.f-links { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.footer-base { padding-block: 0.9rem 1.2rem; border-top: 1px solid var(--line); }
.footer-base::before { display: none; }
.msu-logo-footer { width: 110px; }
@media (max-width: 900px) { .footer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-row { grid-template-columns: minmax(0, 1fr); } }

/* Publications: the lede fits on one line on desktop */
.page-head-pubs .lede { max-width: none; }
.page-head-logo .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.page-head-logo .wrap > div { grid-column: 1; grid-row: 1; }
.page-head-logo .head-logo { grid-column: 2; grid-row: 1; }
/* fine outline: a hairline of light around every shape so the logo's blues and the phage's dark legs read on navy */
.logo-outline { filter: drop-shadow(0 0 1px rgb(255 255 255 / 0.95)) drop-shadow(0 0 1px rgb(255 255 255 / 0.95)) drop-shadow(0 0 1.4px rgb(255 255 255 / 0.85)); }
.head-logo { width: clamp(190px, 19vw, 290px); height: auto; }
@media (max-width: 1000px) {  /* float beside the heading so the lede keeps the full width below it */
  .page-head-logo .wrap { display: flow-root; }
  .page-head-logo .head-logo { float: right; width: 170px; margin: 0.25rem 0 0.5rem 1.5rem; }
}
@media (max-width: 700px) {
  .page-head-logo .wrap { display: flex; flex-direction: column; }
  .page-head-logo .head-logo { float: none; order: 2; align-self: flex-start; width: 190px; margin: 1.25rem 0 0; }
}
.page-head-pubs .lede a { white-space: nowrap; }


/* People: the PI's bio text box runs across the free space on the right */
.pi-text .prose { max-width: none; }
/* team counts on one line */
.section-head:has(.team-counts) { grid-template-columns: auto minmax(0, 1fr); }
.section-head .team-counts { flex-wrap: nowrap; gap: 0.4rem 1.4rem; white-space: nowrap; }
@media (max-width: 900px) { .section-head:has(.team-counts) { grid-template-columns: minmax(0, 1fr); } .section-head .team-counts { flex-wrap: wrap; white-space: normal; } }
.page-head .lede { text-align: left; hyphens: manual; }

/* Join & contact: one page */
.join-photo-real { margin: 0; }
.join-photo-real picture { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 30px 60px -30px rgb(10 20 40 / 0.6); }
.join-photo-real img { object-position: 50% 30%; }
.join-photo-real figcaption { margin-top: 0.6rem; font: 400 0.85rem/1.4 var(--sans); color: var(--ink-2); }
.apply-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.apply-contact h2 { margin-top: 0.6rem; margin-bottom: 1rem; }
.apply-contact .contact-list { margin-top: 0; }
@media (min-width: 641px) { .apply-contact .contact-list div { grid-template-columns: 11rem minmax(0, 1fr); } }
.apply-contact .contact-list dd { overflow-wrap: anywhere; }
.map-link { margin-top: 1rem; }
.stages-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
/* Routes into the lab: the divider sits mid-gutter, so text keeps the same margin on both sides of it (as in "What the lab offers") */
.stages.stages-row { gap: 0; }
.stages-row .stage-card { padding-inline: clamp(1.25rem, 3vw, 2.5rem); margin-left: 0; }
.stages-row .stage-card:first-child { padding-left: 0; }
.stages-row .stage-card:last-child { padding-right: 0; }
@media (max-width: 900px) { .stages-row .stage-card { padding-inline: 0; } .stages-row .stage-card + .stage-card { border-left: 0; border-top: 1px solid var(--line); } }
.awards-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 900px) { .apply-contact, .stages-row, .awards-wrap { grid-template-columns: minmax(0, 1fr); } }
.apply-contact .contact-map { margin-top: 1.25rem; }
/* the Bozeman photo fills the column under the checklist, down to the end of the contact details */
.apply-contact { align-items: stretch; }
.apply-contact .apply-how { position: static; }
.apply-photo { flex: 1 1 auto; display: flex; flex-direction: column; gap: 1rem; min-height: 240px; margin: 0.75rem 0 0; }
.apply-photo .photo { flex: 1 1 auto; display: block; min-height: 0; position: relative; border-radius: 10px; overflow: hidden; }
.apply-photo .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.apply-photo figcaption { font: 400 0.8rem/1.4 var(--sans); color: var(--muted); min-height: 1.7rem; padding-block: 0.3rem; } /* same line as the map link opposite */
.apply-photo figcaption a { color: inherit; }
@media (max-width: 900px) { .apply-photo { min-height: 0; } .apply-photo .photo { aspect-ratio: 3 / 2; flex: none; } }

/* ================================================================ Research page (v5 review, 2026-10-22) */
/* header text runs the full content width, like the sections below it */
.page-head-research h1, .page-head-research .lede { max-width: none; }
.page-head-research .contours { --c-major: 0.34; --c-minor: 0.14; }
/* approach pages as clear buttons */
.topic-tabs ul { border-bottom: 0; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.topic-tabs a {
  border: 1px solid var(--line-2); border-radius: 999px; margin: 0; padding: 0.6rem 1.1rem; background: rgb(255 255 255 / 0.06);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.topic-tabs a:hover { border-color: var(--gold); background: rgb(236 170 32 / 0.14); color: var(--ink); }
.topic-tabs a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
/* topic links without numbers */
.theme-nav { margin: 0 0 clamp(2rem, 4vw, 3rem); }
/* How we work: one project, top to bottom */
.flow { list-style: none; display: flex; flex-direction: column; position: relative; }
.flow-step { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1rem clamp(1.5rem, 4vw, 3.5rem); padding: 0 0 clamp(1.75rem, 3vw, 2.5rem) 2rem; position: relative; }
.flow-step::before { content: ""; position: absolute; left: 6px; top: 0.55rem; bottom: 0; width: 2px; background: var(--line-2); }
.flow-step:last-child::before { display: none; }
.flow-step::after { content: ""; position: absolute; left: 0; top: 0.3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--paper); }
.flow-verb { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.flow-mark h3 { font-size: var(--step-1); margin-top: 0.3rem; }
.flow-body { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.flow-body > p:first-child { color: var(--ink-2); max-width: 70ch; }
.flow-techs { font: 500 0.88rem/1.5 var(--sans); color: var(--muted); }
.flow-more { font: 600 0.92rem/1.3 var(--sans); text-decoration: none; width: fit-content; }
.flow-more:hover { text-decoration: underline; }
.flow-tool { margin-top: 0.75rem; }
.flow-tool .tm-frame { min-height: 380px; }
/* topic rows: structure and text centred against each other, no sticky offset */
.theme-group + .theme-group { margin-top: clamp(3rem, 6vw, 5rem); }
.theme-group-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem clamp(2rem, 5vw, 5rem); align-items: end; padding-bottom: 1.25rem; margin-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 2px solid var(--ink); }
.theme-group-head p { color: var(--ink-2); }
.themes { gap: clamp(3rem, 6vw, 5rem); }
.theme { align-items: center; }
.theme-visual { position: static; }
.theme-text { gap: 0.9rem; }
.theme-text .eyebrow .num { display: none; }
/* summarizing figures from the papers */
.area-fig { margin: 0; }
.area-fig-img { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: clamp(0.75rem, 2vw, 1.25rem); }
.area-fig-img picture { display: block; }
.area-fig-img img { width: 100%; height: auto; object-fit: contain; max-height: 460px; }
.area-fig-tall .area-fig-img img { max-height: none; } /* a portrait figure uses the column width */
.area-fig figcaption { margin-top: 0.6rem; font: 400 0.8rem/1.45 var(--sans); color: var(--muted); }
.theme-visual .ph { max-height: none; }
@media (max-width: 900px) {
  .flow-step { grid-template-columns: minmax(0, 1fr); }
  .theme-group-head { grid-template-columns: minmax(0, 1fr); }
}

/* Publications: the whole page on a near-white background, for contrast with the rest of the site */
/* Publications: the page body in light blue (not the hero/footer blue), the same in light and dark mode */
body.page-publications {
  --paper: #C9D9EE; --surface: #EEF3FA; --ink: #1C2433; --ink-2: #3F4756; --muted: #4C5566;
  --line: #A9BCD8; --line-2: #8FA6C8; --link: #1E56B0; --bar: #2F5F9E; --xray: #244C82; --cryo: #B8790A; --accent-text: #6E4600;
  background: var(--paper); color: var(--ink); color-scheme: light;
}
:root body.page-publications .page-contours { color: rgb(46 72 115); --c-major: 0.16; --c-minor: 0.07; }
body.page-publications .pub-tools { background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
