/* =========================================================================
   Connectase website — one stylesheet, organised by area.
   Content sits in a centred 960px column; coloured areas are rounded boxes
   inside that column on a white page. Desktop type is scaled to 75%;
   small screens get readable sizes back (see "Small screens").
   ========================================================================= */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: 'Geist'; src: url('../fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Brand palette (Connectase colour guide). Every colour on the site is one of these,
     or one of them laid over white or over green at a fixed strength (tints below). */
  --green: #124D42;        /* Green */
  --lav: #D9C9FF;          /* Purple */
  --ink: #1A1918;          /* Charcoal */
  --dark-grey: #51504F;    /* Dark Grey */
  --grey: #898886;         /* Grey */
  --light-grey: #C0BFBC;   /* Light Grey */
  --sand: #F8F6F3;         /* Beige */
  --paper: #FFFFFF;        /* White */
  --desert: #A74E34;       /* Desert (error messages); Water #73A6FF, Yellow #FDFF81 and Creme #FFF6E0 are not used yet */
  /* roles */
  --tile: var(--sand);
  --body: var(--dark-grey);
  --muted: var(--dark-grey);
  --field-line: var(--grey);          /* form field outlines: 3.5:1 on white, as WCAG asks for controls */
  --footer-muted: var(--light-grey);
  --lav-ink: var(--ink);              /* text on purple */
  /* tints */
  --line: #E4E4E3;         /* Light Grey 43% on white */
  --rule: #DCDCDA;         /* Light Grey 55% on white: slightly stronger rules (advantages list, values) */
  --green-tint: #E7EDEC;   /* Green 10% on white */
  --on-green: #E7EDEC;     /* White 90% on Green: secondary text on the green hero */
  --green-soft: #C9D6D4;   /* White 77% on Green: labels in green boxes */
  --lav-soft: #F0E9FF;     /* Purple 40% on white */
  --lav-hover: #C2B4E3;    /* Purple with 12% Charcoal */
  --error-bg: #F6EDEB;     /* Desert 10% on white */
  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(12px, 3vw, 36px);
  --col: 960px;
  --pad: clamp(18px, 3.4vw, 45px);
  --rule-gap: clamp(21px, 2.25vw, 36px);   /* the one gap between parts of a page: between sections, on each side of a rule, next to a box */
  --box-width: min(calc(100% - 2 * var(--gutter) + 2 * var(--pad)), calc(100% - 12px));
  --box-max: calc(var(--col) + 2 * var(--pad));
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --text-body: 15px;       /* body text; 16px on small screens (end of file) */
  --text-lead: clamp(14.25px, 1.05vw, 16.5px);   /* lead-in text, step and how-to paragraphs */
  --text-intro: clamp(15px, 1.2vw, 19.5px);      /* Technology intro and problem text */
  --space-fig: clamp(30px, 3.75vw, 54px);        /* space around the Technology figures */
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
/* short pages on tall screens: the footer sits at the bottom, no empty band below it */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: var(--text-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body > * { flex-shrink: 0; }
body > .site-footer { margin-top: auto; }
/* images carry width/height in the markup (no layout shift while loading); CSS decides the shown size */
img { max-width: 100%; width: auto; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2.25px; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; margin: 0; }
/* page titles are trimmed to cap height and baseline so they sit optically centred in their box */
h1 { text-box: trim-both cap alphabetic; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* "Skip to content": hidden until a keyboard user reaches it with Tab, then shown just below the header,
   lined up with the logo (never on top of it) */
.sr-only[href="#main"]:focus { position: fixed; top: 96px; left: max(var(--gutter), calc((100% - var(--col)) / 2)); z-index: 100; width: auto; height: auto; overflow: visible; clip: auto; padding: 9px 16.5px; border-radius: 6px; background: var(--lav); color: var(--lav-ink); font-family: var(--font-mono); font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: 0 6px 16px rgba(26, 25, 24, .18); }
/* keyboard focus on dark backgrounds (green bands, home photo, footer): a white outline instead of the green one */
.bg-green :focus-visible, .home-hero :focus-visible, .site-footer :focus-visible,
.site-header.on-dark:not(.scrolled) .brand:focus-visible, .site-header.on-dark:not(.scrolled) .menu-btn:focus-visible { outline-color: var(--paper); }
@media (min-width: 981px) { .site-header.on-dark:not(.scrolled) .nav > .btn:focus-visible { outline-color: var(--paper); } }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--col) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
/* every section ends with the page gap and starts flush, so two sections are always one gap apart */
.section { padding-block: 0 var(--rule-gap); }
.section.flush-top { padding-top: 0; }
.section.flush-bottom { padding-bottom: 0; }
/* a section after one that ends flush starts with the gap itself */
.section.flush-bottom + .section:not(.flush-top) { padding-top: var(--rule-gap); }
/* a thin rule between sections, as wide as the content column (like the detail pages) */
.section.ruled > .wrap { border-top: 1px solid var(--line); padding-top: var(--rule-gap); }
.stack { display: flex; flex-direction: column; }
.gap-21 { gap: 21px; }
.group-head { margin-bottom: 30px; }

/* coloured areas are boxes inside the content column; they stick out by their own padding so text inside lines up with text outside */
.bg-paper, .bg-sand, .bg-green, .page-hero { background: var(--paper); }
.bg-green { color: var(--paper); }
section.bg-sand, section.bg-green { padding-block: 9px; }
/* next to a box (which has its own 9px inset) the gap is shortened by that inset, so it still totals one gap */
:where(section.bg-sand, section.bg-green, .team-wrap) + .section { padding-top: calc(var(--rule-gap) - 9px); }
.section:not(.bg-sand, .bg-green):has(+ :is(.bg-sand, .bg-green, .team-wrap)) { padding-bottom: calc(var(--rule-gap) - 9px); }
.bg-sand > .wrap, .bg-green > .wrap, .page-hero > .wrap { width: var(--box-width); max-width: var(--box-max); margin-inline: auto; border-radius: 18px; padding: clamp(32px, 4.5vw, 60px) var(--pad); }
.bg-sand > .wrap, .page-hero > .wrap { background: var(--sand); }
.bg-green > .wrap { background: var(--green); }

/* ---------- Type ---------- */
.h-display { font-size: clamp(28.5px, 3.3vw, 57px); line-height: 1.02; letter-spacing: -0.03em; }
.h-page { font-size: clamp(25.5px, 2.85vw, 48px); line-height: 1.02; letter-spacing: -0.03em; }
.h-section { font-size: clamp(21px, 1.8vw, 30px); line-height: 1.05; letter-spacing: -0.025em; }
.h-section.h-lg { font-size: clamp(24px, 2.25vw, 36px); }
.h-sub { font-size: clamp(19.5px, 1.8vw, 24px); line-height: 1.15; letter-spacing: -0.015em; }
.lead { font-size: var(--text-lead); line-height: 1.4; }
.label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 9px 16.5px; border-radius: 6px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-lav { background: var(--lav); color: var(--lav-ink); }
.btn-lav:hover, .btn-lav:focus-visible, .card:hover .btn-lav, .card:has(:focus-visible) .btn-lav { background: var(--lav-hover); color: var(--lav-ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--dark-grey); color: var(--paper); }
.btn-outline-light { border-color: var(--paper); color: var(--paper); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: var(--paper); }
.btn-sm { min-height: 33px; padding: 7.5px 13.5px; font-size: 13.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- Header: sticky, turns frosted once the page scrolls (site.js adds .scrolled) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding-block: 21px; transition: padding .3s ease, background-color .3s ease, box-shadow .3s ease, -webkit-backdrop-filter .3s ease, backdrop-filter .3s ease; }
/* home: the header lies over the hero photo */
.site-header.overlay { position: fixed; top: 0; left: 0; right: 0; }
.site-header.scrolled { padding-block: 10px; background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 rgba(26, 25, 24, .08), 0 8px 24px rgba(26, 25, 24, .04); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header.scrolled { background: rgba(255, 255, 255, .96); } }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.site-header.scrolled .menu-btn { box-shadow: inset 0 0 0 1px var(--line); }
.site-header.scrolled .nav-pill { box-shadow: inset 0 0 0 1px rgba(26, 25, 24, .06); }

/* logo: the brand's own artwork, drawn inline in the link colour (currentColor) at a fixed height, never stretched.
   Charcoal, green under the pointer; on the home page white over the photo (no hover colour there) and
   Charcoal again once the header turns frosted */
.brand { display: flex; align-items: center; color: var(--ink); transition: color .3s ease; }
.brand:hover, .brand:focus-visible { color: var(--green); }
.site-header.on-dark:not(.scrolled) .brand { color: var(--paper); }
.brand svg { display: block; overflow: visible; }
.brand-mark { height: 45px; width: auto; flex-shrink: 0; }
.brand-word { width: 250.84px; max-width: 100%; height: auto; min-width: 0; }
/* icon + lettering; the icon stays 45px, only the lettering narrows on very small phones */
.brand-lockup { gap: 20px; min-width: 0; flex-shrink: 1; align-items: flex-start; height: 45px; }
/* home: the wordmark carries the "Biotech" line; once the header shrinks on scroll,
   it is swapped for the plain wordmark, so only "Connectase" stays */
.brand .brand-word-sub { width: 251.05px; }   /* same letter size as the plain wordmark (250.84px / 408.649 units) */
.brand .brand-word-plain { display: none; }
.site-header.scrolled .brand .brand-word-sub { display: none; }
.site-header.scrolled .brand .brand-word-plain { display: block; }
.site-header.scrolled .brand-lockup { align-items: center; }   /* without the Biotech line the wordmark sits level with the mark again */
/* every page but the home page: mark + plain "Connectase" wordmark, level with each other */
.brand-inline { align-items: center; }

.nav { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 13px; }
.nav-pill { display: flex; gap: 3px; background: var(--paper); border-radius: 6px; padding: 3px; }
/* the Connect button matches the menu pill's height */
.nav > .btn { align-self: stretch; }
.nav-pill a { display: block; padding: 9px 13.5px; text-decoration: none; color: var(--ink); border-radius: 4.5px; }
.nav-pill a:hover { background: var(--sand); color: var(--ink); }
.nav-pill a[aria-current] { text-decoration: underline; text-underline-offset: 3px; }
.menu-btn { display: none; min-height: 33px; padding: 7.5px 12px; border-radius: 6px; border: 0; background: var(--paper); color: var(--ink); font-family: var(--font-mono); font-size: 13.5px; cursor: pointer; }
@media (max-width: 980px) {   /* menu button up to 980px, so the full menu never squeezes the logo */
  .menu-btn { display: inline-flex; align-items: center; gap: 6px; }
  .nav { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 6px); flex-direction: column; align-items: stretch; background: var(--paper); border-radius: 9px; padding: 9px; box-shadow: 0 9px 30px rgba(26,25,24,0.18); }
  .nav.open { display: flex; }
  .nav-pill { flex-direction: column; padding: 0; }
  .nav-pill a { padding: 10.5px 9px; font-size: 15px; }
  .nav .btn { width: 100%; }
  .site-header.scrolled .nav-pill { box-shadow: none; }
}
/* without JavaScript (rare): the menu button cannot open the menu, so small screens show the links as a row
   under the logo; the header scrolls away with the page, since it cannot turn frosted without the script */
@media (scripting: none) {
  .site-header { position: relative; }
  .site-header.overlay { position: absolute; }
}
@media (scripting: none) and (max-width: 980px) {
  .site-header .bar { flex-wrap: wrap; row-gap: 12px; }
  .menu-btn { display: none; }
  .nav { display: flex; position: static; flex-direction: row; flex-wrap: wrap; align-items: stretch; width: 100%; padding: 0; background: none; border-radius: 0; box-shadow: none; }
  .nav-pill { flex-direction: row; flex-wrap: wrap; padding: 3px; }
  .nav-pill a { padding: 9px 13.5px; font-size: 13px; }
  .nav .btn { width: auto; }
  /* home: the taller header sits on green above the photo instead of over the headline */
  .site-header.overlay { position: relative; background: var(--green); }
  .home-hero .inner { padding-top: 0; }
  .site-header.on-dark .nav > .btn:focus-visible { outline-color: var(--paper); }
}

/* ---------- Page title box (inner pages) ---------- */
.page-hero { padding-bottom: 9px; }
/* the first section sits close to the grey title box (about 30 px) */
.page-hero + .section { padding-top: calc(var(--rule-gap) - 9px); }
.page-hero h1 { max-width: 862.5px; }
.crumb { display: inline-block; margin: 0 0 6px; font-family: var(--font-mono); font-size: 13.5px; text-decoration: none; color: var(--muted); }
/* detail pages: title at the top, level with the top of the icon; the icon floats without a box */
.detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 345px); gap: clamp(24px, 3.75vw, 60px); align-items: start; margin-top: 21px; }
.detail-hero .text { display: flex; flex-direction: column; gap: 21px; min-width: 0; }
.detail-hero .tile { height: 240px; display: flex; align-items: center; justify-content: center; color: var(--green); }
.detail-hero .tile img { max-height: 240px; object-fit: contain; }
.detail-hero .tile img.partner-icon { max-width: 240px; }
/* application intro: two short paragraphs, then a link to the Technology page */
.detail-hero div.lead { display: flex; flex-direction: column; gap: 10.5px; }
.detail-hero .tech-link { margin-top: -6px; }
.app .detail-hero .lead { font-size: 16.5px; }
@media (max-width: 800px) {
  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero .tile { height: 220px; }
  .detail-hero .tile img { max-height: 200px; }
  .detail-hero .tile img.partner-icon { max-width: 200px; }
}

/* ---------- Home hero: fills the first screen and carries the key facts ---------- */
.home-hero { position: relative; color: var(--paper); background: var(--green); overflow: hidden; }
/* the photo sits in a <picture>: tall, narrow screens get a portrait crop of the same photo (hero-768.webp) */
.home-hero > picture { display: contents; }
.home-hero > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* min-height twice on purpose: 100vh for older browsers, 100svh (phone screen without the address bar) where supported */
.home-hero .inner { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; padding-top: 87px; }
.home-hero .copy { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 21px; padding-block: 36px; }
.home-hero .copy > * { max-width: 675px; }
.home-hero h1 { font-size: clamp(36px, 4.4vw, 76px); line-height: 1; letter-spacing: -0.035em; text-box: normal; }
.home-hero p { font-size: clamp(14.25px, 1.12vw, 18px); line-height: 1.35; color: var(--on-green); max-width: 465px; }
.home-hero .cta { padding: 9px 0 0; }
/* the intro text sits close under the hero (same gap as around a section rule) */
.home-hero + .section { padding-top: var(--rule-gap); }

/* key facts */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.fact { border-top: 1px solid var(--line); padding-top: 21px; display: flex; flex-direction: column; gap: 12px; color: var(--green); font-family: var(--font-mono); }
.fact .num { font-size: clamp(40px, 3.45vw, 66px); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.fact .cap { font-size: 15px; }
.hero-facts { padding-bottom: clamp(30px, 3.75vw, 54px); }
/* on the photo: white text; a soft green halo keeps the facts readable where they cross the light swirl of the photo (invisible on the green) */
.home-hero .fact { color: var(--paper); border-top-color: rgba(255, 255, 255, 0.4); text-shadow: 0 0 2px rgba(18, 77, 66, .9), 0 0 8px rgba(18, 77, 66, .8); }
.home-hero .fact .cap { color: var(--on-green); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; gap: 21px; } }

/* funder logos */
.logos { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 21px; row-gap: 24px; }
.logos li { width: 142.5px; height: 78px; display: grid; place-items: center; }
/* each logo links to the organisation; the link fills the slot so the whole tile is clickable */
.logos a { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 6px; }
/* under the pointer a logo shows its own colours and grows a little: the grey image fades out and the
   coloured copy fades in. Both share one grid cell, so both keep the logo's own proportions and size limits. */
.logos img { max-width: 126px; max-height: 48px; object-fit: contain; grid-area: 1 / 1; transition: opacity .2s ease, transform .3s var(--ease-out); }
.logos .hov { opacity: 0; }
.logos li:hover img:not(.hov), .logos li:has(:focus-visible) img:not(.hov) { opacity: 0; }
.logos li:hover .hov, .logos li:has(:focus-visible) .hov { opacity: 1; }
/* tall logos with a statement underneath (ministry, EU) get a taller slot to stay legible */
.logos li.logo-xl { height: 96px; }
.logos li.logo-xl img { max-width: 136px; max-height: 96px; }
@media (max-width: 520px) {
  .logos li { width: 105px; height: 63px; }
  .logos img { max-width: 97.5px; max-height: 39px; }
  .logos li.logo-xl { height: 78px; }
  .logos li.logo-xl img { max-width: 100px; max-height: 78px; }
}

/* ---------- Published science (list of papers, Technology page) ---------- */
.pubs-wrap { row-gap: 18px; }
.pubs { border-bottom: 1px solid var(--line); }
.pubs li { border-top: 1px solid var(--line); }
.pubs a { display: grid; grid-template-columns: minmax(0, 1fr) 16px; column-gap: 18px; align-items: start; padding-block: 12px; text-decoration: none; color: var(--ink); }
.pubs .main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pubs .meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--muted); }
.pubs .t { font-size: 15.75px; line-height: 1.35; font-weight: 400; }
.pubs .ext { color: var(--muted); padding-top: 2px; }
.pubs a:hover .t, .pubs a:focus-visible .t { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.pubs a:hover .ext { color: var(--green); }
@media (max-width: 720px) { .pubs .t { font-size: 16px; } }

/* ---------- Technology: intro, mechanism steps, advantages ---------- */
.intro-text { font-size: var(--text-intro); line-height: 1.38; letter-spacing: -0.01em; max-width: 720px; }
.intro-text strong { color: var(--green); font-weight: 600; }
.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px 60px; flex-wrap: wrap; padding-bottom: 42px; }

/* general bioconjugation figure (reaction + four example tiles), first thing under the title box */
.bioconj { margin: var(--space-fig) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.bioconj .reaction { display: flex; flex-direction: column; gap: 15px; }
.bioconj .reaction img { width: 100%; height: auto; }
.bioconj figcaption, .bioconj .examples span, .problem-goal figcaption { font-family: var(--font-mono); font-size: 13px; color: var(--body); letter-spacing: 0.01em; }
.bioconj figcaption, .problem-goal figcaption { text-align: center; }
.bioconj .examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bioconj .examples li { background: var(--tile); border-radius: 15px; aspect-ratio: 4 / 3; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 8px; padding: 15px 12px 13px; text-align: center; }
/* each example keeps the scale it was drawn at */
.bioconj .examples img { height: auto; max-height: 100%; object-fit: contain; }
.bioconj .examples .ex-pp { width: 74%; }
.bioconj .examples .ex-lab { width: 65%; }
.bioconj .examples .ex-imm { width: 69%; }
.bioconj .examples .ex-ab { width: 37%; }
@media (max-width: 800px) { .bioconj { grid-template-columns: 1fr; } .bioconj .examples li { aspect-ratio: 1 / 1; } }
.bioconj:first-child { margin-top: 0; }
/* Technology: the ADC tile opens the goal + "what conventional methods deliver" block below (site.js) */
.bioconj .examples li.ex-toggle { display: block; padding: 0; position: relative; transition: box-shadow .2s ease; }
.ex-toggle button { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 8px; padding: 15px 12px 13px; background: none; border: 0; border-radius: 15px; color: inherit; font: inherit; text-align: center; cursor: pointer; }
.ex-toggle button:focus-visible { outline: none; }
.ex-toggle:hover, .ex-toggle:has(:focus-visible) { box-shadow: 0 0 0 1.5px var(--green); }
.bioconj .ex-toggle .plus { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); color: var(--ink); transition: background-color .2s ease, color .2s ease; }
.ex-toggle .plus::before, .ex-toggle .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: currentColor; border-radius: 1px; transition: transform .25s ease; }
.ex-toggle .plus::after { transform: rotate(90deg); }
.ex-toggle [aria-expanded="true"] .plus::after { transform: rotate(0deg); }
.bioconj .ex-toggle:hover .plus, .bioconj .ex-toggle:has(:focus-visible) .plus, .bioconj .ex-toggle [aria-expanded="true"] .plus { background: var(--green); color: var(--paper); }

/* the heterogeneity problem: goal figure and four failure cards (opened from the ADC tile), then the answer paragraph */
.problem-goal { margin: var(--space-fig) 0 0; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.problem-goal img { width: 100%; max-width: 560px; height: auto; }
.problem-sub { margin: var(--space-fig) 0 clamp(18px, 1.9vw, 27px); max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.problem-sub h3 { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.2; letter-spacing: -0.015em; }
.problem-sub p { font-size: var(--text-intro); line-height: 1.38; letter-spacing: -0.01em; }
.fails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fails li { border: 1px solid var(--line); border-radius: 15px; padding: 9px 9px 21px; display: flex; flex-direction: column; gap: 9px; }
.fails .picto { height: 168px; background: var(--tile); border-radius: 10.5px; padding: 8px 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.fails .picto img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.fails h3 { font-size: 15.75px; line-height: 1.3; padding-inline: 9px; }
.fails p { font-size: var(--text-body); line-height: 1.5; color: var(--body); padding-inline: 9px; }
.problem .answer { margin-top: clamp(18px, 1.5vw, 21px); }
.adc-problems { margin-block: var(--rule-gap); padding-block: var(--rule-gap); border-block: 1px solid var(--line); }   /* grey rules above and below the opened ADC block, one gap on each side */
.adc-problems .problem-goal { margin-top: 0; }
.adc-problems + .answer { margin-top: 0; }
@media (max-width: 1000px) { .fails { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .fails { grid-template-columns: 1fr; } .fails .picto { height: 150px; } }

/* numbered markers (two balls) used by steps, story and how-to lists */
.balls { display: flex; align-items: center; position: relative; }
.balls span { width: 24px; height: 24px; border-radius: 50%; background: var(--light-grey); }
.balls span + span { margin-left: -2px; background: var(--dark-grey); color: var(--paper); font-family: var(--font-mono); font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* step and story rows: a vertical line joins the markers; horizontal rules start right of the marker column so they never cross it */
.steps { display: flex; flex-direction: column; }
.step, .story li { position: relative; display: grid; column-gap: 30px; background: linear-gradient(var(--line), var(--line)) 84px 0 / calc(100% - 84px) 1px no-repeat; }
.step:last-child, .story li:last-child { background: linear-gradient(var(--line), var(--line)) 84px 0 / calc(100% - 84px) 1px no-repeat, linear-gradient(var(--line), var(--line)) 84px 100% / calc(100% - 84px) 1px no-repeat; }
.step::before, .story li::before { content: ""; position: absolute; left: 26.25px; width: 2px; background: var(--line); }
.step { grid-template-columns: 54px minmax(0, 315px) minmax(0, 1fr); row-gap: 18px; padding-block: 24px; }
.step::before { top: 0; bottom: 0; }
.step:first-child::before { top: 36px; }
.step:last-child::before { bottom: auto; height: 36px; }
.step .marker, .story .marker { display: flex; justify-content: center; align-items: flex-start; }
.step .text { display: flex; flex-direction: column; gap: 16.5px; min-width: 0; }
.step .text p { font-size: var(--text-lead); line-height: 1.4; letter-spacing: -0.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: flex; align-items: center; gap: 6px; padding: 6px 10.5px; background: var(--lav-soft); color: var(--lav-ink); border-radius: 999px; font-size: 14px; font-weight: 500; }
/* mechanism figures: frameless, 13:9 like the artwork, a little narrower than the column and aligned right */
.figure-card { aspect-ratio: 13 / 9; max-width: 100%; }
.figure-card img { width: 100%; height: 100%; object-fit: contain; }
.step .figure-card { width: 80%; justify-self: end; }
@media (max-width: 900px) {
  .step, .story li { column-gap: 12px; background-position: 54px 0; background-size: calc(100% - 54px) 1px; }
  .step:last-child, .story li:last-child { background-position: 54px 0, 54px 100%; background-size: calc(100% - 54px) 1px, calc(100% - 54px) 1px; }
  .step::before, .story li::before { left: 20.25px; }
  .step { grid-template-columns: 42px minmax(0, 1fr); }
  .step .figure-card { grid-column: 2; width: 100%; }
}

/* advantages */
.why-list li { display: grid; grid-template-columns: 150px minmax(0, 3fr) minmax(0, 7fr); column-gap: 18px; row-gap: 9px; align-items: center; padding-block: 12px; border-top: 1px solid var(--rule); }
.why-list li:last-child { border-bottom: 1px solid var(--rule); }
.why-list .picto { height: 84px; background: var(--paper); border-radius: 10.5px; display: flex; align-items: center; justify-content: center; padding: 9px; }
.why-list .picto img { max-height: 100%; object-fit: contain; }
.why-list h3 { font-size: 15.75px; line-height: 1.3; }
.why-list p { font-size: var(--text-body); line-height: 1.5; color: var(--body); }
@media (max-width: 900px) { .why-list li { grid-template-columns: 105px minmax(0, 1fr); } .why-list p { grid-column: 1 / -1; } .why-list .picto { height: 72px; } }

/* ---------- Cards (applications, partnering) ---------- */
.grid-2, .grid-3, .grid-4, .grid-5 { display: grid; gap: 15px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
/* card grids narrow in steps (5 → 3 → 2 → 1, 4 and 3 → 2 → 1), so cards and their pictures never get oversized on half-width windows */
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-4, .grid-5, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-4, .grid-5, .grid-3 { grid-template-columns: 1fr; } }
/* the whole card is the link: it lifts and tints on hover; an invisible strip under the card keeps the pointer "inside" while it lifts, so it never flickers */
.card { position: relative; background: var(--tile); border-radius: 18px; padding: 21px; display: flex; flex-direction: column; gap: 13.5px; min-width: 0; transition: transform .2s ease, box-shadow .2s ease; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -8px; }
.card .btn::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.card:hover, .card:has(:focus-visible) { transform: translateY(-4px); box-shadow: 0 0 0 1.5px var(--green), 0 12px 30px rgba(26, 25, 24, .10); }
.card .art { height: 142.5px; display: flex; align-items: center; justify-content: center; color: var(--green); }
/* application icons: the top row ships at 1.3x scale (wide crop), so the image keeps its own proportions */
.card .art img { max-height: 135px; object-fit: contain; }
.card .art img.partner-icon { max-width: 100px; max-height: 100px; }
.card h3 { font-size: 15.75px; line-height: 1.2; }
.card p { font-size: var(--text-body); line-height: 1.45; color: var(--body); }
.card .btn { margin-top: auto; align-self: flex-start; }
/* each card takes its row's shared tracks, so title, image, subtitle, tags and button line up across the row */
.apps > .card, .partners > .card { display: grid; grid-template-rows: subgrid; row-gap: 13.5px; }
.apps > .card { grid-row: span 5; }
.partners > .card { grid-row: span 4; }
.apps > .card > *, .partners > .card > * { align-self: start; }
.apps > .card .btn, .partners > .card .btn { margin-top: 0; align-self: end; justify-self: start; }
.tags { display: flex; flex-wrap: wrap; gap: 4.5px; }
.tags li { padding: 4.5px 7px; background: var(--paper); border-radius: 999px; font-family: var(--font-mono); font-size: 12px; color: var(--green); }

/* ---------- Detail pages (applications, partners) ---------- */
/* white sections with outlined cards, so only the title box and the green call-to-action band carry colour;
   consecutive sections share one gap with a thin rule in the middle */
.detail .section + .section, .faq-page .section + .section { padding-top: 0; }
.detail .section + .section > .wrap, .faq-page .section + .section > .wrap { border-top: 1px solid var(--line); padding-top: var(--rule-gap); }
.detail .bg-green + .section { padding-block: 0; }
/* slimmer green call-to-action band */
.detail .bg-green > .wrap { padding-block: clamp(26px, 3.6vw, 48px); }
/* experimental data left, how-to steps right, top to bottom */
.data-howto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.data-howto .col { display: flex; flex-direction: column; min-width: 0; }
/* real experimental figure: the image itself carries its labels; it scales to the column */
.fig-data { position: relative; margin: 0; }
.fig-data img { display: block; width: 88%; max-width: 520px; height: auto; margin-inline: auto; }
.fig-data + .fig-data { margin-top: 30px; }
/* figure letters (a, b) sit at the image's top-left corner; one short caption follows the figures */
.fig-tag { position: absolute; top: -2px; left: calc(max(6%, calc(50% - 260px)) - 20px); font-weight: 600; font-size: 18px; line-height: 1; color: var(--ink); }
.fig-caption { width: 88%; max-width: 520px; margin: 18px auto 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.fig-caption b { font-weight: 600; color: var(--ink); }
.fig-caption > span { display: block; }
.fig-caption > span + span { margin-top: 6px; }

/* applications without data yet: a calm, permanent panel instead of a figure */
.fig-soon { flex: 1; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; background: var(--tile); border: 1px solid var(--line); border-radius: 15px; }
.fig-soon img { width: 72px; height: auto; margin-bottom: 6px; }
.fig-soon .t { font-size: 18px; font-weight: 500; color: var(--ink); }
.fig-soon p:not(.t) { max-width: 320px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.howto li { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 21px; display: flex; flex-direction: column; gap: 15px; min-height: 150px; }
.howto p { font-size: 16.5px; }
.howto.steps-v { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.howto.steps-v li { flex: 1; flex-direction: row; align-items: center; min-height: 0; }
.howto.steps-v .balls { flex-shrink: 0; }
/* with two figures the left column is tall; the step cards keep their usual height instead of stretching */
.two-figs .howto.steps-v { flex: 0 0 auto; }
.two-figs .howto.steps-v li { flex: none; min-height: 104px; }
/* the two tag sequences, listed once under the steps instead of inside them */
.tag-legend { margin: 0; padding-top: 3px; display: flex; flex-direction: column; gap: 7.5px; font-family: var(--font-mono); font-size: 13px; }
.tag-legend > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4.5px 12px; }
.tag-legend dt { font-weight: 500; min-width: 75px; }
.tag-legend dd { margin: 0; }
.tag-legend .seq { color: var(--green); overflow-wrap: anywhere; user-select: all; }
.tag-legend .note { color: var(--muted); }
/* applications still being established: a short explanation instead of the steps */
.howto-note { display: flex; flex-direction: column; gap: 15px; }
.howto-note p { font-size: var(--text-lead); line-height: 1.5; color: var(--body); }
/* links inside running text are green (answers, lists, notes, story, contact page) */
.acc .ans a, .checks a, .head-start .lead a, .fig-soon a, .howto-note a, .story .body a, .contact-head a, .form-note a { color: var(--green); }
@media (max-width: 800px) { .data-howto { grid-template-columns: 1fr; } }
.res li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 21px; min-height: 112.5px; color: var(--muted); }
.res .top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.res .name { margin-top: auto; font-size: 15px; font-weight: 500; color: var(--ink); }
.res .kind { font-family: var(--font-mono); font-size: 13px; }
/* publication cards: the whole card is the link */
.res li.pub { padding: 0; }
.res li.pub a { flex: 1; display: flex; flex-direction: column; gap: 21px; padding: 18px; color: inherit; text-decoration: none; border-radius: 12px; }
.res li.pub .name { line-height: 1.35; }
.res li.pub a:hover .name, .res li.pub a:focus-visible .name { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.res li.pub a:hover svg { color: var(--green); }
/* events ("Meet us" on the home page, the Events page): cards like the publications, with the title under the date and
   the place at the bottom. All upcoming events are in the page: the home page shows the next two, the Events page the
   next four, and the others move up as events pass (site.js). Past events are not links. */
.events-next li:nth-child(n+3), .events-upcoming li:nth-child(n+5) { display: none; }
.events .name { margin-top: 0; }
.events .place { margin-top: auto; font-family: var(--font-mono); font-size: 13px; }
.events li:not(.pub):hover { box-shadow: none; }
.events-more, .events-none { margin-top: 18px; }
.events-none { font-size: var(--text-body); color: var(--muted); }
.two-col { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 18px; }
.two-col > .l { grid-column: 1 / span 3; }
.two-col > .r { grid-column: 4 / span 9; min-width: 0; }
@media (max-width: 900px) { .two-col > .l, .two-col > .r { grid-column: 1 / -1; } }
/* heading beside an accordion (partner pages, "Learn more"): centred on the first question row (1px rule + 69px row) */
@media (min-width: 901px) { .two-col > h2.acc-head { align-self: start; min-height: 70px; display: flex; align-items: center; } }
.acc { border-bottom: 1px solid var(--line); }
.acc details { border-top: 1px solid var(--line); }
.acc summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-block: 19.5px; font-size: 15px; font-weight: 500; }
.acc .ans { padding: 0 48px 21px 0; font-size: 16px; line-height: 1.55; color: var(--body); }
.pm { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; font-size: 16.5px; color: var(--ink); }
.pm::before { content: "+"; }
/* link to the FAQ page under a page's own questions */
.faq-more a { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--green); text-decoration: none; }
.faq-more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.faq-more .arrow { flex-shrink: 0; }
details[open] > summary .pm::before { content: "\2212"; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--paper); max-width: 480px; }
.app-nav { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-block: clamp(18px, 2.25vw, 24px); }
.next-link { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 48%; text-decoration: none; text-align: right; }
.next-link.prev { align-items: flex-start; text-align: left; }
.next-link .t { font-size: clamp(15px, 1.5vw, 21px); font-weight: 500; }
.bullets-box { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: clamp(18px, 2.25vw, 30px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.checks { display: flex; flex-direction: column; gap: 10.5px; }
.checks li { display: flex; gap: 9px; font-size: var(--text-body); line-height: 1.5; }
.checks svg { flex-shrink: 0; margin-top: 4.5px; color: var(--green); }
/* numbered variant ("How we work together", partnering head start): green mono numbers in place of the ticks */
.nums .n { flex-shrink: 0; width: 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.73; color: var(--green); }
.acc .ans p + p { margin-top: 12px; }
.head-start { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }

/* ---------- About ---------- */
/* group photo: same width as the coloured boxes, native proportions so no one is cropped */
.team-wrap { padding-block: 9px; }
.team-wrap > .wrap { width: var(--box-width); max-width: var(--box-max); padding-inline: 0; }
.team-photo { display: block; width: 100%; height: auto; aspect-ratio: 2560 / 1243; object-fit: cover; border-radius: 18px; }
.two-col > h2.label { padding-top: 10px; }
.two-col > h2.label.label-values { padding-top: 22px; }
.statement { font-size: clamp(21px, 2.1vw, 33px); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.mission { font-size: clamp(18px, 1.72vw, 28.5px); line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.prose { display: flex; flex-direction: column; gap: 15px; max-width: 615px; }
.prose p { font-size: clamp(14.25px, 1.05vw, 16px); line-height: 1.6; color: var(--body); }
.bg-green .label { color: var(--green-soft); }
.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; row-gap: 42px; }
.values > div { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-direction: column; gap: 10.5px; }
.values h3 { font-size: 18px; line-height: 1.2; }
.values p { font-size: 16px; line-height: 1.6; color: var(--body); }
@media (max-width: 720px) { .values { grid-template-columns: 1fr; } }
/* story timeline (shares the row and line styling with the technology steps) */
.story li { grid-template-columns: 54px 131px minmax(0, 1fr); row-gap: 12px; padding-block: 36px; }
.story li::before { top: 48px; bottom: 0; }
.story li:last-child::before { top: 0; bottom: auto; height: 48px; }
.story .label { padding-top: 6px; }
.story .body { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.story .t { font-size: clamp(16.5px, 1.35vw, 21px); line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.story p { font-size: var(--text-body); line-height: 1.6; color: var(--body); }
@media (max-width: 900px) { .story li { grid-template-columns: 42px minmax(0, 1fr); } .story .label, .story .body { grid-column: 2; } }

/* people: bio shows over the photo on hover/focus; touch screens get a "Read more" toggle instead */
.people { align-items: start; row-gap: 42px; }
.person { display: flex; flex-direction: column; gap: 10.5px; min-width: 0; }
/* the photo is the size container for its bio overlay (see .bio below) */
.person .photo { position: relative; container-type: inline-size; }
.person .photo img { width: 100%; height: auto; aspect-ratio: 41 / 36; object-fit: cover; object-position: center top; border-radius: 15px; background: var(--ink); }
.person h3 { font-size: 18px; }
.person .role { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); }
/* cofounders: LinkedIn icon at the right end of the name line (official logo, unaltered) */
.person .who { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.li-link, .ext-link { flex: none; display: block; padding: 2px; margin: 0 -2px 0 0; border-radius: 4px; }
.li-link img { display: block; width: 20px; height: 20px; }
.ext-link { color: var(--muted); }
.ext-link:hover, .ext-link:focus-visible { color: var(--green); }
.ext-link svg { display: block; }
.bio { position: absolute; inset: 0; padding: 21px; border-radius: 15px; background: rgba(26, 25, 24, .78); color: var(--paper); display: flex; flex-direction: column; justify-content: center; gap: 9px; overflow: auto; opacity: 0; transition: opacity 0.2s ease; }
.bio p { font-size: 14.5px; line-height: 1.55; }
.person:hover .bio, .person .photo:focus-visible .bio { opacity: 1; }
/* the bio shrinks with its photo: text and padding are sized from the photo width (cqw), so the text keeps the
   proportions it has on a full-width photo (310 px: 14.5 px text, 21 px padding) and never overflows */
@supports (width: 1cqw) { .bio { padding: clamp(12px, 6.77cqw, 21px); gap: clamp(6px, 2.9cqw, 9px); } .bio p { font-size: clamp(10.5px, 4.68cqw, 14.5px); } }
.bio-toggle summary { display: flex; justify-content: space-between; align-items: center; padding-block: 9px; font-family: var(--font-mono); font-size: 13.5px; color: var(--green); border-top: 1px solid var(--line); }
.bio-toggle .pm { width: 24px; height: 24px; font-size: 16px; }
.bio-toggle p { font-size: var(--text-body); line-height: 1.55; color: var(--body); padding-bottom: 6px; }
.more-open { display: none; }
details[open] .more-open { display: inline; }
details[open] .more-closed { display: none; }
@media (hover: hover) { .bio-toggle { display: none; } }
/* touch screens: the cards in a row share their row lines (photo / name and role / "Read more"), so a name or role that
   wraps onto two lines moves "Read more" down in every card of that row, and the buttons stay level */
@media (hover: none) {
  .people { row-gap: 0; }
  .person { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 10.5px; padding-bottom: 42px; }
  .person > :nth-child(2) { align-self: start; }
}
/* two narrow cards per row (just above phone width): slightly smaller name and role, so they stay on one line */
@media (min-width: 521px) and (max-width: 600px) { .person h3 { font-size: 16px; } .person .role { font-size: 12px; } }
@media (hover: none) { .bio { display: none; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 30px; padding-top: clamp(32px, 4.5vw, 60px); align-items: start; }
.contact-grid h1, .contact-head, .contact-form { grid-column: 1 / -1; }
.contact-form { background: var(--paper); border-radius: 18px; padding: clamp(18px, 2.25vw, 30px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7.5px; }
.field input, .field textarea { width: 100%; padding: 12px 13.5px; border: 1px solid var(--field-line); border-radius: 7.5px; background: var(--paper); font: inherit; font-size: 16px; color: var(--ink); }
.field textarea { resize: vertical; line-height: 1.5; }
.contact-form textarea { min-height: 320px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
/* spam trap: invisible to people and screen readers, filled in only by bots */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 15px; line-height: 1.5; color: var(--muted); }
.form-status { font-size: 15px; line-height: 1.5; padding: 12px 13.5px; border-radius: 7.5px; background: var(--green-tint); color: var(--green); }
.form-status.error { background: var(--error-bg); color: var(--desert); }
.form-status .addr { font-family: var(--font-mono); user-select: all; }

/* ---------- Legal pages ---------- */
.legal { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.legal-block { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 10px; border-top: 1px solid var(--line); padding-block: 24px; }
.legal-block h2 { grid-column: 1 / span 4; font-size: 16.5px; line-height: 1.3; }
.legal-text { grid-column: 5 / span 8; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.legal-text p { font-size: var(--text-body); line-height: 1.6; color: var(--body); overflow-wrap: anywhere; }
@media (max-width: 720px) { .legal-block h2, .legal-text { grid-column: 1 / -1; } }

/* ---------- 404 page ---------- */
.notfound { display: flex; flex-direction: column; align-items: flex-start; gap: 21px; }
.notfound .lead { max-width: 560px; }

/* ---------- Next step: a single button at the end of a page that leads the visitor on ---------- */
.next-step { padding-block: 0 var(--rule-gap); }
.next-step .wrap { display: flex; justify-content: flex-end; }
.next-step .btn { gap: 9px; }
.next-step .arrow { flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--sand); padding-block: 42px 30px; }
.site-footer .top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: 24px; }
/* footer logo: the same artwork and size as the home page header logo (45px mark + "Biotech" wordmark), in white */
.site-footer .mark { grid-column: 1 / span 8;   /* logo; Contact and Social fill the last four columns */ display: flex; align-items: flex-start; gap: 20px; min-width: 0; color: var(--paper); }
.site-footer .mark svg { display: block; overflow: visible; }
.site-footer .mark .brand-word-sub { width: 251.05px; }
.site-footer .col { grid-column: span 2; display: flex; flex-direction: column; gap: 7.5px; font-size: 13.5px; line-height: 1.5; }
.site-footer .col .label { color: var(--footer-muted); font-size: 12px; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer .bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--dark-grey); font-family: var(--font-mono); font-size: 13px; color: var(--footer-muted); }
.site-footer .bottom a { color: var(--footer-muted); text-decoration: underline; }
.site-footer .bottom .links { display: flex; gap: 21px; }
@media (max-width: 900px) {
  .site-footer .mark { grid-column: 1 / -1; }
  .site-footer .col { grid-column: span 4; }
}
/* where the header shows the Menu button (56.4px wide, 18px gap), the footer logo gets the same width as the header logo, so both stay identical */
@media (max-width: 980px) { .site-footer .mark { max-width: calc(100% - 74.4px); } }
@media (max-width: 560px) { .site-footer .col { grid-column: 1 / -1; } }

/* ---------- Small screens: readable sizes after the 75% desktop scale ---------- */
@media (max-width: 720px) {
  :root { --text-body: 16px; }   /* body, cards, lists, bios, legal text */
  .prose p, .story .t, .home-hero p { font-size: 16px; }   /* sizes that scale with the window on desktop */
  /* lead-in text stays a step above body text */
  .intro-text, .problem-sub p, .lead { font-size: 17px; }
  .step .text p { font-size: 18px; }
}

/* ---------- Motion: quiet, eased, and off for anyone who prefers reduced motion ---------- */
@keyframes cx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cx-zoom { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes cx-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (prefers-reduced-motion: no-preference) {
  /* page load: only the home hero animates (the photo settles with a slow zoom, the text and figures rise in);
     everything else is simply there and only fades in on scrolling */
  .home-hero > picture > img { animation: cx-zoom 2.6s var(--ease-out) both; }
  .home-hero .copy > * { animation: cx-rise .9s var(--ease-out) both; }
  .home-hero .copy > :nth-child(1) { animation-delay: .15s; }
  .home-hero .copy > :nth-child(2) { animation-delay: .3s; }
  .home-hero .copy > :nth-child(3) { animation-delay: .45s; }
  .hero-facts .fact { animation: cx-rise .9s var(--ease-out) both; }
  .hero-facts .fact:nth-child(1) { animation-delay: .6s; }
  .hero-facts .fact:nth-child(2) { animation-delay: .7s; }
  .hero-facts .fact:nth-child(3) { animation-delay: .8s; }
  /* on scroll (site.js adds .reveal only to blocks entirely below the screen, then .in when they arrive).
     Hiding has no transition, so it is instant; only the arrival is animated. */
  .reveal { opacity: 0; transform: translateY(22px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity .75s var(--ease-out), transform .75s var(--ease-out); transition-delay: var(--d, 0ms); }
  .step.reveal::before { transform: scaleY(0); transform-origin: top; }
  .step.reveal.in::before { transform: none; transition: transform 1s var(--ease-out) var(--d, 0ms); }
  /* small interactions: buttons change colour and shadow only, so their edges never move under the pointer */
  .btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease-out), box-shadow .2s ease; }
  .btn:hover { box-shadow: 0 6px 16px rgba(26, 25, 24, .10); }
  .btn:active { box-shadow: none; }
  .nav-pill a { transition: background-color .2s ease; }
  .next-link .t { transition: transform .3s var(--ease-out); }
  .next-link:hover .t { transform: translateX(5px); }
  .next-link.prev:hover .t { transform: translateX(-5px); }
  .pm { transition: transform .3s var(--ease-out), background-color .2s ease; }
  details[open] > summary .pm { transform: rotate(180deg); }
  details[open] > .ans, .bio-toggle[open] > p { animation: cx-drop .35s var(--ease-out) both; }
  .res li { transition: transform .25s var(--ease-out), box-shadow .25s ease; }
  .res li:hover { box-shadow: 0 8px 20px rgba(26, 25, 24, .08); }
  /* mechanism figures zoom slightly; they have no frame, so nothing is clipped */
  .team-photo, .figure-card img { transition: transform 1.2s var(--ease-out); }
  .figure-card:hover img { transform: scale(1.03); }
  .next-step .arrow, .faq-more .arrow { transition: transform .2s var(--ease-out); }
  .li-link img { transition: transform .2s var(--ease-out); }
  .li-link:hover img, .li-link:focus-visible img { transform: scale(1.12); }
  .faq-more a:hover .arrow, .faq-more a:focus-visible .arrow { transform: translateX(3px); }
  .logos li:hover img { transform: scale(1.08); }
  .next-step .btn:hover .arrow, .next-step .btn:focus-visible .arrow { transform: translateX(3px); }
}
/* printing: blocks still waiting for their scroll-in animation are printed too */
@media print { .reveal, .step.reveal::before { opacity: 1 !important; transform: none !important; transition: none !important; } }
