/**
 * Shared design tokens. Three layers:
 *   1. Brand palette (`--brand-*`) — raw colors.
 *   Mark key — `--key` / `--key-strong`: blue by day, green by night (sites may override).
 *   2. Semantic tokens (`--page-*`, `--prose-*`, `--line-*`, `--btn-*`, …) — switch under `.dark` / `html[data-cx-theme="dark"]`.
 *   3. App Tailwind `@theme` maps (consumer `theme.css`) → utilities like `bg-surface-page`.
 *
 * Components use layer 2 via `var()` (or Tailwind `@theme` → utilities), never layer 1 hex.
 * Marketing apps may override `--font-landing-*` / `--rail-slot` for landing.css.
 * The hero rail stays dark. Code panels and `--shiki-*` follow light/dark and the active scheme.
 */

/* Interpolate theme-tied biolum colors from the live value (dawn/dusk, not a snap). */
@property --hero-glow-a {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(61, 70, 236, 0.42);
}
@property --hero-glow-b {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(61, 70, 236, 0.22);
}
@property --hero-glow-c {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(74, 120, 255, 0.1);
}
@property --hero-glow-d {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(168, 190, 255, 0.035);
}
@property --biolum-field-strength {
  syntax: '<number>';
  inherits: true;
  initial-value: 0.36;
}

:root {
  /* —— 1. Brand palette (Corio brand book 1.0) —— */
  --brand-blue: #3d46ec;
  --brand-blue-deep: #2a30a8;
  /* Lighter logo blue — same hue as `--brand-blue`, not periwinkle. */
  --brand-blue-bright: #4a78ff;
  --brand-green: #2cc875;
  --brand-green-deep: #13854b;
  /* Daylight ocean chrome — hero links / muted accent (not the mark key). */
  --brand-ocean-sky: #3ec8dc;
  --brand-ocean-cyan: #2ab8c4;

  /** Mark + solid primary — `#3d46ec` by day (`.dark` flips to `--brand-green`). */
  --key: var(--brand-blue);
  --key-strong: var(--brand-blue-bright);
  /* Deck wordmark / URL green (corio lockup on navy). */
  --brand-mint: #6ffdc8;
  --brand-indigo: #4538b4;
  --brand-violet: #6a45f8;
  --brand-violet-muted: #6a45f8;
  --brand-navy: #00021a;
  --brand-navy-raised: #0b0e26;
  --brand-navy-inset: #181b33;
  --brand-deck: #222640;
  --brand-deck-raised: #2c3154;
  --brand-deck-inset: #1a1e36;
  --brand-slate: #363848;
  --brand-cream: #faf7f4;
  --brand-cream-raised: #f1ede8;
  --brand-cream-inset: #e8e3dc;
  --brand-cream-deep: #d6d0c7; /* grounding band (footer) under cream canvas */
  --brand-gray: #c4c4c4;
  --brand-coral: #ff6262;
  --brand-yellow: #e0e43a;
  --brand-white: #ffffff;
  --brand-black: #000000;
  /* Near-black night floors (under ocean splash) */
  --brand-void: #000004;
  --brand-void-raised: #00000a;
  --brand-void-inset: #000002;
  --brand-void-floor: #000008; /* dark ocean settle */
  --brand-magenta: #8a2f7a; /* ocean family (Swift oceanHueMagentaTop) */
  --brand-teal: #0c6870; /* ocean family (Swift cyan) */

  /* Marketing fonts + rail — consumers may override (e.g. Supreme) */
  --font-landing-sans: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans, sans-serif;
  --font-landing-display: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans, sans-serif;
  --font-landing-mono: ui-monospace, monospace;
  --rail-slot: 6.5rem;

  /* —— Hero rail (always dark floor; glow soft in light theme, strong in dark) —— */
  --hero-surface: var(--brand-navy);
  /* Solar crest — stronger top curve, A-logo key blue. */
  --hero-glow-a: rgba(61, 70, 236, 0.42);
  --hero-glow-b: rgba(98, 128, 255, 0.16);
  --hero-glow-c: rgba(130, 165, 255, 0.07);
  --hero-glow-d: rgba(186, 205, 255, 0.028);
  --hero-glow-fade: rgba(220, 230, 255, 0);
  --hero-divider: rgb(255, 255, 255);
  --hero-text: var(--brand-white);
  --hero-text-muted: rgba(255, 255, 255, 0.8);
  --hero-text-subtle: rgba(255, 255, 255, 0.45);
  --hero-accent: var(--key);
  --hero-accent-strong: var(--key-strong);
  --hero-link: rgba(255, 255, 255, 0.3);
  --hero-link-hover: var(--accent-live-muted);
  --hero-link-bg-hover: rgba(255, 255, 255, 0.05);
  /** Page chrome text links + dock nav (paired with `.cx-link-chip` in `link-chip.css`). */
  --page-link: var(--prose-muted);
  --page-link-hover: var(--ink);
  --page-link-bg-hover: var(--hover-wash);
  --page-link-bg-current: var(--accent-wash);
  --hero-ring: rgba(255, 255, 255, 0.15);
  /* Marks — `--key` (blue day / green night). Ocean sky = `--accent-live-muted` only. */
  --logo: var(--key);
  --logo-on-hero: var(--key);
  /* Field lights — A-logo key blue (both themes). */
  --biolum-glow: var(--brand-blue);
  --biolum-glow-alt: var(--brand-blue-deep);
  /* Particle / filament field gain — readable by day, full at night. */
  --biolum-field-strength: 0.78;
  --cx-theme-fade: 1.1s;
  transition:
    --hero-glow-a 1.1s cubic-bezier(0.22, 0.8, 0.28, 1), --hero-glow-b 1.1s cubic-bezier(0.22, 0.8, 0.28, 1), --hero-glow-c 1.1s cubic-bezier(0.22, 0.8, 0.28, 1), --hero-glow-d 1.1s cubic-bezier(0.22, 0.8, 0.28, 1), --biolum-field-strength 1.1s cubic-bezier(0.22, 0.8, 0.28, 1);
  transition:
    --hero-glow-a var(--cx-theme-fade) cubic-bezier(0.22, 0.8, 0.28, 1), --hero-glow-b var(--cx-theme-fade) cubic-bezier(0.22, 0.8, 0.28, 1), --hero-glow-c var(--cx-theme-fade) cubic-bezier(0.22, 0.8, 0.28, 1), --hero-glow-d var(--cx-theme-fade) cubic-bezier(0.22, 0.8, 0.28, 1), --biolum-field-strength var(--cx-theme-fade) cubic-bezier(0.22, 0.8, 0.28, 1);

  /* Hero UI (forms, buttons on dark panel) */
  --hero-form-placeholder: var(--hero-text-subtle);
  --hero-form-surface: rgba(255, 255, 255, 0.025);
  --hero-form-ring: var(--hero-ring);
  --hero-form-focus-ring: rgba(61, 70, 236, 0.22);
  --hero-form-focus-border: var(--accent-live);

  /* Typography scale (Document fonts — use bundled weights 300 / 400 / 500 / 700 only) */
  --type-caption-size: 0.875rem;
  --type-caption-leading: 1.5rem;
  --type-body-small-size: 0.8125rem;
  --type-body-size: 1rem;
  --type-body-leading: 1.75rem;
  --type-label-size: 0.9375rem;
  --type-page-title-size: 1.25rem;
  --type-prose-title-size: 1.375rem;
  --type-prose-subhead-size: 1.125rem;
  --type-hero-display-size: 2.75rem;
  --type-hero-display-leading: 1.1;
  /** Hero intro paragraph — between landing body and section titles */
  --type-hero-lede-size: 1.375rem;
  --type-hero-lede-leading: 1.6;
  /** accord.fm Intro stack — mark, headline, lede, primary CTA, link row */
  --hero-intro-gap-headline: 4rem;
  --hero-intro-gap-lede: 1.25rem;
  --hero-intro-gap-actions: 2.5rem;
  --hero-intro-gap-links: 2rem;
  --hero-intro-shell-pad-top: 5rem;
  --hero-intro-shell-pad-bottom: 4rem;
  --hero-intro-shell-pad-top-sm: 8rem;
  --hero-intro-shell-pad-bottom-sm: 5rem;
  --hero-intro-shell-pad-top-lg: 5rem;
  --hero-intro-shell-pad-bottom-lg: 5rem;
  --hero-intro-rail-pad-top: 2.5rem;
  --type-mono-label-size: 0.75rem;
  --type-mono-label-leading: 1.125rem;
  --type-eyebrow-tracking: 0.12em;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Marketing / landing scale (full-bleed hero + section rhythm; not changelog rail) */
  --type-landing-hero-size: max(3.25rem, min(5.5vw, 4.75rem));
  --type-landing-hero-leading: 1.08;
  --type-landing-section-size: max(2.35rem, min(3.8vw, 3.25rem));
  --type-landing-section-leading: 1.12;
  --type-landing-title-size: 1.375rem;
  --type-landing-body-size: 1.125rem;
  --type-landing-body-leading: 1.75;
  --type-landing-lede-size: 1.25rem;
  --type-landing-lede-leading: 1.65;
  --type-landing-caption-size: 0.9375rem;
  --type-landing-nav-size: 1rem;
  --type-landing-eyebrow-size: 0.75rem;
  --type-landing-eyebrow-tracking: 0.12em;
  --space-section: 7.5rem;
  --space-block: 2.75rem;
  --pad-inline: 5rem;
  /** Marketing full-page content width; half used in page gutter calc (see lantern `px-page`) */
  --page-column-max: 76rem;
  /** accord.fm Layout — fixed intro copy width (`lg:w-96`) */
  --page-copy-width: 24rem;
  /** accord.fm Layout — right column reserve in `mr-page-hero` */
  --page-hero-media-reserve: 40rem;
  /** Minimum outer gutter on the media side of hero protocol calc */
  --page-gutter-media-min: 2rem;
  --pad-hero-block: 4rem;
  --hero-copy-max: 42rem;
  /** Sticky hero — how far the supporters strip rides up over the device column */
  --supporters-parallax-overlap: 11rem;
  /** Max upward bg shift on hero device art while the strip docks */
  --supporters-parallax-media-shift: 3.5rem;
  /** Supporter logo tile — sync height with render-supporter-logos.py DISPLAY_LOGO_H */
  --supporter-tile-h: 58px;
  --supporter-tile-bg: rgb(1, 2, 33);

  /* Shape */
  --radius-square: 0;

  /*
   * Daylight ocean — Munsell 5PB neighborhood of logo `#3d46ec` (value/chroma steps).
   * No seafoam; night `.dark` uses the blue/green depth wash below.
   */
  --ocean-purple: var(--brand-blue);
  --ocean-magenta: var(--brand-blue-bright);
  --ocean-teal: var(--brand-blue-deep);
  --ocean-mint: var(--brand-blue-bright);
  --ocean-blue: var(--brand-blue);
  --ocean-floor: var(--brand-navy);

  /* —— 2. Page chrome —— */
  --page-surface: var(--brand-cream);
  --page-surface-elevated: var(--brand-white);
  --page-surface-inset: var(--brand-cream-raised);
  --page-fill: var(--brand-cream-inset);
  --page-overlay: rgba(0, 2, 26, 0.25);
  --panel-recessed: var(--brand-cream-raised);

  /* Primary ink / links (flip with theme; components use these, not --brand-*) */
  --ink: var(--brand-navy);
  --link-hover: var(--brand-navy);
  --icon: var(--brand-blue-deep);

  /* Lines (borders, rings, dividers) and hover washes */
  --line-subtle: rgba(0, 2, 26, 0.06);
  --line: rgba(0, 2, 26, 0.12);
  --line-strong: rgba(0, 2, 26, 0.24);
  --hover-wash: rgba(0, 2, 26, 0.05);

  /* Marketing footer band */
  --footer-bg: var(--brand-cream-deep);
  --footer-ink: var(--brand-navy);
  --footer-muted: rgba(0, 2, 26, 0.62);
  --footer-border: var(--line);

  /* —— Prose / changelog column —— */
  --prose-body: rgba(0, 2, 26, 0.78);
  --prose-heading: var(--brand-navy);
  --prose-muted: rgba(0, 2, 26, 0.58);
  --prose-subtle: rgba(0, 2, 26, 0.4);
  --prose-quote: var(--prose-muted);
  --prose-quote-border: var(--line);
  --prose-link: var(--brand-blue-deep);
  --prose-link-hover: var(--brand-navy);
  --prose-link-underline: rgba(61, 70, 236, 0.5);
  --prose-link-hover-underline: rgba(0, 2, 26, 0.4);
  --prose-bold: var(--brand-navy);
  --prose-code: var(--brand-navy);
  --prose-kbd: var(--prose-body);
  --prose-kbd-bg: var(--page-surface-inset);
  --prose-kbd-border: var(--line);
  --prose-pre-surface: #e8eaf8;
  --prose-pre-text: var(--brand-navy);
  --prose-pre-shadow: none;
  --prose-hr: var(--line-subtle);
  --prose-table-border: var(--line-strong);
  --prose-table-border-soft: var(--line-subtle);
  --prose-marker: var(--prose-subtle);

  --accent-live: var(--key);
  --accent-live-muted: var(--brand-ocean-sky);
  --accent-live-emphasis: var(--brand-blue-deep);
  --accent-live-on-hero: var(--key);
  --accent-live-on-hero-strong: var(--key-strong);

  /* —— Accent (marks track `--key`; muted/emphasis static in CSS) —— */
  --accent: var(--key);
  --accent-muted: var(--accent-live-muted);
  --accent-emphasis: var(--accent-live-emphasis);
  --accent-text: var(--accent-live-emphasis);
  --accent-wash: color-mix(in srgb, var(--accent-live) 10%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent-live) 35%, transparent);
  --label: var(--brand-indigo);
  --info: var(--brand-indigo);
  --info-wash: rgba(69, 56, 180, 0.08);
  --info-ring: rgba(69, 56, 180, 0.25);
  --warning: #8a8c00;
  --warning-wash: rgba(224, 228, 58, 0.2);
  --warning-ring: rgba(224, 228, 58, 0.6);
  --danger: #d93b3b;
  --danger-wash: rgba(255, 98, 98, 0.1);
  --danger-ring: rgba(255, 98, 98, 0.35);

  /* —— Code panel —— */
  --code-chrome: #e8eaf8;
  --code-muted: rgba(0, 2, 26, 0.5);
  --code-line: rgba(0, 2, 26, 0.08);

  /* —— Buttons (brand book: primary / secondary / tertiary, enabled + active) —— */
  --btn-radius: 0.75rem;
  --btn-hover-glass: rgba(0, 2, 26, 0.06);
  /* Ghost secondary — same quiet plate as hero IconLink hover */
  --btn-ghost-hover-glass: var(--hero-link-bg-hover);
  /**
   * Hero / biolum rail — frosted white on dark floor (same in light + dark;
   * page chrome primaries use `--btn-primary-glass-*` below).
   */
  --btn-cta-glass-tint: rgba(255, 255, 255, 0.04);
  --btn-cta-glass-tint-hover: rgba(255, 255, 255, 0.08);
  --btn-cta-glass-tint-active: rgba(255, 255, 255, 0.1);
  --btn-cta-glass-tint-blur: 8px;
  --btn-cta-glass-tint-glow: rgba(0, 0, 10, 0.18);
  /** Footer join + section eyebrows — solid mark key (`.cx-eyebrow--mark` uses `--key`). */
  --btn-footer-cta-glass: var(--key);
  --btn-footer-cta-glass-hover: color-mix(in srgb, var(--key) 92%, white 8%);
  --btn-footer-cta-glass-active: color-mix(in srgb, var(--key) 86%, var(--brand-blue-deep) 14%);
  --btn-footer-cta-glass-blur: 0px;
  --btn-footer-cta-glass-glow: color-mix(in srgb, var(--key) 14%, transparent);
  --btn-footer-cta-edge: color-mix(in srgb, var(--brand-blue-deep) 24%, transparent);
  --btn-footer-cta-text: var(--brand-white);
  /*
   * Daylight primary glass — key blue (`--logo` / hero accent) + dense fill;
   * quiet bloom. Tracks `apply-ocean-accent.ts` when biolum mounts.
   */
  --btn-primary-bg: var(--logo);
  --btn-primary-glass: color-mix(in srgb, var(--logo) 84%, transparent);
  --btn-primary-glass-hover: color-mix(in srgb, var(--logo) 90%, transparent);
  --btn-primary-glass-active: color-mix(in srgb, var(--logo) 94%, transparent);
  --btn-primary-glass-blur: 14px;
  --btn-primary-glass-bloom: 6px;
  --btn-primary-glass-edge: color-mix(
    in srgb,
    var(--accent-live-on-hero-strong) 36%,
    transparent
  );
  --btn-primary-glass-sheen: color-mix(
    in srgb,
    var(--accent-live-on-hero-strong) 22%,
    transparent
  );
  --btn-primary-glass-glow: color-mix(in srgb, var(--logo) 12%, transparent);
  --btn-primary-glass-specular: 16%;
  --btn-primary-glass-saturate: 1.22;
  --btn-primary-glass-brightness: 1.01;
  /** Depth tint at bottom of glass stack (hero overrides lower for more frost). */
  --btn-primary-glass-deep: 14%;
  --btn-primary-text: var(--brand-white);
  /** Legacy solid active (cx-btn); primary glass uses --btn-primary-glass-active. */
  --btn-primary-active-bg: var(--brand-navy);
  --btn-primary-active-text: var(--brand-white);
  --btn-secondary-bg: var(--brand-indigo);
  --btn-secondary-text: var(--brand-white);
  --btn-secondary-active-bg: var(--brand-white);
  --btn-secondary-active-text: var(--brand-indigo);
  --btn-tertiary-bg: var(--brand-gray);
  --btn-tertiary-text: var(--brand-navy);
  --btn-tertiary-active-bg: var(--brand-navy);
  --btn-tertiary-active-text: var(--brand-white);

  /* —— UI chrome —— */
  --toggle-icon: var(--brand-navy);
  --toggle-icon-opacity: 0.6;
  --media-ring: var(--line);
  --timeline-tick: var(--line-strong);
  --timeline-line: var(--line-strong);
  --hero-timeline: var(--timeline-tick);

  /* —— Syntax (Shiki), light —— */
  --shiki-text: var(--brand-navy);
  --shiki-constant: #c43737;
  --shiki-string: #8a6b00;
  --shiki-tag: var(--brand-blue-deep);
  --shiki-comment: rgba(0, 2, 26, 0.45);
  --shiki-keyword: var(--brand-blue);
  --shiki-parameter: #b4536a;
  --shiki-function: var(--brand-indigo);
  --shiki-punctuation: rgba(0, 2, 26, 0.7);
}

/* Night uptake is snappier; dawn keeps the longer crossfade. */
html[data-cx-theme-fade='night'] {
  --cx-theme-fade: 0.7s;
}

html[data-cx-theme-fade='day'] {
  --cx-theme-fade: 1.1s;
}

/* Must out-priority :root — :where() is zero specificity, so :root wins and dark overrides never apply. */
@media (prefers-reduced-motion: reduce) {
  :root {
    transition: none;
  }
}

.dark,
html[data-cx-theme="dark"] {
  --key: var(--brand-green);
  --key-strong: var(--brand-green-deep);

  /* Under the splash ocean — faint void, darker than --brand-void-floor. */
  --page-surface: var(--brand-void);
  --page-surface-elevated: var(--brand-void-raised);
  --page-surface-inset: var(--brand-void-inset);
  --page-fill: var(--brand-navy-raised);
  --page-overlay: rgba(0, 0, 0, 0.5);
  --panel-recessed: var(--brand-navy-raised);
  --ink: var(--brand-white);
  --link-hover: var(--brand-white);
  --icon: var(--brand-blue-bright);
  --footer-bg: var(--brand-black);
  --footer-ink: var(--brand-white);
  --footer-muted: rgba(255, 255, 255, 0.62);
  --footer-border: var(--line);
  --timeline-line: var(--line);

  --line-subtle: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --hover-wash: rgba(255, 255, 255, 0.05);

  --prose-body: rgba(255, 255, 255, 0.78);
  --prose-heading: var(--brand-white);
  --prose-muted: rgba(255, 255, 255, 0.58);
  --prose-subtle: rgba(255, 255, 255, 0.4);
  --prose-link: var(--brand-blue-bright);
  --prose-link-hover: var(--brand-white);
  --prose-link-underline: rgba(61, 70, 236, 0.45);
  --prose-link-hover-underline: rgba(168, 174, 255, 0.55);
  --prose-bold: var(--brand-white);
  --prose-code: var(--brand-white);
  --prose-kbd: var(--brand-white);
  --prose-pre-surface: #000010;
  --prose-pre-text: rgba(255, 255, 255, 0.65);
  --prose-pre-shadow: none;

  --accent-text: var(--accent-live-muted);
  --accent-wash: color-mix(in srgb, var(--accent-live) 12%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent-live) 35%, transparent);
  --accent-live-emphasis: var(--brand-green-deep);
  --hero-link: rgba(255, 255, 255, 0.45);
  --hero-link-hover: var(--accent-live-muted);
  --hero-link-bg-hover: rgba(255, 255, 255, 0.08);
  --page-link: var(--prose-muted);
  --page-link-hover: var(--ink);
  --page-link-bg-hover: var(--hover-wash);
  --page-link-bg-current: var(--accent-wash);
  /* Dark crest — quieter / inkier than daylight. */
  --hero-glow-a: rgba(61, 70, 236, 0.18);
  --hero-glow-b: rgba(90, 108, 230, 0.09);
  --hero-glow-c: rgba(118, 138, 255, 0.045);
  --hero-glow-d: rgba(150, 168, 255, 0.02);
  /* Night moon crest — same family as solar SVG stops (biolum `::before`). */
  --hero-moon-highlight: rgba(118, 138, 255, 0.12);
  --hero-moon-wash: rgba(90, 108, 230, 0.05);
  --biolum-field-strength: 1.18;
  /* Night wash — still blue/green, deeper; mark/button stay logo blue. */
  --ocean-purple: #2a35b8;
  --ocean-magenta: #0c4852;
  --ocean-teal: #0c5a38;
  --ocean-mint: #0c6870;
  --ocean-blue: #1e28a0;
  --ocean-floor: var(--brand-void-floor);
  /* Night primary glass — denser fill + harder glow bloom. */
  --btn-primary-bg: var(--logo);
  --btn-primary-glass: color-mix(in srgb, var(--logo) 62%, transparent);
  --btn-primary-glass-hover: color-mix(in srgb, var(--logo) 68%, transparent);
  --btn-primary-glass-active: color-mix(in srgb, var(--logo) 72%, transparent);
  --btn-primary-glass-blur: 18px;
  --btn-primary-glass-bloom: 18px;
  --btn-primary-glass-edge: color-mix(
    in srgb,
    var(--accent-live-muted) 42%,
    transparent
  );
  --btn-primary-glass-sheen: color-mix(
    in srgb,
    var(--accent-live-muted) 34%,
    transparent
  );
  --btn-primary-glass-glow: color-mix(in srgb, var(--logo) 22%, transparent);
  --btn-primary-glass-specular: 28%;
  --btn-primary-glass-saturate: 1.45;
  --btn-primary-glass-brightness: 1.04;
  --btn-primary-text: var(--brand-white);
  --label: var(--brand-blue-bright);
  --info: var(--brand-blue-bright);
  --info-wash: rgba(61, 70, 236, 0.14);
  --info-ring: rgba(61, 70, 236, 0.35);
  --warning: var(--brand-yellow);
  --warning-wash: rgba(224, 228, 58, 0.08);
  --warning-ring: rgba(224, 228, 58, 0.3);
  --danger: var(--brand-coral);
  --danger-wash: rgba(255, 98, 98, 0.08);
  --danger-ring: rgba(255, 98, 98, 0.3);

  --code-chrome: var(--brand-navy-inset);
  --code-muted: rgba(255, 255, 255, 0.5);
  --code-line: rgba(255, 255, 255, 0.08);
  --shiki-text: var(--brand-white);
  --shiki-constant: var(--brand-coral);
  --shiki-string: var(--brand-yellow);
  --shiki-tag: var(--brand-blue-bright);
  --shiki-comment: rgba(255, 255, 255, 0.4);
  --shiki-keyword: #c4b6ff;
  --shiki-parameter: #ff9a9a;
  --shiki-function: var(--brand-blue-bright);
  --shiki-punctuation: rgba(255, 255, 255, 0.75);
  --btn-hover-glass: rgba(255, 255, 255, 0.08);
  --btn-ghost-hover-glass: var(--hero-link-bg-hover);
  /** Footer join — logo-tinted frost on black band. */
  --btn-footer-cta-glass: color-mix(
    in srgb,
    var(--logo) 46%,
    rgba(255, 255, 255, 0.08)
  );
  --btn-footer-cta-glass-hover: color-mix(
    in srgb,
    var(--logo) 52%,
    rgba(255, 255, 255, 0.1)
  );
  --btn-footer-cta-glass-active: color-mix(
    in srgb,
    var(--logo) 56%,
    rgba(255, 255, 255, 0.12)
  );
  --btn-footer-cta-glass-blur: 18px;
  --btn-footer-cta-glass-glow: color-mix(in srgb, var(--logo) 22%, transparent);
  --btn-footer-cta-edge: color-mix(in srgb, var(--brand-white) 24%, transparent);
  --btn-footer-cta-text: var(--brand-white);
  --btn-primary-active-bg: var(--brand-slate);
  --btn-tertiary-active-bg: var(--brand-slate);
  --btn-tertiary-active-text: var(--brand-gray);

  --toggle-icon: var(--brand-white);
  --toggle-icon-opacity: 0.5;
}

/*
 * Biolum hero pages (lantern, accord intro, …) — one night floor for page + crest.
 */
html.dark:has([data-biolum-shell]),
html[data-cx-theme='dark']:has([data-biolum-shell]) {
  --page-surface: var(--hero-surface);
  --page-fill: var(--brand-navy-raised);
}

/*
 * Shiki writes `var(--shiki-token-*)` onto each token.
 * JSON keys use keyword, JSON strings use string-expression.
 * These aliases sit on html so scheme and .dark overrides of `--shiki-*` repaint the block.
 */
html {
  --shiki-color-text: var(--shiki-text);
  --shiki-color-background: var(--prose-pre-surface);
  --shiki-token-constant: var(--shiki-constant);
  --shiki-token-string: var(--shiki-string);
  --shiki-token-comment: var(--shiki-comment);
  --shiki-token-keyword: var(--shiki-keyword);
  --shiki-token-parameter: var(--shiki-parameter);
  --shiki-token-function: var(--shiki-function);
  --shiki-token-string-expression: var(--shiki-string);
  --shiki-token-punctuation: var(--shiki-punctuation);
  --shiki-token-link: var(--shiki-keyword);
  --shiki-token-tag: var(--shiki-tag);
}

