@charset "UTF-8";
/* The colour axis peony ships: one loud primary, the neutral, and the
   four states. A dashboard draws its washes from these; secondary and
   accent variants do not exist here. Configured on the first load of
   the shared config, so every component file loops over these only. */
/* ============================================================
   _params.scss — a family declares the variables it exposes.

   Every family owns its own set of parameters. Sharing a name
   with another family is a convenience, never an obligation:
   a family may expose five surfaces, or none, or knobs nobody
   else has.

   A family writes one map and includes `params.emit($params)`,
   which does two things:

     1. emits the defaults on `:where(:root)` (specificity 0, so
        any theme wins in any load order);
     2. emits the map as one machine-readable comment, which the
        build reads back to feed the configurator and the
        Families page. One source of truth: this map.

   Shape of an entry:

     'radius-field': (
       label: 'Field radius', group: 'Shape', type: length,
       default: 0.375rem, min: 0, max: 2, step: 0.05,
       unit: rem, units: (px rem em ch),
       help: 'Corner radius of buttons, inputs and selects.',
     )

   `type` is color | length | number | edge-width | shadows.
   `min`/`max`/`step` turn the control into a slider; `units` adds a
   unit picker. The last two are still ONE variable, with a richer
   control:

     edge-width  a `border-width` shorthand, edited as a width and
                 four edge toggles: default '1px 0 1px 0' draws top
                 and bottom only. Read it as `border-width`.
     shadows     a whole `box-shadow` value, edited as a list of
                 layers. Quote the default: it holds commas.
   ============================================================ */
/* Serialise the map to JSON on a single line, so the build can
   pull it out of the compiled CSS with one regex. */
/* Defaults + the machine-readable declaration. */
/* ------------------------------------------------------------
   colors() — metadata for the colour names families tend to
   share. Convenience only: a family passes the values it wants,
   under whatever names it wants, and gets labels and help text
   for the ones this table knows. Unknown names still work, they
   just get their raw name as a label.

   Each known name also says two things the editor needs and can
   not guess from a name:

     kind  surface | accent | ink — a ground things rest on, a
           colour things are painted with, or the text and lines
           drawn over both. The editor lays surfaces out first.
     on    the variable holding the ink written on this colour.
           It may be a parameter of the family (daisy's
           --color-primary-content) or a value the family derives
           itself (--color-on-primary): the editor shows an
           editable tile for the first, a contrast check for the
           second. A surface names its ink in the table; for an
           accent it follows the family's convention, passed as
           `$ink`: `on` gives --color-on-<name>, `content` gives
           --color-<name>-content (daisyUI).
   ------------------------------------------------------------ */
/* ============================================================
   peony — the root.

   Everything this family declares outside any component, emitted
   before the first one: the page itself (registered properties,
   inline SVG sizing, root colour and scroll, scrollbar), the type
   scale, --scale, the light shadow recipe — and the colours derived
   from the theme's seeds.
   ============================================================ */
/* ── properties ── */
/* properties.css */
@property --radialprogress {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}
/* ── svg ── */
/* ============================================================
   svg.scss — icon sizing inside the components.

   An icon the caller puts in a component (a button, a chip, a
   field, a tab, a menu…) scales with the surrounding font size,
   which is what makes intrinsic (em-based) sizing work for them.
   Only there: the page's own svg is not the family's business,
   and an svg stating its own height (an illustration) keeps it.
   :where keeps the rule at zero specificity, so anything wins.
   The components' own svg are sized in their own files.
   ============================================================ */
:where(.btn, .chip, .badge, .input, .select, .combobox, .tabs-item, .menu, .alert, .dropdown, .collapse, .breadcrumbs, .navbar, .dock, .list, .stat) svg:not([height]) {
  height: 1em;
}

/* ── rootcolor ── */
/* ============================================================
   rootcolor
   Root colour and background for :root and [data-theme] scopes
   ============================================================ */
:root,
[data-theme] {
  background: var(--page-scroll-bg, var(--root-bg));
  color: var(--color-on-surface);
}

:where(:root, [data-theme]) {
  --root-bg: var(--color-page, var(--color-surface-1));
}

/* ── rootscroll ── */
/* ============================================================
   rootscroll
   Scroll gutter and scroll lock (used by modals)
   ============================================================ */
/* Scroll gutter — darkens the background while a backdrop is active */
:root {
  background: var(--page-scroll-bg, var(--root-bg));
  --page-scroll-bg-on: linear-gradient(var(--root-bg, #0000), var(--root-bg, #0000))
  	color-mix(in srgb, var(--root-bg, #0000), oklch(0% 0 0) calc(var(--page-has-backdrop, 0) * 40%));
  --page-scroll-transition-on: background-color 0.3s ease-out;
  transition: var(--page-scroll-transition);
  /* Fallback without @supports */
  scrollbar-gutter: var(--page-scroll-gutter, unset);
  /* With CSS if() support */
  scrollbar-gutter: if(style(--page-has-scroll: 1): var(--page-scroll-gutter, unset); else: unset);
}

@keyframes set-page-has-scroll {
  0%, to {
    --page-has-scroll: 1;
  }
}
/* Scroll lock — blocks scrolling while a modal is open */
:root:not(span) {
  overflow: var(--page-overflow);
}

/* ── scrollbar ── */
/* ============================================================
   scrollbar
   Scrollbar colour that follows the theme
   ============================================================ */
:root {
  scrollbar-color: color-mix(in oklch, currentColor 35%, rgba(0, 0, 0, 0)) rgba(0, 0, 0, 0);
}

/* ── default ── */
:root {
  /* ── Light shadow system ─────────────────────────────────────
     Alternative to --depth. Set --light-intensity > 0 and --depth: 0
     for flat/modern directional shadows instead of retro depth.
     --light-intensity   opacity multiplier  (0 = off)
     --light-depth       distance/blur scale (1 = sm, 2 = md, 3 = lg)
     --light-color       shadow hue, default pure black
     ──────────────────────────────────────────────────────────── */
  --light-intensity: 0;
  --light-depth: 1;
  --light-color: oklch(0% 0 0);
  /* ── Type scale ──────────────────────────────────────────────
     A fixed modular scale (ratio 1.125, base 1rem). Deliberately NOT
     fluid: component sizes are intrinsic (em), so a viewport-driven
     base would silently resize every component — two competing size
     systems. Size is chosen, through --scale below. */
  --default-xxs: 0.7023rem;
  --default-xs: 0.7901rem;
  --default-sm: 0.8889rem;
  --default-base: 1rem;
  --default-md: 1.125rem;
  --default-lg: 1.2656rem;
  --default-xl: 1.4238rem;
  --default-xxl: 1.6018rem;
  --default-xxxl: 1.802rem;
}

/* ── Element size coefficient ────────────────────────────────────
   --scale grows or shrinks the FRAME of every component — heights,
   paddings, gaps, internal offsets — and never the text.

   That is why it is not applied to font-size, and why this stylesheet does not
   set a root font-size either: a kit that resizes the host page's text
   when you install it is a kit you uninstall. Each geometric length is
   written `calc(Nem * var(--scale))` at its own site, so it stays
   intrinsic (resolved against the element's own font-size, so size
   variants stay proportioned) while the text is left alone.

   What does NOT scale: text, icons (an svg in a component is 1em — they sit on
   the text baseline), the radii (their own parameters), hairlines in px,
   and the text-natured components that draw no frame (text, link,
   breadcrumbs, validator).

   On :where(:root) (specificity 0) so any theme wins, in any load order. */
:where(:root) {
  --scale: 1;
}

/* The recipe is declared on every element (zero specificity via :where) —
   NOT on :root only. A custom property resolves its var() references where
   it is declared, so a :root-only --shadow-light would freeze --light-depth
   forever and per-component overrides (e.g. a button raising its elevation
   on hover) would do nothing. Declared per element, changing any --light-*
   on a component recomputes its shadow there. */
:where(*) {
  /* peony's lift: a tight contact shadow plus a wide, faint haze.
     --peony-shadow scales the haze; --shadow-tint is the element's own
     colour (a component sets it to its seed), mixed in by --peony-glow. */
  --shadow-hue: color-mix(in oklab, var(--shadow-tint, var(--light-color)) calc(var(--peony-glow, 0) * 100%), var(--light-color, oklch(0% 0 0)));
  --shadow-light:
  	0 1px 2px color-mix(in oklab, var(--shadow-hue) calc(var(--light-intensity, 0) * 4%), #0000),
  	0 calc(var(--light-depth, 1) * var(--peony-shadow, 1) * 6px) calc(var(--light-depth, 1) * var(--peony-shadow, 1) * 24px)
  		color-mix(in oklab, var(--shadow-hue) calc(var(--light-intensity, 0) * (6% + var(--peony-glow, 0) * 18%)), #0000);
}

/* ============================================================
   derived colours — the automatic `--color-on-*`, plus the default
   border color.

   A theme sets surfaces and semantic colors; what is written *on*
   them is derived from the seed with the relative color syntax. The lightness flips around a threshold — a light
   seed gets near-black text, a dark seed gets near-white — while
   keeping a whisper of the seed's hue.

     clamp(0.145, (0.66 - l) * 999, 0.97)
		l > 0.66  →  negative  →  clamps to 0.145 (dark text)
		l < 0.66  →  huge      →  clamps to 0.97  (light text)

   Declared on :where(:root) (zero specificity) so a theme's :root
   can still override any of them explicitly if it wants to.
   ============================================================ */
:where(:root) {
  --color-on-surface: oklch(from var(--color-surface-1) clamp(0.145, (0.66 - l) * 999, 0.97) min(c, 0.03) h);
  /* Borders are almost always a wash of the text color over the surface.
     Derived so a theme has only three surfaces to supply — but a theme
     (or a family like wireframe) can still set --color-border outright. */
  --color-border: color-mix(in oklab, var(--color-on-surface) 8%, #0000);
  --color-on-primary: oklch(
  	from var(--color-primary) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-secondary: oklch(
  	from var(--color-secondary) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-accent: oklch(
  	from var(--color-accent) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-neutral: oklch(
  	from var(--color-neutral) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-info: oklch(
  	from var(--color-info) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-success: oklch(
  	from var(--color-success) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-warning: oklch(
  	from var(--color-warning) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
  --color-on-error: oklch(
  	from var(--color-error) clamp(0.145, (0.66 - l) * 999, 0.97) calc(c * 0.15) h
  );
}

/* peony — avatar.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   avatar.scss — .avatar

   A picture or a few letters standing for someone, cropped to a
   shape. `.avatar` is the frame; its one child — an <img>, or a
   <span> of initials — fills it and is cropped to the same shape.

   The coloured contour is the frame's own fill showing through its
   padding: a ring that follows ANY shape, masked ones included,
   where an outline or a box-shadow would be cut off by the mask.
   The gap between ring and picture is the child's border.

   A status or a count is a `.badge` wrapped around the avatar; this
   file reaches into it (integration, ADR 0009) so the chip lands on
   the shape's edge rather than on its bounding box's corner.

   Plumbing contract (the family fills these on `.avatar`):
	--avatar-size          width and height
	--avatar-radius        corner radius of the frame
	--avatar-inner-radius  corner radius of the picture
	--avatar-mask          a mask shorthand, or none
	--avatar-corner        how far the shape's edge sits inside its
	                       box at 45°, as a % of the width (badge)
	--avatar-ring          contour colour
	--avatar-ring-width    contour width (0 = none)
	--avatar-gap           colour between contour and picture
	--avatar-gap-width     width of that gap
	--avatar-border        / --avatar-border-width: an outer line
	--avatar-shadow        box-shadow
	--avatar-bg / -fg      ground and ink of the initials
	--fontsize             font size (set by size-variants classes)
   ============================================================ */
/* peony — badge.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   badge.scss — .badge (badge overlay wrapper)

   Internal variables (position control):
	--badge-t    top offset (default: 0)
	--badge-b    bottom offset (default: auto)
	--badge-s    inset-inline-start offset (default: auto)
	--badge-e    inset-inline-end offset (default: 0)
	--badge-x    horizontal translate (default: 50%)
	--badge-y    vertical translate (default: -50%)

   Usage: combine the .badge wrapper with .badge-{position}
   modifiers; the inner .chip is the positioned badge itself.
   ============================================================ */
/* ------------------------------------------------------------
   structure — wrapper + positioned inner chip.
   ------------------------------------------------------------ */
/* peony — bubble.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   bubble.scss — .bubble

   A chat message: a fill, an ink, and a tail on one side. It is one
   class on one block — whatever it holds is the message.

   peony keeps every corner rounded and points with a small arrow
   instead: ::before, painted in the bubble's fill and CLIPPED to a
   triangle (clip-path), sitting against the side a little above the
   bottom corner — Radix's popover arrow, turned sideways.
   `.bubble-end` moves it to the other side and mirrors it; in a
   right-to-left document both sides follow.

   The bubble keeps a margin as wide as its tail on the tail side,
   so a column of them never overflows, and an end bubble pushes
   itself to the end of the line.

   Plumbing contract (the family fills these on `.bubble`):
	--bubble-bg       fill (the tail too)
	--bubble-fg       ink
	--bubble-radius   corner radius
	--bubble-corner   radius of the corner the tail grows from
	--bubble-tail     tail width
	--bubble-tail-mask  the tail's shape, an image
	--bubble-px/py    padding
	--fontsize        font size (set by size-variants classes)
   ============================================================ */
/* peony — breadcrumbs.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   breadcrumbs.scss — .breadcrumbs


/* ------------------------------------------------------------
   structure — scrollable list of items with chevron separators.
   ------------------------------------------------------------ */
/* peony — calendar.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   calendar.scss — .calendar

   A date picker. The calendar itself is drawn by air-datepicker
   (vendored in src/lib/vendor/air-datepicker), whose DOM and class
   names are its own: `.air-datepicker`, `.air-datepicker-cell`,
   `.-selected-`… Those classes are NOT ours (ADR 0009) — this file
   only reaches into them, always from under `.calendar`, the one
   class we own. Without a `.calendar` ancestor nothing here applies,
   so the library can live on the page beside anything else.

   The DOM, either way:

     <div class="calendar calendar-primary">        inline
       <div class="air-datepicker -inline-">…</div>
     </div>

     <div class="calendar">                         popup
       <input class="input" />
       <div class="air-datepicker -active- -bottom-left-">…</div>
     </div>

   In popup mode the picker is appended to the `.calendar` element
   (air-datepicker's `container` option) rather than to <body>, and
   placed against it: `.calendar` is the positioned box.

   The library's own stylesheet is not used: the layout below is a
   rewrite of it in em, so the calendar scales with its font size.

   Axes:  color (the selected day, the range), size

   Plumbing contract (the family fills these on `.calendar`):
	--calendar-bg / -fg       ground and ink of the picker
	--calendar-border         edge colour
	--calendar-border-width   edge width (0 = none)
	--calendar-radius         corner radius of the picker
	--calendar-shadow         shadow of the picker when it pops up
	--calendar-inline-shadow  shadow of an inline picker
	--calendar-p              inner padding
	--calendar-gap            space between navigation, days, buttons
	--calendar-cell           height and width of a day
	--calendar-cell-radius    corner radius of a day
	--calendar-accent         fill of a selected day (color axis)
	--calendar-accent-fg      ink on it
	--calendar-current        ink of today
	--calendar-muted          days of another month, secondary text
	--calendar-hover-bg       ground under the pointer / keyboard focus
	--calendar-range-bg       ground of the days inside a range
	--calendar-day-name-fg    ink of the weekday names
	--calendar-title-weight   weight of the month title
	--calendar-z              stacking of a popup
	--fontsize                font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the box, the navigation, the grids, the day states,
   the buttons and the time picker.
   ------------------------------------------------------------ */
/* peony — card.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   card.scss — .card

   A box with, optionally, a title, a body and a row of actions.
   Every part is optional and none of them is structural: a card
   with nothing but a body is a card, and that is the common case.

   It owns its namespace and draws its own parts, so `card-title`,
   `card-body` and `card-actions` are PARTS, not sub-components
   (ADR 0009).

   Plumbing contract (the family fills these on `.card`):
	--card-bg             fill
	--card-fg             ink
	--card-border         border colour
	--card-border-width   border width (0 = none)
	--card-radius         corner radius
	--card-shadow         box-shadow
	--card-rotate         resting angle
	--card-p              body padding
	--card-gap            gap between the body's children
	--card-title-fg       title ink
	--card-title-size     title font-size
	--card-title-weight   title font-weight
	--fontsize            font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the box, its parts, and the layout flags.
   ------------------------------------------------------------ */
/* peony — carousel.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   carousel.scss — .carousel

   A row of items that scrolls and snaps — natively, so touch,
   trackpad and keyboard scrolling come for free — with optional
   arrows over it and an optional pagination under it.

   The root is a grid. The track sits in the first cell, and the two
   arrows are laid over that SAME cell, at its start and end, so they
   are centred on the items whatever sits under them. The pagination
   takes the next row.

   Parts:   .carousel-track       the scrolling, snapping row
            .carousel-item        one item
            .carousel-prev/next   the cells the arrows are drawn in
            .carousel-pagination  the cell the pagination is drawn in
            .carousel-upcoming    the row of upcoming items under the track
            .carousel-upcoming-item  one of them, a button
   Axes:    align (where an item snaps: start, center, end)
   Flags:   vertical

   An item is as wide as the track. Several at once: set
   `--carousel-item-width` (a length, a percentage, or `auto` to let
   each item size itself) on the root.

   Plumbing contract (the family fills these on `.carousel`):
	--carousel-gap          space between the track and the pagination
	--carousel-item-gap     space between items
	--carousel-item-width   width of an item (default 100%)
	--carousel-height       height of a vertical carousel
	--carousel-radius       corner radius of the track
	--carousel-border       the track's border (a `border` value)
	--carousel-shadow       the track's box-shadow
	--carousel-rotate       resting angle of the track
	--carousel-arrow-inset  distance of the arrows from the edges
	--carousel-upcoming-gap   space between the upcoming items
	--carousel-upcoming-size  font-size of an upcoming item (shrinks it)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the grid, the snapping track, the overlaid arrows.
   ------------------------------------------------------------ */
/* peony — button.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   button.scss — .btn

   Plumbing contract — custom properties painted by `structure`, assigned
   by skins/variants (and overridable per family):
	--btn-color    color seed — set by `color-variants`, drives bg/outline
	--btn-bg       resolved background color
	--btn-fg       resolved text color
	--btn-icon     icon color                   (structure default: currentColor, the text color)
	--btn-border   resolved border color        (structure default: transparent)
	--btn-shadow   box-shadow value             (structure default: var(--shadow-light))
	--btn-p        inline padding
	--size         button height
	--fontsize     font size (set by `size-variants` classes)

   External variables (theme / family):
	--color-surface-2          default button background
	--color-on-surface      default text color
	--color-{variant} / --color-on-{variant}  semantic colors (primary, secondary, …)
	--radius-field            corner radius
	--border                  border width (px value)
	--shadow-light            family shadow system (see _root.scss)

   Join integration (set by join.scss when inside .join):
	--join-ss / --join-se / --join-es / --join-ee  per-corner radii
   ============================================================ */
/* ------------------------------------------------------------
   structure —
   Layout, intrinsic sizing, typography plumbing, paint plumbing
   (background/border/shadow read the --btn-* variables), keyboard
   focus, checkbox/radio-as-button behavior, disabled state.
   No look decision: border/shadow resolve to transparent/family
   shadow until a skin assigns them.
   ------------------------------------------------------------ */
/* peony — checkbox.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   checkbox.scss — .checkbox

   Plumbing contract:
	--input-color   border + checked fill color (set by color-variants)
	--size          box dimensions (1.5em × 1.5em, scales with font)
	--fontsize      font size (set by size-variants classes)

   External variables (theme / family):
	--color-on-surface       default checkmark color
	--color-{variant} / --color-on-{variant}  fill / mark colors (color-variants)
	--border / --radius-selector
	--shadow-light             family shadow system
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: box, animated clip-path checkmark, focus ring,
   checked/indeterminate states, forced-colors/print fallbacks,
   disabled.
   ------------------------------------------------------------ */
/* peony — chip.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   chip.scss — .chip (small inline label)

   Plumbing contract:
	--chip-color  seed color (set by color-variants)
	--chip-bg     resolved background color
	--chip-fg     resolved text color
	--size        chip height (1.6em, scales with font); padding derived
	--fontsize    font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1 / --color-surface-2 / --color-on-surface
	--color-{variant} / --color-on-{variant}  seed / text colors (color-variants)
	--border / --radius-selector
	--shadow-light          family shadow system
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure and paint plumbing (bg/fg/border from --chip-*).
   ------------------------------------------------------------ */
/* peony — dock.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   dock.scss — .dock (fixed bottom navigation bar)

   External variables (theme / family):
	--color-surface-3  dock background (the most raised surface)
	--color-on-surface  disabled item text color mix
	--radius-box          item corner radius
   ============================================================ */
/* ------------------------------------------------------------
   structure — fixed bar, items, active indicator, disabled.
   ------------------------------------------------------------ */
/* peony — fieldset.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   fieldset.scss — .fieldset (form field group)

   External variables (theme / family):
	--color-on-surface   legend and label text color
   ============================================================ */
/* ------------------------------------------------------------
   structure — grid container + legend (+ deprecated .fieldset-label).
   ------------------------------------------------------------ */
/* peony — floating-label.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   floating-label.scss — .floating-label

   A container that WRAPS a field, unlike `.label`, which is inline
   and lives inside one. Two roles, two components (ADR 0009).

   structure owns the stacking and the state plumbing; look decides
   where the text sits, how big it is and what it is painted on.

   External variables (theme / family):
	--color-surface-1   the span's ground, so it can hide the field border
	--size-field        vertical centre of the floated text
   ============================================================ */
/* peony — file-input.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   file-input.scss — .file-input

   Plumbing contract:
	--input-color   field border/accent color (same as input.scss)
	--btn-color     seed color for the file button (color-variants)
	--btn-bg        resolved button background   (painted by structure)
	--btn-fg        resolved button text color   (painted by structure)
	--btn-border    resolved button border color (structure default: transparent)
	--btn-shadow    button drop shadow           (skin-flat)
	--size          field height (2.5em, scales with font)
	--fontsize      font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1 / --color-surface-2 / --color-on-surface
	--color-{variant} / --color-on-{variant}  semantic colors (color-variants)
	--border / --radius-field
	--shadow-light          family shadow system

   Join integration (set by join.scss when nested in .join):
	--join-ss / --join-es   start-side radius overrides
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: field layout + the ::file-selector-button
   pseudo-button plumbing (paints from --btn-*), focus ring,
   disabled state.
   ------------------------------------------------------------ */
/* peony — input.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   input.scss — .input

   Plumbing contract:
	--input-color   resolved border/accent color — structure defaults it to a
	                faint on-surface mix, color-variants override it,
	                focus resets it to on-surface
	--size          field height (2.5em × --scale, scales with font)
	--fontsize      font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1        field background
	--color-surface-2        disabled background and border
	--color-on-surface    default text color
	--color-{variant}       semantic accent (set by color-variants)
	--border                border width
	--radius-field          field corner radius
	--depth                 flat-skin inset intensity (skin-flat only)
	--shadow-light          family shadow system

   Join integration (set by join.scss when nested in .join):
	--join-ss / --join-se / --join-es / --join-ee  per-corner radii
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure shared by all families: layout, intrinsic
   sizing, border/outline plumbing, inner <input> handling, focus
   ring, disabled state. Box-shadow defaults to the family shadow;
   skins provide the actual surface recipe.
   ------------------------------------------------------------ */
/* peony — join.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   join.scss — .join (group adjacent form elements)

   Exported variables (injected into child .join-item elements,
   consumed by input, select, button, … via
   var(--join-ss, var(--radius-field))):
	--join-ss / --join-se / --join-es / --join-ee  per-corner radii

   External variables (theme / family):
	--border        used for negative margin to merge borders
	--radius-field  default corner radius applied to first/last items
   ============================================================ */
/* ------------------------------------------------------------
   structure — horizontal grouping: corner radius distribution, border
   merging, button height stretch.
   ------------------------------------------------------------ */
/* peony — label.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   label.scss — .label / .floating-label

   External variables (theme / family):
	--color-surface-1   floating label background (hides the field border)
	--border           inline divider width inside .input / .select
	--size-field       floating label vertical center position
   ============================================================ */
/* ------------------------------------------------------------
   structure — inline label + prefix/suffix label inside fields.
   ------------------------------------------------------------ */
/* peony — link.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   link.scss — .link (styled hyperlink)


/* ------------------------------------------------------------
   structure — underlined link + .link-hover variant + focus.
   ------------------------------------------------------------ */
/* peony — list.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   list.scss — .list (rows + suggestion dropdown)

   Plumbing contract:
	--list-grid-cols   auto-computed grid columns (.list-col-grow index)
	--list-selected    the fill of a selected row
	--list-dirty       the mark of a row with unsaved changes
	--fontsize         font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1 / --color-surface-2 / --color-on-surface
	--color-primary         selected suggestion highlight
	--border / --radius-box / --radius-field
	--shadow-light          family shadow system

   Join integration (set by join.scss when nested in .join):
	--join-ss / --join-se / --join-es / --join-ee  per-corner radii
   ============================================================ */
/* ------------------------------------------------------------
   structure — list container + data rows with growing columns.
   ------------------------------------------------------------ */
/* peony — loading.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   loading.scss — .loading (animated indicator)


/* ------------------------------------------------------------
   structure — masked square, defaults to the spinner animation.
   ------------------------------------------------------------ */
/* peony — menu.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   menu.scss — .menu (navigation list)

   A menu is navigation: links, one active, optional section titles
   and optional nested sub-menus. It owns its frame — unlike `dock`
   and `navbar`, which are placement only. `list` holds rows of data;
   `tabs` chooses which panel is visible; `menu` goes somewhere.

   Markup: a <ul> of <li>. An item is either marked `.menu-item` or
   simply the interactive child of an <li> — both are styled, so
   plain markup works and the explicit class is there when the
   structure is unusual.

	<ul class="menu">
	  <li class="menu-title">Form</li>
	  <li><a class="menu-active" href="#">Button</a></li>
	  <li>
	    <button class="menu-toggle">Display</button>
	    <ul class="menu-sub menu-sub-closed"> … </ul>
	  </li>
	  <li></li>                      <!-- empty item = separator -->
	</ul>

   The sub-menu is open by default: a family that ships it closed
   without JS would make it unreachable. `.menu-sub-closed` collapses
   it, `.menu-sub-open` says so explicitly; a script (or, later, the
   Svelte wrapper) only swaps the class — the animation is here.

   To turn the toggle's marker when the sub-menu opens, a family
   writes the value on:
	.menu li:has(> .menu-sub-closed) > .menu-toggle::after

   Plumbing contract:
	--menu-bg / --menu-fg / --menu-border / --menu-border-width
	--menu-shadow
	--menu-p              padding around the whole block
	--menu-gap            space between items
	--menu-item-py/-px    item padding
	--menu-item-gap       space between an item's icon, label and badge
	--menu-item-bg/-fg    item paint, idle
	--menu-item-radius    item corner radius
	--menu-item-transition
	--menu-hover-bg/-fg   item paint on hover
	--menu-active-bg/-fg  item paint when .menu-active
	--menu-disabled-bg/-fg
	--menu-focus-outline / --menu-focus-offset
	--menu-title-*        section title paint, padding and type
	--menu-divider        color of an empty <li>
	--menu-divider-size / -gap / -inset
	--menu-sub-indent     how far a sub-menu is pushed in
	--menu-sub-transition the open/close timing
	--fontsize            font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the block, its items, their states, section titles,
   separators, and the collapsible sub-menu.
   ------------------------------------------------------------ */
/* peony — navbar.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   navbar.scss — .navbar (a bar across the top)

   Markup:

	<nav class="navbar">
	  <div class="navbar-start">…</div>
	  <div class="navbar-center">…</div>
	  <div class="navbar-end">…</div>
	</nav>

   The three zones are optional. With none of them the children
   simply lay out in a row; with them, start and end share the
   leftover space and center keeps its own width, which is what
   lets a centred logo stay centred while the two sides grow.

   navbar is PLACEMENT, not navigation — it says "across the top",
   it does not say what goes in it. A set of links inside one is a
   `menu`; a row of actions is a row of buttons. Compare `dock`,
   which is the same idea pinned to the bottom of the viewport.

   Plumbing contract — a family fills these:
	--navbar-bg / --navbar-fg     the bar's ground and ink
	--navbar-border               divider colour
	--navbar-border-width         divider thickness (0 to remove it)
	--navbar-shadow               cast shadow, if the family has any
	--navbar-h                    minimum height; content may exceed it
	--navbar-px / --navbar-py     padding
	--navbar-gap                  space between zones and between children
	--navbar-sticky-top           where a sticky bar comes to rest
	--fontsize                    set by the size variants
   ============================================================ */
/* ------------------------------------------------------------
   structure — the bar, its three zones, and the sticky flag.
   ------------------------------------------------------------ */
/* peony — pagination.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   pagination.scss — .pagination

   A row of pages to jump between: numbers, a gap where pages are
   skipped, and optional previous / next controls. The current page
   is marked by `aria-current="page"`, not by a class: the state is
   the accessibility attribute, so it cannot drift from it.

   Parts:   .pagination-item   one page, or a previous / next control
            .pagination-gap    the "…" standing for skipped pages
            .pagination-text   the "3 / 8" of the count variant
   Axes:    color (the current page), size, variant (dots: the
            numbers become dots, as under a carousel; bars: a
            segment per page across the row; count: "3 / 8" alone)

   Plumbing contract (the family fills these on `.pagination`):
	--pagination-color         fill of the current page
	--pagination-fg            ink on the current page
	--pagination-item-bg       fill of the other pages
	--pagination-item-fg       their ink
	--pagination-item-border   their edge colour
	--pagination-hover-bg      fill under the pointer
	--pagination-border-width  edge width (0 = none)
	--pagination-radius        corner radius of a page
	--pagination-shadow        box-shadow of a page
	--pagination-size          height and minimum width of a page
	--pagination-dot           diameter of a dot (variant dots)
	--pagination-bar-width     minimum length of a segment (variant bars)
	--pagination-bar-height    thickness of a segment (variant bars)
	--pagination-bar-radius    corner radius of a segment (variant bars)
	--pagination-bar-gap       space between segments (variant bars)
	--pagination-gap           space between pages
	--fontsize                 font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the row, its pages, the current page, the dots.
   ------------------------------------------------------------ */
/* peony — progress.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   progress.scss — .progress (linear progress bar)

   External variables (theme / family):
	--color-on-surface  default track/fill color
	--color-{variant}     fill color (color-variants)
	--radius-box          bar corner radius
   ============================================================ */
/* ------------------------------------------------------------
   structure — track + fill (WebKit/Firefox), indeterminate animation.
   Color driven by currentColor; height fixed at 0.5rem.
   ------------------------------------------------------------ */
/* peony — radial-progress.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   radial-progress.scss — .radial-progress

   User-set variables (provided in HTML style or CSS):
	--value       progress value 0–100 (required)
	--size        ring diameter (default: 5em, scales with font)
	--thickness   ring stroke width (default: --size / 10)

   Internal variables:
	--radialprogress   computed from --value (animated CSS property)
   ============================================================ */
/* ------------------------------------------------------------
   structure — conic ring + rounded cap.
   ------------------------------------------------------------ */
/* peony — radio.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   radio.scss — .radio

   Note: .radio does not consume --shadow-light — families that need
   a shadow skin it directly.

   Plumbing contract:
	--input-color   border + dot color (set by color-variants)
	--size          circle dimensions (1.5em × 1.5em, scales with font)
	--fontsize      font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1        background when checked
	--color-{variant}       accent color (color-variants)
	--border
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: circle, inner dot, focus ring, checked state,
   forced-colors/print fallbacks, disabled, check animation.
   ------------------------------------------------------------ */
/* peony — range.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   range.scss — .range (slider input)

   Note: the thumb box-shadow recipe stays in `structure` — it implements
   the track-fill trick (a 100cqw shadow cast from the thumb) and
   cannot be split from the look. Its depth-gated lines are inert
   when the family sets --depth: 0.

   Plumbing contract:
	--range-thumb         thumb background color
	--range-thumb-size    thumb diameter (1.5em, scales with font)
	--range-progress      track fill color (currentColor by default)
	--range-fill          1 = fill track before thumb, 0 = no fill
	--range-p             thumb border / padding (0.25em)
	--range-bg            empty track color
	--range-dir           RTL direction multiplier (-1 when [dir="rtl"])
	--radius-selector-max workaround for PostCSS/Nuxt calc(min(calc())) error
	--fontsize            font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1        default thumb background
	--color-{variant} / --color-on-{variant}  track / thumb colors (color-variants)
	--radius-selector       thumb and track corner radius
	--depth                 shadow intensity multiplier
	--shadow-light          family shadow system
   ============================================================ */
/* ------------------------------------------------------------
   structure — the whole slider: track, thumb (with the fill-shadow
   trick), focus, disabled.
   ------------------------------------------------------------ */
/* peony — select.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   select.scss — .select

   Plumbing contract:
	--input-color   resolved border/accent color (same as input.scss)
	--size          field height (2.5em × --scale, scales with font)
	--fontsize      font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1        field background
	--color-surface-2        disabled background and border
	--color-on-surface    default text color
	--color-neutral / --color-on-neutral   active option highlight
	--color-{variant}       semantic accent (set by color-variants)
	--border                border width
	--radius-field          field corner radius
	--radius-box            picker dropdown corner radius
	--depth                 flat-skin inset intensity (skin-flat only)
	--shadow-light          family shadow system

   Join integration (set by join.scss when nested in .join):
	--join-ss / --join-se / --join-es / --join-ee  per-corner radii
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: layout, chevron, native <select> nesting,
   picker dropdown (base-select), options, focus ring, disabled.
   ------------------------------------------------------------ */
/* peony's focused field: white, lit from below, the accent gradient
   along the bottom edge, the arrow in the accent. Shared by every state
   that means "in use": focus, an open list, an open native picker. */
/* peony — skeleton.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   skeleton.scss — .skeleton (loading placeholder)

   External variables (theme / family):
	--color-surface-1      shimmer highlight color
	--color-surface-2      skeleton base background
	--color-on-surface  .skeleton-text shimmer
	--radius-box          corner radius
   ============================================================ */
/* ------------------------------------------------------------
   structure — shimmering placeholder block + text variant.
   ------------------------------------------------------------ */
/* peony — stat.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   stat.scss — .stat and .stats

   A figure worth a glance: a small title, a big value, a line of
   description, and optionally an icon or picture on the side and a
   row of actions. A box like `.card`, with another default layout:
   a two-column grid where the text stacks in the first column and
   `.stat-figure` spans the rows of the second.

   `.stats` is a second namespace in the same file, as `text.scss`
   holds three (CONTEXT.md): it lines several stats up in ONE frame
   and draws a divider between them, so the stats it holds put their
   own frame down. A row by default, `.stats-vertical` stacks them.

   Plumbing contract (the family fills these on `.stat` / `.stats`):
	--stat-bg / -fg            fill and ink
	--stat-border(-width)      edge colour and width (0 = none)
	--stat-radius              corner radius
	--stat-shadow              box-shadow
	--stat-px / -py / -gap     padding, and the gap between columns
	--stat-muted               ink of the title and the description
	--stat-title-size          title and description font-size
	--stat-value-size/-weight  the value
	--stat-figure-fg           ink of the figure
	--stats-divider            the line between two stats in .stats
	--stats-*                  the frame .stats draws, as --stat-*
	--fontsize                 font size (set by size-variants classes)
   ============================================================ */
/* peony — swatch.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   swatch.scss — .swatch (a sample of one colour)

   A swatch shows a colour, and optionally a letter or a short label
   drawn on it. The colour is DATA, not a theme value: the author
   passes it at the call site, the family never writes it.

	<span class="swatch" style="--swatch-color:#1677ff">A</span>
	<button class="swatch swatch-active" style="--swatch-color:#0000"></button>

   A transparent colour must read as transparent, so the sample is
   painted as a flat layer over a checkerboard the family supplies in
   `--swatch-checks`.

   What is written on it is an on-color: a family derives
   `--swatch-on-color` from `--swatch-color` the same way
   `--color-on-*` is derived from a surface, so a letter stays legible
   on a colour nobody knew at authoring time.

   Plumbing contract:
	--swatch-color        the sample itself (author-set, required)
	--swatch-on-color     what is drawn on it (family-derived)
	--swatch-size         width and height
	--swatch-radius       corner radius
	--swatch-border / --swatch-border-width
	--swatch-shadow
	--swatch-checks       the transparency checkerboard behind the colour —
	                      the family writes the image AND its background-size,
	                      since one layer of it is one value
	--fontsize            font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the sample, its label, and the interactive states.
   ------------------------------------------------------------ */
/* peony — color-picker.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   color-picker.scss — .color-picker (one colour, edited in OKLCH)

	<div class="color-picker" style="--color-picker-value: oklch(62% 0.19 260)">
	  <div class="color-picker-head">
	    <span class="color-picker-preview"></span>
	    <input class="input color-picker-value" value="oklch(62% 0.19 260)">
	  </div>
	  <label class="color-picker-channel">
	    <span>L</span>
	    <input type="range" class="color-picker-track" style="--color-picker-track: linear-gradient(…)">
	    <output>62</output>
	  </label>
	  …
	  <div class="color-picker-presets"> <button class="swatch">…</button> … </div>
	</div>

   A panel, not a popover: put it in a .dropdown to float it. Each
   channel is a real range input whose track is painted with the
   gradient it moves along (--color-picker-track, written by whoever
   drives it), so the slider shows what it does.

   Plumbing contract:
	--color-picker-value       the colour (preview)
	--color-picker-bg / --color-picker-fg
	--color-picker-border / --color-picker-border-width
	--color-picker-radius / --color-picker-shadow
	--color-picker-p / --color-picker-gap
	--color-picker-width
	--color-picker-track-h / --color-picker-track-radius
	--color-picker-thumb / --color-picker-thumb-ring
   ============================================================ */
/* peony — tabs.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   tabs.scss — .tabs / .tabs-item

   Internal variables (set on .tabs / .tabs-item, consumed by children):
	--tabs-height         container height (auto or fixed)
	--tabs-direction      flex direction (row)
	--tab-height          individual tab height (2.5em, scales with font)
	--tab-p               tab inline padding (0.75em, scales with font)
	--tab-bg              active tab background color
	--tab-border-color    tab border color
	--tab-order           tab order in flex container
	--tab-radius-min      minimum inner radius
	--tab-radius-limit    clamped radius = min(--radius-field, --tab-radius-min)
	--tab-radius-grad     radial gradient for lifted corner decoration
	--tab-radius-ss/se/es/ee   per-corner radius values
	--tab-border / --tab-border-colors   active tab border sides
	--tab-paddings        active tab padding adjustment
	--tab-inset / --radius-start / --radius-end   lifted corner positioning
	--tabs-box-radius     box variant rounding
	--tabcontent-order / --tabcontent-margin / --tabcontent-radius-*  content panel

   External variables (theme / family):
	--color-surface-1/200/300 / --color-neutral / --color-on-surface
	--border / --radius-field / --radius-box
	--depth               shadow intensity (variant-box active shadow)
	--fontsize            tab font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: flex container, tab element (radio/label
   support), active-content display logic, focus, disabled,
   .tabs-item-content panel plumbing.
   ------------------------------------------------------------ */
/* peony — text.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   text.scss — typography mixin library

   Three components in one file — `text`, `title`, `subtitle` —
   because separating them would buy nothing. All text-natured:
   they draw no frame, so `--scale` leaves them alone.

   ── Two axes, not one combination ──────────────────────────

   These used to ship as `.text-s2-b3`: twelve classes for four
   sizes times three weights. But the two never interacted — `s`
   carried font-size and line-height, `b` carried font-weight and
   nothing else — so the product was twelve ways of saying seven
   things. Split, they are what the Svelte wrapper's two props
   already wanted to be:

	.text-s{1-4}   size, 1 = largest (and the leading that goes with it)
	.text-b{1-3}   weight, 1 = heaviest

   Subtitles have a fixed weight — no b axis. Title is unique.

   ── Colour ─────────────────────────────────────────────────

   A semantic colour here is the RAW token, not a contrast-checked
   reading of it: `.text-primary` must show primary, and an author
   who puts it on a dark panel wants to see that it fails rather
   than get a silently different blue. It is the same bargain
   `.link-primary` makes. Each prefix gets its own eight —
   `.title-primary` rather than borrowing `.text-primary` —
   because a class has to be an axis of its own component
   (ADR 0009).
   ============================================================ */
/* ------------------------------------------------------------
   structure — .title, .subtitle-s{1,2}, .text-s{1-4}, .text-b{1-3},
   and the colour axis of all three.
   ------------------------------------------------------------ */
/* peony — textarea.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   textarea.scss — .textarea

   Plumbing contract:
	--input-color   resolved border/accent color (same as input.scss)
	--fontsize      font size (set by size-variants classes)

   External variables (theme / family):
	--color-surface-1 / --color-surface-2 / --color-on-surface
	--color-{variant}       semantic accent (set by color-variants)
	--border / --radius-field
	--depth                 flat-skin inset intensity (skin-flat only)
	--shadow-light          family shadow system
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: sizing, inner <textarea> handling, focus ring,
   disabled state.
   ------------------------------------------------------------ */
/* peony — toggle.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   toggle.scss — .toggle (checkbox-based switch)

   Plumbing contract:
	--input-color   track/thumb color (color-variants set it on :checked)
	--size          toggle height (1.5em, scales with font); width derived
	--toggle-p      inner padding between track border and thumb
	--fontsize      font size (set by size-variants classes)
	--radius-selector-max  workaround for PostCSS/Nuxt calc(min(calc())) error

   External variables (theme / family):
	--color-surface-1        track background when checked
	--color-on-surface    thumb color when checked
	--color-{variant}       checked color (color-variants)
	--border                border width — MUST carry a unit (0px, not 0):
	                        it is summed with lengths in the width calc()
	--radius-selector       thumb and track corner radius
	--shadow-light          family shadow system
   ============================================================ */
/* ------------------------------------------------------------
   structure — structure: grid track, sliding thumb, optional icons,
   checked/indeterminate states, focus ring, disabled.
   ------------------------------------------------------------ */
/* peony — validator.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   validator.scss — .validator (validation states)

   Exported variable (injected into sibling field components):
	--input-color   overrides the field border/focus color;
	                consumed by .input, .select, .textarea, .checkbox, …

   Usage: add .validator to a field component; .validator-hint is
   the sibling element shown on error.
   ============================================================ */
/* ------------------------------------------------------------
   structure — valid/invalid color driving + error hint.
   ------------------------------------------------------------ */
/* peony — dialog.
   Everything daisy draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   dialog.scss — .dialog (built on the <dialog> element)

   The element covers the viewport and lays its box out on a grid;
   whatever is not the box is the overlay, so a click there lands
   on the <dialog> itself. Behind it, `::backdrop` is the browser's
   own layer — opened with showModal(), it shades the page; opened
   with show(), there is none and the page stays usable.

	<dialog class="dialog">
	  <div class="dialog-box">
	    <form method="dialog"><button class="dialog-close" aria-label="Close">…</button></form>
	    <h2 class="dialog-title">Delete 3 rows?</h2>
	    <div class="dialog-body">…</div>
	    <form method="dialog" class="dialog-actions">
	      <button class="btn" value="cancel">Cancel</button>
	      <button class="btn btn-error" value="delete">Delete</button>
	    </form>
	  </div>
	</dialog>

   Motion is the family's: the wrapper marks the box `data-motion`
   ("enter" / "leave") and waits for what the look draws (see Motion).

   Plumbing contract (the family fills these on `.dialog`):
	--dialog-backdrop      the shade behind a modal dialog
	--dialog-bg / --dialog-fg
	--dialog-border / --dialog-border-width
	--dialog-radius / --dialog-shadow
	--dialog-p             box padding
	--dialog-gap           space between title, body and actions
	--dialog-width         the box's preferred width
	--dialog-margin        room kept free around the box
	--dialog-title-size / --dialog-title-weight
	--dialog-close-size    the close button's side
	--dialog-close-hover   its fill on hover
	--fontsize             font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the overlay, the box, its parts and placements.
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   look — Radix's dialog: a panel on the first ground, a hairline,
   a long soft shadow, over a light shade.
   ------------------------------------------------------------ */
/* peony — dropdown.
   Everything daisy draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   dropdown.scss — .dropdown (a trigger and a floating box)

   The box is hidden until the dropdown is open. Without a script,
   three things open it: a `<details class="dropdown">` that is
   [open], keyboard or pointer focus inside the dropdown, or the
   `.dropdown-open` class written by whoever drives it.

	<details class="dropdown">
	  <summary class="btn">Sort</summary>
	  <div class="dropdown-content"> <ul class="menu">…</ul> </div>
	</details>

   The box sits under the trigger, in `position: absolute`: an
   ancestor with `overflow: hidden` crops it. The Svelte wrapper
   writes `.dropdown-fixed` and places the box itself, in fixed
   coordinates, which no overflow crops.

   Motion is the family's: the wrapper marks the box `data-motion`
   ("enter" / "leave") and waits for what the look draws (see Motion).

   Plumbing contract (the family fills these on `.dropdown`):
	--dropdown-bg / --dropdown-fg
	--dropdown-border / --dropdown-border-width
	--dropdown-radius / --dropdown-shadow
	--dropdown-p          padding inside the box
	--dropdown-gap        distance between the trigger and the box
	--dropdown-z          stacking order of the box
	--fontsize            font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the anchor, the box, open states, sides.
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   look — Radix's menu panel: the first ground, a hairline and a
   soft lifted shadow.
   ------------------------------------------------------------ */
/* peony — table.
   Everything daisy draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   table.scss — .table (a real <table>)

	<div class="table-scroll">
	  <table class="table">
	    <thead>
	      <tr class="table-head">
	        <th class="table-cell table-sticky" aria-sort="ascending">
	          <button class="table-sort">Name</button>
	        </th>
	        <th class="table-cell">Email</th>
	      </tr>
	    </thead>
	    <tbody>
	      <tr class="table-row table-row-selected">
	        <td class="table-cell table-sticky">Ada</td>
	        <td class="table-cell">ada@…</td>
	      </tr>
	      <tr><td class="table-empty" colspan="2">Nothing yet</td></tr>
	    </tbody>
	  </table>
	</div>

   A row paints through its cells, not on itself: the row sets
   --table-row-bg and every cell fills with it. That is what lets a
   sticky cell stay opaque while the others scroll under it, in
   every state the row can take (zebra, hover, selected).

   Columns are sized on their header cell: a width is honoured as a
   minimum, and the text wraps inside it. Sticky columns are offset
   by the wrapper (`inset-inline-start`, inline), which measures the
   sticky columns before them.

   Plumbing contract (the family fills these on `.table-scroll`):
	--table-frame / --table-frame-width   the frame's line
	--table-frame-radius / --table-frame-shadow

   … and these on `.table`:
	--table-bg / --table-fg
	--table-cell-py / --table-cell-px
	--table-head-fg / --table-head-size / --table-head-weight
	--table-head-bg
	--table-border          the line between rows
	--table-stripe          the fill of every other row (zebra)
	--table-hover           the fill of a hovered row
	--table-selected        the fill of a selected row
	--table-dirty           the mark of a row with unsaved changes
	--table-sticky-shadow   the edge a sticky column casts
	--fontsize              font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — scrolling, cells, sticky columns and head, states.
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   look — Radix's surface table: a hairline frame, a quiet head on
   the second ground, rows ruled in the border colour.
   ------------------------------------------------------------ */
/* peony — grid.
   Everything daisy draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   grid.scss — .grid (items in as many columns as fit)

	<div class="grid">
	  <div class="grid-item grid-item-selected"> <div class="card">…</div> </div>
	  <div class="grid-item">…</div>
	</div>

   Intrinsic: a column is at least --grid-min wide, and as many as
   fit share the width. No breakpoint — the item size is in em, so
   a size variant changes how many columns there are.

   Masonry is the Svelte wrapper's: it reads how many columns the
   grid made, deals the items into that many `.grid-lane`s in turn,
   and writes `.grid-masonry`. The reading order stays row by row.
   Without a script there is no masonry.

   Plumbing contract (the family fills these on `.grid`):
	--grid-min            the narrowest a column may be
	--grid-gap            space between items
	--grid-radius         the corners the selection ring follows
	--grid-selected       the selection ring
	--grid-dirty          the mark of an item with unsaved changes
	--fontsize            font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the auto-fill grid, the masonry lanes, states.
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   look — a quiet grid: the box radius, a primary ring.
   ------------------------------------------------------------ */
/* peony — kanban.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   kanban.scss — .kanban (items in columns, one per state)

	<div class="kanban">
	  <section class="kanban-column">
	    <header class="kanban-column-head">
	      <span class="kanban-column-title">To do</span>
	      <span class="kanban-column-count">2</span>
	    </header>
	    <div class="kanban-column-empty">…</div>   (an empty column)
	    <ul class="kanban-column-body">
	      <li class="kanban-entry">
	        <div class="kanban-marker"></div>       (while dragging)
	        <div class="kanban-item"> <div class="card">…</div> </div>
	      </li>
	    </ul>
	    <footer class="kanban-column-foot">…</footer>
	  </section>
	</div>

   Intrinsic: a column is at least --kanban-column-width wide and
   shares what is left. No breakpoint: when they stop fitting the
   board scrolls sideways. Give it a height and each column scrolls
   on its own.

   What an item looks like is the caller's, a card usually. Dragging
   and the marker are the Svelte wrapper's. The body holds nothing but
   entries: an entry is the element that comes, goes and moves (the
   motion is on it), and it holds its item, and the drop marker when
   the item in flight would land before it (or after it, the last).

   Plumbing contract (the family fills these on `.kanban`):
	--kanban-gap                  space between columns
	--kanban-p                    padding inside a column
	--kanban-item-gap             space between items
	--kanban-column-width         the narrowest a column may be
	--kanban-column-bg            column fill
	--kanban-column-over-bg       column fill while dragging over it
	--kanban-column-fg            column ink
	--kanban-column-border        column border colour
	--kanban-column-border-width  column border width (0 = none)
	--kanban-column-radius        column corners
	--kanban-column-shadow        column box-shadow
	--kanban-title-weight         title font-weight
	--kanban-count-bg             count fill
	--kanban-count-fg             count ink
	--kanban-empty-fg             ink of an empty column's content
	--kanban-item-radius          corners the rings follow
	--kanban-item-selected        the selection and focus ring
	--kanban-item-dirty           the mark of an item with unsaved changes
	--kanban-marker               the drop marker's colour
	--kanban-marker-size          its thickness
	--fontsize                    font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — the row of columns, the drop marker, states.
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   look — a soft column, washed with the primary, no edge.
   ------------------------------------------------------------ */
/* peony — data-control.
   Everything daisy draws for this component, and nothing another
   family reads: `structure` is the mechanism (layout, states,
   intrinsic sizing, the slots), `look` is the values and the
   variants. Two mixins, because index.scss emits every structure
   before any look (ADR 0010). */
/* ============================================================
   data-control.scss — .data-control (the controls of a data
   handler, around the view that shows its rows)

	<div class="data-control">
	  <div class="data-control-bar">
	    <div class="data-control-bar-left">  filters, sort, search  </div>
	    <div class="data-control-bar-right"> page size, count, actions </div>
	  </div>
	  <div class="data-control-filters">
	    <span class="chip data-control-filter">
	      <button>Status: active</button>
	      <button class="data-control-filter-remove">×</button>
	    </span>
	  </div>
	  <div class="data-control-pagination">
	    <span class="data-control-range">1–10 / 120</span> <nav class="pagination">…</nav>
	  </div>
	  <div class="data-control-body"> the table, grid or list </div>
	</div>

   The buttons, fields, chips and pagination inside are the kit's
   own components; this file only lays them out. A family may draw
   the whole thing as a container (`.data-control-boxed`), whatever
   view sits in the body.

   Plumbing contract (the family fills these on `.data-control`):
	--data-control-gap       space between the bar, filters, body
	--data-control-bar-gap   space between controls in a row
	--data-control-bg / --data-control-fg
	--data-control-border / --data-control-border-width
	--data-control-radius / --data-control-shadow
	--data-control-p         padding (0 unless boxed)
	--data-control-muted     the ink of the range and the count
	--data-control-search    the search field's width
	--data-control-editor    the width of a filter's editor
	--fontsize               font size (set by size-variants classes)
   ============================================================ */
/* ------------------------------------------------------------
   structure — rows of controls, the chips, the pagination row,
   the body.
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   look — open by default; boxed, a Radix card.
   ------------------------------------------------------------ */
/* peony — divider.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   divider.scss — .divider (a rule, with or without content)

   	<hr class="divider">
   	<div class="divider" role="separator"><span class="divider-content">or</span></div>

      Two lines drawn by ::before / ::after around the content; an
      empty divider (and every <hr>) drops the second one.

      Plumbing contract:
   	--divider-color       the line's colour
   	--divider-line        the paint of the first line (a colour or a gradient)
   	--divider-line-end    the paint of the second line
   	--divider-dir         gradient direction (90deg, 180deg when vertical)
   	--divider-thickness   line thickness
   	--divider-gap         space between a line and the content
   	--divider-stub        length of the short line when aligned start / end
   	--divider-m           margin on the axis across the line
   	--divider-fg          the content's ink
   ============================================================ */
/* peony — alert.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   alert.scss — .alert (an inline message: info, success, warning, error)

   	<div class="alert alert-info" role="status">
   	  <span class="alert-icon">…</span>
   	  <div class="alert-body"><p class="alert-title">Saved</p>Your changes are live.</div>
   	  <div class="alert-actions">…</div>
   	  <button class="alert-close" aria-label="Dismiss">×</button>
   	</div>

      Default: a soft tint of the colour. `alert-outline` keeps the page
      behind it, `alert-solid` fills with the colour itself.

      Plumbing contract:
   	--alert-color          seed colour (colour variants)
   	--alert-bg / --alert-fg / --alert-border
   	--alert-accent         icon and title ink
   	--alert-radius / --alert-shadow / --alert-border-width
   	--alert-p / --alert-gap
   	--fontsize             font size (size variants)
   ============================================================ */
/* peony — toast.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   toast.scss — .toast (alerts that pile up)

	<section class="toast" aria-live="polite">
	  <div class="alert alert-success">…</div>
	  <div class="alert">…</div>
	</section>

   A stack of .alert, one under the other, in the flow of the page.
   Give it a corner — a side, an align, or both — and it is pinned
   there in fixed position, the newest alert against the edge; then
   it lets clicks through everywhere but on the alerts themselves.

   Plumbing contract:
	--toast-gap     space between alerts
	--toast-m       distance from the viewport's edges, when pinned
	--toast-width   the stack's width
	--toast-shadow  the shadow a pinned alert casts
   ============================================================ */
/* peony — tooltip.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   tooltip.scss — .tooltip (a hint shown on hover and focus)

   	<span class="tooltip tooltip-top">
   	  <button class="btn" aria-describedby="tip-1">Save</button>
   	  <span class="tooltip-content" role="tooltip" id="tip-1">Ctrl + S</span>
   	</span>

      Pure CSS: the bubble is absolutely placed on one side of the
      trigger and shown by :hover / :focus-within. It does not move to
      stay on screen (anchor positioning is under the 90 % bar).

      Plumbing contract:
   	--tooltip-bg / --tooltip-fg / --tooltip-border
   	--tooltip-radius / --tooltip-shadow
   	--tooltip-p            bubble padding
   	--tooltip-gap          distance from the trigger
   	--tooltip-arrow        arrow size (0 hides it)
   	--tooltip-max          maximum width
   ============================================================ */
/* peony — collapse.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   collapse.scss — .collapse (a panel that folds under its trigger)

   	<div class="collapse collapse-arrow">
   	  <button class="collapse-trigger" aria-expanded="true" aria-controls="p1">Shipping</button>
   	  <div class="collapse-panel" id="p1" role="region">
   	    <div class="collapse-inner">…</div>
   	  </div>
   	</div>

      Not <details>: a button and a region, so the height can animate
      (grid rows 0fr -> 1fr) and any element can be the trigger. The
      closed panel is `inert` (set by the wrapper).

      Plumbing contract:
   	--collapse-bg / --collapse-fg / --collapse-border / --collapse-border-width
   	--collapse-radius / --collapse-shadow
   	--collapse-p           trigger and content padding
   	--collapse-hover       trigger fill on hover
   	--collapse-speed       the fold's duration
   ============================================================ */
/* peony — editable.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values
   (ADR 0010). */
/* ============================================================
   editable.scss — .editable (a value that turns into its editor)

   	<div class="editable">
   	  <button type="button" class="editable-display">Rollback</button>
   	</div>

   	<div class="editable">
   	  <div class="editable-form" role="group"><input class="input" …></div>
   	</div>

   At rest the value is a button: the whole value is the target, and the
   pointer finds a wash that says "this can change". Open, the editor is
   another component (.input, .number-input, .toggle, .chips-input…) in
   .editable-form.

   Parts:   .editable-display  the value at rest: a button, or a span when only
                               `editing` opens it
            .editable-empty    the placeholder of an empty value
            .editable-form     the frame around the editor
            .editable-list     the row of checkboxes of a boolean list

   Plumbing contract:
	--editable-fg          ink of the value
	--editable-empty-fg    ink of the placeholder
	--editable-hover-bg    fill under the pointer
	--editable-radius      corner radius of the display
	--editable-pad         how far the wash and the focus ring reach past the value
	--editable-focus       focus ring colour
   ============================================================ */
/* peony — accordion.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   accordion.scss — .accordion (a stack of collapses)

   	<div class="accordion">
   	  <div class="collapse">…</div>
   	  <div class="collapse">…</div>
   	</div>

      Joined by default: the collapses share their edges and only the
      outer corners are rounded. `accordion-separate` keeps them apart.
      Opening one closing the others is the wrapper's job (`exclusive`).

      Plumbing contract:
   	--accordion-gap   space between separate collapses
   ============================================================ */
/* peony — rating.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   rating.scss — .rating (a score picked from a row of icons)

   	<div class="rating" role="radiogroup" aria-label="Rating">
   	  <input type="radio" class="rating-item" name="r" value="1" aria-label="1 star">
   	  <input type="radio" class="rating-item" name="r" value="2" aria-label="2 stars" checked>
   	  …
   	</div>

      Real radios, each drawn as an icon through a mask. Every item up to
      the checked one is filled; hovering previews the score.

      Plumbing contract:
   	--rating-on / --rating-off   filled and empty icon colours
   	--rating-size                one icon's side
   	--rating-gap                 space between icons
   	--rating-mask                the icon (a mask image; a star by default)
   ============================================================ */
/* peony — switch.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   switch.scss — .switch (one choice among a few, as a pill track)

   	<div class="switch" role="radiogroup" aria-label="View">
   	  <label class="switch-item"><input type="radio" class="switch-input" name="v" value="list" checked>List</label>
   	  <label class="switch-item"><input type="radio" class="switch-input" name="v" value="grid">Grid</label>
   	</div>

      Real radios laid invisibly over their labels: keyboard, forms and
      screen readers work as for any radio group.

      Plumbing contract:
   	--switch-x / --switch-w  the indicator's place (set by the script)
   	--switch-bg / --switch-border / --switch-border-width
   	--switch-radius / --switch-item-radius
   	--switch-pad          the track's inner padding
   	--switch-fg           an idle item's ink
   	--switch-active-bg / --switch-active-fg / --switch-active-shadow
   	--size                   an item's height
   ============================================================ */
/* peony — number-input.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   number-input.scss — .number-input (a number, aligned to the end;
   −/+ buttons around it with the `controls` prop)

   	<div class="number-input">
   	  <button type="button" class="number-input-dec" aria-label="Decrease">−</button>
   	  <input type="text" inputmode="decimal" class="number-input-field" value="2">
   	  <button type="button" class="number-input-inc" aria-label="Increase">+</button>
   	</div>

      One field-shaped frame: the native spinners are hidden. The two
      buttons are only there with `controls`; without them the field is
      alone, its figure aligned to the end like a number in a column.

      Plumbing contract:
   	--number-input-bg / --number-input-fg / --number-input-border
   	--number-input-border-width / --number-input-radius
   	--number-input-btn-bg / --number-input-btn-hover
   	--number-input-width   the field's width
   	--number-input-focus   the ring around the frame when focused
   	--size                 height
   ============================================================ */
/* peony — empty-state.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   empty-state.scss — .empty-state (what to show when there is nothing)

   	<div class="empty-state">
   	  <div class="empty-state-icon">…</div>
   	  <p class="empty-state-title">No results</p>
   	  <p class="empty-state-body">Try another search.</p>
   	  <div class="empty-state-actions"><button class="btn">Clear filters</button></div>
   	</div>

      A centred column. Made to sit in the `empty` slot of a Table, a
      Grid or a List, or anywhere a collection has nothing to show.

      Plumbing contract:
   	--empty-state-fg / --empty-state-muted   title ink and body ink
   	--empty-state-icon-bg / --empty-state-icon-fg / --empty-state-icon-size
   	--empty-state-p / --empty-state-gap
   	--empty-state-border / --empty-state-radius   the dashed frame
   ============================================================ */
/* peony — hero.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   hero.scss — .hero (the large opening block of a page)

   	<section class="hero">
   	  <div class="hero-content">
   	    <h1 class="hero-title">Build faster</h1>
   	    <p class="hero-body">…</p>
   	    <div class="hero-actions">…</div>
   	  </div>
   	  <div class="hero-media"><img …></div>
   	</section>

      Text and media side by side when there is room, stacked when there
      is not: a wrapping flex row with minimum widths, no breakpoint.

      Plumbing contract:
   	--hero-bg / --hero-fg / --hero-muted
   	--hero-p / --hero-gap
   	--hero-title-size / --hero-title-weight
   	--hero-radius / --hero-media-radius
   ============================================================ */
/* peony — footer.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   footer.scss — .footer (the closing block of a page)

   	<footer class="footer">
   	  <div class="footer-sections">
   	    <nav class="footer-section">
   	      <h2 class="footer-title">Product</h2>
   	      <a href="…">Pricing</a>
   	    </nav>
   	  </div>
   	  <div class="footer-bottom">© 2026 …</div>
   	</footer>

      Columns fill the width as room allows (auto-fit grid), no breakpoint.

      Plumbing contract:
   	--footer-bg / --footer-fg / --footer-muted / --footer-border
   	--footer-p / --footer-gap
   	--footer-col     minimum column width
   ============================================================ */
/* peony — mobile-frame.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   mobile-frame.scss — .mobile-frame (a phone drawn around content)

   	<div class="mobile-frame">
   	  <div class="mobile-frame-screen">…</div>
   	</div>

      A drawing, not a device emulator: a rounded body, an island at the
      top, a side button. The screen scrolls its own content.

      Plumbing contract:
   	--mobile-frame-width     the phone's width (its height follows, 9 / 19.5)
   	--mobile-frame-body      the body's colour
   	--mobile-frame-bezel     the band around the screen
   	--mobile-frame-radius    the body's corners
   	--mobile-frame-screen-bg / --mobile-frame-screen-fg
   	--mobile-frame-shadow
   ============================================================ */
/* peony — window-frame.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   window-frame.scss — .window-frame (an application window drawn around content)

   	<div class="window-frame">
   	  <div class="window-frame-bar">
   	    <span class="window-frame-controls"><span></span><span></span><span></span></span>
   	    <span class="window-frame-title">Settings</span>
   	    <span class="window-frame-actions">…</span>
   	  </div>
   	  <div class="window-frame-body">…</div>
   	</div>

      A title bar with three window controls, a centred title and room for
      actions on the right, above a body that scrolls.

      Plumbing contract:
   	--window-frame-bg / --window-frame-fg       the body
   	--window-frame-bar-bg / --window-frame-bar-fg
   	--window-frame-border / --window-frame-border-width
   	--window-frame-radius / --window-frame-shadow
   	--window-frame-dot-1 / -2 / -3              the three controls
   ============================================================ */
/* peony — laptop-frame.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   laptop-frame.scss — .laptop-frame (a laptop drawn around content)

   	<div class="laptop-frame">
   	  <div class="laptop-frame-lid"><div class="laptop-frame-screen">…</div></div>
   	  <div class="laptop-frame-base"></div>
   	</div>

      The lid holds a 16:10 screen that scrolls its own content; the base
      is wider than the lid, with the opening notch at its front edge.

      Plumbing contract:
   	--laptop-frame-width     the base's width (the lid is 84 % of it)
   	--laptop-frame-body / --laptop-frame-base   lid and base colours
   	--laptop-frame-bezel     the band around the screen
   	--laptop-frame-screen-bg / --laptop-frame-screen-fg
   	--laptop-frame-shadow
   ============================================================ */
/* peony — drawer.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   drawer.scss — .drawer (a panel sliding in from a side)

   	<aside class="drawer drawer-left" data-state="peek">
   	  <div class="drawer-content">…</div>
   	  <button class="drawer-handle" aria-label="Open"></button>
   	</aside>

      Three states, written as data-state: hidden (out of view), peek (the
      last --drawer-peek of it in view) and open (all --drawer-size of it).
      Any side; left by default. Fixed to the viewport by default —
      --drawer-position: absolute keeps it inside a positioned container.

      It may be a <dialog>: opened modal it gets the browser's backdrop.
      A dialog's own UA box (margins, max sizes) is reset here.

      Plumbing contract:
   	--drawer-size / --drawer-peek     open extent and peeking extent
   	--drawer-position                 fixed (default) or absolute
   	--drawer-bg / --drawer-fg / --drawer-border / --drawer-shadow
   	--drawer-radius                   the inner corners
   	--drawer-p                        content padding
   	--drawer-backdrop                 the shade behind a modal drawer
   	--drawer-speed                    the slide's duration
   	--drawer-handle-bg / --drawer-handle-w / --drawer-handle-l
   ============================================================ */
/* peony — sidebar.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   sidebar.scss — .sidebar (an app's side column, folding to a rail)

	<div class="sidebar-layout">
	  <aside class="sidebar">
	    <div class="sidebar-head">… <button class="sidebar-toggle" aria-expanded="true">…</button></div>
	    <div class="sidebar-body"> <ul class="menu">…</ul> </div>
	    <div class="sidebar-foot">…</div>
	  </aside>
	  <main>…</main>
	</div>

   In the flow, unlike a drawer: the page beside it gets narrower or
   wider, it never covers it. `.sidebar-collapsed` folds it to a rail
   (--sidebar-rail) where only the toggle — and whatever the author
   marks `.sidebar-keep` — stays; the rest fades out as it closes.
   `.sidebar-end` puts it on the other side. `.sidebar-layout` is the
   optional row it sits in: the sidebar, then the page filling the
   rest, both as tall as the viewport.

   Plumbing contract:
	--sidebar-width / --sidebar-rail   open and folded widths
	--sidebar-bg / --sidebar-fg
	--sidebar-border / --sidebar-border-width / --sidebar-shadow
	--sidebar-p / --sidebar-gap
	--sidebar-speed                    the fold's timing
   ============================================================ */
/* peony — steps.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   steps.scss — .steps (where the user is in a journey)

   	<nav class="steps" aria-label="Progress">
   	  <ol class="steps-list">
   	    <li class="steps-item" data-state="complete">
   	      <div class="steps-track">
   	        <button class="steps-marker">✓</button>
   	        <button class="steps-segment" data-state="complete"><span></span></button>
   	        <button class="steps-segment" data-state="complete"><span></span></button>
   	      </div>
   	      <p class="steps-label"><span>Basics</span></p>
   	    </li>
   	    <li class="steps-item" data-state="current">…
   	      <p class="steps-sublabel">Pricing</p>
   	    </li>
   	  </ol>
   	</nav>

      One column per step, one bar per sub-step (a step with none has one
      bar). States are data-state attributes: current, visited, complete,
      unknown; data-issue="error|warning" flags a bar that needs looking at.
      `steps-compact` drops markers and labels for a heading above.

      Plumbing contract:
   	--steps-color            the journey's colour
   	--steps-off              an unreached bar or ring
   	--steps-visited          a visited bar
   	--steps-warning / --steps-error
   	--steps-bar              bar thickness
   	--steps-marker           the disc's side
   	--steps-marker-bg / --steps-marker-fg
   	--steps-gap / --steps-seg-gap
   	--steps-fg / --steps-muted
   ============================================================ */
/* peony — combobox.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   combobox.scss — .combobox (a field that looks its value up in a list)

   	<div class="combobox">
   	  <label class="input">
   	    <input role="combobox" aria-expanded="true" aria-controls="l1" aria-autocomplete="list">
   	    <ul id="l1" class="list list-suggestions" role="listbox">
   	      <li class="list-row combobox-option" role="option" aria-selected="false">France</li>
   	    </ul>
   	  </label>
   	  <select name="country" hidden><option value="fr" selected>France</option></select>
   	</div>

      Integration, not a new field: the frame is the family's .input and the
      list its .list-suggestions (ADR 0009 — a file may reference another
      namespace). This file adds what those do not draw: the check of a
      multiple combobox, the keyboard-active row of a multiple list (whose
      aria-selected means "checked"), and the size scale.

      Plumbing contract:
   	--combobox-check          the check box's colour when ticked
   	--combobox-check-fg       the tick
   	--combobox-check-border   the empty box
   	--combobox-active         the keyboard row of a multiple list
   ============================================================ */
/* peony — chips-input.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   chips-input.scss — .chips-input (a field that feeds a list of chips)

	<div class="chips-input">
	  <input class="input" placeholder="Add a city">
	  <ul class="chips-input-list">
	    <li class="chip">Lyon<button class="chips-input-remove" aria-label="Remove Lyon">×</button></li>
	  </ul>
	</div>

   A utility, not a field: the field is any component — an Input, a
   Select, a Combobox — and keeps its own frame; the values it commits
   pile up as the family's .chip in a list BESIDE it, never inside.
   `.chips-input-top|start|end` moves the list (below by default).

   Plumbing contract:
	--chips-input-gap        between the field and the list
	--chips-input-list-gap   between two chips
	--chips-input-side-min   the field's minimum width when side by side
   ============================================================ */
/* peony — file-explorer.
   Everything peony draws for this component, and nothing another
   family reads: `structure` is the mechanism, `look` the values and
   the variants (ADR 0010). */
/* ============================================================
   file-explorer.scss — .file-explorer (files and folders, Drive-like)

   	<div class="file-explorer">
   	  <div class="file-explorer-toolbar">
   	    <nav class="breadcrumbs file-explorer-path">…</nav>
   	    <div class="file-explorer-actions">…</div>
   	    <div class="file-explorer-views"><button class="file-explorer-view" aria-pressed="true">…</button>…</div>
   	  </div>
   	  <div class="file-explorer-main">
   	    <nav class="file-explorer-tree"><ul role="tree"><li role="treeitem">
   	      <button class="file-explorer-tree-item"><span class="file-explorer-twisty"></span>…</button>
   	    </li></ul></nav>
   	    <div class="file-explorer-content">
   	      <table class="file-explorer-table">… <tr class="file-explorer-item" aria-selected="true">…</tr></table>
   	      <!-- or --> <ul class="file-explorer-grid"><li class="file-explorer-item">…</li></ul>
   	    </div>
   	    <aside class="file-explorer-details">…</aside>
   	  </div>
   	</div>

      Three zones — the folder tree, the current folder's content (a list
      or a grid), the details of the selection — under a toolbar holding the
      path (the family's .breadcrumbs), the caller's actions and the view
      toggle. Selection is aria-selected; a drop target carries data-drop.

      Plumbing contract:
   	--file-explorer-bg / --file-explorer-fg / --file-explorer-muted
   	--file-explorer-border / --file-explorer-border-width / --file-explorer-radius
   	--file-explorer-pane      the tree and toolbar ground
   	--file-explorer-hover / --file-explorer-selected / --file-explorer-selected-fg
   	--file-explorer-folder    the folder icon's colour
   	--file-explorer-drop      the outline of a drop target
   	--file-explorer-height / --file-explorer-tree-width / --file-explorer-details-width
   	--file-explorer-shadow    the context menu's shadow
   ============================================================ */
/* ============================================================
   STYLE FAMILY — « peony »  (soft SaaS dashboard)

   A peony is a heavy, rounded flower that sits in a vase on a
   desk. The look is the friendly dashboard of the 2020s: a warm
   tinted page, white cards floating on it, no hairlines but a
   wide diffuse shadow, generous corners, muted secondary text,
   and colour used in pale washes — the icon on a tinted disc,
   the active tab on a soft pill, the status as a dot.

   What it departs from:
     - dahlia separates by stacking grounds; peony separates by
       LIFTING: a card is white on a tinted page and its edge is a
       shadow, not a border.
     - The page has its own colour, `--color-page`, distinct from
       the white of the objects resting on it. Fields, cards and
       menus stay on `--color-surface-1`.
     - The primary is a colour like any other; the default theme
       makes it near-black, the way these dashboards draw their one
       loud button.

   Own parameters:
     - `peony-shadow`  how far the shadow spreads (0 = flat).
     - `peony-glow`    how much the shadow takes the element's own
                       colour instead of grey (0 grey, 1 coloured).
     - `peony-tint`    strength of the pale washes (soft variants,
                       active tabs and menu items, chips).

   Build: static/families/peony.css via `pnpm run build:css`.
   ============================================================ */
:where(:root) {
  --color-page: #faf6f0;
  --color-surface-1: #ffffff;
  --color-surface-2: #f6f3ee;
  --color-surface-3: #efebe5;
  --color-surface-4: #e6e1da;
  --color-border: #e0dbd3;
  --color-on-surface: #1d1d1f;
  --color-primary: #161616;
  --color-neutral: #8b8681;
  --color-info: #7fb8ec;
  --color-success: #8fd16a;
  --color-warning: #f8b84e;
  --color-error: #ef5f78;
  --radius-field: 0.625rem;
  --radius-box: 1rem;
  --radius-selector: 0.375rem;
  --border: 1px;
  --scale: 1;
  --peony-shadow: 1;
  --peony-glow: 0;
  --peony-tint: 1;
}

/*! uu-params [{"name":"color-page","label":"Page","group":"Colors","type":"color","value":"#faf6f0","description":"The page behind the objects, when a family tints it apart from them.","kind":"surface","on":"color-on-surface"},{"name":"color-surface-1","label":"Surface 1","group":"Colors","type":"color","value":"#ffffff","description":"The ground: page background, and the inside of fields.","kind":"surface","on":"color-on-surface"},{"name":"color-surface-2","label":"Surface 2","group":"Colors","type":"color","value":"#f6f3ee","description":"Objects resting on the ground: plain buttons, chips, skeletons.","kind":"surface","on":"color-on-surface"},{"name":"color-surface-3","label":"Surface 3","group":"Colors","type":"color","value":"#efebe5","description":"Chrome pinned to the edge of the screen: dock, navbar.","kind":"surface","on":"color-on-surface"},{"name":"color-surface-4","label":"Surface 4","group":"Colors","type":"color","value":"#e6e1da","description":"A fourth ground, for looks that stack more levels.","kind":"surface","on":"color-on-surface"},{"name":"color-border","label":"Border","group":"Colors","type":"color","value":"#e0dbd3","description":"Hairlines, field outlines, dividers.","kind":"ink"},{"name":"color-on-surface","label":"Text","group":"Colors","type":"color","value":"#1d1d1f","description":"Text and icons drawn on the surfaces.","kind":"ink"},{"name":"color-primary","label":"Primary","group":"Colors","type":"color","value":"#161616","description":"Main brand and action colour.","kind":"accent","on":"color-on-primary"},{"name":"color-neutral","label":"Neutral","group":"Colors","type":"color","value":"#8b8681","description":"Strong neutral tone for filled, unbranded elements.","kind":"accent","on":"color-on-neutral"},{"name":"color-info","label":"Info","group":"Colors","type":"color","value":"#7fb8ec","description":"Informational state.","kind":"accent","on":"color-on-info"},{"name":"color-success","label":"Success","group":"Colors","type":"color","value":"#8fd16a","description":"Success state.","kind":"accent","on":"color-on-success"},{"name":"color-warning","label":"Warning","group":"Colors","type":"color","value":"#f8b84e","description":"Warning state.","kind":"accent","on":"color-on-warning"},{"name":"color-error","label":"Error","group":"Colors","type":"color","value":"#ef5f78","description":"Error and danger state.","kind":"accent","on":"color-on-error"},{"name":"radius-field","label":"Field radius","group":"Shape","type":"length","value":"0.625rem","description":"Buttons, inputs, selects. Soft, never sharp.","min":0,"max":1.5,"step":0.025,"unit":"rem","units":["px","rem","em"]},{"name":"radius-box","label":"Box radius","group":"Shape","type":"length","value":"1rem","description":"Cards, menus, dialogs — the big rounded panels.","min":0,"max":2.5,"step":0.05,"unit":"rem","units":["px","rem","em"]},{"name":"radius-selector","label":"Selector radius","group":"Shape","type":"length","value":"0.375rem","description":"Checkboxes, toggles, chips and tabs.","min":0,"max":1.5,"step":0.025,"unit":"rem","units":["px","rem","em"]},{"name":"border","label":"Hairline width","group":"Shape","type":"length","value":"1px","description":"Field outlines. Cards draw none: their edge is the shadow.","min":0,"max":3,"step":0.5,"unit":"px","units":["px","rem","em"]},{"name":"scale","label":"Element size","group":"Size","type":"number","value":"1","description":"Grows every frame — paddings, heights, spacing. Text is unaffected.","min":0.75,"max":2,"step":0.05},{"name":"peony-shadow","label":"Shadow spread","group":"Effects","type":"number","value":"1","description":"How wide and soft the lift is. 0 flattens everything onto the page.","min":0,"max":3,"step":0.1},{"name":"peony-glow","label":"Coloured shadow","group":"Effects","type":"number","value":"0","description":"How much a coloured element casts its own colour instead of grey.","min":0,"max":1,"step":0.05},{"name":"peony-tint","label":"Wash strength","group":"Effects","type":"number","value":"1","description":"How strong the pale washes are: soft buttons, chips, active tabs.","min":0,"max":3,"step":0.1}] */
/* Family-owned: separation by lifting, not by stacking. */
:root {
  --depth: 0;
  --light-intensity: 1;
  --light-depth: 1;
}

/* The structure of every component first, then the look of every
   component: a look always comes later in the cascade than any
   structure, whichever file it sits in. */
.avatar {
  position: relative;
  display: inline-grid;
  flex: none;
  box-sizing: border-box;
  width: var(--avatar-size);
  height: var(--avatar-size);
  padding: var(--avatar-ring-width);
  vertical-align: middle;
  background-color: var(--avatar-ring);
  border: var(--avatar-border-width) solid var(--avatar-border);
  border-radius: var(--avatar-radius);
  box-shadow: var(--avatar-shadow);
  mask: var(--avatar-mask);
  rotate: var(--avatar-rotate, 0deg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  line-height: 1;
  user-select: none;
}

/* The picture or the initials: whatever the avatar holds fills it. */
.avatar > * {
  grid-area: 1/1;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  object-fit: cover;
  border: var(--avatar-gap-width) solid var(--avatar-gap);
  border-radius: var(--avatar-inner-radius);
  mask: var(--avatar-mask);
  background-color: var(--avatar-bg);
  color: var(--avatar-fg);
  font-weight: var(--avatar-weight, 400);
}

/* ── Axis: size ── */
.avatar-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.avatar-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.avatar-md {
  --fontsize: var(--md, var(--default-md));
}

.avatar-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.avatar-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── Integration: a .badge around an avatar ──
   The chip is centred on the corner of the badge's box; on a round
   avatar that corner is empty air. A margin on the anchored sides
   pulls it in onto the shape's edge. % margins resolve against the
   width, and the avatar is square. */
.badge:has(> .avatar) {
  --avatar-pull: var(--avatar-corner, 14.64%);
}

.badge:has(> .avatar) > :where(.chip) {
  margin-block-start: var(--avatar-pull);
  margin-inline-end: var(--avatar-pull);
}

.badge-bottom:has(> .avatar) > :where(.chip) {
  margin-block: 0 var(--avatar-pull);
}

.badge-middle:has(> .avatar) > :where(.chip) {
  margin-block: 0;
}

.badge-start:has(> .avatar) > :where(.chip) {
  margin-inline: var(--avatar-pull) 0;
}

.badge-center:has(> .avatar) > :where(.chip) {
  margin-inline: 0;
}

.badge {
  position: relative;
  display: inline-flex;
}

.badge :where(.chip) {
  z-index: 1;
  position: absolute;
  white-space: nowrap;
  top: var(--badge-t, 0);
  bottom: var(--badge-b, auto);
  left: var(--badge-s, auto);
  right: var(--badge-e, 0);
  translate: var(--badge-x, 50%) var(--badge-y, -50%);
}

.bubble {
  --bubble-flip: 1;
  position: relative;
  display: block;
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(90% - var(--bubble-tail));
  min-width: calc(2.5em * var(--scale));
  min-height: calc(2em * var(--scale));
  margin-inline: var(--bubble-tail) 0;
  padding: var(--bubble-py) var(--bubble-px);
  background-color: var(--bubble-bg);
  color: var(--bubble-fg);
  border-radius: var(--bubble-radius);
  border-end-start-radius: var(--bubble-corner);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  overflow-wrap: anywhere;
}

.bubble::before {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: calc(-1 * var(--bubble-tail));
  /* One pixel into the bubble: no hairline seam at fractional zoom. */
  width: calc(var(--bubble-tail) + 1px);
  height: calc(1.2 * var(--bubble-tail));
  background-color: var(--bubble-bg);
  mask: var(--bubble-tail-mask) right bottom/100% 100% no-repeat;
  scale: var(--bubble-flip) 1;
}

/* ── Axis: side ── */
.bubble-end {
  --bubble-flip: -1;
  margin-inline: auto var(--bubble-tail);
  border-end-start-radius: var(--bubble-radius);
  border-end-end-radius: var(--bubble-corner);
}

.bubble-end::before {
  inset-inline: auto calc(-1 * var(--bubble-tail));
}

[dir=rtl] .bubble {
  --bubble-flip: -1;
}

[dir=rtl] .bubble-end {
  --bubble-flip: 1;
}

/* ── Flag: no-tail ── a follow-up message: same column, no tail. */
.bubble-no-tail {
  border-end-start-radius: var(--bubble-radius);
  border-end-end-radius: var(--bubble-radius);
}

.bubble-no-tail::before {
  content: none;
}

/* ── Axis: size ── */
.bubble-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.bubble-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.bubble-md {
  --fontsize: var(--md, var(--default-md));
}

.bubble-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.bubble-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.breadcrumbs {
  overflow-x: auto;
}

.breadcrumbs > menu,
.breadcrumbs > ul,
.breadcrumbs > ol {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.breadcrumbs > menu > li,
.breadcrumbs > ul > li,
.breadcrumbs > ol > li {
  display: flex;
  align-items: center;
}

.breadcrumbs > menu > li > *,
.breadcrumbs > ul > li > *,
.breadcrumbs > ol > li > * {
  display: flex;
  cursor: pointer;
  align-items: center;
}

/* Item separator */
.breadcrumbs > menu > li + *::before,
.breadcrumbs > ul > li + *::before,
.breadcrumbs > ol > li + *::before {
  content: "";
  display: block;
}

/* Width reset in some contexts (e.g. join) */
/* btn links inside prose: no underline */
.btn {
  /* Internal variables — neutral defaults, skins re-assign */
  --btn-bg: var(--btn-color, var(--color-surface-2));
  --btn-fg: var(--color-on-surface);
  /* daisyUI ships 1rem — half of this was an outlier */
  --btn-shadow: var(--shadow-light, );
  /* Layout */
  display: inline-flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  touch-action: manipulation;
  /* Dimensions */
  height: var(--size);
  padding-inline: var(--btn-p);
  /* Typography */
  color: var(--btn-fg);
  /* Paint plumbing */
  background-color: var(--btn-bg);
  border-width: var(--border);
  border-color: var(--btn-border);
  box-shadow: var(--btn-shadow);
  /* Corner radius (join-compatible) */
  border-start-start-radius: var(--join-ss, var(--radius-field));
  border-start-end-radius: var(--join-se, var(--radius-field));
  border-end-start-radius: var(--join-es, var(--radius-field));
  border-end-end-radius: var(--join-ee, var(--radius-field));
  /* Outline */
  outline-color: var(--btn-color, var(--color-on-surface));
  /* Transition */
  /* Other */
  cursor: pointer;
}

/* Keyboard focus */
.btn:focus-visible,
.btn:has(:focus-visible) {
  isolation: isolate;
}

/* Checkbox / radio styled as button */
.btn:is(input[type=checkbox], input[type=radio]) {
  appearance: none;
}

.btn:is(input[type=checkbox], input[type=radio])[aria-label]::after {
  content: attr(aria-label);
}

/* Checked checkbox/radio: seed the primary color */
.btn:where(input:checked) {
  --btn-color: var(--color-primary);
  --btn-fg: var(--color-on-primary);
  isolation: isolate;
}

/* Disabled */
.btn-disabled,
.btn:disabled,
.btn[disabled] {
  pointer-events: none;
}

.calendar {
  position: relative;
  display: inline-block;
  vertical-align: top;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* ── The picker ── */
.calendar .air-datepicker {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, max-content);
  grid-template-areas: "nav" "body" "timepicker" "buttons";
  gap: var(--calendar-gap);
  /* Seven days wide, whatever the font size. */
  width: calc(var(--calendar-cell) * 7 + var(--calendar-p) * 2 + var(--calendar-border-width) * 2);
  padding: var(--calendar-p);
  color: var(--calendar-fg);
  background-color: var(--calendar-bg);
  border: var(--calendar-border-width) solid var(--calendar-border);
  border-radius: var(--calendar-radius);
  box-shadow: var(--calendar-shadow);
  font: inherit;
  position: absolute;
  z-index: var(--calendar-z, 20);
  transition: opacity 0.2s ease-out, translate 0.2s ease-out;
}

.calendar .air-datepicker:not(.-custom-position-) {
  opacity: 0;
}

.calendar .air-datepicker.-from-top- {
  translate: 0 -0.5em;
}

.calendar .air-datepicker.-from-right- {
  translate: 0.5em 0;
}

.calendar .air-datepicker.-from-bottom- {
  translate: 0 0.5em;
}

.calendar .air-datepicker.-from-left- {
  translate: -0.5em 0;
}

.calendar .air-datepicker.-active-:not(.-custom-position-) {
  opacity: 1;
  translate: none;
}

.calendar .air-datepicker.-inline- {
  position: static;
  opacity: 1;
  translate: none;
  box-shadow: var(--calendar-inline-shadow);
}

@media (prefers-reduced-motion: reduce) {
  .calendar .air-datepicker {
    transition: none;
  }
}
/* The little arrow pointing at the field: not drawn. */
.calendar .air-datepicker--pointer {
  display: none;
}

.calendar .air-datepicker--navigation {
  grid-area: nav;
}

.calendar .air-datepicker--content {
  grid-area: body;
}

.calendar .air-datepicker--time {
  grid-area: timepicker;
}

.calendar .air-datepicker--buttons {
  grid-area: buttons;
}

.calendar .-only-timepicker- .air-datepicker-nav {
  display: none;
}

/* ── Navigation: previous, title, next ── */
.calendar .air-datepicker-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--calendar-cell);
}

.calendar .air-datepicker-nav--title,
.calendar .air-datepicker-nav--action {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--calendar-cell);
  border-radius: var(--calendar-cell-radius);
  cursor: pointer;
  user-select: none;
}

.calendar .air-datepicker-nav--action {
  width: var(--calendar-cell);
}

.calendar .air-datepicker-nav--action.-disabled- {
  visibility: hidden;
}

.calendar .air-datepicker-nav--action svg {
  width: 1.6em;
  height: 1.6em;
}

.calendar .air-datepicker-nav--action path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
}

.calendar .air-datepicker-nav--title {
  padding-inline: 0.6em;
  font-weight: var(--calendar-title-weight);
}

.calendar .air-datepicker-nav--title i {
  font-style: normal;
  font-weight: normal;
  color: var(--calendar-muted);
  margin-inline-start: 0.3em;
}

.calendar .air-datepicker-nav--title.-disabled- {
  cursor: default;
}

@media (hover: hover) {
  .calendar :is(.air-datepicker-nav--title, .air-datepicker-nav--action):not(.-disabled-):hover {
    background-color: var(--calendar-hover-bg);
  }
}
/* ── The grids: days, months, years ── */
.calendar .air-datepicker-body.-hidden- {
  display: none;
}

.calendar .air-datepicker-body--day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-block: 0.25em;
}

.calendar .air-datepicker-body--day-name {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--calendar-day-name-fg);
}

.calendar .air-datepicker-body--day-name.-clickable- {
  cursor: pointer;
}

.calendar .air-datepicker-body--cells {
  display: grid;
}

.calendar .air-datepicker-body--cells.-days- {
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: var(--calendar-cell);
}

.calendar .air-datepicker-body--cells.-months- {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: calc(var(--calendar-cell) * 1.4);
}

.calendar .air-datepicker-body--cells.-years- {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: calc(var(--calendar-cell) * 1.75);
}

/* ── A day, a month, a year ── */
.calendar .air-datepicker-cell {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--calendar-cell-radius);
  cursor: pointer;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.calendar .air-datepicker-cell.-focus- {
  background-color: var(--calendar-hover-bg);
}

.calendar .air-datepicker-cell.-current- {
  color: var(--calendar-current);
  font-weight: 700;
}

.calendar .air-datepicker-cell:is(.-other-month-, .-other-decade-) {
  color: var(--calendar-muted);
}

.calendar .air-datepicker-cell:is(.-other-month-, .-other-decade-):empty {
  background: none;
  border: none;
}

.calendar .air-datepicker-cell.-disabled- {
  cursor: default;
  color: var(--calendar-muted);
  opacity: 0.5;
}

.calendar .air-datepicker-cell.-disabled-.-focus- {
  background: none;
}

/* A range: the days inside it share a band, its ends are rounded. */
.calendar .air-datepicker-cell.-in-range- {
  background-color: var(--calendar-range-bg);
  border-radius: 0;
}

.calendar .air-datepicker-cell.-in-range-.-focus- {
  background-color: color-mix(in oklab, var(--calendar-range-bg), var(--calendar-accent) 15%);
}

.calendar .air-datepicker-cell.-range-from- {
  background-color: var(--calendar-range-bg);
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.calendar .air-datepicker-cell.-range-to- {
  background-color: var(--calendar-range-bg);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.calendar .air-datepicker-cell.-range-from-.-range-to- {
  border-radius: var(--calendar-cell-radius);
}

/* Selected: the accent. Last, so it wins over every state above. */
.calendar .air-datepicker-cell.-selected- {
  color: var(--calendar-accent-fg);
  background-color: var(--calendar-accent);
}

.calendar .air-datepicker-cell.-selected-.-focus- {
  background-color: color-mix(in oklab, var(--calendar-accent), #000 10%);
}

.calendar .air-datepicker-cell.-selected-:is(.-other-month-, .-other-decade-) {
  background-color: color-mix(in oklab, var(--calendar-accent) 60%, var(--calendar-bg));
}

/* ── Buttons (today, clear) ── */
.calendar .air-datepicker-buttons {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--calendar-gap);
}

.calendar .air-datepicker-button {
  appearance: none;
  display: inline-flex;
  height: var(--calendar-cell);
  padding: 0;
  font: inherit;
  color: var(--calendar-fg);
  background: none;
  border: none;
  border-radius: var(--calendar-cell-radius);
  cursor: pointer;
}

.calendar .air-datepicker-button span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.calendar .air-datepicker-button:is(:hover, :focus-visible) {
  background-color: var(--calendar-hover-bg);
  outline: none;
}

/* ── Time ── */
.calendar .air-datepicker-time {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.75em;
  align-items: center;
  padding-inline: 0.5em;
}

.calendar .air-datepicker-time--current {
  display: flex;
  align-items: baseline;
}

.calendar .air-datepicker-time--current-hours,
.calendar .air-datepicker-time--current-minutes {
  font-size: 1.35em;
  font-variant-numeric: tabular-nums;
  padding-inline: 0.1em;
  border-radius: 0.2em;
}

.calendar :is(.air-datepicker-time--current-hours, .air-datepicker-time--current-minutes).-focus- {
  background-color: var(--calendar-hover-bg);
}

.calendar .air-datepicker-time--current-colon {
  margin-inline: 0.1em;
}

.calendar .air-datepicker-time--current-ampm {
  margin-inline-start: 0.35em;
  font-size: 0.75em;
  text-transform: uppercase;
  color: var(--calendar-muted);
}

.calendar .air-datepicker-time--row {
  display: flex;
  align-items: center;
  height: 1.25em;
  background: linear-gradient(var(--calendar-muted), var(--calendar-muted)) left 50%/100% 1px no-repeat;
}

.calendar .air-datepicker-time--row input[type=range] {
  appearance: none;
  flex: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

/* The track is the row's own line: the native one is not drawn. */
.calendar .air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track {
  background: none;
  border: none;
}

.calendar .air-datepicker-time--row input[type=range]::-moz-range-track {
  background: none;
  border: none;
}

.calendar .air-datepicker-time--row input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 0.8em;
  height: 0.8em;
  border: 1px solid var(--calendar-muted);
  border-radius: 50%;
  background: var(--calendar-bg);
}

.calendar .air-datepicker-time--row input[type=range]::-moz-range-thumb {
  width: 0.8em;
  height: 0.8em;
  border: 1px solid var(--calendar-muted);
  border-radius: 50%;
  background: var(--calendar-bg);
}

.calendar .air-datepicker-time--row input[type=range]:focus-visible::-webkit-slider-thumb {
  background: var(--calendar-accent);
  border-color: var(--calendar-accent);
}

.calendar .air-datepicker-time--row input[type=range]:focus-visible::-moz-range-thumb {
  background: var(--calendar-accent);
  border-color: var(--calendar-accent);
}

/* ── Axis: size ── */
.calendar-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.calendar-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.calendar-md {
  --fontsize: var(--md, var(--default-md));
}

.calendar-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.calendar-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  color: var(--card-fg);
  border: var(--card-border-width) solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  rotate: var(--card-rotate, 0deg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  /* Its own corners clip whatever it holds — an image at the top
     edge has to follow the box, and `overflow` is the only thing
     that makes a child respect a radius it does not know about. */
  overflow: hidden;
}

.card-body {
  display: flex;
  flex: auto;
  flex-direction: column;
  gap: var(--card-gap);
  padding: var(--card-p);
}

/* The title takes its own ink, not the body's: a look whose titles
   are faded or accented is a family decision. A coloured title in
   ONE place is `.title-primary`, a class — not this. */
.card-title {
  display: flex;
  align-items: center;
  gap: var(--card-gap);
  color: var(--card-title-fg);
  font-size: var(--card-title-size);
  font-weight: var(--card-title-weight);
}

/* The actions sit at the end of the cross axis, so a row of buttons
   lines up on the right in a left-to-right document without anyone
   naming a direction. */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--card-gap);
}

/* A figure spans the card and is cropped by it. */
.card figure {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.card figure > img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* ── Axis: size ── */
.card-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.card-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.card-md {
  --fontsize: var(--md, var(--default-md));
}

.card-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.card-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── Flag: border / dash ──
   A family that draws no border by default still honours these: a
   card that wants an edge says so, the same bargain `.btn-outline`
   makes. */
.card-border {
  border-width: max(var(--card-border-width), var(--border, 1px), 1px);
  border-style: solid;
}

.card-dash {
  border-width: max(var(--card-border-width), var(--border, 1px), 1px);
  border-style: dashed;
}

/* ── Flag: side ── the figure goes beside the body. */
.card-side {
  flex-direction: row;
  align-items: stretch;
}

.card-side figure > img {
  height: 100%;
  max-width: 100%;
}

/* ── Flag: image-full ──
   The figure fills the card and the body sits on top of it. The
   overlay is the card's own fill at a low alpha rather than a fixed
   black, so a light theme and a dark one both stay legible. */
.card-image-full {
  display: grid;
}

.card-image-full > figure,
.card-image-full > .card-body {
  grid-column-start: 1;
  grid-row-start: 1;
}

.card-image-full > figure,
.card-image-full > figure > img {
  height: 100%;
}

.card-image-full > .card-body {
  position: relative;
  background-color: color-mix(in oklab, var(--card-bg) 65%, rgba(0, 0, 0, 0));
  backdrop-filter: blur(2px);
}

.carousel {
  display: grid;
  grid-template-columns: 100%;
  gap: var(--carousel-gap);
  min-width: 0;
}

.carousel-track {
  grid-area: 1/1;
  /* The items' offsets are measured from here (to scroll to one). */
  position: relative;
  display: flex;
  gap: var(--carousel-item-gap);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border: var(--carousel-border);
  border-radius: var(--carousel-radius);
  box-shadow: var(--carousel-shadow);
  rotate: var(--carousel-rotate, 0deg);
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .carousel-track {
    scroll-behavior: smooth;
  }
}
.carousel-track:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.carousel-item {
  box-sizing: border-box;
  display: flex;
  flex: none;
  width: var(--carousel-item-width, 100%);
  scroll-snap-align: start;
}

.carousel-item > :only-child {
  flex: 1;
  min-width: 0;
}

/* ── The arrows, over the track's cell ──
   The cell lets the pointer through; only what is drawn in it
   catches it, so the items stay draggable between the arrows. */
.carousel-prev,
.carousel-next {
  grid-area: 1/1;
  z-index: 1;
  align-self: center;
  display: flex;
  pointer-events: none;
}

.carousel-prev > *,
.carousel-next > * {
  pointer-events: auto;
}

.carousel-prev {
  justify-self: start;
  margin-inline-start: var(--carousel-arrow-inset);
}

.carousel-next {
  justify-self: end;
  margin-inline-end: var(--carousel-arrow-inset);
}

/* Chevrons are drawn pointing sideways; in RTL, sideways flips. */
:where([dir=rtl]) .carousel:not(.carousel-vertical) :is(.carousel-prev, .carousel-next) svg {
  scale: -1 1;
}

.carousel-pagination {
  justify-self: center;
  display: flex;
}

/* ── The upcoming items, a row under the track ──
   Each one is the item drawn again at a smaller font-size: an
   em-sized item shrinks whole. The gap is in the carousel's em,
   set on the row, before the items shrink. */
.carousel-upcoming {
  display: flex;
  gap: var(--carousel-upcoming-gap);
  min-width: 0;
}

.carousel-upcoming-item {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: var(--carousel-upcoming-size);
  color: inherit;
  text-align: inherit;
  background: none;
  border: var(--carousel-border);
  border-radius: var(--carousel-radius);
  cursor: pointer;
}

.carousel-upcoming-item > * {
  flex: 1;
  min-width: 0;
}

.carousel-upcoming-item:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ── Axis: align ── where an item comes to rest. */
.carousel-start .carousel-item {
  scroll-snap-align: start;
}

.carousel-center .carousel-item {
  scroll-snap-align: center;
}

.carousel-end .carousel-item {
  scroll-snap-align: end;
}

/* ── Flag: vertical ── items go up and down; the arrows sit at the
   top and the bottom, their chevrons turned. */
.carousel-vertical .carousel-track {
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  height: var(--carousel-height);
}

.carousel-vertical .carousel-item {
  width: auto;
  height: var(--carousel-item-height, 100%);
}

.carousel-vertical .carousel-prev {
  align-self: start;
  justify-self: center;
  margin: var(--carousel-arrow-inset) 0 0;
}

.carousel-vertical .carousel-next {
  align-self: end;
  justify-self: center;
  margin: 0 0 var(--carousel-arrow-inset);
}

.carousel-vertical :is(.carousel-prev, .carousel-next) svg {
  rotate: 90deg;
}

.checkbox {
  color: var(--color-on-surface);
  border-radius: var(--radius-selector);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  vertical-align: middle;
  width: var(--size);
  height: var(--size);
  box-shadow: var(--shadow-light, );
}

.checkbox::before {
  --checkbox-mark: "";
  content: var(--checkbox-mark);
  display: block;
  clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 80%, 70% 80%, 70% 100%);
}

.checkbox:checked,
.checkbox[aria-checked=true] {
  background-color: var(--input-color, rgba(0, 0, 0, 0));
}

.checkbox:checked::before,
.checkbox[aria-checked=true]::before {
  clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 0%, 70% 0%, 70% 100%);
}

@media (forced-colors: active) {
  .checkbox:checked::before,
  .checkbox[aria-checked=true]::before {
    --checkbox-mark: "✔︎";
    clip-path: none;
  }
}
@media print {
  .checkbox:checked::before,
  .checkbox[aria-checked=true]::before {
    --checkbox-mark: "✔︎";
    clip-path: none;
  }
}
.checkbox:indeterminate::before {
  clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 80%, 80% 80%, 80% 100%);
}

.checkbox:disabled {
  cursor: not-allowed;
}

.chip {
  --chip-bg: var(--chip-color, var(--color-surface-1));
  --chip-fg: var(--color-on-surface);
  border-radius: var(--radius-selector);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  color: var(--chip-fg);
  background-color: var(--chip-bg);
  height: var(--size);
  box-shadow: var(--shadow-light, );
}

/* A remove button inside the chip (Chip's `onRemove`). */
.chip-remove {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  margin: 0 -0.4em 0 0.1em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
}

.chip-remove:hover,
.chip-remove:focus-visible {
  opacity: 1;
  background-color: color-mix(in oklab, currentColor 15%, rgba(0, 0, 0, 0));
}

.chip-remove:disabled {
  display: none;
}

.dock {
  background-color: var(--color-surface-1);
  position: fixed;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}

.dock > * {
  border-radius: var(--radius-box);
  position: relative;
  /* mb-2 */
  display: flex;
  /* max-w-32 */
  flex-shrink: 1;
  flex-basis: 100%;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dock > *[aria-disabled=true],
.dock > *[disabled] {
  pointer-events: none;
}

.dock > *[aria-disabled=true]:hover,
.dock > *[disabled]:hover {
  pointer-events: none;
}

.dock > *::after {
  content: "";
  position: absolute;
}

/* Active state */
.fieldset {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
}

.fieldset-legend {
  color: var(--color-on-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Deprecated — replaced by .label, kept to avoid breaking changes */
.fieldset-label {
  display: flex;
  align-items: center;
}

.fieldset-label:has(input) {
  cursor: pointer;
}

.floating-label {
  position: relative;
  display: block;
}

.floating-label input {
  display: block;
}

.floating-label > span {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.floating-label:focus-within > span,
.floating-label:not(:has(input:placeholder-shown, textarea:placeholder-shown)) > span {
  pointer-events: auto;
  z-index: 2;
}

.file-input {
  --btn-bg: var(--btn-color, var(--color-surface-2));
  --btn-fg: var(--color-on-surface);
  cursor: pointer;
  background-color: var(--color-surface-1);
  display: inline-flex;
  appearance: none;
  align-items: center;
  vertical-align: middle;
  user-select: none;
  height: var(--size);
  border-start-start-radius: var(--join-ss, var(--radius-field));
  border-start-end-radius: var(--join-se, var(--radius-field));
  border-end-start-radius: var(--join-es, var(--radius-field));
  border-end-end-radius: var(--join-ee, var(--radius-field));
  border-color: var(--input-color);
  box-shadow: var(--shadow-light, );
}

.file-input::file-selector-button {
  cursor: pointer;
  user-select: none;
  color: var(--btn-fg);
  border-width: var(--border);
  border-color: var(--btn-border);
  background-color: var(--btn-bg);
}

.file-input:focus {
  --input-color: var(--color-on-surface);
  isolation: isolate;
}

.file-input:has(> input[disabled]),
.file-input:is(:disabled, [disabled]) {
  border-color: var(--color-surface-2);
  background-color: var(--color-surface-2);
  cursor: not-allowed;
}

.file-input:has(> input[disabled])::file-selector-button,
.file-input:is(:disabled, [disabled])::file-selector-button {
  border-color: var(--color-surface-2);
  background-color: var(--color-surface-2);
  cursor: not-allowed;
}

.input {
  cursor: text;
  display: inline-flex;
  flex-shrink: 1;
  appearance: none;
  align-items: center;
  vertical-align: middle;
  white-space: nowrap;
  position: relative;
  background-color: var(--color-surface-1);
  height: var(--size);
  touch-action: manipulation;
  border-start-start-radius: var(--join-ss, var(--radius-field));
  border-start-end-radius: var(--join-se, var(--radius-field));
  border-end-start-radius: var(--join-es, var(--radius-field));
  border-end-end-radius: var(--join-ee, var(--radius-field));
  border-color: var(--input-color);
  box-shadow: var(--shadow-light, );
}

.input:where(input) {
  display: inline-flex;
}

.input :where(input) {
  display: inline-flex;
  appearance: none;
}

.input :where(input[type=url]),
.input :where(input[type=email]) {
  direction: ltr;
}

.input :where(input[type=date]) {
  display: inline-flex;
}

.input:focus,
.input:focus-within {
  --input-color: var(--color-on-surface);
  isolation: isolate;
}

/* Increase font size on iOS to prevent auto-zoom on focus */
.input:has(> input[disabled]),
.input:is(:disabled, [disabled]),
fieldset:disabled .input {
  border-color: var(--color-surface-2);
  background-color: var(--color-surface-2);
  cursor: not-allowed;
}

.input:has(> input[disabled]) > input[disabled] {
  cursor: not-allowed;
}

.input::-webkit-date-and-time-value {
  text-align: inherit;
}

.input::-webkit-calendar-picker-indicator {
  position: absolute;
}

.input:has(> input[type=date]) :where(input[type=date]) {
  display: inline-flex;
  -webkit-appearance: none;
  appearance: none;
}

.input:has(> input[type=date]) input[type=date]::-webkit-calendar-picker-indicator {
  position: absolute;
  cursor: pointer;
}

/* ── Suggestions ──
   The Combobox hangs a .list-suggestions under its .input
   frame. The list is `list`'s to paint; this only places it, inside
   the frame (.input is already position: relative). A floating list
   is placed by the component instead, with inline fixed coordinates. */
.input > .list-suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.25em);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: max(100%, 40ch);
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: default;
}

/* ── Flag: nospinner ── a number field without its step arrows. */
.input-nospinner:is([type=number]),
.input-nospinner input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.input-nospinner:is([type=number])::-webkit-inner-spin-button,
.input-nospinner:is([type=number])::-webkit-outer-spin-button,
.input-nospinner input[type=number]::-webkit-inner-spin-button,
.input-nospinner input[type=number]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.join {
  display: inline-flex;
  align-items: stretch;
}

.join :where(.join-item) {
  border-start-start-radius: var(--join-ss, 0);
  border-start-end-radius: var(--join-se, 0);
  border-end-start-radius: var(--join-es, 0);
  border-end-end-radius: var(--join-ee, 0);
}

.join :where(.join-item) * {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

/* First direct child */
.join > .join-item:where(:first-child) {
  --join-ss: var(--radius-field);
  --join-es: var(--radius-field);
}

.join :first-child:not(:last-child) :where(.join-item) {
  --join-ss: var(--radius-field);
  --join-es: var(--radius-field);
}

/* Last direct child */
.join > .join-item:where(:last-child) {
  --join-se: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join :last-child:not(:first-child) :where(.join-item) {
  --join-se: var(--radius-field);
  --join-ee: var(--radius-field);
}

/* Only child */
.join > .join-item:where(:only-child) {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join :only-child :where(.join-item) {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

/* Focus */
.join > :where(:focus, :has(:focus)) {
  z-index: 1;
}

@media (hover: hover) {
  .join > :where(.btn:hover, :has(.btn:hover)) {
    isolation: isolate;
  }
}
/* join-item height fix.
	   Buttons use a compact em-based height (--size) while field elements
	   (input, select) use a taller one. Override height → auto so the button
	   can stretch to match its siblings via align-items: stretch on .join.
	   min-height keeps it from collapsing below its natural size. */
/* Border merging */
.join {
  --join-ss: 0;
  --join-se: 0;
  --join-es: 0;
  --join-ee: 0;
}

.join > .join-item:where(:first-child) {
  --join-se: 0;
  --join-ee: 0;
}

.join :first-child:not(:last-child) :where(.join-item) {
  --join-se: 0;
  --join-ee: 0;
}

.join > .join-item:where(:last-child) {
  --join-ss: 0;
  --join-es: 0;
}

.join :last-child:not(:first-child) :where(.join-item) {
  --join-ss: 0;
  --join-es: 0;
}

.join > .join-item:where(.btn) {
  height: unset;
  min-height: var(--size, calc(2.5em * var(--scale)));
}

.join-item:where(*:not(:first-child, :disabled, [disabled], .btn-disabled)) {
  margin-inline-start: calc(var(--border, 1px) * -1);
  margin-block-start: 0;
}

.join-item:where(*:is(:disabled, [disabled], .btn-disabled)) {
  border-width: var(--border, 1px) 0 var(--border, 1px) var(--border, 1px);
}

/* variant vertical */
.join-vertical {
  flex-direction: column;
}

.join-vertical > .join-item:first-child {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: 0;
  --join-ee: 0;
}

.join-vertical :first-child:not(:last-child) .join-item {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: 0;
  --join-ee: 0;
}

.join-vertical > .join-item:last-child {
  --join-ss: 0;
  --join-se: 0;
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join-vertical :last-child:not(:first-child) .join-item {
  --join-ss: 0;
  --join-se: 0;
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join-vertical > .join-item:only-child {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join-vertical :only-child .join-item {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join-vertical .join-item:where(*:not(:first-child)) {
  margin-inline-start: 0;
  margin-block-start: calc(var(--border, 1px) * -1);
}

/* variant horizontal */
.join-horizontal {
  flex-direction: row;
}

.join-horizontal > .join-item:first-child {
  --join-ss: var(--radius-field);
  --join-se: 0;
  --join-es: var(--radius-field);
  --join-ee: 0;
}

.join-horizontal :first-child:not(:last-child) .join-item {
  --join-ss: var(--radius-field);
  --join-se: 0;
  --join-es: var(--radius-field);
  --join-ee: 0;
}

.join-horizontal > .join-item:last-child {
  --join-ss: 0;
  --join-se: var(--radius-field);
  --join-es: 0;
  --join-ee: var(--radius-field);
}

.join-horizontal :last-child:not(:first-child) .join-item {
  --join-ss: 0;
  --join-se: var(--radius-field);
  --join-es: 0;
  --join-ee: var(--radius-field);
}

.join-horizontal > .join-item:only-child {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join-horizontal :only-child .join-item {
  --join-ss: var(--radius-field);
  --join-se: var(--radius-field);
  --join-es: var(--radius-field);
  --join-ee: var(--radius-field);
}

.join-horizontal .join-item:where(*:not(:first-child)) {
  margin-inline-start: calc(var(--border, 1px) * -1);
  margin-block-start: 0;
}

.label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.label:has(input) {
  cursor: pointer;
}

/* Label inside .input or .select (prefix/suffix icon or text) */
.input > .label,
.select > .label {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.link {
  cursor: pointer;
}

.list {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface-1);
  border-start-start-radius: var(--join-ss, var(--radius-box));
  border-start-end-radius: var(--join-se, var(--radius-box));
  border-end-start-radius: var(--join-es, var(--radius-box));
  border-end-end-radius: var(--join-ee, var(--radius-box));
}

.list-row {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: var(--list-grid-cols);
  word-break: break-word;
}

/* Separator line between rows (all except last) */
.list > .list-row:not(:last-child)::after,
.list > :not(:last-child) .list-row::after {
  content: "";
  position: absolute;
}

/* Grid column layout — grows at the Nth .list-col-grow child */
.list-row > * {
  grid-row-start: 1;
}

/* Wrapping column — placed on row 2 (spans full width below the grid) */
.list-col-wrap {
  grid-row-start: 2;
  grid-column: 1/-1;
}

/* Row states: a selected row is filled, a changed one marked at its
   start edge. */
.list-row-selected {
  background-color: var(--list-selected);
}

.list-row-dirty {
  box-shadow: inset calc(0.2em * var(--scale)) 0 0 var(--list-dirty);
}

/* Flag: loading — the rows fade while new ones are fetched. */
.list-loading > .list-row {
  opacity: 0.5;
  pointer-events: none;
}

.list-loading {
  cursor: progress;
}

.list-empty {
  text-align: center;
}

.loading {
  pointer-events: none;
  display: inline-block;
  vertical-align: middle;
  mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
}

.menu {
  display: flex;
  flex-direction: column;
  gap: var(--menu-gap);
  padding: var(--menu-p);
  background-color: var(--menu-bg);
  color: var(--menu-fg);
  border: var(--menu-border-width) solid var(--menu-border);
  border-radius: var(--radius-box);
  box-shadow: var(--menu-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  list-style: none;
}

.menu-horizontal {
  flex-direction: row;
  align-items: center;
}

/* An <li> is layout only: it never paints, so an item can be a link, a
   button or a span without the row moving. */
.menu li {
  display: flex;
  flex-direction: column;
  list-style: none;
}

/* The item. Three columns — leading icon, label, trailing badge — so an
   icon and a counter line up down the whole menu. */
.menu .menu-item,
.menu li > :is(a, button, span):not(.menu-title) {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content auto max-content;
  align-items: center;
  gap: var(--menu-item-gap);
  width: 100%;
  padding-block: var(--menu-item-py);
  padding-inline: var(--menu-item-px);
  border-radius: var(--menu-item-radius);
  background-color: var(--menu-item-bg);
  color: var(--menu-item-fg);
  text-align: start;
  text-decoration: none;
  user-select: none;
  transition: var(--menu-item-transition);
}

.menu li > :is(a, button) {
  cursor: pointer;
}

@media (hover: hover) {
  .menu li > :is(a, button):not(.menu-active, .menu-disabled, :disabled, [disabled]):hover {
    background-color: var(--menu-hover-bg);
    color: var(--menu-hover-fg);
  }
}
.menu li > :is(a, button):focus-visible {
  outline: var(--menu-focus-outline);
  outline-offset: var(--menu-focus-offset);
}

/* The item selector is deliberately structural, which makes it specific;
   a state has to be written in the same shape or it loses the cascade. */
.menu .menu-active,
.menu li > :is(a, button, span).menu-active {
  background-color: var(--menu-active-bg);
  color: var(--menu-active-fg);
}

.menu .menu-disabled,
.menu li > :is(a, button, span):is(.menu-disabled, :disabled, [disabled]) {
  pointer-events: none;
  background-color: var(--menu-disabled-bg);
  color: var(--menu-disabled-fg);
}

/* A section title. Not interactive, so it is not an item. */
.menu .menu-title {
  padding-block: var(--menu-title-py);
  padding-inline: var(--menu-title-px);
  color: var(--menu-title-fg);
  font-size: var(--menu-title-size);
  font-weight: var(--menu-title-weight);
  text-transform: var(--menu-title-transform);
  letter-spacing: var(--menu-title-tracking);
}

/* An empty <li> is a separator — no class to remember, and it cannot be
   mistaken for an item because there is nothing to click. */
.menu li:empty {
  height: var(--menu-divider-size);
  margin-block: var(--menu-divider-gap);
  margin-inline: var(--menu-divider-inset);
  background-color: var(--menu-divider);
}

/* Sub-menu. The row count is animated on the <li>, so the <ul> needs no
   wrapper and no measured height: auto → 0fr collapses it. :has() lets the
   state class stay on the sub-menu it describes. The heading row is
   min-content, not auto: mid-transition the fr row leaves free space
   and an auto row stretches into it — the heading balloons. */
.menu li:has(> .menu-sub) {
  display: grid;
  grid-template-rows: min-content 1fr;
  transition: grid-template-rows var(--menu-sub-transition);
}

.menu li:has(> .menu-sub-closed) {
  grid-template-rows: min-content 0fr;
}

.menu .menu-sub {
  display: flex;
  flex-direction: column;
  gap: var(--menu-gap);
  min-height: 0;
  overflow: hidden;
  margin-inline-start: var(--menu-sub-indent);
  list-style: none;
}

/* The toggle carries whatever the author puts in it; the family draws the
   marker and turns it when the sub-menu is open. */
.menu .menu-toggle::after {
  content: "";
  justify-self: flex-end;
}

.navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--navbar-gap);
  box-sizing: border-box;
  width: 100%;
  min-height: var(--navbar-h);
  padding-block: var(--navbar-py);
  padding-inline: var(--navbar-px);
  background-color: var(--navbar-bg);
  color: var(--navbar-fg);
  border-block-end: var(--navbar-border-width) solid var(--navbar-border);
  box-shadow: var(--navbar-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* The zones. start and end absorb the slack so that center — which
   keeps its intrinsic width — stays put when either side grows. */
.navbar-start,
.navbar-center,
.navbar-end {
  display: flex;
  align-items: center;
  gap: var(--navbar-gap);
  min-width: 0;
}

.navbar-start {
  flex: 1 1 0;
  justify-content: flex-start;
}

.navbar-center {
  flex: 0 0 auto;
  justify-content: center;
}

.navbar-end {
  flex: 1 1 0;
  justify-content: flex-end;
}

/* A bar that follows the page. Absolute, because it answers to the
   viewport rather than to its content (see CLAUDE.md). */
.navbar-sticky {
  position: sticky;
  top: var(--navbar-sticky-top, 0);
  z-index: 1;
}

.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pagination-gap);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.pagination-item {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--pagination-size);
  height: var(--pagination-size);
  padding-inline: calc(var(--pagination-size) / 4);
  margin: 0;
  font: inherit;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--pagination-item-fg);
  background-color: var(--pagination-item-bg);
  border: var(--pagination-border-width) solid var(--pagination-item-border);
  border-radius: var(--pagination-radius);
  box-shadow: var(--pagination-shadow);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition-property: color, background-color, border-color, box-shadow, translate;
  transition-duration: 0.15s;
}

.pagination-item svg {
  height: 1em;
}

@media (hover: hover) {
  .pagination-item:not([aria-current=page], :disabled):hover {
    background-color: var(--pagination-hover-bg);
  }
}
.pagination-item:focus-visible {
  outline: 2px solid var(--pagination-color);
  outline-offset: 2px;
}

.pagination-item[aria-current=page] {
  color: var(--pagination-fg);
  background-color: var(--pagination-color);
  border-color: var(--pagination-active-border, var(--pagination-color));
  cursor: default;
}

.pagination-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--pagination-size);
  height: var(--pagination-size);
  opacity: 0.6;
  user-select: none;
}

/* ── Variant: dots ──
   The numbers stay in the DOM (and in the accessible name) but are
   not drawn: a dot per page. Not with `font-size: 0` — the dot is
   sized in em, and would shrink to nothing with its text. Gaps never
   appear in this variant. */
.pagination-dots {
  gap: calc(var(--pagination-dot) * 0.8);
}

.pagination-dots .pagination-item {
  min-width: 0;
  width: var(--pagination-dot);
  height: var(--pagination-dot);
  padding: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, 0);
  border-radius: 50%;
}

.pagination-dots .pagination-gap {
  display: none;
}

/* ── Variant: bars ──
   A segment per page, stretched across the row: the numbers stay in
   the DOM and the accessible name, as with the dots. The row takes
   the width it is given; a segment never shrinks below
   --pagination-bar-width. */
.pagination-bars {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--pagination-bar-gap);
}

.pagination-bars .pagination-item {
  flex: 1 1 0;
  min-width: var(--pagination-bar-width);
  height: var(--pagination-bar-height);
  padding: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, 0);
  border-radius: var(--pagination-bar-radius);
}

.pagination-bars .pagination-gap {
  display: none;
}

/* ── Variant: count ──
   No page drawn: "3 / 8" between previous and next, as tall as a
   page so the row keeps its height. */
.pagination-count {
  flex-wrap: nowrap;
}

.pagination-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--pagination-size);
  height: var(--pagination-size);
  padding-inline: calc(var(--pagination-size) / 4);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Axis: size ── */
.pagination-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.pagination-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.pagination-md {
  --fontsize: var(--md, var(--default-md));
}

.pagination-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.pagination-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* Segments: one bar cut into parts, each as wide as its share (--segment).
   Not a <progress>, which has a single value. */
.progress-segments {
  display: flex;
  gap: 0.125em;
  overflow: hidden;
}

.progress-segment {
  display: block;
  flex: var(--segment, 1) 1 0;
  min-width: 0;
  background-color: var(--segment-color, currentColor);
}

.progress {
  border-radius: var(--radius-box);
  color: var(--color-on-surface);
  position: relative;
  appearance: none;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .progress:indeterminate {
    animation: progress 5s ease-in-out infinite;
  }
}
@supports (-moz-appearance: none) {
  @media (prefers-reduced-motion: no-preference) {
    .progress:indeterminate::-moz-progress-bar {
      animation: progress 5s ease-in-out infinite;
    }
  }
  .progress::-moz-progress-bar {
    border-radius: var(--radius-box);
  }
}
@supports (-webkit-appearance: none) {
  .progress::-webkit-progress-bar {
    border-radius: var(--radius-box);
  }
  .progress::-webkit-progress-value {
    border-radius: var(--radius-box);
  }
}
.radial-progress {
  position: relative;
  display: inline-grid;
  height: var(--size);
  width: var(--size);
  place-content: center;
  vertical-align: middle;
  box-sizing: content-box;
}

.radial-progress::before {
  content: "";
  position: absolute;
  -webkit-mask: radial-gradient(farthest-side, rgba(0, 0, 0, 0) calc(100% - var(--thickness)), #000 calc(100% + 0.5px - var(--thickness)));
  mask: radial-gradient(farthest-side, rgba(0, 0, 0, 0) calc(100% - var(--thickness)), #000 calc(100% + 0.5px - var(--thickness)));
}

.radial-progress::after {
  content: "";
  position: absolute;
  transform: rotate(calc(var(--value) * 3.6deg - 90deg)) translate(calc(var(--size) / 2 - 50%));
}

.radio {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  vertical-align: middle;
  width: var(--size);
  height: var(--size);
  color: var(--input-color, currentColor);
}

.radio::before {
  --radio-mark: "";
  content: var(--radio-mark);
  display: block;
  /* rounded-full */
}

.radio:checked,
.radio[aria-checked=true] {
  background-color: var(--color-surface-1);
}

@media (prefers-reduced-motion: no-preference) {
  .radio:checked,
  .radio[aria-checked=true] {
    animation: radio 0.2s ease-out;
  }
}
.radio:disabled {
  cursor: not-allowed;
}

.range {
  --range-thumb: var(--color-surface-1);
  /* Separate variable to avoid PostCSS/Nuxt build error with calc(min(calc())) */
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  overflow: hidden;
  vertical-align: middle;
  height: var(--range-thumb-size);
}

/* Track — WebKit */
.range::-webkit-slider-runnable-track {
  background-color: var(--range-bg);
  border-radius: var(--radius-selector);
}

/* Thumb — WebKit */
.range::-webkit-slider-thumb {
  position: relative;
  box-sizing: border-box;
  background-color: var(--range-thumb);
  height: var(--range-thumb-size);
  width: var(--range-thumb-size);
  appearance: none;
  -webkit-appearance: none;
  color: var(--range-progress);
  transform: translateY(-50%);
}

/* Track — Firefox */
.range::-moz-range-track {
  background-color: var(--range-bg);
  border-radius: var(--radius-selector);
}

/* Thumb — Firefox */
.range::-moz-range-thumb {
  position: relative;
  box-sizing: border-box;
  height: var(--range-thumb-size);
  width: var(--range-thumb-size);
  color: var(--range-progress);
}

.range:disabled {
  cursor: not-allowed;
}

.select {
  background-color: var(--color-surface-1);
  position: relative;
  display: inline-flex;
  flex-shrink: 1;
  appearance: none;
  align-items: center;
  vertical-align: middle;
  height: var(--size);
  touch-action: manipulation;
  border-start-start-radius: var(--join-ss, var(--radius-field));
  border-start-end-radius: var(--join-se, var(--radius-field));
  border-end-start-radius: var(--join-es, var(--radius-field));
  border-end-end-radius: var(--join-ee, var(--radius-field));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: var(--input-color);
  box-shadow: var(--shadow-light, );
}

.select[multiple] {
  overflow: auto;
}

/* Native <select> nested inside the .select wrapper */
.select select {
  appearance: none;
  align-items: center;
}

.select:focus,
.select:focus-within {
  --input-color: var(--color-on-surface);
  isolation: isolate;
}

.select:has(> select[disabled]),
.select:is(:disabled, [disabled]),
fieldset:disabled .select {
  border-color: var(--color-surface-2);
  background-color: var(--color-surface-2);
  cursor: not-allowed;
}

.select:has(> select[disabled]) > select[disabled] {
  cursor: not-allowed;
}

/* base-select appearance support (modern browsers) */
@supports (appearance: base-select) {
  .select,
  .select select {
    appearance: base-select;
  }
}

.select::picker(select),
.select select::picker(select) {
  border-radius: var(--radius-box);
}

@supports (appearance: base-select) {
  .select::picker(select),
  .select select::picker(select) {
    appearance: base-select;
  }
}
.select::picker-icon,
.select select::picker-icon {
  display: none;
}

.select option,
.select select option {
  border-radius: var(--radius-field);
  white-space: normal;
}

.select option:not(:disabled):hover,
.select option:not(:disabled):focus-visible,
.select select option:not(:disabled):hover,
.select select option:not(:disabled):focus-visible {
  cursor: pointer;
}

.select option:not(:disabled):active,
.select select option:not(:disabled):active {
  background-color: var(--color-neutral);
  color: var(--color-on-neutral);
}

/* ── Multiple choice ──
   A Select with `multiple` is drawn as a .select frame that opens a
   .list-suggestions of checkable rows (a native multi-select is a
   tall listbox). The list is `list`'s to paint; this only places it,
   and lets it out of the frame's clipping while it is open. */
.select:has(> .list-suggestions) {
  overflow: visible;
}

.select > .list-suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.25em);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: max(100%, 40ch);
  white-space: normal;
  cursor: default;
}

.select > .list-suggestions > .list-row {
  gap: 0.75em;
}

.skeleton {
  background-color: var(--color-surface-2);
  border-radius: var(--radius-box);
  will-change: background-position;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton {
    animation: skeleton 1.8s ease-in-out infinite;
  }
}
.skeleton-text {
  -webkit-background-clip: text;
}

.stat {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  column-gap: var(--stat-gap);
  box-sizing: border-box;
  padding: var(--stat-py) var(--stat-px);
  background-color: var(--stat-bg);
  color: var(--stat-fg);
  border: var(--stat-border-width) solid var(--stat-border);
  border-radius: var(--stat-radius);
  box-shadow: var(--stat-shadow);
  rotate: var(--stat-rotate, 0deg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.stat > * {
  grid-column-start: 1;
}

.stat-title,
.stat-desc {
  color: var(--stat-muted);
  font-size: var(--stat-title-size);
  white-space: nowrap;
}

.stat-value {
  color: var(--stat-value-fg, inherit);
  font-size: var(--stat-value-size);
  font-weight: var(--stat-value-weight);
  line-height: 1.2;
  white-space: nowrap;
}

.stat > .stat-figure {
  grid-column-start: 2;
  grid-row: 1/span 3;
  align-self: center;
  justify-self: end;
  color: var(--stat-figure-fg, inherit);
}

.stat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stat-gap);
  margin-block-start: calc(0.5em * var(--scale));
}

/* ── Axis: size ── */
.stat-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.stat-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.stat-md {
  --fontsize: var(--md, var(--default-md));
}

.stat-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.stat-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── .stats ── one frame for several. */
.stats {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  overflow-x: auto;
  background-color: var(--stats-bg);
  color: var(--stats-fg);
  border: var(--stats-border-width) solid var(--stats-border);
  border-radius: var(--stats-radius);
  box-shadow: var(--stats-shadow);
  rotate: var(--stats-rotate, 0deg);
}

.stats > .stat {
  --stat-bg: #0000;
  --stat-border-width: 0px;
  --stat-shadow: none;
  --stat-rotate: 0deg;
  --stat-radius: 0;
}

.stats > .stat:not(:last-child) {
  border-inline-end: var(--stats-divider-width) var(--stats-divider-style, solid) var(--stats-divider);
}

/* ── Axis: direction ── */
.stats-horizontal {
  grid-auto-flow: column;
}

.stats-vertical {
  grid-auto-flow: row;
  overflow-x: visible;
}

.stats-vertical > .stat:not(:last-child) {
  border-inline-end: 0;
  border-block-end: var(--stats-divider-width) var(--stats-divider-style, solid) var(--stats-divider);
}

.swatch {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--swatch-size);
  height: var(--swatch-size);
  padding: 0;
  border: var(--swatch-border-width) solid var(--swatch-border);
  border-radius: var(--swatch-radius);
  box-shadow: var(--swatch-shadow);
  color: var(--swatch-on-color);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  line-height: 1;
  vertical-align: middle;
  user-select: none;
  overflow: hidden;
  /* The colour is a flat layer of its own so the checkerboard below it
     shows through exactly as much as the colour is transparent. */
  background-color: transparent;
  background-image: linear-gradient(var(--swatch-color), var(--swatch-color)), var(--swatch-checks);
  transition: var(--swatch-transition);
}

:is(a, button, label).swatch,
.swatch:is([role=button], [tabindex]) {
  cursor: pointer;
}

.swatch:focus-visible {
  outline: var(--swatch-focus-outline);
  outline-offset: var(--swatch-focus-offset);
}

.swatch:is(:disabled, [disabled], .swatch-disabled) {
  pointer-events: none;
  opacity: var(--swatch-disabled-opacity);
}

/* An <input type="color"> can be a swatch too: its own chrome is removed
   so the element paints from the slots like any other. */
input[type=color].swatch {
  appearance: none;
  -webkit-appearance: none;
}

input[type=color].swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type=color].swatch::-webkit-color-swatch {
  border: none;
  border-radius: inherit;
}

input[type=color].swatch::-moz-color-swatch {
  border: none;
  border-radius: inherit;
}

.color-picker {
  display: grid;
  gap: var(--color-picker-gap);
  box-sizing: border-box;
  width: var(--color-picker-width);
  max-width: 100%;
  padding: var(--color-picker-p);
  background-color: var(--color-picker-bg);
  color: var(--color-picker-fg);
  border: var(--color-picker-border-width) solid var(--color-picker-border);
  border-radius: var(--color-picker-radius);
  box-shadow: var(--color-picker-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* Flat: inside a dropdown or a card, the host draws the box. */
.color-picker-flat {
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.color-picker-head {
  display: flex;
  align-items: center;
  gap: var(--color-picker-gap);
}

.color-picker-preview {
  flex: none;
  width: calc(2.5em * var(--scale));
  aspect-ratio: 1;
  border-radius: var(--color-picker-track-radius);
  /* The colour over a checkerboard: a translucent value shows as such. */
  background: linear-gradient(var(--color-picker-value), var(--color-picker-value)), repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0/0.75em 0.75em;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 15%, rgba(0, 0, 0, 0));
}

.color-picker-value {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85em;
}

.color-picker-channel {
  display: grid;
  grid-template-columns: 1.25em 1fr 2.5em;
  align-items: center;
  gap: calc(0.5 * var(--color-picker-gap));
  font-size: 0.85em;
}

.color-picker-channel > output {
  text-align: end;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.color-picker-track {
  appearance: none;
  width: 100%;
  height: var(--color-picker-track-h);
  margin: 0;
  border-radius: var(--color-picker-track-radius);
  background: var(--color-picker-track, linear-gradient(to right, #000, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 12%, rgba(0, 0, 0, 0));
  cursor: ew-resize;
}

.color-picker-track::-webkit-slider-thumb {
  appearance: none;
  width: calc(var(--color-picker-track-h) + 0.25em);
  height: calc(var(--color-picker-track-h) + 0.25em);
  border-radius: 50%;
  background: var(--color-picker-thumb);
  box-shadow: 0 0 0 0.2em var(--color-picker-thumb-ring), 0 0.1em 0.4em 0.1em color-mix(in oklab, #000 30%, rgba(0, 0, 0, 0));
}

.color-picker-track::-moz-range-thumb {
  width: calc(var(--color-picker-track-h) + 0.25em);
  height: calc(var(--color-picker-track-h) + 0.25em);
  border: 0;
  border-radius: 50%;
  background: var(--color-picker-thumb);
  box-shadow: 0 0 0 0.2em var(--color-picker-thumb-ring), 0 0.1em 0.4em 0.1em color-mix(in oklab, #000 30%, rgba(0, 0, 0, 0));
}

.color-picker-track:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.color-picker-presets {
  display: flex;
  flex-wrap: wrap;
  gap: calc(0.4 * var(--color-picker-gap));
}

/* ── Axis: size ── */
.color-picker-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.color-picker-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.color-picker-md {
  --fontsize: var(--md, var(--default-md));
}

.color-picker-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.color-picker-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  height: var(--tabs-height);
  flex-direction: var(--tabs-direction);
}

.tabs-item {
  --tab-bg: var(--color-surface-1);
  --tab-border-color: var(--color-border);
  position: relative;
  display: inline-flex;
  cursor: pointer;
  appearance: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  order: var(--tab-order);
  height: var(--tab-height);
  padding-inline: var(--tab-p);
}

.tabs-item:hover {
  color: var(--color-on-surface);
}

.tabs-item:is(input[type=radio])::after {
  content: attr(aria-label);
}

.tabs-item:is(label) {
  position: relative;
}

.tabs-item:is(label) input {
  position: absolute;
  cursor: pointer;
  appearance: none;
}

/* Show active tab content */
.tabs-item:checked + .tabs-item-content,
.tabs-item:is(label:has(:checked)) + .tabs-item-content,
.tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) + .tabs-item-content {
  display: block;
}

/* Inactive tab */
.tabs-item:not(input):empty {
  flex-grow: 1;
  cursor: default;
}

.tabs-item[disabled] {
  pointer-events: none;
}

.tabs-item-content {
  order: 1;
  display: none;
  --tabcontent-radius-ss: var(--radius-box);
  --tabcontent-radius-se: var(--radius-box);
  --tabcontent-radius-es: var(--radius-box);
  --tabcontent-radius-ee: var(--radius-box);
  margin: var(--tabcontent-margin);
  order: var(--tabcontent-order);
  border-width: var(--border);
  border-start-start-radius: var(--tabcontent-radius-ss);
  border-start-end-radius: var(--tabcontent-radius-se);
  border-end-start-radius: var(--tabcontent-radius-es);
  border-end-end-radius: var(--tabcontent-radius-ee);
}

.tabs-item-disabled {
  pointer-events: none;
}

.title {
  font-size: var(--xxl, var(--default-xxl));
}

.subtitle-s1 {
  font-size: var(--xl, var(--default-xl));
}

.subtitle-s2 {
  font-size: var(--lg, var(--default-lg));
}

/* ── Axis: s — size ── */
.text-s1 {
  font-size: var(--md, var(--default-md));
}

.text-s2 {
  font-size: var(--base, var(--default-base));
}

.text-s3 {
  font-size: var(--sm, var(--default-sm));
}

.text-s4 {
  font-size: var(--xs, var(--default-xs));
}

/* ── Axis: color ── */
.text-primary,
.title-primary,
.subtitle-primary {
  color: var(--color-primary);
}

.text-neutral,
.title-neutral,
.subtitle-neutral {
  color: var(--color-neutral);
}

.text-info,
.title-info,
.subtitle-info {
  color: var(--color-info);
}

.text-success,
.title-success,
.subtitle-success {
  color: var(--color-success);
}

.text-warning,
.title-warning,
.subtitle-warning {
  color: var(--color-warning);
}

.text-error,
.title-error,
.subtitle-error {
  color: var(--color-error);
}

.textarea {
  background-color: var(--color-surface-1);
  border-radius: var(--radius-field);
  flex-shrink: 1;
  appearance: none;
  vertical-align: middle;
  touch-action: manipulation;
  border-color: var(--input-color);
  box-shadow: var(--shadow-light, );
}

.textarea textarea {
  appearance: none;
}

.textarea:focus,
.textarea:focus-within {
  --input-color: var(--color-on-surface);
  isolation: isolate;
}

/* Increase font size on iOS to prevent auto-zoom on focus */
.textarea:has(> textarea[disabled]),
.textarea:is(:disabled, [disabled]) {
  border-color: var(--color-surface-2);
  background-color: var(--color-surface-2);
  cursor: not-allowed;
}

.textarea:has(> textarea[disabled]) > textarea[disabled] {
  cursor: not-allowed;
}

.toggle {
  /* Separate variable to avoid PostCSS/Nuxt build error with calc(min(calc())) */
  color: var(--input-color);
  position: relative;
  display: inline-grid;
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  place-content: center;
  vertical-align: middle;
  user-select: none;
  grid-template-columns: 0fr 1fr 1fr;
  padding: var(--toggle-p);
  box-shadow: var(--shadow-light, );
  height: var(--size);
}

/* Optional icons inside the toggle */
.toggle > * {
  z-index: 1;
  grid-column: span 1;
  grid-column-start: 2;
  grid-row-start: 1;
  cursor: pointer;
  appearance: none;
}

.toggle > *:nth-child(2) {
  color: var(--color-surface-1);
}

.toggle > *:nth-child(3) {
  color: var(--color-surface-1);
}

/* Toggle thumb */
.toggle::before {
  --toggle-mark: "";
  content: var(--toggle-mark);
  border-radius: var(--radius-selector);
  position: relative;
  grid-column-start: 2;
  grid-row-start: 1;
}

.toggle:checked,
.toggle[aria-checked=true],
.toggle:has(> input:checked) {
  grid-template-columns: 1fr 1fr 0fr;
  background-color: var(--color-surface-1);
  --input-color: var(--color-on-surface);
}

.toggle:indeterminate {
  grid-template-columns: 0.5fr 1fr 0.5fr;
}

.toggle:disabled {
  cursor: not-allowed;
}

/* Valid */
.validator:user-valid,
.validator:has(:user-valid) {
  --input-color: var(--color-success);
}

.validator:user-valid:focus,
.validator:has(:user-valid):focus,
.validator:user-valid:focus-within,
.validator:has(:user-valid):focus-within,
.validator:user-valid:checked,
.validator:has(:user-valid):checked,
.validator:user-valid[aria-checked=true],
.validator:has(:user-valid)[aria-checked=true] {
  --input-color: var(--color-success);
}

/* Invalid */
.validator:user-invalid,
.validator:has(:user-invalid),
.validator[aria-invalid]:not([aria-invalid=false]),
.validator:has([aria-invalid]:not([aria-invalid=false])) {
  --input-color: var(--color-error);
}

.validator:user-invalid:focus,
.validator:has(:user-invalid):focus,
.validator[aria-invalid]:not([aria-invalid=false]):focus,
.validator:has([aria-invalid]:not([aria-invalid=false])):focus,
.validator:user-invalid:focus-within,
.validator:has(:user-invalid):focus-within,
.validator[aria-invalid]:not([aria-invalid=false]):focus-within,
.validator:has([aria-invalid]:not([aria-invalid=false])):focus-within {
  --input-color: var(--color-error);
}

/* Show error hint */
.validator:user-invalid ~ .validator-hint,
.validator:has(:user-invalid) ~ .validator-hint,
.validator[aria-invalid]:not([aria-invalid=false]) ~ .validator-hint,
.validator:has([aria-invalid]:not([aria-invalid=false])) ~ .validator-hint {
  color: var(--color-error);
  visibility: visible;
  display: revert-layer;
}

.validator-hint {
  visibility: hidden;
  font-size: var(--xs, var(--default-xs));
}

/* The UA hides a closed <dialog> with display: none; a display of
   our own would undo that, so it is only ever set on an open one. */
.dialog:not([open]) {
  display: none;
}

.dialog {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--dialog-margin);
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
  overscroll-behavior: contain;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.dialog::backdrop {
  background-color: var(--dialog-backdrop);
}

/* Opened with show(), the overlay must not swallow clicks meant for
   the page: only the box takes them. */
.dialog:not(:modal) {
  pointer-events: none;
}

.dialog:not(:modal) > .dialog-box {
  pointer-events: auto;
}

/* A modal dialog locks the page's scroll, as daisyUI's modal does, by
   setting the page variables the root reads. */
:root:has(.dialog:modal) {
  --page-has-backdrop: 1;
  --page-overflow: hidden;
  --page-scroll-gutter: stable;
}

.dialog-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--dialog-gap);
  box-sizing: border-box;
  width: var(--dialog-width);
  max-width: 100%;
  max-height: 100%;
  padding: var(--dialog-p);
  overflow-y: auto;
  background-color: var(--dialog-bg);
  color: var(--dialog-fg);
  border: var(--dialog-border-width) solid var(--dialog-border);
  border-radius: var(--dialog-radius);
  box-shadow: var(--dialog-shadow);
}

.dialog-title {
  margin: 0;
  /* Room for the close button, which sits over the corner. */
  padding-inline-end: var(--dialog-close-size);
  font-size: var(--dialog-title-size);
  font-weight: var(--dialog-title-weight);
}

.dialog-body {
  min-height: 0;
}

/* The actions line up at the end of the row, so a confirmation button
   lands on the right in a left-to-right document. */
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: calc(0.5em * var(--scale));
  margin: 0;
}

.dialog-close {
  position: absolute;
  inset-block-start: calc(var(--dialog-p) / 2);
  inset-inline-end: calc(var(--dialog-p) / 2);
  display: inline-grid;
  place-items: center;
  width: var(--dialog-close-size);
  height: var(--dialog-close-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (hover: hover) {
  .dialog-close:hover {
    background-color: var(--dialog-close-hover);
  }
}
/* The cross: the size of the text, like any icon. */
.dialog-close svg {
  width: 1em;
  height: 1em;
}

.dialog-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ── Axis: placement ── where the box sits; centred by default. */
.dialog-top {
  align-items: start;
}

.dialog-bottom {
  align-items: end;
}

/* ── Axis: size ── */
.dialog-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.dialog-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.dialog-md {
  --fontsize: var(--md, var(--default-md));
}

.dialog-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.dialog-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.dropdown {
  position: relative;
  display: inline-block;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* A <details> trigger loses its disclosure triangle. */
.dropdown > summary {
  list-style: none;
}

.dropdown > summary::-webkit-details-marker {
  display: none;
}

.dropdown-content {
  position: absolute;
  z-index: var(--dropdown-z);
  inset-block-start: calc(100% + var(--dropdown-gap));
  inset-inline-start: 0;
  box-sizing: border-box;
  min-width: max-content;
  max-height: min(24em, 70dvh);
  padding: var(--dropdown-p);
  overflow-y: auto;
  background-color: var(--dropdown-bg);
  color: var(--dropdown-fg);
  border: var(--dropdown-border-width) solid var(--dropdown-border);
  border-radius: var(--dropdown-radius);
  box-shadow: var(--dropdown-shadow);
}

/* Hidden until something opens it. */
.dropdown:not(.dropdown-open, [open], :focus-within) > .dropdown-content {
  display: none;
}

/* Driven by a script, focus is not an opener: the script decides. */
.dropdown-fixed:not(.dropdown-open) > .dropdown-content {
  display: none;
}

/* The script owns the coordinates. */
.dropdown-fixed > .dropdown-content {
  position: fixed;
  inset: auto;
}

/* ── Axis: side ── which side of the trigger the box opens on. */
.dropdown-top:not(.dropdown-fixed) > .dropdown-content {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--dropdown-gap));
}

.dropdown-left:not(.dropdown-fixed) > .dropdown-content {
  inset-block-start: 0;
  inset-inline-start: auto;
  inset-inline-end: calc(100% + var(--dropdown-gap));
}

.dropdown-right:not(.dropdown-fixed) > .dropdown-content {
  inset-block-start: 0;
  inset-inline-start: calc(100% + var(--dropdown-gap));
}

/* ── Axis: align ── where the box lines up along that side. */
.dropdown-end:not(.dropdown-left, .dropdown-right):not(.dropdown-fixed) > .dropdown-content {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.dropdown-center:not(.dropdown-left, .dropdown-right):not(.dropdown-fixed) > .dropdown-content {
  inset-inline-start: 50%;
  translate: -50% 0;
}

.dropdown-end:is(.dropdown-left, .dropdown-right):not(.dropdown-fixed) > .dropdown-content {
  inset-block-start: auto;
  inset-block-end: 0;
}

/* ── Axis: size ── */
.dropdown-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.dropdown-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.dropdown-md {
  --fontsize: var(--md, var(--default-md));
}

.dropdown-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.dropdown-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* The frame is the scroll box's: it clips the table to its corners. */
.table-scroll {
  overflow: auto;
  max-width: 100%;
  border: var(--table-frame-width) solid var(--table-frame);
  border-radius: var(--table-frame-radius);
  box-shadow: var(--table-frame-shadow);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--table-bg);
  color: var(--table-fg);
  text-align: start;
  font-size: var(--fontsize, var(--base, var(--default-base)));
  --table-row-bg: var(--table-bg);
}

.table :is(th, td) {
  padding-block: var(--table-cell-py);
  padding-inline: var(--table-cell-px);
  text-align: start;
  vertical-align: middle;
  overflow-wrap: break-word;
  background-color: var(--table-row-bg);
  border-block-end: var(--border) solid var(--table-border);
}

.table > tbody > tr:last-child > :is(th, td) {
  border-block-end-color: rgba(0, 0, 0, 0);
}

.table > thead > tr > th {
  --table-row-bg: var(--table-head-bg);
  color: var(--table-head-fg);
  font-size: var(--table-head-size);
  font-weight: var(--table-head-weight);
  white-space: nowrap;
}

/* A sortable header: the whole cell's text is the button. */
.table-sort {
  display: inline-flex;
  align-items: center;
  gap: calc(0.25em * var(--scale));
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.table-sort::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  opacity: 0;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15em;
}

@media (hover: hover) {
  .table-sort:hover::after {
    opacity: 0.35;
  }
}
[aria-sort=ascending] > .table-sort::after {
  opacity: 1;
  rotate: -135deg;
  translate: 0 0.15em;
}

[aria-sort=descending] > .table-sort::after {
  opacity: 1;
}

.table-sort:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* A sticky column: pinned to the start edge, above the cells that
   scroll beneath it. Its offset comes inline from the wrapper. */
.table-sticky {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
}

.table-sticky-last {
  box-shadow: var(--table-sticky-shadow);
}

/* ── Flag: pinned ── the head stays at the top of the scroll box. */
.table-pinned > thead > tr > th {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

.table-pinned > thead > tr > th.table-sticky {
  z-index: 3;
}

/* ── Row states ── */
.table-zebra > tbody > tr:nth-child(even) {
  --table-row-bg: var(--table-stripe);
}

@media (hover: hover) {
  .table-hover > tbody > tr.table-row:hover {
    --table-row-bg: var(--table-hover);
  }
}
.table .table-row-selected {
  --table-row-bg: var(--table-selected);
}

.table .table-row-dirty > :first-child {
  box-shadow: inset calc(0.2em * var(--scale)) 0 0 var(--table-dirty);
}

/* ── Flag: loading ── the rows fade while new ones are fetched. */
.table-loading > tbody {
  opacity: 0.5;
  pointer-events: none;
}

.table-loading {
  cursor: progress;
}

.table-empty {
  text-align: center;
}

/* ── Axis: size ── */
.table-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.table-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.table-md {
  --fontsize: var(--md, var(--default-md));
}

.table-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.table-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--grid-min), 100%), 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.grid-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--grid-radius);
}

.grid-item > * {
  flex: auto;
}

/* Masonry: the same columns, each holding one lane — a stack. The
   wrapper reads how many columns the browser made and deals that many
   lanes. */
.grid-masonry {
  align-items: start;
}

.grid-lane {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  min-width: 0;
}

.grid-empty {
  grid-column: 1/-1;
  text-align: center;
}

/* ── States ── */
.grid-item-selected {
  outline: var(--grid-selected);
  outline-offset: 2px;
}

.grid-item-dirty::after {
  content: "";
  position: absolute;
  inset-block-start: calc(0.5em * var(--scale));
  inset-inline-end: calc(0.5em * var(--scale));
  width: calc(0.5em * var(--scale));
  height: calc(0.5em * var(--scale));
  border-radius: 50%;
  background-color: var(--grid-dirty);
}

/* ── Flag: loading ── */
.grid-loading > :is(.grid-item, .grid-lane) {
  opacity: 0.5;
  pointer-events: none;
}

.grid-loading {
  cursor: progress;
}

/* ── Axis: size ── */
.grid-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.grid-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.grid-md {
  --fontsize: var(--md, var(--default-md));
}

.grid-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.grid-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.kanban {
  display: flex;
  align-items: stretch;
  gap: var(--kanban-gap);
  overflow-x: auto;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.kanban-column {
  display: flex;
  flex: 1 0 min(var(--kanban-column-width), 100%);
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background-color: var(--kanban-column-bg);
  color: var(--kanban-column-fg);
  border: var(--kanban-column-border-width) solid var(--kanban-column-border);
  border-radius: var(--kanban-column-radius);
  box-shadow: var(--kanban-column-shadow);
  transition: background-color 0.15s;
}

.kanban-column-over {
  background-color: var(--kanban-column-over-bg);
}

.kanban-column-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--kanban-item-gap);
  padding: var(--kanban-p) var(--kanban-p) 0;
}

.kanban-column-title {
  min-width: 0;
  font-weight: var(--kanban-title-weight);
  overflow-wrap: anywhere;
}

.kanban-column-count {
  flex: none;
  min-width: 1.75em;
  padding-inline: 0.5em;
  border-radius: 999px;
  background-color: var(--kanban-count-bg);
  color: var(--kanban-count-fg);
  font-size: 0.8125em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* The body takes what the column has left, so the whole height of a short
   column is a place to drop on. It scrolls once the board has a height. */
.kanban-column-body {
  display: flex;
  flex: auto;
  flex-direction: column;
  gap: var(--kanban-item-gap);
  min-height: calc(4em * var(--scale));
  margin: 0;
  padding: var(--kanban-p);
  list-style: none;
  overflow-y: auto;
}

.kanban-column-foot {
  flex: none;
  padding: 0 var(--kanban-p) var(--kanban-p);
}

.kanban-column-empty {
  padding-block: var(--kanban-p);
  color: var(--kanban-empty-fg);
  text-align: center;
}

/* An entry stacks its marker and its item with the gap of the list, so
   the marker's negative margins give back exactly the room it takes. */
.kanban-entry {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--kanban-item-gap);
  min-width: 0;
}

.kanban-item {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--kanban-item-radius);
}

.kanban-item > * {
  flex: auto;
}

.kanban-item[draggable=true] {
  cursor: grab;
}

.kanban-item:focus-visible {
  outline: var(--kanban-item-selected);
  outline-offset: 2px;
}

.kanban-item-dragged {
  opacity: 0.4;
}

/* Where the item would land: drawn in the gap between two items, its
   negative margins giving back the room it takes, so nothing shifts. */
.kanban-marker {
  flex: none;
  height: var(--kanban-marker-size);
  margin-block: calc((var(--kanban-item-gap) + var(--kanban-marker-size)) / -2);
  border-radius: 999px;
  background-color: var(--kanban-marker);
  pointer-events: none;
}

/* ── States ── */
.kanban-item-selected {
  outline: var(--kanban-item-selected);
  outline-offset: 2px;
}

.kanban-item-dirty::after {
  content: "";
  position: absolute;
  inset-block-start: calc(0.5em * var(--scale));
  inset-inline-end: calc(0.5em * var(--scale));
  width: calc(0.5em * var(--scale));
  height: calc(0.5em * var(--scale));
  border-radius: 50%;
  background-color: var(--kanban-item-dirty);
}

/* ── Flag: loading ── */
.kanban-loading > .kanban-column {
  opacity: 0.5;
  pointer-events: none;
}

.kanban-loading {
  cursor: progress;
}

/* ── Axis: size ── */
.kanban-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.kanban-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.kanban-md {
  --fontsize: var(--md, var(--default-md));
}

.kanban-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.kanban-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.data-control {
  display: flex;
  flex-direction: column;
  gap: var(--data-control-gap);
  min-width: 0;
  padding: var(--data-control-p);
  background-color: var(--data-control-bg);
  color: var(--data-control-fg);
  border: var(--data-control-border-width) solid var(--data-control-border);
  border-radius: var(--data-control-radius);
  box-shadow: var(--data-control-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.data-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--data-control-bar-gap);
}

.data-control-bar-left,
.data-control-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--data-control-bar-gap);
  min-width: 0;
}

.data-control-bar-right {
  margin-inline-start: auto;
}

/* Fields in the bar take their own width, not the full-width default
   a form gives them. */
.data-control-bar :is(.input, .select) {
  width: auto;
}

.data-control-bar .data-control-search {
  width: var(--data-control-search);
  max-width: 100%;
}

.data-control-count,
.data-control-range {
  color: var(--data-control-muted);
  font-size: 0.875em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.data-control-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--data-control-bar-gap);
}

/* A filter is a chip holding two buttons: the one that turns it into its
   field, and the one that takes it off. */
.data-control-filter {
  gap: calc(0.25em * var(--scale));
}

.data-control-filter > button {
  display: inline-flex;
  align-items: center;
  gap: calc(0.25em * var(--scale));
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.data-control-filter svg {
  width: 1em;
  height: 1em;
}

.data-control-filter-remove {
  opacity: 0.6;
}

/* How many rows match: at the far end of the row of filters. */
.data-control-total {
  margin-inline-start: auto;
  color: var(--data-control-muted);
  font-size: 0.875em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .data-control-filter-remove:hover {
    opacity: 1;
  }
}
.data-control-filter > button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Being edited, the chip holds the field: it takes the height of it, and
   what the field opens is not cropped by any box of its own. */
.data-control-filter:has(.data-control-editor) {
  position: relative;
  z-index: 20;
  height: auto;
  padding-block: calc(0.1em * var(--scale));
}

.data-control-editor {
  display: flex;
  width: var(--data-control-editor);
}

.data-control-editor > * {
  flex: 1;
  min-width: 0;
}

/* With `fields`, a filter is a field in the bar, and the page size and the
   sort sit with the pagination. */
.data-control-field {
  display: flex;
  flex-direction: column;
  gap: calc(0.25em * var(--scale));
  flex: 1 1 var(--data-control-field, calc(11em * var(--scale)));
  max-width: calc(20em * var(--scale));
  min-width: 0;
}

.data-control-bar:has(> .data-control-bar-left > .data-control-field) .data-control-bar-left {
  align-items: flex-end;
}

.data-control-page-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--data-control-bar-gap);
}

/* The actions of a `fields` control (save, undo, delete, export…) are a row of
   their own, apart from the filters. */
.data-control-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--data-control-bar-gap);
}

.data-control-actions-start,
.data-control-actions-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--data-control-bar-gap);
}

.data-control-actions-end {
  margin-inline-start: auto;
}

/* The filters past the ones that always show: a row of fields that slides open. */
.data-control-more {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--data-control-bar-gap);
}

.data-control-field-label {
  color: var(--data-control-muted);
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-control-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--data-control-bar-gap);
}

.data-control-body {
  min-width: 0;
}

/* ── Axis: size ── */
.data-control-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.data-control-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.data-control-md {
  --fontsize: var(--md, var(--default-md));
}

.data-control-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.data-control-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.divider {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: var(--divider-gap);
  height: auto;
  margin: var(--divider-m) 0;
  padding: 0;
  border: 0;
  color: var(--divider-fg);
  background: none;
  font-size: var(--fontsize, var(--base, var(--default-base)));
  white-space: nowrap;
  --divider-dir: 90deg;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1 1 0;
  height: var(--divider-thickness);
  background: var(--divider-line, var(--divider-color));
}

.divider::after {
  background: var(--divider-line-end, var(--divider-line, var(--divider-color)));
}

/* No content: one line, not two halves around a gap. */
.divider:empty {
  gap: 0;
}

.divider:empty::after {
  display: none;
}

.divider-start::before,
.divider-end::after {
  flex: 0 0 var(--divider-stub);
}

.divider-content {
  min-width: 0;
}

.divider-horizontal {
  flex-direction: row;
}

.divider-center::before,
.divider-center::after {
  flex: 1 1 0;
}

.divider-vertical {
  flex-direction: column;
  margin: 0 var(--divider-m);
  min-height: 1em;
  --divider-dir: 180deg;
}

.divider-vertical::before,
.divider-vertical::after {
  width: var(--divider-thickness);
  height: auto;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--alert-gap);
  padding: var(--alert-p);
  border: var(--alert-border-width) solid var(--alert-border);
  border-radius: var(--alert-radius);
  background-color: var(--alert-bg);
  color: var(--alert-fg);
  box-shadow: var(--alert-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  line-height: 1.45;
}

.alert-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 1.45em;
  color: var(--alert-accent);
}

.alert-icon svg {
  width: 1.2em;
  height: 1.2em;
}

.alert-body {
  flex: 1 1 auto;
  min-width: 0;
}

.alert-title {
  margin: 0;
  color: var(--alert-accent);
  font-weight: 600;
}

.alert-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-self: center;
  gap: calc(0.5em * var(--scale));
}

.alert-close {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  margin: -0.1em -0.25em 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1em;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
}

.alert-close:hover,
.alert-close:focus-visible {
  opacity: 1;
  background-color: color-mix(in oklab, currentColor 12%, rgba(0, 0, 0, 0));
}

.toast {
  display: flex;
  flex-direction: column;
  gap: var(--toast-gap);
  width: min(var(--toast-width), 100%);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* ── Axes: side, align ── either one pins the stack to a corner. */
.toast:is(.toast-top, .toast-bottom, .toast-start, .toast-center, .toast-end) {
  position: fixed;
  z-index: 1000;
  inset-block: auto var(--toast-m);
  inset-inline: auto var(--toast-m);
  width: min(var(--toast-width), 100vw - 2 * var(--toast-m));
  pointer-events: none;
}

.toast:is(.toast-top, .toast-bottom, .toast-start, .toast-center, .toast-end) > * {
  pointer-events: auto;
}

.toast:is(.toast-top, .toast-bottom, .toast-start, .toast-center, .toast-end) .alert {
  box-shadow: var(--toast-shadow);
}

/* At the top, the newest alert is the first one under the edge. */
.toast.toast-top {
  inset-block: var(--toast-m) auto;
  flex-direction: column-reverse;
}

.toast.toast-start {
  inset-inline: var(--toast-m) auto;
}

.toast.toast-center {
  inset-inline: 0;
  margin-inline: auto;
}

.tooltip {
  position: relative;
  display: inline-flex;
  --tooltip-x: -50%;
  --tooltip-y: 0;
}

.tooltip-content {
  position: absolute;
  z-index: 50;
  inset: auto auto calc(100% + var(--tooltip-gap)) 50%;
  width: max-content;
  max-width: var(--tooltip-max);
  padding: var(--tooltip-p);
  border: var(--tooltip-border-width, 0px) solid var(--tooltip-border, transparent);
  border-radius: var(--tooltip-radius);
  background-color: var(--tooltip-bg);
  color: var(--tooltip-fg);
  box-shadow: var(--tooltip-shadow);
  font-size: 0.8125em;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  translate: var(--tooltip-x) var(--tooltip-y);
  transition: opacity 0.12s ease, visibility 0.12s;
}

/* The arrow: a square turned 45deg, half hidden under the bubble. */
.tooltip-content::after {
  content: "";
  position: absolute;
  inset: 100% auto auto 50%;
  width: var(--tooltip-arrow);
  height: var(--tooltip-arrow);
  background: inherit;
  translate: -50% -50%;
  rotate: 45deg;
  z-index: -1;
}

.tooltip:hover > .tooltip-content,
.tooltip:focus-within > .tooltip-content,
.tooltip-open > .tooltip-content {
  opacity: 1;
  visibility: visible;
}

.tooltip-top > .tooltip-content {
  inset: auto auto calc(100% + var(--tooltip-gap)) 50%;
}

.tooltip-bottom > .tooltip-content {
  inset: calc(100% + var(--tooltip-gap)) auto auto 50%;
}

.tooltip-bottom > .tooltip-content::after {
  inset: 0 auto auto 50%;
}

.tooltip-left > .tooltip-content,
.tooltip-right > .tooltip-content {
  --tooltip-x: 0;
  --tooltip-y: -50%;
}

.tooltip-left > .tooltip-content {
  inset: 50% calc(100% + var(--tooltip-gap)) auto auto;
}

.tooltip-left > .tooltip-content::after {
  inset: 50% auto auto 100%;
}

.tooltip-right > .tooltip-content {
  inset: 50% auto auto calc(100% + var(--tooltip-gap));
}

.tooltip-right > .tooltip-content::after {
  inset: 50% auto auto 0;
}

/* Flag float — progressive enhancement. Where anchor positioning exists
   (under the 90 % bar, so never required), the bubble leaves the flow:
   fixed to its trigger, out of any ancestor's overflow, and flipped to
   the other side when its own has no room. The flip cannot move the
   arrow, so a floating bubble has none. Elsewhere it behaves as above.
   The wrapper names the anchor (--tooltip-anchor) per instance. */
@supports (anchor-name: --a) {
  .tooltip-float {
    anchor-name: var(--tooltip-anchor);
  }
  .tooltip-float > .tooltip-content {
    position: fixed;
    position-anchor: var(--tooltip-anchor);
    inset: auto;
    bottom: anchor(top);
    left: anchor(center);
    margin: 0 0 var(--tooltip-gap);
    position-try-fallbacks: flip-block;
  }
  .tooltip-float > .tooltip-content::after {
    content: none;
  }
  .tooltip-float.tooltip-bottom > .tooltip-content {
    inset: auto;
    top: anchor(bottom);
    left: anchor(center);
    margin: var(--tooltip-gap) 0 0;
  }
  .tooltip-float.tooltip-left > .tooltip-content {
    inset: auto;
    right: anchor(left);
    top: anchor(center);
    margin: 0 var(--tooltip-gap) 0 0;
    position-try-fallbacks: flip-inline;
  }
  .tooltip-float.tooltip-right > .tooltip-content {
    inset: auto;
    left: anchor(right);
    top: anchor(center);
    margin: 0 0 0 var(--tooltip-gap);
    position-try-fallbacks: flip-inline;
  }
}
.collapse {
  display: grid;
  grid-template-rows: auto 0fr;
  border: var(--collapse-border-width) solid var(--collapse-border);
  border-radius: var(--collapse-radius);
  background-color: var(--collapse-bg);
  color: var(--collapse-fg);
  box-shadow: var(--collapse-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  transition: grid-template-rows var(--collapse-speed) ease;
}

.collapse:has(> .collapse-trigger[aria-expanded=true]) {
  grid-template-rows: auto 1fr;
}

.collapse-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  width: 100%;
  margin: 0;
  padding: var(--collapse-p);
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.collapse-trigger:hover {
  background-color: var(--collapse-hover);
}

.collapse-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.collapse-panel {
  min-height: 0;
  overflow: hidden;
}

.collapse-inner {
  padding: 0 var(--collapse-px, 1em) var(--collapse-py, 1em);
}

/* A chevron that turns when open. */
.collapse-arrow > .collapse-trigger::after {
  content: "";
  flex: none;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15em;
  transition: rotate var(--collapse-speed) ease, translate var(--collapse-speed) ease;
}

.collapse-arrow > .collapse-trigger[aria-expanded=true]::after {
  rotate: 225deg;
  translate: 0 0.1em;
}

/* A plus that becomes a minus. */
.collapse-plus > .collapse-trigger::after {
  content: "+";
  flex: none;
  font-size: 1.25em;
  line-height: 1;
  font-weight: 400;
}

.collapse-plus > .collapse-trigger[aria-expanded=true]::after {
  content: "−";
}

@media (prefers-reduced-motion: reduce) {
  .collapse,
  .collapse-trigger::after {
    transition: none;
  }
}
.editable {
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* No padding: a value at rest lines up with the text around it. Its wash
   is a spread shadow, so it reaches past the value without moving it. */
.editable-display {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  max-width: 100%;
  min-height: 1lh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--editable-radius);
  background: transparent;
  color: var(--editable-fg);
  font: inherit;
  text-align: start;
  cursor: text;
  transition: background-color 0.15s, box-shadow 0.15s;
}

@media (hover: hover) {
  button.editable-display:not(:disabled):hover {
    background-color: var(--editable-hover-bg);
    box-shadow: 0 0 0 var(--editable-pad) var(--editable-hover-bg);
  }
}
.editable-display:focus-visible {
  outline: 2px solid var(--editable-focus);
  outline-offset: var(--editable-pad);
}

.editable-display:disabled {
  cursor: default;
}

/* Opened from outside only: text, not a control. */
span.editable-display {
  cursor: inherit;
}

.editable-empty {
  color: var(--editable-empty-fg);
}

.editable-form {
  display: inline-flex;
  max-width: 100%;
}

.editable-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}

.editable-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.editable-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.editable-md {
  --fontsize: var(--md, var(--default-md));
}

.editable-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.editable-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.accordion {
  display: flex;
  flex-direction: column;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.accordion:not(.accordion-separate) > .collapse:not(:first-child) {
  margin-top: calc(var(--collapse-border-width) * -1);
  border-start-start-radius: 0;
  border-start-end-radius: 0;
}

.accordion:not(.accordion-separate) > .collapse:not(:last-child) {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}

.accordion-separate {
  gap: var(--accordion-gap);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--rating-gap);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  --rating-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.94 6.1 6.56.86-4.8 4.6 1.2 6.54L12 17.4l-5.9 3.2 1.2-6.54-4.8-4.6 6.56-.86z'/%3E%3C/svg%3E");
}

.rating-item {
  appearance: none;
  flex: none;
  width: var(--rating-size);
  height: var(--rating-size);
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--rating-off);
  -webkit-mask: var(--rating-mask) center/contain no-repeat;
  mask: var(--rating-mask) center/contain no-repeat;
  cursor: pointer;
  transition: background-color 0.1s, scale 0.1s;
}

.rating-item:checked,
.rating-item:has(~ .rating-item:checked) {
  background-color: var(--rating-on);
}

/* Hover previews: everything off, then up to the hovered item on. */
.rating:hover .rating-item {
  background-color: var(--rating-off);
}

.rating .rating-item:hover,
.rating .rating-item:has(~ .rating-item:hover) {
  background-color: var(--rating-on);
}

.rating-item:hover {
  scale: 1.12;
}

.rating-item:focus-visible {
  outline: 2px solid var(--rating-on);
  outline-offset: 2px;
}

.rating-item:disabled,
.rating-readonly .rating-item {
  cursor: default;
  pointer-events: none;
}

.switch {
  position: relative;
  display: inline-flex;
  gap: var(--switch-pad);
  padding: var(--switch-pad);
  border: var(--switch-border-width) solid var(--switch-border);
  border-radius: var(--switch-radius);
  background-color: var(--switch-bg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.switch-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  height: var(--size);
  padding-inline: calc(var(--size) / 2.5);
  border-radius: var(--switch-item-radius);
  color: var(--switch-fg);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.switch-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-item:hover {
  color: var(--switch-active-fg);
}

.switch-item:has(.switch-input:checked) {
  background-color: var(--switch-active-bg);
  color: var(--switch-active-fg);
  box-shadow: var(--switch-active-shadow);
}

/* The indicator: the checked look as one block that the script slides
   from item to item (--switch-x / --switch-w, measured on the item).
   With it, the checked item lets it show through; without a script
   there is no indicator and the item paints itself. */
.switch-indicator {
  position: absolute;
  inset-block: var(--switch-pad);
  left: var(--switch-x, 0);
  width: var(--switch-w, 0);
  border-radius: var(--switch-item-radius);
  background-color: var(--switch-active-bg);
  box-shadow: var(--switch-active-shadow);
  pointer-events: none;
  transition: left 0.25s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.25s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.switch-indicator ~ .switch-item {
  z-index: 1;
}

.switch-indicator ~ .switch-item:has(.switch-input:checked) {
  background-color: transparent;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .switch-indicator {
    transition: none;
  }
}
.switch-item:has(.switch-input:focus-visible) {
  outline: 2px solid var(--switch-active-fg);
  outline-offset: 1px;
}

.switch-item:has(.switch-input:disabled) {
  opacity: 0.5;
  pointer-events: none;
}

.switch-block {
  display: flex;
}

.switch-block > .switch-item {
  flex: 1 1 0;
}

.number-input {
  display: inline-flex;
  align-items: stretch;
  height: var(--size);
  border: var(--number-input-border-width) solid var(--number-input-border);
  border-radius: var(--number-input-radius);
  background-color: var(--number-input-bg);
  color: var(--number-input-fg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  overflow: hidden;
  vertical-align: middle;
}

.number-input:focus-within {
  box-shadow: var(--number-input-focus);
}

.number-input-field {
  width: var(--number-input-width);
  min-width: 0;
  margin: 0;
  padding: 0 calc(0.75em * var(--scale));
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: end;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* With its buttons, the figure sits centred between them. */
.number-input:has(> .number-input-dec) .number-input-field {
  padding: 0 0.25em;
  text-align: center;
}

.number-input-field:focus {
  outline: none;
}

.number-input-field::-webkit-inner-spin-button,
.number-input-field::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.number-input-dec,
.number-input-inc {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--size);
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--number-input-btn-bg);
  color: inherit;
  font: inherit;
  font-size: 1.15em;
  line-height: 1;
  cursor: pointer;
}

.number-input-dec:hover,
.number-input-inc:hover {
  background-color: var(--number-input-btn-hover);
}

.number-input-dec:disabled,
.number-input-inc:disabled {
  opacity: 0.4;
  cursor: default;
  background-color: var(--number-input-btn-bg);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--empty-state-gap);
  padding: var(--empty-state-p);
  border: var(--empty-state-border, 0 solid transparent);
  border-radius: var(--empty-state-radius, 0);
  color: var(--empty-state-fg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  text-align: center;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: var(--empty-state-icon-size);
  height: var(--empty-state-icon-size);
  margin-bottom: 0.25em;
  border-radius: 999px;
  background-color: var(--empty-state-icon-bg);
  color: var(--empty-state-icon-fg);
}

.empty-state-icon svg {
  width: 50%;
  height: 50%;
}

.empty-state-title {
  margin: 0;
  font-size: 1.125em;
  font-weight: 600;
}

.empty-state-body {
  max-width: 32em;
  margin: 0;
  color: var(--empty-state-muted);
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
  margin-top: 0.5em;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hero-gap);
  padding: var(--hero-p);
  border-radius: var(--hero-radius);
  background: var(--hero-bg);
  color: var(--hero-fg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.hero-content {
  display: flex;
  flex: 1 1 20em;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(var(--hero-gap) / 2.5);
  min-width: 0;
}

.hero-title {
  margin: 0;
  font-size: var(--hero-title-size);
  font-weight: var(--hero-title-weight);
  line-height: 1.1;
  text-wrap: balance;
}

.hero-body {
  max-width: 36em;
  margin: 0;
  color: var(--hero-muted);
  font-size: 1.125em;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  margin-top: 0.5em;
}

.hero-media {
  flex: 1 1 18em;
  min-width: 0;
}

.hero-media > :is(img, video, svg) {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--hero-media-radius, 0);
}

.hero-center {
  justify-content: center;
  text-align: center;
}

.hero-center > .hero-content {
  align-items: center;
}

.hero-center .hero-body {
  margin-inline: auto;
}

.hero-reverse {
  flex-direction: row-reverse;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: var(--footer-gap);
  padding: var(--footer-p);
  background-color: var(--footer-bg);
  color: var(--footer-fg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--footer-col), 1fr));
  gap: var(--footer-gap);
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
  min-width: 0;
}

.footer-section a {
  color: var(--footer-muted);
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--footer-fg);
  text-decoration: underline;
}

.footer-title {
  margin: 0 0 0.25em;
  font-size: 0.8125em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding-top: var(--footer-gap);
  border-top: var(--footer-rule, 1px) solid var(--footer-border);
  color: var(--footer-muted);
  font-size: 0.875em;
}

.footer-center {
  text-align: center;
}

.footer-center .footer-section {
  align-items: center;
}

.footer-center .footer-bottom {
  justify-content: center;
}

.mobile-frame {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: var(--mobile-frame-width);
  aspect-ratio: 9/19.5;
  padding: var(--mobile-frame-bezel);
  border-radius: var(--mobile-frame-radius);
  background-color: var(--mobile-frame-body);
  box-shadow: var(--mobile-frame-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  vertical-align: top;
}

/* The island. */
.mobile-frame::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(var(--mobile-frame-bezel) + 0.55em);
  left: 50%;
  width: 30%;
  height: 1.5em;
  border-radius: 999px;
  background-color: var(--mobile-frame-body);
  translate: -50% 0;
}

/* The side button. */
.mobile-frame::after {
  content: "";
  position: absolute;
  top: 24%;
  right: -0.22em;
  width: 0.22em;
  height: 11%;
  border-radius: 0 0.2em 0.2em 0;
  background-color: var(--mobile-frame-body);
}

/* A screen is where page chrome (a dock, a toast) is placed against. */
.mobile-frame-screen {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--mobile-frame-radius) - var(--mobile-frame-bezel));
  background-color: var(--mobile-frame-screen-bg);
  color: var(--mobile-frame-screen-fg);
  overflow: auto;
  scrollbar-width: none;
}

.window-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: var(--window-frame-border-width) solid var(--window-frame-border);
  border-radius: var(--window-frame-radius);
  background-color: var(--window-frame-bg);
  color: var(--window-frame-fg);
  box-shadow: var(--window-frame-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  overflow: hidden;
}

.window-frame-bar {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  gap: 0.75em;
  min-height: 2.4em;
  padding: 0.3em 0.9em;
  border-bottom: var(--window-frame-border-width) solid var(--window-frame-border);
  background-color: var(--window-frame-bar-bg);
  color: var(--window-frame-bar-fg);
}

.window-frame-controls {
  display: flex;
  gap: 0.45em;
}

.window-frame-controls > span {
  width: 0.75em;
  height: 0.75em;
  border-radius: 50%;
  background-color: var(--window-frame-dot-1);
}

.window-frame-controls > span:nth-child(2) {
  background-color: var(--window-frame-dot-2);
}

.window-frame-controls > span:nth-child(3) {
  background-color: var(--window-frame-dot-3);
}

.window-frame-title {
  overflow: hidden;
  font-size: 0.85em;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-frame-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4em;
}

.window-frame-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.laptop-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: var(--laptop-frame-width);
  max-width: 100%;
  font-size: var(--fontsize, var(--base, var(--default-base)));
  vertical-align: top;
}

.laptop-frame-lid {
  position: relative;
  box-sizing: border-box;
  width: 84%;
  padding: var(--laptop-frame-bezel);
  padding-top: calc(var(--laptop-frame-bezel) * 1.6);
  border-radius: 0.9em 0.9em 0 0;
  background-color: var(--laptop-frame-body);
  box-shadow: var(--laptop-frame-shadow);
}

/* The camera. */
.laptop-frame-lid::before {
  content: "";
  position: absolute;
  top: calc(var(--laptop-frame-bezel) * 0.55);
  left: 50%;
  width: 0.35em;
  height: 0.35em;
  border-radius: 50%;
  background-color: color-mix(in oklab, var(--laptop-frame-screen-bg) 35%, var(--laptop-frame-body));
  translate: -50% 0;
}

.laptop-frame-screen {
  aspect-ratio: 16/10;
  background-color: var(--laptop-frame-screen-bg);
  color: var(--laptop-frame-screen-fg);
  overflow: auto;
}

.laptop-frame-base {
  position: relative;
  width: 100%;
  height: 0.9em;
  border-radius: 0 0 1.2em 1.2em/0 0 0.9em 0.9em;
  background-color: var(--laptop-frame-base);
  box-shadow: var(--laptop-frame-shadow);
}

/* The notch to lift the lid. */
.laptop-frame-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 0.3em;
  border-radius: 0 0 0.4em 0.4em;
  background-color: color-mix(in oklab, var(--laptop-frame-base) 70%, #000);
  translate: -50% 0;
}

.drawer {
  position: var(--drawer-position, fixed);
  z-index: 900;
  flex-direction: column;
  box-sizing: border-box;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0 solid var(--drawer-border);
  background-color: var(--drawer-bg);
  color: var(--drawer-fg);
  box-shadow: var(--drawer-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  overflow: visible;
  transition: translate var(--drawer-speed) ease;
}

.drawer:not(dialog),
dialog.drawer[open] {
  display: flex;
}

.drawer {
  inset: 0 auto 0 0;
  width: var(--drawer-size);
  height: auto;
  max-width: 100%;
}

.drawer[data-state=hidden] {
  translate: -100% 0;
}

.drawer[data-state=peek] {
  translate: calc(-100% + var(--drawer-peek)) 0;
}

.drawer,
.drawer-left {
  border-inline-end-width: var(--drawer-border-width);
  border-radius: 0 var(--drawer-radius) var(--drawer-radius) 0;
}

.drawer-left {
  inset: 0 auto 0 0;
  width: var(--drawer-size);
  height: auto;
  max-width: 100%;
}

.drawer-left[data-state=hidden] {
  translate: -100% 0;
}

.drawer-left[data-state=peek] {
  translate: calc(-100% + var(--drawer-peek)) 0;
}

.drawer-right {
  inset: 0 0 0 auto;
  width: var(--drawer-size);
  height: auto;
  max-width: 100%;
}

.drawer-right[data-state=hidden] {
  translate: 100% 0;
}

.drawer-right[data-state=peek] {
  translate: calc(100% - var(--drawer-peek)) 0;
}

.drawer-right {
  border-width: 0;
  border-inline-start-width: var(--drawer-border-width);
  border-radius: var(--drawer-radius) 0 0 var(--drawer-radius);
}

.drawer-top {
  inset: 0 0 auto 0;
  height: var(--drawer-size);
  width: auto;
  max-height: 100%;
}

.drawer-top[data-state=hidden] {
  translate: 0 -100%;
}

.drawer-top[data-state=peek] {
  translate: 0 calc(-100% + var(--drawer-peek));
}

.drawer-top {
  border-width: 0;
  border-bottom-width: var(--drawer-border-width);
  border-radius: 0 0 var(--drawer-radius) var(--drawer-radius);
}

.drawer-bottom {
  inset: auto 0 0 0;
  height: var(--drawer-size);
  width: auto;
  max-height: 100%;
}

.drawer-bottom[data-state=hidden] {
  translate: 0 100%;
}

.drawer-bottom[data-state=peek] {
  translate: 0 calc(100% - var(--drawer-peek));
}

.drawer-bottom {
  border-width: 0;
  border-top-width: var(--drawer-border-width);
  border-radius: var(--drawer-radius) var(--drawer-radius) 0 0;
}

.drawer[data-state=hidden] {
  box-shadow: none;
}

.drawer::backdrop {
  background-color: var(--drawer-backdrop);
}

.drawer-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--drawer-p);
  overflow: auto;
  overscroll-behavior: contain;
}

.drawer-handle {
  position: absolute;
  inset: 50% 0 auto auto;
  translate: 0 -50%;
  width: var(--drawer-handle-w);
  height: var(--drawer-handle-l);
  margin: calc(var(--drawer-handle-w) * 1.5);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: var(--drawer-handle-bg);
  cursor: pointer;
}

.drawer-left > .drawer-handle {
  inset: 50% 0 auto auto;
  translate: 0 -50%;
  width: var(--drawer-handle-w);
  height: var(--drawer-handle-l);
}

.drawer-right > .drawer-handle {
  inset: 50% auto auto 0;
  translate: 0 -50%;
  width: var(--drawer-handle-w);
  height: var(--drawer-handle-l);
}

.drawer-top > .drawer-handle {
  inset: auto auto 0 50%;
  translate: -50% 0;
  width: var(--drawer-handle-l);
  height: var(--drawer-handle-w);
}

.drawer-bottom > .drawer-handle {
  inset: 0 auto auto 50%;
  translate: -50% 0;
  width: var(--drawer-handle-l);
  height: var(--drawer-handle-w);
}

/* A larger hit area than the grip it draws. */
.drawer-handle::before {
  content: "";
  position: absolute;
  inset: -0.75em;
}

@media (prefers-reduced-motion: reduce) {
  .drawer {
    transition: none;
  }
}
.sidebar-layout {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

.sidebar-layout > :not(.sidebar) {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

.sidebar {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  flex-direction: column;
  box-sizing: border-box;
  width: var(--sidebar-width);
  height: 100%;
  overflow: hidden;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-fg);
  border-inline-end: var(--sidebar-border-width) solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  transition: width var(--sidebar-speed);
}

.sidebar-end {
  order: 1;
  border-inline-end: 0;
  border-inline-start: var(--sidebar-border-width) solid var(--sidebar-border);
}

.sidebar-head,
.sidebar-foot {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--sidebar-gap);
  padding: var(--sidebar-p);
}

.sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--sidebar-p) var(--sidebar-p);
  scrollbar-width: thin;
}

/* Laid out at the open width whatever the sidebar's width: folding
   clips the content instead of reflowing it on every frame. */
.sidebar > * {
  min-width: calc(var(--sidebar-width) - var(--sidebar-border-width));
  box-sizing: border-box;
  transition: opacity var(--sidebar-speed);
}

/* Except the head: as wide as the sidebar, so the toggle at its end stays on
   the edge and travels with it. On the rail, that edge centres it. */
.sidebar > .sidebar-head {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-head > :not(.sidebar-toggle) {
  min-width: 0;
}

.sidebar-toggle {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: calc(var(--sidebar-rail) - 2 * var(--sidebar-p));
  aspect-ratio: 1;
  margin-inline-start: auto;
  padding: 0;
  border: 0;
  border-radius: 0.5em;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sidebar-toggle:hover {
  background-color: color-mix(in oklab, currentColor 8%, rgba(0, 0, 0, 0));
}

.sidebar-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.sidebar-toggle svg {
  width: 1.1em;
  height: 1.1em;
  transition: rotate var(--sidebar-speed);
}

/* ── Folded: a rail. The head stays, everything else fades. ── */
.sidebar-collapsed {
  width: var(--sidebar-rail);
}

.sidebar-collapsed > :not(.sidebar-head) {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sidebar-speed), visibility 0s var(--sidebar-speed);
}

.sidebar-collapsed > .sidebar-head > :not(.sidebar-toggle, .sidebar-keep) {
  display: none;
}

.sidebar-collapsed .sidebar-toggle svg {
  rotate: 180deg;
}

.sidebar-end .sidebar-toggle svg,
[dir=rtl] .sidebar-toggle svg {
  scale: -1 1;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar > *,
  .sidebar-toggle svg {
    transition: none;
  }
}
/* ── Axis: size ── */
.sidebar-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.sidebar-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.sidebar-md {
  --fontsize: var(--md, var(--default-md));
}

.sidebar-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.sidebar-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  width: 100%;
  color: var(--steps-fg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.steps-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75em;
  font-size: 0.85em;
  font-weight: 700;
}

.steps-heading > :last-child {
  flex: none;
  color: var(--steps-muted);
  font-weight: 600;
}

.steps-list {
  display: flex;
  gap: var(--steps-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 0.5em;
  min-width: 0;
}

.steps-track {
  display: flex;
  align-items: center;
  gap: var(--steps-seg-gap);
}

.steps-marker,
.steps-segment {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.steps-marker:disabled,
.steps-segment:disabled {
  cursor: default;
}

.steps-marker {
  display: grid;
  flex: none;
  place-items: center;
  width: var(--steps-marker);
  height: var(--steps-marker);
  border: 2px solid var(--steps-off);
  border-radius: 50%;
  background-color: var(--steps-marker-bg);
  color: var(--steps-marker-fg);
}

.steps-marker svg {
  width: 65%;
  height: 65%;
  visibility: hidden;
}

.steps-item[data-state=current] > .steps-track > .steps-marker,
.steps-item[data-state=visited] > .steps-track > .steps-marker {
  border-color: var(--steps-color);
}

.steps-item[data-state=complete] > .steps-track > .steps-marker {
  border-color: var(--steps-color);
  background-color: var(--steps-color);
}

.steps-item[data-state=complete] > .steps-track > .steps-marker svg {
  visibility: visible;
}

.steps-segment {
  flex: 1 1 0;
  padding-block: 0.3em;
}

.steps-segment > span {
  display: block;
  height: var(--steps-bar);
  border-radius: var(--steps-bar);
  background: var(--steps-off);
  transition: transform 0.1s ease;
}

.steps-segment[data-state=visited] > span {
  background: var(--steps-visited);
}

.steps-segment[data-state=complete] > span {
  background: var(--steps-color);
}

.steps-segment[data-state=current] > span {
  background: repeating-linear-gradient(var(--steps-dir, 90deg), var(--steps-color) 0 0.9em, var(--steps-off) 0 1.8em);
}

.steps-segment[data-issue=warning]:not([data-state=current]) > span {
  background: var(--steps-warning);
}

.steps-segment[data-issue=error]:not([data-state=current]) > span {
  background: var(--steps-error);
}

.steps-segment:not(:disabled):hover > span {
  transform: scale(1, 1.6);
}

.steps-segment:focus-visible,
.steps-marker:focus-visible {
  outline: 2px solid var(--steps-color);
  outline-offset: 2px;
  border-radius: 0.25em;
}

.steps-label {
  display: flex;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
  margin: 0;
  color: var(--steps-muted);
  font-size: 0.85em;
  font-weight: 600;
}

.steps-label > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steps-item:not([data-state=unknown]) > .steps-label {
  color: var(--steps-fg);
}

.steps-item[data-state=current] > .steps-label {
  font-weight: 700;
}

.steps-issue {
  display: inline-flex;
  flex: none;
  color: var(--steps-error);
}

.steps-issue[data-issue=warning] {
  color: var(--steps-warning);
}

.steps-issue svg {
  width: 1.1em;
  height: 1.1em;
}

.steps-sublabel {
  margin: -0.35em 0 0;
  color: var(--steps-muted);
  font-size: 0.8em;
  font-weight: 500;
}

.steps-horizontal .steps-list {
  flex-direction: row;
}

/* Vertical: the track becomes a column on the left of the labels. */
.steps-vertical .steps-list {
  flex-direction: column;
}

.steps-vertical .steps-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 0.75em;
  row-gap: 0.1em;
  align-items: start;
}

.steps-vertical .steps-track {
  flex-direction: column;
  grid-row: 1/span 3;
  align-self: stretch;
  min-height: 3em;
  --steps-dir: 180deg;
}

.steps-vertical .steps-segment {
  display: flex;
  justify-content: center;
  padding: 0 0.3em;
  min-height: 1.5em;
}

.steps-vertical .steps-segment > span {
  width: var(--steps-bar);
  height: auto;
}

.steps-vertical .steps-segment:not(:disabled):hover > span {
  transform: scale(1.6, 1);
}

.steps-vertical .steps-label {
  padding-top: calc((var(--steps-marker) - 1.2em) / 2);
}

.steps-vertical .steps-sublabel {
  margin: 0;
}

.steps-compact .steps-list {
  gap: calc(var(--steps-gap) * 0.6);
}

.steps-compact .steps-track {
  gap: calc(var(--steps-seg-gap) / 2);
}

.steps-compact .steps-segment {
  padding-block: 0.5em;
}

.combobox {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  min-width: 0;
}

.combobox > .input {
  width: 100%;
}

.combobox-option {
  gap: 0.6em;
}

/* Multiple: each option carries a box, ticked when picked. */
.combobox-multiple .combobox-option::before {
  content: "";
  display: grid;
  flex: none;
  place-items: center;
  width: 1em;
  height: 1em;
  box-sizing: border-box;
  border: 1.5px solid var(--combobox-check-border);
  border-radius: 0.25em;
}

.combobox-multiple .combobox-option[aria-selected=true]::before {
  content: "✓";
  border-color: var(--combobox-check);
  background-color: var(--combobox-check);
  color: var(--combobox-check-fg);
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
}

.combobox-multiple .combobox-option[data-active] {
  background-color: var(--combobox-active);
}

.chips-input {
  display: flex;
  flex-direction: column;
  gap: var(--chips-input-gap);
  min-width: 0;
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.chips-input-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--chips-input-list-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* An empty list takes no room: no gap under a lone field. */
.chips-input-list:empty {
  display: none;
}

.chips-input-list > .chip {
  max-width: 100%;
}

/* ── Axis: side ── where the list sits. */
.chips-input-top {
  flex-direction: column-reverse;
}

.chips-input-start,
.chips-input-end {
  flex-direction: row;
  align-items: flex-start;
}

.chips-input-start {
  flex-direction: row-reverse;
}

.chips-input:is(.chips-input-start, .chips-input-end) > :not(.chips-input-list) {
  flex: 1 1 var(--chips-input-side-min);
  min-width: var(--chips-input-side-min);
}

.chips-input:is(.chips-input-start, .chips-input-end) > .chips-input-list {
  flex: 0 1 auto;
  align-self: center;
}

.chips-input-remove {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  margin: 0 -0.4em 0 0.1em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
}

.chips-input-remove:hover,
.chips-input-remove:focus-visible {
  opacity: 1;
  background-color: color-mix(in oklab, currentColor 15%, rgba(0, 0, 0, 0));
}

/* ── Axis: size ── */
.chips-input-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.chips-input-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.chips-input-md {
  --fontsize: var(--md, var(--default-md));
}

.chips-input-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.chips-input-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.file-explorer {
  display: flex;
  flex-direction: column;
  height: var(--file-explorer-height);
  min-height: 0;
  border: var(--file-explorer-border-width) solid var(--file-explorer-border);
  border-radius: var(--file-explorer-radius);
  background-color: var(--file-explorer-bg);
  color: var(--file-explorer-fg);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  overflow: hidden;
}

.file-explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 0.75em;
  padding: 0.5em 0.75em;
  border-bottom: var(--file-explorer-border-width) solid var(--file-explorer-border);
  background-color: var(--file-explorer-pane);
}

.file-explorer-path {
  flex: 1 1 12em;
  min-width: 0;
}

.file-explorer-path button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.file-explorer-path li:last-child button {
  font-weight: 600;
}

.file-explorer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.file-explorer-views {
  display: inline-flex;
  border: var(--file-explorer-border-width) solid var(--file-explorer-border);
  border-radius: calc(var(--file-explorer-radius) / 1.5);
  overflow: hidden;
}

.file-explorer-view {
  display: inline-grid;
  place-items: center;
  width: 2em;
  height: 1.85em;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--file-explorer-muted);
  cursor: pointer;
}

.file-explorer-view[aria-pressed=true] {
  background-color: var(--file-explorer-selected);
  color: var(--file-explorer-selected-fg);
}

.file-explorer-view svg {
  width: 1.1em;
  height: 1.1em;
}

.file-explorer-main {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.file-explorer-tree {
  flex: none;
  width: var(--file-explorer-tree-width);
  padding: 0.4em;
  border-right: var(--file-explorer-border-width) solid var(--file-explorer-border);
  background-color: var(--file-explorer-pane);
  overflow: auto;
}

.file-explorer-tree ul {
  margin: 0;
  padding: 0 0 0 0.9em;
  list-style: none;
}

.file-explorer-tree > ul {
  padding-left: 0;
}

.file-explorer-tree-item {
  display: flex;
  align-items: center;
  gap: 0.35em;
  width: 100%;
  padding: 0.3em 0.4em;
  border: 0;
  border-radius: calc(var(--file-explorer-radius) / 1.5);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}

.file-explorer-tree-item > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-explorer-tree-item:hover {
  background-color: var(--file-explorer-hover);
}

.file-explorer-tree-item[aria-current=true] {
  background-color: var(--file-explorer-selected);
  color: var(--file-explorer-selected-fg);
  font-weight: 600;
}

.file-explorer-twisty {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1em;
  height: 1em;
  transition: rotate 0.15s;
}

.file-explorer-twisty::before {
  content: "";
  width: 0.35em;
  height: 0.35em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: -45deg;
}

.file-explorer-twisty:empty:not([data-leaf])::before {
  opacity: 0.7;
}

.file-explorer-twisty[data-leaf]::before {
  content: none;
}

[aria-expanded=true] > .file-explorer-tree-item > .file-explorer-twisty {
  rotate: 90deg;
}

.file-explorer-content {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  outline: none;
}

.file-explorer-content:focus-visible {
  box-shadow: inset 0 0 0 2px var(--file-explorer-drop);
}

.file-explorer-table {
  width: 100%;
  border-collapse: collapse;
}

.file-explorer-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 0.45em 0.75em;
  border-bottom: var(--file-explorer-border-width) solid var(--file-explorer-border);
  background-color: var(--file-explorer-bg);
  color: var(--file-explorer-muted);
  font-size: 0.85em;
  font-weight: 600;
  text-align: start;
  white-space: nowrap;
}

.file-explorer-table th button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.file-explorer-table th[aria-sort] {
  color: var(--file-explorer-fg);
}

.file-explorer-table td {
  padding: 0.4em 0.75em;
  white-space: nowrap;
}

.file-explorer-table td:first-child {
  width: 100%;
  max-width: 0;
}

.file-explorer-item {
  cursor: default;
  user-select: none;
}

.file-explorer-item:hover {
  background-color: var(--file-explorer-hover);
}

.file-explorer-item[aria-selected=true] {
  background-color: var(--file-explorer-selected);
  color: var(--file-explorer-selected-fg);
}

.file-explorer-item[data-drop],
.file-explorer-tree-item[data-drop] {
  outline: 2px dashed var(--file-explorer-drop);
  outline-offset: -2px;
}

.file-explorer-content:focus-visible .file-explorer-item[data-focus] {
  outline: 2px solid var(--file-explorer-drop);
  outline-offset: -2px;
}

.file-explorer-content[data-drop] {
  box-shadow: inset 0 0 0 2px var(--file-explorer-drop);
}

.file-explorer-entry {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-width: 0;
}

.file-explorer-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  color: var(--file-explorer-icon-color, var(--file-explorer-muted));
}

/* A picture instead of an icon: the file's own thumbnail, cropped to
   the icon's box, a little rounded. The grid view gives it room. */
.file-explorer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.2em;
  background-color: var(--file-explorer-muted);
}

.file-explorer-grid .file-explorer-icon[data-preview] {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
}

.file-explorer-grid .file-explorer-thumb {
  border-radius: 0.4em;
}

.file-explorer-icon svg {
  width: 100%;
  height: 100%;
}

.file-explorer-icon[data-kind=folder] {
  color: var(--file-explorer-folder);
}

.file-explorer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-explorer-meta {
  color: var(--file-explorer-muted);
  font-size: 0.875em;
  font-variant-numeric: tabular-nums;
}

[aria-selected=true] .file-explorer-meta,
[aria-selected=true] .file-explorer-icon {
  color: inherit;
}

.file-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5em, 1fr));
  gap: 0.5em;
  margin: 0;
  padding: 0.75em;
  list-style: none;
}

.file-explorer-grid > .file-explorer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  padding: 0.85em 0.5em 0.6em;
  border-radius: var(--file-explorer-radius);
  text-align: center;
}

.file-explorer-grid .file-explorer-icon {
  width: 2.75em;
  height: 2.75em;
}

.file-explorer-grid .file-explorer-name {
  display: -webkit-box;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

.file-explorer-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 2em;
  color: var(--file-explorer-muted);
}

.file-explorer-details {
  flex: none;
  width: var(--file-explorer-details-width);
  padding: 1em;
  border-left: var(--file-explorer-border-width) solid var(--file-explorer-border);
  overflow: auto;
}

.file-explorer-menu {
  position: fixed;
  z-index: 1000;
  min-width: 12em;
  padding: 0.25em;
  border: var(--file-explorer-border-width) solid var(--file-explorer-border);
  border-radius: var(--file-explorer-radius);
  background-color: var(--file-explorer-bg);
  color: var(--file-explorer-fg);
  box-shadow: var(--file-explorer-shadow);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

/* What peony decides, one file per component. */
/* Radix's Avatar: the fallback is the soft weight — a tint of the
   accent with the accent as ink — and the ring sits on the page
   ground, one hairline away. */
.avatar {
  --avatar-size: calc(3em * var(--scale));
  --avatar-radius: 50%;
  --avatar-inner-radius: 50%;
  --avatar-mask: none;
  --avatar-ring: #0000;
  --avatar-ring-width: 0px;
  --avatar-gap: var(--color-surface-1);
  --avatar-gap-width: 0px;
  --avatar-border: #0000;
  --avatar-border-width: 0px;
  --avatar-shadow: none;
  --avatar-bg: color-mix(in oklab, var(--color-primary) calc(var(--peony-tint, 1) * 14%), var(--color-surface-1));
  --avatar-fg: var(--color-primary);
  --avatar-weight: 500;
}

/* ── Axis: color ── the contour. */
.avatar-primary {
  --avatar-ring: var(--color-primary);
  --avatar-ring-width: 2px;
  --avatar-gap-width: 2px;
}

.avatar-neutral {
  --avatar-ring: var(--color-neutral);
  --avatar-ring-width: 2px;
  --avatar-gap-width: 2px;
}

.avatar-info {
  --avatar-ring: var(--color-info);
  --avatar-ring-width: 2px;
  --avatar-gap-width: 2px;
}

.avatar-success {
  --avatar-ring: var(--color-success);
  --avatar-ring-width: 2px;
  --avatar-gap-width: 2px;
}

.avatar-warning {
  --avatar-ring: var(--color-warning);
  --avatar-ring-width: 2px;
  --avatar-gap-width: 2px;
}

.avatar-error {
  --avatar-ring: var(--color-error);
  --avatar-ring-width: 2px;
  --avatar-gap-width: 2px;
}

/* ── Axis: shape ── Radix rounds an avatar with the theme radius;
   peony keeps the circle as the default and the box as the
   alternative. */
.avatar-square {
  --avatar-radius: var(--radius-box);
  --avatar-inner-radius: max(0px, calc(var(--radius-box) - var(--avatar-ring-width)));
}

.badge:has(> .avatar-square) {
  --avatar-corner: 0%;
}

/* ── peony signature: the white ring ──
   Every face sits in a thin white ring on a soft shadow, the way
   a profile picture lifts off a dashboard card. */
.avatar {
  --avatar-shadow: 0 0.15em 0.5em -0.1em color-mix(in oklab, var(--color-on-surface) 22%, #0000);
}

.badge {
  width: max-content;
}

/* position variants */
.badge-start {
  --badge-s: 0;
  --badge-e: auto;
  --badge-x: -50%;
}

[dir=rtl] .badge-start {
  --badge-s: auto;
  --badge-e: 0;
  --badge-x: 50%;
}

.badge-center {
  --badge-s: 50%;
  --badge-e: 50%;
  --badge-x: -50%;
}

[dir=rtl] .badge-center {
  --badge-x: 50%;
}

.badge-end {
  --badge-s: auto;
  --badge-e: 0;
  --badge-x: 50%;
}

[dir=rtl] .badge-end {
  --badge-s: 0;
  --badge-e: auto;
  --badge-x: -50%;
}

.badge-top {
  --badge-t: 0;
  --badge-b: auto;
  --badge-y: -50%;
}

.badge-middle {
  --badge-t: 50%;
  --badge-b: 50%;
  --badge-y: -50%;
}

.badge-bottom {
  --badge-t: auto;
  --badge-b: 0;
  --badge-y: 50%;
}

/* The grey ground of a Radix surface, one step up from the page;
   a colour is the solid weight, with its ink. */
.bubble {
  --bubble-bg: var(--color-surface-3);
  --bubble-fg: var(--color-on-surface);
  --bubble-radius: var(--radius-box);
  --bubble-corner: calc(0.15em * var(--scale));
  --bubble-tail: calc(0.7em * var(--scale));
  --bubble-tail-mask: url("data:image/svg+xml,%3csvg width='10' height='12' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0 12C4 12 7.5 10 9 6.5 9.6 4.5 10 2 10 0V12Z'/%3e%3c/svg%3e");
  --bubble-px: calc(0.875em * var(--scale));
  --bubble-py: calc(0.5em * var(--scale));
}

/* ── Axis: color ── */
.bubble-primary {
  --bubble-bg: var(--color-primary);
  --bubble-fg: var(--color-on-primary);
}

.bubble-neutral {
  --bubble-bg: var(--color-neutral);
  --bubble-fg: var(--color-on-neutral);
}

.bubble-info {
  --bubble-bg: var(--color-info);
  --bubble-fg: var(--color-on-info);
}

.bubble-success {
  --bubble-bg: var(--color-success);
  --bubble-fg: var(--color-on-success);
}

.bubble-warning {
  --bubble-bg: var(--color-warning);
  --bubble-fg: var(--color-on-warning);
}

.bubble-error {
  --bubble-bg: var(--color-error);
  --bubble-fg: var(--color-on-error);
}

.breadcrumbs {
  font-size: var(--fontsize, var(--base, var(--default-base)));
  max-width: 100%;
  padding-block: 0.5em;
}

.breadcrumbs > menu,
.breadcrumbs > ul,
.breadcrumbs > ol {
  min-height: min-content;
}

.breadcrumbs > menu > li > *,
.breadcrumbs > ul > li > *,
.breadcrumbs > ol > li > * {
  gap: 0.5em;
}

.breadcrumbs > menu > li > *:hover,
.breadcrumbs > ul > li > *:hover,
.breadcrumbs > ol > li > *:hover {
  text-decoration: underline;
}

.breadcrumbs > menu > li > *:focus,
.breadcrumbs > ul > li > *:focus,
.breadcrumbs > ol > li > *:focus {
  outline: none;
}

.breadcrumbs > menu > li > *:focus-visible,
.breadcrumbs > ul > li > *:focus-visible,
.breadcrumbs > ol > li > *:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.breadcrumbs > menu > li + *::before,
.breadcrumbs > ul > li + *::before,
.breadcrumbs > ol > li + *::before {
  margin-inline-end: 0.75em;
  margin-inline-start: 0.5em;
  height: 0.375em;
  width: 0.375em;
  opacity: 0.4;
  rotate: 45deg;
  border-top: 1px solid;
  border-right: 1px solid;
  background-color: rgba(0, 0, 0, 0);
}

[dir=rtl] .breadcrumbs > menu > li + *::before,
[dir=rtl] .breadcrumbs > ul > li + *::before,
[dir=rtl] .breadcrumbs > ol > li + *::before {
  rotate: -135deg;
}

/* size variants */
.breadcrumbs-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.breadcrumbs-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.breadcrumbs-md {
  --fontsize: var(--md, var(--default-md));
}

.breadcrumbs-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.breadcrumbs-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.breadcrumbs {
  color: color-mix(in oklab, var(--color-on-surface) 65%, rgba(0, 0, 0, 0));
}

.calendar {
  --calendar-bg: var(--color-surface-1);
  --calendar-fg: var(--color-on-surface);
  --calendar-border: var(--color-border);
  --calendar-border-width: 1px;
  --calendar-radius: var(--radius-box);
  --calendar-shadow: 0 10px 30px -10px oklch(0% 0 0 / 0.35), 0 0 0 1px var(--color-border);
  --calendar-inline-shadow: var(--shadow-light, none);
  --calendar-p: calc(0.75em * var(--scale));
  --calendar-gap: calc(0.25em * var(--scale));
  --calendar-cell: calc(2.25em * var(--scale));
  --calendar-cell-radius: var(--radius-field);
  --calendar-accent: var(--color-primary);
  --calendar-accent-fg: var(--color-on-primary);
  --calendar-current: var(--color-primary);
  --calendar-muted: color-mix(in oklab, var(--color-on-surface) 45%, #0000);
  --calendar-hover-bg: var(--color-surface-2);
  --calendar-range-bg: color-mix(in oklab, var(--color-primary) 15%, #0000);
  --calendar-day-name-fg: color-mix(in oklab, var(--color-on-surface) 60%, #0000);
  --calendar-title-weight: 500;
}

/* ── Axis: color ── the selected day and the range. */
.calendar-primary {
  --calendar-accent: var(--color-primary);
  --calendar-accent-fg: var(--color-on-primary);
  --calendar-current: var(--color-primary);
  --calendar-range-bg: color-mix(in oklab, var(--color-primary) 15%, #0000);
}

.calendar-neutral {
  --calendar-accent: var(--color-neutral);
  --calendar-accent-fg: var(--color-on-neutral);
  --calendar-current: var(--color-neutral);
  --calendar-range-bg: color-mix(in oklab, var(--color-neutral) 15%, #0000);
}

.calendar-info {
  --calendar-accent: var(--color-info);
  --calendar-accent-fg: var(--color-on-info);
  --calendar-current: var(--color-info);
  --calendar-range-bg: color-mix(in oklab, var(--color-info) 15%, #0000);
}

.calendar-success {
  --calendar-accent: var(--color-success);
  --calendar-accent-fg: var(--color-on-success);
  --calendar-current: var(--color-success);
  --calendar-range-bg: color-mix(in oklab, var(--color-success) 15%, #0000);
}

.calendar-warning {
  --calendar-accent: var(--color-warning);
  --calendar-accent-fg: var(--color-on-warning);
  --calendar-current: var(--color-warning);
  --calendar-range-bg: color-mix(in oklab, var(--color-warning) 15%, #0000);
}

.calendar-error {
  --calendar-accent: var(--color-error);
  --calendar-accent-fg: var(--color-on-error);
  --calendar-current: var(--color-error);
  --calendar-range-bg: color-mix(in oklab, var(--color-error) 15%, #0000);
}

/* ── peony signature: the soft day ──
   The chosen day is a disc of the accent that glows; today is
   ringed by a pale halo of it. */
.calendar .air-datepicker-cell.-selected- {
  box-shadow: 0 0.3em 0.8em -0.3em color-mix(in oklab, var(--calendar-accent) 70%, rgba(0, 0, 0, 0));
}

.calendar .air-datepicker-cell.-current-:not(.-selected-) {
  box-shadow: inset 0 0 0 calc(0.12em * var(--scale)) color-mix(in oklab, var(--calendar-accent) 45%, rgba(0, 0, 0, 0));
}

.card {
  --card-bg: var(--color-surface-1);
  --card-fg: var(--color-on-surface);
  --card-border: var(--color-border);
  --card-border-width: 0px;
  --card-radius: var(--radius-box);
  --card-shadow: var(--shadow-light, none);
  --card-p: calc(1.5em * var(--scale));
  --card-gap: calc(0.75em * var(--scale));
  --card-title-fg: inherit;
  --card-title-size: 1.125em;
  --card-title-weight: 600;
}

.carousel {
  --carousel-gap: calc(0.75em * var(--scale));
  --carousel-item-gap: 0px;
  --carousel-height: 20em;
  --carousel-radius: var(--radius-box);
  --carousel-border: 1px solid var(--color-border);
  --carousel-shadow: none;
  --carousel-arrow-inset: calc(0.75em * var(--scale));
  --carousel-upcoming-gap: calc(0.5em * var(--scale));
  --carousel-upcoming-size: 0.4em;
}

:where(.btn) {
  width: unset;
}

.btn {
  --size: calc(2.5em * var(--scale));
  --btn-p: calc(1em * var(--scale));
  --btn-border: transparent;
  gap: calc(0.375em * var(--scale));
  font-size: var(--fontsize, var(--base, var(--default-base)));
  font-weight: 600;
  border-style: solid;
  outline-offset: 2px;
  transition-property: color, background-color, border-color, box-shadow;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  transition-duration: 0.2s;
}

.btn svg {
  height: 1em;
  color: var(--btn-icon, currentColor);
}

.btn:focus-visible,
.btn:has(:focus-visible) {
  outline-width: 2px;
  outline-style: solid;
}

.btn-disabled,
.btn:disabled,
.btn[disabled] {
  --btn-border: #0000;
  --btn-fg: color-mix(in oklch, var(--color-on-surface) 20%, #0000);
}

.btn-disabled:not(.btn-link, .btn-ghost),
.btn:disabled:not(.btn-link, .btn-ghost),
.btn[disabled]:not(.btn-link, .btn-ghost) {
  background-color: color-mix(in oklch, var(--color-on-surface) 10%, rgba(0, 0, 0, 0));
  box-shadow: none;
}

/* color variants */
.btn-primary {
  --btn-color: var(--color-primary);
  --btn-fg: var(--color-on-primary);
}

.btn-neutral {
  --btn-color: var(--color-neutral);
  --btn-fg: var(--color-on-neutral);
}

.btn-info {
  --btn-color: var(--color-info);
  --btn-fg: var(--color-on-info);
}

.btn-success {
  --btn-color: var(--color-success);
  --btn-fg: var(--color-on-success);
}

.btn-warning {
  --btn-color: var(--color-warning);
  --btn-fg: var(--color-on-warning);
}

.btn-error {
  --btn-color: var(--color-error);
  --btn-fg: var(--color-on-error);
}

/* variant ghost */
.btn-ghost:not(.btn-active, :hover, :active:focus, :focus-visible, input:checked) {
  --btn-shadow: ;
  --btn-bg: #0000;
  --btn-border: #0000;
}

.btn-ghost:not(.btn-active, :hover, :active:focus, :focus-visible, input:checked):not(:disabled, [disabled], .btn-disabled) {
  outline-color: currentColor;
  --btn-fg: var(--btn-color, currentColor);
}

/* Ghost on touch screens */
@media (hover: none) {
  .btn-ghost:not(.btn-active, :active, :focus-visible, input:checked):hover {
    outline-color: currentColor;
    --btn-shadow: ;
    --btn-bg: #0000;
    --btn-fg: var(--btn-color, currentColor);
    --btn-border: #0000;
  }
}
/* variant link */
.btn-link {
  text-decoration: underline;
  outline-color: currentColor;
  --btn-border: #0000;
  --btn-bg: #0000;
  --btn-shadow: ;
}

.btn-link:not(.btn-disabled, .btn:disabled, .btn[disabled]) {
  --btn-fg: var(--btn-color, var(--color-primary));
}

.btn-link:is(.btn-active, :hover, :active:focus, :focus-visible) {
  --btn-border: #0000;
  --btn-bg: #0000;
}

/* variant outline */
.btn-outline:not(.btn-active, :hover, :active:focus, :focus-visible, input:checked, :disabled, [disabled], .btn-disabled) {
  --btn-shadow: ;
  --btn-bg: #0000;
  --btn-fg: var(--btn-color, var(--color-on-surface));
  --btn-border: var(--btn-color, var(--color-on-surface));
}

@media (hover: none) {
  .btn-outline:not(.btn-active, :active, :focus-visible, input:checked):hover {
    --btn-shadow: ;
    --btn-bg: #0000;
    --btn-fg: var(--btn-color, var(--color-on-surface));
    --btn-border: var(--btn-color, var(--color-on-surface));
  }
}
/* variant dash */
.btn-dash:not(.btn-active, :hover, :active:focus, :focus-visible, input:checked, :disabled, [disabled], .btn-disabled) {
  --btn-shadow: ;
  --btn-bg: #0000;
  --btn-fg: var(--btn-color, var(--color-on-surface));
  --btn-border: var(--btn-color, var(--color-on-surface));
}

.btn-dash {
  border-style: dashed;
}

@media (hover: none) {
  .btn-dash:not(.btn-active, :active, :focus-visible, input:checked):hover {
    --btn-shadow: ;
    --btn-bg: #0000;
    --btn-fg: var(--btn-color, var(--color-on-surface));
    --btn-border: var(--btn-color, var(--color-on-surface));
  }
}
/* variant soft */
.btn-soft:not(.btn-active, :hover, :active:focus, :focus-visible, input:checked, :disabled, [disabled], .btn-disabled) {
  --btn-shadow: ;
  --btn-fg: var(--btn-color, var(--color-on-surface));
  --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) 8%, var(--color-surface-1));
  --btn-border: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) 10%, var(--color-surface-1));
}

@media (hover: none) {
  .btn-soft:not(.btn-active, :active, :focus-visible, input:checked):hover {
    --btn-shadow: ;
    --btn-fg: var(--btn-color, var(--color-on-surface));
    --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) 8%, var(--color-surface-1));
    --btn-border: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) 10%, var(--color-surface-1));
  }
}
/* size variants */
.btn-xxs {
  --fontsize: var(--xxs, var(--default-xxs));
}

.btn-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.btn-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.btn-md {
  --fontsize: var(--md, var(--default-md));
}

.btn-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.btn-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.btn-xxl {
  --fontsize: var(--xxl, var(--default-xxl));
}

.btn-xxxl {
  --fontsize: var(--xxxl, var(--default-xxxl));
}

/* shape variants */
.btn-square {
  padding-inline: 0;
  width: var(--size);
  height: var(--size);
}

.btn-circle {
  padding-inline: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 9999px;
}

.btn-wide {
  width: 100%;
  max-width: 16rem;
}

.btn-block {
  width: 100%;
}

/* ripple */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple-wave {
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  width: var(--ripple-size, 100%);
  height: var(--ripple-size, 100%);
  margin-left: calc(var(--ripple-size, 100%) / -2);
  margin-top: calc(var(--ripple-size, 100%) / -2);
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.3;
  transform: scale(0);
  pointer-events: none;
  animation: btn-ripple 0.55s cubic-bezier(0.2, 0, 0.4, 1) forwards;
}

@keyframes btn-ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-ripple-wave {
    display: none;
  }
}
.btn {
  --btn-bg: var(--btn-color, var(--color-surface-3));
  --btn-fg: var(--color-on-surface);
  --btn-border: transparent;
  --btn-shadow: none;
  font-weight: 500;
  transition: background-color 0.12s, box-shadow 0.12s;
}

@media (hover: hover) {
  .btn:not(:disabled, [disabled], .btn-disabled):hover {
    --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-surface-3)), var(--color-on-surface) 8%);
  }
}
.btn-surface {
  --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-neutral)) calc(var(--peony-tint, 1) * 6%), var(--color-surface-1));
  --btn-fg: var(--btn-color, var(--color-on-surface));
  --btn-border: color-mix(in oklab, var(--btn-color, var(--color-neutral)) calc(var(--peony-tint, 1) * 22%), #0000);
}

.btn-classic {
  --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-neutral)) calc(var(--peony-tint, 1) * 10%), var(--color-surface-1));
  --btn-fg: var(--btn-color, var(--color-on-surface));
  --btn-border: color-mix(in oklab, var(--btn-color, var(--color-neutral)) calc(var(--peony-tint, 1) * 20%), #0000);
  box-shadow: inset 0 -1px 0 0 color-mix(in oklab, var(--color-on-surface) 12%, rgba(0, 0, 0, 0)), var(--shadow-light, );
}

/* peony: a plain button is a white object lifted off the page; a
   coloured one casts its own colour when --peony-glow allows it. */
.btn {
  --shadow-tint: var(--btn-color);
  --btn-bg: var(--btn-color, var(--color-surface-1));
  --btn-shadow: var(--shadow-light, );
  --light-depth: 0.6;
  font-weight: 600;
  transition: background-color 0.15s, box-shadow 0.2s, translate 0.2s;
}

@media (hover: hover) {
  .btn:not(:disabled, [disabled], .btn-disabled, .btn-ghost, .btn-link):hover {
    --light-depth: 1;
    --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-surface-1)), var(--color-on-surface) 6%);
  }
}
.btn-soft:not(:disabled, [disabled], .btn-disabled) {
  --btn-shadow: ;
  --btn-fg: var(--btn-color, var(--color-on-surface));
  --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) calc(var(--peony-tint, 1) * 14%), var(--color-surface-1));
  --btn-border: #0000;
}

@media (hover: hover) {
  .btn-soft:not(:disabled, [disabled], .btn-disabled):hover {
    --btn-bg: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) calc(var(--peony-tint, 1) * 22%), var(--color-surface-1));
  }
}
/* soft on a pastel: the pastel itself is too pale to read as ink */
.btn-soft:is(.btn-info, .btn-success, .btn-warning) {
  --btn-fg: color-mix(in oklab, var(--btn-color), var(--color-on-surface) 55%);
}

.btn-dash {
  --btn-border: var(--color-border);
  border-width: max(var(--border), 1.5px);
}

.btn-dash:not(.btn-active, :hover, :active:focus, :focus-visible, input:checked, :disabled, [disabled], .btn-disabled) {
  --btn-border: color-mix(in oklab, var(--btn-color, var(--color-on-surface)) 22%, #0000);
}

.btn-outline {
  --btn-shadow: ;
}

/* re-seat the coloured inks after the plain-button reset above */
.btn-primary {
  --btn-color: var(--color-primary);
  --btn-fg: var(--color-on-primary);
}

.btn-neutral {
  --btn-color: var(--color-neutral);
  --btn-fg: var(--color-on-neutral);
}

.btn-info {
  --btn-color: var(--color-info);
  --btn-fg: var(--color-on-info);
}

.btn-success {
  --btn-color: var(--color-success);
  --btn-fg: var(--color-on-success);
}

.btn-warning {
  --btn-color: var(--color-warning);
  --btn-fg: var(--color-on-warning);
}

.btn-error {
  --btn-color: var(--color-error);
  --btn-fg: var(--color-on-error);
}

.checkbox {
  --size: calc(1em * var(--scale)); /* Radix --checkbox-size size-2 is var(--space-4) = 16px. */
  font-size: var(--fontsize, var(--base, var(--default-base)));
  border: var(--border) solid var(--input-color, color-mix(in oklab, var(--color-on-surface) 20%, rgba(0, 0, 0, 0)));
  padding: calc(0.15em * var(--scale));
  transition: background-color 0.2s, box-shadow 0.2s;
}

.checkbox::before {
  width: 100%;
  height: 100%;
  rotate: 45deg;
  background-color: currentColor;
  opacity: 0;
  transition: clip-path 0.3s, opacity 0.1s, rotate 0.3s, translate 0.3s;
  transition-delay: 0.1s;
  box-shadow: 0px 3px 0 0px oklch(100% 0 0/calc(var(--depth) * 0.1)) inset;
  font-size: 1rem;
  line-height: 0.75;
}

.checkbox:focus-visible {
  outline: 2px solid var(--input-color, currentColor);
  outline-offset: 2px;
}

.checkbox:checked::before,
.checkbox[aria-checked=true]::before {
  opacity: 1;
}

@media (forced-colors: active) {
  .checkbox:checked::before,
  .checkbox[aria-checked=true]::before {
    rotate: 0deg;
    background-color: transparent;
  }
}
@media print {
  .checkbox:checked::before,
  .checkbox[aria-checked=true]::before {
    rotate: 0deg;
    background-color: transparent;
  }
}
.checkbox:indeterminate {
  background-color: var(--input-color, color-mix(in oklab, var(--color-on-surface) 20%, rgba(0, 0, 0, 0)));
}

.checkbox:indeterminate::before {
  rotate: 0deg;
  opacity: 1;
  translate: 0 -35%;
}

.checkbox:disabled {
  opacity: 0.2;
}

/* variant outline */
.checkbox-outline:checked,
.checkbox-outline[aria-checked=true] {
  background-color: rgba(0, 0, 0, 0);
  color: var(--input-color, var(--color-on-surface));
  box-shadow: 0 1px oklch(0% 0 0/calc(var(--depth) * 0.1)) inset, 0 0 rgba(0, 0, 0, 0) inset, var(--shadow-light, );
}

/* variant square */
.checkbox-square {
  border-radius: 0;
}

/* color variants */
.checkbox-primary {
  color: var(--color-on-primary);
  --input-color: var(--color-primary);
}

.checkbox-neutral {
  color: var(--color-on-neutral);
  --input-color: var(--color-neutral);
}

.checkbox-info {
  color: var(--color-on-info);
  --input-color: var(--color-info);
}

.checkbox-success {
  color: var(--color-on-success);
  --input-color: var(--color-success);
}

.checkbox-warning {
  color: var(--color-on-warning);
  --input-color: var(--color-warning);
}

.checkbox-error {
  color: var(--color-on-error);
  --input-color: var(--color-error);
}

/* size variants */
.checkbox-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.checkbox-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.checkbox-md {
  --fontsize: var(--md, var(--default-md));
}

.checkbox-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.checkbox-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.checkbox {
  --input-color: var(--color-border);
}

.checkbox:checked,
.checkbox[aria-checked=true] {
  --input-color: var(--color-primary);
}

/* ── peony signature: the soft tick ──
   A rounded well that, checked, fills with its colour, pops a
   little and glows; the halo is the focus ring too. */
.checkbox {
  --peony-accent: var(--color-primary);
  --peony-on: var(--color-on-primary);
  border-radius: calc(var(--size) * 0.32);
  background-color: var(--color-surface-2);
  border-color: color-mix(in oklab, var(--color-on-surface) 14%, rgba(0, 0, 0, 0));
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, scale 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.checkbox-primary {
  --peony-accent: var(--color-primary);
  --peony-on: var(--color-on-primary);
}

.checkbox-neutral {
  --peony-accent: var(--color-neutral);
  --peony-on: var(--color-on-neutral);
}

.checkbox-info {
  --peony-accent: var(--color-info);
  --peony-on: var(--color-on-info);
}

.checkbox-success {
  --peony-accent: var(--color-success);
  --peony-on: var(--color-on-success);
}

.checkbox-warning {
  --peony-accent: var(--color-warning);
  --peony-on: var(--color-on-warning);
}

.checkbox-error {
  --peony-accent: var(--color-error);
  --peony-on: var(--color-on-error);
}

.checkbox:hover {
  border-color: color-mix(in oklab, var(--peony-accent) 50%, rgba(0, 0, 0, 0));
}

.checkbox:active {
  scale: 0.9;
}

/* Checked, it fills with the family's gradient — the same light-to-
   colour sweep a focused field draws under itself — and blooms: a
   short overshoot, then the tick draws in. */
.checkbox:checked,
.checkbox[aria-checked=true],
.checkbox:indeterminate {
  border-color: transparent;
  background-color: var(--peony-accent);
  background-image: linear-gradient(135deg, color-mix(in oklab, var(--peony-accent) 45%, #fff), var(--peony-accent) 70%);
  color: var(--peony-on);
  box-shadow: 0 0.25em 0.6em -0.2em color-mix(in oklab, var(--peony-accent) 60%, rgba(0, 0, 0, 0));
  animation: peony-checkbox-bloom 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.checkbox::before {
  transition: clip-path 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.1s, rotate 0.3s, translate 0.3s;
  transition-delay: 0.08s;
}

@keyframes peony-checkbox-bloom {
  0% {
    scale: 0.85;
  }
  55% {
    scale: 1.12;
  }
  100% {
    scale: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .checkbox:checked,
  .checkbox[aria-checked=true],
  .checkbox:indeterminate {
    animation: none;
  }
}
.checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 calc(0.2em * var(--scale)) color-mix(in oklab, var(--peony-accent) 22%, rgba(0, 0, 0, 0));
}

.chip {
  --size: calc(1.6em * var(--scale));
  font-size: var(--fontsize, var(--base, var(--default-base)));
  gap: calc(0.5em * var(--scale));
  border: var(--border) solid var(--chip-color, var(--color-surface-2));
  width: fit-content;
  padding-inline: calc(var(--size) / 2 - var(--border));
}

.chip svg {
  height: 1em;
}

/* variant outline */
.chip-outline {
  color: var(--chip-color);
  --chip-bg: #0000;
  background-image: none;
  border-color: currentColor;
}

/* variant dash */
.chip-dash {
  color: var(--chip-color);
  --chip-bg: #0000;
  background-image: none;
  border-color: currentColor;
  border-style: dashed;
}

/* variant soft */
.chip-soft {
  color: var(--chip-color, var(--color-on-surface));
  background-color: color-mix(in oklab, var(--chip-color, var(--color-on-surface)) 8%, var(--color-surface-1));
  border-color: color-mix(in oklab, var(--chip-color, var(--color-on-surface)) 10%, var(--color-surface-1));
  background-image: none;
}

/* variant ghost */
.chip-ghost {
  border-color: var(--color-surface-2);
  background-color: var(--color-surface-2);
  color: var(--color-on-surface);
  background-image: none;
}

/* color variants */
.chip-primary {
  --chip-color: var(--color-primary);
  --chip-fg: var(--color-on-primary);
}

.chip-neutral {
  --chip-color: var(--color-neutral);
  --chip-fg: var(--color-on-neutral);
}

.chip-info {
  --chip-color: var(--color-info);
  --chip-fg: var(--color-on-info);
}

.chip-success {
  --chip-color: var(--color-success);
  --chip-fg: var(--color-on-success);
}

.chip-warning {
  --chip-color: var(--color-warning);
  --chip-fg: var(--color-on-warning);
}

.chip-error {
  --chip-color: var(--color-error);
  --chip-fg: var(--color-on-error);
}

/* size variants */
.chip-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.chip-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.chip-md {
  --fontsize: var(--md, var(--default-md));
}

.chip-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.chip-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.chip {
  background-color: color-mix(in oklab, var(--chip-color, var(--color-neutral)) calc(var(--peony-tint, 1) * 12%), var(--color-surface-1));
  color: var(--chip-color, var(--color-on-surface));
  border-color: transparent;
  border-radius: var(--radius-selector);
  font-weight: 500;
}

.chip {
  --light-intensity: 0;
  border-radius: 9999px;
}

.chip:is(.chip-info, .chip-success, .chip-warning) {
  color: color-mix(in oklab, var(--chip-color), var(--color-on-surface) 55%);
}

.dock {
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem;
  color: currentColor;
  border-top: 0.5px solid color-mix(in oklab, var(--color-on-surface) 5%, rgba(0, 0, 0, 0));
  height: 4rem;
  height: calc(4rem + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}

.dock > * {
  margin-bottom: 0.5rem;
  height: 100%;
  max-width: 8rem;
  gap: 1px;
  background-color: transparent;
  transition: opacity 0.2s ease-out;
}

@media (hover: hover) {
  .dock > *:hover {
    opacity: 0.8;
  }
}
.dock > *[aria-disabled=true],
.dock > *[disabled] {
  color: color-mix(in oklch, var(--color-on-surface) 10%, rgba(0, 0, 0, 0));
  opacity: 1;
}

.dock > *[aria-disabled=true]:hover,
.dock > *[disabled]:hover {
  color: color-mix(in oklch, var(--color-on-surface) 10%, rgba(0, 0, 0, 0));
  opacity: 1;
}

.dock-label {
  font-size: 0.6875rem;
}

.dock > *::after {
  height: 0.25rem;
  width: 1.5rem;
  border-radius: 9999px;
  background-color: transparent;
  bottom: 0.2rem;
  border-top: 3px solid transparent;
  transition: background-color 0.1s ease-out, color 0.1s ease-out, width 0.1s ease-out;
}

.dock-active::after {
  width: 2.5rem;
  background-color: currentColor;
  color: currentColor;
}

/* size variants */
.dock-xs {
  height: 3rem;
  height: calc(3rem + env(safe-area-inset-bottom));
}

.dock-xs .dock-active::after {
  bottom: -0.1rem;
}

.dock-xs .dock-label {
  font-size: 0.625rem;
}

.dock-sm {
  height: 3.5rem;
  height: calc(3.5rem + env(safe-area-inset-bottom));
}

.dock-sm .dock-active::after {
  bottom: -0.1rem;
}

.dock-sm .dock-label {
  font-size: 0.625rem;
}

.dock-md {
  height: 4rem;
  height: calc(4rem + env(safe-area-inset-bottom));
}

.dock-md .dock-label {
  font-size: 0.6875rem;
}

.dock-lg {
  height: 4.5rem;
  height: calc(4.5rem + env(safe-area-inset-bottom));
}

.dock-lg .dock-active::after {
  bottom: 0.4rem;
}

.dock-lg .dock-label {
  font-size: 0.6875rem;
}

.dock-xl {
  height: 5rem;
  height: calc(5rem + env(safe-area-inset-bottom));
}

.dock-xl .dock-active::after {
  bottom: 0.4rem;
}

.dock-xl .dock-label {
  font-size: 0.75rem;
}

.dock {
  background-color: var(--color-surface-1);
  border-color: var(--color-border);
}

/* ── peony signature: the floating tab bar ──
   The current item is a pale pill of the accent written in it,
   not an underline. */
.dock {
  border-top: 0;
  box-shadow: 0 -0.5em 1.5em -1em color-mix(in oklab, var(--color-on-surface) 25%, rgba(0, 0, 0, 0));
}

.dock > * {
  border-radius: var(--radius-box);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dock > .dock-active {
  background-color: color-mix(in oklab, var(--color-primary) 12%, var(--color-surface-1));
  color: var(--color-primary);
}

.dock-active::after {
  width: 0;
  background-color: transparent;
}

.fieldset {
  gap: calc(0.375em * var(--scale));
  padding-block: calc(0.25em * var(--scale));
  font-size: 0.75rem;
}

.fieldset-legend {
  margin-bottom: calc(-0.25em * var(--scale));
  gap: calc(0.5em * var(--scale));
  padding-block: calc(0.5em * var(--scale));
  font-weight: 600;
}

.fieldset-label {
  color: color-mix(in oklch, var(--color-on-surface) 60%, rgba(0, 0, 0, 0));
  gap: calc(0.375em * var(--scale));
}

.floating-label input::placeholder,
.floating-label textarea::placeholder {
  transition: top 0.1s ease-out, translate 0.1s ease-out, scale 0.1s ease-out, opacity 0.1s ease-out;
}

.floating-label > span {
  background-color: var(--color-surface-1);
  inset-inline-start: calc(0.75em * var(--scale));
  padding-inline: calc(0.25em * var(--scale));
  opacity: 0;
  font-size: 0.875rem;
  top: calc(1.25em * var(--scale));
  line-height: 1;
  border-radius: 2px;
  translate: 0 -50%;
  transition: top 0.1s ease-out, translate 0.1s ease-out, scale 0.1s ease-out, opacity 0.1s ease-out;
}

.floating-label:focus-within ::placeholder,
.floating-label:not(:has(input:placeholder-shown, textarea:placeholder-shown)) ::placeholder {
  opacity: 0;
  top: 0;
  translate: -12.5% calc(-50% - 0.125em);
  scale: 0.75;
  pointer-events: auto;
}

.floating-label:focus-within > span,
.floating-label:not(:has(input:placeholder-shown, textarea:placeholder-shown)) > span {
  opacity: 1;
  top: 0;
  translate: -12.5% calc(-50% - 0.125em);
  scale: 0.75;
}

.floating-label:has(:disabled, [disabled]) > span {
  opacity: 0;
}

/* Per-field-size adjustments */
.floating-label:has(.input-xs, .select-xs, .textarea-xs) span {
  font-size: 0.6875rem;
  top: calc(0.75em * var(--scale));
}

.floating-label:has(.input-sm, .select-sm, .textarea-sm) span {
  font-size: 0.75rem;
  top: calc(var(--size-field, 0.25rem) * 8 / 2);
}

.floating-label:has(.input-md, .select-md, .textarea-md) span {
  font-size: 0.875rem;
  top: calc(var(--size-field, 0.25rem) * 10 / 2);
}

.floating-label:has(.input-lg, .select-lg, .textarea-lg) span {
  font-size: 1.125rem;
  top: calc(var(--size-field, 0.25rem) * 12 / 2);
}

.floating-label:has(.input-xl, .select-xl, .textarea-xl) span {
  font-size: 1.375rem;
  top: calc(var(--size-field, 0.25rem) * 14 / 2);
}

.file-input {
  --size: calc(2.5em * var(--scale));
  /* The resting edge. Set here, before the colour variants, so they
     (and the validator) can still recolour it. */
  --input-color: var(--color-border);
  --btn-border: transparent;
  border: var(--border) solid var(--input-color, rgba(0, 0, 0, 0));
  width: clamp(3rem, 20rem, 100%);
  padding-inline-end: calc(0.75em * var(--scale));
  font-size: var(--fontsize, var(--base, var(--default-base)));
  line-height: 2;
}

.file-input::file-selector-button {
  margin-inline-end: calc(1em * var(--scale));
  padding-inline: calc(1em * var(--scale));
  height: calc(100% + var(--border) * 2);
  margin-block: calc(var(--border) * -1);
  margin-inline-start: calc(var(--border) * -1);
  font-size: 0.875rem;
  font-weight: 600;
  border-style: solid;
  border-start-start-radius: calc(var(--join-ss, var(--radius-field)) - var(--border));
  border-end-start-radius: calc(var(--join-es, var(--radius-field)) - var(--border));
}

.file-input:focus {
  outline: 2px solid var(--input-color);
  outline-offset: 2px;
}

.file-input:has(> input[disabled]),
.file-input:is(:disabled, [disabled]) {
  color: color-mix(in oklch, var(--color-on-surface) 20%, rgba(0, 0, 0, 0));
  box-shadow: none;
}

.file-input:has(> input[disabled])::file-selector-button,
.file-input:is(:disabled, [disabled])::file-selector-button {
  --btn-border: #0000;
  --btn-fg: color-mix(in oklch, var(--color-on-surface) 20%, #0000);
}

/* variant ghost */
.file-input-ghost {
  background-color: transparent;
  transition: background-color 0.2s;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0);
}

.file-input-ghost::file-selector-button {
  margin-inline-start: 0; /* ms-0 */
  margin-inline-end: calc(1em * var(--scale));
  height: 100%;
  cursor: pointer;
  padding-inline: calc(1em * var(--scale));
  user-select: none;
  margin-block: 0;
  border-start-end-radius: calc(var(--join-ss, var(--radius-field)) - var(--border));
  border-end-end-radius: calc(var(--join-es, var(--radius-field)) - var(--border));
}

.file-input-ghost:focus,
.file-input-ghost:focus-within {
  color: var(--color-on-surface);
  background-color: var(--color-surface-1);
  border-color: rgba(0, 0, 0, 0);
  box-shadow: none;
}

/* color variants */
.file-input-primary {
  --btn-color: var(--color-primary);
}

.file-input-primary::file-selector-button {
  color: var(--color-on-primary);
}

.file-input-primary,
.file-input-primary:focus,
.file-input-primary:focus-within {
  --input-color: var(--color-primary);
}

.file-input-neutral {
  --btn-color: var(--color-neutral);
}

.file-input-neutral::file-selector-button {
  color: var(--color-on-neutral);
}

.file-input-neutral,
.file-input-neutral:focus,
.file-input-neutral:focus-within {
  --input-color: var(--color-neutral);
}

.file-input-info {
  --btn-color: var(--color-info);
}

.file-input-info::file-selector-button {
  color: var(--color-on-info);
}

.file-input-info,
.file-input-info:focus,
.file-input-info:focus-within {
  --input-color: var(--color-info);
}

.file-input-success {
  --btn-color: var(--color-success);
}

.file-input-success::file-selector-button {
  color: var(--color-on-success);
}

.file-input-success,
.file-input-success:focus,
.file-input-success:focus-within {
  --input-color: var(--color-success);
}

.file-input-warning {
  --btn-color: var(--color-warning);
}

.file-input-warning::file-selector-button {
  color: var(--color-on-warning);
}

.file-input-warning,
.file-input-warning:focus,
.file-input-warning:focus-within {
  --input-color: var(--color-warning);
}

.file-input-error {
  --btn-color: var(--color-error);
}

.file-input-error::file-selector-button {
  color: var(--color-on-error);
}

.file-input-error,
.file-input-error:focus,
.file-input-error:focus-within {
  --input-color: var(--color-error);
}

/* size variants */
.file-input-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.file-input-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.file-input-md {
  --fontsize: var(--md, var(--default-md));
}

.file-input-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.file-input-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.file-input-xl {
  padding-inline-end: calc(1.5em * var(--scale));
}

.file-input {
  background-color: var(--color-surface-2);
}

.file-input:focus-within {
  --input-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* peony: fields sit flat, edged by a hairline; only objects lift. */
:where(.input, .select, .textarea, .file-input) {
  --light-intensity: 0;
}

/* ── peony signature: the soft well ──
   The field is a tinted well like every peony field; its button a
   pale pill of the accent. */
.file-input {
  border-color: transparent;
  background-color: var(--color-surface-2);
}

.file-input::file-selector-button {
  border-radius: 999px;
  background-color: color-mix(in oklab, var(--color-primary) 12%, var(--color-surface-1));
  color: var(--color-primary);
  box-shadow: none;
}

:where(.input) {
  width: unset;
}

.input {
  --size: calc(2.5em * var(--scale));
  /* The resting edge. Set here, before the colour variants, so they
     (and the validator) can still recolour it. */
  --input-color: var(--color-border);
  gap: calc(0.5em * var(--scale));
  padding-inline: calc(0.5em * var(--scale)); /* Radix --text-field-padding: var(--space-2) */
  width: clamp(3rem, 20rem, 100%);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  border: var(--border) solid var(--input-color, rgba(0, 0, 0, 0));
}

.input :where(input) {
  height: 100%;
  width: 100%;
  background-color: transparent;
  border: none;
}

.input :where(input):focus,
.input :where(input):focus-within {
  outline: none;
}

.input:focus,
.input:focus-within {
  outline: 2px solid var(--input-color);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  @supports (-webkit-touch-callout: none) {
    .input:focus,
    .input:focus-within {
      font-size: max(var(--fontsize, var(--base, var(--default-base))), 1rem);
    }
  }
}
.input:has(> input[disabled]),
.input:is(:disabled, [disabled]),
fieldset:disabled .input {
  color: color-mix(in oklch, var(--color-on-surface) 40%, rgba(0, 0, 0, 0));
  box-shadow: none;
}

.input:has(> input[disabled]) input::placeholder,
.input:is(:disabled, [disabled]) input::placeholder,
fieldset:disabled .input input::placeholder,
.input:has(> input[disabled])::placeholder,
.input:is(:disabled, [disabled])::placeholder,
fieldset:disabled .input::placeholder {
  color: color-mix(in oklch, var(--color-on-surface) 20%, rgba(0, 0, 0, 0));
}

.input[type=number]::-webkit-inner-spin-button {
  margin-block: calc(-0.75em * var(--scale));
  margin-inline-end: calc(-0.75em * var(--scale));
}

.input::-webkit-calendar-picker-indicator {
  inset-inline-end: calc(0.75em * var(--scale));
}

.input:has(> input[type=date]) input[type=date]::-webkit-calendar-picker-indicator {
  inset-inline-end: calc(0.75em * var(--scale));
  width: 1em;
  height: 1em;
}

/* variant ghost */
.input-ghost {
  background-color: transparent;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0);
}

.input-ghost:focus,
.input-ghost:focus-within {
  color: var(--color-on-surface);
  background-color: var(--color-surface-1);
  border-color: rgba(0, 0, 0, 0);
  box-shadow: none;
}

/* color variants */
.input-primary,
.input-primary:focus,
.input-primary:focus-within {
  --input-color: var(--color-primary);
}

.input-neutral,
.input-neutral:focus,
.input-neutral:focus-within {
  --input-color: var(--color-neutral);
}

.input-info,
.input-info:focus,
.input-info:focus-within {
  --input-color: var(--color-info);
}

.input-success,
.input-success:focus,
.input-success:focus-within {
  --input-color: var(--color-success);
}

.input-warning,
.input-warning:focus,
.input-warning:focus-within {
  --input-color: var(--color-warning);
}

.input-error,
.input-error:focus,
.input-error:focus-within {
  --input-color: var(--color-error);
}

/* size variants */
.input-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.input-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.input-md {
  --fontsize: var(--md, var(--default-md));
}

.input-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.input-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.input {
  background-color: var(--color-surface-2);
}

.input:focus,
.input:focus-within {
  --input-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* peony: fields sit flat, edged by a hairline; only objects lift. */
:where(.input, .select, .textarea, .file-input) {
  --light-intensity: 0;
}

/* ── peony signature: the soft well ──
   A field is a tinted well with no edge. Hover deepens it; focus
   lifts it out of the page and lights it from below: it turns white,
   a gradient of its accent draws itself along the bottom edge, and
   the glow pools under it rather than around it — off-centre, like
   light spilling on the desk. */
.input {
  --peony-accent: var(--color-primary);
}

.input-primary {
  --peony-accent: var(--color-primary);
}

.input-neutral {
  --peony-accent: var(--color-neutral);
}

.input-info {
  --peony-accent: var(--color-info);
}

.input-success {
  --peony-accent: var(--color-success);
}

.input-warning {
  --peony-accent: var(--color-warning);
}

.input-error {
  --peony-accent: var(--color-error);
}

.input:not(.input-ghost) {
  border-color: transparent;
  background-color: var(--color-surface-2);
  transition: background-color 0.2s ease, box-shadow 0.25s ease;
}

.input:not(.input-ghost, :focus, :focus-within, :has([aria-expanded=true])):hover {
  background-color: var(--color-surface-3);
}

.input:is(:focus, :focus-within) {
  --input-color: transparent;
  outline: none;
  background-color: var(--color-surface-1);
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: calc(100% - 2 * var(--radius-field, 0.5em)) calc(0.14em * var(--scale));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--peony-accent) 18%, rgba(0, 0, 0, 0)), 0 calc(0.9em * var(--peony-shadow, 1)) calc(1.4em * var(--peony-shadow, 1)) calc(-0.8em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 75%, rgba(0, 0, 0, 0)), 0 calc(0.35em * var(--peony-shadow, 1)) calc(0.6em * var(--peony-shadow, 1)) calc(-0.35em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 45%, rgba(0, 0, 0, 0));
}

.label {
  gap: calc(0.375em * var(--scale));
  color: color-mix(in oklch, currentColor 60%, rgba(0, 0, 0, 0));
}

.input > .label,
.select > .label {
  height: calc(100% - 0.5em * var(--scale));
  padding-inline: calc(0.75em * var(--scale));
  font-size: inherit;
}

.input > .label:first-child,
.select > .label:first-child {
  margin-inline-start: calc(-0.75em * var(--scale));
  margin-inline-end: calc(0.75em * var(--scale));
  border-inline-end: var(--border) solid color-mix(in oklab, currentColor 10%, rgba(0, 0, 0, 0));
}

.input > .label:last-child,
.select > .label:last-child {
  margin-inline-start: calc(0.75em * var(--scale));
  margin-inline-end: calc(-0.75em * var(--scale));
  border-inline-start: var(--border) solid color-mix(in oklab, currentColor 10%, rgba(0, 0, 0, 0));
}

.link {
  text-decoration: underline;
}

.link:focus {
  outline: none;
}

.link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.link-hover {
  text-decoration: none;
}

.link-hover:hover {
  text-decoration: underline;
}

/* color variants */
.link-primary {
  color: var(--color-primary);
}

.link-neutral {
  color: var(--color-neutral);
}

.link-info {
  color: var(--color-info);
}

.link-success {
  color: var(--color-success);
}

.link-warning {
  color: var(--color-warning);
}

.link-error {
  color: var(--color-error);
}

@media (hover: hover) {
  .link-primary:hover {
    color: color-mix(in oklab, var(--color-primary) 70%, #fff);
  }
  .link-neutral:hover {
    color: color-mix(in oklab, var(--color-neutral) 70%, #fff);
  }
  .link-info:hover {
    color: color-mix(in oklab, var(--color-info) 70%, #fff);
  }
  .link-success:hover {
    color: color-mix(in oklab, var(--color-success) 70%, #fff);
  }
  .link-warning:hover {
    color: color-mix(in oklab, var(--color-warning) 70%, #fff);
  }
  .link-error:hover {
    color: color-mix(in oklab, var(--color-error) 70%, #fff);
  }
}
/* ── peony signature: the drawn underline ──
   At rest a faint hairline; hovered, the family's gradient — the
   light-to-colour sweep a focused field draws under itself — runs
   in from the left beneath the text. A background, not a
   text-decoration, so it can be a gradient and can grow. It wraps
   with the text: each line gets its own stroke. */
.link {
  --peony-accent: var(--color-primary);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in oklab, currentColor 30%, rgba(0, 0, 0, 0));
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 30%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), text-decoration-color 0.2s, color 0.2s;
}

.link-hover {
  text-decoration-color: transparent;
}

.link-primary {
  --peony-accent: var(--color-primary);
}

.link-neutral {
  --peony-accent: var(--color-neutral);
}

.link-info {
  --peony-accent: var(--color-info);
}

.link-success {
  --peony-accent: var(--color-success);
}

.link-warning {
  --peony-accent: var(--color-warning);
}

.link-error {
  --peony-accent: var(--color-error);
}

/* Hovered, the text always goes lighter: a plain link towards a pale
   primary, a coloured one towards a pale version of its colour. */
.link:not(.link-primary, .link-neutral, .link-info, .link-success, .link-warning, .link-error):hover {
  color: color-mix(in oklab, var(--peony-accent) 70%, #fff);
}

.link:hover {
  text-decoration-color: transparent;
  background-size: 100% 0.12em;
}

@media (prefers-reduced-motion: reduce) {
  .link {
    transition: none;
  }
}
.list {
  --list-selected: color-mix(in oklab, var(--color-primary) 12%, #0000);
  --list-dirty: var(--color-warning);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.list-empty {
  padding: calc(2em * var(--scale));
  color: color-mix(in oklab, var(--color-on-surface) 55%, rgba(0, 0, 0, 0));
}

.list-row {
  --list-grid-cols: minmax(0, auto) 1fr;
  gap: calc(1em * var(--scale));
  padding: calc(1em * var(--scale));
}

.list > .list-row:not(:last-child)::after,
.list > :not(:last-child) .list-row::after {
  bottom: 0;
  inset-inline: calc(1em * var(--scale));
  border-bottom: var(--border) solid var(--color-border);
}

.list-row:has(.list-col-grow:nth-child(1)) {
  --list-grid-cols: 1fr;
}

.list-row:has(.list-col-grow:nth-child(2)) {
  --list-grid-cols: minmax(0, auto) 1fr;
}

.list-row:has(.list-col-grow:nth-child(3)) {
  --list-grid-cols: minmax(0, auto) minmax(0, auto) 1fr;
}

.list-row:has(.list-col-grow:nth-child(4)) {
  --list-grid-cols: minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr;
}

.list-row:has(.list-col-grow:nth-child(5)) {
  --list-grid-cols: minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr;
}

/* variant suggestions */
.list-suggestions {
  padding: calc(0.25em * var(--scale));
  --light-intensity: 1;
  background-color: var(--color-surface-1);
  border: 1px solid var(--color-border);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-on-surface) 6%, rgba(0, 0, 0, 0)), 0 calc(0.5em * var(--peony-shadow, 1)) calc(1.5em * var(--peony-shadow, 1)) calc(-0.25em * var(--peony-shadow, 1)) color-mix(in oklab, var(--color-on-surface) 16%, rgba(0, 0, 0, 0)), 0 calc(0.15em * var(--peony-shadow, 1)) calc(0.4em * var(--peony-shadow, 1)) color-mix(in oklab, var(--color-on-surface) 8%, rgba(0, 0, 0, 0));
  overflow-y: auto;
  max-height: min(16rem, 60dvh);
}

.list-suggestions > .list-row {
  display: flex;
  align-items: center;
  gap: calc(0.5em * var(--scale));
  padding: calc(0.4em * var(--scale)) calc(0.75em * var(--scale));
  border-radius: var(--radius-field);
  cursor: pointer;
  transition: background-color 0.1s;
  user-select: none;
}

/* A dropdown draws no line between its options. */
.list-suggestions > .list-row:not(:last-child)::after {
  content: none;
}

@media (hover: hover) {
  .list-suggestions > .list-row:hover {
    background-color: color-mix(in oklab, var(--color-on-surface) 7%, rgba(0, 0, 0, 0));
  }
}
/* Keyboard-navigated active item */
.list-suggestions > .list-row[aria-selected=true] {
  background-color: color-mix(in oklab, var(--color-primary) 12%, rgba(0, 0, 0, 0));
  color: var(--color-primary);
  font-weight: 500;
}

/* size variants */
.list-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.list-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.list-md {
  --fontsize: var(--md, var(--default-md));
}

.list-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.list-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.list {
  background-color: var(--color-surface-1);
  border-color: var(--color-border);
}

.loading {
  aspect-ratio: 1/1;
  background-color: currentColor;
  font-size: var(--fontsize, var(--base, var(--default-base)));
  width: calc(1.5em * var(--scale));
  mask-size: 100%;
  mask-position: center;
}

/* style variants */
.loading-spinner {
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
}

.loading-dots {
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E");
}

.loading-ring {
  mask-image: url("data:image/svg+xml,%3Csvg width='44' height='44' viewBox='0 0 44 44' xmlns='http://www.w3.org/2000/svg' stroke='white'%3E%3Cg fill='none' fill-rule='evenodd' stroke-width='2'%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='0s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='0s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='-0.9s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='-0.9s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
}

.loading-ball {
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='12' cy='5' rx='4' ry='4'%3E%3Canimate attributeName='cy' values='5;20;20.5;20;5' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3Canimate attributeName='rx' values='4;4;4.8;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='4;4;3;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/svg%3E");
}

.loading-bars {
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='9' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3C/rect%3E%3Crect x='17' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3C/rect%3E%3C/svg%3E");
}

.loading-infinity {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='shape-rendering:auto;' width='200px' height='200px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Cpath fill='none' stroke='black' stroke-width='10' stroke-dasharray='205.271 51.318' d='M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z' stroke-linecap='round' style='transform:scale(0.8);transform-origin:50px 50px'%3E%3Canimate attributeName='stroke-dashoffset' repeatCount='indefinite' dur='2s' keyTimes='0;1' values='0;256.589'/%3E%3C/path%3E%3C/svg%3E");
}

/* size variants */
.loading-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.loading-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.loading-md {
  --fontsize: var(--md, var(--default-md));
}

.loading-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.loading-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.loading {
  color: var(--color-primary);
}

/* Loaders are the progress fill in motion, so they take its colour. */
.loading {
  color: var(--color-primary);
}

/* Dots: three xsmall, perfectly round, empty buttons. */
.loading-dots {
  --dot: calc(0.6em * var(--scale));
  --dot-bg: var(--color-surface-1);
  --dot-border-color: var(--color-border);
  --dot-border-width: var(--border, 1px);
  aspect-ratio: auto;
  width: calc(var(--dot) * 3.4);
  height: calc(var(--dot) * 1.9);
  mask-image: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: var(--dot) var(--dot);
  background-image: radial-gradient(circle closest-side, var(--dot-bg) calc(100% - var(--dot-border-width)), var(--dot-border-color) calc(100% - var(--dot-border-width)) 100%, rgba(0, 0, 0, 0) 100%), radial-gradient(circle closest-side, var(--dot-bg) calc(100% - var(--dot-border-width)), var(--dot-border-color) calc(100% - var(--dot-border-width)) 100%, rgba(0, 0, 0, 0) 100%), radial-gradient(circle closest-side, var(--dot-bg) calc(100% - var(--dot-border-width)), var(--dot-border-color) calc(100% - var(--dot-border-width)) 100%, rgba(0, 0, 0, 0) 100%);
  animation: loading-dots 1.05s infinite;
  --dot-bg: var(--color-surface-3);
  --dot-border-width: 0px;
}

@keyframes loading-dots {
  0%, 80%, 100% {
    background-position: 0 100%, 50% 100%, 100% 100%;
  }
  20% {
    background-position: 0 0, 50% 100%, 100% 100%;
  }
  40% {
    background-position: 0 100%, 50% 0, 100% 100%;
  }
  60% {
    background-position: 0 100%, 50% 100%, 100% 0;
  }
}
.menu {
  --menu-bg: #0000;
  --menu-fg: var(--color-on-surface);
  --menu-border: #0000;
  --menu-border-width: 0;
  --menu-shadow: none;
  --menu-p: calc(0.25em * var(--scale));
  --menu-gap: calc(0.125em * var(--scale));
  --menu-item-py: calc(0.625em * var(--scale));
  --menu-item-px: calc(0.875em * var(--scale));
  --menu-item-gap: calc(0.75em * var(--scale));
  --menu-item-radius: var(--radius-field);
  --menu-item-bg: #0000;
  --menu-item-fg: inherit;
  --menu-item-transition: background-color 0.12s, color 0.12s;
  --menu-hover-bg: var(--color-surface-2);
  --menu-hover-fg: var(--color-on-surface);
  --menu-active-bg: var(--color-primary);
  --menu-active-fg: var(--color-on-primary);
  --menu-disabled-bg: #0000;
  --menu-disabled-fg: color-mix(in oklab, var(--color-on-surface) 35%, #0000);
  --menu-focus-outline: 2px solid var(--color-primary);
  --menu-focus-offset: -1px;
  --menu-title-py: calc(0.375em * var(--scale));
  --menu-title-px: calc(0.5em * var(--scale));
  --menu-title-fg: color-mix(in oklab, var(--color-on-surface) 45%, #0000);
  --menu-title-size: 0.8125em;
  --menu-title-weight: 500;
  --menu-title-transform: none;
  --menu-title-tracking: normal;
  --menu-divider: var(--color-border);
  --menu-divider-size: 1px;
  --menu-divider-gap: calc(0.375em * var(--scale));
  --menu-divider-inset: calc(0.5em * var(--scale));
  --menu-sub-indent: calc(1em * var(--scale));
  --menu-sub-transition: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu .menu-toggle::after {
  width: calc(0.375em * var(--scale));
  height: calc(0.375em * var(--scale));
  box-shadow: 1.5px 1.5px inset;
  opacity: 0.6;
  rotate: 45deg;
  transition: rotate 0.16s;
}

.menu li:has(> .menu-sub-closed) > .menu-toggle::after {
  rotate: -135deg;
}

/* size variants */
.menu-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.menu-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.menu-md {
  --fontsize: var(--md, var(--default-md));
}

.menu-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.menu-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature: the tinted pill ──
   The current item is not a block of ink but a pale wash of the
   accent, written in the accent: the sidebar of a dashboard. */
.menu {
  --menu-active-bg: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface-1));
  --menu-active-fg: var(--color-primary);
}

.menu .menu-active,
.menu li > :is(a, button, span).menu-active {
  font-weight: 600;
}

/* A group folds and fades at once: the rows leave rather than being
   cut off by the closing edge. */
.menu .menu-sub {
  transition: opacity var(--menu-sub-transition), translate var(--menu-sub-transition);
}

.menu .menu-sub-closed {
  opacity: 0;
  translate: 0 -0.35em;
}

.navbar {
  --navbar-bg: var(--color-surface-1);
  --navbar-fg: var(--color-on-surface);
  --navbar-border: var(--color-border);
  --navbar-border-width: 1px;
  --navbar-shadow: var(--shadow-light, none);
  --navbar-h: calc(3.5em * var(--scale));
  --navbar-px: calc(1em * var(--scale));
  --navbar-py: calc(0.375em * var(--scale));
  --navbar-gap: calc(0.5em * var(--scale));
}

/* size variants */
.navbar-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.navbar-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.navbar-md {
  --fontsize: var(--md, var(--default-md));
}

.navbar-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.navbar-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature: the floating bar ──
   A white bar with no edge, lifted on a wide soft shadow. */
.navbar {
  --navbar-border-width: 0px;
  --navbar-shadow:
  	0 0.1em 0.25em color-mix(in oklab, var(--color-on-surface) 5%, #0000),
  	0 calc(0.75em * var(--peony-shadow, 1)) calc(2em * var(--peony-shadow, 1)) calc(-1em * var(--peony-shadow, 1)) color-mix(in oklab, var(--color-on-surface) 22%, #0000);
}

/* Radix-like: quiet pages with a hairline, the current one filled
   with the accent. */
.pagination {
  --pagination-color: var(--color-primary);
  --pagination-fg: var(--color-on-primary);
  --pagination-item-bg: #0000;
  --pagination-item-fg: var(--color-on-surface);
  --pagination-item-border: var(--color-border);
  --pagination-hover-bg: var(--color-surface-2);
  --pagination-border-width: 1px;
  --pagination-radius: var(--radius-field);
  --pagination-shadow: none;
  --pagination-size: calc(2.25em * var(--scale));
  --pagination-dot: calc(0.5em * var(--scale));
  --pagination-bar-width: calc(1.5em * var(--scale));
  --pagination-bar-height: calc(0.25em * var(--scale));
  --pagination-bar-radius: 999px;
  --pagination-bar-gap: calc(0.25em * var(--scale));
  --pagination-gap: calc(0.25em * var(--scale));
  font-weight: 500;
}

.pagination-dots,
.pagination-bars {
  --pagination-item-bg: color-mix(in oklab, var(--color-on-surface) 18%, #0000);
  --pagination-item-border: #0000;
  --pagination-hover-bg: color-mix(in oklab, var(--color-on-surface) 35%, #0000);
}

/* ── Axis: color ── the current page. */
.pagination-primary {
  --pagination-color: var(--color-primary);
  --pagination-fg: var(--color-on-primary);
}

.pagination-neutral {
  --pagination-color: var(--color-neutral);
  --pagination-fg: var(--color-on-neutral);
}

.pagination-info {
  --pagination-color: var(--color-info);
  --pagination-fg: var(--color-on-info);
}

.pagination-success {
  --pagination-color: var(--color-success);
  --pagination-fg: var(--color-on-success);
}

.pagination-warning {
  --pagination-color: var(--color-warning);
  --pagination-fg: var(--color-on-warning);
}

.pagination-error {
  --pagination-color: var(--color-error);
  --pagination-fg: var(--color-on-error);
}

/* ── peony signature: the drawn underline ──
   Pages are bare numbers on a soft square. The current page is not a
   button: it keeps no fill, takes the accent as ink, and the family's
   gradient — the line a focused field draws under itself — runs out
   from the centre under it. The numbers slide in the way the row moved. */
.pagination {
  --pagination-item-bg: transparent;
  --pagination-border-width: 0px;
  --pagination-shadow: none;
  --pagination-radius: var(--radius-field);
  --pagination-hover-bg: color-mix(in oklab, var(--color-on-surface) 6%, #0000);
}

/* Every page the same width, so the row does not breathe as numbers
   grow a digit. */
.pagination:not(.pagination-dots, .pagination-bars) .pagination-item {
  width: calc(var(--pagination-size) + 0.5em);
  padding-inline: 0;
  overflow: hidden;
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--pagination-color) 35%, #fff), var(--pagination-color));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 0% calc(0.14em * var(--scale));
  transition: color 0.15s, background-color 0.15s, background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination:not(.pagination-dots, .pagination-bars) .pagination-item[aria-current=page] {
  color: var(--pagination-color);
  background-color: transparent;
  background-size: calc(100% - 2 * var(--radius-field, 0.5em)) calc(0.14em * var(--scale));
  font-weight: 600;
}

.pagination-number {
  display: inline-block;
}

.pagination[data-direction=next] .pagination-number {
  animation: peony-page-next 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination[data-direction=previous] .pagination-number {
  animation: peony-page-previous 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes peony-page-next {
  from {
    opacity: 0;
    translate: 0.6em 0;
  }
}
@keyframes peony-page-previous {
  from {
    opacity: 0;
    translate: -0.6em 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pagination-item,
  .pagination-number {
    transition: none;
    animation: none;
  }
}
.progress {
  height: calc(0.5em * var(--scale));
  width: 100%;
  background-color: color-mix(in oklch, currentColor 20%, rgba(0, 0, 0, 0));
}

.progress:indeterminate {
  background-image: repeating-linear-gradient(90deg, currentColor -1%, currentColor 10%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 90%);
  background-size: 200%;
  background-position-x: 15%;
}

@supports (-moz-appearance: none) {
  .progress:indeterminate::-moz-progress-bar {
    background-color: transparent;
  }
  @media (prefers-reduced-motion: no-preference) {
    .progress:indeterminate::-moz-progress-bar {
      background-image: repeating-linear-gradient(90deg, currentColor -1%, currentColor 10%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 90%);
      background-size: 200%;
      background-position-x: 15%;
    }
  }
  .progress::-moz-progress-bar {
    background-color: currentColor;
  }
}
@supports (-webkit-appearance: none) {
  .progress::-webkit-progress-bar {
    background-color: transparent;
  }
  .progress::-webkit-progress-value {
    background-color: currentColor;
  }
}
@keyframes progress {
  50% {
    background-position-x: -115%;
  }
}
/* color variants */
.progress-primary {
  color: var(--color-primary);
}

.progress-neutral {
  color: var(--color-neutral);
}

.progress-info {
  color: var(--color-info);
}

.progress-success {
  color: var(--color-success);
}

.progress-warning {
  color: var(--color-warning);
}

.progress-error {
  color: var(--color-error);
}

.progress {
  border-radius: 999px;
  height: calc(0.5em * var(--scale));
  background-color: var(--color-surface-4);
  color: var(--color-primary);
}

.progress::-webkit-progress-bar {
  background-color: var(--color-surface-4);
  border-radius: 999px;
}

.progress::-webkit-progress-value {
  border-radius: 999px;
}

.progress::-moz-progress-bar {
  border-radius: 999px;
}

/* ── peony signature: the glowing bar ──
   A thick, rounded bar on a pale wash of its own colour, filled
   with a gradient that brightens towards its end and casts a soft
   glow beneath — the KPI bar of a dashboard card. */
.progress {
  height: calc(0.625em * var(--scale));
  background-color: color-mix(in oklab, currentColor 16%, var(--color-surface-3));
}

.progress::-webkit-progress-bar {
  background-color: color-mix(in oklab, currentColor 16%, var(--color-surface-3));
}

.progress::-webkit-progress-value {
  background-image: linear-gradient(90deg, color-mix(in oklab, currentColor 55%, #fff), currentColor);
  box-shadow: 0 0.15em 0.6em -0.1em color-mix(in oklab, currentColor 55%, rgba(0, 0, 0, 0));
}

.progress::-moz-progress-bar {
  background-image: linear-gradient(90deg, color-mix(in oklab, currentColor 55%, #fff), currentColor);
  box-shadow: 0 0.15em 0.6em -0.1em color-mix(in oklab, currentColor 55%, rgba(0, 0, 0, 0));
}

.radial-progress {
  --value: 0;
  --size: calc(5em * var(--scale));
  --thickness: calc(var(--size) / 10);
  --radialprogress: calc(var(--value) * 1%);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  border-radius: 9999px;
  background-color: transparent;
  transition: --radialprogress 0.3s linear;
}

.radial-progress::before {
  inset: 0;
  border-radius: 9999px;
  background: radial-gradient(farthest-side, currentColor 98%, rgba(0, 0, 0, 0)) top/var(--thickness) var(--thickness) no-repeat, conic-gradient(var(--ring) var(--radialprogress), rgba(0, 0, 0, 0) 0);
}

.radial-progress::after {
  border-radius: 9999px;
  background-color: currentColor;
  inset: calc(50% - var(--thickness) / 2);
  transition: transform 0.3s linear;
}

/* size variants */
.radial-progress-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.radial-progress-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.radial-progress-md {
  --fontsize: var(--md, var(--default-md));
}

.radial-progress-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.radial-progress-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.radial-progress {
  /* The ring is painted from --ring so the label keeps a readable
     colour of its own. */
  --ring: var(--color-primary);
  color: var(--color-on-surface);
}

/* The ring is this family's progress bar bent into a circle: same track,
   same fill, same thickness (progress.scss holds the flat version). */
.radial-progress {
  --thickness: calc(0.5em * var(--scale));
  /* The ring is painted from --ring so the label keeps a readable
     colour of its own. */
  --ring: var(--color-primary);
  color: var(--color-on-surface);
}

.radial-progress::before {
  background: radial-gradient(farthest-side, var(--ring) 98%, rgba(0, 0, 0, 0)) top/var(--thickness) var(--thickness) no-repeat, conic-gradient(var(--ring) var(--radialprogress), var(--color-surface-4) 0);
}

.radial-progress::after {
  background-color: var(--ring);
}

/* ── peony signature: the glowing ring ──
   The progress bar's gradient, bent round: the ring brightens from
   a pale start to its full colour at the head, on a pale track of
   itself, and casts a soft glow of its colour below. The figure in
   the middle is heavy and tight, like a KPI. */
.radial-progress {
  --thickness: calc(var(--size) / 7.5);
  --ring-start: color-mix(in oklab, var(--ring) 55%, #fff);
  font-weight: 800;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 0.25em 0.3em color-mix(in oklab, var(--ring) 28%, rgba(0, 0, 0, 0)));
}

.radial-progress::before {
  background: radial-gradient(farthest-side, var(--ring-start) 98%, rgba(0, 0, 0, 0)) top/var(--thickness) var(--thickness) no-repeat, conic-gradient(var(--ring-start) 0, var(--ring) var(--radialprogress), color-mix(in oklab, var(--ring) 9%, var(--color-surface-3)) 0);
}

.radio {
  --size: calc(1em * var(--scale)); /* Radix --checkbox-size size-2 is var(--space-4) = 16px. */
  font-size: var(--fontsize, var(--base, var(--default-base)));
  border-radius: 9999px;
  padding: calc(0.15em * var(--scale));
  border: var(--border) solid var(--input-color, color-mix(in srgb, currentColor 20%, rgba(0, 0, 0, 0)));
}

.radio::before {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
}

.radio:focus-visible {
  outline: 2px solid currentColor;
}

.radio:checked,
.radio[aria-checked=true] {
  border-color: currentColor;
}

.radio:checked::before,
.radio[aria-checked=true]::before {
  background-color: currentColor;
}

@media (forced-colors: active) {
  .radio:checked::before,
  .radio[aria-checked=true]::before {
    outline-style: solid;
    outline-offset: -0.25rem;
  }
}
@media print {
  .radio:checked::before,
  .radio[aria-checked=true]::before {
    outline: 0.25rem solid;
    outline-offset: -1rem;
  }
}
.radio:disabled {
  opacity: 0.2;
}

@keyframes radio {
  0% {
    padding: 5px;
  }
  50% {
    padding: 3px;
  }
}
/* variant square */
.radio-square {
  border-radius: 0;
}

.radio-square::before {
  border-radius: 0;
}

/* color variants */
.radio-primary {
  --input-color: var(--color-primary);
}

.radio-neutral {
  --input-color: var(--color-neutral);
}

.radio-info {
  --input-color: var(--color-info);
}

.radio-success {
  --input-color: var(--color-success);
}

.radio-warning {
  --input-color: var(--color-warning);
}

.radio-error {
  --input-color: var(--color-error);
}

/* size variants */
.radio-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.radio-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.radio-md {
  --fontsize: var(--md, var(--default-md));
}

.radio-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.radio-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.radio-xl:is([type=radio]) {
  --size: calc(2em * var(--scale));
}

.radio {
  --input-color: var(--color-border);
}

.radio:checked,
.radio[aria-checked=true] {
  --input-color: var(--color-primary);
}

/* ── peony signature: the bead ──
   Off, a pale well with a hairline. On, the whole disc fills with
   its colour around a white bead and wears a soft halo. */
.radio {
  --peony-accent: var(--color-primary);
  border-color: color-mix(in oklab, var(--color-on-surface) 14%, rgba(0, 0, 0, 0));
  background-color: var(--color-surface-2);
  padding: calc(var(--size) * 0.3);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, padding 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.radio-primary {
  --peony-accent: var(--color-primary);
}

.radio-neutral {
  --peony-accent: var(--color-neutral);
}

.radio-info {
  --peony-accent: var(--color-info);
}

.radio-success {
  --peony-accent: var(--color-success);
}

.radio-warning {
  --peony-accent: var(--color-warning);
}

.radio-error {
  --peony-accent: var(--color-error);
}

.radio:hover {
  border-color: color-mix(in oklab, var(--peony-accent) 50%, rgba(0, 0, 0, 0));
}

.radio:checked,
.radio[aria-checked=true] {
  border-color: var(--peony-accent);
  background-color: var(--peony-accent);
  box-shadow: 0 0 0 calc(0.2em * var(--scale)) color-mix(in oklab, var(--peony-accent) 16%, rgba(0, 0, 0, 0)), 0 0.25em 0.6em -0.2em color-mix(in oklab, var(--peony-accent) 60%, rgba(0, 0, 0, 0));
}

.radio:checked::before,
.radio[aria-checked=true]::before {
  background-color: #fff;
  box-shadow: 0 0.05em 0.15em color-mix(in oklab, #000 25%, rgba(0, 0, 0, 0));
}

.range {
  --range-thumb-size: calc(1.5em * var(--scale));
  --range-progress: currentColor;
  --range-fill: 1;
  --range-p: calc(0.25em * var(--scale));
  --range-bg: color-mix(in oklab, currentColor 10%, #0000);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  --radius-selector-max: calc(
  		var(--radius-selector) + var(--radius-selector) + var(--radius-selector)
  	);
  background-color: transparent;
  width: clamp(3rem, 20rem, 100%);
  border-radius: calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));
  border: none;
}

[dir=rtl] .range {
  --range-dir: -1;
}

.range:focus {
  outline: none;
}

.range:focus-visible {
  outline: 2px solid;
  outline-offset: 2px;
}

.range::-webkit-slider-runnable-track {
  width: 100%;
  height: calc(var(--range-thumb-size) * 0.5);
}

@media (forced-colors: active) {
  .range::-webkit-slider-runnable-track {
    border: 1px solid;
  }
}
.range::-webkit-slider-thumb {
  border-radius: calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));
  border: var(--range-p) solid;
  top: 50%;
  box-shadow: 0 -1px oklch(0% 0 0/calc(var(--depth) * 0.1)) inset, 0 8px 0 -4px oklch(100% 0 0/calc(var(--depth) * 0.1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), rgba(0, 0, 0, 0)), 0 0 0 2rem var(--range-thumb) inset, calc(var(--range-dir, 1) * -100cqw - var(--range-dir, 1) * (var(--range-thumb-size) + var(--range-halo, 0px))) 0 0 calc(100cqw * var(--range-fill)), var(--shadow-light, );
}

.range::-moz-range-track {
  width: 100%;
  height: calc(var(--range-thumb-size) * 0.5);
}

@media (forced-colors: active) {
  .range::-moz-range-track {
    border: 1px solid;
  }
}
.range::-moz-range-thumb {
  border-radius: calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));
  background-color: currentColor;
  border: var(--range-p) solid;
  top: 50%;
  box-shadow: 0 -1px oklch(0% 0 0/calc(var(--depth) * 0.1)) inset, 0 8px 0 -4px oklch(100% 0 0/calc(var(--depth) * 0.1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), rgba(0, 0, 0, 0)), 0 0 0 2rem var(--range-thumb) inset, calc(var(--range-dir, 1) * -100cqw - var(--range-dir, 1) * (var(--range-thumb-size) + var(--range-halo, 0px))) 0 0 calc(100cqw * var(--range-fill)), var(--shadow-light, );
}

.range:disabled {
  opacity: 0.3;
}

/* color variants */
.range-primary {
  color: var(--color-primary);
  --range-thumb: var(--color-on-primary);
}

.range-neutral {
  color: var(--color-neutral);
  --range-thumb: var(--color-on-neutral);
}

.range-info {
  color: var(--color-info);
  --range-thumb: var(--color-on-info);
}

.range-success {
  color: var(--color-success);
  --range-thumb: var(--color-on-success);
}

.range-warning {
  color: var(--color-warning);
  --range-thumb: var(--color-on-warning);
}

.range-error {
  color: var(--color-error);
  --range-thumb: var(--color-on-error);
}

/* size variants */
.range-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.range-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.range-md {
  --fontsize: var(--md, var(--default-md));
}

.range-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.range-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.range {
  --rail: calc(0.5em * var(--scale));
  --range-thumb-size: calc(0.75em * var(--scale));
  --range-fill: 1;
  --range-p: 0px;
  --range-thumb: #fff;
  --range-bg: var(--color-surface-4);
  --range-progress: var(--color-primary);
  color: var(--color-primary);
}

.range::-webkit-slider-runnable-track {
  height: var(--rail);
  border-radius: 999px;
}

.range::-moz-range-track {
  height: var(--rail);
  border-radius: 999px;
}

.range::-webkit-slider-thumb {
  --range-halo: 0.125em;
  --rail-top: calc((var(--range-thumb-size) - var(--rail)) / 2);
  --rail-bottom: calc((var(--range-thumb-size) + var(--rail)) / 2);
  clip-path: polygon(-100vw var(--rail-top), calc(0px - var(--range-halo)) var(--rail-top), calc(0px - var(--range-halo)) calc(0px - var(--range-halo)), calc(100% + var(--range-halo)) calc(0px - var(--range-halo)), calc(100% + var(--range-halo)) var(--rail-top), 100vw var(--rail-top), 100vw var(--rail-bottom), calc(100% + var(--range-halo)) var(--rail-bottom), calc(100% + var(--range-halo)) calc(100% + var(--range-halo)), calc(0px - var(--range-halo)) calc(100% + var(--range-halo)), calc(0px - var(--range-halo)) var(--rail-bottom), -100vw var(--rail-bottom));
  border-radius: 999px;
  border: none;
  --shadow-light:
  	0 0 0 1px color-mix(in oklab, var(--color-on-surface) 22%, #0000),
  	0 1px 3px color-mix(in oklab, var(--color-on-surface) 18%, #0000);
}

.range::-moz-range-thumb {
  --range-halo: 0.125em;
  --rail-top: calc((var(--range-thumb-size) - var(--rail)) / 2);
  --rail-bottom: calc((var(--range-thumb-size) + var(--rail)) / 2);
  clip-path: polygon(-100vw var(--rail-top), calc(0px - var(--range-halo)) var(--rail-top), calc(0px - var(--range-halo)) calc(0px - var(--range-halo)), calc(100% + var(--range-halo)) calc(0px - var(--range-halo)), calc(100% + var(--range-halo)) var(--rail-top), 100vw var(--rail-top), 100vw var(--rail-bottom), calc(100% + var(--range-halo)) var(--rail-bottom), calc(100% + var(--range-halo)) calc(100% + var(--range-halo)), calc(0px - var(--range-halo)) calc(100% + var(--range-halo)), calc(0px - var(--range-halo)) var(--rail-bottom), -100vw var(--rail-bottom));
  border-radius: 999px;
  border: none;
  --shadow-light:
  	0 0 0 1px color-mix(in oklab, var(--color-on-surface) 22%, #0000),
  	0 1px 3px color-mix(in oklab, var(--color-on-surface) 18%, #0000);
}

/* ── peony signature: the bead on a glowing rail ──
   A thick rounded rail on a pale wash of its colour. Where the
   wrapper says how far the value is (`data-fill`, --range-pct), the
   walked part is painted with the progress bar's gradient — pale to
   full — and the thumb is a white bead ringed by the colour, whose
   ring thickens under the pointer and that swells under the finger.
   (A glow around it would be cropped square: the browser clips what
   a thumb paints to its box.) Without it, the
   thumb's shadow fills the rail in the plain colour. */
.range {
  --range-thumb: #fff;
  --range-p: calc(0.17em * var(--scale));
  --range-bg: color-mix(in oklab, currentColor 16%, var(--color-surface-3));
  --range-thumb-size: calc(1.35em * var(--scale));
  --radius-selector: 999px;
}

.range-primary {
  --range-thumb: #fff;
}

.range-neutral {
  --range-thumb: #fff;
}

.range-info {
  --range-thumb: #fff;
}

.range-success {
  --range-thumb: #fff;
}

.range-warning {
  --range-thumb: #fff;
}

.range-error {
  --range-thumb: #fff;
}

.range::-webkit-slider-runnable-track {
  height: calc(var(--range-thumb-size) * 0.42);
  border-radius: 999px;
}

.range::-moz-range-track {
  height: calc(var(--range-thumb-size) * 0.42);
  border-radius: 999px;
}

.range::-webkit-slider-thumb {
  border-radius: 50%;
}

.range::-moz-range-thumb {
  border-radius: 50%;
}

.range[data-fill] {
  --range-fill: 0;
  --peony-rail: linear-gradient(90deg, color-mix(in oklab, currentColor 45%, #fff), currentColor) 0 0 / var(--range-pct, 0%) 100% no-repeat,
  	var(--range-bg);
  overflow: visible;
  padding-block: 0.35em;
  height: calc(var(--range-thumb-size) + 0.7em);
}

[dir=rtl] .range[data-fill] {
  --peony-rail: linear-gradient(270deg, color-mix(in oklab, currentColor 45%, #fff), currentColor) 100% 0 / var(--range-pct, 0%) 100% no-repeat,
  	var(--range-bg);
}

.range[data-fill]::-webkit-slider-runnable-track {
  background: var(--peony-rail);
  box-shadow: 0 0.2em 0.5em -0.15em color-mix(in oklab, currentColor 30%, rgba(0, 0, 0, 0));
}

.range[data-fill]::-moz-range-track {
  background: var(--peony-rail);
}

.range[data-fill]::-webkit-slider-thumb {
  border: 0;
  box-shadow: 0 0 0 var(--range-p) currentColor inset, 0 0 0 2rem var(--range-thumb) inset;
  transition: scale 0.15s ease, box-shadow 0.2s ease;
}

.range[data-fill]::-moz-range-thumb {
  border: 0;
  box-shadow: 0 0 0 var(--range-p) currentColor inset, 0 0 0 2rem var(--range-thumb) inset;
  transition: scale 0.15s ease, box-shadow 0.2s ease;
}

.range[data-fill]:hover::-webkit-slider-thumb,
.range[data-fill]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 calc(var(--range-p) * 1.6) currentColor inset, 0 0 0 2rem var(--range-thumb) inset;
}

.range[data-fill]:hover::-moz-range-thumb,
.range[data-fill]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 calc(var(--range-p) * 1.6) currentColor inset, 0 0 0 2rem var(--range-thumb) inset;
}

.range[data-fill]:active::-webkit-slider-thumb {
  scale: 1.15;
}

.range[data-fill]:active::-moz-range-thumb {
  scale: 1.15;
}

.range[data-fill]:focus-visible {
  outline: none;
}

:where(.select) {
  width: unset;
}

.select {
  --size: calc(2.5em * var(--scale));
  /* The resting edge. Set here, before the colour variants, so they
     (and the validator) can still recolour it. */
  --input-color: var(--color-border);
  border: var(--border) solid var(--input-color, rgba(0, 0, 0, 0));
  gap: calc(0.375em * var(--scale));
  padding-inline-start: calc(0.75em * var(--scale));
  padding-inline-end: calc(1.75em * var(--scale));
  width: clamp(3rem, 20rem, 100%);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0) 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, rgba(0, 0, 0, 0) 50%);
  background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16.1px) calc(1px + 50%);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

[dir=rtl] .select {
  background-position: calc(0% + 12px) calc(1px + 50%), calc(0% + 16px) calc(1px + 50%);
}

.select[multiple] {
  height: auto;
  padding-block: calc(0.75em * var(--scale));
  padding-inline-end: calc(0.75em * var(--scale));
  background-image: none;
}

.select select {
  margin-inline-start: calc(-0.75em * var(--scale));
  margin-inline-end: calc(-1.75em * var(--scale));
  width: calc(100% + 2.5em * var(--scale));
  padding-inline-start: calc(0.75em * var(--scale));
  padding-inline-end: calc(1.75em * var(--scale));
  height: calc(100% - var(--border) * 2);
  background: inherit;
  border-radius: inherit;
  border-style: none;
}

.select select:focus,
.select select:focus-within {
  outline: none;
}

.select select:not(:last-child) {
  margin-inline-end: calc(-1.375em * var(--scale));
  background-image: none;
}

.select:focus,
.select:focus-within {
  outline: 2px solid var(--input-color);
  outline-offset: 2px;
}

.select:has(> select[disabled]),
.select:is(:disabled, [disabled]),
fieldset:disabled .select {
  color: color-mix(in oklch, var(--color-on-surface) 40%, rgba(0, 0, 0, 0));
}

.select:has(> select[disabled]) select::placeholder,
.select:is(:disabled, [disabled]) select::placeholder {
  color: color-mix(in oklch, var(--color-on-surface) 20%, rgba(0, 0, 0, 0));
}

.select::picker(select),
.select select::picker(select) {
  color: inherit;
  max-height: min(24rem, 70dvh);
  margin-inline: calc(0.5em * var(--scale));
  translate: calc(-0.5em * var(--scale)) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-box);
  margin-block: calc(0.5em * var(--scale));
  padding: calc(0.5em * var(--scale));
  background-color: var(--color-surface-1);
  box-shadow: 0 calc(0.5em * var(--peony-shadow, 1)) calc(1.5em * var(--peony-shadow, 1)) calc(-0.25em * var(--peony-shadow, 1)) color-mix(in oklab, var(--color-on-surface) 16%, rgba(0, 0, 0, 0)), 0 calc(0.15em * var(--peony-shadow, 1)) calc(0.4em * var(--peony-shadow, 1)) color-mix(in oklab, var(--color-on-surface) 8%, rgba(0, 0, 0, 0));
}

[dir=rtl] .select::picker(select),
[dir=rtl] .select select::picker(select) {
  translate: calc(0.5em * var(--scale)) 0;
}

.select optgroup,
.select select optgroup {
  padding-top: calc(0.5em * var(--scale));
}

.select optgroup option:nth-child(1),
.select select optgroup option:nth-child(1) {
  margin-top: calc(0.5em * var(--scale));
}

.select option,
.select select option {
  padding-inline: calc(0.75em * var(--scale));
  padding-block: calc(0.375em * var(--scale));
  transition-property: color, background-color;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.select option:not(:disabled):hover,
.select option:not(:disabled):focus-visible,
.select select option:not(:disabled):hover,
.select select option:not(:disabled):focus-visible {
  background-color: color-mix(in oklch, var(--color-on-surface) 10%, rgba(0, 0, 0, 0));
  outline: none;
}

.select option:not(:disabled):active,
.select select option:not(:disabled):active {
  box-shadow: 0 2px calc(var(--depth) * 3px) -2px var(--color-neutral);
}

/* variant ghost */
.select-ghost {
  background-color: transparent;
  transition: background-color 0.2s;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0);
}

.select-ghost:focus,
.select-ghost:focus-within {
  color: var(--color-on-surface);
  background-color: var(--color-surface-1);
  border-color: rgba(0, 0, 0, 0);
  box-shadow: none;
}

/* color variants */
.select-primary,
.select-primary:focus,
.select-primary:focus-within {
  --input-color: var(--color-primary);
}

.select-neutral,
.select-neutral:focus,
.select-neutral:focus-within {
  --input-color: var(--color-neutral);
}

.select-info,
.select-info:focus,
.select-info:focus-within {
  --input-color: var(--color-info);
}

.select-success,
.select-success:focus,
.select-success:focus-within {
  --input-color: var(--color-success);
}

.select-warning,
.select-warning:focus,
.select-warning:focus-within {
  --input-color: var(--color-warning);
}

.select-error,
.select-error:focus,
.select-error:focus-within {
  --input-color: var(--color-error);
}

/* size variants */
.select-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.select-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.select-md {
  --fontsize: var(--md, var(--default-md));
}

.select-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.select-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.select-xl option,
.select-xl select option {
  padding-inline: calc(1.25em * var(--scale));
  padding-block: calc(0.375em * var(--scale));
}

.select {
  background-color: var(--color-surface-2);
}

.select:focus,
.select:focus-within {
  --input-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* peony: fields sit flat, edged by a hairline; only objects lift. */
:where(.input, .select, .textarea, .file-input) {
  --light-intensity: 0;
}

/* ── peony signature: the soft well ──
   A field is a tinted well with no edge. Hover deepens it; focus
   lifts it out of the page and lights it from below: it turns white,
   a gradient of its accent draws itself along the bottom edge, and
   the glow pools under it rather than around it — off-centre, like
   light spilling on the desk. */
.select {
  --peony-accent: var(--color-primary);
}

.select-primary {
  --peony-accent: var(--color-primary);
}

.select-neutral {
  --peony-accent: var(--color-neutral);
}

.select-info {
  --peony-accent: var(--color-info);
}

.select-success {
  --peony-accent: var(--color-success);
}

.select-warning {
  --peony-accent: var(--color-warning);
}

.select-error {
  --peony-accent: var(--color-error);
}

.select:not(.select-ghost) {
  border-color: transparent;
  background-color: var(--color-surface-2);
  transition: background-color 0.2s ease, box-shadow 0.25s ease;
}

.select:not(.select-ghost, :focus, :focus-within, [aria-expanded=true]):hover {
  background-color: var(--color-surface-3);
}

/* Focused — or open, its list hanging under it — it takes the
   field's focus: white, lit from below, the accent gradient drawn
   along its bottom edge. The arrow stays, turned to the accent. */
.select:is(:focus, :focus-within),
.select[aria-expanded=true] {
  --input-color: transparent;
  outline: none;
  background-color: var(--color-surface-1);
  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0) 50%, var(--peony-accent) 50%), linear-gradient(135deg, var(--peony-accent) 50%, rgba(0, 0, 0, 0) 50%), linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16.1px) calc(1px + 50%), bottom center;
  background-size: 4px 4px, 4px 4px, calc(100% - 2 * var(--radius-field, 0.5em)) calc(0.14em * var(--scale));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--peony-accent) 18%, rgba(0, 0, 0, 0)), 0 calc(0.9em * var(--peony-shadow, 1)) calc(1.4em * var(--peony-shadow, 1)) calc(-0.8em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 75%, rgba(0, 0, 0, 0)), 0 calc(0.35em * var(--peony-shadow, 1)) calc(0.6em * var(--peony-shadow, 1)) calc(-0.35em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 45%, rgba(0, 0, 0, 0));
}

/* A native picker in base-select appearance moves the focus to its
   option, in the top layer: the select is then neither :focus nor
   :focus-within, only :open. Guarded, because an unknown pseudo-class
   would void a whole selector list. */
@supports selector(:open) {
  .select:is(:open, :has(select:open)),
  .select:is(:open, :has(select:open)):hover {
    --input-color: transparent;
    outline: none;
    background-color: var(--color-surface-1);
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0) 50%, var(--peony-accent) 50%), linear-gradient(135deg, var(--peony-accent) 50%, rgba(0, 0, 0, 0) 50%), linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
    background-repeat: no-repeat;
    background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16.1px) calc(1px + 50%), bottom center;
    background-size: 4px 4px, 4px 4px, calc(100% - 2 * var(--radius-field, 0.5em)) calc(0.14em * var(--scale));
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--peony-accent) 18%, rgba(0, 0, 0, 0)), 0 calc(0.9em * var(--peony-shadow, 1)) calc(1.4em * var(--peony-shadow, 1)) calc(-0.8em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 75%, rgba(0, 0, 0, 0)), 0 calc(0.35em * var(--peony-shadow, 1)) calc(0.6em * var(--peony-shadow, 1)) calc(-0.35em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 45%, rgba(0, 0, 0, 0));
  }
}
[dir=rtl] .select:is(:focus, :focus-within),
[dir=rtl] .select[aria-expanded=true] {
  background-position: calc(0% + 12px) calc(1px + 50%), calc(0% + 16px) calc(1px + 50%), bottom center;
}

/* The inner <select> inherits the frame's background: it would draw
   the line a second time, on its own wider box. */
.select:is(:focus, :focus-within) select {
  background: transparent;
}

.skeleton {
  background-image: linear-gradient(105deg, rgba(0, 0, 0, 0) 0% 40%, var(--color-surface-1) 50%, rgba(0, 0, 0, 0) 60% 100%);
  background-size: 200% auto;
  background-position-x: -50%;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    transition-duration: 15s;
  }
}
.skeleton-text {
  background-clip: text;
  color: transparent;
  background-image: linear-gradient(105deg, color-mix(in oklab, var(--color-on-surface) 20%, transparent) 0% 40%, var(--color-on-surface) 50%, color-mix(in oklab, var(--color-on-surface) 20%, transparent) 60% 100%);
}

@keyframes skeleton {
  0% {
    background-position: 150%;
  }
  100% {
    background-position: -50%;
  }
}
.skeleton {
  background-color: var(--color-surface-4);
}

.skeleton {
  background-color: var(--color-surface-4);
}

/* A peony card that leads with its number: the hairline, the
   panel radius, the soft light, and a value in a medium weight
   rather than a shout. */
.stat,
.stats {
  --stat-bg: var(--color-surface-1);
  --stat-fg: var(--color-on-surface);
  --stat-border: var(--color-border);
  --stat-border-width: 0px;
  --stat-radius: var(--radius-box);
  --stat-shadow: var(--shadow-light, none);
  --stats-bg: var(--stat-bg);
  --stats-fg: var(--stat-fg);
  --stats-border: var(--stat-border);
  --stats-border-width: var(--stat-border-width);
  --stats-radius: var(--stat-radius);
  --stats-shadow: var(--stat-shadow);
  --stats-divider: var(--color-border);
  --stats-divider-width: var(--border, 1px);
}

.stat {
  --stat-px: calc(1.25em * var(--scale));
  --stat-py: calc(1em * var(--scale));
  --stat-gap: calc(1em * var(--scale));
  --stat-muted: color-mix(in oklab, var(--color-on-surface) 62%, #0000);
  --stat-title-size: 0.8889em;
  --stat-value-size: 1.802em;
  --stat-value-weight: 700;
  --stat-figure-fg: var(--color-primary);
}

/* ── peony signature: the KPI tile ──
   The figure sits on a pale square of the accent; the value is
   heavy and tight. */
.stat {
  --stat-value-weight: 800;
}

.stat-value {
  letter-spacing: -0.02em;
}

.stat-figure {
  display: grid;
  place-items: center;
  width: 2.75em;
  height: 2.75em;
  border-radius: 0.9em;
  background-color: color-mix(in oklab, var(--stat-figure-fg) 12%, var(--color-surface-1));
}

.swatch {
  --swatch-color: var(--color-surface-1);
  --swatch-size: calc(2em * var(--scale));
  --swatch-disabled-opacity: 0.4;
  --swatch-focus-outline: 2px solid currentColor;
  --swatch-focus-offset: 2px;
  /* Same flip as --color-on-*: a light sample gets near-black, a dark one
     near-white, keeping a whisper of the sample's own hue. */
  --swatch-on-color: oklch(
  	from var(--swatch-color) clamp(0.145, (0.66 - l) * 999, 0.97) min(c, 0.03) h
  );
  /* Two crossed quarters make the checkerboard; the colour layer sits on
     top, so a semi-transparent sample lets it through. */
  --swatch-checks: conic-gradient(
  	from 90deg,
  	var(--color-surface-3) 25%,
  	var(--color-surface-2) 0 50%,
  	var(--color-surface-3) 0 75%,
  	var(--color-surface-2) 0
  );
  background-size: auto, calc(0.5em * var(--scale)) calc(0.5em * var(--scale));
  font-weight: 600;
  --swatch-radius: var(--radius-field);
  --swatch-border-width: 0;
  --swatch-border: #0000;
  --swatch-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-on-surface) 12%, #0000);
  --swatch-transition: box-shadow 0.12s;
}

.swatch-active {
  --swatch-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-on-surface) 12%, #0000),
  	0 0 0 2px var(--color-surface-1), 0 0 0 4px var(--color-primary);
}

.swatch-circle {
  --swatch-radius: 999px;
}

.swatch-primary {
  --swatch-color: var(--color-primary);
}

.swatch-neutral {
  --swatch-color: var(--color-neutral);
}

.swatch-info {
  --swatch-color: var(--color-info);
}

.swatch-success {
  --swatch-color: var(--color-success);
}

.swatch-warning {
  --swatch-color: var(--color-warning);
}

.swatch-error {
  --swatch-color: var(--color-error);
}

/* size variants */
.swatch-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.swatch-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.swatch-md {
  --fontsize: var(--md, var(--default-md));
}

.swatch-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.swatch-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.color-picker {
  --color-picker-value: transparent;
  --color-picker-bg: var(--color-surface-1);
  --color-picker-fg: var(--color-on-surface);
  --color-picker-border: var(--color-border);
  --color-picker-border-width: 0px;
  --color-picker-radius: var(--radius-box);
  --color-picker-shadow: 0 1.25em 3em -1em color-mix(in oklab, var(--color-on-surface) 18%, #0000), 0 0.25em 0.75em -0.25em color-mix(in oklab, var(--color-on-surface) 8%, #0000);
  --color-picker-p: calc(0.875em * var(--scale));
  --color-picker-gap: calc(0.75em * var(--scale));
  --color-picker-width: 18em;
  --color-picker-track-h: 0.85em;
  --color-picker-track-radius: 999px;
  --color-picker-thumb: transparent;
  --color-picker-thumb-ring: var(--color-surface-1);
}

.tabs {
  --tabs-height: auto;
  --tabs-direction: row;
  --tab-height: calc(2.5em * var(--scale));
}

.tabs-item {
  --tab-p: calc(0.75em * var(--scale));
  font-size: var(--fontsize, var(--base, var(--default-base)));
  --tab-radius-ss: 0;
  --tab-radius-se: 0;
  --tab-radius-es: 0;
  --tab-radius-ee: 0;
  --tab-order: 0;
  --tab-radius-min: calc(0.75rem - var(--border));
  --tab-radius-limit: min(var(--radius-field), var(--tab-radius-min));
  --tab-radius-grad: #0000 calc(69% - var(--border)),
  		var(--tab-border-color) calc(69% - var(--border) + 0.25px),
  		var(--tab-border-color) 69%,
  		var(--tab-bg) calc(69% + 0.25px);
  border-color: rgba(0, 0, 0, 0);
  font-size: 0.875rem;
}

.tabs-item:is(input[type=radio]) {
  min-width: fit-content;
}

.tabs-item:is(label) input {
  inset: 0;
  opacity: 0;
}

.tabs-item:not(:checked,
label:has(:checked),
:hover,
.tabs-item-active,
[aria-selected=true],
[aria-current=true],
[aria-current=page]) {
  color: color-mix(in oklch, var(--color-on-surface) 50%, rgba(0, 0, 0, 0));
}

.tabs-item:focus {
  outline: none;
}

.tabs-item:focus-visible,
.tabs-item:is(label:has(:checked:focus-visible)) {
  outline: 2px solid currentColor;
  outline-offset: -5px;
}

.tabs-item[disabled] {
  opacity: 0.4;
}

.tabs-item-content {
  border-color: transparent;
  --tabcontent-order: 1;
  width: 100%;
  height: calc(100% - var(--tab-height) + var(--border));
}

.tabs-item-disabled {
  opacity: 0.4;
}

/* variant border */
.tabs-border > .tabs-item {
  --tab-border-color: #0000 #0000 var(--tab-border-color) #0000;
  position: relative;
  border-radius: var(--radius-field);
}

.tabs-border > .tabs-item::before {
  content: "";
  background-color: var(--tab-border-color);
  transition: background-color 0.2s ease;
  width: 80%;
  height: 3px;
  border-radius: var(--radius-field);
  bottom: 0;
  left: 10%;
  position: absolute;
}

.tabs-border > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled])::before,
.tabs-border > .tabs-item:is(input:checked)::before,
.tabs-border > .tabs-item:is(label:has(:checked))::before {
  --tab-border-color: currentColor;
  border-top: 3px solid;
}

/* variant lift */
.tabs-lift {
  --tabs-height: auto;
  --tabs-direction: row;
}

.tabs-lift > .tabs-item {
  --tab-border: 0 0 var(--border) 0;
  --tab-radius-ss: var(--tab-radius-limit);
  --tab-radius-se: var(--tab-radius-limit);
  --tab-radius-es: 0;
  --tab-radius-ee: 0;
  --tab-paddings: var(--border) var(--tab-p) 0 var(--tab-p);
  --tab-border-colors: #0000 #0000 var(--tab-border-color) #0000;
  --tab-corner-width: calc(100% + var(--tab-radius-limit) * 2);
  --tab-corner-height: var(--tab-radius-limit);
  --tab-corner-position: top left, top right;
  border-width: var(--tab-border);
  border-start-start-radius: var(--tab-radius-ss);
  border-start-end-radius: var(--tab-radius-se);
  border-end-start-radius: var(--tab-radius-es);
  border-end-end-radius: var(--tab-radius-ee);
  padding: var(--tab-paddings);
  border-color: var(--tab-border-colors);
}

.tabs-lift > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]),
.tabs-lift > .tabs-item:is(input:checked, label:has(:checked)) {
  --tab-border: var(--border) var(--border) 0 var(--border);
  --tab-border-colors: var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);
  --tab-paddings: 0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));
  --tab-inset: auto auto 0 auto;
  --radius-start: radial-gradient(circle at top left, var(--tab-radius-grad));
  --radius-end: radial-gradient(circle at top right, var(--tab-radius-grad));
  background-color: var(--tab-bg);
}

.tabs-lift > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled])::before,
.tabs-lift > .tabs-item:is(input:checked, label:has(:checked))::before {
  z-index: 1;
  content: "";
  display: block;
  position: absolute;
  width: var(--tab-corner-width);
  height: var(--tab-corner-height);
  background-position: var(--tab-corner-position);
  background-image: var(--radius-start), var(--radius-end);
  background-size: var(--tab-radius-limit) var(--tab-radius-limit);
  background-repeat: no-repeat;
  inset: var(--tab-inset);
}

.tabs-lift > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]):first-child::before,
.tabs-lift > .tabs-item:is(input:checked, label:has(:checked)):first-child::before {
  --radius-start: none;
}

[dir=rtl] .tabs-lift > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]):first-child::before,
[dir=rtl] .tabs-lift > .tabs-item:is(input:checked, label:has(:checked)):first-child::before {
  transform: rotateY(180deg);
}

.tabs-lift > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]):last-child::before,
.tabs-lift > .tabs-item:is(input:checked, label:has(:checked)):last-child::before {
  --radius-end: none;
}

[dir=rtl] .tabs-lift > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]):last-child::before,
[dir=rtl] .tabs-lift > .tabs-item:is(input:checked, label:has(:checked)):last-child::before {
  transform: rotateY(180deg);
}

.tabs-lift:has(> .tabs-item-content) > .tabs-item:first-child:not(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) {
  --tab-border-colors: var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);
}

.tabs-lift > .tabs-item-content {
  --tabcontent-margin: calc(-1 * var(--border)) 0 0 0;
  --tabcontent-radius-ss: 0;
  --tabcontent-radius-se: var(--radius-box);
  --tabcontent-radius-es: var(--radius-box);
  --tabcontent-radius-ee: var(--radius-box);
}

.tabs-lift :checked + .tabs-item-content:nth-child(1),
.tabs-lift :checked + .tabs-item-content:nth-child(n+3),
.tabs-lift label:has(:checked) + .tabs-item-content:nth-child(1),
.tabs-lift label:has(:checked) + .tabs-item-content:nth-child(n+3),
.tabs-lift :is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) + .tabs-item-content:nth-child(1),
.tabs-lift :is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) + .tabs-item-content:nth-child(n+3) {
  --tabcontent-radius-ss: var(--radius-box);
}

/* variant top bottom */
.tabs-top {
  --tabs-height: auto;
  --tabs-direction: row;
}

.tabs-top > .tabs-item {
  --tab-order: 0;
  --tab-border: 0 0 var(--border) 0;
  --tab-radius-ss: var(--tab-radius-limit);
  --tab-radius-se: var(--tab-radius-limit);
  --tab-radius-es: 0;
  --tab-radius-ee: 0;
  --tab-paddings: var(--border) var(--tab-p) 0 var(--tab-p);
  --tab-border-colors: #0000 #0000 var(--tab-border-color) #0000;
  --tab-corner-width: calc(100% + var(--tab-radius-limit) * 2);
  --tab-corner-height: var(--tab-radius-limit);
  --tab-corner-position: top left, top right;
}

.tabs-top > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]),
.tabs-top > .tabs-item:is(input:checked),
.tabs-top > .tabs-item:is(label:has(:checked)) {
  --tab-border: var(--border) var(--border) 0 var(--border);
  --tab-border-colors: var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);
  --tab-paddings: 0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));
  --tab-inset: auto auto 0 auto;
  --radius-start: radial-gradient(circle at top left, var(--tab-radius-grad));
  --radius-end: radial-gradient(circle at top right, var(--tab-radius-grad));
}

.tabs-top:has(> .tabs-item-content) > .tabs-item:first-child:not(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) {
  --tab-border-colors: var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);
}

.tabs-top > .tabs-item-content {
  --tabcontent-order: 1;
  --tabcontent-margin: calc(-1 * var(--border)) 0 0 0;
  --tabcontent-radius-ss: 0;
  --tabcontent-radius-se: var(--radius-box);
  --tabcontent-radius-es: var(--radius-box);
  --tabcontent-radius-ee: var(--radius-box);
}

.tabs-bottom {
  --tabs-height: auto;
  --tabs-direction: row;
}

.tabs-bottom > .tabs-item {
  --tab-order: 1;
  --tab-border: var(--border) 0 0 0;
  --tab-radius-ss: 0;
  --tab-radius-se: 0;
  --tab-radius-es: var(--tab-radius-limit);
  --tab-radius-ee: var(--tab-radius-limit);
  --tab-border-colors: var(--tab-border-color) #0000 #0000 #0000;
  --tab-paddings: 0 var(--tab-p) var(--border) var(--tab-p);
  --tab-corner-width: calc(100% + var(--tab-radius-limit) * 2);
  --tab-corner-height: var(--tab-radius-limit);
  --tab-corner-position: top left, top right;
}

.tabs-bottom > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]),
.tabs-bottom > .tabs-item:is(input:checked),
.tabs-bottom > .tabs-item:is(label:has(:checked)) {
  --tab-border: 0 var(--border) var(--border) var(--border);
  --tab-border-colors: #0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color);
  --tab-paddings: var(--border) calc(var(--tab-p) - var(--border)) 0 calc(var(--tab-p) - var(--border));
  --tab-inset: 0 auto auto auto;
  --radius-start: radial-gradient(circle at bottom left, var(--tab-radius-grad));
  --radius-end: radial-gradient(circle at bottom right, var(--tab-radius-grad));
}

.tabs-bottom:has(> .tabs-item-content) > .tabs-item:first-child:not(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) {
  --tab-border-colors: #0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color);
}

.tabs-bottom > .tabs-item-content {
  --tabcontent-order: 0;
  --tabcontent-margin: 0 0 calc(-1 * var(--border)) 0;
  --tabcontent-radius-ss: var(--radius-box);
  --tabcontent-radius-se: var(--radius-box);
  --tabcontent-radius-es: 0;
  --tabcontent-radius-ee: var(--radius-box);
}

.tabs-bottom > :checked + .tabs-item-content:not(:nth-child(2)),
.tabs-bottom > :is(label:has(:checked)) + .tabs-item-content:not(:nth-child(2)),
.tabs-bottom > :is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]) + .tabs-item-content:not(:nth-child(2)) {
  --tabcontent-radius-es: var(--radius-box);
}

/* variant box */
.tabs-box {
  --tabs-box-radius: calc(3 * var(--radius-field));
  background-color: var(--color-surface-2);
  padding: calc(0.25em * var(--scale));
  border-radius: calc(min(var(--tab-height) / 2, var(--radius-field)) + min(0.25rem, var(--tabs-box-radius)));
  box-shadow: 0 -0.5px oklch(100% 0 0/calc(var(--depth) * 0.1)) inset, 0 0.5px oklch(0% 0 0/calc(var(--depth) * 0.05)) inset;
}

.tabs-box > .tabs-item {
  border-radius: var(--radius-field);
  border-style: none;
}

.tabs-box > .tabs-item:focus-visible,
.tabs-box > .tabs-item:is(label:has(:checked:focus-visible)) {
  outline-offset: 2px;
}

.tabs-box > .tabs-item:focus-visible {
  z-index: 1;
}

.tabs-box > :is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]),
.tabs-box > :is(input:checked),
.tabs-box > :is(label:has(:checked)) {
  background-color: var(--tab-bg, var(--color-surface-1));
  box-shadow: 0 1px oklch(100% 0 0/calc(var(--depth) * 0.1)) inset, 0 1px 1px -1px color-mix(in oklab, var(--color-neutral) calc(var(--depth) * 50%), rgba(0, 0, 0, 0)), 0 1px 6px -4px color-mix(in oklab, var(--color-neutral) calc(var(--depth) * 100%), rgba(0, 0, 0, 0));
}

@media (forced-colors: active) {
  .tabs-box > :is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]),
  .tabs-box > :is(input:checked),
  .tabs-box > :is(label:has(:checked)) {
    border: 1px solid;
  }
}
.tabs-box > .tabs-item-content {
  margin-top: calc(0.25em * var(--scale));
  height: calc(100% - var(--tab-height) + var(--border) - 0.5em * var(--scale));
  border-radius: calc(min(var(--tab-height) / 2, var(--radius-field)) + min(0.25rem, var(--tabs-box-radius)) - var(--border));
}

/* size variants */
.tabs-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.tabs-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.tabs-md {
  --fontsize: var(--md, var(--default-md));
}

.tabs-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.tabs-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.tabs-box .tabs-item:not(.tabs-item-active) {
  background-color: rgba(0, 0, 0, 0);
}

.tabs-item {
  --tab-border-color: var(--color-border);
}

.tabs-item {
  --tab-border-color: var(--color-border);
  color: color-mix(in oklab, var(--color-on-surface) 65%, rgba(0, 0, 0, 0));
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color 0.12s, color 0.12s;
}

.tabs-item-active {
  color: var(--color-on-surface);
  font-weight: 600;
  background-color: color-mix(in oklab, var(--color-info) calc(var(--peony-tint, 1) * 18%), var(--color-surface-1));
}

@media (hover: hover) {
  .tabs-item:not(.tabs-item-active, :disabled):hover {
    background-color: var(--color-surface-3);
    color: var(--color-on-surface);
  }
}
/* ── The sliding indicator ──
   The Svelte wrapper draws one empty `.tabs-item.tabs-item-active.tabs-indicator`
   first in the strip and slides it under the selected tab
   (--tabs-x/y/w/h, measured on the tab). Being an active tab itself,
   it wears whatever this family draws for one; the real selected tab
   then lets it show through. Written last, so it wins the ties. */
.tabs:has(> .tabs-indicator) {
  position: relative;
}

.tabs > .tabs-indicator {
  position: absolute;
  left: var(--tabs-x, 0);
  top: var(--tabs-y, 0);
  width: var(--tabs-w, 0);
  height: var(--tabs-h, 0);
  margin: 0;
  padding: 0;
  pointer-events: none;
  transition-property: left, top, width, height;
  transition-duration: 0.25s;
  transition-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* lift opens the selected tab into its panel: nothing slides there. */
.tabs-lift > .tabs-indicator {
  display: none;
}

.tabs > .tabs-indicator ~ .tabs-item {
  z-index: 1;
}

.tabs:not(.tabs-lift) > .tabs-indicator ~ .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]) {
  background-color: transparent;
  box-shadow: none;
}

.tabs:not(.tabs-lift) > .tabs-indicator ~ .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled])::before {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .tabs > .tabs-indicator {
    transition: none;
  }
}
/* ── peony signature: the accent underline ──
   The current tab is written in the accent, underlined by a short
   rounded pill of it that glows a little; the box variant's tab is
   a white tile floating on a soft shadow. */
.tabs-border > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]),
.tabs-border > .tabs-indicator {
  color: var(--color-primary);
}

.tabs-border > .tabs-item::before {
  height: calc(0.2em * var(--scale));
  border-radius: 999px;
  box-shadow: 0 0.1em 0.5em -0.05em color-mix(in oklab, var(--color-primary) 60%, rgba(0, 0, 0, 0));
}

.tabs-border > .tabs-item:not(:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]), .tabs-indicator)::before {
  box-shadow: none;
}

.tabs-box > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]) {
  box-shadow: 0 0.1em 0.2em color-mix(in oklab, var(--color-on-surface) 6%, rgba(0, 0, 0, 0)), 0 0.4em 1em -0.3em color-mix(in oklab, var(--color-on-surface) 18%, rgba(0, 0, 0, 0));
}

/* ── The plain strip ──
   A tabs with no variant is the switch's twin: a tinted track, the
   current tab a white tile on it, and along the tile's foot the
   family's drawn underline. Same measures, same colours, so a strip
   of tabs and a switch set side by side read as one family. The
   variants (border, lift, top, bottom) keep their own shapes. */
.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) {
  --tabs-pad: calc(0.2em * var(--scale));
  --tabs-item-radius: calc(var(--radius-field) - var(--tabs-pad) / 2);
  --tab-height: calc(2.1em * var(--scale));
  --peony-accent: var(--color-primary);
  gap: var(--tabs-pad);
  padding: var(--tabs-pad);
  border-radius: var(--radius-field);
  background-color: var(--color-surface-2);
}

.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom):not(:has(> .tabs-item-content)) {
  width: fit-content;
}

.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) > .tabs-item {
  border-radius: var(--tabs-item-radius);
  font-weight: 500;
  white-space: nowrap;
}

.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) > .tabs-item:not(.tabs-item-active):hover {
  background-color: transparent;
}

.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) > .tabs-item:is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]) {
  background-color: var(--color-surface-1);
  box-shadow: 0 1px 3px color-mix(in oklab, #000 18%, rgba(0, 0, 0, 0));
  font-weight: 500;
}

.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) > .tabs-item:not(.tabs-indicator) {
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 0% calc(0.14em * var(--scale));
  transition: background-color 0.12s, color 0.12s, background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) > .tabs-item:not(.tabs-indicator):is(.tabs-item-active, [aria-selected=true], [aria-current=true], [aria-current=page]):not(.tabs-item-disabled, [disabled]) {
  background-size: calc(100% - 2 * var(--tabs-item-radius)) calc(0.14em * var(--scale));
}

@media (prefers-reduced-motion: reduce) {
  .tabs:not(.tabs-border, .tabs-lift, .tabs-top, .tabs-bottom) > .tabs-item {
    transition: none;
  }
}
.title {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitle-s1 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.subtitle-s2 {
  font-weight: 600;
  line-height: 1.35;
}

/* Axis: s — the leading that goes with each size. */
.text-s1,
.text-s2 {
  line-height: 1.6;
}

.text-s3 {
  line-height: 1.55;
}

.text-s4 {
  line-height: 1.5;
}

/* Axis: b — weight. */
.text-b1 {
  font-weight: 600;
}

.text-b2 {
  font-weight: 500;
}

.text-b3 {
  font-weight: 400;
}

.textarea {
  /* The resting edge. Set here, before the colour variants, so they
     (and the validator) can still recolour it. */
  --input-color: var(--color-border);
  border: var(--border) solid var(--input-color, rgba(0, 0, 0, 0));
  min-height: calc(5em * var(--scale));
  padding-block: calc(0.5em * var(--scale));
  padding-inline-start: calc(0.75em * var(--scale));
  padding-inline-end: calc(0.75em * var(--scale));
  width: clamp(3rem, 20rem, 100%);
  font-size: var(--fontsize, var(--base, var(--default-base)));
}

.textarea textarea {
  background-color: transparent;
  border: none;
}

.textarea textarea:focus,
.textarea textarea:focus-within {
  outline: none;
}

.textarea:focus,
.textarea:focus-within {
  outline: 2px solid var(--input-color);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  @supports (-webkit-touch-callout: none) {
    .textarea:focus,
    .textarea:focus-within {
      font-size: max(var(--fontsize, var(--base, var(--default-base))), 1rem);
    }
  }
}
.textarea:has(> textarea[disabled]),
.textarea:is(:disabled, [disabled]) {
  color: color-mix(in oklch, var(--color-on-surface) 40%, rgba(0, 0, 0, 0));
  box-shadow: none;
}

.textarea:has(> textarea[disabled]) textarea::placeholder,
.textarea:is(:disabled, [disabled]) textarea::placeholder,
.textarea:has(> textarea[disabled])::placeholder,
.textarea:is(:disabled, [disabled])::placeholder {
  color: color-mix(in oklch, var(--color-on-surface) 20%, rgba(0, 0, 0, 0));
}

/* variant ghost */
.textarea-ghost {
  background-color: transparent;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0);
}

.textarea-ghost:focus,
.textarea-ghost:focus-within {
  color: var(--color-on-surface);
  background-color: var(--color-surface-1);
  border-color: rgba(0, 0, 0, 0);
  box-shadow: none;
}

/* color variants */
.textarea-primary,
.textarea-primary:focus,
.textarea-primary:focus-within {
  --input-color: var(--color-primary);
}

.textarea-neutral,
.textarea-neutral:focus,
.textarea-neutral:focus-within {
  --input-color: var(--color-neutral);
}

.textarea-info,
.textarea-info:focus,
.textarea-info:focus-within {
  --input-color: var(--color-info);
}

.textarea-success,
.textarea-success:focus,
.textarea-success:focus-within {
  --input-color: var(--color-success);
}

.textarea-warning,
.textarea-warning:focus,
.textarea-warning:focus-within {
  --input-color: var(--color-warning);
}

.textarea-error,
.textarea-error:focus,
.textarea-error:focus-within {
  --input-color: var(--color-error);
}

/* size variants */
.textarea-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.textarea-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.textarea-md {
  --fontsize: var(--md, var(--default-md));
}

.textarea-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.textarea-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.textarea {
  background-color: var(--color-surface-2);
}

.textarea:focus,
.textarea:focus-within {
  --input-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* peony: fields sit flat, edged by a hairline; only objects lift. */
:where(.input, .select, .textarea, .file-input) {
  --light-intensity: 0;
}

/* ── peony signature: the soft well ──
   A field is a tinted well with no edge. Hover deepens it; focus
   lifts it out of the page and lights it from below: it turns white,
   a gradient of its accent draws itself along the bottom edge, and
   the glow pools under it rather than around it — off-centre, like
   light spilling on the desk. */
.textarea {
  --peony-accent: var(--color-primary);
}

.textarea-primary {
  --peony-accent: var(--color-primary);
}

.textarea-neutral {
  --peony-accent: var(--color-neutral);
}

.textarea-info {
  --peony-accent: var(--color-info);
}

.textarea-success {
  --peony-accent: var(--color-success);
}

.textarea-warning {
  --peony-accent: var(--color-warning);
}

.textarea-error {
  --peony-accent: var(--color-error);
}

.textarea:not(.textarea-ghost) {
  border-color: transparent;
  background-color: var(--color-surface-2);
  transition: background-color 0.2s ease, box-shadow 0.25s ease;
}

.textarea:not(.textarea-ghost, :focus, :focus-within):hover {
  background-color: var(--color-surface-3);
}

.textarea:is(:focus, :focus-within) {
  --input-color: transparent;
  outline: none;
  background-color: var(--color-surface-1);
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: calc(100% - 2 * var(--radius-field, 0.5em)) calc(0.14em * var(--scale));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--peony-accent) 18%, rgba(0, 0, 0, 0)), 0 calc(0.9em * var(--peony-shadow, 1)) calc(1.4em * var(--peony-shadow, 1)) calc(-0.8em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 75%, rgba(0, 0, 0, 0)), 0 calc(0.35em * var(--peony-shadow, 1)) calc(0.6em * var(--peony-shadow, 1)) calc(-0.35em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 45%, rgba(0, 0, 0, 0));
}

.toggle {
  --input-color: color-mix(in oklab, var(--color-on-surface) 50%, #0000);
  --size: calc(1.5em * var(--scale));
  --toggle-p: calc(var(--size) * 0.125);
  font-size: var(--fontsize, var(--base, var(--default-base)));
  --radius-selector-max: calc(
  		var(--radius-selector) + var(--radius-selector) + var(--radius-selector)
  	);
  border: var(--border) solid currentColor;
  border-radius: calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));
  width: calc(var(--size) * 2 - (var(--border) + var(--toggle-p)) * 2);
  transition: color 0.3s, grid-template-columns 0.2s;
}

.toggle > * {
  height: 100%;
  background-color: transparent;
  padding: calc(0.125em * var(--scale));
  transition: opacity 0.2s, rotate 0.4s;
  border: none;
}

.toggle > *:focus {
  outline: none;
}

.toggle > *:nth-child(2) {
  rotate: 0deg;
}

.toggle > *:nth-child(3) {
  opacity: 0;
  rotate: -15deg;
}

.toggle:has(:checked) > :nth-child(2) {
  opacity: 0;
  rotate: 15deg;
}

.toggle:has(:checked) > :nth-child(3) {
  opacity: 1;
  rotate: 0deg;
}

.toggle::before {
  inset-inline-start: 0;
  aspect-ratio: 1/1;
  height: 100%;
  width: 100%;
  background-color: currentColor;
  translate: 0;
  transition: background-color 0.1s, translate 0.2s, inset-inline-start 0.2s;
}

@media (forced-colors: active) {
  .toggle::before {
    outline-style: solid;
    outline-offset: -0.25rem;
  }
}
@media print {
  .toggle::before {
    outline: 0.25rem solid;
    outline-offset: -1rem;
  }
}
.toggle:focus-visible,
.toggle:has(:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.toggle:checked::before,
.toggle[aria-checked=true]::before,
.toggle:has(> input:checked)::before {
  background-color: currentColor;
}

@starting-style {
  .toggle:checked::before,
  .toggle[aria-checked=true]::before,
  .toggle:has(> input:checked)::before {
    opacity: 0;
  }
}
.toggle:disabled {
  opacity: 0.3;
}

.toggle:disabled::before {
  background-color: transparent;
  border: var(--border) solid currentColor;
}

/* variant track */
.toggle-track:checked,
.toggle-track[aria-checked=true],
.toggle-track:has(> input:checked) {
  background-color: var(--input-color, var(--color-on-surface));
  background-clip: content-box; /* track stays inside padding = inset/thinner effect */
}

.toggle-track:checked::before,
.toggle-track[aria-checked=true]::before,
.toggle-track:has(> input:checked)::before {
  background-color: var(--color-on-surface);
  box-shadow: 0 0 0 calc(0.1em * var(--scale)) var(--color-surface-1);
}

/* color variants */
.toggle-primary:checked,
.toggle-primary[aria-checked=true] {
  --input-color: var(--color-primary);
}

.toggle-neutral:checked,
.toggle-neutral[aria-checked=true] {
  --input-color: var(--color-neutral);
}

.toggle-info:checked,
.toggle-info[aria-checked=true] {
  --input-color: var(--color-info);
}

.toggle-success:checked,
.toggle-success[aria-checked=true] {
  --input-color: var(--color-success);
}

.toggle-warning:checked,
.toggle-warning[aria-checked=true] {
  --input-color: var(--color-warning);
}

.toggle-error:checked,
.toggle-error[aria-checked=true] {
  --input-color: var(--color-error);
}

/* size variants */
.toggle-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.toggle-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.toggle-md {
  --fontsize: var(--md, var(--default-md));
}

.toggle-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.toggle-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.toggle {
  --input-color: var(--color-border);
}

.toggle {
  --radius-selector: 999px;
  --input-color: var(--color-surface-4);
  border-radius: 999px;
  border-color: transparent;
  background-color: var(--color-surface-4);
  transition: background-color 140ms ease-in-out;
}

.toggle::before {
  border-radius: 999px;
  background-color: #fff;
  box-shadow: 0 0 1px 1px color-mix(in oklab, var(--color-on-surface) 8%, rgba(0, 0, 0, 0)), 0 1px 2px color-mix(in oklab, var(--color-on-surface) 12%, rgba(0, 0, 0, 0));
}

.toggle:checked,
.toggle[aria-checked=true],
.toggle:has(> input:checked) {
  --input-color: #fff;
  background-color: var(--color-primary);
}

/* ── peony signature: the soft pill ──
   A wide pill whose white knob floats on a real shadow. On, the
   track takes the colour and glows; pressed, the knob stretches
   like a finger on glass. */
.toggle {
  --peony-accent: var(--color-primary);
  width: calc(var(--size) * 1.85);
  /* The knob travels by grid-template-columns: it must stay in the
     list, eased out so the knob glides and settles. */
  transition: grid-template-columns 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.toggle-primary {
  --peony-accent: var(--color-primary);
}

.toggle-neutral {
  --peony-accent: var(--color-neutral);
}

.toggle-info {
  --peony-accent: var(--color-info);
}

.toggle-success {
  --peony-accent: var(--color-success);
}

.toggle-warning {
  --peony-accent: var(--color-warning);
}

.toggle-error {
  --peony-accent: var(--color-error);
}

.toggle::before {
  box-shadow: 0 0.1em 0.25em color-mix(in oklab, #000 18%, rgba(0, 0, 0, 0)), 0 0.3em 0.7em -0.2em color-mix(in oklab, #000 22%, rgba(0, 0, 0, 0));
  transition: translate 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), inset-inline-start 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), scale 0.15s ease;
  transform-origin: center;
}

.toggle:active::before {
  scale: 1.18 0.94;
}

@media (prefers-reduced-motion: reduce) {
  .toggle,
  .toggle::before {
    transition: none;
  }
}
.toggle:checked,
.toggle[aria-checked=true],
.toggle:has(> input:checked) {
  background-color: var(--peony-accent);
  background-image: linear-gradient(135deg, color-mix(in oklab, var(--peony-accent) 45%, #fff), var(--peony-accent) 70%);
  box-shadow: 0 0.35em 0.9em -0.35em color-mix(in oklab, var(--peony-accent) 70%, rgba(0, 0, 0, 0));
}

.validator-hint {
  margin-top: 0.5em;
}

.dialog {
  --dialog-backdrop: oklch(0% 0 0 / 0.35);
  --dialog-bg: var(--color-surface-1);
  --dialog-fg: var(--color-on-surface);
  --dialog-border: var(--color-border);
  --dialog-border-width: 1px;
  --dialog-radius: var(--radius-box);
  --dialog-shadow: 0 12px 60px oklch(0% 0 0 / 0.12), 0 16px 64px -16px oklch(0% 0 0 / 0.2);
  --dialog-p: calc(1.5em * var(--scale));
  --dialog-gap: calc(0.75em * var(--scale));
  --dialog-width: calc(28em * var(--scale));
  --dialog-margin: calc(1em * var(--scale));
  --dialog-title-size: 1.25em;
  --dialog-title-weight: 700;
  --dialog-close-size: calc(1.75em * var(--scale));
  --dialog-close-hover: color-mix(in oklab, var(--color-primary) 8%, var(--color-surface-1));
}

.dialog-actions {
  margin-block-start: calc(0.5em * var(--scale));
}

/* ── Motion ──
   The component marks the box `data-motion="enter"` / `"leave"` and
   closes the dialog once the motion written here has run: the box
   scales in from 95% and fades, and back out. */
@media (prefers-reduced-motion: no-preference) {
  .dialog-box[data-motion=enter] {
    animation: dialog-box-in 0.15s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .dialog-box[data-motion=leave] {
    animation: dialog-box-in 0.15s cubic-bezier(0.33, 1, 0.68, 1) reverse forwards;
  }
}
@keyframes dialog-box-in {
  from {
    opacity: 0;
    scale: 0.95;
  }
}
.dropdown {
  --dropdown-bg: var(--color-surface-1);
  --dropdown-fg: var(--color-on-surface);
  --dropdown-border: var(--color-border);
  --dropdown-border-width: 1px;
  --dropdown-radius: var(--radius-box);
  --dropdown-shadow: 0 calc(12px * var(--peony-shadow, 1)) calc(32px * var(--peony-shadow, 1)) calc(-16px * var(--peony-shadow, 1)) oklch(0% 0 0 / 0.18), 0 calc(12px * var(--peony-shadow, 1)) calc(60px * var(--peony-shadow, 1)) oklch(0% 0 0 / 0.08);
  --dropdown-p: calc(0.25em * var(--scale));
  --dropdown-gap: calc(0.25em * var(--scale));
  --dropdown-z: 999;
}

/* A menu in the box is the box's content, not a second box. */
.dropdown-content > .menu {
  --menu-bg: #0000;
  --menu-border-width: 0;
  --menu-shadow: none;
  --menu-p: 0px;
  width: 100%;
}

/* ── Motion ──
   The component marks the box `data-motion="enter"` / `"leave"` and
   removes it once the motion written here has run: it drops in 4px
   from the trigger's side as it fades, and back out. */
@media (prefers-reduced-motion: no-preference) {
  .dropdown-content[data-motion=enter] {
    animation: dropdown-content-in 0.12s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .dropdown-content[data-motion=leave] {
    animation: dropdown-content-in 0.12s cubic-bezier(0.33, 1, 0.68, 1) reverse forwards;
  }
  .dropdown-top > .dropdown-content:is([data-motion=enter], [data-motion=leave]) {
    animation-name: dropdown-content-in-up;
  }
}
@keyframes dropdown-content-in {
  from {
    opacity: 0;
    translate: 0 -4px;
  }
}
@keyframes dropdown-content-in-up {
  from {
    opacity: 0;
    translate: 0 4px;
  }
}
.table-scroll {
  --table-frame: var(--color-border);
  --table-frame-width: 1px;
  --table-frame-radius: var(--radius-box);
  --table-frame-shadow: none;
}

.table {
  --table-bg: var(--color-surface-1);
  --table-fg: var(--color-on-surface);
  --table-cell-py: calc(0.75em * var(--scale));
  --table-cell-px: calc(0.75em * var(--scale));
  --table-head-fg: var(--color-on-surface);
  --table-head-size: 1em;
  --table-head-weight: 500;
  --table-head-bg: var(--color-surface-2);
  --table-border: var(--color-border);
  --table-stripe: var(--color-surface-2);
  --table-hover: color-mix(in oklab, var(--color-primary) 5%, var(--color-surface-1));
  --table-selected: color-mix(in oklab, var(--color-primary) 12%, var(--color-surface-1));
  --table-dirty: var(--color-warning);
  --table-sticky-shadow: 1px 0 0 0 var(--color-border);
  font-size: var(--fontsize, var(--sm, var(--default-sm)));
}

.table-empty {
  padding-block: calc(2em * var(--scale));
  color: color-mix(in oklab, var(--color-on-surface) 55%, rgba(0, 0, 0, 0));
}

/* ── peony signature: the dashboard table ──
   No frame line: the table is a white tile on a soft shadow. The
   head is small, muted, spaced capitals on no ground; rows are
   parted by the faintest line and washed by the accent under the
   pointer. */
.table {
  --table-frame-width: 0px;
  --table-frame-shadow:
  	0 0.1em 0.25em color-mix(in oklab, var(--color-on-surface) 5%, #0000),
  	0 1em 2.5em -1.25em color-mix(in oklab, var(--color-on-surface) 22%, #0000);
  --table-head-bg: var(--color-surface-1);
  --table-head-fg: color-mix(in oklab, var(--color-on-surface) 55%, #0000);
  --table-head-size: 0.75em;
  --table-head-weight: 600;
  --table-border: color-mix(in oklab, var(--color-on-surface) 6%, #0000);
  --table-hover: color-mix(in oklab, var(--color-primary) 6%, var(--color-surface-1));
}

.table-head .table-cell {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.grid {
  --grid-min: calc(16em * var(--scale));
  --grid-gap: calc(1em * var(--scale));
  --grid-radius: var(--radius-box);
  --grid-selected: 2px solid var(--color-primary);
  --grid-dirty: var(--color-warning);
}

/* ── Axis: gap ── */
.grid-nogap {
  --grid-gap: 0px;
}

.grid-tight {
  --grid-gap: calc(0.5em * var(--scale));
}

.grid-loose {
  --grid-gap: calc(2em * var(--scale));
}

.grid-empty {
  padding-block: calc(2em * var(--scale));
  color: color-mix(in oklab, var(--color-on-surface) 55%, rgba(0, 0, 0, 0));
}

.kanban {
  --kanban-gap: calc(1em * var(--scale));
  --kanban-p: calc(0.875em * var(--scale));
  --kanban-item-gap: calc(0.75em * var(--scale));
  --kanban-column-width: calc(18em * var(--scale));
  --kanban-column-bg: color-mix(in oklab, var(--color-primary) 5%, var(--color-surface-2));
  --kanban-column-over-bg: color-mix(in oklab, var(--color-primary) 16%, var(--color-surface-2));
  --kanban-column-fg: var(--color-on-surface);
  --kanban-column-border: var(--color-border);
  --kanban-column-border-width: 0px;
  --kanban-column-radius: var(--radius-box);
  --kanban-column-shadow: none;
  --kanban-title-weight: 600;
  --kanban-count-bg: color-mix(in oklab, var(--color-primary) 14%, #0000);
  --kanban-count-fg: var(--color-on-surface);
  --kanban-empty-fg: color-mix(in oklab, var(--color-on-surface) 55%, #0000);
  --kanban-item-radius: var(--radius-box);
  --kanban-item-selected: 2px solid var(--color-primary);
  --kanban-item-dirty: var(--color-warning);
  --kanban-marker: var(--color-primary);
  --kanban-marker-size: 3px;
}

/* ── Axis: gap ── */
.kanban-nogap {
  --kanban-gap: 0px;
}

.kanban-tight {
  --kanban-gap: calc(0.5em * var(--scale));
}

.kanban-loose {
  --kanban-gap: calc(2em * var(--scale));
}

.data-control {
  --data-control-gap: calc(0.75em * var(--scale));
  --data-control-bar-gap: calc(0.5em * var(--scale));
  --data-control-bg: #0000;
  --data-control-fg: var(--color-on-surface);
  --data-control-border: #0000;
  --data-control-border-width: 0px;
  --data-control-radius: 0px;
  --data-control-shadow: none;
  --data-control-p: 0px;
  --data-control-muted: color-mix(in oklab, var(--color-on-surface) 60%, #0000);
  --data-control-search: calc(16em * var(--scale));
  --data-control-editor: calc(16em * var(--scale));
}

/* ── Axis: variant ── a card around the controls and the view. */
.data-control-boxed {
  --data-control-bg: var(--color-surface-1);
  --data-control-border: var(--color-border);
  --data-control-border-width: 1px;
  --data-control-radius: var(--radius-box);
  --data-control-shadow: var(--shadow-light, none);
  --data-control-p: calc(1em * var(--scale));
}

/* ── Motion ──
   The extra filters are marked `data-motion="enter"` / `"leave"` (with
   `--motion-h`, their height) and removed once the motion written here
   has run: they unfold, and fold back. */
@media (prefers-reduced-motion: no-preference) {
  .data-control-more:is([data-motion=enter], [data-motion=leave]) {
    box-sizing: border-box;
    overflow: hidden;
    animation: data-control-more-in 0.22s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .data-control-more[data-motion=leave] {
    animation-direction: reverse;
    animation-fill-mode: forwards;
  }
}
@keyframes data-control-more-in {
  from {
    height: 0;
    padding-block: 0;
    margin-block: 0;
    border-block-width: 0;
    opacity: 0;
  }
  to {
    height: var(--motion-h);
  }
}
.divider {
  --divider-color: var(--color-border);
  --divider-thickness: 1px;
  --divider-gap: calc(1em * var(--scale));
  --divider-stub: calc(1.5em * var(--scale));
  --divider-m: calc(1em * var(--scale));
  --divider-fg: color-mix(in oklab, var(--color-on-surface) 65%, #0000);
  font-size: var(--fontsize, 0.875em);
}

/* colour variants: the line takes the colour, the content keeps its ink. */
.divider-primary {
  --divider-color: var(--color-primary);
}

.divider-neutral {
  --divider-color: var(--color-neutral);
}

.divider-info {
  --divider-color: var(--color-info);
}

.divider-success {
  --divider-color: var(--color-success);
}

.divider-warning {
  --divider-color: var(--color-warning);
}

.divider-error {
  --divider-color: var(--color-error);
}

/* variant fade: the line dissolves at its far ends. */
.divider-fade {
  --divider-line: linear-gradient(var(--divider-dir), #0000, var(--divider-color));
  --divider-line-end: linear-gradient(var(--divider-dir), var(--divider-color), #0000);
}

.alert {
  --alert-color: var(--color-on-surface);
  --alert-bg: color-mix(in oklab, var(--alert-color) 10%, var(--color-surface-1));
  --alert-fg: var(--color-on-surface);
  --alert-border: color-mix(in oklab, var(--alert-color) 25%, var(--color-surface-1));
  --alert-accent: var(--alert-color);
  --alert-border-width: 0px;
  --alert-radius: var(--radius-box);
  --alert-shadow: none;
  --alert-p: calc(0.85em * var(--scale)) calc(1em * var(--scale));
  --alert-gap: calc(0.75em * var(--scale));
}

/* colour variants */
.alert-primary {
  --alert-color: var(--color-primary);
}

.alert-neutral {
  --alert-color: var(--color-neutral);
}

.alert-info {
  --alert-color: var(--color-info);
}

.alert-success {
  --alert-color: var(--color-success);
}

.alert-warning {
  --alert-color: var(--color-warning);
}

.alert-error {
  --alert-color: var(--color-error);
}

/* variant outline: the page shows through. */
.alert-outline {
  --alert-bg: transparent;
  --alert-border: var(--alert-color);
}

/* variant solid: the colour itself, with its own ink. */
.alert-solid {
  --alert-bg: var(--alert-color);
  --alert-fg: var(--alert-on, var(--color-surface-1));
  --alert-accent: var(--alert-fg);
  --alert-border: var(--alert-color);
}

.alert-solid.alert-primary {
  --alert-on: var(--color-on-primary);
}

.alert-solid.alert-neutral {
  --alert-on: var(--color-on-neutral);
}

.alert-solid.alert-info {
  --alert-on: var(--color-on-info);
}

.alert-solid.alert-success {
  --alert-on: var(--color-on-success);
}

.alert-solid.alert-warning {
  --alert-on: var(--color-on-warning);
}

.alert-solid.alert-error {
  --alert-on: var(--color-on-error);
}

.alert-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.alert-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.alert-md {
  --fontsize: var(--md, var(--default-md));
}

.alert-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.alert-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature: the notification tile ──
   An alert is a white tile floating on the page, not a wash: its
   colour lives in the icon, set on a pale disc of it, and in the
   title. The notification of a dashboard's top-right bell. */
.alert:not(.alert-solid, .alert-outline) {
  --alert-bg: var(--color-surface-1);
  --alert-border-width: 0px;
  --alert-shadow:
  	0 0.1em 0.25em color-mix(in oklab, var(--color-on-surface) 5%, #0000),
  	0 calc(0.75em * var(--peony-shadow, 1)) calc(2em * var(--peony-shadow, 1)) calc(-0.75em * var(--peony-shadow, 1)) color-mix(in oklab, var(--alert-color, var(--color-on-surface)) 30%, #0000);
}

.alert-icon {
  display: grid;
  place-items: center;
  width: 2.25em;
  height: 2.25em;
  border-radius: 0.75em;
  background-color: color-mix(in oklab, var(--alert-color, var(--color-neutral)) 14%, var(--color-surface-1));
  color: var(--alert-accent);
}

/* Solid, in peony, is coloured but pale: a wash of the colour that
   fades towards white across the tile, the ink kept dark, the icon
   on a white disc. Strong enough to be seen, never a slab. */
.alert-solid {
  --alert-bg: color-mix(in oklab, var(--alert-color) 20%, var(--color-surface-1));
  --alert-fg: var(--color-on-surface);
  --alert-accent: color-mix(in oklab, var(--alert-color) 75%, var(--color-on-surface));
  --alert-border-width: 0px;
  --alert-shadow: 0 calc(0.75em * var(--peony-shadow, 1)) calc(2em * var(--peony-shadow, 1)) calc(-0.9em * var(--peony-shadow, 1)) color-mix(in oklab, var(--alert-color) 55%, #0000);
  background-image: linear-gradient(120deg, color-mix(in oklab, var(--alert-color) 30%, var(--color-surface-1)), color-mix(in oklab, var(--alert-color) 8%, var(--color-surface-1)));
}

.alert-solid .alert-icon {
  background-color: var(--color-surface-1);
  box-shadow: 0 0.2em 0.5em -0.2em color-mix(in oklab, var(--alert-color) 60%, rgba(0, 0, 0, 0));
}

/* ── Motion ──
   A dismissed alert is marked `data-motion="leave"` (with
   `--motion-h`, its height) and removed once the motion written here
   has run: it folds up. */
@media (prefers-reduced-motion: no-preference) {
  .alert[data-motion=leave] {
    box-sizing: border-box;
    overflow: hidden;
    animation: alert-out 0.16s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }
}
@keyframes alert-out {
  from {
    height: var(--motion-h);
  }
  to {
    height: 0;
    padding-block: 0;
    margin-block: 0;
    border-block-width: 0;
    opacity: 0;
  }
}
.toast {
  --toast-gap: calc(0.6em * var(--scale));
  --toast-m: calc(1em * var(--scale));
  --toast-width: 24em;
  --toast-shadow: 0 0.4em 1.4em -0.4em color-mix(in oklab, #000 35%, #0000);
}

/* A pinned alert needs an opaque ground: the page must not show through. */
.toast:is(.toast-top, .toast-bottom, .toast-start, .toast-center, .toast-end) .alert {
  background-image: linear-gradient(var(--alert-bg), var(--alert-bg));
  background-color: var(--color-surface-1);
}

/* ── Motion ──
   The component marks each `.toast-item` `data-motion="enter"`,
   `"leave"` or `"move"` (with `--motion-dx/dy`, where it came from),
   and removes a leaving one once the motion written here has run: an
   alert rises in from the stack's open side, slides out sideways, and
   the others glide to their new places. */
@media (prefers-reduced-motion: no-preference) {
  .toast-item[data-motion=enter] {
    animation: toast-item-in 0.18s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .toast-top > .toast-item[data-motion=enter] {
    animation-name: toast-item-in-down;
  }
  .toast-item[data-motion=leave] {
    animation: toast-item-out 0.16s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }
  .toast-item[data-motion=move] {
    animation: toast-item-move 0.18s cubic-bezier(0.33, 1, 0.68, 1);
  }
}
@keyframes toast-item-in {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}
@keyframes toast-item-in-down {
  from {
    opacity: 0;
    translate: 0 -16px;
  }
}
@keyframes toast-item-out {
  to {
    opacity: 0;
    translate: 24px 0;
  }
}
@keyframes toast-item-move {
  from {
    translate: var(--motion-dx, 0) var(--motion-dy, 0);
  }
}
.tooltip {
  --tooltip-bg: var(--color-on-surface);
  --tooltip-fg: var(--color-surface-1);
  --tooltip-border: transparent;
  --tooltip-border-width: 0px;
  --tooltip-radius: var(--radius-field);
  --tooltip-shadow: none;
  --tooltip-p: 0.35em 0.65em;
  --tooltip-gap: calc(0.5em * var(--scale));
  --tooltip-arrow: 0.5em;
  --tooltip-max: 20em;
}

/* colour variants */
.tooltip-primary {
  --tooltip-bg: var(--color-primary);
  --tooltip-fg: var(--color-on-primary);
}

.tooltip-neutral {
  --tooltip-bg: var(--color-neutral);
  --tooltip-fg: var(--color-on-neutral);
}

.tooltip-info {
  --tooltip-bg: var(--color-info);
  --tooltip-fg: var(--color-on-info);
}

.tooltip-success {
  --tooltip-bg: var(--color-success);
  --tooltip-fg: var(--color-on-success);
}

.tooltip-warning {
  --tooltip-bg: var(--color-warning);
  --tooltip-fg: var(--color-on-warning);
}

.tooltip-error {
  --tooltip-bg: var(--color-error);
  --tooltip-fg: var(--color-on-error);
}

/* ── peony signature: the soft label ──
   Ink on a pill, lifted by a shadow. */
.tooltip {
  --tooltip-radius: 0.6em;
  --tooltip-shadow: 0 0.5em 1.25em -0.4em color-mix(in oklab, #000 35%, #0000);
}

.collapse {
  --collapse-bg: var(--color-surface-1);
  --collapse-fg: var(--color-on-surface);
  --collapse-border: var(--color-border);
  --collapse-border-width: 0px;
  --collapse-radius: var(--radius-box);
  --collapse-shadow: var(--shadow-light, none);
  --collapse-px: calc(1em * var(--scale));
  --collapse-py: calc(0.85em * var(--scale));
  --collapse-p: var(--collapse-py) var(--collapse-px);
  --collapse-hover: color-mix(in oklab, var(--color-on-surface) 5%, #0000);
  --collapse-speed: 0.2s;
}

/* variant ghost: no frame — after the defaults above, so it wins. */
.collapse-ghost {
  --collapse-bg: transparent;
  --collapse-border-width: 0px;
  --collapse-shadow: none;
}

.editable {
  --editable-fg: inherit;
  --editable-empty-fg: color-mix(in oklab, var(--color-on-surface) 45%, #0000);
  --editable-hover-bg: color-mix(in oklab, var(--color-primary) 7%, var(--color-surface-1));
  --editable-radius: var(--radius-field);
  --editable-pad: calc(0.25em * var(--scale));
  --editable-focus: var(--color-primary);
}

/* ── peony signature: the drawn underline ──
   Under the pointer, the family's gradient — the line a focused field
   draws under itself — runs out from the centre along the bottom of
   the value: a promise of the field it turns into. */
.editable-display {
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--color-primary) 35%, #fff), var(--color-primary));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 0% calc(0.12em * var(--scale));
  transition: background-color 0.15s, box-shadow 0.15s, background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  button.editable-display:not(:disabled):hover {
    background-size: calc(100% - 2 * var(--editable-radius)) calc(0.12em * var(--scale));
  }
}
@media (prefers-reduced-motion: reduce) {
  .editable-display {
    transition: none;
  }
}
.accordion {
  --accordion-gap: calc(0.5em * var(--scale));
}

/* Joined, peony's borderless boxes need a hairline between them. */
.accordion:not(.accordion-separate) > .collapse:not(:first-child) {
  box-shadow: var(--collapse-shadow), inset 0 1px 0 var(--color-border);
}

.rating {
  --rating-on: var(--color-warning, var(--color-primary));
  --rating-off: color-mix(in oklab, var(--color-on-surface) 18%, #0000);
  --rating-size: calc(1.5em * var(--scale));
  --rating-gap: calc(0.15em * var(--scale));
}

/* colour variants */
.rating-primary {
  --rating-on: var(--color-primary);
}

.rating-neutral {
  --rating-on: var(--color-neutral);
}

.rating-info {
  --rating-on: var(--color-info);
}

.rating-success {
  --rating-on: var(--color-success);
}

.rating-warning {
  --rating-on: var(--color-warning);
}

.rating-error {
  --rating-on: var(--color-error);
}

.rating-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.rating-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.rating-md {
  --fontsize: var(--md, var(--default-md));
}

.rating-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.rating-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.switch {
  --size: calc(2.1em * var(--scale));
  --switch-bg: var(--color-surface-2);
  --switch-border: var(--color-border);
  --switch-border-width: 0px;
  --switch-radius: var(--radius-field);
  --switch-item-radius: calc(var(--radius-field) - var(--switch-pad) / 2);
  --switch-pad: calc(0.2em * var(--scale));
  --switch-fg: color-mix(in oklab, var(--color-on-surface) 65%, #0000);
  --switch-active-bg: var(--color-surface-1);
  --switch-active-fg: var(--color-on-surface);
  --switch-active-shadow: 0 1px 3px color-mix(in oklab, #000 18%, #0000);
}

/* colour variants: the tile stays white; the colour goes to the
   checked item's ink and to its underline. */
.switch-primary {
  --switch-active-fg: var(--color-primary);
}

.switch-neutral {
  --switch-active-fg: var(--color-neutral);
}

.switch-info {
  --switch-active-fg: var(--color-info);
}

.switch-success {
  --switch-active-fg: var(--color-success);
}

.switch-warning {
  --switch-active-fg: var(--color-warning);
}

.switch-error {
  --switch-active-fg: var(--color-error);
}

.switch-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.switch-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.switch-md {
  --fontsize: var(--md, var(--default-md));
}

.switch-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.switch-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature: the drawn underline ──
   The chosen item keeps its white tile; along the tile's bottom edge
   the family's gradient — the line a focused field draws under
   itself — runs out from the centre, in the variant's colour. */
.switch {
  --peony-accent: var(--color-primary);
}

.switch-primary {
  --peony-accent: var(--color-primary);
}

.switch-neutral {
  --peony-accent: var(--color-neutral);
}

.switch-info {
  --peony-accent: var(--color-info);
}

.switch-success {
  --peony-accent: var(--color-success);
}

.switch-warning {
  --peony-accent: var(--color-warning);
}

.switch-error {
  --peony-accent: var(--color-error);
}

.switch-item {
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 0% calc(0.14em * var(--scale));
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s, background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.switch-item:has(.switch-input:checked) {
  background-size: calc(100% - 2 * var(--switch-item-radius)) calc(0.14em * var(--scale));
}

@media (prefers-reduced-motion: reduce) {
  .switch-item {
    transition: none;
  }
}
.number-input {
  --size: calc(2.5em * var(--scale));
  --number-input-bg: var(--color-surface-1);
  --number-input-fg: var(--color-on-surface);
  --number-input-border: var(--color-border);
  --number-input-border-width: var(--border);
  --number-input-radius: var(--radius-field);
  --number-input-btn-bg: transparent;
  --number-input-btn-hover: color-mix(in oklab, var(--color-on-surface) 8%, #0000);
  --number-input-width: 8em;
  --number-input-focus: 0 0 0 2px color-mix(in oklab, var(--color-primary) 45%, #0000);
}

.number-input:has(> .number-input-dec) {
  --number-input-width: 4em;
}

.number-input-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.number-input-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.number-input-md {
  --fontsize: var(--md, var(--default-md));
}

.number-input-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.number-input-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.empty-state {
  --empty-state-fg: var(--color-on-surface);
  --empty-state-muted: color-mix(in oklab, var(--color-on-surface) 60%, #0000);
  --empty-state-icon-bg: var(--color-surface-2);
  --empty-state-icon-fg: color-mix(in oklab, var(--color-on-surface) 55%, #0000);
  --empty-state-icon-size: calc(3.5em * var(--scale));
  --empty-state-p: calc(2.5em * var(--scale)) calc(1.5em * var(--scale));
  --empty-state-gap: calc(0.4em * var(--scale));
}

/* variant dashed: a drop-zone-like frame. */
.empty-state-dashed {
  --empty-state-border: max(var(--border), 1px) dashed color-mix(in oklab, var(--color-on-surface) 25%, #0000);
  --empty-state-radius: var(--radius-box);
}

.empty-state-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.empty-state-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.empty-state-md {
  --fontsize: var(--md, var(--default-md));
}

.empty-state-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.empty-state-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature: the soft badge ──
   The icon sits on a pale disc of the accent; no dashed frame. */
.empty-state {
  --empty-state-icon-bg: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface-1));
  --empty-state-icon-fg: var(--color-primary);
  --empty-state-border: transparent;
}

.hero {
  --hero-bg: var(--color-surface-2);
  --hero-fg: var(--color-on-surface);
  --hero-muted: color-mix(in oklab, var(--color-on-surface) 70%, #0000);
  --hero-p: calc(3em * var(--scale)) calc(2em * var(--scale));
  --hero-gap: calc(2.5em * var(--scale));
  --hero-title-size: 2.75em;
  --hero-title-weight: 700;
  --hero-radius: var(--radius-box);
  --hero-media-radius: var(--radius-box);
}

/* colour variants: the whole block takes the colour. */
.hero-primary {
  --hero-bg: var(--color-primary);
  --hero-fg: var(--color-on-primary);
  --hero-muted: color-mix(in oklab, var(--color-on-primary) 80%, #0000);
}

.hero-neutral {
  --hero-bg: var(--color-neutral);
  --hero-fg: var(--color-on-neutral);
  --hero-muted: color-mix(in oklab, var(--color-on-neutral) 80%, #0000);
}

.hero-info {
  --hero-bg: var(--color-info);
  --hero-fg: var(--color-on-info);
  --hero-muted: color-mix(in oklab, var(--color-on-info) 80%, #0000);
}

.hero-success {
  --hero-bg: var(--color-success);
  --hero-fg: var(--color-on-success);
  --hero-muted: color-mix(in oklab, var(--color-on-success) 80%, #0000);
}

.hero-warning {
  --hero-bg: var(--color-warning);
  --hero-fg: var(--color-on-warning);
  --hero-muted: color-mix(in oklab, var(--color-on-warning) 80%, #0000);
}

.hero-error {
  --hero-bg: var(--color-error);
  --hero-fg: var(--color-on-error);
  --hero-muted: color-mix(in oklab, var(--color-on-error) 80%, #0000);
}

.hero-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.hero-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.hero-md {
  --fontsize: var(--md, var(--default-md));
}

.hero-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.hero-xl {
  --fontsize: var(--xl, var(--default-xl));
}

.footer {
  --footer-bg: var(--color-surface-2);
  --footer-fg: var(--color-on-surface);
  --footer-muted: color-mix(in oklab, var(--color-on-surface) 65%, #0000);
  --footer-border: var(--color-border);
  --footer-rule: 1px;
  --footer-p: calc(2.5em * var(--scale)) calc(2em * var(--scale)) calc(1.5em * var(--scale));
  --footer-gap: calc(1.75em * var(--scale));
  --footer-col: 10em;
}

/* colour variants */
.footer-primary {
  --footer-bg: var(--color-primary);
  --footer-fg: var(--color-on-primary);
  --footer-muted: color-mix(in oklab, var(--color-on-primary) 75%, #0000);
  --footer-border: color-mix(in oklab, var(--color-on-primary) 25%, #0000);
}

.footer-neutral {
  --footer-bg: var(--color-neutral);
  --footer-fg: var(--color-on-neutral);
  --footer-muted: color-mix(in oklab, var(--color-on-neutral) 75%, #0000);
  --footer-border: color-mix(in oklab, var(--color-on-neutral) 25%, #0000);
}

.footer-info {
  --footer-bg: var(--color-info);
  --footer-fg: var(--color-on-info);
  --footer-muted: color-mix(in oklab, var(--color-on-info) 75%, #0000);
  --footer-border: color-mix(in oklab, var(--color-on-info) 25%, #0000);
}

.footer-success {
  --footer-bg: var(--color-success);
  --footer-fg: var(--color-on-success);
  --footer-muted: color-mix(in oklab, var(--color-on-success) 75%, #0000);
  --footer-border: color-mix(in oklab, var(--color-on-success) 25%, #0000);
}

.footer-warning {
  --footer-bg: var(--color-warning);
  --footer-fg: var(--color-on-warning);
  --footer-muted: color-mix(in oklab, var(--color-on-warning) 75%, #0000);
  --footer-border: color-mix(in oklab, var(--color-on-warning) 25%, #0000);
}

.footer-error {
  --footer-bg: var(--color-error);
  --footer-fg: var(--color-on-error);
  --footer-muted: color-mix(in oklab, var(--color-on-error) 75%, #0000);
  --footer-border: color-mix(in oklab, var(--color-on-error) 25%, #0000);
}

.mobile-frame {
  --mobile-frame-width: 18em;
  --mobile-frame-body: color-mix(in oklab, var(--color-on-surface) 88%, var(--color-surface-1));
  --mobile-frame-bezel: 0.6em;
  --mobile-frame-radius: 2.6em;
  --mobile-frame-screen-bg: var(--color-surface-1);
  --mobile-frame-screen-fg: var(--color-on-surface);
  --mobile-frame-shadow: 0 1.5em 3em -1em color-mix(in oklab, #000 35%, #0000);
}

.window-frame {
  --window-frame-bg: var(--color-surface-1);
  --window-frame-fg: var(--color-on-surface);
  --window-frame-bar-bg: var(--color-surface-2);
  --window-frame-bar-fg: color-mix(in oklab, var(--color-on-surface) 75%, #0000);
  --window-frame-border: var(--color-border);
  --window-frame-border-width: 1px;
  --window-frame-radius: max(var(--radius-box), 0.5em);
  --window-frame-shadow: 0 1.25em 3em -1em color-mix(in oklab, #000 30%, #0000);
  --window-frame-dot-1: #ff5f57;
  --window-frame-dot-2: #febc2e;
  --window-frame-dot-3: #28c840;
}

.laptop-frame {
  --laptop-frame-width: 40em;
  --laptop-frame-body: color-mix(in oklab, var(--color-on-surface) 88%, var(--color-surface-1));
  --laptop-frame-base: color-mix(in oklab, var(--color-on-surface) 30%, var(--color-surface-1));
  --laptop-frame-bezel: 0.8em;
  --laptop-frame-screen-bg: var(--color-surface-1);
  --laptop-frame-screen-fg: var(--color-on-surface);
  --laptop-frame-shadow: none;
}

.drawer {
  --drawer-size: 20em;
  --drawer-peek: 3em;
  --drawer-bg: var(--color-surface-1);
  --drawer-fg: var(--color-on-surface);
  --drawer-border: var(--color-border);
  --drawer-border-width: 0px;
  --drawer-shadow: 0 0 2.5em -0.5em color-mix(in oklab, #000 35%, #0000);
  --drawer-radius: var(--radius-box);
  --drawer-p: calc(1.25em * var(--scale));
  --drawer-backdrop: color-mix(in oklab, #000 40%, #0000);
  --drawer-speed: 0.25s;
  --drawer-handle-bg: color-mix(in oklab, var(--color-on-surface) 30%, #0000);
  --drawer-handle-w: 0.3em;
  --drawer-handle-l: 2.5em;
}

.sidebar {
  --sidebar-width: 15rem;
  --sidebar-rail: 3.5rem;
  --sidebar-bg: var(--color-surface-1);
  --sidebar-fg: var(--color-on-surface);
  --sidebar-border: transparent;
  --sidebar-border-width: 0px;
  --sidebar-shadow: 0 0 2rem -0.75rem color-mix(in oklab, var(--color-primary) 35%, #0000);
  --sidebar-p: calc(0.6em * var(--scale));
  --sidebar-gap: calc(0.5em * var(--scale));
  --sidebar-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps {
  --steps-color: var(--color-primary);
  --steps-off: color-mix(in oklab, var(--color-on-surface) 14%, #0000);
  --steps-visited: color-mix(in oklab, var(--steps-color) 45%, var(--color-surface-1));
  --steps-warning: var(--color-warning);
  --steps-error: var(--color-error);
  --steps-bar: 0.25em;
  --steps-marker: 1.35em;
  --steps-marker-bg: var(--color-surface-1);
  --steps-marker-fg: var(--color-on-primary);
  --steps-gap: calc(0.75em * var(--scale));
  --steps-seg-gap: calc(0.35em * var(--scale));
  --steps-fg: var(--color-on-surface);
  --steps-muted: color-mix(in oklab, var(--color-on-surface) 60%, #0000);
}

/* colour variants: the journey takes the colour. */
.steps-primary {
  --steps-color: var(--color-primary);
  --steps-marker-fg: var(--color-on-primary);
}

.steps-neutral {
  --steps-color: var(--color-neutral);
  --steps-marker-fg: var(--color-on-neutral);
}

.steps-info {
  --steps-color: var(--color-info);
  --steps-marker-fg: var(--color-on-info);
}

.steps-success {
  --steps-color: var(--color-success);
  --steps-marker-fg: var(--color-on-success);
}

.steps-warning {
  --steps-color: var(--color-warning);
  --steps-marker-fg: var(--color-on-warning);
}

.steps-error {
  --steps-color: var(--color-error);
  --steps-marker-fg: var(--color-on-error);
}

.steps-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.steps-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.steps-md {
  --fontsize: var(--md, var(--default-md));
}

.steps-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.steps-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature: beads on a soft rail ──
   Rounded bars a little thicker than a hairline; the current step's
   disc wears a pale halo of the journey's colour. */
.steps {
  --steps-bar: calc(0.3em * var(--scale));
}

.steps-segment > span,
.steps-segment {
  border-radius: 999px;
}

.steps-item[data-state=current] .steps-marker {
  box-shadow: 0 0 0 calc(0.3em * var(--scale)) color-mix(in oklab, var(--steps-color) 18%, rgba(0, 0, 0, 0));
}

.steps-item[data-state=complete] .steps-marker {
  background-image: linear-gradient(135deg, color-mix(in oklab, var(--steps-color) 45%, #fff), var(--steps-color));
  box-shadow: 0 0.2em 0.5em -0.15em color-mix(in oklab, var(--steps-color) 60%, rgba(0, 0, 0, 0));
}

/* The progress bar's gradient on every bar walked, and on the one
   being walked a gradient that fades into the rest of the way. */
.steps-segment[data-state=complete] > span {
  background: linear-gradient(var(--steps-dir, 90deg), color-mix(in oklab, var(--steps-color) 50%, #fff), var(--steps-color));
  box-shadow: 0 0.15em 0.45em -0.1em color-mix(in oklab, var(--steps-color) 50%, rgba(0, 0, 0, 0));
}

.steps-segment[data-state=current] > span {
  background: linear-gradient(var(--steps-dir, 90deg), var(--steps-color), color-mix(in oklab, var(--steps-color) 25%, var(--steps-off)) 70%, var(--steps-off));
}

.combobox {
  --combobox-check: var(--color-primary);
  --combobox-check-fg: var(--color-on-primary);
  --combobox-check-border: color-mix(in oklab, var(--color-on-surface) 35%, #0000);
  --combobox-active: color-mix(in oklab, var(--color-on-surface) 9%, #0000);
}

.combobox-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.combobox-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.combobox-md {
  --fontsize: var(--md, var(--default-md));
}

.combobox-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.combobox-xl {
  --fontsize: var(--xl, var(--default-xl));
}

/* ── peony signature ──
   The combobox's frame is the family's .input and keeps its focus
   (white, lit from below, the accent gradient along the bottom
   edge) for as long as its list hangs open under it. */
.combobox .input:has([aria-expanded=true]) {
  --input-color: transparent;
  outline: none;
  background-color: var(--color-surface-1);
  background-image: linear-gradient(90deg, color-mix(in oklab, var(--peony-accent) 35%, #fff), var(--peony-accent));
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: calc(100% - 2 * var(--radius-field, 0.5em)) calc(0.14em * var(--scale));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--peony-accent) 18%, rgba(0, 0, 0, 0)), 0 calc(0.9em * var(--peony-shadow, 1)) calc(1.4em * var(--peony-shadow, 1)) calc(-0.8em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 75%, rgba(0, 0, 0, 0)), 0 calc(0.35em * var(--peony-shadow, 1)) calc(0.6em * var(--peony-shadow, 1)) calc(-0.35em * var(--peony-shadow, 1)) color-mix(in oklab, var(--peony-accent) 45%, rgba(0, 0, 0, 0));
}

.chips-input {
  --chips-input-gap: calc(0.5em * var(--scale));
  --chips-input-list-gap: calc(0.35em * var(--scale));
  --chips-input-side-min: 12em;
}

.chips-input-list > .chip {
  font-size: 0.875em;
}

.file-explorer,
.file-explorer-menu {
  --file-explorer-bg: var(--color-surface-1);
  --file-explorer-fg: var(--color-on-surface);
  --file-explorer-muted: color-mix(in oklab, var(--color-on-surface) 60%, #0000);
  --file-explorer-border: var(--color-border);
  --file-explorer-border-width: 1px;
  --file-explorer-radius: var(--radius-box);
  --file-explorer-pane: color-mix(in oklab, var(--color-surface-2) 60%, var(--color-surface-1));
  --file-explorer-hover: color-mix(in oklab, var(--color-on-surface) 6%, #0000);
  --file-explorer-selected: color-mix(in oklab, var(--color-primary) 16%, var(--color-surface-1));
  --file-explorer-selected-fg: var(--color-on-surface);
  --file-explorer-folder: var(--color-primary);
  --file-explorer-drop: var(--color-primary);
  --file-explorer-height: 28em;
  --file-explorer-tree-width: 13em;
  --file-explorer-details-width: 17em;
  --file-explorer-shadow: 0 0.5em 1.5em -0.4em color-mix(in oklab, #000 35%, #0000);
}

.file-explorer-xs {
  --fontsize: var(--xs, var(--default-xs));
}

.file-explorer-sm {
  --fontsize: var(--sm, var(--default-sm));
}

.file-explorer-md {
  --fontsize: var(--md, var(--default-md));
}

.file-explorer-lg {
  --fontsize: var(--lg, var(--default-lg));
}

.file-explorer-xl {
  --fontsize: var(--xl, var(--default-xl));
}