/* IBM Plex Sans, served from this site (SIL Open Font License). One variable file per script covers weights 400-700; italic is used at 400 only. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/ibm-plex-sans-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-italic-greek.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-italic-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin.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: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-italic-latin.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; }

/* Crystal Lab Ferrara
   Layout: full-bleed photo heroes from the lab, then calm white pages on a cool grey ground;
   one family (IBM Plex Sans) in a strict scale; blue for links and verbs, the orange "beam" only as a thin line. */
:root {
  --ground: #f3f5f8;
  --surface: #ffffff;
  --ink: #0d1117;
  --ink-2: #2f3744;
  --muted: #5b6474;
  --line: #dde3eb;
  --accent: #0a5fb0;
  --accent-soft: #7cc0ff;
  --beam: #f39a2e;
  --band: #0d1520;

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  /* seven steps: 14 · 16 · 17 · 18–21 · 21–26 · 28–40 · 32–50 px */
  --fs-h1: clamp(2rem, 1.5rem + 1.8vw, 3.1rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.3vw, 2.5rem);
  --fs-h3: clamp(1.3rem, 1.15rem + 0.6vw, 1.65rem);
  --fs-lead: clamp(1.12rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-ui: 1rem;
  --fs-small: 0.875rem;

  --wrap: 1180px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --nav-h: 68px;
  --radius: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
picture { display: contents; }
/* with the picture box gone, its <source> would become a grid item of its own and push the photo into the next cell */
picture > source { display: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .page-hero :focus-visible, .band :focus-visible, .foot-bar :focus-visible { outline-color: var(--accent-soft); }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
p, li, dd, figcaption { text-wrap: pretty; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- navigation ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  /* white glass: the photo behind is flattened and lifted before the white veil, so dark photos don't turn it grey */
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(20px) saturate(1.3) contrast(0.45) brightness(1.6);
  backdrop-filter: blur(20px) saturate(1.3) contrast(0.45) brightness(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.nav.solid { background: var(--surface); border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(13, 17, 23, 0.06); -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav-in { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-body); letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 34px; height: auto; }
.brand small { display: block; font-weight: 400; font-size: var(--fs-small); color: var(--muted); letter-spacing: 0.01em; margin-top: -3px; }
.nav-main { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { display: block; padding: 8px 12px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-ui); font-weight: 500; position: relative; border-radius: 4px; }
.nav-links a:hover { color: var(--ink); background: rgba(13, 17, 23, 0.05); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--beam); border-radius: 2px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 26px; height: 26px; pointer-events: none; }
@media (max-width: 70em) {
  .nav-main { margin-left: 0; } .menu-btn { order: 2; margin-right: -10px; }
  .menu-btn { display: block; }
  .nav-links { position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter-r) 16px var(--gutter); display: none; box-shadow: 0 16px 30px rgba(13,17,23,.08);
    max-height: calc(100vh - var(--nav-h) - env(safe-area-inset-top, 0px)); max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain; }
  /* without JavaScript: the links sit in the page under the name, as a wrapped row that scrolls away */
  .no-js .nav { position: relative; background: var(--surface); }
  .no-js .nav-in { height: auto; flex-wrap: wrap; padding-block: 10px; }
  .no-js .nav-main { flex-basis: 100%; }
  .no-js .nav-links { display: flex; position: static; flex-direction: row; flex-wrap: wrap; padding: 0; max-height: none; box-shadow: none; border: 0; background: none; }
  .no-js .nav-links a { padding: 6px 12px 6px 0; border: 0; font-size: var(--fs-ui); }
  .no-js .menu-btn { display: none; }
  .nav.open .nav-links { display: flex; }
  .nav.open { background: var(--surface); }
  .nav-links a { padding: 14px 4px; font-size: var(--fs-body); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a[aria-current="page"]::after { left: 4px; right: auto; width: 28px; bottom: 8px; }
}

/* ---------- home hero ----------
   The lab photos crossfade under one blue tint so they read as a single series; a network of drifting points (particles.js),
   a few in beam orange, moves over them. Centre: name, one line per photo, the subtitle. */
.hero { position: relative; min-height: clamp(600px, 94vh, 1000px); min-height: clamp(600px, 94svh, 1000px); color: #fff; overflow: hidden; background: #071528; display: flex; align-items: center; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) contrast(1.08) brightness(.82); transform: scale(1.08); transition: transform 8s linear; }
.slide.on img { transform: scale(1); }
.hero .tint { position: absolute; inset: 0; background: #0b4fa0; mix-blend-mode: color; opacity: .62; pointer-events: none; }
.hero .particles { position: absolute; inset: 0; z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(0,0,0,.55) 25%, #000 80%); mask-image: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(0,0,0,.55) 25%, #000 80%); }
.hero .particles canvas { display: block; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 58% 52% at 50% 52%, rgba(4,12,26,.76), rgba(4,12,26,.22) 75%), linear-gradient(0deg, rgba(4,12,26,.7), rgba(4,12,26,0) 35%), linear-gradient(180deg, rgba(4,12,26,.45), rgba(4,12,26,0) 25%); }
@media (max-width: 760px) {
  .hero::after { background: radial-gradient(ellipse 90% 46% at 50% 40%, rgba(4,12,26,.8), rgba(4,12,26,.28) 80%), linear-gradient(0deg, rgba(4,12,26,.7), rgba(4,12,26,0) 35%), linear-gradient(180deg, rgba(4,12,26,.45), rgba(4,12,26,0) 25%); }
}
.hero-in { position: relative; z-index: 3; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: calc(var(--nav-h) + 40px) 150px; }
.hero h1 { margin-top: 18px; font-size: var(--fs-h1); letter-spacing: -0.02em; }
.hero-sub { margin-top: 8px; font-size: var(--fs-lead); color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,.55); max-width: 62ch; text-wrap: balance; }
.hero-lines { list-style: none; padding: 0; margin: clamp(36px, 7vh, 80px) 0 0; display: grid; max-width: 22ch; font-size: var(--fs-h1); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
/* two type sizes in the header: the rotating line matches the title; the subtitle stresses "physics" */
.hero-sub b { color: #fff; font-weight: 700; }
.hero-lines li { grid-area: 1 / 1; opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); pointer-events: none; text-wrap: balance; }
.hero-lines li.on { opacity: 1; transform: none; pointer-events: auto; transition-delay: .25s; }
.hero-lines a { color: #fff; text-decoration: none; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero-lines a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.hero-lines b { color: var(--beam); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: var(--fs-ui); text-decoration: none; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #fff; color: var(--ink); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--ink); color: #fff; }
.hero-logos { position: absolute; z-index: 3; left: var(--gutter); bottom: max(26px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 26px; }
/* large enough for the three lines of the UniFe wordmark to be read */
.hero-logos img { height: 80px; width: auto; }
.hero-ctrl { position: absolute; z-index: 3; right: var(--gutter-r); bottom: max(24px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 14px; }
.hero-caption { font-size: var(--fs-small); color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.8); text-align: right; max-width: 30ch; }
.dots { display: flex; gap: 0; }
.dots button { width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); transition: background .2s, transform .2s; }
.dots button:hover::before { background: #fff; }
.dots button[aria-current="true"]::before { background: var(--beam); transform: scale(1.3); }
.pause { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(8,12,18,.35); color: #fff; cursor: pointer; display: grid; place-items: center; }
.pause:hover { background: rgba(8,12,18,.6); }
.pause svg { width: 14px; height: 14px; }
.no-js .hero-ctrl { display: none; }
@media (max-width: 760px) { .dots button { width: 44px; height: 44px; } .pause { width: 44px; height: 44px; } }
@media (max-width: 360px) { .dots button { width: 38px; } }
/* the photo caption gives way to the logos on narrow screens (the dots still name each photo); on phones logos and dots stack, centred */
@media (max-width: 900px) { .hero-caption { display: none; } }
@media (max-width: 760px) { .hero-logos { left: 0; right: 0; justify-content: center; bottom: calc(max(24px, env(safe-area-inset-bottom, 0px)) + 54px); } .hero-logos img { height: 56px; } .hero-ctrl { left: 0; right: 0; justify-content: center; } .hero-in { padding-bottom: 170px; } }

/* ---------- inner page hero ---------- */
.page-hero { position: relative; color: #fff; background: var(--band); overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,12,18,.82), rgba(8,12,18,.35) 70%, rgba(8,12,18,.15)); }
.page-hero .wrap { position: relative; z-index: 2; padding-block: calc(var(--nav-h) + 72px) 56px; }
.page-hero h1 { font-size: var(--fs-h1); }
.page-hero p { margin-top: 14px; font-size: var(--fs-lead); color: rgba(255,255,255,.88); max-width: 52ch; }
@media (max-width: 760px) { .page-hero::after { background: linear-gradient(180deg, rgba(8,12,18,.62), rgba(8,12,18,.86)); } }
/* bright photo: on wide screens the text keeps to the left half, so the right half is left unveiled; narrower, the text spans more of it and needs a darker veil */
@media (min-width: 761px) and (max-width: 1199px) { .page-hero.light::after { background: linear-gradient(90deg, rgba(8,12,18,.84), rgba(8,12,18,.74) 62%, rgba(8,12,18,.3) 92%, rgba(8,12,18,.2)); } }
@media (min-width: 1200px) { .page-hero.light::after { background: linear-gradient(90deg, rgba(8,12,18,.8), rgba(8,12,18,.66) 50%, rgba(8,12,18,.1) 80%, rgba(8,12,18,0)); } }
.lang-switch { display: inline-block; margin-top: 22px; padding: 9px 18px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; color: #fff; font-weight: 500; text-decoration: none; }
.lang-switch:hover { background: rgba(255,255,255,.14); }
.page-hero .beam { display: block; width: 72px; height: 3px; background: var(--beam); border-radius: 2px; margin-bottom: 22px; }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.white { background: var(--surface); }
.h2 { font-size: var(--fs-h2); }
.lead { font-size: var(--fs-lead); color: var(--ink-2); }
.prose { max-width: 66ch; color: var(--ink-2); }
.prose p + p { margin-top: 1em; }
/* running text is justified; English hyphenation keeps the word spacing even in narrow columns */
.line-summary, .row p, .statement .lead, .phys-text p:not(.formula) { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 68.749em) { .line-summary, .row p, .statement .lead, .phys-text p:not(.formula) { text-align: start; } }
.nw { white-space: nowrap; }

.statement { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.statement .h2 { font-size: var(--fs-h1); }
.statement .lead { margin-top: 20px; }
.statement .more { margin-top: 26px; display: inline-block; font-weight: 600; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--surface); padding: 22px 22px 20px; }
.fact b { display: block; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: 8px; font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; } }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.trio figure { margin: 0; }
.trio img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--radius); }
.trio h3 { margin-top: 20px; font-size: var(--fs-h3); }
.trio p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } }
@media (min-width: 601px) and (max-width: 860px) { .trio figure { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 22px; align-items: center; } .trio h3 { margin-top: 0; } }

.head-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.papers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.paper { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s; }
.paper:hover { border-color: #b9c6d8; transform: translateY(-2px); }
.tag { align-self: flex-start; font-size: var(--fs-small); font-weight: 500; color: var(--muted); }
.paper h3 { font-size: var(--fs-body); line-height: 1.35; letter-spacing: 0; }
.paper h3 a { color: var(--ink); text-decoration: none; }
.paper h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.paper:hover h3 a { color: var(--accent); }
.paper p { font-size: var(--fs-small); color: var(--muted); margin-top: auto; }
@media (max-width: 900px) { .papers { grid-template-columns: 1fr; } }

.families { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.family { background: var(--ground); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.family img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.family-body { padding: 24px 24px 28px; }
.family h3 { font-size: var(--fs-h3); }
.family h3 a { color: var(--ink); text-decoration: none; }
.family h3 a:hover { color: var(--accent); text-decoration: underline; }
.family-body > p { margin-top: 8px; color: var(--ink-2); }
.family ul { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.family li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.family li a:hover { color: var(--ink); }
.family li b { color: var(--accent); }
@media (max-width: 960px) { .families { grid-template-columns: 1fr; } .family { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } .family img { height: 100%; aspect-ratio: auto; } }
@media (max-width: 600px) { .family { display: flex; } .family img { aspect-ratio: 16 / 9; height: auto; } }
.lines-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lines-grid a { background: var(--surface); padding: 22px 22px 24px; text-decoration: none; color: var(--ink); display: block; transition: background .2s; }
.lines-grid a:hover { background: #f6f9fd; }
@media (min-width: 601px) and (max-width: 980px) { .lines-grid a:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.lines-grid b { display: block; font-size: var(--fs-h3); color: var(--accent); letter-spacing: -0.01em; }
.lines-grid a > span { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.4; }

.band { background: var(--band); color: #fff; position: relative; overflow: hidden; }
.band-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 100px); }
.band h2 { font-size: var(--fs-h1); }
.band p { margin-top: 16px; color: rgba(255,255,255,.82); font-size: var(--fs-lead); max-width: 44ch; }
.band .btn { margin-top: 28px; }
.band-link { display: inline-block; margin: 28px 0 0 20px; padding-block: 12px; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.band-link:hover { text-decoration-thickness: 2px; }
.band img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .band-in { grid-template-columns: 1fr; } }

/* ---------- research ---------- */
.family-block { max-width: 980px; }
.family-block + .family-block { margin-top: clamp(56px, 7vw, 96px); }
.family-head { font-size: var(--fs-h2); }
/* research index: one row per line, all alike; the whole row opens the line's page */
.line-index { list-style: none; padding: 0; margin: 28px 0 0; }
.line-row { position: relative; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding-block: 24px; border-top: 1px solid var(--line); }
.line-thumb { width: 100%; height: auto; background: var(--surface); border-radius: var(--radius); padding: 10px; transition: transform .2s ease; }
.line-row:hover .line-thumb { transform: translateY(-2px); }
.line-row h3 { font-size: var(--fs-h3); }
.line-row h3 a { color: var(--ink); text-decoration: none; }
.line-row h3 a::after { content: ""; position: absolute; inset: 0; }
.line-row:hover h3 a { color: var(--accent); }
.line-row h3 .sub { display: block; margin-top: 4px; font-size: var(--fs-body); font-weight: 500; color: var(--accent); }
.line-row .lead, .line-row .key { margin-top: 10px; color: var(--ink-2); max-width: 54ch; }
.line-row .key { text-wrap: balance; }
.line-row .key { margin-top: 6px; }
.line-row .key b { color: var(--ink); }
.line-row .paper-count { position: relative; z-index: 1; white-space: nowrap; margin-left: 4px; }
@media (max-width: 600px) { .line-row { grid-template-columns: 1fr; gap: 14px; } .line-thumb { max-width: 420px; } }
.family-lead { margin-top: 8px; font-size: var(--fs-lead); color: var(--muted); max-width: 60ch; }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li { font-size: var(--fs-small); font-weight: 500; padding: 4px 10px; border-radius: 4px; background: var(--surface); color: var(--ink-2); }
.papers { margin-top: 12px; font-size: var(--fs-small); font-weight: 500; }

/* ---------- technologies ---------- */
.rows { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 96px); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.row:nth-child(even) .row-img { order: 2; }
.row-img figure { margin: 0; }
.row-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.row-img figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--muted); }
.row h2 { font-size: var(--fs-h2); }
.row p { max-width: 54ch; margin-top: 16px; color: var(--ink-2); font-size: var(--fs-body); }
.row .specs { margin-top: 20px; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: var(--fs-small); }
.row .specs dt { color: var(--muted); }
.row .specs dd { text-wrap: pretty; margin: 0; color: var(--ink); font-weight: 500; }
@media (max-width: 860px) { .row { grid-template-columns: 1fr; } .row:nth-child(even) .row-img { order: 0; } }

/* ---------- collaborations ---------- */
.partners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.partner { background: var(--surface); padding: 26px; display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; }
.partner .logo { height: 64px; display: flex; align-items: center; justify-content: center; }
.partner .logo img { max-height: 64px; max-width: 170px; width: auto; height: auto; object-fit: contain; }
.partners-head { font-size: var(--fs-h3); margin: 40px 0 16px; }
.partners-head:first-of-type { margin-top: 8px; }
.partner h4 { font-size: var(--fs-lead); letter-spacing: -0.005em; }
.partner h4 span { font-weight: 400; color: var(--muted); font-size: var(--fs-small); }
.partner p { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.5; }
.partner:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 860px) { .partners { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .partner { grid-template-columns: 84px 1fr; gap: 16px; padding: 20px; } .partner .logo img { max-width: 84px; max-height: 48px; } }
/* funders: one wide EU card (emblem + funding statement, required for EU grants), then one card per other funder */
.funding { margin-top: clamp(56px, 7vw, 88px); }
.funders { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.funder { background: var(--surface); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.funder > img { height: 52px; width: auto; max-width: 100%; object-fit: contain; align-self: flex-start; }
.funder h3 { font-size: var(--fs-lead); letter-spacing: -0.005em; }
.funder .chips { margin-top: 0; }
.funder .chips li { background: var(--ground); border-color: transparent; border-radius: 10px; }
.funder.eu { grid-column: 1 / -1; display: grid; grid-template-columns: 300px 1fr; gap: 22px 40px; align-items: start; }
.eu-mark { display: flex; align-items: center; gap: 14px; }
.eu-mark img { height: 48px; width: auto; }
.eu-mark b { font-size: var(--fs-ui); line-height: 1.25; }
.eu-mark .erc { height: 56px; margin-left: 8px; }
.funder dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 14px 24px; align-items: baseline; }
.funder dt { font-weight: 600; }
.funder dd { margin: 0; }
.funder.infn dl { align-items: center; }
.funder dt img.csn { display: block; height: 46px; width: auto; border-radius: 4px; }
.partner .logo .wordmark { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); text-align: center; }
.fine { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--muted); max-width: 64ch; }
@media (max-width: 1000px) { .funders { grid-template-columns: repeat(2, 1fr); } .funder.eu { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .funders { grid-template-columns: 1fr; } .funder dl { grid-template-columns: 1fr; gap: 6px; } .funder dd { margin-bottom: 10px; } }

/* map of the partner labs: land is a cached image, the lab layer is inline SVG on top with the same viewBox */
.map-title { margin-bottom: 24px; }
.skip-map { position: absolute; left: -999px; }
.skip-map:focus { position: static; display: inline-block; margin-bottom: 16px; }
@media (max-width: 700px) { .skip-map { display: none; } }
.lab-pick { display: none; }
.lab-pick span { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.lab-pick select { width: 100%; font: inherit; font-size: var(--fs-ui); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.lab-pick select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.labmap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.labmap-figure { position: relative; background: #e3e9f1; border-radius: var(--radius); overflow: hidden; }
.labmap-figure > img { width: 100%; height: auto; }
.labmap-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-b { --c: var(--beam); } .c-x { --c: var(--accent); } .c-p { --c: var(--muted); } .c-c { --c: #2a9d6e; } .c-home { --c: var(--ink); }
.labmap-svg .arcs path { fill: none; stroke: var(--c); stroke-width: 1.3; opacity: .55; }
.labmap-svg text { font-family: var(--font); font-size: 14px; font-weight: 500; fill: var(--ink-2); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.labmap-svg .inset-label { font-size: 12px; font-weight: 400; fill: var(--muted); stroke: none; }
.labmap-svg circle { transform-box: fill-box; transform-origin: center; }
.home circle { fill: var(--ink); stroke: #fff; stroke-width: 2.5; }
.home text { font-weight: 700; fill: var(--ink); }
.lab { cursor: pointer; outline: none; }
.lab .hit { fill: transparent; }
.lab .dot { fill: var(--c); stroke: #fff; stroke-width: 2; transition: transform .2s ease; }
.lab .ring { fill: none; stroke: var(--c); stroke-width: 2; opacity: 0; transition: opacity .2s ease; }
.lab:hover .dot { transform: scale(1.3); }
.lab.on .ring, .lab:focus-visible .ring { opacity: 1; }
.lab:focus-visible .ring { stroke-width: 3; }
.lab.on text { fill: var(--ink); }
.lab-card { background: var(--surface); border-radius: var(--radius); padding: 24px; position: sticky; top: calc(var(--nav-h) + 24px); }
.lab-logo { height: 52px; width: auto; max-width: 170px; object-fit: contain; }
.lab-card h3 { margin-top: 16px; font-size: var(--fs-h3); }
.lab-city { color: var(--muted); font-weight: 400; font-size: var(--fs-ui); }
.lab-cat { margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.lab-text { margin-top: 12px; color: var(--ink-2); }
.lab-hint { margin-top: 18px; font-size: var(--fs-small); color: var(--muted); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 16px 0 48px; color: var(--muted); font-size: var(--fs-small); }
.map-legend li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; }
@media (max-width: 900px) { .labmap { grid-template-columns: 1fr; } .lab-card { position: static; } }
@media (max-width: 700px) {
  .labmap-svg text { display: none; }
  .lab-pick { display: block; }
  .lab .dot, .home circle { transform: scale(1.8); } .lab .ring { transform: scale(1.7); } .lab .hit { transform: scale(1.8); }
  .lab:hover .dot { transform: scale(1.8); }
}

/* ---------- publications ---------- */
.pub-tools { position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--ground); padding-block: 16px; border-bottom: 1px solid var(--line); }
.pub-tools .wrap { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.search { flex: 1 1 320px; position: relative; }
.search input { width: 100%; font: inherit; font-size: var(--fs-ui); padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.line-pick { flex: 0 1 auto; }
.year-pick { display: none; }
.line-pick select, .year-pick select { font: inherit; font-size: var(--fs-ui); max-width: 100%; padding: 12px 42px 12px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer;
  -webkit-appearance: none; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235b6676' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 8px; }
.year-pick select:focus, .line-pick select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.count { color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.years { display: flex; gap: 2px 16px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
@media (max-width: 1100px) { .years { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 32px; } }
.years a { font-size: var(--fs-ui); font-weight: 500; text-decoration: none; color: var(--ink-2); padding: 4px 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.years a:hover { color: var(--accent); text-decoration: underline; }
.years a[aria-current="true"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.year-block { display: grid; grid-template-columns: 140px 1fr; gap: 28px; padding-block: 36px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--tools-h, 140px) + 8px); }
.year-block:first-of-type { border-top: 0; }
.year-block h2 { font-size: var(--fs-h2); color: var(--accent); font-variant-numeric: tabular-nums; position: sticky; top: calc(var(--nav-h) + var(--tools-h, 140px) + 20px); align-self: start; }
.year-block h2 small { display: block; font-size: var(--fs-small); color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 6px; }
.pubs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.pubs li b { display: block; font-weight: 600; font-size: var(--fs-body); line-height: 1.4; color: var(--ink); }
.pubs li span { display: block; margin-top: 3px; font-size: var(--fs-small); color: var(--muted); }
.pubs li b a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(13,17,23,.28); text-underline-offset: 3px; }
.pubs li b a:hover { color: var(--accent); text-decoration-color: currentColor; }
.pubs strong, .paper strong { font-weight: 600; color: var(--ink-2); }
.pubs li i { font-style: italic; color: var(--ink-2); }
.pubs li .tags { margin-top: 4px; color: var(--ink-2); font-weight: 500; }
.pubs li .tags a { color: inherit; text-decoration-color: rgba(13,17,23,.28); text-underline-offset: 3px; }
.pubs li .tags a:hover { color: var(--accent); text-decoration-color: currentColor; }
.pub-tools:focus { outline: none; }
.to-tools { display: none; }
@media (max-width: 720px) {
  .to-tools:not([hidden]) { display: inline-flex; align-items: center; gap: .35em; position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px)); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: var(--fs-small); font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: 0 8px 24px rgba(13,17,23,.22); font-variant-numeric: tabular-nums; }
  .to-tools:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  html { scroll-padding-bottom: 84px; }
}
.empty { padding-block: 48px; color: var(--ink-2); }
.empty .btn { margin-top: 18px; }
@media (max-width: 720px) { .year-block { grid-template-columns: 1fr; gap: 12px; scroll-margin-top: calc(var(--tools-h, 70px) + 8px); } .year-block h2 { position: static; } .pub-tools { padding-block: 8px; } .pub-tools .years { display: none; } .search input { padding-block: 10px; } .pub-tools { position: static; padding-block: 12px; } .search { flex: 1 1 100%; } .line-pick { flex: 1 1 0; min-width: 0; } .year-pick { display: block; flex: 0 0 auto; } .line-pick select, .year-pick select { width: 100%; padding-block: 10px; } .pub-tools .wrap { gap: 8px 10px; } .year-block { scroll-margin-top: 12px; } }

/* ---------- theses ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { counter-increment: step; padding-top: 18px; border-top: 3px solid var(--beam); }
.steps li::before { content: counter(step); display: block; font-size: var(--fs-h2); font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.glossary { margin-top: 24px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; max-width: 900px; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .glossary { grid-template-columns: 1fr; gap: 2px; } .glossary dd + dt { margin-top: 12px; } }
.steps b { font-size: var(--fs-lead); }
.steps p { margin-top: 6px; color: var(--ink-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.group h2 { font-size: var(--fs-h3); }
.group h2 span { color: var(--ink); }
.topics { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; }
.topics li { padding-block: 14px; border-top: 1px solid var(--line); }
.topics b { display: block; font-weight: 600; line-height: 1.4; }
.topics .meta + .meta { margin-top: 2px; }
.topics .meta { margin-top: 4px; font-size: var(--fs-small); color: var(--muted); }
.topics .meta a { white-space: nowrap; padding-block: 8px; }
.topics .meta a:not(.who) { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.topics .meta a:not(.who):hover { color: var(--accent); }
.topics li { scroll-margin-top: calc(var(--nav-h) + 16px); }
.topics li:target { background: var(--ground); box-shadow: -12px 0 0 var(--ground), 12px 0 0 var(--ground); }
.who-row, .who-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.topics .who-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: start; }
.topics .who-row > span:first-child { line-height: 28px; padding-block: 8px; }
.who { display: inline-flex; align-items: center; gap: 7px; }
.who img, .who .ini { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.who .ini { display: inline-grid; place-items: center; background: var(--ground); color: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.glossary dt { scroll-margin-top: calc(var(--nav-h) + 16px); }
.glossary dt:target, .glossary dt:target + dd { color: var(--accent); }
.back-up { margin-top: 24px; font-size: var(--fs-small); }
.other-lines { margin-top: clamp(48px, 6vw, 72px); }
.other-lines > p { margin-top: 12px; color: var(--ink-2); max-width: 54ch; }
.other-lines ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 32px; }
.other-lines li { padding-block: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.other-lines li > a { font-weight: 600; }
.other-lines .sub { color: var(--muted); font-size: var(--fs-small); }
.other-lines .who-row { margin-top: 6px; font-size: var(--fs-small); }
@media (max-width: 860px) { .groups { grid-template-columns: 1fr; } }

/* ---------- team ---------- */
@media (max-width: 600px) { .layer .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } .person b { font-size: var(--fs-body); } .person .links { font-size: var(--fs-small); } }
.layer + .layer { margin-top: clamp(48px, 6vw, 80px); }
.layer h2 { font-size: var(--fs-h3); margin-bottom: 24px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 24px; }
.person { margin: 0; }
.person img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--line); filter: grayscale(1) contrast(1.04); transition: filter .4s ease; }
.person:hover img, .person:focus-within img { filter: none; }
.person figcaption { margin-top: 14px; }
.person .works { margin-top: 6px; color: var(--ink-2); }
.person b { display: block; font-size: var(--fs-lead); letter-spacing: -0.01em; }
.person span { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-small); }
.person .links { margin-top: 2px; font-size: var(--fs-small); color: var(--muted); overflow-wrap: break-word; }
.person .links a { padding-block: 10px; }
.person.you .ph { aspect-ratio: 4 / 5; border-radius: var(--radius); background: #e6eef8; color: var(--ink); display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; position: relative; overflow: hidden; }
.person.you .ph::before { content: ""; position: absolute; left: -10%; right: -10%; top: 46%; height: 3px; background: var(--beam); transform: rotate(-8deg); }
.person.you .ph b { font-size: var(--fs-h2); position: relative; }
.person.you a { font-weight: 600; }

/* ---------- footer ---------- */
.footer { background: var(--surface); color: var(--muted); border-top: 1px solid var(--line); }
.footer > .wrap { padding-block: clamp(32px, 4vw, 48px) clamp(28px, 3.5vw, 40px); }
/* the last section before the footer needs less air below it */
main > .section:last-child { padding-bottom: clamp(40px, 5vw, 64px); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-end; }
.foot-lead { color: var(--ink-2); font-size: var(--fs-lead); margin-bottom: 6px; }
.footer .mail { font-size: var(--fs-h3); font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.footer .mail:hover { color: var(--accent); }
.foot-logos { display: flex; gap: 28px; align-items: center; }
.foot-logos img { height: 56px; width: auto; }
/* address and policy links sit in a dark bar across the full width */
.foot-bar { background: var(--band); color: rgba(255,255,255,.72); }
.foot-bottom { padding-block: 18px max(18px, env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; align-items: center; font-size: var(--fs-small); }
.footer a { color: var(--ink-2); }
.foot-bar a { color: #fff; }

/* ---------- motion ---------- */
.rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .slide img { transform: none !important; }
}

/* ---------- equipment: index grouped by step, one data sheet per instrument ---------- */
.eq-groupbox { display: grid; gap: 18px; }
.eq-groupbox + .eq-groupbox { margin-top: 56px; }
.eq-group { font-size: var(--fs-h3); }
.eq-rows { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.eq-rows a { display: block; background: var(--surface); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: box-shadow .2s ease; }
.eq-rows a:hover { box-shadow: 0 10px 28px rgba(13, 17, 23, 0.08); }
.eq-rows a:hover .eq-model { text-decoration: underline; }
.eq-rows .eq-body { padding: 14px 18px 16px; }
/* every group on the same grid, three columns on wide screens; instruments without a photo stack in one cell */
@media (min-width: 1000px) { .eq-groupbox .eq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.eq-grid > .eq-rows { grid-template-columns: 1fr; align-content: start; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.eq-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.eq-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13, 17, 23, 0.08); }
.eq-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.eq-card img[src*="xrd-cabinets"], .eq-photo img[src*="xrd-cabinets"] { object-position: 85% 50%; }
/* instruments without a photo open with the same short beam mark as the page headers */
.eq-rows .eq-body::before { content: ""; width: 40px; height: 3px; border-radius: 2px; background: var(--beam); margin-bottom: 10px; }
.eq-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 22px; }
.eq-body b { font-size: var(--fs-lead); line-height: 1.3; }
.eq-model { color: var(--accent); font-weight: 500; }
.eq-sum { color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.eq-card:hover .eq-model { text-decoration: underline; }
.eq-note { margin-top: 48px; color: var(--ink-2); max-width: 54ch; }
.tech-more { font-weight: 600; font-size: var(--fs-body); }

.eq-sheet { padding-block: calc(var(--nav-h) + 48px) 56px; }
.eq-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.crumb { color: var(--muted); font-size: var(--fs-small); margin-bottom: 14px; }
.eq-intro h1 { font-size: var(--fs-h1); }
.eq-kind { margin-top: 8px; font-size: var(--fs-h3); font-weight: 600; color: var(--accent); }
.eq-lead { margin-top: 16px; font-size: var(--fs-lead); color: var(--ink-2); max-width: 44ch; }
.eq-intro .btn { margin-top: 28px; }
.eq-photo { margin: 0; }
.eq-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.eq-photo figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--muted); }
.eq-body-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 80px); align-items: start; }
.eq-body-grid h2 { font-size: var(--fs-h3); }
.eq-body-grid h2 + * { margin-top: 12px; }
.eq-body-grid > div > h2:not(:first-child) { margin-top: 40px; }
.eq-text { max-width: 54ch; color: var(--ink-2); font-size: var(--fs-body); }
.eq-text + .eq-text { margin-top: 14px; }
.eq-uses { list-style: none; padding: 0; display: grid; gap: 18px; max-width: 54ch; }
.eq-uses h3 { font-size: var(--fs-body); font-weight: 600; color: var(--ink); }
.eq-uses p { margin-top: 4px; color: var(--ink-2); }
.eq-more { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.eq-more img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.eq-side { background: var(--ground); border-radius: var(--radius); padding: 26px; }
/* wide screens: the side column of an instrument sheet travels with the text, which is always the longer column */
@media (min-width: 861px) and (min-height: 840px) { .eq-body-grid .eq-side { position: sticky; top: calc(var(--nav-h) + 24px); } }
.eq-side h2:not(:first-child) { margin-top: 28px; }
.eq-specs-top { background: var(--surface); border-radius: var(--radius); padding: 26px; }
.eq-specs-top h2 { font-size: var(--fs-h3); }
.eq-specs-top .specs { margin-top: 12px; }
.eq-top.solo { grid-template-columns: minmax(0, 1fr); }
.eq-req { margin-top: 14px; font-size: var(--fs-small); }
.eq-side .specs, .eq-specs-top .specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.eq-side .specs dt, .eq-specs-top .specs dt { color: var(--muted); }
.eq-side .specs dd, .eq-specs-top .specs dd { margin: 0; font-weight: 500; }
.eq-lines a { display: block; padding: 6px 0; }
.eq-pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 32px 56px; font-weight: 500; }
@media (max-width: 860px) { .eq-top, .eq-body-grid { grid-template-columns: 1fr; } .eq-photo { order: -1; } .eq-body-grid .eq-side { order: -1; } }
@media (max-width: 600px) { .eq-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; } .eq-pager a:last-child { text-align: right; } .eq-pager a:nth-child(2) { grid-column: 1 / -1; grid-row: 2; text-align: center; } }

/* ---------- research-line pages ---------- */
.line-sheet .eq-lead { max-width: 54ch; }
/* the physics: heading, diagram, text on phones; text beside a diagram that stays in view on wide screens */
.phys { display: grid; gap: 24px; }
.phys .line-fig { max-width: 720px; }
@media (min-width: 68.75em) {
  .phys { grid-template-columns: minmax(0, 54ch) minmax(0, 1fr); column-gap: clamp(40px, 5vw, 72px); align-items: start; }
  .phys > .h2 { grid-column: 1; grid-row: 1; }
  .phys .phys-text { grid-column: 1; grid-row: 2; }
  .phys .line-fig { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--nav-h) + 24px); max-width: none; }
}
.phys-text p { max-width: 54ch; color: var(--ink-2); font-size: var(--fs-body); }
.phys-text p + p { margin-top: 14px; }
.phys-text b { color: var(--ink); }
.formula { text-align: center; font-size: var(--fs-lead); color: var(--ink) !important; background: var(--ground); border-radius: var(--radius); padding: 14px 18px; font-variant-numeric: tabular-nums; }
.line-fig { margin: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 18px 14px; }
.line-fig figcaption { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
.fig { display: block; width: 100%; height: auto; font-family: var(--font); }
.fig .plane { fill: none; stroke: #8e9aab; stroke-width: 1.3; }
.fig .body { fill: var(--ground); stroke: var(--line); }
.fig .xtal-fill { fill: #dce8f6; stroke: var(--accent); }
.fig .ray, .fig .ray2, .fig .photon { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .ray { stroke: var(--accent); }
.fig .ray2 { stroke: var(--beam); }
.fig .photon { stroke: #6b7686; stroke-width: 1.6; }
.fig .ref { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.fig .dim { stroke: var(--muted); stroke-width: 1; }
.fig .tip { fill: var(--accent); }
.fig .tip2 { fill: var(--beam); }
.fig .block { fill: var(--ground); stroke: #aab4c2; }
.fig .block.xtal { fill: #e6eef8; }
.fig .atom { fill: #7d899a; }
.fig .tile { fill: var(--accent); }
.fig .det, .fig .sample { fill: var(--ink-2); }
.fig .lbl { fill: var(--ink-2); font-size: 16px; }
.fig .note { fill: var(--muted); font-size: 14px; }
.fig .strong { fill: var(--ink); font-weight: 600; }
.fig .blue { fill: var(--accent); font-weight: 600; }
.fig .orange { fill: #b45f0c; font-weight: 600; }
.fig .sub { font-size: 12px; }
.fig .axis { stroke: var(--ink-2); stroke-width: 1.4; }
.fig .curve { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.fig .kid { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.fig .pol { fill: none; stroke: var(--accent); stroke-width: 2; }
.fig .xtal-line { fill: none; stroke: #9ec3ea; stroke-width: 9; }
.fig .area { stroke: none; opacity: .14; }
.fig .ray-area { fill: var(--accent); }
.fig .ray2-area { fill: var(--beam); }
/* phones: the diagrams run edge to edge and shrink to about two thirds, so their words grow */
.fig text { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
@media (forced-colors: active) { .fig text { stroke: none; fill: CanvasText; } }
@media (max-width: 600px) { .line-fig { margin-inline: calc(-1 * var(--gutter)) calc(-1 * var(--gutter-r)); border-radius: 0; border-inline: 0; padding: 12px 8px 10px; } .line-fig figcaption { padding-inline: 12px; }
.fig .lbl { font-size: 20px; } .fig .note { font-size: 18px; } .fig .sub { font-size: 15px; } @media (max-width: 360px) { .line-fig { padding-inline: 2px; } .fig .lbl { font-size: 20.5px; } .fig .note { font-size: 19.5px; } } }
.results { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.result { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.result b { display: block; font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.01em; color: var(--accent); }
.results.long b { font-size: var(--fs-h3); line-height: 1.2; }
.result p { margin-top: 10px; color: var(--ink-2); }
.result .src { font-size: var(--fs-small); }
.line-more { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.line-more .read { margin-top: 22px; }
.line-more .papers { margin-top: 24px; }
.line-more .papers a { display: inline-block; padding-block: 10px; }
.line-more .eq-side h2 { font-size: var(--fs-h3); }
.proj-list { color: var(--ink-2); }
.side-list { list-style: none; padding: 0; }
.side-list li + li { margin-top: 8px; }
.papers .sep { color: var(--muted); }
@media (max-width: 960px) { .line-more { grid-template-columns: 1fr; } }
.line-more.solo { grid-template-columns: minmax(0, 1fr); }
.line-more.solo > div:first-child { display: none; }
.line-more.solo .eq-side { max-width: 760px; }
.line-summary { max-width: 54ch; margin-top: 18px; color: var(--ink-2); font-size: var(--fs-body); }
/* the language link at the end of the menu: set apart from the pages */
