/* GENERATED by scripts/sync-nocturne.mjs from design-system/nocturne.css and design-system/nocturne-website.css — do not edit */

/* Reconciled against the design drop at
   design/Helios dashboard redesign update/handoff/_ds/nocturne-a1fd0686-83e9-4c8e-b7bd-f26f9b902bd2/styles.css
   (sha256 6fea354710ec4e3b2b979b723ed37d8e8959bb7d9137425d0d562b4ad8733cda)
   on 2026-08-31. This is now the canonical Nocturne token file — not the
   drop, which the designer overwrites on every export, and not
   website/nocturne.css, which is a marketing-site asset that shouldn't be
   the thing a tenant workspace derives from. Diff the drop against this
   hash before touching anything below; if it has moved, reconcile deliberately
   rather than overwriting this file wholesale — the two changes below need
   to survive the merge.

   Exactly two changes from the drop, each is why this file exists instead
   of being the drop itself:
   1. The Google Fonts @import is replaced by a local @font-face — a
      tenant workspace must not make a per-pageview request to a third
      party just to render text. See design-system/README.md.
   2. This header comment.
   Everything else, including every comment below, is the designer's,
   verbatim — they record real design review rounds and are the most
   valuable thing in this file. */
/* Nocturne — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */

/* Self-hosted Inter, not Google's CDN. Same-origin per surface (this file,
   helios_dashboard/css/nocturne.css, website/nocturne.css each carry their
   own copy of the woff2 next to them) — DECISIONS D8: same-origin needs no
   CORS header and no shared font host to keep alive. Variable, Roman only:
   neither reference HTML uses italic, so there's no reason to ship a
   second ~340KB file for a style nothing asks for. Subset to latin +
   latin-ext (the unicode-range below); OFL requires the licence travel
   with the font — see fonts/OFL.txt, not optional. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/InterVariable-Roman-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0300-0301, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9; /* review round 7 (Barron): the accent moves to
     the product's blurple — OKLCH hue 289.2, the hue of the app's own Pro
     accent (#9a8fe0, --om-accent-pro) — at the same lightness the steel
     accent held (L 0.660, so the documented ratios survive) and chroma
     in the product blurple's own range (its token sits at C 0.118; the
     accent takes 0.125, from the old steel's 0.030):
     the accent now reads as an accent rather than another neutral. */
  --color-accent-2: #a7a1db; /* the machine-derived stand-in follows: same
     hue, same L 0.734, chroma at the same 2:3 proportion it held */
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --color-accent-2-100: #f5f4ff;
  --color-accent-2-200: #e7e5fe;
  --color-accent-2-300: #d2cefd;
  --color-accent-2-400: #b5afe8;
  --color-accent-2-500: #9690c9;
  --color-accent-2-600: #7972a9;
  --color-accent-2-700: #5c5783;
  --color-accent-2-800: #423e5d;
  --color-accent-2-900: #2b293a;

  /* Deck section-divider ground — review round 3: saturation as presence.
     Dividers take a saturated deep indigo (hue 277, the neutral ramp's own
     family; C 0.094 — written when the accent held C 0.030, before the
     round-7 blurple raised it past the ground's) with a lighter bloom and
     a ghost tint of the same hue, while the slide grounds stay
     desaturated. Deck-scale fills only — not interface colors. */
  --color-section: #262a60;
  --color-section-glow: #353b80;
  --color-section-ghost: #4c5397;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0,0,0,0.65);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.lighten{mix-blend-mode:lighten;background-color:transparent}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
/* Rules fade to transparent at both ends instead of stopping cleanly — a
   Nocturne signature. The ramp is 48px an end (one deck baseline unit),
   painted from the same divider token. Freestanding rules fade; box
   outlines, in-control separators, and short accent marks stay solid. */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-accent-2 { background: var(--color-accent-2-800); color: var(--color-accent-2-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid transparent; /* keeps layout; the row paints the fading rule */
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid transparent;
}
/* Row rules as row-level strips so the end-fade spans the row, not each cell. */
.table thead tr {
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr {
  background: linear-gradient(to right,
    transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr:hover {
  /* the hover tint layers over the row rule, which keeps painting */
  background:
    linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent),
                    color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%,
    linear-gradient(to right,
      transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
      color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  /* A modal has to out-paint the chrome it covers, and `position: fixed`
     alone does not do that: it leaves z-index at `auto`, so any positioned
     sibling that does carry one wins on paint order regardless of DOM
     order. In helios_dashboard the top bar is z-index 20 and the mobile
     user-menu panel is 30, so an open dialog was painted and then covered
     by them -- observed on device 2026-09-09: the mail composer's "New
     message" title and close button sat *behind* the tab strip, with the
     dialog's own rounded top border visible through the gaps between the
     tab pills. Not a clipping or overflow problem; the composer already
     caps itself at 85vh and scrolls its own body.
     1000 is a tier of its own -- the highest z-index anywhere else in this
     repo is 97. */
  z-index: 1000;
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* nocturne-website.css — a second Nocturne layer, appended to the website
   target only. It exists because of two parsers, not one preference:

   1. scripts/sync-nocturne.mjs's extractBlock() takes the *first*
      "@font-face {" and the first ":root {" out of design-system/nocturne.css
      to build the orchestrator/Nextcloud target, and toAbsoluteFontSrc()
      throws unless that first @font-face's src is the exact Inter URL.
   2. design/tokens/extract-tokens.sh does the same thing, for the same
      reason, to build the intranet's SCSS.

   An Urbanist @font-face placed ahead of Inter's in nocturne.css breaks both
   at build time; placed after it, both parsers still work but Inter's
   @font-face silently stops being the first, meaning the *next* thing that
   assumes "first @font-face is the self-hosted body font" (there is no
   guarantee that's forever the orchestrator target) is one edit away from
   the same throw. Redeclaring --font-heading/--font-body in nocturne.css's
   own :root would change helios_dashboard, every tenant's theming_customcss,
   and mobile's generated tokens — none of which asked for Urbanist. So the
   website's Urbanist rules and font-stack overrides live here instead,
   appended after nocturne.css in the website target only. mobile/scripts/
   generate-tokens.ts and design/tokens/extract-tokens.sh must not read this
   file — they still parse design-system/nocturne.css alone, which is what
   keeps the A' invariant (dashboard, orchestrator, mobile, intranet outputs
   unchanged) true. */

@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-VariableFont_wght.woff2") format("woff2-variations"),
       url("fonts/Urbanist-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-Italic-VariableFont_wght.woff2") format("woff2-variations"),
       url("fonts/Urbanist-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-heading: "Urbanist", system-ui, sans-serif;
  --font-body: "Urbanist", system-ui, sans-serif;
  /* was 500 in nocturne.css's own :root — Urbanist runs visually lighter
     than Inter at a matched numeric weight, so the heading stack needs a
     step up to read the same. Source-order in the concatenated file lets
     this :root win over nocturne.css's without touching it. */
  --font-heading-weight: 600;
}

/* Glass tokens — spec Step 2, website-only for the same reason the font
   stack above is: nocturne.css's own :root must not gain these.
   helios_dashboard, orchestrator/theming and mobile's token generator all
   read only design-system/nocturne.css, and every tenant's
   theming_customcss would pick up an unused token block on its next apply
   if these lived there instead (D-P5-1 A'). A second :root here still
   merges into the same cascade once concatenated — nothing needs the two
   root blocks to be one. */
:root {
  /* Glass material. The dark fills tint with the ground's own rgb, so glass
     DARKENS what is behind it. This is deliberate and load-bearing: white-tinted
     fills lift a lit backdrop into the text and take secondary inks to ~2:1. */
  --glass-thin:     rgba(22, 24, 38, 0.38);
  --glass-regular:  rgba(22, 24, 38, 0.55);
  --glass-thick:    rgba(22, 24, 38, 0.72);
  --glass-rim:      rgba(255, 255, 255, 0.16);
  --glass-rim-soft: rgba(255, 255, 255, 0.06);
  --glass-specular: rgba(255, 255, 255, 0.28);
  --glass-tint:     rgba(145, 132, 217, 0.16);  /* --color-accent's own rgb */
  --glass-scrim:    rgba(11, 12, 20, 0.62);

  --blur-thin: 10px;
  --blur-regular: 20px;
  --blur-thick: 32px;
  --blur-scrim: 6px;

  --shadow-glass-sm: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px rgba(255,255,255,0.05), 0 1px 2px rgba(0,0,0,0.35);
  --shadow-glass-md: inset 0 1px 0 rgba(255,255,255,0.18), inset 0 0 0 1px rgba(255,255,255,0.06), 0 10px 30px rgba(0,0,0,0.45);
  --shadow-glass-lg: inset 0 1px 0 rgba(255,255,255,0.24), inset 0 0 0 1px rgba(255,255,255,0.08), 0 28px 70px rgba(0,0,0,0.6);

  /* Frosted grain — one tiled fractal-noise field, opacity baked in so it needs
     no blend mode and composites predictably over any fill. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)' opacity='0.055'/%3E%3C/svg%3E");

  /* Spec says saturate(160-200%); pinned to one number so no component rule
     ever carries its own literal — retuning the material's vibrancy stays a
     one-line change here instead of a repo-wide grep. */
  --glass-saturate: 180%;
  /* The system's one specular light source, top-left, written once so
     nothing moves it per component (Step 3's own rule: "never moved per
     component"). Every glass rule below composites this same gradient. */
  --glass-sheen: linear-gradient(135deg, var(--glass-specular), transparent 42%);
}

/* — the material, Step 3 — three depths, one recipe each: fill + sheen +
   grain in one `background` (the same multi-layer-comma pattern nocturne.css
   already uses for .table's row rules), blur+saturate with its -webkit
   twin, and a shadow-glass rim. Depth escalates the fill, the blur radius
   and the rim together — thin/sm, regular/md, thick/lg — so "how frosted"
   is one choice per surface, not five. */
.glass-thin, .input, .seg, .btn-primary, .btn-secondary {
  background: var(--glass-sheen) no-repeat, var(--grain) repeat, var(--glass-thin);
  backdrop-filter: blur(var(--blur-thin)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--blur-thin)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-glass-sm);
}
.glass, .card, .nav {
  background: var(--glass-sheen) no-repeat, var(--grain) repeat, var(--glass-regular);
  backdrop-filter: blur(var(--blur-regular)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--blur-regular)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-glass-md);
}
/* 8.4px (--space-3) crowded the rim against card content the moment the rim
   itself gained weight — the padding step to --space-6 is part of the glass
   pass, not a separate spacing change. */
.card { padding: var(--space-6); }
.glass-thick, .dialog {
  background: var(--glass-sheen) no-repeat, var(--grain) repeat, var(--glass-thick);
  backdrop-filter: blur(var(--blur-thick)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--blur-thick)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-glass-lg);
}

/* The scrim dims chrome, it doesn't need to read as a pane — no specular,
   no grain, no rim, just the two tokens the spec names for it. z-index:1000
   stays put in nocturne.css; restating it here would give the impression
   this file owns that decision. */
.dialog-backdrop {
  background: var(--glass-scrim);
  backdrop-filter: blur(var(--blur-scrim));
  -webkit-backdrop-filter: blur(var(--blur-scrim));
}

/* Semantic grounds stay opaque — .tag's contrast is measured against its
   solid tint (tag-accent/-accent-2/-neutral/-outline all inherit this), so
   it takes the rim only. No fill change, no blur. */
.tag {
  box-shadow: var(--shadow-glass-sm);
}

/* .btn-primary keeps its dark thin fill (from the bucket above) with its
   accent border and ink untouched. Hover thickens rather than washing —
   accent ink over an accent-tinted fill can't clear 4.5:1 at any alpha over
   a lit backdrop, which is why the old color-mix(...) hover/active is
   replaced outright below, not layered under this. */
.btn-primary:hover {
  background: var(--glass-sheen) no-repeat, var(--grain) repeat, var(--glass-regular);
  backdrop-filter: blur(var(--blur-regular)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--blur-regular)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-glass-md);
}
.btn-primary:active {
  background: var(--glass-sheen) no-repeat, var(--grain) repeat, var(--glass-thick);
  backdrop-filter: blur(var(--blur-thick)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--blur-thick)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-glass-lg);
}

/* Never glass on glass. A blurred surface inside a blurred surface samples
   the outer blur's own already-blurred pixels, doubling the cost for a
   result that reads muddier, not deeper. :is()/:is() gives every
   ancestor/descendant pair one rule instead of the cartesian product written
   out by hand (5 ancestors x 9 descendants). .site-header is ancestor-only —
   it carries its own fill+blur directly in site.css, never a tier class, so
   it has no reason to appear on the descendant side.
   Specificity note, because it is load-bearing: :is(A) :is(B) carries the
   specificity of A's and B's most specific argument, i.e. two classes —
   equal to `.btn-primary:hover`'s class+pseudo-class. Ties break on source
   order, so this rule has to sit after every tier and state rule above, not
   before it, or a hovered button nested in the header would out-rank this
   and blur twice. */
:is(.site-header, .glass, .glass-thin, .glass-thick, .card, .nav, .dialog, .input, .seg, .btn-primary, .btn-secondary)
  :is(.glass, .glass-thin, .glass-thick, .card, .nav, .dialog, .input, .seg, .btn-primary, .btn-secondary) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* .ambient — the page ground, not a pane: background only, so it can sit on
   <body> (ancestor of every fixed overlay) without becoming a containing
   block or stacking context for any of them. --color-section* is deliberately
   absent — those are deck-scale fills, bright enough to break text contrast
   read through glass. */
.ambient {
  background:
    radial-gradient(ellipse 60% 45% at 8% -8%, var(--color-accent-900), transparent 60%) no-repeat,
    radial-gradient(ellipse 55% 40% at 105% 18%, var(--color-accent-2-900), transparent 60%) no-repeat,
    radial-gradient(ellipse 70% 50% at 30% 120%, var(--color-accent-900), transparent 60%) no-repeat,
    var(--grain) repeat,
    var(--color-bg);
}

/* Fallback 1 — no backdrop-filter support at all (the -webkit form is
   tested too, or a WebKit that only understands the prefixed property would
   otherwise read as "unsupported" and fall here anyway). `background` is a
   shorthand, so restating just the color resets the sheen/grain image
   layers to none as a side effect — a plain surface, not a flat one with a
   stuck texture nothing is blurring. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass-thin, .glass-thick,
  .card, .nav, .dialog,
  .input, .seg, .btn-primary, .btn-secondary {
    background: var(--color-surface);
  }
}

/* Fallback 2 — the user asked the OS for less transparency, not less blur
   as a rendering detail: drop to solid outright, same as Fallback 1's
   surfaces, plus the two states and the two dialog surfaces the @supports
   pass above doesn't reach on its own selector list. There is no
   prefers-reduced-motion guard anywhere in nocturne.css or site.css (site.js
   owns motion via a toggle instead) for this to sit "alongside" — that
   pairing in the spec doesn't apply here, so this block stands alone. */
@media (prefers-reduced-transparency: reduce) {
  .glass, .glass-thin, .glass-thick,
  .card, .nav,
  .input, .seg, .btn-primary, .btn-secondary,
  .btn-primary:hover, .btn-primary:active {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .dialog {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .dialog-backdrop {
    /* the scrim's own solid equivalent — full opacity, no color-mix — since
       "reduce transparency" is asking for exactly that, not a lighter blur. */
    background: var(--color-neutral-900);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
