/* Dualshade effects: every src/css/fx/*.css, joined at build time. */

/* ---- ascii.css */
/*! ascii.css: styles for ascii.js, Wren's character effects (heading decode, image reveal,
character field, skeleton and loader), and .ax-shimmer, a light passing over the text of
work under way. The shimmer and the field are Dualshade's own. The reveal, skeleton and
loader are adapted from ascii-reveal (MIT, Copyright (c) 2026 Quan Hoang); its notice is
in ascii.js. */

/* ------------------------------------------------------------ ascii-text */

/* A heading waiting for JavaScript to decode it stays transparent for a moment, so the
   hero does not show its text and then hide it again. The hold runs out on its own, so
   without the script the heading simply appears a little late, and a script that arrives
   after that leaves an on-screen heading as it is (ascii.js checks for this animation). */
@keyframes ax-hold { from, to { opacity: 0; } }
[data-fx~='ascii-text']:not(.ax-on) { animation: ax-hold 0.6s; }

/* Opacity, not visibility, so assistive tech still reads a held heading. */
.ax-held { opacity: 0; }

/* The real text, kept in place for assistive tech while the copy decodes. */
.ax-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* The decoding copy: its line breaks are the original's, made explicit. */
.ax-vis { white-space: nowrap; -webkit-user-select: none; user-select: none; }
/* One character in a box of its measured width, so nothing around it moves. */
.ax-c { display: inline-block; position: relative; text-indent: 0; }
.ax-c > span { visibility: hidden; }
.ax-c.ax-in > span { visibility: visible; }
.ax-c[data-g]::after {
  content: attr(data-g);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font: 400 0.75em/1 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: 0; text-transform: none;
  opacity: 0.55;
}

/* ------------------------------------------------------------- canvases */
.ax-rel { position: relative; }

/* ascii-img: covers the image box until its cells land. The image itself is not drawn
   while the cover is solid, so no edge of it shows round a rounded corner. */
.ax-cover { position: absolute; display: block; pointer-events: none; }
.ax-under { opacity: 0; }

/* ascii-field: behind the host's content, inside the host's own stacking context. */
.ax-field-on { isolation: isolate; touch-action: pan-y pinch-zoom; }
.ax-field {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  pointer-events: none;
  opacity: 0; transition: opacity 0.9s var(--ease-out, ease-out);
}
.ax-field.ax-ready { opacity: 1; }

.ax-skeleton { display: block; width: 100%; }
.ax-loader { display: inline-block; width: 42px; height: 14px; vertical-align: middle; }
.ax-loader-cv { display: block; width: 100%; height: 14px; }

/* ------------------------------------------------------------- shimmer */
/* A band 45% of the text's width, clear to white to clear, sweeps across the muted text
   every 2 s. The band is clipped to the glyphs. */
.ax-shimmer { color: var(--muted, currentColor); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ax-shimmer {
    color: transparent;
    background-image:
      linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent),
      linear-gradient(var(--muted, currentColor), var(--muted, currentColor));
    background-repeat: no-repeat;
    background-size: 45% 100%, 100% 100%;
    /* With the band at 45% of the width, -81.82% puts it just left of the text and
       181.82% just past its right edge. */
    background-position: -81.82% 0, 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    animation: ax-shimmer 2s linear infinite;
  }
}
@keyframes ax-shimmer {
  from { background-position: -81.82% 0, 0 0; }
  to { background-position: 181.82% 0, 0 0; }
}

/* ------------------------------------------------- lite and reduced motion */
html.lite [data-fx~='ascii-text'] { animation: none; }
html.lite .ax-held,
html.lite .ax-under { opacity: 1; }
html.lite .ax-field,
html.lite .ax-cover { display: none; }
html.lite .ax-shimmer {
  animation: none; background: none; color: var(--muted, currentColor);
}

@media (prefers-reduced-motion: reduce) {
  [data-fx~='ascii-text'] { animation: none; }
  .ax-held, .ax-under { opacity: 1; }
  .ax-cover { display: none; }
  .ax-field { transition: none; }
  .ax-shimmer { animation: none; background: none; color: var(--muted, currentColor); }
}

/* ---- dither-veil.css */
/*! Dither veil. Places the canvas that dither-veil.js draws over the img it
replaces (the marble hand in the home about section) and swaps the two once the
canvas has drawn its first frame. Under html.lite and reduced motion the canvas never
shows and the img, with the site's own luminance mask, is the page.

Ported from React Bits DitherVeil (github.com/DavidHDev/react-bits).
MIT License with Commons Clause, Copyright (c) 2026 David Haz

MIT + Commons Clause License Condition v1.0

Copyright (c) 2026 David Haz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, and distribute the Software as part of an
application, website, or product, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Commons Clause Restriction

You may use this Software, including for any commercial purpose, so long as you do
not sell, sublicense, or redistribute the components themselves-whether alone, in a
bundle, or as a ported version.

The same restriction covers the React Bits tools (Background Studio, Texture Lab,
Shape Magic, Center Stage, Sound Lab and any tools added later) and the sounds in the
sound library. You may not sell, sublicense, or redistribute the tools or the sounds
themselves, or offer the tools or a substantially similar copy of them as a hosted
service-whether alone, in a bundle, or as a ported version.

What you make with the tools is yours to use. You can use exported code, images,
videos, and audio files in any personal or commercial application, website, or
product, including paid ones. You may not sell or redistribute the exports on their
own, either individually or as the product itself, such as a sound, texture,
background, or template pack.

No Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/* The script sizes and places the canvas on the img's box. Hidden until it has
   drawn, so a blank drawing buffer never shows. */
.dv-canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  max-width: none;
  opacity: 0;
  pointer-events: none;
}

/* Horizontal drags paint the trail; vertical ones still scroll the page. */
[data-fx~='dither-veil'] { touch-action: pan-y; }

/* The canvas draws the host's luminance key itself, so the host's mask comes off
   with the img: under that soft mask the ink dots would fade to grey. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.lite) .dv-on > .dv-canvas { opacity: 1; }
  html:not(.lite) .dv-on img { opacity: 0; }
  html:not(.lite) .dv-on { -webkit-mask-image: none; mask-image: none; }
}

html.lite .dv-canvas { display: none; }
@media (prefers-reduced-motion: reduce) {
  .dv-canvas { display: none; }
}

/* ---- fluid-glass.css */
/*! Fluid glass canvas for fluid-glass.js (the home hero: the statue on the void
   under flat, drifting panes of chromatic glass). Written for dualshade.xyz. */

/* The canvas is the stage's first child, under the plate. It stays hidden until
   the module has drawn a real frame; then the plate fades off a canvas that
   already shows the same picture, so the swap is a cross-fade between identical
   frames, not a flash. */
.fg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  visibility: hidden;
  pointer-events: none;
}
.hero-stage.fg-on > .fg-canvas { visibility: visible; }
.hero-stage.fg-on .hero-plate {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
/* Handing back on a device too slow for the glass: the last frame stays while the
   plate fades in over it, then the canvas goes. */
.hero-stage.fg-off > .fg-canvas { visibility: visible; }
.hero-stage.fg-off .hero-plate { transition: opacity 0.6s var(--ease-out); }

/* The module never runs here; this only guards a canvas left behind. */
html.lite .fg-canvas { display: none; }
html.lite .hero-stage.fg-on .hero-plate { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .fg-canvas { display: none; }
  .hero-stage.fg-on .hero-plate { opacity: 1; }
}

/* ---- glass-surface.css */
/*! Glass surface. The look of the .gs liquid-glass panes: the about tiles, the Wren
demo panel and glass pills. Plain .gs is the finished, frosted pane and works in every
browser with no JavaScript: a blurred, slightly saturated backdrop, a tint of the
section's own background, a 135 degree sheen, a lit rim and a hairline, all drawn from
the section's tokens, so the same pane reads on paper and on void. glass-surface.js
adds .gs-on where Chromium can refract: the rim then bends the backdrop instead, and
the frosted middle moves into the filter so the rim can stay clear.
Everything is painted on the pane itself (backgrounds and shadows, no pseudo-elements
and no extra children), so a .gs can be any element without clashing with its own
styles. Load after site.css. Do not put .gs and the site's .glass on one element.

Ported from React Bits GlassSurface (github.com/DavidHDev/react-bits).
MIT License with Commons Clause, Copyright (c) 2026 David Haz

MIT + Commons Clause License Condition v1.0

Copyright (c) 2026 David Haz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, and distribute the Software as part of an
application, website, or product, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Commons Clause Restriction

You may use this Software, including for any commercial purpose, so long as you do
not sell, sublicense, or redistribute the components themselves-whether alone, in a
bundle, or as a ported version.

The same restriction covers the React Bits tools (Background Studio, Texture Lab,
Shape Magic, Center Stage, Sound Lab and any tools added later) and the sounds in the
sound library. You may not sell, sublicense, or redistribute the tools or the sounds
themselves, or offer the tools or a substantially similar copy of them as a hosted
service-whether alone, in a bundle, or as a ported version.

What you make with the tools is yours to use. You can use exported code, images,
videos, and audio files in any personal or commercial application, website, or
product, including paid ones. You may not sell or redistribute the exports on their
own, either individually or as the product itself, such as a sound, texture,
background, or template pack.

No Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/* Shade tokens. Declared on the shade scopes rather than as `[data-shade] .gs`, so a
   pane always takes the nearest shade, even inside a section of the other one. The
   tint and hairlines come from the site's own --bg and --hair tokens; the rest is how
   much white light the glass catches, which is stronger on paper than on void.
   Text first: the wash behind the content is sized so --ink keeps 4.5:1 over the
   worst backdrop, solid black under paper glass or solid white marble under void
   glass, sheen and pointer light included. --gs-tint is that wash on the frosted
   pane. With refraction, --gs-tint-on tints the whole pane lightly and --gs-core
   (read by glass-surface.js) adds the rest behind the content only, so the rim stays
   clear: 1 - (1 - .14)(1 - .5) = 57% on paper, 1 - (1 - .2)(1 - .54) = 63% on void.
   On void the backdrop is also dimmed, which is what dark glass does anyway. */
:root,
[data-shade='light'] {
  --gs-tint: 56%;
  --gs-tint-on: 14%;
  --gs-core: 0.5;
  --gs-bright: 1.04;
  --gs-line: var(--hair);
  --gs-line-soft: rgba(17, 17, 20, 0.07);
  --gs-glint: rgba(255, 255, 255, 0.85);
  --gs-glint-low: rgba(255, 255, 255, 0.4);
  --gs-sheen: rgba(255, 255, 255, 0.42);
  --gs-sheen-low: rgba(255, 255, 255, 0.18);
  --gs-bloom: rgba(255, 255, 255, 0.3);
  --gs-drop: rgba(17, 17, 26, 0.06);
  --gs-lamp-a: 0.42;
}
[data-shade='dark'] {
  --gs-tint: 65%;
  --gs-tint-on: 20%;
  --gs-core: 0.54;
  --gs-bright: 0.84;
  --gs-line: var(--hair-strong);
  --gs-line-soft: rgba(246, 246, 247, 0.12);
  --gs-glint: rgba(255, 255, 255, 0.3);
  --gs-glint-low: rgba(255, 255, 255, 0.08);
  --gs-sheen: rgba(255, 255, 255, 0.08);
  --gs-sheen-low: rgba(255, 255, 255, 0.05);
  --gs-bloom: rgba(255, 255, 255, 0.08);
  --gs-drop: rgba(0, 0, 0, 0.32);
  --gs-lamp-a: 0.07;
}

/* --------------------------------------------------------------- frosted */
.gs {
  --gs-x: 30%;
  --gs-y: 0%;
  --gs-lit: 0;
  border-radius: var(--gs-radius, 20px);
  background:
    radial-gradient(circle var(--gs-lamp-r, 200px) at var(--gs-x) var(--gs-y),
      rgba(255, 255, 255, calc(var(--gs-lit) * var(--gs-lamp-a))), transparent 70%),
    linear-gradient(135deg, var(--gs-sheen) 0%, transparent 42%, transparent 64%, var(--gs-sheen-low) 100%),
    linear-gradient(color-mix(in srgb, var(--bg) var(--gs-tint), transparent) 0 0);
  -webkit-backdrop-filter: blur(14px) saturate(1.45) brightness(var(--gs-bright));
  backdrop-filter: blur(14px) saturate(1.45) brightness(var(--gs-bright));
  box-shadow:
    inset 1px 1px 0 0 var(--gs-glint),
    inset -1px -1px 0 0 var(--gs-glint-low),
    inset 0 0 2px 1px var(--gs-line),
    inset 0 0 12px 3px var(--gs-bloom),
    0 4px 16px var(--gs-drop),
    0 8px 24px var(--gs-drop),
    0 16px 56px var(--gs-drop);
}

/* Presets. Layout defaults sit in :where() so whatever class the pane also carries
   (.tile, .wd-panel, .btn) keeps its own padding and size. */
.gs[data-gs='pill'] {
  --gs-radius: 999px;
  --gs-lamp-r: 90px;
  color: var(--ink);
}
:where(.gs[data-gs='pill']) {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 44px; padding: 0 20px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
}
:where(.gs[data-gs='pane']) { padding: 22px 24px; }

/* ----------------------------------------------------------- refraction */
/* Only with motion allowed and outside html.lite, so a stray .gs-on can never put the
   lens back in a mode that asked for the still page. The rim does the work here, so
   the tint over the whole pane is lighter and the sheen fainter than on frost; the
   filter's core supplies the frost and wash behind the content. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.lite) .gs.gs-on {
    background:
      radial-gradient(circle var(--gs-lamp-r, 200px) at var(--gs-x) var(--gs-y),
        rgba(255, 255, 255, calc(var(--gs-lit) * var(--gs-lamp-a))), transparent 70%),
      linear-gradient(135deg, var(--gs-sheen-low) 0%, transparent 38%),
      linear-gradient(color-mix(in srgb, var(--bg) var(--gs-tint-on), transparent) 0 0);
    -webkit-backdrop-filter: var(--gs-filter) saturate(1.2) brightness(var(--gs-bright));
    backdrop-filter: var(--gs-filter) saturate(1.2) brightness(var(--gs-bright));
    box-shadow:
      inset 1px 1px 0 0 var(--gs-glint),
      inset 0 0 2px 1px var(--gs-line),
      inset 0 0 10px 4px var(--gs-line-soft),
      0 4px 16px var(--gs-drop),
      0 8px 24px var(--gs-drop),
      0 16px 56px var(--gs-drop);
  }
}

/* ------------------------------------------------------------- fallbacks */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gs { --gs-tint: 78%; }
}

/* html.lite keeps no continuously composited surfaces: a plain tinted card. */
html.lite .gs {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 1px var(--hair), 0 12px 40px var(--gs-drop);
}

@media (prefers-reduced-transparency: reduce) {
  .gs,
  html:not(.lite) .gs.gs-on {
    background: var(--bg-lift);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: inset 0 0 0 1px var(--hair-strong);
  }
}

/* ---- liquid-glass-logo.css */
/*! Liquid glass logo reveal: places the canvas that liquid-glass-logo.js lays over the
Wren mark, and hides the mark's <img> only while that canvas is drawing. Part of the
site's port of the ReactDrops Liquid Glass Logo, Copyright (c) 2026 ReactDrops, under
the ReactDrops Component License 1.0 (full text in liquid-glass-logo.js). */

/* The host positions the canvas, which overhangs the mark on every side so the plate,
   the wave leaving its rim and the bloom have room. The script sets its box. */
.lgl { position: relative; }
.lgl-canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  /* site.css caps canvases at their parent's width; this one is wider on purpose. */
  max-width: none;
  pointer-events: none;
  opacity: 0;
}

/* One swap in one paint each way: a transition would show the mark twice. */
.lgl.lgl-on > .lgl-canvas { opacity: 1; }
.lgl.lgl-on > img { opacity: 0; transition: none; }

/* The static mark is the finished state. */
html.lite .lgl-canvas { display: none; }
html.lite .lgl.lgl-on > img { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .lgl-canvas { display: none; }
  .lgl.lgl-on > img { opacity: 1; }
}

/* ---- scroll-expand.css */
/*! Scroll expand for scroll-expand.js (the home Wren chapter).
   Ported from React Bits ScrollExpand (github.com/DavidHDev/react-bits).
   MIT License with Commons Clause, Copyright (c) 2026 David Haz. The full notice is
   in scroll-expand.js. */

/* Registered, so the eased values are computed once on the section as plain numbers
   instead of being re-parsed on every element that uses them. */
@property --sx { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --sx-e { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --sx-t { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --sx-o { syntax: '<number>'; inherits: true; initial-value: 1; }

/* The resting shape of the closed window, and how long the pin lasts (in screens). */
.sx {
  --sx-w0: 42%;
  --sx-h0: 58%;
  --sx-r0: 24px;
  --sx-z0: 1.35;
  --sx-len: 2.2;
  position: relative;
}

/* Default: the finished section. No pin, the frame full width, the copy over the
   media. This is what visitors see without JavaScript, on html.lite and with
   reduced motion, and it equals the last frame of the animation. */
.sx-frame {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.sx-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transform-origin: center;
}
/* The scrim fades the media toward the section's own background under the copy. */
.sx-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--bg) 75%, transparent),
    color-mix(in srgb, var(--bg) 10%, transparent) 45%,
    color-mix(in srgb, var(--bg) 35%, transparent));
  opacity: .45;
}
/* The copy lets the pointer through to the media (the character field's wake),
   except on what can be clicked or focused. */
.sx-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(72px, 12vh, 140px) var(--pad, 24px);
  pointer-events: none;
}
.sx-overlay :is(a, button, input, select, textarea, label, summary, [tabindex]) { pointer-events: auto; }

@media (max-width: 720px) {
  .sx { --sx-w0: 76%; --sx-h0: 50%; --sx-r0: 18px; --sx-len: 1.7; }
}

/* Live: the script has added .sx-on and writes --sx from the scroll. Off on
   html.lite, under reduced motion, and on screens too short to hold the copy pinned. */
@media (prefers-reduced-motion: no-preference) and (min-height: 520px) {
  html:not(.lite) .sx.sx-on {
    /* smoothstep(0, 1, sx) opens the frame; smoothstep(.68, 1, sx) brings the copy in. */
    --sx-e: calc(var(--sx) * var(--sx) * (3 - 2 * var(--sx)));
    --sx-t: clamp(0, (var(--sx) - .68) / .32, 1);
    --sx-o: calc(var(--sx-t) * var(--sx-t) * (3 - 2 * var(--sx-t)));
  }
  /* A reader tabbing into the copy gets it open, wherever the scroll is. */
  html:not(.lite) .sx.sx-on:focus-within { --sx: 1 !important; }
  /* A link to the section (#wren) lands nine tenths into the pin, on the open frame
     with the copy in, not on the closed window where the pin starts. */
  html:not(.lite) .sx.sx-on {
    scroll-margin-top: calc((1 - var(--sx-len)) * 90vh);
    scroll-margin-top: calc((1 - var(--sx-len)) * 90svh);
  }

  html:not(.lite) .sx-on .sx-track {
    height: calc(var(--sx-len) * 100vh);
    height: calc(var(--sx-len) * 100svh);
  }
  html:not(.lite) .sx-on .sx-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
  }
  /* The frame keeps its full size and is clipped, so the media never re-lays out
     (or resizes a canvas) while it opens. */
  html:not(.lite) .sx-on .sx-frame {
    position: absolute;
    inset: 0;
    min-height: 0;
    clip-path: inset(
      calc((100% - var(--sx-h0)) / 2 * (1 - var(--sx-e)))
      calc((100% - var(--sx-w0)) / 2 * (1 - var(--sx-e)))
      round calc(var(--sx-r0) * (1 - var(--sx-e))));
    will-change: clip-path;
  }
  html:not(.lite) .sx-on .sx-media {
    transform: scale(calc(var(--sx-z0) - (var(--sx-z0) - 1) * var(--sx-e)));
    will-change: transform;
  }
  html:not(.lite) .sx-on .sx-frame::after { opacity: calc(.45 * var(--sx-e)); }
  html:not(.lite) .sx-on .sx-overlay {
    position: absolute;
    inset: 0;
    opacity: var(--sx-o);
    transform: translate3d(0, calc(18px * (1 - var(--sx-o))), 0);
    will-change: opacity, transform;
  }
}

/* ---- split-flap.css */
/*! Split flap tiles for split-flap.js (work index names, the Wren status board).
   Ported from React Bits SplitFlapText (github.com/DavidHDev/react-bits).
   MIT License with Commons Clause, Copyright (c) 2026 David Haz. The full notice is
   in split-flap.js. */

/* Every size is in em of the host's font, so a tile row sits at whatever size the
   heading or label around it is set to. Colours come from the section's shade:
   a tile is the ink washed into the background, the glyph is the host's colour. */
.flap-row {
  --flap-tile: color-mix(in srgb, var(--ink) 9%, var(--bg));
  --flap-hinge: color-mix(in srgb, var(--bg) 70%, #000);
  --flap-drop: .32;
  --flap-glyph-shadow: 0 .025em 0 rgb(255 255 255 / .14), 0 .08em .16em rgb(0 0 0 / .4);
  display: inline-flex;
  gap: .07em;
  vertical-align: middle;
  font-family: var(--flap-font, ui-monospace, 'SF Mono', Menlo, monospace);
  font-weight: 600;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: pre;
  -webkit-user-select: none;
  user-select: none;
}
/* Paper: lighter cast shadow, no glow under dark glyphs. */
[data-shade='light'] .flap-row {
  --flap-tile: color-mix(in srgb, var(--ink) 7%, var(--bg));
  --flap-hinge: color-mix(in srgb, var(--bg) 62%, var(--ink));
  --flap-drop: .12;
  --flap-edge: .08;
  --flap-glyph-shadow: none;
}

.flap-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.flap-tile {
  position: relative;
  flex: none;
  width: .78em;
  height: 1.08em;
  overflow: hidden;
  border-radius: clamp(2px, .1em, 8px);
  background: var(--flap-tile);
  box-shadow:
    inset 0 -.05em .1em rgb(0 0 0 / .3),
    0 .12em .3em rgb(0 0 0 / var(--flap-drop));
  perspective: 10em;
  isolation: isolate;
}
/* The hinge: a hairline of the page showing through the split, fading at the edges. */
.flap-tile::before {
  content: '';
  position: absolute;
  z-index: 8;
  top: calc(50% - .5px);
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--flap-hinge) 18% 82%, transparent);
  pointer-events: none;
}
.flap-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 9;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06), inset 0 0 0 1px rgb(0 0 0 / var(--flap-edge, .14));
  pointer-events: none;
}

.flap-half,
.flap-leaf {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  backface-visibility: hidden;
}
.flap-top,
.flap-front {
  top: 0;
  background: linear-gradient(180deg, rgb(255 255 255 / .07), transparent 34%), var(--flap-tile);
}
.flap-bot,
.flap-back {
  bottom: 0;
  background: linear-gradient(0deg, rgb(255 255 255 / .05), transparent 38%),
    color-mix(in srgb, var(--flap-tile) 93%, #000);
}

/* Each half shows half of a full-height glyph box. */
.flap-ch {
  position: absolute;
  left: 0;
  width: 100%;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: var(--flap-glyph-shadow);
}
.flap-top .flap-ch,
.flap-front .flap-ch { top: 0; }
.flap-bot .flap-ch,
.flap-back .flap-ch { bottom: 0; }

/* The two leaves of one turn: the old top half falls forward and darkens, then the
   new bottom half swings down and brightens. 120ms, in step with FLIP_MS. */
.flap-leaf {
  z-index: 6;
  will-change: transform, filter;
}
.flap-front {
  transform-origin: center bottom;
  animation: flap-front 120ms linear both;
}
.flap-back {
  transform-origin: center top;
  transform: rotateX(90deg);
  animation: flap-back 120ms linear both;
}
@keyframes flap-front {
  0% { transform: rotateX(0deg); filter: brightness(1.08); animation-timing-function: cubic-bezier(.55, .055, .675, .19); }
  50%, 100% { transform: rotateX(-90deg); filter: brightness(.52); }
}
@keyframes flap-back {
  0%, 50% { transform: rotateX(90deg); filter: brightness(.58); animation-timing-function: cubic-bezier(.215, .61, .355, 1); }
  100% { transform: rotateX(0deg); filter: brightness(1); }
}

/* Small rows (status labels): taller tiles, no bevels or glyph shadow, full ink (a dim
   glyph on a tile does not read at 12px), and the hinge drawn under the glyph instead
   of through it, so a label still reads as letters rather than texture. */
.flap-sm .flap-row {
  --flap-tile: color-mix(in srgb, var(--ink) 8%, var(--bg));
  --flap-hinge: color-mix(in srgb, var(--flap-tile) 45%, var(--bg));
  gap: max(2px, .1em);
  color: var(--ink);
}
.flap-sm .flap-tile {
  width: .82em;
  height: 1.4em;
  border-radius: max(1.5px, .12em);
  box-shadow: none;
}
.flap-sm .flap-tile::before,
.flap-sm .flap-tile::after { display: none; }
.flap-sm .flap-top,
.flap-sm .flap-front { background: linear-gradient(0deg, var(--flap-hinge) .5px, var(--flap-tile) .5px); }
.flap-sm .flap-bot,
.flap-sm .flap-back { background: linear-gradient(180deg, var(--flap-hinge) .5px, var(--flap-tile) .5px); }
.flap-sm .flap-ch { text-shadow: none; }

html.lite .flap-leaf { display: none; }
@media (prefers-reduced-motion: reduce) {
  .flap-leaf { display: none; }
}

/* ---- tech-text.css */
/*! tech-text.css: the canvas over the footer wordmark (.foot-word.tt) and the
swap that hides the DOM word once the canvas has drawn. Part of the React Bits
TechText port (github.com/DavidHDev/react-bits, MIT License with Commons Clause,
Copyright (c) 2026 David Haz); the full notice is in tech-text.js. */

/* Over the host's own box, so the word is cut by the same edges as before. */
.tt-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Only mouse and pen get the canvas; the host itself stays pointer-events: none.
   pan-y keeps vertical scrolling for a stray touch on a hybrid device. */
.tt-live .tt-canvas {
  pointer-events: auto;
  touch-action: pan-y;
}

/* The DOM word keeps its layout (the canvas measures it) but no longer paints,
   and its SVG displacement filter stops costing anything. */
.tt.tt-on .foot-word-in {
  visibility: hidden;
  filter: none;
}

html.lite .tt-canvas { display: none; }
html.lite .tt.tt-on .foot-word-in { visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .tt-canvas { display: none; }
  .tt.tt-on .foot-word-in { visibility: visible; }
}

/* ---- wren-demo.css */
/*! wren-demo.css: the small illustration of Wren at work on the /wren/ page (wren-demo.js).
Without the script it is the finished picture, the request and the answer; the status line
and the skeleton show only while the loop runs. Dualshade's own. */

.wd { margin: 0; width: 100%; max-width: 30rem; }

/* The request on top; below it one cell that the answer, and while the work runs the
   status line and skeleton, share, so the panel keeps its height through the loop. */
.wd-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* status line (20) + gap (12) + three skeleton lines (53) */
  grid-template-rows: auto minmax(85px, auto);
  row-gap: 18px;
  padding: 22px 24px 24px;
  border-radius: 20px;
}

.wd-prompt {
  grid-row: 1;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hair);
  font-size: 16px; line-height: 1.45; font-weight: 600; letter-spacing: -0.012em;
  color: var(--ink);
}
.wd-status, .wd-skeleton, .wd-answer { grid-row: 2; grid-column: 1; align-self: start; }
.wd-status {
  display: none; align-items: center; gap: 10px;
  font-size: 13px; line-height: 20px; color: var(--muted);
  /* The pane can sit over white marble, where --muted falls under 4.5:1 even
     through the frost. The shimmer draws its base from --muted, so lift it here. */
  --muted: color-mix(in srgb, var(--ink) 80%, transparent);
}
.wd-loader { display: inline-block; flex: 0 0 auto; width: 42px; height: 14px; }
.wd-skeleton { display: none; margin-top: 32px; }
.wd-answer { font-size: 15px; line-height: 1.55; color: var(--ink); }

/* The loop's states, set by wren-demo.js. */
.wd.wd-loading .wd-status { display: flex; }
.wd.wd-loading .wd-skeleton { display: block; }
/* Opacity, not visibility, so assistive tech keeps the answer through the loop. */
.wd.wd-wait .wd-answer { opacity: 0; }
.wd.wd-clear .wd-type,
.wd.wd-clear .wd-answer { opacity: 0; transition: opacity 0.35s var(--ease, ease); }

.wd-rest { color: transparent; }
/* No width of its own, so the line never moves under it. A plain inline, drawn as a
   border, not an inline-block: an atomic inline is a place the line may break, even
   inside a word, and a half-typed word would sit on the wrong line until it jumped. */
.wd-caret {
  display: none; border-left: 2px solid currentColor; margin-right: -2px;
  animation: wd-blink 1.05s steps(1) infinite;
}
.wd.wd-typing .wd-caret { display: inline; }
@keyframes wd-blink { 50% { opacity: 0; } }

.wd-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

@media (max-width: 520px) {
  .wd-panel { padding: 18px 18px 20px; border-radius: 16px; }
  .wd-prompt { font-size: 15px; }
  .wd-answer { font-size: 14.5px; }
}

html.lite .wd-status,
html.lite .wd-skeleton { display: none; }
html.lite .wd-answer,
html.lite .wd-type { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .wd-caret { animation: none; }
}
