/* Hagan Lab — site stylesheet (redesign, 2026).
   Tokens and components from the Claude Design handoff (styles.css), plus the shared
   header/footer and page layouts. Square corners everywhere; the only colour is the steel accent. */

/* ---------- Fonts (self-hosted, SIL Open Font License — see assets/fonts/OFL.txt) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-condensed-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-condensed-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  --color-accent-100: #eef6ff;
  --color-accent-200: #d6ebff;
  --color-accent-300: #b5d9fd;
  --color-accent-400: #94bce3;
  --color-accent-500: #749dc4;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --color-text-72: color-mix(in srgb, var(--color-text) 72%, transparent);
  --color-text-70: color-mix(in srgb, var(--color-text) 70%, transparent);

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --page-pad: clamp(20px, 5vw, 72px);
  --page-max: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: 600;
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 6.8px;
}
p { margin: 0 0 10.2px; }
img { display: block; max-width: 100%; }
a { color: var(--color-accent-700); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); text-decoration: underline; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* The page area (main) receives focus from "Skip to content" and after the Home intro closes; it gets no ring
   (Chrome and Edge on Windows drew one around the whole page). */
main:focus-visible { outline: none; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 50; padding: 8px 12px;
  background: var(--color-accent); color: var(--color-bg); }
.skip-link:focus { top: 8px; color: var(--color-bg); text-decoration: none; }

/* ---------- Blueprint frame: "+" registration marks at the corners ---------- */
.blueprint { position: relative; border: 1px solid var(--color-divider); border-radius: 0; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after { content: ""; position: absolute; background: currentColor; }
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 600; font-size: 14px; line-height: 1.2;
  color: var(--color-text); background: transparent;
  border: 1px solid var(--color-divider); border-radius: 0;
  padding: 6.8px 12.24px;
}
.btn:hover { text-decoration: none; }
.btn svg { display: block; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); border-color: transparent; padding-inline: 3.4px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; font-size: 11px; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 0; }
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }

/* ---------- Eyebrow (small uppercase section label) ---------- */
.eyebrow {
  display: block; margin: 0 0 12px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-accent-700);
}

/* ---------- Site header ---------- */
/* The whole <header> stays at the top while scrolling (sticky must be on the element
   that is a direct child of <body>, or it has no room to stick). */
body > header { position: sticky; top: 0; z-index: 20; }
.site-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 13.6px; row-gap: 8px;
  padding: 12px var(--page-pad);
  background: var(--color-bg); border-bottom: 1px solid var(--color-divider);
}
.site-nav a { color: inherit; text-decoration: none; font-size: 14px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-accent); }
.nav-brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  font-family: var(--font-heading); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
}
.site-nav .nav-brand, .site-nav .nav-brand:hover { color: var(--color-text); }
.nav-brand svg { flex: none; }
.nav-brand-text { font-size: 28px; line-height: 1; }
.nav-brand-text .slash { color: var(--color-accent); }
.site-nav .btn-primary, .site-nav .btn-primary:hover, .site-nav .btn-primary[aria-current="page"] { color: var(--color-bg); }
.site-nav .btn-primary[aria-current="page"] { background: var(--color-accent-700); border-color: var(--color-accent-700); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 13.6px; }

/* Phones: brand + "Join the lab" on the first row, links on one scrollable row below */
@media (max-width: 720px) {
  .site-nav .btn-primary { order: 1; }
  .nav-links {
    order: 2; flex-basis: 100%; flex-wrap: nowrap; gap: 18px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 calc(-1 * var(--page-pad)); padding: 2px var(--page-pad) 4px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
}

/* ---------- Page container ---------- */
main { display: block; outline: none; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }

/* ---------- Page frame: footer at the bottom of the window on short pages ---------- */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > footer { flex-shrink: 0; }

/* ---------- Site footer ---------- */
.site-footer { border-top: 1px solid var(--color-divider); margin-top: 24px; }
.site-footer .in {
  max-width: var(--page-max); margin: 0 auto; padding: 32px var(--page-pad);
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: baseline;
  font-size: 13px; line-height: 22px; color: var(--color-text-70);
}
.site-footer .footer-links { display: inline-flex; flex-wrap: wrap; gap: 20px; }
.site-footer .footer-links a[hidden], .nav-links a[hidden] { display: none; }
.site-footer strong {
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--color-text);
}

/* ---------- Home: Index layout ---------- */
.home-index {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 56px; padding: 80px 0; align-items: start;
}
.home-left { display: flex; flex-direction: column; gap: 24px; }
/* Side by side on wide screens only. In one column (phones, iPad portrait) everything scrolls normally,
   so the index never slides under the left column. */
@media (min-width: 960px) {
  .home-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* On wide screens tall enough to show it whole, the left column does not move at all while the index
   scrolls: it is held at the same distance from the top where it starts (header 63 px + 80 px padding). */
@media (min-width: 960px) and (min-height: 760px) {
  .home-left { position: sticky; top: 143px; }
}
.home-title {
  font-family: var(--font-heading); font-weight: 600;
  font-size: clamp(56px, 9vw, 128px); line-height: 0.96; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 0 0 0 -0.05em;
}
.home-title span { display: block; }
.home-lede { font-size: 18px; line-height: 27px; margin: 0; max-width: 40ch; }
.home-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.home-address { font-size: 14px; line-height: 22px; margin: 0; font-style: normal; color: var(--color-text-72); }

.idx-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-text); }
.idx-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 24px; gap: 16px; align-items: center;
  padding: 20px 8px; border-bottom: 1px solid var(--color-divider); color: var(--color-text);
}
.idx-row:hover {
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
  color: var(--color-accent-800); text-decoration: none;
}
.idx-n { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--color-accent-700); }
.idx-text { display: flex; flex-direction: column; gap: 2px; }
.idx-label {
  font-family: var(--font-heading); font-weight: 600; font-size: 32px; line-height: 36px;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.idx-desc { font-size: 14px; line-height: 20px; color: var(--color-text-72); }

.latest { margin-top: 48px; padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.latest-k { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }
.latest-t { font-size: 16px; line-height: 24px; margin: 0; }

/* ---------- Intro overlay (Home only; shown when <html> has .intro-on) ---------- */
.intro { display: none; }
.intro-on, .intro-on body { overflow: hidden; overscroll-behavior: none; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 100; display: block;
  background: var(--color-bg); transition: opacity 600ms ease;
  /* iPad/iPhone Safari: when the toolbars shrink after scrolling, the screen is taller than the fixed box
     and the page showed below it. The wide shadow paints the background past every edge. */
  box-shadow: 0 0 0 100vmax var(--color-bg);
  touch-action: none;   /* no scrolling the page behind the intro; taps still work */
}
.intro.leaving { opacity: 0; }
.intro-stage { position: absolute; inset: 0; }
.intro-cta {
  position: absolute; left: 0; right: 0; bottom: clamp(32px, 8vh, 88px);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.intro-enter {
  min-width: 200px; visibility: hidden; opacity: 0; transform: translateY(12px);
  transition: opacity 700ms ease, transform 700ms ease, visibility 0s linear 700ms;
}
.intro.ready .intro-enter {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 700ms ease, transform 700ms ease, visibility 0s;
}
.intro-skip { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.intro-skip:hover { color: var(--color-text); }
.intro.no-ring button:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .intro-on .intro, .intro-enter, .intro.ready .intro-enter { transition: none; }
}

/* =====================================================================
   Inner pages (Research, People, Publications, Data & Resources, News, Join, Contact)
   ===================================================================== */
.page-head { padding: 72px 0 48px; }
.page-head.tight { padding-bottom: 32px; }
.rule { height: 1px; background: var(--color-divider); margin: 0 0 32px; }
.rule-ink { height: 1px; background: var(--color-text); }
.page-title {
  font-family: var(--font-heading); font-weight: 600; font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.04; letter-spacing: 0.01em; text-transform: uppercase; margin: 0;
}
.page-lede { font-size: 18px; line-height: 28px; max-width: 62ch; margin: 20px 0 0; color: color-mix(in srgb, var(--color-text) 82%, transparent); }

.section { padding: 0 0 80px; }
.section > .rule { margin-bottom: 40px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 48px; align-items: start; }
/* Research lines: text and figure side by side on wide screens, every second one with the figure on the left;
   in one column the title and text always come before the figure */
.split.research-line { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .split.research-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split.research-line.flip > .figure { order: -1; }
}
.kicker { display: block; margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }
.h-lg { font-size: 36px; line-height: 40px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.prose p { font-size: 16px; line-height: 25px; margin: 16px 0 0; color: color-mix(in srgb, var(--color-text) 82%, transparent); }
.prose p:first-of-type { margin-top: 20px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

.figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.figure .frame { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.figure .frame.square { aspect-ratio: 1 / 1; }
.figure .frame img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption { font-size: 13px; line-height: 20px; color: var(--color-text-70); }
.placeholder-label { padding: 24px; text-align: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.todo { color: var(--color-accent-700); font-style: italic; }   /* text still to be supplied */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--card-min, 320px)), 1fr)); gap: 40px; }
.card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card h2, .card h3 { font-size: 26px; line-height: 30px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.card h3.sm { font-size: 22px; line-height: 26px; }
.card p { font-size: 15px; line-height: 24px; margin: 0; color: color-mix(in srgb, var(--color-text) 80%, transparent); }
.card .grow { flex: 1; }
.card-link { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* People */
.pi { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 48px; align-items: start; padding: 0 0 72px; }
.pi-photo { aspect-ratio: 4 / 5; }
.pi-photo img { width: 100%; height: 100%; object-fit: cover; }
.pi-name { font-size: 44px; line-height: 46px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.pi-title { font-size: 16px; line-height: 24px; margin-top: 8px; font-weight: 500; }
.pi .prose p { font-size: 17px; line-height: 26px; max-width: 60ch; margin-top: 12px; }
.pi .prose p:first-of-type { margin-top: 20px; }
.pi-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; margin-top: 28px; }
.mini-list { margin: 0; padding: 0; list-style: none; }
.mini-list li { padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); font-size: 14px; line-height: 20px; }
.mini-list.edu li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.mini-list a { display: flex; flex-direction: column; gap: 2px; color: var(--color-text); }
.mini-list a:hover { text-decoration: none; color: var(--color-accent-800); }
.mini-list .j { color: var(--color-accent-700); font-weight: 600; }
@media (max-width: 640px) {
  .pi { grid-template-columns: 1fr; gap: 32px; }
  .pi-photo { max-width: 280px; }
}

.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
.member { display: flex; flex-direction: column; gap: 14px; }
.member-photo { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-initials { font-family: var(--font-heading); font-weight: 600; font-size: 48px; line-height: 1; color: var(--color-accent-400); }
.member-name { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 26px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.member-role { font-size: 14px; line-height: 20px; margin: 4px 0 0; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
.member-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.alumni { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.alumni li { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
.alumni .member-name { font-size: 20px; line-height: 24px; }
.alumni .member-role { margin: 0; }

.lablife { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; }
.lablife .frame { aspect-ratio: 4 / 3; }
.lablife figcaption { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--color-text-70); }

/* Publications */
.pub-tools { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 0 0 24px; }
.pub-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.input {
  min-height: 36px; padding: 6px 10px; font: inherit; font-size: 14px; color: var(--color-text);
  caret-color: var(--color-accent); background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: 0;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.pub-search { min-width: 260px; flex: 0 1 320px; }
.pub-count { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--color-text-70); padding: 0 0 12px; border-bottom: 1px solid var(--color-divider); }
.pub-list { margin: 0; padding: 0; list-style: none; }
.pub { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
.pub[hidden] { display: none; }
.pub-year { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 24px; }
.pub-body { display: flex; flex-direction: column; gap: 6px; }
.pub-title { font-size: 17px; line-height: 24px; font-weight: 500; color: var(--color-text); }
.pub-authors, .pub-meta { font-size: 14px; line-height: 21px; color: var(--color-text-72); }
.pub-authors strong { font-weight: 600; color: var(--color-accent-800); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-empty { padding: 22px 0; color: var(--color-text-72); }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 6px; } .pub-search { min-width: 0; flex: 1 1 100%; } }

/* Data & Resources: restricted project list */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.projects > li { border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); padding-bottom: 14px; }
.projects .project-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 0 6px; color: var(--color-text); }
.projects .project-link:hover { text-decoration: none; background: color-mix(in srgb, var(--color-accent) 8%, transparent); color: var(--color-accent-800); }
/* Leader (linked to the People page) and the date the report was last updated */
.project-meta { margin: 0; font-size: 13px; line-height: 18px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.project-meta a { color: var(--color-accent-700); }
.project-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 26px; text-transform: uppercase; letter-spacing: 0.02em; }
.project-name svg { flex: none; color: var(--color-accent-700); }
.project-desc { font-size: 14px; line-height: 20px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.note { font-size: 15px; line-height: 24px; max-width: 70ch; margin: 0 0 24px; color: var(--color-text-72); }

/* News */
.news { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-text); }
.news li { display: grid; grid-template-columns: 96px 120px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--color-divider); }
.news-date { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.news-text { font-size: 17px; line-height: 25px; }
@media (max-width: 560px) { .news li { grid-template-columns: auto 1fr; } .news-text { grid-column: 1 / -1; } }

/* Join */
.list-rows { margin: 0; padding: 0; list-style: none; }
.list-rows li { padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); font-size: 16px; line-height: 24px; }

/* Contact */
.kv { margin: 0; }
.kv div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 18px 24px; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
.kv div:last-child { border-bottom: 0; }
.kv dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--color-accent-700); padding-top: 3px; }
.kv dd { margin: 0; font-size: 16px; line-height: 24px; }
.kv dd a { color: var(--color-text); }
.kv dd a:hover { color: var(--color-accent-800); }
@media (max-width: 480px) { .kv div { grid-template-columns: 1fr; gap: 4px; } }
.map-box { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
/* Contact: the embedded Google map fills the box above the "Open in Google Maps" button */
.map-frame { display: block; width: 100%; flex: 1; min-height: 240px; border: 0; }

/* Photos fill their framed box at a fixed aspect ratio (cropped, never stretched) */
.figure .frame img, .pi-photo img, .member-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}

/* =====================================================================
   Project report pages (<project>/generic.html): site header, a project bar,
   and the report in a frame that grows to the report's full height
   ===================================================================== */
.project-bar {
  padding: 32px 0 20px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between;
}
.project-bar .kicker { margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.project-title { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; margin: 0; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.project-frame-wrap { border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); background: #fff; }
.project-frame { display: block; width: 100%; height: calc(100vh - 120px); min-height: 480px; border: 0; }
/* report frame: same background as the site; hidden until the report theme is applied */
.project-frame-wrap { position: relative; background: var(--color-bg); }
.project-frame-wrap.is-loading .project-frame { visibility: hidden; }
.project-frame-wrap.is-loading::before {
  content: "Loading report…"; position: absolute; top: 48px; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-70);
}

/* ---------- Back to top (project report pages) ---------- */
.to-top {
  position: fixed; left: 50%; bottom: clamp(16px, 3vw, 28px); z-index: 30;
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-accent); color: var(--color-bg);
  border: 1px solid var(--color-accent); border-radius: 0; cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in srgb, #1d1f20 14%, transparent);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity 250ms ease, transform 250ms ease, visibility 0s linear 250ms;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 250ms ease, transform 250ms ease, visibility 0s; }
.to-top:hover { background: var(--color-accent-600); border-color: var(--color-accent-600); color: var(--color-bg); }
.to-top svg { stroke-width: 2.5; }   /* bolder arrow (overrides the icon's 1.5) */
.to-top:active { background: var(--color-accent-700); border-color: var(--color-accent-700); }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.is-visible { transition: none; } }

/* Research figures named in the research sheet: shown whole, at their own aspect ratio */
.figure .frame.fit { aspect-ratio: auto; padding: 12px; }
.figure .frame.fit img { position: static; height: auto; object-fit: contain; }

/* People page: a link like people.html#first-last lands below the sticky header */
.member { scroll-margin-top: 88px; }

/* ---------- Lab Portal: to-do list (portal/todo/, assets/js/todo.js) ----------
   Selectors start with ".gate .todo" so they win over the small style block of the sign-in pages (gate_page_start). */
.gate .todo-page [hidden] { display: none !important; }
.gate .todo-page .btn { margin-top: 0; align-self: auto; }
.gate .todo-page .btn.is-on, .gate .todo-page .btn.is-on:hover { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }
.gate .todo-page .input { width: auto; }
.gate .todo-page textarea.input { width: 100%; min-height: 64px; resize: vertical; }
.gate .todo-page .grow { flex: 1; min-width: 180px; }
.gate .todo-page label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }
.todo-tabs, .todo-who { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.todo-who { margin: 0 0 24px; }
.todo-stats h2 { font-size: 40px; line-height: 1; }
.todo-stats .warn h2 { color: #b3261e; }
.todo-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 20px; }
.todo-add { padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 40px; }
.todo-add .break { flex-basis: 100%; height: 0; }
.todo-task { border: 1px solid var(--color-divider); border-left: 3px solid var(--c, var(--color-divider)); padding: 16px 20px; margin: 0 0 12px; }
.todo-task.done { opacity: 0.65; }
.todo-task.drop { outline: 1px dashed var(--color-text); outline-offset: 3px; }
#todo-done-wrap { margin-top: 48px; }
.todo-head { display: flex; align-items: flex-start; gap: 10px; }
.todo-title { flex: 1; min-width: 0; }
.todo-name { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 26px; text-transform: uppercase; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.todo-meta { font-size: 13px; line-height: 20px; margin-top: 2px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.todo-cat { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.todo-over { color: #b3261e; font-weight: 600; }
.todo-soon { color: #8a5a10; font-weight: 600; }
.todo-badge { border: 1px solid currentColor; padding: 2px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.todo-ns { color: var(--color-text-70); }
.todo-ip { color: var(--color-accent-700); }
.todo-fin { color: #3f6b50; }
.todo-ico { background: none; border: 0; cursor: pointer; color: var(--color-text-70); padding: 2px 4px; line-height: 1; }
.todo-ico:hover { color: var(--color-accent-800); }
.todo-svg { display: block; }
.todo-grip { cursor: grab; color: color-mix(in srgb, var(--color-text) 40%, transparent); line-height: 1; padding-top: 4px; }
.todo-disc { border-top: 1px solid var(--color-divider); margin-top: 14px; padding-top: 10px; }
.todo-note { padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); font-size: 15px; }
.todo-by { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }
.todo-note p { margin: 4px 0 0; white-space: pre-wrap; }
.todo-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; align-items: center; }
.todo-empty { color: var(--color-text-72); padding: 16px 0; }
@media (max-width: 640px) { .todo-head { flex-wrap: wrap; } }
