/* ==========================================================================
   OnPurpose Futures — Design System  (site.css)
   Concept: "The Origin". A single point from which intention radiates —
   taken from the starburst in the OnPurpose mark. Hairline rays, concentric
   arcs (individual → group → institution → community → system) and an
   architectural 12-column grid carry the idea: the future, by design.
   Rhythm: deep midnight environments alternate with warm ivory ones.
   ========================================================================== */

/* ---------- Local fallback faces (used only if Google Fonts is unavailable) */
@font-face { font-family: "OPF Serif"; src: url("../fonts/opf-serif-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "OPF Serif"; src: url("../fonts/opf-serif-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "OPF Sans"; src: url("../fonts/opf-sans-regular.woff") format("woff"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "OPF Sans"; src: url("../fonts/opf-sans-bold.woff") format("woff"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "OPF Mono"; src: url("../fonts/opf-mono-regular.woff") format("woff"); font-weight: 400 500; font-display: swap; }

/* ---------- Tokens */
:root {
  color-scheme: light;
  /* Midnight environments */
  --navy-950: #07111D;
  --navy-900: #0B1A2B;
  --navy-800: #10243A;
  --navy-700: #183049;
  --navy-600: #24415D;
  /* Warm grounds */
  --white: #FFFFFF;
  --paper: #FBF8F2;
  --ivory: #F6F1E7;
  --cream: #EDE4D3;
  --stone: #D9CDB8;
  /* Ink */
  --ink: #14181D;
  --charcoal: #22272E;
  --slate: #4B5560;
  --mist: #9AA7B5;
  --fog: #C9D1DA;
  /* Champagne gold — an accent with meaning, never wallpaper */
  --gold: #C2A27A;        /* hairlines, large type on navy */
  --gold-soft: #E3CFAB;   /* glows, highlights on navy */
  --gold-deep: #A6845A;   /* strokes on ivory */
  --gold-ink: #7D5F38;    /* small gold text on light grounds (5.2:1 on ivory) */
  /* Data-visualisation support hues (charts only) */
  --teal: #3F7D78;
  --clay: #B0694A;
  /* Evidence status */
  --st-verified: #3F7A57;
  --st-development: #A8762A;
  --st-planned: #4F6F92;
  --st-ambition: #C2A27A;
  --st-demo: #8A5A9E;

  /* Lines */
  --line-on-light: rgba(20, 24, 29, .13);
  --line-on-light-strong: rgba(20, 24, 29, .28);
  --line-on-dark: rgba(246, 241, 231, .14);
  --line-on-dark-strong: rgba(246, 241, 231, .32);

  /* Type */
  --font-serif: "Instrument Serif", "OPF Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Manrope", "OPF Sans", "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "OPF Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-hero: clamp(3.1rem, 1.05rem + 8.2vw, 9.25rem);
  --fs-display: clamp(2.7rem, 1.35rem + 5.1vw, 6.25rem);
  --fs-h1: clamp(2.35rem, 1.45rem + 3.5vw, 4.6rem);
  --fs-h2: clamp(1.95rem, 1.3rem + 2.55vw, 3.5rem);
  --fs-h3: clamp(1.45rem, 1.18rem + 1.05vw, 2.1rem);
  --fs-h4: clamp(1.1rem, 1.04rem + .25vw, 1.25rem);
  --fs-lead: clamp(1.12rem, 1.02rem + .42vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-xs: .8125rem;
  --fs-label: .75rem;
  --fs-micro: .6875rem;

  --lh-tight: 1.02;
  --lh-snug: 1.18;
  --lh-body: 1.65;

  /* Space */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem;
  --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem; --space-10: 8rem;
  --section-y: clamp(4.5rem, 2.6rem + 7.5vw, 10rem);
  --section-y-sm: clamp(3.25rem, 2.2rem + 4vw, 6rem);
  --gutter: clamp(16px, 4.2vw, 72px);
  --col-gap: clamp(16px, 2.2vw, 32px);
  --container: 1440px;
  --container-narrow: 860px;
  --measure: 64ch;

  --radius-s: 2px;
  --radius-m: 6px;
  --radius-l: 14px;

  --header-h: 76px;

  /* Motion */
  --ease-out: cubic-bezier(.16, .84, .24, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: 180ms; --dur-2: 380ms; --dur-3: 760ms; --dur-4: 1200ms;

  --shadow-lift: 0 1px 2px rgba(7, 17, 29, .06), 0 12px 32px -12px rgba(7, 17, 29, .22);
  --shadow-float: 0 24px 64px -20px rgba(7, 17, 29, .45);
}
@media (max-width: 760px) { :root { --header-h: 64px; } }

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 420ms; animation-timing-function: var(--ease-in-out); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
/* Band behind the sticky header on phones with a notch */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 120; background: var(--navy-900); }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; text-wrap: balance; }
p, li { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line-on-light); margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--gold-soft); color: var(--navy-950); }

:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .section--dark :focus-visible, .section--deep :focus-visible, .section--dark-raised :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .mobile-nav :focus-visible { outline-color: var(--gold-soft); }

.skip-link {
  position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 200;
  padding: .7rem 1rem; background: var(--gold); color: var(--navy-950); font-weight: 700; font-size: var(--fs-small);
  transform: translateY(-160%); transition: transform var(--dur-2) var(--ease-out); text-decoration: none;
}
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Layout */
.container {
  width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.container--wide { max-width: calc(1680px + var(--gutter) * 2); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-6); }
.grid-12 > * { min-width: 0; }
@media (max-width: 960px) { .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-5)); }
.stack > * { min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
.measure { max-width: var(--measure); }

.section { position: relative; padding-block: var(--section-y); isolation: isolate; }
.section--tight { padding-block: var(--section-y-sm); }
.section--flush-top { padding-top: 0; }
.section--paper { background: var(--paper); color: var(--ink); }
.section--ivory { background: var(--ivory); color: var(--ink); }
.section--cream { background: var(--cream); color: var(--ink); }
.section--white { background: var(--white); color: var(--ink); }
.section--dark, .on-dark { background: var(--navy-900); color: var(--ivory); }
.section--deep { background: var(--navy-950); color: var(--ivory); }
.section--dark-raised { background: var(--navy-800); color: var(--ivory); }
.section--dark .muted, .section--deep .muted, .on-dark .muted { color: var(--mist); }
.muted { color: var(--slate); }

/* Section head pattern: eyebrow + title + intro, on the 12-col grid */
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-5); margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 5rem); }
.section-head > * { min-width: 0; }
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head__title { grid-column: 1 / span 7; }
.section-head__intro { grid-column: 9 / span 4; align-self: end; }
.section-head--center { text-align: center; justify-items: center; }
.section-head--center > * { grid-column: 2 / span 10 !important; }
@media (max-width: 960px) {
  .section-head__title, .section-head__intro { grid-column: 1 / -1; }
}

/* ---------- Typography */
.hero-title, .display, .h1, .h2, .h3 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.012em; }
.hero-title { font-size: var(--fs-hero); line-height: .94; letter-spacing: -.02em; }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -.018em; }
.h1 { font-size: var(--fs-h1); line-height: 1.04; }
.h2 { font-size: var(--fs-h2); line-height: 1.08; }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: -.005em; }
.h4 { font-family: var(--font-sans); font-size: var(--fs-h4); line-height: 1.35; font-weight: 650; letter-spacing: -.01em; }
.h5 { font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.4; font-weight: 700; letter-spacing: -.005em; }
.hero-title em, .display em, .h1 em, .h2 em, .h3 em { font-style: italic; color: var(--gold-ink); }
.section--dark :is(.hero-title, .display, .h1, .h2, .h3) em, .section--deep :is(.hero-title, .display, .h1, .h2, .h3) em, .on-dark :is(.hero-title, .display, .h1, .h2, .h3) em { color: var(--gold-soft); }
.caps { text-transform: uppercase; letter-spacing: .06em; }
.lead { font-size: var(--fs-lead); line-height: 1.55; font-weight: 400; letter-spacing: -.005em; max-width: 58ch; }
.small { font-size: var(--fs-small); }
.xs { font-size: var(--fs-xs); }
.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .01em; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .45em; }
.prose a { color: var(--gold-ink); }
.on-dark .prose a, .section--dark .prose a { color: var(--gold-soft); }
.tabular { font-variant-numeric: tabular-nums lining-nums; }

/* Eyebrow: a tracked label led by a ray */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--font-sans); font-size: var(--fs-label); font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
.section--dark .eyebrow, .section--deep .eyebrow, .section--dark-raised .eyebrow, .on-dark .eyebrow { color: var(--gold); }
.eyebrow--plain::before { display: none; }
.eyebrow__index { font-family: var(--font-mono); font-weight: 500; letter-spacing: .04em; }

/* Pull statement */
.statement { font-family: var(--font-serif); font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -.01em; max-width: 22ch; }
.quote { font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.3; font-style: italic; }

/* Sources & citations */
.cite {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.35em; height: 1.35em; padding: 0 .3em; margin-left: .15em;
  font-family: var(--font-mono); font-size: .62em; line-height: 1; vertical-align: super; text-decoration: none;
  border: 1px solid currentColor; border-radius: 999px; position: relative; /* QA: opacity .78 removed — small text fell below 4.5:1 */
}
.cite:hover, .cite:focus-visible { opacity: 1; }
.cite[data-cite]:hover::after, .cite[data-cite]:focus-visible::after {
  content: attr(data-cite); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: min(320px, 80vw); padding: .55rem .7rem; z-index: 30;
  background: var(--navy-950); color: var(--ivory); font-family: var(--font-sans); font-size: .78rem; line-height: 1.4; letter-spacing: 0;
  white-space: normal; text-align: left; border-radius: 4px; box-shadow: var(--shadow-float); pointer-events: none;
}
.source-line { font-family: var(--font-mono); font-size: var(--fs-micro); line-height: 1.55; letter-spacing: .02em; color: var(--slate); }
.section--dark .source-line, .section--deep .source-line, .on-dark .source-line { color: var(--mist); }
.source-line a { color: inherit; }
.sources { counter-reset: src; display: grid; gap: .6rem; font-size: var(--fs-xs); line-height: 1.5; padding: 0; list-style: none; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 2.2em 1fr; gap: .4rem; }
.sources li::before { content: "[" counter(src) "]"; font-family: var(--font-mono); color: var(--gold-ink); }
.on-dark .sources li::before, .section--dark .sources li::before { color: var(--gold); }

/* ---------- Buttons & links */
.btn {
  --btn-bg: var(--navy-900); --btn-fg: var(--ivory); --btn-bd: var(--navy-900);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 52px; padding: 0 1.55rem; border: 1px solid var(--btn-bd); border-radius: var(--radius-s);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-sans); font-size: .9375rem; font-weight: 650; letter-spacing: .005em; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.btn::before { /* light sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-hover, var(--navy-700));
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out);
}
.btn:hover::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }
.btn .icon-arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .icon-arrow { transform: translateX(4px); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--navy-950); --btn-bd: var(--gold); --btn-hover: var(--gold-soft); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-on-light-strong); --btn-hover: var(--ivory); }
.btn--light { --btn-bg: var(--ivory); --btn-fg: var(--navy-950); --btn-bd: var(--ivory); --btn-hover: var(--white); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--ivory); --btn-bd: var(--line-on-dark-strong); --btn-hover: rgba(246,241,231,.08); }
.btn--sm { min-height: 42px; padding: 0 1.1rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem; font-weight: 650; font-size: .9375rem; text-decoration: none; color: inherit;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px;
  transition: background-size var(--dur-2) var(--ease-out);
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow .icon-arrow { transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover .icon-arrow { transform: translateX(4px); }
.icon-arrow { width: 1em; height: 1em; flex: none; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Evidence status tags — every claim carries its status */
.tag {
  --tag-c: var(--slate);
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .28rem .6rem .28rem .5rem; border: 1px solid color-mix(in srgb, var(--tag-c) 45%, transparent); border-radius: 999px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
  color: color-mix(in srgb, var(--tag-c) 55%, var(--ink)); /* QA: ≥4.5:1 on paper/ivory/cream (was 82%: 3.8:1 for gold tags) */
  background: color-mix(in srgb, var(--tag-c) 7%, transparent);
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--tag-c); }
.section--dark .tag, .section--deep .tag, .section--dark-raised .tag, .on-dark .tag { color: color-mix(in srgb, var(--tag-c) 55%, var(--ivory)); border-color: color-mix(in srgb, var(--tag-c) 55%, transparent); background: color-mix(in srgb, var(--tag-c) 14%, transparent); }
.tag--verified { --tag-c: var(--st-verified); }
.tag--development { --tag-c: var(--st-development); }
.tag--development::before { background: linear-gradient(90deg, var(--tag-c) 50%, transparent 50%); border: 1px solid var(--tag-c); }
.tag--planned { --tag-c: var(--st-planned); }
.tag--planned::before { background: transparent; border: 1.5px solid var(--tag-c); }
.tag--ambition { --tag-c: var(--gold-deep); }
.tag--ambition::before { border-radius: 0; width: 9px; height: 9px; background: conic-gradient(from 0deg, var(--tag-c) 0 8%, transparent 8% 25%, var(--tag-c) 25% 33%, transparent 33% 50%, var(--tag-c) 50% 58%, transparent 58% 75%, var(--tag-c) 75% 83%, transparent 83%); clip-path: circle(50%); }
.tag--target { --tag-c: var(--gold-deep); }
.tag--target::before { background: radial-gradient(circle, var(--tag-c) 30%, transparent 32% 52%, var(--tag-c) 54%); }
.tag--framework { --tag-c: var(--teal); }
.tag--prototype { --tag-c: var(--st-demo); }
.tag--prototype::before { border-radius: 1px; }
.tag--demo { --tag-c: var(--st-demo); }
.tag--demo::before { background: repeating-linear-gradient(45deg, var(--tag-c) 0 2px, transparent 2px 4px); border: 1px solid var(--tag-c); }
.tag--illustrative { --tag-c: var(--slate); }
.tag--illustrative::before { background: transparent; border: 1.5px dashed var(--tag-c); }
.on-dark .tag--illustrative, .section--dark .tag--illustrative { --tag-c: var(--mist); }
.tag--open { --tag-c: var(--st-verified); }
.tag--open::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag-c) 25%, transparent); }

/* Status note — a framed honesty statement */
.status-note {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start;
  padding: 1rem 1.15rem; border: 1px solid var(--line-on-light); border-left: 2px solid var(--gold-deep);
  font-size: var(--fs-small); line-height: 1.55; color: var(--slate); background: color-mix(in srgb, var(--ivory) 60%, transparent);
}
.section--dark .status-note, .section--deep .status-note, .on-dark .status-note { border-color: var(--line-on-dark); border-left-color: var(--gold); color: var(--fog); background: rgba(246,241,231,.03); }
.status-note strong { color: inherit; font-weight: 700; }

/* ---------- Cards & panels (used by role, not everywhere) */
.card { position: relative; display: flex; flex-direction: column; gap: var(--space-4); padding: clamp(1.4rem, 1rem + 1.2vw, 2.2rem); background: var(--white); border: 1px solid var(--line-on-light); border-radius: var(--radius-s); }
.card--quiet { background: transparent; }
.on-dark .card, .section--dark .card, .section--deep .card { background: rgba(246,241,231,.035); border-color: var(--line-on-dark); }
.card--link { text-decoration: none; transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.card--link:hover { border-color: var(--gold-deep); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.card__foot { margin-top: auto; padding-top: var(--space-4); }

.hairline-list { list-style: none; padding: 0; border-top: 1px solid var(--line-on-light); }
.hairline-list > li { padding-block: 1.1rem; border-bottom: 1px solid var(--line-on-light); }
.on-dark .hairline-list, .section--dark .hairline-list, .section--deep .hairline-list, .on-dark .hairline-list > li, .section--dark .hairline-list > li, .section--deep .hairline-list > li { border-color: var(--line-on-dark); }

/* Stat */
.stat { display: flex; flex-direction: column; gap: .55rem; }
.stat__value { font-family: var(--font-serif); font-size: clamp(2.8rem, 1.8rem + 3.6vw, 5.25rem); line-height: .95; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.stat__label { font-size: var(--fs-small); line-height: 1.5; max-width: 34ch; }

/* ---------- Media */
.media { position: relative; overflow: hidden; background: var(--cream); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--landscape { aspect-ratio: 16 / 10; }
.media--square { aspect-ratio: 1; }
.media--arch { border-radius: 999px 999px 0 0; }
.figcaption { margin-top: .75rem; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .03em; color: var(--slate); }
.on-dark .figcaption, .section--dark .figcaption { color: var(--mist); }

/* ---------- Signature graphic language */
/* Architectural grid overlay */
.gridlines { position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(to right, var(--grid-c, var(--line-on-light)) 1px, transparent 1px);
  background-size: calc((min(100%, var(--container) + var(--gutter) * 2) - var(--gutter) * 2 + var(--col-gap)) / 6) 100%;
  background-position: center top; opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.on-dark .gridlines, .section--dark .gridlines, .section--deep .gridlines { --grid-c: var(--line-on-dark); }
/* Concentric arcs — the five levels of change */
.arcs { position: absolute; pointer-events: none; z-index: -1; aspect-ratio: 1; width: var(--arcs-size, 900px); }
.arcs circle { fill: none; stroke: var(--arcs-c, var(--gold)); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .45; }
/* Ray burst ornament (CSS-only, 12 rays) */
.burst { --burst-c: var(--gold); position: relative; width: var(--burst-size, 44px); aspect-ratio: 1; flex: none; }
.burst::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--burst-c) 0deg .9deg, transparent .9deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 6%, #000 7% 100%); mask: radial-gradient(circle, transparent 0 6%, #000 7% 100%); }
.burst::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--burst-c); }
canvas.rays { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Divider with origin point */
.origin-rule { position: relative; height: 1px; background: var(--line-on-light); }
.origin-rule::after { content: ""; position: absolute; left: var(--origin-x, 0); top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.on-dark .origin-rule, .section--dark .origin-rule { background: var(--line-on-dark); }

/* ---------- Header */
.site-header {
  --hdr-fg: var(--ink); --hdr-bg: rgba(251, 248, 242, .86); --hdr-line: var(--line-on-light);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100; height: var(--header-h);
  color: var(--hdr-fg);
  transition: transform var(--dur-3) var(--ease-out), background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hdr-bg); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--hdr-line); transition: opacity var(--dur-2) var(--ease-out), background-color var(--dur-2); }
/* Over a dark hero: transparent, ivory text, until scrolled */
.has-dark-hero .site-header:not(.is-scrolled):not(.is-open) { --hdr-fg: var(--ivory); position: fixed; left: 0; right: 0; }
.has-dark-hero .site-header:not(.is-scrolled):not(.is-open)::before { opacity: 0; }
.has-dark-hero .site-header.is-scrolled, .has-dark-hero .site-header.is-open { position: fixed; left: 0; right: 0; }
.site-header.is-hidden:not(.is-open) { transform: translateY(calc(-100% - env(safe-area-inset-top, 0px))); }
.site-header.is-open { --hdr-fg: var(--ivory); --hdr-bg: var(--navy-950); --hdr-line: var(--line-on-dark); }

.site-header__inner { height: 100%; display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.5rem); }
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; height: 100%; }
.brand img { height: clamp(30px, 2.6vw, 38px); width: auto; }
.brand .brand__ivory { display: none; }
.has-dark-hero .site-header:not(.is-scrolled):not(.is-open) .brand__ink, .site-header.is-open .brand__ink { display: none; }
.has-dark-hero .site-header:not(.is-scrolled):not(.is-open) .brand__ivory, .site-header.is-open .brand__ivory { display: block; }

.primary-nav { margin-inline: auto; height: 100%; }
.primary-nav > ul { display: flex; align-items: stretch; height: 100%; gap: clamp(.25rem, 1.1vw, 1.25rem); list-style: none; margin: 0; padding: 0; }
.primary-nav > ul > li { display: flex; align-items: center; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 .55rem; border: 0; background: none; color: inherit;
  font-size: .875rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; position: relative; text-decoration: none;
}
.nav-trigger::after { content: ""; position: absolute; left: .55rem; right: .55rem; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out); }
.nav-trigger:hover::after, .nav-trigger[aria-expanded="true"]::after, .nav-trigger[aria-current="true"]::after { transform: scaleX(1); }
.nav-trigger[aria-current="true"]::after { background: var(--gold); }
.nav-trigger .chev { width: 10px; height: 10px; transition: transform var(--dur-2) var(--ease-out); opacity: .7; }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 44px; min-width: 44px; padding: 0 .7rem; border: 1px solid transparent; border-radius: 999px; background: none; color: inherit; font-size: .8125rem; font-weight: 600; text-decoration: none; transition: border-color var(--dur-2), background-color var(--dur-2); }
@media (hover: hover) { .icon-btn:hover { border-color: currentColor; } }
.icon-btn kbd { font-family: var(--font-mono); font-size: .65rem; padding: .1rem .35rem; border: 1px solid currentColor; border-radius: 4px; opacity: .6; }
.header-cta { min-height: 44px; padding: 0 1.1rem; font-size: .8125rem; }
.site-header.is-open .header-cta, .has-dark-hero .site-header:not(.is-scrolled):not(.is-open) .header-cta { --btn-bg: var(--gold); --btn-fg: var(--navy-950); --btn-bd: var(--gold); --btn-hover: var(--gold-soft); }
.menu-toggle { display: none; }
.menu-toggle .bars { position: relative; width: 20px; height: 10px; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform var(--dur-2) var(--ease-out), top var(--dur-2) var(--ease-out); }
.menu-toggle .bars::before { top: 0; } .menu-toggle .bars::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .primary-nav, .header-actions .hide-compact { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 520px) { .header-cta { display: none; } }

/* Mega panels */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 99;
  background: var(--navy-950); color: var(--ivory); border-top: 1px solid var(--line-on-dark);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55);
  max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px)); overflow: auto;
}
.mega[hidden] { display: none; }
.mega.is-entering .mega__inner { animation: mega-in var(--dur-3) var(--ease-out) both; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.mega__inner { display: grid; grid-template-columns: 4fr 5fr 3fr; gap: clamp(2rem, 4vw, 5rem); padding-block: clamp(2.5rem, 4vw, 4rem) clamp(2.5rem, 4vw, 3.5rem); }
.mega__inner > * { min-width: 0; }
.mega__intro .h3 { max-width: 16ch; margin-top: 1rem; }
.mega__intro p:not(.h3):not(.eyebrow) { margin-top: 1rem; color: var(--mist); font-size: var(--fs-small); max-width: 36ch; }
.mega__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 2rem; align-content: start; }
.mega__links a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line-on-dark); text-decoration: none; }
.mega__links a strong { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 1rem; font-weight: 650; }
.mega__links a strong::after { content: "→"; color: var(--gold); opacity: 0; transform: translateX(-6px); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out); }
.mega__links a:hover strong::after, .mega__links a:focus-visible strong::after { opacity: 1; transform: none; }
.mega__links a span { display: block; margin-top: .2rem; font-size: .8125rem; color: var(--mist); line-height: 1.45; }
.mega__links a[aria-current="page"] strong { color: var(--gold-soft); }
.mega__feature { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; padding: 1.4rem; overflow: hidden; text-decoration: none; border: 1px solid var(--line-on-dark); isolation: isolate; }
.mega__feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease-out); }
.mega__feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,17,29,0) 20%, rgba(7,17,29,.92) 85%); }
.mega__feature:hover img { transform: scale(1.04); }
.mega__feature .h4 { margin-top: .5rem; }
.mega-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(7,17,29,.45); opacity: 0; pointer-events: none; transition: opacity var(--dur-2); }
.mega-scrim.is-visible { opacity: 1; pointer-events: auto; }

/* Mobile navigation */
.mobile-nav {
  position: fixed; inset: 0; z-index: 98; background: var(--navy-950); color: var(--ivory);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav.is-entering { animation: mnav-in var(--dur-3) var(--ease-out) both; }
@keyframes mnav-in { from { opacity: 0; } to { opacity: 1; } }
.mobile-nav__inner { padding-block: 1rem calc(2rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; min-height: 100%; }
.mobile-nav details { border-bottom: 1px solid var(--line-on-dark); }
.mobile-nav summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 1.05rem 0; cursor: pointer; font-family: var(--font-serif); font-size: 1.85rem; line-height: 1.1; min-height: 64px; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: ""; width: 12px; height: 12px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--dur-2) var(--ease-out); }
.mobile-nav details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0 0 1rem; display: grid; gap: .1rem; }
.mobile-nav ul a { display: flex; flex-direction: column; padding: .6rem 0 .6rem 1rem; border-left: 1px solid var(--line-on-dark); text-decoration: none; font-weight: 600; }
.mobile-nav ul a span { font-weight: 400; font-size: .8125rem; color: var(--mist); }
.mobile-nav ul a[aria-current="page"] { border-left-color: var(--gold); color: var(--gold-soft); }
.mobile-nav__actions { display: grid; gap: .75rem; margin-top: auto; padding-top: 2.5rem; }
.mobile-nav__actions .btn { width: 100%; }
html.nav-locked, html.nav-locked body { overflow: hidden; }

/* Page offset when header is fixed over a dark hero */
.has-dark-hero main > :first-child { padding-top: calc(var(--header-h) + var(--hero-pad-top, clamp(3rem, 6vw, 6rem))); }

/* ---------- Page hero (standard institutional pages) */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding-bottom: clamp(3.5rem, 2rem + 5vw, 7rem); }
.page-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-6); align-items: end; }
.page-hero__grid > * { min-width: 0; }
.page-hero__title { grid-column: 1 / span 8; }
.page-hero__aside { grid-column: 9 / span 4; }
.page-hero .lead { margin-top: var(--space-5); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-6); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; opacity: .5; }
.breadcrumb a { text-decoration: none; opacity: .75; display: inline-block; padding-block: .5rem; margin-block: -.5rem; } /* QA: ≥24px touch target without shifting layout */
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 960px) { .page-hero__title, .page-hero__aside { grid-column: 1 / -1; } }

/* ---------- Tabs (enhanced by site.js) */
.tabs__list { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line-on-light); }
.on-dark .tabs__list, .section--dark .tabs__list { border-color: var(--line-on-dark); }
.tabs__tab { position: relative; padding: .9rem 1rem; border: 0; background: none; font-size: .9375rem; font-weight: 600; color: inherit; opacity: .65; transition: opacity var(--dur-1); }
.tabs__tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold-deep); transform: scaleX(0); transition: transform var(--dur-2) var(--ease-out); }
.tabs__tab:hover { opacity: 1; }
.tabs__tab[aria-selected="true"] { opacity: 1; }
.tabs__tab[aria-selected="true"]::after { transform: scaleX(1); }
.tabs__panel { padding-top: var(--space-6); }
.tabs__panel:focus-visible { outline-offset: 6px; }
/* Without JavaScript every tab panel is shown in sequence and the inert tab list is hidden */
html:not(.js) [role="tabpanel"][hidden] { display: block !important; }
html:not(.js) [role="tablist"] { display: none; }

/* ---------- Accordion (native details) */
.accordion { border-top: 1px solid var(--line-on-light); }
.accordion details { border-bottom: 1px solid var(--line-on-light); }
.on-dark .accordion, .section--dark .accordion, .on-dark .accordion details, .section--dark .accordion details { border-color: var(--line-on-dark); }
.accordion summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.25rem 0; cursor: pointer; font-weight: 650; font-size: 1.0625rem; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--font-sans); font-weight: 300; font-size: 1.6rem; line-height: 1; color: var(--gold-deep); transition: transform var(--dur-2) var(--ease-out); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion__body { padding: 0 0 1.5rem; max-width: var(--measure); }

/* ---------- Forms */
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .45rem; min-width: 0; align-content: start; }
.field__label { font-size: .875rem; font-weight: 650; }
.field__label .req { color: var(--gold-ink); margin-left: .15rem; }
.field__hint { font-size: .8125rem; color: var(--slate); line-height: 1.45; }
.field__error { font-size: .8125rem; font-weight: 600; color: #A33A2A; display: flex; gap: .4rem; align-items: center; }
.on-dark .field__error, .section--dark .field__error { color: #F0A898; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1px solid var(--line-on-light-strong); border-radius: var(--radius-s);
  background: var(--white); color: var(--ink); font-size: 1rem; line-height: 1.4;
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; padding-right: 2.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237D5F38' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--slate); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: #A33A2A; }
.on-dark .input, .on-dark .select, .on-dark .textarea, .section--dark .input, .section--dark .select, .section--dark .textarea { background: rgba(246,241,231,.05); color: var(--ivory); border-color: var(--line-on-dark-strong); }
.on-dark .field__hint, .section--dark .field__hint { color: var(--mist); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; align-items: start; font-size: .875rem; line-height: 1.5; cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; margin: 0; border: 1px solid var(--line-on-light-strong); border-radius: 3px; background: var(--white); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--navy-900); border-color: var(--navy-900); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--gold-soft); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.on-dark .check input, .section--dark .check input { background: transparent; border-color: var(--line-on-dark-strong); }
.on-dark .check input:checked, .section--dark .check input:checked { background: var(--gold); border-color: var(--gold); }
.on-dark .check input:checked::after, .section--dark .check input:checked::after { border-color: var(--navy-950); }
.choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .6rem; border: 0; padding: 0; margin: 0; }
.choice-group legend { margin-bottom: .6rem; font-size: .875rem; font-weight: 650; padding: 0; }
.choice { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .95rem 1rem; border: 1px solid var(--line-on-light-strong); border-radius: var(--radius-s); background: var(--white); cursor: pointer; font-size: .9375rem; line-height: 1.4; transition: border-color var(--dur-1), background-color var(--dur-1); }
.choice input { margin-top: .2rem; accent-color: var(--navy-900); }
.choice:hover { border-color: var(--slate); }
.choice:has(input:checked) { border-color: var(--navy-900); background: var(--ivory); box-shadow: inset 0 0 0 1px var(--navy-900); }
.on-dark .choice, .section--dark .choice { background: rgba(246,241,231,.04); border-color: var(--line-on-dark-strong); }
.on-dark .choice:has(input:checked), .section--dark .choice:has(input:checked) { border-color: var(--gold); background: rgba(194,162,122,.12); box-shadow: inset 0 0 0 1px var(--gold); }
.on-dark .choice input, .section--dark .choice input { accent-color: var(--gold); }
.form-status { padding: 1rem 1.15rem; border: 1px solid var(--line-on-light); font-size: .9375rem; }
.form-success { display: grid; gap: 1rem; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--gold-deep); background: var(--ivory); }
.on-dark .form-success, .section--dark .form-success { background: rgba(194,162,122,.08); border-color: var(--gold); }
.form-success .ref { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .05em; }
.form-note { font-size: .8125rem; color: var(--slate); line-height: 1.5; }
.on-dark .form-note, .section--dark .form-note { color: var(--mist); }
.error-summary { padding: 1rem 1.15rem; border: 1px solid #A33A2A; border-left-width: 3px; background: #FBEDEA; color: #5A1F15; font-size: .9rem; }
.error-summary ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.error-summary a { color: inherit; }

/* ---------- Next steps (contextual navigation) */
.next-steps { padding-block: var(--section-y-sm); background: var(--ivory); border-top: 1px solid var(--line-on-light); }
.next-steps__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1px; background: var(--line-on-light); border: 1px solid var(--line-on-light); margin-top: var(--space-6); }
.next-step { display: flex; flex-direction: column; gap: .6rem; min-height: 210px; padding: clamp(1.4rem, 2.5vw, 2rem); background: var(--ivory); text-decoration: none; transition: background-color var(--dur-2) var(--ease-out); }
.next-step:hover { background: var(--paper); }
.next-step .h3 { margin-top: .25rem; }
.next-step p { color: var(--slate); font-size: var(--fs-small); }
.next-step .link-arrow { margin-top: auto; color: var(--gold-ink); }

/* ---------- Dialog, search, toast */
.dialog { padding: 0; border: 0; background: transparent; color: inherit; max-width: none; max-height: none; width: 100%; height: 100%; }
.dialog::backdrop { background: rgba(7, 17, 29, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.search-panel { width: min(760px, calc(100% - 32px)); margin: calc(env(safe-area-inset-top, 0px) + 9vh) auto 0; background: var(--paper); color: var(--ink); border-radius: var(--radius-m); box-shadow: var(--shadow-float); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.search-panel__bar { display: flex; align-items: center; gap: .75rem; padding: 0 1rem 0 1.25rem; border-bottom: 1px solid var(--line-on-light); }
.search-panel__bar input { flex: 1; min-width: 0; height: 64px; border: 0; background: none; font-size: 1.125rem; outline: none; }
.search-panel__results { overflow-y: auto; padding: .5rem; }
.search-result { display: block; padding: .85rem 1rem; border-radius: var(--radius-s); text-decoration: none; }
.search-result:hover, .search-result[aria-selected="true"] { background: var(--ivory); }
.search-result__page { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.search-result__title { font-weight: 650; margin-top: .15rem; }
.search-result__snippet { font-size: .875rem; color: var(--slate); margin-top: .2rem; line-height: 1.5; }
.search-result mark { background: color-mix(in srgb, var(--gold) 35%, transparent); color: inherit; padding: 0 .1em; }
.search-panel__empty, .search-panel__hint { padding: 1.25rem; font-size: .875rem; color: var(--slate); }
.search-panel__foot { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1.25rem; border-top: 1px solid var(--line-on-light); font-size: .75rem; color: var(--slate); }

.toast-region { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 300; display: grid; gap: .5rem; width: min(480px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; padding: .9rem 1.1rem; background: var(--navy-950); color: var(--ivory); border-left: 2px solid var(--gold); font-size: .9rem; box-shadow: var(--shadow-float); animation: toast-in var(--dur-2) var(--ease-out); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer */
.site-footer { position: relative; overflow: hidden; isolation: isolate; background: var(--navy-950); color: var(--ivory); padding-top: clamp(4rem, 3rem + 5vw, 8rem); padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-statement { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6) var(--col-gap); align-items: end; padding-bottom: clamp(3rem, 5vw, 5rem); border-bottom: 1px solid var(--line-on-dark); }
.footer-statement > * { min-width: 0; }
.footer-statement .display { grid-column: 1 / span 8; }
.footer-statement__cta { grid-column: 9 / span 4; display: grid; gap: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--space-7) var(--col-gap); padding-block: clamp(3rem, 5vw, 4.5rem); }
.footer-grid > * { min-width: 0; }
.footer-grid h2 { font-family: var(--font-sans); font-size: var(--fs-label); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9375rem; color: var(--fog); }
.footer-brand img { width: min(300px, 100%); }
.footer-brand p { margin-top: 1.25rem; color: var(--mist); font-size: .9375rem; max-width: 34ch; }
.footer-legend { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line-on-dark); font-size: .8125rem; color: var(--mist); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.newsletter { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter .input { flex: 1 1 200px; min-height: 48px; }
.newsletter .btn { min-height: 48px; }
@media (max-width: 960px) {
  .footer-statement .display, .footer-statement__cta { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Guide launcher (floating) */
.guide-launcher {
  position: fixed; right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 95;
  display: inline-flex; align-items: center; gap: .6rem; height: 52px; padding: 0 1.1rem 0 .55rem; border: 1px solid rgba(194,162,122,.5); border-radius: 999px;
  background: var(--navy-950); color: var(--ivory); font-size: .875rem; font-weight: 650; box-shadow: var(--shadow-float);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2);
}
.guide-launcher:hover { transform: translateY(-2px); }
.guide-launcher .burst { --burst-size: 38px; }
.guide-launcher.is-tucked { transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2), visibility 0s linear var(--dur-2); }
@media (max-width: 520px) { .guide-launcher .guide-launcher__label { display: none; } .guide-launcher { padding: 0 .4rem; width: 52px; justify-content: center; } }

/* ---------- Motion (progressive: content is visible at rest) */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.wi { display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- Utilities */
.u-mt-1 { margin-top: var(--space-2); } .u-mt-2 { margin-top: var(--space-4); } .u-mt-3 { margin-top: var(--space-5); } .u-mt-4 { margin-top: var(--space-6); } .u-mt-5 { margin-top: var(--space-7); } .u-mt-6 { margin-top: var(--space-8); }
.u-center { text-align: center; }
.u-gold { color: var(--gold-ink); }
.on-dark .u-gold, .section--dark .u-gold, .section--deep .u-gold { color: var(--gold); }
.u-nowrap { white-space: nowrap; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.placeholder-note { display: inline-flex; gap: .5rem; align-items: center; padding: .35rem .6rem; border: 1px dashed var(--gold-deep); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .04em; color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.on-dark .placeholder-note, .section--dark .placeholder-note { color: var(--gold-soft); border-color: var(--gold); }

/* QA fix (Oct 2026): text-colour adaptations for dark grounds were scoped to .section--dark only in places.
   Apply them consistently to .section--deep and .section--dark-raised (text colour only; no structural changes). */
:is(.section--deep, .section--dark-raised) .prose a { color: var(--gold-soft); }
.section--dark-raised .muted, .section--dark-raised .source-line { color: var(--mist); }
.section--dark-raised :is(.hero-title, .display, .h1, .h2, .h3) em { color: var(--gold-soft); }
:is(.section--deep, .section--dark-raised) .sources li::before { color: var(--gold); }
:is(.section--deep, .section--dark-raised) .tag--illustrative { --tag-c: var(--mist); }
.section--dark-raised .status-note { border-color: var(--line-on-dark); border-left-color: var(--gold); color: var(--fog); background: rgba(246,241,231,.03); }
:is(.section--deep, .section--dark-raised) .figcaption { color: var(--mist); }
:is(.section--deep, .section--dark-raised) .field__error { color: #F0A898; }
:is(.section--deep, .section--dark-raised) :is(.field__hint, .form-note) { color: var(--mist); }
.section--dark-raised .u-gold { color: var(--gold); }
:is(.section--deep, .section--dark-raised) .placeholder-note { color: var(--gold-soft); border-color: var(--gold); }

/* Print */
@media print {
  .site-header, .mobile-nav, .mega, .guide-launcher, .toast-region, canvas.rays { display: none !important; }
  .section--dark, .section--deep, .section--dark-raised, .on-dark { background: #fff !important; color: #000 !important; }
}
