/* ==========================================================================
   Pertimm — "Obsidian Prism" design system
   Ink canvas, pearl type, spectral light. Colour appears only where light is.
   Reference: DESIGN-SYSTEM.md · live examples: styleguide.html

   1  Fonts                 9  Page hero & prism light (lite)
   2  Tokens & themes      10  Media & frames
   3  Reset & base         11  Cards (solution · case · project · person · post)
   4  Layout               12  Data (stats · steps · numerals · spec lists)
   5  Typography           13  Logos, marquee, chips, badges, filters
   6  Buttons & links      14  Disclosure (accordion · tabs · dialog · toast · copy)
   7  Header & menu        15  CTA band, story, prose & TOC, kinetic type
   8  Footer & bookend     16  Forms · 17 Motion · 18 Utilities · 19 Reduced motion/print
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
/* Google Fonts subsets (same files, same unicode-range), self-hosted. A subset is only
   downloaded when the page uses one of its characters. Order matters: for overlapping
   ranges the LAST matching @font-face wins, so the small extra subsets come first.
   vietnamese: photo credits (Thắng-Nhật Trần) · arrows: ← → (latin already has ↑ ↓).
   fonts-embedded.css (file:// only) is generated from this section: tools/embed_fonts.py */
@font-face {
  font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/mona-sans-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/mona-sans-arrows.woff2") format("woff2");
  unicode-range: U+2190, U+2192;
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("../fonts/newsreader-italic-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/mona-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/mona-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;
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("../fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens & themes ------------------------------------------------------ */
:root {
  /* Constants (never re-mapped) */
  --ink: #05060b;
  --ink-1: #080a13;
  --ink-2: #0c0f1c;
  --ink-3: #121729;
  --navy: #0a1433;
  --navy-deep: #06122d;            /* the prism hexagon */
  --navy-2: #0e1a3f;
  --navy-3: #15224d;
  --pearl: #f0edf7;
  --paper: #f3f2f7;
  --orchid: #e49cf2;
  --iris: #a68cff;
  --periwinkle: #a3bdf4;
  --glacier: #8ad4ff;
  --violet: #5b3fd6;
  --spectrum: linear-gradient(100deg, var(--orchid) 0%, var(--iris) 45%, var(--glacier) 100%);
  --spectrum-soft: linear-gradient(100deg, rgb(228 156 242 / .5), rgb(166 140 255 / .5) 45%, rgb(138 212 255 / .5));
  --spectrum-deep: linear-gradient(100deg, #a13fc4 0%, #5b3fd6 50%, #1f6fb2 100%);
  --navy-panel: radial-gradient(90% 70% at 85% 0%, rgb(40 52 120 / .45), transparent 70%), linear-gradient(180deg, var(--navy) 0%, #081230 100%);

  /* Semantic tokens — dark (ink) theme. Re-mapped by .theme-paper / .theme-navy / .slab */
  --bg: var(--ink);
  --bg-raised: var(--ink-1);
  --surface: #0a0c15;
  --surface-2: var(--ink-2);
  --surface-3: var(--ink-3);
  --fg: #f0edf7;                   /* headings, primary text   17.5:1 on ink */
  --fg-2: #b4b7c9;                 /* body                     10.2:1 */
  --fg-3: #8b90a7;                 /* meta, captions            6.4:1 */
  --fg-4: #5d6278;                 /* decorative only, never text */
  --fg-hover: #ffffff;
  --on-fg: var(--ink);             /* text on a --fg fill (primary button, selected chip) */
  --line: rgb(240 237 247 / .1);
  --line-2: rgb(240 237 247 / .18);
  --line-3: rgb(240 237 247 / .32);
  --control-border: rgb(240 237 247 / .46); /* form controls: 3.9:1 on the field (WCAG 1.4.11) */
  --illum-floor: .5;               /* dimmest word of [data-illuminate]: 4.7:1 */
  --accent: var(--iris);           /* markers, underlines, rails (non-text) */
  --accent-text: #c8b8ff;          /* accent used as text (AA) */
  --focus: #c8b8ff;
  --text-spectrum: var(--spectrum);
  --glow: rgb(166 140 255 / .45);
  --field-bg: rgb(240 237 247 / .035);
  --ghost-bg: rgb(5 6 11 / .55);   /* ghost button face (translucent over imagery on ink) */
  --scrim: 5 6 11;                 /* rgb triplet used by overlays: rgb(var(--scrim) / .8) */
  --logo-filter: brightness(0) invert(1);
  --logo-opacity: .86;
  --grade: saturate(.8) contrast(1.04) brightness(.88);
  --grade-hover: saturate(.9) contrast(1.03) brightness(.96);
  --media-tint: linear-gradient(150deg, rgb(10 20 51 / .34), rgb(60 50 120 / .16) 55%, rgb(20 60 110 / .22));
  --ok: #7ee2b8;
  --warn: #ffc97a;
  --danger: #ff8fa3;
  --info: #8ad4ff;

  /* Fonts */
  --font-sans: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  /* Type scale (fluid, 360 → 1920) */
  --step--2: clamp(.75rem, .73rem + .08vw, .8125rem);
  --step--1: clamp(.8125rem, .79rem + .12vw, .9rem);
  --step-0: clamp(1rem, .97rem + .14vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.05rem + .32vw, 1.375rem);
  --step-2: clamp(1.3125rem, 1.18rem + .6vw, 1.75rem);
  --step-3: clamp(1.625rem, 1.33rem + 1.3vw, 2.625rem);
  --step-4: clamp(2.25rem, 1.55rem + 3.1vw, 4.75rem);
  --step-5: clamp(2.75rem, 1.45rem + 5.8vw, 8rem);
  --step-6: clamp(3.5rem, .6rem + 12.8vw, 14rem);

  --track-display: -.05em;
  --track-h2: -.042em;
  --track-h3: -.028em;

  /* Spacing — section rhythm tightened ~30% vs the first concept */
  --space-3xs: .25rem;
  --space-2xs: .5rem;
  --space-xs: .75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem);
  --space-xl: clamp(2.25rem, 1.7rem + 2.2vw, 3.75rem);
  --space-2xl: clamp(3rem, 2rem + 4.2vw, 5.75rem);
  --space-section: clamp(3.75rem, 2.4rem + 5.4vw, 7.5rem);
  --gutter: clamp(1rem, .4rem + 3.2vw, 3.5rem);
  --max: 1440px;
  --measure: 62ch;
  --header-h: 76px;

  /* Shape — the bevel echoes the 30° facets of the Pertimm hexagon */
  --radius-xs: 2px;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --radius-pill: 999px;
  --cut: 10px;
  --bevel: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);

  /* Depth */
  --shadow-1: 0 1px 0 rgb(255 255 255 / .04) inset, 0 12px 32px -18px rgb(0 0 0 / .8);
  --shadow-2: 0 1px 0 rgb(255 255 255 / .06) inset, 0 40px 80px -40px rgb(0 0 0 / .9);

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --dur-1: .18s;
  --dur-2: .42s;
  --dur-3: .9s;
  --dur-4: 1.4s;

  color-scheme: dark;
}
@media (max-width: 1079px) { :root { --header-h: 64px; } }

/* Paper chapter — long-form readability and rhythm. Every component re-maps. */
.theme-paper {
  --bg: var(--paper);
  --bg-raised: #fbfaff;
  --surface: #ffffff;
  --surface-2: #f8f7fc;
  --surface-3: #ebe9f3;
  --fg: #07102b;                   /* 16.9:1 on paper */
  --fg-2: #3a4360;                 /*  8.8:1 */
  --fg-3: #58617d;                 /*  5.5:1 */
  --fg-4: #a3a8bb;
  --fg-hover: #17224d;
  --on-fg: var(--paper);
  --line: rgb(7 16 43 / .1);
  --line-2: rgb(7 16 43 / .18);
  --line-3: rgb(7 16 43 / .34);
  --control-border: #737a92;       /* 4.3:1 on white fields, 3.8:1 on paper */
  --illum-floor: .6;               /* 4.8:1 on paper */
  --accent: var(--violet);
  --accent-text: #4f35c2;
  --focus: #5b3fd6;
  --text-spectrum: var(--spectrum-deep);
  --glow: rgb(91 63 214 / .22);
  --field-bg: #ffffff;
  --ghost-bg: #ffffff;
  --scrim: 243 242 247;
  --logo-filter: brightness(0);
  --logo-opacity: .74;
  --grade: saturate(.9) contrast(1.02) brightness(.98);
  --grade-hover: saturate(1) contrast(1.02) brightness(1);
  --media-tint: linear-gradient(150deg, rgb(10 20 51 / .08), transparent 60%);
  --ok: #0a6a48;                   /* status tints: >= 4.6:1 on paper AND on a .badge's tint */
  --warn: #8a5a00;
  --danger: #b4233f;
  --info: #1a5f99;
  color-scheme: light;
  background-color: var(--bg);
  color: var(--fg-2);
}
/* Dark islands (nested inside paper, or navy chapters) restore the dark tokens */
.theme-ink, .theme-navy, .slab {
  --bg: var(--ink);
  --bg-raised: var(--ink-1);
  --surface: #0a0c15;
  --surface-2: var(--ink-2);
  --surface-3: var(--ink-3);
  --fg: #f0edf7;
  --fg-2: #b4b7c9;
  --fg-3: #8b90a7;
  --fg-4: #5d6278;
  --fg-hover: #ffffff;
  --on-fg: var(--ink);
  --line: rgb(240 237 247 / .1);
  --line-2: rgb(240 237 247 / .18);
  --line-3: rgb(240 237 247 / .32);
  --control-border: rgb(240 237 247 / .46);
  --illum-floor: .5;
  --accent: var(--iris);
  --accent-text: #c8b8ff;
  --focus: #c8b8ff;
  --text-spectrum: var(--spectrum);
  --glow: rgb(166 140 255 / .45);
  --field-bg: rgb(240 237 247 / .035);
  --ghost-bg: rgb(5 6 11 / .55);
  --scrim: 5 6 11;
  --logo-filter: brightness(0) invert(1);
  --logo-opacity: .86;
  --grade: saturate(.8) contrast(1.04) brightness(.88);
  --grade-hover: saturate(.9) contrast(1.03) brightness(.96);
  --media-tint: linear-gradient(150deg, rgb(10 20 51 / .34), rgb(60 50 120 / .16) 55%, rgb(20 60 110 / .22));
  --ok: #7ee2b8;
  --warn: #ffc97a;
  --danger: #ff8fa3;
  --info: #8ad4ff;
  color-scheme: dark;
  background-color: var(--bg);
  color: var(--fg-2);
}
/* Raised navy: a full-bleed chapter (.theme-navy) or an inset panel (.slab) */
.theme-navy, .slab {
  --bg: var(--navy);
  --bg-raised: var(--navy-2);
  --surface: rgb(240 237 247 / .035);
  --surface-2: #0d1a40;
  --surface-3: var(--navy-3);
  --line: rgb(200 210 255 / .12);
  --line-2: rgb(200 210 255 / .2);
  --scrim: 10 20 51;
  background: var(--navy-panel);
  background-color: var(--navy);
}

/* 3. Reset & base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--ink);
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  letter-spacing: 0;
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
/* :where() keeps this reset at (0,1,0), so a component's own padding on a role="list" list wins */
:where(ul, ol)[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4, h5, h6 { color: var(--fg); font-weight: 560; line-height: 1.1; text-wrap: balance; overflow-wrap: break-word; }
p, li, dd { text-wrap: pretty; }
strong, b { color: var(--fg); font-weight: 600; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--line); }
abbr[title] { text-decoration: underline dotted; text-underline-offset: .2em; }
::selection { background: rgb(166 140 255 / .38); color: var(--fg); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.skip-link {
  position: fixed; left: var(--gutter); top: .75rem; z-index: 300;
  padding: .7rem 1.1rem; background: var(--pearl); color: var(--ink);
  font-weight: 600; text-decoration: none;
  transform: translateY(-160%); opacity: 0; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; opacity: 1; outline-color: var(--iris); }

.visually-hidden, .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;
}

/* Film grain — one fixed layer (plain alpha; blend modes on fixed layers break tall captures) */
.grain {
  position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* 4. Layout --------------------------------------------------------------- */
.container { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.container--narrow { width: min(100% - var(--gutter) * 2, 980px); margin-inline: auto; }
.container--wide { width: min(100% - var(--gutter) * 2, 1680px); margin-inline: auto; }

.section { position: relative; padding-block: var(--space-section); }
.section--tight { padding-block: var(--space-2xl); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
.section--rule { border-top: 1px solid var(--line); }
.section--raised { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-raised) 16%, var(--bg-raised) 84%, var(--bg) 100%); }
.section--navy { isolation: isolate; }
.section--navy::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 45% at 78% 22%, rgb(12 24 64 / .95), transparent 72%),
    radial-gradient(60% 40% at 8% 78%, rgb(10 20 51 / .8), transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
/* Theme chapters are full-bleed sections; keep their rhythm consistent */
.section.theme-paper + .section.theme-paper, .section.theme-navy + .section.theme-navy { padding-top: 0; }

/* Slab: raised navy panel inside a container (works on ink and paper) */
.slab {
  --cut: 22px;
  position: relative; isolation: isolate;
  padding: clamp(1.5rem, 1rem + 2.6vw, 3.5rem);
  clip-path: var(--bevel);
  box-shadow: inset 0 0 0 1px var(--line);
}
.slab::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(166 140 255 / .6), transparent) top / 60% 1px no-repeat;
}

.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, .75rem 1rem); align-items: center; }

.grid { display: grid; gap: var(--grid-gap, clamp(1rem, .6rem + 1.4vw, 2rem)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
@media (min-width: 1080px) {
  .grid--2.grid--fixed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3.grid--fixed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4.grid--fixed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 1079px) {
  .grid--3.grid--fixed, .grid--4.grid--fixed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 2 columns: an odd last card never sits alone beside an empty slot — it takes the whole row,
     and a card with a cover lies down (cover left, text right) */
  :is(.grid--3, .grid--4).grid--fixed > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  :is(.grid--3, .grid--4).grid--fixed > :is(.post-card, .case-card):last-child:nth-child(odd) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  :is(.grid--3, .grid--4).grid--fixed > .post-card:last-child:nth-child(odd) > .post-card__cover { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid rgb(240 237 247 / .08); }
  :is(.grid--3, .grid--4).grid--fixed > .case-card:last-child:nth-child(odd) > .case-card__media { aspect-ratio: auto; height: 100%; min-height: 14rem; }
  :is(.grid--3, .grid--4).grid--fixed > .card:last-child:nth-child(odd) > :is(.card__text, p) { max-width: 60ch; }
}

.split { display: grid; gap: var(--space-xl) var(--space-m); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .split > :first-child { grid-column: 1 / span var(--split-a, 5); }
  .split > :last-child { grid-column: calc(var(--split-a, 5) + 2) / -1; }
  .split--even { --split-a: 6; }
  .split--even > :last-child { grid-column: 7 / -1; }
  .split--center { align-items: center; }
  .split--reverse > :first-child { order: 2; grid-column: calc(12 - var(--split-a, 5) + 1) / -1; }
  .split--reverse > :last-child { order: 1; grid-column: 1 / span calc(12 - var(--split-a, 5) - 1); }
  .split--sticky > :first-child { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.bento { display: grid; gap: clamp(.75rem, .5rem + .8vw, 1.25rem); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.bento > * { grid-column: span 12; }
@media (min-width: 720px) {
  .bento > * { grid-column: span 6; }
  .bento .bento--wide { grid-column: span 12; }
}
@media (min-width: 1080px) {
  .bento .bento--7 { grid-column: span 7; }
  .bento .bento--5 { grid-column: span 5; }
  .bento .bento--8 { grid-column: span 8; }
  .bento .bento--4 { grid-column: span 4; }
  .bento .bento--tall { grid-row: span 2; }
}

/* Section header */
.section-head { display: grid; gap: var(--space-s); margin-bottom: var(--space-xl); }
.section-head__title { font-size: var(--step-4); line-height: 1; letter-spacing: var(--track-h2); max-width: 18ch; }
.section-head__intro { max-width: 48ch; font-size: var(--step-1); line-height: 1.5; color: var(--fg-2); }
.section-head--center { justify-items: center; text-align: center; }
.section-head--center .section-head__title { max-width: 22ch; }
/* the eyebrow + title pair keeps its gap at every width (it used to touch below 900px) */
.section-head--split > :first-child { display: grid; gap: var(--space-s); }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); align-items: end; column-gap: var(--space-2xl); }
}

/* 5. Typography ----------------------------------------------------------- */
.display, .h1, .h2, .h3, .h4 { color: var(--fg); font-weight: 560; }
.display { font-size: var(--step-6); line-height: .88; letter-spacing: var(--track-display); font-weight: 540; }
.h1 { font-size: var(--step-5); line-height: .94; letter-spacing: var(--track-display); font-weight: 540; }
.h2 { font-size: var(--step-4); line-height: 1; letter-spacing: var(--track-h2); }
.h3 { font-size: var(--step-3); line-height: 1.06; letter-spacing: var(--track-h3); }
.h4 { font-size: var(--step-2); line-height: 1.15; letter-spacing: -.02em; }
.h5 { font-size: var(--step-1); line-height: 1.25; letter-spacing: -.01em; color: var(--fg); font-weight: 560; }

/* Serif italic accent — whole key phrases and French words, one per heading */
.serif, :is(h1, h2, h3, h4, .display, .h1, .h2, .h3, .quote) em {
  font-family: var(--font-serif); font-style: italic; font-weight: 360; letter-spacing: -.02em; font-stretch: normal;
}
.serif--light { font-weight: 300; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--fg-2); max-width: 46ch; letter-spacing: -.004em; }
.lead--wide { max-width: var(--measure); }
.body-l { font-size: var(--step-1); line-height: 1.55; }
.small, small { font-size: var(--step--1); }
.fine { font-size: var(--step--2); color: var(--fg-3); line-height: 1.5; }
.muted { color: var(--fg-3); }
.bright { color: var(--fg); }
.measure { max-width: var(--measure); }
.tabular { font-variant-numeric: tabular-nums; }
.text-spectrum { background: var(--text-spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Eyebrow: sentence case, preceded by a short spectral beam */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  font-size: var(--step--1); font-weight: 540; line-height: 1.3; color: var(--fg-2); letter-spacing: 0;
}
.eyebrow::before { content: ""; flex: none; width: 1.75rem; height: 1px; background: var(--spectrum); box-shadow: 0 0 10px var(--glow); }
.eyebrow--plain::before { display: none; }
.eyebrow__meta { color: var(--fg-3); padding-left: .75rem; border-left: 1px solid var(--line-2); }
/* Long (e.g. bilingual) eyebrows: on phones the meta drops to its own line, aligned with the
   label, instead of starting the new line with an orphan divider */
@media (max-width: 459px) {
  .eyebrow--stack .eyebrow__meta { flex-basis: 100%; border-left: 0; padding-left: calc(1.75rem + .75rem); margin-top: -.35rem; }
  .eyebrow--stack.eyebrow--plain .eyebrow__meta { padding-left: 0; }
}

/* Big light numerals (01 / 02 / 03) — genuine sequences only */
.numeral {
  display: block; width: fit-content; font-size: clamp(2.75rem, 1.8rem + 3.6vw, 5.5rem); font-weight: 250; font-stretch: 118%;
  line-height: .85; letter-spacing: -.05em;
  background: var(--text-spectrum); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Quote */
.quote { font-size: var(--step-3); line-height: 1.2; letter-spacing: var(--track-h3); color: var(--fg); font-weight: 480; max-width: 30ch; }
.quote__cite { display: block; margin-top: 1rem; font-size: var(--step--1); color: var(--fg-3); font-style: normal; letter-spacing: 0; }

code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
:not(pre) > code { padding: .1em .35em; border-radius: 4px; background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); overflow-wrap: anywhere; }
pre { overflow-x: auto; }
.placeholder { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); padding: 0 .3em; border-radius: 3px; }

/* 6. Buttons & links ------------------------------------------------------ */
.btn {
  --btn-bg: transparent; --btn-fg: var(--fg); --btn-line: var(--line-3);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 3.25rem; padding: .85rem 1.45rem;
  font-size: .9375rem; font-weight: 560; line-height: 1.1; letter-spacing: 0;
  color: var(--btn-fg); text-decoration: none; white-space: nowrap; text-align: center;
  background: var(--btn-line);
  clip-path: var(--bevel);
  transition: color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--btn-bg); clip-path: var(--bevel); transition: background-color var(--dur-2) var(--ease-out); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .5) 48%, rgb(166 140 255 / .3) 52%, transparent 70%);
  transform: translateX(-120%); opacity: 0; transition: transform .9s var(--ease-out), opacity .3s;
}
.btn:hover::after { transform: translateX(120%); opacity: 1; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -5px; border-radius: 0; }
.btn__icon { width: 1rem; height: 1rem; flex: none; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .btn__icon { transform: translate(2px, -2px); }
.btn:hover .btn__icon--r { transform: translateX(3px); }
.btn:hover .btn__icon--d { transform: translateY(3px); }
.btn:hover .btn__icon--l { transform: translateX(-3px); }
.btn:hover .btn__icon--u { transform: translateY(-3px); }
.btn:hover .btn__icon--static { transform: none; }          /* brand icons (LinkedIn…) do not point anywhere */

.btn--primary { --btn-bg: var(--fg); --btn-fg: var(--on-fg); --btn-line: var(--fg); }
.btn--primary:hover { --btn-bg: var(--fg-hover); --btn-line: var(--fg-hover); }
.btn--primary:focus-visible { outline-color: var(--on-fg); }
.btn--primary::after { background: linear-gradient(105deg, transparent 32%, rgb(228 156 242 / .45) 45%, rgb(138 212 255 / .45) 55%, transparent 68%); }
.btn--ghost { --btn-bg: var(--ghost-bg); }
.btn--ghost:hover { --btn-bg: color-mix(in srgb, var(--fg) 8%, var(--bg)); --btn-line: var(--fg); }
.btn--spectral { --btn-bg: var(--surface-2); --btn-line: transparent; background: var(--spectrum); }
.btn--spectral:hover { --btn-bg: var(--surface-3); }
.btn--sm { min-height: 2.5rem; padding: .55rem 1rem; font-size: .875rem; --cut: 7px; }
.btn--lg { min-height: 3.75rem; padding: 1rem 1.8rem; font-size: 1rem; --cut: 12px; }
.btn--block { width: 100%; }
/* phones: a long label wraps inside the button instead of pushing the page sideways */
@media (max-width: 479px) { .btn { max-width: 100%; white-space: normal; text-wrap: balance; } }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn.is-loading { cursor: progress; }
.btn.is-loading .btn__icon { animation: spin 1s linear infinite; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--fg); font-weight: 540; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: .15em; transition: background-size var(--dur-2) var(--ease-out);
}
.link-arrow svg { width: .95em; height: .95em; flex: none; transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow:hover svg { transform: translate(2px, -2px); }
.link-arrow--back:hover svg { transform: translateX(-3px); }   /* with #i-arrow-l: "back to…" links */
.link-arrow--muted { color: var(--fg-2); }
.text-link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); }
.text-link:hover { text-decoration-color: var(--fg); }

/* 7. Header & menu -------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  view-transition-name: site-header;
  transition: transform .6s var(--ease-out), background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(5 6 11 / .76);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: rgb(240 237 247 / .1);
}
.site-header.is-hidden { transform: translateY(-101%); }
/* Without JS (or if main.js fails) nothing sets .is-scrolled: keep the header legible over paper chapters */
.no-js .site-header, .no-reveal .site-header { background: rgb(5 6 11 / .9); border-bottom-color: rgb(240 237 247 / .1); }
.site-header__inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-m); }
.brand { display: inline-flex; flex: none; border-radius: 2px; justify-self: start; grid-column: 1; }
.brand__logo { width: auto; height: 34px; }
.site-nav { grid-column: 2; }
.site-nav__list { display: flex; gap: clamp(.1rem, .6vw, .75rem); }
.site-nav__link {
  position: relative; display: block; padding: .5rem .55rem;
  font-size: .9375rem; font-weight: 500; color: #b4b7c9; text-decoration: none; transition: color var(--dur-1);
}
.site-nav__link::after {
  content: ""; position: absolute; left: .55rem; right: .55rem; bottom: .2rem; height: 1px;
  background: var(--spectrum); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out);
}
.site-nav__link:hover, .site-nav__link[aria-current="page"] { color: #f0edf7; }
.site-nav__link:hover::after, .site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-header__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: .5rem; }
.site-header .btn--primary { --btn-bg: #f0edf7; --btn-line: #f0edf7; --btn-fg: #05060b; }
.site-header .btn--primary:hover { --btn-bg: #fff; --btn-line: #fff; }

.menu-toggle {
  display: none; align-items: center; gap: .7rem; min-height: 2.75rem; padding: 0 .35rem 0 .9rem;
  font-size: .9375rem; font-weight: 540; color: #f0edf7;
  border: 1px solid rgb(240 237 247 / .2); border-radius: var(--radius-pill); background: rgb(5 6 11 / .55);
}
.menu-toggle__bars { position: relative; width: 2rem; height: 2rem; border-radius: 50%; background: #f0edf7; }
.menu-toggle__bars span { position: absolute; left: 50%; top: 50%; width: .8rem; height: 1.5px; margin-left: -.4rem; background: #05060b; transition: transform var(--dur-2) var(--ease-out); }
.menu-toggle__bars span:first-child { transform: translateY(-3px); }
.menu-toggle__bars span:last-child { transform: translateY(3px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:first-child,
.menu-toggle--close .menu-toggle__bars span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:last-child,
.menu-toggle--close .menu-toggle__bars span:last-child { transform: rotate(-45deg); }

/* Site-wide "Pause animations" control (WCAG 2.2.2), header + footer ([data-motion-toggle], main.js).
   A FIXED accessible name ("Pause animations") with aria-pressed carrying the state; the icon shows
   the action (pause ↔ play) and a small tip names it on hover / keyboard focus. Remembered per
   browser. Hidden without JS and under prefers-reduced-motion (nothing moves then anyway). */
.motion-toggle {
  position: relative; flex: none; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: 50%; color: #f0edf7; border: 1px solid rgb(240 237 247 / .2); background: rgb(5 6 11 / .55);
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2);
}
.motion-toggle > svg { grid-area: 1 / 1; width: .8rem; height: .8rem; }
@media (min-width: 1080px) { .motion-toggle { width: 2.5rem; height: 2.5rem; } }   /* level with the header CTA */
.motion-toggle[aria-pressed="true"] { border-color: rgb(166 140 255 / .65); box-shadow: 0 0 16px rgb(166 140 255 / .22); }
[data-motion-toggle] .motion-toggle__play, [data-motion-toggle][aria-pressed="true"] .motion-toggle__pause { display: none; }
[data-motion-toggle][aria-pressed="true"] .motion-toggle__play { display: block; }
.motion-toggle__tip {
  position: absolute; top: calc(100% + .5rem); right: 50%; transform: translateX(50%); padding: .35rem .6rem; border-radius: var(--radius-xs);
  background: #f0edf7; color: #05060b; font-size: .75rem; font-weight: 560; line-height: 1.3; white-space: nowrap;
  pointer-events: none; opacity: 0; translate: 0 -4px; transition: opacity var(--dur-1), translate var(--dur-2) var(--ease-out);
}
.motion-toggle:focus-visible .motion-toggle__tip { opacity: 1; translate: 0 0; }
@media (hover: hover) {
  .motion-toggle:hover { border-color: rgb(240 237 247 / .45); background: rgb(240 237 247 / .08); }
  .motion-toggle:hover .motion-toggle__tip { opacity: 1; translate: 0 0; }
}
.motion-toggle__tip-on, [aria-pressed="true"] > .motion-toggle__tip .motion-toggle__tip-off { display: none; }
[aria-pressed="true"] > .motion-toggle__tip .motion-toggle__tip-on { display: inline; }
.no-js [data-motion-toggle], .no-reveal [data-motion-toggle] { display: none !important; }
@media (prefers-reduced-motion: reduce) { [data-motion-toggle] { display: none !important; } }

@media (max-width: 1079px) {
  .js:not(.no-reveal) .site-nav { display: none; }
  .js:not(.no-reveal) .menu-toggle { display: inline-flex; }
  .brand__logo { height: 30px; }
  /* Without JS the nav becomes a scrollable row under the header */
  .no-js .site-header, .no-reveal .site-header { height: auto; position: absolute; }
  .no-js .site-header__inner, .no-reveal .site-header__inner { grid-template-columns: 1fr auto; padding-block: .75rem; row-gap: .5rem; }
  .no-js .site-header__actions, .no-reveal .site-header__actions { grid-column: 2; }
  .no-js .site-nav, .no-reveal .site-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
}
@media (max-width: 520px) { .site-header__cta { display: none; } }

/* Mobile menu: a full-screen modal dialog ABOVE the header, with its own top bar (brand + Close)
   drawn exactly where the header's brand and Menu pill are — so its close control is inside the
   dialog (aria-modal hides everything else from VoiceOver). */
.site-menu {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  background: var(--ink); color: #b4b7c9; padding-bottom: 1.5rem;
  overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-out);
}
.site-menu__bar { position: sticky; top: 0; z-index: 2; flex: none; height: var(--header-h); background: var(--ink); }
.site-menu__bar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); }
.site-menu .menu-toggle { display: inline-flex; }
.site-menu.is-open { clip-path: inset(0); }
.site-menu__glow {
  position: absolute; inset: auto -20% -30% auto; width: 90vw; height: 70vh; pointer-events: none;
  background: radial-gradient(closest-side, rgb(166 140 255 / .24), rgb(228 156 242 / .08) 55%, transparent);
}
.site-menu__inner { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; margin-top: 1rem; }
.site-menu__list { border-top: 1px solid rgb(240 237 247 / .12); }
.site-menu__link {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.75rem; padding: .5rem 0;
  border-bottom: 1px solid rgb(240 237 247 / .12);
  font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.25rem); font-weight: 520; line-height: 1.1; letter-spacing: -.025em;
  color: #f0edf7; text-decoration: none;
  opacity: 0; transform: translateY(.9rem);
  transition: opacity .5s, transform .7s var(--ease-out), color .2s;
  transition-delay: calc(var(--i, 0) * 40ms + .1s);
}
.site-menu__link svg { width: 1.1rem; height: 1.1rem; flex: none; color: #8b90a7; transition: transform var(--dur-2) var(--ease-out), color var(--dur-1); }
.site-menu__link:hover svg, .site-menu__link:focus-visible svg { transform: translateX(4px); color: #f0edf7; }
.site-menu__link:focus-visible { outline-offset: -2px; }
.site-menu.is-open .site-menu__link { opacity: 1; transform: none; }
.site-menu__link[aria-current="page"] { color: transparent; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; }
.site-menu__link[aria-current="page"] svg { color: var(--iris); }
.site-menu__foot { display: grid; gap: 1.25rem; justify-items: start; }
.site-menu__contact { display: grid; gap: .35rem; font-size: var(--step--1); }
.site-menu__contact a { color: #f0edf7; text-decoration: none; display: inline-block; padding-block: .3rem; }
html.menu-open, html.menu-open body { overflow: hidden; }
html.menu-open .site-header { transform: none; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }

/* 8. Footer & bookend ----------------------------------------------------- */
.site-footer {
  position: relative; overflow: hidden;
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--line);
  background: var(--ink); font-size: var(--step--1);
  view-transition-name: site-footer;
}
.site-footer__glow {
  position: absolute; left: 50%; bottom: -10%; width: min(1400px, 150vw); height: 60%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgb(166 140 255 / .14), rgb(228 156 242 / .05) 55%, transparent);
}
.site-footer .container { position: relative; }
.site-footer__top { display: grid; gap: var(--space-xl); padding-bottom: var(--space-xl); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .site-footer__top { grid-template-columns: 1fr minmax(0, 34rem); align-items: end; } }
.brand--footer .brand__logo { height: 40px; }
.site-footer__tagline { margin-top: 1.25rem; font-size: var(--step-3); line-height: 1.08; letter-spacing: var(--track-h3); color: var(--fg); font-weight: 520; max-width: 18ch; }
.newsletter { display: grid; gap: .9rem; }
.newsletter__title { font-size: var(--step-2); letter-spacing: -.02em; }
.newsletter__intro { color: var(--fg-3); margin-top: -.4rem; }
.newsletter__row { display: flex; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.newsletter__row .check { flex: 1 1 16rem; }
.newsletter__submit { flex: none; }
@media (max-width: 520px) { .newsletter__submit { width: 100%; } }

.site-footer__grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); padding-block: var(--space-xl); }
.footer-col__title { font-size: var(--step--1); font-weight: 540; color: var(--fg-3); margin-bottom: .9rem; letter-spacing: 0; }
.footer-col ul { display: grid; gap: .15rem; }
.footer-col a { display: inline-flex; align-items: center; min-height: 2rem; color: var(--fg); text-decoration: none; transition: color var(--dur-1); }
.footer-col a:hover { color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--accent); }
.footer-col a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); }
.footer-col address { color: var(--fg-2); padding-top: .3rem; }
.footer-col__plain li { color: var(--fg-2); padding-block: .3rem; }
.footer-col .footer-col__more { display: inline-block; margin-top: .75rem; min-height: 0; line-height: 1.5; font-weight: 540; }
.footer-col__more svg { display: inline-block; width: .9em; height: .9em; vertical-align: -.08em; margin-left: .35rem; }
.footer-social { gap: .55rem; }
.footer-social svg { width: 1rem; height: 1rem; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 2rem;
  padding-block: 1rem; border-top: 1px solid var(--line); color: var(--fg-3);
}
.site-footer__bottom a { color: var(--fg-2); }
/* Legal line: "a · b · c" whose separators never dangle at a line end or start a line — each
   segment carries its separator in front, and the separator of a segment that wraps to the start
   of a line falls into the clipped margin. */
.legal-line { overflow: hidden; }
.legal-line__list { display: flex; flex-wrap: wrap; margin-left: -1.5em; }
.legal-line__list > * { white-space: nowrap; }
.legal-line__list > *::before { content: "·"; content: "·" / ""; display: inline-block; width: 1.5em; text-align: center; color: var(--fg-4); }

/* Footer "Pause animations" switch (the same [data-motion-toggle] as the header button) */
.motion-switch {
  display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem;
  font-size: inherit; font-weight: 520; color: var(--fg-2); transition: color var(--dur-1);
}
.motion-switch:hover { color: var(--fg); }
.motion-switch__track {
  position: relative; flex: none; width: 2.125rem; height: 1.25rem; border-radius: var(--radius-pill);
  border: 1px solid var(--control-border); transition: background-color var(--dur-2), border-color var(--dur-2);
}
.motion-switch__track::after {
  content: ""; position: absolute; left: .1875rem; top: 50%; width: .75rem; height: .75rem; margin-top: -.375rem;
  border-radius: 50%; background: var(--fg-2); transition: transform var(--dur-2) var(--ease-out), background-color var(--dur-2);
}
.motion-switch[aria-pressed="true"] { color: var(--fg); }
.motion-switch[aria-pressed="true"] .motion-switch__track { background: var(--fg); border-color: var(--fg); }
.motion-switch[aria-pressed="true"] .motion-switch__track::after { transform: translateX(.875rem); background: var(--on-fg); }

/* Bookend: the giant wordmark closes every page, lit like the prism */
.bookend { position: relative; margin-top: clamp(1rem, 2vw, 2rem); padding-bottom: clamp(.5rem, 1.5vw, 1.5rem); pointer-events: none; }
.bookend__mark {
  width: 100%; height: auto;
  /* white wordmark, lit from above, sinking into the floor */
  -webkit-mask-image: linear-gradient(180deg, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .2) 55%, rgb(0 0 0 / .04) 100%);
  mask-image: linear-gradient(180deg, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .2) 55%, rgb(0 0 0 / .04) 100%);
}
.bookend__light {
  position: absolute; inset: 0 0 auto; aspect-ratio: 6296 / 1326; overflow: hidden;
  -webkit-mask: url("../img/brand/pertimm-wordmark.svg") center top / 100% auto no-repeat;
  mask: url("../img/brand/pertimm-wordmark.svg") center top / 100% auto no-repeat;
}
.bookend__light::before {
  content: ""; position: absolute; inset: -5% -60%; width: 220%;
  background: linear-gradient(100deg, transparent 36%, rgb(228 156 242 / .38) 43%, rgb(255 255 255 / .62) 48%, rgb(166 140 255 / .48) 52%, rgb(138 212 255 / .36) 56%, transparent 63%);
  transform: translateX(-30%);
  animation: bookend-sweep 11s var(--ease-in-out) infinite;
  animation-play-state: paused;
}
.bookend.is-inview .bookend__light::before { animation-play-state: running; }
.bookend__rim {
  position: absolute; left: 8%; right: 8%; bottom: 0; height: 40%; z-index: -1;
  background: radial-gradient(50% 60% at 50% 100%, rgb(166 140 255 / .16), rgb(228 156 242 / .05) 55%, transparent);
  filter: blur(18px);
}
.is-file .bookend__light { display: none; } /* CSS masks cannot load across file:// */
@keyframes bookend-sweep { 0% { transform: translateX(-38%); } 55%, 100% { transform: translateX(38%); } }

/* 9. Page hero & prism light (lite) -------------------------------------- */
/* .prism-lite — a cheap CSS rendition of the hero light: navy bloom, spectral
   rim glow, three diffraction lines and (optionally) the prism mark itself.
   Position with --lx / --ly (percent of the host), size with --ls. */
.prism-lite {
  --lx: 78%; --ly: 42%; --ls: clamp(88px, 9vw, 150px);
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.prism-lite::before {        /* bloom + spectral glow, feathered on every side */
  content: ""; position: absolute; left: var(--lx); top: var(--ly);
  width: calc(var(--ls) * 7); aspect-ratio: 1; translate: -50% -50%;
  background:
    radial-gradient(closest-side, rgb(240 237 247 / .16), transparent 18%),
    conic-gradient(from 200deg, rgb(138 212 255 / .0), rgb(138 212 255 / .26), rgb(166 140 255 / .32), rgb(228 156 242 / .26), rgb(228 156 242 / 0) 45%, rgb(138 212 255 / .0) 70%, rgb(138 212 255 / .16) 88%, rgb(138 212 255 / 0)),
    radial-gradient(closest-side, rgb(12 24 64 / .9), transparent 90%);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, rgb(0 0 0 / .5) 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 18%, rgb(0 0 0 / .5) 45%, transparent 100%);
  animation: lite-turn 60s linear infinite;
}
.prism-lite::after {         /* diffraction lines through the hexagon vertices */
  content: ""; position: absolute; left: var(--lx); top: var(--ly);
  width: calc(var(--ls) * 6); aspect-ratio: 1; translate: -50% -50%;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgb(230 225 255 / .42) 50%, transparent calc(50% + .5px)),
    linear-gradient(30deg, transparent calc(50% - .5px), rgb(200 190 255 / .3) 50%, transparent calc(50% + .5px)),
    linear-gradient(150deg, transparent calc(50% - .5px), rgb(190 220 255 / .3) 50%, transparent calc(50% + .5px));
  -webkit-mask-image: radial-gradient(closest-side, transparent 10%, #000 16%, rgb(0 0 0 / .3) 50%, transparent 92%);
  mask-image: radial-gradient(closest-side, transparent 10%, #000 16%, rgb(0 0 0 / .3) 50%, transparent 92%);
  opacity: .7;
  animation: lite-twinkle 7s ease-in-out infinite alternate;
}
.prism-lite__mark {
  position: absolute; left: var(--lx); top: var(--ly); width: var(--ls); height: auto; translate: -50% -50%;
  filter: drop-shadow(0 0 1px rgb(200 190 255 / .55)) drop-shadow(0 0 18px rgb(166 140 255 / .38)) drop-shadow(0 0 60px rgb(228 156 242 / .16));
}
.prism-lite--soft::before { opacity: .7; }
.prism-lite--soft::after { opacity: .45; }
@keyframes lite-turn { to { transform: rotate(360deg); } }
@keyframes lite-twinkle { from { opacity: .5; } to { opacity: .75; } }
.theme-paper .prism-lite { display: none; }

/* Interior page hero */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(1.25rem, .5rem + 3vw, 3.5rem));
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 80% at 80% 30%, rgb(10 20 51 / .55), transparent 70%);
}
.page-hero__inner { position: relative; display: grid; gap: var(--space-m); justify-items: start; }
.page-hero__title { font-size: clamp(2.75rem, 1.5rem + 4.6vw, 6.75rem); line-height: .96; letter-spacing: var(--track-display); font-weight: 540; max-width: 17ch; }
.page-hero--media .page-hero__title { font-size: clamp(2.5rem, 1.4rem + 3.4vw, 5.25rem); max-width: 16ch; }
.page-hero__title em { font-weight: 330; }
.page-hero__lead { max-width: 44ch; }
.page-hero__note { color: var(--fg-2); max-width: 52ch; }
.page-hero__actions { margin-top: .25rem; }
.page-hero__badge { display: inline-flex; gap: .6rem; align-items: center; font-size: var(--step--1); color: var(--fg-2); }
@media (min-width: 900px) {
  .page-hero--media .page-hero__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .page-hero--media .page-hero__inner > * { grid-column: 1 / span 7; }
  .page-hero--media .page-hero__media { grid-column: 9 / -1; grid-row: 1 / span 6; align-self: end; }
  .page-hero .prism-lite { --lx: 82%; }
  .page-hero--media .prism-lite { --lx: 90%; --ly: 16%; --ls: clamp(70px, 6vw, 104px); }
  /* a tall (4:5) media column rises into the top-right light: put the light in the gap between
     the headline and the photo instead (<div class="prism-lite prism-lite--gap">) */
  .page-hero--media .prism-lite--gap { --lx: 59%; --ly: 30%; --ls: clamp(72px, 6.4vw, 108px); }
}
@media (max-width: 899px) {
  .page-hero .prism-lite { --lx: calc(100% - 3.25rem - var(--gutter)); --ly: calc(var(--header-h) + 3.25rem); --ls: 64px; }
  .page-hero--media .page-hero__media { width: 100%; margin-top: var(--space-s); }
}
/* Phones: the mark sits beside the breadcrumb, 24px+ below the Menu pill (never hanging from it)
   and above the eyebrow line */
@media (max-width: 479px) {
  .page-hero .prism-lite { --ly: calc(var(--header-h) + 2.65rem); --ls: 48px; }
}

/* Page-hero VISUAL slot — a page-specific, content-derived visual (case mosaic, contact
   constellation, live demo, typographic index…) instead of an empty right half.
     <section class="page-hero page-hero--visual …">
       <div class="prism-lite" aria-hidden="true">…</div>          (glow only: the mark is not shown)
       <div class="container page-hero__inner">
         breadcrumb · eyebrow · h1 · lead · actions …
         <div class="page-hero__visual [--frame] [--mosaic] [--desktop]" aria-hidden="true">…</div>
         [<nav class="hero-index">…</nav>]
       </div>
     </section>
   The visual is the LAST text-column sibling (a .hero-index may follow it).
   ≥900px: 12 columns, text 1–7 (top-aligned), visual 8–12. The visual is as tall as the text
   block, and at least --visual-min-h (default 18rem): its content never spreads the text rows
   (contain: size — the extra height goes to a last 1fr row), so size its content with % / grid /
   flex, not with fixed heights. <900px: under the actions, height --visual-h (default: its content;
   --mosaic: clamp(11rem, 50vw, 16rem)); --desktop hides it there. Decorative → aria-hidden="true";
   an interactive demo keeps its semantics and its own pause control. Cheap: CSS/SVG/HTML, lazy
   images, no WebGL. */
.page-hero__visual { position: relative; min-width: 0; }
.page-hero--visual .prism-lite__mark { display: none; }          /* one prism per view: the visual takes the light */
.page-hero__visual--frame {                                      /* bevelled navy instrument panel */
  --cut: 22px;
  display: grid; align-content: center; gap: var(--space-m); padding: clamp(1.25rem, .6rem + 2vw, 2.5rem);
  overflow: hidden; isolation: isolate; clip-path: var(--bevel);
  background: var(--navy-panel); background-color: var(--navy);
  box-shadow: inset 0 0 0 1px rgb(200 210 255 / .14);
}
.page-hero__visual--frame::after {                               /* thread of light on the top edge */
  content: ""; position: absolute; left: 0; top: 0; z-index: 3; width: 62%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(228 156 242 / .7), rgb(166 140 255 / .85), rgb(138 212 255 / .6), transparent);
}
.page-hero__visual--mosaic {                                     /* 3 tiles: one tall + two stacked */
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(.5rem, .3rem + .6vw, .9rem);
}
.page-hero__visual--mosaic > :first-child { grid-row: span 2; }
.page-hero__visual--mosaic > .media { height: 100%; min-height: 0; aspect-ratio: auto; }
@media (min-width: 900px) {
  .page-hero--visual .page-hero__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(11, auto) 1fr; column-gap: var(--space-m); row-gap: 0; align-items: start; }
  .page-hero--visual .page-hero__inner > * { grid-column: 1 / span 7; }
  .page-hero--visual .page-hero__inner > * + * { margin-top: var(--space-m); }
  .page-hero--visual .page-hero__visual {
    grid-column: 8 / -1; grid-row: 1 / span 12; justify-self: stretch; align-self: stretch;
    margin: 0 0 0 clamp(0rem, -1rem + 2vw, 1.5rem); min-height: var(--visual-min-h, 18rem); contain: size;
  }
  .page-hero--visual .hero-index { grid-column: 1 / -1; }
  .page-hero--visual .page-hero__title { font-size: clamp(2.5rem, 1.4rem + 3.4vw, 5.25rem); max-width: 15ch; }
  .page-hero--visual .prism-lite { --lx: 79%; --ly: 54%; --ls: clamp(110px, 11vw, 190px); }
}
@media (max-width: 899px) {
  .page-hero__visual { justify-self: stretch; width: 100%; height: var(--visual-h, auto); margin-top: var(--space-2xs); }
  .page-hero__visual--mosaic { height: var(--visual-h, clamp(11rem, 50vw, 16rem)); }
  .page-hero__visual--desktop { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .page-hero__visual { animation: hero-visual-in 1.3s var(--ease-out) .2s both; }
}
@keyframes hero-visual-in { from { opacity: 0; transform: translateY(1.25rem); } }

/* Hero index: a compact "On this page" chapter list closing a long page's hero.
   Columns: --index-cols (≥1080px, default 4) → --index-cols-md (600–1079px, default 4) → 2. */
.hero-index { justify-self: stretch; width: 100%; margin-top: var(--space-m); border-top: 1px solid var(--line); }
.hero-index__list { display: grid; grid-template-columns: repeat(var(--index-cols, 4), minmax(0, 1fr)); }
.hero-index__list a {
  position: relative; display: flex; align-items: baseline; gap: .55rem;
  min-height: 2.75rem; padding: .85rem .75rem .5rem 0;
  font-size: var(--step--1); line-height: 1.3; color: var(--fg-2); text-decoration: none;
  transition: color var(--dur-1);
}
.hero-index__list a::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px;
  background: var(--spectrum); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out);
}
.hero-index__list a:hover, .hero-index__list a:focus-visible { color: var(--fg); }
.hero-index__list a:hover::before, .hero-index__list a:focus-visible::before { transform: scaleX(.6); }
.hero-index__num { flex: none; min-width: 2ch; color: var(--fg-3); font-size: var(--step--2); }
@media (max-width: 1079px) { .hero-index__list { grid-template-columns: repeat(var(--index-cols-md, 4), minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .hero-index__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .hero-index__list a { padding-top: .6rem; border-bottom: 1px solid var(--line); }
}

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; font-size: var(--step--1); color: var(--fg-3); list-style: none; padding: 0; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb a, .breadcrumb [aria-current] { display: inline-block; padding-block: .2rem; line-height: 1.4; }
.breadcrumb a { color: var(--fg-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--fg-3); }
.breadcrumb [aria-current="page"] { color: var(--fg); }

/* Home WebGL light canvas (hero.js) + static fallback in the same tone */
.prism-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.is-webgl .prism-canvas { opacity: 1; }
.prism-fallback {
  position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(22vmax 20vmax at var(--prism-x, 70%) var(--prism-y, 42%), rgb(166 140 255 / .24), transparent 70%),
    radial-gradient(13vmax 13vmax at calc(var(--prism-x, 70%) - 5%) calc(var(--prism-y, 42%) + 7%), rgb(228 156 242 / .16), transparent 70%),
    radial-gradient(15vmax 13vmax at calc(var(--prism-x, 70%) + 6%) calc(var(--prism-y, 42%) + 4%), rgb(138 212 255 / .15), transparent 70%),
    radial-gradient(90% 70% at var(--prism-x, 70%) var(--prism-y, 42%), rgb(10 20 51 / .85), transparent 80%);
  transition: opacity 1.2s;
}
.prism-fallback::after {     /* the same three diffraction lines as the shader, same tone */
  content: ""; position: absolute; left: var(--prism-x, 70%); top: var(--prism-y, 42%); width: 120vmax; aspect-ratio: 1; translate: -50% -50%;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgb(230 225 255 / .3) 50%, transparent calc(50% + .5px)),
    linear-gradient(30deg, transparent calc(50% - .5px), rgb(200 190 255 / .22) 50%, transparent calc(50% + .5px)),
    linear-gradient(150deg, transparent calc(50% - .5px), rgb(190 220 255 / .22) 50%, transparent calc(50% + .5px));
  -webkit-mask-image: radial-gradient(closest-side, transparent 6%, #000 10%, rgb(0 0 0 / .25) 40%, transparent 80%);
  mask-image: radial-gradient(closest-side, transparent 6%, #000 10%, rgb(0 0 0 / .25) 40%, transparent 80%);
}
.is-webgl .prism-fallback { opacity: 0; }

/* 10. Media & frames ------------------------------------------------------ */
/* .media: cinematic but legible grade (brightness ~.88, saturation ~.8) + bevel */
.media { position: relative; overflow: hidden; background: var(--surface-2); clip-path: var(--bevel); --cut: 18px; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; filter: var(--grade); transition: transform 1.4s var(--ease-out), filter .8s; }
.media::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--media-tint); mix-blend-mode: multiply; }
.media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(160deg, rgb(166 140 255 / .06), transparent 40%, rgb(138 212 255 / .05)); }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1; }
.media--wide { aspect-ratio: 21 / 9; }
.media--natural img { filter: none; }
.media--natural::before, .media--natural::after { display: none; }
.media__caption { margin-top: .7rem; font-size: var(--step--2); color: var(--fg-3); line-height: 1.5; }
a:hover .media img, .media--zoom:hover img { transform: scale(1.03); filter: var(--grade-hover); }

/* .frame: bevel media frame with a caption bar (illustrative notices, credits) */
.frame { position: relative; display: grid; margin: 0; }
.frame__media { --cut: 18px; }
.frame__label {
  position: absolute; z-index: 2; top: .75rem; left: .75rem;
  display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .6rem;
  font-size: var(--step--2); font-weight: 540; color: #f0edf7; line-height: 1.3;
  background: rgb(5 6 11 / .72); border: 1px solid rgb(240 237 247 / .18); border-radius: var(--radius-xs);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.frame__label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--spectrum); box-shadow: 0 0 8px var(--iris); }
.frame__caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem;
  padding: .65rem .1rem 0; margin-top: .6rem; border-top: 1px solid var(--line);
  font-size: var(--step--2); color: var(--fg-3); line-height: 1.45;
}
.frame__caption > :first-child { color: var(--fg-2); }
.frame__tag { display: inline-flex; align-items: center; gap: .45rem; }
.frame__tag::before { content: ""; width: .7rem; height: .8rem; flex: none; background: var(--spectrum); clip-path: var(--hex); opacity: .9; }

/* Media badge: a bevelled glass note laid over a .frame photo (a date, a figure, a short claim).
   The page places it (left / bottom inside a position: relative wrapper). Below 1200px, or with
   .media-badge--row, it becomes a compact horizontal note (value | kicker + text). Always dark
   glass (it sits on a photo), so its colours are constants. */
.media-badge {
  --cut: 14px;
  position: absolute; z-index: 2; left: .75rem; bottom: .75rem;
  display: grid; gap: .35rem; justify-items: start;
  width: min(18.5rem, 88%);
  padding: 1.1rem 1.35rem 1.25rem;
  background: linear-gradient(160deg, rgb(14 22 56 / .9), rgb(6 9 22 / .86));
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  clip-path: var(--bevel);
  box-shadow: inset 0 0 0 1px rgb(240 237 247 / .14);
  color: #b4b7c9;
}
.media-badge::before {        /* a thread of light along the top edge */
  content: ""; position: absolute; left: 0; top: 0; width: 64%; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(228 156 242 / .8), rgb(166 140 255 / .9), rgb(138 212 255 / .7), transparent);
}
.media-badge__kicker { font-size: var(--step--1); font-weight: 540; color: #8b90a7; line-height: 1.2; }
.media-badge__value {         /* light numeral; one glint on arrival */
  display: block; font-size: clamp(3.25rem, 2.4rem + 2.8vw, 5rem); font-weight: 250; font-stretch: 118%;
  line-height: .86; letter-spacing: -.05em; padding-bottom: .04em;
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, transparent 38%, rgb(255 255 255 / .95) 50%, transparent 62%), var(--spectrum);
  background-size: 260% 100%, 100% 100%; background-position: 130% 0, 0 0; background-repeat: no-repeat;
}
.media-badge__text { display: flex; gap: .6rem; align-items: flex-start; margin-top: .45rem; font-size: var(--step--1); line-height: 1.4; color: #f0edf7; }
.media-badge__text .flag-fr { margin-top: .22em; }
@media (prefers-reduced-motion: no-preference) {
  .media-badge { animation: badge-in 1.3s var(--ease-out) .45s both; }
  .media-badge__value { animation: badge-glint 2.4s var(--ease-in-out) 1.1s both; }
}
@keyframes badge-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes badge-glint { from { background-position: 130% 0, 0 0; } to { background-position: -30% 0, 0 0; } }
@media (max-width: 1199px) {
  .media-badge { width: auto; max-width: calc(100% - 1.5rem); grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; row-gap: .2rem; align-items: end; padding: .8rem 1.1rem .85rem; }
  .media-badge__value { grid-column: 1; grid-row: 1 / span 2; align-self: center; font-size: clamp(2.6rem, 2rem + 3vw, 3.4rem); }
  .media-badge__kicker, .media-badge__text { grid-column: 2; }
  .media-badge__text { margin-top: 0; font-size: var(--step--2); }
}
.media-badge--row { width: auto; max-width: calc(100% - 1.5rem); grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; row-gap: .2rem; align-items: end; padding: .8rem 1.1rem .85rem; }
.media-badge--row .media-badge__value { grid-column: 1; grid-row: 1 / span 2; align-self: center; font-size: clamp(2.6rem, 2rem + 3vw, 3.4rem); }
.media-badge--row :is(.media-badge__kicker, .media-badge__text) { grid-column: 2; }
.media-badge--row .media-badge__text { margin-top: 0; font-size: var(--step--2); }

/* 11. Cards --------------------------------------------------------------- */
.card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; gap: .85rem;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  color: var(--fg-2); text-decoration: none;
  transition: border-color var(--dur-2), background-color var(--dur-2), transform var(--dur-2) var(--ease-out);
}
a.card:hover, .card--hover:hover, .card:has(.card__cover:hover) { border-color: var(--line-2); }
.card__eyebrow { font-size: var(--step--1); color: var(--fg-3); font-weight: 520; }
.card__title { font-size: var(--step-2); line-height: 1.14; letter-spacing: -.022em; color: var(--fg); font-weight: 560; }
.card__text { color: var(--fg-2); }
.card__foot { margin-top: auto; padding-top: .5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card__link { display: inline-flex; align-items: center; gap: .45rem; color: var(--fg); font-weight: 540; font-size: .9375rem; }
.card__link svg { width: 1rem; height: 1rem; transition: transform var(--dur-2) var(--ease-out); }
.card:hover .card__link svg { transform: translate(2px, -2px); }
/* Stretched link: the whole card is clickable, one link in the tab order */
.card__cover { text-decoration: none; color: inherit; }
.card__cover::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.card__cover:focus-visible { outline: none; }
.card:has(.card__cover:focus-visible), .post-card:has(.post-card__link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.card--flat { background: transparent; }
.card--raised { background: var(--bg-raised); box-shadow: var(--shadow-1); }

[data-spotlight] { --mx: 50%; --my: 50%; }
[data-spotlight]::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgb(166 140 255 / .14), rgb(228 156 242 / .05) 35%, transparent 65%);
  opacity: 0; transition: opacity var(--dur-2);
}
[data-spotlight]:hover::before { opacity: 1; }

/* Solution card: image-backed, text on a short scrim */
.card--media { padding: 0; overflow: hidden; }
.card--media .card__body { display: flex; flex-direction: column; gap: .7rem; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); flex: 1; }
.card--overlay, .solution-card { padding: 0; overflow: hidden; min-height: clamp(22rem, 17rem + 12vw, 30rem); justify-content: flex-end; }
.card--overlay .media, .solution-card .media { position: absolute; inset: 0; z-index: -2; border-radius: 0; clip-path: none; }
.card--overlay .media::after, .solution-card .media::after {
  background: linear-gradient(180deg, rgb(5 6 11 / 0) 0%, rgb(5 6 11 / 0) 42%, rgb(5 6 11 / .62) 66%, rgb(5 6 11 / .92) 100%);
}
.card--overlay .card__body, .solution-card .card__body { position: relative; padding: clamp(1.25rem, 1rem + 1.2vw, 2.25rem); display: grid; gap: .55rem; justify-items: start; }
.card--overlay:hover .media img, .solution-card:hover .media img { transform: scale(1.04); filter: var(--grade-hover); }
.solution-card .card__eyebrow, .card--overlay .card__eyebrow { color: #c3c6d6; }
.solution-card .card__title, .card--overlay .card__title { color: #f0edf7; font-size: var(--step-3); letter-spacing: -.03em; line-height: 1.04; }
.solution-card .card__text, .card--overlay .card__text { color: #d0d2de; max-width: 36ch; }
.solution-card .card__link, .card--overlay .card__link { color: #f0edf7; margin-top: .35rem; }

/* Case / work card: image, eyebrow, title, summary, status, expandable overview */
.case-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden;
  transition: border-color var(--dur-2);
}
.case-card:hover, .case-card:focus-within { border-color: var(--line-2); }
.case-card__media { --cut: 0px; clip-path: none; aspect-ratio: 16 / 9; }
.case-card__body { display: flex; flex-direction: column; gap: .7rem; padding: clamp(1.1rem, .9rem + .8vw, 1.6rem); flex: 1; }
.case-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
/* stacked: badge first (in the markup), eyebrow under it — titles start at the same height across a row */
.case-card__top--stack { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .6rem; }
.case-card__eyebrow { font-size: var(--step--1); color: var(--fg-3); font-weight: 520; }
.case-card__title { font-size: var(--step-2); line-height: 1.14; letter-spacing: -.022em; }
.case-card__summary { color: var(--fg-2); }
.case-card__details { margin-top: auto; border-top: 1px solid var(--line); }
.case-card__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3rem; padding-top: .6rem; cursor: pointer; list-style: none;
  font-weight: 540; font-size: .9375rem; color: var(--fg);
}
.case-card__toggle::-webkit-details-marker { display: none; }
.case-card__toggle::after {
  content: ""; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line-2);
  background: linear-gradient(var(--fg), var(--fg)) center / 9px 1.5px no-repeat, linear-gradient(var(--fg), var(--fg)) center / 1.5px 9px no-repeat;
  transition: transform var(--dur-2) var(--ease-out), background-size var(--dur-2);
}
.case-card__details[open] > .case-card__toggle::after { transform: rotate(180deg); background-size: 9px 1.5px, 1.5px 0; }
.case-card__toggle:focus-visible { outline-offset: 2px; }
.case-card__panel { padding: .35rem 0 .5rem; color: var(--fg-2); }
.case-card__panel > * + * { margin-top: .75em; }
.case-card__panel h4 { font-size: var(--step-0); font-weight: 580; letter-spacing: 0; }

/* Meta list (dl): consortium, period, focus … */
.meta-list { display: grid; border-top: 1px solid var(--line); margin: 0; }
.meta-list__row { display: grid; grid-template-columns: minmax(6.5rem, 30%) 1fr; align-content: start; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.meta-list dt { color: var(--fg-3); font-size: var(--step--1); padding-top: .1em; }
.meta-list dd { color: var(--fg); margin: 0; }
.meta-list--inline { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); column-gap: 1.5rem; border-top: 0; }
.meta-list--inline .meta-list__row { grid-template-columns: 1fr; gap: .2rem; border-top: 1px solid var(--line); border-bottom: 0; }

/* Project / research card */
.project-card {
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.25rem, 1rem + 1.4vw, 2.5rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
}
.project-card { isolation: isolate; }
.project-card::after { content: ""; position: absolute; left: -1px; top: -1px; width: 3.5rem; height: 1px; background: var(--spectrum); pointer-events: none; }  /* ::before is free for [data-spotlight] */
.project-card__eyebrow { font-size: var(--step--1); color: var(--fg-3); font-weight: 520; }
.project-card__title { font-size: var(--step-4); line-height: .98; letter-spacing: var(--track-h2); font-weight: 540; }
.project-card__lead { font-size: var(--step-1); color: var(--fg); line-height: 1.4; letter-spacing: -.01em; max-width: 34ch; }
.project-card__text { color: var(--fg-2); max-width: 56ch; }
.project-card .meta-list { margin-top: .5rem; }
.project-card__foot { margin-top: auto; padding-top: .5rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }

/* Person card (photo with srcset, or a monogram when no portrait exists) */
.person { display: grid; gap: .8rem; align-content: start; }
.person__photo { aspect-ratio: 4 / 5; --cut: 16px; }
.person__photo img { object-position: 50% 22%; }
.person__name { font-size: var(--step-1); color: var(--fg); font-weight: 560; letter-spacing: -.012em; line-height: 1.2; }
.person__role { color: var(--fg-3); font-size: var(--step--1); margin-top: -.45rem; }
/* .person--lit: a soft spectral aura behind the portrait, a glint across it and a hairline above
   the name that draws in the spectrum (hover devices only; no layout shift; ink and paper) */
.person--lit { position: relative; isolation: isolate; gap: 0; }
.person--lit::before {
  content: ""; position: absolute; z-index: -1; left: -2%; right: -2%; top: -1.5%; aspect-ratio: 4 / 5; pointer-events: none;
  background: linear-gradient(150deg, var(--orchid), var(--iris) 50%, var(--glacier));
  filter: blur(26px); opacity: 0; transform: scale(.94);
  transition: opacity .7s var(--ease-out), transform 1.1s var(--ease-out);
}
.person--lit .person__photo { margin-bottom: 1.05rem; }
.person--lit .media::after {
  background: linear-gradient(105deg, transparent 34%, rgb(255 255 255 / .2) 47%, rgb(166 140 255 / .18) 53%, transparent 66%);
  transform: translateX(-120%); transition: transform 1.2s var(--ease-out);
}
.person--lit .person__name { position: relative; padding-top: .95rem; }
.person--lit .person__name::before, .person--lit .person__name::after { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%; }
.person--lit .person__name::before { background: var(--line-2); }
.person--lit .person__name::after { background: var(--text-spectrum); transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--dur-4) var(--ease-out); }
.person--lit .person__role { margin-top: .4rem; }
@media (hover: hover) {
  .person--lit:hover::before { opacity: .5; transform: none; }
  .person--lit:hover .person__photo img { transform: scale(1.035); filter: var(--grade-hover); }
  .person--lit:hover .media::after { transform: translateX(120%); }
  .person--lit:hover .person__name::after { transform: scaleX(1); }
}
/* Monogram (no portrait yet): the prism's light, not a grey placeholder — a hexagon outline in
   the prism's 305 × 345 proportion and three faint diffraction lines; on hover of the card the
   hexagon turns one facet (60°) and the initials catch the light */
.monogram {
  --cut: 16px;
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; place-items: center; aspect-ratio: 4 / 5; clip-path: var(--bevel);
  background:
    radial-gradient(70% 55% at 50% 44%, rgb(166 140 255 / .26), transparent 70%),
    radial-gradient(60% 45% at 82% 100%, rgb(138 212 255 / .18), transparent 70%),
    linear-gradient(180deg, #0c1840, #07102b);
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: clamp(3.25rem, 2.5rem + 3vw, 5.25rem); letter-spacing: -.04em; color: #f0edf7;
  padding-right: .06em;                                           /* optical centre of the italic */
  text-shadow: 0 0 .4em rgb(166 140 255 / .35);
  transition: text-shadow var(--dur-3) var(--ease-out);
}
.monogram::before {          /* hexagon outline */
  content: ""; position: absolute; left: 50%; top: 50%; width: 68%; aspect-ratio: 305 / 345; translate: -50% -50%; z-index: -1;
  background: linear-gradient(160deg, rgb(240 237 247 / .34), rgb(166 140 255 / .18) 50%, rgb(138 212 255 / .26));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%, 0 25%, 1.2% 25.7%, 1.2% 74.3%, 50% 98.6%, 98.8% 74.3%, 98.8% 25.7%, 50% 1.4%, 1.2% 25.7%, 0 25%);
  opacity: .8; transition: transform 1.4s var(--ease-out), opacity var(--dur-2), filter var(--dur-3);
}
.monogram::after {           /* three diffraction lines through the vertices */
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgb(230 225 255 / .2) 50%, transparent calc(50% + .5px)),
    linear-gradient(30deg, transparent calc(50% - .5px), rgb(200 190 255 / .14) 50%, transparent calc(50% + .5px)),
    linear-gradient(150deg, transparent calc(50% - .5px), rgb(190 220 255 / .14) 50%, transparent calc(50% + .5px));
  -webkit-mask-image: radial-gradient(closest-side, transparent 28%, #000 40%, transparent 85%);
  mask-image: radial-gradient(closest-side, transparent 28%, #000 40%, transparent 85%);
  opacity: .8; transition: opacity var(--dur-3);
}
@media (hover: hover) {
  :is(.person:hover, a:hover) > .monogram, .monogram:hover { text-shadow: 0 0 .3em rgb(200 184 255 / .75), 0 0 1.1em rgb(228 156 242 / .4); }
  :is(.person:hover, a:hover) > .monogram::before, .monogram:hover::before { transform: rotate(60deg) scale(1.06); opacity: 1; filter: brightness(1.5); }
  :is(.person:hover, a:hover) > .monogram::after, .monogram:hover::after { opacity: 1; }
}

/* Post card (insights): mini-interface cover, FR badge, stretched link */
.post-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden;
  transition: border-color var(--dur-2);
}
.post-card:hover { border-color: var(--line-2); }
.post-card__body { display: flex; flex-direction: column; gap: .75rem; padding: clamp(1.1rem, .9rem + .8vw, 1.6rem); flex: 1; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: var(--step--2); color: var(--fg-3); }
.post-card__meta .badge { margin-right: .25rem; }
.post-card__title { font-size: var(--step-2); line-height: 1.16; letter-spacing: -.02em; }
.post-card__link { text-decoration: none; color: inherit; }
.post-card__link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.post-card__link:focus-visible { outline: none; }
.post-card:hover .post-card__title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.post-card__excerpt { color: var(--fg-2); font-size: var(--step--1); line-height: 1.6; }
.post-card__cta { margin-top: auto; padding-top: .4rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--fg); font-weight: 540; font-size: .9375rem; }
.post-card__cta svg { width: 1rem; height: 1rem; transition: transform var(--dur-2) var(--ease-out); }
.post-card:hover .post-card__cta svg { transform: translateX(3px); }

/* Mini-interface covers (drawn in HTML so text stays crisp) */
.ui-cover {
  position: relative; display: grid; align-content: center; gap: .6rem;
  aspect-ratio: 16 / 9; padding: clamp(1rem, .8rem + 1vw, 1.5rem) clamp(1.1rem, .9rem + 1.4vw, 2rem);
  background:
    radial-gradient(90% 90% at 85% 0%, rgb(166 140 255 / .16), transparent 60%),
    radial-gradient(70% 80% at 0% 100%, rgb(138 212 255 / .09), transparent 60%),
    #0b0e1b;
  border-bottom: 1px solid rgb(240 237 247 / .08);
  color: #f0edf7; font-size: .8125rem; line-height: 1.3; overflow: hidden;
}
.ui-cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 0 calc(100% - 1px), rgb(240 237 247 / .05) 0) 0 0 / 100% 22px; opacity: .6; }
.ui-field {
  position: relative; z-index: 1; display: flex; align-items: center; gap: .55rem; height: 2.4rem; padding: 0 .8rem;
  background: rgb(240 237 247 / .05); border: 1px solid rgb(240 237 247 / .2); border-radius: 4px; box-shadow: 0 0 0 3px rgb(166 140 255 / .12);
}
.ui-field svg { width: .95rem; height: .95rem; color: #a68cff; flex: none; }
/* four blinks (4.4 s), then the caret rests visible: WCAG 2.2.2, nothing blinks > 5 s without a pause control */
.ui-caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: var(--spectrum); animation: caret 1.1s steps(1) 4; }
.ui-list { position: relative; z-index: 1; display: grid; list-style: none; padding: .3rem; margin: 0; background: rgb(12 15 28 / .9); border: 1px solid rgb(240 237 247 / .12); border-radius: 4px; }
.ui-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .32rem .55rem; color: #b4b7c9; border-radius: 3px; }
.ui-list li b { color: #f0edf7; font-weight: 600; }
.ui-list li.is-active { background: rgb(166 140 255 / .14); color: #f0edf7; box-shadow: inset 2px 0 0 #a68cff; }
.ui-list__meta { color: #8b90a7; font-size: .75rem; font-variant-numeric: tabular-nums; }
.ui-select { position: relative; z-index: 1; display: inline-flex; justify-self: start; align-items: center; gap: .45rem; height: 2.1rem; padding: 0 .75rem; border: 1px solid rgb(240 237 247 / .2); border-radius: 4px; background: rgb(240 237 247 / .05); color: #b4b7c9; }
.ui-select b { color: #f0edf7; font-weight: 600; }
.ui-select svg { width: .8rem; height: .8rem; color: #a68cff; }
.ui-rank { position: relative; z-index: 1; display: grid; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.ui-rank li { display: grid; grid-template-columns: 1.4rem 1fr 2.2rem; align-items: center; gap: .55rem; color: #8b90a7; font-variant-numeric: tabular-nums; font-size: .75rem; }
.ui-rank__bar { height: 6px; border-radius: 3px; background: rgb(240 237 247 / .14); position: relative; overflow: hidden; }
.ui-rank__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v, .5) * 100%); border-radius: inherit; background: rgb(240 237 247 / .42); }
.ui-rank li:first-child { color: #f0edf7; }
.ui-rank li:first-child .ui-rank__bar::after { background: var(--spectrum); box-shadow: 0 0 10px rgb(166 140 255 / .6); }
.ui-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .4rem; }
.ui-chip { display: inline-flex; align-items: center; gap: .35rem; height: 1.9rem; padding: 0 .7rem; border-radius: 999px; border: 1px solid rgb(240 237 247 / .2); color: #b4b7c9; }
.ui-chip.is-on { color: #05060b; background: #f0edf7; border-color: #f0edf7; font-weight: 600; }
.ui-range { position: relative; z-index: 1; display: grid; gap: .45rem; padding-top: .35rem; }
.ui-range__track { position: relative; height: 4px; border-radius: 2px; background: rgb(240 237 247 / .16); margin-inline: .5rem; }
.ui-range__fill { position: absolute; left: var(--from, 20%); right: calc(100% - var(--to, 70%)); top: 0; bottom: 0; border-radius: inherit; background: var(--spectrum); }
.ui-range__fill::before, .ui-range__fill::after { content: ""; position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #f0edf7; box-shadow: 0 0 0 3px rgb(166 140 255 / .35); }
.ui-range__fill::before { left: -7px; }
.ui-range__fill::after { right: -7px; }
.ui-range__labels { display: flex; justify-content: space-between; color: #b4b7c9; font-size: .75rem; font-variant-numeric: tabular-nums; }
@keyframes caret { 50% { opacity: 0; } }

/* 12. Data: stats, steps, numerals, spec lists --------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); border-top: 1px solid var(--line); list-style: none; padding: 0; }
.stat { padding: 1.5rem 1.5rem 1.5rem 0; display: grid; gap: .6rem; align-content: start; }
.stat + .stat { padding-left: 1.5rem; border-left: 1px solid var(--line); }
@media (max-width: 719px) { .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
.stat__value { font-size: clamp(3rem, 2rem + 4.2vw, 6rem); line-height: .9; letter-spacing: -.05em; font-weight: 460; color: var(--fg); font-stretch: 94%; }
/* A non-numeric value ("Europe", "France") in the serif italic, so it never reads as a broken number */
.stat__value--word { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-stretch: normal; letter-spacing: -.035em; padding-right: .06em; }
/* Mona Sans tabular figures use a slashed zero: only while a counter is running */
.is-counting { font-variant-numeric: tabular-nums; }
.stat__unit { font-family: var(--font-serif); font-style: italic; font-weight: 340; letter-spacing: -.02em; font-stretch: normal; line-height: 0; }
.stat__label { color: var(--fg); font-weight: 540; font-size: var(--step-1); letter-spacing: -.01em; line-height: 1.3; }
.stat__text { color: var(--fg-2); max-width: 32ch; }
.count__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Steps — true sequences only. Horizontal by default, .steps--vertical = timeline */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); counter-reset: step; list-style: none; padding: 0; column-gap: 1.5rem; }
.step { position: relative; padding: 1.4rem 0 1.75rem; border-top: 1px solid var(--line); display: grid; gap: .6rem; align-content: start; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); justify-self: start; font-size: var(--step--1); color: var(--fg-3); }
.step::after { content: ""; position: absolute; left: 0; top: -1px; width: 2.5rem; height: 1px; background: var(--spectrum); }
.step__title { font-size: var(--step-2); letter-spacing: -.022em; line-height: 1.12; }
.step__text { color: var(--fg-2); max-width: 36ch; }
.steps--numerals .step::before { font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4.25rem); font-weight: 250; font-stretch: 118%; line-height: .9; letter-spacing: -.05em; background: var(--text-spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps--vertical { grid-template-columns: 1fr; column-gap: 0; position: relative; }
.steps--vertical .step { grid-template-columns: 3.5rem 1fr; column-gap: 1.25rem; padding: 0 0 2rem; border-top: 0; }
.steps--vertical .step::before { grid-row: span 3; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-2); border-radius: 50%; background: var(--bg); color: var(--fg); position: relative; z-index: 1; }
.steps--vertical .step::after { left: calc(1.375rem - .5px); top: 2.75rem; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line) 40%); }
.steps--vertical .step:last-child::after { display: none; }
.steps--vertical .step > * { grid-column: 2; }
.steps--vertical .step__title { padding-top: .5rem; }

/* Index list — big light numerals (01/02/03) with title and text */
.index-list { list-style: none; padding: 0; border-top: 1px solid var(--line-2); }
.index-list__item { display: grid; grid-template-columns: clamp(4.25rem, 3rem + 5vw, 8.5rem) minmax(0, 1fr); gap: var(--space-m); padding-block: var(--space-l); border-bottom: 1px solid var(--line); }
.index-list__num { justify-self: start; align-self: start; width: fit-content; font-size: clamp(2.75rem, 1.8rem + 3.6vw, 5.5rem); font-weight: 250; font-stretch: 118%; line-height: .85; letter-spacing: -.05em; background: var(--text-spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.index-list__title { font-size: var(--step-2); letter-spacing: -.022em; line-height: 1.14; margin-bottom: .5rem; }
.index-list__text { color: var(--fg-2); max-width: 58ch; }

/* Spec list — keyed rows (label + short key) */
.spec-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.spec-list > li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.spec-list__key { flex: none; font-size: var(--step--2); color: var(--fg-3); font-stretch: 88%; letter-spacing: .03em; white-space: nowrap; }
@media (min-width: 720px) { .spec-list--cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; border-top: 0; } .spec-list--cols > li:nth-child(-n+2) { border-top: 1px solid var(--line); } }
.spec-card { display: grid; align-content: start; gap: 1rem; padding: clamp(1.25rem, 1rem + 1.2vw, 2.25rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.spec-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.spec-card__title { font-size: var(--step-2); letter-spacing: -.022em; }
.spec-card__key { font-size: var(--step--2); color: var(--fg-3); }
/* .slab on a card: the card's own surface (same specificity, declared later) must not win over the navy panel */
.slab:is(.card, .spec-card, .project-card, .case-card) { background: var(--navy-panel); background-color: var(--navy); border: 0; border-radius: 0; }

/* Hairline feature list */
.hairline-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.hairline-list > li { padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--fg); display: flex; gap: .9rem; align-items: baseline; }
.hairline-list--cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); column-gap: 2rem; border-top: 0; }
.hairline-list--cols > li:nth-child(-n+2) { border-top: 1px solid var(--line); }
@media (max-width: 719px) { .hairline-list--cols > li:nth-child(2) { border-top: 0; } }
.hairline-list__mark { width: .8rem; height: .8rem; flex: none; color: var(--accent); transform: translateY(.08em); }

/* Feature strip: a band of short features right under a hero (glyph + title + one line),
   hairline separators; 4 columns → 2 (strip < 1080px) → 1 (< 560px). Container queries: the
   columns follow the strip's own width (full-bleed on pages = the viewport; narrower elsewhere).
   __pre = a muted first line inside the title. --stacked: glyph (+ __num) on top, a longer text below. */
.feature-strip { --strip-pad: clamp(1rem, 2vw, 2rem); container: strip / inline-size; position: relative; padding-block: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); border-bottom: 1px solid var(--line); background: var(--bg); }
.feature-strip__head { margin-bottom: var(--space-l); }   /* optional visible heading (e.g. an .eyebrow h2) */
.feature-strip__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-strip__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem 1rem; align-items: start; align-content: start; padding: .25rem var(--strip-pad); }
.feature-strip__item + .feature-strip__item { border-left: 1px solid var(--line); }
.feature-strip__item:first-child { padding-left: 0; }
.feature-strip__glyph { grid-row: span 2; width: 2.75rem; height: 2.75rem; color: var(--fg-2); }
.feature-strip__title { font-size: var(--step-1); letter-spacing: -.02em; line-height: 1.2; }
.feature-strip__pre { display: block; margin-bottom: .2rem; font-size: var(--step--1); font-weight: 480; letter-spacing: 0; color: var(--fg-3); }
.feature-strip__text { color: var(--fg-3); font-size: var(--step--1); line-height: 1.45; }
.feature-strip--stacked .feature-strip__item { grid-template-columns: minmax(0, 1fr); gap: .85rem; padding-block: 0; }
.feature-strip--stacked .feature-strip__item:last-child { padding-right: 0; }
.feature-strip__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.feature-strip--stacked .feature-strip__glyph { grid-row: auto; }
.feature-strip__num { font-size: var(--step--2); color: var(--fg-3); }
.feature-strip--stacked .feature-strip__title { font-size: var(--step-2); line-height: 1.12; letter-spacing: -.024em; }
.feature-strip--stacked .feature-strip__text { color: var(--fg-2); font-size: inherit; line-height: inherit; max-width: 36ch; }
@container strip (max-width: 1079px) {
  .feature-strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.75rem; }
  .feature-strip__item:nth-child(odd) { border-left: 0; padding-left: 0; }
  .feature-strip--stacked .feature-strip__list { row-gap: 2.25rem; }
  .feature-strip--stacked .feature-strip__item:nth-child(even) { padding-right: 0; }
}
@container strip (max-width: 559px) {
  .feature-strip__list, .feature-strip--stacked .feature-strip__list { grid-template-columns: 1fr; row-gap: 0; }
  .feature-strip__item, .feature-strip__item + .feature-strip__item { border-left: 0; padding: 1.1rem 0; }
  .feature-strip__item + .feature-strip__item { border-top: 1px solid var(--line); }
  .feature-strip--stacked .feature-strip__item, .feature-strip--stacked .feature-strip__item + .feature-strip__item { padding: 1.5rem 0; }
  .feature-strip--stacked .feature-strip__item:first-child { padding-top: 0; }
}

/* 13. Logos, marquee, chips, badges, filters ----------------------------- */
.logo { width: auto; max-width: var(--logo-w, 100%); max-height: var(--logo-h, 2.75rem); object-fit: contain; filter: var(--logo-filter); opacity: var(--logo-opacity); transition: opacity var(--dur-2); }
li:hover > .logo, .logo:hover { opacity: 1; }
.logo--tall { --logo-h: 3.5rem; }
.logo--solid { opacity: calc(var(--logo-opacity) * .8); } /* filled marks (e.g. SNCF) read heavier */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); list-style: none; padding: 0; }
.logo-wall > li { display: grid; place-items: center; min-height: 7.5rem; padding: 1.5rem 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logo-wall .logo { --logo-w: 9.5rem; }

/* Partner row: institutional logos keep their original colours on a white chip */
.partner-row { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; }
.partner-row > li { display: grid; place-items: center; min-width: 9rem; padding: 1rem 1.4rem; background: #fff; border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line); }
.partner-row img { height: var(--partner-h, 4.25rem); width: auto; max-width: 11rem; object-fit: contain; }
.partner-row__label { margin-top: .6rem; font-size: var(--step--2); color: var(--fg-3); }

/* Marquee (logos or ticker). JS adds the viewport, the loop clone and a visible pause button. */
.marquee { position: relative; --marquee-gap: clamp(2.5rem, 1.5rem + 4vw, 5rem); --marquee-duration: 40s; display: flex; align-items: center; gap: .75rem; }
.marquee__viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.marquee--fade .marquee__viewport, .marquee--fade:not(.is-ready) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__inner { display: flex; width: max-content; }
.marquee__track { display: flex; align-items: center; gap: var(--marquee-gap); padding-right: var(--marquee-gap); list-style: none; padding-left: 0; margin: 0; flex-wrap: wrap; justify-content: center; row-gap: 1.5rem; }
.marquee:not(.is-ready) .marquee__track { padding-right: 0; }
.js .marquee.is-ready .marquee__track { flex-wrap: nowrap; }
.js .marquee.is-ready .marquee__inner { animation: marquee var(--marquee-duration) linear infinite; }
.marquee.is-paused .marquee__inner, .marquee__viewport:hover .marquee__inner, .marquee:focus-within .marquee__inner { animation-play-state: paused !important; }
.marquee--reverse .marquee__inner { animation-direction: reverse; }
.marquee__toggle {
  flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  color: var(--fg); background: var(--surface-2); border: 1px solid var(--line-2);
  transition: border-color var(--dur-1), background-color var(--dur-1);
}
.marquee__toggle:hover { border-color: var(--line-3); background: var(--surface-3); }
.marquee--bleed { padding-right: var(--gutter); }
.marquee__toggle svg { width: .85rem; height: .85rem; }
.marquee--logos .marquee__track > li { display: grid; place-items: center; width: clamp(8.5rem, 7rem + 3vw, 11rem); height: 5rem; flex: none; }
.marquee--logos { --marquee-gap: clamp(1rem, .5rem + 1.5vw, 2rem); }
.marquee--logos .logo { --logo-w: 100%; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: var(--marquee-gap); white-space: nowrap; font-size: clamp(1.375rem, 1rem + 1.6vw, 2.5rem); letter-spacing: -.03em; color: var(--fg); font-weight: 460; }
.ticker-item::after { content: ""; width: .5em; height: .56em; background: var(--spectrum); clip-path: var(--hex); opacity: .85; }

/* Chips & pills */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.chip {
  --cut: 6px; position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; min-height: 2.5rem;
  font-size: var(--step--1); font-weight: 520; line-height: 1.2; color: var(--fg-2);
  background: var(--line-2); clip-path: var(--bevel); text-decoration: none;
}
.chip::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--surface-2); clip-path: var(--bevel); transition: background-color var(--dur-2); }
button.chip:hover, a.chip:hover { color: var(--fg); }
button.chip:hover::before, a.chip:hover::before { background: var(--surface-3); }
.chip[aria-pressed="true"], .chip.is-active { color: var(--on-fg); background: var(--fg); }
.chip[aria-pressed="true"]::before, .chip.is-active::before { background: var(--fg); }
button.chip[aria-pressed="true"]:hover, a.chip.is-active:hover { color: var(--on-fg); }
button.chip[aria-pressed="true"]:hover::before, a.chip.is-active:hover::before { background: var(--fg); }
.chip:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: 0; }
/* on a pressed (filled) chip the focus colour would be 1.5:1: draw the ring in the text colour */
.chip:is([aria-pressed="true"], .is-active):focus-visible { outline-color: var(--on-fg); }
.chip__count { color: var(--fg-3); }
.chip[aria-pressed="true"] .chip__count { color: inherit; opacity: .75; }
.chip--dot::after { content: ""; order: -1; width: 6px; height: 6px; border-radius: 50%; background: var(--spectrum); box-shadow: 0 0 8px var(--glow); }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: var(--radius-pill); border: 1px solid var(--line-2); font-size: var(--step--1); color: var(--fg-2); line-height: 1.3; }
.pill svg { width: .9rem; height: .9rem; }

.badge {
  display: inline-flex; align-items: center; gap: .45rem; padding: .28rem .6rem; border-radius: var(--radius-xs);
  font-size: var(--step--2); font-weight: 560; line-height: 1.25; color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent); border: 1px solid var(--line-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--pilot { color: var(--warn); }
.badge--live { color: var(--ok); }
.badge--concept { color: var(--info); }
.badge--neutral { color: var(--fg-2); }
.badge--lang { color: var(--fg); letter-spacing: .04em; font-weight: 640; }
.badge--lang::before, .badge--plain::before { display: none; }

/* Filter chips with live count */
.filter__bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter__head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; margin-bottom: var(--space-l); }
.filter__count { font-size: var(--step--1); color: var(--fg-2); }
.filter__empty { padding: 2rem 0; color: var(--fg-2); }

/* 14. Disclosure: accordion, tabs, dialog, toast, copy ------------------- */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.5rem; padding: 1rem 0; cursor: pointer; list-style: none;
  color: var(--fg); font-size: var(--step-1); font-weight: 540; letter-spacing: -.01em; line-height: 1.3;
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::after {
  content: ""; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--line-2);
  background: linear-gradient(var(--fg), var(--fg)) center / 10px 1.5px no-repeat, linear-gradient(var(--fg), var(--fg)) center / 1.5px 10px no-repeat;
  transition: transform var(--dur-2) var(--ease-out), background-size var(--dur-2);
}
.accordion__item[open] > .accordion__summary::after { transform: rotate(180deg); background-size: 10px 1.5px, 1.5px 0; }
.accordion__summary:hover { color: var(--fg-hover); }
.accordion__summary:focus-visible { outline-offset: 4px; }
.accordion__panel { padding: 0 0 1.4rem; color: var(--fg-2); max-width: 70ch; }
.accordion__panel > * + * { margin-top: .8em; }

.tabs { display: grid; gap: var(--space-l); }
.tabs__list { display: flex; gap: .4rem; flex-wrap: wrap; }
.no-js .tabs__list { display: none; }
.tabs__tab {
  --cut: 7px; flex: none; position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .6rem 1.05rem;
  font-size: .9375rem; font-weight: 520; color: var(--fg-2); white-space: nowrap;
  background: var(--line-2); clip-path: var(--bevel); transition: color var(--dur-2);
}
.tabs__tab::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--bg); clip-path: var(--bevel); transition: background-color var(--dur-2); }
.tabs__tab:hover { color: var(--fg); }
.tabs__tab:hover::before { background: var(--surface-2); }
.tabs__tab[aria-selected="true"] { color: var(--on-fg); background: var(--fg); }
.tabs__tab[aria-selected="true"]::before { background: var(--fg); }
.tabs__tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: 0; }
/* roving tabindex: keyboard focus always lands on the selected (filled) tab — ring in the text colour */
.tabs__tab[aria-selected="true"]:focus-visible { outline-color: var(--on-fg); }
.tabs__num { color: var(--fg-2); font-size: .8125rem; }
.tabs__tab[aria-selected="true"] .tabs__num { color: inherit; opacity: .72; }
.tabs__panel:focus-visible { outline-offset: 8px; }
.js .tabs__panel:not(.is-active) { display: none; }
.no-js .tabs__panel + .tabs__panel { margin-top: var(--space-xl); }
/* Small screens: tabs stack as full-width rows, so every tab is visible */
@media (max-width: 639px) {
  .js .tabs__list { flex-direction: column; flex-wrap: nowrap; gap: 0; border-top: 1px solid var(--line); }
  .js .tabs__tab { --cut: 0px; width: 100%; justify-content: flex-start; white-space: normal; text-align: left; min-height: 3.25rem; background: transparent; border-bottom: 1px solid var(--line); clip-path: none; }
  .js .tabs__tab::before { inset: 0; clip-path: none; background: transparent; }
  .js .tabs__tab[aria-selected="true"] { background: transparent; color: var(--fg); }
  .js .tabs__tab[aria-selected="true"]::before { background: color-mix(in srgb, var(--fg) 7%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
  .js .tabs__tab[aria-selected="true"] .tabs__num { color: var(--fg-2); opacity: 1; }
  .js .tabs__tab[aria-selected="true"]:focus-visible { outline-color: var(--focus); }   /* rows are not filled */
  .js .tabs__tab::after { content: ""; margin-left: auto; width: .5rem; height: .5rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .6; }
}

/* Dialog (native <dialog>: focus containment, Esc, backdrop click via main.js) */
.dialog {
  width: min(100% - 2rem, 44rem); max-height: min(88vh, 52rem); padding: 0; margin: auto;
  color: var(--fg-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  box-shadow: var(--shadow-2), 0 0 0 1px rgb(0 0 0 / .4);
  overflow: hidden;
}
.dialog::backdrop { background: rgb(3 4 8 / .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog[open] { animation: dialog-in .45s var(--ease-out); }
.dialog__panel { display: flex; flex-direction: column; max-height: inherit; }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.25rem 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.dialog__title { font-size: var(--step-2); letter-spacing: -.02em; }
.dialog__close { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line-2); color: var(--fg); }
.dialog__close:hover { background: var(--surface-3); }
.dialog__close svg { width: 1rem; height: 1rem; }
.dialog__body { padding: 1.25rem 1.5rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; }
.dialog__body > * + * { margin-top: .9em; }
.dialog__foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .75rem; }
html.dialog-open { overflow: hidden; }
.no-js .dialog:target { display: block; position: relative; inset: auto; margin: 2rem auto; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* Toast (Pertimm.toast) */
.toast-region { position: fixed; z-index: 400; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); translate: -50% 0; display: grid; gap: .5rem; justify-items: center; pointer-events: none; width: min(100% - 2rem, 28rem); }
.toast {
  display: inline-flex; align-items: center; gap: .6rem; padding: .75rem 1.1rem; max-width: 100%;
  background: #f0edf7; color: #05060b; font-size: var(--step--1); font-weight: 560; border-radius: var(--radius-s);
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / .7); animation: toast-in .5s var(--ease-out);
}
.toast svg { width: 1rem; height: 1rem; flex: none; color: var(--violet); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* Copy to clipboard */
.copy {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .35rem .8rem;
  font-size: var(--step--1); font-weight: 540; color: var(--fg); border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--fg) 4%, transparent); transition: border-color var(--dur-1), background-color var(--dur-1);
}
.copy:hover { border-color: var(--line-3); background: color-mix(in srgb, var(--fg) 8%, transparent); }
.copy svg { width: .95rem; height: .95rem; flex: none; }
.copy .copy__done { display: none; }
.copy.is-copied { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.copy.is-copied .copy__idle { display: none; }
.copy.is-copied .copy__done { display: inline-flex; }
.no-js .copy { display: none; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.contact-line__value { font-size: var(--step-2); color: var(--fg); font-weight: 520; letter-spacing: -.015em; text-decoration: none; overflow-wrap: anywhere; }
.contact-line__value:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; }

/* 15. CTA band, story, prose & TOC, kinetic type ------------------------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; padding-block: var(--space-section); border-top: 1px solid var(--line); }
.cta-band .prism-lite { --lx: 84%; --ly: 46%; --ls: clamp(84px, 8vw, 140px); }
/* the diffraction lines fade out just below the mark (the row hairline), so the vertical
   line never runs through the .cta-band__aside text under it */
.cta-band .prism-lite::after {
  -webkit-mask-image: radial-gradient(closest-side, transparent 10%, #000 16%, rgb(0 0 0 / .3) 50%, transparent 92%), linear-gradient(180deg, #000 50%, transparent 63%);
  mask-image: radial-gradient(closest-side, transparent 10%, #000 16%, rgb(0 0 0 / .3) 50%, transparent 92%), linear-gradient(180deg, #000 50%, transparent 63%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.cta-band__inner { display: grid; gap: var(--space-l); }
.cta-band__main { display: grid; gap: var(--space-s); }
.cta-band__title { font-size: clamp(2.5rem, 1.35rem + 4.6vw, 6.5rem); line-height: .96; letter-spacing: var(--track-display); font-weight: 540; max-width: 15ch; }
.cta-band__title em { font-weight: 320; }
.cta-band__row { display: grid; gap: var(--space-l); align-items: start; padding-top: var(--space-l); border-top: 1px solid var(--line-2); }
.cta-band__aside { display: grid; gap: .6rem; justify-items: start; color: var(--fg-2); max-width: 30rem; }
.cta-band__subtitle { font-size: var(--step-2); letter-spacing: -.02em; line-height: 1.15; }
@media (min-width: 900px) {
  .cta-band__row { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); }
  .cta-band__main { max-width: calc(100% - 14rem); }
}
@media (max-width: 899px) {
  .cta-band { padding-top: calc(var(--space-section) + 6rem); }
  .cta-band .prism-lite { --lx: calc(100% - 3.5rem - var(--gutter)); --ly: 4.5rem; --ls: 72px; }
}


/* Sticky scroll story */
.story { position: relative; }
.story__grid { display: grid; gap: var(--space-xl); }
@media (min-width: 1000px) {
  .story__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
  .story__stage { position: sticky; top: calc(var(--header-h) + 2rem); height: calc(100vh - var(--header-h) - 4rem); min-height: 28rem; display: grid; place-items: center; }
}
.story__steps { list-style: none; padding: 0; }
.story__step { padding-block: clamp(1.75rem, 1rem + 3vw, 3rem); border-top: 1px solid var(--line); }
.story__step :is(h3, p) { transition: color var(--dur-3) var(--ease-out); }
@media (min-width: 1000px) {
  .story__step { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; }
  /* inactive steps dim by colour (fg-3 = 6.4:1), never by low opacity */
  .js .story__step:not(.is-active) :is(h3, p) { color: var(--fg-3); }
}

/* Long-form prose (legal pages, articles) + optional sticky table of contents */
.prose { max-width: 70ch; color: var(--fg-2); font-size: var(--step-0); line-height: 1.72; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-3); letter-spacing: var(--track-h3); margin-top: 2em; line-height: 1.1; }
.prose h3 { font-size: var(--step-2); letter-spacing: -.02em; margin-top: 1.6em; line-height: 1.2; }
.prose h4 { font-size: var(--step-1); margin-top: 1.4em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); }
.prose a:hover { text-decoration-color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { border-left: 1px solid var(--accent); padding-left: 1.25em; font-family: var(--font-serif); font-style: italic; font-size: var(--step-2); color: var(--fg); line-height: 1.35; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose th, .prose td { text-align: left; padding: .7em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--fg); font-weight: 560; }
.prose strong { color: var(--fg); }
.prose hr { margin-block: 2em; }
.prose-layout { display: grid; gap: var(--space-xl); }
@media (min-width: 1000px) {
  .prose-layout { grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
  .prose-layout .toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.toc { font-size: var(--step--1); }
.toc__title { color: var(--fg-3); font-weight: 540; margin-bottom: .6rem; }
.toc__list { list-style: none; padding: 0; border-left: 1px solid var(--line); }
.toc__list a { display: block; padding: .4rem 0 .4rem 1rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--fg-2); text-decoration: none; line-height: 1.35; }
.toc__list a:hover { color: var(--fg); }
.toc__list a[aria-current="true"] { color: var(--fg); border-left-color: var(--accent); }
@media (max-width: 999px) { .toc { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); } }

/* Word-by-word illumination ([data-illuminate]); the dimmest word keeps AA contrast
   (--illum-floor: .5 on ink/navy = 4.7:1, .6 on paper = 4.8:1); off in reduced motion */
.js [data-illuminate].is-split .w { opacity: clamp(var(--illum-floor, .5), calc(var(--p, 1) * (var(--n) + 4) - var(--wi)), 1); transition: opacity .14s linear; }

/* Variable-font kinetic headline (Mona Sans width × weight crossover) */
.kinetic { --p: .5; }
.kinetic__line { display: block; white-space: nowrap; }
.kinetic__line--grow { font-stretch: calc(80% + var(--p) * 40%); font-weight: calc(300 + var(--p) * 360); }
.kinetic__line--shrink { font-stretch: calc(120% - var(--p) * 36%); font-weight: calc(660 - var(--p) * 320); }
@media (max-width: 639px) { .kinetic__line { white-space: normal; } }
.kinetic-rows { list-style: none; padding: 0; border-top: 1px solid var(--line-2); }
.kinetic-row { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-s) var(--space-xl); align-items: baseline; padding-block: clamp(1.2rem, .9rem + 1.2vw, 2rem); border-bottom: 1px solid var(--line); }
.kinetic-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--spectrum); transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--dur-4) var(--ease-out); }
.kinetic-row:hover::after, .kinetic-row:focus-within::after { transform: scaleX(1); }
.kinetic-row__title { font-size: clamp(1.9rem, 1.1rem + 3.2vw, 4.25rem); font-weight: 500; font-stretch: 96%; line-height: .98; letter-spacing: -.04em; transition: font-stretch var(--dur-4) var(--ease-out), font-weight var(--dur-4) var(--ease-out); }
.kinetic-row:hover .kinetic-row__title { font-stretch: 116%; font-weight: 600; }
.kinetic-row__text { color: var(--fg-2); max-width: 42ch; font-size: var(--step-1); line-height: 1.45; }
@media (max-width: 760px) { .kinetic-row { grid-template-columns: 1fr; } }

.beam { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line-2) 20%, rgb(166 140 255 / .6) 50%, var(--line-2) 80%, transparent); }
.glyph { width: 2.75rem; height: 2.75rem; color: var(--fg); }
.glyph--spectral { color: var(--accent); }

/* 16. Forms --------------------------------------------------------------- */
.form { display: grid; gap: 1.2rem; }
.form__fields { display: grid; gap: 1.2rem; }
.form__row { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.form__legend { font-size: var(--step--1); color: var(--fg-3); }
.form__foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; }
.field { position: relative; display: grid; gap: .45rem; align-content: start; }
.field__label { font-size: var(--step--1); font-weight: 540; color: var(--fg); }
.field__req { color: var(--danger); margin-left: .1em; }
.field__hint { font-size: var(--step--2); color: var(--fg-3); }
.field__input {
  width: 100%; min-height: 3.25rem; padding: .8rem 1rem;
  background: var(--field-bg); color: var(--fg);
  border: 1px solid var(--control-border); border-radius: var(--radius-xs);
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2);
  appearance: none;
}
.field__input::placeholder { color: var(--fg-3); opacity: 1; }
.field__input:hover { border-color: color-mix(in srgb, var(--fg) 50%, transparent); }
/* background-COLOR only: the shorthand would wipe the select chevron (background-image) */
.field__input:focus-visible { outline: none; border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 6%, var(--field-bg)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
textarea.field__input { min-height: 9rem; resize: vertical; line-height: 1.5; }
select.field__input {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%), linear-gradient(135deg, var(--fg-2) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - .9rem) 50%; background-size: .35rem .35rem; background-repeat: no-repeat;
  padding-right: 2.5rem;
}
select.field__input option { background: var(--surface-2); color: var(--fg); }
.field__input[aria-invalid="true"] { border-color: var(--danger); }
.field__error, .check__error { font-size: var(--step--1); color: var(--danger); display: flex; gap: .45rem; align-items: baseline; line-height: 1.4; }
.field__error::before, .check__error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: 50%; background: var(--danger); color: var(--bg); font-size: .6875rem; font-weight: 800; transform: translateY(.12em); }
.field__error:empty, .check__error:empty { display: none; }

/* Floating label: <div class="field field--float"><input … placeholder=" "><label …></div> */
.field--float { gap: 0; }
.field--float .field__input { padding-top: 1.35rem; padding-bottom: .45rem; }
.field--float .field__label {
  position: absolute; left: 1rem; top: 1.62rem; translate: 0 -50%; pointer-events: none; transform-origin: 0 50%;
  color: var(--fg-2); font-weight: 500; font-size: var(--step-0);
  transition: top var(--dur-2) var(--ease-out), font-size var(--dur-2) var(--ease-out), color var(--dur-1);
}
.field--float .field__input:focus-visible + .field__label,
.field--float .field__input:not(:placeholder-shown) + .field__label { top: .95rem; font-size: .75rem; color: var(--fg-2); font-weight: 560; }
.field--float .field__input::placeholder { color: transparent; }
.field--float .field__error { margin-top: .45rem; }

.check { display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; align-items: start; }
.check__input {
  appearance: none; width: 1.3rem; height: 1.3rem; margin-top: .12rem; flex: none; cursor: pointer;
  border: 1px solid var(--control-border); border-radius: 3px; background: var(--field-bg);
  display: grid; place-items: center; transition: background-color var(--dur-1), border-color var(--dur-1);
}
.check__input[type="radio"] { border-radius: 50%; }
.check__input::after { content: ""; width: .65rem; height: .35rem; border: 1.75px solid var(--on-fg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--dur-2) var(--ease-spring); }
.check__input[type="radio"]::after { width: .5rem; height: .5rem; border: 0; border-radius: 50%; background: var(--on-fg); transform: scale(0); }
.check__input:checked { background: var(--fg); border-color: var(--fg); }
.check__input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check__input[type="radio"]:checked::after { transform: scale(1); }
.check__input:hover { border-color: var(--fg-2); }
.check__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.check__input[aria-invalid="true"] { border-color: var(--danger); }
.check__label { color: var(--fg-2); font-size: var(--step--1); cursor: pointer; line-height: 1.5; }
.check__label a { color: var(--fg); }
.check .check__error { grid-column: 2; }
.choices { display: grid; gap: .6rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.choices legend { font-size: var(--step--1); font-weight: 540; color: var(--fg); margin-bottom: .5rem; padding: 0; }

.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: var(--step--1); color: var(--fg-2); }
.form-status:empty { display: none; }
.form-status[data-state] { position: relative; display: block; padding: .9rem 1rem .9rem 2.1rem; border: 1px solid var(--line-2); border-radius: var(--radius-xs); background: color-mix(in srgb, var(--fg) 3%, transparent); color: var(--fg); line-height: 1.5; }
.form-status[data-state]::before { content: ""; position: absolute; left: 1rem; top: 1.38rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--fg-3); }
.form-status[data-state="success"] { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.form-status[data-state="success"]::before { background: var(--ok); }
.form-status[data-state="error"] { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.form-status[data-state="error"]::before { background: var(--danger); }
.form-status[data-state="fallback"] { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.form-status[data-state="fallback"]::before { background: var(--warn); }
.form-status[data-state="loading"]::before { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.form-status a { color: var(--fg); font-weight: 560; text-decoration: underline; text-decoration-color: var(--accent); }
.form.is-success .form__fields { display: none; }
.form[aria-busy="true"] .form__fields { opacity: .7; transition: opacity var(--dur-1); }
@keyframes pulse { 50% { opacity: .35; } }

/* 17. Motion & reveal ----------------------------------------------------- */
/* Cross-document navigations only (typed "page-nav"): a page's own same-document
   document.startViewTransition() keeps the browser's plain cross-fade on the root, never this
   blur/rise. Browsers without transition types simply cross-fade. */
@view-transition { navigation: auto; types: page-nav; }
html:active-view-transition-type(page-nav)::view-transition-old(root) { animation: vt-out .35s var(--ease-in-out) both; }
html:active-view-transition-type(page-nav)::view-transition-new(root) { animation: vt-in .6s var(--ease-out) both; }
::view-transition-group(site-header) { animation-duration: 0s; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Reveal states exist only when JS runs (html.js). main.js reveals anything that
   is in view OR already above the viewport, so no content can stay hidden. */
.js [data-reveal] { transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-4) var(--ease-out), clip-path var(--dur-4) var(--ease-out); transition-delay: calc(var(--reveal-delay, 0) * 1ms + var(--i, 0) * 70ms); }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(1.25rem); }
.js [data-reveal="fade"]:not(.is-in) { transform: none; }
.js [data-reveal="mask"] { opacity: 1; }
.js [data-reveal="mask"]:not(.is-in) { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
.js [data-reveal="wipe"]:not(.is-in) { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); }
.js :is([data-reveal="mask"], [data-reveal="wipe"]).is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal].is-done { transition: none; transition-delay: 0s; }
.js :is([data-reveal="mask"], [data-reveal="wipe"]).is-done:not(.media) { clip-path: none; }
.no-reveal [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
/* media frames keep their bevel: reveal by wiping the bevel polygon down */
.js .media[data-reveal="mask"]:not(.is-in) { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% 0, 100% 0, 0 0, 0 0); }
.js .media[data-reveal].is-in, .js .media[data-reveal].is-done, .no-reveal .media[data-reveal] { clip-path: var(--bevel) !important; }

/* 18. Utilities ----------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: var(--space-s); }
.mt-m { margin-top: var(--space-m); }
.mt-l { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }
.mb-l { margin-bottom: var(--space-l); }
.ta-center { text-align: center; }
.nowrap { white-space: nowrap; }
.relative { position: relative; }
.flag-fr { display: inline-flex; width: 1.35em; height: .95em; flex: none; border-radius: 1.5px; overflow: hidden; box-shadow: 0 0 0 1px rgb(255 255 255 / .14); vertical-align: -.1em; }
.flag-fr::before, .flag-fr::after, .flag-fr span { content: ""; flex: 1; }
.flag-fr::before { background: #1f4fd8; }
.flag-fr span { background: #f5f5f7; }
.flag-fr::after { background: #e8363f; }
.icon { width: 1em; height: 1em; flex: none; }

/* 19. Paused motion, reduced motion & print ------------------------------ */
/* "Pause animations" (html.motion-paused, set by boot.js/main.js — WCAG 2.2.2): every CSS
   animation jumps to its last frame, exactly as under reduced motion (a one-shot entrance ends
   visible, a loop stops); UI transitions stay. Pages that give an element a specific still state
   under prefers-reduced-motion must give it the same state under :root.motion-paused.
   hero.js renders a still frame; JS loops follow Pertimm.onMotionChange(). */
:root.motion-paused *, :root.motion-paused *::before, :root.motion-paused *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
}
:root.motion-paused .bookend__light::before { animation: none !important; transform: translateX(-8%); }
:root.motion-paused .prism-lite::before, :root.motion-paused .prism-lite::after, :root.motion-paused .ui-caret { animation: none !important; }
:root.motion-paused .marquee .marquee__inner { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js .media[data-reveal] { clip-path: var(--bevel) !important; }
  .js .marquee .marquee__inner { animation: none !important; }
  .js .marquee .marquee__track { flex-wrap: wrap; padding-right: 0; }
  .js .marquee .marquee__track[aria-hidden="true"], .marquee__toggle { display: none; }
  .marquee--fade .marquee__viewport { -webkit-mask-image: none; mask-image: none; }
  .kinetic__line--grow, .kinetic__line--shrink { font-stretch: 100%; font-weight: 540; }
  .bookend__light::before { animation: none !important; transform: translateX(-8%); }
  .prism-lite::before, .prism-lite::after, .ui-caret { animation: none !important; }
  @view-transition { navigation: none; }
}
@media print {
  .site-header, .site-menu, .grain, .prism-canvas, .prism-lite, .marquee__toggle, .newsletter, .bookend, .toast-region, .copy, .hero-index, [data-motion-toggle] { display: none !important; }
  body, .theme-paper, .theme-navy, .slab { background: #fff !important; color: #111 !important; }
  h1, h2, h3, h4, .h1, .h2, .h3, .display { color: #000 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
