/* Skok Lab — shared stylesheet */
:root {
  --stage: #000000;         /* the microscope field: hero only */
  --glass: #F1F4F3;         /* page background, cool slide-glass */
  --paper: #FFFFFF;
  --ink: #15191B;
  --muted: #586166;
  --rule: #D3D9D7;
  --on-stage: #E9EEEC;
  --on-stage-muted: #8E999A;

  /* fluorophore channels = research themes */
  --fitc: #2DBE6C;  --fitc-text: #177A43;   /* insulation & 3D folding */
  --cy3: #EC4760;   --cy3-text: #B8263D;    /* chromatin in disease */
  --dapi: #5470F2;  --dapi-text: #3048C4;   /* tools we build */

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--dapi); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; color: #000; padding: .5rem 1rem; z-index: 10; }

/* ---------- Header (sits on the stage) ---------- */
.site-head { background: var(--stage); color: var(--on-stage); }
.site-head .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; flex-wrap: wrap;
}
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.wordmark b { font: 400 1.75rem/1 var(--serif); letter-spacing: -0.01em; }
.wordmark span { font-size: .8125rem; color: var(--on-stage-muted); margin-top: .35rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; }
.nav a { text-decoration: none; font-size: .9375rem; color: var(--on-stage); opacity: .82; }
.nav a:hover, .nav a[aria-current] { opacity: 1; text-decoration: underline; }

/* ---------- Hero: the microscope stage ---------- */
.stage { background: var(--stage); color: var(--on-stage); padding: 1rem 0 2.25rem; }
.viewer { max-width: 940px; margin: 0 auto; }
.frames { position: relative; aspect-ratio: 940 / 350; }
.frame {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transition: opacity 1.2s ease; visibility: hidden;
}
.frame.is-on { opacity: 1; visibility: visible; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

.viewer-bar {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  margin-top: 1.1rem; padding: 0 var(--gutter);
}
@media (min-width: 1000px) { .viewer-bar { padding: 0; } }
.caption { font-size: .9375rem; color: var(--on-stage-muted); min-height: 1.6em; }
.caption a { color: var(--on-stage); }
.controls { display: flex; align-items: center; gap: .9rem; }
.ticks { display: flex; gap: 6px; }
.tick {
  width: 28px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer;
  position: relative;
}
.tick::before {
  content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px;
  background: rgba(233,238,236,.28);
}
.tick[aria-current="true"]::before { background: var(--on-stage); }
.ctrl {
  background: none; border: 1px solid rgba(233,238,236,.35); color: var(--on-stage);
  font: 500 .8125rem/1 var(--sans); padding: .45rem .7rem; border-radius: 3px; cursor: pointer;
}
.ctrl:hover { border-color: var(--on-stage); }

/* ---------- Mission ---------- */
.mission { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.mission h1 {
  font: 300 clamp(1.75rem, 3.6vw, 2.85rem)/1.22 var(--serif);
  letter-spacing: -0.012em; margin: 0; max-width: 30ch;
}
.mission p { max-width: 62ch; color: var(--muted); margin: 1.75rem 0 0; font-size: 1.0625rem; }

/* ---------- Themes ---------- */
.themes { border-top: 1px solid var(--rule); padding: 3rem 0 clamp(3.5rem, 7vw, 5.5rem); }
.themes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.theme { border-top: 3px solid var(--c); padding-top: 1.25rem; display: flex; flex-direction: column; }
.theme ul { flex: 1; }
.theme > a { align-self: flex-start; }
.theme h2 { font: 400 1.5rem/1.25 var(--serif); margin: 0 0 .75rem; }
.theme p { margin: 0 0 1rem; color: var(--muted); }
.theme ul { margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: .9375rem; }
.theme li { padding: .35rem 0; border-bottom: 1px solid var(--rule); }
.theme > a { font-weight: 500; color: var(--ct); }
.c-fitc { --c: var(--fitc); --ct: var(--fitc-text); }
.c-cy3  { --c: var(--cy3);  --ct: var(--cy3-text); }
.c-dapi { --c: var(--dapi); --ct: var(--dapi-text); }

/* ---------- Section heads ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.sec-head h2 { font: 300 clamp(1.6rem, 3vw, 2.2rem)/1.2 var(--serif); margin: 0; letter-spacing: -0.01em; }
.sec-head a { font-weight: 500; }

/* ---------- Papers ---------- */
.papers { background: var(--paper); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.paper-list { list-style: none; margin: 0; padding: 0; }
.paper {
  display: grid; grid-template-columns: minmax(0, 20rem) 1fr; gap: 1.25rem 2.25rem;
  padding: 2rem 0; border-top: 1px solid var(--rule); align-items: start;
}
.paper:last-child { border-bottom: 1px solid var(--rule); }
.paper .thumb { border: 1px solid var(--rule); background: #fff; }
.paper .thumb img { width: 100%; aspect-ratio: 940 / 350; object-fit: contain; background: #fff; }
.paper h3 { font: 400 1.3rem/1.35 var(--serif); margin: 0 0 .6rem; max-width: 46ch; }
.paper h3 a { text-decoration: none; }
.paper h3 a:hover { text-decoration: underline; }
.authors { margin: 0 0 .75rem; color: var(--muted); font-size: .9375rem; }
.meta { display: flex; gap: 1.25rem; align-items: center; font-size: .875rem; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: .45rem; color: var(--ct); font-weight: 500; }
.tag::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); }
.year { color: var(--muted); }
@media (max-width: 720px) { .paper { grid-template-columns: 1fr; } }

/* ---------- Science & art ---------- */
.art { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.art .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.mount { margin: 0; background: #000; padding: clamp(.75rem, 2vw, 1.5rem); }
.mount figcaption { color: var(--on-stage-muted); font-size: .8125rem; padding-top: .75rem; }
.art h2 { font: 300 clamp(1.8rem, 3.4vw, 2.5rem)/1.2 var(--serif); margin: 0 0 1.25rem; letter-spacing: -0.01em; }
.art p { margin: 0 0 1rem; max-width: 52ch; }
.art .quiet { color: var(--muted); }
@media (max-width: 860px) { .art .wrap { grid-template-columns: 1fr; } }

/* ---------- Join ---------- */
.join { background: var(--paper); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.join .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.join h2 { font: 300 clamp(1.8rem, 3.4vw, 2.5rem)/1.2 var(--serif); margin: 0 0 1.25rem; }
.join p { margin: 0 0 1.25rem; max-width: 46ch; }
.join figure { margin: 0; }
.join figcaption { font-size: .8125rem; color: var(--muted); padding-top: .6rem; }
.actions { display: flex; gap: 1rem 1.75rem; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; background: var(--ink); color: #fff; text-decoration: none;
  padding: .75rem 1.25rem; border-radius: 3px; font-weight: 500;
}
.btn:hover { background: #000; }
@media (max-width: 860px) { .join .wrap { grid-template-columns: 1fr; } .join figure { order: -1; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #C9D0CE; padding: 3rem 0; font-size: .9375rem; }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.site-foot b { display: block; color: #fff; font: 400 1.25rem/1.2 var(--serif); margin-bottom: .5rem; }
.site-foot p { margin: 0 0 .4rem; }
.site-foot a { color: #fff; }
.site-foot .fine { color: #8C9593; font-size: .8125rem; }

@media (prefers-reduced-motion: reduce) {
  .frame { transition: none; }
}

@media (max-width: 600px) {
  .viewer-bar { grid-template-columns: 1fr; gap: .75rem; }
  .controls { order: -1; justify-content: space-between; }
  .nav ul { gap: .35rem 1.25rem; }
}

/* ======================================================
   Inner pages
   ====================================================== */
:root { --yfp: #E0B11E; --yfp-text: #7E6100; }
.c-yfp { --c: var(--yfp); --ct: var(--yfp-text); }

.page-head { background: var(--stage); color: var(--on-stage); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.75rem); }
.page-head h1 { font: 300 clamp(2.4rem, 5.5vw, 4rem)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0 0 1.25rem; }
.page-head .lede { font: 300 clamp(1.15rem, 1.8vw, 1.4rem)/1.5 var(--serif); color: var(--on-stage); max-width: 44ch; margin: 0; }
.page-head .lede a { color: var(--on-stage); }
.jump { list-style: none; margin: 2.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; font-size: .9375rem; }
.jump a { color: var(--on-stage); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.jump a::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); }
.jump a:hover { text-decoration: underline; }

/* Research: overview */
.overview { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.overview .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.overview h2 { font: 300 clamp(1.5rem, 2.6vw, 1.9rem)/1.25 var(--serif); margin: 0 0 1rem; }
.overview p { margin: 0 0 1rem; max-width: 60ch; }
@media (max-width: 820px) { .overview .wrap { grid-template-columns: 1fr; } }

/* Research: current directions */
.directions { background: var(--paper); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.directions .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.directions figure { margin: 0; border: 1px solid var(--rule); }
.directions h2 { font: 300 clamp(1.6rem, 3vw, 2.2rem)/1.2 var(--serif); margin: 0 0 1rem; }
.directions p { color: var(--muted); margin: 0 0 1.25rem; }
.directions dl { margin: 0; }
.directions dt { font-weight: 500; padding-top: .8rem; border-top: 1px solid var(--rule); }
.directions dd { margin: .2rem 0 .8rem; color: var(--muted); font-size: .9375rem; }
@media (max-width: 900px) { .directions .wrap { grid-template-columns: 1fr; } }

/* Research: theme sections */
.rsec { padding: clamp(3.5rem, 7vw, 5rem) 0 1rem; scroll-margin-top: 1rem; }
.rsec + .rsec { border-top: 1px solid var(--rule); }
.rsec-head { border-top: 3px solid var(--c); padding-top: 1.25rem; margin-bottom: 1rem; max-width: 46rem; }
.rsec-head h2 { font: 300 clamp(1.9rem, 3.6vw, 2.6rem)/1.15 var(--serif); margin: 0 0 .75rem; letter-spacing: -0.01em; }
.rsec-head p { margin: 0; color: var(--muted); font-size: 1.0625rem; max-width: 60ch; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 1.5rem clamp(2rem, 4vw, 3.5rem); padding: 2.25rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.entry:last-child { border-bottom: 0; }
.entry.no-fig { grid-template-columns: minmax(0, 1fr); }
.entry h3 { font: 400 1.35rem/1.3 var(--serif); margin: 0 0 .6rem; }
.entry p { margin: 0 0 .75rem; max-width: 60ch; }
.entry .more { font-size: .9375rem; font-weight: 500; color: var(--ct); }
.entry figure { margin: 0; background: #fff; border: 1px solid var(--rule); }
.entry figure.dark { background: #000; border-color: #000; }
.entry figure img { width: 100%; max-height: 22rem; object-fit: contain; }
@media (max-width: 820px) { .entry { grid-template-columns: 1fr; } .entry figure { order: -1; } }

.next-band { background: var(--paper); padding: clamp(3rem, 6vw, 4rem) 0; margin-top: clamp(2.5rem, 5vw, 4rem); }
.next-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.next-band p { font: 300 clamp(1.4rem, 2.4vw, 1.8rem)/1.3 var(--serif); margin: 0; max-width: 32ch; }

/* Publications */
.pub-tools { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.pub-tools .wrap { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; align-items: center; padding-top: .9rem; padding-bottom: .9rem; }
.filter { background: none; border: 0; padding: .35rem 0; font: 500 .9375rem/1 var(--sans); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; border-bottom: 2px solid transparent; }
.filter[data-theme]::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.filter:hover { color: var(--ink); }
.count { margin-left: auto; font-size: .875rem; color: var(--muted); }

.featured { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.paper details { margin-top: 1rem; }
.paper summary { cursor: pointer; font-size: .9375rem; font-weight: 500; color: var(--ink); width: fit-content; }
.paper details p { margin: .75rem 0 0; font-size: .96875rem; color: #33393C; max-width: 68ch; }
.paper .thumb.empty { aspect-ratio: 940 / 350; display: grid; place-items: center; color: var(--muted); font-size: .875rem; background: var(--glass); }
.journal { color: var(--ink); }
.paper[hidden] { display: none; }

.fulllist { background: var(--paper); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.search { display: flex; flex-direction: column; gap: .4rem; max-width: 30rem; margin-bottom: 2.25rem; }
.search label { font-size: .875rem; color: var(--muted); }
.search input { font: 400 1rem/1.4 var(--sans); padding: .7rem .85rem; border: 1px solid #B8C0BE; border-radius: 3px; background: #fff; color: var(--ink); }
.search input:focus { outline: 2px solid var(--dapi); outline-offset: 1px; border-color: var(--dapi); }
.yeargroup { display: grid; grid-template-columns: 6rem 1fr; gap: 1.5rem; border-top: 1px solid var(--rule); padding: 1.5rem 0; }
.yeargroup h3 { font: 300 1.6rem/1.2 var(--serif); margin: 0; color: var(--muted); }
.yeargroup ol { list-style: none; margin: 0; padding: 0; }
.yeargroup li { padding: 0 0 1rem; font-size: .9375rem; line-height: 1.55; max-width: 78ch; color: #33393C; }
.yeargroup li strong { color: var(--ink); font-weight: 700; }
.yeargroup[hidden], .yeargroup li[hidden] { display: none; }
.empty-msg { color: var(--muted); }
@media (max-width: 640px) { .yeargroup { grid-template-columns: 1fr; gap: .5rem; } .count { margin-left: 0; width: 100%; } }

@media (max-width: 640px) {
  .pub-tools .wrap { flex-wrap: nowrap; overflow-x: auto; gap: 1.25rem; scrollbar-width: none; }
  .pub-tools .wrap::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; flex: none; }
  .count { display: none; }
}

/* People */
.lab-photo { padding: clamp(2.5rem, 5vw, 3.5rem) 0 0; }
.lab-photo figure { margin: 0; }
.lab-photo figcaption { font-size: .8125rem; color: var(--muted); padding-top: .6rem; }
.pi { padding: clamp(3rem, 6vw, 4.5rem) 0; scroll-margin-top: 1rem; }
.pi .wrap { display: grid; grid-template-columns: minmax(0, 17rem) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.pi img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pi h2 { font: 300 clamp(1.9rem, 3.4vw, 2.5rem)/1.15 var(--serif); margin: 0 0 .25rem; }
.role { color: var(--muted); margin: 0 0 1.5rem; }
.pi .bio p { max-width: 64ch; margin: 0 0 1rem; }
.pi .bio p:first-child { font: 300 1.3rem/1.5 var(--serif); }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 1.5rem; font-weight: 500; }
@media (max-width: 720px) { .pi .wrap { grid-template-columns: 1fr; } .pi img { max-width: 16rem; } }

.members { background: var(--paper); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.grid-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 2.5rem 2rem; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--glass); margin-bottom: .9rem; }
.person h3 { font: 400 1.2rem/1.25 var(--serif); margin: 0 0 .2rem; }
.person .role { margin: 0 0 .4rem; font-size: .9375rem; }
.person .mail { font-size: .875rem; word-break: break-all; }
.person details { margin-top: .6rem; font-size: .875rem; }
.person summary { cursor: pointer; font-weight: 500; }
.person details ul { margin: .5rem 0 0; padding-left: 1.1rem; color: #3A4144; }
.person details li { margin-bottom: .3rem; }

.alumni { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.alumni-note { color: var(--muted); max-width: 60ch; margin: -1rem 0 2rem; }
.grid-alumni { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem 2rem; }
.alum { display: grid; grid-template-columns: 3.5rem 1fr; gap: .9rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--rule); }
.alum img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 50%; background: var(--rule); }
.alum b { display: block; font-weight: 500; }
.alum span { display: block; font-size: .875rem; color: var(--muted); line-height: 1.4; }

/* Tools */
.toolgroup { padding: clamp(3rem, 6vw, 4.5rem) 0 1rem; }
.toolgroup + .toolgroup { border-top: 1px solid var(--rule); }
.toolgroup > .wrap > h2 { font: 300 clamp(1.8rem, 3.2vw, 2.4rem)/1.15 var(--serif); margin: 0 0 .5rem; }
.toolgroup > .wrap > p { color: var(--muted); margin: 0 0 1rem; max-width: 60ch; }
.tool-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .9375rem; font-weight: 500; }
.tool-links a { color: var(--ct); }
.uses { font-size: .9375rem; color: var(--muted); }

/* Join */
.roles { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.role-list { list-style: none; margin: 0; padding: 0; }
.role-item { display: grid; grid-template-columns: minmax(0, 18rem) 1fr; gap: 1rem clamp(2rem, 5vw, 4rem); padding: 2.25rem 0; border-top: 1px solid var(--rule); }
.role-item h3 { font: 400 1.45rem/1.25 var(--serif); margin: 0; }
.role-item p { margin: 0 0 .9rem; max-width: 62ch; }
.role-item details summary { cursor: pointer; font-weight: 500; }
.role-item details ul { margin: .75rem 0 0; padding-left: 1.1rem; max-width: 62ch; }
.role-item details li { margin-bottom: .3rem; }
.role-item h4 { font: 500 .9375rem/1.3 var(--sans); margin: 1rem 0 .25rem; }
@media (max-width: 760px) { .role-item { grid-template-columns: 1fr; } }
.apply-box { background: var(--paper); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.apply-box .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.apply-box h2 { font: 300 clamp(1.8rem, 3.2vw, 2.4rem)/1.15 var(--serif); margin: 0 0 1rem; }
.apply-box ol { margin: 0; padding-left: 1.2rem; }
.apply-box li { margin-bottom: .6rem; max-width: 55ch; }
.contact-card { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.contact-card p { margin: 0 0 .6rem; }
@media (max-width: 760px) { .apply-box .wrap { grid-template-columns: 1fr; } }

/* Contact */
.contact-main { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.contact-main .wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-main h2 { font: 300 1.6rem/1.2 var(--serif); margin: 0 0 .9rem; }
.contact-main address { font-style: normal; margin-bottom: 2rem; font-size: 1.0625rem; }
.contact-main dl { margin: 0 0 2rem; display: grid; grid-template-columns: 5rem 1fr; gap: .5rem 1rem; }
.contact-main dt { color: var(--muted); }
.contact-main dd { margin: 0; }
.map { border: 1px solid var(--rule); background: var(--paper); aspect-ratio: 4 / 3; width: 100%; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.directions-list { margin: 0; padding: 0; list-style: none; }
.directions-list li { padding: .9rem 0; border-top: 1px solid var(--rule); max-width: 60ch; }
.directions-list b { display: block; font-weight: 500; }
@media (max-width: 820px) { .contact-main .wrap { grid-template-columns: 1fr; } }

/* Funding */
.grants { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.grant-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.grant-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 1rem .75rem 0; border-bottom: 1px solid var(--ink); }
.grant-table td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.grant-table td:first-child { font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; max-width: 36rem; }
.grant-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.funders { background: var(--paper); padding: clamp(3rem, 6vw, 4rem) 0; }
.funders h2 { font: 300 1.6rem/1.2 var(--serif); margin: 0 0 2rem; }
.logo-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: center; }
.logo-row img { max-height: 3.5rem; width: auto; filter: grayscale(1); opacity: .85; }
@media (max-width: 640px) {
  .grant-table thead { display: none; }
  .grant-table tr { display: block; border-bottom: 1px solid var(--rule); padding: 1rem 0; }
  .grant-table td { display: block; border: 0; padding: .15rem 0; }
}

/* v3: per-paper links and reviews section */
.plink { font: 500 .8125rem/1 var(--sans); color: var(--dapi-text); margin-left: .35rem; white-space: nowrap; }
.paper .meta .plink { margin-left: 0; }
.fulllist.reviews { border-top: 1px solid var(--rule); }

/* v3: full-width research map with the list in two columns below */
.directions .wrap { grid-template-columns: 1fr; gap: 2rem; }
.directions figure { max-width: 64rem; }
.directions .dir-text { display: grid; grid-template-columns: minmax(0, 20rem) 1fr; gap: 1rem clamp(2rem, 5vw, 4rem); }
.directions dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 2rem; }
@media (max-width: 900px) { .directions .dir-text { grid-template-columns: 1fr; } }

/* v3: extra-wide figures (like the nano-NOMe workflow) span the full width under their text */
.entry:has(figure.wide) { grid-template-columns: minmax(0, 1fr); }
.entry figure.wide { order: 1; }
.entry figure.wide img { max-height: none; }

/* v3: placeholder thumbnails for papers without a figure yet */
.paper .thumb.ph {
  aspect-ratio: 940 / 350; display: flex; flex-direction: column; justify-content: center; gap: .35rem;
  padding: 1rem 1.25rem; text-decoration: none;
  background: var(--glass);
  background: color-mix(in srgb, var(--c) 9%, #fff);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--c);
}
.ph-journal { font: italic 400 clamp(1rem, 1.6vw, 1.3rem)/1.2 var(--serif); color: var(--ink); }
.ph-year { font-size: .8125rem; color: var(--ct); font-weight: 500; }

/* v4: longer opening statement, linked tool list */
.mission h1 { font-size: clamp(1.6rem, 3vw, 2.35rem); max-width: 34ch; }
.mission p + p { margin-top: 1rem; }
.theme ul a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.theme ul a:hover { border-bottom-color: currentColor; }
.page-head .lede-long { max-width: 62ch; font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.entry .reflist { font-size: .9375rem; color: var(--muted); line-height: 1.7; }
.entry .reflist b { color: var(--ink); font-weight: 500; }
.entry .reflist a { color: var(--ct); font-weight: 500; }
.theme ul a { color: var(--ct); }
