/* BMI design system: tokens, reset, layout, components, motion.
   Source of truth: /DESIGN.md. Colours derive from the logo: steel #658697, slate #8B9298.
   Fonts are self-hosted (OFL, see /assets/fonts/LICENSES/); cyrillic subsets load only when used. */

/* ==========================================================================
   0. Fonts
   ========================================================================== */
/* IBM Plex Serif 500 latin (15 KB) */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-serif-500-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; }
/* IBM Plex Serif 500 latin-ext (10 KB) */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-serif-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IBM Plex Serif 500 cyrillic (8 KB) */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-serif-500-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* IBM Plex Serif 500 cyrillic-ext (5 KB) */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-serif-500-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* IBM Plex Sans 400 600 latin (39 KB) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/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; }
/* IBM Plex Sans 400 600 latin-ext (25 KB) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IBM Plex Sans 400 600 cyrillic (24 KB) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* IBM Plex Sans 400 600 cyrillic-ext (19 KB) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* IBM Plex Sans Italic 400 latin (18 KB) */
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-italic-400-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; }
/* IBM Plex Sans Italic 400 latin-ext (11 KB) */
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-italic-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IBM Plex Mono 400 latin (9 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400-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; }
/* IBM Plex Mono 400 latin-ext (8 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IBM Plex Mono 400 cyrillic (5 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* IBM Plex Mono 400 cyrillic-ext (4 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* IBM Plex Mono 500 latin (9 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500-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; }
/* IBM Plex Mono 500 latin-ext (8 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IBM Plex Mono 500 cyrillic (5 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* IBM Plex Mono 500 cyrillic-ext (4 KB) */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* Symbols outside the Google subsets: → ↗ ≈ (under 3 KB each, fetched only when used). None of the
   three families has U+207B (superscript minus): write units as cm<sup>−1</sup>. */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-serif-500-symbols.woff2") format("woff2"); unicode-range: U+2192, U+2197, U+2248; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-symbols.woff2") format("woff2"); unicode-range: U+2192, U+2197, U+2248; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-italic-400-symbols.woff2") format("woff2"); unicode-range: U+2192, U+2197, U+2248; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400-symbols.woff2") format("woff2"); unicode-range: U+2192, U+2197, U+2248; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500-symbols.woff2") format("woff2"); unicode-range: U+2192, U+2197, U+2248; }

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  color-scheme: light;

  /* Steel ramp: OKLCH hue 230.8 (the logo's steel); 500 is the logo colour */
  --steel-25: #f6fbfd;
  --steel-50: #eef6fa;
  --steel-100: #dfecf2;
  --steel-200: #c7d9e3;
  --steel-300: #a7bfcc;
  --steel-400: #84a0af;
  --steel-500: #658697;
  --steel-600: #4e6e7e;
  --steel-700: #3b5968;
  --steel-800: #2a4450;
  --steel-900: #1b2e38;
  --steel-950: #101d23;

  /* Slate ramp: OKLCH hue 243.7 (the logo's letterforms); 400 is the logo colour */
  --slate-50: #f5f7f9;
  --slate-100: #e8ecee;
  --slate-200: #d3d8dc;
  --slate-300: #b2b8bd;
  --slate-400: #8b9298;
  --slate-500: #6e757c;
  --slate-600: #575f65;
  --slate-700: #41494f;
  --slate-800: #2d3439;
  --slate-900: #1b2025;

  /* Cool neutrals, chroma <= .016 on the steel hue */
  --n-0: #ffffff;
  --n-25: #f6fafb;
  --n-50: #f1f5f8;
  --n-100: #e5ecf0;
  --n-200: #d4dde2;
  --n-300: #bac6cd;

  /* Roles (contrast on #fff) */
  --color-bg: var(--n-0);
  --color-surface: var(--n-0);
  --color-surface-sunken: var(--n-50);
  --color-surface-hover: var(--n-25);
  --color-surface-raised: var(--n-0);
  --color-surface-tint: var(--steel-50);
  --color-text: #152229;                   /* 16.2:1 */
  --color-text-muted: #55636a;             /* 6.2:1; 5.7:1 on --n-50 */
  --color-text-subtle: #647178;            /* 5.0:1; >= 4.5:1 on --n-50 and --steel-50 */
  --color-border: var(--n-200);
  --color-border-strong: var(--n-300);
  --color-accent: var(--steel-700);        /* 7.5:1: links, accent text */
  --color-accent-hover: var(--steel-800);  /* 10.3:1 */
  --color-accent-brand: var(--steel-500);  /* 3.9:1: indicators, rules, display >= 24px only */
  --color-on-accent: #ffffff;              /* 7.5:1 on --steel-700 */
  --color-focus: #247293;                  /* 5.4:1 */

  /* Inverse (ink) band */
  --color-inverse-bg: #122027;
  --color-inverse-raised: #1d2e37;
  --color-inverse-text: #f1f5f8;           /* 15.2:1 on ink */
  --color-inverse-muted: #b1c0c8;          /* 8.9:1 on ink */
  --color-inverse-border: #324650;
  --color-inverse-border-strong: #455c67;
  --color-inverse-hover: #243741;          /* row/button hover on ink */
  --color-inverse-sunken: #0d181e;
  --color-inverse-accent: var(--steel-300);
  --color-inverse-accent-hover: #ffffff;
  --color-inverse-focus: #95cde9;          /* 9.7:1 on ink */

  /* Type families */
  --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Proportion: the golden ratio. The emblem's C60 molecule is built on φ; sizes, spaces, splits and
     durations are drawn from it (DESIGN.md §2.6). */
  --phi: 1.618;

  /* Fluid type scale on √φ, 360px -> 1440px viewport. At 1440 step n is 17px × √φ^n, so every two steps
     differ by φ; at 360 the steps sit on 16px × ⁴√φ^k, nearest to a phone's tighter hierarchy. */
  --step--2: clamp(0.75rem, 0.73rem + 0.08vw, 0.8125rem);        /* 12 -> 13     labels, captions, data (UI floor) */
  --step--1: clamp(0.8125rem, 0.8049rem + 0.0338vw, 0.8353rem);  /* 13 -> 13.4   secondary text, tables */
  --step-0: clamp(1rem, 0.96rem + 0.19vw, 1.0625rem);            /* 16 -> 17     body */
  --step-1: clamp(1.1278rem, 1.0533rem + 0.3314vw, 1.3515rem);   /* 18 -> 21.6   lede, h3 */
  --step-2: clamp(1.4346rem, 1.3398rem + 0.4215vw, 1.7192rem);   /* 23 -> 27.5   large h3, facts */
  --step-3: clamp(1.618rem, 1.4284rem + 0.8426vw, 2.1868rem);    /* 25.9 -> 35   h2 */
  --step-4: clamp(2.0582rem, 1.817rem + 1.0718vw, 2.7817rem);    /* 32.9 -> 44.5 page h1 */
  --step-5: clamp(2.3213rem, 1.9156rem + 1.803vw, 3.5383rem);    /* 37.1 -> 56.6 home h1 */

  --lh-tight: 1.04;
  --lh-heading: 1.14;
  --lh-snug: 1.3;
  --lh-body: var(--phi);
  --lh-ui: 1.25;

  --track-display: -0.018em;
  --track-heading: -0.01em;
  --track-label: 0.08em;
  --track-mono: 0.01em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Spacing on the Fibonacci numbers (px): neighbours differ by about φ */
  --space-1: 0.1875rem;   /* 3 */
  --space-2: 0.3125rem;   /* 5 */
  --space-3: 0.5rem;      /* 8 */
  --space-4: 0.8125rem;   /* 13 */
  --space-5: 1.3125rem;   /* 21 */
  --space-6: 2.125rem;    /* 34 */
  --space-7: 3.4375rem;   /* 55 */
  --space-8: 5.5625rem;   /* 89 */
  --space-9: 9rem;        /* 144 */
  --space-section: clamp(3.4375rem, 1.9205rem + 6.7424vw, 9rem);   /* 55 -> 144: 55 at 360, 128 at 1440, 144 at 1680 */
  --space-block: clamp(2.125rem, 1.6875rem + 1.9444vw, 3.4375rem);   /* 34 -> 55 */

  /* Radii (Fibonacci) */
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* Elevation, shadow colour = steel-950 */
  --shadow-1: 0 1px 2px rgb(16 29 35 / 0.06);
  --shadow-2: 0 1px 2px rgb(16 29 35 / 0.05), 0 6px 16px -6px rgb(16 29 35 / 0.12);
  --shadow-3: 0 2px 6px rgb(16 29 35 / 0.06), 0 18px 40px -12px rgb(16 29 35 / 0.22);

  /* Stacking */
  --z-raised: 10;
  --z-sticky: 100;
  --z-header: 200;
  --z-dropdown: 300;
  --z-skip: 1000;

  /* Layout */
  --page-max: 80rem;
  --gutter: clamp(1rem, 0.5rem + 2.2vw, 2.5rem);
  --grid-gap: clamp(1rem, 0.55rem + 1.5vw, 2rem);
  --measure: 56ch;
  --header-h: 4rem;
  --header-h-condensed: 3.5rem;    /* the scrolled header's visible bar; its in-flow height stays --header-h */
  /* Golden splits: minor | major (38.2 | 61.8) and the reverse, with a gap of 34 / 55 / 89px at 768 / 1024 / 1440 */
  --golden: minmax(0, 1fr) minmax(0, 1.618fr);
  --golden-flip: minmax(0, 1.618fr) minmax(0, 1fr);
  --golden-gap: clamp(2.125rem, 8.1845vw - 1.8036rem, 5.5625rem);

  /* Motion: each duration is √φ × the one below it (dur-1 -> dur-2 is φ) */
  --dur-1: 135ms;   /* colour, background, underline */
  --dur-2: 218ms;   /* dropdown, arrows, chevrons */
  --dur-3: 277ms;   /* page-in, thumbs, dialog */
  --dur-4: 352ms;   /* drawer, bottom sheet */
  --dur-5: 449ms;   /* scroll reveal, axis draw */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --stagger: 60ms;

  --shadow-edge: 0 8px 24px -10px rgb(16 29 35 / 0.3);   /* scrolled header hairline */

  /* Frosted glass: the condensed header */
  --glass: rgb(255 255 255 / 0.88);          /* keeps --color-text-muted >= 4.5:1 even over ink */
  --glass-filter: blur(14px) saturate(1.5);  /* backdrop-filter */

  /* Steel-950 at fixed alpha: rings, inner shades, scroll shadows */
  --ink-a10: rgb(16 29 35 / 0.1);
  --ink-a16: rgb(16 29 35 / 0.16);
  --ink-a28: rgb(16 29 35 / 0.28);

  /* Backdrop tint for modal surfaces */
  --backdrop: rgb(16 29 35 / 0.42);
}
@media (min-width: 64rem) {
  :root { --header-h: 4.5rem; }
}

/* ==========================================================================
   2. Reset and base. The window is the scroll container: html and body never become one
   (no height, no overflow auto/scroll/hidden at rest). body's overflow-x: clip and the modal
   scroll lock on html below do not create a scroll container.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-5));
  interpolate-size: allow-keywords;
  background: var(--color-bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.is-locked, html:has(dialog[open]) { overflow: hidden; }
img, svg, video, iframe, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--weight-medium); line-height: var(--lh-heading); text-wrap: balance; overflow-wrap: break-word; color: var(--color-text); }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: var(--track-mono); overflow-wrap: break-word; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
p, li, dd, figcaption { text-wrap: pretty; }
b, strong { font-weight: var(--weight-semibold); }
sub, sup { position: relative; font-size: 0.72em; line-height: 0; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
small { font-size: var(--step--1); }
abbr[title] { text-decoration: none; cursor: help; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--color-accent); text-underline-offset: 0.2em; }
address { font-style: normal; }
table { border-collapse: collapse; }
hr { height: 1px; margin: var(--space-block) 0; border: 0; background: var(--color-border); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-xs); }
::selection { background: var(--steel-200); color: var(--color-text); }
[hidden] { display: none !important; }

/* Cyrillic emphasis is upright medium: Plex Sans Italic has no Serbian locl, so its italic д/п
   would take the Russian cursive forms. Cyrillic headings stay in the display serif. */
[lang="sr-Cyrl"] :is(i, em, .italic, cite) { font-style: normal; font-weight: var(--weight-medium); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* The icon sprite stamped with the header: present in the DOM, never rendered. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: fixed; left: var(--space-4); top: var(--space-4); z-index: var(--z-skip);
  padding: var(--space-4) var(--space-5); background: var(--steel-800); color: var(--color-on-accent);
  font: var(--weight-medium) var(--step--1)/1 var(--font-text); border-radius: var(--radius-sm);
  text-decoration: none; transform: translateY(-160%); transition: transform var(--dur-2) var(--ease-out-quint);
}
.skip-link:focus { transform: none; }

/* Inline SVG icons from the sprite in the header partial */
.i-arrow, .i-ext, .i-chev { flex: none; width: 1em; height: 1em; }
.i-ext { width: 0.75em; height: 0.75em; }

/* ==========================================================================
   3. Layout: container, grid, sections, page head, rail, pager
   ========================================================================== */
.wrap { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 48rem); margin-inline: auto; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); }
.grid-12 > * { grid-column: 1 / -1; }

.section { padding-block: var(--space-section); }
.section + .section:not(.band) { padding-top: 0; }
.section--tight { padding-block: var(--space-block); }
/* Section detail pages: the content section right after the page-head wrap starts one --space-block
   under the head (the head's own bottom padding), as on pages whose content shares the head's wrap. */
main > .wrap:first-child + .section--tight { padding-top: 0; }
.band { padding-block: var(--space-section); }
.band--sunken { background: var(--color-surface-sunken); }
.band--ink {
  --color-text: var(--color-inverse-text); --color-text-muted: var(--color-inverse-muted); --color-text-subtle: var(--color-inverse-muted);
  --color-border: var(--color-inverse-border); --color-border-strong: var(--color-inverse-border-strong);
  --color-accent: var(--color-inverse-accent); --color-accent-hover: var(--color-inverse-accent-hover); --color-accent-brand: var(--steel-300);
  --color-focus: var(--color-inverse-focus);
  --color-surface: var(--color-inverse-raised); --color-surface-hover: var(--color-inverse-hover); --color-surface-sunken: var(--color-inverse-sunken);
  background: var(--color-inverse-bg); color: var(--color-text);
}
.band--ink ::selection { background: var(--steel-700); color: var(--color-on-accent); }
main > :last-child:not(.band) { padding-bottom: var(--space-section); }
.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-block); }

/* Section heading */
.section-head { display: grid; gap: var(--space-4); margin-bottom: var(--space-block); max-width: 44rem; }
.section-head .lede, .section-head > p { color: var(--color-text-muted); font-size: var(--step-0); max-width: var(--measure); }
.section-head--split { max-width: none; }
@media (min-width: 64rem) {
  .section-head--split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--grid-gap); }
  .section-head--split > .eyebrow { grid-column: 1 / -1; }
}

/* Split: a lead-in or h2 (`.split-head`) beside its content. Stacked below 64rem, spaced like `.stack`
   (`--space-block` with `.split--section`); from 64rem a golden split: the head takes the minor column,
   sticky under the header, and the content the major one, top-aligned. */
.split > * + * { margin-top: var(--space-4); }
.split--section > * + * { margin-top: var(--space-block); }
@media (min-width: 64rem) {
  .split { display: grid; grid-template-columns: var(--golden); column-gap: var(--golden-gap); align-items: start; }
  .split > .split-head { grid-column: 1; position: sticky; top: calc(var(--header-h) + var(--space-6)); }
  .split > * + * { grid-column: 2; margin-top: 0; }
}

/* Page head: breadcrumb, sub-nav (section detail pages), eyebrow, h1, lede, optional facts */
.page-head { padding-block: var(--space-6) var(--space-block); }
.page-head .eyebrow { margin-top: var(--space-6); }
.page-head .breadcrumb + .h-page, .page-head .breadcrumb + h1 { margin-top: var(--space-6); }
/* The sub-nav sits right under the one-line breadcrumb, above the title, so it keeps the same y on
   every sibling page whatever the title, lede or facts below it. */
.page-head .breadcrumb + .subnav { margin-top: var(--space-4); }
.page-head .subnav + :is(.eyebrow, .h-page, h1) { margin-top: var(--space-7); }
.page-head .eyebrow + .h-page, .page-head .eyebrow + h1 { margin-top: var(--space-4); }
.page-head .h-page { max-width: 25.5ch; }
.page-head .lede { margin-top: var(--space-5); color: var(--color-text-muted); max-width: 60ch; }
.page-head > .facts { margin-top: var(--space-7); }
.page-head > .note { margin-top: var(--space-6); }
.page-head--flush { padding-bottom: var(--space-5); }
/* Long intro beside the h1: stacked below 64rem; from 64rem a golden split, the h1 in the minor column
   and the intro in the major one, top-aligned. The page's first section follows directly (no page-head
   bottom padding). */
.page-head--split { padding-bottom: 0; }
.page-head--split > * + * { margin-top: var(--space-block); }
@media (min-width: 64rem) {
  .page-head--split { display: grid; grid-template-columns: var(--golden); column-gap: var(--golden-gap); align-items: start; }
  .page-head--split > .h-page { grid-column: 1; }
  .page-head--split > * + * { grid-column: 2; margin-top: 0; }
}

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0; list-style: none; margin: 0; padding: 0; font: var(--weight-regular) var(--step--1)/1.5 var(--font-text); color: var(--color-text-muted); }
.breadcrumb li { display: inline-flex; align-items: center; }
/* The separator trails its item, so a wrapped trail never starts a line with a chevron. */
.breadcrumb li:not(:last-child)::after { content: ""; width: 0.375rem; height: 0.375rem; margin: 0 0.7rem 0 0.55rem; border-top: 1.5px solid var(--slate-300); border-right: 1.5px solid var(--slate-300); transform: rotate(45deg); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; border-radius: var(--radius-xs); transition: color var(--dur-1) var(--ease-out); }
.breadcrumb a:hover { color: var(--color-accent); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--color-text); }
/* Above a sub-nav the trail stays on one line (the current item ends in an ellipsis when it does not
   fit; the same name is the current tab right below), so the tabs never move down a line. */
.breadcrumb:has(+ .subnav) ol { flex-wrap: nowrap; }
.breadcrumb:has(+ .subnav) li:last-child { min-width: 0; }
.breadcrumb:has(+ .subnav) li:last-child > [aria-current] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Rail layout: "Na ovoj stranici" anchor list beside long content, >= 80rem only; content : rail = φ³ : 1 */
.with-rail { display: block; }
.rail { display: none; }
@media (min-width: 80rem) {
  .with-rail { display: grid; grid-template-columns: minmax(0, 4.236fr) minmax(0, 1fr); column-gap: var(--space-7); align-items: start; }
  .with-rail > .rail-main { grid-column: 1; grid-row: 1; min-width: 0; }
  .with-rail > .rail { display: block; grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + var(--space-6)); }
}
.rail-title { display: block; padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); }
.rail ol, .rail ul { list-style: none; display: grid; margin: var(--space-4) 0 0; padding: 0; border-left: 1px solid var(--color-border); }
.rail a {
  display: block; padding: 0.4rem 0 0.4rem var(--space-4); margin-left: -1px; border-left: 2px solid transparent;
  font: var(--weight-regular) var(--step--1)/1.4 var(--font-text); color: var(--color-text-muted); text-decoration: none;
  transition: color var(--dur-1) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.rail a:hover { color: var(--color-text); border-left-color: var(--steel-300); }
.rail a[aria-current] { color: var(--color-text); font-weight: var(--weight-medium); border-left-color: var(--color-accent-brand); }

/* Pager: previous / next page within the section */
.pager { display: grid; gap: var(--space-4); margin-top: var(--space-section); }
@media (min-width: 48rem) { .pager { grid-template-columns: 1fr 1fr; gap: var(--grid-gap); } }
.pager a {
  display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  color: var(--color-text); text-decoration: none; background: var(--color-surface);
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out-quint);
}
.pager a:hover { border-color: var(--steel-300); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.pager .pager-label { font: var(--weight-medium) var(--step--2)/1.3 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); }
.pager .pager-title { display: flex; align-items: center; gap: var(--space-4); font: var(--weight-medium) var(--step-1)/1.25 var(--font-display); letter-spacing: -0.01em; }
.pager .pager-next { text-align: right; }
.pager .pager-next .pager-title { justify-content: flex-end; }
.pager .i-arrow { width: 0.8em; height: 0.8em; color: var(--color-accent-brand); transition: transform var(--dur-2) var(--ease-out-quint); }
.pager .pager-prev .i-arrow { transform: scaleX(-1); }
.pager .pager-prev:hover .i-arrow { transform: scaleX(-1) translateX(4px); }
.pager .pager-next:hover .i-arrow { transform: translateX(4px); }
@media (min-width: 48rem) { .pager .pager-next:only-child { grid-column: 2; } }

/* ==========================================================================
   4. Type roles
   ========================================================================== */
.eyebrow {
  display: block; font: var(--weight-medium) var(--step--2)/1.3 var(--font-text);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-accent);
}
.eyebrow--muted { color: var(--color-text-muted); }
.h-display { font-size: var(--step-5); line-height: var(--lh-tight); letter-spacing: var(--track-display); overflow-wrap: break-word; }
.h-page { font-size: var(--step-4); line-height: 1.06; letter-spacing: var(--track-display); overflow-wrap: break-word; }
.h-section { font-size: var(--step-3); line-height: var(--lh-heading); letter-spacing: var(--track-heading); overflow-wrap: break-word; }
.h-sub { font-size: var(--step-1); line-height: var(--lh-snug); letter-spacing: -0.008em; }
.h-minor { font: var(--weight-semibold) var(--step-0)/1.35 var(--font-text); letter-spacing: 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--color-text); max-width: 46ch; }
.muted { color: var(--color-text-muted); }
.small { font-size: var(--step--1); }
.data { font-family: var(--font-mono); letter-spacing: var(--track-mono); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.caption { font: var(--weight-regular) var(--step--1)/1.5 var(--font-text); color: var(--color-text-muted); }
.caption b, .caption strong { font-weight: var(--weight-medium); color: var(--color-text); }
.nowrap { white-space: nowrap; }

/* Prose: bios, lab text, articles. Never justified. */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose > :is(h2, h3) { margin-top: 2em; }
.prose > :is(h2, h3) + * { margin-top: 0.75em; }
.prose h2 { font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.012em; }
.prose h3 { font-size: var(--step-1); line-height: var(--lh-snug); }
.prose h4 { font: var(--weight-semibold) var(--step-0)/1.35 var(--font-text); }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.4em; }
.prose ul:not([class]) > li::marker { color: var(--color-accent-brand); }
.prose ol:not([class]) > li::marker { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 0.9em; }
.prose li + li { margin-top: 0.5em; }
.prose li > ul, .prose li > ol { margin-top: 0.5em; }
.prose a, .link {
  color: var(--color-accent); text-decoration-line: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.2em; text-decoration-color: var(--steel-300);
  transition: text-decoration-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  overflow-wrap: anywhere;
}
.prose a:hover, .link:hover { color: var(--color-accent-hover); text-decoration-color: currentColor; }
/* External link in running text: the #i-ext glyph is painted in the link's end padding (the svg in the
   markup is hidden), so it always stays on the line of the last character; an inline svg would give the
   line breaker a break point before it and could wrap onto a line of its own. Colour = --color-text-muted. */
:is(.prose a, .link):has(> .i-ext) {
  padding-right: 1em; overflow-wrap: break-word;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2.5h5.5V8M9.25 2.75 2.5 9.5' fill='none' stroke='%2355636a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 55% / 0.75em 0.75em no-repeat;
}
:is(.prose a, .link) > .i-ext { display: none; }
.prose blockquote { padding-left: var(--space-5); border-left: 2px solid var(--color-accent-brand); font-size: var(--step-1); line-height: 1.5; }
.prose > .lede, .prose--lead > p:first-child { font-size: var(--step-1); line-height: 1.5; color: var(--color-text); max-width: none; }
.prose .figure { margin-block: var(--space-6); }

/* Statement list with rounded-square steel markers */
.points { list-style: none; padding: 0; border-bottom: 1px solid var(--color-border); max-width: var(--measure); }
.points li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); padding-block: var(--space-4); border-top: 1px solid var(--color-border); color: var(--color-text); }
.points li::before { content: ""; width: 7px; height: 7px; margin-top: 0.62em; border-radius: 1.5px; background: var(--color-accent-brand); }

/* Checklist */
.checks { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.checks > li { display: grid; grid-template-columns: 1.625rem minmax(0, 1fr); }
.checks > li::before {
  content: ""; width: 0.875rem; height: 0.875rem; margin-top: 0.36em; background: var(--color-accent-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5 5.5 10.5 11.5 3.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5 5.5 10.5 11.5 3.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Structured lists: numbered and alphabetic outlines (research areas) */
.outline { list-style: none; padding: 0; display: grid; gap: var(--space-4); counter-reset: outline; max-width: var(--measure); }
.outline > li { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); counter-increment: outline; }
.outline > li::before { content: counter(outline) "."; font: var(--weight-medium) var(--step--1)/1.9 var(--font-mono); color: var(--color-accent); }
.outline--alpha > li::before { content: counter(outline, upper-alpha) "."; }
.outline > li > * { grid-column: 2; }
.outline > li > :first-child { grid-row: 1; }
.outline .outline-title { font-weight: var(--weight-medium); }
.outline .checks { margin-top: var(--space-4); }
.outline--rule > li { padding-top: var(--space-4); border-top: 1px solid var(--color-border); }

/* ==========================================================================
   5. Buttons and links
   ========================================================================== */
.btn {
  --btn-bg: var(--steel-700); --btn-fg: var(--color-on-accent); --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem; min-height: 2.875rem; padding: 0 1.25rem;
  font: var(--weight-medium) 0.9375rem/1.2 var(--font-text); color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-sm); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.btn:hover { --btn-bg: var(--steel-800); }
.btn:active { --btn-bg: var(--steel-900); }
.btn--secondary { --btn-bg: var(--color-surface); --btn-fg: var(--color-text); --btn-bd: var(--color-border-strong); }
.btn--secondary:hover { --btn-bg: var(--color-surface-hover); --btn-bd: var(--steel-400); }
.btn--secondary:active { --btn-bg: var(--n-50); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--color-accent); --btn-bd: transparent; padding-inline: var(--space-4); }
.btn--ghost:hover { --btn-bg: var(--color-surface-tint); }
.btn--sm { min-height: 2.25rem; padding: 0 0.875rem; font-size: 0.875rem; }
.band--ink .btn { --btn-bg: var(--steel-200); --btn-fg: var(--steel-950); }
.band--ink .btn:hover { --btn-bg: var(--color-inverse-accent-hover); }
.band--ink .btn--secondary { --btn-bg: transparent; --btn-fg: var(--color-text); --btn-bd: var(--color-border-strong); }
.band--ink .btn--secondary:hover { --btn-bg: var(--color-surface); --btn-bd: var(--steel-300); }
.btn .i-arrow, .btn .i-ext { transition: transform var(--dur-2) var(--ease-out-quint); }
.btn:hover .i-arrow, .link-arrow:hover .i-arrow { transform: translateX(3px); }
.btn:hover .i-ext, .link-arrow:hover .i-ext { transform: translate(2px, -2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Inline, so a label that wraps keeps the arrow right beside its last (or, for --back, first) word.
   A word joiner between label and svg removes the break opportunity an inline-block svg would add. */
.link-arrow {
  font: var(--weight-medium) 0.9375rem/1.3 var(--font-text);
  color: var(--color-accent); text-decoration: none; border-radius: var(--radius-xs);
}
.link-arrow > svg { display: inline-block; vertical-align: -0.125em; }
.link-arrow > span + svg { margin-inline-start: 0.5rem; }
.link-arrow > svg:first-child { margin-inline-end: 0.5rem; }
.link-arrow > span:not(:last-child)::after, .link-arrow > svg + span::before { content: "\2060"; }
.link-arrow > span { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; transition: text-decoration-color var(--dur-1) var(--ease-out); }
.link-arrow:hover > span { text-decoration-color: currentColor; }
.link-arrow .i-arrow, .link-arrow .i-ext { transition: transform var(--dur-2) var(--ease-out-quint); }
.link-arrow--back .i-arrow { transform: scaleX(-1); }
.link-arrow--back:hover .i-arrow { transform: scaleX(-1) translateX(3px); }

.tag {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 1.5rem; padding: 0 0.5rem;
  font: var(--weight-medium) var(--step--2)/1 var(--font-text); letter-spacing: 0.02em; color: var(--color-accent);
  background: var(--color-surface-tint); border: 1px solid var(--steel-200); border-radius: var(--radius-sm);
}

/* ==========================================================================
   6. Header, primary navigation, dropdowns, language switch
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header); background: var(--color-bg);
  view-transition-name: site-header;
}
.site-header::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--color-border);
  box-shadow: var(--shadow-edge); opacity: 0.001;
  transition: opacity var(--dur-3) var(--ease-out); pointer-events: none;
}
.site-header[data-scrolled]::after, html:not(.js) .site-header::after { opacity: 1; }
.header-bar { display: flex; align-items: center; gap: var(--space-4); height: var(--header-h); }

/* Condensed header: once the page has scrolled (site.js sets [data-scrolled]), the bar slims to
   --header-h-condensed, turns to frosted glass and shows its hairline. Nothing below it moves: the
   header's box shrinks while margin-bottom takes up the difference (in-flow height stays --header-h),
   .header-bar keeps its height, and the plate, hairline, brand, nav and tools move by transform only.
   The strip under the condensed bar lets pointer events through to the page. Without JS the header
   keeps its full height and the hairline is always on. */
.js .site-header { --shrink: calc(var(--header-h) - var(--header-h-condensed)); height: var(--header-h); }
.js .site-header::before {
  content: ""; position: absolute; inset: 0 0 auto; height: var(--header-h); z-index: -1; background: var(--color-bg); pointer-events: none;
  transition: transform var(--dur-4) var(--ease-out-quint), opacity var(--dur-3) var(--ease-out);
}
.js .site-header::after {
  inset: calc(var(--header-h-condensed) - 1px) 0 auto; transform: translateY(var(--shrink));
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-4) var(--ease-out-quint);
}
/* The brand multiplies as a group, so the emblem's white ground drops out over the glass too. */
.js .brand { mix-blend-mode: multiply; }
.js :is(.brand, .brand-emblem, .brand-text, .primary-nav, .header-tools) { transition: transform var(--dur-4) var(--ease-out-quint); }
/* The emblem's white ground can only multiply away inside the header's own layer; over the glass it
   shows, so it is cut to the gear's circle (the gear's tips touch it): a white coin on frosted glass. */
.js .brand-emblem { transform-origin: 0 50%; border-radius: 50%; }
.js .brand-sub { transition: opacity var(--dur-3) var(--ease-out); }
.js .nav-indicator { transition: translate var(--dur-4) var(--ease-out-quint); }
.js .site-header[data-scrolled] { height: var(--header-h-condensed); margin-bottom: var(--shrink); }
.js .site-header[data-scrolled]::before { transform: translateY(calc(-1 * var(--shrink))); opacity: 0; }
.js .site-header[data-scrolled]::after { transform: none; }
.js .site-header[data-scrolled] .header-bar { pointer-events: none; }
.js .site-header[data-scrolled] :is(.brand, .nav-item, .header-tools > *) { pointer-events: auto; }
.js .site-header[data-scrolled] :is(.brand, .primary-nav, .header-tools) { transform: translateY(calc(var(--shrink) / -2)); }
.js .site-header[data-scrolled] .brand-emblem { transform: scale(0.8); }
.js .site-header[data-scrolled] .brand-text { transform: translate(calc(var(--emblem) * -0.2), var(--brand-lift)); }
.js .site-header[data-scrolled] .brand-sub { opacity: 0; }
/* The current-section indicator stays on the bar's bottom edge, the dropdowns just under it. */
.js .site-header[data-scrolled] :is(.nav-indicator, .dropdown) { translate: 0 calc(var(--shrink) / -2); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .js .site-header[data-scrolled] { background: var(--glass); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); }
}
@media (prefers-reduced-transparency: reduce) {
  .js .site-header[data-scrolled] { background: var(--color-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Arriving at the top of a page from a condensed header (a view transition; the head script sets
   html.header-arrival for 500ms): the new header opens out from the condensed state. The indicator is
   held in place, because its own view-transition group carries it there. */
@keyframes header-lift { from { transform: translateY(calc(var(--shrink) / -2)); } }
@keyframes header-hold { from { translate: 0 calc(var(--shrink) / 2); } }
@keyframes header-emblem { from { transform: scale(0.8); } }
@keyframes header-name { from { transform: translate(calc(var(--emblem) * -0.2), var(--brand-lift)); } }
@keyframes header-sub { from { opacity: 0; } }
@keyframes header-plate { from { transform: translateY(calc(-1 * var(--shrink))); } }
@keyframes header-bare { from, to { background-color: transparent; } }
@keyframes header-rule { from { opacity: 1; transform: none; } }
.header-arrival .site-header { animation: header-bare var(--dur-4) linear; }
.header-arrival .site-header::before { animation: header-plate var(--dur-4) var(--ease-out-quint) backwards; }
.header-arrival .site-header::after { animation: header-rule var(--dur-4) var(--ease-out-quint) backwards; }
.header-arrival .site-header :is(.brand, .primary-nav, .header-tools) { animation: header-lift var(--dur-4) var(--ease-out-quint) backwards; }
.header-arrival .site-header .nav-indicator { animation: header-hold var(--dur-4) var(--ease-out-quint) backwards; }
.header-arrival .site-header .brand-emblem { animation: header-emblem var(--dur-4) var(--ease-out-quint) backwards; }
.header-arrival .site-header .brand-text { animation: header-name var(--dur-4) var(--ease-out-quint) backwards; }
.header-arrival .site-header .brand-sub { animation: header-sub var(--dur-3) var(--ease-out) backwards; }

.brand { --emblem: 2.5rem; --brand-lift: 0rem; display: flex; align-items: center; gap: 0.75rem; margin-right: auto; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.brand-emblem { flex: none; width: var(--emblem); height: var(--emblem); mix-blend-mode: multiply; }
.brand-text { display: grid; gap: 0.15rem; min-width: 0; line-height: 1.15; }
.brand-name { font: var(--weight-medium) 0.875rem/1.15 var(--font-display); letter-spacing: -0.01em; color: var(--color-text); max-width: 12.5rem; }
.brand-sub { display: none; font: var(--weight-regular) 0.75rem/1.2 var(--font-text); color: var(--color-text-muted); }
/* --brand-lift: half the subtitle line and gap, so the name centres once the subtitle fades (condensed). */
@media (min-width: 30rem) {
  .brand { --brand-lift: 0.525rem; }
  .brand-name { max-width: none; font-size: 0.9375rem; }
  .brand-sub { display: block; }
}
@media (min-width: 64rem) {
  .brand { --emblem: 2.75rem; --brand-lift: 0rem; }
  .brand-name { max-width: 11.5rem; font-size: 0.875rem; }
  .brand-sub { display: none; }
}
@media (min-width: 82rem) {
  .brand { --brand-lift: 0.525rem; }
  .brand-name { max-width: none; font-size: 0.9375rem; }
  .brand-sub { display: block; }
}

.primary-nav { display: none; align-self: stretch; }
@media (min-width: 64rem) { .primary-nav { display: flex; align-items: center; } }
.nav-list { display: flex; align-items: center; gap: 0.125rem; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; border-radius: var(--radius-md); transition: background-color var(--dur-1) var(--ease-out); }
.nav-item:hover, .nav-item[data-open] { background: var(--n-50); }
.nav-link {
  position: relative; display: block; padding: 0.5rem 0.625rem; border-radius: var(--radius-md);
  font: var(--weight-medium) 0.9375rem/1.25 var(--font-text); color: var(--color-text-muted); text-decoration: none; white-space: nowrap;
  transition: color var(--dur-1) var(--ease-out);
}
.has-menu > .nav-link { padding-right: 0.125rem; }
.nav-item:hover .nav-link, .nav-item[data-open] .nav-link, .nav-link[aria-current] { color: var(--color-text); }
.nav-indicator {
  position: absolute; left: 0.625rem; right: 0.625rem; bottom: calc((var(--header-h) - 2.25rem) / -2); height: 2px;
  background: var(--color-accent-brand); border-radius: 1px; view-transition-name: nav-indicator; pointer-events: none;
}
.has-menu .nav-indicator { right: 0.125rem; }
.nav-toggle {
  display: grid; place-items: center; width: 1.625rem; height: 2.25rem; margin-right: 0.125rem; padding: 0;
  border: 0; background: none; border-radius: var(--radius-sm); color: var(--color-text-muted);
}
.nav-toggle .i-chev { width: 0.625rem; height: 0.625rem; transition: transform var(--dur-2) var(--ease-out-quint); }
.nav-item[data-open] .nav-toggle .i-chev { transform: rotate(180deg); }
/* Without JS the chevron buttons would do nothing: hide them; :hover/:focus-within on the item opens the menu. */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .has-menu > .nav-link { padding-right: 0.625rem; }
html:not(.js) .has-menu .nav-indicator { right: 0.625rem; }

.dropdown {
  position: absolute; top: calc(100% + (var(--header-h) - 2.25rem) / 2); left: -0.25rem; z-index: var(--z-dropdown);
  min-width: 19rem; max-width: 24rem; padding: 0.375rem; background: var(--color-surface-raised);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-out-quint), translate var(--dur-4) var(--ease-out-quint), visibility 0s linear var(--dur-2);
}
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: calc((var(--header-h) - 2.25rem) / 2 + 2px); }
.nav-item[data-open] > .dropdown,
html:not(.js) .nav-item:is(:hover, :focus-within) > .dropdown {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
/* Right-aligned only when a left-aligned panel would cross the viewport edge: site.js measures on
   open and sets .align-end. Without JS the menus nearest the end of the nav align right below 80rem. */
.nav-item.align-end > .dropdown { left: auto; right: -0.25rem; }
@media (max-width: 79.99rem) {
  html:not(.js) .nav-list > .has-menu:nth-last-child(-n+3) > .dropdown { left: auto; right: -0.25rem; }
}
.dd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-item[data-open] .dd-list > li { animation: dd-item var(--dur-3) var(--ease-out-quint) both; animation-delay: calc(var(--i, 0) * 25ms); }
@keyframes dd-item { from { opacity: 0; transform: translateY(-3px); } }
.dd-link {
  display: grid; gap: 0.125rem; padding: 0.625rem 0.75rem; border-radius: var(--radius-md);
  color: var(--color-text); text-decoration: none; transition: background-color var(--dur-1) var(--ease-out);
}
.dd-link:hover, .dd-link:focus-visible { background: var(--n-50); }
.dd-link:focus-visible { outline-offset: -2px; }
.dd-title { display: flex; align-items: center; gap: 0.5rem; font: var(--weight-medium) 0.9375rem/1.3 var(--font-text); }
.dd-title .i-ext { color: var(--color-text-muted); }
.dd-meta { font: var(--weight-regular) var(--step--1)/1.35 var(--font-text); color: var(--color-text-muted); }
.dd-link[aria-current="page"] { background: var(--color-surface-tint); }
.dd-link[aria-current="page"] .dd-title { color: var(--color-accent); }
.dd-link[aria-current="page"] .dd-title::after { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--color-accent-brand); }

.header-tools { flex: none; display: flex; align-items: center; gap: var(--space-4); }

.lang { display: flex; padding: 2px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font: var(--weight-medium) 0.75rem/1 var(--font-text); letter-spacing: 0.06em; }
.lang-opt { display: grid; place-items: center; min-width: 2.25rem; min-height: 2.125rem; padding: 0 0.5rem; border-radius: var(--radius-sm); color: var(--color-text-muted); text-decoration: none; transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
/* Current language: steel-50 fill with a --steel-500 inset edge (3.9:1 against the other option). */
.lang-opt[aria-current] { background: var(--steel-50); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--steel-500); }
a.lang-opt:hover { color: var(--color-text); background: var(--n-50); }
a.lang-opt:focus-visible { outline-offset: 1px; }
/* Below 30rem the header keeps only the link to the other language, as a 44px target. */
@media (max-width: 29.99rem) {
  .header-tools { gap: var(--space-3); }
  .header-tools > .lang { padding: 0; border: 0; }
  .header-tools > .lang > .lang-opt[aria-current] { display: none; }
  .header-tools > .lang > a.lang-opt { min-width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); }
}

.menu-button {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.875rem 0 0.75rem;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface);
  color: var(--color-text); font: var(--weight-medium) 0.875rem/1 var(--font-text); text-decoration: none; cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.menu-button:hover { border-color: var(--steel-400); background: var(--color-surface-hover); }
.menu-button svg { flex: none; width: 1.125rem; height: 1.125rem; }
/* Below 22.5rem (320px phones) the header has no room for the language link; the drawer and the
   footer carry it. */
@media (max-width: 22.49rem) { .header-tools > .lang { display: none; } }
@media (min-width: 64rem) { .menu-button { display: none; } }

/* ==========================================================================
   7. Mobile drawer (<dialog>)
   ========================================================================== */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(24rem, 100vw - 2.5rem); height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-3);
  transform: translateX(100%);
  transition: transform var(--dur-4) var(--ease-out-quint), overlay var(--dur-4) allow-discrete, display var(--dur-4) allow-discrete;
}
.drawer[open] { display: flex; flex-direction: column; transform: none; }
@starting-style { .drawer[open] { transform: translateX(100%); } }
.drawer::backdrop { background: rgb(16 29 35 / 0); transition: background-color var(--dur-4) var(--ease-out), overlay var(--dur-4) allow-discrete, display var(--dur-4) allow-discrete; }
.drawer[open]::backdrop { background: var(--backdrop); }
@starting-style { .drawer[open]::backdrop { background: rgb(16 29 35 / 0); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 var(--space-4) 0 var(--space-5); border-bottom: 1px solid var(--color-border); flex: none; }
.icon-button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: none; border-radius: var(--radius-md); color: var(--color-text); transition: background-color var(--dur-1) var(--ease-out); }
.icon-button:hover { background: var(--n-50); }
.icon-button svg { width: 1.25rem; height: 1.25rem; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-3) var(--space-5) var(--space-6); }
.drawer-list { list-style: none; margin: 0; padding: 0; }
.drawer-list > li { border-bottom: 1px solid var(--color-border); }
.drawer-link, .drawer-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3.5rem;
  font: var(--weight-medium) 1.125rem/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--color-text);
  text-decoration: none; cursor: pointer; list-style: none; border-radius: var(--radius-sm);
}
.drawer-group > summary::-webkit-details-marker { display: none; }
.drawer-group > summary .i-chev { width: 0.75rem; height: 0.75rem; color: var(--color-text-muted); transition: transform var(--dur-2) var(--ease-out-quint); }
.drawer-group[open] > summary .i-chev { transform: rotate(180deg); }
.drawer-group::details-content { block-size: 0; overflow: clip; transition: block-size var(--dur-3) var(--ease-out-quint), content-visibility var(--dur-3) allow-discrete; }
.drawer-group[open]::details-content { block-size: auto; }
.drawer-sub { list-style: none; margin: 0; padding: 0 0 var(--space-4); display: grid; gap: 2px; }
.drawer-sub a { display: flex; align-items: center; gap: var(--space-3); min-height: 2.75rem; padding: 0.5rem var(--space-4); border-radius: var(--radius-sm); color: var(--color-text-muted); text-decoration: none; font-size: 1rem; line-height: 1.3; }
.drawer-sub a:hover { background: var(--n-50); color: var(--color-text); }
.drawer-sub a[aria-current="page"] { background: var(--color-surface-tint); color: var(--color-accent); font-weight: var(--weight-medium); }
.drawer-link[aria-current], .drawer-group.is-current > summary { color: var(--color-accent); }
.drawer-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); background: var(--n-25); }
.drawer-foot .lang-opt { min-height: 2.75rem; min-width: 2.75rem; }
.drawer-foot a:not(.lang-opt) { font-size: var(--step--1); color: var(--color-text-muted); }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--color-border-strong); background: var(--color-bg); }
.footer-grid { row-gap: var(--space-7); padding-block: var(--space-7); }
.footer-id { display: grid; gap: var(--space-5); align-content: start; }
.footer-logo { width: 10.5rem; mix-blend-mode: multiply; }
.footer-id address { display: grid; gap: var(--space-3); font-size: var(--step--1); line-height: 1.5; color: var(--color-text-muted); }
.footer-id address .footer-name { color: var(--color-text); font-weight: var(--weight-medium); }
.footer-id address a { color: var(--color-text); text-decoration: none; }
.footer-id address a:hover { color: var(--color-accent); text-decoration: underline; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--grid-gap); }
@media (max-width: 47.99rem) { .footer-col:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 48rem) { .footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* From 64rem a golden split: the address in the minor column, the sitemap in the major one, in
   content-sized columns (three, from 80rem five), so the longest programme and lab names stay on one line. */
@media (min-width: 64rem) {
  .footer-grid { grid-template-columns: var(--golden); column-gap: var(--golden-gap); }
  .footer-id { grid-column: 1; }
  .footer-nav { grid-column: 2; grid-template-columns: repeat(3, auto); }
}
@media (min-width: 80rem) {
  .footer-nav { grid-template-columns: repeat(5, auto); column-gap: var(--space-5); }
}
.footer-col h2 { font: var(--weight-medium) var(--step--2)/1.3 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-4); }
.footer-col h2 a { color: inherit; text-decoration: none; }
.footer-col h2 a:hover { color: var(--color-accent); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.125rem; }
.footer-col li a { display: inline-block; padding-block: 0.3rem; font-size: var(--step--1); line-height: 1.35; color: var(--color-text); text-decoration: none; text-wrap: balance; transition: color var(--dur-1) var(--ease-out); }
.footer-col li a:hover { color: var(--color-accent); text-decoration: underline; }
.footer-col a[aria-current="page"] { color: var(--color-accent); font-weight: var(--weight-medium); }
.footer-col .i-ext { display: inline; vertical-align: -0.05em; margin-left: 0.2em; color: var(--color-text-muted); }
.footer-base { background: var(--color-surface-sunken); border-top: 1px solid var(--color-border); }
.footer-base .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-5); padding-block: var(--space-4); }
.footer-base p { font-size: var(--step--1); color: var(--color-text-muted); }

/* ==========================================================================
   9. Figures and photo treatment
   Editorial photos: --steel. Documentary photos: --mat (or --partial).
   Book covers: .book-cover, never graded.
   ========================================================================== */
.figure { display: grid; gap: var(--space-4); align-content: start; }
.figure-frame { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--n-100); isolation: isolate; }
.figure-frame > img { object-fit: cover; }
.figure-frame:where(:not(.figure-frame--natural)) > img { width: 100%; height: 100%; }
/* --grade-b / --grade-c even out exposure between photos; .grade-lift and .grade-deep are the presets. */
.figure-frame--steel > img { filter: grayscale(1) contrast(var(--grade-c, 1.06)) brightness(var(--grade-b, 1.03)); }
.grade-lift { --grade-b: 1.45; --grade-c: 0.95; }
.grade-deep { --grade-b: 0.72; --grade-c: 1.18; }
.figure-frame--steel::after { content: ""; position: absolute; inset: 0; background: var(--steel-500); mix-blend-mode: color; opacity: 0.72; pointer-events: none; transition: opacity var(--dur-3) var(--ease-out); }
.figure-frame--partial > img { filter: grayscale(0.5) contrast(1.02); }
.figure-frame--partial::after { content: ""; position: absolute; inset: 0; background: var(--steel-500); mix-blend-mode: color; opacity: 0.3; pointer-events: none; }
.figure-frame--mat { padding: clamp(0.5rem, 0.35rem + 0.5vw, 0.75rem); background: var(--n-50); border: 1px solid var(--n-100); }
.figure-frame--mat > img { border-radius: var(--radius-xs); }
/* Scanned documentary photos with a dark scan edge: clip the edge inside the frame (--trim, default 2.5%). */
.figure-frame--trim > img { clip-path: inset(var(--trim, 2.5%) round var(--radius-xs)); }
/* Never upscale: the image keeps its natural size (capped by the frame) and sits centred on the
   frame's fill. Its width/height attributes must be its natural size: they size the box before the
   file loads, so the layout does not shift. Use with --mat for small documentary images such as
   news photos. */
.figure-frame--natural { display: grid; place-items: center; }
.figure-frame--natural > img { height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
/* Round portraits: the team headshots are supplied as circular cut-outs; the ring and soft inner
   shade bring light and dark backgrounds closer together. */
/* The 1.04 overscan hides the cut-out's edge; frames are capped at 10.4rem so the smallest portrait
   (174px) is never drawn above its natural size. */
.figure-frame--round { aspect-ratio: 1; border-radius: 50%; }
.figure-frame--round > img { transform: scale(1.04); }
.figure-frame--round::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--ink-a10), inset 0 -1.5rem 2.5rem -1.5rem var(--ink-a28); pointer-events: none; }
.band--ink .figure-frame--mat { background: var(--n-50); border-color: transparent; }
.figure figcaption, .figure .caption { display: flex; gap: 0.75rem; font: var(--weight-regular) var(--step--1)/1.5 var(--font-text); color: var(--color-text-muted); }
.fig-no { flex: none; font: var(--weight-medium) var(--step--2)/1.75 var(--font-mono); letter-spacing: var(--track-mono); color: var(--color-accent); white-space: nowrap; }
/* Golden frames (φ:1) for the hero photo and landscape lab photos; see §30. */
.ratio-hero, .ratio-phi { aspect-ratio: var(--phi, 1.618034) / 1; }
.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.figure--wide { max-width: 64rem; }

/* ==========================================================================
   10. Home: hero (figure bleeds to the viewport's right edge), vision/mission
   ========================================================================== */
.hero { padding-block: clamp(1.5rem, 0.5rem + 4vw, 4.5rem) var(--space-section); }
.hero-grid {
  display: grid; row-gap: var(--space-6); align-items: center;
  grid-template-columns: [full-start] max(var(--gutter), (100% - var(--page-max)) / 2) [content-start] minmax(0, 1fr) [copy-end] var(--golden-gap) [mid] minmax(0, 1.618fr) [content-end] max(var(--gutter), (100% - var(--page-max)) / 2) [full-end];
}
.hero-copy { grid-column: content-start / content-end; }
.hero-copy .h-display { max-width: 14ch; }
.hero-copy .eyebrow + .h-display { margin-top: var(--space-5); }
.hero-copy .lede { margin-top: var(--space-5); font-size: clamp(1.0625rem, 0.95rem + 0.42vw, 1.3125rem); color: var(--color-text-muted); line-height: 1.5; max-width: 46ch; }
.hero-actions { margin-top: var(--space-6); }
.hero-figure { grid-column: content-start / full-end; }
.hero-figure .figure-frame { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.hero-figure figcaption { padding-right: var(--gutter); }
/* From 64rem a golden split of the wrap: the copy in the minor column, the photo in the major one,
   bleeding right; its left edge is the page's golden line. */
@media (min-width: 64rem) {
  .hero-copy { grid-column: content-start / copy-end; }
  .hero-figure { grid-column: mid / full-end; }
}

.about-grid { display: grid; gap: var(--space-6) var(--grid-gap); grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "fig" "vision" "mission"; }
.about-head { grid-area: head; display: grid; gap: var(--space-4); }
.about-figure { grid-area: fig; }
.about-vision { grid-area: vision; }
.about-mission { grid-area: mission; display: grid; gap: var(--space-5); margin-top: var(--space-6); }
/* Single column (< 48rem): heading first, then a square crop that keeps the face, the pipette tip
   and the metal carrier named in the caption. From 48rem a golden split: the portrait in the minor
   column beside the text. */
.about-figure .figure-frame { aspect-ratio: 1; }
.about-figure .figure-frame > img { object-position: 50% 62%; }
.about-vision.prose { color: var(--color-text-muted); }
.about-vision.prose > p:first-child { font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem); line-height: 1.55; color: var(--color-text); }
@media (min-width: 48rem) {
  .about-grid { grid-template-columns: var(--golden); grid-template-areas: none; gap: var(--space-5) var(--golden-gap); }
  .about-figure { grid-area: auto; grid-column: 1; grid-row: 1 / span 3; position: sticky; top: calc(var(--header-h) + var(--space-6)); align-self: start; }
  .about-figure .figure-frame { aspect-ratio: 4 / 5; }
  .about-figure .figure-frame > img { object-position: 50% 30%; }
  .about-head, .about-vision, .about-mission { grid-area: auto; grid-column: 2; }
  .about-mission { margin-top: var(--space-7); }
}

/* ==========================================================================
   11. Index rows (home overview and hub pages)
   ========================================================================== */
.index-list { list-style: none; padding: 0; border-bottom: 1px solid var(--color-border-strong); transition: border-color var(--dur-1) var(--ease-out); }
.index-row {
  position: relative; display: grid; gap: var(--space-4) var(--grid-gap); grid-template-columns: minmax(0, 1fr) auto;
  padding: var(--space-6) 0; border-top: 1px solid var(--color-border-strong); isolation: isolate;
  transition: border-color var(--dur-1) var(--ease-out);
}
/* Hover wash: a card that reaches 1rem past the text; the rules above and below it fade out so
   the card never overlaps a hairline. */
.index-row::before {
  content: ""; position: absolute; inset: -1px calc(-1 * var(--space-4)); z-index: -1; border-radius: var(--radius-md);
  background: var(--color-surface-hover); opacity: 0; transition: opacity var(--dur-1) var(--ease-out);
}
.band--sunken .index-row::before { background: var(--n-0); }
.index-row:is(:hover, :focus-within)::before { opacity: 1; }
.index-row:is(:hover, :focus-within), .index-row:is(:hover, :focus-within) + .index-row { border-top-color: transparent; }
.index-list:has(> .index-row:last-child:is(:hover, :focus-within)) { border-bottom-color: transparent; }
.index-head { display: grid; gap: var(--space-3); align-content: start; grid-column: 1; }
.index-meta { font: var(--weight-regular) var(--step--1)/1.4 var(--font-text); color: var(--color-text-muted); }
.index-title { font-size: var(--step-3); line-height: var(--lh-heading); letter-spacing: var(--track-heading); }
.index-title a { color: var(--color-text); text-decoration: none; border-radius: var(--radius-xs); }
.index-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.index-title a:hover { color: var(--color-accent); }
.index-arrow { grid-column: 2; grid-row: 1; align-self: start; width: 1.5rem; height: 1.5rem; margin-top: 0.4rem; color: var(--color-accent-brand); transition: transform var(--dur-2) var(--ease-out-quint); }
.index-row:hover .index-arrow { transform: translateX(4px); }
.index-desc { grid-column: 1 / -1; color: var(--color-text-muted); max-width: 52ch; }
.index-links { grid-column: 1 / -1; position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; }
.index-links li + li { border-top: 1px solid var(--color-border); }
.index-links a {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-4); flex-wrap: wrap;
  min-height: 2.75rem; padding: 0.625rem 0; color: var(--color-text); text-decoration: none;
  font: var(--weight-medium) 0.9375rem/1.35 var(--font-text); transition: color var(--dur-1) var(--ease-out);
}
.index-links a:hover { color: var(--color-accent); }
.index-links a:hover .index-link-label { text-decoration: underline; text-decoration-color: var(--steel-300); }
/* Meta is the text face (descriptive: techniques, durations, names); only dates and codes use .data (mono). */
.index-links .index-link-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); font: var(--weight-regular) var(--step--1)/1.4 var(--font-text); color: var(--color-text-muted); }
.index-links .index-link-meta .data, .index-links .index-link-meta.data { font: var(--weight-regular) var(--step--2)/1.4 var(--font-mono); letter-spacing: var(--track-mono); }
/* Narrow screens: the meta always sits under its label, never beside it only when it happens to fit. */
@media (max-width: 29.99rem) {
  .index-links a { flex-direction: column; align-items: flex-start; gap: 0.125rem; }
}
.index-thumb { grid-column: 1 / -1; max-width: 20rem; }
/* Thumb rows below 48rem: head and arrow on the first row, the thumbnail under them, whatever the DOM
   order. 48–64rem: the thumbnail in columns 1–4, the head (and any text) beside it. */
@media (max-width: 47.99rem) {
  .index-row--thumb > .index-head { grid-row: 1; }
  .index-row--thumb > .index-thumb { grid-row: 2; }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .index-row--thumb { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .index-row--thumb > .index-thumb { grid-column: 1 / span 4; grid-row: 1 / span 2; max-width: none; }
  .index-row--thumb > :is(.index-head, .index-desc, .index-links) { grid-column: 5 / span 7; }
  .index-row--thumb > .index-head { grid-row: 1; }
  .index-row--thumb > .index-arrow { grid-column: 12; grid-row: 1; justify-self: end; }
}
/* From 64rem a golden split: the head in the minor column; the text or links in the major one, clear of
   the arrow at its end by one golden gap. Thumb rows keep the 12-column grid (thumb 1–3, head 4–7). */
@media (min-width: 64rem) {
  .index-row { grid-template-columns: var(--golden); column-gap: var(--golden-gap); padding-block: var(--space-6); }
  .index-head { grid-column: 1; }
  .index-desc { grid-column: 2; grid-row: 1; margin-top: 0.35rem; margin-right: calc(1.5rem + var(--golden-gap)); }
  .index-links { grid-column: 2; grid-row: 1; margin-right: calc(1.5rem + var(--golden-gap)); }
  .index-desc + .index-links { grid-row: 2; }
  .index-arrow { grid-column: 2; grid-row: 1; justify-self: end; }
  .index-row--thumb { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); }
  .index-row--thumb .index-thumb { grid-column: 1 / span 3; grid-row: 1 / span 2; max-width: none; }
  .index-row--thumb .index-head { grid-column: 4 / span 4; }
  .index-row--thumb .index-desc, .index-row--thumb .index-links { grid-column: 8 / span 4; margin-right: 0; }
  .index-row--thumb > .index-arrow { grid-column: 12; }
  /* Hub rows with only a head (meta + title): the title gets the width up to the arrow. */
  .index-row:not(:has(> .index-desc, > .index-links)) > .index-head { grid-column: 1 / -1; grid-row: 1; margin-right: calc(1.5rem + var(--golden-gap)); }
  .index-row--thumb:not(:has(> .index-desc, > .index-links)) > .index-head { grid-column: 4 / span 8; grid-row: 1; margin-right: 0; }
}

/* ==========================================================================
   12. Feature row (image + text, alternating) and instrument spec list
   ========================================================================== */
.feature-rows { display: grid; }
.feature-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--space-5); padding-block: var(--space-block); border-top: 1px solid var(--color-border); }
.feature-row > .figure { grid-column: 1 / -1; max-width: 32rem; }
.feature-row > .feature-text { grid-column: 1 / -1; display: grid; gap: var(--space-4); align-content: start; }
.feature-text h3 { font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.015em; }
.feature-text .feature-maker { font: var(--weight-regular) var(--step--1)/1.4 var(--font-text); color: var(--color-text-muted); }
.feature-text .prose { margin-top: var(--space-3); }
/* Feature rows right after the instrument register: the register already closes on a hairline. */
.register-grid + .feature-rows > .feature-row:first-child { border-top: 0; padding-top: 0; }
/* From 64rem a golden split: the figure in the minor column, the text in the major one (reversed by --flip). */
@media (min-width: 64rem) {
  .feature-row { grid-template-columns: var(--golden); column-gap: var(--golden-gap); }
  .feature-row > .figure { grid-column: 1; max-width: none; }
  .feature-row > .feature-text { grid-column: 2; }
  .feature-row--flip { grid-template-columns: var(--golden-flip); }
  .feature-row--flip > .figure { grid-column: 2; grid-row: 1; }
  .feature-row--flip > .feature-text { grid-column: 1; grid-row: 1; }
}
.spec-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-4); padding-block: var(--space-4); border-block: 1px solid var(--color-border); font-size: var(--step--1); line-height: 1.45; }
.spec-list dt { color: var(--color-text-muted); }
.spec-list dd { margin: 0; color: var(--color-text); }
.spec-list .data { font-size: 0.95em; }

/* ==========================================================================
   13. Facts (key figures / lab facts)
   ========================================================================== */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--color-border); }
.fact { padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 1px solid var(--color-border); min-width: 0; }
.fact:nth-child(odd) { border-right: 1px solid var(--color-border); }
.fact:nth-child(even) { padding-left: var(--space-4); }
.fact dt { font: var(--weight-medium) var(--step--2)/1.3 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); }
.fact dd { margin: var(--space-3) 0 0; font: var(--weight-medium) var(--step-2)/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact dd small { display: block; margin-top: 0.35rem; font: var(--weight-regular) var(--step--1)/1.4 var(--font-text); letter-spacing: 0; color: var(--color-text-muted); }
.facts--text .fact dd { font: var(--weight-regular) var(--step-0)/1.45 var(--font-text); letter-spacing: 0; }
.facts--text .fact dd strong { font-weight: var(--weight-medium); }
@media (min-width: 48rem) {
  .facts { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
  .facts--3 { --cols: 3; }
  .facts--2 { --cols: 2; }
  .fact, .fact:nth-child(even), .fact:nth-child(odd) { border-bottom: 0; border-right: 1px solid var(--color-border); padding: var(--space-5) var(--space-5) var(--space-3); }
  .fact:first-child { padding-left: 0; }
  .fact:last-child { border-right: 0; }
}
@media (max-width: 47.99rem) {
  .facts--text { grid-template-columns: minmax(0, 1fr); }
  .facts--text .fact, .facts--text .fact:nth-child(even) { border-right: 0; padding-left: 0; }
}

/* ==========================================================================
   14. Timeline on a calibrated axis (--from … --from + --span, default 1970–2030)
   ========================================================================== */
.timeline { --from: 1970; --span: 60; position: relative; list-style: none; padding: 0; }
.tl-item { position: relative; display: grid; gap: var(--space-3); padding: 0 0 var(--space-6) var(--space-6); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 0; top: 0.45rem; width: 9px; height: 9px; margin-left: -4px; border-radius: 2px; background: var(--color-surface); border: 2px solid var(--color-accent-brand); }
.timeline::before { content: ""; position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem; width: 1px; background: var(--color-border-strong); }
.tl-year { font: var(--weight-medium) var(--step-2)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--color-text); }
.tl-year--text { font-size: var(--step-1); letter-spacing: -0.01em; }
.tl-text { font-size: var(--step--1); line-height: 1.55; color: var(--color-text-muted); max-width: 40ch; }
.tl-text strong { font-weight: var(--weight-medium); color: var(--color-text); }
.tl-axis { display: none; }
/* Vertical list, 48–64rem: the year sits in its own column beside the text. */
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .tl-item { grid-template-columns: 12rem minmax(0, 1fr); column-gap: var(--space-5); align-items: baseline; }
  .tl-year { white-space: nowrap; }
  .tl-text { max-width: 60ch; }
}
@media (min-width: 64rem) {
  .timeline { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 3.5rem auto; }
  .timeline::before { display: none; }
  .tl-axis {
    display: block; grid-area: 2 / 1; position: relative;
    background:
      linear-gradient(var(--color-border-strong), var(--color-border-strong)) left 1.25rem / 100% 1px no-repeat,
      repeating-linear-gradient(90deg, var(--color-border-strong) 0 1px, transparent 1px calc(100% / var(--span))) left 1.25rem / calc(100% + 1px) 6px no-repeat;
    transform-origin: left center;
  }
  .tl-major { position: absolute; top: 1.25rem; left: calc((var(--y) - var(--from)) / var(--span) * 100%); width: 1px; height: 11px; background: var(--slate-400); }
  .tl-major span { position: absolute; top: 15px; left: 0; transform: translateX(-50%); font: var(--weight-regular) 0.75rem/1 var(--font-mono); color: var(--color-text-subtle); }
  /* Each label starts at its own tick; the last one narrows to the space left before the axis end. */
  .tl-item {
    --pos: calc((var(--y) - var(--from)) / var(--span) * 100%);
    grid-column: 1; width: min(17.5rem, 25%, 100% - var(--pos)); margin-left: var(--pos); padding: 0 0 0 var(--space-4);
    border-left: 1px solid var(--steel-300);
  }
  .tl-item::before { left: 0; margin-left: -5px; }
  .tl-item--up { grid-row: 1; align-self: end; margin-bottom: -1.25rem; padding-bottom: calc(var(--space-5) + 1.25rem); }
  .tl-item--up::before { top: auto; bottom: -5px; }
  .tl-item--down { grid-row: 3; align-self: start; margin-top: -2.25rem; padding-top: calc(var(--space-6) + 2.25rem); }
  .tl-item--down::before { top: -5px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-item--up:last-child { padding-bottom: calc(var(--space-5) + 1.25rem); }
}

/* ==========================================================================
   15. Instrument register (model / instrument / range / maker)
   ========================================================================== */
.register-grid { display: grid; gap: var(--space-7) var(--grid-gap); }
@media (min-width: 80rem) {
  .register-grid { grid-template-columns: var(--golden); column-gap: var(--golden-gap); align-items: start; }
  .register-intro { grid-column: 1; }
  .register-wrap { grid-column: 2; }
}
.register-intro { display: grid; gap: var(--space-4); align-content: start; max-width: 40rem; }
.register-wrap { min-width: 0; }
.register-intro .prose { color: var(--color-text-muted); }
.register { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.register caption { caption-side: bottom; padding-top: var(--space-4); text-align: left; font-size: var(--step--1); color: var(--color-text-muted); }
.register th, .register td { text-align: left; vertical-align: baseline; padding: var(--space-4) var(--space-4) var(--space-4) 0; border-top: 1px solid var(--color-border); font-weight: inherit; }
.register thead th { padding-block: 0 var(--space-4); border-top: 0; border-bottom: 1px solid var(--color-border-strong); font: var(--weight-medium) var(--step--2)/1.3 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); }
.register tbody tr { transition: background-color var(--dur-1) var(--ease-out); }
.register tbody tr:hover { background: var(--color-surface-hover); }
.register tbody tr:last-child > * { border-bottom: 1px solid var(--color-border); }
.register tbody th { font: var(--weight-medium) var(--step--1)/1.3 var(--font-mono); letter-spacing: var(--track-mono); color: var(--color-text); white-space: nowrap; }
.register .inst { display: block; font: var(--weight-medium) var(--step-0)/1.3 var(--font-text); color: var(--color-text); }
.register .range { font: var(--weight-regular) var(--step--1)/1.3 var(--font-mono); color: var(--color-text); }
.register .maker { color: var(--color-text-muted); white-space: nowrap; }
.register td:last-child, .register th:last-child { padding-right: 0; }
@media (max-width: 47.99rem) {
  .register thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .register, .register tbody, .register tr, .register th, .register td { display: block; }
  .register tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--color-border); }
  .register tbody tr:last-child { border-bottom: 1px solid var(--color-border); }
  .register tbody tr:last-child > * { border-bottom: 0; }
  .register th, .register td { border: 0; padding: 0; }
  .register tbody th { grid-column: 1; }
  .register td.maker { grid-column: 2; grid-row: 1; text-align: right; }
  .register td.inst-cell { grid-column: 1 / -1; }
  .register td.range-cell { grid-column: 1 / -1; }
}

/* ==========================================================================
   16. Readout: published measurements as a range chart (accessible table)
   ========================================================================== */
.feature-grid { display: grid; gap: var(--space-7) var(--grid-gap); align-items: start; }
.feature-copy { display: grid; gap: var(--space-5); align-content: start; }
/* The data column is shorter than the copy (text + figure), so it stays in view while the copy
   scrolls past and settles level with the copy's end. */
/* Golden splits: 64–80rem the copy takes the major column so running text keeps a readable measure;
   from 80rem the data takes it. */
@media (min-width: 64rem) {
  .feature-grid { grid-template-columns: var(--golden-flip); column-gap: var(--golden-gap); }
  .feature-copy { grid-column: 1; }
  .feature-data { grid-column: 2; position: sticky; top: calc(var(--header-h) + var(--space-6)); }
}
@media (min-width: 80rem) {
  .feature-grid { grid-template-columns: var(--golden); }
}
.feature-copy .prose { color: var(--color-text-muted); }
.readout { container: readout / inline-size; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); padding: var(--space-5); }
.readout-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-4); padding-bottom: var(--space-4); }
.readout-title { font: var(--weight-medium) var(--step-0)/1.3 var(--font-display); color: var(--color-text); }
.readout-scale { font: var(--weight-regular) var(--step--2)/1.3 var(--font-mono); color: var(--color-text-muted); }
.readout table { width: 100%; border-collapse: collapse; }
.readout th, .readout td { padding: 0; font-weight: inherit; text-align: left; }
.readout tbody tr { border-top: 1px solid var(--color-border); }
.readout tbody th { padding: var(--space-4) var(--space-4) var(--space-4) 0; width: 38%; vertical-align: middle; }
.readout .tissue { display: block; font: var(--weight-medium) 0.9375rem/1.3 var(--font-text); color: var(--color-text); }
.readout .method { display: block; margin-top: 0.2rem; font: var(--weight-regular) var(--step--1)/1.35 var(--font-text); color: var(--color-text-muted); }
.readout td.bar-cell { width: 42%; vertical-align: middle; }
.readout td.val { width: 20%; padding-left: var(--space-4); text-align: right; font: var(--weight-medium) var(--step-0)/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--color-text); white-space: nowrap; }
.bar {
  --lo-p: calc((var(--lo) - 70) / 30 * 100%); --w-p: calc((var(--hi) - var(--lo)) / 30 * 100%);
  position: relative; height: 0.875rem;
  background:
    linear-gradient(var(--color-border-strong), var(--color-border-strong)) left 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--color-border-strong) 0 1px, transparent 1px calc(100% / 6)) left 50% / calc(100% + 1px) 7px no-repeat;
}
.bar-fill { position: absolute; top: 0; bottom: 0; left: var(--lo-p); width: max(var(--w-p), 4px); background: var(--color-accent); border-radius: 2px; transform-origin: left center; }
.readout tfoot td { padding-top: var(--space-3); }
.axis { display: flex; justify-content: space-between; font: var(--weight-regular) 0.75rem/1 var(--font-mono); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.axis span { width: 0; display: flex; justify-content: center; }
.readout-note { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); font-size: var(--step--1); color: var(--color-text-muted); }
.readout-note a { color: var(--color-accent); }
@media (max-width: 29.99rem) { .readout { padding: var(--space-4); } }
/* A narrow readout (phones, the 5-column data track at 64–80rem) stacks each row: label and value
   on one line, the bar under them at full width. */
@container readout (max-width: 28rem) {
  .readout table, .readout tbody, .readout tfoot { display: block; }
  .readout tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-4); }
  .readout tbody tr { padding-block: var(--space-4) var(--space-4); }
  .readout tbody th { grid-column: 1; width: auto; padding: 0 0 var(--space-4); }
  .readout td.val { grid-column: 2; grid-row: 1; width: auto; padding: 0.15rem 0 0; font-size: 0.9375rem; }
  .readout td.bar-cell { grid-column: 1 / -1; width: auto; }
  .readout tfoot td:empty { display: none; }
  .readout tfoot td { grid-column: 1 / -1; }
}

/* ==========================================================================
   17. Generic data table; >= 3 columns may stack into labelled rows < 48rem
   ========================================================================== */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); line-height: 1.5; }
.data-table caption { caption-side: top; text-align: left; padding-bottom: var(--space-4); font-size: var(--step--1); color: var(--color-text-muted); }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 1px solid var(--color-border); font-weight: inherit; }
.data-table th:last-child, .data-table td:last-child { padding-right: 0; }
.data-table thead th { padding-top: 0; font: var(--weight-medium) var(--step--2)/1.3 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); border-bottom-color: var(--color-border-strong); vertical-align: bottom; }
.data-table tbody th { font-weight: var(--weight-medium); color: var(--color-text); }
.data-table tbody tr { transition: background-color var(--dur-1) var(--ease-out); }
.data-table tbody tr:hover { background: var(--color-surface-hover); }
.data-table .num, .data-table .code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tr:target, .data-table tr.is-linked { background: var(--color-surface-tint); }
@media (max-width: 47.99rem) {
  .data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table--stack, .data-table--stack tbody, .data-table--stack tr, .data-table--stack th, .data-table--stack td { display: block; }
  .data-table--stack caption { display: block; text-align: left; }
  .data-table--stack tr { padding-block: var(--space-4); border-bottom: 1px solid var(--color-border); }
  .data-table--stack th, .data-table--stack td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-4); padding: 0.3rem 0; border: 0; }
  .data-table--stack [data-label]::before { content: attr(data-label); font: var(--weight-medium) var(--step--2)/1.6 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); }
  .data-table--stack :is(th, td):not([data-label]) { grid-template-columns: minmax(0, 1fr); }
}

/* Chronological record list (e.g. doctoral dissertations) */
.record-list { list-style: none; padding: 0; border-bottom: 1px solid var(--color-border); max-width: 52rem; }
.record { display: grid; gap: var(--space-2) var(--space-5); padding-block: var(--space-4); border-top: 1px solid var(--color-border); }
.record-year { font: var(--weight-medium) var(--step--1)/1.6 var(--font-mono); color: var(--color-accent); }
.record-title { color: var(--color-text); }
.record-meta { font-size: var(--step--1); color: var(--color-text-muted); }
@media (min-width: 48rem) {
  .record { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .record > :not(.record-year) { grid-column: 2; }
  .record-year { grid-row: 1 / span 3; }
}

/* ==========================================================================
   18. People: team grid, person card, founder feature, profile page, alumni CTA
   ========================================================================== */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--space-7) var(--grid-gap); list-style: none; padding: 0; }
/* Three members: 3 columns from 48rem; each card's rows (portrait, name, link) line up across the
   row through subgrid, so a name that wraps does not push its link below the others. The name size
   follows the list width (2.7cqi) until it reaches --step-1, so shorter names stay on one line in the
   narrow columns just above 48rem; the longest, "Vanr. prof. dr Ivana Stanković" (EN "Assoc. Prof.
   Dr. Ivana Stanković"), wraps there to two lines. */
@media (min-width: 48rem) {
  .people--3 { container-type: inline-size; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .people--3 > .person { grid-row: span 3; grid-template-rows: subgrid; }
  .people--3 .person-name { font-size: min(var(--step-1), 2.7cqi); }
}
.person { position: relative; display: grid; gap: var(--space-3); align-content: start; }
.person > .figure-frame { width: min(100%, 11rem); margin-bottom: var(--space-4); }
.person > .figure-frame--round { width: min(100%, 10.4rem); }
.person > .figure-frame:not(.figure-frame--round) { aspect-ratio: 4 / 5; }
.person-name { font: var(--weight-medium) var(--step-1)/1.2 var(--font-display); letter-spacing: -0.01em; }
.person-name a { color: var(--color-text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; transition: text-decoration-color var(--dur-1) var(--ease-out); }
.person-name a::after { content: ""; position: absolute; inset: 0; }
.person:hover .person-name a { text-decoration-color: currentColor; }
.person:hover .figure-frame--steel::after { opacity: 0.55; }
.person-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--step--1); color: var(--color-text-muted); }
/* Below 48rem a team member is a compact row: portrait beside name and link. */
@media (max-width: 47.99rem) {
  .people { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); }
  .people > .person { grid-template-columns: 6rem minmax(0, 1fr); column-gap: var(--space-5); row-gap: var(--space-2); }
  .people > .person > .figure-frame { grid-row: 1 / span 2; width: 100%; margin: 0; align-self: center; }
  .people .person-name { align-self: end; }
  .people .person-link { align-self: start; }
}

.person--feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--space-5); padding: clamp(1rem, 0.5rem + 2vw, 2rem); background: var(--color-surface-sunken); border-radius: var(--radius-md); }
.person--feature > .figure-frame { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 5; max-width: 18rem; margin: 0; }
.person--feature > .person-body { grid-column: 1 / -1; display: grid; gap: var(--space-4); align-content: center; }
.person--feature .person-name { font-size: var(--step-3); line-height: var(--lh-heading); letter-spacing: var(--track-heading); }
.person--feature .person-body > p { color: var(--color-text-muted); max-width: var(--measure); }
@media (min-width: 48rem) {
  .person--feature { grid-template-columns: var(--golden); column-gap: var(--golden-gap); }
  .person--feature > .figure-frame { grid-column: 1; max-width: none; }
  .person--feature > .person-body { grid-column: 2; }
}

.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); padding-block: var(--space-6); border-block: 1px solid var(--color-border); }
.cta-row .cta-text { display: grid; gap: var(--space-3); }
.cta-row h2, .cta-row h3 { font-size: var(--step-2); line-height: 1.15; }

/* Profile / long bio: sticky aside + prose */
.profile { display: grid; gap: var(--space-7) var(--grid-gap); }
.profile-aside { display: grid; gap: var(--space-4); align-content: start; max-width: 22rem; }
.profile-aside .figure-frame { aspect-ratio: 4 / 5; }
.profile-aside .figure-frame--round { width: min(100%, 10.4rem); aspect-ratio: 1; }
.profile-aside .person-name { font-size: var(--step-2); }
.profile-body { min-width: 0; }
.icon-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.icon-links a { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0 var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; font-size: var(--step--1); transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.icon-links a:hover { border-color: var(--steel-400); background: var(--color-surface-hover); }
.icon-links svg { width: 1.125rem; height: 1.125rem; color: var(--color-accent-brand); }
.profile-section { padding-top: var(--space-6); margin-top: var(--space-6); border-top: 1px solid var(--color-border); }
.profile-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.profile-section > h2 { font-size: var(--step-2); margin-bottom: var(--space-4); }
/* From 48rem a golden split: the aside, sticky, in the minor column beside the body. */
@media (min-width: 48rem) {
  .profile { grid-template-columns: var(--golden); column-gap: var(--golden-gap); }
  .profile-aside { grid-column: 1; align-self: start; position: sticky; top: calc(var(--header-h) + var(--space-6)); max-width: none; }
  .profile-body { grid-column: 2; }
}

/* ==========================================================================
   19. Books / publications (covers are never graded)
   ========================================================================== */
/* Seven books read as 4 + 3 from 48rem; below that each book is a horizontal card. */
.books { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-7) var(--grid-gap); list-style: none; padding: 0; }
@media (min-width: 48rem) { .books { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.book { display: grid; gap: var(--space-3); align-content: start; }
.book-cover { aspect-ratio: 2 / 3; display: grid; place-items: center; padding: var(--space-4); background: var(--n-50); border-radius: var(--radius-sm); margin-bottom: var(--space-4); }
/* One width for every cover, capped at 14rem (under the smallest cover's natural 225px). */
.book-cover img { width: min(100%, 14rem); max-height: 100%; height: auto; object-fit: contain; box-shadow: var(--shadow-2); border-radius: 1px; }
.book-title { font-size: var(--step-1); line-height: var(--lh-snug); }
.book-authors { font-size: var(--step--1); color: var(--color-text-muted); }
.book-pub { font-size: var(--step--1); color: var(--color-text); }
.book-isbn { font: var(--weight-regular) var(--step--2)/1.4 var(--font-mono); letter-spacing: var(--track-mono); color: var(--color-text-muted); }
.book-isbn .data { user-select: all; color: var(--color-text); white-space: nowrap; }
/* 48–56rem: the four-column cards are too narrow for most "ISBN: number" lines, so every number
   starts its own line and all seven read alike. */
@media (min-width: 48rem) and (max-width: 55.99rem) { .book-isbn .data { display: block; } }
@media (max-width: 47.99rem) {
  .book { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: var(--space-4); }
  .book-cover { grid-row: 1 / span 5; margin: 0; padding: var(--space-3); align-self: start; }
}

/* ==========================================================================
   20. Partners (collaboration with images; practice partners text-only)
   ========================================================================== */
.partners { list-style: none; padding: 0; border-bottom: 1px solid var(--color-border); }
.partner { display: grid; gap: var(--space-4) var(--grid-gap); padding-block: var(--space-6); border-top: 1px solid var(--color-border); }
.partner .figure-frame { aspect-ratio: 4 / 3; max-width: 16rem; }
.partner-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); align-content: start; min-width: 0; }
.partner-body a.link { overflow-wrap: anywhere; }
.partner-grid .partner-body a.link { font-size: var(--step--1); }
.partner-name { font-size: var(--step-1); line-height: var(--lh-snug); }
.partner-place { font-size: var(--step--1); color: var(--color-text-muted); }
.partner-body .prose { max-width: var(--measure); }
@media (min-width: 48rem) {
  .partner { grid-template-columns: 16rem minmax(0, 1fr); }
  .partner--text { grid-template-columns: minmax(0, 1fr); }
}
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 0 var(--grid-gap); list-style: none; padding: 0; }
.partner-grid .partner { border-top: 1px solid var(--color-border); padding-block: var(--space-5); }
/* Five partners read as 3 + 2 from 48rem; the auto-fill track would leave one alone (2 + 2 + 1 or 4 + 1). */
@media (min-width: 48rem) { .partner-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   21. Projects
   ========================================================================== */
/* The list (and its rules) keeps the prose measure, like the outlines above it. */
.projects { list-style: none; padding: 0; border-bottom: 1px solid var(--color-border); counter-reset: project; max-width: var(--measure); }
.project { display: grid; gap: var(--space-3); padding-block: var(--space-5); border-top: 1px solid var(--color-border); counter-increment: project; }
.project h3 { font: var(--weight-semibold) var(--step-0)/1.4 var(--font-text); letter-spacing: 0; max-width: 60ch; }
.project p { max-width: var(--measure); color: var(--color-text-muted); }
.project .project-meta { max-width: none; font-size: var(--step--1); color: var(--color-text-muted); }
.project-meta .data { white-space: nowrap; }
.project ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-3); max-width: var(--measure); }
.project ul li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-4); font-size: var(--step--1); color: var(--color-text-muted); }
.project ul li .data { color: var(--color-accent); font-weight: var(--weight-medium); }
@media (min-width: 64rem) {
  .projects--numbered { max-width: calc(var(--measure) + 3rem + var(--space-5)); }
  .projects--numbered .project { grid-template-columns: 3rem minmax(0, 1fr); column-gap: var(--space-5); }
  .projects--numbered .project::before { content: counter(project, decimal-leading-zero); grid-row: 1 / span 4; font: var(--weight-medium) var(--step--1)/1.9 var(--font-mono); color: var(--color-text-subtle); }
  .projects--numbered .project > * { grid-column: 2; }
}

/* ==========================================================================
   22. News: featured card, grid, article
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--space-7) var(--grid-gap); list-style: none; padding: 0; }
.news-card { position: relative; display: grid; gap: var(--space-4); align-content: start; }
.news-card .figure-frame { aspect-ratio: 3 / 2; transition: box-shadow var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out-quint); }
.news-card:hover .figure-frame { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.news-date { font: var(--weight-regular) var(--step--2)/1.4 var(--font-mono); letter-spacing: var(--track-mono); color: var(--color-text-muted); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.news-title { font-size: var(--step-1); line-height: var(--lh-snug); }
.news-title a { color: var(--color-text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; transition: text-decoration-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.news-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.news-card:hover .news-title a { text-decoration-color: currentColor; }
.news-summary { font-size: var(--step--1); line-height: 1.55; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { display: block; margin-top: var(--space-3); }
.news-card:hover .news-more .i-arrow { transform: translateX(3px); }
.news-card--featured { grid-column: 1 / -1; gap: var(--space-5) var(--grid-gap); padding: clamp(1rem, 0.5rem + 2vw, 2rem); background: var(--color-surface-sunken); border-radius: var(--radius-md); }
.news-card--featured .news-body { display: grid; gap: var(--space-4); align-content: center; }
.news-card--featured .news-title { font-size: var(--step-3); line-height: var(--lh-heading); letter-spacing: var(--track-heading); }
/* The single featured card shows its whole summary (clamping would cut it under text-spacing overrides). */
.news-card--featured .news-summary { display: block; font-size: var(--step-0); -webkit-line-clamp: none; line-clamp: none; overflow: visible; max-width: 52ch; }
.news-card--featured .figure-frame--mat { background: var(--n-0); border-color: var(--n-100); }
/* The image column is only as wide as the (never upscaled) image needs, up to the minor golden share. */
@media (min-width: 48rem) {
  .news-card--featured { grid-template-columns: fit-content(38.2%) minmax(0, 1fr); column-gap: var(--space-7); align-items: center; }
}
.news-empty { padding: var(--space-6); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-text-muted); }

/* Article page: breadcrumb, head and article share one centred reading column (.wrap--narrow). */
.article { display: grid; gap: var(--space-5); max-width: 48rem; }
.article-head { display: grid; gap: var(--space-4); }
.article-head .h-page, .article-head h1 { font-size: var(--step-4); line-height: 1.06; letter-spacing: var(--track-display); max-width: 28ch; }
.article-lead { font-size: var(--step-1); line-height: 1.5; color: var(--color-text); }
.article-body { max-width: var(--measure); }
.article-body > * + * { margin-top: 1em; }
.article-body h2 { font-size: var(--step-2); margin-top: 1.5em; }
.article-body h3 { font-size: var(--step-1); margin-top: 1.5em; }
/* A lead that runs on into the title line ("… Vas pozivaju na" / "promociju knjige …") stays one block. */
.article-body > .article-lead + h2 { margin-top: var(--space-3); }
.article-body ul { padding-left: 1.3em; }
.article-body li + li { margin-top: 0.4em; }
.article-body li::marker { color: var(--color-accent-brand); }
/* Strip of small article images (photos, logos): one height, each on a light mat, never upscaled
   beyond the strip height (the sources are about 170–225px tall). */
.article-strip { --strip-h: 10rem; display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4); }
.article-strip img {
  box-sizing: border-box; height: var(--strip-h); width: auto; max-width: 100%; object-fit: contain;
  padding: 0.5rem; background: var(--n-50); border: 1px solid var(--n-100); border-radius: var(--radius-sm);
}
@media (max-width: 47.99rem) { .article-strip { --strip-h: 6.5rem; gap: var(--space-3); } }
/* Below 30rem the strip height follows the viewport, so three small images stay on one row down to 320px. */
@media (max-width: 29.99rem) { .article-strip { --strip-h: min(5.25rem, 24vw - 0.5rem); } }
.article-plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); max-width: 34rem; }
/* Plates share one 2:3 box, so covers of slightly different proportions end on one line. */
.article-plates img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-xs); box-shadow: var(--shadow-2); }

/* ==========================================================================
   23. Dialog (news article); bottom sheet below 48rem
   ========================================================================== */
.dialog {
  width: min(48rem, 100vw - 2rem); max-width: none; max-height: calc(100dvh - 4rem); margin: auto; padding: 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-3) var(--ease-out-quint), overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete;
}
.dialog[open] { display: flex; flex-direction: column; opacity: 1; transform: none; transition-duration: var(--dur-3); }
@starting-style { .dialog[open] { opacity: 0; transform: translateY(12px); } }
.dialog::backdrop { background: rgb(16 29 35 / 0); transition: background-color var(--dur-3) var(--ease-out), overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete; }
.dialog[open]::backdrop { background: var(--backdrop); }
@starting-style { .dialog[open]::backdrop { background: rgb(16 29 35 / 0); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3.75rem; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); border-bottom: 1px solid var(--color-border); flex: none; }
.dialog-head-meta { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.dialog-head-meta a { font-size: var(--step--1); white-space: nowrap; }
.dialog-body { overflow-y: auto; overscroll-behavior: contain; padding: var(--space-6) var(--space-6) var(--space-7); }
.dialog-body:focus-visible { outline-offset: -3px; }
/* Loading: a static skeleton (heading bar + three text lines), no looping animation. */
.dialog[aria-busy="true"] .dialog-body {
  min-height: 14rem;
  background:
    linear-gradient(var(--n-100), var(--n-100)) var(--space-6) var(--space-6) / 55% 1.75rem no-repeat,
    linear-gradient(var(--n-50), var(--n-50)) var(--space-6) calc(var(--space-6) + 3.25rem) / calc(100% - 2 * var(--space-6)) 0.875rem no-repeat,
    linear-gradient(var(--n-50), var(--n-50)) var(--space-6) calc(var(--space-6) + 5rem) / calc(100% - 2 * var(--space-6)) 0.875rem no-repeat,
    linear-gradient(var(--n-50), var(--n-50)) var(--space-6) calc(var(--space-6) + 6.75rem) / 62% 0.875rem no-repeat;
}
.dialog .article { padding: 0; max-width: none; }
.dialog .article-head .news-meta { display: none; }
.dialog .article-head h1 { font-size: var(--step-3); }
@media (max-width: 47.99rem) {
  .dialog {
    width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0;
    opacity: 1; transform: translateY(100%);
    transition: transform var(--dur-4) var(--ease-out-quint), overlay var(--dur-4) allow-discrete, display var(--dur-4) allow-discrete;
  }
  .dialog[open] { transform: none; transition-duration: var(--dur-4); }
  @starting-style { .dialog[open] { transform: translateY(100%); } }
  .dialog-head { padding-left: var(--space-4); }
  .dialog-body { padding: var(--space-5) var(--space-4) var(--space-7); }
}

/* ==========================================================================
   24. Contact list and map facade
   ========================================================================== */
.contact-grid { display: grid; gap: var(--space-7) var(--grid-gap); }
/* Side by side from 48rem (halves), from 64rem a golden split: the details minor, the map major. */
@media (min-width: 48rem) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (min-width: 64rem) { .contact-grid { grid-template-columns: var(--golden); column-gap: var(--golden-gap); } }
.contact-title { margin-bottom: var(--space-5); font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.012em; }
/* Icon column + label above value, so values get the full width and the icon sits on the label. */
.contact-list { display: grid; gap: 0; border-bottom: 1px solid var(--color-border); }
.contact-list > div { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.25rem var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--color-border); }
.contact-list svg { grid-row: 1 / span 2; align-self: start; width: 1.25rem; height: 1.25rem; margin-top: -0.125rem; color: var(--color-accent-brand); }
.contact-list dt, .contact-list dd { grid-column: 2; }
.contact-list dt { font: var(--weight-medium) var(--step--2)/1.3 var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--color-text-muted); }
.contact-list dd { margin: 0; }
.contact-list dd a { color: var(--color-text); text-decoration-color: var(--steel-300); }
.contact-list dd a:hover { color: var(--color-accent); text-decoration-color: currentColor; }

.map-facade { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: var(--n-50); border: 1px solid var(--color-border); isolation: isolate; }
/* Before loading the facade grows past 4:3 when its card needs more height (narrow phones, text
   spacing); only the loaded iframe is clipped to the box. */
.map-facade.is-loaded { overflow: hidden; }
.map-facade::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.9; border-radius: inherit;
  background:
    linear-gradient(var(--n-100) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    linear-gradient(90deg, var(--n-100) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    linear-gradient(28deg, transparent 47%, var(--n-0) 47% 53%, transparent 53%) 0 0 / 100% 100%,
    linear-gradient(-62deg, transparent 58%, var(--n-0) 58% 61%, transparent 61%) 0 0 / 100% 100%;
}
.map-card { display: grid; justify-items: center; gap: var(--space-4); max-width: 20rem; padding: var(--space-5); text-align: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-2); }
.map-pin { width: 1.75rem; height: 1.75rem; color: var(--color-accent); }
.map-card address { font-size: var(--step--1); color: var(--color-text-muted); }
.map-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-facade.is-loaded { background: var(--n-100); }
.map-facade.is-loaded::before { display: none; }
/* Without JS there is no button, so the note about opening the map goes too; the Maps link below works. */
html:not(.js) .map-facade :is([data-map-load], .map-card > p) { display: none; }
.map-links { margin-top: var(--space-4); }

/* ==========================================================================
   25. Sub-navigation (siblings within a section) with edge fade
   ========================================================================== */
.subnav { position: relative; isolation: isolate; border-bottom: 1px solid var(--color-border); }
.subnav-list { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.subnav-list::-webkit-scrollbar { display: none; }
.subnav-link { position: relative; display: block; padding: var(--space-4) 0; font: var(--weight-medium) 0.9375rem/1.25 var(--font-text); color: var(--color-text-muted); text-decoration: none; white-space: nowrap; scroll-snap-align: center; transition: color var(--dur-1) var(--ease-out); }
.subnav-link:hover, .subnav-link[aria-current] { color: var(--color-text); }
.subnav-link:focus-visible { outline-offset: -2px; }
.subnav-indicator { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--color-accent-brand); border-radius: 1px; view-transition-name: subnav-indicator; }
.subnav::before, .subnav::after { content: ""; position: absolute; z-index: 1; top: 0; bottom: 1px; width: 2.5rem; pointer-events: none; opacity: 0; transition: opacity var(--dur-2) var(--ease-out); }
/* Each fade paints above the tabs (the links are positioned) and carries a chevron (--color-text-muted), so "more tabs" reads even when no tab peeks past the edge. */
.subnav::before { left: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7.5 2.5 4 6l3.5 3.5' fill='none' stroke='%2355636a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left 0.125rem center / 0.75rem no-repeat, linear-gradient(270deg, rgb(255 255 255 / 0), var(--color-bg) 55%); }
.subnav::after { right: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5 8 6 4.5 9.5' fill='none' stroke='%2355636a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 0.125rem center / 0.75rem no-repeat, linear-gradient(90deg, rgb(255 255 255 / 0), var(--color-bg) 55%); }
.subnav.has-more-start::before, .subnav.has-more-end::after { opacity: 1; }
html:not(.js) .subnav::after { opacity: 1; }
@media (min-width: 64rem) { html:not(.js) .subnav::after { opacity: 0; } }

/* Link grid: compact list of destinations (404, section shortcuts) */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0 var(--grid-gap); list-style: none; padding: 0; }
.link-grid li { border-top: 1px solid var(--color-border); }
.link-grid a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3.25rem; padding-block: var(--space-4); color: var(--color-text); text-decoration: none; font-weight: var(--weight-medium); transition: color var(--dur-1) var(--ease-out); }
.link-grid a:hover { color: var(--color-accent); }
.link-grid .i-arrow { color: var(--color-accent-brand); transition: transform var(--dur-2) var(--ease-out-quint); }
.link-grid a:hover .i-arrow { transform: translateX(3px); }

/* ==========================================================================
   26. Notes, 404
   ========================================================================== */
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--color-surface-tint); border: 1px solid var(--steel-200); border-radius: var(--radius-md); font-size: var(--step--1); color: var(--color-text); max-width: 48rem; }
.note svg { width: 1.125rem; height: 1.125rem; margin-top: 0.15rem; color: var(--color-accent); }

.error-page { display: grid; gap: var(--space-7) var(--grid-gap); padding-block: var(--space-7) var(--space-section); }
.error-code { display: flex; align-items: baseline; gap: var(--space-4); font: var(--weight-medium) var(--step--1)/1 var(--font-text); color: var(--color-accent); }
/* Large-text contrast: --steel-500 is 3.9:1 on white (the number is aria-hidden; the h1 carries the message). */
.error-code .data { font: var(--weight-regular) clamp(3.5rem, 2rem + 6vw, 7rem)/0.9 var(--font-mono); letter-spacing: -0.04em; color: var(--steel-500); }
.error-block { display: grid; gap: var(--space-4); align-content: start; }
.error-block p { color: var(--color-text-muted); max-width: 44ch; }
.error-block + .error-block { padding-top: var(--space-6); border-top: 1px solid var(--color-border); }
@media (min-width: 48rem) { .error-page > .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Two blocks side by side share row tracks (subgrid), so heading, text and button line up. */
@media (min-width: 64rem) {
  .error-page { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .error-page > .error-code { grid-column: 1 / -1; }
  .error-block { grid-column: 1 / span 5; grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--space-4); }
  .error-block + .error-block { grid-column: 7 / span 5; padding-top: 0; border-top: 0; padding-left: var(--grid-gap); border-left: 1px solid var(--color-border); }
  .error-block > :is(h1, h2) { align-self: end; }
  .error-page > .link-grid { grid-column: 1 / -1; }
}

/* ==========================================================================
   27. Motion: reveal, view transitions, reduced motion, print
   Nothing is hidden without JS; only elements below the fold at load get
   data-reveal="pending", and never on a view-transition arrival.
   ========================================================================== */
.js-reveal [data-reveal] { transition: opacity var(--dur-5) var(--ease-out), transform var(--dur-5) var(--ease-out-quint); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.js-reveal [data-reveal="pending"] { opacity: 0; transform: translateY(14px); transition: none; }
/* Sequenced reveals end within about 700ms: axis 60–509ms, items 80ms + 40ms × i, bars 80ms + 40ms × i.
   The axis is uncovered left to right by a clip-path, so its ticks and year labels are never scaled; the
   clip reaches 2rem past each end because the edge labels overhang the axis box. */
.js-reveal [data-reveal] .tl-axis { clip-path: inset(-1rem -2rem); transition: clip-path var(--dur-5) var(--ease-out-quint) 60ms; }
.js-reveal [data-reveal="pending"] .tl-axis { clip-path: inset(-1rem calc(100% + 2rem) -1rem -2rem); transition: none; }
.js-reveal [data-reveal] .tl-item { transition: opacity var(--dur-5) var(--ease-out), transform var(--dur-5) var(--ease-out-quint); transition-delay: calc(80ms + var(--i, 0) * 40ms); }
.js-reveal [data-reveal="pending"] .tl-item { opacity: 0; transform: translateY(8px); transition: none; }
.js-reveal [data-reveal] .bar-fill { transition: transform var(--dur-5) var(--ease-out-quint); transition-delay: calc(80ms + var(--i, 0) * 40ms); }
.js-reveal [data-reveal="pending"] .bar-fill { transform: scaleX(0); transition: none; }
/* site.js never marks anything pending on a view-transition arrival; this only guards a late
   vt-arrival flag, and resets nothing but the properties the reveal itself sets. */
.vt-arrival [data-reveal="pending"],
.vt-arrival [data-reveal="pending"] :is(.tl-axis, .tl-item, .bar-fill) { opacity: 1; transform: none; clip-path: none; transition: none; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(site-header) { display: none; }
::view-transition-new(site-header) { animation: none; }
::view-transition-group(site-header) { animation: none; }
::view-transition-group(nav-indicator), ::view-transition-group(subnav-indicator) { animation-duration: var(--dur-3); animation-timing-function: var(--ease-out-quint); }
/* Section detail pages: the breadcrumb trail and the sub-nav (the same y on every sibling) cross-fade in
   place while the content below them fades and rises. Their groups never travel, so leaving a scrolled
   page (the pager at the bottom) does not slide them in from off-screen; the current-tab indicator
   glides inside the sub-nav's group where nested groups are supported. A page without them fades them
   in, or out as fast as the old page. */
.page-head > .subnav { view-transition-name: subnav; view-transition-group: contain; }
.page-head > .breadcrumb:has(+ .subnav) { view-transition-name: trail; }
::view-transition-group(subnav), ::view-transition-group(trail) { animation: none; }
::view-transition-old(subnav), ::view-transition-new(subnav),
::view-transition-old(trail), ::view-transition-new(trail) { animation-duration: var(--dur-3); animation-timing-function: var(--ease-out); }
::view-transition-old(subnav):only-child, ::view-transition-old(trail):only-child { animation-duration: var(--dur-1); }
::view-transition-old(root) { animation: vt-out var(--dur-1) var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in var(--dur-3) var(--ease-out-quint) 60ms both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* Reduced motion: no animation, no movement on hover or open. Static orientation (back arrows
   mirrored with scaleX(-1)) stays. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .pager a:hover, .news-card:hover .figure-frame { transform: none; }
  .dialog, .dialog[open] { transform: none; }
  .btn:hover :is(.i-arrow, .i-ext), .link-arrow:hover :is(.i-arrow, .i-ext), .index-row:hover .index-arrow,
  .link-grid a:hover .i-arrow, .news-card:hover .news-more .i-arrow, .pager .pager-next:hover .i-arrow { transform: none; }
  .link-arrow--back:hover .i-arrow, .pager .pager-prev:hover .i-arrow { transform: scaleX(-1); }
  .nav-item[data-open] .dd-list > li { animation: none; }
  .drawer-group::details-content { transition: none; }
}

@media print {
  .site-header, .drawer, .skip-link, .subnav, .rail, .pager, .dialog, .map-facade, .year-switch { display: none !important; }
  [data-reveal], [data-reveal] :is(.tl-axis, .tl-item, .bar-fill) { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .band--ink { background: #fff; color: #000; --color-text: #000; --color-text-muted: #333; }
  .figure-frame--steel > img { filter: none; }
  .figure-frame--steel::after { display: none; }
  a { color: inherit; }
}

/* ==========================================================================
   28. Home page composition
   ========================================================================== */
.hero + .section { padding-top: 0; }
.omis-figure { margin-top: var(--space-4); }
.section--end { padding-bottom: var(--space-7); }
.section-head--split > p { align-self: end; }

/* ==========================================================================
   29. Neural field and card glow (site.js)
   site.js adds the field layer, the canvases and .has-neural, and sets --mx/--my on cards, so
   without JS nothing here applies. The field is decorative: under all content, no pointer events.
   ========================================================================== */
/* Colours read by site.js: the page's and a contained field's, and the ink band's (a "stain"). */
body, [data-neural] { --neural-node: var(--steel-500); --neural-link: var(--steel-400); --neural-signal: var(--steel-600); }
.band--ink, [data-neural="ink"] { --neural-node: var(--steel-300); --neural-link: var(--steel-400); --neural-signal: var(--steel-100); }
.has-neural { position: relative; isolation: isolate; }
.has-neural > .neural { position: absolute; inset: 0; z-index: -1; grid-area: auto; display: block; width: 100%; height: 100%; margin: 0; pointer-events: none; }
/* The page field: a layer exactly the size of <body>, under every block, that clips its canvas, so it
   never adds to the document's size. site.js moves the canvas (viewport + overscan) inside it. */
.neural--page { overflow: clip; contain: strict; }
.neural--page > canvas { position: absolute; top: 0; left: 0; display: block; }
/* Full-bleed backgrounds paint under the field, so the field runs on through them: the sunken tints
   show it in the page's colours, the ink band in its own (site.js). The footer is transparent. */
body.has-neural :is(.band--sunken, .band--ink, .footer-base) { position: relative; background: none; }
body.has-neural :is(.band--sunken, .band--ink, .footer-base)::before {
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; pointer-events: none; background: var(--color-surface-sunken);
}
body.has-neural .band--ink::before { background: var(--color-inverse-bg); }
body.has-neural .site-footer { background: none; }
/* Under the condensed header the field runs on faintly: site.js draws it on a band canvas inside the
   header, above the frosted glass and under the bar. Not where the header stays opaque. */
.site-header > .neural-band {
  position: absolute; top: 0; left: 0; z-index: -1; display: block; width: 100%; height: var(--header-h-condensed);
  pointer-events: none; opacity: 0; transition: opacity var(--dur-3) var(--ease-out);
}
.site-header[data-scrolled] > .neural-band { opacity: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header > .neural-band { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header > .neural-band { display: none; }
}
@media print {
  .neural, .neural-band, body.has-neural :is(.band--sunken, .band--ink, .footer-base)::before { display: none; }
}

/* Card glow: a light layer under the card's content, centred on the pointer. Sunken cards light up
   towards white; white cards and washes towards --steel-100. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .js :is(.pager a, .news-card--featured, .person--feature, .people > .person) { position: relative; isolation: isolate; }
  .js :is(.pager a, .news-card--featured, .person--feature, .people > .person)::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(circle 16rem at var(--mx, 50%) var(--my, 50%), var(--glow, color-mix(in oklab, var(--steel-100) 70%, transparent)), transparent);
    transition: opacity var(--dur-3) var(--ease-out);
  }
  .js :is(.news-card--featured, .person--feature) { --glow: var(--n-0); }
  /* Team cards have no box: the light sits on a wash that reaches 1rem past the card, like an index row. */
  .js .people > .person::before {
    inset: calc(-1 * var(--space-4)); border-radius: var(--radius-md);
    background: radial-gradient(circle 16rem at calc(var(--mx, 50%) + var(--space-4)) calc(var(--my, 50%) + var(--space-4)), color-mix(in oklab, var(--steel-100) 70%, transparent), transparent), var(--color-surface-hover);
  }
  .js :is(.pager a, .news-card--featured, .person--feature, .people > .person):hover::before { opacity: 1; }
  .js .index-list > .index-row::before {
    background-image: radial-gradient(circle 22rem at calc(var(--mx, 50%) + var(--space-4)) calc(var(--my, 50%) + 1px), color-mix(in oklab, var(--steel-100) 70%, transparent), transparent);
  }
}
/* The pager's border brightens near the pointer: a ring masked to the 1px border. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  @supports (mask-composite: exclude) {
    .js .pager a::after {
      content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none; opacity: 0;
      background: radial-gradient(circle 9rem at calc(var(--mx, 50%) + 1px) calc(var(--my, 50%) + 1px), var(--steel-500), transparent);
      mask: linear-gradient(var(--n-0) 0 0) content-box exclude, linear-gradient(var(--n-0) 0 0);
      transition: opacity var(--dur-3) var(--ease-out);
    }
    .js .pager a:hover::after { opacity: 1; }
  }
}

/* ==========================================================================
   30. Golden construction (φ)
   The hero photo and the landscape lab photos sit in φ:1 frames, cropped per image so the subject
   stays in frame. Over the hero photo site.js draws the golden rectangle's construction (svg.golden):
   the nested squares and the quarter-arc spiral, whose eye sits on the sample under the microscope
   objective. Without JS the photo simply sits in its frame.
   ========================================================================== */
/* The hero photo is drawn at 117.66% from its top left, so the sample (61.5%, 56.3% of the image) lands
   on the spiral's eye (72.36%, 72.36% of the frame). Re-aim both numbers when the photo changes. */
.hero-figure .figure-frame > img { width: 117.66%; height: 117.66%; max-width: none; object-position: 0 48.7%; }
/* Landscape lab photos (documentary shots keep their mat and, with --natural, their natural width). */
.figure-frame > img:is([src*="/rana-dijagnostika/"], [src*="/racunarska-sala/"], [src*="/nanolab/nanolab-2"], [src*="/nanolab/nanolab-3"], [src*="/nanolab/nanolab-4"], [src*="/nanolab/nanolab-5"]) {
  aspect-ratio: var(--phi, 1.618034) / 1; height: auto; object-fit: cover;
}
.figure-frame > img[src*="/rana-dijagnostika/"] { object-position: 85% 50%; }
.figure-frame > img[src*="/racunarska-sala/"] { object-position: 50% 40%; }
.figure-frame > img[src*="/nanolab/nanolab-2"] { object-position: 50% 62%; }
.figure-frame > img[src*="/nanolab/nanolab-3"] { object-position: 50% 70%; }
.figure-frame > img[src*="/nanolab/nanolab-4"] { object-position: 50% 80%; }

/* The construction: hairlines of light over the photo, a whisper at rest. On hover (a fine pointer
   without reduced motion) the squares brighten and the spiral traces itself from the frame's corner
   into its eye (--ease-out-quint: an even angular speed), then the eye's ring appears, all within
   --dur-3 + --dur-1 (412ms). Leaving fades the trace and ring out in --dur-2. */
.golden { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; pointer-events: none; }
.golden path, .golden circle { fill: none; stroke: var(--n-0); stroke-width: 1; vector-effect: non-scaling-stroke; }
.golden-squares { opacity: 0.1; }
.golden-spiral { opacity: 0.14; }
.golden-trace, .golden-eye { opacity: 0; }
.golden-trace { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .golden-squares { transition: opacity var(--dur-3) var(--ease-out); }
  .golden-trace { transition: opacity var(--dur-2) var(--ease-out), stroke-dashoffset 0s linear var(--dur-2); }
  .golden-eye { transition: opacity var(--dur-2) var(--ease-out); }
  .figure-frame:hover > .golden .golden-squares { opacity: 0.26; }
  .figure-frame:hover > .golden .golden-trace { opacity: 0.62; stroke-dashoffset: 0; transition: opacity 60ms linear, stroke-dashoffset var(--dur-4) var(--ease-out-quint); }
  .figure-frame:hover > .golden .golden-eye { opacity: 0.62; transition: opacity var(--dur-1) var(--ease-out) var(--dur-3); }
}
@media print { .golden { display: none; } }
