/**
 * _variables.css — Global design tokens (Tier 1).
 *
 * @layer      variables
 * @requires   _layers.css, _typography.css (--fluid, which --spacing reads)
 * @uses       light-dark() — theme roles re-resolve per color-scheme (system,
 *             data-theme="dark" | "light"); tokens stay unregistered on purpose
 * @uses       oklch(from …) — shade/tint scales and shadow alphas
 * @uses       color-mix() — focus ring (--color-ring)
 * @uses       interpolate-size: allow-keywords — discrete block-size animations (details, etc.)
 * @uses       @media (not (hover: hover)) — --_touch-min carries --spacing-touch-min (44px) to
 *             the primitives on touch screens; 0px on a mouse
 * @tokens     Global token tiers (the root override hooks) — Theme roles, brand
 *             scales (50–950), grayscale/shade/tint, typography, spacing (incl. the touch floor), radius,
 *             layout, effects, animations. Sized families run 2xs–2xl. Re-declare any of these to re-skin the
 *             whole system; see CONVENTIONS.styles.md.
 */

/* Animations */

@property --default-transition-duration {
  syntax: "<time>";
  inherits: true;
  initial-value: 0s;
}

/* --ui-reveal-duration / --ui-reveal-wait are intentionally unregistered:
 * reveal.css resolves them with var(--ui-reveal-*, var(--ui-reveal-global-*)),
 * and a registered property is never guaranteed-invalid, which would make that
 * fallback dead. */

@property --spring-duration {
  syntax: "<time>";
  inherits: true;
  initial-value: 0s;
}

@property --decoration-offset {
  syntax: "<length>";
  inherits: true;
  initial-value: 1px;
}

/* Layout width tokens (--layout-*) are generated into _breakpoints.css. */
@layer variables {
  :root {
    /* theme scopes at the bottom of the file pin color-scheme */
    color-scheme: light dark;

    /* allows animating to/from block-size: auto */
    interpolate-size: allow-keywords;

    /* ==========================================================================
    * Theme — light/dark via light-dark(); follows color-scheme (system + data-theme)
    * ========================================================================== */

    /* base */
    --color-background: light-dark(var(--color-white), var(--color-neutral-900));
    --color-foreground: light-dark(var(--color-neutral-900), var(--color-white));
    --color-border: light-dark(var(--color-shade-50), var(--color-tint-200));
    --color-border-foreground: light-dark(var(--color-tint-950), var(--color-shade-500));
    --color-card: light-dark(var(--color-white), var(--color-neutral-950));
    --color-card-foreground: light-dark(var(--color-neutral-900), var(--color-white));
    --color-popover: light-dark(var(--color-white), var(--color-neutral-950));
    --color-popover-foreground: light-dark(var(--color-neutral-900), var(--color-white));
    --color-input: light-dark(var(--color-neutral-50), var(--color-neutral-950));
    --color-input-foreground: light-dark(var(--color-neutral-900), var(--color-white));

    /* selection */
    --color-selection: var(--color-primary);
    --color-selection-foreground: var(--color-primary-foreground);

    /* overlay */
    --color-muted: light-dark(var(--color-shade-50), var(--color-tint-100));
    --color-muted-foreground: light-dark(var(--color-shade-600), var(--color-tint-700));
    --color-faded: light-dark(var(--color-tint-400), var(--color-shade-100));
    --color-faded-foreground: light-dark(var(--color-tint-700), var(--color-shade-700));

    /* brand */
    --color-primary: light-dark(var(--color-primary-950), var(--color-primary-50));
    --color-primary-foreground: light-dark(var(--color-white), var(--color-primary-950));
    --color-secondary: light-dark(var(--color-secondary-950), var(--color-secondary-50));
    --color-secondary-foreground: light-dark(var(--color-white), var(--color-secondary-950));
    --color-tertiary: light-dark(var(--color-tertiary-950), var(--color-tertiary-50));
    --color-tertiary-foreground: light-dark(var(--color-white), var(--color-tertiary-950));
    --color-ring: var(--color-primary);
    /* the shadow color every --shadow-* token is tinted with (alpha comes from the token) */
    --color-shadow: var(--color-black);
    /* the light direction every --shadow-* token is cast from (0deg down, clockwise);
       --shadow-angle turns it for an element and its subtree */
    --default-shadow-angle: 0deg;
    /* multipliers on every --shadow-* token and --elevation: intensity scales the
       alpha (2 doubles it), blur the softness, distance how far each layer falls
       along the light; 1 leaves the shadows unchanged */
    --default-shadow-intensity: 1;
    --default-shadow-blur: 1;
    --default-shadow-distance: 1;

    /* status: each role is a pale surface, and its -foreground the same hue at
       AA contrast on that surface. -foreground is also the ink for status text,
       borders, rings, and accents that sit on other surfaces. */
    --color-info: light-dark(oklch(0.955 0.02 242), oklch(0.33 0.06 242));
    --color-info-foreground: light-dark(oklch(0.45 0.105 242), oklch(0.82 0.09 242));
    --color-success: light-dark(oklch(0.955 0.03 164), oklch(0.33 0.055 164));
    --color-success-foreground: light-dark(oklch(0.43 0.085 164), oklch(0.84 0.13 164));
    --color-warning: light-dark(oklch(0.955 0.03 58), oklch(0.34 0.06 58));
    --color-warning-foreground: light-dark(oklch(0.47 0.105 58), oklch(0.86 0.09 58));
    --color-destructive: light-dark(oklch(0.95 0.025 27), oklch(0.33 0.08 27));
    --color-destructive-foreground: light-dark(oklch(0.48 0.17 27), oklch(0.76 0.13 27));

    /* ==========================================================================
    * Corporate — brand color scales (50–950)
    * ========================================================================== */

    /* primary */
    --color-primary-50: oklch(0.985 0 0);
    --color-primary-100: oklch(0.967 0.001 0);
    --color-primary-200: oklch(0.92 0.004 0);
    --color-primary-300: oklch(0.87 0 0);
    --color-primary-400: oklch(0.708 0 0);
    --color-primary-500: oklch(0.556 0 0);
    --color-primary-600: oklch(0.439 0 0);
    --color-primary-700: oklch(0.371 0 0);
    --color-primary-800: oklch(0.269 0 0);
    --color-primary-900: oklch(0.205 0 0);
    --color-primary-950: oklch(0.145 0 0);

    /* secondary */
    --color-secondary-50: oklch(98.5% 0.002 247.839);
    --color-secondary-100: oklch(96.7% 0.003 264.542);
    --color-secondary-200: oklch(92.8% 0.006 264.531);
    --color-secondary-300: oklch(87.2% 0.01 258.338);
    --color-secondary-400: oklch(70.7% 0.022 261.325);
    --color-secondary-500: oklch(55.1% 0.027 264.364);
    --color-secondary-600: oklch(44.6% 0.03 256.802);
    --color-secondary-700: oklch(37.3% 0.034 259.733);
    --color-secondary-800: oklch(27.8% 0.033 256.848);
    --color-secondary-900: oklch(21% 0.034 264.665);
    --color-secondary-950: oklch(13% 0.028 261.692);

    /* tertiary */
    --color-tertiary-50: oklch(0.986 0.002 67.8);
    --color-tertiary-100: oklch(0.96 0.002 17.2);
    --color-tertiary-200: oklch(0.922 0.005 34.3);
    --color-tertiary-300: oklch(0.868 0.007 39.5);
    --color-tertiary-400: oklch(0.714 0.014 41.2);
    --color-tertiary-500: oklch(0.547 0.021 43.1);
    --color-tertiary-600: oklch(0.438 0.017 39.3);
    --color-tertiary-700: oklch(0.367 0.016 35.7);
    --color-tertiary-800: oklch(0.268 0.011 36.5);
    --color-tertiary-900: oklch(0.214 0.009 43.1);
    --color-tertiary-950: oklch(0.147 0.004 49.3);

    /* ==========================================================================
    * Grayscale — neutrals, shade (dim), tint (fade)
    * ========================================================================== */

    /* neutral */
    --color-white: oklch(1 0 0);
    --color-neutral-50: oklch(0.973 0.001 287.31);
    --color-neutral-100: oklch(0.949 0.001 287.28);
    --color-neutral-200: oklch(0.871 0.004 286.58);
    --color-neutral-300: oklch(0.784 0.007 286.38);
    --color-neutral-400: oklch(0.708 0.009 286.28);
    --color-neutral-500: oklch(0.629 0.012 286.12);
    --color-neutral-600: oklch(0.535 0.015 285.91);
    --color-neutral-700: oklch(0.442 0.015 285.82);
    --color-neutral-800: oklch(0.336 0.014 285.66);
    --color-neutral-900: oklch(0.241 0.009 285.7);
    --color-neutral-950: oklch(0.198 0.008 285.68);
    --color-black: oklch(0 0 0);

    /* shade — darkened overlays (derived from neutral-950). The alphas are solved
       for even perceived lightness steps over white, so they don't match the stop
       numbers; browsers composite in gamma-encoded sRGB, where even alpha steps
       look uneven. */
    --color-shade-none: oklch(from var(--color-neutral-950) l c h / 0);
    --color-shade-50: oklch(from var(--color-neutral-950) l c h / 0.065);
    --color-shade-100: oklch(from var(--color-neutral-950) l c h / 0.115);
    --color-shade-200: oklch(from var(--color-neutral-950) l c h / 0.225);
    --color-shade-300: oklch(from var(--color-neutral-950) l c h / 0.335);
    --color-shade-400: oklch(from var(--color-neutral-950) l c h / 0.44);
    --color-shade-500: oklch(from var(--color-neutral-950) l c h / 0.545);
    --color-shade-600: oklch(from var(--color-neutral-950) l c h / 0.645);
    --color-shade-700: oklch(from var(--color-neutral-950) l c h / 0.74);
    --color-shade-800: oklch(from var(--color-neutral-950) l c h / 0.835);
    --color-shade-900: oklch(from var(--color-neutral-950) l c h / 0.92);
    --color-shade-950: oklch(from var(--color-neutral-950) l c h / 0.96);
    --color-shade-full: oklch(from var(--color-neutral-950) l c h / 1);

    /* tint — faded overlays (derived from neutral-50, so a tinted neutral reaches
       dark-mode muted, faded, and input the way it reaches light mode through the
       shades). Solved the same way over the dark background; the curve differs from
       shade's because lightening runs the other way up the same lightness response. */
    --color-tint-none: oklch(from var(--color-neutral-50) l c h / 0);
    --color-tint-50: oklch(from var(--color-neutral-50) l c h / 0.04);
    --color-tint-100: oklch(from var(--color-neutral-50) l c h / 0.085);
    --color-tint-200: oklch(from var(--color-neutral-50) l c h / 0.17);
    --color-tint-300: oklch(from var(--color-neutral-50) l c h / 0.265);
    --color-tint-400: oklch(from var(--color-neutral-50) l c h / 0.36);
    --color-tint-500: oklch(from var(--color-neutral-50) l c h / 0.46);
    --color-tint-600: oklch(from var(--color-neutral-50) l c h / 0.56);
    --color-tint-700: oklch(from var(--color-neutral-50) l c h / 0.67);
    --color-tint-800: oklch(from var(--color-neutral-50) l c h / 0.775);
    --color-tint-900: oklch(from var(--color-neutral-50) l c h / 0.885);
    --color-tint-950: oklch(from var(--color-neutral-50) l c h / 0.945);
    --color-tint-full: oklch(from var(--color-neutral-50) l c h / 1);

    /* ==========================================================================
    * Typography — typefaces, sizes, weights, tracking, leading
    * ========================================================================== */

    /* Credit: Tailwind CSS */
    --font-serif-fallback: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-sans-fallback:
      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial,
      sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono-fallback:
      ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
      monospace;

    /* font-family — re-skin by redeclaring these */
    --font-family-heading: var(--font-sans-fallback);
    --font-family-body: var(--font-sans-fallback);
    --font-family-mono: var(--font-mono-fallback);

    /* OpenType and variant controls per role — CSS initial values; redeclare to
       turn on features (e.g. --font-numeric-body: tabular-nums) */
    --font-feature-heading: normal;
    --font-feature-body: normal;
    --font-kerning-heading: auto;
    --font-kerning-body: auto;
    --font-language-heading: normal;
    --font-language-body: normal;
    --font-size-adjust-heading: none;
    --font-size-adjust-body: none;
    --font-alternates-heading: normal;
    --font-alternates-body: normal;
    --font-caps-heading: normal;
    --font-caps-body: normal;
    --font-east-asian-heading: normal;
    --font-east-asian-body: normal;
    --font-emoji-heading: normal;
    --font-emoji-body: normal;
    --font-ligatures-heading: normal;
    --font-ligatures-body: normal;
    --font-numeric-heading: normal;
    --font-numeric-body: normal;
    --font-position-heading: normal;
    --font-position-body: normal;
    --font-settings-heading: normal;
    --font-settings-body: normal;
    --font-optical-sizing-heading: auto;
    --font-optical-sizing-body: auto;

    /* fluid range — the viewport widths fluid type and spacing grow between;
       below --fluid-min they hold their small end, above --fluid-max their large end */
    --fluid-min: 25rem;
    --fluid-max: 80rem;

    /* typeset — the fluid type scale behind --font-size-*. md is the base; each step above it
       multiplies by the scale (lg = 1 step, xl = 2, … display = 8). The base and
       the scale each grow from -min to -max across the fluid range; the math
       lives in _typography.css. */
    --typeset-base-min: 1rem;
    --typeset-base-max: 1rem;
    --typeset-scale-min: 1.125;
    --typeset-scale-max: 1.25;

    /* sizes below md — multiples of the base at each end of the fluid range */
    --typeset-sm-min: 0.8;
    --typeset-sm-max: 0.8;
    --typeset-xs-min: 0.64;
    --typeset-xs-max: 0.64;
    --typeset-2xs-min: 0.5787;
    --typeset-2xs-max: 0.5787;

    /* font-weight */
    --font-weight-body: 400;
    --font-weight-heading: 600;
    --font-weight-strong: 500;
    --font-weight-eyebrow: 600;

    /* letter spacing modifiers — additive shifts, lengths with a unit (a bare 0 would
       invalidate the calc() below). --tracking-modifier moves every role; set the
       heading or body one to move just that group. */
    --tracking-modifier: 0em;
    --tracking-heading-modifier: var(--tracking-modifier);
    --tracking-body-modifier: var(--tracking-modifier);

    /* letter-spacing */
    --tracking-display: calc(-0.025em + var(--tracking-heading-modifier));
    --tracking-h1: calc(-0.025em + var(--tracking-heading-modifier));
    --tracking-h2: calc(-0.025em + var(--tracking-heading-modifier));
    --tracking-h3: calc(-0.025em + var(--tracking-heading-modifier));
    --tracking-h4: calc(-0.015em + var(--tracking-heading-modifier));
    --tracking-h5: calc(-0.01em + var(--tracking-heading-modifier));
    --tracking-h6: calc(-0.005em + var(--tracking-heading-modifier));
    --tracking-2xl: calc(-0.01em + var(--tracking-body-modifier));
    --tracking-xl: calc(0em + var(--tracking-body-modifier));
    --tracking-lg: calc(0em + var(--tracking-body-modifier));
    --tracking-md: calc(0em + var(--tracking-body-modifier));
    --tracking-sm: calc(0em + var(--tracking-body-modifier));
    --tracking-xs: calc(0em + var(--tracking-body-modifier));
    --tracking-2xs: calc(0em + var(--tracking-body-modifier));
    --tracking-eyebrow: calc(0.05em + var(--tracking-body-modifier));

    /* leading multipliers */
    --leading-heading-multiplier: 1;
    --leading-body-multiplier: 1;

    /* leading */
    --leading-display: calc(0.95 * var(--leading-heading-multiplier));
    --leading-h1: calc(0.95 * var(--leading-heading-multiplier));
    --leading-h2: calc(0.95 * var(--leading-heading-multiplier));
    --leading-h3: calc(1 * var(--leading-heading-multiplier));
    --leading-h4: calc(1 * var(--leading-heading-multiplier));
    --leading-h5: calc(1 * var(--leading-heading-multiplier));
    --leading-h6: calc(1 * var(--leading-heading-multiplier));
    --leading-2xl: calc(1.25 * var(--leading-body-multiplier));
    --leading-xl: calc(1.5 * var(--leading-body-multiplier));
    --leading-lg: calc(1.5 * var(--leading-body-multiplier));
    --leading-md: calc(1.6 * var(--leading-body-multiplier));
    --leading-sm: calc(1.5 * var(--leading-body-multiplier));
    --leading-xs: calc(1.5 * var(--leading-body-multiplier));
    --leading-2xs: calc(1.5 * var(--leading-body-multiplier));
    /* line-height */
    --leading-eyebrow: calc(1.2 * var(--leading-body-multiplier));

    /* paragraph-spacing — the space above a block in prose; the multiplier
       loosens or tightens every step at once (--ui-prose-flow scales it again per prose) */
    --paragraph-spacing-multiplier: 1;

    --paragraph-spacing-display: calc(3.5rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-h1: calc(3.5rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-h2: calc(3rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-h3: calc(3rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-h4: calc(2rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-h5: calc(2rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-h6: calc(2rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-2xl: calc(1rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-xl: calc(0.75rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-lg: calc(0.75rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-md: calc(0.75rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-sm: calc(0.5rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-xs: calc(0.5rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-2xs: calc(0.5rlh * var(--paragraph-spacing-multiplier));
    --paragraph-spacing-eyebrow: calc(1rlh * var(--paragraph-spacing-multiplier));

    /* ==========================================================================
    * Spacing — the --spacing unit and the --space-* scale
    * ========================================================================== */

    /* touch targets — the minimum tappable box on a touch screen (WCAG 2.5.8 AA is 24px;
       Apple's 44pt is the AAA figure). Primitives read --_touch-min, which is 0 unless the
       primary pointer cannot hover (a touch screen), so mouse layouts keep their sizes.
       Visible controls (buttons, fields, tabs) grow to it; small indicators (checkbox,
       radio, switch) extend an invisible ::after hit area instead (the slider thumb grows
       its own box), and a grown control's
       inline padding gains half of what its height grew. 0px opts out of all of it. */
    --spacing-touch-min: 44px;
    --_touch-min: 0px;

    /* the smallest a checkbox, radio, switch, slider thumb, or tag remove button gets,
       however small --spacing is */
    --spacing-control-min: 1rem;

    /* the utility scale unit: `--p: 4` is 4 × --spacing. Fluid between its
       min and max across the fluid range (--fluid comes from _typography.css);
       set them equal, or pin `:root { --spacing: 0.25rem }`, for a fixed scale. */
    --spacing-min: 0.225rem;
    --spacing-max: 0.25rem;
    --spacing: calc(var(--spacing-min) + var(--fluid) * (var(--spacing-max) - var(--spacing-min)));

    /* named spacing scale — for CSS and component hooks. In style utilities write the
       number instead (`--gap: 6`, not `var(--space-md)`). */
    --space-2xs: calc(var(--spacing) * 1);
    --space-xs: calc(var(--spacing) * 2);
    --space-sm: calc(var(--spacing) * 4);
    --space-md: calc(var(--spacing) * 6);
    --space-lg: calc(var(--spacing) * 11);
    --space-xl: calc(var(--spacing) * 24);
    --space-2xl: calc(var(--spacing) * 40);

    /* ==========================================================================
    * Radius — multiplier, semantic scale, component primitives
    * ========================================================================== */

    /* modifiers */
    --radius-multiplier: 1;
    --radius-corner-shape: superellipse(1.3);

    /* semantic */
    --radius-none: 0rem;
    --radius-2xs: calc(var(--spacing) * 0.5 * var(--radius-multiplier));
    --radius-xs: calc(var(--spacing) * var(--radius-multiplier));
    --radius-sm: calc(var(--spacing) * 1.5 * var(--radius-multiplier));
    --radius-md: calc(var(--spacing) * 2.5 * var(--radius-multiplier));
    --radius-lg: calc(var(--spacing) * 4.5 * var(--radius-multiplier));
    --radius-xl: calc(var(--spacing) * 7 * var(--radius-multiplier));
    --radius-2xl: calc(var(--spacing) * 10 * var(--radius-multiplier));
    --radius-full: 9999rem;

    /* ==========================================================================
    * Layout — container widths and breakpoints
    * ========================================================================== */

    /* semantic */
    --gutters: var(--space-sm);

    /* --layout-* tokens are generated into _breakpoints.css; breakpoint
       tiers query the nearest inline-size container (_utilities-tier-*.css). */

    /* article container widths */
    --article-2xs: 30ch;
    --article-xs: 45ch;
    --article-sm: 50ch;
    --article-md: 65ch;
    --article-lg: 70ch;
    --article-xl: 75ch;
    --article-2xl: 90ch;

    /* ==========================================================================
    * Effects — shadows, focus rings
    * ========================================================================== */

    /* states - focus rings
     * The ring renders as a box-shadow: --ring-offset-shadow (a --ring-offset-width
     * gap in --ring-offset-shadow-color) + --ring-shadow (a --ring-width band of
     * --ring-shadow-color).
     *
     * Override --color-ring (or a hook), never --ring-shadow-color: a custom property resolves its own
     * var()s on the element where it is DECLARED, then the resolved value
     * inherits. So redeclaring --ring-shadow-color here (or on :root) bakes in this
     * element's --color-ring and no descendant override can change it. To re-color a
     * ring, declare --_ring-fill on the element that paints it (below).
     *
     * The animated recipe. Components paint the ring as a box-shadow so it
     * composes with their own shadow and can grow from 0 on focus. Copy it
     * verbatim; it cannot be hoisted into a token here because the widths must
     * resolve per element (a :root-composed token would freeze them at 0).
     *
     *   --_ring-offset-width: 0px;
     *   --_ring-width: 0px;
     *   --_focus-in: max(0, -1 * sign(var(--_focus-ring-w, 1px)));
     *   --_ring-fill: color-mix(in oklch, var(--ui-x-ring-color) var(--ring-opacity), transparent);
     *   --_focus-shadow:
     *     0 0 0 calc(var(--_ring-offset-width) * (1 - var(--_focus-in))) var(--ring-offset-shadow-color),
     *     0 0 0 calc((var(--_ring-offset-width) + var(--_ring-width)) * (1 - var(--_focus-in))) var(--_ring-fill, var(--ring-shadow-color)),
     *     inset 0 0 0 calc(var(--_ring-offset-width) * var(--_focus-in)) var(--ring-offset-shadow-color),
     *     inset 0 0 0 calc((var(--_ring-offset-width) + var(--_ring-width)) * var(--_focus-in)) var(--_ring-fill, var(--ring-shadow-color));
     *   box-shadow: var(--_focus-shadow, 0 0 #0000), var(--_shadow-resolved, var(--ui-x-shadow));
     *
     * …then grow it in the focus rule:
     *
     *   --_ring-offset-width: var(--ring-offset-width);
     *   --_ring-width: abs(var(--_focus-ring-w, var(--ring-width)));
     *   outline-color: transparent;
     *
     * The outset and inset pairs are weighted by --_focus-in, so a negative
     * --focus-ring utility draws the ring inside the box (and the outline twin
     * takes a negative offset to match). --_ring-fill is optional: omit it and
     * the ring falls back to --ring-shadow-color. */
    /* --ring, --ring-color, and --ring-offset-color are utility names,
     * registered non-inheriting, so the ring's theme color is --color-ring (with
     * the other roles above); the kit reads it through the inheriting
     * --ring-shadow-color and --ring-offset-shadow-color tokens. */
    --ring-opacity: 20%;
    --ring-shadow-color: color-mix(in oklch, var(--color-ring) var(--ring-opacity), transparent);
    --ring-width: 3px;
    --ring-offset-width: 0px;
    --ring-offset-shadow-color: var(--color-background);

    /* outline twin — transparent outline matching the ring's geometry.
     * Shadow-ringed elements keep it because forced-colors / high-contrast
     * modes drop box-shadows but force outline-color, so focus stays visible. */
    --outline-width: var(--ring-width);
    --outline-style: solid;
    --outline-offset: var(--ring-offset-width);

    /* shadows */
    --ring-offset-shadow: 0 0 0 var(--ring-offset-width) var(--ring-offset-shadow-color);
    --ring-shadow: 0 0 0 calc(var(--ring-offset-width) + var(--ring-width)) var(--ring-shadow-color);
    /* the composed focus ring (offset gap + ring band) for box-shadow lists */
    --shadow-ring: var(--ring-offset-shadow), var(--ring-shadow);

    /* ==========================================================================
    * Decoration — underlines and decorations
    * ========================================================================== */
    --decoration-line: underline;
    --decoration-color: currentColor;
    --decoration-style: solid;
    --decoration-thickness: 1px;
    --decoration-offset: 1px;

    /* ==========================================================================
    * Animations — spring easing, duration
    * --spring-easing is a critically damped spring from rest: no bounce, settled
    * to within 0.1% at the end of --spring-duration. --bezier-easing is its closest fit.
    * ========================================================================== */

    --spring-easing: linear(
      0,
      0.005 1.1%,
      0.02 2.3%,
      0.044 3.6%,
      0.082 5.1%,
      0.16 7.7%,
      0.364 13.8%,
      0.462 16.9%,
      0.556 20.2%,
      0.637 23.4%,
      0.706 26.8%,
      0.766 30.1%,
      0.818 33.8%,
      0.861 37.5%,
      0.899 42%,
      0.93 46.9%,
      0.954 52.3%,
      0.971 58.6%,
      0.983 65.5%,
      0.991 73.8%,
      1
    );
    --bezier-easing: cubic-bezier(0.32, 0.66, 0.1, 1);
    --spring-duration: 0.25s;

    /* the spring is declared first: the editor data reads the first definition */
    --default-transition-timing-function: var(--spring-easing);

    /* falls back to cubic-bezier when linear() easing is unsupported */
    @supports not (transition-timing-function: linear(0, 1)) {
      --default-transition-timing-function: var(--bezier-easing);
    }

    --default-transition-duration: var(--spring-duration);
    --default-transition-property-colors:
      text-decoration-color, background-color, border-color, color, fill, stroke;
    --default-transition-property-transforms: transform, translate, scale, rotate;
    --default-transition-property-effects:
      opacity, filter, -webkit-backdrop-filter, backdrop-filter, box-shadow;
    --default-transition-property-discrete: display, content-visibility, overlay, pointer-events;
    --default-transition-property:
      var(--default-transition-property-colors), var(--default-transition-property-transforms),
      var(--default-transition-property-effects), var(--default-transition-property-discrete);

    --default-transition-colors:
      text-decoration-color var(--default-transition-duration)
        var(--default-transition-timing-function),
      background-color var(--default-transition-duration) var(--default-transition-timing-function),
      border-color var(--default-transition-duration) var(--default-transition-timing-function),
      color var(--default-transition-duration) var(--default-transition-timing-function),
      fill var(--default-transition-duration) var(--default-transition-timing-function),
      stroke var(--default-transition-duration) var(--default-transition-timing-function);

    --default-transition-transforms:
      transform var(--default-transition-duration) var(--default-transition-timing-function),
      translate var(--default-transition-duration) var(--default-transition-timing-function),
      scale var(--default-transition-duration) var(--default-transition-timing-function),
      rotate var(--default-transition-duration) var(--default-transition-timing-function);

    --default-transition-effects:
      opacity var(--default-transition-duration) var(--default-transition-timing-function),
      filter var(--default-transition-duration) var(--default-transition-timing-function),
      -webkit-backdrop-filter var(--default-transition-duration)
        var(--default-transition-timing-function),
      backdrop-filter var(--default-transition-duration) var(--default-transition-timing-function),
      box-shadow var(--default-transition-duration) var(--default-transition-timing-function);

    --default-transition-content:
      display var(--default-transition-duration) var(--default-transition-timing-function)
        allow-discrete,
      content-visibility var(--default-transition-duration)
        var(--default-transition-timing-function) allow-discrete,
      overlay var(--default-transition-duration) var(--default-transition-timing-function)
        allow-discrete,
      pointer-events var(--default-transition-duration) var(--default-transition-timing-function)
        allow-discrete;

    --default-transition:
      var(--default-transition-colors), var(--default-transition-transforms),
      var(--default-transition-effects), var(--default-transition-content);

    /* looping animations for `--animation`. `--spin` is constant motion, so it runs
       linear; `--spin`, `--ping`, and `--bounce` animate `transform`, so the `--rotate`,
       `--scale`, and `--translate` utilities still compose with them */
    --default-animation: 1s var(--default-transition-timing-function) infinite;
    --spin: spin 1s linear infinite;
    --ping: ping var(--default-animation);
    --pulse: pulse 2s var(--default-transition-timing-function) infinite;
    --bounce: bounce var(--default-animation);
  }

  @media (prefers-reduced-motion: reduce) {
    :root {
      --default-transition-duration: 0s;
      --default-transition-timing-function: ease-out;

      /* `--animation` reads this first, so reduced motion stops any value */
      --_motion-off: none;
    }
  }

  /* a primary pointer that cannot hover is a touch screen (the dialog's phone query uses
     the same test): every primitive's touch floor turns on */
  @media (not (hover: hover)) {
    :root {
      --_touch-min: var(--spacing-touch-min);
    }
  }

  /* In this layer, the lowest, so a page's own keyframes of the same name win. */
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes ping {
    75%,
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

  @keyframes pulse {
    50% {
      opacity: 0.5;
    }
  }

  @keyframes bounce {
    0%,
    100% {
      transform: translateY(-25%);
    }

    50% {
      transform: none;
    }
  }

  /* The first style pass holds transitions at 0s. When anything resolves styles
     before this stylesheet applies (a head script, a browser extension,
     assistive tech), its arrival would otherwise transition every primitive in
     from its UA styles. The hold lasts one frame; an author rule animating
     :root replaces it. */
  @keyframes ui-first-style {
    from,
    to {
      --default-transition-duration: 0s;
    }
  }

  :root {
    animation: ui-first-style 1ms;
  }

  /*
   * Theme scopes — theme role tokens are intentionally unregistered, so their
   * light-dark() expressions re-resolve against each element's inherited
   * color-scheme; pinning color-scheme is all a scope needs, and scopes nest.
   * Built-in inherited color properties (color, accent-color, …) resolve at
   * the ancestor, so re-assert them at each scope boundary.
   */

  [data-theme="dark"] {
    color-scheme: dark;
    color: var(--color-foreground);
  }

  [data-theme="light"] {
    color-scheme: light;
    color: var(--color-foreground);
  }
}
