/* Research department site, Option B: "Accession".
   The department as an accessioned collection. Every study, theme and group
   is a mounted record: a ruled label block, an accession (ethics) reference,
   dated slips, section labels in a left margin. Type, rules and one stamp
   ink do the work; imagery is mounted sparingly as plates.
   Every colour, size and space comes from /css/tokens.css, which the build
   copies from the active brand's token file (design/tokens-<brand>.css).
   This file holds no colour values of its own.
   Breakpoints: 600px (narrow), 900px (margin column folds) and 1080px (menu
   folds); custom properties cannot be read inside @media. */

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-pinned); }
:root { --header-pinned: 6.5rem; --rule: 1px solid var(--color-rule-ink); --hair: 1px solid var(--color-line); }
@media (min-width: 1181px) { :root { --header-pinned: 7.5rem; } }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--color-surface); color: var(--color-text); font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading); font-variant-numeric: lining-nums; text-rendering: optimizeLegibility; }
main { flex: 1 0 auto; padding-bottom: var(--section); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--color-brand); color: var(--color-on-accent); }
a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color var(--duration) var(--easing), text-decoration-color var(--duration) var(--easing); }
a:hover { color: var(--color-link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 1px; }
.demo :focus-visible, .site-footer :focus-visible, .skip:focus-visible { outline-color: var(--color-focus-on-inverse); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--weight-heading); line-height: var(--leading-tight); color: var(--color-heading); margin: 0 0 var(--space-3); text-wrap: balance; }
h1 { font-size: var(--text-2xl); letter-spacing: -.022em; }
h2 { font-size: var(--text-xl); letter-spacing: -.01em; }
h3 { font-size: var(--text-md); line-height: 1.25; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--color-surface-inverse); color: var(--color-text-on-inverse); padding: var(--space-3) var(--space-4); z-index: 100; }
.skip:focus { left: var(--space-4); top: var(--space-4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the label voice: semi-condensed caps for field names, stamps and dates */
.label dt, .acc, .register-panel > h2, .facts dt, .index-count, .ledger time, .slips time, .legend-label,
.pub-year, .aside-h, .demo-tag, .badge, .breadcrumb, .post-meta, .route-text, .count, .site-footer h2:not(.footer-id h2), .docs small {
  font-family: var(--font-label); font-stretch: var(--stretch-label);
}

/* ---------- demo bar ---------- */
.demo { background: var(--demo-bar-bg); color: var(--demo-bar-text); font-family: var(--font-label); font-size: var(--text-sm); line-height: var(--leading-snug); padding: var(--space-2) 0; }
.demo .wrap { display: flex; align-items: center; gap: var(--space-3); }
.demo-tag { flex: none; background: var(--demo-tag-bg); color: var(--demo-tag-text); font-size: var(--text-xs); font-weight: var(--weight-strong); letter-spacing: var(--tracking-label); text-transform: uppercase; border-radius: var(--radius-sm); padding: .1rem .45rem; }

/* ---------- pinned header: one row on wide screens ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--nav-bg); border-top: 4px solid var(--color-brand); border-bottom: 1px solid var(--nav-border); }
.masthead { display: flex; align-items: stretch; justify-content: space-between; gap: var(--space-5); }
.header-top { display: flex; align-items: center; padding: var(--space-3) 0; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--tap); color: var(--color-heading); text-decoration: none; }
.brand:hover { color: var(--color-heading); }
.brand-mark { width: var(--logo-height); height: var(--logo-height); flex: none; border-radius: var(--radius-sm); }
.brand-text { font-family: var(--font-sans); font-weight: 600; font-size: 1.02rem; line-height: 1.15; letter-spacing: -.005em; max-width: 15.5em; }
.brand small { display: block; margin-top: .2rem; font-family: var(--font-label); font-stretch: var(--stretch-label); font-weight: 500; font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); }
.brand-wordmark { gap: 0; }
.brand-wordmark .brand-text { max-width: 12em; font-size: .92rem; }
.brand-logo { height: var(--logo-height); width: auto; flex: none; box-sizing: content-box; padding: var(--logo-clear) var(--logo-clear) var(--logo-clear) 0; }
.brand-divider { align-self: stretch; width: 1px; margin: var(--space-2) var(--space-4) var(--space-2) 0; background: var(--color-line-strong); }
.menu-site-name { display: none; }

.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.nav { display: flex; list-style: none; margin: 0; padding: 0; height: 100%; }
.nav > li { position: relative; display: flex; }
.nav a { display: flex; align-items: center; min-height: var(--tap); color: var(--nav-text); text-decoration: none; font-family: var(--font-sans); }
.nav > li > a { padding: 0 .65rem; font-size: .95rem; font-weight: 500; white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow var(--duration) var(--easing), color var(--duration) var(--easing); }
.nav > li:last-child > a { padding-right: 0; }
.nav > li > a:hover { color: var(--nav-text-current); box-shadow: inset 0 -2px 0 var(--nav-hover-bar); }
.nav > li > a[aria-current="page"] { color: var(--nav-text-current); font-weight: 600; box-shadow: inset 0 -3px 0 var(--nav-current-bar); }
.nav > li > a:focus-visible { outline-color: var(--nav-focus); outline-offset: -3px; }
/* small drawn chevron after the two items with a submenu (wide screens) */
.nav > .has-sub > a::after { content: ""; width: .4rem; height: .4rem; margin: -.2rem 0 0 .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex: none; }
.nav .sub { position: absolute; top: 100%; left: 0; min-width: 19rem; list-style: none; margin: 0; padding: 0; background: var(--color-surface); border: var(--rule); z-index: 40; display: none; }
.nav .sub li + li { border-top: var(--hair); }
.nav .sub a { padding: var(--space-2) var(--space-4); color: var(--color-text); font-size: var(--text-sm); }
.nav .sub a:hover { background: var(--color-surface-tint); color: var(--color-link); }
.nav .sub a:focus-visible { outline-color: var(--color-focus); outline-offset: -3px; }
.nav > li:hover > .sub, .nav > li:focus-within > .sub { display: block; }

@media (min-width: 1181px) {
  .menu > summary { display: none; }
  .menu::details-content { content-visibility: visible; }
  /* the menu sits on the header's bottom rule, so the current-page bar meets it */
  .menu { align-self: flex-end; }
  .nav > li > a { min-height: 64px; }
}

@media (max-width: 1180px) {
  .masthead { display: block; position: relative; }
  .header-top { padding-right: calc(100px + var(--space-3)); }
  .menu > summary { display: flex; align-items: center; justify-content: center; gap: var(--space-2); position: absolute; right: var(--gutter); top: 50%; translate: 0 -50%; min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-3); border: var(--rule); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-heading); font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); cursor: pointer; transition: background-color var(--duration) var(--easing); }
  .menu[open] > summary { top: calc(var(--space-3) + var(--tap) / 2); }
  .menu > summary:hover { background: var(--color-surface-tint); }
  .menu-icon { width: 16px; height: 12px; flex: none; background: linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat; }
  .menu[open] .menu-icon { background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; transform: rotate(45deg); position: relative; }
  .menu[open] .menu-icon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
  .menu-label-close, .menu[open] .menu-label-open { display: none; }
  .menu[open] .menu-label-close { display: inline; }
  /* the open menu sits under the brand row and scrolls inside the pinned header on short screens */
  .nav-bar { margin: 0 calc(var(--gutter) * -1); border-top: var(--rule); }
  .menu[open] .nav-bar { max-height: calc(100vh - var(--header-pinned)); max-height: calc(100dvh - var(--header-pinned)); overflow-y: auto; overscroll-behavior: contain; }
  .menu-site-name { display: block; margin: 0; padding: var(--space-3) var(--gutter); font-family: var(--font-heading); font-size: var(--text-md); color: var(--nav-text); border-bottom: var(--hair); }
  .nav { display: block; }
  .nav > li { display: block; }
  .nav > li > a { min-height: 52px; padding: var(--space-2) var(--gutter); border-bottom: var(--hair); box-shadow: none; font-size: var(--text-base); }
  .nav > li:last-child > a { border-bottom: 0; padding-right: var(--gutter); }
  .nav > li > a:hover { box-shadow: none; background: var(--color-surface-tint); }
  .nav > li > a[aria-current="page"] { box-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
  .nav > .has-sub > a::after { display: none; }
  .nav .sub { display: none !important; }
}
@media (max-width: 600px) {
  .brand small { display: none; }
  .brand-mark { width: var(--logo-height-narrow); height: var(--logo-height-narrow); }
  .brand-logo { height: var(--logo-height-narrow); }
  .brand-text { font-size: .95rem; }
  .brand-wordmark .brand-divider, .brand-wordmark .brand-text { display: none; }
}

/* ---------- title blocks: the record's heading on the sheet ---------- */
.breadcrumb { font-size: var(--text-sm); color: var(--color-text-muted); padding-top: var(--space-3); letter-spacing: .01em; }
.breadcrumb a { color: var(--color-text-muted); display: inline-flex; align-items: center; min-height: var(--tap); }
.breadcrumb a:hover { color: var(--color-link); }
.breadcrumb span[aria-hidden] { margin: 0 .35rem; }
.title-block { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-5) clamp(2rem, 6vw, 6rem); align-items: start; padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.breadcrumb + .title-block { padding-top: var(--space-4); }
.title-main h1 { max-width: 20ch; margin-bottom: var(--space-4); }
.home-title .title-main h1 { max-width: 17ch; font-size: clamp(2.4rem, 5.2vw, 4.25rem); }
.lede { color: var(--color-text-muted); max-width: var(--measure-lede); font-size: var(--text-md); line-height: 1.55; }
.title-main .lede:last-child { margin-bottom: 0; }
.title-side { display: grid; gap: var(--space-4); }
/* home: statement and facts on the left, the recruiting register on the right */
.home-title { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "main side" "facts side"; row-gap: var(--space-7); }
.home-title .title-main { grid-area: main; }
.home-title .register-panel { grid-area: side; }
.home-title .facts { grid-area: facts; align-self: end; }
@media (max-width: 900px) {
  .title-block { grid-template-columns: minmax(0, 1fr); }
  .home-title { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "facts"; row-gap: var(--space-6); }
}

/* ---------- buttons and text links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid transparent; font-family: var(--font-sans); font-weight: 600; font-size: var(--text-base); line-height: 1.2; text-decoration: none; transition: background-color var(--duration) var(--easing); }
.btn.primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn.primary:hover { background: var(--color-accent-hover); color: var(--color-on-accent); }
.btn-row { display: flex; gap: var(--space-3) var(--space-5); flex-wrap: wrap; align-items: center; margin-top: var(--space-5); }
.text-link { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--font-sans); font-weight: 600; }
@media (max-width: 600px) { .btn-row .btn { width: 100%; } }

/* ---------- label blocks: the ruled specimen label ---------- */
.label { margin: 0; border: var(--rule); background: var(--color-surface); font-size: var(--text-sm); line-height: 1.4; }
.label > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--space-3); padding: .55rem .75rem; }
.label > div + div { border-top: var(--hair); }
.label dt { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); padding-top: .12rem; }
.label dd { margin: 0; font-family: var(--font-sans); color: var(--color-text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.label dd a { color: var(--color-link); }
.label.record { background: var(--color-surface-alt); }
.label.record > div { padding: .7rem .9rem; }
/* comma-set link lists inside labels: each link keeps a 32px-tall hit area */
.inline-links { list-style: none; margin: 0; padding: 0; line-height: 2; }
.inline-links li { display: inline; }
.inline-links a { padding-block: .35rem; }
.inline-links li:not(:last-child)::after { content: ", "; color: var(--color-text-muted); }

/* status stamps: a ruled rubber stamp; recruiting is the only filled one */
.badge { display: inline-flex; align-items: center; font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; line-height: 1.2; padding: .38rem .6rem; border-radius: var(--radius-sm); background: var(--status-progress-bg); color: var(--status-progress-fg); outline: 1.5px solid currentColor; outline-offset: -4px; white-space: nowrap; }
.badge.recruiting { background: var(--status-recruiting-bg); color: var(--status-recruiting-fg); }
.badge.completed { background: var(--status-completed-bg); color: var(--status-completed-fg); }
.badge:not(.recruiting) { outline-offset: -1.5px; }
.acc { font-size: var(--text-sm); color: var(--color-text-muted); letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* ---------- home: the recruiting register and the department's record ---------- */
.register-panel { border-top: 3px solid var(--color-rule-ink); padding: 0; }
.register-panel > h2 { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-heading); margin: 0; padding: .6rem 0; border-bottom: var(--rule); line-height: 1.4; }
.register { list-style: none; margin: 0; padding: 0; }
.register li { padding: var(--space-4) 0; border-bottom: var(--hair); }
.register-title { font-family: var(--font-sans); font-weight: 600; font-size: 1.12rem; line-height: 1.25; color: var(--color-heading); text-decoration: none; }
.register-title:hover { color: var(--color-link); text-decoration: underline; text-decoration-thickness: 2px; }
.register li p { margin: var(--space-1) 0 0; font-size: .95rem; line-height: 1.5; color: var(--color-text-muted); }
.register .register-meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); font-family: var(--font-label); font-stretch: var(--stretch-label); font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }
.register-foot { margin: 0; }
.register-foot a { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--font-sans); font-weight: 600; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--rule); border-bottom: var(--rule); }
.facts > div { padding: var(--space-3) var(--space-3) var(--space-3) 0; display: flex; flex-direction: column; gap: var(--space-1); }
.facts > div + div { padding-left: var(--space-4); border-left: var(--hair); }
.facts dt { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); line-height: 1.3; }
.facts dd { margin: 0; font-family: var(--font-sans); font-weight: 600; font-size: var(--text-xl); line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--color-heading); }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div, .facts > div + div { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-left: 0; border-top: var(--hair); }
  .facts > div:nth-child(-n+2) { border-top: 0; }
  .facts > div:nth-child(even) { padding-left: var(--space-4); border-left: var(--hair); }
}

.routes ul { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.routes a { display: flex; flex-direction: column; gap: var(--space-1); min-height: var(--tap); padding-top: var(--space-3); border-top: var(--hair); color: var(--color-heading); text-decoration: none; }
.route-title { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-md); text-decoration: underline; text-decoration-color: var(--color-line-strong); text-underline-offset: .22em; text-decoration-thickness: 1px; }
.route-text { color: var(--color-text-muted); font-size: var(--text-sm); }
.routes a:hover .route-title { color: var(--color-link); text-decoration-color: currentColor; text-decoration-thickness: 2px; }
@media (max-width: 760px) { .routes ul { grid-template-columns: 1fr; gap: 0; } .routes a { padding: var(--space-3) 0; } }

/* ---------- sections: the heading sits in the left margin ---------- */
.rec { display: grid; grid-template-columns: var(--margin-col) minmax(0, 1fr); column-gap: clamp(1.5rem, 4vw, 4rem); margin-top: var(--section); padding-top: var(--space-4); border-top: var(--rule); align-items: start; }
.rec > h2 { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: calc(var(--header-pinned) + var(--space-4)); font-size: var(--text-lg); line-height: 1.15; margin: 0; }
.rec > :not(h2) { grid-column: 2; }
.rec.no-head { border-top: 0; padding-top: 0; margin-top: var(--space-5); }
.title-block + .wrap > .rec.no-head:first-child { margin-top: 0; }
.title-block + .wrap > .rec:first-child, .jump + .rec { margin-top: var(--space-7); }
.section-intro { max-width: var(--measure); color: var(--color-text-muted); margin-bottom: var(--space-5); }
.more-link { margin: var(--space-4) 0 0; }
.more-link a { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--font-sans); font-weight: 600; }
@media (max-width: 900px) {
  .rec { display: block; }
  .rec > h2 { position: static; margin-bottom: var(--space-5); font-size: var(--text-xl); }
}

/* ---------- reading text ---------- */
.prose { max-width: var(--measure); }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: var(--text-lg); margin-top: var(--space-6); padding-top: var(--space-3); border-top: var(--hair); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-5); }
.prose ul:not(.inline-links), .prose ol:not(.slips) { padding-left: 1.2rem; }
.prose li { margin-bottom: var(--space-1); }
.prose li::marker { color: var(--color-brand); }
.prose strong { font-weight: 600; color: var(--color-heading); }

/* ---------- index lists: themes and groups as a register, not cards ---------- */
.index-list { list-style: none; margin: 0; padding: 0; border-bottom: var(--hair); }
.index-list > li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr); gap: var(--space-2) var(--space-5); padding: var(--space-4) 0; border-top: var(--hair); align-items: baseline; }
.index-list > li:first-child { border-top: 0; padding-top: 0; }
.rec .index-list > li:first-child { padding-top: var(--space-1); }
.index-list h2, .index-list h3 { font-size: var(--text-md); line-height: 1.25; margin: 0; }
.index-list h2 a, .index-list h3 a { color: var(--color-heading); text-decoration: none; }
.index-list h2 a:hover, .index-list h3 a:hover { color: var(--color-link); text-decoration: underline; text-decoration-thickness: 2px; }
.index-list p { margin: 0; color: var(--color-text-muted); font-size: .98rem; line-height: 1.5; }
.index-list .index-count { font-size: var(--text-sm); color: var(--color-text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.index-list .index-count a { font-family: var(--font-sans); }
/* themes index: text beside its mounted plate */
.index-list.plates { border-top: var(--rule); }
.index-list.plates > li { grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: var(--space-5) clamp(2rem, 5vw, 5rem); padding: var(--space-6) 0; align-items: start; }
.index-list.plates > li:first-child { padding-top: var(--space-6); }
.index-list.plates h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.index-list.plates p { max-width: 48ch; }
.index-list.plates .index-count { text-align: left; margin-top: var(--space-3); }
@media (max-width: 760px) {
  .index-list > li { grid-template-columns: minmax(0, 1fr); }
  .index-list .index-count { text-align: left; }
  .index-list.plates > li { grid-template-columns: minmax(0, 1fr); padding: var(--space-5) 0; }
  .index-list.plates > li:first-child { padding-top: var(--space-5); }
}

/* ---------- study records as specimen sheets ---------- */
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); list-style: none; padding: 0; margin: 0; }
.grid > li { display: flex; min-width: 0; }
.grid > li > * { flex: 1; min-width: 0; }
.card { background: var(--color-surface); border: 1px solid var(--color-line-strong); border-radius: var(--radius); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); transition: border-color var(--duration) var(--easing); }
.card:hover, .card:focus-within { border-color: var(--color-rule-ink); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-2); }
.card h3 { margin: 0; font-size: 1.18rem; line-height: 1.22; }
.card h3 a { color: var(--color-heading); text-decoration: none; }
.card h3 a:hover { color: var(--color-link); text-decoration: underline; text-decoration-thickness: 2px; }
.card-sum { color: var(--color-text-muted); font-size: .98rem; line-height: 1.5; margin: 0 0 var(--space-3); }
.card .label { margin-top: auto; }
.card .label > div { grid-template-columns: 4.5rem minmax(0, 1fr); padding: .35rem .6rem; }
.card-cta { margin: var(--space-1) 0 0; }
.cta { display: inline-flex; align-items: center; min-height: var(--tap); font-family: var(--font-sans); font-weight: 600; color: var(--color-accent-text); }

/* ---------- people ---------- */
.grid.people { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid.people.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0 var(--space-5); }
.person { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); border: 1px solid var(--color-line-strong); background: var(--color-surface); }
.avatar { flex: none; width: 72px; height: 72px; border-radius: var(--radius-sm); background: var(--avatar-bg); color: var(--avatar-text); display: grid; place-items: center; font-family: var(--font-sans); font-weight: 600; font-size: var(--text-lg); letter-spacing: .02em; object-fit: cover; }
.person-text { min-width: 0; }
.person h3 { font-size: var(--text-md); margin: 0 0 .15rem; }
.person h3 a { color: var(--color-heading); text-decoration: none; }
.person h3 a:hover { color: var(--color-link); text-decoration: underline; text-decoration-thickness: 2px; }
.person .role { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.45; margin: 0; }
.person .bio { font-size: .98rem; margin-top: var(--space-3); }
.person .bio p { margin-bottom: var(--space-2); }
.person .links { display: flex; gap: var(--space-4); flex-wrap: wrap; margin: var(--space-1) 0 0; font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); }
.person .links a { display: inline-flex; align-items: center; min-height: var(--tap); }
.grid.compact .person { border: 0; border-top: var(--hair); padding: var(--space-3) 0; align-items: center; gap: var(--space-3); }
.grid.compact .avatar { width: 44px; height: 44px; font-size: var(--text-sm); }
.grid.compact .person h3 { font-size: 1.02rem; }
.grid.compact .person h3 a { display: inline-block; padding: .1rem 0; }
@media (max-width: 600px) { .person { padding: var(--space-3); gap: var(--space-3); } .avatar { width: 56px; height: 56px; } }

/* ---------- dated lists: news ledger and study slips ---------- */
.ledger, .slips { list-style: none; padding: 0; margin: 0; }
.ledger li, .slips li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4) 0; border-top: var(--hair); }
.ledger li:first-child, .slips li:first-child { border-top: 0; padding-top: var(--space-1); }
.ledger time, .slips time { color: var(--color-text-muted); font-size: var(--text-sm); letter-spacing: .02em; padding-top: .2rem; font-variant-numeric: tabular-nums; }
.ledger a { font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; line-height: 1.3; color: var(--color-heading); text-decoration: none; }
.ledger a:hover { color: var(--color-link); text-decoration: underline; text-decoration-thickness: 2px; }
.ledger p { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: .98rem; max-width: var(--measure); }
@media (max-width: 600px) { .ledger li, .slips li { grid-template-columns: 1fr; gap: var(--space-1); } }

/* ---------- publications: a typeset reference list ---------- */
.pub-list { margin-top: var(--space-6); max-width: 54rem; }
.pub-year-block { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: var(--space-4); border-top: var(--rule); padding-top: var(--space-2); margin-top: var(--space-5); }
.pub-list > .pub-year-block:first-child { margin-top: 0; }
.pub-year { font-size: var(--text-md); font-weight: 600; margin: 0; padding-top: .45rem; font-variant-numeric: tabular-nums; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding: var(--space-2) 0 var(--space-3); }
.pubs li + li { border-top: var(--hair); padding-top: var(--space-3); }
.pubs .t { display: block; font-weight: 500; font-size: var(--text-base); line-height: 1.4; color: var(--color-heading); margin-bottom: var(--space-1); }
.cite { display: block; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.cite em { color: var(--color-text); }
.pub-source { margin: var(--space-4) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }
@media (max-width: 600px) { .pub-year-block { grid-template-columns: 1fr; gap: 0; } }

/* selected papers set like figures: title, citation, plain-language legend */
.paper { max-width: 54rem; padding: var(--space-4) 0 var(--space-5); border-top: var(--hair); }
.rec > .paper:first-of-type, .section-intro + .paper { border-top: 0; padding-top: 0; }
.paper h3 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.paper .cite { margin: 0 0 var(--space-3); }
.legend { background: var(--color-surface-alt); border: var(--hair); padding: var(--space-3) var(--space-4); }
.legend p { margin: 0; font-size: .98rem; }
.legend .legend-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-1); }
.paper-group { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- study page ---------- */
.study-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-top: var(--space-4); }
.study-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-4); }
.study-main h1 { max-width: 22ch; }
.study-prose { margin-top: var(--space-7); }
.study-prose > h2:first-child { margin-top: 0; }
.study-aside { display: grid; gap: var(--space-3); }
.aside-h { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-heading); margin: var(--space-3) 0 0; padding-bottom: .4rem; border-bottom: var(--rule); line-height: 1.4; }
.study-aside .label { border-top: 0; }
/* the study record: each field name above its value, like a filled-in label */
.study-aside .label.record > div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.study-aside .label dd { font-size: var(--text-base); }
.acc-value { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.docs li { position: relative; display: flex; flex-direction: column; padding: var(--space-2) var(--space-3) var(--space-2) 2.5rem; border: 1px solid var(--color-line-strong); transition: border-color var(--duration) var(--easing), background-color var(--duration) var(--easing); }
.docs li::before { content: ""; position: absolute; left: .85rem; top: .8rem; width: .85rem; height: 1.1rem; border: 1.5px solid var(--color-brand); background: linear-gradient(var(--color-brand), var(--color-brand)) center 38% / 50% 1.5px no-repeat, linear-gradient(var(--color-brand), var(--color-brand)) center 66% / 50% 1.5px no-repeat; }
.docs li:hover { border-color: var(--color-rule-ink); background: var(--color-surface-alt); }
.docs a { font-family: var(--font-sans); font-weight: 600; line-height: 1.35; text-decoration: none; color: var(--color-heading); }
.docs a::after { content: ""; position: absolute; inset: 0; }
.docs li:hover a { text-decoration: underline; }
.docs small { color: var(--color-text-muted); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-border); padding: var(--space-3) var(--space-4); color: var(--notice-text); font-size: .98rem; }
@media (max-width: 900px) { .study-layout { grid-template-columns: minmax(0, 1fr); } .study-aside { position: static; } }

/* take-part slip (recruiting studies) and the students' apply slip */
.take-part { margin-top: var(--space-6); padding: var(--space-5); background: var(--color-surface-tint); border: 1px solid var(--color-accent-rule); max-width: var(--measure); }
.take-part h2, .take-part h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.take-part p { margin-bottom: 0; }
.take-part > * + p, .take-part > * + .take-part-text { margin-top: var(--space-2); }
.take-part-text > :last-child { margin-bottom: 0; }
.take-part .notice { margin-top: var(--space-4); }
.take-part .btn-row { margin-top: var(--space-4); }

.updates { margin-top: var(--space-7); }
.updates h2 { padding-top: var(--space-3); border-top: var(--rule); }
.update-text { max-width: var(--measure); }

/* plates: imagery mounted on board, used once per record */
.plate { margin: 0; padding: .6rem; background: var(--color-surface-alt); border: var(--hair); }
/* on a phone the record comes first: decorative plates beside titles and in the study record are left out */
@media (max-width: 600px) { .title-side .plate, .study-aside .plate { display: none; } }
.art-frame { background: var(--art-bg); isolation: isolate; overflow: hidden; }
.art-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.art-frame img.placeholder { mix-blend-mode: var(--art-blend); }
.post-figure { margin: 0 0 var(--space-6); }

/* ---------- contents, switch and the jump-landing flash ---------- */
.jump { margin-top: var(--space-2); }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; border-top: var(--rule); border-bottom: var(--hair); }
.jump li + li { border-left: var(--hair); }
.jump a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-5); font-family: var(--font-sans); font-weight: 600; color: var(--color-heading); text-decoration: none; transition: background-color var(--duration) var(--easing); }
.jump li:first-child a { padding-left: 0; }
.jump a:hover { color: var(--color-link); text-decoration: underline; }
.jump .count { font-weight: 500; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .jump ul { flex-direction: column; } .jump li + li { border-left: 0; border-top: var(--hair); } .jump a { display: flex; padding: 0; } }

.switch { display: inline-flex; flex-wrap: wrap; margin-top: var(--space-5); border: var(--rule); border-radius: var(--radius-sm); }
.switch a { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-2) var(--space-4); font-family: var(--font-sans); font-weight: 600; text-decoration: none; color: var(--color-heading); transition: background-color var(--duration) var(--easing); }
.switch a + a { border-left: var(--rule); }
.switch a:hover { background: var(--color-surface-tint); }
.switch a[aria-current="page"] { background: var(--color-rule-ink); color: var(--color-surface); }
.switch a:focus-visible { outline-offset: 2px; }

/* the signature moment: a jump or deep link lands and its record flashes in
   the stamp tint, then settles */
@keyframes landed { from { background-color: var(--color-accent-tint); } to { background-color: transparent; } }
@keyframes landed-slip { from { box-shadow: inset 0 0 0 3px var(--color-accent-rule); } to { box-shadow: inset 0 0 0 0 var(--color-accent-rule); } }
.person:target, .jump-target:target > h2 { animation: landed 1.8s cubic-bezier(.16, 1, .3, 1) both; }
.take-part:target { animation: landed-slip 1.8s cubic-bezier(.16, 1, .3, 1) both; }

/* ---------- page openings, text and image blocks ---------- */
.page-body .prose + .ledger { margin-top: var(--space-5); }
.blocks { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.text-image { display: grid; gap: var(--space-5); align-items: start; grid-template-columns: minmax(0, 1fr); }
.block-figure { margin: 0; }
.block-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 1181px) {
  .text-image:not(.text-only) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-6); }
  .text-image.image-left { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .text-image.image-left .block-figure { order: -1; }
}

/* ---------- news post ---------- */
.post { padding-top: var(--space-4); max-width: 46rem; }
.post-head h1 { max-width: 22ch; }
.post-meta { font-size: var(--text-sm); color: var(--color-text-muted); letter-spacing: .02em; margin-bottom: var(--space-4); }
.post-head { border-bottom: var(--rule); padding-bottom: var(--space-5); margin-bottom: var(--space-6); }
.post-head .lede { margin-bottom: 0; }
.post-label { margin-top: var(--space-6); max-width: 30rem; }

/* ---------- footer: the cabinet ---------- */
.site-footer { flex: none; background: var(--footer-bg); color: var(--color-text-on-inverse-muted); font-size: var(--text-sm); margin-top: var(--space-6); }
.footer-cols { padding-top: var(--space-7); padding-bottom: var(--space-7); display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
.site-footer a { color: var(--color-text-on-inverse); text-decoration-color: color-mix(in srgb, var(--color-text-on-inverse) 45%, transparent); }
.site-footer a:hover { color: var(--color-text-on-inverse); text-decoration-color: var(--color-text-on-inverse); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; line-height: 1.3; }
.site-footer h2 { color: var(--color-accent-on-inverse); font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid color-mix(in srgb, var(--color-text-on-inverse) 30%, transparent); }
.site-footer .footer-id h2 { font-family: var(--font-heading); color: var(--color-text-on-inverse); font-size: var(--text-lg); letter-spacing: -.005em; text-transform: none; font-weight: var(--weight-heading); border: 0; padding: 0; max-width: 16em; }
.site-footer p { margin-bottom: var(--space-2); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--color-text-on-inverse) 20%, transparent); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-4); padding-bottom: var(--space-4); }
.footer-bottom p { margin: 0; }
.footer-logo { height: 40px; width: auto; }
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-id { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer-cols { grid-template-columns: 1fr; gap: var(--space-5); padding-top: var(--space-6); } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .person:target, .jump-target:target > h2 { background-color: var(--color-accent-tint); }
  .take-part:target { box-shadow: inset 0 0 0 3px var(--color-accent-rule); }
}
