/* Research department site: plain CSS, no framework.
   Structure follows the "photo hero with a solid title plate" layout.
   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. Contrast ratios for every
   pairing are recorded in the token files.
   Breakpoints: 600px (narrow) and 820px (medium); custom properties cannot
   be read inside @media, so the numbers are written out here. */

/* base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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); }
main { flex: 1 0 auto; padding-bottom: var(--section); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
.demo :focus-visible, .hero :focus-visible, .site-footer :focus-visible, .path.p3: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); }
h2 { font-size: var(--text-xl); color: var(--color-heading-2); }
h3 { font-size: var(--text-lg); }
p { margin: 0 0 var(--space-4); }
.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; }

/* demo banner */
.demo { background: var(--demo-bar-bg); color: var(--demo-bar-text); font-size: var(--text-sm); line-height: var(--leading-snug); padding: var(--space-2) 0; }
.demo .wrap { display: flex; align-items: center; justify-content: center; gap: var(--space-2); text-align: center; }
.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-caps); text-transform: uppercase; border-radius: var(--pill); padding: .1rem .55rem; }

/* header: brand row, then the menu (a details element: a disclosure below
   820px, always open above it) */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--nav-border); position: sticky; top: 0; z-index: 30; }
/* the header (brand row and menu) is pinned while the page scrolls. Anchor
   targets and the sticky study aside clear it with --header-pinned, which is
   at least the pinned header's height in both brands: 65 to 69px up to 820px,
   158 to 210px from 821 to 999px (the menu wraps to two lines), 130 to 158px
   from 1000px. */
:root { --header-pinned: 4.5rem; }
@media (min-width: 821px) { :root { --header-pinned: 13.5rem; } }
@media (min-width: 1000px) { :root { --header-pinned: 10.5rem; } }
html { scroll-padding-top: var(--header-pinned); }
.masthead { position: relative; }
.header-top { padding-top: var(--space-4); padding-bottom: var(--space-4); display: flex; align-items: center; }
.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: 9px; }
.brand-text { font-family: var(--font-heading); font-size: var(--text-lg); line-height: var(--leading-tight); }
.brand small { display: block; margin-top: .15rem; font-family: var(--font-body); font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: .02em; }
/* wordmark slot: empty clear space on every side, no box or tint behind it */
.brand-wordmark { gap: 0; }
/* clear space on top, right and bottom; the left edge sits on the content edge (the page gutter keeps that side clear) */
.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; }

/* above 820px the menu is always shown: summary hidden, content forced visible
   (::details-content: Firefox 143+, Chromium 131+, Safari 18.4+; elsewhere the
   Menu button simply stays visible at desktop width, which still works) */
@media (min-width: 821px) {
  .menu > summary { display: none; }
  .menu::details-content { content-visibility: visible; }
}
.nav-bar { background: var(--nav-bg); border-top: 1px solid var(--nav-border); }
.nav { display: flex; flex-wrap: wrap; list-style: none; margin: 0 calc(var(--space-3) * -1); padding: 0; }
.nav > li { position: relative; }
.nav a { display: flex; align-items: center; min-height: var(--tap); padding: var(--space-2) var(--space-3); color: var(--nav-text); text-decoration: none; font-size: var(--text-base); }
.nav > li > a { min-height: 52px; box-shadow: inset 0 -4px 0 transparent; transition: box-shadow var(--duration) var(--easing), color var(--duration) var(--easing); }
.nav > li > a:hover { color: var(--nav-text-current); box-shadow: inset 0 -3px 0 var(--nav-hover-bar); }
.nav > li > a[aria-current="page"] { color: var(--nav-text-current); font-weight: 600; box-shadow: inset 0 -4px 0 var(--nav-current-bar); }
.nav > li > a:focus-visible { outline-color: var(--nav-focus); outline-offset: -3px; }
/* chevron after the two items with a submenu (desktop only) */
.nav > .has-sub > a::after { content: ""; width: 10px; height: 10px; margin-left: var(--space-2); flex: none; background: currentColor; clip-path: polygon(10% 30%, 50% 70%, 90% 30%, 100% 40%, 50% 90%, 0 40%); }
.nav .sub { position: absolute; top: 100%; left: 0; min-width: 17rem; list-style: none; margin: 0; padding: var(--space-2) 0; background: var(--color-surface); border: 1px solid var(--color-line); border-top: 3px solid var(--nav-current-bar); border-radius: 0 0 var(--radius-sm) var(--radius-sm); box-shadow: var(--shadow-hover); z-index: 40; display: none; }
.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-heading); }
.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 (max-width: 820px) {
  .header-top { padding-top: max(0px, var(--space-3) - var(--logo-clear)); padding-bottom: max(0px, var(--space-3) - var(--logo-clear)); padding-right: calc(var(--gutter) + 100px); }
  .brand-mark { width: var(--logo-height-narrow); height: var(--logo-height-narrow); }
  .brand-logo { height: var(--logo-height-narrow); }
  .brand-text { font-size: var(--text-md); }
  .brand-wordmark .brand-divider, .brand-wordmark .brand-text { display: none; }

  .menu > summary { display: flex; align-items: center; justify-content: center; gap: var(--space-2); position: absolute; right: var(--gutter); top: calc(max(0px, var(--space-3) - var(--logo-clear)) + max(0px, (var(--logo-height-narrow) + 2 * var(--logo-clear) - var(--tap)) / 2)); min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-3); border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-heading); font-weight: 600; font-size: var(--text-sm); cursor: pointer; list-style: none; transition: border-color var(--duration) var(--easing); }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu > summary:hover { border-color: var(--color-brand); }
  .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 scrolls inside the pinned header on short screens */
  .menu[open] .nav-bar { max-height: calc(100vh - var(--header-pinned)); max-height: calc(100dvh - var(--header-pinned)); overflow-y: auto; overscroll-behavior: contain; }
  .nav-bar .wrap { padding: 0; }
  .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: 1px solid color-mix(in srgb, var(--nav-text) 18%, var(--nav-bg)); }
  .nav { display: block; margin: 0; }
  .nav > li > a { min-height: 48px; padding: var(--space-2) var(--gutter); border-bottom: 1px solid color-mix(in srgb, var(--nav-text) 18%, var(--nav-bg)); box-shadow: none; }
  .nav > li:last-child > a { border-bottom: 0; }
  .nav > li > a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--nav-current-bar); }
  .nav > li > a:hover { box-shadow: inset 4px 0 0 var(--nav-hover-bar); }
  .nav > .has-sub > a::after { display: none; }
  .nav .sub { display: none !important; }
}
@media (max-width: 600px) {
  .brand small { display: none; }
  /* the department name is the site name: two lines at most on a phone */
  .brand-text { font-size: var(--text-base); }
}

/* hero */
.hero { position: relative; background: var(--hero-bg); overflow: hidden; }
.hero .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: var(--hero-art-opacity); }
.hero .art.placeholder { mix-blend-mode: var(--art-blend); }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-scrim); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; min-height: 420px; padding-top: var(--space-7); padding-bottom: var(--space-8); }
.hero .plate { background: var(--hero-plate-bg); color: var(--color-text-on-inverse); width: 100%; max-width: 640px; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius); box-shadow: var(--shadow-plate); }
.hero .eyebrow { color: var(--color-accent-on-inverse); text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--text-xs); font-weight: var(--weight-strong); margin: 0; }
.hero h1 { color: var(--color-text-on-inverse); margin: var(--space-3) 0 var(--space-4); }
.hero p { color: var(--color-text-on-inverse-soft); margin-bottom: 0; }
.hero.small .hero-inner { min-height: 0; padding-top: var(--space-6); padding-bottom: var(--space-6); }
/* between --text-xl and --text-2xl: the plate title on index pages */
.hero.small h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
@media (max-width: 600px) { .hero .art { display: none; } }

/* illustrations sit on the brand's art ground; a brand may blend them into
   its own colour (--art-blend) so placeholder art never reads as a leftover */
.art-frame { background: var(--art-bg); isolation: isolate; overflow: hidden; }
/* only placeholder illustrations blend; photographs keep their own colours */
.art-frame img.placeholder { mix-blend-mode: var(--art-blend); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .6rem 1.4rem; border-radius: var(--pill); border: 1px solid transparent; font-weight: 600; text-decoration: none; font-size: var(--text-base); line-height: var(--leading-tight); transition: background-color var(--duration) var(--easing), border-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.ghost { border-color: color-mix(in srgb, var(--color-text-on-inverse) 60%, transparent); color: var(--color-text-on-inverse); }
.btn.ghost:hover { border-color: var(--color-text-on-inverse); background: color-mix(in srgb, var(--color-text-on-inverse) 8%, transparent); color: var(--color-text-on-inverse); }
.btn-row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; margin-top: var(--space-5); }

/* sections and text */
section { padding: var(--section) 0 0; }
.breadcrumb + section, .wrap > section:first-child { padding-top: var(--space-6); }
section > h2 { margin-bottom: var(--space-5); }
section > h2 + p { max-width: var(--measure); margin-top: calc(var(--space-3) * -1); color: var(--color-text-muted); }
.lede { color: var(--color-text-muted); max-width: var(--measure-lede); font-size: var(--text-md); }
.prose { max-width: var(--measure); }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: var(--text-xl); margin-top: var(--space-6); }
.prose h2:first-child { margin-top: 0; }
.prose ul:not(.tags), .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: var(--space-1); }
.prose img { width: 100%; border-radius: var(--radius); margin: var(--space-5) 0; }
.prose .post-figure { margin: var(--space-5) 0; border-radius: var(--radius); }
.prose .post-figure img { margin: 0; border-radius: 0; }
.kicker { text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--text-xs); font-weight: var(--weight-strong); color: var(--color-kicker); margin-bottom: var(--space-2); }
.kicker a { text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

/* grids: three across by default, four for the theme cards */
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; padding: 0; margin: 0; }
.grid.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid > li { display: flex; min-width: 0; }
.grid > li > * { flex: 1; min-width: 0; }
.grid.people { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid.people.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--space-4); }

/* cards */
.card { background: var(--color-surface-alt); border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); transition: box-shadow var(--duration) var(--easing), border-color var(--duration) var(--easing); }
.card:hover, .card:focus-within { border-color: var(--color-line-strong); box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0; font-size: var(--text-lg); color: var(--color-heading); }
.card h2 a, .card h3 a { color: var(--color-heading); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
.card p { color: var(--color-text-muted); font-size: var(--text-base); margin: 0; }
.card .meta { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--color-line); }
.card .tags + .meta, .card p + .meta { margin-top: auto; }
.card > p:not(.meta) + .meta { margin-top: auto; }
/* study cards reserve two lines of meta so the divider lines up across a row */
.card .meta.reserve { min-height: 4.2rem; align-content: flex-start; }
.card .meta .cta { font-weight: var(--weight-strong); color: var(--color-accent-text); text-decoration: none; margin-left: auto; }
.card .meta .cta:hover { text-decoration: underline; }
.card.with-art { padding: 0; overflow: hidden; }
.card-art { width: 100%; }
.card.with-art img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card.with-art .pad { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; width: 100%; }
.card > .tags { margin: var(--space-1) 0 var(--space-2); }

/* audience cards */
.paths { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, 1fr); margin-top: calc(var(--space-7) * -1); position: relative; z-index: 2; }
.path { display: flex; flex-direction: column; border-radius: var(--radius); padding: var(--space-5); text-decoration: none; box-shadow: var(--shadow); transition: box-shadow var(--duration) var(--easing); }
.path:hover { box-shadow: var(--shadow-hover); }
.path .who { text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--text-xs); font-weight: var(--weight-strong); color: var(--color-kicker); }
.path h2 { margin: var(--space-2) 0; font-size: var(--text-lg); color: inherit; }
.path p { margin: 0; font-size: var(--text-base); }
.path.p1 { background: var(--color-surface-tint); color: var(--color-heading); }
.path.p2 { background: var(--color-surface-alt); color: var(--color-heading); border: 1px solid var(--color-line); }
.path.p3 { background: var(--color-surface-inverse); color: var(--color-text-on-inverse-soft); }
.path.p3 h2 { color: var(--color-text-on-inverse); }
.path.p3 .who { color: var(--color-accent-on-inverse); }
.path:hover h2 { text-decoration: underline; }
@media (max-width: 820px) { .paths { grid-template-columns: 1fr; gap: var(--space-3); margin-top: calc(var(--space-6) * -1); } }

/* status badges: the text label always carries the meaning */
.badge { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-xs); font-weight: var(--weight-strong); letter-spacing: var(--tracking-caps); text-transform: uppercase; line-height: var(--leading-snug); padding: .2rem .65rem; border-radius: var(--pill); background: var(--status-progress-bg); color: var(--status-progress-fg); }
.badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.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.completed::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* theme and group tags */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: var(--space-2) 0 0; font-size: var(--text-sm); line-height: 1.3; }
.tags li { margin: 0; max-width: 100%; }
.tags a { display: inline-block; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--pill); padding: .25rem .7rem; text-decoration: none; color: var(--color-tag-text); transition: border-color var(--duration) var(--easing); }
.tags a:hover { border-color: var(--color-brand); color: var(--color-tag-text); }

/* people */
.person { display: flex; gap: var(--space-4); align-items: flex-start; scroll-margin-top: var(--space-4); padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); }
.person:target { border-color: var(--color-accent-rule); box-shadow: 0 0 0 3px var(--color-accent-tint); }
.avatar { flex: none; width: 88px; height: 88px; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-text); display: grid; place-items: center; font-family: var(--font-heading); font-size: var(--text-xl); letter-spacing: .02em; object-fit: cover; }
.person-text { min-width: 0; }
.person h3 { font-size: var(--text-lg); margin: var(--space-1) 0 .15rem; }
.person h3 a { color: var(--color-heading); text-decoration: none; }
.person h3 a:hover { text-decoration: underline; }
.person .role { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.45; margin: 0; }
.person .bio { font-size: var(--text-base); margin-top: var(--space-3); }
.person .bio p { margin-bottom: var(--space-2); }
.person .links { font-size: var(--text-sm); display: flex; gap: var(--space-4); flex-wrap: wrap; margin: var(--space-2) 0 0; }
.grid.compact .person { align-items: center; padding: var(--space-3); gap: var(--space-3); }
.grid.compact .avatar { width: 56px; height: 56px; font-size: var(--text-md); }
.grid.compact .person h3 { font-size: var(--text-lg); margin-top: 0; }
.grid.compact .person .role { font-size: var(--text-sm); }

/* dated lists */
.ledger { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--color-line); }
.ledger li { border-bottom: 1px solid var(--color-line); padding: var(--space-4) 0; display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: var(--space-4); }
.ledger time { color: var(--color-text-muted); font-size: var(--text-sm); padding-top: .2rem; }
.ledger a { font-family: var(--font-heading); font-size: var(--text-lg); line-height: 1.3; text-decoration: none; }
.ledger a:hover { text-decoration: underline; }
.ledger p { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: var(--text-base); max-width: var(--measure); }
.ledger + p { margin-top: var(--space-4); }
@media (max-width: 600px) { .ledger li { grid-template-columns: 1fr; gap: var(--space-1); } }

/* publications */
.pubs { list-style: none; padding: 0; margin: 0; max-width: 52rem; border-bottom: 1px solid var(--color-line); }
.pubs li { padding: var(--space-4) 0; border-top: 1px solid var(--color-line); }
.pubs .t { display: block; font-family: var(--font-heading); font-size: var(--text-md); line-height: 1.35; color: var(--color-heading); margin-bottom: var(--space-1); }
.pubs small, .paper small { color: var(--color-text-muted); display: block; font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.paper { border-left: 4px solid var(--color-accent-rule); background: var(--color-surface-alt); padding: var(--space-5); border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 var(--space-4); max-width: 52rem; }
.paper + .pubs { margin-top: var(--space-5); }
.paper h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.paper .plain { margin: var(--space-3) 0 0; }
.paper .plain strong { color: var(--color-heading-2); }

/* study page */
/* badge, title, lede, take-part panel and text in the main column; the aside starts level with the badge */
.study-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.study-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.ethics-ref { font-size: var(--text-sm); color: var(--color-text-muted); }
.study-prose { margin-top: var(--space-5); }
.study-head .badge, section > .badge { margin-bottom: var(--space-3); }
.study-aside { position: sticky; top: calc(var(--header-pinned) + var(--space-4)); background: var(--color-surface-alt); border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-5); font-size: var(--text-base); }
.study-aside dl { margin: 0; }
.study-aside dt { font-weight: var(--weight-strong); color: var(--color-heading); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-line); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.study-aside dt:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.study-aside dd { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.study-aside .tags { margin-top: var(--space-2); }
.docs { list-style: none; padding: 0; margin: var(--space-2) 0 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.4rem; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-sm); transition: border-color var(--duration) var(--easing); }
.docs li::before { content: ""; position: absolute; left: .8rem; top: .7rem; width: .9rem; height: 1.1rem; border: 1.5px solid var(--color-brand); border-radius: 2px; background: linear-gradient(var(--color-brand), var(--color-brand)) center 40% / 50% 1.5px no-repeat, linear-gradient(var(--color-brand), var(--color-brand)) center 65% / 50% 1.5px no-repeat; }
.docs li:hover { border-color: var(--color-brand); }
.docs a { font-weight: 600; line-height: 1.35; text-decoration: none; }
.docs a::after { content: ""; position: absolute; inset: 0; }
.docs a:hover { text-decoration: underline; }
.docs small { color: var(--color-text-muted); font-size: var(--text-sm); }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-border); border-left-width: 4px; border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); font-size: var(--text-base); color: var(--notice-text); }
.study-figure { margin: 0 0 var(--space-5); border-radius: var(--radius); }
.study-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: 0; }
@media (max-width: 820px) { .study-layout { grid-template-columns: 1fr; } .study-aside { position: static; } }

/* take part panel: recruiting studies only */
.take-part { margin-top: var(--space-5); padding: var(--space-5); background: var(--color-surface-tint); border-radius: var(--radius); max-width: var(--measure); scroll-margin-top: var(--space-4); }
.take-part h2 { font-size: var(--text-lg); color: var(--color-heading); margin-bottom: var(--space-2); }
.take-part p { margin-bottom: 0; }
/* the generic "section > h2 + p" pulls a lead paragraph up; not inside the panel */
.take-part h2 + p, .take-part h2 + .take-part-text { margin-top: var(--space-2); }
.take-part .notice { margin-top: var(--space-4); }
.take-part .btn-row { margin-top: var(--space-4); gap: var(--space-3) var(--space-5); }
.take-part .text-link { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
@media (max-width: 600px) { .take-part .btn { width: 100%; } }

/* breadcrumb: always the first thing in main, above any hero */
.breadcrumb { font-size: var(--text-sm); color: var(--color-text-muted); padding-top: var(--space-4); padding-bottom: var(--space-1); }
.breadcrumb + .hero { margin-top: var(--space-3); }
.breadcrumb a { color: var(--color-text-muted); display: inline-block; padding: var(--space-2) 0; }
.breadcrumb a:hover { color: var(--color-link); }
.breadcrumb + .wrap > section:first-child { padding-top: var(--space-4); }

/* page openings from page entries: plain title and intro, or hero.small */
.page-head + .wrap > .page-body:first-child { padding-top: 0; }
.page-hero + .wrap > section:first-child { padding-top: var(--space-6); }
.page-body .prose + .ledger { margin-top: var(--space-5); }

/* text and image blocks on page entries: two columns above 820px */
.blocks { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.text-image { display: grid; gap: var(--space-5); align-items: center; grid-template-columns: minmax(0, 1fr); }
.block-figure { margin: 0; border-radius: var(--radius); }
.block-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 821px) {
  .text-image:not(.text-only) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }
  .text-image.image-left .block-figure { order: -1; }
}

/* crossover chips under a theme or group intro */
.chip-row { margin-top: var(--space-5); max-width: var(--measure); }
.chip-label { font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--color-heading); margin: 0; }
.tags.chips a { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-1) var(--space-4); }

/* jump links near the top of a group page: not sticky */
.jump { margin-top: var(--space-5); }
.jump ul { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.jump a { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-2) var(--space-4); background: var(--color-surface-alt); border: 1px solid var(--color-line); border-radius: var(--radius-sm); color: var(--color-heading); font-weight: 600; text-decoration: none; transition: border-color var(--duration) var(--easing); }
.jump a:hover { border-color: var(--color-brand); text-decoration: underline; color: var(--color-heading); }
.jump-target { scroll-margin-top: var(--space-4); }
/* on a group page the jump links come first, straight under the banner */
.jump-top + .intro { padding-top: var(--space-5); }
@media (max-width: 600px) { .jump ul { flex-direction: column; gap: var(--space-2); } .jump a { display: flex; } }
.section-intro { margin-bottom: var(--space-5); }

/* explore by theme / by group switch on the two index pages */
.switch { display: inline-flex; flex-wrap: wrap; margin: 0 0 var(--space-5); border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.switch a { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-2) var(--space-4); color: var(--color-link); font-weight: 600; text-decoration: none; background: var(--color-surface); transition: background-color var(--duration) var(--easing); }
.switch a + a { border-left: 1px solid var(--color-line-strong); }
.switch a:hover { background: var(--color-surface-tint); text-decoration: underline; }
.switch a[aria-current="page"] { background: var(--color-surface-inverse); color: var(--color-text-on-inverse); }
.switch a:focus-visible { outline-offset: -3px; outline-color: var(--color-focus); }
.switch a[aria-current="page"]:focus-visible { outline-color: var(--color-focus-on-inverse); }

/* full publication list under year headings */
.pub-year { font-size: var(--text-md); margin: var(--space-6) 0 var(--space-2); }
.pub-list > .pub-year:first-child { margin-top: var(--space-5); }
.pub-list .pubs { margin-bottom: 0; }
.pub-source { margin: var(--space-4) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* study progress updates */
.updates { padding-top: var(--space-6); }
.prose .updates .ledger { padding-left: 0; }
.prose .updates .ledger li { margin-bottom: 0; }
.updates .ledger li { grid-template-columns: 9rem minmax(0, 1fr); }
.update-text { max-width: var(--measure); }
@media (max-width: 600px) { .updates .ledger li { grid-template-columns: 1fr; } }
.take-part-text > :last-child { margin-bottom: 0; }

.more-link { margin-top: var(--space-4); }
.more-link a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* footer */
.site-footer { flex: none; background: var(--footer-bg); color: var(--color-text-on-inverse-muted); font-size: var(--text-sm); }
.footer-cols { padding-top: var(--space-7); padding-bottom: var(--space-7); display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.site-footer a { color: var(--color-text-on-inverse); text-decoration-color: color-mix(in srgb, var(--color-text-on-inverse) 40%, 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; display: grid; gap: var(--space-2); }
.site-footer li { line-height: var(--leading-snug); }
.site-footer h2 { color: var(--color-text-on-inverse); font-size: var(--text-base); font-family: var(--font-body); font-weight: var(--weight-strong); margin-bottom: var(--space-3); }
.site-footer p { margin-bottom: var(--space-3); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--color-text-on-inverse) 15%, 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: 600px) { .person { padding: var(--space-3); gap: var(--space-3); } .avatar { width: 64px; height: 64px; font-size: var(--text-lg); } }
@media (max-width: 820px) { .footer-cols { grid-template-columns: 1fr; gap: var(--space-5); padding-top: var(--space-6); } }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}
