/* scaffold-admin-dashboard: core.css + the 34 components its markup uses (alert-dialog, avatar, badge, breadcrumb, button, chart, checkbox, combobox, command, data-grid, dialog, dropdown, icon, input, kbd, label, language-switcher, number-input, popover, progress, radio, select, sheet, sidebar, statistic, swap, switch, table, tabs, textarea, toast, toggle, toggle-group, typography) - generated by scripts/bundle.ts */
/* ── theme/utils/default-semantic-tokens.css ── */
/**
 * defuss-shadcn - Token Layer
 * Semantic CSS custom properties matching the tweakcn.com export format.
 * OKLCH color space. Full surface/foreground pair model.
 *
 * Export a theme from tweakcn.com, replace the :root and .dark blocks,
 * and every component rethemes instantly.
 */

:root {
  color-scheme: light;

  /* -- Surface / Foreground pairs ------------------------------ */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);

  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);

  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);

  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);

  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);

  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(1 0 0);

  /* -- Utility tokens ------------------------------------------- */
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);

  /* -- Sidebar tokens ------------------------------------------- */
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  /* 0.97 was within 1.1 contrast of --sidebar - the active nav pill read as
     "no background at all"; 0.94 keeps 12+ text contrast and separates */
  --sidebar-accent: oklch(0.94 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);

  /* -- Chart tokens --------------------------------------------- */
  --chart-1: oklch(0.81 0.1 252);
  --chart-2: oklch(0.62 0.19 260);
  --chart-3: oklch(0.55 0.22 263);
  --chart-4: oklch(0.49 0.22 264);
  --chart-5: oklch(0.42 0.18 266);

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

  /* -- Radius --------------------------------------------------- */
  --radius: 0.625rem;
  /* Derived - matches tweakcn/shadcn scale */
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* -- Spacing -------------------------------------------------- */
  --spacing: 0.25rem;

  /* -- Tracking ------------------------------------------------- */
  --tracking-normal: 0em;

  /* -- Links ---------------------------------------------------- */
  /* not part of the tweakcn export: a tweakcn theme leaves them unset and
     .link falls back to these same values */
  --link-text-decoration: underline;
  --link-underline-offset: 4px;

  /* -- Shadow scale --------------------------------------------- */
  --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
  --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
}

/* -- Dark mode -------------------------------------------------- */
.dark {
  color-scheme: dark;

  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);

  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);

  --popover: oklch(0.269 0 0);
  --popover-foreground: oklch(0.985 0 0);

  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);

  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);

  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);

  --accent: oklch(0.371 0 0);
  --accent-foreground: oklch(0.985 0 0);

  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.985 0 0);

  --border: oklch(0.275 0 0);
  --input: oklch(0.325 0 0);
  --ring: oklch(0.556 0 0);

  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.275 0 0);
  --sidebar-ring: oklch(0.439 0 0);

  --chart-1: oklch(0.81 0.1 252);
  --chart-2: oklch(0.62 0.19 260);
  --chart-3: oklch(0.55 0.22 263);
  --chart-4: oklch(0.49 0.22 264);
  --chart-5: oklch(0.42 0.18 266);
}

/* ── theme/utils/sizing.css ── */
/* defuss-shadcn - optional sizing utilities.
 * Standalone native CSS. No Tailwind, scan, runtime or consumer build.
 * Numeric dimensions = n × --size-base. Spacing additionally uses density.
 * Theme export remains untouched. Place this sheet before component CSS.
 * Unlayered application rules override normal library rules.
 */
@layer components, utilities;

@layer components {
  :where(:root) {
    --size-base: var(--spacing, 0.25rem);
    --layout-density: 1;
  }

  /* Custom-property formulas resolve before inheritance. Recompute aliases
     at an explicit boundary after overriding --size-base on that boundary. */
  :where(:root, [data-size-scope]) {
    --size-xs: calc(var(--size-base) * 2);
    --size-sm: calc(var(--size-base) * 3);
    --size-md: calc(var(--size-base) * 4);
    --size-lg: calc(var(--size-base) * 6);
    --size-xl: calc(var(--size-base) * 8);
  }

  :where([data-density="compact"]) {
    --layout-density: 0.75;
  }
  :where([data-density="comfortable"]) {
    --layout-density: 1;
  }
  :where([data-density="spacious"]) {
    --layout-density: 1.25;
  }
}

@layer utilities {
  /* These helpers do not change box-sizing: native CSS sizing semantics. */
  :where(.w-0) {
    width: 0px;
  }
  :where(.h-0) {
    height: 0px;
  }
  :where(.size-0) {
    width: 0px;
    height: 0px;
  }
  :where(.min-w-0) {
    min-width: 0px;
  }
  :where(.min-h-0) {
    min-height: 0px;
  }
  :where(.max-w-0) {
    max-width: 0px;
  }
  :where(.max-h-0) {
    max-height: 0px;
  }
  :where(.inline-0) {
    inline-size: 0px;
  }
  :where(.block-0) {
    block-size: 0px;
  }
  :where(.w-0\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.h-0\.5) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.size-0\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.min-w-0\.5) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.min-h-0\.5) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.max-w-0\.5) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.max-h-0\.5) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.inline-0\.5) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.block-0\.5) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5);
  }
  :where(.w-1) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.h-1) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.size-1) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.min-w-1) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.min-h-1) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.max-w-1) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.max-h-1) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.inline-1) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.block-1) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 1);
  }
  :where(.w-1\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.h-1\.5) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.size-1\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.min-w-1\.5) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.min-h-1\.5) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.max-w-1\.5) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.max-h-1\.5) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.inline-1\.5) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.block-1\.5) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5);
  }
  :where(.w-2) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.h-2) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.size-2) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.min-w-2) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.min-h-2) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.max-w-2) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.max-h-2) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.inline-2) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.block-2) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 2);
  }
  :where(.w-2\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.h-2\.5) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.size-2\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.min-w-2\.5) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.min-h-2\.5) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.max-w-2\.5) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.max-h-2\.5) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.inline-2\.5) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.block-2\.5) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5);
  }
  :where(.w-3) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.h-3) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.size-3) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.min-w-3) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.min-h-3) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.max-w-3) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.max-h-3) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.inline-3) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.block-3) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 3);
  }
  :where(.w-3\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.h-3\.5) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.size-3\.5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.min-w-3\.5) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.min-h-3\.5) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.max-w-3\.5) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.max-h-3\.5) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.inline-3\.5) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.block-3\.5) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5);
  }
  :where(.w-4) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.h-4) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.size-4) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.min-w-4) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.min-h-4) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.max-w-4) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.max-h-4) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.inline-4) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.block-4) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 4);
  }
  :where(.w-5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.h-5) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.size-5) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.min-w-5) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.min-h-5) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.max-w-5) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.max-h-5) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.inline-5) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.block-5) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 5);
  }
  :where(.w-6) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.h-6) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.size-6) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.min-w-6) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.min-h-6) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.max-w-6) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.max-h-6) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.inline-6) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.block-6) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 6);
  }
  :where(.w-7) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.h-7) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.size-7) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.min-w-7) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.min-h-7) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.max-w-7) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.max-h-7) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.inline-7) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.block-7) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 7);
  }
  :where(.w-8) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.h-8) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.size-8) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.min-w-8) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.min-h-8) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.max-w-8) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.max-h-8) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.inline-8) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.block-8) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 8);
  }
  :where(.w-9) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.h-9) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.size-9) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.min-w-9) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.min-h-9) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.max-w-9) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.max-h-9) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.inline-9) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.block-9) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 9);
  }
  :where(.w-10) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.h-10) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.size-10) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.min-w-10) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.min-h-10) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.max-w-10) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.max-h-10) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.inline-10) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.block-10) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 10);
  }
  :where(.w-11) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.h-11) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.size-11) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.min-w-11) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.min-h-11) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.max-w-11) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.max-h-11) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.inline-11) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.block-11) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 11);
  }
  :where(.w-12) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.h-12) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.size-12) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.min-w-12) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.min-h-12) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.max-w-12) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.max-h-12) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.inline-12) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.block-12) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 12);
  }
  :where(.w-14) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.h-14) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.size-14) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.min-w-14) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.min-h-14) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.max-w-14) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.max-h-14) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.inline-14) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.block-14) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 14);
  }
  :where(.w-16) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.h-16) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.size-16) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.min-w-16) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.min-h-16) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.max-w-16) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.max-h-16) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.inline-16) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.block-16) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 16);
  }
  :where(.w-20) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.h-20) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.size-20) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.min-w-20) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.min-h-20) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.max-w-20) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.max-h-20) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.inline-20) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.block-20) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 20);
  }
  :where(.w-24) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.h-24) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.size-24) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.min-w-24) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.min-h-24) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.max-w-24) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.max-h-24) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.inline-24) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.block-24) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 24);
  }
  :where(.w-28) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.h-28) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.size-28) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.min-w-28) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.min-h-28) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.max-w-28) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.max-h-28) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.inline-28) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.block-28) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 28);
  }
  :where(.w-32) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.h-32) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.size-32) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.min-w-32) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.min-h-32) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.max-w-32) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.max-h-32) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.inline-32) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.block-32) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 32);
  }
  :where(.w-36) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.h-36) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.size-36) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.min-w-36) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.min-h-36) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.max-w-36) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.max-h-36) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.inline-36) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.block-36) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 36);
  }
  :where(.w-40) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.h-40) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.size-40) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.min-w-40) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.min-h-40) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.max-w-40) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.max-h-40) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.inline-40) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.block-40) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 40);
  }
  :where(.w-48) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.h-48) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.size-48) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.min-w-48) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.min-h-48) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.max-w-48) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.max-h-48) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.inline-48) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.block-48) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 48);
  }
  :where(.w-56) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.h-56) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.size-56) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.min-w-56) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.min-h-56) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.max-w-56) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.max-h-56) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.inline-56) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.block-56) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 56);
  }
  :where(.w-64) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.h-64) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.size-64) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.min-w-64) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.min-h-64) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.max-w-64) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.max-h-64) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.inline-64) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.block-64) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 64);
  }
  :where(.w-72) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.h-72) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.size-72) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.min-w-72) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.min-h-72) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.max-w-72) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.max-h-72) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.inline-72) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.block-72) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 72);
  }
  :where(.w-80) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.h-80) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.size-80) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.min-w-80) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.min-h-80) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.max-w-80) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.max-h-80) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.inline-80) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.block-80) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 80);
  }
  :where(.w-96) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.h-96) {
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.size-96) {
    width: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
    height: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.min-w-96) {
    min-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.min-h-96) {
    min-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.max-w-96) {
    max-width: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.max-h-96) {
    max-height: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.inline-96) {
    inline-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.block-96) {
    block-size: calc(var(--size-base, var(--spacing, 0.25rem)) * 96);
  }
  :where(.w-px) {
    width: 1px;
  }
  :where(.h-px) {
    height: 1px;
  }
  :where(.size-px) {
    width: 1px;
    height: 1px;
  }
  :where(.min-w-px) {
    min-width: 1px;
  }
  :where(.min-h-px) {
    min-height: 1px;
  }
  :where(.max-w-px) {
    max-width: 1px;
  }
  :where(.max-h-px) {
    max-height: 1px;
  }
  :where(.inline-px) {
    inline-size: 1px;
  }
  :where(.block-px) {
    block-size: 1px;
  }

  /* Content-, parent- and viewport-relative dimensions. */
  :where(.w-auto) {
    width: auto;
  }
  :where(.w-full) {
    width: 100%;
  }
  :where(.w-min) {
    width: min-content;
  }
  :where(.w-max) {
    width: max-content;
  }
  :where(.w-fit) {
    width: fit-content;
  }
  :where(.w-1\/2) {
    width: 50%;
  }
  :where(.w-1\/3) {
    width: calc(100% / 3);
  }
  :where(.w-2\/3) {
    width: calc(200% / 3);
  }
  :where(.w-1\/4) {
    width: 25%;
  }
  :where(.w-3\/4) {
    width: 75%;
  }
  :where(.h-auto) {
    height: auto;
  }
  :where(.h-full) {
    height: 100%;
  }
  :where(.h-min) {
    height: min-content;
  }
  :where(.h-max) {
    height: max-content;
  }
  :where(.h-fit) {
    height: fit-content;
  }
  :where(.h-1\/2) {
    height: 50%;
  }
  :where(.h-1\/3) {
    height: calc(100% / 3);
  }
  :where(.h-2\/3) {
    height: calc(200% / 3);
  }
  :where(.h-1\/4) {
    height: 25%;
  }
  :where(.h-3\/4) {
    height: 75%;
  }
  :where(.inline-auto) {
    inline-size: auto;
  }
  :where(.inline-full) {
    inline-size: 100%;
  }
  :where(.inline-min) {
    inline-size: min-content;
  }
  :where(.inline-max) {
    inline-size: max-content;
  }
  :where(.inline-fit) {
    inline-size: fit-content;
  }
  :where(.inline-1\/2) {
    inline-size: 50%;
  }
  :where(.inline-1\/3) {
    inline-size: calc(100% / 3);
  }
  :where(.inline-2\/3) {
    inline-size: calc(200% / 3);
  }
  :where(.inline-1\/4) {
    inline-size: 25%;
  }
  :where(.inline-3\/4) {
    inline-size: 75%;
  }
  :where(.block-auto) {
    block-size: auto;
  }
  :where(.block-full) {
    block-size: 100%;
  }
  :where(.block-min) {
    block-size: min-content;
  }
  :where(.block-max) {
    block-size: max-content;
  }
  :where(.block-fit) {
    block-size: fit-content;
  }
  :where(.block-1\/2) {
    block-size: 50%;
  }
  :where(.block-1\/3) {
    block-size: calc(100% / 3);
  }
  :where(.block-2\/3) {
    block-size: calc(200% / 3);
  }
  :where(.block-1\/4) {
    block-size: 25%;
  }
  :where(.block-3\/4) {
    block-size: 75%;
  }
  :where(.min-w-full) {
    min-width: 100%;
  }
  :where(.min-w-min) {
    min-width: min-content;
  }
  :where(.min-w-max) {
    min-width: max-content;
  }
  :where(.min-w-fit) {
    min-width: fit-content;
  }
  :where(.min-h-full) {
    min-height: 100%;
  }
  :where(.min-h-min) {
    min-height: min-content;
  }
  :where(.min-h-max) {
    min-height: max-content;
  }
  :where(.min-h-fit) {
    min-height: fit-content;
  }
  :where(.max-w-full) {
    max-width: 100%;
  }
  :where(.max-w-min) {
    max-width: min-content;
  }
  :where(.max-w-max) {
    max-width: max-content;
  }
  :where(.max-w-fit) {
    max-width: fit-content;
  }
  :where(.max-h-full) {
    max-height: 100%;
  }
  :where(.max-h-min) {
    max-height: min-content;
  }
  :where(.max-h-max) {
    max-height: max-content;
  }
  :where(.max-h-fit) {
    max-height: fit-content;
  }
  :where(.max-w-none) {
    max-width: none;
  }
  :where(.max-h-none) {
    max-height: none;
  }
  :where(.h-screen) {
    height: 100vh;
  }
  :where(.min-h-screen) {
    min-height: 100vh;
  }
  :where(.max-h-screen) {
    max-height: 100vh;
  }
  :where(.h-dvh) {
    height: 100dvh;
  }
  :where(.min-h-dvh) {
    min-height: 100dvh;
  }
  :where(.max-h-dvh) {
    max-height: 100dvh;
  }
  :where(.h-svh) {
    height: 100svh;
  }
  :where(.min-h-svh) {
    min-height: 100svh;
  }
  :where(.max-h-svh) {
    max-height: 100svh;
  }
  :where(.h-lvh) {
    height: 100lvh;
  }
  :where(.min-h-lvh) {
    min-height: 100lvh;
  }
  :where(.max-h-lvh) {
    max-height: 100lvh;
  }
  :where(.w-screen) {
    width: 100vw;
  }
  :where(.box-border) {
    box-sizing: border-box;
  }
  :where(.box-content) {
    box-sizing: content-box;
  }

  /* Spacing: compatible names; density is an explicit extension. */
  :where(.gap-0) {
    gap: 0px;
  }
  :where(.gap-x-0) {
    column-gap: 0px;
  }
  :where(.gap-y-0) {
    row-gap: 0px;
  }
  :where(.p-0) {
    padding: 0px;
  }
  :where(.px-0) {
    padding-inline: 0px;
  }
  :where(.py-0) {
    padding-block: 0px;
  }
  :where(.pt-0) {
    padding-top: 0px;
  }
  :where(.pr-0) {
    padding-right: 0px;
  }
  :where(.pb-0) {
    padding-bottom: 0px;
  }
  :where(.pl-0) {
    padding-left: 0px;
  }
  :where(.ps-0) {
    padding-inline-start: 0px;
  }
  :where(.pe-0) {
    padding-inline-end: 0px;
  }
  :where(.m-0) {
    margin: 0px;
  }
  :where(.mx-0) {
    margin-inline: 0px;
  }
  :where(.my-0) {
    margin-block: 0px;
  }
  :where(.mt-0) {
    margin-top: 0px;
  }
  :where(.mr-0) {
    margin-right: 0px;
  }
  :where(.mb-0) {
    margin-bottom: 0px;
  }
  :where(.ml-0) {
    margin-left: 0px;
  }
  :where(.ms-0) {
    margin-inline-start: 0px;
  }
  :where(.me-0) {
    margin-inline-end: 0px;
  }
  :where(.gap-0\.5) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-0\.5) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-0\.5) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.p-0\.5) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.px-0\.5) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.py-0\.5) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-0\.5) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-0\.5) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-0\.5) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-0\.5) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-0\.5) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-0\.5) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.m-0\.5) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-0\.5) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.my-0\.5) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-0\.5) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-0\.5) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-0\.5) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-0\.5) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-0\.5) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.me-0\.5) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 0.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-1) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-1) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-1) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.p-1) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.px-1) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.py-1) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-1) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-1) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-1) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-1) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-1) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-1) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.m-1) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-1) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.my-1) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-1) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-1) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-1) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-1) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-1) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.me-1) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 1 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-1\.5) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-1\.5) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-1\.5) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.p-1\.5) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.px-1\.5) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.py-1\.5) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-1\.5) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-1\.5) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-1\.5) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-1\.5) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-1\.5) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-1\.5) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.m-1\.5) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-1\.5) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.my-1\.5) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-1\.5) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-1\.5) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-1\.5) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-1\.5) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-1\.5) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.me-1\.5) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 1.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-2) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-2) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-2) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.p-2) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.px-2) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.py-2) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-2) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-2) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-2) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-2) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-2) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-2) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.m-2) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-2) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.my-2) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-2) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-2) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-2) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-2) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-2) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.me-2) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 2 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-2\.5) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-2\.5) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-2\.5) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.p-2\.5) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.px-2\.5) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.py-2\.5) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-2\.5) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-2\.5) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-2\.5) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-2\.5) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-2\.5) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-2\.5) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.m-2\.5) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-2\.5) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.my-2\.5) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-2\.5) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-2\.5) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-2\.5) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-2\.5) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-2\.5) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.me-2\.5) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 2.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-3) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-3) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-3) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.p-3) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.px-3) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.py-3) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-3) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-3) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-3) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-3) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-3) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-3) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.m-3) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-3) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.my-3) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-3) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-3) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-3) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-3) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-3) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.me-3) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 3 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-3\.5) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-3\.5) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-3\.5) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.p-3\.5) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.px-3\.5) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.py-3\.5) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-3\.5) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-3\.5) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-3\.5) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-3\.5) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-3\.5) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-3\.5) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.m-3\.5) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-3\.5) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.my-3\.5) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-3\.5) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-3\.5) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-3\.5) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-3\.5) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-3\.5) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.me-3\.5) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 3.5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-4) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-4) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-4) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.p-4) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.px-4) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.py-4) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-4) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-4) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-4) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-4) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-4) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-4) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.m-4) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-4) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.my-4) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-4) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-4) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-4) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-4) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-4) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.me-4) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-5) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-5) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-5) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.p-5) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.px-5) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.py-5) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-5) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-5) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-5) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-5) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-5) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-5) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.m-5) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-5) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.my-5) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-5) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-5) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-5) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-5) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-5) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.me-5) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 5 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-6) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-6) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-6) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.p-6) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.px-6) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.py-6) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-6) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-6) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-6) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-6) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-6) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-6) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.m-6) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-6) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.my-6) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-6) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-6) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-6) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-6) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-6) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.me-6) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 6 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-7) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-7) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-7) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.p-7) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.px-7) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.py-7) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-7) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-7) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-7) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-7) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-7) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-7) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.m-7) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-7) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.my-7) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-7) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-7) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-7) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-7) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-7) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.me-7) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 7 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-8) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-8) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-8) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.p-8) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.px-8) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.py-8) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-8) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-8) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-8) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-8) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-8) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-8) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.m-8) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-8) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.my-8) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-8) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-8) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-8) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-8) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-8) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.me-8) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 8 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-9) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-9) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-9) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.p-9) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.px-9) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.py-9) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-9) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-9) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-9) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-9) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-9) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-9) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.m-9) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-9) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.my-9) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-9) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-9) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-9) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-9) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-9) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.me-9) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 9 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-10) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-10) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-10) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.p-10) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.px-10) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.py-10) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-10) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-10) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-10) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-10) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-10) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-10) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.m-10) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-10) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.my-10) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-10) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-10) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-10) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-10) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-10) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.me-10) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 10 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-11) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-11) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-11) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.p-11) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.px-11) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.py-11) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-11) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-11) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-11) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-11) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-11) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-11) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.m-11) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-11) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.my-11) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-11) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-11) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-11) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-11) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-11) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.me-11) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 11 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-12) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-12) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-12) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.p-12) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.px-12) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.py-12) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-12) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-12) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-12) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-12) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-12) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-12) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.m-12) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-12) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.my-12) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-12) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-12) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-12) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-12) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-12) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.me-12) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 12 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-14) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-14) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-14) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.p-14) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.px-14) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.py-14) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-14) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-14) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-14) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-14) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-14) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-14) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.m-14) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-14) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.my-14) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-14) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-14) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-14) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-14) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-14) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.me-14) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 14 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-16) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-16) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-16) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.p-16) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.px-16) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.py-16) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-16) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-16) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-16) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-16) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-16) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-16) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.m-16) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-16) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.my-16) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-16) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-16) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-16) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-16) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-16) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.me-16) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 16 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-20) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-20) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-20) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.p-20) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.px-20) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.py-20) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-20) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-20) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-20) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-20) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-20) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-20) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.m-20) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-20) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.my-20) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-20) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-20) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-20) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-20) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-20) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.me-20) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 20 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-24) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-24) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-24) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.p-24) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.px-24) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.py-24) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-24) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-24) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-24) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-24) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-24) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-24) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.m-24) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-24) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.my-24) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-24) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-24) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-24) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-24) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-24) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.me-24) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 24 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-28) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-28) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-28) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.p-28) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.px-28) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.py-28) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-28) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-28) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-28) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-28) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-28) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-28) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.m-28) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-28) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.my-28) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-28) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-28) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-28) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-28) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-28) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.me-28) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 28 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-32) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-32) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-32) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.p-32) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.px-32) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.py-32) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-32) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-32) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-32) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-32) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-32) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-32) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.m-32) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-32) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.my-32) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-32) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-32) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-32) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-32) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-32) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.me-32) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 32 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-36) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-36) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-36) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.p-36) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.px-36) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.py-36) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-36) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-36) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-36) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-36) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-36) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-36) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.m-36) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-36) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.my-36) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-36) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-36) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-36) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-36) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-36) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.me-36) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 36 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-40) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-40) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-40) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.p-40) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.px-40) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.py-40) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-40) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-40) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-40) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-40) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-40) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-40) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.m-40) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-40) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.my-40) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-40) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-40) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-40) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-40) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-40) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.me-40) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 40 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-48) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-48) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-48) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.p-48) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.px-48) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.py-48) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-48) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-48) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-48) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-48) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-48) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-48) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.m-48) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-48) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.my-48) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-48) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-48) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-48) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-48) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-48) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.me-48) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 48 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-56) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-56) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-56) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.p-56) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.px-56) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.py-56) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-56) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-56) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-56) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-56) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-56) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-56) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.m-56) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-56) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.my-56) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-56) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-56) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-56) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-56) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-56) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.me-56) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 56 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-64) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-64) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-64) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.p-64) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.px-64) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.py-64) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-64) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-64) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-64) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-64) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-64) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-64) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.m-64) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-64) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.my-64) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-64) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-64) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-64) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-64) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-64) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.me-64) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 64 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-72) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-72) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-72) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.p-72) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.px-72) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.py-72) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-72) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-72) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-72) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-72) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-72) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-72) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.m-72) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-72) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.my-72) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-72) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-72) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-72) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-72) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-72) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.me-72) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 72 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-80) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-80) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-80) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.p-80) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.px-80) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.py-80) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-80) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-80) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-80) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-80) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-80) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-80) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.m-80) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-80) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.my-80) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-80) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-80) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-80) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-80) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-80) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.me-80) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 80 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-96) {
    gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-x-96) {
    column-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-y-96) {
    row-gap: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.p-96) {
    padding: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.px-96) {
    padding-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.py-96) {
    padding-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.pt-96) {
    padding-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.pr-96) {
    padding-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.pb-96) {
    padding-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.pl-96) {
    padding-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.ps-96) {
    padding-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.pe-96) {
    padding-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.m-96) {
    margin: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.mx-96) {
    margin-inline: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.my-96) {
    margin-block: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.mt-96) {
    margin-top: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.mr-96) {
    margin-right: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.mb-96) {
    margin-bottom: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.ml-96) {
    margin-left: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.ms-96) {
    margin-inline-start: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.me-96) {
    margin-inline-end: calc(var(--size-base, var(--spacing, 0.25rem)) * 96 * max(0, var(--layout-density, 1)));
  }
  :where(.gap-px) {
    gap: 1px;
  }
  :where(.gap-x-px) {
    column-gap: 1px;
  }
  :where(.gap-y-px) {
    row-gap: 1px;
  }
  :where(.p-px) {
    padding: 1px;
  }
  :where(.px-px) {
    padding-inline: 1px;
  }
  :where(.py-px) {
    padding-block: 1px;
  }
  :where(.pt-px) {
    padding-top: 1px;
  }
  :where(.pr-px) {
    padding-right: 1px;
  }
  :where(.pb-px) {
    padding-bottom: 1px;
  }
  :where(.pl-px) {
    padding-left: 1px;
  }
  :where(.ps-px) {
    padding-inline-start: 1px;
  }
  :where(.pe-px) {
    padding-inline-end: 1px;
  }
  :where(.m-px) {
    margin: 1px;
  }
  :where(.mx-px) {
    margin-inline: 1px;
  }
  :where(.my-px) {
    margin-block: 1px;
  }
  :where(.mt-px) {
    margin-top: 1px;
  }
  :where(.mr-px) {
    margin-right: 1px;
  }
  :where(.mb-px) {
    margin-bottom: 1px;
  }
  :where(.ml-px) {
    margin-left: 1px;
  }
  :where(.ms-px) {
    margin-inline-start: 1px;
  }
  :where(.me-px) {
    margin-inline-end: 1px;
  }
  :where(.m-auto) {
    margin: auto;
  }
  :where(.mx-auto) {
    margin-inline: auto;
  }
  :where(.my-auto) {
    margin-block: auto;
  }
  :where(.mt-auto) {
    margin-top: auto;
  }
  :where(.mr-auto) {
    margin-right: auto;
  }
  :where(.mb-auto) {
    margin-bottom: auto;
  }
  :where(.ml-auto) {
    margin-left: auto;
  }
  :where(.ms-auto) {
    margin-inline-start: auto;
  }
  :where(.me-auto) {
    margin-inline-end: auto;
  }
}

/* ── theme/utils/layout.css ── */
/* defuss-shadcn - optional native layout utilities.
 * .flex / .grid only select a formatting context: no default gap or tracks.
 * .stack / .center / .container / .query and .grid-cols-auto are extensions.
 * Params are instance-owned: nested primitives do not inherit outer configs.
 * Native hidden/closed states are not overridden by display helpers.
 */
@layer components, utilities;

@layer components {
  :where(.flex, .inline-flex, .grid, .inline-grid, .stack, .center) {
    --layout-gap: initial;
  }
  :where(.grid, .inline-grid) {
    --layout-min: 16rem;
  }
  :where(.stack) {
    gap: var(--layout-gap, calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1))));
    flex-direction: column;
  }
  :where(.flex, .inline-flex, .grid, .inline-grid, .center) {
    gap: var(--layout-gap, 0px);
  }
  :where(.container) {
    --layout-max: 80rem;
    --layout-gutter: calc(var(--size-base, var(--spacing, 0.25rem)) * 4 * max(0, var(--layout-density, 1)));
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: var(--layout-max);
    min-inline-size: 0;
    margin-inline: auto;
    padding-inline: var(--layout-gutter);
  }
  :where(.center) {
    place-items: center;
  }
  :where(.query) {
    container: layout / inline-size;
  }
}

@layer utilities {
  :where(
    .flex:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open)),
    .stack:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))
  ) {
    display: flex;
  }
  :where(.inline-flex:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))) {
    display: inline-flex;
  }
  :where(
    .grid:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open)),
    .center:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))
  ) {
    display: grid;
  }
  :where(.inline-grid:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))) {
    display: inline-grid;
  }
  :where(.block:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))) {
    display: block;
  }
  :where(.inline-block:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))) {
    display: inline-block;
  }
  :where(.inline:not([hidden]):not(dialog:not([open])):not([popover]:not(:popover-open))) {
    display: inline;
  }
  :where(.hidden) {
    display: none;
  }
  :where(.flex-row) {
    flex-direction: row;
  }
  :where(.flex-col) {
    flex-direction: column;
  }
  :where(.flex-wrap) {
    flex-wrap: wrap;
  }
  :where(.flex-nowrap) {
    flex-wrap: nowrap;
  }
  :where(.flex-1) {
    flex: 1 1 0%;
  }
  :where(.flex-auto) {
    flex: 1 1 auto;
  }
  :where(.flex-initial) {
    flex: 0 1 auto;
  }
  :where(.flex-none) {
    flex: none;
  }
  :where(.grow) {
    flex-grow: 1;
  }
  :where(.grow-0) {
    flex-grow: 0;
  }
  :where(.shrink) {
    flex-shrink: 1;
  }
  :where(.shrink-0) {
    flex-shrink: 0;
  }
  :where(.basis-0) {
    flex-basis: 0px;
  }
  :where(.basis-auto) {
    flex-basis: auto;
  }
  :where(.basis-full) {
    flex-basis: 100%;
  }
  :where(.items-start) {
    align-items: flex-start;
  }
  :where(.items-end) {
    align-items: flex-end;
  }
  :where(.items-center) {
    align-items: center;
  }
  :where(.items-baseline) {
    align-items: baseline;
  }
  :where(.items-stretch) {
    align-items: stretch;
  }
  :where(.justify-start) {
    justify-content: flex-start;
  }
  :where(.justify-end) {
    justify-content: flex-end;
  }
  :where(.justify-center) {
    justify-content: center;
  }
  :where(.justify-between) {
    justify-content: space-between;
  }
  :where(.justify-around) {
    justify-content: space-around;
  }
  :where(.justify-evenly) {
    justify-content: space-evenly;
  }
  :where(.justify-normal) {
    justify-content: normal;
  }
  :where(.self-auto) {
    align-self: auto;
  }
  :where(.self-start) {
    align-self: flex-start;
  }
  :where(.self-end) {
    align-self: flex-end;
  }
  :where(.self-center) {
    align-self: center;
  }
  :where(.self-baseline) {
    align-self: baseline;
  }
  :where(.self-stretch) {
    align-self: stretch;
  }
  :where(.content-start) {
    align-content: flex-start;
  }
  :where(.content-end) {
    align-content: flex-end;
  }
  :where(.content-center) {
    align-content: center;
  }
  :where(.content-between) {
    align-content: space-between;
  }
  :where(.content-around) {
    align-content: space-around;
  }
  :where(.content-evenly) {
    align-content: space-evenly;
  }
  :where(.content-stretch) {
    align-content: stretch;
  }
  :where(.content-normal) {
    align-content: normal;
  }
  :where(.justify-items-start) {
    justify-items: start;
  }
  :where(.justify-items-end) {
    justify-items: end;
  }
  :where(.justify-items-center) {
    justify-items: center;
  }
  :where(.justify-items-stretch) {
    justify-items: stretch;
  }
  :where(.justify-self-auto) {
    justify-self: auto;
  }
  :where(.justify-self-start) {
    justify-self: start;
  }
  :where(.justify-self-end) {
    justify-self: end;
  }
  :where(.justify-self-center) {
    justify-self: center;
  }
  :where(.justify-self-stretch) {
    justify-self: stretch;
  }
  :where(.place-items-start) {
    place-items: start;
  }
  :where(.place-items-end) {
    place-items: end;
  }
  :where(.place-items-center) {
    place-items: center;
  }
  :where(.place-items-stretch) {
    place-items: stretch;
  }
  :where(.place-items-baseline) {
    place-items: baseline;
  }
  :where(.place-self-auto) {
    place-self: auto;
  }
  :where(.place-self-start) {
    place-self: start;
  }
  :where(.place-self-end) {
    place-self: end;
  }
  :where(.place-self-center) {
    place-self: center;
  }
  :where(.place-self-stretch) {
    place-self: stretch;
  }

  /* Intrinsic and explicit tracks; no implicit breakpoint generator. */
  :where(.grid-cols-auto) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--layout-min, 16rem)), 1fr));
  }
  :where(.grid-cols-1) {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  :where(.col-span-1) {
    grid-column: span 1 / span 1;
  }
  :where(.grid-cols-2) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :where(.col-span-2) {
    grid-column: span 2 / span 2;
  }
  :where(.grid-cols-3) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :where(.col-span-3) {
    grid-column: span 3 / span 3;
  }
  :where(.grid-cols-4) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  :where(.col-span-4) {
    grid-column: span 4 / span 4;
  }
  :where(.grid-cols-5) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  :where(.col-span-5) {
    grid-column: span 5 / span 5;
  }
  :where(.grid-cols-6) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  :where(.col-span-6) {
    grid-column: span 6 / span 6;
  }
  :where(.grid-cols-7) {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  :where(.col-span-7) {
    grid-column: span 7 / span 7;
  }
  :where(.grid-cols-8) {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  :where(.col-span-8) {
    grid-column: span 8 / span 8;
  }
  :where(.grid-cols-9) {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  :where(.col-span-9) {
    grid-column: span 9 / span 9;
  }
  :where(.grid-cols-10) {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  :where(.col-span-10) {
    grid-column: span 10 / span 10;
  }
  :where(.grid-cols-11) {
    grid-template-columns: repeat(11, minmax(0, 1fr));
  }
  :where(.col-span-11) {
    grid-column: span 11 / span 11;
  }
  :where(.grid-cols-12) {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  :where(.col-span-12) {
    grid-column: span 12 / span 12;
  }
  :where(.grid-rows-1) {
    grid-template-rows: repeat(1, minmax(0, 1fr));
  }
  :where(.row-span-1) {
    grid-row: span 1 / span 1;
  }
  :where(.grid-rows-2) {
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  :where(.row-span-2) {
    grid-row: span 2 / span 2;
  }
  :where(.grid-rows-3) {
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
  :where(.row-span-3) {
    grid-row: span 3 / span 3;
  }
  :where(.grid-rows-4) {
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }
  :where(.row-span-4) {
    grid-row: span 4 / span 4;
  }
  :where(.grid-rows-5) {
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }
  :where(.row-span-5) {
    grid-row: span 5 / span 5;
  }
  :where(.grid-rows-6) {
    grid-template-rows: repeat(6, minmax(0, 1fr));
  }
  :where(.row-span-6) {
    grid-row: span 6 / span 6;
  }
  :where(.col-span-full) {
    grid-column: 1 / -1;
  }
  :where(.row-span-full) {
    grid-row: 1 / -1;
  }
  :where(.grid-cols-none) {
    grid-template-columns: none;
  }
  :where(.grid-rows-none) {
    grid-template-rows: none;
  }
  :where(.grid-cols-subgrid) {
    grid-template-columns: subgrid;
  }
  :where(.grid-rows-subgrid) {
    grid-template-rows: subgrid;
  }
  :where(.auto-rows-auto) {
    grid-auto-rows: auto;
  }
  :where(.auto-cols-auto) {
    grid-auto-columns: auto;
  }

  /* Box clipping/scrolling and text-flow control - orthogonal to gap/track
     selection; the generic pairing for constrained containers (a scrollable
     table on a capped width needs both overflow-x-auto and nowrap cells). */
  :where(.overflow-x-auto) {
    overflow-x: auto;
  }
  :where(.overflow-y-auto) {
    overflow-y: auto;
  }
  :where(.overflow-auto) {
    overflow: auto;
  }
  :where(.overflow-hidden) {
    overflow: hidden;
  }
  :where(.overflow-visible) {
    overflow: visible;
  }
  :where(.overflow-clip) {
    overflow: clip;
  }
  :where(.overflow-x-hidden) {
    overflow-x: hidden;
  }
  :where(.overflow-y-hidden) {
    overflow-y: hidden;
  }
  /* Text-overflow applies to the block axis of an overflowing line box —
     pair with overflow-hidden (truncate bundles all three parts). */
  :where(.text-ellipsis) {
    text-overflow: ellipsis;
  }
  :where(.text-clip) {
    text-overflow: clip;
  }
  :where(.truncate) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Overflowing WORDS: break-word/anywhere split on demand, break-all splits
     per character, break-normal restores. `wrap-anywhere` also shrinks
     min-content - the flex min-w-0 companion that lets a long identifier wrap
     inside a shrinkable track. */
  :where(.break-normal) {
    overflow-wrap: normal;
    word-break: normal;
  }
  :where(.break-words) {
    overflow-wrap: break-word;
  }
  :where(.break-all) {
    word-break: break-all;
  }
  :where(.wrap-anywhere) {
    overflow-wrap: anywhere;
  }
  :where(.whitespace-nowrap) {
    white-space: nowrap;
  }
  :where(.whitespace-normal) {
    white-space: normal;
  }
  :where(.whitespace-pre-wrap) {
    white-space: pre-wrap;
  }
}

/* ── theme/utils/accessibility.css ── */
/* defuss-shadcn - optional accessibility utilities.
 * Text meant for assistive technology only (.sr-only) and its inverse
 * (.not-sr-only). The clip pattern keeps content in the AT tree while
 * removing it visually - display:none would hide it from screen readers too.
 * Focusable elements re-reveal via :focus / :focus-within so keyboard users
 * never lose the control entirely (the Tailwind idiom, kept intact).
 */
@layer components, utilities;

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

  /* Undo .sr-only back to ordinary flow content. */
  :where(.not-sr-only) {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }
}

/* ── components/alert-dialog/alert-dialog.css ── */
@layer components {
  dialog.alert-dialog {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--background);
    color: var(--foreground);
    padding: 0;
    max-width: 28rem;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow-lg);
    margin: auto;
    position: fixed;
    inset: 0;

    /* Entry/exit animation */
    opacity: 0;
    transform: translateY(-0.5rem) scale(0.98);
    transition:
      opacity 200ms ease,
      transform 200ms ease,
      display 200ms allow-discrete;

    &[open] {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    &::backdrop {
      background: oklch(0 0 0 / 0);
      backdrop-filter: blur(0px);
      transition:
        all 200ms ease,
        display 200ms allow-discrete;
    }

    &[open]::backdrop {
      background: oklch(0 0 0 / 0.45);
      backdrop-filter: blur(3px);
    }

    /* Block Escape key - user must choose an action */
    &::backdrop {
      pointer-events: auto;
    }
  }

  @starting-style {
    dialog.alert-dialog[open] {
      opacity: 0;
      transform: translateY(-0.5rem) scale(0.98);
    }
    dialog.alert-dialog[open]::backdrop {
      background: oklch(0 0 0 / 0);
      backdrop-filter: blur(0px);
    }
  }

  /* -- Scroll lock ------------------------------------------- */
  /* Page behind stays put while the alert is modal (see dialog.css):
     `:modal` + overflow:hidden freezes the viewport at its current offset. */
  html:has(dialog.alert-dialog:modal) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  .alert-dialog-content {
    padding: 1.5rem;
  }

  /* -- Density ------------------------------------------------
     data-density on the .alert-dialog root scales the content padding
     (0.75 / 1 / 1.25 of the 1.5rem default); comfortable matches the
     unsized default. */
  .alert-dialog:where([data-density="compact"]) .alert-dialog-content {
    padding: 1rem;
  }
  .alert-dialog:where([data-density="comfortable"]) .alert-dialog-content {
    padding: 1.5rem;
  }
  .alert-dialog:where([data-density="spacious"]) .alert-dialog-content {
    padding: 2rem;
  }

  .alert-dialog-header {
    margin-bottom: 1.25rem;
  }

  .alert-dialog-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
  }

  .alert-dialog-description {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
  }

  .alert-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend (and discrete display flips)
   firing so JS state machines that await them keep working. */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .alert-dialog,
    .alert-dialog *,
    .alert-dialog::before,
    .alert-dialog::after,
    .alert-dialog *::before,
    .alert-dialog *::after,
    .alert-dialog::backdrop,
    .alert-dialog-content,
    .alert-dialog-content *,
    .alert-dialog-content::before,
    .alert-dialog-content::after,
    .alert-dialog-content *::before,
    .alert-dialog-content *::after,
    .alert-dialog-content::backdrop,
    .alert-dialog-header,
    .alert-dialog-header *,
    .alert-dialog-header::before,
    .alert-dialog-header::after,
    .alert-dialog-header *::before,
    .alert-dialog-header *::after,
    .alert-dialog-header::backdrop,
    .alert-dialog-title,
    .alert-dialog-title *,
    .alert-dialog-title::before,
    .alert-dialog-title::after,
    .alert-dialog-title *::before,
    .alert-dialog-title *::after,
    .alert-dialog-title::backdrop,
    .alert-dialog-description,
    .alert-dialog-description *,
    .alert-dialog-description::before,
    .alert-dialog-description::after,
    .alert-dialog-description *::before,
    .alert-dialog-description *::after,
    .alert-dialog-description::backdrop,
    .alert-dialog-footer,
    .alert-dialog-footer *,
    .alert-dialog-footer::before,
    .alert-dialog-footer::after,
    .alert-dialog-footer *::before,
    .alert-dialog-footer *::after,
    .alert-dialog-footer::backdrop {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── components/avatar/avatar.css ── */
@layer components {
  .avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
    background-color: var(--muted);

    /* No overflow:hidden: the badge dot sits half outside the circle (like
       shadcn's -right-1 dot) and clipping cut it to a sliver. Circular
       rendering comes from border-radius: inherit on image/fallback instead. */

    &[data-size="xs"] {
      width: 1.5rem;
      height: 1.5rem;
      --_badge: 0.75rem;
      font-size: 0.5625rem;
    }

    &[data-size="sm"] {
      width: 2rem;
      height: 2rem;
      --_badge: 1rem;
      font-size: 0.6875rem;
    }

    &[data-size="md"] {
      width: 2.5rem;
      height: 2.5rem;
      --_badge: 1.25rem;
      font-size: 0.75rem;
    }

    &[data-size="lg"] {
      width: 3rem;
      height: 3rem;
      --_badge: 1.5rem;
      font-size: 0.875rem;
    }

    &[data-size="xl"] {
      width: 4rem;
      height: 4rem;
      --_badge: 1.75rem;
      font-size: 1rem;
    }

    /* -- Shape: the image and fallback inherit the radius, so one
       attribute reshapes the whole avatar (the badge is never clipped).
       For silhouettes (heart, squircle, hexagon…) put a shape-* class from
       theme/utils/shapes.css on the .avatar-image instead. */
    &[data-shape="rounded"] {
      border-radius: var(--radius-lg);
    }
    &[data-shape="square"] {
      border-radius: var(--radius-sm);
    }

    /* a loaded photo covers the box: no muted plate behind a shaped image */
    &:has(> .avatar-image:not([data-error])) {
      background-color: transparent;
    }

    /* -- Ring: a colored ring with a background-colored gap, following
       the avatar's shape */
    &[data-ring] {
      box-shadow:
        0 0 0 2px var(--background),
        0 0 0 4px var(--primary);
    }
    &[data-ring="secondary"] {
      box-shadow:
        0 0 0 2px var(--background),
        0 0 0 4px var(--muted-foreground);
    }
    &[data-ring="destructive"] {
      box-shadow:
        0 0 0 2px var(--background),
        0 0 0 4px var(--destructive);
    }
  }

  .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  .avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
    background-color: var(--muted);
    position: absolute;
    inset: 0;
    border-radius: inherit; /* .avatar no longer clips - the fallback must round itself */

    /* placeholder colors (letters on a solid plate) */
    &[data-variant="primary"] {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }
    &[data-variant="neutral"] {
      background-color: var(--foreground);
      color: var(--background);
    }
  }

  /* Hide fallback when image is loaded */
  .avatar:has(.avatar-image:not([data-error])) .avatar-fallback {
    display: none;
  }

  /* Status dot. data-variant picks the presence state; no variant = online
     (the historical green). Status colours are literals by design - the
     tweakcn token set has no success/warning pair (AGENTS.md token rule).
     Colour is never the only cue (WCAG 1.4.1): offline is a hollow ring,
     busy carries a bar, away clock hands - the four read apart in greyscale
     and in forced-colors mode. Every cue is PAINTED inside a full circle
     (no mask): the silhouette and its separating rim stay whole, so the dot
     always sits in front of the avatar. Size scales with the avatar
     (--_badge, set per data-size below); rim and cues scale with it.
     Name it with role="img" + aria-label. */
  .avatar-badge {
    --_rim: max(2px, calc(var(--_badge, 1.25rem) * 0.15));
    position: absolute;
    inset-inline-end: calc(var(--_rim) * -0.5);
    inset-block-end: calc(var(--_rim) * -0.5);
    z-index: 1;
    width: var(--_badge, 1.25rem);
    height: var(--_badge, 1.25rem);
    box-sizing: border-box;
    border-radius: 9999px;
    background-color: #16a34a;
    border: var(--_rim) solid var(--background);
    background-repeat: no-repeat;

    &[data-variant="online"] {
      background-color: #16a34a;
    }

    /* data-position: any of the four corners (default bottom-end); start /
       end are logical - in RTL, start is the right */
    &[data-position^="top"] {
      inset-block: calc(var(--_rim) * -0.5) auto;
    }
    &[data-position$="start"] {
      inset-inline: calc(var(--_rim) * -0.5) auto;
    }

    /* hollow ring: "not here" */
    &[data-variant="offline"] {
      background-color: var(--background);
      box-shadow: inset 0 0 0 max(2px, calc(var(--_badge, 1.25rem) * 0.14)) #9ca3af;
    }

    /* red with a bar: do not disturb */
    &[data-variant="busy"] {
      background-color: #dc2626;
      background-image: linear-gradient(#fff 0 0);
      background-size: 56% max(2px, calc(var(--_badge, 1.25rem) * 0.14));
      background-position: center;
    }

    /* amber with clock hands (12 → 3 o'clock): away / be right back */
    &[data-variant="away"] {
      background-color: #f59e0b;
      background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
      background-size:
        max(2px, calc(var(--_badge, 1.25rem) * 0.12)) 34%,
        30% max(2px, calc(var(--_badge, 1.25rem) * 0.12));
      /* hour hand: centred, from ~16% down to the centre; minute hand: from
         the centre to ~80% (percent positions: (box - layer) * p) */
      background-position:
        50% 24%,
        71% 50%;
    }
  }

  /* Avatar group - data-overlap="sm|lg" tightens / loosens the stack */
  .avatar-group {
    display: flex;
    align-items: center;

    & .avatar {
      border: 2px solid var(--background);
      margin-left: -0.5rem;

      &:first-child {
        margin-left: 0;
      }
    }
    &[data-overlap="sm"] :is(.avatar, .avatar-group-count):not(:first-child) {
      margin-left: -0.25rem;
    }
    &[data-overlap="lg"] :is(.avatar, .avatar-group-count):not(:first-child) {
      margin-left: -1rem;
    }
  }

  .avatar-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: var(--muted);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    border: 2px solid var(--background);
    margin-left: -0.5rem;
  }
}

/* Forced colors (Windows High Contrast) would repaint the status fills with
   the system Canvas colour and erase the dot. Presence colour carries meaning
   (like a chart series), so the badge keeps its own palette; the ring / bar /
   crescent shape cues stay as well. */
@media (forced-colors: active) {
  @layer components {
    .avatar-badge {
      forced-color-adjust: none;
    }
  }
}

/* ── components/badge/badge.css ── */
/* -- Badge component ------------------------------------------- */

@layer components {
  .badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.5rem;
    /* a pill never breaks its label or gets squeezed in a flex row (as in
       shadcn/ui) - a wrapped badge doubles its line-height into a lozenge */
    white-space: nowrap;
    flex-shrink: 0;

    /* -- Sizes: font, vertical padding and the line-height (which gives the
       pill its height) scale together. Default (no attribute) == md. */
    &[data-size="xs"] {
      font-size: 0.5625rem;
      padding: 0 0.375rem;
      line-height: 1.125rem;
    }
    &[data-size="sm"] {
      font-size: 0.625rem;
      padding: 0.0625rem 0.5rem;
      line-height: 1.25rem;
    }
    &[data-size="md"] {
      font-size: 0.6875rem;
      padding: 0.125rem 0.625rem;
      line-height: 1.5rem;
    }
    &[data-size="lg"] {
      font-size: 0.8125rem;
      padding: 0.1875rem 0.75rem;
      line-height: 1.75rem;
    }
    &[data-size="xl"] {
      font-size: 0.9375rem;
      padding: 0.25rem 0.875rem;
      line-height: 2rem;
    }

    &[data-variant="outline"] {
      border: 1px solid var(--border);
      color: var(--muted-foreground);
    }

    &[data-variant="secondary"] {
      background: var(--secondary);
      color: var(--secondary-foreground);
    }

    &[data-variant="default"] {
      background: var(--primary);
      color: var(--primary-foreground);
    }

    &[data-variant="destructive"] {
      background: var(--destructive);
      color: var(--destructive-foreground);
    }
  }
}

/* ── components/breadcrumb/breadcrumb.css ── */
@layer components {
  .breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
  }
  .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
  }
  .breadcrumb-link {
    color: var(--muted-foreground);
    text-decoration: none;
    border-radius: var(--radius-sm);
    outline: none;
    transition: color 150ms ease;
    &:hover {
      color: var(--foreground);
    }
    /* only a real link underlines - a .breadcrumb-link button (dropdown /
       ellipsis trigger) is not navigation and keeps the color-only hover */
    &:is(a[href]):hover {
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 3px;
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }
  }
  /* -- Sizes ------------------------------------------------------
     data-size on the .breadcrumb nav scales the trail's type and separators,
     mirroring the shared field/button ladder (md = 0.875rem = default). */
  .breadcrumb[data-size="xs"] .breadcrumb-list {
    font-size: 0.75rem;
  }
  .breadcrumb[data-size="xs"] .breadcrumb-separator svg {
    width: 0.75rem;
    height: 0.75rem;
  }
  .breadcrumb[data-size="sm"] .breadcrumb-list {
    font-size: 0.8125rem;
  }
  .breadcrumb[data-size="md"] .breadcrumb-list {
    font-size: 0.875rem;
  }
  .breadcrumb[data-size="lg"] .breadcrumb-list {
    font-size: 1rem;
  }
  .breadcrumb[data-size="lg"] .breadcrumb-separator svg {
    width: 1rem;
    height: 1rem;
  }
  .breadcrumb[data-size="xl"] .breadcrumb-list {
    font-size: 1.125rem;
  }
  .breadcrumb[data-size="xl"] .breadcrumb-separator svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  .breadcrumb-separator {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    /* flex (not inline): an inline <svg> sits on the text baseline, so icon
       separators render a few px above the labels' optical center */
    display: flex;
    align-items: center;
    & svg {
      width: 0.875rem;
      height: 0.875rem;
      flex-shrink: 0;
    }

    /* RTL: auto-flip chevron separators */
    [dir="rtl"] & svg {
      scale: -1 1;
    }
  }
  .breadcrumb-page {
    color: var(--foreground);
    font-weight: 400;
  }

  /* -- Icons / emoji in front of a crumb ---------------------------
     An <svg> or a <span class="breadcrumb-icon"> (emoji) before the label:
     link and page line them up on the label's center and size them to the
     text (1em - so data-size scales them too). */
  .breadcrumb-link,
  .breadcrumb-page {
    &:has(> :is(svg, .breadcrumb-icon)) {
      display: inline-flex;
      align-items: center;
      gap: 0.375em;
    }
    & > svg {
      width: 1em;
      height: 1em;
      flex-shrink: 0;
    }
  }
  .breadcrumb-icon {
    display: inline-grid;
    place-items: center;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    line-height: 1;
    font-style: normal;
  }
  .breadcrumb-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--muted-foreground);
    & span {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
    }
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-reduced-motion: reduce) {
    .breadcrumb-link {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    .breadcrumb-link {
      text-decoration: underline;
    }
    .breadcrumb-page {
      font-weight: 600;
    }
  }

  @media (forced-colors: active) {
    .breadcrumb-link {
      &:hover {
        forced-color-adjust: none;
        color: HighlightText;
        background: Highlight;
      }
    }
    .breadcrumb-page {
      color: CanvasText;
    }
    .breadcrumb-separator {
      color: GrayText;
    }
  }
}

/* ── components/button/button.css ── */
/* -- Button component ------------------------------------------ */

@layer components {
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 150ms ease;
    outline: none;
    flex-shrink: 0;
    height: 2.25rem;
    padding: 0 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);

    & svg {
      pointer-events: none;
      flex-shrink: 0;

      &:not([class*="size-"]) {
        width: 1rem;
        height: 1rem;
      }
    }

    /* a loading .spinner inside a button takes the button's own text color —
       spinner.css defaults it to --muted-foreground, invisible on a primary */
    & .spinner {
      color: inherit;
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    &:disabled,
    &[aria-disabled="true"] {
      pointer-events: none;
      opacity: 0.5;
    }

    /* Loading state (aria-busy + a .spinner child): a disabled button must
       freeze its spinner - "pending" is signaled by the dimming, a frozen
       wheel is the accepted pattern; only an ENABLED busy button spins. */
    &:disabled .spinner,
    &[aria-disabled="true"] .spinner {
      animation-play-state: paused;
    }

    /* -- Variants -------------------------------------------- */
    &[data-variant="default"] {
      background-color: var(--primary);
      color: var(--primary-foreground);

      &:hover {
        opacity: 0.9;
      }
    }

    &[data-variant="secondary"] {
      background-color: var(--secondary);
      color: var(--secondary-foreground);

      /* --secondary is near-white in light themes, so an opacity fade would
         wash the button further into the page background (invisible hover).
         Mixing in the foreground color instead darkens light themes and
         lightens dark ones - always moving away from the page surface. */
      &:hover {
        background-color: color-mix(in oklch, var(--secondary) 85%, var(--secondary-foreground));
      }
    }

    &[data-variant="outline"] {
      background-color: var(--background);
      color: var(--foreground);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-xs);

      &:hover {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }
    }

    &[data-variant="ghost"] {
      background-color: transparent;
      color: var(--foreground);
      border-color: transparent;

      &:hover {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }
    }

    &[data-variant="destructive"] {
      background-color: var(--destructive);
      color: var(--destructive-foreground);

      &:hover {
        opacity: 0.9;
      }
    }

    &[data-variant="link"] {
      background-color: transparent;
      color: var(--primary);
      height: auto;
      padding: 0;
      text-underline-offset: 4px;

      &:hover {
        text-decoration: underline;
      }
    }

    /* soft: a tint of the color, text in the color */
    &[data-variant="soft"] {
      background-color: color-mix(in oklch, var(--primary) 12%, transparent);
      color: color-mix(in oklch, var(--primary) 80%, var(--foreground));

      &:hover {
        background-color: color-mix(in oklch, var(--primary) 20%, transparent);
      }
    }

    /* dashed: a drop-zone / "add" look */
    &[data-variant="dashed"] {
      background-color: transparent;
      color: var(--foreground);
      border: 1px dashed color-mix(in oklch, var(--foreground) 35%, transparent);

      &:hover {
        background-color: var(--accent);
        color: var(--accent-foreground);
        border-style: solid;
      }
    }

    /* -- Tones: any variant in another color -------------------
       data-tone="success" / "warning" / "info" / "destructive" - or
       data-tone="custom" with style="--btn-color: …; --btn-color-fg: …"
       (the text on a solid fill, default white). Solid buttons fill with the
       tone; outline / ghost / soft / dashed / link write in it, mixed toward
       the foreground so a light tone (amber) stays readable. */
    &[data-tone] {
      --_tone: var(--btn-color, var(--primary));
      --_tone-fg: var(--btn-color-fg, #fff);
      --_tone-ink: color-mix(in oklch, var(--_tone) 78%, var(--foreground));
    }
    &[data-tone="success"] {
      --_tone: oklch(0.6 0.15 150);
    }
    &[data-tone="warning"] {
      --_tone: oklch(0.8 0.16 80);
      --_tone-fg: oklch(0.28 0.06 60);
    }
    &[data-tone="info"] {
      --_tone: oklch(0.6 0.16 250);
    }
    &[data-tone="destructive"] {
      --_tone: var(--destructive);
      --_tone-fg: var(--destructive-foreground, #fff);
    }

    &[data-tone]:is(:not([data-variant]), [data-variant="default"]) {
      background-color: var(--_tone);
      color: var(--_tone-fg);

      &:hover {
        opacity: 0.9;
      }
    }
    &[data-tone][data-variant="outline"] {
      background-color: transparent;
      color: var(--_tone-ink);
      border-color: var(--_tone);

      &:hover {
        background-color: color-mix(in oklch, var(--_tone) 12%, transparent);
        color: var(--_tone-ink);
      }
    }
    &[data-tone]:is([data-variant="ghost"], [data-variant="dashed"]) {
      color: var(--_tone-ink);

      &:hover {
        background-color: color-mix(in oklch, var(--_tone) 14%, transparent);
        color: var(--_tone-ink);
      }
    }
    &[data-tone][data-variant="dashed"] {
      border-color: var(--_tone);
    }
    &[data-tone][data-variant="soft"] {
      background-color: color-mix(in oklch, var(--_tone) 16%, transparent);
      color: var(--_tone-ink);

      &:hover {
        background-color: color-mix(in oklch, var(--_tone) 26%, transparent);
      }
    }
    &[data-tone][data-variant="link"] {
      color: var(--_tone-ink);
    }

    /* -- RTL: arrows and other directional icons mirror ----------
       mark them data-rtl-flip; symmetric icons stay as they are */
    &:dir(rtl) [data-rtl-flip] {
      scale: -1 1;
    }

    /* -- Sizes ----------------------------------------------- */
    &[data-size="xs"] {
      height: 1.75rem;
      padding: 0 0.5rem;
      font-size: 0.75rem;
      border-radius: var(--radius-sm);
    }
    &[data-size="sm"] {
      height: 2rem;
      padding: 0 0.75rem;
      font-size: 0.8125rem;
    }
    &[data-size="md"] {
      height: 2.25rem;
      padding: 0 1rem;
      font-size: 0.875rem;
    }
    &[data-size="lg"] {
      height: 2.75rem;
      padding: 0 2rem;
      font-size: 1rem;
    }
    &[data-size="xl"] {
      height: 3.25rem;
      padding: 0 2.5rem;
      font-size: 1.125rem;
    }
    &[data-size="icon"] {
      height: 2.25rem;
      width: 2.25rem;
      padding: 0;
    }
    &[data-size="icon-xs"] {
      height: 1.75rem;
      width: 1.75rem;
      padding: 0;
      border-radius: var(--radius-sm);
    }
    &[data-size="icon-sm"] {
      height: 2rem;
      width: 2rem;
      padding: 0;
    }
    &[data-size="icon-lg"] {
      height: 2.75rem;
      width: 2.75rem;
      padding: 0;
    }
    &[data-size="icon-xl"] {
      height: 3.25rem;
      width: 3.25rem;
      padding: 0;
    }
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-reduced-motion: reduce) {
    .btn {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    .btn {
      border: 2px solid transparent;

      &[data-variant="default"],
      &[data-variant="secondary"],
      &[data-variant="destructive"] {
        border-color: currentColor;
      }

      &[data-variant="outline"],
      &[data-variant="ghost"] {
        border-color: var(--foreground);
      }
    }
  }

  @media (forced-colors: active) {
    .btn {
      border: 1px solid ButtonText;

      &:disabled,
      &[aria-disabled="true"] {
        border-color: GrayText;
        color: GrayText;
      }
    }
  }
}

/* ── components/chart/chart.css ── */
/* -- Chart component -----------------------------------------------------
   The sizing surface + editorial frame for the ECharts mount (chart.ts owns
   the runtime: theme adapter, resize, story). The mount itself is a plain
   block with three height presets via data-size; .chart-frame is the
   card-like bordered wrapper (title/dek/source chrome) for editorial
   data-storytelling. Tokens only (AGENTS.md token boundary rule). */

@layer components {
  .chart {
    width: 100%;
    /* a grid or flex item sizes no smaller than its content by default - the
       canvas drawn at the old width held a narrowing figure open, so the chart
       never saw its container shrink (the paper on a phone after a resize) */
    min-inline-size: 0;
    height: 20rem;

    &[data-size="sm"] {
      height: 14rem;
    }
    &[data-size="lg"] {
      height: 28rem;
    }

    /* ECharts animates internally (canvas/svg), but the mount itself never
       transitions - reduced motion is handled in the JS base option */
    @media (prefers-reduced-motion: reduce) {
      & * {
        transition: none !important;
      }
    }
  }

  /* the editorial frame: chart + headline + dek + source line, card-like */
  .chart-frame {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--card-foreground);
  }

  .chart-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: var(--tracking-normal);
    text-wrap: balance;
  }

  .chart-dek {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted-foreground);
    text-wrap: pretty;
  }

  .chart-source {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted-foreground);
  }

  /* a print lays the page out at the paper's width: the drawing still has its
     screen width until chart.js redraws it there, and must not widen the
     printed page meanwhile - Chromium would shrink the whole print to fit */
  @media print {
    .chart {
      overflow: clip;
    }
  }

  @media (prefers-contrast: more) {
    .chart-frame {
      border-width: 2px;
    }
    .chart-dek,
    .chart-source {
      color: var(--foreground);
    }
  }

  /* Windows High Contrast Mode: frame + chrome fall back to system colors */
  @media (forced-colors: active) {
    .chart-frame {
      border-color: CanvasText;
      background: Canvas;
      color: CanvasText;
    }
    .chart-title,
    .chart-dek,
    .chart-source {
      color: CanvasText;
    }
  }
}

/* ── components/checkbox/checkbox.css ── */
/* -- Checkbox component ----------------------------------------- */

@layer components {
  .checkbox {
    appearance: none;
    margin: 0; /* kill the UA's ~4px input margin - breaks flex/grid rhythm */
    width: 1.125rem;
    height: 1.125rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition:
      background-color 150ms,
      border-color 150ms;

    &:checked {
      background-color: var(--primary);
      border-color: var(--primary);

      &::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 45%;
        width: 6px;
        height: 10px;
        border: solid var(--primary-foreground);
        border-width: 0 2px 2px 0;
        transform: translate(-50%, -50%) rotate(45deg);
      }
    }

    /* Per spec, an indeterminate checkbox ALSO matches :checked - both
       ::after rules land on the element, so the dash must explicitly cancel
       the checkmark's border (else the rotated border renders on top of it). */
    &:indeterminate {
      background-color: var(--primary);
      border-color: var(--primary);

      &::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 10px;
        height: 2px;
        border: none;
        background: var(--primary-foreground);
        transform: translate(-50%, -50%);
      }
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    /* Disabled = legible but inert: never an opacity fade (0.5 on a light
       --border edge left a ghost you had to look for). The shape keeps its
       full-strength edge, the surface turns muted, a chosen state keeps a
       softened primary fill, and the label goes muted with the no-entry
       cursor - "a choice that exists but is unavailable right now". */
    &:disabled {
      background-color: var(--muted);
      /* a mid-grey edge: --border on the muted fill is too faint to read as a box */
      border-color: color-mix(in oklch, var(--muted-foreground) 50%, var(--background));
      cursor: not-allowed;

      &:is(:checked, :indeterminate) {
        background-color: color-mix(in oklch, var(--primary) 45%, var(--background));
        border-color: transparent;
      }
    }

    &:is([aria-invalid="true"], :user-invalid:not(form[data-validate="submit"]:not([data-submitted]) *)) {
      border-color: var(--destructive);
    }
  }

  /* -- Checkbox item layout --------------------------------- */
  .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    & > label {
      font-size: 0.875rem;
      cursor: pointer;
      /* leading-none (shadcn parity): a 1.6 line-box centers the LINE, not
         the glyphs - baseline then floats with the font's ascent, so text
         rides visibly off the box midline (worst with metric-heavy
         fallbacks). line-height:1 shrinks the box to the glyphs themselves. */
      line-height: 1;
    }
  }

  .checkbox-item-block {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;

    & > label {
      font-size: 0.875rem;
      cursor: pointer;
    }

    & > .checkbox {
      margin-top: 0.125rem;
    }
  }

  /* Gap hit area: inside an item layout the control's click target spans
     the gap to its label (a transparent ::before, part of the input's own
     hit box), so clicking the whitespace between control and text toggles
     too - the label's `for` covers the text itself. Inline-end only: the
     label always sits after the control (block layouts place it in the
     second grid column). */
  :is(.checkbox-item, .checkbox-item-block) > .checkbox::before {
    content: "";
    position: absolute;
    inset-block: -0.25rem;
    inset-inline: -0.25rem calc(-1 * 0.5rem);
  }

  /* Disabled auto-styling */
  .checkbox-item:has(.checkbox:disabled),
  .checkbox-item-block:has(.checkbox:disabled) {
    cursor: not-allowed;

    /* the text says "unavailable" too - and never offers the hand pointer
       for a click that cannot land */
    & label {
      color: var(--muted-foreground);
      cursor: not-allowed;
    }
  }

  /* -- Accessibility ---------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .checkbox {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    .checkbox {
      border-width: 2px;
    }

    .checkbox:disabled {
      border-color: var(--muted-foreground);
    }
  }

  @media (forced-colors: active) {
    .checkbox {
      appearance: auto;
    }
  }
}

/* ── components/combobox/combobox.css ── */
/* -- Combobox component ---------------------------------------- */

@layer components {
  .combobox {
    position: relative;

    /* -- Sizes: set data-size on the .combobox wrapper; the trigger (a
       .btn) and the popover's rows scale together. Heights/fonts mirror the
       field ladder the .input defines: the unsized trigger renders 2.5rem —
       the .input default - via the .combobox-trigger rule below, md = 2.25rem
       is the ladder's md, exactly like .input goes 2.5rem → 2.25rem at md. */
    &[data-size="xs"] {
      & .combobox-trigger {
        height: 1.75rem;
        padding: 0 0.5rem;
        font-size: 0.75rem;
      }
      & .combobox-item,
      & .combobox-group-label {
        font-size: 0.75rem;
        padding-block: 0.25rem;
      }
    }
    &[data-size="sm"] {
      & .combobox-trigger {
        height: 2rem;
        padding: 0 0.625rem;
        font-size: 0.8125rem;
      }
      & .combobox-item,
      & .combobox-group-label {
        font-size: 0.8125rem;
        padding-block: 0.3125rem;
      }
    }
    &[data-size="md"] {
      & .combobox-trigger {
        height: 2.25rem;
      }
    }
    &[data-size="lg"] {
      & .combobox-trigger {
        height: 2.75rem;
        padding: 0 1rem;
        font-size: 1rem;
      }
      & .combobox-item,
      & .combobox-group-label {
        font-size: 1rem;
        padding-block: 0.5rem;
      }
    }
    &[data-size="xl"] {
      & .combobox-trigger {
        height: 3.25rem;
        padding: 0 1.25rem;
        font-size: 1.125rem;
      }
      & .combobox-item,
      & .combobox-group-label {
        font-size: 1.125rem;
        padding-block: 0.625rem;
      }
    }
  }

  .combobox-trigger {
    width: 100%;
    justify-content: space-between;
    /* the field standard for the unsized default (see .input): the ladder's
       md step - identical to what a bare .btn renders, so no override is
       needed beyond pinning it explicitly against .btn base drift */
    height: 2.25rem;
  }

  .combobox-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: left;
    font-weight: 400;
  }

  .combobox-value[data-placeholder] {
    color: var(--muted-foreground);
  }

  .combobox-chevron {
    flex-shrink: 0;
    color: var(--muted-foreground);
    opacity: 0.5;
  }

  /* Clear button (injected by combobox.js after the trigger). Anchor-positioned
     over the trigger's chevron slot; anchored via the same per-instance anchor
     name the popover uses. `data-placeholder` presence is the single
     selection marker - the :has() rules below flip chevron and clear in sync,
     so no JS toggles visibility. */
  .combobox-clear {
    position: fixed;
    inset: auto;
    margin: 0;
    top: anchor(top);
    bottom: anchor(bottom);
    right: anchor(right);
    /* center the 20px box exactly over the 16px chevron (1rem trigger padding) */
    margin-inline-end: 0.875rem;
    width: 1.25rem;
    display: none;
    place-items: center;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;

    &:hover {
      color: var(--foreground);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 1px;
    }
  }

  .combobox:has(.combobox-value:not([data-placeholder])) {
    & .combobox-clear {
      display: grid;
    }
    & .combobox-chevron {
      display: none;
    }
  }

  /* -- Multi-select (data-multiple) --------------------------------
     Options show a checkbox (empty box → filled with a check), the chosen
     options sit as removable tags under the trigger. The check is ::after,
     painted in --primary-foreground over the ::before box, so it stays
     visible in light and dark (primary flips, its foreground flips with it). */
  .combobox[data-multiple] .combobox-item {
    padding-inline-start: 1.875rem;

    &::before {
      content: "";
      position: absolute;
      inset-inline-start: 0.5rem;
      top: 50%;
      width: 1rem;
      height: 1rem;
      transform: translateY(-50%);
      box-sizing: border-box;
      border: 1px solid var(--input);
      border-radius: calc(var(--radius-sm) * 0.75);
      background: var(--background);
      mask: none;
    }

    &[aria-selected="true"]::before {
      border-color: var(--primary);
      background-color: var(--primary);
      mask: none;
    }

    &[aria-selected="true"]::after {
      content: "";
      position: absolute;
      inset-inline-start: 0.625rem;
      top: 50%;
      width: 0.75rem;
      height: 0.75rem;
      transform: translateY(-50%);
      background-color: var(--primary-foreground);
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }
  }

  .combobox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;

    /* nothing chosen: no empty gap under the trigger */
    &:not(:has(.combobox-tag)) {
      display: none;
    }
  }

  .combobox-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.125rem 0.25rem 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
  }

  .combobox-tag-remove {
    display: inline-grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: none;
    border-radius: calc(var(--radius-sm) * 0.75);
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;

    &:hover {
      background-color: color-mix(in oklch, var(--foreground) 10%, transparent);
      color: var(--foreground);
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 1px;
    }
  }

  /* -- Tag input (data-tags) ----------------------------------------
     Tags INSIDE a field-like box, typed into directly: .combobox-field looks
     like .input (same border, radius, ring on focus-within), the tags and the
     text input wrap together, the input takes the remaining width. */
  .combobox-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    box-sizing: border-box;
    min-height: 2.25rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    box-shadow: var(--shadow-xs);
    cursor: text;
    transition:
      border-color 150ms,
      box-shadow 150ms;

    &:focus-within {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    /* the tag span dissolves into the field's wrap (tags + input flow together) */
    & > .combobox-tags {
      display: contents;
    }

    & .combobox-tag {
      line-height: 1.375rem;
    }
  }

  .combobox-field-input {
    flex: 1 1 6rem;
    min-width: 6rem;
    height: 1.625rem;
    padding: 0 0.25rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--foreground);
    font: inherit;
    font-size: 0.875rem;

    &::placeholder {
      color: var(--muted-foreground);
    }
  }

  /* "Create …" row: a plus instead of the checkbox */
  .combobox[data-multiple] .combobox-item.combobox-create {
    color: var(--muted-foreground);

    &::before {
      border: none;
      border-radius: 0;
      background-color: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    &[data-highlighted] {
      color: var(--accent-foreground);
    }
  }

  .combobox-content {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 0;
    background-color: var(--popover);
    color: var(--popover-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;

    /* -- Anchor positioning -- */
    top: anchor(bottom);
    left: anchor(left);
    width: anchor-size(width);
    margin-top: 4px;
    position-try-fallbacks: flip-block;

    /* -- Animation --------------------------------------------- */
    opacity: 0;
    transform: scale(0.96) translateY(-0.25rem);
    transition:
      opacity 150ms ease,
      transform 150ms ease,
      display 150ms allow-discrete;

    &:popover-open {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @starting-style {
    .combobox-content:popover-open {
      opacity: 0;
      transform: scale(0.96) translateY(-0.25rem);
    }
  }

  .combobox-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
  }

  .combobox-search-icon {
    flex-shrink: 0;
    color: var(--muted-foreground);
  }

  .combobox-search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    outline: none;

    &::placeholder {
      color: var(--muted-foreground);
    }
  }

  .combobox-listbox {
    max-height: 16rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.25rem;
  }

  .combobox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: calc(var(--radius) * 0.6);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: background 100ms;
    /* room for the selection check; the ::before is absolute (like
       .dropdown-check) so unselected rows never shift horizontally */
    padding-inline-start: 1.5rem;
    position: relative;

    &:hover,
    &[data-highlighted] {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }

    /* Mask (not background-image): a data: URI SVG resolves currentColor to
       BLACK when used as an image, making the check invisible in dark mode.
       Masking paints it with background-color: currentColor - the real text
       color, hover/foreground included. */
    &[aria-selected="true"]::before {
      content: "";
      position: absolute;
      inset-inline-start: 0.375rem;
      top: 50%;
      transform: translateY(-50%);
      width: 1rem;
      height: 1rem;
      background-color: currentColor;
      mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
      mask-size: contain;
      mask-repeat: no-repeat;
      flex-shrink: 0;
    }

    &[aria-disabled="true"] {
      pointer-events: none;
      opacity: 0.5;
    }

    /* Author `display: flex` overrides the UA's [hidden] { display: none }
       (author origin always wins), so filter()'s item.hidden = true left
       non-matching options rendered - and clickable - in the list. */
    &[hidden] {
      display: none;
    }
  }

  .combobox-empty {
    padding: 1.5rem 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }

  .combobox-group-label {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
  }

  .combobox-separator {
    height: 1px;
    background: var(--border);
    margin: 0.25rem -0.25rem;
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-reduced-motion: reduce) {
    .combobox-content {
      transition: none;
    }
    .combobox-item {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .combobox-content {
      border-color: ButtonText;
    }
    .combobox-item {
      &:hover,
      &[data-highlighted] {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
      }
    }
  }
}

/* ── components/command/command.css ── */
@layer components {
  dialog.command {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--popover);
    color: var(--popover-foreground);
    padding: 0;
    max-width: 32rem;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow-lg);
    margin: auto;
    position: fixed;
    inset: 0;
    top: 15%;
    bottom: auto;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.98);
    transition:
      opacity 150ms ease,
      transform 150ms ease,
      display 150ms allow-discrete;

    &[open] {
      opacity: 1;
      transform: scale(1);
    }
    &::backdrop {
      background: oklch(0 0 0 / 0);
      transition:
        all 150ms ease,
        display 150ms allow-discrete;
    }
    &[open]::backdrop {
      background: oklch(0 0 0 / 0.45);
    }
  }

  @starting-style {
    dialog.command[open] {
      opacity: 0;
      transform: scale(0.98);
    }
    dialog.command[open]::backdrop {
      background: oklch(0 0 0 / 0);
    }
  }

  /* -- Scroll lock ------------------------------------------- */
  /* Page behind stays put while the palette is modal (see dialog.css):
     `:modal` + overflow:hidden freezes the viewport at its current offset. */
  html:has(dialog.command:modal) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  .command-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    & svg {
      width: 1rem;
      height: 1rem;
      color: var(--muted-foreground);
      flex-shrink: 0;
    }
  }

  .command-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--foreground);
    outline: none;
    font-family: inherit;
    &::placeholder {
      color: var(--muted-foreground);
    }
  }

  .command-list {
    max-height: 18rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.25rem;
  }
  .command-group {
    padding: 0.25rem 0;
  }
  .command-group-heading {
    margin: 0;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
  }

  .command-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--foreground);
    font-size: 0.8125rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    outline: none;
    &:hover,
    &[data-highlighted] {
      background-color: var(--accent);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: -2px;
    }
    &[aria-disabled="true"] {
      pointer-events: none;
      opacity: 0.5;
    }
    & svg {
      width: 1rem;
      height: 1rem;
      color: var(--muted-foreground);
      flex-shrink: 0;
    }
    /* Same as combobox-item: `display: flex` beats the UA [hidden] rule, and
       command.ts filter() hides non-matches via the hidden attribute. */
    &[hidden] {
      display: none;
    }
  }

  .command-separator {
    height: 1px;
    background-color: var(--border);
    margin: 0.25rem -0.25rem;
  }
  .command-shortcut {
    margin-inline-start: auto;
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    font-family: var(--font-mono);
  }
  .command-empty {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-reduced-motion: reduce) {
    dialog.command {
      transition: none;
      opacity: 1;
      transform: none;
    }
    dialog.command::backdrop {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    dialog.command {
      border: 2px solid var(--border);
    }
    .command-item {
      &:hover,
      &[data-highlighted] {
        outline: 1px solid var(--foreground);
      }
    }
  }

  @media (forced-colors: active) {
    dialog.command {
      border: 2px solid CanvasText;
    }
    .command-item {
      &:hover,
      &[data-highlighted] {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
      }
    }
    .command-separator {
      background-color: CanvasText;
    }
  }
  /* -- Density ----------------------------------------------------
     data-density on the dialog.command root scales the rows of the palette.
     comfortable == the unsized default. (0,2,1) beats the base (0,1,0). */
  dialog.command:where([data-density="compact"]) {
    & .command-input-wrapper {
      padding: 0.5rem 0.75rem;
    }
    & .command-item {
      padding: 0.375rem 0.5rem;
    }
    & .command-group-heading {
      padding: 0.25rem 0.5rem;
    }
  }
  dialog.command:where([data-density="comfortable"]) {
    & .command-input-wrapper {
      padding: 0.75rem 1rem;
    }
    & .command-item {
      padding: 0.5rem 0.5rem;
    }
    & .command-group-heading {
      padding: 0.375rem 0.5rem;
    }
  }
  dialog.command:where([data-density="spacious"]) {
    & .command-input-wrapper {
      padding: 1rem 1.25rem;
    }
    & .command-item {
      padding: 0.625rem 0.5rem;
    }
    & .command-group-heading {
      padding: 0.5rem 0.5rem;
    }
  }
}

/* ── components/data-grid/data-grid.css ── */
/* -- Data Grid --------------------------------------------------- */
/* One scroll container holds a sticky head and the windowed body,   */
/* so the head and every row scroll sideways together and locked     */
/* columns stick with position: sticky - no JS scroll syncing.       */

@layer components {
  .data-grid {
    --data-grid-row-height: 36px;
    --data-grid-template: repeat(4, minmax(8rem, 1fr));
    /* data-select-model="checkbox": the column of checkboxes in front of the rows */
    --data-grid-check-width: 2.5rem;

    display: flex;
    flex-direction: column;
    min-height: 12rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--card-foreground);
    font-size: 0.875rem;
    overflow: hidden;

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }
  }

  /* the one scroll container: both axes */
  .data-grid-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    /* the windowing owns the scroll position: Firefox's scroll anchoring would follow
       the recycled rows, move scrollTop, re-render and move it again - a scroll
       that runs on by itself (big-data-firefox.e2e) */
    overflow-anchor: none;
    scrollbar-gutter: stable;
  }

  .data-grid-head {
    position: sticky;
    top: 0;
    z-index: 2;
    width: max-content;
    min-width: 100%;
    background: var(--muted);
    /* muted text on the muted head measured 4.34:1 in the default theme - a quarter of the foreground mixed in lifts
       it past AA (4.5:1) in light and dark, in any theme whose foreground reads on its muted surface */
    color: color-mix(in oklch, var(--muted-foreground) 75%, var(--foreground));
    border-bottom: 1px solid var(--border);
  }

  /* every row - head, filters, body - lays out the same tracks */
  .data-grid-row {
    display: grid;
    grid-template-columns: var(--data-grid-template);
    width: max-content;
    min-width: 100%;
  }

  /* a cell adds no width of its own: a row is as wide as the grid (or its fixed columns), and a 1fr column takes what
     is left in every row alike - sized by content, a long tree label widened its rows past the header (VERIFIED: the
     Knowledge Graph's hierarchy, label 205px against the header's 143px, its count cut at the panel edge) */
  .data-grid-row > * {
    contain: inline-size;
  }

  .data-grid-header,
  .data-grid-cell,
  .data-grid-filter-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    padding-inline: 0.75rem;
    background: inherit;

    &[data-locked] {
      position: sticky;
      z-index: 1;
    }

    &[data-align="end"] {
      justify-content: flex-end;
      font-variant-numeric: tabular-nums;
    }
  }

  /* the last locked column draws the edge the rest scrolls under */
  .data-grid[data-has-locked]
    :is(.data-grid-header, .data-grid-cell, .data-grid-filter-cell)[data-locked]:not(:has(~ [data-locked])) {
    /* a selected cell keeps its edges (--_ring) under the locked edge */
    box-shadow:
      var(--_ring, 0 0 #0000),
      1px 0 0 var(--border),
      6px 0 8px -6px color-mix(in oklch, var(--foreground) 25%, transparent);
  }

  .data-grid-header {
    position: relative;
    height: var(--data-grid-row-height);
    font-weight: 500;
    font-size: 0.8125rem;
    background: var(--muted);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    /* a long press lifts the column - no callout over it (iOS) */
    -webkit-touch-callout: none;
    white-space: nowrap;

    /* a hidden column: the attribute alone loses to display: flex */
    &[hidden] {
      display: none;
    }

    /* a finger rests on it: lifted, ready to move */
    &[data-pressed] {
      background: color-mix(in oklch, var(--accent) 70%, var(--muted));
      color: var(--foreground);
    }

    /* the column being moved follows the pointer above the others */
    &[data-dragging] {
      z-index: 3;
      border-radius: var(--radius-sm);
      outline: 1px solid var(--border);
      background: var(--popover);
      color: var(--foreground);
      box-shadow: var(--shadow-md);
      cursor: grabbing;
    }

    &[data-type="number"] {
      justify-content: flex-end;
    }

    &[data-sortable="false"] {
      cursor: default;
    }

    /* the sort direction - an arrow with a shaft, unlike the menu's chevron - and the priority of a multisort (1, 2, …) */
    &[aria-sort]::after {
      content: "";
      flex: none;
      width: 0.8125rem;
      height: 0.8125rem;
      background: var(--foreground);
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    &[aria-sort="ascending"]::after {
      mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M12 19V5'/%3E%3C/svg%3E");
    }

    &[data-sort-index]::before {
      content: attr(data-sort-index);
      order: 2;
      font-size: 0.6875rem;
      font-variant-numeric: tabular-nums;
      color: var(--foreground);
    }

    &[aria-sort] {
      color: var(--foreground);
    }

    &:hover {
      color: var(--foreground);
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: -2px;
    }
  }

  /* the column menu's arrow, at the end of every header; a locked column shows a pin in it */
  .data-grid-menu-button {
    order: 3;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 1.375rem;
    height: 1.375rem;
    margin-inline-start: auto;
    padding: 0 0.125rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;

    /* icons are masks over currentColor, so they follow the theme */
    &::before,
    &::after {
      content: "";
      flex: none;
      width: 0.875rem;
      height: 0.875rem;
      background: currentColor;
    }

    &::before {
      display: none;
      width: 0.75rem;
      height: 0.75rem;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v5'/%3E%3Cpath d='M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z'/%3E%3C/svg%3E")
        center / contain no-repeat;
      color: var(--primary);
    }

    &::after {
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    &:hover,
    &[aria-expanded="true"] {
      background: var(--accent);
      color: var(--accent-foreground);
    }
  }

  .data-grid-header[data-locked] .data-grid-menu-button::before {
    display: block;
  }

  /* right-aligned headers pack at the end: the arrow follows the label */
  .data-grid-header[data-type="number"] .data-grid-menu-button {
    margin-inline-start: 0;
  }

  /* the end edge resizes the column: a line shows where it is */
  .data-grid-resizer {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 1;
    width: 0.5rem;
    cursor: col-resize;
    touch-action: none;

    &::after {
      content: "";
      position: absolute;
      inset-block: 25%;
      inset-inline-end: 0;
      width: 1px;
      background: var(--border);
    }

    &:hover::after,
    &[data-active]::after {
      inset-block: 0;
      width: 2px;
      background: var(--ring);
    }
  }

  .data-grid[data-resizing] {
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
  }

  /* where a moved column lands */
  .data-grid-drop-marker {
    position: absolute;
    top: 0;
    z-index: 4;
    width: 2px;
    height: var(--data-grid-row-height);
    margin-inline-start: -1px;
    background: var(--primary);
    pointer-events: none;
  }

  /* a finger needs room: the arrow and the edge grow on coarse pointers */
  @media (pointer: coarse) {
    .data-grid-menu-button {
      min-width: 1.75rem;
      height: 1.75rem;
    }

    .data-grid-resizer {
      width: 1rem;
    }
  }

  /* -- the column menu: a popover anchored to the arrow it opened from */
  .data-grid-menu {
    position: fixed;
    inset: auto;
    top: anchor(bottom);
    right: anchor(right);
    margin: 0.25rem 0 0;
    /* no room below or at the end: above the arrow, or toward the other side */
    position-try-fallbacks:
      flip-block,
      flip-inline,
      flip-block flip-inline;
    min-width: 12rem;
    max-height: min(26rem, calc(100dvh - 1rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--popover);
    color: var(--popover-foreground);
    box-shadow: var(--shadow-md);
    font-size: 0.875rem;

    &:popover-open {
      display: flex;
      flex-direction: column;
    }
  }

  .data-grid-menu-group {
    display: flex;
    flex-direction: column;
  }

  .data-grid-menu-label {
    padding: 0.375rem 0.5rem 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .data-grid-menu-separator {
    flex: none;
    height: 1px;
    margin: 0.25rem -0.25rem;
    background: var(--border);
  }

  .data-grid-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    white-space: nowrap;
    cursor: pointer;

    /* the leading slot: an icon, or the checkbox */
    &::before {
      content: "";
      flex: none;
      width: 1rem;
      height: 1rem;
      background: currentColor;
    }

    &[data-action="asc"]::before {
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M12 19V5'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    &[data-action="desc"]::before {
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    &[data-action="reset"]::before {
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    /* the sort in force: a dot at the end */
    &[role="menuitemradio"][aria-checked="true"]::after {
      content: "";
      width: 0.375rem;
      height: 0.375rem;
      margin-inline-start: auto;
      border-radius: 50%;
      background: currentColor;
    }

    &[role="menuitemcheckbox"]::before {
      box-sizing: border-box;
      border: 1px solid var(--input);
      border-radius: calc(var(--radius-sm) - 2px);
      background: var(--background);
    }

    &[role="menuitemcheckbox"][aria-checked="true"]::before {
      border-color: var(--primary);
      background: var(--primary);
    }

    /* the tick, drawn over the box */
    &[role="menuitemcheckbox"][aria-checked="true"]::after {
      content: "";
      position: absolute;
      inset-inline-start: calc(0.5rem + 0.3125rem);
      top: 50%;
      width: 0.3125rem;
      height: 0.5625rem;
      border-inline-end: 2px solid var(--primary-foreground);
      border-bottom: 2px solid var(--primary-foreground);
      rotate: 45deg;
      translate: 0 -60%;
    }

    &:is(:hover, :focus-visible):not(:disabled) {
      outline: none;
      background: var(--accent);
      color: var(--accent-foreground);
    }

    &:disabled {
      opacity: 0.5;
      cursor: default;
    }
  }

  @media (pointer: coarse) {
    .data-grid-menu-item {
      min-height: 2.75rem;
    }
  }

  /* -- the filter row ------------------------------------------ */
  .data-grid-filters {
    border-top: 1px solid var(--border);
    background: var(--card);
  }

  .data-grid-filter-cell {
    height: calc(var(--data-grid-row-height) + 4px);
    padding-inline: 0.375rem;
    background: var(--card);
  }

  .data-grid-filter {
    width: 100%;
    min-width: 0;
    height: 1.75rem;
    padding-inline: 0.5rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--foreground);
    font: inherit;
    font-size: 0.8125rem;

    &::placeholder {
      color: var(--muted-foreground);
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: -1px;
      border-color: var(--ring);
    }
  }

  /* -- the windowed body ----------------------------------------- */
  .data-grid-body {
    position: relative;
    width: max-content;
    min-width: 100%;
    contain: layout paint;
  }

  .data-grid-rows {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: max-content;
    min-width: 100%;
    will-change: translate;
  }

  .data-grid-body .data-grid-row {
    height: var(--data-grid-row-height);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    cursor: default;

    &:hover {
      background: color-mix(in oklch, var(--accent) 60%, var(--card));
    }
  }

  .data-grid-cell {
    white-space: nowrap;

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: -2px;
    }
  }

  /* -- selection models -----------------------------------------------------------
     Hover is a soft neutral tint; a selected cell a mid tint of the primary colour with a strong 2px line along the
     edges of its region (data-edge: top bottom start end, written per cell) - the two never look alike. A grid that
     selects keeps the browser's text selection out of the body: a drag sweeps cells, Ctrl / Cmd + C copies them. */
  .data-grid[data-select] .data-grid-body {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;

    & :is(input, textarea, [contenteditable]) {
      user-select: text;
      -webkit-user-select: text;
    }
  }

  /* the cell and column models hover a cell or a column, never the row */
  .data-grid[data-select]:is([data-select-model~="cell"], [data-select-model="column"])
    .data-grid-body
    .data-grid-row:hover {
    background: var(--card);
  }
  .data-grid[data-select][data-select-model~="cell"] .data-grid-body {
    & .data-grid-cell {
      cursor: cell;
    }
    & .data-grid-cell:hover:not([data-selected]) {
      background: color-mix(in oklch, var(--accent) 60%, var(--card));
    }
  }

  .data-grid-body .data-grid-cell[data-hover]:not([data-selected]) {
    background: color-mix(in oklch, var(--accent) 60%, var(--card));
  }

  /* a selected cell (and a selected row's checkbox) under the pointer - the cell, its column, its row - is more
     selected, never the soft hover: a deeper tint, the same strong line */
  .data-grid-body :is(.data-grid-cell, .data-grid-check)[data-selected] {
    --_edge-top: 0px;
    --_edge-bottom: 0px;
    --_edge-start: 0px;
    --_edge-end: 0px;
    --_ring:
      inset 0 var(--_edge-top) 0 0 var(--primary), inset 0 calc(-1 * var(--_edge-bottom)) 0 0 var(--primary),
      inset var(--_edge-start) 0 0 0 var(--primary), inset calc(-1 * var(--_edge-end)) 0 0 0 var(--primary);
    /* the tint is the cells' own: a selected row's tint ends where its frame does */
    background: color-mix(in oklch, var(--primary) 20%, var(--card));
    box-shadow: var(--_ring);

    &:hover,
    &[data-hover] {
      background: color-mix(in oklch, var(--primary) 32%, var(--card));
    }
    &[data-edge~="top"] {
      --_edge-top: 2px;
    }
    &[data-edge~="bottom"] {
      --_edge-bottom: 2px;
    }
    &[data-edge~="start"] {
      --_edge-start: 2px;
    }
    &[data-edge~="end"] {
      --_edge-end: 2px;
    }
    /* start and end are logical; the shadows are physical */
    &:dir(rtl) {
      --_ring:
        inset 0 var(--_edge-top) 0 0 var(--primary), inset 0 calc(-1 * var(--_edge-bottom)) 0 0 var(--primary),
        inset calc(-1 * var(--_edge-start)) 0 0 0 var(--primary), inset var(--_edge-end) 0 0 0 var(--primary);
    }
  }

  /* the row models: the row under the pointer deepens its selected cells alike */
  .data-grid:not([data-select-model~="cell"], [data-select-model="column"])
    .data-grid-body
    .data-grid-row:hover
    > :is(.data-grid-cell, .data-grid-check)[data-selected] {
    background: color-mix(in oklch, var(--primary) 32%, var(--card));
  }

  /* the checkbox model: a checkbox in front of every row (sticky at the start, first whatever the column order - the
     element is its row's last), one in the head for every row of the query */
  .data-grid-check {
    order: -1;
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: inherit;
    cursor: pointer;
  }
  .data-grid-head > .data-grid-row:not(.data-grid-filters) > .data-grid-check {
    height: var(--data-grid-row-height);
    background: var(--muted);
  }
  .data-grid-filters .data-grid-check {
    cursor: default;
  }
  .data-grid[data-select="single"] .data-grid-head .data-grid-check .checkbox {
    visibility: hidden;
  }

  /* -- drag and drop: rows that drag (data-drag), where dropped records would land (data-drop) -- */
  .data-grid[data-drag] .data-grid-body .data-grid-row[draggable="true"] {
    cursor: grab;
  }
  .data-grid[data-dragging-rows] .data-grid-body .data-grid-row[aria-selected="true"] {
    opacity: 0.6;
  }
  .data-grid-row-drop {
    position: absolute;
    inset-inline: 0;
    z-index: 4;
    height: 2px;
    margin-top: -1px;
    background: var(--primary);
    pointer-events: none;

    /* into a row: it becomes its parent - framed */
    &[data-place="into"] {
      height: var(--data-grid-row-height);
      margin-top: 0;
      background: color-mix(in oklch, var(--primary) 12%, transparent);
      box-shadow: inset 0 0 0 2px var(--primary);
    }
  }

  /* the column models: a selected column's header */
  .data-grid-header[aria-selected="true"] {
    --_ring: inset 0 -2px 0 0 var(--primary);
    background: color-mix(in oklch, var(--primary) 20%, var(--muted));
    color: var(--foreground);
    box-shadow: var(--_ring);
  }

  .data-grid[data-sweeping] {
    cursor: cell;
  }

  /* the stand-in that carries a copy or a paste for a moment (Ctrl / Cmd + C, V) - never seen */
  .data-grid-clipboard {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    resize: none;
  }

  .data-grid-content {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* -- inline editing: an editable column's cell holds its editor ------------------
     The editor fills the cell (a row keeps its height); a refused value shows its message below the cell,
     over the next row. */
  .data-grid-cell[data-editing] {
    overflow: visible;
    padding-inline: 0.25rem;
    z-index: 2;
  }
  .data-grid-editor {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    overflow: visible;

    & > :is(.input, .select, .textarea) {
      flex: 1;
      min-width: 0;
      inline-size: 100%;
    }
    & > .textarea {
      position: absolute;
      inset-block-start: 0;
      inset-inline: 0;
      z-index: 3;
      min-block-size: 6rem;
      box-shadow: var(--shadow-md);
    }
  }
  .data-grid-color-input {
    inline-size: 2.5rem;
    block-size: calc(var(--data-grid-row-height) - 0.75rem);
    padding: 0;
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    background: var(--background);
    cursor: pointer;
  }
  .data-grid-error {
    position: absolute;
    inset-block-start: calc(100% + 0.25rem);
    inset-inline-start: 0;
    z-index: 4;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--destructive);
    color: var(--destructive-foreground);
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
  }
  /* an editable cell says so on hover: a double click edits it */
  .data-grid-row > .data-grid-cell[data-editable]:not([data-editing]):hover {
    box-shadow:
      var(--_ring, 0 0 #0000),
      inset 0 0 0 1px var(--input);
  }

  /* -- tree grid: the first column indents and carries the toggle --- */
  .data-grid-toggle {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-inline-start: calc(var(--depth, 0) * 1.25rem);
    border-radius: var(--radius-sm);
    color: var(--muted-foreground);
    cursor: pointer;

    &::before {
      content: "";
      width: 0.375rem;
      height: 0.375rem;
      border-inline-end: 1.5px solid currentColor;
      border-bottom: 1.5px solid currentColor;
      rotate: -45deg;
      transition: rotate 150ms ease;
    }

    &[data-leaf] {
      cursor: default;

      &::before {
        content: none;
      }
    }

    &:not([data-leaf]):hover {
      background: var(--accent);
      color: var(--accent-foreground);
    }
  }

  .data-grid-row[aria-expanded="true"] .data-grid-toggle::before {
    rotate: 45deg;
  }

  /* -- footer: counts + pager --------------------------------------- */
  .data-grid-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;

    &:empty {
      display: none;
    }
  }

  .data-grid-pager {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .data-grid-page-label {
    padding-inline: 0.5rem;
    color: var(--foreground);
  }

  .data-grid-page-btn {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;

    /* chevrons as masks over currentColor */
    &::before {
      content: "";
      width: 1rem;
      height: 1rem;
      background: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }

    &[data-page="first"]::before {
      mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m11 17-5-5 5-5'/%3E%3Cpath d='m18 17-5-5 5-5'/%3E%3C/svg%3E");
    }
    &[data-page="next"]::before {
      mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
    }
    &[data-page="last"]::before {
      mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 17 5-5-5-5'/%3E%3Cpath d='m13 17 5-5-5-5'/%3E%3C/svg%3E");
    }

    &:dir(rtl)::before {
      scale: -1 1;
    }

    &:hover:not(:disabled) {
      background: var(--accent);
      color: var(--accent-foreground);
    }

    &:disabled {
      opacity: 0.5;
      cursor: default;
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }
  }

  /* infinite: the next page is on its way */
  .data-grid[data-loading-more] .data-grid-status::after {
    content: " · loading more…";
  }

  /* -- loading and empty -------------------------------------------- */
  .data-grid[data-state="loading"],
  .data-grid[data-state="empty"] {
    & .data-grid-rows {
      display: none;
    }

    & .data-grid-body {
      height: auto !important; /* nothing to scroll in these states */
      min-height: calc(var(--data-grid-row-height) * 4);
    }
  }

  .data-grid[data-state="loading"] .data-grid-body {
    background: repeating-linear-gradient(
      to bottom,
      var(--muted) 0,
      var(--muted) calc(var(--data-grid-row-height) - 1px),
      transparent calc(var(--data-grid-row-height) - 1px),
      transparent var(--data-grid-row-height)
    );
    opacity: 0.6;
    animation: data-grid-pulse 1.6s ease-in-out infinite;
  }

  /* attr() reads the body's own attribute: init copies the grid's
     data-empty-text onto it */
  .data-grid[data-state="empty"] .data-grid-body::after {
    content: attr(data-empty-text);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted-foreground);
  }

  @keyframes data-grid-pulse {
    0%,
    100% {
      opacity: 0.6;
    }
    50% {
      opacity: 0.3;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  @layer components {
    .data-grid,
    .data-grid *,
    .data-grid *::before,
    .data-grid *::after,
    .data-grid[data-state="loading"] .data-grid-body {
      transition: none;
      animation: none;
      scroll-behavior: auto;
    }
  }
}

@media (prefers-contrast: more) {
  @layer components {
    .data-grid,
    .data-grid-head,
    .data-grid-body .data-grid-row,
    .data-grid-filter,
    .data-grid-page-btn,
    .data-grid-menu,
    .data-grid-menu-item[role="menuitemcheckbox"]::before {
      border-color: var(--muted-foreground);
    }

    .data-grid-resizer::after {
      background: var(--muted-foreground);
    }

    .data-grid-header,
    .data-grid-footer {
      color: var(--foreground);
    }

    .data-grid-body :is(.data-grid-cell, .data-grid-check)[data-selected] {
      background: color-mix(in oklch, var(--primary) 26%, var(--card));

      &:hover,
      &[data-hover] {
        background: color-mix(in oklch, var(--primary) 38%, var(--card));
      }
    }
  }
}

@media (forced-colors: active) {
  @layer components {
    .data-grid,
    .data-grid-head,
    .data-grid-body .data-grid-row,
    .data-grid-filter,
    .data-grid-page-btn {
      border-color: ButtonText;
    }

    .data-grid-body .data-grid-row[aria-selected="true"],
    .data-grid-body :is(.data-grid-cell, .data-grid-check)[data-selected],
    .data-grid-header[aria-selected="true"] {
      background: Highlight;
      color: HighlightText;
    }

    .data-grid-cell:focus-visible,
    .data-grid-header:focus-visible {
      outline-color: Highlight;
    }

    .data-grid-menu {
      border-color: CanvasText;
    }

    .data-grid-menu-item:is(:hover, :focus-visible):not(:disabled) {
      background: Highlight;
      color: HighlightText;
    }

    .data-grid-menu-item[role="menuitemcheckbox"]::before {
      border-color: ButtonText;
    }

    .data-grid-menu-item[role="menuitemcheckbox"][aria-checked="true"]::after {
      border-color: ButtonText;
    }

    .data-grid-drop-marker,
    .data-grid-row-drop,
    .data-grid-resizer::after {
      background: Highlight;
    }

    .data-grid-toggle::before {
      border-color: ButtonText;
    }

    .data-grid-header[aria-sort]::after {
      forced-color-adjust: none;
      background: ButtonText;
    }

    /* masked icons paint their background - keep it the text color */
    .data-grid-menu-button::before,
    .data-grid-menu-button::after,
    .data-grid-menu-item:not([role="menuitemcheckbox"])::before,
    .data-grid-page-btn::before {
      forced-color-adjust: none;
      background: ButtonText;
    }
  }
}

/* ── components/dialog/dialog.css ── */
/* -- Dialog component ------------------------------------------ */

@layer components {
  dialog.dialog {
    border: none;
    border-radius: var(--radius-xl);
    background-color: var(--popover);
    color: var(--popover-foreground);
    padding: 0;
    margin: auto;
    position: fixed;
    inset: 0;
    max-width: 28rem;
    width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    box-shadow:
      0 25px 80px oklch(0 0 0 / 0.25),
      0 0 0 1px var(--border);
    opacity: 0;
    transform: translateY(-0.5rem) scale(0.98);
    transition:
      opacity 200ms ease,
      transform 200ms ease,
      display 200ms allow-discrete;

    &[open] {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    /* -- Sizes ------------------------------------------------ */
    &[data-size="sm"] {
      max-width: 24rem;
    }
    &[data-size="md"] {
      max-width: 28rem;
    }
    &[data-size="lg"] {
      max-width: 32rem;
    }
    &[data-size="xl"] {
      max-width: 40rem;
    }
    &[data-size="full"] {
      max-width: calc(100vw - 2rem);
    }

    /* -- Backdrop --------------------------------------------- */
    &::backdrop {
      background: oklch(0 0 0 / 0);
      backdrop-filter: blur(0px);
      transition:
        all 200ms ease,
        display 200ms allow-discrete;
    }

    &[open]::backdrop {
      background: oklch(0 0 0 / 0.45);
      backdrop-filter: blur(3px);
    }
  }

  @starting-style {
    dialog.dialog[open] {
      opacity: 0;
      transform: translateY(-0.5rem) scale(0.98);
    }

    dialog.dialog[open]::backdrop {
      background: oklch(0 0 0 / 0);
      backdrop-filter: blur(0px);
    }
  }

  /* -- Scroll lock ------------------------------------------- */
  /* While the dialog is modal the page behind must stay put - closing
     returns you to exactly the scroll offset you had. `:modal` matches only
     while opened via showModal(); overflow:hidden freezes the viewport
     without losing the scroll position (no JS position:fixed hack), and
     scrollbar-gutter:stable keeps the scrollbar's space reserved so its
     removal can't shift the layout underneath. */
  html:has(dialog.dialog:modal) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  /* -- Density ------------------------------------------------
     data-density on the .dialog root scales the content padding
     (0.75 / 1 / 1.25 of the 1.5rem default); comfortable matches the
     unsized default. Width stays governed by data-size - two axes. */
  .dialog:where([data-density="compact"]) .dialog-content {
    padding: 1rem;
  }
  .dialog:where([data-density="comfortable"]) .dialog-content {
    padding: 1.5rem;
  }
  .dialog:where([data-density="spacious"]) .dialog-content {
    padding: 2rem;
  }

  /* -- Content sections ------------------------------------- */
  .dialog-content {
    padding: 1.5rem;
  }
  .dialog-header {
    margin-bottom: 1rem;
  }
  .dialog-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
    letter-spacing: -0.01em;
  }
  .dialog-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
    line-height: 1.6;
  }
  .dialog-body {
    margin-top: 1rem;
  }
  .dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }
}

/* Accessibility: reduced motion removes open/close transitions (REQUIRED
   for all components - AGENTS.md "Accessibility CSS"). */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    dialog.dialog,
    dialog.dialog::backdrop {
      transition: none;
    }
  }
}

/* ── components/dropdown/dropdown.css ── */
/* -- Dropdown component ---------------------------------------- */

@layer components {
  .dropdown-content {
    background-color: var(--popover);
    color: var(--popover-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    min-width: 8rem;
    box-shadow:
      0 4px 16px oklch(0 0 0 / 0.12),
      0 0 0 1px var(--border);

    /* -- Anchor positioning ------------------------------------ */
    position: fixed;
    inset: auto;
    top: anchor(bottom);
    left: anchor(left);
    margin: 0;
    margin-top: 4px;
    /* the preferred edge first; when the menu would leave the viewport it
       flips to the trigger's OTHER edge (flip-inline swaps left: anchor(left)
       <-> right: anchor(right)), above the trigger (flip-block), or both */
    position-try-fallbacks:
      flip-inline,
      flip-block,
      flip-block flip-inline;

    /* data-align="end": the menu's end edge lines up with the trigger's end
       (a split button's chevron, an icon trigger at a row's end) instead of
       hanging out past it - and falls back to start-aligned under the
       trigger when there is no room for that (the fallbacks above) */
    &[data-align="end"] {
      left: auto;
      right: anchor(right);
    }

    /* -- Animation --------------------------------------------- */
    opacity: 0;
    transform: scale(0.96) translateY(-0.25rem);
    /* overlay keeps a closing menu in the top layer until its exit
       animation ends - otherwise a closing SUBMENU drops back into its
       parent menu for 150ms, where the parent's transform makes it the
       containing block: the parent grew scrollbars and resized */
    transition:
      opacity 150ms ease,
      transform 150ms ease,
      overlay 150ms allow-discrete,
      display 150ms allow-discrete;
    /* a menu never scrolls sideways; submenus live in the top layer */
    overflow-x: hidden;

    &:popover-open {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @starting-style {
    .dropdown-content:popover-open {
      opacity: 0;
      transform: scale(0.96) translateY(-0.25rem);
    }
  }

  .dropdown-item {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.375rem 0.5rem;
    border-radius: calc(var(--radius) * 0.6);
    font-size: 0.875rem;
    border: none;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    outline: none;
    text-align: start;
    text-decoration: none;
    font: inherit;
    font-size: 0.875rem;

    &:hover,
    &[data-highlighted] {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }

    &[data-variant="destructive"] {
      &:hover,
      &[data-highlighted] {
        background-color: var(--destructive);
        color: var(--destructive-foreground);
      }
    }

    &:disabled,
    &[aria-disabled="true"] {
      pointer-events: none;
      opacity: 0.5;
    }

    /* data-inset: lines a plain item (or a label) up with the text of
       checkbox / radio items */
    &[data-inset] {
      padding-inline-start: 1.5rem;
    }
    & > svg {
      width: 1rem;
      height: 1rem;
      flex-shrink: 0;
      color: var(--muted-foreground);
    }
    &[data-variant="destructive"] > svg {
      color: currentColor;
    }
  }
  .dropdown-label[data-inset] {
    padding-inline-start: 1.5rem;
  }

  /* -- Submenus ----------------------------------------------------
     <div class="dropdown-sub">
       <button class="dropdown-item dropdown-sub-trigger" role="menuitem">…</button>
       <div class="dropdown-content dropdown-sub-content" role="menu" popover>…</div>
     </div>
     The submenu is a DOM descendant of its menu, so the Popover API keeps
     the parent open while it shows, closes open siblings and light-dismisses
     the whole tree - any depth. It opens beside its trigger (flipping to
     the other side, or up, when there is no room); dropdown.js anchors it. */
  .dropdown-sub {
    display: contents;
  }
  .dropdown-sub-trigger {
    &::after {
      content: "";
      width: 1rem;
      height: 1rem;
      margin-inline-start: auto;
      flex-shrink: 0;
      background-color: currentColor;
      opacity: 0.6;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")
        center / contain no-repeat;
    }
    &:dir(rtl)::after {
      scale: -1 1;
    }
    /* the shortcut sits before the chevron */
    & .dropdown-shortcut {
      margin-inline-start: auto;
    }
    &:has(.dropdown-shortcut)::after {
      margin-inline-start: 0.5rem;
    }
    &[aria-expanded="true"] {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }
  }
  .dropdown-content.dropdown-sub-content {
    top: anchor(top);
    left: anchor(right);
    margin: 0;
    margin-block-start: calc(-0.25rem - 1px);
    margin-inline-start: 0.125rem;
    position-try-fallbacks:
      flip-inline,
      flip-block,
      flip-block flip-inline;
    transform: scale(0.96) translateX(-0.25rem);

    &:popover-open {
      transform: none;
    }
    &:dir(rtl) {
      left: auto;
      right: anchor(left);
    }
  }
  @starting-style {
    .dropdown-content.dropdown-sub-content:popover-open {
      opacity: 0;
      transform: scale(0.96) translateX(-0.25rem);
    }
  }

  /* -- Checkbox / Radio indicators ----------------------------- */
  .dropdown-check,
  .dropdown-radio {
    padding-inline-start: 1.5rem;
    position: relative;

    &::before {
      content: "";
      position: absolute;
      inset-inline-start: 0.375rem;
      top: 50%;
      transform: translateY(-50%);
      width: 0.875rem;
      height: 0.875rem;
    }
  }

  /* Mask (not background-image): a data: URI SVG resolves currentColor to
     BLACK when used as an image, making the checks invisible in dark mode.
     Masking paints them with background-color: currentColor instead. */
  .dropdown-check[aria-checked="true"]::before,
  .dropdown-radio[aria-checked="true"]::before {
    background-color: currentColor;
  }

  .dropdown-check[aria-checked="true"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  }

  .dropdown-radio[aria-checked="true"]::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3C/svg%3E");
  }

  .dropdown-check[aria-checked="true"]::before,
  .dropdown-radio[aria-checked="true"]::before {
    mask-size: contain;
    mask-repeat: no-repeat;
  }

  .dropdown-separator {
    height: 1px;
    background: var(--border);
    margin: 0.25rem -0.25rem;
  }

  .dropdown-label {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
  }

  .dropdown-shortcut {
    margin-inline-start: auto;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    letter-spacing: 0.05em;
  }
  /* one highlighted item: a menu that opens under a resting pointer has the item under it hovered and its first item
     highlighted - the highlight (keys and mouse move it) wins, the hovered one stays plain until the pointer moves */
  .dropdown-content:has([data-highlighted]) .dropdown-item:hover:not([data-highlighted], :focus-visible, :disabled) {
    background-color: transparent;
    color: inherit;
  }
  /* on a destructive highlight the shortcut follows the item's foreground
     (muted grey on red was unreadable) */
  .dropdown-item[data-variant="destructive"]:is(:hover, [data-highlighted]) .dropdown-shortcut {
    color: inherit;
    opacity: 0.8;
  }

  /* -- Sizes ----------------------------------------------------
     data-size goes on the .dropdown-content popover; items, labels,
     shortcuts and the check indicators scale together. md == the unsized
     default. The [data-size] compound outranks the single-class item
     rules; it only touches block padding/font so the check/radio inline
     padding (padding-inline-start) keeps working. */
  .dropdown-content[data-size="xs"] {
    & .dropdown-item {
      padding-block: 0.1875rem;
      font-size: 0.75rem;
    }
    & .dropdown-label {
      padding-block: 0.1875rem;
      font-size: 0.6875rem;
    }
    & .dropdown-shortcut {
      font-size: 0.6875rem;
    }
    & :is(.dropdown-check, .dropdown-radio)::before {
      width: 0.75rem;
      height: 0.75rem;
    }
  }
  .dropdown-content[data-size="sm"] {
    & .dropdown-item {
      padding-block: 0.25rem;
      font-size: 0.8125rem;
    }
    & .dropdown-shortcut {
      font-size: 0.75rem;
    }
  }
  .dropdown-content[data-size="md"] {
    & .dropdown-item {
      padding-block: 0.375rem;
      font-size: 0.875rem;
    }
  }
  .dropdown-content[data-size="lg"] {
    & .dropdown-item {
      padding-block: 0.5rem;
      font-size: 1rem;
    }
    & .dropdown-label {
      font-size: 0.8125rem;
    }
    & .dropdown-shortcut {
      font-size: 0.875rem;
    }
  }
  .dropdown-content[data-size="xl"] {
    & .dropdown-item {
      padding-block: 0.625rem;
      font-size: 1.125rem;
    }
    & .dropdown-label {
      font-size: 0.875rem;
    }
    & .dropdown-shortcut {
      font-size: 1rem;
    }
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-reduced-motion: reduce) {
    .dropdown-content {
      transition: none;
    }
    .dropdown-item {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .dropdown-content {
      border-color: ButtonText;
    }
    .dropdown-item {
      &:hover,
      &[data-highlighted] {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
      }
    }
  }
}

/* ── components/icon/icon.css ── */
/* -- Icon component ---------------------------------------- */
/* Styling for Lucide CDN icons (<i data-lucide="name">).     */
/* Lucide replaces <i> with <svg>, these styles target that.  */

@layer components {
  [data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    width: 1rem;
    height: 1rem;
    pointer-events: none;

    /* -- Sizes via data-size --------------------------------- */
    &[data-size="xs"] {
      width: 0.75rem;
      height: 0.75rem;
    }
    &[data-size="sm"] {
      width: 0.875rem;
      height: 0.875rem;
    }
    &[data-size="md"] {
      width: 1.25rem;
      height: 1.25rem;
    }
    &[data-size="lg"] {
      width: 1.5rem;
      height: 1.5rem;
    }
    &[data-size="xl"] {
      width: 2rem;
      height: 2rem;
    }

    /* -- Spin animation ------------------------------------- */
    &[data-animate="spin"] {
      animation: icon-spin 1s linear infinite;
    }
  }

  @keyframes icon-spin {
    to {
      transform: rotate(360deg);
    }
  }

  /* ---- Accessibility ---------------------------------------- */

  @media (prefers-reduced-motion: reduce) {
    [data-lucide] {
      animation: none !important;
      transition: none !important;
    }
  }

  @media (prefers-contrast: more) {
    [data-lucide] {
      stroke-width: 2.5;
    }
  }

  @media (forced-colors: active) {
    [data-lucide] {
      color: CanvasText;
    }
  }
}

/* ── components/input/input.css ── */
/* -- Input component ------------------------------------------- */

@layer components {
  .input {
    /* border-box is load-bearing for the shared field ladder: the UA gives
       <input> content-box, so `height` would otherwise exclude the 2px frame
       and render 2px taller than the border-box fields (select, button-based
       triggers). With it, every declared height IS the rendered box.
       The unsized default IS the ladder's md step (2.25rem = 36px) - same
       height, padding and font as [data-size="md"] below, so an unlabeled
       field and an explicit md field are the same control. */
    box-sizing: border-box;
    height: 2.25rem;
    width: 100%;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    outline: none;
    box-shadow: var(--shadow-xs);
    transition:
      border-color 150ms,
      box-shadow 150ms;

    &:focus {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    &::placeholder {
      color: var(--muted-foreground);
    }

    /* -- Readonly state -------------------------------------- */
    /* :not(:disabled) is load-bearing: a disabled input ALSO matches
       :read-only, and this rule's specificity (class + pseudo + :not attr)
       outranks the plain :disabled below - without the exclusion, disabled
       controls would render with the readonly look (0.7/default). */
    &:read-only:not([type="file"], :disabled) {
      background: var(--muted);
      cursor: default;
      opacity: 0.7;

      &:focus {
        border-color: var(--input);
        box-shadow: var(--shadow-xs);
      }
    }

    /* Disabled = legible but inert: a muted surface and muted text inside
       the full-strength border - never an opacity fade that lets the box
       dissolve into the page. */
    &:disabled {
      background-color: var(--muted);
      color: var(--muted-foreground);
      box-shadow: none;
      cursor: not-allowed;
    }

    /* -- Invalid state --------------------------------------- */
    /* WHEN a field turns red: aria-invalid="true" always (the page decided).
       The browser's own verdict (:user-invalid, i.e. after the user left a
       changed field) only counts inside a <form> - a standalone text box has
       nothing to submit, so a half-typed value is never judged - and inside
       form[data-validate="submit"] only once the page has stamped
       data-submitted on the form (a submit attempt): check when the person
       is finished, not the instant they leave the box. */
    &:is([aria-invalid="true"], :user-invalid:is(form *):not(form[data-validate="submit"]:not([data-submitted]) *)) {
      border-color: var(--destructive);

      &:focus {
        border-color: var(--destructive);
        box-shadow: 0 0 0 2px oklch(from var(--destructive) l c h / 0.2);
      }
    }

    /* -- File input ------------------------------------------ */
    &[type="file"] {
      padding: 0;
      font-size: 0.875rem;

      &::file-selector-button {
        height: 100%;
        border: none;
        border-right: 1px solid var(--input);
        background: var(--muted);
        color: var(--foreground);
        font-size: 0.875rem;
        font-weight: 500;
        font-family: var(--font-sans);
        padding: 0 0.75rem;
        margin-right: 0.75rem;
        cursor: pointer;
        transition: background 150ms;

        &:hover {
          background: var(--accent);
        }
      }
    }

    /* -- Native in-field buttons ------------------------------
       The clear "×" of type="search" and the calendar/clock icon of the
       date/time types are clickable controls INSIDE the text field - without
       this they inherit the field's text cursor and look like more text to
       type into (the file picker's button above already points). */
    &::-webkit-search-cancel-button,
    &::-webkit-calendar-picker-indicator {
      cursor: pointer;
    }

    /* -- Sizes ----------------------------------------------- */
    &[data-size="xs"] {
      height: 1.75rem;
      padding: 0 0.5rem;
      font-size: 0.75rem;
    }
    &[data-size="sm"] {
      height: 2rem;
      padding: 0 0.625rem;
      font-size: 0.8125rem;
    }
    &[data-size="md"] {
      height: 2.25rem;
      padding: 0 0.75rem;
      font-size: 0.875rem;
    }
    &[data-size="lg"] {
      height: 2.75rem;
      padding: 0 1rem;
      font-size: 1rem;
    }
    &[data-size="xl"] {
      height: 3.25rem;
      padding: 0 1.25rem;
      font-size: 1.125rem;
    }
  }

  /* -- Input group: icons, text and buttons inside the field ---
     The GROUP draws the field frame (border, radius, shadow, focus ring,
     invalid / disabled / readonly surfaces); the .input inside goes
     frameless and fills the rest. DOM order is the placement: an addon
     before the .input sits at the start, one after it at the end - so a
     trailing copy / show-password / clear button is just markup after the
     input, and any addon width works without hand-tuned padding. */
  .input-group {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    height: 2.25rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    box-shadow: var(--shadow-xs);
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition:
      border-color 150ms,
      box-shadow 150ms;

    & > .input {
      flex: 1;
      min-width: 0;
      height: 100%;
      border: none;
      border-radius: inherit;
      background: transparent;
      box-shadow: none;
      font-size: inherit;

      &:focus {
        box-shadow: none;
      }
      &:not(:first-child) {
        padding-inline-start: 0.5rem;
      }
      &:not(:last-child) {
        padding-inline-end: 0.5rem;
      }
    }

    &:has(> .input:focus) {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    &:has(
      > .input:is(
        [aria-invalid="true"],
        :user-invalid:is(form *):not(form[data-validate="submit"]:not([data-submitted]) *)
      )
    ) {
      border-color: var(--destructive);

      &:has(> .input:focus) {
        box-shadow: 0 0 0 2px oklch(from var(--destructive) l c h / 0.2);
      }
    }

    /* readonly: the group carries the muted surface (the input's own
       readonly background would stop short of the addons) */
    &:has(> .input:read-only:not(:disabled)) {
      background: var(--muted);

      & > .input {
        background: transparent;
      }
      &:has(> .input:focus) {
        border-color: var(--input);
        box-shadow: var(--shadow-xs);
      }
    }

    &:has(> .input:disabled) {
      background: var(--muted);
      box-shadow: none;
      cursor: not-allowed;

      & > .input {
        background: transparent;
      }
    }

    /* decorative icon (inline <svg> or lucide <i>) */
    & > .input-group-icon {
      flex-shrink: 0;
      width: 1rem;
      height: 1rem;
      color: var(--muted-foreground);
      pointer-events: none;

      &:first-child {
        margin-inline-start: 0.75rem;
      }
      &:last-child {
        margin-inline-end: 0.75rem;
      }
    }

    /* static text: a unit, a protocol, a domain */
    & > .input-group-text {
      flex-shrink: 0;
      white-space: nowrap;
      color: var(--muted-foreground);
      user-select: none;

      &:first-child {
        margin-inline-start: 0.75rem;
      }
      &:last-child {
        margin-inline-end: 0.75rem;
      }
    }

    /* an in-field action: copy, show/hide, clear, open a picker */
    & > .input-group-button {
      flex-shrink: 0;
      display: inline-grid;
      place-items: center;
      box-sizing: border-box;
      height: calc(100% - 0.5rem);
      aspect-ratio: 1;
      padding: 0;
      border: none;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--muted-foreground);
      cursor: pointer;
      transition:
        background-color 150ms,
        color 150ms;

      & svg {
        width: 1rem;
        height: 1rem;
      }
      /* icon swaps (copy -> check, eye -> eye-off): the UA's [hidden] rule
         only covers HTML elements, so a hidden <svg> needs its own */
      & svg[hidden] {
        display: none;
      }
      &:hover {
        background: var(--accent);
        color: var(--accent-foreground);
      }
      &:focus-visible {
        outline: 2px solid var(--ring);
        outline-offset: 1px;
      }
      &:disabled {
        cursor: not-allowed;
        background: transparent;
        color: var(--muted-foreground);
      }
      &:first-child {
        margin-inline-start: 0.25rem;
      }
      &:last-child {
        margin-inline-end: 0.25rem;
      }
      & + .input-group-button {
        margin-inline-start: 0.125rem;
      }
    }

    /* -- Sizes: the same ladder as .input, set on the group ------ */
    &[data-size="xs"] {
      height: 1.75rem;
      font-size: 0.75rem;
    }
    &[data-size="sm"] {
      height: 2rem;
      font-size: 0.8125rem;
    }
    &[data-size="md"] {
      height: 2.25rem;
      font-size: 0.875rem;
    }
    &[data-size="lg"] {
      height: 2.75rem;
      font-size: 1rem;
    }
    &[data-size="xl"] {
      height: 3.25rem;
      font-size: 1.125rem;
    }
  }

  /* -- Auto-growing textarea --------------------------------- */
  textarea.input {
    field-sizing: content;
    min-height: 5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* -- Field description ------------------------------------- */
  .field-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin: 0.375rem 0 0;
  }

  /* -- Field error ------------------------------------------- */
  .field-error {
    font-size: 0.8125rem;
    color: var(--destructive);
    margin: 0.375rem 0 0;
  }

  /* -- Accessibility ---------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .input {
      transition: none;
    }

    .input[type="file"]::file-selector-button {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    .input {
      border-width: 2px;
    }

    .input:disabled {
      border-color: var(--muted-foreground);
    }
  }

  @media (forced-colors: active) {
    .input {
      border-color: ButtonBorder;
      color: ButtonText;
      background: Field;
    }

    .input:focus {
      outline: 2px solid Highlight;
      outline-offset: 1px;
    }

    .input:disabled {
      opacity: 1;
      color: GrayText;
      border-color: GrayText;
    }

    .input:is(
      [aria-invalid="true"],
      :user-invalid:is(form *):not(form[data-validate="submit"]:not([data-submitted]) *)
    ) {
      border-color: LinkText;
    }

    .field-error {
      color: LinkText;
    }

    .input-group {
      border-color: ButtonBorder;
      background: Field;

      & > .input:focus {
        outline: none;
      }
      &:has(> .input:focus) {
        outline: 2px solid Highlight;
        outline-offset: 1px;
      }
      &:has(> .input:disabled) {
        border-color: GrayText;
      }
      & > .input-group-button {
        color: ButtonText;
      }
    }
  }
}

/* ── components/kbd/kbd.css ── */
/* -- Kbd ---------------------------------------------------------- */
/* Keyboard keys. Built on the native <kbd> element; a combination is a  */
/* <kbd> holding one <kbd> per key, which is what the HTML spec          */
/* prescribes — so the markup already says "these keys together".        */

@layer components {
  .kbd {
    --kbd-size: 1.375rem;

    display: inline-grid;
    place-items: center;
    min-width: var(--kbd-size);
    height: var(--kbd-size);
    padding-inline: 0.375rem;
    border: 1px solid var(--border);
    /* the bottom edge is thicker, which is what reads as a physical key */
    border-bottom-width: 2px;
    border-radius: var(--radius-sm);
    background: var(--muted);
    color: var(--muted-foreground);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
    transition:
      translate 0.08s ease-out,
      border-bottom-width 0.08s ease-out,
      background-color 0.08s ease-out;

    &[data-size="sm"] {
      --kbd-size: 1.125rem;
      padding-inline: 0.25rem;
      font-size: 0.6875rem;
    }

    &[data-size="lg"] {
      --kbd-size: 1.75rem;
      padding-inline: 0.5rem;
      font-size: 0.875rem;
    }

    /* pressed: the key goes down - the heavy bottom edge collapses and the
       face drops by the same pixel, so the key's outer box never moves.
       A page sets data-pressed while its shortcut runs (the global-keys
       handler that performs it), so the key shows it was heard. */
    &[data-pressed] {
      translate: 0 1px;
      border-bottom-width: 1px;
      background: color-mix(in oklch, var(--muted) 80%, var(--foreground));
      color: var(--foreground);
    }
  }

  /* A key combination: an outer <kbd> holding one <kbd> per key. The outer
     element is not a key itself, so it keeps none of the key styling. */
  .kbd-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    vertical-align: middle;
    font-family: inherit;
    background: none;
    border: 0;
    padding: 0;
  }

  /* Optional "+" between keys. Absolutely placed in the gap so it never sits
     inside a key's box. */
  .kbd-group[data-separator] {
    gap: 0.875rem;

    & > .kbd + .kbd {
      position: relative;

      &::before {
        content: "+";
        position: absolute;
        inset-inline-start: -0.625rem;
        color: var(--muted-foreground);
        font-size: 0.6875rem;
        line-height: 1;
        pointer-events: none;
      }
    }
  }

  /* Inside a control - or on a tooltip's inverted surface - the key should
     not out-shout its label: it drops its own surface and borrows the
     text colour around it. */
  .btn .kbd,
  .command-item .kbd,
  .dropdown-item .kbd,
  .menubar-trigger .kbd,
  .tooltip .kbd {
    background: transparent;
    border-color: color-mix(in oklch, currentColor 25%, transparent);
    color: inherit;
    opacity: 0.75;

    &[data-pressed] {
      background: color-mix(in oklch, currentColor 18%, transparent);
      opacity: 1;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  @layer components {
    .kbd,
    .kbd *,
    .kbd::before,
    .kbd::after,
    .kbd *::before,
    .kbd *::after,
    .kbd-group,
    .kbd-group::before,
    .kbd-group::after {
      transition: none;
      animation: none;
    }
  }
}

@media (prefers-contrast: more) {
  @layer components {
    .kbd {
      border-color: var(--foreground);
      color: var(--foreground);
    }
  }
}

@media (forced-colors: active) {
  @layer components {
    .kbd {
      border-color: ButtonText;
      color: ButtonText;
      background: ButtonFace;
    }

    .kbd[data-pressed] {
      border-color: Highlight;
      color: HighlightText;
      background: Highlight;
    }

    .kbd-group[data-separator] > .kbd + .kbd::before {
      color: ButtonText;
    }
  }
}

/* ── components/label/label.css ── */
/* -- Label component -------------------------------------------- */

@layer components {
  .label {
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    line-height: 1;
    color: var(--foreground);
    display: block;
    margin-bottom: 0.375rem;
    cursor: default;

    /* Required - the adjacent control carries `required`: render the star.
       Pure CSS (no span to remember, nothing to desync); decorative only —
       the native attribute already conveys the requirement to AT. */
    &:has(+ input[required])::after,
    &:has(+ textarea[required])::after {
      content: " \00a0*";
      color: var(--destructive);
      font-weight: 600;
    }

    /* Disabled - explicit attribute */
    &[data-disabled] {
      opacity: 0.7;
      cursor: not-allowed;
    }

    /* Disabled - auto-detect via adjacent disabled control */
    &:has(+ :disabled),
    &:has(+ [data-disabled]) {
      opacity: 0.7;
      cursor: not-allowed;
    }
  }

  /* -- Hint text (optional, required indicators) ----------- */
  .label-hint {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
  }

  /* -- Accessibility ---------------------------------------- */
  @media (prefers-contrast: more) {
    .label[data-disabled],
    .label:has(+ :disabled),
    .label:has(+ [data-disabled]) {
      opacity: 0.85;
    }
  }

  @media (forced-colors: active) {
    .label {
      color: LinkText;
    }

    .label[data-disabled],
    .label:has(+ :disabled),
    .label:has(+ [data-disabled]) {
      opacity: 1;
      color: GrayText;
    }
  }
}

/* ── components/language-switcher/language-switcher.css ── */
/* -- Language Switcher component -------------------------------------
   The runtime writes a shipped Combobox (a Swap, or radio items for a
   Dropdown Menu) into the element; these
   rules size it to its content and draw the flags. A flag is the language's
   code (::before) under its SVG (::after): a flag that fails to load leaves
   the code readable. Shape, scale and finish are attributes on the root. */

@layer components {
  .language-switcher {
    --language-switcher-flag-height: 1rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;

    /* -- Flag scale ----------------------------------------------- */
    &[data-flag-size="xs"] {
      --language-switcher-flag-height: 0.75rem;
    }
    &[data-flag-size="sm"] {
      --language-switcher-flag-height: 0.875rem;
    }
    &[data-flag-size="lg"] {
      --language-switcher-flag-height: 1.25rem;
    }
    &[data-flag-size="xl"] {
      --language-switcher-flag-height: 1.75rem;
    }

    /* -- Flag shapes ---------------------------------------------- */
    &[data-flag-shape="rounded"] .language-switcher-flag {
      border-radius: calc(var(--language-switcher-flag-height) * 0.25);
    }
    &[data-flag-shape="square"] .language-switcher-flag {
      inline-size: var(--language-switcher-flag-height);
    }
    &[data-flag-shape="squircle"] .language-switcher-flag {
      inline-size: var(--language-switcher-flag-height);
      border-radius: 32%;
    }
    &[data-flag-shape="circle"] .language-switcher-flag {
      inline-size: var(--language-switcher-flag-height);
      border-radius: 50%;
    }

    /* -- Flag finishes -------------------------------------------- */
    &[data-flag-style="ring"] .language-switcher-flag {
      outline: 1px solid color-mix(in oklch, var(--foreground) 22%, transparent);
      outline-offset: -1px;
    }
    &[data-flag-style="shadow"] .language-switcher-flag {
      box-shadow:
        0 0 0 1px var(--border),
        var(--shadow-sm);
    }
    &[data-flag-style="glossy"] .language-switcher-flag {
      --language-switcher-gloss: linear-gradient(
        160deg,
        oklch(1 0 0 / 0.55),
        oklch(1 0 0 / 0) 42%,
        oklch(0 0 0 / 0) 58%,
        oklch(0 0 0 / 0.2)
      );
      outline: 1px solid oklch(0 0 0 / 0.12);
      outline-offset: -1px;
    }

    /* the code shown instead of a name (a condensed footer, a toolbar) */
    &[data-display="code"] .language-switcher-label {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      letter-spacing: 0.04em;
    }
  }

  .language-switcher-flag {
    position: relative;
    display: inline-block;
    flex: none;
    inline-size: calc(var(--language-switcher-flag-height) * 4 / 3);
    block-size: var(--language-switcher-flag-height);
    border-radius: 2px;
    overflow: hidden;
    background-color: var(--muted);
    transition: scale 150ms ease;

    &::before {
      content: attr(data-code);
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      font-family: var(--font-mono);
      font-size: calc(var(--language-switcher-flag-height) * 0.5);
      font-weight: 600;
      line-height: 1;
      color: var(--muted-foreground);
    }

    &::after {
      content: "";
      position: absolute;
      inset: 0;
      background-image: var(--language-switcher-gloss, none), var(--language-switcher-flag, none);
      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;
    }

    /* a flag in the dark is a little dimmer, so it does not glare beside the text */
    :where(.dark) &::after {
      filter: brightness(0.92) saturate(0.95);
    }
  }

  .language-switcher-icon {
    flex: none;
    width: 1rem;
    height: 1rem;
  }

  .language-switcher-label {
    white-space: nowrap;
  }

  /* -- The Combobox face ------------------------------------------ */
  .language-switcher-combobox {
    display: inline-block;

    & .combobox-trigger {
      width: auto;
      justify-content: flex-start;
      gap: 0.5rem;
    }

    & .combobox-value {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      flex: none;
      font-weight: 500;
    }

    /* a language is always chosen: no clear button, the chevron stays */
    & .combobox-clear {
      display: none !important;
    }
    &.combobox:has(.combobox-value) .combobox-trigger > .combobox-chevron {
      display: block;
    }

    & .combobox-content {
      width: max-content;
      min-width: max(anchor-size(width), 13rem);
      max-width: min(22rem, calc(100vw - 1rem));
      position-try-fallbacks:
        flip-inline,
        flip-block,
        flip-block flip-inline;
    }

    /* a short list needs no search box; it stays for the keys (arrows, Enter) */
    & .combobox-search[data-quiet] {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      border: 0;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }
  }

  /* the list opens toward the start edge where the switcher sits at the end (a header's right side) */
  .language-switcher[data-align="end"] .combobox-content {
    left: auto;
    right: anchor(right);
  }

  .language-switcher-option {
    gap: 0.625rem;

    &[data-highlighted] .language-switcher-flag,
    &:hover .language-switcher-flag {
      scale: 1.08;
    }
  }

  .language-switcher-name {
    white-space: nowrap;
  }

  .language-switcher-alt {
    margin-inline-start: auto;
    padding-inline-start: 1rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    white-space: nowrap;

    &[hidden] {
      display: none;
    }
    .language-switcher-option[data-highlighted] &,
    .language-switcher-option:hover & {
      color: inherit;
      opacity: 0.75;
    }
  }

  /* -- The Menu face: radio items in a Dropdown Menu ----------------- */
  .language-switcher[data-variant="menu"] {
    display: block;
  }
  .language-switcher-menu {
    display: contents;
  }
  .language-switcher-item {
    gap: 0.625rem;

    &[data-highlighted] .language-switcher-flag,
    &:hover .language-switcher-flag {
      scale: 1.08;
    }
    & .language-switcher-alt {
      color: var(--muted-foreground);
    }
  }

  /* -- The Swap face ---------------------------------------------- */
  .language-switcher-swap {
    & .swap-on,
    & .swap-off {
      gap: 0.375rem;
      padding-inline: 0.375rem;
    }
    & .language-switcher-label {
      font-weight: 500;
    }
  }

  /* -- Accessibility ---------------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .language-switcher-flag {
      transition: none;
    }
    :is(.language-switcher-option, .language-switcher-item) .language-switcher-flag {
      scale: none !important;
    }
  }

  @media (prefers-contrast: more) {
    .language-switcher-flag {
      outline: 1px solid var(--foreground);
      outline-offset: -1px;
    }
    .language-switcher-alt {
      color: var(--foreground);
    }
  }

  @media (forced-colors: active) {
    /* the flag keeps its own colors; a system-color frame marks its edge */
    .language-switcher-flag {
      forced-color-adjust: none;
      outline: 1px solid CanvasText;
      outline-offset: -1px;
    }
  }
}

/* ── components/number-input/number-input.css ── */
/* -- Number Input component ------------------------------------- */

@layer components {
  .number-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    /* explicit border-box: the size ladder below sets an explicit container
       height and must land on it exactly (a div is content-box by default;
       inputs get border-box from the UA). The unsized default keeps its
       auto height (children drive it), so this changes nothing today. */
    box-sizing: border-box;
    /* explicit default box height (the size ladder below does the rest): an
       auto-height box let the UA-padding children overshoot to 44px. The
       unsized default IS the ladder's md step - field standard, see .input */
    height: 2.25rem;

    & input {
      border: none;
      outline: none;
      background: transparent;
      height: 100%;
      /* 4rem basis, but GROWS when the container is widened (w-full demos,
         grid cells): a fixed width left dead space after the + button.
         width pins the intrinsic size too - Chrome otherwise derives a
         number input's width from the digit count of max (no max: ~170px,
         max="100": 34px), so the field width followed a validation attr. */
      flex: 1 1 4rem;
      width: 4rem;
      min-width: 0;
      text-align: center;
      font-size: 0.875rem;
      font-family: var(--font-sans);
      color: var(--foreground);
      -moz-appearance: textfield;

      &::-webkit-inner-spin-button,
      &::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }
    }

    & button {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      /* height:100% so the button can't overshoot the container's border-box
         height (the ladder below already sets children to 100%) */
      height: 100%;
      border: none;
      background: transparent;
      color: var(--muted-foreground);
      cursor: pointer;
      font-size: 1rem;
      font-family: var(--font-sans);
      transition:
        background 150ms,
        color 150ms;
      flex-shrink: 0;

      &:hover {
        background: var(--accent);
        color: var(--accent-foreground);
      }

      &:first-child {
        border-right: 1px solid var(--input);
      }

      &:last-child {
        border-left: 1px solid var(--input);
      }
    }

    /* -- Unit affix: <label class="number-input-unit" for="…"> -----
       A unit (°C, %, kg, €, h) sits before or after the input. It is a
       second <label> for the input: clicking it focuses the field and the
       unit joins the accessible name ("Temperature °C"). The value aligns
       TOWARD the unit so number + unit read as one ("19.0 °C", "€ 24.90"). */
    & .number-input-unit {
      display: flex;
      align-items: center;
      align-self: stretch;
      flex-shrink: 0;
      padding-inline: 0.25rem;
      color: var(--muted-foreground);
      font-size: 0.875rem;
      font-family: var(--font-sans);
      white-space: nowrap;
      cursor: text;

      /* edge of the box (no stepper on that side): field padding */
      &:first-child {
        padding-inline-start: 0.75rem;
      }
      &:last-child {
        padding-inline-end: 0.75rem;
      }
    }

    /* NOT user-select: none - the unit is part of the value when text is
       selected, copied or exported ("72,5 kg", not a bare "72,5") */

    &:has(input:not([type="hidden"]) + .number-input-unit) input {
      text-align: end;
    }
    &:has(.number-input-unit + input:not([type="hidden"])) input {
      text-align: start;
    }

    /* currency fields carry grouped amounts ("1.234.567,89") */
    &[data-currency] input {
      width: 8rem;
    }

    /* stepper-less field (currency, measurements): the input reaches the box
       edge - give it the regular field padding there */
    & input:first-child {
      padding-inline-start: 0.75rem;
    }
    & input:last-child {
      padding-inline-end: 0.75rem;
    }

    &:focus-within {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    /* -- Sizes -------------------------------------------------
       Container height + input/button/font scale together, matching the
       input/button ladders (md = 2.25rem; the unsized default stays at the
       historical 2.5rem, exactly like .input does). Children switch to
       height:100% so they can't fight the container. */
    &[data-size="xs"] {
      height: 1.75rem;
      & input {
        height: 100%;
        width: 3rem;
        font-size: 0.75rem;
      }
      & button {
        height: 100%;
        width: 1.5rem;
        font-size: 0.875rem;
      }
      & .number-input-unit {
        font-size: 0.75rem;
      }
    }
    &[data-size="sm"] {
      height: 2rem;
      & input {
        height: 100%;
        width: 3.5rem;
        font-size: 0.8125rem;
      }
      & button {
        height: 100%;
        width: 1.75rem;
        font-size: 0.9375rem;
      }
      & .number-input-unit {
        font-size: 0.8125rem;
      }
    }
    &[data-size="md"] {
      height: 2.25rem;
      & input {
        height: 100%;
        font-size: 0.875rem;
      }
      & button {
        height: 100%;
      }
    }
    &[data-size="lg"] {
      height: 2.75rem;
      & input {
        height: 100%;
        width: 4.5rem;
        font-size: 1rem;
      }
      & button {
        height: 100%;
        width: 2.25rem;
        font-size: 1.125rem;
      }
      & .number-input-unit {
        font-size: 1rem;
      }
    }
    &[data-size="xl"] {
      height: 3.25rem;
      & input {
        height: 100%;
        width: 5rem;
        font-size: 1.125rem;
      }
      & button {
        height: 100%;
        width: 2.5rem;
        font-size: 1.25rem;
      }
      & .number-input-unit {
        font-size: 1.125rem;
      }
    }
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend (and discrete display flips)
   firing so JS state machines that await them keep working. */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .number-input,
    .number-input *,
    .number-input::before,
    .number-input::after,
    .number-input *::before,
    .number-input *::after,
    .number-input::backdrop {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── components/popover/popover.css ── */
@layer components {
  .popover {
    position: fixed;
    inset: auto;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background-color: var(--popover);
    color: var(--popover-foreground);
    padding: 1rem;

    /* -- Density --------------------------------------------------
       data-density on the .popover root scales the content padding
       (0.75 / 1 / 1.25 of the 1rem default); comfortable matches the
       unsized default. */
    &[data-density="compact"] {
      padding: 0.75rem;
    }
    &[data-density="comfortable"] {
      padding: 1rem;
    }
    &[data-density="spacious"] {
      padding: 1.25rem;
    }
    box-shadow: var(--shadow-md);
    width: 20rem;
    opacity: 0;
    translate: 0 -4px;
    transition:
      opacity 150ms ease,
      translate 150ms ease,
      display 150ms allow-discrete;

    /* -- Default: bottom center -- */
    position-area: bottom;
    margin-top: 4px;
    position-try-fallbacks: flip-block;

    &:popover-open {
      opacity: 1;
      translate: 0 0;
    }

    /* ----- Side variants ----- */
    &[data-side="top"] {
      position-area: top;
      margin-top: 0;
      margin-bottom: 4px;
      translate: 0 4px;
      &:popover-open {
        translate: 0 0;
      }
    }

    &[data-side="left"] {
      position-area: left;
      margin-top: 0;
      margin-right: 4px;
      translate: 4px 0;
      position-try-fallbacks: flip-inline;
      &:popover-open {
        translate: 0 0;
      }
    }

    &[data-side="right"] {
      position-area: right;
      margin-top: 0;
      margin-left: 4px;
      translate: -4px 0;
      position-try-fallbacks: flip-inline;
      &:popover-open {
        translate: 0 0;
      }
    }

    /* ----- Align variants (combined with side) ----- */
    &[data-align="start"] {
      &:not([data-side="left"]):not([data-side="right"]) {
        position-area: bottom left;
      }
      &[data-side="top"] {
        position-area: top left;
      }
      &[data-side="left"] {
        position-area: left top;
      }
      &[data-side="right"] {
        position-area: right top;
      }
    }

    &[data-align="end"] {
      &:not([data-side="left"]):not([data-side="right"]) {
        position-area: bottom right;
      }
      &[data-side="top"] {
        position-area: top right;
      }
      &[data-side="left"] {
        position-area: left bottom;
      }
      &[data-side="right"] {
        position-area: right bottom;
      }
    }
  }

  @starting-style {
    .popover:popover-open {
      opacity: 0;
      translate: 0 -4px;
    }
    .popover[data-side="top"]:popover-open {
      opacity: 0;
      translate: 0 4px;
    }
    .popover[data-side="left"]:popover-open {
      opacity: 0;
      translate: 4px 0;
    }
    .popover[data-side="right"]:popover-open {
      opacity: 0;
      translate: -4px 0;
    }
  }

  .popover-header {
    margin-bottom: 0.75rem;
  }
  .popover-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
  }
  .popover-description {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
  }
  .popover-content {
    font-size: 0.875rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .popover {
      transition: none;
    }
  }
}

/* ── components/progress/progress.css ── */
/* -- Progress component --------------------------------------------- */

@layer components {
  /* The fill resolves once, here: data-tone (--_c) > the public
     --progress-color > --primary. Everything below paints from --_fill. */
  .progress {
    --_fill: var(--_c, var(--progress-color, var(--primary)));
    --_stripes: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 0.5rem;
    border: none;
    border-radius: 9999px;
    overflow: hidden;
    background-color: var(--secondary);
    accent-color: var(--_fill);
    vertical-align: middle;

    /* -- Sizes: bar thickness scale; default (no attribute) == md. */
    &[data-size="xs"] {
      height: 0.25rem;
    }
    &[data-size="sm"] {
      height: 0.375rem;
    }
    &[data-size="md"] {
      height: 0.5rem;
    }
    &[data-size="lg"] {
      height: 0.75rem;
    }
    &[data-size="xl"] {
      height: 1rem;
    }

    /* -- Tones: success / warning / info / destructive; any other color
       via style="--progress-color: …". auto follows the value: the
       runtime (progress.js) sets data-level low (< 34%) / mid / high. */
    &[data-tone="success"] {
      --_c: oklch(0.6 0.15 150);
    }
    &[data-tone="warning"] {
      --_c: oklch(0.75 0.16 70);
    }
    &[data-tone="info"] {
      --_c: oklch(0.6 0.16 250);
    }
    &[data-tone="destructive"] {
      --_c: var(--destructive);
    }
    &[data-tone="auto"] {
      &[data-level="low"] {
        --_c: var(--destructive);
      }
      &[data-level="mid"] {
        --_c: oklch(0.75 0.16 70);
      }
      &[data-level="high"] {
        --_c: oklch(0.6 0.15 150);
      }
    }

    /* -- Stripes: diagonal bands over the fill; "animated" moves them */
    &[data-striped] {
      --_stripes: repeating-linear-gradient(
        -45deg,
        color-mix(in oklch, white 22%, transparent) 0 0.375rem,
        transparent 0.375rem 0.75rem
      );
    }
  }

  /* WebKit (Chrome, Safari, Edge) */
  .progress::-webkit-progress-bar {
    background-color: var(--secondary);
    border-radius: 9999px;
  }
  .progress::-webkit-progress-value {
    background: var(--_stripes), var(--_fill);
    background-size:
      1.06rem 1.06rem,
      auto;
    border-radius: 9999px;
  }
  .progress[data-striped="animated"]::-webkit-progress-value {
    animation: progress-stripes 700ms linear infinite;
  }

  /* Firefox */
  .progress::-moz-progress-bar {
    background: var(--_stripes), var(--_fill);
    background-size:
      1.06rem 1.06rem,
      auto;
    border-radius: 9999px;
  }
  .progress[data-striped="animated"]::-moz-progress-bar {
    animation: progress-stripes 700ms linear infinite;
  }

  @keyframes progress-stripes {
    to {
      background-position:
        1.06rem 0,
        0 0;
    }
  }

  /* Indeterminate state */
  .progress:indeterminate {
    background: linear-gradient(90deg, var(--secondary) 0%, var(--_fill) 50%, var(--secondary) 100%);
    background-size: 200% 100%;
    animation: progress-indeterminate 1.5s linear infinite;
  }
  .progress:indeterminate::-webkit-progress-bar {
    background-color: transparent;
  }
  .progress:indeterminate::-moz-progress-bar {
    background-color: transparent;
  }

  @keyframes progress-indeterminate {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }

  /* -- Field: a label + a live value readout with the bar ---------------
     <div class="progress-field">
       <div class="progress-header"><span class="progress-label">…</span>
         <output class="progress-value" for="bar-id"></output></div>
       <progress class="progress" id="bar-id" …></progress>
     </div>
     progress.js writes the value into every output (data-format: percent
     | fraction | value, or a data-template). */
  .progress-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
  }
  .progress-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
  }
  .progress-value {
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: var(--muted-foreground);
    white-space: nowrap;
  }
  .progress-hint {
    font-size: 0.75rem;
    color: var(--muted-foreground);
  }

  /* -- Label inside the bar: data-label="inside" on the field (bar + output
     only). The output spans the bar; its text reads in the foreground over
     the track and - through a copy clipped to the filled part (::after,
     data-text + --progress-pct set by progress.js) - in the fill's own
     foreground over the fill. */
  .progress-field[data-label="inside"] {
    display: grid;

    & > .progress {
      grid-area: 1 / 1;
      height: 1.25rem;
      &[data-size="lg"] {
        height: 1.5rem;
      }
      &[data-size="xl"] {
        height: 1.75rem;
      }
    }
    & > .progress-value {
      grid-area: 1 / 1;
      position: relative;
      display: grid;
      place-items: center;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--foreground);
      pointer-events: none;

      &::after {
        content: attr(data-text);
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        color: var(--primary-foreground);
        clip-path: inset(0 calc(100% - var(--progress-pct, 0%)) 0 0);
      }
    }
  }
  /* the tones are light fills: dark text reads better on them */
  .progress-field[data-label="inside"]:has(> .progress:is([data-tone="warning"], [data-tone="auto"][data-level="mid"]))
    > .progress-value::after {
    color: oklch(0.25 0.05 70);
  }
  .progress-field[data-label="inside"]:has(
      > .progress:is(
        [data-tone="success"],
        [data-tone="info"],
        [data-tone="destructive"],
        [data-tone="auto"]:not([data-level="mid"])
      )
    )
    > .progress-value::after {
    color: white;
  }
  .progress-field[data-label="inside"]:dir(rtl) > .progress-value::after {
    clip-path: inset(0 0 0 calc(100% - var(--progress-pct, 0%)));
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend firing. (progress.js also skips
   its value tween then - the bar jumps straight to the target.) */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .progress,
    .progress::-webkit-progress-value,
    .progress::-moz-progress-bar {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

@media (prefers-contrast: more) {
  @layer components {
    .progress {
      outline: 1px solid var(--foreground);
      outline-offset: 1px;
    }
    .progress-value {
      color: var(--foreground);
    }
  }
}

@media (forced-colors: active) {
  @layer components {
    .progress {
      forced-color-adjust: none;
      background: Canvas;
      outline: 1px solid CanvasText;
    }
    .progress::-webkit-progress-bar {
      background: Canvas;
    }
    .progress::-webkit-progress-value {
      background: Highlight;
    }
    .progress::-moz-progress-bar {
      background: Highlight;
    }
    .progress-field[data-label="inside"] > .progress-value {
      color: CanvasText;
    }
    .progress-field[data-label="inside"] > .progress-value::after {
      color: HighlightText;
    }
  }
}

/* ── components/radio/radio.css ── */
/* -- Radio Group component -------------------------------------- */

@layer components {
  .radio-group {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    & > legend {
      /* top + bottom breathing room: stacked groups (e.g. a density ladder
         demo) would otherwise jam each heading against the options above it */
      margin-top: 0.5rem;
      margin-bottom: 0.375rem;
    }

    /* Horizontal layout */
    &[data-orientation="horizontal"] {
      flex-direction: row;
      flex-wrap: wrap;
      gap: 1rem;
    }
  }

  .radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    & > label {
      font-size: 0.875rem;
      font-weight: 400;
      cursor: pointer;
    }
  }

  /* -- With-description layout -------------------------------- */
  .radio-item-block {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 0.5rem;

    & > .radio {
      grid-row: 1 / 3;
      margin-top: 0.125rem;
    }

    & > label {
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      line-height: 1.4;
    }

    & > .radio-description {
      grid-column: 2;
      font-size: 0.8125rem;
      color: var(--muted-foreground);
      line-height: 1.5;
    }
  }

  /* -- Density --------------------------------------------------
     data-density on the .radio-group root is a whitespace policy: the gap
     between options (and card padding) scale at the shared 0.75 / 1 / 1.25
     ratio; comfortable matches the unsized default. Radio size itself stays
     fixed - this is spacing, not zoom. */
  .radio-group:where([data-density="compact"]) {
    gap: 0.25rem;
    &[data-orientation="horizontal"] {
      gap: 0.75rem;
    }
    & .radio-card {
      padding: 0.75rem 1rem;
    }
  }
  .radio-group:where([data-density="comfortable"]) {
    gap: 0.5rem;
    &[data-orientation="horizontal"] {
      gap: 1rem;
    }
  }
  .radio-group:where([data-density="spacious"]) {
    gap: 0.75rem;
    &[data-orientation="horizontal"] {
      gap: 1.5rem;
    }
    & .radio-card {
      padding: 1.25rem 1.5rem;
    }
  }

  /* Gap hit area: inside an item layout the radio's click target spans the
     gap to its label (a transparent ::before, part of the input's own hit
     box), so clicking the whitespace between circle and text selects too -
     the label's `for` covers the text itself. Inline-end only: the label
     always sits after the radio (the block layout's second grid column). */
  :is(.radio-item, .radio-item-block) > .radio::before {
    content: "";
    position: absolute;
    inset-block: -0.25rem;
    inset-inline: -0.25rem -0.5rem;
  }

  /* -- Card variant ------------------------------------------- */
  .radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition:
      border-color 150ms,
      background 150ms;

    &:hover {
      background: var(--accent);
    }

    &:has(.radio:checked) {
      border-color: var(--primary);
    }

    &:has(.radio:focus-visible) {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    &:has(.radio:disabled) {
      cursor: not-allowed;
      background: var(--muted);

      &:hover {
        background: var(--muted);
      }
      & > label {
        color: var(--muted-foreground);
        cursor: not-allowed;
      }
    }

    & > .radio {
      position: absolute;
      top: 1rem;
      right: 1rem;
    }

    & > label {
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
    }

    & > .radio-description {
      font-size: 0.8125rem;
      color: var(--muted-foreground);
      line-height: 1.5;
    }
  }

  .radio {
    appearance: none;
    margin: 0; /* kill the UA's ~4px input margin - breaks flex/grid rhythm */
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--background);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color 150ms;

    &:checked {
      border-color: var(--primary);

      &::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
        background: var(--primary);
        transform: translate(-50%, -50%);
      }
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    /* Disabled = legible but inert: never an opacity fade (0.5 on a light
       --border edge left a ghost you had to look for). The shape keeps its
       full-strength edge, the surface turns muted, a chosen state keeps a
       softened primary fill, and the label goes muted with the no-entry
       cursor - "a choice that exists but is unavailable right now". */
    &:disabled {
      background: var(--muted);
      /* a mid-grey ring: --border on the muted fill is too faint to read as a shape */
      border-color: color-mix(in oklch, var(--muted-foreground) 50%, var(--background));
      cursor: not-allowed;

      &:checked {
        border-color: color-mix(in oklch, var(--primary) 45%, var(--background));

        &::after {
          background: color-mix(in oklch, var(--primary) 45%, var(--background));
        }
      }

      & + label {
        color: var(--muted-foreground);
        cursor: not-allowed;
      }
    }

    &[aria-invalid="true"] {
      border-color: var(--destructive);

      &:checked {
        border-color: var(--destructive);

        &::after {
          background: var(--destructive);
        }
      }
    }
  }

  /* Helper text for group-level descriptions */
  .radio-group-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin: -0.125rem 0 0.25rem;
  }

  /* -- Accessibility ------------------------------------------ */
  @media (prefers-reduced-motion: reduce) {
    .radio,
    .radio-card {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .radio {
      border-color: ButtonText;

      &:checked {
        border-color: Highlight;

        &::after {
          background: Highlight;
        }
      }

      &:disabled {
        border-color: GrayText;

        &:checked::after {
          background: GrayText;
        }
      }
    }

    .radio-card {
      border-color: ButtonText;

      &:has(.radio:checked) {
        border-color: Highlight;
      }
    }
  }
}

/* ── components/select/select.css ── */
/* -- Select component ------------------------------------------- */

@layer components {
  .select {
    appearance: none;
    /* the field standard: unsized = md step (see .input) */
    height: 2.25rem;
    width: 100%;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: 0 2rem 0 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    outline: none;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition:
      border-color 150ms,
      box-shadow 150ms;

    /* Custom chevron */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;

    /* Placeholder = the empty-value option. It stays selectable (no
       `disabled`) so it doubles as the clear/reset entry - choosing it
       again empties the box (issue #32). While it is the selection the
       closed control reads as a placeholder; a real value restores
       --foreground because the base rule's color wins over this one.
       option:checked matches the *selected* option in every engine. */
    &:has(> option[value=""]:checked) {
      color: var(--muted-foreground);
    }

    &:focus {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    /* Disabled = legible but inert: a muted surface and muted text inside
       the full-strength border - never an opacity fade that lets the box
       dissolve into the page. */
    &:disabled {
      background-color: var(--muted);
      color: var(--muted-foreground);
      box-shadow: none;
      cursor: not-allowed;
      opacity: 1; /* Chrome's UA sheet fades select:disabled to 0.7 on its own */
    }

    &:is([aria-invalid="true"], :user-invalid:not(form[data-validate="submit"]:not([data-submitted]) *)) {
      border-color: var(--destructive);

      &:focus {
        border-color: var(--destructive);
        box-shadow: 0 0 0 2px oklch(from var(--destructive) l c h / 0.2);
      }
    }

    /* -- Multiple (<select multiple>) ---------------------------
       The browser renders a list box instead of a dropdown: every option is
       visible (size="N" rows), Ctrl/⌘-click or Shift-click / Shift+arrows
       pick several, and the form submits every chosen value under the same
       name. No fixed height, no chevron; chosen options get a tinted row. */
    &[multiple] {
      height: auto;
      padding: 0.25rem;
      background-image: none;
      overflow-y: auto;

      & option {
        padding: 0.375rem 0.5rem;
        border-radius: calc(var(--radius-md) - 2px);
        color: var(--foreground);
      }

      & option:checked {
        /* a gradient beats the UA's opaque selection paint in every engine */
        background: linear-gradient(
          color-mix(in oklch, var(--primary) 14%, transparent),
          color-mix(in oklch, var(--primary) 14%, transparent)
        );
        font-weight: 500;
      }

      /* one unavailable choice in a usable list */
      & option:disabled {
        color: var(--muted-foreground);
        cursor: not-allowed;
      }

      & optgroup {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--muted-foreground);
      }
    }

    /* -- Sizes ----------------------------------------------- */
    &[data-size="xs"] {
      height: 1.75rem;
      padding-left: 0.5rem;
      font-size: 0.75rem;
    }
    &[data-size="sm"] {
      height: 2rem;
      padding-left: 0.625rem;
      font-size: 0.8125rem;
    }
    &[data-size="md"] {
      height: 2.25rem;
      padding-left: 0.75rem;
      font-size: 0.875rem;
    }
    &[data-size="lg"] {
      height: 2.75rem;
      padding-left: 1rem;
      font-size: 1rem;
    }
    &[data-size="xl"] {
      height: 3.25rem;
      padding-left: 1.25rem;
      font-size: 1.125rem;
    }

    &[multiple][data-size] {
      height: auto;
    }
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend (and discrete display flips)
   firing so JS state machines that await them keep working. */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .select,
    .select *,
    .select::before,
    .select::after,
    .select *::before,
    .select *::after,
    .select::backdrop {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── components/sheet/sheet.css ── */
/* -- Sheet component ------------------------------------------- */

@layer components {
  /* -- Base -------------------------------------------------- */
  dialog.sheet {
    border: none;
    border-radius: 0;
    background-color: var(--background);
    color: var(--foreground);
    padding: 0;
    margin: 0;
    max-width: none;
    max-height: none;
    opacity: 0;
    transition:
      opacity 300ms ease,
      transform 300ms ease,
      display 300ms allow-discrete;

    &[open] {
      opacity: 1;
    }

    /* -- Side: right (default) --------------------------------- */
    &,
    &[data-side="right"] {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: auto;
      width: 24rem;
      max-width: 100vw;
      max-height: 100vh;
      height: 100%;
      border-left: 1px solid var(--border);
      transform: translateX(100%);
    }

    &[open],
    &[data-side="right"][open] {
      transform: translateX(0);
    }

    /* -- Side: left -------------------------------------------- */
    &[data-side="left"] {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      right: auto;
      width: 24rem;
      max-width: 100vw;
      max-height: 100vh;
      height: 100%;
      border-left: none;
      border-right: 1px solid var(--border);
      transform: translateX(-100%);

      &[open] {
        transform: translateX(0);
      }
    }

    /* -- Side: top --------------------------------------------- */
    &[data-side="top"] {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: auto;
      width: 100%;
      max-width: 100vw;
      /* a sheet, not a page: the backdrop always shows (content scrolls
         inside the modal past this) */
      max-height: 85dvh;
      height: auto;
      border-left: none;
      border-bottom: 1px solid var(--border);
      transform: translateY(-100%);

      &[open] {
        transform: translateY(0);
      }
    }

    /* -- Side: bottom ------------------------------------------ */
    &[data-side="bottom"] {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      top: auto;
      width: 100%;
      max-width: 100vw;
      /* a sheet, not a page: the backdrop always shows (content scrolls
         inside the modal past this) */
      max-height: 85dvh;
      height: auto;
      border-left: none;
      border-top: 1px solid var(--border);
      transform: translateY(100%);

      &[open] {
        transform: translateY(0);
      }
    }

    /* -- Backdrop ---------------------------------------------- */
    &::backdrop {
      background: oklch(0 0 0 / 0);
      backdrop-filter: blur(0px);
      transition:
        all 300ms ease,
        display 300ms allow-discrete;
    }

    &[open]::backdrop {
      background: oklch(0 0 0 / 0.45);
      backdrop-filter: blur(3px);
    }
  }

  @starting-style {
    dialog.sheet[open],
    dialog.sheet[data-side="right"][open] {
      opacity: 0;
      transform: translateX(100%);
    }

    dialog.sheet[data-side="left"][open] {
      opacity: 0;
      transform: translateX(-100%);
    }

    dialog.sheet[data-side="top"][open] {
      opacity: 0;
      transform: translateY(-100%);
    }

    dialog.sheet[data-side="bottom"][open] {
      opacity: 0;
      transform: translateY(100%);
    }

    dialog.sheet[open]::backdrop {
      background: oklch(0 0 0 / 0);
      backdrop-filter: blur(0px);
    }
  }

  /* -- Scroll lock ------------------------------------------- */
  /* Page behind stays put while a sheet is modal (see dialog.css):
     `:modal` + overflow:hidden freezes the viewport at its current offset. */
  html:has(dialog.sheet:modal) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  /* -- Content sections -------------------------------------- */
  .sheet-content {
    padding: 1.5rem;
    position: relative;
  }

  /* -- Density ----------------------------------------------------
     data-density on the .sheet root scales the content padding
     (0.75 / 1 / 1.25 of the 1.5rem default); comfortable matches the
     unsized default. The sheet's slide-in width is layout, not whitespace —
     it stays put. */
  .sheet:where([data-density="compact"]) .sheet-content {
    padding: 1rem;
  }
  .sheet:where([data-density="comfortable"]) .sheet-content {
    padding: 1.5rem;
  }
  .sheet:where([data-density="spacious"]) .sheet-content {
    padding: 2rem;
  }

  /* Top/bottom sheets span the full viewport width - on wide screens the
     content would stretch unaligned, so keep a readable, centered column
     (the side sheets are already width-constrained at 24rem). */
  dialog.sheet[data-side="top"] .sheet-content,
  dialog.sheet[data-side="bottom"] .sheet-content {
    max-width: 48rem;
    box-sizing: border-box; /* the 1.5rem padding is part of the 48rem column */
    width: 100%;
    margin-inline: auto;
  }
  .sheet-header {
    margin-bottom: 1rem;
    padding-right: 2rem;
  }
  .sheet-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
    letter-spacing: -0.01em;
  }
  .sheet-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
    line-height: 1.6;
  }
  .sheet-body {
    margin-top: 1rem;
  }
  .sheet-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  /* -- Close button ------------------------------------------ */
  .sheet-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition:
      color 150ms,
      background-color 150ms;

    &:hover {
      color: var(--foreground);
      background-color: var(--accent);
    }
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend (and discrete display flips)
   firing so JS state machines that await them keep working. */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .sheet,
    .sheet *,
    .sheet::before,
    .sheet::after,
    .sheet *::before,
    .sheet *::after,
    .sheet::backdrop,
    .sheet-body,
    .sheet-body *,
    .sheet-body::before,
    .sheet-body::after,
    .sheet-body *::before,
    .sheet-body *::after,
    .sheet-body::backdrop,
    .sheet-close-x,
    .sheet-close-x *,
    .sheet-close-x::before,
    .sheet-close-x::after,
    .sheet-close-x *::before,
    .sheet-close-x *::after,
    .sheet-close-x::backdrop,
    .sheet-content,
    .sheet-content *,
    .sheet-content::before,
    .sheet-content::after,
    .sheet-content *::before,
    .sheet-content *::after,
    .sheet-content::backdrop,
    .sheet-description,
    .sheet-description *,
    .sheet-description::before,
    .sheet-description::after,
    .sheet-description *::before,
    .sheet-description *::after,
    .sheet-description::backdrop,
    .sheet-footer,
    .sheet-footer *,
    .sheet-footer::before,
    .sheet-footer::after,
    .sheet-footer *::before,
    .sheet-footer *::after,
    .sheet-footer::backdrop,
    .sheet-header,
    .sheet-header *,
    .sheet-header::before,
    .sheet-header::after,
    .sheet-header *::before,
    .sheet-header *::after,
    .sheet-header::backdrop,
    .sheet-title,
    .sheet-title *,
    .sheet-title::before,
    .sheet-title::after,
    .sheet-title *::before,
    .sheet-title *::after,
    .sheet-title::backdrop {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── components/sidebar/sidebar.css ── */
/* -- Sidebar component ------------------------------------------ */
/* Application sidebar with collapsible state, mobile sheet overlay, */
/* collapsible groups, submenus, and keyboard shortcut (Cmd+B).      */

@layer components {
  /* ── Shell layout ─────────────────────────────────────────── */
  .sidebar-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* ── Sidebar panel ────────────────────────────────────────── */
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width, 16rem);
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    background-color: var(--sidebar);
    border-right: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    transition: width 200ms ease;
    overflow: hidden;
    z-index: 30;

    /* Right side */
    &[data-side="right"] {
      border-right: none;
      border-left: 1px solid var(--sidebar-border);
      order: 1;
    }

    /* Collapsed - icon-only rail */
    &[data-state="collapsed"] {
      width: var(--sidebar-width-collapsed, 3.5rem);

      & .sidebar-link span:not(.sidebar-icon, .sidebar-dot),
      & .sidebar-section-title,
      & .sidebar-group-action,
      & .sidebar-badge,
      & .sidebar-footer,
      & .sidebar-logo-text {
        display: none;
      }

      & .sidebar-link {
        justify-content: center;
        padding: 0.5rem;
        gap: 0;
      }
      & .sidebar-header {
        justify-content: center;
        padding: 0.75rem 0.5rem;
      }
      & .sidebar-group > summary {
        justify-content: center;
      }
      & .sidebar-group > summary span:not(.sidebar-icon, .sidebar-dot) {
        display: none;
      }
      & .sidebar-group > summary > svg:last-child {
        display: none;
      }

      /* The nested-nav indent (0.75rem) would offset submenu icons from the
         rail column - drop it while collapsed. */
      & .sidebar-group > .sidebar-nav {
        padding-left: 0;
      }

      /* Submenu summary (e.g. Settings/cog) is NOT a .sidebar-link - it needs
         the same centering or its icon drifts off the icon column. Expanded
         submenu items have no icons, so the nav stays hidden while collapsed. */
      & .sidebar-submenu > summary {
        justify-content: center;
        padding: 0.5rem;
        gap: 0;
      }
      & .sidebar-submenu > summary span:not(.sidebar-icon, .sidebar-dot) {
        display: none;
      }
      & .sidebar-submenu > summary > svg:last-child {
        display: none;
      }
      & .sidebar-submenu > .sidebar-nav {
        display: none;
      }
    }

    /* Hidden on mobile by default - shown via dialog */
    @media (max-width: 767px) {
      display: none;
    }
  }

  /* ── Sidebar header ───────────────────────────────────────── */
  .sidebar-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
  }

  .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sidebar-foreground);
    text-decoration: none;
  }

  /* ── Sidebar content (scrollable area) ────────────────────── */
  .sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem;
    gap: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-border) transparent;
  }

  /* ── Sidebar nav ──────────────────────────────────────────── */
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
  }

  /* ── Nav links ────────────────────────────────────────────── */
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--sidebar-foreground);
    text-decoration: none;
    transition: background-color 150ms ease;
    position: relative;

    &:hover {
      background-color: var(--sidebar-accent);
      color: var(--sidebar-accent-foreground);
    }

    &[data-active="true"],
    &[aria-current="page"] {
      background-color: var(--sidebar-accent);
      color: var(--sidebar-accent-foreground);
      font-weight: 500;
    }

    &:focus-visible {
      outline: 2px solid var(--sidebar-ring);
      outline-offset: -2px;
    }

    & svg {
      width: 1rem;
      height: 1rem;
      flex-shrink: 0;
    }
  }

  /* ── Menu badge ───────────────────────────────────────────── */
  .sidebar-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    background-color: var(--sidebar-primary);
    color: var(--sidebar-primary-foreground);
    line-height: 1;
  }

  /* ── Leading icon / emoji ─────────────────────────────────── */
  /* <span class="sidebar-icon"> in front of a link, submenu or group label:
     holds an <svg> or an emoji in a fixed 1rem box, so labels line up and
     the collapsed rail keeps showing it. */
  .sidebar-icon {
    display: inline-grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    font-size: 0.9375rem;
    font-style: normal;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;

    & svg {
      width: 1rem;
      height: 1rem;
    }
  }
  .sidebar-group > summary .sidebar-icon {
    width: 0.875rem;
    height: 0.875rem;
    font-size: 0.8125rem;
  }
  .sidebar-group > summary .sidebar-icon svg {
    width: 0.875rem;
    height: 0.875rem;
  }

  /* ── Activity dot ─────────────────────────────────────────── */
  /* <span class="sidebar-dot"> at the end of a link / summary marks news or
     activity (name it: role="img" aria-label="New"). Colors via data-variant,
     a ping via data-animate="ping"; on the collapsed rail it sits on the
     icon's corner. */
  .sidebar-dot {
    --_c: var(--sidebar-primary);
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
    border-radius: 999px;
    background-color: var(--_c);

    &[data-variant="destructive"] {
      --_c: var(--destructive);
    }
    &[data-variant="success"] {
      --_c: oklch(0.65 0.17 150);
    }
    &[data-variant="warning"] {
      --_c: oklch(0.78 0.16 75);
    }
    &[data-variant="info"] {
      --_c: oklch(0.62 0.17 250);
    }

    &[data-animate="ping"]::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background-color: var(--_c);
      animation: sidebar-dot-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
    }
  }
  @keyframes sidebar-dot-ping {
    75%,
    100% {
      scale: 2.4;
      opacity: 0;
    }
  }
  /* dot + badge / dot + chevron share the pushed-right slot - a hidden dot (news this reader has seen) leaves
     the slot to the badge or the chevron */
  .sidebar-badge + .sidebar-dot,
  .sidebar-dot:not([hidden]) + .sidebar-badge,
  :is(.sidebar-group, .sidebar-submenu) > summary > .sidebar-dot:not([hidden]) ~ svg:last-child {
    margin-left: 0;
  }
  .app-sidebar[data-state="collapsed"] {
    & :is(.sidebar-group, .sidebar-submenu) > summary {
      position: relative;
    }
    & .sidebar-dot {
      position: absolute;
      top: 0.3125rem;
      right: 0.3125rem;
      margin: 0;
      width: 0.4375rem;
      height: 0.4375rem;
    }
  }

  /* ── Section title ────────────────────────────────────────── */
  .sidebar-section-title {
    padding: 0.75rem 0.75rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
  }

  /* ── Collapsible group (uses <details>) ────────────────────── */
  .sidebar-group {
    & > summary {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 0.75rem;
      font-size: 0.6875rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted-foreground);
      cursor: pointer;
      list-style: none;
      border-radius: var(--radius-md);
      transition: background-color 150ms ease;

      &:hover {
        background-color: var(--sidebar-accent);
      }
      &::-webkit-details-marker {
        display: none;
      }

      & > svg:last-child {
        width: 0.875rem;
        height: 0.875rem;
        margin-left: auto;
        transition: rotate 200ms ease;
      }
    }

    &[open] > summary > svg:last-child {
      rotate: 90deg;
    }
    & > .sidebar-nav {
      padding: 0.25rem 0 0.25rem 0.75rem;
    }
  }

  /* ── Submenu (nested <details>) ────────────────────────────── */
  .sidebar-submenu {
    & > summary {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 0.75rem;
      border-radius: var(--radius-md);
      font-size: 0.875rem;
      color: var(--sidebar-foreground);
      cursor: pointer;
      list-style: none;
      transition: background-color 150ms ease;

      /* leading icon matches .sidebar-link's 1rem - otherwise lucide's
         24px default renders the cog larger than the nav icons */
      & > svg:first-child {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
      }

      &:hover {
        background-color: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
      }
      &::-webkit-details-marker {
        display: none;
      }

      & > svg:last-child {
        width: 0.875rem;
        height: 0.875rem;
        margin-left: auto;
        transition: rotate 200ms ease;
      }
    }

    &[open] > summary > svg:last-child {
      rotate: 90deg;
    }

    & > .sidebar-nav {
      padding: 0.25rem 0 0.25rem 1.5rem;
      border-left: 1px solid var(--sidebar-border);
      margin-left: 0.75rem;
    }
  }

  /* ── Group action button ──────────────────────────────────── */
  .sidebar-group-action {
    margin-left: auto;
    padding: 0.125rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    border-radius: var(--radius-sm);

    &:hover {
      color: var(--sidebar-foreground);
      background-color: var(--sidebar-accent);
    }
    & svg {
      width: 0.875rem;
      height: 0.875rem;
    }
  }

  /* ── Sidebar footer ───────────────────────────────────────── */
  .sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--sidebar-border);
    font-size: 0.8125rem;
    color: var(--sidebar-foreground);
    flex-shrink: 0;
    & p {
      margin: 0;
    }
  }

  /* ── Sidebar trigger ──────────────────────────────────────── */
  .sidebar-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    border-radius: var(--radius-md);

    &:hover {
      background-color: var(--accent);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }
    & svg {
      width: 1rem;
      height: 1rem;
    }
  }

  /* ── Mobile sidebar (<dialog> sheet overlay) ──────────────── */
  .sidebar-mobile {
    border: none;
    padding: 0;
    margin: 0;
    position: fixed;
    inset: 0;
    width: var(--sidebar-width, 16rem);
    max-width: 80vw;
    height: 100%;
    background-color: var(--sidebar);
    color: var(--sidebar-foreground);
    z-index: 50;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    opacity: 0;
    translate: -100% 0;
    transition:
      opacity 200ms ease,
      translate 200ms ease,
      display 200ms allow-discrete;

    &[open] {
      opacity: 1;
      translate: 0 0;
    }

    &[data-side="right"] {
      right: 0;
      left: auto;
      translate: 100% 0;
      &[open] {
        translate: 0 0;
      }
    }

    &::backdrop {
      background: oklch(0 0 0 / 0.5);
      opacity: 0;
      transition:
        opacity 200ms ease,
        display 200ms allow-discrete;
    }

    &[open]::backdrop {
      opacity: 1;
    }

    & .sidebar-mobile-close {
      position: absolute;
      top: 0.75rem;
      right: 0.75rem;
      width: 1.5rem;
      height: 1.5rem;
      border: none;
      background: transparent;
      color: var(--sidebar-foreground);
      cursor: pointer;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;

      &:hover {
        background-color: var(--sidebar-accent);
      }
      & svg {
        width: 0.875rem;
        height: 0.875rem;
      }
    }

    @media (min-width: 768px) {
      display: none;
    }
  }

  @starting-style {
    .sidebar-mobile[open] {
      opacity: 0;
      translate: -100% 0;
    }
    .sidebar-mobile[open]::backdrop {
      opacity: 0;
    }
    .sidebar-mobile[data-side="right"][open] {
      opacity: 0;
      translate: 100% 0;
    }
  }

  /* ── Scroll lock ──────────────────────────────────────────── */
  /* Page behind stays put while the mobile sheet is modal (see dialog.css):
     `:modal` + overflow:hidden freezes the viewport at its current offset. */
  html:has(.sidebar-mobile:modal) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  /* ── Reduced motion ───────────────────────────────────────── */
  @media (prefers-reduced-motion: reduce) {
    .app-sidebar {
      transition: none;
    }
    .sidebar-link {
      transition: none;
    }
    .sidebar-group > summary > svg:last-child {
      transition: none;
    }
    .sidebar-submenu > summary > svg:last-child {
      transition: none;
    }
    .sidebar-dot[data-animate]::after {
      animation: none;
    }
    .sidebar-mobile {
      transition: none;
    }
    .sidebar-mobile::backdrop {
      transition: none;
    }
  }
  /* -- Density ----------------------------------------------------
     data-density on the .app-sidebar root scales link rows and the content
     frame. comfortable == the unsized default (0.5rem). Independent of the
     collapsed rail, whose compact paddings win by higher specificity. */
  .app-sidebar:where([data-density="compact"]) {
    & .sidebar-link {
      padding-block: 0.375rem;
    }
    & .sidebar-content {
      padding: 0.375rem;
      gap: 0.375rem;
    }
  }
  .app-sidebar:where([data-density="comfortable"]) {
    & .sidebar-link {
      padding-block: 0.5rem;
    }
    & .sidebar-content {
      padding: 0.5rem;
      gap: 0.5rem;
    }
  }
  .app-sidebar:where([data-density="spacious"]) {
    & .sidebar-link {
      padding-block: 0.625rem;
    }
    & .sidebar-content {
      padding: 0.625rem;
      gap: 0.625rem;
    }
  }
}

/* ── components/statistic/statistic.css ── */
@layer components {
  .statistic {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
  }

  .statistic-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    letter-spacing: 0.01em;
  }

  .statistic-value {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--foreground);
  }

  .statistic-description {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .statistic-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-weight: 500;

    & svg {
      width: 0.75rem;
      height: 0.75rem;
    }

    &[data-trend="up"] {
      color: #16a34a;
    }

    &[data-trend="down"] {
      color: #dc2626;
    }
  }
}

/* ── components/swap/swap.css ── */
/* -- Swap component -------------------------------------------- */

@layer components {
  .swap {
    /* the faces stack in one grid cell, so the box sizes to the widest one
       and no absolute positioning / JS measurement is needed */
    position: relative;
    display: inline-grid;
    place-items: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    color: var(--foreground);
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    /* flip needs depth; harmless for the other variants */
    perspective: 40rem;

    /* the checkbox IS the state — visually hidden but focusable and
       hit-testable across the whole control (no .sr-only dependency) */
    & > input[type="checkbox"] {
      grid-area: 1 / 1;
      appearance: none;
      -webkit-appearance: none;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      border: 0;
      opacity: 0;
      cursor: inherit;
    }

    & .swap-on,
    & .swap-off,
    & .swap-indeterminate {
      grid-area: 1 / 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      backface-visibility: hidden;
      transition:
        opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
        rotate 300ms cubic-bezier(0.4, 0, 0.2, 1),
        scale 300ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    & svg:not([class*="size-"]) {
      width: 1.25rem;
      height: 1.25rem;
      flex-shrink: 0;
    }

    /* -- Faces: default (off) ------------------------------- */
    & .swap-off {
      opacity: 1;
    }

    /* -- Faces: indeterminate ------------------------------- */
    &:has(> input:indeterminate) {
      & .swap-off {
        opacity: 0;
      }
      & .swap-indeterminate {
        opacity: 1;
      }
    }

    /* -- Faces: on (checked, or forced via data-active) ------ */
    &:has(> input:checked),
    &[data-active] {
      & .swap-off,
      & .swap-indeterminate {
        opacity: 0;
      }
      & .swap-on {
        opacity: 1;
      }
    }

    /* -- Variant: rotate ------------------------------------ */
    &[data-variant="rotate"] {
      & .swap-on,
      & .swap-indeterminate {
        rotate: -45deg;
      }

      &:has(> input:indeterminate) {
        & .swap-off {
          rotate: 45deg;
        }
        & .swap-indeterminate {
          rotate: 0deg;
        }
      }

      &:has(> input:checked),
      &[data-active] {
        & .swap-off,
        & .swap-indeterminate {
          rotate: 45deg;
        }
        & .swap-on {
          rotate: 0deg;
        }
      }
    }

    /* -- Variant: flip -------------------------------------- */
    &[data-variant="flip"] {
      & .swap-on,
      & .swap-indeterminate {
        rotate: y 180deg;
      }

      &:has(> input:indeterminate) {
        & .swap-off {
          rotate: y -180deg;
        }
        & .swap-indeterminate {
          rotate: y 0deg;
        }
      }

      &:has(> input:checked),
      &[data-active] {
        & .swap-off,
        & .swap-indeterminate {
          rotate: y -180deg;
        }
        & .swap-on {
          rotate: y 0deg;
        }
      }
    }

    /* -- Sizes ---------------------------------------------- */
    &[data-size="sm"] {
      min-width: 2rem;
      min-height: 2rem;
      font-size: 0.75rem;

      & svg:not([class*="size-"]) {
        width: 1rem;
        height: 1rem;
      }
    }

    &[data-size="lg"] {
      min-width: 2.75rem;
      min-height: 2.75rem;
      font-size: 1.125rem;

      & svg:not([class*="size-"]) {
        width: 1.5rem;
        height: 1.5rem;
      }
    }

    /* -- Interaction states --------------------------------- */
    &:hover:not(:has(> input:disabled)) {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }

    &:has(> input:focus-visible) {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    /* a disabled input never toggles - no pointer-events: none, so the
       not-allowed cursor shows */
    &:has(> input:disabled) {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  /* Accessibility: honour a reduced-motion request — the faces still swap,
     they just do not animate (near-zero duration keeps transitionend firing). */
  @media (prefers-reduced-motion: reduce) {
    .swap .swap-on,
    .swap .swap-off,
    .swap .swap-indeterminate {
      transition-duration: 0.01ms !important;
    }
  }

  @media (prefers-contrast: more) {
    .swap {
      border: 2px solid transparent;

      &:has(> input:checked),
      &[data-active] {
        border-color: currentColor;
      }
    }
  }

  @media (forced-colors: active) {
    .swap {
      border: 1px solid ButtonText;
      color: ButtonText;
      forced-color-adjust: none;

      &:has(> input:checked),
      &[data-active] {
        background: Highlight;
        color: HighlightText;
      }

      &:has(> input:disabled) {
        border-color: GrayText;
        color: GrayText;
      }
    }
  }
}

/* ── components/switch/switch.css ── */
/* -- Switch component ------------------------------------------- */

@layer components {
  .switch {
    appearance: none;
    margin: 0; /* kill the UA's ~4px input margin - breaks flex/grid rhythm */
    width: 2.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: var(--input);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background-color 150ms;
    border: none;
    outline: none;

    /* Thumb */
    &::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: calc(1.25rem - 4px);
      height: calc(1.25rem - 4px);
      border-radius: 50%;
      background: var(--background);
      transition: transform 150ms;
      box-shadow: 0 1px 2px oklch(0 0 0 / 0.15);
    }

    &:checked {
      background: var(--primary);

      &::after {
        transform: translateX(1rem);
      }
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    /* Disabled = legible but inert: never an opacity fade (0.5 on a light
       --border edge left a ghost you had to look for). The shape keeps its
       full-strength edge, the surface turns muted, a chosen state keeps a
       softened primary fill, and the label goes muted with the no-entry
       cursor - "a choice that exists but is unavailable right now". */
    &:disabled {
      cursor: not-allowed;
      /* the off track keeps its full --input shade; an edge ring holds the
         outline even where --input sits close to the page */
      box-shadow: inset 0 0 0 1px var(--border);

      &::after {
        background: var(--muted);
        box-shadow: 0 0 0 1px var(--border);
      }

      &:checked {
        background: color-mix(in oklch, var(--primary) 45%, var(--background));
        box-shadow: none;

        &::after {
          background: var(--background);
          box-shadow: none;
        }
      }
    }

    &[aria-invalid="true"] {
      background: var(--destructive);

      &:checked {
        background: var(--destructive);
      }
    }

    /* -- Sizes ----------------------------------------------- */
    &[data-size="xs"] {
      width: 1.5rem;
      height: 0.875rem;

      &::after {
        width: calc(0.875rem - 4px);
        height: calc(0.875rem - 4px);
      }

      &:checked::after {
        transform: translateX(0.625rem);
      }
    }

    &[data-size="sm"] {
      width: 1.75rem;
      height: 1rem;

      &::after {
        width: calc(1rem - 4px);
        height: calc(1rem - 4px);
      }

      &:checked::after {
        transform: translateX(0.75rem);
      }
    }

    &[data-size="md"] {
      /* same as the default - explicit member of the scale */
    }

    &[data-size="lg"] {
      width: 2.75rem;
      height: 1.5rem;

      &::after {
        width: calc(1.5rem - 4px);
        height: calc(1.5rem - 4px);
      }

      &:checked::after {
        transform: translateX(1.25rem);
      }
    }

    &[data-size="xl"] {
      width: 3.25rem;
      height: 1.75rem;

      &::after {
        width: calc(1.75rem - 4px);
        height: calc(1.75rem - 4px);
      }

      &:checked::after {
        transform: translateX(1.5rem);
      }
    }
  }

  /* -- Switch item layout ----------------------------------- */
  .switch-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    & > label {
      font-size: 0.875rem;
      cursor: pointer;
    }
  }

  /* With-description layout: label + description stack beside the switch.
     The switch spans both rows, so grid auto-placement (definite-row items
     first) pins it to column 1 - the track template must therefore lead with
     the auto (switch) track. `1fr auto` here once placed the text in the far
     right track (reported: "description renders on the far right"). */
  .switch-item-block {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 0.75rem;
    align-items: center;

    & > .switch {
      grid-row: 1 / 3;
    }

    & > label {
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
    }

    & > .switch-description {
      font-size: 0.8125rem;
      color: var(--muted-foreground);
      line-height: 1.5;
    }
  }

  /* Gap hit area: inside an item layout the control's click target spans
     the gap to its label (a transparent ::before, part of the input's own
     hit box), so clicking the whitespace between control and text toggles
     too - the label's `for` covers the text itself. Inline-end only: the
     label always sits after the control (block layouts place it in the
     second grid column). */
  :is(.switch-item) > .switch::before {
    content: "";
    position: absolute;
    inset-block: -0.25rem;
    inset-inline: -0.25rem calc(-1 * 0.5rem);
  }

  :is(.switch-item-block) > .switch::before {
    content: "";
    position: absolute;
    inset-block: -0.25rem;
    inset-inline: -0.25rem calc(-1 * 0.75rem);
  }

  /* Label disabled styling via :has() */
  .switch-item:has(.switch:disabled),
  .switch-item-block:has(.switch:disabled) {
    cursor: not-allowed;

    /* the words say "unavailable" too - no hand pointer over a label whose
       click cannot flip the switch */
    & > label {
      color: var(--muted-foreground);
      cursor: not-allowed;
    }
  }

  /* -- Accessibility ---------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .switch,
    .switch::after {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .switch {
      background: ButtonFace;
      border: 1px solid ButtonText;

      &::after {
        background: ButtonText;
        box-shadow: none;
      }

      &:checked {
        background: Highlight;
        border-color: Highlight;

        &::after {
          background: HighlightText;
        }
      }

      &:disabled {
        border-color: GrayText;

        &::after {
          background: GrayText;
        }
      }
    }
  }
}

/* ── components/table/table.css ── */
@layer components {
  .table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    container-type: inline-size;
  }

  .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    caption-side: bottom;
  }

  .table-caption {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    text-align: center;
  }

  .table-head {
    padding: 0.75rem 1rem;
    /* explicit: a th's UA default centers unless the table sets a non-initial alignment */
    text-align: start;
    font-weight: 500;
    color: var(--muted-foreground);
    background-color: var(--muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--border);

    &:first-child {
      border-top-left-radius: var(--radius-lg);
    }

    &:last-child {
      border-top-right-radius: var(--radius-lg);
    }
  }

  .table-row {
    border-bottom: 1px solid var(--border);
    transition: background-color 150ms ease;

    &:last-child {
      border-bottom: none;
    }

    tbody &:hover {
      background-color: var(--muted);
    }
  }

  .table-cell {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    color: var(--foreground);

    /* a row header (<th scope="row">) reads like a cell: start-aligned,
       not the UA's centered th */
    &:is(th) {
      text-align: start;
      font-weight: 500;
    }
  }

  tfoot .table-row {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    font-weight: 500;
  }

  tfoot .table-cell:first-child {
    border-bottom-left-radius: var(--radius-lg);
  }

  tfoot .table-cell:last-child {
    border-bottom-right-radius: var(--radius-lg);
  }

  /* -- Density ----------------------------------------------------
     data-density on the .table root scales cell/head/caption padding.
     Scale matches sizing.css (0.75 / 1 / 1.25): comfortable == the unsized
     default (0.75rem 1rem), compact 0.375rem 0.625rem, spacious 1rem 1.25rem.
     :where() gives these (0,2,0) - an explicit density always beats the
     automatic narrow-container compaction below. */
  .table:where([data-density="compact"]) {
    & .table-head,
    & .table-cell {
      padding: 0.375rem 0.625rem;
    }
    & .table-caption {
      padding: 0.5rem 0.625rem;
    }
  }
  .table:where([data-density="comfortable"]) {
    & .table-head,
    & .table-cell {
      padding: 0.75rem 1rem;
    }
    & .table-caption {
      padding: 0.75rem 1rem;
    }
  }
  .table:where([data-density="spacious"]) {
    & .table-head,
    & .table-cell {
      padding: 1rem 1.25rem;
    }
    & .table-caption {
      padding: 1rem 1.25rem;
    }
  }

  /* -- Alignment: data-align on a th / td (start / center / end);
     data-numeric: end-aligned tabular figures (amounts, counts) ---------- */
  :is(.table-head, .table-cell) {
    &[data-align="start"] {
      text-align: start;
    }
    &[data-align="center"] {
      text-align: center;
    }
    &[data-align="end"] {
      text-align: end;
    }
    &[data-numeric] {
      text-align: end;
      font-variant-numeric: tabular-nums;
    }
    &[data-valign="top"] {
      vertical-align: top;
    }
    &[data-nowrap] {
      white-space: nowrap;
    }
  }
  .table {
    text-align: start;
  }

  /* -- Sorting: a .table-sort button in the header; aria-sort on the th
     (ascending / descending) draws the arrow, table.js sorts the rows ---- */
  .table-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: -0.25rem -0.5rem;
    padding: 0.25rem 0.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;

    &:hover {
      color: var(--foreground);
      background-color: color-mix(in oklch, var(--foreground) 6%, transparent);
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 1px;
    }
    /* the arrow: both halves muted while unsorted, one strong when sorted */
    &::after {
      content: "";
      width: 0.5rem;
      height: 0.75rem;
      flex-shrink: 0;
      background:
        conic-gradient(from 150deg at 50% 0, currentColor 60deg, transparent 0) top / 100% 40% no-repeat,
        conic-gradient(from -30deg at 50% 100%, currentColor 60deg, transparent 0) bottom / 100% 40% no-repeat;
      opacity: 0.35;
    }
    [data-align="end"] > &,
    [data-numeric] > & {
      flex-direction: row-reverse;
    }
  }
  .table-head[aria-sort="ascending"] .table-sort::after {
    opacity: 1;
    background: conic-gradient(from 150deg at 50% 0, currentColor 60deg, transparent 0) center / 100% 50% no-repeat;
  }
  .table-head[aria-sort="descending"] .table-sort::after {
    opacity: 1;
    background: conic-gradient(from -30deg at 50% 100%, currentColor 60deg, transparent 0) center / 100% 50% no-repeat;
  }
  .table-head[aria-sort]:not([aria-sort="none"]) {
    color: var(--foreground);
  }

  /* -- Selection: a leading .table-select cell with a checkbox (the header
     one selects all); a selected row is tinted -------------------------- */
  .table-select {
    width: 1%;
    padding-inline-end: 0 !important;

    & .checkbox {
      vertical-align: middle;
    }
  }
  .table-row[aria-selected="true"] {
    background-color: color-mix(in oklch, var(--primary) 7%, transparent);

    tbody &:hover {
      background-color: color-mix(in oklch, var(--primary) 11%, transparent);
    }
  }

  /* -- Reordering: a .table-handle cell with a grip button; the row being
     dragged fades, a line shows where it lands -------------------------- */
  .table-handle {
    width: 1%;
    padding-inline-end: 0 !important;
    color: var(--muted-foreground);

    & button {
      display: inline-grid;
      place-items: center;
      width: 1.5rem;
      height: 1.5rem;
      padding: 0;
      border: 0;
      border-radius: var(--radius-sm);
      background: none;
      color: inherit;
      cursor: grab;

      &:hover {
        color: var(--foreground);
        background-color: var(--accent);
      }
      &:focus-visible {
        outline: 2px solid var(--ring);
        outline-offset: 1px;
      }
      & svg {
        width: 1rem;
        height: 1rem;
      }
    }
  }
  .table-row[data-dragging] {
    opacity: 0.4;
  }
  .table-row[data-drop="before"] {
    box-shadow: inset 0 2px 0 var(--primary);
  }
  .table-row[data-drop="after"] {
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  /* -- Locked columns + sticky header --------------------------------------
     data-lock-start="1|2|3" on the .table keeps the first columns in view
     while the .table-container scrolls sideways (table.js measures their
     offsets into --table-lock-1 / -2); data-lock-end="1" the last column.
     data-sticky-header keeps the header row while the container scrolls
     vertically (give the container a max-height). */
  .table[data-lock-start] :is(.table-head, .table-cell),
  .table[data-lock-end] :is(.table-head, .table-cell) {
    background-clip: padding-box;
  }
  .table[data-lock-start] :is(tr > :nth-child(1)),
  .table:is([data-lock-start="2"], [data-lock-start="3"]) :is(tr > :nth-child(2)),
  .table[data-lock-start="3"] :is(tr > :nth-child(3)),
  .table[data-lock-end] :is(tr > :last-child) {
    position: sticky;
    z-index: 1;
    background-color: var(--_lock-bg, var(--background));
  }
  .table[data-lock-start] tr > :nth-child(1) {
    inset-inline-start: 0;
  }
  .table:is([data-lock-start="2"], [data-lock-start="3"]) tr > :nth-child(2) {
    inset-inline-start: var(--table-lock-1, 0px);
  }
  .table[data-lock-start="3"] tr > :nth-child(3) {
    inset-inline-start: calc(var(--table-lock-1, 0px) + var(--table-lock-2, 0px));
  }
  .table[data-lock-end] tr > :last-child {
    inset-inline-end: 0;
  }
  .table thead .table-head {
    --_lock-bg: var(--muted);
  }
  .table tfoot .table-cell {
    --_lock-bg: var(--muted);
  }
  /* the edge of the locked block casts a hairline */
  .table[data-lock-start="1"] tr > :nth-child(1),
  .table[data-lock-start="2"] tr > :nth-child(2),
  .table[data-lock-start="3"] tr > :nth-child(3) {
    box-shadow: inset -1px 0 0 var(--border);
  }
  .table[data-lock-end] tr > :last-child {
    box-shadow: inset 1px 0 0 var(--border);
  }
  .table-row:hover > :is(.table-cell) {
    --_lock-bg: color-mix(in oklch, var(--muted) 100%, var(--background));
  }
  .table-row[aria-selected="true"] > .table-cell {
    --_lock-bg: color-mix(in oklch, var(--primary) 7%, var(--background));
  }

  .table[data-sticky-header] thead .table-head {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .table-container:has(> .table[data-sticky-header]) {
    overflow: auto;
  }

  /* -- Actions: a .table-actions cell of buttons, end-aligned - always
     visible. data-actions="quiet" on the table dims them until the row is
     hovered or focused (touch screens: full strength). On a narrow table
     (container < 40rem) the inline buttons (.table-actions-inline) give way
     to one "more" button (.table-actions-menu) opening a native popover
     menu (.table-menu) - one menu in the row, no JavaScript. Touch screens
     get 44px targets. */
  .table-actions {
    width: 1%;
    white-space: nowrap;
    text-align: end;

    & > * + *,
    & .table-actions-inline > * + * {
      margin-inline-start: 0.25rem;
    }
  }
  .table-actions-inline {
    display: inline-flex;
    align-items: center;
  }
  .table-actions-menu {
    display: none;
  }
  .table[data-actions="quiet"] :is(.table-actions > .btn, .table-actions-inline, .table-actions-menu > .btn) {
    opacity: 0.45;
    transition: opacity 150ms ease;
  }
  .table[data-actions="quiet"]
    .table-row:is(:hover, :focus-within)
    :is(.table-actions > .btn, .table-actions-inline, .table-actions-menu > .btn) {
    opacity: 1;
  }
  @media (hover: none) {
    .table[data-actions="quiet"] :is(.table-actions > .btn, .table-actions-inline, .table-actions-menu > .btn) {
      opacity: 1;
    }
  }
  @media (pointer: coarse) {
    .table-actions .btn[data-size^="icon"] {
      min-width: 2.75rem;
      min-height: 2.75rem;
    }
  }
  @container (max-width: 40rem) {
    .table-actions:has(.table-actions-menu) .table-actions-inline {
      display: none;
    }
    .table-actions-menu {
      display: inline-flex;
    }
  }

  /* the row menu: a popover anchored to its own "more" button */
  .table-row {
    anchor-scope: --table-row-menu;
  }
  .table-actions-menu > .btn {
    anchor-name: --table-row-menu;
  }
  .table-menu[popover] {
    position: fixed;
    position-anchor: --table-row-menu;
    inset: auto;
    top: anchor(bottom);
    right: anchor(right);
    position-try-fallbacks: flip-block;
    margin: 0.25rem 0 0;
    min-width: 10rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    color: var(--popover-foreground);
    box-shadow: var(--shadow-lg);
    text-align: start;

    &:popover-open {
      display: grid;
      gap: 0.125rem;
    }
  }
  .table-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    text-align: start;
    text-decoration: none;
    cursor: pointer;

    &:hover,
    &:focus-visible {
      background-color: var(--accent);
      color: var(--accent-foreground);
      outline: none;
    }
    &[data-tone="destructive"] {
      color: var(--destructive);
    }
    & svg {
      width: 1rem;
      height: 1rem;
    }
  }
  @media (pointer: coarse) {
    .table-menu-item {
      min-height: 2.75rem;
    }
  }

  /* -- Empty state: one .table-empty cell spanning the columns ----------- */
  .table-empty {
    padding: 2.5rem 1rem !important;
    text-align: center;
    color: var(--muted-foreground);

    & > * {
      display: block;
      margin-inline: auto;
    }
    & > * + * {
      margin-top: 0.375rem;
    }
    & > strong {
      color: var(--foreground);
      font-weight: 600;
    }
    & > .btn {
      display: inline-flex;
      margin-top: 1rem;
    }
  }
  .table-empty-icon {
    display: grid !important;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.5rem;
    border-radius: 9999px;
    background-color: var(--muted);
    color: var(--muted-foreground);

    & svg {
      width: 1.25rem;
      height: 1.25rem;
    }
  }
  tbody .table-row:has(> .table-empty):hover {
    background-color: transparent;
  }
  /* a dropdown button straight in the actions cell anchors its .table-menu too */
  .table-actions > .btn[popovertarget] {
    anchor-name: --table-row-menu;
  }

  /* -- Text in cells ------------------------------------------------------- */
  /* a plain link in a cell (a name, an id) speaks the tokens, not the UA's
     blue: the text colour, a soft underline that firms up on hover, the
     ring on keyboard focus. Classed links (.btn, a badge) keep their own. */
  .table-cell a:not([class]) {
    color: var(--foreground);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: color-mix(in oklch, currentColor 30%, transparent);
    text-underline-offset: 0.2em;
    transition: text-decoration-color 150ms ease;

    &:hover {
      text-decoration-color: currentColor;
    }
    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
      border-radius: var(--radius-sm);
    }
  }
  .table-sub {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
  }
  .table-truncate {
    display: block;
    max-width: var(--table-truncate, 14rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .table-clamp {
    display: -webkit-box;
    max-width: var(--table-clamp, 20rem);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .table-mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    white-space: nowrap;
  }
  .table-muted {
    color: var(--muted-foreground);
  }

  /* -- Container query: compact table in narrow containers -- */
  @container (max-width: 480px) {
    .table-head,
    .table-cell {
      padding: 0.5rem 0.75rem;
      font-size: 0.8125rem;
    }
  }

  /* -- Print: a long table runs over pages. VERIFIED: (tmp/print-table-probe.ts + -probe2.ts, Chromium 153, A4)
     the header row repeats on every page and in every column by itself - inside this scroll wrapper too; the
     footer row repeats as well, so a total printed on every page: tfoot prints once, at the end, unless the
     table asks for a running footer (data-repeat-footer); a row taller than the rest of its page split over
     two, so rows stay whole unless data-break-inside="allow" lets them split; data-keep-last keeps the last
     three rows with the footer and with what follows the table (a totals block that sets break-before: avoid
     pulls them along), so the end never lands alone on a page. */
  @media print {
    .table-container {
      /* Chromium fragments a scroll box in print anyway; another engine may clip it */
      overflow: visible;
      /* each page's piece of the table keeps its frame */
      box-decoration-break: clone;
    }
    .table-container:has(> .table[data-sticky-header]) {
      overflow: visible;
      max-height: none;
    }
    .table[data-sticky-header] thead .table-head {
      position: static;
    }
    .table:not([data-repeat-footer]) > tfoot {
      display: table-row-group;

      & > tr:first-child {
        break-before: avoid;
      }
    }
    .table:not([data-break-inside="allow"]) tr {
      break-inside: avoid;
    }
    .table[data-keep-last] > tbody:last-of-type > tr:nth-last-child(-n + 3) {
      break-before: avoid;
    }
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend (and discrete display flips)
   firing so JS state machines that await them keep working. */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .table,
    .table *,
    .table::before,
    .table::after,
    .table *::before,
    .table *::after,
    .table::backdrop,
    .table-caption,
    .table-caption *,
    .table-caption::before,
    .table-caption::after,
    .table-caption *::before,
    .table-caption *::after,
    .table-caption::backdrop,
    .table-cell,
    .table-cell *,
    .table-cell::before,
    .table-cell::after,
    .table-cell *::before,
    .table-cell *::after,
    .table-cell::backdrop,
    .table-container,
    .table-container *,
    .table-container::before,
    .table-container::after,
    .table-container *::before,
    .table-container *::after,
    .table-container::backdrop,
    .table-head,
    .table-head *,
    .table-head::before,
    .table-head::after,
    .table-head *::before,
    .table-head *::after,
    .table-head::backdrop,
    .table-row,
    .table-row *,
    .table-row::before,
    .table-row::after,
    .table-row *::before,
    .table-row *::after,
    .table-row::backdrop {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── components/tabs/tabs.css ── */
/* -- Tabs component -------------------------------------------- */

@layer components {
  /* -- Default (pill) variant ----------------------------------- */
  /* An inline GRID, one minmax(0, max-content) track per tab: when the row
     is too narrow, every track grows from 0 at the same pace, so short labels
     reach their full width first and only the long ones are cut ("…") -
     flex-shrink would clip a short "Churn" as eagerly as a long label. */
  .tab-list {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, max-content);
    align-items: center;
    /* never wider than its container: the triggers shrink and ellipsize */
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: var(--muted);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    gap: 0.125rem;

    /* -- Sizes: trigger font + padding scale (set data-size on .tab-list).
       :where() keeps these at one class of specificity over the plain
       .tab-trigger base. md == each variant's own base padding, so md is
       selectable everywhere without a visual change. Paddings are logical
       (block / inline), so they turn with the vertical labels of side tabs.
       The line variant's trigger base (0.5rem/1rem, nested in
       [data-variant="line"]) outranks the :where() rules, so its overrides
       are un-:where()'d (two attrs). */
    &:where([data-size="xs"]) .tab-trigger {
      padding-block: 0.25rem;
      padding-inline: 0.5rem;
      font-size: 0.75rem;
    }
    &:where([data-size="sm"]) .tab-trigger {
      padding-block: 0.3125rem;
      padding-inline: 0.625rem;
      font-size: 0.8125rem;
    }
    &:where([data-size="md"]) .tab-trigger {
      padding-block: 0.375rem;
      padding-inline: 0.75rem;
      font-size: 0.875rem;
    }
    &:where([data-size="lg"]) .tab-trigger {
      padding-block: 0.5rem;
      padding-inline: 1rem;
      font-size: 1rem;
    }
    &:where([data-size="xl"]) .tab-trigger {
      padding-block: 0.625rem;
      padding-inline: 1.25rem;
      font-size: 1.125rem;
    }
    &[data-variant="line"][data-size="xs"] .tab-trigger {
      padding-block: 0.25rem;
      padding-inline: 0.5rem;
    }
    &[data-variant="line"][data-size="sm"] .tab-trigger {
      padding-block: 0.375rem;
      padding-inline: 0.75rem;
    }
    &[data-variant="line"][data-size="md"] .tab-trigger {
      padding-block: 0.5rem;
      padding-inline: 1rem;
    }
    &[data-variant="line"][data-size="lg"] .tab-trigger {
      padding-block: 0.625rem;
      padding-inline: 1.25rem;
    }
    &[data-variant="line"][data-size="xl"] .tab-trigger {
      padding-block: 0.75rem;
      padding-inline: 1.5rem;
    }

    /* -- Line variant --------------------------------------------- */
    &[data-variant="line"] {
      background: transparent;
      border-radius: 0;
      padding: 0;
      gap: 0;
      border-bottom: 1px solid var(--border);

      & .tab-trigger {
        border-radius: 0;
        padding-block: 0.5rem;
        padding-inline: 1rem;
        border-bottom: 2px solid transparent;
        margin-bottom: -1px;

        &[aria-selected="true"] {
          background: transparent;
          color: var(--foreground);
          border-bottom-color: var(--primary);
          box-shadow: none;
        }
      }
    }

    /* -- Vertical orientation ------------------------------------ */
    &[aria-orientation="vertical"] {
      grid-auto-flow: row;
      grid-auto-rows: minmax(0, max-content);
      grid-auto-columns: auto;
      align-items: stretch;
      width: auto;

      & .tab-trigger {
        text-align: start;
      }
    }
  }

  /* A trigger is a BLOCK box (not inline-flex): text-overflow only works on
     a block container's own line, and a flex container would wrap a bare
     label in an anonymous box that never ellipsizes. Icons and emoji ride
     inline in front of the label - svg / img / .tab-icon - so plain
     <button>Label</button> markup keeps working and a long label ends in "…"
     when the list runs out of room (horizontal and vertical alike). */
  .tab-trigger {
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: 1.25rem;
    padding-block: 0.375rem;
    padding-inline: 0.75rem;
    border-radius: calc(var(--radius) * 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 150ms ease;
    outline: none;

    & :is(svg, img, .tab-icon) {
      display: inline-block;
      vertical-align: middle;
      margin-inline-end: 0.5em;
      line-height: 1;
    }
    & :is(svg, img) {
      inline-size: 1em;
      block-size: 1em;
      translate: 0 -0.0625em;
    }

    &[aria-selected="true"] {
      background: var(--background);
      color: var(--foreground);
      box-shadow:
        0 1px 3px oklch(0 0 0 / 0.08),
        0 0 0 1px var(--border);
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    &:disabled {
      cursor: not-allowed;
      opacity: 0.5;
    }
  }

  /* -- Layout: which side of the panel the tabs sit on ---------
     data-side="top|bottom|left|right" on .tabs (default top; a vertical
     tablist without data-side keeps the old settings-nav layout) and
     data-align="start|center|end" for where the tabs cluster along that
     edge (top/bottom: start = left; left/right: start = top). The DOM order
     never changes - tablist first - only the visual side. :where() keeps the
     side selectors at zero specificity, so variants override them cleanly. */
  .tabs {
    display: flex;
    flex-direction: column;
    min-width: 0;

    & > .tab-list {
      align-self: flex-start;
    }
    &[data-align="center"] > .tab-list {
      align-self: center;
    }
    &[data-align="end"] > .tab-list {
      align-self: flex-end;
    }

    &:where([data-side="bottom"]) {
      & > .tab-list {
        order: 2;
      }
      & > .tab-content {
        margin-top: 0;
        margin-bottom: 0.75rem;
      }
    }

    /* the older aria-orientation-only markup: a settings nav beside the
       panel, horizontal labels (ellipsized past 40% of the width) */
    &:where(:not([data-side]):has(> .tab-list[aria-orientation="vertical"])) {
      flex-direction: row;
      align-items: flex-start;
      gap: 1rem;

      & > .tab-list {
        max-width: 40%;
      }
      & > .tab-content {
        margin: 0;
        flex: 1;
        min-width: 0;
      }
      &:dir(rtl) {
        flex-direction: row-reverse;
      }
    }

    /* data-side left / right: a two-column grid. The tab column has
       height 0 + min-height 100% - it adds nothing to the row, so the PANEL
       decides the height and the column fills it: when the labels need more
       room than the panel is tall, they shrink and ellipsize. left / right
       are physical sides, also in RTL. */
    &:where([data-side="left"], [data-side="right"]) {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      grid-template-areas: "list panel";
      column-gap: 1rem;

      & > .tab-list {
        grid-area: list;
        grid-auto-flow: row;
        grid-auto-rows: minmax(0, max-content);
        grid-auto-columns: auto;
        align-items: stretch;
        align-self: stretch;
        align-content: start;
        height: 0;
        min-height: 100%;
        max-width: none;
      }
      &[data-align="center"] > .tab-list {
        align-content: center;
      }
      &[data-align="end"] > .tab-list {
        align-content: end;
      }
      & > .tab-content {
        grid-area: panel;
        margin: 0;
        min-width: 0;
      }

      /* the labels run vertically along the panel edge - right-hand tabs
         read top to bottom, left-hand ones bottom to top (like book spines;
         sideways-lr where supported, else top to bottom too). The logical
         trigger paddings turn with the writing mode, and icons and emoji
         turn with the label: text-orientation: sideways lays emoji on
         their side like any other glyph, and svg / img (which a vertical
         line would keep upright) rotate a quarter turn. */
      & > .tab-list .tab-trigger {
        writing-mode: vertical-rl;
        text-orientation: sideways;
        text-align: center;

        & :is(svg, img) {
          rotate: 90deg;
        }
      }
    }
    &:where([data-side="right"]) {
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "panel list";
    }
    &:where([data-side="left"]):dir(rtl) {
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "panel list";
    }
    &:where([data-side="right"]):dir(rtl) {
      grid-template-columns: auto minmax(0, 1fr);
      grid-template-areas: "list panel";
    }
    @supports (writing-mode: sideways-lr) {
      /* sideways-lr lays emoji on their side, but svg / img keep their
         orientation: a quarter turn back, so they point up the line */
      &:where([data-side="left"]) > .tab-list .tab-trigger {
        writing-mode: sideways-lr;

        & :is(svg, img) {
          rotate: -90deg;
        }
      }
    }
  }

  /* line variant: the rule sits on the edge that faces the panel (physical
     sides for left / right - the trigger's own writing mode is vertical, so
     its logical inline-end would point down) */
  .tabs[data-side="bottom"] > .tab-list[data-variant="line"] {
    border-bottom: none;
    border-top: 1px solid var(--border);

    & .tab-trigger {
      border-bottom: none;
      border-top: 2px solid transparent;
      margin-bottom: 0;
      margin-top: -1px;

      &[aria-selected="true"] {
        border-top-color: var(--primary);
      }
    }
  }
  .tabs:is([data-side="left"], [data-side="right"], :not([data-side]):has(> .tab-list[aria-orientation="vertical"]))
    > .tab-list[data-variant="line"] {
    border-bottom: none;

    & .tab-trigger {
      border-bottom: none;
      margin-bottom: 0;
    }
  }
  .tabs:is([data-side="left"], :not([data-side]):has(> .tab-list[aria-orientation="vertical"]))
    > .tab-list[data-variant="line"] {
    border-right: 1px solid var(--border);

    & .tab-trigger {
      border-right: 2px solid transparent;
      margin-right: -1px;

      &[aria-selected="true"] {
        border-right-color: var(--primary);
      }
    }
  }
  .tabs[data-side="right"] > .tab-list[data-variant="line"] {
    border-left: 1px solid var(--border);

    & .tab-trigger {
      border-left: 2px solid transparent;
      margin-left: -1px;

      &[aria-selected="true"] {
        border-left-color: var(--primary);
      }
    }
  }

  /* -- Attached variant: folder tabs joined to the panel's card --
     data-variant="attached" on the .tab-list; each panel holds a .card.
     The selected tab takes the card surface and covers the card's border
     where they meet, so tab and card read as one shape. The card corner the
     tabs grow from is squared; every ROUNDED corner keeps the tabs a card
     radius (--radius-xl) away, so no tab ever sits on a curve - start keeps
     the far end clear, end the near one, center both. */
  .tab-list[data-variant="attached"] {
    background: transparent;
    border-radius: 0;
    padding: 0;
    gap: 0.25rem;
    position: relative;
    z-index: 1;

    & .tab-trigger {
      border: 1px solid var(--border);
      background: var(--muted);
      box-shadow: none;
      border-radius: var(--radius-md) var(--radius-md) 0 0;

      &[aria-selected="true"] {
        background: var(--card);
        color: var(--card-foreground);
        box-shadow: none;
        border-bottom-color: var(--card);
      }
    }
  }
  .tabs:has(> .tab-list[data-variant="attached"]) {
    gap: 0;
    column-gap: 0;

    & > .tab-content {
      margin: 0;
    }

    /* top (default) / bottom: the tabs overlap the card border by 1px and
       stay clear of the rounded corner(s) along the row */
    & > .tab-list[data-variant="attached"] {
      margin-bottom: -1px;
      margin-inline-end: var(--radius-xl);
      max-width: calc(100% - var(--radius-xl));
    }
    &[data-align="end"] > .tab-list[data-variant="attached"] {
      margin-inline: var(--radius-xl) 0;
    }
    &[data-align="center"] > .tab-list[data-variant="attached"] {
      margin-inline: var(--radius-xl);
      max-width: calc(100% - 2 * var(--radius-xl));
    }

    &[data-side="bottom"] > .tab-list[data-variant="attached"] {
      margin-top: -1px;
      margin-bottom: 0;

      & .tab-trigger {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        &[aria-selected="true"] {
          border-bottom-color: var(--border);
          border-top-color: var(--card);
        }
      }
    }

    /* left / right (and the legacy column): the gap runs down the column */
    &:is([data-side="left"], [data-side="right"], :not([data-side]):has(> .tab-list[aria-orientation="vertical"])) {
      & > .tab-list[data-variant="attached"] {
        margin-block: 0;
        margin-inline: 0;
        max-width: none;
        grid-auto-flow: row;
        grid-auto-rows: minmax(0, max-content);
        grid-auto-columns: auto;
        padding-bottom: var(--radius-xl);

        & .tab-trigger {
          width: 100%;
        }
      }
      &[data-align="end"] > .tab-list[data-variant="attached"] {
        padding-block: var(--radius-xl) 0;
      }
      &[data-align="center"] > .tab-list[data-variant="attached"] {
        padding-block: var(--radius-xl);
      }
    }
    /* legacy column (a flex row): the card grows to the column's height */
    &:not([data-side]):has(> .tab-list[aria-orientation="vertical"]) {
      & > .tab-list[data-variant="attached"] {
        max-width: 40%;
      }
      & > .tab-content:not([hidden]) {
        align-self: stretch;
        display: flex;
        flex-direction: column;

        & > .card {
          flex: 1;
        }
      }
    }
    &:is([data-side="left"], :not([data-side]):has(> .tab-list[aria-orientation="vertical"]))
      > .tab-list[data-variant="attached"] {
      margin-right: -1px;

      & .tab-trigger {
        border-radius: var(--radius-md) 0 0 var(--radius-md);
        &[aria-selected="true"] {
          border-bottom-color: var(--border);
          border-right-color: var(--card);
        }
      }
    }
    &[data-side="right"] > .tab-list[data-variant="attached"] {
      margin-left: -1px;

      & .tab-trigger {
        border-radius: 0 var(--radius-md) var(--radius-md) 0;
        &[aria-selected="true"] {
          border-bottom-color: var(--border);
          border-left-color: var(--card);
        }
      }
    }

    /* the card corner the aligned tabs grow from is square */
    &:not([data-side]):not(:has(> .tab-list[aria-orientation="vertical"])):not([data-align="center"]):not(
        [data-align="end"]
      )
      > .tab-content
      > .card {
      border-start-start-radius: 0;
    }
    &:not([data-side]):not(:has(> .tab-list[aria-orientation="vertical"]))[data-align="end"] > .tab-content > .card {
      border-start-end-radius: 0;
    }
    &[data-side="top"]:not([data-align="center"]):not([data-align="end"]) > .tab-content > .card {
      border-start-start-radius: 0;
    }
    &[data-side="top"][data-align="end"] > .tab-content > .card {
      border-start-end-radius: 0;
    }
    &[data-side="bottom"]:not([data-align="center"]):not([data-align="end"]) > .tab-content > .card {
      border-end-start-radius: 0;
    }
    &[data-side="bottom"][data-align="end"] > .tab-content > .card {
      border-end-end-radius: 0;
    }
    &:is([data-side="left"], :not([data-side]):has(> .tab-list[aria-orientation="vertical"])):not(
        [data-align="center"]
      ):not([data-align="end"])
      > .tab-content
      > .card {
      border-top-left-radius: 0;
    }
    &:is([data-side="left"], :not([data-side]):has(> .tab-list[aria-orientation="vertical"]))[data-align="end"]
      > .tab-content
      > .card {
      border-bottom-left-radius: 0;
    }
    &[data-side="right"]:not([data-align="center"]):not([data-align="end"]) > .tab-content > .card {
      border-top-right-radius: 0;
    }
    &[data-side="right"][data-align="end"] > .tab-content > .card {
      border-bottom-right-radius: 0;
    }
  }

  /* -- Panel ---------------------------------------------------- */
  .tab-content {
    margin-top: 0.75rem;

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    &[hidden] {
      display: none;
    }
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-reduced-motion: reduce) {
    .tab-trigger {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .tab-trigger[aria-selected="true"] {
      border: 2px solid Highlight;
      box-shadow: none;
    }
    .tab-trigger:disabled {
      color: GrayText;
    }

    .tab-list[data-variant="line"] .tab-trigger[aria-selected="true"] {
      border: none;
      border-bottom: 2px solid Highlight;
    }
  }
}

/* ── components/textarea/textarea.css ── */
/* -- Textarea component ----------------------------------------- */

@layer components {
  .textarea {
    /* border-box: UA gives <textarea> content-box, which would render the
       min-height 2px above the shared field frame (see .input) */
    box-sizing: border-box;
    width: 100%;
    min-height: 5rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    outline: none;
    box-shadow: var(--shadow-xs);
    transition:
      border-color 150ms,
      box-shadow 150ms;
    resize: vertical;
    field-sizing: content;
    line-height: 1.5;

    /* -- Rows: data-rows is the height it starts at, data-max-rows where it
       stops growing and scrolls instead (field-sizing grows it in between).
       1lh = one line of this textarea, + the padding and border. -------- */
    &[data-rows="1"] {
      min-height: calc(1lh + 1rem + 2px);
    }
    &[data-rows="2"] {
      min-height: calc(2lh + 1rem + 2px);
    }
    &[data-rows="3"] {
      min-height: calc(3lh + 1rem + 2px);
    }
    &[data-rows="4"] {
      min-height: calc(4lh + 1rem + 2px);
    }
    &[data-rows="5"] {
      min-height: calc(5lh + 1rem + 2px);
    }
    &[data-rows="6"] {
      min-height: calc(6lh + 1rem + 2px);
    }
    &[data-rows="8"] {
      min-height: calc(8lh + 1rem + 2px);
    }
    &[data-rows="10"] {
      min-height: calc(10lh + 1rem + 2px);
    }
    &[data-max-rows="2"] {
      max-height: calc(2lh + 1rem + 2px);
    }
    &[data-max-rows="3"] {
      max-height: calc(3lh + 1rem + 2px);
    }
    &[data-max-rows="4"] {
      max-height: calc(4lh + 1rem + 2px);
    }
    &[data-max-rows="5"] {
      max-height: calc(5lh + 1rem + 2px);
    }
    &[data-max-rows="6"] {
      max-height: calc(6lh + 1rem + 2px);
    }
    &[data-max-rows="8"] {
      max-height: calc(8lh + 1rem + 2px);
    }
    &[data-max-rows="10"] {
      max-height: calc(10lh + 1rem + 2px);
    }
    &[data-max-rows="12"] {
      max-height: calc(12lh + 1rem + 2px);
    }
    &[data-resize="none"] {
      resize: none;
    }

    &:focus {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    &::placeholder {
      color: var(--muted-foreground);
    }

    /* Disabled = legible but inert: a muted surface and muted text inside
       the full-strength border - never an opacity fade that lets the box
       dissolve into the page. */
    &:disabled {
      background-color: var(--muted);
      color: var(--muted-foreground);
      box-shadow: none;
      cursor: not-allowed;
      /* resize stays off (Chrome would still let a disabled field be dragged
         taller), but the corner keeps a grip so it still reads as a text
         field - two painted diagonal strokes where the native grip sits */
      resize: none;
      background-image:
        linear-gradient(135deg, transparent 0 46%, var(--muted-foreground) 46% 54%, transparent 54%),
        linear-gradient(135deg, transparent 0 46%, var(--muted-foreground) 46% 54%, transparent 54%);
      background-repeat: no-repeat;
      background-size:
        0.625rem 0.625rem,
        0.3125rem 0.3125rem;
      background-position:
        right 0.1875rem bottom 0.1875rem,
        right 0.1875rem bottom 0.1875rem;
    }

    &:is([aria-invalid="true"], :user-invalid:is(form *):not(form[data-validate="submit"]:not([data-submitted]) *)) {
      border-color: var(--destructive);

      &:focus {
        border-color: var(--destructive);
        box-shadow: 0 0 0 2px oklch(from var(--destructive) l c h / 0.2);
      }
    }
  }

  /* -- Textarea group: a composer --------------------------------
     The GROUP draws the frame (border, radius, focus ring, drop target);
     the .textarea inside goes frameless and grows. Children in order: an
     optional .file-drop-list (attachment chips, the file-input's own
     items), the textarea, a .textarea-group-actions row (attach, send,
     a counter). data-layout="inline" puts the actions beside the text -
     a one-line chat composer that grows upward. */
  .textarea-group {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--input);
    border-radius: var(--radius-lg);
    background: var(--background);
    box-shadow: var(--shadow-xs);
    transition:
      border-color 150ms,
      box-shadow 150ms,
      background-color 150ms;

    & > .textarea {
      min-height: calc(2lh + 1rem);
      border: 0;
      border-radius: inherit;
      background: transparent;
      box-shadow: none;
      resize: none;
      padding: 0.75rem 0.875rem 0.25rem;

      &:focus {
        box-shadow: none;
      }
    }

    &:has(> .textarea:focus) {
      border-color: var(--ring);
      box-shadow: 0 0 0 2px oklch(from var(--ring) l c h / 0.2);
    }

    &:has(> .textarea:disabled) {
      background: var(--muted);
      box-shadow: none;
    }

    /* attachment chips above the text - a wrapping row of file items */
    & > .file-drop-list {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      padding: 0.625rem 0.625rem 0;

      &:empty {
        display: none;
      }
      & > .file-drop-item {
        width: 13rem;
        max-width: 100%;
        box-sizing: border-box;
      }
    }

    & > .textarea-group-actions {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      padding: 0.375rem;

      /* everything after the spacer sits at the end - usually send */
      & > .textarea-group-spacer {
        flex: 1;
      }
    }

    & .textarea-group-count {
      padding-inline: 0.375rem;
      color: var(--muted-foreground);
      font-size: 0.75rem;
      font-variant-numeric: tabular-nums;
    }

    /* inline: [actions] text [actions] on one row, aligned to the last line */
    &[data-layout="inline"] {
      flex-flow: row wrap;
      align-items: flex-end;

      & > .file-drop-list {
        flex-basis: 100%;
      }
      & > .textarea {
        flex: 1;
        min-width: 0;
        min-height: calc(1lh + 1rem);
        padding: 0.5rem 0.25rem;
      }
      & > .textarea:first-child {
        padding-inline-start: 0.875rem;
      }
      & > .textarea-group-actions {
        padding: 0.3125rem;
      }
    }

    /* a file dragged over the composer: the page sets data-dragover */
    &[data-dragover] {
      border-style: dashed;
      border-color: var(--ring);
      background: color-mix(in oklch, var(--accent) 45%, var(--background));
    }
  }

  /* -- Accessibility ---------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .textarea,
    .textarea-group {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    .textarea,
    .textarea-group {
      border-width: 2px;
    }
    .textarea-group > .textarea {
      border-width: 0;
    }

    .textarea:disabled {
      border-color: var(--muted-foreground);
    }
  }

  @media (forced-colors: active) {
    .textarea-group {
      border-color: ButtonBorder;
    }
    .textarea-group:has(> .textarea:focus) {
      outline: 2px solid Highlight;
      outline-offset: 1px;
    }
    .textarea-group > .textarea:focus {
      outline: none;
    }

    .textarea {
      border-color: ButtonBorder;
      color: ButtonText;
      background: Field;
    }

    .textarea:focus {
      outline: 2px solid Highlight;
      outline-offset: 1px;
    }

    .textarea:disabled {
      opacity: 1;
      background-image: none;
      color: GrayText;
      border-color: GrayText;
    }

    .textarea:is(
      [aria-invalid="true"],
      :user-invalid:is(form *):not(form[data-validate="submit"]:not([data-submitted]) *)
    ) {
      border-color: LinkText;
    }
  }
}

/* ── components/toast/toast.css ── */
/* -- Toast component ------------------------------------------- */

@layer components {
  /* -- Container ------------------------------------------------ */
  .toast-container {
    position: fixed;
    z-index: 100;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    padding: 1rem;
    max-height: 100vh;
    pointer-events: none;

    &[data-position="bottom-right"] {
      bottom: 0;
      right: 0;
    }
    &[data-position="bottom-left"] {
      bottom: 0;
      left: 0;
    }
    &[data-position="top-right"] {
      top: 0;
      right: 0;
      flex-direction: column;
    }
    &[data-position="top-left"] {
      top: 0;
      left: 0;
      flex-direction: column;
    }
    &[data-position="top-center"] {
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      flex-direction: column;
      align-items: center;
    }
    &[data-position="bottom-center"] {
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      align-items: center;
    }
  }

  /* -- Toast ---------------------------------------------------- */
  .toast {
    /* Top layer (popover="manual") bypasses the container's flex layout - the
       UA sheet would CENTER every toast (inset:0 + margin:auto). Pin each toast
       to its container's corner instead and stack via --toast-stack, which the
       component JS measures (toast.ts stackToasts) since heights vary. */
    position: fixed;
    inset: auto;
    margin: 0;
    /* the UA popover sheet clips (overflow: auto) - the pile badge sits on the edge */
    overflow: visible;
    background-color: var(--popover);
    color: var(--popover-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    min-width: 20rem;
    max-width: 26rem;
    box-shadow: 0 4px 16px oklch(0 0 0 / 0.12);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(0.5rem);
    transition:
      opacity 200ms ease,
      transform 200ms ease;

    &:popover-open {
      opacity: 1;
      transform: translateY(0);
    }

    /* -- Corner placement (top layer - see note above) ------------
       --toast-stack: measured px offset of the stack below this toast;
       the first toast is 0, so default bottom-right lands at the edge. */
    [data-position="bottom-right"] & {
      bottom: calc(1rem + var(--toast-stack, 0px));
      right: 1rem;
    }
    [data-position="bottom-left"] & {
      bottom: calc(1rem + var(--toast-stack, 0px));
      left: 1rem;
    }
    [data-position="top-right"] & {
      top: calc(1rem + var(--toast-stack, 0px));
      right: 1rem;
    }
    [data-position="top-left"] & {
      top: calc(1rem + var(--toast-stack, 0px));
      left: 1rem;
    }
    [data-position="top-center"] & {
      top: calc(1rem + var(--toast-stack, 0px));
      left: 50%;
      translate: -50% 0;
    }
    [data-position="bottom-center"] & {
      bottom: calc(1rem + var(--toast-stack, 0px));
      left: 50%;
      translate: -50% 0;
    }

    /* -- Sizes + Density ------------------------------------------
       data-size scales the toast's width envelope (sm/md/lg, md == the
       unsized default); data-density is the whitespace policy - padding and
       the content gap at the shared 0.75 / 1 / 1.25 ratio, comfortable ==
       the unsized default. Both live on the .toast element itself. */
    &[data-size="sm"] {
      min-width: 16rem;
      max-width: 20rem;
    }
    &[data-size="md"] {
      min-width: 20rem;
      max-width: 26rem;
    }
    &[data-size="lg"] {
      min-width: 24rem;
      max-width: 32rem;
    }

    &[data-density="compact"] {
      padding: 0.75rem;
      & .toast-content {
        gap: 0.5rem;
      }
    }
    &[data-density="comfortable"] {
      padding: 1rem;
    }
    &[data-density="spacious"] {
      padding: 1.25rem;
      & .toast-content {
        gap: 1rem;
      }
    }

    /* -- Variants ------------------------------------------------- */
    &[data-variant="destructive"] {
      background-color: var(--destructive);
      color: var(--destructive-foreground);
      border-color: var(--destructive);

      & .toast-description {
        color: var(--destructive-foreground);
        opacity: 0.85;
      }
    }

    /* -- Semantic variants (border + icon color) ----------------- */
    &[data-variant="success"] {
      border-color: oklch(0.65 0.2 145);

      & .toast-icon {
        color: oklch(0.65 0.2 145);
      }
    }

    &[data-variant="warning"] {
      border-color: oklch(0.75 0.18 75);

      & .toast-icon {
        color: oklch(0.75 0.18 75);
      }
    }

    &[data-variant="info"] {
      border-color: oklch(0.6 0.15 250);

      & .toast-icon {
        color: oklch(0.6 0.15 250);
      }
    }
  }

  @starting-style {
    .toast:popover-open {
      opacity: 0;
      transform: translateY(0.5rem);
    }
  }

  /* -- Named animations (options.animation) ------------------------
     df$.anim plays the entrance / exit; the CSS fade stands down. */
  .toast[data-anim] {
    transition:
      bottom 220ms ease,
      top 220ms ease,
      scale 220ms ease,
      opacity 220ms ease;

    &:popover-open {
      opacity: 1;
      transform: none;
    }
  }
  @starting-style {
    .toast[data-anim]:popover-open {
      opacity: 1;
      transform: none;
    }
  }

  /* -- Pile (df$.shadcn.toast.configure({ stack: 'pile' })) ----------
     The newest toast is in front and wears the shapes.css stack-* sheets
     (added by toast.js); the older ones wait behind it, hidden, and fan out
     into a list while the pointer or focus is inside the pile. A "+n" badge
     counts the hidden ones. */
  .toast-container[data-stack="pile"] .toast {
    transition:
      opacity 200ms ease,
      transform 200ms ease,
      bottom 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
      top 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
      scale 220ms ease;
  }
  .toast[data-piled] {
    opacity: 0 !important;
    scale: 0.94;
    pointer-events: none;
  }
  .toast[data-more]:not([data-more="0"])::after {
    content: "+" attr(data-more);
    position: absolute;
    inset-block-start: -0.5rem;
    inset-inline-start: -0.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
    padding-inline: 0.375rem;
    border-radius: 9999px;
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
  }
  .toast-container[data-position^="top"] .toast[data-more]::after {
    inset-block-start: auto;
    inset-block-end: -0.5rem;
  }

  /* -- Aura (options.aura) ------------------------------------------
     The toast is the ring of light (shapes.css .aura), its content sits on
     an inner surface with the toast's own colors and padding. */
  .toast[data-aura] {
    --shape-round: var(--radius-lg);
    border: 0;
    background-color: transparent;
    box-shadow: 0 8px 28px -6px color-mix(in oklch, var(--foreground) 30%, transparent);
  }
  .toast-surface {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    color: var(--popover-foreground);

    .toast[data-variant="destructive"] > & {
      background-color: var(--destructive);
      color: var(--destructive-foreground);
    }
  }

  /* -- Inner elements ------------------------------------------- */
  .toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .toast-text {
    flex: 1;
    min-width: 0;
  }

  .toast-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
  }

  .toast-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin: 0.125rem 0 0;
    line-height: 1.5;
  }

  .toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    flex-shrink: 0;
    border-radius: calc(var(--radius) * 0.5);
    transition:
      color 150ms,
      background 150ms;

    &:hover {
      color: var(--foreground);
      background: var(--accent);
    }
  }

  .toast-icon {
    /* explicit size: SVGs without width/height render at a ~300px intrinsic
       default, which blew up the whole toast */
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.125rem;
  }

  .toast-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }
}

/* Accessibility: suppress motion for users who request it (REQUIRED for all
   components - AGENTS.md "Accessibility CSS"). Near-zero duration instead of
   `none` keeps transitionend/animationend (and discrete display flips)
   firing so JS state machines that await them keep working. */
@media (prefers-reduced-motion: reduce) {
  @layer components {
    .toast-container,
    .toast-container *,
    .toast-container::before,
    .toast-container::after,
    .toast-container *::before,
    .toast-container *::after,
    .toast-container::backdrop,
    .toast,
    .toast *,
    .toast::before,
    .toast::after,
    .toast *::before,
    .toast *::after,
    .toast::backdrop,
    .toast-description,
    .toast-description *,
    .toast-description::before,
    .toast-description::after,
    .toast-description *::before,
    .toast-description *::after,
    .toast-description::backdrop,
    .toast-icon,
    .toast-icon *,
    .toast-icon::before,
    .toast-icon::after,
    .toast-icon *::before,
    .toast-icon *::after,
    .toast-icon::backdrop,
    .toast-content,
    .toast-content *,
    .toast-content::before,
    .toast-content::after,
    .toast-content *::before,
    .toast-content *::after,
    .toast-content::backdrop,
    .toast-text,
    .toast-text *,
    .toast-text::before,
    .toast-text::after,
    .toast-text *::before,
    .toast-text *::after,
    .toast-text::backdrop,
    .toast-title,
    .toast-title *,
    .toast-title::before,
    .toast-title::after,
    .toast-title *::before,
    .toast-title *::after,
    .toast-title::backdrop,
    .toast-close,
    .toast-close *,
    .toast-close::before,
    .toast-close::after,
    .toast-close *::before,
    .toast-close *::after,
    .toast-close::backdrop,
    .toast-actions,
    .toast-actions *,
    .toast-actions::before,
    .toast-actions::after,
    .toast-actions *::before,
    .toast-actions *::after,
    .toast-actions::backdrop {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* ── components/toggle/toggle.css ── */
/* -- Toggle component ------------------------------------------ */

@layer components {
  .toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    line-height: 1;
    white-space: nowrap;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition:
      color 150ms ease,
      background-color 150ms ease,
      box-shadow 150ms ease;
    outline: none;
    flex-shrink: 0;
    height: 2.25rem;
    padding: 0 0.5rem;
    min-width: 2.25rem;

    &:hover:not(:disabled) {
      background-color: var(--muted);
      color: var(--muted-foreground);
    }

    &[aria-pressed="true"] {
      background-color: var(--accent);
      color: var(--accent-foreground);

      &:hover:not(:disabled) {
        background-color: color-mix(in oklch, var(--accent) 85%, var(--foreground));
      }
    }

    &:focus-visible {
      outline: 2px solid var(--ring);
      outline-offset: 2px;
    }

    /* disabled: dimmed, with the not-allowed cursor - no pointer-events: none,
       which would hide the cursor too (a disabled button fires no click) */
    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    & svg {
      pointer-events: none;
      flex-shrink: 0;

      &:not([class*="size-"]) {
        width: 1rem;
        height: 1rem;
      }
    }

    /* -- Variants -------------------------------------------- */
    &[data-variant="outline"] {
      border: 1px solid var(--input);
      background: transparent;
      box-shadow: var(--shadow-xs);

      &:hover:not(:disabled) {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      &[aria-pressed="true"] {
        background-color: var(--accent);
        color: var(--accent-foreground);

        &:hover:not(:disabled) {
          background-color: color-mix(in oklch, var(--accent) 85%, var(--foreground));
        }
      }
    }

    /* -- Sizes ----------------------------------------------- */
    &[data-size="xs"] {
      height: 1.75rem;
      padding: 0 0.25rem;
      min-width: 1.75rem;
      font-size: 0.75rem;
    }
    &[data-size="sm"] {
      height: 2rem;
      padding: 0 0.375rem;
      min-width: 2rem;
    }
    &[data-size="md"] {
      height: 2.25rem;
      padding: 0 0.5rem;
      min-width: 2.25rem;
    }
    &[data-size="lg"] {
      height: 2.5rem;
      padding: 0 0.625rem;
      min-width: 2.5rem;
    }
    &[data-size="xl"] {
      height: 3rem;
      padding: 0 0.75rem;
      min-width: 3rem;
      font-size: 1rem;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .toggle {
      transition: none;
    }
  }

  @media (prefers-contrast: more) {
    .toggle {
      border: 2px solid transparent;

      &[data-variant="outline"] {
        border-color: var(--foreground);
      }

      &[aria-pressed="true"] {
        border-color: currentColor;
      }
    }
  }

  @media (forced-colors: active) {
    .toggle {
      border: 1px solid ButtonText;

      &[aria-pressed="true"] {
        background: Highlight;
        color: HighlightText;
      }

      &:disabled {
        border-color: GrayText;
        color: GrayText;
      }
    }
  }
}

/* ── components/toggle-group/toggle-group.css ── */
/* -- Toggle Group component ------------------------------------- */

@layer components {
  .toggle-group {
    display: inline-flex;
    align-items: center;
    gap: 0.0625rem;

    /* -- Outline variant: propagate border + shadow to children -- */
    &[data-variant="outline"] > .toggle {
      border: 1px solid var(--input);
      background: transparent;
      box-shadow: var(--shadow-xs);

      &:hover {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      &[aria-pressed="true"] {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }
    }

    /* Collapse double borders on connected outline items */
    &[data-variant="outline"]:not([data-spacing]) > .toggle:not(:first-child) {
      margin-inline-start: -1px;
    }

    &[data-variant="outline"]:not([data-spacing])[data-orientation="vertical"] > .toggle:not(:first-child) {
      margin-inline-start: 0;
      margin-block-start: -1px;
    }

    /* -- Sizes: propagate to child toggles ---------------------- */
    &[data-size="xs"] > .toggle {
      height: 1.75rem;
      padding: 0 0.25rem;
      min-width: 1.75rem;
      font-size: 0.75rem;
    }

    &[data-size="sm"] > .toggle {
      height: 2rem;
      padding: 0 0.375rem;
      min-width: 2rem;

      & svg {
        width: 0.875rem;
        height: 0.875rem;
      }
    }

    &[data-size="md"] > .toggle {
      height: 2.25rem;
      padding: 0 0.5rem;
      min-width: 2.25rem;
    }

    &[data-size="lg"] > .toggle {
      height: 2.5rem;
      padding: 0 0.625rem;
      min-width: 2.5rem;
    }

    &[data-size="xl"] > .toggle {
      height: 3rem;
      padding: 0 0.75rem;
      min-width: 3rem;
      font-size: 1rem;

      & svg {
        width: 1.125rem;
        height: 1.125rem;
      }
    }

    /* -- Vertical orientation ----------------------------------- */
    &[data-orientation="vertical"] {
      flex-direction: column;
    }

    /* -- Connected borders: merge adjacent toggle radii ---------
       Square only the corners that actually touch a neighbour:
       inline corners horizontally, block corners vertically. The
       orientation attribute is wrapped in :where() so every rule
       keeps one-class-plus-one-pseudo specificity - the later
       [data-spacing] radius restore must still win the tie.
       (The previous per-corner "restore" overrides let the
       :not(:last-child) block re-round a middle item's top-right
       corner - issue #12.) */
    &:where(:not([data-orientation="vertical"])) > .toggle:not(:first-child) {
      border-start-start-radius: 0;
      border-end-start-radius: 0;
    }

    &:where(:not([data-orientation="vertical"])) > .toggle:not(:last-child) {
      border-start-end-radius: 0;
      border-end-end-radius: 0;
    }

    &:where([data-orientation="vertical"]) > .toggle:not(:first-child) {
      border-start-start-radius: 0;
      border-start-end-radius: 0;
    }

    &:where([data-orientation="vertical"]) > .toggle:not(:last-child) {
      border-end-start-radius: 0;
      border-end-end-radius: 0;
    }

    /* -- Spacing: adds gap and restores individual radii --------- */
    &[data-spacing] {
      gap: 0.25rem;

      & > .toggle {
        border-radius: var(--radius-md);
      }
    }

    /* -- Disabled group ----------------------------------------- */
    /* the runtime ignores clicks in a disabled group; the cursor says so */
    &[data-disabled] {
      & > .toggle {
        opacity: 0.5;
        cursor: not-allowed;
        &:hover {
          background-color: transparent;
          color: inherit;
        }
      }
    }
  }

  /* -- Accessibility -------------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .toggle-group .toggle {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .toggle-group > .toggle {
      border-color: ButtonBorder;

      &[aria-pressed="true"] {
        background-color: Highlight;
        color: HighlightText;
        border-color: Highlight;
      }

      &:focus-visible {
        outline-color: Highlight;
      }
    }
  }
}

/* ── components/typography/typography.css ── */
/* -- Typography component --------------------------------------- */

/* -- Base text ---------------------------------------------- */
/* Sets the default font size for the entire page.            */
/* All typography classes are sized relative to this baseline. */
@layer base {
  body {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  /* code reads in the theme's monospace stack, not the browser's default (a
     Courier on macOS) - zero specificity, so a component's own face wins */
  :where(code, kbd, samp, pre) {
    font-family: var(--font-mono);
  }
}

@layer components {
  /* -- Headings ---------------------------------------------- */
  .h1 {
    scroll-margin-top: 5rem;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-wrap: balance;
    color: var(--foreground);
  }

  .h2 {
    scroll-margin-top: 5rem;
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-wrap: balance;
    color: var(--foreground);
    border-block-end: 1px solid var(--border);
    padding-block-end: 0.5rem;

    &:first-child {
      margin-block-start: 0;
    }
  }

  .h3 {
    scroll-margin-top: 5rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    text-wrap: balance;
    color: var(--foreground);
  }

  .h4 {
    scroll-margin-top: 5rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    text-wrap: balance;
    color: var(--foreground);
  }

  /* -- Paragraph --------------------------------------------- */
  .p {
    font-size: 0.875rem;
    line-height: 1.75;
    text-wrap: pretty;
    color: var(--foreground);

    &:not(:first-child) {
      margin-block-start: 1.5rem;
    }
  }

  /* -- Lead --------------------------------------------------- */
  .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    text-wrap: pretty;
  }

  /* -- Large -------------------------------------------------- */
  .large {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
  }

  /* -- Small -------------------------------------------------- */
  .small {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    color: var(--foreground);
  }

  /* -- Muted -------------------------------------------------- */
  .muted {
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }

  /* -- Link ------------------------------------------------- */
  /* a link in running text: the primary colour, the line and its offset from
     the theme's link tokens (literal fallbacks for a theme without them) */
  .link {
    color: var(--primary);
    text-decoration: var(--link-text-decoration, underline);
    text-underline-offset: var(--link-underline-offset, 4px);
  }

  /* -- Blockquote --------------------------------------------- */
  .blockquote {
    margin-block-start: 1.5rem;
    border-inline-start: 2px solid var(--border);
    padding-inline-start: 1.5rem;
    font-style: italic;
    hanging-punctuation: first last;
    color: var(--foreground);

    & p {
      margin: 0;
    }
  }

  /* -- Inline code -------------------------------------------- */
  .inline-code {
    position: relative;
    border-radius: var(--radius-sm);
    background: var(--muted);
    padding: 0.2rem 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-weight: 600;
    color: var(--foreground);
  }

  /* -- CJK: Chinese, Japanese, Korean ------------------------------
     Keyed on the lang attribute, so one set of classes serves every script.
     Latin tuning is undone (negative tracking, faux italics); paragraphs
     justify between characters with strict line breaking (kinsoku: no 。
     or ， at a line start), and sentence-end punctuation may hang past the
     edge (Safari: hanging-punctuation) or trims to half width
     (Chromium: text-spacing-trim) so the justified edge stays straight.
     text-autospace adds the thin gap between CJK and Latin /
     digits that authors used to type by hand. */
  :is(.h1, .h2, .h3, .h4, .lead, .large):is(:lang(zh), :lang(ja), :lang(ko)),
  :is(:lang(zh), :lang(ja), :lang(ko)) :is(.h1, .h2, .h3, .h4, .lead, .large) {
    letter-spacing: 0;
  }
  /* Japanese headings break between phrases (bunsetsu), not mid-word */
  :is(.h1, .h2, .h3, .h4, .lead):lang(ja),
  :lang(ja) :is(.h1, .h2, .h3, .h4, .lead) {
    word-break: auto-phrase;
  }
  :is(.p, .lead, .blockquote):is(:lang(zh), :lang(ja), :lang(ko)),
  :is(:lang(zh), :lang(ja), :lang(ko)) :is(.p, .lead, .blockquote) {
    line-height: 1.9;
    line-break: strict;
    text-autospace: normal;
  }
  :is(.p, .blockquote):is(:lang(zh), :lang(ja)),
  :is(:lang(zh), :lang(ja)) :is(.p, .blockquote) {
    text-align: justify;
    text-justify: inter-character;
    /* the line-end 。，: Safari hangs it past the edge; Chromium trims the
       fullwidth glyph's blank half (text-spacing-trim) - either way the
       justified edge stays straight */
    hanging-punctuation: allow-end;
    text-spacing-trim: normal;
  }
  /* CJK has no italics - a slanted Han character is a synthetic oblique */
  .blockquote:is(:lang(zh), :lang(ja), :lang(ko)),
  :is(:lang(zh), :lang(ja), :lang(ko)) .blockquote {
    font-style: normal;
  }

  /* -- Vertical text (tategaki / 直排) ----------------------------------
     .text-vertical sets top-to-bottom lines flowing right to left. Latin
     runs lie sideways (text-orientation: mixed); .text-upright stands a
     short run (a two-digit number) upright in one cell - tate-chu-yoko.
     The spacing above uses logical properties, so headings, paragraphs and
     the blockquote rule turn with the text. Give the block a height. */
  .text-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }
  .text-upright {
    text-combine-upright: all;
  }

  /* -- Emphasis marks (圈点 / 傍点) ---------------------------------------
     Dots beside each character instead of italics: over the text in
     Japanese (right of it when vertical), under it in Chinese. */
  .text-emphasis {
    font-style: normal;
    text-emphasis: filled dot;
    text-emphasis-position: over right;
  }
  .text-emphasis:lang(ja) {
    text-emphasis-style: filled sesame;
  }
  .text-emphasis:lang(zh) {
    text-emphasis-position: under right;
  }

  /* ruby annotations (furigana, pinyin, zhuyin) read as small, muted type */
  :is(.p, .lead, .blockquote, .h1, .h2, .h3, .h4) rt {
    font-size: 0.5em;
    color: var(--muted-foreground);
    letter-spacing: 0;
  }

  /* -- Typesetting (Satz): book and journal setting ----------------------
     .typeset holds continuous text set like a book or a journal page. Each
     classic rule is an opt-in data attribute, tuned by a --typeset-* knob -
     component properties, not theme tokens (the theme set stays the
     tweakcn shape):
       data-columns="2|3"        columns never narrower than
                                 --typeset-column-width: a phone gets one
       data-rule                 a hairline between the columns
       data-align="justify"      Blocksatz: justified and hyphenated (set
                                 lang=""), the last line flush start
       data-indent               Einzug: paragraphs follow without a gap and
                                 indent their first line; the first one after
                                 a heading starts flush (stumpf)
       data-initial="drop|raised"  Initiale over --typeset-initial-lines lines
       data-lead="smallcaps|caps"  the opening line in small capitals or in
                                 letterspaced capitals (Versalien)
       data-ligatures="classic"  discretionary and historical ligatures,
                                 old-style figures - where the font has them
       data-leading="tight|loose"  compact or airy lines, the tracking matched
       data-orphans / data-widows="3|4"  lines kept together at a break (2)
     .typeset-span spans every column (a heading, a figure). Figures, tables,
     quotes, groups and Separator breaks keep --typeset-gap from the text -
     the Separator component draws the break, this block only spaces it.
     VERIFIED: (typography.e2e, the typeset checks) every rule as a computed
     style, the gaps, the captions' counters, 44rem two columns vs 20rem one. */
  .typeset {
    --typeset-measure: 68ch;
    --typeset-column-width: 18rem;
    --typeset-column-gap: 2.5em;
    --typeset-indent: 1em;
    --typeset-leading: 1.65;
    --typeset-tracking: 0em;
    --typeset-gap: 1.5em;
    --typeset-initial-lines: 3;
    --typeset-initial-gap: 0.3em;
    --typeset-initial-font: var(--font-serif);
    --typeset-initial-color: var(--primary);

    max-inline-size: var(--typeset-measure);
    line-height: var(--typeset-leading);
    letter-spacing: var(--typeset-tracking);
    text-wrap: pretty;
    hanging-punctuation: first allow-end last;
    font-kerning: normal;
    orphans: 2;
    widows: 2;

    /* a .typeset-keep is a wrapper, not a block: what it holds is spaced as
       if it sat in the setting itself (each rule names both paths - :is()
       would raise the direct path's specificity to the wrapper path's) */
    & > p,
    & > .typeset-keep > p {
      margin-block: 0 1em;
    }
    /* every block keeps the same distance from the text around it */
    &
      > :is(
        figure,
        table,
        blockquote,
        pre,
        hr,
        .separator,
        .typeset-group,
        .chart,
        .diagram,
        .mockup-code,
        .table-container
      ),
    &
      > .typeset-keep
      > :is(
        figure,
        table,
        blockquote,
        pre,
        hr,
        .separator,
        .typeset-group,
        .chart,
        .diagram,
        .mockup-code,
        .table-container
      ) {
      margin-block: var(--typeset-gap);
    }
    /* a figure spans the measure (the browser indents it 40px by default) */
    & > :is(figure, blockquote),
    & > .typeset-keep > :is(figure, blockquote) {
      margin-inline: 0;
    }
    & > :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
    & > .typeset-keep > :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4) {
      margin-block: var(--typeset-gap) 0.5em;
    }
    & > :first-child,
    & > .typeset-keep:first-child > :first-child {
      margin-block-start: 0;
    }
    & :is(figure, blockquote, table, pre, .typeset-group) {
      break-inside: avoid;
    }
    /* a long table or listing may split: kept whole, it would leave the rest
       of a page empty, and one taller than a page splits anyway. Every piece
       keeps the frame (clone): sliced, the first piece lost its bottom border
       and corners at the column foot, the next its top. A figure that may
       split lets the listing inside it split too, and its caption stays with
       the last piece.
       VERIFIED: (Chromium PDF probe 2026-10-12) a framed listing split over
       two columns and over two pages prints a closed, rounded frame on each. */
    & [data-break-inside="allow"],
    & [data-break-inside="allow"] :is(figure, blockquote, table, pre, .typeset-group, .mockup-code) {
      break-inside: auto;
      box-decoration-break: clone;
    }
    /* ... and a listing that may split does not scroll sideways: Chromium
       never breaks a scroll container, so the listing moved whole and left its
       caption behind - wrap its lines instead (pre-wrap, a Code Mockup's
       data-wrap). VERIFIED: (Chromium probe 2026-10-12) overflow-x: auto kept
       the paper's closing report whole at 900px, overflow-x: visible split it. */
    & :is(pre, .mockup-code):is([data-break-inside="allow"], [data-break-inside="allow"] *) {
      overflow-x: visible;
    }
    /* a caption never breaks alone to the next column or page - on screen,
       where the columns balance, as in print. A figure that may split is a
       block, its caption kept to the last piece (below) or the first (above).
       VERIFIED: (Chromium, screen and PDF 2026-10-12) in a grid figure the
       keep did nothing and the caption stood alone at the head of the next
       column; in block flow the break moved up into the listing and two lines
       went along with the caption. A figure group keeps its grid. */
    & figure[data-break-inside="allow"]:not(.typeset-group) {
      display: block;

      & > figcaption:last-child {
        break-before: avoid;
      }
      & > figcaption:first-child {
        break-after: avoid;
      }
    }
    & :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4) {
      break-after: avoid;
    }
    /* the lines a paragraph keeps together at a column or page break: at the
       foot of the column (orphans) and at the head of the next (widows) */
    &[data-orphans="3"] {
      orphans: 3;
    }
    &[data-orphans="4"] {
      orphans: 4;
    }
    &[data-widows="3"] {
      widows: 3;
    }
    &[data-widows="4"] {
      widows: 4;
    }
    & .typeset-span {
      column-span: all;
    }
    /* the columns below a spanning heading or figure start level: the first
       block keeps no top margin - across the column break it cannot collapse
       into the spanner's, so a subheading sat lower than the text beside it */
    &[data-columns] > .typeset-span + :not(.typeset-span),
    &[data-columns] > .typeset-span + .typeset-keep > :first-child {
      margin-block-start: 0;
    }

    &[data-columns] {
      max-inline-size: none;
      column-gap: var(--typeset-column-gap);
    }
    &[data-columns="2"] {
      columns: 2 var(--typeset-column-width);
    }
    &[data-columns="3"] {
      columns: 3 var(--typeset-column-width);
    }
    &[data-rule] {
      column-rule: 1px solid var(--border);
    }

    &[data-align="justify"] {
      text-align: justify;
      text-align-last: start;
      hyphens: auto;
      hyphenate-limit-chars: 6 3 2;

      /* text-align-last inherits: a centered caption inside a justified setting
         kept its last line flush left (a two-line figure caption looked
         off-center) - what centers itself takes its last line from its own alignment */
      & :where(figcaption, caption, .typeset-caption) {
        text-align-last: auto;
      }
    }

    /* leading and tracking move together: tight lines close up a little,
       airy lines open up a little, so the grey of the column stays even */
    &[data-leading="tight"] {
      --typeset-leading: 1.45;
      --typeset-tracking: -0.01em;
    }
    &[data-leading="loose"] {
      --typeset-leading: 1.9;
      --typeset-tracking: 0.01em;
    }

    &[data-indent] > p,
    &[data-indent] > .typeset-keep > p {
      margin-block: 0;
    }
    &[data-indent] > p + p,
    &[data-indent] > .typeset-keep > p + p,
    &[data-indent] > p + .typeset-keep > p:first-child,
    &[data-indent] > p + .typeset-break + p {
      text-indent: var(--typeset-indent);
    }
    /* text-indent inherits into an inline-block, which then indents ITS first line: a badge,
       a key cap or an epistemic tag at the start of an indented paragraph grew a blank
       inside its left edge */
    &[data-indent] > p :where(.badge, kbd, .paper-tag),
    &[data-indent] > .typeset-keep > p :where(.badge, kbd, .paper-tag) {
      text-indent: 0;
    }

    /* the gap is a margin: Chromium ignores logical padding on ::first-letter
       (VERIFIED: probe 2026-10-07 - padding-inline-end computed 0, margin-inline-end 2.52px) */
    &[data-initial] > p:first-of-type::first-letter {
      margin-inline-end: var(--typeset-initial-gap);
      font-family: var(--typeset-initial-font);
      font-weight: 600;
      color: var(--typeset-initial-color);
    }
    &[data-initial="drop"] > p:first-of-type::first-letter {
      -webkit-initial-letter: var(--typeset-initial-lines);
      initial-letter: var(--typeset-initial-lines);
    }
    &[data-initial="raised"] > p:first-of-type::first-letter {
      -webkit-initial-letter: var(--typeset-initial-lines) 1;
      initial-letter: var(--typeset-initial-lines) 1;
    }

    &[data-lead="smallcaps"] > p:first-of-type::first-line {
      font-variant-caps: all-small-caps;
      letter-spacing: 0.04em;
    }
    /* letterspaced capitals - and the small-caps lead beside an initial:
       a first line in small capitals moves the initial down a line
       (Chromium), capitals keep its top level with the line's */
    &:is([data-lead="caps"], [data-initial][data-lead="smallcaps"]) > p:first-of-type::first-line {
      font-variant-caps: normal;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    &[data-ligatures="classic"] {
      font-variant-ligatures: common-ligatures discretionary-ligatures historical-ligatures contextual;
      font-variant-numeric: oldstyle-nums proportional-nums;
    }
  }
  /* a heading is never justified: a wrapping heading stretched to the measure
     opened wide gaps between its words. Flush start and unhyphenated - zero
     specificity, so an alignment the heading sets itself still wins */
  :where(.typeset[data-align="justify"]) :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4) {
    text-align: start;
    text-align-last: auto;
    hyphens: manual;
  }
  /* a verbatim record keeps its spacing: justified, a wrapped line of program
     output opened wide gaps between its words, and hyphenation split its
     identifiers (pa-per.mdx) - a pre is set flush start, unhyphenated */
  :where(.typeset[data-align="justify"]) :where(pre) {
    text-align: start;
    text-align-last: auto;
    hyphens: manual;
  }
  /* no initial-letter (Firefox): a floated letter as tall as the lines */
  @supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
    .typeset[data-initial] > p:first-of-type::first-letter {
      float: inline-start;
      font-size: calc(var(--typeset-initial-lines) * var(--typeset-leading) * 1em * 0.82);
      line-height: 0.8;
      padding-block-start: 0.08em;
    }
  }

  /* -- Captions (Bildunterschriften), numbered in order ------------------
     .typeset-caption on a figcaption (a picture, a video, a chart) or a
     table's caption. Inside .typeset-numbered, figures and tables count on
     their own: "Figure 1.", "Table 1." - the words are --typeset-figure-label
     and --typeset-table-label ("" leaves the bare number: "1."). A caption
     is flush start; data-align="justify" or "center" sets it otherwise. */
  .typeset-numbered {
    --typeset-figure-label: "Figure ";
    --typeset-table-label: "Table ";

    counter-reset: typeset-figure typeset-table;
  }
  .typeset-caption {
    margin-block-start: 0.6em;
    color: var(--muted-foreground);
    font-size: 0.875em;
    line-height: 1.5;
    text-align: start;
    text-align-last: auto;
    text-wrap: pretty;
    caption-side: top;

    &[data-align="justify"] {
      text-align: justify;
      text-align-last: start;
      hyphens: auto;
    }
    &[data-align="center"] {
      text-align: center;
      text-wrap: balance;
    }
    table > & {
      margin-block: 0 0.6em;
    }
  }
  .typeset-numbered :is(figcaption.typeset-caption)::before {
    counter-increment: typeset-figure;
    content: var(--typeset-figure-label) counter(typeset-figure) ". ";
    color: var(--foreground);
    font-weight: 600;
  }
  .typeset-numbered
    :is(
      caption.typeset-caption,
      figure:has(> table) > figcaption.typeset-caption,
      figure:has(> .table-container) > figcaption.typeset-caption
    )::before {
    counter-increment: typeset-table;
    content: var(--typeset-table-label) counter(typeset-table) ". ";
  }

  /* -- Figure groups: several figures in one box ---------------------------
     .typeset-group sets two or three figures (charts, pictures, tables) side
     by side; each figure's caption is lettered "(a)", "(b)" (.typeset-subcaption),
     the group's own figcaption numbers the whole. Every figure spans two
     subgrid rows - media, then caption - so the captions of a row sit at one
     height whatever the media's height. data-align="middle" centres the media
     in their row; data-divided draws hairlines between the figures - the
     1px grid gap over a border-coloured background, so the lines run between
     columns and, once the figures stack, between rows, with no container
     query (a size container would scope the caption counters to the group);
     data-variant="cards" gives each figure its own card instead of one box.
     Narrow pages stack them.
     VERIFIED: (typography.e2e "figure groups") captions level, the 1px lines
     between columns and between stacked rows, the cards' borders. */
  .typeset-group {
    --typeset-group-min: 12rem;
    --typeset-group-gap: 1.25rem;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--typeset-group-min)), 1fr));
    gap: var(--typeset-group-gap);
    margin-inline: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    counter-reset: typeset-sub;

    & > figure {
      display: grid;
      grid-row: span 2;
      grid-template-rows: subgrid;
      row-gap: 0.4em;
      align-content: start;
      margin: 0;
      min-inline-size: 0;
    }
    & > figcaption {
      grid-column: 1 / -1;
      margin-block-start: 0.25em;
    }
    & img,
    & video {
      display: block;
      inline-size: 100%;
      block-size: auto;
      border-radius: var(--radius-md);
    }

    &[data-align="middle"] > figure > :first-child {
      align-self: center;
    }

    &[data-variant="cards"] {
      padding: 0;
      border: 0;
      background: none;

      & > figure {
        padding: 0.875rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--card);
      }
    }

    &[data-divided] {
      gap: 1px;
      padding: 0;
      overflow: hidden;
      background: var(--border);

      & > figure {
        padding: 1rem;
        background: var(--card);
      }
      & > figcaption {
        margin: 0;
        padding: 0.75rem 1rem 1rem;
        background: var(--card);
      }
    }
  }
  .typeset-subcaption {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.8125em;
    line-height: 1.45;

    &::before {
      counter-increment: typeset-sub;
      content: "(" counter(typeset-sub, lower-alpha) ") ";
      color: var(--foreground);
      font-weight: 600;
    }
  }

  /* -- Breaks and keeps (Umbruch): where a printed page or column ends -----
     .typeset-break is an empty marker that forces a break before the next
     block: data-break="page" (the default), "column" (inside data-columns),
     "left" / "right" (the next page is a left / right page - duplex). It
     breaks in print only: a screen has no pages, and a column break in a
     balanced screen column would push the rest of the text into the last
     column. In print it is a zero-height box carrying break-before -
     display: none would remove the box and the break with it. On screen it
     is hidden; [data-show-breaks] on an ancestor shows every marker as a
     labelled dashed line, an authoring aid.
     .typeset-keep keeps its content in one column and on one page (avoid
     covers both - avoid-page would still let a column break split it).
     VERIFIED: (typography.e2e "breaks and keeps", paper.e2e "print") the
     computed breaks in print media; a printed PDF with a page and a column
     break; a zero-height break in the paper's grid leaves no gap at the top
     of the new page. */
  .typeset-break {
    display: none;
  }
  @media screen {
    [data-show-breaks] .typeset-break {
      display: flex;
      align-items: center;
      gap: 0.75em;
      margin-block: 1em;
      color: var(--muted-foreground);
      font: 500 0.6875rem/1 var(--font-mono);
      letter-spacing: 0.06em;
      text-transform: uppercase;

      &::before {
        content: "Page break";
      }
      &[data-break="column"]::before {
        content: "Column break";
      }
      &[data-break="left"]::before {
        content: "Page break - left page";
      }
      &[data-break="right"]::before {
        content: "Page break - right page";
      }
      &::after {
        content: "";
        flex: 1;
        border-block-start: 1px dashed currentColor;
      }
    }
  }
  @media print {
    .typeset-break {
      display: block;
      block-size: 0;
      margin: 0;
      padding: 0;
      border: 0;
      visibility: hidden;
      break-before: page;

      &[data-break="column"] {
        break-before: column;
      }
      &[data-break="left"] {
        break-before: left;
      }
      &[data-break="right"] {
        break-before: right;
      }
    }
    /* a printed column rule runs straight through a spanning heading or
       figure that starts a page - so a setting with spanners prints without it.
       VERIFIED: (Chromium PDF probe 2026-10-12) a column-span: all block that a
       natural page break puts at the top of a page is crossed by the rule; an
       opaque background hides it only while background graphics print. */
    .typeset[data-rule]:has(> .typeset-span) {
      column-rule-style: none;
    }
  }
  .typeset-keep {
    break-inside: avoid;
  }

  /* -- Accessibility ------------------------------------------ */

  @media (prefers-contrast: more) {
    .h1,
    .h2,
    .h3,
    .h4 {
      letter-spacing: 0;
    }

    .typeset {
      --typeset-initial-color: var(--foreground);
    }

    .blockquote {
      border-inline-start-width: 3px;
    }

    .inline-code {
      outline: 1px solid var(--border);
    }

    .muted,
    [data-show-breaks] .typeset-break {
      color: var(--foreground);
    }

    /* a theme may drop the underline; more contrast brings it back */
    .link {
      text-decoration-line: underline;
    }
  }

  @media (forced-colors: active) {
    .blockquote {
      border-inline-start-color: CanvasText;
    }

    .typeset {
      --typeset-initial-color: CanvasText;
    }

    .typeset[data-rule] {
      column-rule-color: CanvasText;
    }

    .inline-code {
      background: Canvas;
      outline: 1px solid CanvasText;
      color: CanvasText;
    }

    .link {
      color: LinkText;
      text-decoration-line: underline;
    }
  }
}
