/* Elench design system 0.15.0 — one sheet. GENERATED by scripts/build.mts in
   elenchers/design-system; do not hand-edit. Load this file once; fonts/,
   textures/ and logo/ must sit beside it. Put class elench-ds on the app
   root (UIProvider or body). Sources: src/tokens.json and src/*.{css,scss}. */

/* Elench design tokens 0.15.0. GENERATED by scripts/build.mts from src/tokens.json; do not hand-edit. */

:root {
  /* neutral ramp. Fixed hex, no hue anywhere */
  --c-paper: #FFFFFF;  /* the page */
  --c-n-050: #E5E3E0;  /* faintest surface tint */
  --c-n-100: #DDDBD8;  /* sunken surface tint, table zebra */
  --c-n-200: #D1D0CC;  /* quiet hairlines, table row rules */
  --c-n-300: #C2C0BD;  /* rules and dividers */
  --c-n-400: #A9A8A5;  /* decoration only, below AA. Never carries text or meaning */
  --c-n-500: #81807C;  /* UI component boundaries, input borders, icons. Same hex on both sheets */
  --c-n-600: #676562;  /* secondary text. Same job on both sheets */
  --c-n-700: #555350;  /* body text on tinted surfaces; strong icons */
  --c-n-800: #3D3C39;  /* text that must stay strong on any light surface */
  --c-n-900: #2B2A27;  /* body text; the inverse page surface */
  --c-ink: #0E0C09;  /* headings, the mark, rules that must dominate */

  /* surfaces */
  --surface-paper: #FFFFFF;
  --surface-raised: #E5E3E0;
  --surface-sunken: #DDDBD8;
  --surface-selected: #DDDBD8;
  --surface-hover: #E5E3E0;
  --surface-inverse: #2B2A27;
  --surface-inverse-raised: #2B2A27;

  /* status. Machine and process state only, ANSI Z535.1 meanings */
  --status-fault: #C8102E;  /* danger, e-stop, immediate hazard (Safety Red). Button intent=destructive uses the fill at rest and hovered / pressed, the darker red, under the pointer, with on as the type on all three. hovered and pressed are fixed like the fill: they match the paper sheet's foreground, which the inverse sheet turns light. */
  --status-fault-on: #FFFFFF;  /* text and icon on the fill; fixed on every sheet */
  --status-fault-foreground: #73212E;
  --status-fault-background: #F2C6CD;
  --status-fault-hovered: #73212E;  /* fill under the pointer; fixed on every sheet */
  --status-fault-pressed: #73212E;  /* fill while pressed; fixed on every sheet */
  --status-warning: #F2C200;  /* caution, condition may become hazardous (Safety Yellow) */
  --status-warning-on: #0E0C09;  /* text and icon on the fill; fixed on every sheet */
  --status-warning-foreground: #796100;
  --status-warning-background: #FCF0C2;
  --status-ok: #00843D;  /* safe condition, running normally, egress (Safety Green) */
  --status-ok-on: #FFFFFF;  /* text and icon on the fill; fixed on every sheet */
  --status-ok-foreground: #00421F;
  --status-ok-background: #C2E1D0;
  --status-notice: #005EB8;  /* notice, mandatory action, information (Safety Blue) */
  --status-notice-on: #FFFFFF;  /* text and icon on the fill; fixed on every sheet */
  --status-notice-foreground: #002F5C;
  --status-notice-background: #C2D8EE;
  --status-idle: var(--surface-paper);  /* Neutral machine state, not an ANSI hue. */

  /* jobs. Foreground roles; alias the ramp */
  --c-mark: var(--c-ink);
  --c-body: var(--c-n-900);
  --c-strong: var(--c-n-800);
  --c-mute: var(--c-n-600);
  --c-edge: var(--c-n-300);
  --c-bound: var(--c-n-500);

  /* action. Pressable fill; React Aria data-hovered / data-pressed */
  --action: var(--c-ink);
  --action-on: var(--c-paper);
  --action-hovered: var(--c-n-800);
  --action-pressed: var(--c-n-900);

  /* destructive. Alias of the fault fill for outlined destructive */
  --destructive: var(--status-fault);

  /* control colours */
  --disabled-fill: var(--c-n-200);
  --disabled-bound: var(--c-n-300);
  --disabled-text: var(--c-n-600);
  --c-placeholder: var(--c-n-600);
  --invalid: var(--status-fault);
  --selected-bound: var(--c-n-500);

  /* deprecated. Use --action*; kept for dist/ consumers */
  --primary: var(--action);
  --primary-on: var(--action-on);
  --primary-hover: var(--action-hovered);
  --primary-active: var(--action-pressed);
  --primary-background: var(--c-n-100);  /* legacy hover well */
  --primary-foreground: var(--c-ink);  /* legacy emphasis */

  /* type */
  --font-sans: "Asta Sans", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "iA Writer Mono V", "iA Writer Mono V fallback: Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-features-text: normal;  /* Asta Sans ships no disambiguation stylistic set; nothing to switch on */
  --font-features-data: "tnum" 1;  /* tabular figures in tables, forms, dashboards, prices, part numbers */
  --font-features-mono: "zero" 1;  /* slashed zero */
  --weight-regular: 400;  /* running text, headings at 2xl and above */
  --weight-medium: 500;  /* headings below 2xl, UI labels, buttons, eyebrows, the wordmark */
  --weight-semibold: 600;  /* reported numeral only: price, reading, total */

  --text-3xs: 11px;
  --leading-3xs: 16px;
  --tracking-3xs: 0.06em;  /* use: micro all-caps, ANSI-style tags · not: sentences, UI body, headings */
  --text-2xs: 12px;
  --leading-2xs: 16px;
  --tracking-2xs: 0.04em;  /* use: eyebrow, caption, table column header, figcaption · not: headings, buttons, body */
  --text-xs: 13px;
  --leading-xs: 20px;
  --tracking-xs: 0;  /* use: dense telemetry rows, dashboard data, field hints · not: editorial body, titles */
  --text-sm: 14px;
  --leading-sm: 20px;
  --tracking-sm: 0;  /* use: UI labels, buttons, nav, secondary body, t-mono inline · not: page titles, hero */
  --text-md: 16px;
  --leading-md: 24px;
  --tracking-md: 0;  /* use: body, default UI text · not: display, micro labels */
  --text-lg: 20px;
  --leading-lg: 28px;
  --tracking-lg: 0;  /* use: lead, standfirst · not: captions, dashboard ticks */
  --text-xl: 20px;
  --leading-xl: 24px;
  --tracking-xl: -0.005em;  /* use: h3, card title, fullscreen nav links · not: body, hero */
  --text-2xl: 24px;
  --leading-2xl: 32px;
  --tracking-2xl: -0.01em;  /* use: h2, t-kpi reported numeral · not: captions, buttons */
  --text-3xl: 32px;
  --leading-3xl: 40px;
  --tracking-3xl: -0.015em;  /* use: h1, page title · not: cards, UI chrome */
  --text-4xl: 40px;
  --leading-4xl: 44px;
  --tracking-4xl: -0.02em;  /* use: display, web and deck only · not: dashboards, more than one per page */
  --text-5xl: 44px;
  --leading-5xl: 48px;
  --tracking-5xl: -0.02em;  /* use: t-hero, at most one per page · not: everything else */

  /* space. Base unit 4px. Nothing off this scale */
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --space-40: 160px;
  --space-48: 192px;
  --space-64: 256px;

  --measure-tight: 58ch;
  --measure-default: 68ch;
  --measure-wide: 78ch;
  --border-hairline: 1px;  /* Rules, card borders */
  --border-strong: 2px;  /* Selected card, callout edge */
  --focus-width: 2px;  /* Focus ring width. :focus-visible outline, never box-shadow */
  --focus-offset: 2px;  /* Focus ring offset */
  --focus-ink: var(--action);  /* follows action fill; remaps with the sheet */
  --scrim: color-mix(in srgb, var(--surface-paper) 72%, transparent);  /* Translucent scrim */
  --blur: 16px;  /* Blur behind the scrim */
  --control-min: 38px;
  --opacity-mute: 0.4;
  --radius: 0;  /* Square corners system-wide */
  --radius-xs: 1px;  /* The smallest corner: knobs, marks, inner rectangles */
  --radius-sm: 2px;  /* Swatches, small chips, and the square controls */
  --radius-md: 20px;  /* .card-md section panels */
  --radius-full: 9999px;  /* Badge pill */

  /* shadows */
  --shadow-faint: 0 1px 0 color-mix(in srgb, var(--c-ink) 8%, transparent);  /* The faintest seat: a 1px line under a control. Reads off --c-ink, so on the inverse sheet it becomes a light seat instead of disappearing */
  --shadow-glow: 0 0 4px var(--c-paper);  /* A rim light around a knob on a contrasting track. Reads off --c-paper, so it is always the opposite of the surface it sits on */
  --shadow-overlay: 0 1px 2px color-mix(in srgb, var(--c-ink) 10%, transparent), 0 4px 4px color-mix(in srgb, var(--c-ink) 9%, transparent), 0 9px 6px color-mix(in srgb, var(--c-ink) 5%, transparent), 0 17px 7px color-mix(in srgb, var(--c-ink) 1%, transparent);  /* Elevation for the floating layer: a toast over the page, and the layer a menu or a select popover rises onto. Four steps, each one lower, larger and fainter than the last, which is what reads as height rather than as a line — offsets 1/4/9/17, blur 2/4/6/7, alpha 10/9/5/1 per cent, measured on the menu node. Figma draws a fifth step at zero alpha; it is inert and dropped here. Reads off --c-ink, so it becomes a rise of light on the inverse sheet instead of a black smear on a dark page */

  /* texture opacity ceilings */
  --texture-quiet: 0.1;
  --texture-default: 0.18;
  --texture-loud: 0.26;

  /* toolbox.shop tape. Read only by components/tape.scss. Physical colours: the inverse sheet keeps them */
  --filament-red: #DB011C;
  --filament-yellow: #FEBD17;
  --filament-teal: #008290;
  --tape-stripe: 10px;  /* width of one colour stripe */
  --tape-edge: 15px;  /* height of the .tape-edge strip */

  /* layers */
  --layer-behind: -1;  /* Band media */
  --layer-base: 0;  /* Default stacking */
  --layer-raised: 10;  /* Main over curtain */
  --layer-sticky: 100;  /* Site header */
  --layer-overlay: 1000;  /* Dialogs and nav overlay */

  /* motion */
  --duration-fast: 120ms;  /* Micro interactions */
  --duration: 200ms;  /* Buttons, hover fade */
  --duration-slow: 320ms;  /* Larger motion */
  --duration-pulse: 2400ms;  /* Status glow */
  --ease: cubic-bezier(0.2, 0, 0, 1);  /* Default easing */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);  /* Ease in */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);  /* Ease out */

  /* grid */
  --grid-columns: 12;
  --grid-gutter: 24px;
  --grid-max: 1224px;
  --grid-margin-sm: 16px;
  --grid-margin-md: 32px;
  --grid-margin-lg: 48px;

  /* physical: label stock, ADA signage, relief. Paper is paper on any sheet */
  --label-4x6-w: 101.6mm;
  --label-4x6-h: 152.4mm;
  --label-margin: 5mm;
  --page-a4-w: 210mm;
  --page-a4-h: 297mm;
  --page-margin: 18mm;
  --page-gutter: 4mm;
  --sign-room-w: 152.4mm;
  --sign-room-h: 152.4mm;
  --sign-char-min: 15.9mm;
  --sign-char-max: 50.8mm;
  --sign-braille-gap: 9.5mm;
  --sign-margin: 12.7mm;
  --sign-mount-min: 1219mm;
  --sign-mount-max: 1524mm;
  --relief-min-h: 8mm;
  --relief-void: 0.8mm;
  --relief-depth: 0.6mm;
}

@media (min-width: 40rem) {
  :root {
    --text-xl: 24px;
    --leading-xl: 32px;
    --text-2xl: 28px;
    --leading-2xl: 36px;
    --text-3xl: 40px;
    --leading-3xl: 48px;
    --text-4xl: 48px;
    --leading-4xl: 56px;
    --text-5xl: 56px;
    --leading-5xl: 60px;
  }
}

@media (min-width: 64rem) {
  :root {
    --text-2xl: 32px;
    --leading-2xl: 40px;
    --text-3xl: 48px;
    --leading-3xl: 56px;
    --text-4xl: 64px;
    --leading-4xl: 72px;
    --text-5xl: 72px;
    --leading-5xl: 76px;
  }
}

/* Inverse sheet: a role remap, not a photographic reverse. Jobs keep their contrast.
   A nested .surface-inverse restores the paper sheet. Status fills stay; foreground and background swap. */

.surface-inverse {
  --c-paper: #0E0C09;
  --c-n-050: #2B2A27;
  --c-n-100: #3D3C39;
  --c-n-200: #3D3C39;
  --c-n-300: #555350;
  --c-n-400: #81807C;
  --c-n-500: #81807C;
  --c-n-600: #A9A8A5;
  --c-n-700: #DDDBD8;
  --c-n-800: #DDDBD8;
  --c-n-900: #DDDBD8;
  --c-ink: #FFFFFF;
  --surface-paper: #2B2A27;
  --surface-raised: #2B2A27;
  --surface-sunken: #3D3C39;
  --surface-selected: #555350;
  --surface-hover: #3D3C39;
  --surface-inverse: #FFFFFF;
  --surface-inverse-raised: #E5E3E0;
  --status-fault-foreground: #F2C6CD;
  --status-fault-background: #73212E;
  --status-warning-foreground: #FCF0C2;
  --status-warning-background: #796100;
  --status-ok-foreground: #C2E1D0;
  --status-ok-background: #00421F;
  --status-notice-foreground: #C2D8EE;
  --status-notice-background: #002F5C;

  /* jobs. Foreground roles; alias the ramp */
  --c-mark: var(--c-ink);
  --c-body: var(--c-n-900);
  --c-strong: var(--c-n-800);
  --c-mute: var(--c-n-600);
  --c-edge: var(--c-n-300);
  --c-bound: var(--c-n-500);

  /* action. Pressable fill; React Aria data-hovered / data-pressed */
  --action: var(--c-ink);
  --action-on: var(--c-paper);
  --action-hovered: var(--c-n-800);
  --action-pressed: var(--c-n-900);

  /* destructive. Alias of the fault fill for outlined destructive */
  --destructive: var(--status-fault);

  /* control colours */
  --disabled-fill: var(--c-n-200);
  --disabled-bound: var(--c-n-300);
  --disabled-text: var(--c-n-600);
  --c-placeholder: var(--c-n-600);
  --invalid: var(--status-fault-foreground);
  --selected-bound: var(--c-n-500);

  /* deprecated. Use --action*; kept for dist/ consumers */
  --primary: var(--action);
  --primary-on: var(--action-on);
  --primary-hover: var(--action-hovered);
  --primary-active: var(--action-pressed);
  --primary-background: var(--c-n-100);  /* legacy hover well */
  --primary-foreground: var(--c-ink);  /* legacy emphasis */
  --focus-ink: var(--action);
}

.surface-inverse .surface-inverse {
  --c-paper: #FFFFFF;
  --c-n-050: #E5E3E0;
  --c-n-100: #DDDBD8;
  --c-n-200: #D1D0CC;
  --c-n-300: #C2C0BD;
  --c-n-400: #A9A8A5;
  --c-n-500: #81807C;
  --c-n-600: #676562;
  --c-n-700: #555350;
  --c-n-800: #3D3C39;
  --c-n-900: #2B2A27;
  --c-ink: #0E0C09;
  --surface-paper: #FFFFFF;
  --surface-raised: #E5E3E0;
  --surface-sunken: #DDDBD8;
  --surface-selected: #DDDBD8;
  --surface-hover: #E5E3E0;
  --surface-inverse: #2B2A27;
  --surface-inverse-raised: #2B2A27;
  --status-fault-foreground: #73212E;
  --status-fault-background: #F2C6CD;
  --status-warning-foreground: #796100;
  --status-warning-background: #FCF0C2;
  --status-ok-foreground: #00421F;
  --status-ok-background: #C2E1D0;
  --status-notice-foreground: #002F5C;
  --status-notice-background: #C2D8EE;

  /* jobs. Foreground roles; alias the ramp */
  --c-mark: var(--c-ink);
  --c-body: var(--c-n-900);
  --c-strong: var(--c-n-800);
  --c-mute: var(--c-n-600);
  --c-edge: var(--c-n-300);
  --c-bound: var(--c-n-500);

  /* action. Pressable fill; React Aria data-hovered / data-pressed */
  --action: var(--c-ink);
  --action-on: var(--c-paper);
  --action-hovered: var(--c-n-800);
  --action-pressed: var(--c-n-900);

  /* destructive. Alias of the fault fill for outlined destructive */
  --destructive: var(--status-fault);

  /* control colours */
  --disabled-fill: var(--c-n-200);
  --disabled-bound: var(--c-n-300);
  --disabled-text: var(--c-n-600);
  --c-placeholder: var(--c-n-600);
  --invalid: var(--status-fault);
  --selected-bound: var(--c-n-500);

  /* deprecated. Use --action*; kept for dist/ consumers */
  --primary: var(--action);
  --primary-on: var(--action-on);
  --primary-hover: var(--action-hovered);
  --primary-active: var(--action-pressed);
  --primary-background: var(--c-n-100);  /* legacy hover well */
  --primary-foreground: var(--c-ink);  /* legacy emphasis */
  --focus-ink: var(--action);
}

.surface-inverse .surface-inverse .surface-inverse {
  --c-paper: #0E0C09;
  --c-n-050: #2B2A27;
  --c-n-100: #3D3C39;
  --c-n-200: #3D3C39;
  --c-n-300: #555350;
  --c-n-400: #81807C;
  --c-n-500: #81807C;
  --c-n-600: #A9A8A5;
  --c-n-700: #DDDBD8;
  --c-n-800: #DDDBD8;
  --c-n-900: #DDDBD8;
  --c-ink: #FFFFFF;
  --surface-paper: #2B2A27;
  --surface-raised: #2B2A27;
  --surface-sunken: #3D3C39;
  --surface-selected: #555350;
  --surface-hover: #3D3C39;
  --surface-inverse: #FFFFFF;
  --surface-inverse-raised: #E5E3E0;
  --status-fault-foreground: #F2C6CD;
  --status-fault-background: #73212E;
  --status-warning-foreground: #FCF0C2;
  --status-warning-background: #796100;
  --status-ok-foreground: #C2E1D0;
  --status-ok-background: #00421F;
  --status-notice-foreground: #C2D8EE;
  --status-notice-background: #002F5C;

  /* jobs. Foreground roles; alias the ramp */
  --c-mark: var(--c-ink);
  --c-body: var(--c-n-900);
  --c-strong: var(--c-n-800);
  --c-mute: var(--c-n-600);
  --c-edge: var(--c-n-300);
  --c-bound: var(--c-n-500);

  /* action. Pressable fill; React Aria data-hovered / data-pressed */
  --action: var(--c-ink);
  --action-on: var(--c-paper);
  --action-hovered: var(--c-n-800);
  --action-pressed: var(--c-n-900);

  /* destructive. Alias of the fault fill for outlined destructive */
  --destructive: var(--status-fault);

  /* control colours */
  --disabled-fill: var(--c-n-200);
  --disabled-bound: var(--c-n-300);
  --disabled-text: var(--c-n-600);
  --c-placeholder: var(--c-n-600);
  --invalid: var(--status-fault-foreground);
  --selected-bound: var(--c-n-500);

  /* deprecated. Use --action*; kept for dist/ consumers */
  --primary: var(--action);
  --primary-on: var(--action-on);
  --primary-hover: var(--action-hovered);
  --primary-active: var(--action-pressed);
  --primary-background: var(--c-n-100);  /* legacy hover well */
  --primary-foreground: var(--c-ink);  /* legacy emphasis */
  --focus-ink: var(--action);
}

/* Physical surfaces have no inverse: a print sheet or a label is white paper on any screen. */

.surface-inverse :is(.sheet, .label-stock),
.surface-inverse .surface-inverse .surface-inverse :is(.sheet, .label-stock) {
  --c-paper: #FFFFFF;
  --c-n-050: #E5E3E0;
  --c-n-100: #DDDBD8;
  --c-n-200: #D1D0CC;
  --c-n-300: #C2C0BD;
  --c-n-400: #A9A8A5;
  --c-n-500: #81807C;
  --c-n-600: #676562;
  --c-n-700: #555350;
  --c-n-800: #3D3C39;
  --c-n-900: #2B2A27;
  --c-ink: #0E0C09;
  --surface-paper: #FFFFFF;
  --surface-raised: #E5E3E0;
  --surface-sunken: #DDDBD8;
  --surface-selected: #DDDBD8;
  --surface-hover: #E5E3E0;
  --surface-inverse: #2B2A27;
  --surface-inverse-raised: #2B2A27;
  --status-fault-foreground: #73212E;
  --status-fault-background: #F2C6CD;
  --status-warning-foreground: #796100;
  --status-warning-background: #FCF0C2;
  --status-ok-foreground: #00421F;
  --status-ok-background: #C2E1D0;
  --status-notice-foreground: #002F5C;
  --status-notice-background: #C2D8EE;

  /* jobs. Foreground roles; alias the ramp */
  --c-mark: var(--c-ink);
  --c-body: var(--c-n-900);
  --c-strong: var(--c-n-800);
  --c-mute: var(--c-n-600);
  --c-edge: var(--c-n-300);
  --c-bound: var(--c-n-500);

  /* action. Pressable fill; React Aria data-hovered / data-pressed */
  --action: var(--c-ink);
  --action-on: var(--c-paper);
  --action-hovered: var(--c-n-800);
  --action-pressed: var(--c-n-900);

  /* destructive. Alias of the fault fill for outlined destructive */
  --destructive: var(--status-fault);

  /* control colours */
  --disabled-fill: var(--c-n-200);
  --disabled-bound: var(--c-n-300);
  --disabled-text: var(--c-n-600);
  --c-placeholder: var(--c-n-600);
  --invalid: var(--status-fault);
  --selected-bound: var(--c-n-500);

  /* deprecated. Use --action*; kept for dist/ consumers */
  --primary: var(--action);
  --primary-on: var(--action-on);
  --primary-hover: var(--action-hovered);
  --primary-active: var(--action-pressed);
  --primary-background: var(--c-n-100);  /* legacy hover well */
  --primary-foreground: var(--c-ink);  /* legacy emphasis */
  --focus-ink: var(--action);
}

/* ==== src/components/code-themes/github.scss ==== */
:root {
  --syntax-surface: #F6F8FA;
  --syntax-lineHighlight: #FFFFFF;
  --syntax-shadow: #E4E8EC;
  --syntax-text: #1F2328;
  --syntax-comment: #656C77;
  --syntax-punctuation: #1F2328;
  --syntax-operator: #1F2328;
  --syntax-keyword: #CF222E;
  --syntax-tag: #116329;
  --syntax-function: #7F4CDB;
  --syntax-type: #953800;
  --syntax-string: #0A3069;
  --syntax-number: #0550AE;
  --syntax-add: #116329;
  --syntax-addTint: #DAFBE1;
  --syntax-remove: #82071E;
  --syntax-removeTint: #FFEBE9;
}

.surface-inverse .surface-inverse {
  --syntax-surface: #F6F8FA;
  --syntax-lineHighlight: #FFFFFF;
  --syntax-shadow: #E4E8EC;
  --syntax-text: #1F2328;
  --syntax-comment: #656C77;
  --syntax-punctuation: #1F2328;
  --syntax-operator: #1F2328;
  --syntax-keyword: #CF222E;
  --syntax-tag: #116329;
  --syntax-function: #7F4CDB;
  --syntax-type: #953800;
  --syntax-string: #0A3069;
  --syntax-number: #0550AE;
  --syntax-add: #116329;
  --syntax-addTint: #DAFBE1;
  --syntax-remove: #82071E;
  --syntax-removeTint: #FFEBE9;
}

.code-theme-github {
  --syntax-surface: #F6F8FA;
  --syntax-lineHighlight: #FFFFFF;
  --syntax-shadow: #E4E8EC;
  --syntax-text: #1F2328;
  --syntax-comment: #656C77;
  --syntax-punctuation: #1F2328;
  --syntax-operator: #1F2328;
  --syntax-keyword: #CF222E;
  --syntax-tag: #116329;
  --syntax-function: #7F4CDB;
  --syntax-type: #953800;
  --syntax-string: #0A3069;
  --syntax-number: #0550AE;
  --syntax-add: #116329;
  --syntax-addTint: #DAFBE1;
  --syntax-remove: #82071E;
  --syntax-removeTint: #FFEBE9;
}

.code-theme-github .surface-inverse .surface-inverse {
  --syntax-surface: #F6F8FA;
  --syntax-lineHighlight: #FFFFFF;
  --syntax-shadow: #E4E8EC;
  --syntax-text: #1F2328;
  --syntax-comment: #656C77;
  --syntax-punctuation: #1F2328;
  --syntax-operator: #1F2328;
  --syntax-keyword: #CF222E;
  --syntax-tag: #116329;
  --syntax-function: #7F4CDB;
  --syntax-type: #953800;
  --syntax-string: #0A3069;
  --syntax-number: #0550AE;
  --syntax-add: #116329;
  --syntax-addTint: #DAFBE1;
  --syntax-remove: #82071E;
  --syntax-removeTint: #FFEBE9;
}

.surface-inverse {
  --syntax-surface: #161B22;
  --syntax-lineHighlight: #1E242C;
  --syntax-shadow: #0D1117;
  --syntax-text: #E6EDF3;
  --syntax-comment: #8B949E;
  --syntax-punctuation: #E6EDF3;
  --syntax-operator: #E6EDF3;
  --syntax-keyword: #FF7B72;
  --syntax-tag: #7EE787;
  --syntax-function: #D2A8FF;
  --syntax-type: #FFA657;
  --syntax-string: #A5D6FF;
  --syntax-number: #79C0FF;
  --syntax-add: #7EE787;
  --syntax-addTint: #04260F;
  --syntax-remove: #FFA198;
  --syntax-removeTint: #490202;
}

.surface-inverse .surface-inverse .surface-inverse {
  --syntax-surface: #161B22;
  --syntax-lineHighlight: #1E242C;
  --syntax-shadow: #0D1117;
  --syntax-text: #E6EDF3;
  --syntax-comment: #8B949E;
  --syntax-punctuation: #E6EDF3;
  --syntax-operator: #E6EDF3;
  --syntax-keyword: #FF7B72;
  --syntax-tag: #7EE787;
  --syntax-function: #D2A8FF;
  --syntax-type: #FFA657;
  --syntax-string: #A5D6FF;
  --syntax-number: #79C0FF;
  --syntax-add: #7EE787;
  --syntax-addTint: #04260F;
  --syntax-remove: #FFA198;
  --syntax-removeTint: #490202;
}

.code-theme-github.surface-inverse,
.surface-inverse .code-theme-github,
.code-theme-github .surface-inverse {
  --syntax-surface: #161B22;
  --syntax-lineHighlight: #1E242C;
  --syntax-shadow: #0D1117;
  --syntax-text: #E6EDF3;
  --syntax-comment: #8B949E;
  --syntax-punctuation: #E6EDF3;
  --syntax-operator: #E6EDF3;
  --syntax-keyword: #FF7B72;
  --syntax-tag: #7EE787;
  --syntax-function: #D2A8FF;
  --syntax-type: #FFA657;
  --syntax-string: #A5D6FF;
  --syntax-number: #79C0FF;
  --syntax-add: #7EE787;
  --syntax-addTint: #04260F;
  --syntax-remove: #FFA198;
  --syntax-removeTint: #490202;
}

/* ==== src/components/code-themes/catppuccin.scss ==== */
.code-theme-catppuccin {
  --syntax-surface: #EFF1F5;
  --syntax-lineHighlight: #F9FAFB;
  --syntax-shadow: #BCC0CC;
  --syntax-text: #4C4F69;
  --syntax-comment: #5C5E71;
  --syntax-punctuation: #5C5E71;
  --syntax-operator: #016690;
  --syntax-keyword: #7E29E2;
  --syntax-tag: #0652E0;
  --syntax-function: #0652E0;
  --syntax-type: #895302;
  --syntax-string: #1B6E00;
  --syntax-number: #A63D00;
  --syntax-add: #1D7400;
  --syntax-addTint: #DAE7DD;
  --syntax-remove: #C00532;
  --syntax-removeTint: #ECD6DE;
}

.code-theme-catppuccin .surface-inverse .surface-inverse {
  --syntax-surface: #EFF1F5;
  --syntax-lineHighlight: #F9FAFB;
  --syntax-shadow: #BCC0CC;
  --syntax-text: #4C4F69;
  --syntax-comment: #5C5E71;
  --syntax-punctuation: #5C5E71;
  --syntax-operator: #016690;
  --syntax-keyword: #7E29E2;
  --syntax-tag: #0652E0;
  --syntax-function: #0652E0;
  --syntax-type: #895302;
  --syntax-string: #1B6E00;
  --syntax-number: #A63D00;
  --syntax-add: #1D7400;
  --syntax-addTint: #DAE7DD;
  --syntax-remove: #C00532;
  --syntax-removeTint: #ECD6DE;
}

.code-theme-catppuccin.surface-inverse,
.surface-inverse .code-theme-catppuccin,
.code-theme-catppuccin .surface-inverse {
  --syntax-surface: #1E1E2E;
  --syntax-lineHighlight: #262637;
  --syntax-shadow: #11111B;
  --syntax-text: #CDD6F4;
  --syntax-comment: #989EB7;
  --syntax-punctuation: #989EB7;
  --syntax-operator: #89DCEB;
  --syntax-keyword: #CBA6F7;
  --syntax-tag: #89B4FA;
  --syntax-function: #89B4FA;
  --syntax-type: #F9E2AF;
  --syntax-string: #A6E3A1;
  --syntax-number: #FAB387;
  --syntax-add: #A6E3A1;
  --syntax-addTint: #2E363C;
  --syntax-remove: #F38BA8;
  --syntax-removeTint: #382B3D;
}

/* ==== src/components/code-themes/elench.scss ==== */
.code-theme-elench {
  --syntax-surface: #DDDBD8;
  --syntax-lineHighlight: #E5E3E0;
  --syntax-shadow: #C2C0BD;
  --syntax-text: #2B2A27;
  --syntax-comment: #555350;
  --syntax-punctuation: #3D3C39;
  --syntax-operator: #555350;
  --syntax-keyword: #0E0C09;
  --syntax-tag: #3D3C39;
  --syntax-function: #0E0C09;
  --syntax-type: #555350;
  --syntax-string: #2B2A27;
  --syntax-number: #3D3C39;
  --syntax-add: #00421F;
  --syntax-addTint: #C2E1D0;
  --syntax-remove: #73212E;
  --syntax-removeTint: #F2C6CD;
  --syntax-comment-style: italic;
  --syntax-keyword-weight: 600;
}

.code-theme-elench .surface-inverse .surface-inverse {
  --syntax-surface: #DDDBD8;
  --syntax-lineHighlight: #E5E3E0;
  --syntax-shadow: #C2C0BD;
  --syntax-text: #2B2A27;
  --syntax-comment: #555350;
  --syntax-punctuation: #3D3C39;
  --syntax-operator: #555350;
  --syntax-keyword: #0E0C09;
  --syntax-tag: #3D3C39;
  --syntax-function: #0E0C09;
  --syntax-type: #555350;
  --syntax-string: #2B2A27;
  --syntax-number: #3D3C39;
  --syntax-add: #00421F;
  --syntax-addTint: #C2E1D0;
  --syntax-remove: #73212E;
  --syntax-removeTint: #F2C6CD;
  --syntax-comment-style: italic;
  --syntax-keyword-weight: 600;
}

.code-theme-elench.surface-inverse,
.surface-inverse .code-theme-elench,
.code-theme-elench .surface-inverse {
  --syntax-surface: #3D3C39;
  --syntax-lineHighlight: #2B2A27;
  --syntax-shadow: #0E0C09;
  --syntax-text: #E5E3E0;
  --syntax-comment: #C2C0BD;
  --syntax-punctuation: #DDDBD8;
  --syntax-operator: #D1D0CC;
  --syntax-keyword: #FFFFFF;
  --syntax-tag: #DDDBD8;
  --syntax-function: #FFFFFF;
  --syntax-type: #C2C0BD;
  --syntax-string: #E5E3E0;
  --syntax-number: #D1D0CC;
  --syntax-add: #C2E1D0;
  --syntax-addTint: #00421F;
  --syntax-remove: #F2C6CD;
  --syntax-removeTint: #73212E;
  --syntax-comment-style: italic;
  --syntax-keyword-weight: 600;
}

@font-face {
  font-family: "Asta Sans";
  src: url("./fonts/AstaSans-Variable.subset.woff2") format("woff2") tech("variations"), url("./fonts/AstaSans-Variable.subset.woff2") format("woff2-variations");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "iA Writer Mono V";
  src: url("./fonts/iAWriterMonoV.woff2") format("woff2") tech("variations"), url("./fonts/iAWriterMonoV.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "iA Writer Mono V fallback: Courier New";
  src: local("Courier New");
  size-adjust: 99.9837%;
  ascent-override: 102.5167%;
  descent-override: 27.5045%;
  font-weight: 400 700;
  font-style: normal;
}

@scope (.elench-ds) {
/* ==== src/base.scss ==== */
/* Reset, the scope root, and the behaviours components share. The sheet is
   built inside @scope (.elench-ds). Put that class on UIProvider, body, or
   any subtree that should emit the kit; :scope is that element. */
/* Box model and the scope root (document paint when the class is on body). */
:scope,
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:scope {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-feature-settings: var(--font-features-text);
  font-synthesis: none;
  background: var(--surface-paper);
  color: var(--c-body);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  font-weight: var(--weight-regular);
}

img, svg, video {
  display: block;
  max-width: 100%;
}

/* Width and height attributes reserve the ratio before metadata. */
video {
  inline-size: 100%;
  block-size: auto;
}

/* An embedded panel, such as a chart, spans its container. Its height
   attribute sets the height. */
iframe {
  display: block;
  inline-size: 100%;
  border: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Focus is specified, never left to the browser. The ring is the sheet's
   ink, so it clears 3:1 against the control and the surface behind it.
   :where() keeps the element ring at zero specificity; the React Aria
   data attribute carries the same ring on the kit controls. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.button[data-focus-visible],
.input[data-focus-visible],
.select[data-focus-visible],
.file[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

::selection {
  background: var(--c-mark);
  color: var(--action-on);
}

/* Colour is never the only signal, so the underline is not optional. */
a {
  color: var(--c-mark);
  text-decoration: underline;
  text-underline-offset: var(--space-1);
  text-decoration-thickness: var(--border-hairline);
}
a:hover {
  text-decoration-thickness: var(--border-strong);
}

strong, b {
  font-weight: var(--weight-medium);
}

.data, table, .num {
  font-feature-settings: var(--font-features-data);
}

.nowrap {
  white-space: nowrap;
}

/* One line, cut with an ellipsis; the page puts the whole text in a title.
   Overflow lets a flex or grid item shrink below its text, so it works in a
   row, and in a table cell whose width is set. An inline element needs a
   flex or grid parent to take the width. */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-inline-size: 0;
}

.skip {
  position: absolute;
  inset-block-start: var(--space-0);
  inset-inline-start: var(--space-0);
  transform: translateY(-200%);
  background: var(--c-mark);
  color: var(--action-on);
  padding: var(--space-2) var(--space-4);
  z-index: var(--layer-overlay);
}
.skip:focus {
  transform: translateY(0);
}

/* Surfaces. The inverse token remap is generated into tokens.css. This
   paints the band and sets color-scheme so form controls follow. A nested
   .surface-inverse restores the paper sheet. */
.surface-inverse {
  color-scheme: dark;
  background: var(--surface-paper);
  color: var(--c-n-900);
  -webkit-font-smoothing: antialiased;
}
.surface-inverse .surface-inverse {
  color-scheme: light;
  -webkit-font-smoothing: auto;
}
.surface-inverse .surface-inverse .surface-inverse {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

.surface-raised {
  background: var(--surface-raised);
}

.surface-sunken {
  background: var(--surface-sunken);
}

.surface-frost {
  background: color-mix(in srgb, var(--surface-paper) 48%, transparent);
  -webkit-backdrop-filter: blur(var(--space-6));
  backdrop-filter: blur(var(--space-6));
}

/* Icons. Fill follows currentColor. Button, field, and callout use these.
   The bare .icon is 24px; the suffix is the pixel size. */
.icon {
  display: block;
  flex: none;
  inline-size: var(--space-6);
  block-size: var(--space-6);
  fill: currentColor;
}
.icon-16 {
  inline-size: var(--space-4);
  block-size: var(--space-4);
}
.icon-20 {
  inline-size: var(--space-5);
  block-size: var(--space-5);
}
.icon-24 {
  inline-size: var(--space-6);
  block-size: var(--space-6);
}
.icon-32 {
  inline-size: var(--space-8);
  block-size: var(--space-8);
}

/* Motion. Duration and easing stay private tokens. */
.fade {
  transition: opacity var(--duration) var(--ease);
}

.hover-fade:hover .fade, .hover-fade:focus-within .fade {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ==== src/type.scss ==== */
/* Type. The faces, then the recipes a page may emit. The --text-* steps
   stay private to this sheet. There is no size utility class. */
/* Variable faces, both SIL OFL 1.1, both self-hosted. Paths are relative
   to the built sheet. Licences sit beside the files in dist/fonts/. */


/* Metric-matched fallbacks for the system faces, so swapping to the webfont
   moves no line. These use the method Astro generates its own font fallbacks
   with (Capsize's): size-adjust from the ratio of the two xWidthAvg figures,
   and the overrides as fractions of the webfont's em square once adjusted.
   Computed against Courier New as:

     iA Writer Mono V  vs Courier New   99.9837% 102.5167%  27.5045%

   The three figures per row are size-adjust, ascent-override and
   descent-override. Line-gap is left out where it already matches the fallback
   face. Regenerate the row if a font file or a source face changes; the face
   must stay listed in tokens.json around font.family.

   Menlo was dropped despite the closer look: local("Menlo") does not resolve
   out of its .ttc collection in Chrome, so that face never applies. Courier New
   resolves, and its advance matches the webfont's exactly.

   The sans deliberately gets no fallback face. An Arial face was measured and
   rejected: Arial's zero is 7.6% off Asta Sans's, so the ch-based measure
   column moved with it and the copy re-wrapped taller at every scale that
   fixed the column. The platform default (system-ui, SF Pro on macOS) lands
   within 3.4% on the column and re-wraps identically, so it is the better
   fallback for the sans. */

/* Headings. h1–h2 stay regular; h3 and below step up to medium. */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--c-mark);
  font-weight: var(--weight-regular);
}

h1 {
  font-size: var(--text-3xl);
  line-height: var(--leading-3xl);
  letter-spacing: var(--tracking-3xl);
}

h2 {
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
  letter-spacing: var(--tracking-2xl);
}

h3 {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  letter-spacing: var(--tracking-xl);
  font-weight: var(--weight-medium);
}

h4, h5, h6 {
  font-size: var(--text-md);
  line-height: var(--leading-md);
  font-weight: var(--weight-medium);
}

/* Prose measure. A paragraph and a .prose block share the default measure.
   Lists, figures, and quotes only tighten inside .prose. */
p {
  margin: 0;
  max-width: var(--measure-default);
}

.prose {
  max-width: var(--measure-default);
  /* Lists. A hanging dash for bullets, tabular mono for ordinals. */
}
.prose :is(ul, ol) {
  margin: var(--space-0);
  padding-inline-start: var(--space-8);
  max-width: var(--measure-default);
}
.prose :is(ul, ol) :is(ul, ol) {
  margin-block-start: var(--space-3);
}
.prose li + li {
  margin-block-start: var(--space-3);
}
.prose ul {
  list-style-type: "—";
}
.prose ul > li::marker {
  color: var(--c-mute);
}
.prose ol > li::marker {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  color: var(--c-mute);
}
.prose figure {
  margin: var(--space-0);
}
.prose {
  /* Pull quote. Larger type on the mark, a rule on the leading edge. */
}
.prose blockquote {
  margin: var(--space-0);
  padding-inline-start: var(--space-6);
  border-inline-start: var(--border-strong) solid var(--c-mark);
  max-width: var(--measure-tight);
  color: var(--c-mark);
}
.prose blockquote p {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  letter-spacing: var(--tracking-lg);
}
.prose blockquote cite {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  display: block;
  margin-block-start: var(--space-3);
  font-style: normal;
  color: var(--c-mute);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  max-width: var(--measure-tight);
}

/* Uppercase overlines. The only place tracking is opened up. */
.eyebrow,
.label {
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  color: var(--c-mute);
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
  letter-spacing: var(--tracking-2xs);
}

.eyebrow-micro {
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  color: var(--c-mute);
  font-size: var(--text-3xs);
  line-height: var(--leading-3xs);
  letter-spacing: var(--tracking-3xs);
}

/* The micro overline in the mono, for a label beside identifiers
   and telemetry: a job line, a unit heading, a slot column. */
.eyebrow-mono {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  color: var(--c-mute);
  font-size: var(--text-3xs);
  line-height: var(--leading-3xs);
  letter-spacing: var(--tracking-3xs);
}

figcaption,
.caption {
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
  color: var(--c-mute);
}

.muted {
  color: var(--c-mute);
}

/* Display sizes above the heading scale. */
.t-display {
  font-size: var(--text-4xl);
  line-height: var(--leading-4xl);
  letter-spacing: var(--tracking-4xl);
  color: var(--c-mark);
}

.t-hero {
  font-size: var(--text-5xl);
  line-height: var(--leading-5xl);
  letter-spacing: var(--tracking-5xl);
  color: var(--c-mark);
}

/* Identifiers and measurements: part numbers, batch codes, timestamps,
   telemetry, file names. Prose is never set in the mono. */
.t-mono {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

/* Inline code, keys, and sample output take the mono and the size of
   the line they sit in. A fenced block sets its own step on pre. */
code, kbd, samp {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: inherit;
  line-height: inherit;
}

/* The only place weight 600 appears: the numeral being reported.
   .t-kpi-sm is the same numeral at card size. */
.t-kpi {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
  letter-spacing: var(--tracking-2xl);
  font-weight: var(--weight-semibold);
  color: var(--c-mark);
}

.t-kpi-sm {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  letter-spacing: var(--tracking-xl);
}

pre {
  margin: var(--space-0);
  padding: var(--space-4);
  background: var(--surface-sunken);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

:not(pre) > code {
  background: var(--surface-sunken);
  color: var(--c-body);
  padding: var(--space-0) var(--space-1);
  border-radius: var(--radius-sm);
}

/* ==== src/components/button.scss ==== */
/* Button — React Aria Button. Hairline, no shadow. States via data-* only.

   Metrics come from Figma node 246:1968, frame "buttons - resized - readjusted
   paddings and text-size". The model states a block padding, an inline padding
   and a type size, and never a height: 30 / 38 / 46 px is what the hairline, the
   block padding and the line add up to. So --button-block is derived here, not
   drawn from a size token, and the three sizes differ in type as well as in
   padding. */
.button {
  --button-pad-block: var(--space-2);
  /* The model's inline padding is the space step plus the two hairlines it is
     measured past: 8 + 2 = 10 (sm), 16 + 2 = 18 (default and large). No space
     step carries 10 or 18 — the 4px base unit cannot name either — so it is
     built from the nearest step rather than snapped to it. */
  --button-pad-inline: calc(var(--space-4) + 2 * var(--border-hairline));
  --button-pad-icon: var(--space-3);
  /* One control line for all three sizes. Only the type size steps. */
  --button-type: var(--text-sm);
  --button-block: calc(
    2 * var(--border-hairline) + 2 * var(--button-pad-block) + var(--leading-sm)
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--button-pad-block) var(--button-pad-inline);
  min-height: var(--button-block);
  border: var(--border-hairline) solid transparent;
  border-radius: var(--radius-sm);
  /* The same seat every boxed control sits on: the inputs' 0 1px 0 at 8%.
     Built from --c-ink, so on the inverse sheet it reads as the light seat
     under the dark fill. Ghost opts out below — a transparent face has
     nothing to seat. */
  box-shadow: var(--shadow-faint);
  background: var(--action);
  color: var(--action-on);
  font-size: var(--button-type);
  line-height: var(--leading-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.button-sm {
  --button-pad-block: var(--space-1);
  --button-pad-inline: calc(var(--space-2) + 2 * var(--border-hairline));
  --button-pad-icon: var(--space-2);
  --button-type: var(--text-xs);
}
.button-lg {
  --button-pad-block: var(--space-3);
  --button-pad-inline: calc(var(--space-4) + 2 * var(--border-hairline));
  --button-pad-icon: var(--space-4);
  --button-type: var(--text-md);
}
.button > .icon,
.button > svg {
  max-width: none;
}
.button:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  background: var(--action-hovered);
}
.button:is([data-pressed], :active):not(:where(:disabled, [data-disabled], [aria-disabled=true])) {
  background: var(--action-pressed);
}
.button[data-pending] {
  cursor: wait;
}
.button[aria-label]:has(> svg:only-child) {
  padding: 0;
  inline-size: var(--button-block);
  block-size: var(--button-block);
}
.button:has(> :is(svg, .icon):first-child:not(:only-child)) {
  padding-inline-start: var(--button-pad-icon);
}
.button:has(> :is(svg, .icon):last-child:not(:only-child)) {
  padding-inline-end: var(--button-pad-icon);
}
.button-block {
  display: flex;
  inline-size: 100%;
}
.button-secondary {
  background: var(--surface-paper);
  border-color: var(--action);
  color: var(--c-mark);
}
.button-secondary:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  background: var(--surface-sunken);
  border-color: var(--c-mark);
}
.button-secondary:is([data-pressed], :active):not(:where(:disabled, [data-disabled], [aria-disabled=true])) {
  background: var(--c-n-200);
  border-color: var(--c-mark);
}
.button-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--c-mark);
}
.button-ghost:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  background: var(--surface-sunken);
  border-color: transparent;
}
.button-ghost:is([data-pressed], :active):not(:where(:disabled, [data-disabled], [aria-disabled=true])) {
  background: var(--c-n-200);
  border-color: transparent;
}
.button-destructive {
  background: var(--status-fault);
  color: var(--status-fault-on);
}
.button-destructive:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  background: var(--status-fault-hovered);
  border-color: transparent;
}
.button-destructive:is([data-pressed], :active):not(:where(:disabled, [data-disabled], [aria-disabled=true])) {
  background: var(--status-fault-pressed);
  border-color: transparent;
}
.button-destructive.button-secondary {
  background: var(--surface-paper);
  border-color: var(--destructive);
  color: var(--status-fault-foreground);
}
.button-destructive.button-secondary:is([data-hovered], [data-pressed], :hover, :active):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  background: var(--status-fault-background);
  border-color: var(--destructive);
  color: var(--status-fault-foreground);
}
.button-destructive.button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--status-fault-foreground);
}
.button-destructive.button-ghost:is([data-hovered], [data-pressed], :hover, :active):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  background: var(--status-fault-background);
  border-color: transparent;
}
.button:is([data-disabled], [aria-disabled=true], :disabled), .button:has(input:disabled) {
  background: var(--disabled-fill);
  border-color: var(--disabled-bound);
  color: var(--disabled-text);
  cursor: not-allowed;
}
.button-secondary:is([data-disabled], [aria-disabled=true], :disabled), .button-secondary:has(input:disabled) {
  background: var(--surface-paper);
  color: var(--disabled-text);
  border-color: var(--disabled-bound);
}
.button-secondary.button-destructive:is([data-disabled], [aria-disabled=true], :disabled), .button-secondary.button-destructive:has(input:disabled) {
  background: var(--surface-paper);
  color: var(--disabled-text);
  border-color: var(--disabled-bound);
}
.button-destructive:is([data-disabled], [aria-disabled=true], :disabled), .button-destructive:has(input:disabled) {
  background: var(--disabled-fill);
  border-color: var(--disabled-bound);
  color: var(--disabled-text);
}
.button-destructive.button-ghost:is([data-disabled], [aria-disabled=true], :disabled), .button-destructive.button-ghost:has(input:disabled) {
  background: var(--disabled-fill);
  border-color: var(--disabled-bound);
}
@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

/* ==== src/components/link.scss ==== */
/* Directional wayfinding links. Underlined body links in nav and prose stay native <a>. */
.link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  white-space: nowrap;
  color: var(--primary-foreground);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.link:focus-visible {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-width);
}

.link-mark {
  display: inline-block;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .link-mark {
    transition: none;
  }
}
.link:focus-visible .link-mark {
  opacity: 1;
  transform: none;
}

@media (hover: hover) {
  .link:hover .link-mark {
    opacity: 1;
    transform: none;
  }
}
.link-n .link-mark {
  transform: translateY(var(--space-1));
}

.link-ne .link-mark {
  transform: translate(calc(-1 * var(--space-1)), var(--space-1));
}

.link-e .link-mark {
  transform: translateX(calc(-1 * var(--space-1)));
}

.link-se .link-mark {
  transform: translate(calc(-1 * var(--space-1)), calc(-1 * var(--space-1)));
}

.link-s .link-mark {
  transform: translateY(calc(-1 * var(--space-1)));
}

.link-sw .link-mark {
  transform: translate(var(--space-1), calc(-1 * var(--space-1)));
}

.link-w .link-mark {
  transform: translateX(var(--space-1));
}

.link-nw .link-mark {
  transform: translate(var(--space-1), var(--space-1));
}

/* ==== src/components/field.scss ==== */
/* Field chrome — the label, hint, error and group every field control
   shares, plus the optional adornment frame. Structure only: state paint lives
   in the shared control layer (_control.scss) and in each control's sheet. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* One label style: a React Aria Label, a plain <label> in the class API, or a
   group legend. A .check inside .field is the control, not the label.

   Node 292:598 sets the label at 13px on a 16px line, weight 500, letterSpacing
   0 and no text case — sentence case, not the eyebrow's all-caps. The 13/16
   pair is deliberate and crosses a step: --text-xs carries --leading-xs (20px)
   in the scale, but the node's label line is 16, so --leading-2xs is held here.
   Do not "correct" it to --leading-xs. The label paints --c-strong (n-800),
   two ramp steps darker than the --c-mute hint that follows it, so a label and
   its supportive text can never read as the same line again. */
.field > label:not(.check),
.field-group > legend,
.field-label {
  font-size: var(--text-xs);
  line-height: var(--leading-2xs);
  letter-spacing: var(--tracking-xs);
  font-weight: var(--weight-medium);
  color: var(--c-strong);
}

.field-group > legend {
  padding: 0;
  float: none;
}

/* The required mark: one glyph after the label of a field that carries the
   required state. The mark follows the element that OWNS the requirement, not
   every element React Aria marks: a required CheckboxGroup, RadioGroup or
   ChoiceGroup puts `data-required` on the group and copies it onto each of its
   options, so the group's legend carries the mark and the group rescinds the
   one its options were given. A control that stands alone owns its own state
   and marks its own label.

   Two spellings, one paint, the way the shared control layer writes its
   states: React Aria's `data-required`, which a class-API group writes on the
   group itself, and the native `required` a plain-HTML control carries. A
   group states its own requirement on the group; a bare `required` on one of
   its options marks that option.

   The ink is the field-fault ink the error line already uses, and the glyph is
   never the only signal — React Aria puts `required` / `aria-required` on the
   control, so a reader hears the state whatever the sheet paints. */
.field:is([data-required], :has(:required)) > :is(label, legend, .field-label):not(.check)::after,
.field-group[data-required] > :is(legend, .field-label)::after,
:is(.check, .switch, .radio):is([data-required], :has(> input:required))::after {
  content: "*";
  margin-inline-start: var(--space-1);
  color: var(--invalid);
}

/* The group that owns the requirement rescinds the mark React Aria copied onto
   its options. Selection, not specificity: this rule outranks the mark above
   by one class, so it holds wherever the two sit. */
.field-group[data-required] :is(.check, .switch, .radio)::after {
  content: none;
}

/* A choice label is a flex row, so its mark is a row item and the row's own
   gap already stands before it: the pull takes that gap back to --space-1, the
   distance the mark keeps inside a label's own line. */
:is(.check, .switch, .radio):is([data-required], :has(> input:required))::after {
  margin-inline-start: calc(var(--space-1) - var(--space-2));
}

.field-hint {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  color: var(--c-mute);
}

/* A choice control's message line belongs to its label, so it starts where the
   label text starts — the control plus the label's own gap — not under the box.
   A group's description stays at the group's edge: it describes the set, not
   the first option. */
.field:has(> .check) > :is(.field-hint, .field-error),
.check ~ :is(.field-hint, .field-error),
.radio ~ :is(.field-hint, .field-error) {
  padding-inline-start: calc(var(--space-5) + var(--space-2));
}

.switch ~ :is(.field-hint, .field-error) {
  padding-inline-start: calc(var(--space-10) + var(--space-2));
}

/* When the field is invalid the error element is the only message line: the
   hint beside which it renders is hidden, and the error carries the
   supportive text and the fault text in one line, separated by an em dash —
   "Between 1 and 500. — Quantity is out of range." — all in the fault ink.
   (The React wrapper composes that line; the class API writes it by hand.) */
.field-hint:has(+ .field-error) {
  display: none;
}

/* Error carries three signals: border weight, a glyph, and text. Never hue
   alone. The hue is only there because the fault palette already exists. */
.field-error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  color: var(--invalid);
  font-weight: var(--weight-medium);
}

.field-error::before {
  content: "✕";
  font-weight: var(--weight-semibold);
}

/* Adornment frame. Optional: it positions one leading glyph or one trailing
   affix over the control and widens that side's padding. A control without
   adornments needs no frame. Both slots are inert; an interactive trailing
   action is a .button. */
.field-shell {
  position: relative;
  display: block;
}

.field-icon,
.field-affix {
  position: absolute;
  inset-block-start: 50%;
  translate: 0 -50%;
  display: flex;
  align-items: center;
  color: var(--c-mute);
  pointer-events: none;
}

.field-icon {
  inset-inline-start: var(--space-3);
}

.field-affix {
  inset-inline-end: var(--space-3);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

/* A textarea grows downward: its glyph sits on the first line. */
.field-shell:has(> .textarea) > .field-icon {
  inset-block-start: calc(var(--space-2) + (var(--leading-sm) - var(--space-4)) / 2);
  translate: none;
}

.field-shell:has(> .field-icon) > :is(.input, .select, .textarea) {
  padding-inline-start: var(--space-8);
}

.field-shell:has(> .field-affix) > :is(.input, .select, .textarea) {
  padding-inline-end: var(--space-8);
}

.field-icon > .icon,
.field-affix > .icon {
  max-width: none;
}

/* Field group: one legend, then stacked options. Shared by checkbox, radio,
   and switch groups so the label always reads as .field-label. */
.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.field-group-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Kit-only layout: the same options as a row that wraps. It sets nothing but
   direction, wrapping and a step more gap than the stack — a row needs more air
   between its controls than a column does. It never touches React Aria's
   `orientation`, which owns `aria-orientation` and the arrow keys. Where the
   controls sit is paint; how they behave is not. */
.field-group-options-linear {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.field-group-options.choices {
  display: grid;
  gap: var(--space-3);
}

.field-group-options.choices-row {
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

/* ==== src/components/search-field.scss ==== */
/* Search field. The control's chrome is the shared field layer; this places the
   clear affordance in the shell around the input, so it centres on the input's
   own box rather than on the label above it. The Button itself is the kit's,
   painted by its own sheet. */
.search-field {
  position: relative;
}

.search-input {
  padding-inline-end: var(--space-10);
}

/* Chromium and WebKit paint their own cancel button inside `input[type=search]`.
   It is a second X beside React Aria's clear control, in the UA's own accent
   colour, so it comes off here — the same suppression React Aria's own sheet
   carries. */
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.search-clear {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--space-2);
  translate: 0 -50%;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--space-6);
  block-size: var(--space-6);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-mute);
  cursor: pointer;
}

.search-clear:is([data-hovered], :hover) {
  color: var(--c-ink);
}

.search-clear:is([data-pressed], :active) {
  color: var(--c-body);
}

.search-clear:is([data-focus-visible], :focus-visible) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

.search-clear[data-disabled] {
  color: var(--c-mute);
  cursor: not-allowed;
}

/* Nothing to clear: hide the affordance rather than leave a dead control. */
.search-empty .search-clear {
  display: none;
}

/* The inline end is React Aria's dynamic affordance: this mark while the field
   is empty, and the clear control once there is a query. Both sit in the same
   box, so the glyph does not move when it becomes a control. A mark is not a
   control: it never takes a click or a tab stop. */
.search-mark {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--space-2);
  translate: 0 -50%;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--space-6);
  block-size: var(--space-6);
  color: var(--c-mute);
  pointer-events: none;
}

.search-field:not(.search-empty) .search-mark {
  display: none;
}

/* ==== src/components/textfield.scss ==== */
/* Input — React Aria Input. One box, painted by the shared control layer. */
.input {
  inline-size: 100%;
  min-block-size: var(--control-min);
  padding: var(--space-2) var(--space-3);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  /* The seat: every box in Figma node 292:598 carries 0 1px 0 at 8%. It is
     built from --c-ink, so on the inverse sheet it becomes a light seat
     instead of disappearing. The choice controls restate this in their own
     shadow lists because a ring replaces the whole list; they do not read
     this mixin. */
  box-shadow: var(--shadow-faint);
  color: var(--c-mark);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-feature-settings: var(--font-features-data);
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease);
  appearance: none;
}
.input::placeholder {
  color: var(--c-placeholder);
}
.input {
  /* Node 292:598's hover variant steps the boundary to n-600, which is
     --c-mute exactly — the step the choice controls already hover to. */
}
.input:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  border-color: var(--c-mute);
}
.input:is([data-focus-visible], :focus-visible, :has(> input:focus-visible)) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
  /* Focus is the darkest step of the boundary ladder: rest n-500, hover
     n-600, focus ink. The ring is not the only signal. */
  border-color: var(--c-mark);
}
.input:is([data-disabled], [aria-disabled=true], :disabled), .input:has(input:disabled) {
  background: var(--surface-sunken);
  border-color: var(--disabled-bound);
  color: var(--disabled-text);
  cursor: not-allowed;
}
.input:is([data-invalid], [aria-invalid=true]) {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}

/* ==== src/components/textarea.scss ==== */
/* TextArea — the multi-line control inside a TextField. Shares the box. */
.textarea {
  inline-size: 100%;
  min-block-size: var(--control-min);
  padding: var(--space-2) var(--space-3);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  /* The seat: every box in Figma node 292:598 carries 0 1px 0 at 8%. It is
     built from --c-ink, so on the inverse sheet it becomes a light seat
     instead of disappearing. The choice controls restate this in their own
     shadow lists because a ring replaces the whole list; they do not read
     this mixin. */
  box-shadow: var(--shadow-faint);
  color: var(--c-mark);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-feature-settings: var(--font-features-data);
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease);
  appearance: none;
  min-block-size: var(--space-24);
  resize: vertical;
}
.textarea::placeholder {
  color: var(--c-placeholder);
}
.textarea {
  /* Node 292:598's hover variant steps the boundary to n-600 = --c-mute. */
}
.textarea:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  border-color: var(--c-mute);
}
.textarea:is([data-focus-visible], :focus-visible, :has(> input:focus-visible)) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
  /* Focus is the darkest step of the boundary ladder: rest n-500, hover
     n-600, focus ink. The ring is not the only signal. */
  border-color: var(--c-mark);
}
.textarea:is([data-disabled], [aria-disabled=true], :disabled), .textarea:has(input:disabled) {
  background: var(--surface-sunken);
  border-color: var(--disabled-bound);
  color: var(--disabled-text);
  cursor: not-allowed;
}
.textarea:is([data-invalid], [aria-invalid=true]) {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}

/* ==== src/components/select.scss ==== */
/* Select — React Aria Select. The native <select> in the class API and the
   React Aria trigger share .select; the popover holds the listbox. */
.select {
  inline-size: 100%;
  min-block-size: var(--control-min);
  padding: var(--space-2) var(--space-3);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  /* The seat: every box in Figma node 292:598 carries 0 1px 0 at 8%. It is
     built from --c-ink, so on the inverse sheet it becomes a light seat
     instead of disappearing. The choice controls restate this in their own
     shadow lists because a ring replaces the whole list; they do not read
     this mixin. */
  box-shadow: var(--shadow-faint);
  color: var(--c-mark);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-feature-settings: var(--font-features-data);
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease);
  appearance: none;
  padding-inline-end: var(--space-8);
  /* caret drawn from the lattice: a square, not a chevron */
  background-image: linear-gradient(var(--c-mark), var(--c-mark));
  background-repeat: no-repeat;
  background-size: var(--space-2) var(--space-2);
  background-position: right var(--space-3) center;
}
.select:dir(rtl) {
  background-position: left var(--space-3) center;
}
.select-sm {
  /* The small select: .button-sm's height, for a row it shares with small
     buttons. The square keeps its size and stands one small inline padding
     from the edge and from the value. */
  min-block-size: calc(2 * var(--border-hairline) + 2 * var(--space-1) + var(--leading-sm));
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  padding-inline-end: var(--space-6);
  background-position: right var(--space-2) center;
}
.select-sm:dir(rtl) {
  background-position: left var(--space-2) center;
}
.select {
  /* Node 292:598's hover variant steps the boundary to n-600 = --c-mute. */
}
.select:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) {
  border-color: var(--c-mute);
}
.select:is([data-focus-visible], :focus-visible, :has(> input:focus-visible)) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
  /* Focus is the darkest step of the boundary ladder: rest n-500, hover
     n-600, focus ink. The ring is not the only signal. */
  border-color: var(--c-mark);
}
.select:is([data-disabled], [aria-disabled=true], :disabled), .select:has(input:disabled) {
  background-color: var(--surface-sunken);
  border-color: var(--disabled-bound);
  color: var(--disabled-text);
  cursor: not-allowed;
}
.select:is([data-invalid], [aria-invalid=true]) {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}

/* The React Aria trigger is a button. The Select root carries the state, so
   disabled, invalid and open read from the field. */
.select-trigger {
  display: flex;
  align-items: center;
  text-align: start;
  inline-size: 100%;
  cursor: pointer;
}

.field[data-open] .select-trigger {
  border-color: var(--c-mark);
}

.field[data-disabled] .select-trigger {
  background-color: var(--surface-sunken);
  border-color: var(--disabled-bound);
  color: var(--disabled-text);
  cursor: not-allowed;
}

.field[data-invalid] .select-trigger {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}

.select-value[data-placeholder] {
  color: var(--c-placeholder);
}

.select-popover {
  /* --trigger-width is supplied by React Aria at runtime. */
  --trigger-width: auto;
  min-inline-size: var(--trigger-width);
  max-inline-size: calc(100vw - var(--space-8));
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  /* The menu popover's corner and rise: one elevation, the same shadow. */
  box-shadow: var(--shadow-overlay);
  background: var(--surface-paper);
  color: var(--c-mark);
  z-index: var(--layer-overlay);
  overflow: auto;
}

.select-list {
  padding: var(--space-1);
  outline: none;
}

.select-option {
  position: relative;
  /* Same construction as .menu-item: the state tint is a pseudo inset by a
     hairline top and bottom, so two rows show 2px of surface between their
     fills while the boxes stay contiguous for the pointer. */
  isolation: isolate;
  /* The menu row's own box: a flex line centres the option's text in the
     32px row, and the gap holds a leading glyph or swatch off the label. A
     block box would pin the 20px line to the padding edge and leave the
     extra 4px below the text. */
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--space-8);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  cursor: pointer;
  outline: none;
}

.select-option::before {
  content: "";
  position: absolute;
  inset-block: var(--border-hairline);
  inset-inline: 0;
  z-index: -1;
  border-radius: var(--radius-xs);
  background: transparent;
  transition: background-color var(--duration-fast) var(--ease);
}

/* Selection reads like the menu's: a chosen row carries the selected tint
   plus the medium weight; the pointer carries the stronger hover tint. */
.select-option[data-selected] {
  font-weight: var(--weight-medium);
}

/* The pointer tint never lands on a disabled option, and `selected` is declared
   after it so a chosen option keeps its own fill under the pointer. */
.select-option:is([data-hovered], [data-focused], :hover):not(:where([data-disabled], [aria-disabled=true]))::before {
  background: var(--surface-hover);
}

.select-option[data-selected]::before {
  background: var(--surface-selected);
}

.select-option[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: calc(-1 * var(--focus-offset));
}

.select-option[data-disabled] {
  color: var(--disabled-text);
  cursor: not-allowed;
}

/* ==== src/components/checkbox.scss ==== */
/* Checkbox — React Aria CheckboxField + CheckboxButton. Not the deprecated
   single Checkbox. The class API puts a native input here instead; both are
   the same box, so the state rules cover both. */
.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  cursor: pointer;
  /* The label is a target, not text to be copied. */
  user-select: none;
}
.check > input,
.check > .check-indicator {
  appearance: none;
  inline-size: var(--space-5);
  block-size: var(--space-5);
  margin: 0;
  flex: none;
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  box-shadow: var(--shadow-faint);
  cursor: pointer;
}
.check > .check-indicator {
  display: inline-block;
}
.check {
  /* The one platform-imposed round corner. */
}
.check > input[type=radio] {
  border-radius: var(--radius-full);
}
.check {
  /* The chosen mark is painted, not the inner edge of an inset ring: that edge
     is the box radius minus the spread (--radius-sm - 3px here), which clamps
     to a square. A real element carries its own --radius-xs corner while the
     box keeps the control corner. Its seat matches the box's hairline plus the
     3px paper ring: --space-1 from the box edge, and the designed 12px mark.
     Figma node 278:440, checkbox:on. */
}
.check::before {
  content: "";
  position: absolute;
  inset-block-start: var(--space-1);
  inset-inline-start: var(--space-1);
  inline-size: var(--space-3);
  block-size: var(--space-3);
  border-radius: var(--radius-xs);
  background: var(--c-mark);
  pointer-events: none;
  display: none;
}
.check {
  /* A disabled box is one flat surface: the mark does not survive it. */
}
.check[data-selected]:not([data-indeterminate]):not([data-disabled]):not(:has(> input:disabled))::before, .check:not([data-indeterminate]):not([data-disabled]):not(:has(> input:disabled)):has(> input:checked)::before {
  display: block;
}
.check {
  /* Indeterminate is a bar on a paper box, not a filled one. */
}
.check[data-indeterminate] > .check-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-paper);
  box-shadow: var(--shadow-faint);
}
.check[data-indeterminate] > .check-indicator::before {
  content: "";
  inline-size: var(--space-3);
  block-size: var(--border-strong);
  background: var(--c-ink);
}
.check:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) > :is(.check-indicator, input) {
  border-color: var(--c-mute);
}
.check:is([data-focus-visible], :focus-visible, :has(> input:focus-visible)) > :is(.check-indicator, input) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}
.check:is([data-invalid], [aria-invalid=true]) > :is(.check-indicator, input) {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}
.check:is([data-disabled], [aria-disabled=true], :disabled), .check:has(input:disabled) {
  color: var(--disabled-text);
  cursor: not-allowed;
}
.check:is([data-disabled], [aria-disabled=true], :disabled) > :is(.check-indicator, input), .check:has(input:disabled) > :is(.check-indicator, input) {
  background: var(--surface-sunken);
  border-color: var(--disabled-bound);
  cursor: not-allowed;
}

/* ==== src/components/radio.scss ==== */
/* Radio — React Aria RadioField + RadioButton. Not the deprecated single
   Radio. The one round corner in the system. */
.radio {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  cursor: pointer;
  /* The label is a target, not text to be copied. */
  user-select: none;
}
.radio > input,
.radio > .radio-indicator {
  appearance: none;
  display: inline-block;
  inline-size: var(--space-5);
  block-size: var(--space-5);
  margin: 0;
  flex: none;
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-full);
  background: var(--surface-paper);
  box-shadow: var(--shadow-faint);
  cursor: pointer;
}
.radio[data-selected] > .radio-indicator,
.radio > input:checked {
  background: var(--c-mark);
  box-shadow: inset 0 0 0 calc(var(--space-1) - var(--border-hairline)) var(--c-paper), var(--shadow-faint);
}
.radio:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) > :is(.radio-indicator, input) {
  border-color: var(--c-mute);
}
.radio:is([data-focus-visible], :focus-visible, :has(> input:focus-visible)) > :is(.radio-indicator, input) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}
.radio:is([data-invalid], [aria-invalid=true]) > :is(.radio-indicator, input) {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}
.radio:is([data-disabled], [aria-disabled=true], :disabled), .radio:has(input:disabled) {
  color: var(--disabled-text);
  cursor: not-allowed;
}
.radio:is([data-disabled], [aria-disabled=true], :disabled) > :is(.radio-indicator, input), .radio:has(input:disabled) > :is(.radio-indicator, input) {
  background: var(--surface-sunken);
  border-color: var(--disabled-bound);
  cursor: not-allowed;
}

/* ==== src/components/choice.scss ==== */
/* Choice — a radio dressed as a card, the one shape React Aria has no
   primitive for. Built from RadioGroup + RadioField + RadioButton, with the
   note in the field's description slot, so it is announced once as a
   description and never joins the button's name.
   The field is the clickable card. The button keeps the name; a hit area
   stretched from it covers the padding and the note.
   Selection is border weight, not a tint. --choice-edge is that width, and
   the padding gives the same pixel back, so the card never shifts — including
   when the group is already invalid. */
.choices {
  display: grid;
  gap: var(--space-3);
}
.choices-row {
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.choices.choices-merged {
  /* merged: options share one border, at the strong weight the controls carry
     (2px). The doubled edge collapses; the group's seam pullback is the width
     that is actually there. .field-group-options.choices sets the split gap
     at the hairline weight, so the merged class has to outrank it. */
  gap: 0;
}
.field-group-options.choices.choices-merged {
  gap: 0;
}

.choices.choices-merged {
  --choice-seam: var(--border-strong);
  /* Every card in a merged set holds the strong edge the controls carry;
     selection and state only move the colour, never the width. */
  --choice-edge: var(--border-strong);
}
.choices.choices-merged.choices-row > * + * {
  margin-inline-start: calc(-1 * var(--choice-seam));
}
.choices.choices-merged:not(.choices-row) > * + * {
  margin-block-start: calc(-1 * var(--choice-seam));
}
.choices.choices-merged {
  /* Every card holds the strong edge, so the overlap has to read as one
     control: only the group's ends carry the card's radius — the first option
     on the start side, the last on the end side (column: top and bottom; row:
     inline start and end). A radius left on the overlapping interior edges
     would notch the seam. The column rules come first; the row rules override
     them where the two axes meet. */
}
.choices.choices-merged > :first-child {
  border-start-start-radius: var(--radius);
  border-start-end-radius: var(--radius);
}
.choices.choices-merged > :last-child {
  border-end-start-radius: var(--radius);
  border-end-end-radius: var(--radius);
}
.choices.choices-merged.choices-row > :first-child {
  border-start-end-radius: var(--radius);
  border-end-start-radius: var(--radius);
}
.choices.choices-merged.choices-row > :last-child {
  border-end-start-radius: var(--radius);
}
.choices-bare .choice > :is(.radio-indicator, input) {
  /* The card is the affordance on its own; the indicator is optional. */
  display: none;
}
.choices-bare .choice-note {
  padding-inline-start: 0;
}

.choice-field {
  /* Component-local, like --mark-src. Selection and invalid both step it;
     padding reads it, so either state gives the extra pixel back. */
  --choice-edge: var(--border-hairline);
  position: relative;
  /* Keeps the hit area inside this card, so it cannot cover a neighbour. */
  isolation: isolate;
  padding: calc(var(--space-4) - var(--choice-edge) + var(--border-hairline));
  border: var(--choice-edge) solid var(--c-edge);
  border-radius: var(--radius);
  background: var(--surface-paper);
}
.choice-field:is([data-selected], :has(input:checked)) {
  --choice-edge: var(--border-strong);
  border-color: var(--c-mark);
  z-index: 1;
}
.choice-field:has(> .choice:is(:hover, [data-hovered]):not([data-disabled])) {
  border-color: var(--c-mark);
  background: var(--surface-raised);
}
.choice-field:has(> .choice[data-pressed]) {
  background: var(--surface-sunken);
}
.choice-field:is([data-invalid], :has(> .choice[data-invalid])) {
  --choice-edge: var(--border-strong);
  border-color: var(--invalid);
}
.choice-field:is([data-disabled], :has(input:disabled)) {
  background: var(--surface-sunken);
  border-color: var(--disabled-bound);
}
.choice-field:has(> .choice:is([data-focus-visible], :focus-visible, :has(> input:focus-visible))) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}
.field-group[data-invalid] .choice-field {
  /* The group carries the error for every card under it. */
  --choice-edge: var(--border-strong);
  border-color: var(--invalid);
}

.choice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  cursor: pointer;
}
.choice::after {
  /* The note and the field padding sit outside this label. The hit area is
     positioned against .choice-field and stops at its border edge, so the
     whole card activates the radio and the note stays out of the name. */
  content: "";
  position: absolute;
  z-index: 1;
  inset: calc(-1 * var(--choice-edge));
}
.choice > :is(input, .radio-indicator) {
  /* The card carries its own radio box: the native input in the class API,
     .radio-indicator under React Aria. One paint, from the shared layer. */
  appearance: none;
  display: inline-block;
  inline-size: var(--space-5);
  block-size: var(--space-5);
  margin: 0;
  flex: none;
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-full);
  background: var(--surface-paper);
  box-shadow: var(--shadow-faint);
  cursor: pointer;
}
.choice > .choice-body {
  flex: 1;
  min-inline-size: 0;
}
.choice:is(:has(input:checked), [data-selected]) > :is(input, .radio-indicator) {
  background: var(--c-mark);
  box-shadow: inset 0 0 0 calc(var(--space-1) - var(--border-hairline)) var(--c-paper), var(--shadow-faint);
}
.choice:is([data-disabled], [aria-disabled=true], :disabled), .choice:has(input:disabled) {
  color: var(--c-mute);
  cursor: not-allowed;
}
.choice-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.choice-title {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-medium);
}
.choice-note {
  /* Sits under the row in the card, clear of the indicator. */
  display: block;
  margin-block-start: var(--space-1);
  padding-inline-start: calc(var(--space-5) + var(--space-3));
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  color: var(--c-mute);
  /* The hit area sits underneath. Clicks and hover fall through to it. */
  pointer-events: none;
}
.choice-detail {
  /* Right-aligned figure: a price, a lead time, a quota. Tabular. */
  margin-inline-start: auto;
  padding-inline-start: var(--space-3);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-medium);
  font-feature-settings: var(--font-features-data);
  white-space: nowrap;
}

/* ==== src/components/switch.scss ==== */
/* Switch — React Aria SwitchField + SwitchButton. On/off that applies
   immediately. Never a checkbox. Not the deprecated single Switch.

   Rounded since the 278:440 redesign: the track and the knob take --radius-sm
   (2px), the same small corner as the checkbox. The track is paper at rest, not
   a tint, so off and on read as the same object changing fill. */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  cursor: pointer;
  /* The label is a target, not text to be copied. */
  user-select: none;
  /* The class API keeps the native input: it carries :checked and :disabled,
     stays focusable, and is invisible. React Aria hides its own input. */
}
.switch > input {
  position: absolute;
  inline-size: var(--border-hairline);
  block-size: var(--border-hairline);
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  appearance: none;
}
.switch > .switch-indicator {
  display: inline-flex;
  align-items: center;
  inline-size: var(--space-10);
  block-size: var(--space-5);
  margin: 0;
  flex: none;
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  box-shadow: var(--shadow-faint);
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.switch > .switch-indicator::before {
  content: "";
  inline-size: var(--space-3);
  block-size: var(--space-3);
  border-radius: var(--radius-xs);
  background: var(--c-mark);
  margin-inline-start: var(--space-1);
  transition: transform var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.switch:is([data-selected], :has(> input:checked)) > .switch-indicator {
  background: var(--c-mark);
  border-color: var(--c-mark);
}
.switch:is([data-selected], :has(> input:checked)) > .switch-indicator::before {
  background: var(--c-paper);
  /* The rim that keeps the knob legible on its own track. Figma node
     278:440, switch:on — the off knob carries no rim. The travel is the
     track's inner width minus the knob and the gap on BOTH sides, hairlines
     included, so the checked knob sits as far from the trailing edge as the
     resting knob sits from the leading one. */
  box-shadow: var(--shadow-glow);
  transform: translateX(calc(var(--space-10) - 2 * var(--border-hairline) - var(--space-3) - 2 * var(--space-1)));
}
.switch:dir(rtl):is([data-selected], :has(> input:checked)) > .switch-indicator::before {
  transform: translateX(calc(-1 * (var(--space-10) - 2 * var(--border-hairline) - var(--space-3) - 2 * var(--space-1))));
}
.switch:is([data-hovered], :hover):not(:where(:disabled, [data-disabled], [aria-disabled=true], :has(input:disabled))) > .switch-indicator {
  border-color: var(--c-mute);
}
.switch:is([data-focus-visible], :focus-visible, :has(> input:focus-visible)) > .switch-indicator {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}
.switch:is([data-invalid], [aria-invalid=true]) > .switch-indicator {
  border-width: var(--border-strong);
  border-color: var(--invalid);
}
.switch:is([data-disabled], [aria-disabled=true], :disabled), .switch:has(input:disabled) {
  color: var(--disabled-text);
  cursor: not-allowed;
}
.switch:is([data-disabled], [aria-disabled=true], :disabled) > .switch-indicator, .switch:has(input:disabled) > .switch-indicator {
  background: var(--surface-sunken);
  border-color: var(--disabled-bound);
}
.switch:is([data-disabled], [aria-disabled=true], :disabled) > .switch-indicator::before, .switch:has(input:disabled) > .switch-indicator::before {
  background: var(--c-n-400);
}
@media (prefers-reduced-motion: reduce) {
  .switch > .switch-indicator,
  .switch > .switch-indicator::before {
    transition: none;
  }
}

/* ==== src/components/slider.scss ==== */
/* Slider — React Aria Slider. Track, fill, thumb and value position are React
   Aria's; the kit paints them.

   Node 291:465 gives the ruler a body rather than a hairline: a 214x20 track,
   radius 2, paper fill, a 1px boundary and the seat shadow, with a 47x12 band
   inset 4 from the top and bottom for the travelled part and a 4x12 mark-coloured
   thumb riding in it. The band's inset is what makes it 12 tall, so the inset and
   the height are one fact, not two.

   The native input.range in the class API keeps the browser's own track. */
.slider-track {
  position: relative;
  display: block;
  inline-size: 100%;
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-faint);
  background: var(--surface-paper);
  color: var(--c-mark);
  block-size: var(--space-5);
  cursor: pointer;
  /* The node's ruler is 20 tall, but a pointer target is not the paint: WCAG 2.2
     target size asks 24, and the track is what receives the pointer. This adds
     the 2px the paint gives up on each side without painting anything, without
     moving the ruler. It is the track's first child, so
     the fill and the thumb still sit above it and the thumb still drags.

     The extra `--border-hairline` is not padding by hand: an absolutely positioned
     box's containing block is the *padding* box, so the border's 1px is excluded
     from the geometry on each side. Measured — without it the target is 22, not
     24, and `elementFromPoint` one pixel below the ruler lands on `.slider`. */
}
.slider-track::before {
  content: "";
  position: absolute;
  inset: calc((var(--space-5) - var(--space-6)) / 2 - var(--border-hairline));
}

/* Nodes 291:465 slider-1/slider-2: hover takes the boundary to n-600. The
   designer wrote the instruction into the hover track's own node name — "We
   need to have the border change on hoever to n-600" — and --c-mute is exactly
   that step. */
.slider-track:hover {
  border-color: var(--c-mute);
}

.slider-fill {
  /* React Aria writes `height: 100%` as an inline style, and an inline
     declaration outranks every stylesheet rule, so the band's height carries
     `!important` — without it the band stretches to the track's 18px padding
     box and measures 18, not the model's 12. And `inset-block` must stay: the
     element's static position is the top of the padding box, so a height alone
     leaves it there instead of centred. Both were measured in Chromium. */
  block-size: var(--space-3);
  border-radius: var(--radius-xs);
  transition: inline-size var(--duration) var(--ease);
  inset-block: calc(var(--space-1) - var(--border-hairline));
  block-size: var(--space-3) !important;
  background: var(--c-edge);
}

.slider-thumb {
  /* React Aria writes the offset along the axis plus `translate(-50%, -50%)`, so
     this element's box is centred on the point it is given. The point is the
     band's centre, half its own height below the band's top inset: band top
     4 - 1 boundary, plus 6. A solid mark-coloured bar, no border. */
  inset-block-start: calc(var(--space-1) - var(--border-hairline) + var(--space-3) / 2);
  inset-block-end: auto;
  inline-size: var(--space-1);
  block-size: var(--space-3);
  border: 0;
  border-radius: var(--radius-xs);
  background: var(--c-mark);
  cursor: pointer;
}

.slider-thumb[data-hovered] {
  background: var(--action-hovered);
}

.slider-thumb[data-dragging] {
  background: var(--action-pressed);
}

.slider-thumb[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

.slider-thumb[data-disabled] {
  background: var(--c-mute);
  cursor: not-allowed;
}

.slider[data-disabled] .slider-track,
.slider[data-disabled] .slider-fill {
  cursor: not-allowed;
}

.slider[data-disabled] .slider-fill {
  background: var(--c-mute);
}

.slider-output {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-regular);
  white-space: nowrap;
}

/* Linear: label, track, value on one row. The hint and the error keep the full
   width underneath. */
.slider-linear {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
}

.slider-linear > .field-hint,
.slider-linear > .field-error {
  grid-column: 1/-1;
}

/* Default: the count rides the label row's right end, above the track — node
   291:465 groups the 16px label line and the value on one row, leaves the step
   between the rows, and puts the 214x20 track under both. The grid places the
   label, the value, the track and the message line by row, so DOM order (label,
   track, value) does not decide the position. Class API: the same grid, with
   `input.range` in the track row. */
.field.slider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  row-gap: var(--space-1);
  column-gap: var(--space-3);
}
.field.slider > .field-label,
.field.slider > .slider-output {
  grid-row: 1;
}
.field.slider > .slider-output {
  grid-column: 2;
}
.field.slider > .slider-track,
.field.slider > .range {
  grid-column: 1/-1;
  grid-row: 2;
}
.field.slider > .field-hint,
.field.slider > .field-error {
  grid-column: 1/-1;
  grid-row: 3;
}

/* The class API: a native range, the browser's track and thumb. */
.input.range,
.range {
  appearance: none;
  min-height: auto;
  padding: var(--space-4) var(--space-0);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.input.range:focus-visible,
.range:focus-visible {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

.input.range::-webkit-slider-runnable-track,
.range::-webkit-slider-runnable-track {
  block-size: var(--space-1);
  border-radius: var(--radius);
  background: var(--c-n-300);
}

.input.range::-webkit-slider-thumb,
.range::-webkit-slider-thumb {
  appearance: none;
  inline-size: var(--space-4);
  block-size: var(--space-4);
  margin-block-start: calc((var(--space-1) - var(--space-4)) / 2);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius);
  background: var(--action);
}

.input.range::-moz-range-track,
.range::-moz-range-track {
  block-size: var(--space-1);
  border-radius: var(--radius);
  background: var(--c-n-300);
}

.input.range::-moz-range-thumb,
.range::-moz-range-thumb {
  inline-size: var(--space-4);
  block-size: var(--space-4);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius);
  background: var(--action);
}

/* ==== src/components/tabs.scss ==== */
/* In-page tabs. Not site navigation.
   Node 459:1537: a segmented control built from the small button's structure —
   the list is the well (`--space-1` padding, `--space-1` gap, the model's 4px
   corner = the small radius doubled), and each tab is the sm button's face: the
   `--space-1` block inset, the `--space-2`-plus-two-boundaries inline one, the
   control line at the small text size. The selected tab is the paper face with
   the mark ink; hovering an at-rest tab paints `--c-edge` and turns its label to
   ink; the at-rest face is transparent and its label reads `--c-strong`. */
.tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* The well hugs its tabs in a flex column (.tabs) and in a grid (.stack) alike. */
.tab-list {
  display: inline-flex;
  align-self: flex-start;
  justify-self: start;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  padding: var(--space-1);
  border-radius: calc(var(--radius-sm) * 2);
  background: var(--c-n-200);
  box-shadow: var(--shadow-faint);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  max-width: 100%;
  padding: var(--space-1) calc(var(--space-2) + 2 * var(--border-hairline));
  min-height: calc(2 * var(--border-hairline) + 2 * var(--space-1) + var(--leading-sm));
  border-radius: var(--radius-sm);
  /* No seat until the tab is pressed: the at-rest and hover faces sit flat on
     the well, and only the selected face is lifted off it. */
  box-shadow: none;
  background: transparent;
  color: var(--c-strong);
  font-size: var(--text-xs);
  line-height: var(--leading-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

/* A list of links is a filter that lives in the URL: `nav.tab-list` holding
   `a.tab`, with `aria-current="page"` on the current one, which takes the
   selected face. The face is the signal, so a link tab drops the underline. */
a.tab {
  text-decoration: none;
}

/* The pointer never paints a disabled tab, and never touches the selected face. */
.tab:is([data-hovered], :hover):not(:is([data-selected],
[aria-selected=true],
[aria-current=page],
[data-disabled],
[aria-disabled=true])) {
  background: var(--c-edge);
  color: var(--c-mark);
}

.tab[data-selected],
.tab[aria-selected=true],
.tab[aria-current=page] {
  background: var(--c-paper);
  box-shadow: var(--shadow-faint);
  color: var(--c-mark);
}

.tab[data-disabled] {
  color: var(--disabled-text);
  cursor: not-allowed;
}

.tab[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-width);
}

.surface-inverse .tab[data-focus-visible] {
  outline-color: var(--c-paper);
}

.tab-panel[hidden],
.tab-panel[data-inert] {
  display: none;
}

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

/* ==== src/components/tooltip.scss ==== */
/* Tooltip. React Aria positions the bubble and owns the delays and the aria
   wiring; the kit paints the surface, so it matches the other overlays. */
@keyframes tooltip-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes tooltip-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.tooltip {
  max-inline-size: calc(var(--space-64) / 2);
  padding: var(--space-2) var(--space-3);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius);
  background: var(--surface-paper);
  color: var(--c-body);
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
}

.tooltip[data-entering] {
  animation: tooltip-in var(--duration-fast) var(--ease-out);
}

.tooltip[data-exiting] {
  animation: tooltip-out var(--duration-fast) var(--ease-in);
}

.tooltip-arrow svg {
  display: block;
  fill: var(--surface-paper);
  stroke: var(--c-bound);
}

@media (prefers-reduced-motion: reduce) {
  .tooltip[data-entering],
  .tooltip[data-exiting] {
    animation: none;
  }
}

/* ==== src/components/breadcrumbs.scss ==== */
/* Breadcrumb trail. The application frame in app-shell.scss carries its own
   copy of the list topology, because its markup predates this component; when the
   site adopts the component, that copy can become .app-breadcrumbs .breadcrumbs. */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-0);
  padding: var(--space-0);
  list-style: none;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* The separator is the kit's: a slash, in the muted register. */
.breadcrumbs li + li::before {
  content: "/";
  color: var(--c-mute);
}

.breadcrumbs a {
  color: var(--c-mute);
}

/* Hover steps the crumb two ramp steps stronger than mute (--c-strong) and
   adds the underline — the native link's own signal, arriving only on hover
   because the trail at rest is wayfinding, not prose. Thickness follows the
   native a:hover (strong). */
@media (hover: hover) {
  .breadcrumbs a:hover {
    color: var(--c-strong);
    text-decoration: underline;
  }
}
.breadcrumbs [aria-current=page] {
  color: var(--c-mark);
}

/* ==== src/components/dialog.scss ==== */
/* Modal. React Aria renders a portal, a full-viewport overlay, the frame, and
   the dialog section inside it. The kit paints those four. Focus, dismissal,
   the page lock, and the animation flags stay React Aria's. */
@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modal-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes modal-sheet-in {
  from {
    transform: translateY(var(--space-24));
  }
  to {
    transform: translateY(0);
  }
}
@keyframes modal-sheet-out {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(var(--space-24));
  }
}
@keyframes modal-end-in {
  from {
    transform: translateX(var(--space-24));
  }
  to {
    transform: translateX(0);
  }
}
@keyframes modal-end-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(var(--space-24));
  }
}
/* The scrim. Full viewport, so the frame is positioned inside it and a click
   that lands on the scrim itself is a dismissal React Aria can see. */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: var(--layer-overlay);
  overscroll-behavior: none;
}

.modal-overlay[data-entering] {
  animation: modal-fade-in var(--duration) var(--ease-out);
}

.modal-overlay[data-exiting] {
  animation: modal-fade-out var(--duration-fast) var(--ease-in);
}

/* The frame. */
.modal-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  overflow: hidden;
  border: var(--border-hairline) solid var(--c-edge);
  /* The button's corner, so a dialog and the control that opened it agree. */
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
}

/* The dialog section is the frame's content: it fills the frame and scrolls its
   body, and it is never a positioned box of its own. */
.modal {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-block-size: 0;
}

.modal:focus {
  outline: none;
}

/* One inset step, `--space-5`, on the header and the footer, both axes. The
   body pads only inline: it is the scroll port, and a scrolled line runs up to
   the boundary it disappears behind rather than against a block inset. The
   header keeps one exception: trailing room for the close, which is pinned to
   the frame rather than sitting in this row (4px inset + a 30px small button +
   a gap). */
.modal-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  padding-inline-end: calc(var(--space-1) + 2 * var(--border-hairline) + 2 * var(--space-1) + var(--leading-sm) + var(--space-2));
}

.modal-header h3 {
  margin: 0;
  min-inline-size: 0;
}

.modal-body {
  flex: 1;
  min-block-size: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 var(--space-5);
}

.modal-body-static {
  overflow: visible;
}

.modal-footer {
  display: flex;
  flex: none;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5);
}

/* The close is the kit's own Button — ghost, small — lifted out of the header's
   row and pinned to the frame's corner, so the header's inset is decided by the
   text alone. */
.modal-close {
  position: absolute;
  inset-block-start: var(--space-1);
  inset-inline-end: var(--space-1);
}

.modal-handle {
  display: none;
  flex: none;
  justify-content: center;
  padding-block: var(--space-4) var(--space-2);
}

.modal-handle-bar {
  inline-size: var(--space-24);
  block-size: var(--space-1);
  border-radius: var(--radius);
  background: var(--c-n-300);
}

/* Inset: the frame fills the padded viewport. */
.modal-overlay.modal-inset {
  padding: var(--space-12);
}

.modal-inset .modal-frame {
  flex: 1;
  min-inline-size: 0;
}

/* Sheet: a bottom sheet, drawn handle, until 40rem. */
.modal-overlay.modal-sheet {
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  padding-block-start: var(--space-24);
}

.modal-sheet .modal-frame {
  inline-size: 100%;
  max-block-size: calc(100dvh - var(--space-24));
}

.modal-sheet .modal-handle {
  display: flex;
}

.modal-sheet .modal-header .modal-close {
  display: none;
}

.modal-sheet[data-entering] .modal-frame {
  animation: modal-sheet-in var(--duration) var(--ease-out);
}

.modal-sheet[data-exiting] .modal-frame {
  animation: modal-sheet-out var(--duration-fast) var(--ease-in);
}

@media (min-width: 40rem) {
  .modal-overlay.modal-sheet {
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
  }
  .modal-sheet .modal-frame {
    max-inline-size: calc(var(--space-64) * 2);
    max-block-size: calc(100dvh - var(--space-12) * 2);
  }
  .modal-sheet .modal-handle {
    display: none;
  }
  .modal-sheet .modal-header .modal-close {
    display: flex;
  }
}
/* End drawer: inline-end, full block-size. */
.modal-overlay.modal-end {
  justify-content: flex-end;
  padding: 0;
}

.modal-end .modal-frame {
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: 100%;
  border-radius: 0;
  border-inline-end: none;
}

.modal-end[data-entering] .modal-frame {
  animation: modal-end-in var(--duration) var(--ease-out);
}

.modal-end[data-exiting] .modal-frame {
  animation: modal-end-out var(--duration-fast) var(--ease-in);
}

@media (min-width: 40rem) {
  .modal-end .modal-frame {
    max-inline-size: calc(var(--space-64) * 2);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-inline-start: var(--border-hairline) solid var(--c-edge);
  }
}
@media (prefers-reduced-motion: reduce) {
  .modal-overlay[data-entering],
  .modal-overlay[data-exiting],
  .modal-sheet[data-entering] .modal-frame,
  .modal-sheet[data-exiting] .modal-frame,
  .modal-end[data-entering] .modal-frame,
  .modal-end[data-exiting] .modal-frame,
  .modal-close {
    animation: none;
    transition: none;
  }
}

/* ==== src/components/card.scss ==== */
/* Card. */
.card {
  border: var(--border-hairline) solid var(--c-n-300);
  border-radius: var(--radius);
  background: var(--surface-paper);
  padding: var(--space-6);
}

.card-flush {
  padding: var(--space-0);
}

.card-md {
  border: none;
  border-radius: var(--radius-md);
}

.card-raised {
  background: var(--surface-raised);
}

.card.surface-inverse,
.surface-inverse .card {
  background: var(--surface-raised);
}

.card-selected {
  border-color: var(--c-ink);
  border-width: var(--border-strong);
  padding: calc(var(--space-6) - var(--border-hairline));
}

.stack-stretch {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: var(--space-48);
}

.stack-stretch > .grow {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.card-expand {
  cursor: pointer;
}

/* A card expanded to the viewport, inset by space-12, over a frosted page. */
.card-stage {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--space-12);
  border: none;
  background: transparent;
  overflow: visible;
  overscroll-behavior: none;
  backdrop-filter: blur(var(--space-6));
  -webkit-backdrop-filter: blur(var(--space-6));
}

.card-stage::backdrop {
  background: transparent;
}

.card-stage:focus {
  outline: none;
}

.card-stage .card {
  position: relative;
  block-size: 100%;
  box-shadow: 0 var(--space-8) var(--space-24) color-mix(in srgb, var(--c-ink) 28%, transparent), 0 var(--space-16) var(--space-48) color-mix(in srgb, var(--c-ink) 40%, transparent);
}

.card-stage-close {
  position: absolute;
  inset-block-start: var(--space-4);
  inset-inline-end: var(--space-4);
  z-index: var(--layer-raised);
}

.card-stage .stack-stretch {
  min-block-size: 100%;
  block-size: 100%;
}

html.card-stage-lock,
html.card-stage-lock body {
  overflow: hidden;
}

/* ==== src/components/code.scss ==== */
/* Code block. A source listing is the one surface in this system that carries
   hue. The palette is not in this file: each theme is a stylesheet in
   code-themes/, and the build hoists those sheets beside the tokens so the
   default can sit on :root. This file owns the shell, the head, the rows and
   the gutter, and maps a highlighter's .token.* classes onto the theme's roles.

   Four backgrounds are painted inside a listing, and every text role can land
   on any of them: the well, the highlighted and hovered row, and the two diff
   tints. The build checks every theme against all of them (a11y.syntax).

   Highlighting is not ours either: any highlighter that emits `.token.*` inside
   `.code-block-pre` is themed, so a build-time highlighter and the React control
   share one palette. This sheet does not import the control layer: the copy
   control is a self-contained icon button, not `.button`. */
.code-block {
  inline-size: 100%;
  border: var(--border-hairline) solid var(--c-edge);
  border-radius: var(--radius);
  background: var(--syntax-surface);
}

/* --- head: file name or language, then the copy control ------------------- */
.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-block-end: var(--border-hairline) solid var(--c-edge);
}

.code-block-title {
  margin: var(--space-0);
  color: var(--c-body);
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: var(--text-2xs);
  line-height: var(--leading-sm);
}

.code-block-copy {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--syntax-comment);
  font: inherit;
  cursor: pointer;
}

.code-block-copy:hover,
.code-block-copy[data-hovered] {
  background: var(--surface-raised);
  color: var(--c-mark);
}

.code-block-copy:focus-visible,
.code-block-copy[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

.code-block-copy[data-disabled],
.code-block-copy:disabled {
  color: var(--disabled-text);
  cursor: default;
}

/* The copied state crossfades tick over sheet. The wrapper also swaps the
   control's accessible name, so the tick is never the only signal. */
.code-block-copy-icon {
  display: grid;
}

.code-block-copy-icon > * {
  grid-area: 1/1;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.code-block-copy-icon > [data-glyph=done] {
  opacity: 0;
}

.code-block-copy[data-copied] .code-block-copy-icon > [data-glyph=copy] {
  opacity: 0;
}

.code-block-copy[data-copied] .code-block-copy-icon > [data-glyph=done] {
  opacity: 1;
}

/* --- the listing --------------------------------------------------------- */
.code-block-pre {
  /* Component-local properties, like --mark-src: the scroll shadows write the
     two opacities from the wrapper, and the size is paint, not a system step. */
  --code-shadow-size: var(--space-16);
  --code-shadow-left: 0;
  --code-shadow-right: 0;
  position: relative;
  margin: var(--space-0);
  padding-block: var(--space-3);
  padding-inline: var(--space-0);
  border: none;
  background: var(--syntax-surface);
  color: var(--syntax-text);
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-md);
  overflow-x: auto;
}

/* A listing from another highlighter may be a bare pre and code, with no row
   structure. Give the code cell the inset the rows carry themselves. */
.code-block-pre > code {
  display: block;
  padding-inline: var(--space-4);
}

/* The pre is position: relative, above, so these anchor to the listing itself.
   They shade the well toward the reading edge, so the block reads as a window
   onto a wider document rather than as an island with a hard cut. */
.code-block-pre::before,
.code-block-pre::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inline-size: var(--code-shadow-size);
  pointer-events: none;
  z-index: var(--layer-raised);
}

.code-block-pre::before {
  inset-inline-start: 0;
  opacity: var(--code-shadow-left);
  background: linear-gradient(to right, var(--syntax-shadow), transparent);
}

.code-block-pre::after {
  inset-inline-end: 0;
  opacity: var(--code-shadow-right);
  background: linear-gradient(to left, var(--syntax-shadow), transparent);
}

/* display: table keeps a row as wide as its content when the listing scrolls
   sideways, so a row background or tint reaches the end of the longest line.
   min-inline-size keeps it reaching the end of the visible well when it does
   not scroll. */
.code-block-line {
  display: table;
  min-inline-size: 100%;
  padding-inline: var(--space-3) var(--space-4);
  border-inline-start: var(--border-strong) solid transparent;
}

.code-block-line.highlight-line {
  background: var(--syntax-lineHighlight);
  border-inline-start-color: var(--c-mark);
}

.code-block-line:hover {
  background: var(--syntax-lineHighlight);
}

.code-block-num {
  display: table-cell;
  inline-size: var(--space-10);
  padding-inline: var(--space-2) var(--space-3);
  color: var(--syntax-comment);
  text-align: end;
  user-select: none;
}

.code-block-code {
  display: table-cell;
  inline-size: 100%;
}

/* --- diff ---------------------------------------------------------------- */
/* A diff is a change to a document, not machine state, so it does not borrow
   the ANSI status hues. The +/- prefix carries the meaning as text; the tint
   only speeds up scanning. */
.code-block-line[data-diff=added] {
  background-color: var(--syntax-addTint);
}

.code-block-line[data-diff=removed] {
  background-color: var(--syntax-removeTint);
}

.code-block-line[data-diff=added]:not([data-diff-syntax]) .token,
.code-block-line[data-diff=added] .token.prefix {
  color: var(--syntax-add);
}

.code-block-line[data-diff=removed]:not([data-diff-syntax]) .token,
.code-block-line[data-diff=removed] .token.prefix {
  color: var(--syntax-remove);
}

/* --- the token map ------------------------------------------------------- */
/* Prism's class names, mapped to GitHub's roles. The names are the
   highlighter's contract, not ours: keep them in the selector lists.

   Order matters, and not in the obvious way. prism-react-renderer emits a
   token's *accumulated* types on one element, so a tag's attribute value
   arrives as `token tag attr-value` and its brackets as `token tag
   punctuation`. Every rule here has the same specificity (0,2,0), so the later
   rule wins. The container types therefore have to come first and the leaf
   roles last, or `tag` paints a whole subtree one colour and the roles that
   exist to distinguish it never take effect. The order below is container →
   leaf; upstream's order left `tag` last, which rendered every attribute value
   and attribute name inside a tag as the tag's colour.

   The role set is the union of what the themes need, not one theme's set: GitHub
   gives punctuation and operators no colour of their own, and says so by setting
   those roles equal to `text`, while Catppuccin gives them overlay2 and sky. A
   theme that distinguishes a role gets it; a theme that does not sets it equal. */
.code-block-pre .token.tag {
  color: var(--syntax-tag);
}

.code-block-pre .token.parameter,
.code-block-pre .token.imports,
.code-block-pre .token.plain,
.code-block-pre .token.property,
.code-block-pre .token.variable {
  color: var(--syntax-text);
}

.code-block-pre .token.punctuation {
  color: var(--syntax-punctuation);
}

.code-block-pre .token.operator,
.code-block-pre .token.entity {
  color: var(--syntax-operator);
}

.code-block-pre .token.comment,
.code-block-pre .token.prolog,
.code-block-pre .token.doctype,
.code-block-pre .token.cdata {
  color: var(--syntax-comment);
  /* A hue-free theme separates these roles by weight of ink, so it may also
     take a face. Only that theme emits the variable; the fallback is the
     unthemed value. */
  font-style: var(--syntax-comment-style, normal);
}

.code-block-pre .token.atrule,
.code-block-pre .token.keyword,
.code-block-pre .token.important {
  color: var(--syntax-keyword);
  font-weight: var(--syntax-keyword-weight, inherit);
}

.code-block-pre .token.boolean,
.code-block-pre .token.number,
.code-block-pre .token.constant,
.code-block-pre .token.symbol {
  color: var(--syntax-number);
}

.code-block-pre .token.char,
.code-block-pre .token.string,
.code-block-pre .token.attr-value,
.code-block-pre .token.regex,
.code-block-pre .token.url {
  color: var(--syntax-string);
}

.code-block-pre .token.builtin,
.code-block-pre .token.class-name,
.code-block-pre .token.maybe-class-name,
.code-block-pre .token.attr-name {
  color: var(--syntax-type);
}

.code-block-pre .token.function,
.code-block-pre .token.function-variable,
.code-block-pre .token.selector {
  color: var(--syntax-function);
}

@media (prefers-reduced-motion: reduce) {
  .code-block-copy-icon > * {
    transition: none;
  }
}

/* ==== src/components/table.scss ==== */
/* Table — React Aria renders native table/thead/tbody/tr/th/td. */
/* Columns size by whole words. An inherited overflow-wrap: anywhere (.app-content)
   let one long column squeeze the others to a letter per line. */
table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  font-feature-settings: var(--font-features-data);
  overflow-wrap: break-word;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* A table is flush with its container: the outer columns give their edge
   padding back, so the first column's text lines up with the content above the
   table and the last column's right edge is the table's right edge. The
   contained table keeps its inset — its own border is the boundary. */
table:not(.table-contained) > :is(thead, tbody, tfoot) > tr > :first-child {
  padding-inline-start: 0;
}

table:not(.table-contained) > :is(thead, tbody, tfoot) > tr > :last-child {
  padding-inline-end: 0;
}

/* Inline catalog identifiers wrap; figure.code blocks keep pre whitespace. */
table td :not(pre) > code {
  white-space: normal;
  overflow-wrap: anywhere;
}

table td.nowrap:has(> code) {
  white-space: normal;
}

table td .code {
  min-inline-size: 0;
  max-inline-size: 100%;
}

th {
  text-align: start;
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
  letter-spacing: var(--tracking-2xs);
  text-transform: uppercase;
  font-weight: var(--weight-regular);
  /* Mute, the job for secondary text: 5.8:1 on paper. --c-n-500 is a boundary
     step, 3.9:1, under AA for 12px type. */
  color: var(--c-mute);
  padding: var(--space-2) var(--space-3);
  border-block-end: var(--border-hairline) solid var(--c-n-500);
  white-space: nowrap;
  vertical-align: middle;
}

td {
  padding: var(--space-2) var(--space-3);
  border-block-end: none;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  vertical-align: middle;
}

tbody tr + tr > td {
  border-block-start: var(--border-hairline) solid var(--c-n-200);
}

.table-zebra tbody tr:nth-child(even) {
  background: var(--surface-sunken);
}

.table-contained {
  border: var(--border-hairline) solid var(--c-edge);
  /* The same corner and the same seat every other boxed control wears: 2px and
     the inputs' 1px line. The tiny shadow is what makes the box read as a box. */
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-faint);
}

.num,
td.num,
th.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

tfoot td {
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
  letter-spacing: var(--tracking-2xs);
  color: var(--c-n-600);
  border-block-end: none;
  border-block-start: var(--border-hairline) solid var(--c-n-200);
  padding-block-start: var(--space-3);
}

/* Expandable rows: whole row is the press target (Row onAction). */
.table-expand tr.row-expand {
  position: relative;
  cursor: pointer;
}

.table-expand tr.row-expand:hover,
.table-expand tr.row-expand[data-hovered] {
  background: var(--surface-sunken);
}

.table-expand tr.row-expand[data-focus-visible-within] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: calc(var(--focus-width) * -1);
}

.table-expand tr.row-expand-panel[hidden] {
  display: none;
}

.row-expand-panel > td {
  padding: var(--space-6);
  background: var(--surface-sunken);
}

/* Selection and sort affordances */
/* A chosen row (or a chosen cell) wears the tint. Qualified to tr/td/th so the
   selection checkbox — the control, not the row — never picks it up: it is a
   label with data-selected of its own when everything under it is chosen. */
table :is(tr, td, th)[data-selected] {
  background: color-mix(in srgb, var(--surface-sunken) 70%, transparent);
}

th[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: calc(var(--focus-width) * -1);
}

/* A sortable column is a pointer affordance, and the kit supplies the mark,
   right of the label. The mark is CSS content — the same technique as the menu's
   check and the field error's cross — so the class API and React paint one
   glyph. Nothing depends on it: the direction is on `aria-sort`.

   The slot is a fixed width on every sortable column and is occupied whether or
   not the column is sorted. A mark that only takes space once it appears resizes
   its own column on click — measured: the slot went 0 → 12px and the column
   253 → 266. The slot is the affordance: dim at rest, one step stronger under
   the pointer, ink once this is the column sorted. Carbon's `ArrowsVertical` /
   `ArrowUp` / `ArrowDown` are the icon-set equivalents of the three glyphs. */
th[data-allows-sorting] {
  position: relative;
  cursor: pointer;
}

.column-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--space-3);
  margin-inline-start: var(--space-1);
}

/* Sortable, no direction yet: present, but quiet. */
.column-sort::before {
  content: "↕";
  color: var(--c-n-200);
}

/* The pointer arrives: a step stronger, still short of ink. */
th[data-allows-sorting]:is(:hover, [data-hovered]):not([aria-sort=ascending],
[aria-sort=descending]) .column-sort::before {
  color: var(--c-n-300);
}

/* Sorted: the direction, in ink. */
th[aria-sort=ascending] .column-sort::before {
  content: "▲";
  color: var(--c-mark);
}

th[aria-sort=descending] .column-sort::before {
  content: "▼";
  color: var(--c-mark);
}

th[data-allows-sorting]:hover,
th[data-allows-sorting][data-hovered] {
  color: var(--c-mark);
}

th[aria-sort]:not([aria-sort=none]) {
  color: var(--c-mark);
}

/* Column resize handle. React Aria places it at the column edge; the kit paints
   a hairline that only shows itself on hover or while dragging. */
th:has(> .resizer) {
  position: relative;
}

.resizer {
  inline-size: var(--space-2);
  cursor: col-resize;
  touch-action: none;
}

.resizer::after {
  content: "";
  position: absolute;
  inset-block: var(--space-2);
  inset-inline-start: 50%;
  inline-size: var(--border-hairline);
  background: var(--c-n-300);
}

.resizer:hover::after,
.resizer[data-resizing]::after,
.resizer[data-focus-visible]::after {
  background: var(--c-mark);
}

.resizer[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

/* A focused cell, a row under the pointer, a row being dragged, a drop target. */
td[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: calc(-1 * var(--focus-offset));
}

tr[data-hovered] > td {
  background: var(--surface-sunken);
}

tr[data-dragging] {
  opacity: var(--opacity-mute);
}

tr[data-drop-target] > td {
  border-block-end-color: var(--c-mark);
  box-shadow: inset 0 calc(-1 * var(--border-strong)) 0 0 var(--c-mark);
}

/* A resizable table. React Aria writes table-layout: fixed and width: min-content
   inline, plus a pixel width on every th, and expects the table to grow past the
   container so the container scrolls. A max-width here would clamp it and squeeze
   the columns instead, which reads as non-linear dragging and cells that leave
   the table box. */
.table-resizable table {
  max-width: none;
}

/* The handle straddles the column edge, as React Aria's own layout expects, so
   it never covers the header text or the neighbouring cell. */
.resizer {
  position: absolute;
  inset-block: 0;
  inset-inline-end: calc(-1 * var(--space-1));
  inline-size: var(--space-2);
  cursor: col-resize;
  touch-action: none;
}

/* React Aria nests an input inside the handle for keyboard resizing. It is the
   keyboard target, not something to show. */
/* The last column's handle would otherwise hang 4px past the table and widen
   the container's scroll area by that much. */
.table-resizable th:last-child > .resizer {
  inset-inline-end: 0;
}

.resizer > input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: inherit;
}

/* ==== src/components/status.scss ==== */
/* Status, badge, callout. The hue is a safety signal: the swatch carries it,
   the word carries the meaning. Remove either and it still reads. */
.status {
  /* One component-local property: the swatch hue, which the glow derives from. */
  --status-swatch: var(--c-bound);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  font-weight: var(--weight-medium);
}

.status::before {
  content: "";
  inline-size: var(--space-3);
  block-size: var(--space-3);
  flex: none;
  background: var(--status-swatch);
}

/* Idle is neutral and steady: nothing is happening, so nothing moves. */
.status-idle {
  --status-swatch: var(--c-bound);
}

.status-ok {
  --status-swatch: var(--status-ok);
}

.status-warning {
  --status-swatch: var(--status-warning);
}

.status-fault {
  --status-swatch: var(--status-fault);
}

.status-notice {
  --status-swatch: var(--status-notice);
}

/* The glow: a blurred halo of the swatch's own hue, at the pulse duration. */
@keyframes status-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    box-shadow: 0 0 var(--space-2) 0 color-mix(in srgb, var(--status-swatch) 40%, transparent);
  }
}
.status-pulse::before {
  animation: status-pulse var(--duration-pulse) var(--ease) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .status-pulse::before {
    animation: none;
  }
}
.status-glyph {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-0) var(--space-2);
  min-height: var(--space-5);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-full);
  background: var(--surface-paper);
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
  letter-spacing: 0;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.badge-primary,
.badge-solid {
  background: var(--c-ink);
  color: var(--c-paper);
  border-color: var(--c-ink);
}

.badge-neutral {
  background: var(--c-n-200);
  color: var(--c-n-900);
  border-color: var(--c-n-200);
}

.badge-muted {
  background: var(--c-n-100);
  color: var(--c-n-700);
  border-color: var(--c-n-100);
}

/* A solid badge is the status fill with the fill's own type, --status-*-on.
   Both are fixed, so the label reads the same on every sheet and at any
   nesting depth, with no per-sheet rule. */
.badge-ok {
  background: var(--status-ok);
  color: var(--status-ok-on);
  border-color: var(--status-ok);
}

.badge-warning {
  background: var(--status-warning);
  color: var(--status-warning-on);
  border-color: var(--status-warning);
}

.badge-fault {
  background: var(--status-fault);
  color: var(--status-fault-on);
  border-color: var(--status-fault);
}

.badge-notice {
  background: var(--status-notice);
  color: var(--status-notice-on);
  border-color: var(--status-notice);
}

/* Subtle: the lighter face. Type and bound in the foreground role, fill in the
   background role. Both roles swap on the inverse sheet, so there are no
   per-sheet overrides here: the pairs are declared in a11y.pairings. */
.badge-neutral-subtle {
  background: var(--surface-sunken);
  color: var(--c-body);
  border-color: var(--c-bound);
}

.badge-ok-subtle {
  background: var(--status-ok-background);
  color: var(--status-ok-foreground);
  border-color: var(--status-ok-foreground);
}

.badge-warning-subtle {
  background: var(--status-warning-background);
  color: var(--status-warning-foreground);
  border-color: var(--status-warning-foreground);
}

.badge-fault-subtle {
  background: var(--status-fault-background);
  color: var(--status-fault-foreground);
  border-color: var(--status-fault-foreground);
}

.badge-notice-subtle {
  background: var(--status-notice-background);
  color: var(--status-notice-foreground);
  border-color: var(--status-notice-foreground);
}

/* Callout — Figma node 297:669. The note frosts its own hue: the fill at 16%
   over a blur, an edge bar glowing in that hue, and type in the hue's readable
   foreground. One mechanism serves all four tones; the tone only states which
   two roles it reads. `.callout-bold` is not in this node and keeps its opaque
   fill, so the frosted face sits beside it.
   The row and the frost come from `_note.scss`, shared with the toast. */
.callout {
  display: flex;
  align-items: center;
  gap: calc(var(--space-2) + 2 * var(--border-hairline));
  padding-block: calc(var(--space-1) - var(--border-hairline));
  padding-inline-start: calc(var(--space-1) - var(--border-hairline));
  padding-inline-end: var(--space-3);
  --callout-fill: var(--c-ink);
  --callout-on: var(--c-body);
  /* The button derives its hover fill from the same mix, so the hue is stated
     once and read twice. */
  --callout-frost: color-mix(in srgb, var(--callout-fill) 16%, transparent);
  background: var(--callout-frost);
  color: var(--callout-on);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius-sm);
}

/* The edge bar. A tone swaps the two custom properties the shared frost and the
   bar both read, so a new hue needs one rule and no new paint. */
.callout-ok {
  --callout-fill: var(--status-ok);
  --callout-on: var(--status-ok-foreground);
  --bar-ink: var(--status-ok-foreground);
}

.callout-fault {
  --callout-fill: var(--status-fault);
  --callout-on: var(--status-fault-foreground);
  --bar-ink: var(--status-fault-foreground);
}

.callout-warning {
  --callout-fill: var(--status-warning);
  --callout-on: var(--status-warning-foreground);
  --bar-ink: var(--status-warning-foreground);
}

.callout-notice {
  --callout-fill: var(--status-notice);
  --callout-on: var(--status-notice-foreground);
  --bar-ink: var(--status-notice-foreground);
}

.callout::before {
  content: "";
  inline-size: var(--space-1);
  align-self: stretch;
  border-radius: var(--radius-xs);
  background: var(--callout-fill);
  box-shadow: 0 0 var(--space-1) color-mix(in srgb, var(--callout-fill) 76%, transparent);
}

.callout > .icon {
  flex: none;
  color: inherit;
}

/* The body is the row's one flexible column: it takes the free width and never
   deflates below the line, so a trailing control always stands at the row's
   end, never beside the text. The content composes inside: a single line rides
   the body's own medium weight (the node's single-line style), and a lead
   followed by detail — the node's "callout+details" frame — makes the first
   element the semibold lead and every later element the 13px detail on the
   same line. The node draws the lead at 700 and the detail on a 16.9px line;
   the kit's heaviest weight token is 600 and the nearest line token is 16 —
   both deltas are reported, not absorbed. The line step is 6: the node's own
   step, not on the 4px scale — `--space-1` plus the two boundaries. */
.callout-body {
  display: grid;
  row-gap: calc(var(--space-1) + 2 * var(--border-hairline));
  align-content: center;
  flex: 1;
  min-inline-size: 0;
  padding-block: calc(var(--space-2) + var(--border-hairline));
  font-size: var(--text-sm);
  line-height: var(--leading-2xs);
  font-weight: var(--weight-medium);
}

.callout-body > :first-child:not(:only-child) {
  font-weight: var(--weight-semibold);
}

.callout-body > :nth-child(n+2) {
  font-size: var(--text-xs);
}

/* The glyph lines up with the lead: a single line rides the row's centring (the
   icon and the line are both 16 tall), while a body that carries detail puts
   the icon on the lead's own line — flex-start, plus the body's own 9px inset,
   which is the same step the lead's line top sits at. */
.callout:has(> .callout-body > :first-child + *) > .icon {
  align-self: flex-start;
  margin-block-start: calc(var(--space-2) + var(--border-hairline));
}

/* The row's trailing column holds the action; the node's padding-inline-end is 9
   when a button stands at the end rather than 12. */
.callout > .button {
  flex: none;
}

.callout:has(> .button) {
  padding-inline-end: calc(var(--space-2) + var(--border-hairline));
}

/* The node's action is a ghost face: the transparent fill the ghost carries,
   with the tone's own ink on the boundary and the label. That fill survives the
   pointer through hover and press — the ghost's own sunken hover and pressed
   fills read dark against the tint. */
.callout .button-ghost {
  border-color: currentColor;
  color: var(--callout-on);
}

.callout .button-ghost:is(:hover, [data-hovered], :active, [data-pressed]) {
  background: transparent;
}

/* The bold fill is opaque, so it may not read the frost. Without a tone it is
   the sheet's ink with the sheet's paper as the type: both turn over together.
   A tone puts the status fill under its own type, --status-*-on, which stays on
   every sheet as the fill does. The sheet's paper would not: it turns to ink on
   the inverse sheet while Safety Red stays (3.3:1). */
.callout-bold {
  background: var(--c-ink);
  color: var(--c-paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* The tone rules already paint the ghost from `--callout-on`; a bold callout
   flips the sheet's inks, so the ghost reads the callout's own colour. */
.callout-bold .button-ghost {
  color: currentColor;
}

.callout-bold .button-ghost:hover,
.callout-bold .button-ghost[data-hovered] {
  background: transparent;
}

.callout-bold.callout-ok {
  background: var(--status-ok);
  color: var(--status-ok-on);
  --callout-fill: var(--status-ok);
}

.callout-bold.callout-fault {
  background: var(--status-fault);
  color: var(--status-fault-on);
  --callout-fill: var(--status-fault);
}

.callout-bold.callout-warning {
  background: var(--status-warning);
  color: var(--status-warning-on);
  --callout-fill: var(--status-warning);
}

.callout-bold.callout-notice {
  background: var(--status-notice);
  color: var(--status-notice-on);
  --callout-fill: var(--status-notice);
}

.callout-bold::before {
  background: var(--bar-ink, var(--c-mark));
  box-shadow: none;
}

.callout-close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  inline-size: var(--space-5);
  block-size: var(--space-5);
  min-inline-size: var(--space-5);
  min-block-size: var(--space-5);
}

.callout-close:hover,
.callout-close[data-hovered] {
  background: var(--surface-paper);
}

/* On a bold fill the glyph is the fill's own type, so the sheet's paper under
   it would hide it (white on white on the paper sheet). The pointer leaves the
   glyph's colour at the frost's 16% instead. */
.callout-bold .callout-close:hover,
.callout-bold .callout-close[data-hovered] {
  background: color-mix(in srgb, currentColor 16%, transparent);
}

.callout-close:focus-visible,
.callout-close[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

/* ==== src/components/toast.scss ==== */
/* Toast region — the Sonner-shaped stack, painted by the kit.

   React Aria owns the queue, the timers, the pause on hover and focus, the
   announcement and the keyboard dismissal. What this sheet adds to the kit's
   toast is the stack: the region is a fixed, zero-sized box at a corner, every
   toast is placed against it, and the stack composes one transform out of three
   custom properties — where the toast sits in the stack, how far the pointer
   has dragged it, and how far back it is scaled. The transform is the only
   thing that moves, so the collapse, the expand under the pointer and the swipe
   are one transition.

   The row itself is still the note row's shape (a mark, the text, a trailing
   control) and the paint is still the node's: paper, `--c-edge`, and the one
   elevation in the kit. `--toast-offset` and `--toast-gap` come from the
   component's own props; everything else is a token. */
.toast-region {
  /* Component-local, set inline by the toaster for each instance. Declared here
     with token fallbacks so the sheet stands on its own. */
  --toast-offset: var(--space-6);
  --toast-gap: var(--space-4);
  position: fixed;
  z-index: var(--layer-overlay);
  /* Zero-sized: the toasts are placed against this corner, so the region never
     pushes the page and never becomes a hit area of its own. */
  inline-size: 0;
  block-size: 0;
}

.toast-region[data-position^=top] {
  inset-block-start: var(--toast-offset);
}

.toast-region[data-position^=bottom] {
  inset-block-end: var(--toast-offset);
}

.toast-region[data-position$=left] {
  inset-inline-start: var(--toast-offset);
}

.toast-region[data-position$=right] {
  inset-inline-end: var(--toast-offset);
}

/* A centred stack is inset on both sides and spans what is left, so its toasts
   have a box to centre themselves in. */
.toast-region[data-position$=center] {
  inset-inline: var(--toast-offset);
  inline-size: auto;
}

.toast {
  /* The stack, the drag and the scale, as the component computes them. Declared
     here so the composition below has something to read. */
  --toast-stack: var(--space-0);
  --toast-scale: 1;
  --swipe-x: var(--space-0);
  --swipe-y: var(--space-0);
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  inline-size: min(var(--space-64) * 1.5, 100vw - var(--toast-offset) * 2);
  /* The note row's own proportions: the block and the leading edge keep the
     single step, the trailing edge takes the wider one, and the icon sits one
     border and one step in. `pnpm check:layout` asserts exactly this. */
  padding: var(--space-1);
  padding-inline-end: var(--space-3);
  border: var(--border-hairline) solid var(--c-edge);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  color: var(--c-mark);
  box-shadow: var(--shadow-overlay);
  /* One transform for the stack, the drag and the scale. The component supplies
     the parts as custom properties; the sheet owns the composition. */
  transform: translateY(var(--toast-stack, 0)) translate3d(var(--swipe-x, 0px), var(--swipe-y, 0px), 0) scale(var(--toast-scale, 1));
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease), background-color var(--duration) var(--ease), border-color var(--duration) var(--ease);
  /* A toast is chrome that comes and goes; its text is not the document. */
  user-select: none;
}

/* Anchoring. A bottom stack grows upward, a top stack downward, and a centred
   stack keeps its own width and splits the difference. */
.toast-region[data-position^=top] .toast {
  inset-block-start: 0;
}

.toast-region[data-position^=bottom] .toast {
  inset-block-end: 0;
}

.toast-region[data-position$=left] .toast {
  inset-inline-start: 0;
}

.toast-region[data-position$=right] .toast {
  inset-inline-end: 0;
}

.toast-region[data-position$=center] .toast {
  inset-inline: 0;
  margin-inline: auto;
}

/* Entry. React Aria carries no enter flag to the paint in 1.21.1, so the toast
   arrives unmounted and the component lifts that flag on the next frame; the
   transition on the toast does the rest. */
.toast:not([data-mounted]) {
  opacity: 0;
}

/* Past the visible cap a toast waits: out of sight and out of the tab order. */
.toast:not([data-visible]) {
  visibility: hidden;
  opacity: 0;
}

/* Swiped out: the toast leaves the way the pointer sent it. */
.toast[data-swipe-out=left] {
  transform: translateY(var(--toast-stack, 0)) translateX(-120%);
  opacity: 0;
}

.toast[data-swipe-out=right] {
  transform: translateY(var(--toast-stack, 0)) translateX(120%);
  opacity: 0;
}

.toast[data-swipe-out=up] {
  transform: translateY(calc(var(--toast-stack, 0) - 120%));
  opacity: 0;
}

.toast[data-swipe-out=down] {
  transform: translateY(calc(var(--toast-stack, 0) + 120%));
  opacity: 0;
}

.toast:is([data-focus-visible]) {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

/* The row: a mark, the text, then the actions. The actions drop under the text
   when the toast is too narrow to hold them beside it. */
.toast-content {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-inline-size: 0;
}

.toast-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: var(--space-4);
  block-size: var(--space-4);
}

.toast-mark {
  fill: currentColor;
}

.toast-text {
  display: grid;
  align-content: center;
  /* A grid item does not stretch by default, so the text column would shrink to
     its longest word instead of taking the room the row gave it. */
  justify-self: stretch;
  row-gap: var(--space-2);
  padding-block: var(--space-2);
  min-inline-size: 0;
  flex: 1;
  min-inline-size: var(--space-24);
}

.toast-title {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-2xs);
  font-weight: var(--weight-semibold);
  color: currentColor;
}

.toast-description {
  margin: 0;
  font-size: var(--text-xs);
  line-height: var(--leading-2xs);
  color: var(--c-mute);
}

.toast-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
}

/* The loading mark is Carbon's in-progress glyph, turning on its own centre. */
.toast-loader {
  animation: toast-spin var(--duration-slow) linear infinite;
  transform-origin: center;
}

@keyframes toast-spin {
  to {
    transform: rotate(1turn);
  }
}
/* The close affordance: the node's small trailing control, in the boundary
   register, going to the mark under the pointer. */
.toast .toast-close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-bound);
  cursor: pointer;
  inline-size: var(--space-5);
  block-size: var(--space-5);
}

.toast .toast-close:hover,
.toast .toast-close[data-hovered] {
  color: var(--c-mark);
}

.toast .toast-close:focus-visible,
.toast .toast-close[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

/* The variant marks take the status register. The error token is the one the
   sheet already swaps — the fault fill on paper, the fault foreground on the
   inverse sheet — so the mark stays legible on both. */
.toast[data-variant=success] .toast-icon {
  color: var(--status-ok-foreground);
}

.toast[data-variant=warning] .toast-icon {
  color: var(--status-warning-foreground);
}

.toast[data-variant=info] .toast-icon {
  color: var(--status-notice-foreground);
}

.toast[data-variant=error] .toast-icon {
  color: var(--invalid);
}

.toast[data-variant=loading] .toast-icon {
  color: var(--c-mute);
}

/* Rich: the status tint, exactly as a badge and a callout wear it — background,
   foreground and boundary from the one verified pairing. */
.toast[data-rich][data-variant=success] {
  background: var(--status-ok-background);
  color: var(--status-ok-foreground);
  border-color: var(--status-ok-foreground);
}

.toast[data-rich][data-variant=warning] {
  background: var(--status-warning-background);
  color: var(--status-warning-foreground);
  border-color: var(--status-warning-foreground);
}

.toast[data-rich][data-variant=info] {
  background: var(--status-notice-background);
  color: var(--status-notice-foreground);
  border-color: var(--status-notice-foreground);
}

.toast[data-rich][data-variant=error] {
  background: var(--status-fault-background);
  color: var(--status-fault-foreground);
  border-color: var(--status-fault-foreground);
}

.toast[data-rich] .toast-icon {
  color: currentColor;
}

/* A custom toast is the caller's node and nothing else: the row keeps its
   padding and drops the skeleton. */
.toast-custom {
  display: block;
  padding: var(--space-3);
}

/* ==== src/components/meters.scss ==== */
/* Native bounded readings and task completion. The value belongs in HTML.

   The paint follows the slider's structure (node 291:465): the well carries the
   boundary, the paper fill and the seat shadow, and the travelled band is a
   child whose lengths live here — inset from the well's *outer* edges, which
   inside the padding box means the step minus the boundary.

   Node 291:465 ("meter-1 (same for progressbar)") gives the full-size well the
   same body as the slider's track: 214x20 with a 12 tall band held 4 off the
   outer edges. The same node draws a 10px thin well; the meter takes that one. */
.progress,
.meter {
  display: block;
  inline-size: 100%;
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-faint);
  background: var(--surface-paper);
  color: var(--c-mark);
  appearance: none;
  block-size: var(--space-5);
  overflow: hidden;
}

/* The meter at half the body: the node's 10px thin well, finally from halved
   steps so the model's numbers stay exact rather than snapping to no step.
   The band keeps --radius-xs — half of a 1px corner is below the token floor. */
.meter {
  block-size: calc(var(--space-5) / 2);
}

.progress::-webkit-progress-bar {
  background: transparent;
}

.progress::-webkit-progress-value {
  background: var(--c-mark);
}

.progress::-moz-progress-bar {
  background: var(--c-mark);
}

.meter::-webkit-meter-bar {
  block-size: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
}

.meter::-webkit-meter-optimum-value,
.meter::-webkit-meter-suboptimum-value,
.meter::-webkit-meter-even-less-good-value {
  background: var(--c-mark);
}

.meter::-moz-meter-bar {
  background: var(--c-mark);
}

/* Unknown is a hollow dashed track, accompanied by a visible word or marker
   (Unknown, ??? %), never 0%. */
.meter-unknown {
  border-style: dashed;
}

/* React Aria's ProgressBar and Meter render divs, so the same two classes carry
   both them and the native elements: one concept, one look, no second paint.
   The fill is a child whose width is the value, handed over as a local custom
   property, so no length lives in the component and every painted length stays
   here. The label row is the slider's reading layout (shared
   `reading-layout`/`reading-value`): the count beside the label, the well
   keeping the full width underneath, one row step between them. */
.progress-field,
.meter-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  row-gap: var(--space-1);
  column-gap: var(--space-3);
}
.progress-field > .field-label,
.progress-field > .meter-value,
.progress-field > .progress-value,
.meter-field > .field-label,
.meter-field > .meter-value,
.meter-field > .progress-value {
  grid-row: 1;
}
.progress-field > :is(.meter-value, .progress-value),
.meter-field > :is(.meter-value, .progress-value) {
  grid-column: 2;
}
.progress-field > :is(.progress, .meter),
.meter-field > :is(.progress, .meter) {
  grid-column: 1/-1;
  grid-row: 2;
}

/* The reading is HTML, hidden from the accessibility tree because the
   meter and progressbar roles already announce it. */
.meter-value,
.progress-value {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-regular);
  white-space: nowrap;
}

/* The travelled part: the well rides the slider's band structure and its ink.
   Progress holds the 12 tall band 4 off the well's outer edges; the meter runs
   the same structure at half scale — 6 tall, 2 off the outer edges — from
   halved steps and the boundary. Each band stays in normal flow with a real
   block size: the well is not a positioned ancestor, so an absolutely
   positioned band would resolve against the page and fill the viewport instead
   of the well. */
.progress-fill,
.meter-fill {
  block-size: var(--space-3);
  border-radius: var(--radius-xs);
  transition: inline-size var(--duration) var(--ease);
  margin-block: calc(var(--space-1) - var(--border-hairline));
  background: var(--c-mark);
}

.progress-fill {
  /* Component-local, like --mark-src: the control writes the value as a
     percentage and the stylesheet owns the length. */
  --progress: 0;
  inline-size: var(--progress);
}

/* The meter's band at half scale: 6 tall, held 2 off the outer edges. */
.meter-fill {
  block-size: calc(var(--space-3) / 2);
  margin-block: calc(var(--space-1) / 2 - var(--border-hairline));
  /* Component-local, as above. */
  --meter: 0;
  inline-size: var(--meter);
}

/* Indeterminate is a travelling bar and an absent value, never zero. */
.progress-fill[data-indeterminate] {
  inline-size: 40%;
  animation: progress-sweep var(--duration-pulse) linear infinite;
}

@keyframes progress-sweep {
  from {
    translate: -100% 0;
  }
  to {
    translate: 250% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .meter-fill {
    transition: none;
  }
  .progress-fill[data-indeterminate] {
    animation: none;
  }
}

/* ==== src/components/telemetry.scss ==== */
/* Compact groups of physical slots and their readings. */
.telemetry-group {
  min-inline-size: 0;
  padding: var(--space-3);
  border: var(--border-hairline) solid var(--c-n-300);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-inline-size: 0;
  padding: var(--space-2);
  background: var(--surface-raised);
  text-align: center;
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  overflow-wrap: anywhere;
}

.telemetry-cell > .swatch {
  align-self: center;
}

.telemetry-cell > .meter {
  margin-block-start: auto;
}

.telemetry-slot,
.telemetry-reading {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.telemetry-slot {
  align-items: center;
}

.telemetry-reading {
  margin-block-start: auto;
}

/* A row per unit keeps several material groups beside a camera. */
.telemetry-compact {
  container-type: inline-size;
}

.telemetry-compact .telemetry-group {
  display: grid;
  grid-template-columns: var(--space-12) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
  padding: 0;
  border: 0;
}

.telemetry-compact .telemetry-grid {
  gap: var(--space-1);
  margin: 0;
}

.telemetry-compact .telemetry-cell {
  gap: 0;
  padding: var(--space-1);
}

.telemetry-compact .telemetry-slot {
  flex-direction: row;
  justify-content: center;
  gap: var(--space-1);
}

.telemetry-compact .swatch {
  inline-size: var(--space-3);
  block-size: var(--space-3);
}

.telemetry-compact .telemetry-reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1);
}

.telemetry-compact .telemetry-reading > .num {
  white-space: nowrap;
}

.telemetry-compact .meter {
  min-inline-size: 0;
  block-size: var(--space-1);
}

@container (max-width: 24rem) {
  .telemetry-compact .telemetry-group {
    grid-template-columns: minmax(0, 1fr);
  }
  .telemetry-compact .telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Slots as a table: one row per physical slot, one table per unit, beside a
   camera. Units sit side by side when the container has room and stack
   otherwise; a unit that has the width to itself widens its level column. */
.slot-groups {
  container-name: slot-groups;
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--space-48), 1fr));
  gap: var(--space-5);
}

.slot-group {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-inline-size: 0;
}

.slot-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  padding-block-end: var(--space-1);
  border-block-end: var(--border-hairline) solid var(--c-ink);
}

.slot-group-name {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: var(--text-3xs);
  line-height: var(--leading-3xs);
  letter-spacing: var(--tracking-3xs);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  color: var(--c-ink);
  white-space: nowrap;
}

/* The unit's readings: an icon and a value each, separated by middle dots. */
.slot-group-readings {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  font-size: var(--text-3xs);
  line-height: var(--leading-3xs);
  color: var(--c-n-700);
  white-space: nowrap;
}

.slot-group-readings > * + *::before {
  content: "·";
  margin-inline-end: var(--space-1);
  color: var(--c-n-500);
}

.reading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.reading > .icon {
  block-size: var(--space-4);
  inline-size: var(--space-4);
}

.reading-ok > .icon {
  color: var(--status-ok-foreground);
}

/* Side-by-side groups use matching name and reading rows, so every slot table
   starts on the same row regardless of the unit name's length. */
@container slot-groups (min-width: 25rem) {
  .slot-group:not(:only-child) .slot-group-head {
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: var(--space-0);
    justify-content: flex-start;
    min-block-size: calc(var(--leading-3xs) + var(--leading-3xs) + var(--space-1) + var(--border-hairline));
  }
}
.slot-table {
  table-layout: fixed;
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
}

.slot-table th,
.slot-table td {
  padding-inline: var(--space-0) var(--space-2);
  border-block-end: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-table th:last-child,
.slot-table td:last-child {
  padding-inline-end: var(--space-0);
}

.slot-table th {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  font-size: var(--text-3xs);
  line-height: var(--leading-3xs);
  letter-spacing: var(--tracking-3xs);
  padding-block: var(--space-0) var(--space-1);
}

.slot-table th:first-child {
  inline-size: var(--space-10);
}

.slot-table th:last-child {
  inline-size: var(--space-24);
}

.slot-table td {
  padding-block: var(--space-1);
  border-block-start: var(--border-hairline) solid var(--c-n-200);
  font-size: var(--text-2xs);
  line-height: var(--leading-2xs);
  vertical-align: middle;
}

/* The slot number beside its data swatch. */
.slot-id {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-mono);
  color: var(--c-ink);
}

.slot-table .swatch {
  inline-size: var(--space-3);
  block-size: var(--space-3);
  border-color: var(--c-ink);
}

/* The remaining level: a meter that takes the room, then the numeral. */
.slot-level {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* The remaining level: a meter that takes the room, then the numeral. The meter
   is either the native element or our Meter component, which wraps its track —
   so the wrapper takes the room and the track fills it. */
.slot-level > .meter,
.slot-level > .meter-field {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.slot-level > .num {
  flex: none;
  inline-size: var(--space-12);
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  font-weight: var(--weight-semibold);
  color: var(--c-ink);
}

.slot-level > .muted {
  font-weight: var(--weight-regular);
  color: var(--c-n-600);
}

@container (min-width: 24rem) {
  .slot-table th:last-child {
    inline-size: var(--space-40);
  }
}

/* ==== src/components/swatch.scss ==== */
/* Colour swatch — closed variants only. Pages never set background on these. */
.swatch {
  display: block;
  inline-size: var(--space-10);
  block-size: var(--space-6);
  border: var(--border-hairline) solid var(--c-n-500);
  border-radius: var(--radius-sm);
  flex: none;
}

.swatch-paper {
  background: var(--c-paper);
}

.swatch-n-050 {
  background: var(--c-n-050);
}

.swatch-n-100 {
  background: var(--c-n-100);
}

.swatch-n-200 {
  background: var(--c-n-200);
}

.swatch-n-300 {
  background: var(--c-n-300);
}

.swatch-n-400 {
  background: var(--c-n-400);
}

.swatch-n-500 {
  background: var(--c-n-500);
}

.swatch-n-600 {
  background: var(--c-n-600);
}

.swatch-n-700 {
  background: var(--c-n-700);
}

.swatch-n-800 {
  background: var(--c-n-800);
}

.swatch-n-900 {
  background: var(--c-n-900);
}

.swatch-ink {
  background: var(--c-ink);
}

.swatch-primary {
  background: var(--primary);
}

.swatch-primary-on {
  background: var(--primary-on);
}

.swatch-primary-background {
  background: var(--primary-background);
}

.swatch-primary-foreground {
  background: var(--primary-foreground);
}

.swatch-primary-hover {
  background: var(--primary-hover);
}

.swatch-primary-active {
  background: var(--primary-active);
}

.swatch-fault {
  background: var(--status-fault);
}

.swatch-warning {
  background: var(--status-warning);
}

.swatch-ok {
  background: var(--status-ok);
}

.swatch-notice {
  background: var(--status-notice);
}

.swatch-fault-foreground {
  background: var(--status-fault-foreground);
}

.swatch-warning-foreground {
  background: var(--status-warning-foreground);
}

.swatch-ok-foreground {
  background: var(--status-ok-foreground);
}

.swatch-notice-foreground {
  background: var(--status-notice-foreground);
}

.swatch-fault-background {
  background: var(--status-fault-background);
}

.swatch-warning-background {
  background: var(--status-warning-background);
}

.swatch-ok-background {
  background: var(--status-ok-background);
}

.swatch-notice-background {
  background: var(--status-notice-background);
}

.swatch-idle {
  background: var(--c-paper);
}

/* ==== src/components/thumb.scss ==== */
/* Thumbnail frame: a small preview in a hairline frame beside its name. An
   empty frame stands for a preview that is missing or still loading. */
.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: var(--space-12);
  block-size: var(--space-10);
  border: var(--border-hairline) solid var(--c-n-300);
  background: var(--surface-raised);
  overflow: hidden;
}

.thumb > img {
  display: block;
  inline-size: var(--space-10);
  block-size: var(--space-8);
  object-fit: contain;
}

/* ==== src/components/price.scss ==== */
/* Price — the reported numeral cluster (same job as .t-kpi). */
.price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-feature-settings: var(--font-features-data);
}

.price-value {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-features-data), var(--font-features-mono);
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
  letter-spacing: var(--tracking-2xl);
  font-weight: var(--weight-semibold);
  color: var(--c-ink);
}

.price-unit {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--c-n-600);
}

.price-was {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--c-n-600);
  text-decoration: line-through;
}

.price-sm .price-value {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  letter-spacing: var(--tracking-xl);
}

/* ==== src/components/product-card.scss ==== */
/* Product card: a product's photograph above its name and its price, in a grid
   of products a customer can open. No frame: the photograph is the card's
   edge. The name's link is the card's one link, and it stretches over the
   whole card, so the photograph opens it too and focus rings the card. An
   empty media frame stands for a photograph that is missing or still
   loading. */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-card-media {
  aspect-ratio: 3/2;
  margin-block-end: var(--space-2);
  overflow: hidden;
  background: var(--surface-raised);
}

.product-card-media > img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Body size: a grid of names reads as a list, not as a run of headings. The
   element is still h3, so the page keeps its heading order. */
.product-card-title {
  font-size: var(--text-md);
  line-height: var(--leading-md);
  letter-spacing: var(--tracking-md);
  font-weight: var(--weight-regular);
}

.product-card-title a {
  color: inherit;
  text-decoration: none;
}

.product-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.product-card-title a:focus-visible {
  outline: none;
}

.product-card-title a:focus-visible::after {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

@media (hover: hover) {
  .product-card:hover .product-card-title a {
    text-decoration: underline;
  }
}

/* ==== src/components/summary.scss ==== */
/* A list of facts, each label with its value beside it, read left to right:
   an order summary in the configurator's aside, a record's details in pfm.

   The labels share one column, as wide as the longest label but never more
   than half the list, so every value starts at the same place and the eye
   goes from a label straight to its value. A value too long for its column
   (an id, a link) wraps inside it instead of running under the label:
   `break-word`, not `anywhere`, because `anywhere` is inherited into a button
   beside the value and lets it shrink until its label breaks mid-word. Each
   line is a subgrid row of the list, so a line stays one `div` holding its
   `dt` and `dd`, and the total keeps its rule across both columns.

   Until 0.14.0 a line pushed its value to the far end of the row
   (`justify-content: space-between`), which on a wide page left a page's
   width of white between a label and its value. */
.summary {
  display: grid;
  grid-template-columns: fit-content(50%) minmax(0, 1fr);
  column-gap: var(--space-6);
  row-gap: var(--space-2);
  font-feature-settings: var(--font-features-data);
}

.summary-line {
  display: grid;
  grid-column: 1/-1;
  grid-template-columns: subgrid;
  align-items: baseline;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.summary-line dt {
  color: var(--c-n-600);
}

.summary-line dd {
  min-inline-size: var(--space-0);
  margin: var(--space-0);
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

.summary-total {
  border-block-start: var(--border-strong) solid var(--c-ink);
  padding-block-start: var(--space-3);
  margin-block-start: var(--space-2);
}

/* ==== src/components/file.scss ==== */
/* File drop zone. React Aria DropZone takes the drop and FileTrigger opens the
   picker from the pressable child inside it. The zone owns the focus ring,
   because the focusable element React Aria renders is hidden.

   Node 246:2109 gives the zone a paper fill on the bound hairline, the glyph
   beside the label, and the small button at the far end. The node's own steps
   are 20 / 12 along the inline axis and 9 block, with 10 between items — the
   9 is the block step plus the boundary, the 10 is the inline step plus the two
   boundaries, built the same way the button's 10px inline padding is. */
.file {
  --file-gap: calc(var(--space-2) + 2 * var(--border-hairline));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-block: calc(var(--space-2) + var(--border-hairline));
  padding-inline-start: var(--space-5);
  padding-inline-end: var(--space-3);
  gap: var(--file-gap);
  border: var(--border-hairline) dashed var(--c-bound);
  border-radius: var(--radius-sm);
  background: var(--surface-paper);
  color: var(--c-body);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.file-text {
  /* The glyph and the label read as one item at the zone's start edge; the
     node's 10px separates them the same way it separates the picker. */
  display: flex;
  align-items: center;
  gap: var(--file-gap);
}
.file-text > svg {
  color: var(--c-mark);
}

.file:is([data-hovered], :hover) {
  border-color: var(--c-mark);
}

/* A drag over the zone is not focus: a solid bound and a well, no ring. */
.file[data-drop-target] {
  border-style: solid;
  border-color: var(--c-mark);
  background: var(--surface-sunken);
}

/* React Aria focuses a hidden button inside the zone, so the ring is drawn on
   the zone itself. */
.file[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: var(--focus-offset);
}

.file[data-disabled] {
  color: var(--disabled-text);
  border-color: var(--disabled-bound);
  cursor: not-allowed;
}

/* ==== src/components/form.scss ==== */
/* Form — React Aria Form. Stacked fields with shared validation. Layout only: no state paint. */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Linear: fields and the submit on one row. Rows start at the top, so a hint
   or error growing inside a field cannot shift the button vertically — the
   button holds the row's first line. Wrap happens; the field stretches to the
   free space. Direct fields stretch; the actions keep their own width. */
.form-linear {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}
.form-linear > .field,
.form-linear > .field-group {
  flex: 1;
  min-inline-size: 0;
}
.form-linear {
  /* The visible label does not come along: a line above the input gives the
     field a second top line and pushes the submit off its row, which is what a
     one-line form exists not to do. The field speaks through its placeholder.
     The label node, when the caller passed one, stays in the tree for the
     screen reader and is clipped from sight — the kit refuses the visible
     label, not the accessible name. Placeholder-only naming is otherwise an
     anti-pattern; this is the sanctioned exception.

     The selector is the label register's own: a bare <label> in the class API,
     and the React wrapper's Label — .field-label, which is a span on Select.
     A .check is the control, not the label, so it stays. */
}
.form-linear > .field > :is(label, .field-label):not(.check) {
  position: absolute;
  inline-size: var(--border-hairline);
  block-size: var(--border-hairline);
  margin: calc(var(--space-0) - var(--border-hairline));
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==== src/components/sheet.scss ==== */
/* A4 print page frame. On screen it is a paper panel that may shrink.
   Physical surfaces have no inverse: a sheet is white paper on any screen.
   The token restore for .sheet inside .surface-inverse is generated into
   tokens.css; this rule only pins the colour scheme and the body colour. */
.sheet {
  box-sizing: border-box;
  color-scheme: light;
  color: var(--c-n-900);
  width: 100%;
  max-width: var(--page-a4-w);
  padding: var(--page-margin);
  background: var(--surface-paper);
  border: var(--border-hairline) solid var(--c-n-300);
}

/* ==== src/components/texture.scss ==== */
/* Texture bands. A background layer and nothing else: it sits behind
   content, never receives pointer events, and its opacity is capped by a
   token computed from the tile's own peak alpha on both sheets, so text
   contrast cannot fall through the floor either way.
   Permitted: hero bands, section bands, the inverse footer, box panels.
   Forbidden: inside cards, tables, inputs, dashboards, safety signs, and
   as a page-wide wash. Paths are relative to dist/elench.css. */
.texture {
  position: relative;
  isolation: isolate;
}

.texture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--layer-behind);
  pointer-events: none;
  background-repeat: repeat;
  opacity: var(--texture-default);
}

.texture-quiet::before {
  opacity: var(--texture-quiet);
}

.texture-loud::before {
  opacity: var(--texture-loud);
}

.tx-fdm-bead::before {
  background-image: url("./textures/fdm-bead-ink.png");
}

.tx-fdm-carbon::before {
  background-image: url("./textures/fdm-carbon-ink.png");
}

.tx-metal-ripple::before {
  background-image: url("./textures/metal-ripple-ink.png");
}

.surface-inverse.tx-fdm-bead::before {
  background-image: url("./textures/fdm-bead-paper.png");
}

.surface-inverse.tx-fdm-carbon::before {
  background-image: url("./textures/fdm-carbon-paper.png");
}

.surface-inverse.tx-metal-ripple::before {
  background-image: url("./textures/metal-ripple-paper.png");
}

/* ==== src/components/tape.scss ==== */
/* toolbox.shop tape. The one decoration in the system that carries hue: the
   filament colours toolbox.shop prints in, from color.filament. Only this
   file reads --filament-*, and the lint fails anywhere else. Elench surfaces
   never use it. Both pieces are decoration and carry no meaning, so they have
   no contrast pairing: .tape-corner paints a pseudo-element, and .tape-edge is
   an empty element the page hides from assistive technology. The colours are
   physical, so the inverse sheet keeps them. */
/* Tape three stripes wide across a card's top end corner. Its centre line
   meets the top edge and the end edge 10.7 stripes from the corner; the card
   clips the rest. Its far side leaves the end edge 12.8 stripes down, so the
   card's content starts 13 stripes down and the tape never crosses text. */
.tape-corner {
  position: relative;
  overflow: hidden;
  padding-block-start: calc(var(--tape-stripe) * 13);
}

.tape-corner::after {
  content: "";
  position: absolute;
  inset-block-start: calc(var(--tape-stripe) * 3.85);
  inset-inline-end: calc(var(--tape-stripe) * -8.65);
  box-sizing: content-box;
  inline-size: calc(var(--tape-stripe) * 28);
  block-size: var(--tape-stripe);
  border-block: var(--tape-stripe) solid var(--filament-red);
  border-block-end-color: var(--filament-teal);
  background: var(--filament-yellow);
  transform: rotate(45deg);
  pointer-events: none;
}

.tape-corner:dir(rtl)::after {
  transform: rotate(-45deg);
}

/* A full-width strip of 45-degree stripes: red, yellow, teal, repeating.
   A hard-stop repeating gradient paints the stripes; nothing blends. */
.tape-edge {
  display: block;
  block-size: var(--tape-edge);
  background-image: repeating-linear-gradient(45deg, var(--filament-red) 0 var(--tape-stripe), var(--filament-yellow) var(--tape-stripe) calc(var(--tape-stripe) * 2), var(--filament-teal) calc(var(--tape-stripe) * 2) calc(var(--tape-stripe) * 3));
}

/* ==== src/components/app-shell.scss ==== */
/* Application frame: a persistent sidebar, a compact breadcrumb header, and
   content sized to the space left beside the navigation. The frame is the page:
   no outer margin and no border, so the sidebar reaches the viewport edge. */
.app-shell {
  display: grid;
  grid-template-columns: var(--space-64) minmax(0, 1fr);
  min-block-size: 100dvh;
  background: var(--surface-paper);
  transition: grid-template-columns var(--duration) var(--ease);
}

.app-shell[data-collapsed=true] {
  grid-template-columns: calc(var(--space-12) + var(--space-2)) minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  inset-block-start: var(--space-0);
  align-self: start;
  block-size: 100dvh;
  min-inline-size: 0;
  overflow: auto;
  padding: var(--space-2);
  border-inline-end: var(--border-hairline) solid var(--c-n-300);
  background: var(--surface-raised);
  z-index: var(--layer-sticky);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--space-12);
  padding: var(--space-2);
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
}

/* The mark is a logo asset the application supplies; the frame only sizes the
   slot. */
.app-brand .mark {
  flex: none;
  inline-size: var(--space-6);
  block-size: var(--space-6);
}

.app-brand-label {
  display: grid;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: var(--weight-medium);
}

.app-brand-label > :last-child {
  color: var(--c-n-600);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}

.app-nav {
  margin-block-start: var(--space-6);
}

/* The nav's section label. The eyebrow recipe owns the type where the markup
   says so; this fallback keeps the compact label for markup that does not. The
   class always owns the slot's padding and hides the label in the icon rail. */
.app-nav-group {
  padding: var(--space-2) var(--space-3);
}

.app-nav-group:not(.eyebrow) {
  color: var(--c-n-600);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--space-10);
  margin-block: var(--space-1);
  padding: var(--space-2);
  border: var(--border-hairline) solid transparent;
  color: var(--c-n-900);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-link:hover {
  background: var(--surface-sunken);
}

.app-nav-link[aria-current=page] {
  border-color: var(--c-ink);
  background: var(--surface-sunken);
  color: var(--c-ink);
  font-weight: var(--weight-medium);
}

.app-icon {
  flex: none;
  inline-size: var(--space-5);
  block-size: var(--space-5);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--border-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell[data-collapsed=true] .app-brand-label,
.app-shell[data-collapsed=true] .app-nav-label,
.app-shell[data-collapsed=true] .app-nav-group {
  display: none;
}

.app-shell[data-collapsed=true] .app-brand,
.app-shell[data-collapsed=true] .app-nav-link {
  justify-content: center;
}

.app-main {
  min-inline-size: 0;
  container: app-main/inline-size;
}

.app-header {
  position: sticky;
  inset-block-start: var(--space-0);
  z-index: var(--layer-raised);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-block-size: var(--space-16);
  padding: var(--space-2) var(--space-4);
  border-block-end: var(--border-hairline) solid var(--c-n-300);
  background: var(--surface-paper);
}

.app-sidebar-toggle.button {
  flex: none;
  inline-size: var(--space-10);
  padding: var(--space-2);
}

.app-breadcrumbs {
  min-inline-size: 0;
}

.app-breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-0);
  padding: var(--space-0) var(--space-4);
  border-inline-start: var(--border-hairline) solid var(--c-edge);
  list-style: none;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.app-breadcrumbs li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.app-breadcrumbs li + li::before {
  content: "/";
  color: var(--c-mute);
}

.app-breadcrumbs a {
  color: var(--c-mute);
}

/* The same hover the .breadcrumbs component carries: two ramp steps stronger
   than mute, underline on. This copy predates the component; when the app
   frame adopts .breadcrumbs this rule goes with it. */
@media (hover: hover) {
  .app-breadcrumbs a:hover {
    color: var(--c-strong);
    text-decoration: underline;
  }
}
.app-breadcrumbs [aria-current=page] {
  color: var(--c-mark);
}

.app-content {
  padding: var(--space-6);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.app-content > .row-between {
  flex-wrap: wrap;
}

.app-content:focus {
  outline: none;
}

.app-content h1 {
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
  letter-spacing: var(--tracking-2xl);
}

/* Equal summary cards above a larger work area. The app owns their content. */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.overview-grid > * {
  min-inline-size: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-6);
}

.metric-grid > * {
  min-inline-size: 0;
}

/* A Col collapses at the viewport's breakpoints; inside the frame the content is
   narrower than the viewport by the sidebar, so spans of six or fewer collapse
   on the content's own width instead. */
@container app-main (max-width: 64rem) {
  .app-content .grid > :is([data-span="1"], [data-span="2"], [data-span="3"], [data-span="4"], [data-span="5"], [data-span="6"]) {
    grid-column-end: span 6;
  }
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@container app-main (max-width: 48rem) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container app-main (max-width: 40rem) {
  .app-content {
    padding: var(--space-4);
  }
  .app-content .grid > :is([data-span="1"], [data-span="2"], [data-span="3"], [data-span="4"], [data-span="5"], [data-span="6"]) {
    grid-column-end: span 12;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 48rem) {
  .app-shell {
    grid-template-columns: calc(var(--space-12) + var(--space-2)) minmax(0, 1fr);
  }
  .app-shell:not([data-collapsed=true]) .app-sidebar {
    inline-size: var(--space-64);
  }
  .app-header {
    gap: var(--space-2);
    padding-inline: var(--space-2);
  }
  .app-shell:not([data-collapsed=true]) .app-header {
    padding-inline-start: calc(var(--space-64) - var(--space-12));
  }
  .app-shell:not([data-collapsed=true]) .app-breadcrumbs {
    display: none;
  }
}

/* ==== src/components/menu.scss ==== */
/* Menus keep keyboard focus and selection visible on either sheet. */
.menu-popover {
  inline-size: var(--space-64);
  max-inline-size: calc(100vw - var(--space-8));
  max-block-size: calc(100dvh - var(--space-8));
  overflow: auto;
  padding: var(--space-1);
  border: var(--border-hairline) solid var(--c-bound);
  border-radius: var(--radius-sm);
  /* The button's corner and the floating layer's rise: the same --radius-sm
     the controls use, and the one elevation shadow, measured on this node. */
  box-shadow: var(--shadow-overlay);
  background: var(--surface-paper);
  color: var(--c-n-900);
  z-index: var(--layer-overlay);
}

.menu {
  outline: none;
}

.menu-heading {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-3xs);
  line-height: var(--leading-3xs);
  letter-spacing: var(--tracking-3xs);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  color: var(--c-mute);
}

.menu-item {
  position: relative;
  /* The state fill is a pseudo below the text (negative z-index inside this
     item's own stacking context), not the item's own background. */
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--space-8);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--c-mark);
  cursor: pointer;
  outline: none;
}

/* The row's tint, inset by a hairline top and bottom: two adjacent rows show
   2px of surface between their fills while the item boxes stay contiguous, so
   the pointer never crosses a gap on its way from one row to the next. */
.menu-item::before {
  content: "";
  position: absolute;
  inset-block: var(--border-hairline);
  inset-inline: 0;
  z-index: -1;
  border-radius: var(--radius-xs);
  background: transparent;
  transition: background-color var(--duration-fast) var(--ease);
}

/* The pointer tint never lands on a disabled row, and `selected` is declared
   after it so a chosen row keeps its own fill under the pointer. */
.menu-item:is([data-focused], [data-hovered], :hover):not(:where([data-disabled], [aria-disabled=true]))::before {
  background: var(--surface-hover);
}

.menu-item[data-selected]::before {
  background: var(--surface-selected);
}

.menu-item[data-focus-visible] {
  outline: var(--focus-width) solid var(--focus-ink);
  outline-offset: calc(-1 * var(--focus-width));
}

.menu-item[data-selected]::after {
  content: "✓";
  margin-inline-start: auto;
}

.menu-item[data-disabled] {
  color: var(--disabled-text);
  cursor: default;
}

.menu-action {
  border-block-start: var(--border-hairline) solid var(--c-edge);
  margin-block-start: var(--space-1);
}

.app-switcher.button {
  display: flex;
  inline-size: 100%;
  justify-content: flex-start;
  gap: var(--space-3);
  min-block-size: var(--space-12);
  padding: var(--space-2);
  text-align: start;
  color: var(--c-mark);
  border-color: transparent;
  background: transparent;
  /* A transparent face inside the popover: the .button seat has nothing to seat. */
  box-shadow: none;
}

.app-switcher.button[data-hovered], .app-switcher.button[data-pressed] {
  background: var(--surface-sunken);
}

.app-switcher .app-brand-label {
  flex: 1;
  min-inline-size: 0;
}

.app-switcher .app-brand-label > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell[data-collapsed=true] .app-switcher {
  justify-content: center;
}

.app-avatar {
  flex: none;
  inline-size: var(--space-6);
  block-size: var(--space-6);
  object-fit: contain;
}

/* ==== src/components/layout.scss ==== */
/* Layout — the kit's structure layer. Four primitives a page composes with:
   Box (padding), Flex (one axis you tune), Stack (vertical rhythm) and Grid
   (the 12-column grid, or auto-fit). `Col` places a grid item on a track span.
   React Aria ships no layout components by design, so nothing here wraps or
   shadows the dependency: these classes are the API, and src/react/Layout.tsx
   is a thin wrapper over them.
   Sizes are attributes, not classes. The class list stays closed at four, every
   step reads a token, and a page never emits a size utility.
   Nothing here paints: layout is sheet-independent. It is loaded last in
   BUNDLE_ORDER, so an explicit layout step beats a component's own default. */
/* ---- The scales ---------------------------------------------------------- */
/* gap: six steps, read by `.flex`, `.stack` and `.grid`. */
[data-gap=none] {
  --layout-gap: var(--space-0);
}

[data-gap=xs] {
  --layout-gap: var(--space-1);
}

[data-gap=sm] {
  --layout-gap: var(--space-2);
}

[data-gap=md] {
  --layout-gap: var(--space-4);
}

[data-gap=lg] {
  --layout-gap: var(--space-6);
}

[data-gap=xl] {
  --layout-gap: var(--space-8);
}

/* pad: the Box scale. */
[data-pad=none] {
  --layout-pad: var(--space-0);
}

[data-pad=sm] {
  --layout-pad: var(--space-4);
}

[data-pad=md] {
  --layout-pad: var(--space-6);
}

[data-pad=lg] {
  --layout-pad: var(--space-8);
}

/* min: the auto-fit floor for a `columns="auto"` grid. */
[data-min=md] {
  --layout-min: var(--space-24);
}

[data-min=lg] {
  --layout-min: var(--space-32);
}

[data-min=xl] {
  --layout-min: var(--space-48);
}

[data-min="2xl"] {
  --layout-min: var(--space-64);
}

/* columns: one step per integer the 12-column grid allows. `repeat()` needs a
   literal count, so each step is its own rule; the count arrives as a number. */
[data-columns="1"] {
  --layout-columns: 1;
}

[data-columns="2"] {
  --layout-columns: 2;
}

[data-columns="3"] {
  --layout-columns: 3;
}

[data-columns="4"] {
  --layout-columns: 4;
}

[data-columns="5"] {
  --layout-columns: 5;
}

[data-columns="6"] {
  --layout-columns: 6;
}

[data-columns="7"] {
  --layout-columns: 7;
}

[data-columns="8"] {
  --layout-columns: 8;
}

[data-columns="9"] {
  --layout-columns: 9;
}

[data-columns="10"] {
  --layout-columns: 10;
}

[data-columns="11"] {
  --layout-columns: 11;
}

[data-columns="12"] {
  --layout-columns: 12;
}

/* ---- The primitives ------------------------------------------------------ */
/* A padded block. Paint is not this primitive's job: the recipes, `.card` and
   the `--surface-*` roles carry colour. */
.box {
  padding: var(--layout-pad, 0);
}

/* A layout container is a flex or grid item itself, so it has to be
   shrinkable — otherwise a nested layout overflows its parent. */
.flex,
.stack,
.grid {
  min-inline-size: 0;
}

/* One axis you tune. `row` and `start` are the CSS defaults, so they have no
   rule of their own. */
.flex {
  display: flex;
  gap: var(--layout-gap, var(--space-2));
}

.flex[data-direction=column] {
  flex-direction: column;
}

.flex[data-wrap] {
  flex-wrap: wrap;
}

.flex[data-justify=center] {
  justify-content: center;
}

.flex[data-justify=end] {
  justify-content: flex-end;
}

.flex[data-justify=between] {
  justify-content: space-between;
}

.flex[data-align=center] {
  align-items: center;
}

.flex[data-align=end] {
  align-items: flex-end;
}

.flex[data-align=stretch] {
  align-items: stretch;
}

.flex[data-align=baseline] {
  align-items: baseline;
}

/* A flex item that takes the row's free space, and can shrink below its
   content when the row is short: the column of lines beside a thumbnail, the
   label that truncates before its value does. A presence attribute on the item,
   as `data-span` is on a grid item. */
.flex > [data-grow] {
  flex: 1 1 auto;
  min-inline-size: 0;
}

/* Vertical rhythm. Grid rather than flex: nothing to collapse and the gap is
   uniform. `align-content: start` keeps auto rows at their content height
   instead of stretching them to fill a taller parent. The one column is the
   stack's own width, as in block flow: an item wider than the stack (a table,
   a line that does not wrap) overflows on its own instead of widening the
   column, and every sibling with it. */
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--layout-gap, var(--space-4));
}

/* A primitive that is really a list (`as="ul"`) drops the list chrome: the
   primitive owns the rhythm, the UA owns nothing. Margin and padding are
   already reset at the scope root. */
.flex:is(ul, ol),
.stack:is(ul, ol) {
  list-style: none;
}

/* The 12-column grid, or `auto` for a responsive card grid. A numeric grid does
   not collapse on its own — `auto` with `min` is the responsive mode, so the
   column count stays predictable. */
.grid {
  display: grid;
  align-content: start;
  gap: var(--layout-gap, var(--space-4));
  grid-template-columns: repeat(var(--layout-columns, 1), minmax(0, 1fr));
}

.grid[data-columns=auto] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--layout-min, var(--space-48))), 1fr));
}

/* Every row as tall as the grid's tallest item, so a grid of cards lines up
   across rows as it already does within one: an item stretches to its row. */
.grid[data-rows=equal] {
  grid-auto-rows: 1fr;
}

/* An item that cannot shrink is the classic grid overflow: long content pushes
   its track wider than the container. */
.grid > * {
  min-inline-size: 0;
}

/* A grid item: `data-span` places it on a 12-column grid, collapsing on its own
   so a numeric grid stacks without extra classes — full width at the base, half
   for a span of six or fewer at `md`, its declared span at `lg`. `data-start`
   sets the leading track at `lg`. Only meaningful inside `data-columns="12"`. */
.grid > [data-span] {
  grid-column-end: span 12;
}

@media (min-width: 40rem) {
  .grid > [data-span="1"],
  .grid > [data-span="2"],
  .grid > [data-span="3"],
  .grid > [data-span="4"],
  .grid > [data-span="5"],
  .grid > [data-span="6"] {
    grid-column-end: span 6;
  }
}
@media (min-width: 64rem) {
  .grid > [data-span="1"] {
    grid-column-end: span 1;
  }
  .grid > [data-span="2"] {
    grid-column-end: span 2;
  }
  .grid > [data-span="3"] {
    grid-column-end: span 3;
  }
  .grid > [data-span="4"] {
    grid-column-end: span 4;
  }
  .grid > [data-span="5"] {
    grid-column-end: span 5;
  }
  .grid > [data-span="6"] {
    grid-column-end: span 6;
  }
  .grid > [data-span="7"] {
    grid-column-end: span 7;
  }
  .grid > [data-span="8"] {
    grid-column-end: span 8;
  }
  .grid > [data-span="9"] {
    grid-column-end: span 9;
  }
  .grid > [data-span="10"] {
    grid-column-end: span 10;
  }
  .grid > [data-span="11"] {
    grid-column-end: span 11;
  }
  .grid > [data-span="12"] {
    grid-column-end: span 12;
  }
  .grid > [data-start="1"] {
    grid-column-start: 1;
  }
  .grid > [data-start="2"] {
    grid-column-start: 2;
  }
  .grid > [data-start="3"] {
    grid-column-start: 3;
  }
  .grid > [data-start="4"] {
    grid-column-start: 4;
  }
  .grid > [data-start="5"] {
    grid-column-start: 5;
  }
  .grid > [data-start="6"] {
    grid-column-start: 6;
  }
  .grid > [data-start="7"] {
    grid-column-start: 7;
  }
  .grid > [data-start="8"] {
    grid-column-start: 8;
  }
  .grid > [data-start="9"] {
    grid-column-start: 9;
  }
  .grid > [data-start="10"] {
    grid-column-start: 10;
  }
  .grid > [data-start="11"] {
    grid-column-start: 11;
  }
  .grid > [data-start="12"] {
    grid-column-start: 12;
  }
}
}
