/**
 * Sonde Design Tokens — Layer 1 (the semantic contract)
 *
 * Every --sonde-* custom property is defined here. This file is the
 * SINGLE SOURCE OF TRUTH for every color, font, spacing, radius,
 * motion, and shadow value used anywhere in Sonde output.
 *
 * Token Naming Rules:
 *   - Prefix: --sonde-* (namespace, prevents collisions)
 *   - Semantic: named by role, never by hue (--sonde-color-primary, not --sonde-color-blue)
 *   - Categories: color, font, spacing, layout, radius, motion, shadow
 *
 * NO FALLBACKS. EVER.
 *   Consumers MUST write `var(--sonde-color-text)` — never `var(--sonde-color-text, #1c1917)`.
 *   Fallback literals drift from this file and produced the .score-badge
 *   dark-mode contrast regression. If a token is missing the page MUST
 *   break loudly so the gap gets fixed at the source.
 *   The theme/var-with-fallback validator rule enforces this.
 *
 * NO LITERALS IN TYPESCRIPT.
 *   No `.ts` or `.tsx` file under packages/ may contain a hex/rgb/hsl
 *   color literal or a font-family string literal. Every color and font
 *   reference comes from this token file via a `.css` consumer.
 *   The `pnpm theme:audit` script grep-fails on any violation.
 *
 * Locale-Aware Tokens:
 *   Some tokens vary per locale. CJK scripts need narrower line lengths
 *   (~40ch vs 72ch for Latin). Override via [lang^="ja"], [lang^="zh"],
 *   [lang^="ko"] selectors in theme files.
 */

:root {
  --sonde-rail-width-collapsed: 56px;
  --sonde-rail-width-expanded: 240px;
  --sonde-nav-rail-entry-delay: 300ms;
  --sonde-nav-rail-exit-delay: 350ms;
  --sonde-nav-rail-transition-duration: 0ms;
  /* ─── Color Scheme ──────────────────────────────────────────── */
  /* Default = ultraviolet-dark (Sonde cockpit's product default theme).
   * Every surface (audit, report, dashboard, presentation, daylight,
   * high-contrast, infrared, ultraviolet) redefines these core tokens
   * in its own :root block, so changing these defaults only affects
   * pages that load tokens.css WITHOUT a theme file. The ecru/navy/teal
   * daylight-brand values these used to hold now live in daylight.css
   * where they correctly belong. See docs/plans/theming-brand-architecture.md. */
  color-scheme: dark;

  /* ─── Color — Semantic (ultraviolet-dark defaults) ──────────── */
  --sonde-color-primary: #b185ff;        /* Electric violet — UV-dark primary */
  --sonde-color-on-primary: var(--sonde-color-bg); /* Contrasting text follows the active theme ground */
  --sonde-color-secondary: #7dd3fc;      /* Ionized cyan — UV-C shimmer */
  --sonde-color-bg: #0a0618;             /* Deep indigo ground */
  --sonde-color-surface: #15102a;        /* Raised surface */
  --sonde-color-text: #e8e0ff;           /* Near-white with violet tint */
  --sonde-color-text-muted: #a8a1c8;     /* Lavender-gray — AAA at 8.2:1 on ultraviolet-dark bg */
  --sonde-color-text-heading: #e8e0ff;   /* Heading text matches body */
  --sonde-color-sidebar: #0a0618;        /* Sidebar matches ground */
  --sonde-color-border: #2a2050;         /* Deep violet border */
  --sonde-color-border-subtle: #1f1840;  /* Subtle violet divider */
  --sonde-color-accent: #b185ff;         /* Accent matches primary */
  --sonde-color-accent-dim: rgba(177, 133, 255, 0.10);

  /* ─── Color — Status (tuned for ultraviolet-dark bg) ────────── */
  --sonde-color-pass: #5eead4;           /* Mint — readable on deep indigo */
  --sonde-color-fail: #ff5a8a;           /* Hot rose */
  --sonde-color-partial: #d4a85a;        /* Dying-star gold */
  --sonde-color-na: #5a4d88;             /* Violet-gray muted */
  --sonde-color-info: #7dd3fc;           /* Cyan info */
  --sonde-color-warning: #d4a85a;        /* Matches partial */
  --sonde-color-error: #ff5a8a;          /* Matches fail */
  --sonde-color-critical: #f472b6;       /* Hot pink critical */

  /* ─── Color — Table ─────────────────────────────────────────── */
  --sonde-color-table-header-bg: #15102a;
  --sonde-color-table-header-text: #e8e0ff;

  /* ─── Color — Slide role palette ────────────────────────────── */
  /* Used by HTML slide presentations (renderPresentation.ts).
   * Each role maps to a CSS var that the inline-styled span/div
   * elements reference. Default values target dark presentation
   * surfaces; light-mode overrides flip the palette. */
  --sonde-slide-role-primary: #ffffff;
  --sonde-slide-role-accent: #38bdf8;
  --sonde-slide-role-gold: #c8b878;
  --sonde-slide-role-glow: #ffaa44;
  --sonde-slide-role-glow-deep: #ff4400;
  --sonde-slide-role-cta: #ffaa44;
  --sonde-slide-role-muted: #8888a8;
  --sonde-slide-role-secondary: #e4e4ed;
  --sonde-slide-role-strut: #556677;
  --sonde-slide-role-strut-light: #778899;

  /* Slide presentation surface — PPTX deck background. */
  --sonde-slide-bg: #0d1117;

  /* Slide typography — font families used by the PPTX runtime.
   * First family wins; fallbacks are for HTML preview only. */
  --sonde-slide-font-title: 'Archivo Black', sans-serif;
  --sonde-slide-font-body: 'Trebuchet MS', sans-serif;
  --sonde-slide-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Slide syntax-highlight colors (slides-tokens / renderPresentation) */
  --sonde-slide-syntax-string: #98c379;

  /* Slide structural surfaces (renderPresentation embedded CSS) */
  --sonde-slide-code-bg: #141922;
  --sonde-slide-code-text: #e4e4ed;
  --sonde-slide-code-line-num: #556677;
  --sonde-slide-code-highlight-bg: #1e2a3a;
  --sonde-slide-pipeline-bg: #1a1f2b;
  --sonde-slide-pipeline-active-bg: #1a2744;
  --sonde-slide-detail-text: #8888a8;
  --sonde-slide-bar-label: #e4e4ed;
  --sonde-slide-bar-track: #1a1f2b;
  --sonde-slide-bar-truncated-stripe: rgba(13, 17, 23, 0.4);
  --sonde-slide-image-placeholder-bg: #1a1f2b;
  --sonde-slide-quote-border: #556677;
  --sonde-slide-hub-spoke-node-fill: #1a2744;
  --sonde-slide-hub-spoke-hub-text: #0d1117;

  /* ─── Color — Sonde Daylight brand mark ─────────────────────── */
  /* The daylight mark is a probe silhouette against a sun disc. Three
   * gradient stops drive the sun, one solid color is the probe. */
  --sonde-daylight-mark-sun-stop-0: #ffe082;
  --sonde-daylight-mark-sun-stop-1: #ffb300;
  --sonde-daylight-mark-sun-stop-2: #e65100;
  --sonde-daylight-mark-crater: transparent;
  --sonde-daylight-mark-probe: #1a1a2e;
  --sonde-daylight-mark-solid-display: block;
  --sonde-daylight-mark-line-display: none;

  /* Theme-preview mark palettes freeze each swatch's target appearance so
   * the selector menu does not inherit the active page mode. Component CSS
   * references these tokens; it must not mirror the literal color values. */
  --sonde-daylight-mark-preview-light-sun-stop-0: #ffe082;
  --sonde-daylight-mark-preview-light-sun-stop-1: #ffb300;
  --sonde-daylight-mark-preview-light-sun-stop-2: #e65100;
  --sonde-daylight-mark-preview-light-crater: transparent;
  --sonde-daylight-mark-preview-light-probe: #1a1a2e;
  --sonde-daylight-mark-preview-light-solid-display: block;
  --sonde-daylight-mark-preview-light-line-display: none;

  --sonde-daylight-mark-preview-dark-sun-stop-0: #e0e8f0;
  --sonde-daylight-mark-preview-dark-sun-stop-1: #a8b4c0;
  --sonde-daylight-mark-preview-dark-sun-stop-2: #505860;
  --sonde-daylight-mark-preview-dark-crater: transparent;
  --sonde-daylight-mark-preview-dark-probe: #0a1120;
  --sonde-daylight-mark-preview-dark-solid-display: block;
  --sonde-daylight-mark-preview-dark-line-display: none;

  --sonde-daylight-mark-preview-high-contrast-sun-stop-0: #000000;
  --sonde-daylight-mark-preview-high-contrast-sun-stop-1: #000000;
  --sonde-daylight-mark-preview-high-contrast-sun-stop-2: #000000;
  --sonde-daylight-mark-preview-high-contrast-crater: transparent;
  --sonde-daylight-mark-preview-high-contrast-probe: #ffffff;
  --sonde-daylight-mark-preview-high-contrast-solid-display: none;
  --sonde-daylight-mark-preview-high-contrast-line-display: block;

  /* ─── Color — Sonde daylight mock palette (build-time SVG mockups) ── */
  /* Consumed by build-time generators that bake daylight-themed UI into
   * fixture/preview PNGs (e.g. cockpit-mobile/scripts/generateMobileSeedScreenshots.ts).
   * Not used by any runtime component — keeping these in tokens.css is the
   * single-source-of-truth rule that bans hex literals in `.ts` under packages/. */
  --sonde-daylight-mock-bg: #f4ecd8;
  --sonde-daylight-mock-surface: #fffaf0;
  --sonde-daylight-mock-surface-muted: #ece2c8;
  --sonde-daylight-mock-border: #c9bda0;
  --sonde-daylight-mock-primary: #142a4b;
  --sonde-daylight-mock-accent: #1d3a6b;
  --sonde-daylight-mock-text: #1a1a2e;
  --sonde-daylight-mock-text-muted: #6b6552;
  --sonde-daylight-mock-pass: #1f7a5a;
  --sonde-daylight-mock-warn: #c9621a;
  --sonde-daylight-mock-alert: #b3331e;
  --sonde-daylight-mock-inverse-accent: #a8b8d4;
  --sonde-daylight-mock-crater: #cf8a20;

  --sonde-daylight-hc-mark-earth-blue: #0b3d91;
  --sonde-daylight-hc-mark-bus-gold: #6b5a00;
  --sonde-daylight-hc-mark-rtg-brown: #4a3825;
  --sonde-daylight-hc-mark-metal: #111111;
  --sonde-daylight-hc-mark-flame-deep: #8a1c00;
  --sonde-daylight-hc-mark-flame-mid: #b32400;
  --sonde-daylight-hc-mark-flame-hot: #cc5500;

  /* ─── Color — Sonde Probe brand mark (light variant) ────────── */
  /* Used against dark backgrounds — reflective metallic colors. */
  --sonde-probe-light-dish-1: #f8faff;
  --sonde-probe-light-dish-2: #e8eef8;
  --sonde-probe-light-dish-3: #b8c4d8;
  --sonde-probe-light-bus-1: #d8c888;
  --sonde-probe-light-bus-2: #c8b878;
  --sonde-probe-light-bus-3: #a89848;
  --sonde-probe-light-rtg-1: #9a8a7a;
  --sonde-probe-light-rtg-2: #7a6a5a;
  --sonde-probe-light-boom: #99a4b0;
  --sonde-probe-light-boom-dot: #889098;
  --sonde-probe-light-boom-dot-stroke: #778088;
  --sonde-probe-light-strut-stroke: #778088;
  --sonde-probe-light-dish-stroke: #556677;
  --sonde-probe-light-dish-ring: #c8d0e0;
  --sonde-probe-light-strut: #778899;
  --sonde-probe-light-feed-fill: #f0f4fc;
  --sonde-probe-light-feed-inner: #e4e8f4;
  --sonde-probe-light-feed-stroke: #667788;
  --sonde-probe-light-feed-inner-stroke: #889999;
  --sonde-probe-light-bus-stroke: #556677;
  --sonde-probe-light-bus-line: #a89848;
  --sonde-probe-light-panel: #b8a868;
  --sonde-probe-light-panel-stroke: #8a7a5a;
  --sonde-probe-light-thruster: #778088;
  --sonde-probe-light-antenna: #99a4b0;
  --sonde-probe-light-antenna-dot: #aab4bc;
  --sonde-probe-light-antenna-dot-stroke: #889098;
  --sonde-probe-light-sci-platform: #99a4b0;
  --sonde-probe-light-sci-lens-1: #334455;
  --sonde-probe-light-sci-lens-1-stroke: #556677;
  --sonde-probe-light-sci-lens-1-inner: #223344;
  --sonde-probe-light-sci-lens-1-inner-stroke: #445566;
  --sonde-probe-light-sci-lens-2: #334455;
  --sonde-probe-light-rtg-line: #6a5a4a;
  --sonde-probe-light-rtg-cap: #7a6a5a;

  /* Engine glow ellipses — animated thruster flare */
  --sonde-probe-glow-core: #ffcc66;
  --sonde-probe-glow-mid: #ffaa44;
  --sonde-probe-glow-outer: #ff7722;
  --sonde-probe-glow-far: #ff4400;

  /* ─── Color — Annotation labels ─────────────────────────────── */
  /* Text colors paired with the colored annotation label backgrounds.
   * Most severities use white text; warning uses near-black for legibility
   * against the gold background. */
  --sonde-color-annotation-label-on-dark: #ffffff;
  --sonde-color-annotation-label-on-light: #1a1a1a;

  /* ─── Color — VPAT compliance categories ───────────────────── */
  /* The VPAT report uses four conformance buckets distinct from the
   * generic pass/fail/partial/info palette so reviewers can scan a
   * 50-row WCAG table at a glance. Greens/reds are intentional here —
   * VPAT is a regulatory artifact, not a Sonde-branded report. */
  --sonde-color-vpat-supports-fg: #2e7d32;
  --sonde-color-vpat-supports-bg: #e8f5e9;
  --sonde-color-vpat-partial-fg: #c56000;
  --sonde-color-vpat-partial-border: #e67e22;
  --sonde-color-vpat-partial-bg: #fff3e0;
  --sonde-color-vpat-doesnot-fg: #c0392b;
  --sonde-color-vpat-doesnot-bg: #ffebee;
  --sonde-color-vpat-noteval-fg: #546e7a;
  --sonde-color-vpat-noteval-border: #7f8c8d;
  --sonde-color-vpat-noteval-bg: #eceff1;

  /* ─── Color — Megaphone feedback (audit report) ─────────────── */
  /* Tinted backgrounds for the "send feedback" megaphone callout. */
  --sonde-color-megaphone-bg-strong: rgba(212, 160, 23, 0.12);
  --sonde-color-megaphone-bg-medium: rgba(212, 160, 23, 0.10);
  --sonde-color-megaphone-bg-light: rgba(212, 160, 23, 0.06);
  --sonde-color-megaphone-gradient-end: rgba(10, 138, 126, 0.06);

  /* ─── Color — Feedback section dark mode ───────────────────── */
  --sonde-color-feedback-dark-from: #1a2636;
  --sonde-color-feedback-dark-to: #152028;

  /* ─── Color — Score Tiers ───────────────────────────────────── */
  /* Sonde Score (0-1000) → tier color. Used by .score-badge and .scale-badge.
   * All four tier values are paired with --sonde-color-score-text-on-badge
   * (white) and validated to ≥ 4.5:1 contrast in every theme context.
   * Tiers are NOT overridden in dark mode — the badge colors stay constant,
   * and the white text contrasts equally well in light or dark page background.
   */
  --sonde-color-score-tier-0: #b36205;   /* 0–349 — Getting Started (amber) */
  --sonde-color-score-tier-1: #9f6d03;   /* 350–549 — Needs Attention (gold) */
  --sonde-color-score-tier-2: #0c857b;   /* 550–749 — Progressing (teal) */
  --sonde-color-score-tier-3: #1d4ed8;   /* 750–1000 — Strong / Excellent (blue) */
  --sonde-color-score-text-on-badge: #ffffff;  /* Text color paired with every score tier */

  /* Score tier colors for dark page surfaces — used by the gauge SVG in
   * renderAuditHtml when rendered against a dark background. These are
   * pre-validated to ≥ 4.5:1 against #0d1117. The badge tier tokens above
   * are deliberately separate so badges stay visually consistent. */
  --sonde-color-score-tier-0-on-dark: #f97316;
  --sonde-color-score-tier-1-on-dark: #fbbf24;
  --sonde-color-score-tier-2-on-dark: #2dd4bf;
  --sonde-color-score-tier-3-on-dark: #60a5fa;

  /* ─── Color — Badges ────────────────────────────────────────── */
  --sonde-color-badge-pass-bg: #dcfce7;
  --sonde-color-badge-fail-bg: #fef2f2;
  --sonde-color-badge-partial-bg: #fef3c7;
  --sonde-color-badge-na-bg: #f5f5f4;
  --sonde-color-badge-info-bg: #e0f2fe;
  --sonde-color-badge-warning-bg: #fef3c7;
  --sonde-color-badge-error-bg: #fef2f2;
  --sonde-color-badge-critical-bg: #fff1f2;

  /* ─── Code block surfaces ──────────────────────────────────── */
  /* Renamed from --sonde-color-code-* to match the --sonde-{surface}-*
   * naming convention used by other surfaces. Theme files override
   * these with theme-appropriate values. */
  --sonde-code-bg: #292524;
  --sonde-code-text: #e7e5e4;
  --sonde-code-line-num: #78716c;
  --sonde-code-gutter-bg: #1c1917;
  --sonde-code-highlight-bg: rgba(255, 255, 255, 0.06);

  /* ─── Syntax highlighting ──────────────────────────────────── */
  /* 12 role tokens used by every surface that renders source code
   * (cockpit, audit reports, exhibits, patent claims, slides).
   * Theme files override these with palettes tuned to the theme's
   * code background. Renamed from --sonde-color-syntax-* to match
   * the --sonde-{surface}-* naming convention. */
  --sonde-syntax-keyword: #c792ea;
  --sonde-syntax-type: #ffcb6b;
  --sonde-syntax-string: #c3e88d;
  --sonde-syntax-number: #f78c6c;
  --sonde-syntax-comment: #94a3b8;
  --sonde-syntax-function: #82aaff;
  --sonde-syntax-variable: #d6deeb;
  --sonde-syntax-constant: #f78c6c;
  --sonde-syntax-property: #82aaff;
  --sonde-syntax-punctuation: #89ddff;
  --sonde-syntax-tag: #ff5370;
  --sonde-syntax-default: #d6deeb;

  /* ─── Color ��� Diff ─────────────────────────────────────────── */
  --sonde-color-diff-bg: #0a0e14;
  --sonde-color-diff-add-bg: #0d2818;
  --sonde-color-diff-add-text: #7ce08a;
  --sonde-color-diff-add-gutter: #1a3a2a;
  --sonde-color-diff-remove-bg: #2d0f0f;
  --sonde-color-diff-remove-text: #e07c7c;
  --sonde-color-diff-remove-gutter: #3a1a1a;
  --sonde-color-diff-unchanged-gutter: #0d1117;
  --sonde-color-diff-unchanged-text: var(--sonde-syntax-default);
  --sonde-color-diff-text: var(--sonde-color-text);
  --sonde-color-diff-muted: var(--sonde-color-text-muted);
  --sonde-color-diff-border: var(--sonde-color-border);
  --sonde-color-diff-border-subtle: var(--sonde-color-border-subtle);
  --sonde-color-diff-toolbar-bg: var(--sonde-color-surface);
  --sonde-color-diff-toolbar-text: var(--sonde-color-text);
  --sonde-color-diff-toolbar-label: var(--sonde-color-accent);
  --sonde-color-diff-empty-bg: var(--sonde-color-diff-unchanged-gutter);
  --sonde-color-diff-separator-bg: var(--sonde-color-diff-unchanged-gutter);
  --sonde-color-diff-separator-text: var(--sonde-color-text);
  --sonde-color-diff-divider-bg: var(--sonde-color-surface-elevated);
  --sonde-color-diff-divider-hover-bg: var(--sonde-color-accent);
  --sonde-color-diff-grip: var(--sonde-color-border);
  --sonde-color-diff-current-hunk-outline: var(--sonde-color-accent);
  --sonde-color-diff-prefix-unchanged: var(--sonde-color-text-muted);
  --sonde-color-diff-scrollbar-track: var(--sonde-color-diff-bg);
  --sonde-color-diff-scrollbar-thumb: var(--sonde-color-border);
  --sonde-color-diff-control-bg: var(--sonde-color-diff-bg);
  --sonde-color-diff-control-text: var(--sonde-color-text-muted);
  --sonde-color-diff-control-border: var(--sonde-color-border);
  --sonde-color-diff-control-hover-bg: var(--sonde-color-diff-bg);
  --sonde-color-diff-control-hover-text: var(--sonde-color-accent);
  --sonde-color-diff-control-hover-border: var(--sonde-color-accent);
  --sonde-color-diff-control-active-bg: var(--sonde-color-accent);
  --sonde-color-diff-control-active-text: var(--sonde-color-bg);
  --sonde-color-diff-control-active-border: var(--sonde-color-accent);
  --sonde-color-diff-control-disabled-bg: var(--sonde-color-diff-bg);
  --sonde-color-diff-control-disabled-text: var(--sonde-color-text-muted);
  --sonde-color-diff-control-disabled-border: var(--sonde-color-border-subtle);
  --sonde-diff-font-body: var(--sonde-font-body);
  --sonde-diff-font-mono: var(--sonde-font-mono);
  --sonde-diff-code-font-size: 0.875rem;
  --sonde-diff-toolbar-font-size: 0.875rem;
  --sonde-diff-gutter-font-size: 0.875rem;
  --sonde-diff-line-height: 1.5;
  --sonde-diff-code-line-height: 1.5;
  --sonde-diff-row-height: 1.5rem;
  --sonde-diff-toolbar-gap: var(--sonde-spacing-sm);
  --sonde-diff-toolbar-padding-block: 0.375rem;
  --sonde-diff-toolbar-padding-inline: var(--sonde-spacing-sm);
  --sonde-diff-control-padding-block: var(--sonde-spacing-xs);
  --sonde-diff-control-padding-inline: var(--sonde-spacing-sm);
  --sonde-diff-control-radius: var(--sonde-radius-sm);
  --sonde-diff-prefix-margin-inline-end: var(--sonde-spacing-xs);
  --sonde-diff-gutter-width: 3.25rem;
  --sonde-diff-gutter-padding-inline: 0.375rem;
  --sonde-diff-code-cell-min-width: 20rem;
  --sonde-diff-code-cell-padding-inline: var(--sonde-spacing-sm);
  --sonde-diff-separator-padding-block: var(--sonde-spacing-xs);
  --sonde-diff-separator-padding-inline: var(--sonde-spacing-sm);
  --sonde-diff-header-padding-block: var(--sonde-spacing-xs);
  --sonde-diff-header-padding-inline: var(--sonde-spacing-sm);
  --sonde-diff-divider-width: 0.375rem;
  --sonde-diff-grip-width: 0.125rem;
  --sonde-diff-grip-height: 1.5rem;
  --sonde-diff-scrollbar-size: 0.625rem;
  --sonde-diff-scrollbar-thumb-radius: var(--sonde-radius-sm);
  --sonde-diff-current-hunk-outline-width: 2px;
  --sonde-diff-gutter-border-width: 1px;

  /* ─── Color — Exhibit (presentation surfaces) ──────────────── */
  --sonde-exhibit-bg: #0d1117;
  --sonde-exhibit-surface: #1a2744;
  --sonde-exhibit-border: rgba(255, 255, 255, 0.12);
  --sonde-exhibit-border-subtle: rgba(255, 255, 255, 0.06);
  --sonde-exhibit-text-muted: #8888a8;
  --sonde-exhibit-overlay: rgba(0, 0, 0, 0.65);

  /* ─── Color — Elevated surface + stronger border tiers ──────── */
  /* Shared contrast-safe alternate surface and stronger border tiers for
   * panels, nested trees, diagrams, and zebra rows. "Elevated" names the
   * semantic role, not a fixed depth ordering relative to `surface`. */
  --sonde-color-surface-elevated: #1f1840;                /* Alternate elevated surface */
  --sonde-color-border-strong: #3a2d6b;                   /* Bolder border tier for nested structures */

  /* ─── Color — Visualization primitives ──────────────────────── */
  /* Surface-neutral viz tokens consumed by any component that renders
   * graphs, diagrams, or data overlays (cockpit, exhibit, dashboards).
   * Defaults = ultraviolet-dark (Sonde's product default theme).
   * Per-theme overrides live in ultraviolet.css / infrared.css /
   * high-contrast.css. */
  --sonde-viz-grid-overlay: rgba(177, 133, 255, 0.03);    /* Grid overlay wash */
  --sonde-viz-glow: rgba(177, 133, 255, 0.18);            /* Hover/pulse glow */
  --sonde-viz-label-bg: rgba(10, 6, 24, 0.88);            /* Label chip background */
  --sonde-viz-node-faded: rgba(144, 135, 184, 0.15);      /* Dimmed node in hover isolation */
  --sonde-viz-edge: rgba(144, 135, 184, 0.4);             /* Default graph edge */
  --sonde-viz-code-bg: rgba(177, 133, 255, 0.08);         /* Inline code tint on visualization surfaces */

  /* ─── Typography ────────────────────────────────────────────── */
  /* Defaults = ultraviolet (product default theme).
   * daylight.css overrides with Bricolage Grotesque + DM Sans. */
  --sonde-font-body: 'Outfit', 'IBM Plex Sans', 'Avenir Next', system-ui, sans-serif;
  --sonde-font-heading: 'Outfit', 'IBM Plex Sans', sans-serif;
  --sonde-font-mono: 'IBM Plex Mono', 'Fira Code', ui-monospace, monospace;
  --sonde-font-display: 'Outfit', 'IBM Plex Sans', sans-serif;
  --sonde-font-size-base: 16px;
  --sonde-font-size-body: 1rem;
  --sonde-font-size-body-small: 0.875rem;
  --sonde-font-size-caption: 0.875rem;
  --sonde-font-size-control: 0.875rem;
  --sonde-font-size-chip: 0.875rem;
  --sonde-font-size-overline: 0.75rem;
  --sonde-letter-spacing-overline: 0.04em;
  --sonde-line-height: 1.65;

  /* ─── Spacing Scale ─────────────────────────────────────────── */
  --sonde-spacing-2xs: 0.125rem; /* 2px */
  --sonde-spacing-xs: 0.25rem;   /* 4px */
  --sonde-spacing-sm: 0.5rem;    /* 8px */
  --sonde-spacing-xs-plus: 0.75rem; /* 12px */
  --sonde-spacing-md: 1rem;      /* 16px */
  --sonde-spacing-lg: 1.5rem;    /* 24px */
  --sonde-spacing-xl: 2rem;      /* 32px */
  --sonde-spacing-2xl: 3rem;     /* 48px */

  /* Semantic icon sizes shared by every adapter. These replace component-local
   * pixel overrides while retaining the established rendered dimensions. */
  --sonde-icon-size-caption: 0.875rem; /* 14px */
  --sonde-icon-size-compact: 1rem;     /* 16px */
  --sonde-icon-size-control: 1.125rem; /* 18px */
  --sonde-icon-size-display: 2rem;     /* 32px */
  --sonde-spacing-3xl: 4rem;     /* 64px */

  /* ─── Layout ────────────────────────────────────────────────── */
  --sonde-content-readable-max: 72ch;    /* Prose: optimal line length */
  --sonde-content-data-max: 95%;         /* Data tables: proportional rail */
  --sonde-content-min-width: 320px;      /* Mobile minimum */
  --sonde-content-padding: clamp(1rem, 3vw, 3rem);
  --sonde-form-factor-phone-max: 480px;       /* Phone contract upper bound */
  --sonde-form-factor-tablet-max: 1024px;     /* Tablet contract upper bound */
  --sonde-form-factor-large-min: 1920px;      /* Large-monitor contract lower bound */
  --sonde-layout-shell-max: 96%;                   /* Rich page shell */
  --sonde-layout-readable-max: var(--sonde-content-readable-max); /* Readable/prose rail */
  --sonde-layout-data-max: var(--sonde-content-data-max);          /* Tables and dense data */
  --sonde-layout-gutter-inline: var(--sonde-content-padding);
  --sonde-layout-gutter-block: var(--sonde-spacing-xl);
  --sonde-layout-panel-min: min(100%, 18rem);
  --sonde-layout-panel-max: 28rem;
  --sonde-layout-grid-min: 16rem;
  --sonde-layout-toolbar-gap: var(--sonde-spacing-sm);
  --sonde-target-size-min: 44px;      /* WCAG 2.5.8 minimum */
  --sonde-target-size-comfort: 48px;  /* Mobile/touch comfort target */
  --sonde-border-width-thin: 1px;     /* Hairline borders and dividers */
  --sonde-border-width-focus: 2px;    /* Focus outlines and their offset */
  --sonde-border-width-accent: 3px;   /* Accent bars on callouts */

  /* ─── Border Radius ─────────────────────────────────────────── */
  --sonde-radius-sm: 4px;
  --sonde-radius-md: 8px;
  --sonde-radius-lg: 14px;
  --sonde-radius-pill: 999px;

  /* ─── Motion ────────────────────────────────────────────────── */
  --sonde-motion-duration-fast: 150ms;
  --sonde-motion-duration-slow: 300ms;
  --sonde-motion-duration-spinner: 1600ms;     /* Full orbit for the Sonde spinner */
  --sonde-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --sonde-motion-reduce: 0;             /* Set to 1 in prefers-reduced-motion */

  /* ─── Spinner / Loading Overlay ─────────────────────────────────
   * Used by the shared `.sonde-spinner` / `.sonde-spinner-overlay`
   * component. Themes override these to recolor the loading state
   * without touching the structural CSS. */
  --sonde-spinner-size: 96px;
  --sonde-spinner-orbit-radius: 28;            /* unitless — paired with viewBox 64 */
  --sonde-spinner-overlay-bg: rgba(255, 255, 255, 0.94);
  --sonde-spinner-glow: 0 0 12px rgba(64, 108, 242, 0.35);

  /* ─── Elevation / Shadows ───────────────────────────────────── */
  --sonde-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --sonde-shadow-md: 0 4px 18px rgba(26, 53, 84, 0.10);
  --sonde-shadow-lg: 0 8px 28px rgba(26, 53, 84, 0.14);
  --sonde-shadow-swatch: 0 2px 5px rgba(0, 0, 0, 0.17);   /* contrast swatch chip */
  --sonde-shadow-glow-pulse: 0 0 12px 4px rgba(30, 58, 95, 0.25); /* live-indicator pulse */
  --sonde-shadow-annotation-detail: 0 4px 12px rgba(0, 0, 0, 0.15); /* annotation detail panel */
  /* Daylight theme card / gallery elevations — used by daylightThemesPage,
   * daylightThemeGallery. Soft cool-gray shadows tuned for the daylight bg. */
  --sonde-shadow-daylight-card: 0 4px 14px -10px rgba(8, 12, 30, 0.25);
  --sonde-shadow-daylight-gallery-rest: 0 12px 32px -24px rgba(8, 12, 30, 0.25);
  --sonde-shadow-daylight-gallery-hover: 0 18px 36px -20px rgba(8, 12, 30, 0.30);
  --sonde-shadow-daylight-cta-rest: 0 8px 20px -12px rgba(8, 12, 30, 0.35);
  --sonde-shadow-daylight-cta-hover: 0 12px 26px -12px rgba(8, 12, 30, 0.45);

  /* ─── Contrast-safe button pair ──────────────────────────────
   * Fixed-contrast button colors used where a button must
   * guarantee AAA contrast regardless of which theme is active —
   * e.g., daylight homepage search submit button, where axe-core
   * was reading a cascaded light color onto a light sky background
   * and failing at 1.81:1. These tokens are intentionally NOT
   * overridden per-theme: any theme that changed them would break
   * the contrast promise.
   *   #ffffff on #134e8e = 9.4:1 (WCAG AAA large + small text)
   *   #ffffff on #0f3e70 = 11.4:1 (hover state) */
  --sonde-color-contrast-safe-button-text: #ffffff;
  --sonde-color-contrast-safe-button-bg: #134e8e;
  --sonde-color-contrast-safe-button-hover: #0f3e70;
}

/* ─── Dark Mode — OS preference ─────────────────────────────────── */
/* Shared dark-mode background/surface defaults for the daylight brand
 * surface and partner consumers that load tokens.css without their own
 * theme file. Cockpit themes (ultraviolet, infrared, high-contrast) ARE
 * excluded — they own every token in their :root block and must not be
 * cross-contaminated with generic dark values, which is exactly the bug
 * that produced "every theme looks the same in dark mode" reports.
 *
 * The :not([data-theme="light"]):not([data-mode="light"]):not([data-theme="high-contrast"])
 * guard means an explicit user toggle to a light theme or mode wins over
 * OS-level dark: otherwise the @media block would flip badge backgrounds
 * to dark pastels while the theme's :root kept light-mode foregrounds,
 * producing a catastrophic dark-on-dark contrast pair (1.6:1 on HIGH/
 * partial pills, 1.2:1 on CRITICAL). The :not([data-theme="ultraviolet"])
 * and :not([data-theme="infrared"]) guards keep cockpit theme palettes
 * intact in dark mode. Mirror the same guard on the probe-mark block below.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-mode="light"]):not([data-theme="high-contrast"]):not([data-theme="ultraviolet"]):not([data-theme="infrared"]) {
    --sonde-color-sidebar: #0d1117;
    --sonde-color-table-header-bg: #0a0a14;
    --sonde-color-table-header-text: #e8e0ff;

    --sonde-color-badge-pass-bg: #06342a;
    --sonde-color-badge-fail-bg: #3a0612;
    --sonde-color-badge-partial-bg: #3a2505;
    --sonde-color-badge-na-bg: #171421;
    --sonde-color-badge-info-bg: #082f49;
    --sonde-color-badge-warning-bg: #3a2505;
    --sonde-color-badge-error-bg: #3a0612;
    --sonde-color-badge-critical-bg: #3b071a;

    --sonde-code-bg: #0f0f0f;
    --sonde-code-text: #e7e5e4;
  }
}

/* Sonde Probe brand mark — dark variant overrides.
 *
 * The probe mark uses ~30 token references in its hand-coded SVG. The
 * default values above (light variant) are designed for dark page
 * surfaces. When the host page goes dark mode, every brand-mark token
 * flips to its dark equivalent so the same SVG markup automatically
 * reads correctly against light page surfaces.
 *
 * Both the @media (prefers-color-scheme: dark) block and the explicit
 * [data-theme="dark"] / [data-mode="dark"] block apply these overrides.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-mode="light"]):not([data-theme="high-contrast"]):not([data-theme="ultraviolet"]):not([data-theme="infrared"]) {
    --sonde-probe-light-dish-1: #3a4a60;
    --sonde-probe-light-dish-2: #2a3a50;
    --sonde-probe-light-dish-3: #1a2a3a;
    --sonde-probe-light-bus-1: #8a7a3a;
    --sonde-probe-light-bus-2: #7a6a2a;
    --sonde-probe-light-bus-3: #5a4a1a;
    --sonde-probe-light-rtg-1: #4a3a2a;
    --sonde-probe-light-rtg-2: #3a2a1a;
    --sonde-probe-light-boom: #4a5a6a;
    --sonde-probe-light-boom-dot: #3a4a5a;
    --sonde-probe-light-boom-dot-stroke: #2a3a4a;
    --sonde-probe-light-strut-stroke: #2a3a4a;
    --sonde-probe-light-dish-stroke: #2a3a4a;
    --sonde-probe-light-dish-ring: #3a4a5a;
    --sonde-probe-light-strut: #3a4a5a;
    --sonde-probe-light-feed-fill: #c8d0e0;
    --sonde-probe-light-feed-inner: #b0b8c8;
    --sonde-probe-light-feed-stroke: #3a4a5a;
    --sonde-probe-light-feed-inner-stroke: #2a3a4a;
    --sonde-probe-light-bus-stroke: #2a2a2a;
    --sonde-probe-light-bus-line: #5a4a1a;
    --sonde-probe-light-panel: #6a5a2a;
    --sonde-probe-light-panel-stroke: #4a3a1a;
    --sonde-probe-light-thruster: #3a4a5a;
    --sonde-probe-light-antenna: #4a5a6a;
    --sonde-probe-light-antenna-dot: #5a6a7a;
    --sonde-probe-light-antenna-dot-stroke: #3a4a5a;
    --sonde-probe-light-sci-platform: #4a5a6a;
    --sonde-probe-light-sci-lens-1: #1a2a3a;
    --sonde-probe-light-sci-lens-1-stroke: #2a3a4a;
    --sonde-probe-light-sci-lens-1-inner: #0a1a2a;
    --sonde-probe-light-sci-lens-1-inner-stroke: #1a2a3a;
    --sonde-probe-light-sci-lens-2: #1a2a3a;
    --sonde-probe-light-rtg-line: #3a2a1a;
    --sonde-probe-light-rtg-cap: #4a3a2a;

    /* Sonde Daylight mark — dark-mode overrides. The light defaults above
     * render a warm sun disc with a navy probe silhouette. In dark mode
     * the disc flips to a pale silver-moon sphere (cool-silver highlight
     * → mid silver → shadow-silver) with a near-black probe silhouette
     * on top, matching the probe-with-moon brand direction (see
     * commit 22aebdcc7 for the design intent). Same SVG markup reads
     * correctly on any theme that loads tokens.css (themes gallery,
     * HC preview, cockpit picker — no per-theme aliasing required). */
    --sonde-daylight-mark-sun-stop-0: #e0e8f0;
    --sonde-daylight-mark-sun-stop-1: #a8b4c0;
    --sonde-daylight-mark-sun-stop-2: #505860;
    --sonde-daylight-mark-crater: transparent;
    --sonde-daylight-mark-probe: #0a1120;
  }
}

/* Dark mode via explicit [data-theme="dark"] or [data-mode="dark"] toggle —
 * mirrors the media query above so partners can opt in without OS dark mode.
 *
 * The [data-mode="dark"] selector is guarded with :not() for cockpit theme
 * names so that opting into dark mode while running ultraviolet or infrared
 * does not pull in the partner-fallback probe palette (those themes own the
 * full probe-mark cascade in their own :root blocks).
 */
[data-theme="dark"],
[data-mode="dark"]:not([data-theme="ultraviolet"]):not([data-theme="infrared"]):not([data-theme="high-contrast"]) {
  --sonde-probe-light-dish-1: #3a4a60;
  --sonde-probe-light-dish-2: #2a3a50;
  --sonde-probe-light-dish-3: #1a2a3a;
  --sonde-probe-light-bus-1: #8a7a3a;
  --sonde-probe-light-bus-2: #7a6a2a;
  --sonde-probe-light-bus-3: #5a4a1a;
  --sonde-probe-light-rtg-1: #4a3a2a;
  --sonde-probe-light-rtg-2: #3a2a1a;
  --sonde-probe-light-boom: #4a5a6a;
  --sonde-probe-light-boom-dot: #3a4a5a;
  --sonde-probe-light-boom-dot-stroke: #2a3a4a;
  --sonde-probe-light-strut-stroke: #2a3a4a;
  --sonde-probe-light-dish-stroke: #2a3a4a;
  --sonde-probe-light-dish-ring: #3a4a5a;
  --sonde-probe-light-strut: #3a4a5a;
  --sonde-probe-light-feed-fill: #c8d0e0;
  --sonde-probe-light-feed-inner: #b0b8c8;
  --sonde-probe-light-feed-stroke: #3a4a5a;
  --sonde-probe-light-feed-inner-stroke: #2a3a4a;
  --sonde-probe-light-bus-stroke: #2a2a2a;
  --sonde-probe-light-bus-line: #5a4a1a;
  --sonde-probe-light-panel: #6a5a2a;
  --sonde-probe-light-panel-stroke: #4a3a1a;
  --sonde-probe-light-thruster: #3a4a5a;
  --sonde-probe-light-antenna: #4a5a6a;
  --sonde-probe-light-antenna-dot: #5a6a7a;
  --sonde-probe-light-antenna-dot-stroke: #3a4a5a;
  --sonde-probe-light-sci-platform: #4a5a6a;
  --sonde-probe-light-sci-lens-1: #1a2a3a;
  --sonde-probe-light-sci-lens-1-stroke: #2a3a4a;
  --sonde-probe-light-sci-lens-1-inner: #0a1a2a;
  --sonde-probe-light-sci-lens-1-inner-stroke: #1a2a3a;
  --sonde-probe-light-sci-lens-2: #1a2a3a;
  --sonde-probe-light-rtg-line: #3a2a1a;
  --sonde-probe-light-rtg-cap: #4a3a2a;

  /* Sonde Daylight mark — dark-mode overrides (explicit data-theme/data-mode).
   * Pale silver-moon sphere with a near-black probe silhouette — see
   * commit 22aebdcc7 for the design intent. Keep these in lockstep
   * with the @media (prefers-color-scheme: dark) block above. */
  --sonde-daylight-mark-sun-stop-0: #e0e8f0;
  --sonde-daylight-mark-sun-stop-1: #a8b4c0;
  --sonde-daylight-mark-sun-stop-2: #505860;
  --sonde-daylight-mark-crater: transparent;
  --sonde-daylight-mark-probe: #0a1120;

  --sonde-color-sidebar: #0d1117;
  --sonde-color-table-header-bg: #0a0a14;
  --sonde-color-table-header-text: #e8e0ff;

  --sonde-color-badge-pass-bg: #06342a;
  --sonde-color-badge-fail-bg: #3a0612;
  --sonde-color-badge-partial-bg: #3a2505;
  --sonde-color-badge-na-bg: #171421;
  --sonde-color-badge-info-bg: #082f49;
  --sonde-color-badge-warning-bg: #3a2505;
  --sonde-color-badge-error-bg: #3a0612;
  --sonde-color-badge-critical-bg: #3b071a;

  --sonde-code-bg: #0f0f0f;
  --sonde-code-text: #e7e5e4;
}

/* ─── Reduced Motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  :root {
    --sonde-motion-reduce: 1;
    --sonde-motion-duration-fast: 0ms;
    --sonde-motion-duration-slow: 0ms;
  }
}

/* ─── Print ─────────────────────────────────────────────────────── */
@media print {
  :root {
    --sonde-color-bg: #ffffff;
    --sonde-color-surface: #ffffff;
    --sonde-color-sidebar: #ffffff;
    --sonde-color-text: #000000;
    --sonde-color-text-heading: #000000;
    --sonde-color-border: #cccccc;
    --sonde-color-border-subtle: #eeeeee;
    --sonde-shadow-sm: none;
    --sonde-shadow-md: none;
    --sonde-shadow-lg: none;
    --sonde-code-bg: color-mix(in srgb, var(--sonde-color-text) 6%, var(--sonde-color-surface));
    --sonde-code-text: var(--sonde-color-text);
    --sonde-code-line-num: var(--sonde-color-text-muted);
    --sonde-code-gutter-bg: color-mix(in srgb, var(--sonde-color-text) 4%, var(--sonde-color-surface));
    --sonde-code-highlight-bg: color-mix(in srgb, var(--sonde-color-primary) 10%, var(--sonde-color-surface));
    /* Print uses a light code surface, so every syntax role must switch away
     * from the dark-surface defaults owned by several theme families. */
    --sonde-syntax-keyword: #1a3554;
    --sonde-syntax-type: #08645e;
    --sonde-syntax-string: #14532d;
    --sonde-syntax-number: #9f4f05;
    --sonde-syntax-comment: #635e58;
    --sonde-syntax-function: #0369a1;
    --sonde-syntax-variable: #1c1917;
    --sonde-syntax-constant: #ad3a0b;
    --sonde-syntax-property: #1a3554;
    --sonde-syntax-punctuation: #57534e;
    --sonde-syntax-tag: #991b1b;
    --sonde-syntax-default: #1c1917;
    --sonde-color-diff-bg: #f0ebe0;
    --sonde-color-diff-add-bg: #dcf5eb;
    --sonde-color-diff-add-text: #086962;
    --sonde-color-diff-add-gutter: #c5e7dc;
    --sonde-color-diff-remove-bg: #fde6dc;
    --sonde-color-diff-remove-text: #9b2f08;
    --sonde-color-diff-remove-gutter: #f3cbbf;
    --sonde-color-diff-unchanged-gutter: #e9e3d5;
    --sonde-color-fix-label: var(--sonde-color-secondary);
    --sonde-color-fix-text: var(--sonde-color-text);
    --sonde-viz-code-bg: var(--sonde-code-bg);
  }
  /* Structural print rules are single-sourced here (the universal base every
   * palette/surface prepends). Each theme's own @media print block carries only
   * its :root print token overrides — never a copy of this structure. */
  body, .sonde-exhibit, .scribe-shell__main {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .site-nav,
  .settings-dropdown,
  footer,
  .sonde-nav,
  .sonde-controls,
  .scribe-leaderboard-pagination,
  .leaderboard-pagination,
  [data-print="hide"] {
    display: none !important;
  }
  details,
  details:not([open]) {
    display: block;
  }
  details > summary {
    display: none;
  }
  details > * {
    display: revert;
  }
  pre,
  code,
  .exhibit-code-block {
    break-inside: avoid;
    page-break-inside: avoid;
    orphans: 4;
    widows: 4;
  }
  section,
  .vpat-section,
  tr {
    break-inside: avoid;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    break-after: avoid;
    page-break-after: avoid;
  }
  thead {
    display: table-header-group;
  }
  /* Modern PDF readers preserve clickable hyperlinks, so the raw href is no
   * longer appended as visible text after every <a> (that produced duplicate
   * "URL (URL)" output and bloated paged output). Click-through still works in
   * saved PDFs across paged.js, Playwright bake, and Chrome's stock print. */
  th.sortable::after,
  th[data-sort-key]::after {
    content: "";
    display: none;
  }
  tr[data-filtered="true"] {
    display: none;
  }
  body[data-scribe-print-rows="all"] tr[data-filtered="true"] {
    display: table-row;
  }
}

/* ─── Forced Colors (Windows High Contrast) ─────────────────────── */
@media (forced-colors: active) {
  :root {
    --sonde-color-primary: LinkText;
    --sonde-color-text: CanvasText;
    --sonde-color-bg: Canvas;
    --sonde-color-surface: Canvas;
    --sonde-color-border: CanvasText;
    --sonde-color-accent: Highlight;
    --sonde-color-table-header-bg: Canvas;
    --sonde-color-table-header-text: CanvasText;
  }
}

/* ─── Locale-Aware Overrides ────────────────────────────────────── */
/* CJK scripts need narrower readable line length */
:root:lang(ja), :root:lang(zh), :root:lang(ko),
[lang^="ja"], [lang^="zh"], [lang^="ko"] {
  --sonde-content-readable-max: 40ch;
  --sonde-layout-readable-max: 40ch;
}

/* ─── Form-Factor Layout Overrides ─────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --sonde-content-data-max: 100%;
    --sonde-content-padding: clamp(0.75rem, 4vw, 1rem);
    --sonde-layout-shell-max: 100%;
    --sonde-layout-data-max: 100%;
    --sonde-layout-gutter-inline: var(--sonde-content-padding);
    --sonde-layout-gutter-block: var(--sonde-spacing-lg);
    --sonde-layout-panel-min: 100%;
    --sonde-layout-panel-max: 100%;
    --sonde-layout-grid-min: min(100%, 14rem);
    --sonde-layout-toolbar-gap: var(--sonde-spacing-xs);
  }
}

@media (min-width: 1920px) {
  :root {
    --sonde-content-data-max: 94%;
    --sonde-content-padding: clamp(2rem, 2vw, 5rem);
    --sonde-layout-shell-max: 96%;
    --sonde-layout-data-max: 94%;
    --sonde-layout-gutter-inline: var(--sonde-content-padding);
    --sonde-layout-gutter-block: var(--sonde-spacing-2xl);
    --sonde-layout-grid-min: 18rem;
  }
}

/* ─── sonde.life contact form — shared structure ────────────────────────
 * Theme-agnostic layout lives in the base layer; color comes from tokens.
 * The public classes intentionally describe the contact form surface. */
.sl-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.sl-contact-form {
  min-width: 0;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--sonde-color-border);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--sonde-color-surface) 68%, transparent);
}

.sl-contact-aside {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.sl-contact-form-heading h2 {
  margin: 0;
  color: var(--sonde-color-text-heading);
  font-family: var(--sonde-font-heading);
  font-size: 1.25rem;
  line-height: 1.2;
}

.sl-contact-form-heading p,
.sl-contact-note,
.sl-contact-privacy {
  margin: 0;
  color: var(--sonde-color-text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.sl-contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.sl-contact-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--sonde-color-text-heading);
  font-family: var(--sonde-font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sl-contact-field-wide {
  grid-column: 1 / -1;
}

.sl-contact-field input,
.sl-contact-field select,
.sl-contact-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--sonde-color-border);
  border-radius: 0.4rem;
  background: var(--sonde-color-bg);
  color: var(--sonde-color-text);
  font: 400 0.98rem / 1.45 var(--sonde-font-body);
}

.sl-contact-field input,
.sl-contact-field select {
  min-height: 2.55rem;
  padding: 0 0.75rem;
}

.sl-contact-field textarea {
  resize: vertical;
  min-height: 8rem;
  padding: 0.65rem 0.75rem;
}

.sl-contact-field input:focus-visible,
.sl-contact-field select:focus-visible,
.sl-contact-field textarea:focus-visible,
.sl-contact-consent input:focus-visible {
  outline: 3px solid var(--sonde-color-primary);
  outline-offset: 2px;
}

.sl-contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sl-contact-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--sonde-color-text);
  font-size: 0.95rem;
  line-height: 1.4;
}

.sl-contact-consent input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
}

.sl-contact-turnstile {
  min-height: 4.1rem;
  display: flex;
  align-items: center;
}

.sl-page .sl-contact-submit {
  justify-self: start;
  cursor: pointer;
  background: transparent;
}

/* Disabled until the form is valid and consent is checked. Grey it out
 * clearly (muted border + text), not-allowed cursor, dimmed. The :disabled
 * selector out-specifies .sl-action-primary so it overrides the active look. */
.sl-page .sl-contact-submit:disabled,
.sl-page .sl-contact-submit:disabled:hover {
  border-color: var(--sonde-color-border);
  color: var(--sonde-color-text-muted);
  background: transparent;
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 56rem) {
  .sl-contact-layout,
  .sl-contact-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 30rem) {
  .sl-contact-form {
    /* Turnstile's responsive widget has a documented 300px minimum. Let the
     * bordered form reach the phone viewport edge, leaving a 302px content box
     * at the 320px certification baseline after padding and borders. */
    margin-inline: calc(-1 * var(--sonde-content-padding));
    padding-inline: 0.5rem;
  }
}

/* ─── AUTO-GENERATED @property REGISTRATIONS — do not edit by hand ────── */
/*
 * Generated by scripts/syncTokenProperties.ts. Every custom property
 * declared in :root whose initial value parses as a <color> receives
 * an @property registration here. The magenta sentinel initial-value
 * (#ff00ff) guarantees that any future missing-token regression
 * paints loudly instead of silently inheriting a default.
 *
 * Do not edit by hand — rerun the script.
 */
@property --sonde-code-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-code-gutter-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-code-highlight-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-code-line-num {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-code-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-accent-dim {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-annotation-label-on-dark {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-annotation-label-on-light {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-critical-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-error-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-fail-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-info-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-na-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-partial-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-pass-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-badge-warning-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-border-strong {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-border-subtle {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-contrast-safe-button-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-contrast-safe-button-hover {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-contrast-safe-button-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-critical {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-add-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-add-gutter {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-add-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-remove-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-remove-gutter {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-remove-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-diff-unchanged-gutter {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-error {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-fail {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-feedback-dark-from {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-feedback-dark-to {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-info {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-megaphone-bg-light {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-megaphone-bg-medium {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-megaphone-bg-strong {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-megaphone-gradient-end {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-na {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-partial {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-pass {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-primary {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-text-on-badge {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-0 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-0-on-dark {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-1-on-dark {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-2-on-dark {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-score-tier-3-on-dark {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-secondary {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-sidebar {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-surface {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-surface-elevated {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-table-header-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-table-header-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-text-heading {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-text-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-doesnot-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-doesnot-fg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-noteval-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-noteval-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-noteval-fg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-partial-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-partial-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-partial-fg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-supports-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-vpat-supports-fg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-color-warning {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-bus-gold {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-earth-blue {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-flame-deep {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-flame-hot {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-flame-mid {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-metal {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-hc-mark-rtg-brown {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-crater {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-dark-crater {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-dark-probe {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-dark-sun-stop-0 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-dark-sun-stop-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-dark-sun-stop-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-high-contrast-crater {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-high-contrast-probe {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-high-contrast-sun-stop-0 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-high-contrast-sun-stop-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-high-contrast-sun-stop-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-light-crater {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-light-probe {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-light-sun-stop-0 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-light-sun-stop-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-preview-light-sun-stop-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-probe {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-sun-stop-0 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-sun-stop-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mark-sun-stop-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-alert {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-crater {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-inverse-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-pass {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-primary {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-surface {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-surface-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-text-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-daylight-mock-warn {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-exhibit-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-exhibit-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-exhibit-border-subtle {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-exhibit-overlay {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-exhibit-surface {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-exhibit-text-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-glow-core {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-glow-far {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-glow-mid {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-glow-outer {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-antenna {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-antenna-dot {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-antenna-dot-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-boom {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-boom-dot {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-boom-dot-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-bus-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-bus-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-bus-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-bus-line {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-bus-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-dish-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-dish-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-dish-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-dish-ring {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-dish-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-feed-fill {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-feed-inner {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-feed-inner-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-feed-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-panel {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-panel-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-rtg-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-rtg-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-rtg-cap {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-rtg-line {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-sci-lens-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-sci-lens-1-inner {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-sci-lens-1-inner-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-sci-lens-1-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-sci-lens-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-sci-platform {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-strut {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-strut-stroke {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-probe-light-thruster {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-bar-label {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-bar-track {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-bar-truncated-stripe {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-code-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-code-highlight-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-code-line-num {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-code-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-detail-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-hub-spoke-hub-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-hub-spoke-node-fill {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-image-placeholder-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-pipeline-active-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-pipeline-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-quote-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-cta {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-glow-deep {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-gold {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-primary {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-secondary {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-strut {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-role-strut-light {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-slide-syntax-string {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-spinner-overlay-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-comment {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-constant {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-default {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-function {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-keyword {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-number {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-property {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-punctuation {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-string {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-tag {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-type {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-syntax-variable {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-viz-code-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-viz-edge {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-viz-glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-viz-grid-overlay {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-viz-label-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
@property --sonde-viz-node-faded {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff00ff;
}
/* ─── END AUTO-GENERATED @property REGISTRATIONS ───────────────────────── */


/**
 * Ultraviolet Theme — "High-Energy Instrumentation"
 *
 * Deep-space nebulae, plasma discharge, black-light laboratories.
 * Cool violet on indigo in dark mode; frost porcelain with violet
 * ink in light mode. Cockpit's product default.
 *
 * Design source: docs/plans/theming-brand-architecture.md
 * Rendered preview: docs/plans/theming-brand-previews.html
 *
 * Fonts: Chakra Petch (display) + IBM Plex Sans (body) + IBM Plex Mono (code)
 *
 * NO FALLBACKS. EVER. See tokens.css for policy.
 */

/* ─── Dark Mode (default) ───────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Core semantic */
  --sonde-color-primary: #b185ff;
  --sonde-color-secondary: #7dd3fc;
  --sonde-color-bg: #0a0618;
  --sonde-color-surface: #15102a;
  --sonde-color-sidebar: #0a0618;
  --sonde-color-text: #e8e0ff;
  --sonde-color-text-muted: #a8a1c8;
  --sonde-color-text-heading: #e8e0ff;
  --sonde-color-border: #7f6bd1;
  --sonde-color-border-subtle: #6c5fb0;
  --sonde-color-accent: #b185ff;
  --sonde-color-accent-dim: rgba(177, 133, 255, 0.10);

  /* Status */
  --sonde-color-pass: #5eead4;
  --sonde-color-fail: #ff5a8a;
  --sonde-color-partial: #d4a85a;
  --sonde-color-na: #9a8bd4;
  --sonde-color-info: #7dd3fc;
  --sonde-color-warning: #d4a85a;
  --sonde-color-error: #ff5a8a;
  --sonde-color-critical: #f472b6;
  --sonde-color-badge-pass-bg: #06342a;
  --sonde-color-badge-fail-bg: #3a0612;
  --sonde-color-badge-partial-bg: #3a2505;
  --sonde-color-badge-na-bg: #171421;
  --sonde-color-badge-info-bg: #082f49;
  --sonde-color-badge-warning-bg: #3a2505;
  --sonde-color-badge-error-bg: #3a0612;
  --sonde-color-badge-critical-bg: #3b071a;

  /* Table */
  --sonde-color-table-header-bg: #15102a;
  --sonde-color-table-header-text: #e8e0ff;

  /* Typography */
  --sonde-font-body: 'Outfit', 'IBM Plex Sans', 'Avenir Next', system-ui, sans-serif;
  --sonde-font-heading: 'Outfit', 'IBM Plex Sans', sans-serif;
  --sonde-font-mono: 'IBM Plex Mono', 'Fira Code', ui-monospace, monospace;
  --sonde-font-size-base: 16px;
  --sonde-line-height: 1.65;

  /* Elevated surface + stronger border tiers */
  --sonde-color-surface-elevated: #1f1840;
  --sonde-color-border-strong: #3a2d6b;

  /* Visualization primitives */
  --sonde-viz-grid-overlay: rgba(177, 133, 255, 0.03);
  --sonde-viz-glow: rgba(177, 133, 255, 0.18);
  --sonde-viz-label-bg: rgba(10, 6, 24, 0.88);
  --sonde-viz-node-faded: rgba(144, 135, 184, 0.15);
  --sonde-viz-edge: rgba(144, 135, 184, 0.4);
  --sonde-viz-code-bg: rgba(177, 133, 255, 0.08);

  /* Display font */
  --sonde-font-display: 'Outfit', 'IBM Plex Sans', sans-serif;

  /* Code block surfaces */
  --sonde-code-bg: #13092b;
  --sonde-code-text: #e8e0ff;
  --sonde-code-line-num: #5a4d88;
  --sonde-code-gutter-bg: #1a1040;
  --sonde-code-highlight-bg: rgba(177, 133, 255, 0.10);

  /* Syntax highlighting (12 roles) */
  --sonde-syntax-keyword: #c084fc;
  --sonde-syntax-type: #5eead4;
  --sonde-syntax-string: #d8b4fe;
  --sonde-syntax-number: #f472b6;
  /* 4.5:1 against the ultraviolet dark source surface. */
  --sonde-syntax-comment: #9186ae;
  --sonde-syntax-function: #7dd3fc;
  --sonde-syntax-variable: #e8e0ff;
  --sonde-syntax-constant: #fbbf24;
  --sonde-syntax-property: #a5b4fc;
  --sonde-syntax-punctuation: #9087b8;
  --sonde-syntax-tag: #ff5a8a;
  --sonde-syntax-default: #e8e0ff;

  /* Diff viewer */
  --sonde-color-diff-bg: #13092b;
  --sonde-color-diff-add-bg: #0f2a24;
  --sonde-color-diff-add-text: #7ee7cf;
  --sonde-color-diff-add-gutter: #14382f;
  --sonde-color-diff-remove-bg: #341221;
  --sonde-color-diff-remove-text: #ff8ab0;
  --sonde-color-diff-remove-gutter: #44172b;
  --sonde-color-diff-unchanged-gutter: #1a1040;
}

/* ─── Light Mode ────────────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-mode="dark"]) {
    color-scheme: light;

    /* Core semantic */
    --sonde-color-primary: #6d28d9;
    --sonde-color-secondary: #4f46e5;
    --sonde-color-bg: #f6f4fb;
    --sonde-color-surface: #ffffff;
    --sonde-color-sidebar: #ece8f5;
    --sonde-color-text: #1a1240;
    --sonde-color-text-muted: #4f4470;
    --sonde-color-text-heading: #1a1240;
    --sonde-color-border: #6c5a94;
    --sonde-color-border-subtle: #7d708f;
    --sonde-color-accent: #6d28d9;
    --sonde-color-accent-dim: rgba(109, 40, 217, 0.10);

    /* Status */
    --sonde-color-pass: #0f766e;
    --sonde-color-fail: #9f1239;
    --sonde-color-partial: #965a06;
    --sonde-color-na: #626976;
    --sonde-color-info: #4f46e5;
    --sonde-color-warning: #965a06;
    --sonde-color-error: #9f1239;
    --sonde-color-critical: #9f1239;
    --sonde-color-badge-pass-bg: #dcfce7;
    --sonde-color-badge-fail-bg: #fef2f2;
    --sonde-color-badge-partial-bg: #fef3c7;
    --sonde-color-badge-na-bg: #f5f5f4;
    --sonde-color-badge-info-bg: #e0f2fe;
    --sonde-color-badge-warning-bg: #fef3c7;
    --sonde-color-badge-error-bg: #fef2f2;
    --sonde-color-badge-critical-bg: #fff1f2;

    /* Table */
    --sonde-color-table-header-bg: #6d28d9;
    --sonde-color-table-header-text: #f6f4fb;

    /* Elevated surface + stronger border tiers */
    --sonde-color-surface-elevated: #eeeaf6;
    --sonde-color-border-strong: #c8bde0;

    /* Visualization primitives */
    --sonde-viz-grid-overlay: rgba(109, 40, 217, 0.04);
    --sonde-viz-glow: rgba(109, 40, 217, 0.12);
    --sonde-viz-label-bg: rgba(246, 244, 251, 0.92);
    --sonde-viz-node-faded: rgba(90, 79, 120, 0.15);
    --sonde-viz-edge: rgba(90, 79, 120, 0.4);
    --sonde-viz-code-bg: rgba(109, 40, 217, 0.05);

    /* Code block surfaces */
    --sonde-code-bg: #eeeaf6;
    --sonde-code-text: #1a1240;
    --sonde-code-line-num: #9087b8;
    --sonde-code-gutter-bg: #e5dff0;
    --sonde-code-highlight-bg: rgba(109, 40, 217, 0.08);

    /* Syntax highlighting */
    --sonde-syntax-keyword: #6d28d9;
    --sonde-syntax-type: #0b665f;
    --sonde-syntax-string: #86198f;
    --sonde-syntax-number: #be185d;
    --sonde-syntax-comment: #5f6673;
    --sonde-syntax-function: #4f46e5;
    --sonde-syntax-variable: #1a1240;
    --sonde-syntax-constant: #9f4f07;
    --sonde-syntax-property: #7c3aed;
    --sonde-syntax-punctuation: #5a4f78;
    --sonde-syntax-tag: #9f1239;
    --sonde-syntax-default: #1a1240;

    /* Diff viewer */
    --sonde-color-diff-bg: #eeeaf6;
    --sonde-color-diff-add-bg: #dff7ed;
    --sonde-color-diff-add-text: #0b6f62;
    --sonde-color-diff-add-gutter: #c8eadb;
    --sonde-color-diff-remove-bg: #fde7ef;
    --sonde-color-diff-remove-text: #9f1239;
    --sonde-color-diff-remove-gutter: #f6ccd9;
    --sonde-color-diff-unchanged-gutter: #e5dff0;
  }
}

/* ─── Explicit light toggle ─────────────────────────────────────── */
:root[data-mode="light"] {
  color-scheme: light;

  --sonde-color-primary: #6d28d9;
  --sonde-color-secondary: #4f46e5;
  --sonde-color-bg: #f6f4fb;
  --sonde-color-surface: #ffffff;
  --sonde-color-sidebar: #ece8f5;
  --sonde-color-text: #1a1240;
  --sonde-color-text-muted: #4f4470;
  --sonde-color-text-heading: #1a1240;
  --sonde-color-border: #6c5a94;
  --sonde-color-border-subtle: #7d708f;
  --sonde-color-accent: #6d28d9;
  --sonde-color-accent-dim: rgba(109, 40, 217, 0.10);

  --sonde-color-pass: #0f766e;
  --sonde-color-fail: #9f1239;
  --sonde-color-partial: #965a06;
  --sonde-color-na: #626976;
  --sonde-color-info: #4f46e5;
  --sonde-color-warning: #965a06;
  --sonde-color-error: #9f1239;
  --sonde-color-critical: #9f1239;
  --sonde-color-badge-pass-bg: #dcfce7;
  --sonde-color-badge-fail-bg: #fef2f2;
  --sonde-color-badge-partial-bg: #fef3c7;
  --sonde-color-badge-na-bg: #f5f5f4;
  --sonde-color-badge-info-bg: #e0f2fe;
  --sonde-color-badge-warning-bg: #fef3c7;
  --sonde-color-badge-error-bg: #fef2f2;
  --sonde-color-badge-critical-bg: #fff1f2;

  --sonde-color-table-header-bg: #6d28d9;
  --sonde-color-table-header-text: #f6f4fb;

  --sonde-color-surface-elevated: #eeeaf6;
  --sonde-color-border-strong: #c8bde0;

  --sonde-viz-grid-overlay: rgba(109, 40, 217, 0.04);
  --sonde-viz-glow: rgba(109, 40, 217, 0.12);
  --sonde-viz-label-bg: rgba(246, 244, 251, 0.92);
  --sonde-viz-node-faded: rgba(90, 79, 120, 0.15);
  --sonde-viz-edge: rgba(90, 79, 120, 0.4);
  --sonde-viz-code-bg: rgba(109, 40, 217, 0.05);

  --sonde-code-bg: #eeeaf6;
  --sonde-code-text: #1a1240;
  --sonde-code-line-num: #9087b8;
  --sonde-code-gutter-bg: #e5dff0;
  --sonde-code-highlight-bg: rgba(109, 40, 217, 0.08);

  --sonde-syntax-keyword: #6d28d9;
  --sonde-syntax-type: #0b665f;
  --sonde-syntax-string: #86198f;
  --sonde-syntax-number: #be185d;
  --sonde-syntax-comment: #5f6673;
  --sonde-syntax-function: #4f46e5;
  --sonde-syntax-variable: #1a1240;
  --sonde-syntax-constant: #9f4f07;
  --sonde-syntax-property: #7c3aed;
  --sonde-syntax-punctuation: #5a4f78;
  --sonde-syntax-tag: #9f1239;
  --sonde-syntax-default: #1a1240;

  --sonde-color-diff-bg: #eeeaf6;
  --sonde-color-diff-add-bg: #dff7ed;
  --sonde-color-diff-add-text: #0b6f62;
  --sonde-color-diff-add-gutter: #c8eadb;
  --sonde-color-diff-remove-bg: #fde7ef;
  --sonde-color-diff-remove-text: #9f1239;
  --sonde-color-diff-remove-gutter: #f6ccd9;
  --sonde-color-diff-unchanged-gutter: #e5dff0;
}

/* ─── Explicit dark toggle ──────────────────────────────────────── */
/* Users who pick dark explicitly get the default :root values above. */
:root[data-mode="dark"], [data-theme="dark"] {
  color-scheme: dark;
}

/* ─── Print ─────────────────────────────────────────────────────── */
@media print {
  :root {
    --sonde-color-primary: #6d28d9;
    --sonde-color-secondary: #4f46e5;
    --sonde-color-accent: #6d28d9;
    --sonde-color-bg: #ffffff;
    --sonde-color-surface: #ffffff;
    --sonde-color-surface-elevated: #ffffff;
    --sonde-color-sidebar: #ffffff;
    --sonde-color-text: #000000;
    --sonde-color-text-muted: #333333;
    --sonde-color-text-heading: #000000;
    --sonde-color-pass: #0f766e;
    --sonde-color-fail: #9f1239;
    --sonde-color-partial: #965a06;
    --sonde-color-na: #626976;
    --sonde-color-info: #4f46e5;
    --sonde-color-warning: #965a06;
    --sonde-color-error: #9f1239;
    --sonde-color-critical: #9f1239;
    --sonde-color-badge-pass-bg: #dcfce7;
    --sonde-color-badge-fail-bg: #fef2f2;
    --sonde-color-badge-partial-bg: #fef3c7;
    --sonde-color-badge-na-bg: #f5f5f4;
    --sonde-color-badge-info-bg: #e0f2fe;
    --sonde-color-badge-warning-bg: #fef3c7;
    --sonde-color-badge-error-bg: #fef2f2;
    --sonde-color-badge-critical-bg: #fff1f2;
    --sonde-color-border: #959494;
    --sonde-color-border-subtle: #959494;
    --sonde-shadow-sm: none;
    --sonde-shadow-md: none;
    --sonde-shadow-lg: none;
    --sonde-code-bg: color-mix(in srgb, var(--sonde-color-text) 6%, var(--sonde-color-surface));
    --sonde-code-text: var(--sonde-color-text);
    --sonde-code-line-num: var(--sonde-color-text-muted);
    --sonde-code-gutter-bg: color-mix(in srgb, var(--sonde-color-text) 4%, var(--sonde-color-surface));
    --sonde-code-highlight-bg: color-mix(in srgb, var(--sonde-color-primary) 10%, var(--sonde-color-surface));
    --sonde-color-fix-label: var(--sonde-color-secondary);
    --sonde-color-fix-text: var(--sonde-color-text);
    --sonde-viz-code-bg: var(--sonde-code-bg);
  }
}

/* ─── High Contrast Preference ─────────────────────────────────── */
@media (prefers-contrast: more) {
  :root {
    --sonde-color-text-muted: #d8d0ff;
    --sonde-color-border: #a8a1c8;
    --sonde-color-border-subtle: #8f79df;
  }
}

/* ─── Forced Colors (Windows High Contrast) ─────────────────────── */
@media (forced-colors: active) {
  :root {
    --sonde-color-primary: LinkText;
    --sonde-color-secondary: LinkText;
    --sonde-color-text: CanvasText;
    --sonde-color-text-muted: GrayText;
    --sonde-color-text-heading: CanvasText;
    --sonde-color-bg: Canvas;
    --sonde-color-surface: Canvas;
    --sonde-color-sidebar: Canvas;
    --sonde-color-border: CanvasText;
    --sonde-color-accent: Highlight;
  }
}
