/* Research department site, Option D "Almanac": plain CSS, no framework.
   One unhurried reading column of dated entries, broken by wide image plates;
   each page opens on a pale wash (the horizon) with its plate across the
   wash's lower edge. 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), 820px (medium), 1200px (one-row header);
   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; overflow-x: clip; 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; }
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: .22em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color var(--duration) var(--easing), color var(--duration) var(--easing); }
a:hover { color: var(--color-link-hover); text-decoration-color: currentColor; }
::selection { background: var(--color-accent-tint); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
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-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-2xl); letter-spacing: var(--tracking-display); }
h2 { font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); color: var(--color-heading-2); }
h3 { font-size: var(--text-lg); }
p { margin: 0 0 var(--space-4); }
strong { font-weight: var(--weight-strong); }

/* one column; .wide lets plates and two-up lists breathe wider */
.wrap { width: 100%; max-width: calc(var(--column) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.wrap.wide { max-width: calc(var(--wide) + 2 * 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); }
.skip:focus-visible { outline-color: var(--color-focus-on-inverse); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* demo bar (scrolls away; the header below it stays pinned) */
.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 { max-width: calc(var(--wrap) + 2 * var(--gutter)); display: flex; align-items: center; justify-content: center; gap: var(--space-3); 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); border-radius: var(--pill); padding: .05rem .6rem; }

/* header: pinned, white, one quiet row from 1200px */
.site-header { background: var(--nav-bg); border-bottom: 1px solid var(--nav-border); position: sticky; top: 0; z-index: 30; }
/* --header-pinned is at least the pinned header's height: about 60px up to
   820px, about 116px from 821 to 1199px (menu on its own row), about 76px from
   1200px. Anchor targets and the sticky study aside clear it. */
:root { --header-pinned: 4.25rem; }
@media (min-width: 821px) { :root { --header-pinned: 7.75rem; } }
@media (min-width: 1200px) { :root { --header-pinned: 5.25rem; } }
html { scroll-padding-top: calc(var(--header-pinned) + var(--space-4)); }
.masthead { position: relative; }
.site-header .wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.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; }
.brand-text { font-family: var(--font-heading); font-weight: var(--weight-heading); font-size: var(--text-md); line-height: var(--leading-tight); max-width: 22rem; }
.brand small { display: block; margin-top: .2rem; font-family: var(--font-body); font-size: var(--text-xs); color: var(--color-text-muted); }
.brand-wordmark { gap: 0; }
.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; }

@media (min-width: 821px) {
  .menu > summary { display: none; }
  .menu::details-content { content-visibility: visible; }
}
.nav-bar { background: var(--nav-bg); }
.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-sm); }
.nav > li > a { min-height: 48px; position: relative; }
/* current page: a short rule under the word, like the horizon line */
.nav > li > a::before { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 6px; height: 1px; background: transparent; transition: background-color var(--duration) var(--easing); }
.nav > li > a:hover::before { background: var(--nav-hover-bar); }
.nav > li > a[aria-current="page"] { color: var(--nav-text-current); }
.nav > li > a[aria-current="page"]::before { height: 2px; background: var(--nav-current-bar); }
.nav > li > a:focus-visible { outline-color: var(--nav-focus); outline-offset: -3px; }
.nav > .has-sub > a::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 var(--space-2); flex: none; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.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-radius: var(--radius); z-index: 40; display: none; }
.nav .sub a { padding: var(--space-2) var(--space-4); color: var(--color-text); }
.nav .sub a:hover { background: var(--wash-head); 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 (min-width: 1200px) {
  .masthead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
  .masthead > .wrap, .masthead .nav-bar .wrap { padding-inline: 0; max-width: none; width: auto; margin: 0; }
  .nav { flex-wrap: nowrap; margin-right: calc(var(--space-3) * -1); }
  .nav .sub { left: auto; right: 0; }
  .nav > li:first-child .sub, .nav > li:nth-child(2) .sub { left: 0; right: auto; }
}

@media (max-width: 820px) {
  .header-top { padding-top: max(0px, var(--space-2) - var(--logo-clear)); padding-bottom: max(0px, var(--space-2) - var(--logo-clear)); padding-right: calc(var(--gutter) + 100px); min-height: 60px; }
  .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-base); }
  .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-2) - var(--logo-clear)) + max(0px, (max(60px, var(--logo-height-narrow) + 2 * var(--logo-clear)) - var(--tap)) / 2)); min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-4); border: 1px solid var(--color-line-strong); border-radius: var(--pill); background: var(--color-surface); color: var(--color-heading); 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: 10px; flex: none; background: linear-gradient(currentColor, currentColor) top / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) bottom / 100% 1.5px no-repeat; }
  .menu[open] .menu-icon { background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; transform: rotate(45deg); position: relative; }
  .menu[open] .menu-icon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; }
  .menu-label-close, .menu[open] .menu-label-open { display: none; }
  .menu[open] .menu-label-close { display: inline; }

  .menu[open] .nav-bar { border-top: 1px solid var(--nav-border); 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 var(--color-line); }
  .nav { display: block; margin: 0; padding-bottom: var(--space-3); }
  .nav a { font-size: var(--text-base); }
  .nav > li > a { min-height: 52px; padding: var(--space-2) var(--gutter); border-bottom: 1px solid var(--color-line); }
  .nav > li > a::before { left: 0; right: auto; top: 14px; bottom: 14px; width: 2px; height: auto; }
  .nav > li > a[aria-current="page"]::before { width: 3px; height: auto; }
  .nav > .has-sub > a::after { display: none; }
  .nav .sub { display: none !important; }
}
@media (min-width: 821px) and (max-width: 1199px) {
  .nav-bar { border-top: 1px solid var(--nav-border); }
}
@media (max-width: 600px) {
  .brand small { display: none; }
  .brand-text { font-size: var(--text-sm); max-width: 14rem; }
}

/* the horizon: every page opens on a pale wash */
.horizon { --overlap: clamp(3rem, 9vw, 7.5rem); }
.horizon-wash { background: var(--wash-head); padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5.5rem); }
.horizon.has-plate .horizon-wash { padding-bottom: calc(clamp(2.5rem, 5vw, 4rem) + var(--overlap)); }
.horizon h1 { max-width: 22ch; margin-bottom: var(--space-4); }
.horizon .lede { font-size: var(--text-md); line-height: var(--leading-snug); color: var(--color-text); max-width: var(--measure-lede); margin-bottom: 0; }
.horizon .btn-row { margin-top: var(--space-6); }
.horizon .switch { margin: var(--space-6) 0 0; }
/* the fact line sits on its own horizon rule */
.horizon .facts { margin: var(--space-6) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--color-line-strong); max-width: var(--measure-lede); }
.horizon .plate { margin-top: calc(-1 * var(--overlap)); aspect-ratio: 12 / 5; }
.horizon + .wrap > section:first-child, .horizon + .wrap > .page-body:first-child { padding-top: var(--space-8); }
.horizon.has-plate + .wrap > section:first-child, .horizon.has-plate + .wrap > .page-body:first-child { padding-top: var(--space-7); }
.home-horizon h1.display { font-size: var(--text-3xl); line-height: 1.08; max-width: 17ch; }
.home-horizon .lede { font-size: clamp(1.2rem, 1.6vw, 1.4rem); max-width: 40ch; color: var(--color-text-muted); }
.home-horizon .horizon-wash { padding-top: clamp(2.5rem, 7vw, 6rem); }
@media (max-width: 600px) {
  .horizon { --overlap: 2.5rem; }
  .horizon .plate { aspect-ratio: 16 / 9; }
}

/* breadcrumb: quiet, inside the wash */
.breadcrumb { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0 0 var(--space-5); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: ""; width: 1rem; height: 1px; margin: 0 var(--space-3); background: var(--color-line-strong); }
.breadcrumb a { color: var(--color-text-muted); display: inline-block; padding: var(--space-2) 0; }
.breadcrumb a:hover { color: var(--color-link); }
.breadcrumb [aria-current] { padding: var(--space-2) 0; }
@media (max-width: 600px) { .breadcrumb li:last-child { display: none; } }

/* image plates: soft corners, placeholder drawings toned into the wash */
.plate { margin: 0; border-radius: var(--plate-radius); overflow: hidden; aspect-ratio: 3 / 2; }
.plate img { width: 100%; height: 100%; object-fit: cover; }
.art-frame { background: var(--art-bg); isolation: isolate; }
.art-frame img.placeholder { filter: var(--art-filter); mix-blend-mode: var(--art-blend); }

/* buttons: one warm fill that means "you can take part"; everything else quiet */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .65rem 1.5rem; border-radius: var(--pill); border: 1px solid transparent; font-weight: var(--weight-strong); 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.quiet { border-color: var(--color-line-strong); color: var(--color-heading); background: var(--color-surface); font-weight: var(--weight-heading); }
.btn.quiet:hover { border-color: var(--color-brand); color: var(--color-heading); }
.btn-row { display: flex; gap: var(--space-3) var(--space-6); flex-wrap: wrap; align-items: center; margin-top: var(--space-5); }
.text-link { display: inline-flex; align-items: center; min-height: var(--tap); }

/* sections and text */
section { padding: var(--section) 0 0; }
section > h2 { margin-bottom: var(--space-5); }
section > h2 + p, .section-lede { max-width: var(--measure); 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-7); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-6); }
.prose ul:not(.tags):not(.ledger), .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--color-text-muted); }
.prose img { width: 100%; border-radius: var(--plate-radius); margin: var(--space-6) 0; }
.prose .post-figure { margin: var(--space-6) 0; border-radius: var(--plate-radius); }
.prose .post-figure img { margin: 0; border-radius: 0; }
.facts { font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; margin: 0; }
.facts a { color: var(--color-text-muted); }
.kicker { font-size: var(--text-sm); color: var(--color-kicker); margin-bottom: var(--space-2); }
.more-link { margin: var(--space-5) 0 0; }
.more-link a { display: inline-flex; align-items: center; min-height: var(--tap); }
.page-body > .prose + .blocks, .page-body .prose + .ledger { margin-top: var(--space-6); }

/* washed sections (the welcome) run edge to edge */
.wash-section { background: var(--wash-quiet); margin-top: var(--section); padding-block: var(--section); }
.wash-section h2 { margin-bottom: var(--space-5); }
.wash-section .prose { font-size: var(--text-md); line-height: 1.6; }

/* status badges: a dot and a word; the word always carries the meaning */
.badge { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--text-sm); line-height: var(--leading-snug); padding: .2rem .75rem .2rem .6rem; border-radius: var(--pill); background: var(--status-progress-bg); color: var(--status-progress-fg); white-space: nowrap; }
.badge::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--status-progress-dot); flex: none; }
.badge.recruiting { background: var(--status-recruiting-bg); color: var(--status-recruiting-fg); }
.badge.recruiting::before { background: var(--status-recruiting-dot); }
.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 var(--status-completed-dot); }

/* almanac entries: the recruiting studies on the home page */
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-line); }
.entry { padding: var(--space-4) 0 var(--space-5) 1.6rem; border-bottom: 1px solid var(--color-line); position: relative; }
/* the pollen dot: this study is looking for people (the section heading says so in words) */
.entry::before { content: ""; position: absolute; left: .15rem; top: calc(var(--space-4) + .55rem); width: .7rem; height: .7rem; border-radius: 50%; background: var(--status-recruiting-dot); box-shadow: 0 0 0 4px var(--status-recruiting-bg); }
.entry h3 { margin-bottom: var(--space-1); }
.entry h3 a { color: var(--color-heading); text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.entry p { margin: 0; color: var(--color-text-muted); max-width: var(--measure); }

/* lists of records: unboxed rows on hairlines, never card grids */
.grid { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--color-line); }
.grid > li { display: flex; min-width: 0; border-bottom: 1px solid var(--color-line); }
.grid > li > * { flex: 1; min-width: 0; }
.card { padding: var(--space-5) 0 var(--space-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.card h2, .card h3 { margin: 0; font-family: var(--font-heading); font-weight: var(--weight-heading); font-size: var(--text-lg); letter-spacing: 0; 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; text-decoration-thickness: 1px; }
.card p { color: var(--color-text-muted); margin: 0; max-width: var(--measure); }
.card .badge { margin-bottom: var(--space-1); }
.card .meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }
.card .meta .cta { font-weight: var(--weight-strong); color: var(--color-accent-text); }
.card > .tags { margin: var(--space-1) 0 0; }

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-line); }
.index-list li { padding: var(--space-5) 0 var(--space-6); border-bottom: 1px solid var(--color-line); }
.index-list h2, .index-list h3 { font-family: var(--font-heading); font-weight: var(--weight-heading); font-size: var(--text-lg); letter-spacing: 0; margin-bottom: var(--space-2); }
.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 { text-decoration: underline; text-decoration-thickness: 1px; }
.index-list p { margin: 0 0 var(--space-2); color: var(--color-text-muted); max-width: var(--measure); }
.index-list .facts { margin: 0; }

/* plates in a list: the themes, image-led, two across on wider screens */
.plates { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-8) var(--space-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plates > li:nth-child(even) { margin-top: var(--space-8); } }
.plate-item .plate { margin-bottom: var(--space-5); aspect-ratio: 4 / 3; }
.plate-item h2, .plate-item h3 { font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); margin-bottom: var(--space-3); }
.plate-item h2 a, .plate-item h3 a { color: var(--color-heading); text-decoration: none; }
.plate-item h2 a:hover, .plate-item h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.plate-item p { color: var(--color-text-muted); max-width: 46ch; margin-bottom: var(--space-3); }
/* the whole plate is the link target */
.plate-item { position: relative; }
.plate-item h2 a::after, .plate-item h3 a::after { content: ""; position: absolute; inset: 0; }
.plate-item .plate img { transition: transform .6s var(--easing); }
.plate-item:hover .plate img { transform: scale(1.025); }
.plate-item:focus-within { outline: 2px solid var(--color-focus); outline-offset: 8px; border-radius: var(--plate-radius); }
.plate-item a:focus-visible { outline: none; }

/* tags and chips */
.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; border: 1px solid var(--color-line); border-radius: var(--pill); padding: .3rem .8rem; text-decoration: none; color: var(--color-tag-text); background: var(--color-surface); transition: border-color var(--duration) var(--easing); }
.tags a:hover { border-color: var(--color-brand); color: var(--color-tag-text); }
.chip-row { margin-top: var(--space-6); max-width: var(--measure); }
.chip-label { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0 0 var(--space-1); }
.tags.chips a { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-1) var(--space-4); }

/* people */
.grid.people > li { border-bottom: 1px solid var(--color-line); }
.person { display: flex; gap: var(--space-5); align-items: flex-start; scroll-margin-top: calc(var(--header-pinned) + var(--space-4)); padding: var(--space-5) 0 var(--space-6); }
.person:target { background: var(--color-accent-tint); box-shadow: 0 0 0 var(--space-4) var(--color-accent-tint); border-radius: 1px; }
.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-display); font-weight: var(--weight-display); font-size: var(--text-xl); object-fit: cover; }
.person-text { min-width: 0; }
.person h3 { font-size: var(--text-lg); margin: var(--space-1) 0 .2rem; }
.person h3 a { color: var(--color-heading); text-decoration: none; }
.person h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.person .role { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.45; margin: 0; }
.person .bio { margin-top: var(--space-3); max-width: var(--measure); }
.person .bio p { margin-bottom: var(--space-2); }
.person .links { font-size: var(--text-sm); display: flex; gap: var(--space-5); flex-wrap: wrap; margin: var(--space-2) 0 0; }
.person .links a { display: inline-flex; align-items: center; min-height: var(--tap); }
/* the compact strip: discs and names, two across, no rules */
.grid.people.compact { border-top: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--space-5) var(--space-6); }
.grid.people.compact > li { border-bottom: 0; }
.grid.compact .person { align-items: center; padding: 0; gap: var(--space-4); }
.grid.compact .avatar { width: 60px; height: 60px; font-size: var(--text-md); }
.grid.compact .person h3 { font-size: var(--text-base); font-weight: var(--weight-strong); margin: 0 0 .1rem; }
@media (max-width: 600px) { .person { gap: var(--space-4); } .avatar { width: 64px; height: 64px; font-size: var(--text-lg); } }

/* dated lists: the day sits in the margin in light figures */
.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-5) 0 var(--space-6); display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--space-5); }
.ledger time { font-family: var(--font-display); font-weight: var(--weight-display); color: var(--color-text-muted); font-size: var(--text-md); line-height: 1.35; font-variant-numeric: tabular-nums; }
.ledger a { font-size: var(--text-lg); line-height: 1.3; text-decoration: none; color: var(--color-heading); }
.ledger a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.ledger p { margin: var(--space-2) 0 0; color: var(--color-text-muted); max-width: var(--measure); }
.ledger + p { margin-top: var(--space-5); }
@media (max-width: 600px) { .ledger li { grid-template-columns: 1fr; gap: var(--space-1); } .ledger time { font-size: var(--text-base); } }

/* publications */
.pubs { list-style: none; padding: 0; margin: 0; 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-size: var(--text-base); line-height: 1.4; 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 { background: var(--wash-warm); padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--plate-radius); margin: 0 0 var(--space-4); }
.paper + .pubs, .paper + .pub-list { margin-top: var(--space-6); }
.paper h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.paper .plain { margin: var(--space-4) 0 0; }
.paper .facts { margin-top: var(--space-3); }
.pub-year { font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-lg); color: var(--color-text-muted); margin: var(--space-7) 0 var(--space-3); }
.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 page: the head is in the wash; text left, details right */
.study-horizon .horizon-wash { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.study-horizon h1 { max-width: 24ch; }
.study-horizon .lede { max-width: 46rem; }
.study-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-4); }
.ethics-ref { font-size: var(--text-sm); color: var(--color-text); font-variant-numeric: tabular-nums; }
.study-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(2rem, 6vw, 5rem); align-items: start; padding-top: var(--space-7); }
.study-main { max-width: var(--column); }
.study-prose { margin-top: var(--space-7); }
.study-aside { position: sticky; top: calc(var(--header-pinned) + var(--space-4)); background: var(--wash-warm); border-radius: var(--plate-radius); padding: var(--space-5) var(--space-5) var(--space-6); font-size: var(--text-sm); }
.study-aside dl { margin: 0; }
.study-aside dt { color: var(--color-text-muted); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-line); }
.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; font-size: var(--text-base); }
.study-aside .tags { margin-top: var(--space-2); }
.docs { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: 0; }
.docs li { position: relative; display: flex; flex-direction: column; padding: var(--space-3) 0 var(--space-3) 1.9rem; border-top: 1px solid var(--color-line); }
.docs li:first-child { border-top: 0; }
.docs li::before { content: ""; position: absolute; left: .1rem; top: 1rem; width: .85rem; height: 1.05rem; 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 a { font-weight: var(--weight-strong); 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-radius: var(--radius); padding: var(--space-3) var(--space-4); color: var(--notice-text); }
.study-figure { margin: 0 0 var(--space-6); border-radius: var(--plate-radius); aspect-ratio: 16 / 9; overflow: hidden; }
.study-figure img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
@media (max-width: 900px) { .study-layout { grid-template-columns: 1fr; } .study-aside { position: static; } }

/* take part: the one warm panel (recruiting studies, and How to apply) */
.take-part { padding: clamp(1.25rem, 3.5vw, 2.25rem); background: var(--color-accent-tint); border-radius: var(--plate-radius); max-width: var(--measure); scroll-margin-top: calc(var(--header-pinned) + var(--space-4)); }
section.take-part { margin-top: var(--space-7); }
.study-main > .take-part { margin-top: 0; }
.take-part h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.take-part h2 + p, .take-part h2 + .take-part-text { margin-top: 0; color: var(--color-text); }
.take-part p { margin-bottom: 0; }
.take-part-text > :last-child { margin-bottom: 0; }
.take-part .notice { margin-top: var(--space-4); }
.take-part .btn-row { margin-top: var(--space-5); }
@media (max-width: 600px) { .take-part .btn { width: 100%; } }

/* study progress updates */
.updates { padding-top: var(--space-7); }
.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 > :last-child { margin-bottom: 0; }
@media (max-width: 600px) { .updates .ledger li { grid-template-columns: 1fr; } }

/* text and image blocks on page entries */
.blocks { display: grid; gap: var(--space-8); margin-top: var(--space-7); }
.text-image { display: grid; gap: var(--space-5); align-items: center; grid-template-columns: minmax(0, 1fr); }
.block-figure { margin: 0; border-radius: var(--plate-radius); overflow: hidden; aspect-ratio: 3 / 2; }
.block-figure img { width: 100%; height: 100%; object-fit: cover; }

/* jump links and the two-way switch: quiet pills */
.jump { margin-top: var(--space-6); }
.jump ul { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); list-style: none; margin: 0; padding: 0; }
.jump a, .switch a { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--space-2) var(--space-4); border: 1px solid var(--color-line-strong); border-radius: var(--pill); color: var(--color-heading); background: var(--color-surface); text-decoration: none; transition: border-color var(--duration) var(--easing); }
.jump a:hover, .switch a:hover { border-color: var(--color-brand); color: var(--color-heading); }
.jump-target { scroll-margin-top: calc(var(--header-pinned) + var(--space-4)); }
.jump-top + .intro { padding-top: var(--space-6); }
.horizon + .wrap > .jump-top { margin-top: var(--space-6); }
.section-intro { margin-bottom: var(--space-6); }
.switch { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.switch a[aria-current="page"] { background: var(--color-heading); border-color: var(--color-heading); color: var(--color-surface); }
.switch a:focus-visible, .jump a:focus-visible { outline-offset: 2px; }

/* the home page close: two routes side by side */
.routes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.routes li { border-top: 1px solid var(--color-line-strong); padding-top: var(--space-4); }
.routes h3 { margin-bottom: var(--space-2); }
.routes p { color: var(--color-text-muted); margin: 0; font-size: var(--text-base); }

/* footer: the moss wash closes every page */
.site-footer { flex: none; background: var(--footer-bg); color: var(--footer-text-muted); font-size: var(--text-sm); }
.site-footer .wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.footer-cols { padding-top: var(--space-8); padding-bottom: var(--space-7); display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--footer-text); }
.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(--footer-text); font-family: var(--font-body); font-weight: var(--weight-strong); font-size: var(--text-sm); letter-spacing: 0; margin-bottom: var(--space-3); }
.site-footer .footer-cols > div:first-child h2 { font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-lg); line-height: var(--leading-tight); max-width: 16ch; }
.site-footer p { margin-bottom: var(--space-3); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--footer-text) 14%, 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: 820px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); padding-top: var(--space-7); } .footer-cols > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 359px) { .footer-cols { grid-template-columns: 1fr; } }

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