/* CoPe Lab — site stylesheet
   Identity (README → Visual identity): UniFR black + bleu nuit #0A3859, one light theme.
   One bold moment, the point-light hero; everything else quiet. Square corners throughout,
   as in the UniFR design; round shapes only for markers (bullets, the points of the stage). */
:root {
  --night: #0a3859;          /* UniFR secondary colour, Pantone 2768 */
  --night-deep: #062a45;
  --night-80: #3b6079;
  --night-20: #ced7de;
  --night-08: #eef2f5;
  --ink: #0e1b26;
  --muted: #4a5866;
  --line: #d3dce3;
  --paper: #fff;
  --on-night: rgba(255, 255, 255, 0.8);
  --font: 'Schibsted Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --rail: 240px;
  --header-h: 84px;
  --radius: 0;             /* one shape for every button; 999px would give full pills */
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
::selection { background: var(--night); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--night); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--night); outline-offset: 3px; }
.hero :focus-visible, .lab :focus-visible, .site-footer :focus-visible { outline-color: #fff; }
h1, h2, h3 { color: var(--ink); line-height: 1.08; letter-spacing: -0.025em; margin: 0; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; }
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 56ch; }
.section-title { font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -0.035em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: clamp(28px, 4vw, 48px); }
.text-link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
/* Linked titles: ink at rest, bleu nuit and underlined on hover (one rule for the whole site) */
.showcase h3 a:hover, .index a:hover .index-title, .news-list a:hover .news-text,
.pub-title:hover, .press-group h2 a:hover {
  color: var(--night); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}

/* Header: the white logo band */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.95); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; min-height: var(--header-h); gap: 26px; }
.uni-logo { flex: none; display: block; }
.uni-logo img { height: 40px; width: auto; }
.brand { display: flex; align-items: center; padding-left: 26px; border-left: 1px solid var(--line); min-height: 46px; text-decoration: none; color: var(--night); }
.brand-logo { height: 44px; width: auto; }
.brand-name { font-weight: 800; font-size: 20px; }
#site-nav { margin-left: auto; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(8px, 1.6vw, 26px); }
#site-nav a { display: block; padding: 8px 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; border-bottom: 2px solid transparent; }
#site-nav a:hover { color: var(--night); border-bottom-color: var(--night-20); }
#site-nav a[aria-current="page"] { color: var(--night); border-bottom-color: var(--night); }
.nav-toggle { display: none; }

/* Buttons: square, like everything else */
.btn { display: inline-flex; align-items: center; padding: 14px 26px; border-radius: var(--radius); background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--ink); transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--night); border-color: var(--night); }
.btn-light { background: #fff; border-color: #fff; color: var(--night); }
.btn-light:hover { background: var(--night-20); border-color: var(--night-20); color: var(--night-deep); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ── Hero: the one bold moment ─────────────────────────────────────────── */
.hero { position: relative; background: var(--night); color: #fff; min-height: calc(100svh - var(--header-h)); display: flex; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; }
.hero-canvas canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.hero-canvas canvas.dragging { cursor: grabbing; }
.hero-canvas canvas:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.hero-inner { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding-top: clamp(48px, 8vh, 110px); padding-bottom: 28px; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-text { max-width: 640px; }
.hero h1 { color: #fff; font-size: clamp(42px, min(6.2vw, 10.5vh), 96px); line-height: 0.95; letter-spacing: -0.05em; margin-bottom: 28px; }
.hero .lede { color: var(--on-night); max-width: 46ch; font-size: 18px; margin-bottom: 30px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.not-found-links { margin-bottom: 72px; }
.hero-foot { display: flex; flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.stage-note { margin: 0; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.7); max-width: 52ch; }
.stage-pause { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; cursor: pointer; }
.stage-pause:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.stage-pause .icon { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.stage-pause[aria-pressed="true"] .icon { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }

/* ── Questions ─────────────────────────────────────────────────────────── */
.questions { padding: clamp(72px, 10vw, 150px) 0 clamp(56px, 8vw, 110px); }
.questions .section-title { margin-bottom: clamp(36px, 5vw, 64px); }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-list li { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px clamp(32px, 5vw, 80px); padding: clamp(28px, 3.5vw, 44px) 0; border-top: 1px solid var(--line); align-items: start; }
.q-list li:last-child { border-bottom: 1px solid var(--line); }
.q { font-size: clamp(26px, 3vw, 44px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); margin: 0; max-width: 20ch; }
.q-body h3 { font-size: 17px; letter-spacing: -0.01em; color: var(--night); margin: 6px 0 8px; }
.q-body p { color: var(--muted); margin: 0; }

/* ── Projects: showcase + index ────────────────────────────────────────── */
.work { padding: clamp(56px, 8vw, 110px) 0; background: var(--night-08); }
.showcase { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(28px, 4vw, 64px); align-items: center; margin-bottom: clamp(48px, 6vw, 88px); }
.showcase:nth-of-type(even) .showcase-media { order: 2; }
.showcase:nth-of-type(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.showcase-media { display: block; }
.showcase .frame { aspect-ratio: 3 / 2; }
.showcase-text { display: grid; gap: 14px; align-items: start; }
.showcase h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.03em; }
.showcase h3 a { color: var(--ink); text-decoration: none; }
.showcase p { color: var(--muted); margin: 0; }
.showcase .result { margin-top: 8px; color: var(--ink); font-size: 16px; line-height: 1.4; }
.showcase .result strong { display: block; font-size: clamp(40px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.05em; color: var(--night); margin-bottom: 6px; }
.showcase-media .frame img { transition: transform .6s ease; }
.showcase:hover .showcase-media .frame img { transform: scale(1.02); }
.index { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.index li { border-bottom: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px clamp(24px, 3vw, 48px); padding: 22px 0; text-decoration: none; color: var(--ink); }
.index-title { font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.index-text { color: var(--muted); }

/* ── Inside the lab ────────────────────────────────────────────────────── */
.lab { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--night-deep); color: #fff; }
.lab-photo { min-height: clamp(360px, 46vw, 640px); }
.lab-photo img { width: 100%; height: 100%; object-fit: cover; }
.lab-text { padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(40px, 6vw, 88px) clamp(32px, 5vw, 72px); align-self: center; }
.lab .section-title { color: #fff; margin-bottom: 20px; }
.lab-lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.45; color: var(--on-night); max-width: 34ch; margin-bottom: 30px; }

/* ── News ──────────────────────────────────────────────────────────────── */
.news { padding: clamp(64px, 9vw, 130px) 0; }
.news-list { list-style: none; margin: 0 0 clamp(36px, 5vw, 56px); padding: 0; border-top: 2px solid var(--ink); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: 110px 80px minmax(0, 1fr); gap: 6px 24px; padding: 18px 0; color: var(--ink); text-decoration: none; align-items: baseline; }
.news-list time { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-kind { font-size: 14px; font-weight: 700; color: var(--night); }
.news-text { font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.outlet-text { font-size: clamp(20px, 2vw, 28px); line-height: 1.35; letter-spacing: -0.02em; color: var(--muted); max-width: 52ch; margin: 0; }
.outlet-text span { color: var(--ink); font-weight: 700; }

/* ── Work with us ──────────────────────────────────────────────────────── */
.join { padding: clamp(64px, 9vw, 130px) 0; background: var(--night-08); }
.join-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.join .section-title { margin-bottom: 20px; }
.join-lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; color: var(--ink); max-width: 40ch; margin: 0; }
.join-facts { margin: 0; border-top: 2px solid var(--ink); }
.join-facts div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.join-facts dt { color: var(--muted); font-size: 15px; }
.join-facts dd { margin: 0; }

/* ── Photos: square, never framed ──────────────────────────────────────── */
.photo { margin: 0; }
.frame { aspect-ratio: 3 / 2; background: var(--night-08); overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.frame.is-missing { background-image: radial-gradient(circle, var(--night-20) 1.6px, transparent 1.8px); background-size: 18px 18px; }
.photo-lg { margin: 28px 0; }
.photo-lg .frame { aspect-ratio: auto; }
.photo-lg .frame img { height: auto; }
.photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.45; max-width: 70ch; }

/* ── Inner pages ───────────────────────────────────────────────────────── */
.page-head { padding: clamp(56px, 8vw, 120px) 0 clamp(36px, 5vw, 64px); margin-bottom: clamp(36px, 5vw, 64px); border-bottom: 2px solid var(--ink); }
.page-head h1 { font-size: clamp(52px, 8vw, 120px); line-height: 0.92; letter-spacing: -0.055em; margin-bottom: 24px; }
.page-head .lede { margin: 0; font-size: 20px; }

.with-toc { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 28px); font-size: 15px; }
.toc-title { font-weight: 700; margin-bottom: 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--night); border-left-color: var(--night); font-weight: 500; }
.project { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--line); max-width: 820px; }
.project:last-child { border-bottom: 0; }
.project h2 { font-size: clamp(32px, 3.8vw, 48px); letter-spacing: -0.04em; margin-bottom: 24px; }
.project h3 { font-size: 18px; margin: 32px 0 10px; }
.project .result-lg { display: flex; align-items: baseline; gap: 16px; margin: 30px 0; }
.result-value { font-size: clamp(40px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.05em; color: var(--night); line-height: 1; white-space: nowrap; }
.result-label { font-size: 15px; color: var(--muted); max-width: 26ch; line-height: 1.35; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 7px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--night); }
.cite { margin: 34px 0 0; padding: 22px 26px; background: var(--night-08); font-size: 15px; }
.cite p { margin-bottom: 10px; }
.cite a { display: inline-block; padding: 6px 0; font-weight: 700; }
.partners { font-weight: 500; color: var(--night); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 32px 0; }
.gallery figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.video { margin: 28px 0; }
.video-facade, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--night); }
.video-facade { position: relative; color: #fff; text-decoration: none; overflow: hidden; }
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-facade::before { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(6, 42, 69, 0.5); transition: background-color .15s; }
.video-facade:hover::before { background: rgba(6, 42, 69, 0.3); }
.video-play, .video-label { z-index: 2; }
.video-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 2px solid #fff; border-radius: 50%; transition: background-color .15s; }
.video-play::after { content: ''; position: absolute; left: 33px; top: 25px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.video-facade:hover .video-play { background: rgba(255, 255, 255, 0.15); }
.video-label { position: absolute; left: 0; right: 0; top: calc(50% + 58px); text-align: center; font-weight: 700; }
.video figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ── Publications ──────────────────────────────────────────────────────── */
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 30px; }
.search input { width: min(calc(100vw - 2 * var(--gutter)), 540px); font: 400 17px var(--font); padding: 13px 16px; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); }
.search input:focus { outline: none; border-color: var(--night); box-shadow: 0 0 0 3px var(--night-20); }
.pub-count { margin: 0; color: var(--muted); font-size: 15px; }
.year { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 72px); border-top: 1px solid var(--line); padding: 30px 0 10px; }
.year:first-child { border-top: 0; padding-top: 0; }
.year h2 { font-size: 32px; letter-spacing: -0.035em; color: var(--night); position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 20px); align-self: start; }
.pubs { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.pub { margin-bottom: 24px; }
.pub-title { display: block; color: var(--ink); font-weight: 700; text-decoration: none; line-height: 1.35; margin-bottom: 4px; }
.pub-authors, .pub-venue { display: block; font-size: 15px; color: var(--muted); }
.pub-authors b { color: var(--ink); font-weight: 600; }
.pub-venue { font-style: italic; }
.empty { padding: 32px 0; font-size: 18px; }
.older { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 16px; }
.fine { font-size: 13px; color: var(--muted); max-width: 80ch; margin-bottom: 72px; }

/* ── Press ─────────────────────────────────────────────────────────────── */
.press-group { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 16px clamp(32px, 5vw, 72px); margin-bottom: 72px; }
.press-group h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.03em; }
.press-group h2 a { color: var(--ink); text-decoration: none; }
.press-origin { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.press-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.press-list li { display: grid; grid-template-columns: 150px 190px minmax(0, 1fr); gap: 4px 24px; border-top: 1px solid var(--line); padding: 14px 0; }
.press-list time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15px; }
.outlet { font-weight: 700; color: var(--ink); }
.press-links a { display: block; }

/* ── Facilities ────────────────────────────────────────────────────────── */
.facility { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 88px); border-top: 1px solid var(--line); padding: 44px 0; }
.facility:first-child { border-top: 0; padding-top: 0; }
.facility:last-child { margin-bottom: 72px; }
.facility h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.03em; margin-bottom: 12px; }
.facility p { color: var(--muted); margin: 0; }
.facility dl { margin: 0; }
.facility dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facility dl div:first-child { border-top: 3px solid var(--ink); }
.facility dt { color: var(--muted); font-size: 15px; }
.facility dd { margin: 0; font-weight: 500; }
.facility-photo { margin: 22px 0 0; max-width: 480px; }

/* ── Members: portraits unified in greyscale, colour on hover ───────────── */
.members { list-style: none; margin: 0 0 80px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 44px 32px; }
.portrait { aspect-ratio: 4 / 5; background: var(--night-08); overflow: hidden; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .3s; }
.member:hover .portrait img { filter: none; }
.portrait:not(:has(img))::after { content: attr(data-initials); font-size: 56px; font-weight: 800; letter-spacing: -0.04em; color: var(--night-80); }
.member h2 { font-size: 21px; font-weight: 700; margin: 18px 0 4px; }
.role { color: var(--night); font-weight: 500; margin-bottom: 8px; }
.contact { font-size: 15px; color: var(--muted); }


/* ── Footer: the logo, large ───────────────────────────────────────────── */
.site-footer { background: var(--night); color: var(--on-night); padding: clamp(56px, 7vw, 96px) 0 36px; font-size: 15px; }
.site-footer a { color: #fff; }
.foot-mark { display: block; width: clamp(200px, 26vw, 340px); margin-bottom: clamp(36px, 4vw, 56px); }
.foot-lab { width: 100%; height: auto; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 1.2fr) auto; gap: 28px 48px; align-items: start; }
.foot-id p { margin: 0; }
.foot-id strong { color: #fff; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 6px; }
.foot-logo { height: 46px; width: auto; filter: brightness(0) invert(1); }
.foot-legal { margin: 40px 0 0; font-size: 13px; border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --rail: 200px; }
  .foot-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .uni-logo img { height: 30px; }
  .brand { padding-left: 16px; }
  .brand-logo { height: 32px; }
  .nav-toggle { display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px; background: none; border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
  .nav-toggle span:first-child { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
  .nav-toggle span:first-child::before { top: -6px; }
  .nav-toggle span:first-child::after { top: 6px; }
  #site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); margin: 0; }
  .site-header:has(.nav-toggle[aria-expanded="true"]) #site-nav { display: block; }
  #site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  #site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  #site-nav a[aria-current="page"] { border-bottom-color: var(--line); font-weight: 700; }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  /* narrow screens: the cartwheel first (the page opens on the moving body, not on a block of
     text), the pause button in its lower corner, then the title and the text, the note last */
  .hero { --stage-h: clamp(300px, 80vw, 460px); }
  .hero-canvas { position: relative; order: 1; height: var(--stage-h); }
  .hero-inner, .hero-foot { display: contents; }
  .hero-text { order: 2; padding: 28px var(--gutter) 12px; }
  .stage-note { order: 3; padding: 0 var(--gutter) 36px; }
  .stage-pause { position: absolute; z-index: 1; top: calc(var(--stage-h) - 60px); right: var(--gutter); }
  .q-list li, .showcase-text, .index a, .lab, .join-grid, .with-toc, .year, .press-group, .facility, .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .showcase, .showcase:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .showcase:nth-of-type(even) .showcase-media { order: 0; }
  .lab-photo { min-height: 0; aspect-ratio: 3 / 2; }
  .lab-text { padding: 40px var(--gutter); }
  .toc { display: none; }
  .year h2 { position: static; }
  .press-list li { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .site-header .wrap { gap: 14px; }
  .uni-logo img { height: 24px; }
  .brand { padding-left: 14px; }
  .brand-logo { height: 26px; }
  .foot-logo { height: 38px; }
  .news-list a { grid-template-columns: auto 1fr; }
  .news-text { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .nav-toggle, #site-nav, .hero-canvas, .stage-pause, .toc, .pub-tools { display: none !important; }
  .site-header { position: static; }
  .hero, .site-footer, .lab, .work, .join { background: none; color: var(--ink); }
  .hero h1, .lab .section-title { color: var(--ink); }
}

/* page to page: a cross-fade where the browser can (view transitions; others just change page) —
   the qry stack's motion signature (--qry-speed, --qry-ease) */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-group(root) { animation-duration: var(--qry-speed, .2s); animation-timing-function: var(--qry-ease, cubic-bezier(.2, .7, .2, 1)); }
