/* The page ground, the same on all three sites (a test keeps it so): fluted glass. Soft light blooms in the site's own
   accent sit behind vertical reeded glass, kept light so the page's own paper shows through, and the panels stand on
   it with a lit edge and a real shadow. Drawn from the site's tokens in both themes with gradients only: no file is
   fetched, nothing follows the scroll and nothing moves. Loaded after variant.css. A site may set --ground-accent
   (default: its --brand-ink).
   Layers: html::before (the blooms) and body::after (the reeds), both fixed behind everything. */
:root { --ground-accent: var(--brand-ink); --display-weight: 600; }

html { background: var(--paper); }
body { background: transparent; position: relative; font-weight: 520; }
html::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* Text a little heavier than the page had it, so it holds against a textured ground (the font is variable, 400 to 700). */
:is(h1, h2, h3) { font-weight: 620; }
:is(.eyebrow, .brand, .btn, .skip-link) { font-weight: 650; }
header nav a, .theme-switch, .appframe__bar, .appframe .summary :is(dt, dd), label, th, strong, b { font-weight: 580; }
.brand span { font-weight: 470; }
/* The small, quiet text is the thinnest on the page, so it gets the most help: a little heavier and a step closer to the ink, so the reeds do not cut through its strokes. */
:root, :root[data-theme="dark"] { --muted: color-mix(in srgb, var(--ink) 80%, var(--paper)); }
.hero__lead, .note, .assistant-note, .appframe .summary dt, header nav a { font-weight: 550; }

/* The panels stand on the ground: a lit top edge, a close shadow and a long soft one. */
.card, .appframe, .swarm-map, .chat-list {
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 55%, transparent) inset, 0 2px 4px rgba(20, 8, 2, 0.14), 0 22px 44px -22px rgba(20, 8, 2, 0.55);
}
:root[data-theme="dark"] :is(.card, .appframe, .swarm-map, .chat-list) {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 2px 4px rgba(0, 0, 0, 0.5), 0 26px 50px -22px rgba(0, 0, 0, 0.8);
}

/* the blooms and the reeds: each reed is lit on its left edge and falls into shadow on its right; two widths beat against each other */
html::before {
  background:
    radial-gradient(38vw 34vw at 14% 12%, color-mix(in oklab, var(--ground-accent) 34%, transparent), transparent 70%),
    radial-gradient(34vw 30vw at 88% 30%, color-mix(in oklab, var(--ground-accent) 28%, transparent), transparent 70%),
    radial-gradient(40vw 28vw at 40% 92%, color-mix(in oklab, var(--ground-accent) 22%, #ffd9a0), transparent 70%);
}
html body::after {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.06) 3px, rgba(255, 255, 255, 0) 12px, rgba(30, 10, 0, 0.07) 30px, rgba(30, 10, 0, 0.15) 36px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0) 70px, rgba(0, 0, 0, 0.04) 140px);
  -webkit-backdrop-filter: blur(5px) saturate(1.1);
  backdrop-filter: blur(5px) saturate(1.1);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.1);
}
html[data-theme="dark"]::before {
  background:
    radial-gradient(38vw 34vw at 14% 12%, color-mix(in oklab, var(--ground-accent) 30%, transparent), transparent 70%),
    radial-gradient(34vw 30vw at 88% 30%, color-mix(in oklab, var(--ground-accent) 26%, transparent), transparent 70%),
    radial-gradient(40vw 28vw at 40% 92%, color-mix(in oklab, var(--ground-accent) 18%, transparent), transparent 70%);
}
html[data-theme="dark"] body::after {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0, rgba(255, 255, 255, 0.03) 3px, rgba(255, 255, 255, 0) 12px, rgba(0, 0, 0, 0.14) 30px, rgba(0, 0, 0, 0.3) 36px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0) 70px, rgba(0, 0, 0, 0.07) 140px);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.25);
}

/* Prose that sits straight on the glass (the hero text, the paragraphs and lists under a heading, the assistant's notes) gets a soft halo in the
   page colour, so a reed never cuts through a stroke, and the small notes sit close to the ink instead of the quiet grey. */
:is(.hero__text > *, main > section > :is(h2, p, ul, ol), .assistant-note, .voice-status) { text-shadow: 0 0 5px var(--paper), 0 0 14px var(--paper), 0 0 28px var(--paper); }
.assistant-note, .voice-status { color: color-mix(in srgb, var(--ink) 90%, var(--paper)); font-weight: 560; }
/* a button keeps its own crisp label: the halo is for prose only */
.btn, button, [role="button"], .btn-row * { text-shadow: none; }

/* No box behind the hero panel: the spotlight layer that used to light and dot it is hidden, so the panel sits straight on the glass. */
.hero__art.mo-cs > .mo-cs__light { display: none; }
