/* Slant 0.19.1: the whole stylesheet, hosted. MIT. https://github.com/nirtuttnauer/tuttn-portfolio
   Wrap your markup in <div class="slant" data-theme="sage|moon|ember|paper">,
   then use the sl-* classes, or install the package: npm i @tuttn/slant. */

/* Theme tokens. A theme is a token set on a .slant root; components read
   only --sl-* variables, so switching data-theme restyles everything at once
   (colour, radius, shadow, color-scheme). Sage is the base; a nested root with
   a data-theme re-themes its subtree, and one without keeps its parent's.
   The scales (space, control heights per density, type, motion, layers, the
   focus ring) are the same in every theme. Everything between the markers is
   generated from shared/kit-tokens.json by scripts/build_kit_tokens.mjs
   (npm run build:tokens): edit the JSON, not it. The whole file sits in
   @layer slant, so a host's unlayered --sl-* overrides always win. */

@layer slant {
/* @tokens:start */
:where(.slant:not(.slant .slant)), .slant[data-theme="sage"] {
  color-scheme: dark;
  --sl-bg: #11151b;
  --sl-surface: #171c23;
  --sl-surface-2: #1f252e;
  --sl-line: #2a313b;
  --sl-line-strong: #3a424e;
  --sl-text: #f1f3f5;
  --sl-muted: #99a3b1;
  --sl-accent: #abbba1;
  --sl-accent-text: #11151b;
  --sl-success: #8fd3a8;
  --sl-warning: #f1c27d;
  --sl-danger: #f0957a;
  --sl-radius: 10px;
  --sl-radius-small: 6px;
  --sl-radius-large: 14px;
  --sl-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --sl-shadow-md: 0 16px 32px -16px rgb(0 0 0 / 0.5);
  --sl-shadow-lg: 0 24px 48px -20px rgb(0 0 0 / 0.6);
  --sl-chart-1: #3987e5;
  --sl-chart-2: #d95926;
  --sl-chart-3: #199e70;
  --sl-chart-4: #c98500;
  --sl-chart-5: #d55181;
}
.slant[data-theme="moon"] {
  color-scheme: dark;
  --sl-bg: #0e1220;
  --sl-surface: #151a2b;
  --sl-surface-2: #1d2338;
  --sl-line: #283049;
  --sl-line-strong: #39425f;
  --sl-text: #eef1ff;
  --sl-muted: #9aa3c4;
  --sl-accent: #9db4ff;
  --sl-accent-text: #0e1220;
  --sl-success: #8fd3a8;
  --sl-warning: #f1c27d;
  --sl-danger: #f0957a;
  --sl-radius: 14px;
  --sl-radius-small: 8px;
  --sl-radius-large: 20px;
  --sl-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --sl-shadow-md: 0 16px 32px -16px rgb(0 0 0 / 0.5);
  --sl-shadow-lg: 0 24px 48px -20px rgb(0 0 0 / 0.6);
  --sl-chart-1: #3987e5;
  --sl-chart-2: #d95926;
  --sl-chart-3: #199e70;
  --sl-chart-4: #c98500;
  --sl-chart-5: #d55181;
}
.slant[data-theme="ember"] {
  color-scheme: dark;
  --sl-bg: #1a1310;
  --sl-surface: #221915;
  --sl-surface-2: #2c211b;
  --sl-line: #3a2c24;
  --sl-line-strong: #4d3a2f;
  --sl-text: #f7ede6;
  --sl-muted: #bba596;
  --sl-accent: #f1b38a;
  --sl-accent-text: #1a1310;
  --sl-success: #8fd3a8;
  --sl-warning: #f1c27d;
  --sl-danger: #f0957a;
  --sl-radius: 4px;
  --sl-radius-small: 2px;
  --sl-radius-large: 6px;
  --sl-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --sl-shadow-md: 0 16px 32px -16px rgb(0 0 0 / 0.5);
  --sl-shadow-lg: 0 24px 48px -20px rgb(0 0 0 / 0.6);
  --sl-chart-1: #3987e5;
  --sl-chart-2: #d95926;
  --sl-chart-3: #199e70;
  --sl-chart-4: #c98500;
  --sl-chart-5: #d55181;
}
.slant[data-theme="paper"] {
  color-scheme: light;
  --sl-bg: #f4f4ef;
  --sl-surface: #fcfcf9;
  --sl-surface-2: #eeeee8;
  --sl-line: #e2e2da;
  --sl-line-strong: #cfd0c6;
  --sl-text: #1b1f19;
  --sl-muted: #5f645b;
  --sl-accent: #4f6443;
  --sl-accent-text: #fcfcf9;
  --sl-success: #287a4c;
  --sl-warning: #9c6210;
  --sl-danger: #b5482c;
  --sl-radius: 12px;
  --sl-radius-small: 7px;
  --sl-radius-large: 16px;
  --sl-shadow-sm: 0 1px 2px rgb(27 31 25 / 0.08);
  --sl-shadow-md: 0 16px 32px -16px rgb(27 31 25 / 0.2);
  --sl-shadow-lg: 0 24px 48px -20px rgb(27 31 25 / 0.26);
  --sl-chart-1: #2a78d6;
  --sl-chart-2: #eb6834;
  --sl-chart-3: #1baf7a;
  --sl-chart-4: #eda100;
  --sl-chart-5: #e87ba4;
}
.slant {
  --sl-accent-soft: color-mix(in srgb, var(--sl-accent) 16%, var(--sl-surface));
  --sl-success-soft: color-mix(in srgb, var(--sl-success) 16%, var(--sl-surface));
  --sl-warning-soft: color-mix(in srgb, var(--sl-warning) 16%, var(--sl-surface));
  --sl-danger-soft: color-mix(in srgb, var(--sl-danger) 16%, var(--sl-surface));
  --sl-line-field: color-mix(in srgb, var(--sl-muted) 65%, var(--sl-line-strong));
  --sl-space-3xs: 2px;
  --sl-space-2xs: 4px;
  --sl-space-xs: 6px;
  --sl-space-sm: 8px;
  --sl-space-md: 12px;
  --sl-space-lg: 16px;
  --sl-space-xl: 24px;
  --sl-space-2xl: 32px;
  --sl-font-size-xs: 11px;
  --sl-font-size-sm: 12px;
  --sl-font-size-md: 13px;
  --sl-font-size-lg: 14px;
  --sl-font-size-xl: 18px;
  --sl-font-size-2xl: 22px;
  --sl-duration-fast: 150ms;
  --sl-duration-base: 200ms;
  --sl-duration-slow: 300ms;
  --sl-duration-slower: 600ms;
  --sl-ease-out: cubic-bezier(.2, .7, .2, 1);
  --sl-ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --sl-z-dropdown: 1000;
  --sl-z-sticky: 1100;
  --sl-z-overlay: 1200;
  --sl-z-modal: 1300;
  --sl-z-toast: 1400;
  --sl-z-tooltip: 1500;
  --sl-focus-ring-width: 2px;
  --sl-focus-ring-offset: 2px;
  --sl-focus-ring: var(--sl-focus-ring-width) solid var(--sl-accent);
  --sl-disabled-opacity: 0.55;
  --sl-radius-full: 999px;
}
:where(.slant:not(.slant .slant)), .slant[data-density="regular"], .slant [data-density="regular"] {
  --sl-control-sm: 28px;
  --sl-control-md: 34px;
  --sl-control-lg: 40px;
}
.slant[data-density="compact"], .slant [data-density="compact"] {
  --sl-control-sm: 26px;
  --sl-control-md: 32px;
  --sl-control-lg: 38px;
}
.slant[data-density="comfortable"], .slant [data-density="comfortable"] {
  --sl-control-sm: 32px;
  --sl-control-md: 40px;
  --sl-control-lg: 46px;
}
/* @tokens:end */

/* Typography and the signature shape, the same in every theme. */
.slant {
  --sl-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sl-font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  /* The slanted pixel: a 9° backslant, matching the TUTTN logo. */
  --sl-slant: skewX(9deg);
}
}
/* The root, the tone variables and the resets Slant's own elements rely on,
   so the kit looks the same with or without a host stylesheet. Everything is
   in @layer slant: any unlayered host rule wins, so a host keeps its element
   resets in a layer declared before slant (`@layer base, slant;`). Rules reach
   only Slant's root and elements with an sl-* class, never bare elements or
   content passed in. */

@layer slant {
  .slant {
    color: var(--sl-text);
    font-family: var(--sl-font-sans);
    transition: color var(--sl-duration-slow);
  }

  /* Slant's own elements: border-box sizing, and form controls that start
     from the root's font and colour. */
  :where(.slant) :where([class^="sl-"], [class*=" sl-"]),
  :where(.slant) :where([class^="sl-"], [class*=" sl-"])::before,
  :where(.slant) :where([class^="sl-"], [class*=" sl-"])::after { box-sizing: border-box; }
  :where(.slant) :where(button, input, select, textarea):where([class^="sl-"], [class*=" sl-"]) { margin: 0; font: inherit; color: inherit; }
  :where(.slant) :where(button):where([class^="sl-"], [class*=" sl-"]) { cursor: pointer; }
  :where(.slant) :where(button):where([class^="sl-"], [class*=" sl-"]):disabled { cursor: default; }
  :where(.slant) :where([class^="sl-"], [class*=" sl-"]):focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }

  /* One tone, three variables: --sl-tone colours text, marks and fills,
     --sl-tone-soft tints a background, --sl-tone-text is text on a solid fill.
     Components read these instead of a rule per tone. */
  .slant [data-tone="neutral"], .slant[data-tone="neutral"] { --sl-tone: var(--sl-muted); --sl-tone-soft: var(--sl-surface-2); --sl-tone-text: var(--sl-bg); }
  .slant [data-tone="accent"], .slant[data-tone="accent"] { --sl-tone: var(--sl-accent); --sl-tone-soft: var(--sl-accent-soft); --sl-tone-text: var(--sl-accent-text); }
  .slant [data-tone="success"], .slant[data-tone="success"] { --sl-tone: var(--sl-success); --sl-tone-soft: var(--sl-success-soft); --sl-tone-text: var(--sl-accent-text); }
  .slant [data-tone="warning"], .slant[data-tone="warning"] { --sl-tone: var(--sl-warning); --sl-tone-soft: var(--sl-warning-soft); --sl-tone-text: var(--sl-accent-text); }
  .slant [data-tone="danger"], .slant[data-tone="danger"] { --sl-tone: var(--sl-danger); --sl-tone-soft: var(--sl-danger-soft); --sl-tone-text: var(--sl-accent-text); }

  /* Screen-reader-only text. */
  .sl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* A portal's host: a Slant root at the end of the body that lays nothing out itself. */
  .sl-portal { position: relative; z-index: var(--sl-z-dropdown); }

  /* Shared entrances. The tab panel, the menu list and chat messages rise in;
     avatars and timeline nodes pop, from their resting transform
     (--sl-pop-transform, e.g. the slant) scaled down. */
  @keyframes sl-in { from { opacity: 0; transform: translateY(3px); } }
  @keyframes sl-pop { from { opacity: 0; transform: var(--sl-pop-transform, none) scale(.6); } }

  /* Loaders and transitions rest at their designed frame when motion is reduced. */
  @media (prefers-reduced-motion: reduce) {
    :where(.slant) :where([class^="sl-"], [class*=" sl-"]),
    :where(.slant) :where([class^="sl-"], [class*=" sl-"])::before,
    :where(.slant) :where([class^="sl-"], [class*=" sl-"])::after { animation: none !important; transition: none !important; }
  }
}
/* Primitives: the pieces everything else is built from. Modifiers are data
   attributes so nothing generic leaks into a host page. */

@layer slant {
  /* Button */
  .sl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--sl-control-md);
    padding: 0 14px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    /* A Button rendered as a link (asChild) keeps the button look, without the underline. */
    text-decoration: none;
    background: var(--sl-surface-2);
    color: var(--sl-text);
    font: 500 var(--sl-font-size-md)/1 var(--sl-font-sans);
    white-space: nowrap;
    transition: transform var(--sl-duration-fast), background var(--sl-duration-base), border-color var(--sl-duration-base), border-radius var(--sl-duration-slow), opacity var(--sl-duration-base);
  }
  .sl-btn:hover { border-color: var(--sl-muted); }
  .sl-btn:active { transform: scale(.97); }
  /* Disabled, or loading: aria-disabled keeps the button focusable. */
  .sl-btn:disabled, .sl-btn[aria-disabled="true"] { opacity: var(--sl-disabled-opacity); transform: none; }
  .sl-btn[aria-disabled="true"] { cursor: default; }
  /* Primary fills with the tone (accent unless told otherwise; the fallbacks
     cover markup that borrows the class without a data-tone). */
  .sl-btn[data-variant="primary"] {
    border-color: var(--sl-tone, var(--sl-accent));
    background: var(--sl-tone, var(--sl-accent));
    color: var(--sl-tone-text, var(--sl-accent-text));
  }
  .sl-btn[data-variant="ghost"] { border-color: transparent; background: transparent; }
  .sl-btn[data-variant="ghost"]:hover { background: var(--sl-surface-2); }
  /* Secondary and ghost in a status tone: the tone's colour as text, mixed a
     fifth of the way to the text colour so it holds 4.5:1 on Paper's surfaces
     as well as the dark themes'; secondary gets a tinted border, ghost a
     tinted hover. Accent and neutral keep the plain look above. */
  .sl-btn:is([data-tone="success"], [data-tone="warning"], [data-tone="danger"]):not([data-variant="primary"]) {
    color: color-mix(in srgb, var(--sl-tone) 80%, var(--sl-text));
  }
  .sl-btn:is([data-tone="success"], [data-tone="warning"], [data-tone="danger"])[data-variant="secondary"] {
    border-color: color-mix(in srgb, var(--sl-tone) 45%, var(--sl-line-strong));
  }
  .sl-btn:is([data-tone="success"], [data-tone="warning"], [data-tone="danger"])[data-variant="secondary"]:hover { border-color: var(--sl-tone); }
  .sl-btn:is([data-tone="success"], [data-tone="warning"], [data-tone="danger"])[data-variant="ghost"]:hover { background: var(--sl-tone-soft); }
  .sl-btn[data-size="sm"] { min-height: var(--sl-control-sm); padding: 0 10px; font-size: var(--sl-font-size-sm); }
  .sl-btn[data-size="lg"] { min-height: var(--sl-control-lg); padding: 0 var(--sl-space-lg); font-size: var(--sl-font-size-lg); }
  .sl-btn[data-icon] { width: var(--sl-control-md); padding: 0; }
  .sl-btn[data-size="sm"][data-icon] { width: var(--sl-control-sm); }
  .sl-btn[data-size="lg"][data-icon] { width: var(--sl-control-lg); }
  .sl-btn[data-full] { width: 100%; }
  .sl-btn svg { flex-shrink: 0; }
  /* In an attached ButtonGroup (data-attached holds its orientation): the
     buttons share their borders, and only the bar's outer corners are round.
     The hovered or focused button rises so its whole border shows. */
  .sl-btn[data-attached] { position: relative; }
  .sl-btn[data-attached]:is(:hover, :focus-visible) { z-index: 1; }
  .sl-btn[data-attached="horizontal"]:not(:first-child) { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }
  .sl-btn[data-attached="horizontal"]:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
  .sl-btn[data-attached="vertical"]:not(:first-child) { margin-block-start: -1px; border-start-start-radius: 0; border-start-end-radius: 0; }
  .sl-btn[data-attached="vertical"]:not(:last-child) { border-end-start-radius: 0; border-end-end-radius: 0; }

  /* Badge */
  .sl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    font: 500 var(--sl-font-size-sm)/1.5 var(--sl-font-sans);
    color: var(--sl-muted);
    white-space: nowrap;
  }
  .sl-badge:not([data-tone="neutral"]) { color: var(--sl-tone); }
  .sl-badge[data-tone="accent"] { border-color: transparent; background: var(--sl-tone-soft); }
  .sl-badge[data-mono] { font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); }

  /* Pixel */
  .sl-pixel {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--sl-tone, var(--sl-accent));
    transform: var(--sl-slant);
  }
  .sl-pixel[data-tone="current"] { background: currentColor; }

  /* Card */
  .sl-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    background: var(--sl-surface);
    transition: background var(--sl-duration-slow), border-color var(--sl-duration-slow), border-radius var(--sl-duration-slow), box-shadow var(--sl-duration-slow);
  }
  .sl-card[data-elevation="1"] { box-shadow: var(--sl-shadow-sm); }
  .sl-card[data-elevation="2"] { box-shadow: var(--sl-shadow-md); }
  .sl-card[data-elevation="3"] { box-shadow: var(--sl-shadow-lg); }
  /* Regions: header row, body, footer, each after the first under a hairline. */
  .sl-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-sm) var(--sl-space-md); padding: 14px 18px; }
  .sl-card-title { flex: 1 1 auto; min-inline-size: 0; font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sl-muted); }
  .sl-card-body { flex: 1 1 auto; padding: 18px; }
  .sl-card[data-padding="none"] > .sl-card-body { padding: 0; }
  .sl-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sl-space-sm); padding: 12px 18px; }
  .sl-card-body:not(:first-child), .sl-card-footer:not(:first-child) { border-block-start: 1px solid var(--sl-line); }
  /* A plain card, a title at most with no header or footer slot, keeps one padded
     box with the title over the content and no hairline, as before 0.4. */
  .sl-card:not([data-regions]) > .sl-card-header { padding: 18px 18px 0; }
  .sl-card:not([data-regions]) > .sl-card-header + .sl-card-body { padding-block-start: 14px; border-block-start: 0; }

  /* Input. Its edge, like every text field's, is --sl-line-field: a hairline
     that holds 3:1 on bg, surface and surface-2 (WCAG 1.4.11). */
  .sl-input {
    width: 100%;
    min-height: var(--sl-control-md);
    padding: 0 12px;
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    font: var(--sl-font-size-lg)/1 var(--sl-font-sans);
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-input::placeholder { color: var(--sl-muted); }
  .sl-input:focus { border-color: var(--sl-accent); }
  .sl-input[aria-invalid="true"] { border-color: var(--sl-danger); }
  .sl-input[data-mono] { font-family: var(--sl-font-mono); }
  .sl-input[data-size="sm"] { min-height: var(--sl-control-sm); padding: 0 10px; font-size: var(--sl-font-size-md); }
  .sl-input[data-size="lg"] { min-height: var(--sl-control-lg); padding: 0 14px; font-size: var(--sl-font-size-lg); }
  .sl-input:disabled { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-input:read-only:not(:disabled) { background: var(--sl-surface-2); }
  /* Inside an InputGroup the group draws the border, the focus and the invalid
     state, so the input is a bare field filling the space between the addons. */
  .sl-input[data-grouped] { flex: 1 1 auto; min-width: 0; min-height: 0; height: 100%; padding-inline: var(--sl-space-xs); border: 0; border-radius: 0; background: transparent; }
  .sl-input[data-grouped]:focus-visible { outline: 0; }
  .sl-input[data-grouped]:disabled { opacity: 1; }
  /* In an attached ButtonGroup (data-attached holds its orientation), as
     Button's: shared borders, only the bar's outer corners round, and the
     focused or invalid input rises so its whole border shows. In a row it
     takes the room the buttons leave. */
  .sl-input[data-attached] { position: relative; }
  .sl-input[data-attached]:is(:focus, [aria-invalid="true"]) { z-index: 1; }
  .sl-input[data-attached="horizontal"] { flex: 1 1 auto; width: auto; min-width: 0; }
  .sl-input[data-attached="horizontal"]:not(:first-child) { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }
  .sl-input[data-attached="horizontal"]:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
  .sl-input[data-attached="vertical"]:not(:first-child) { margin-block-start: -1px; border-start-start-radius: 0; border-start-end-radius: 0; }
  .sl-input[data-attached="vertical"]:not(:last-child) { border-end-start-radius: 0; border-end-end-radius: 0; }

  /* Stack and Row */
  .sl-stack { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
  .sl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .sl-row[data-wrap="nowrap"] { flex-wrap: nowrap; }
  .sl-row[data-align="start"] { align-items: flex-start; }
  .sl-row[data-align="end"] { align-items: flex-end; }
  .sl-row[data-align="stretch"] { align-items: stretch; }
  .sl-row[data-justify="center"] { justify-content: center; }
  .sl-row[data-justify="between"] { justify-content: space-between; }
  .sl-row[data-justify="end"] { justify-content: flex-end; }

  /* Text */
  .sl-text { margin: 0; }
  .sl-text[data-variant="body"] { font-size: var(--sl-font-size-md); line-height: 1.5; }
  .sl-text[data-variant="title"] { font-size: var(--sl-font-size-lg); font-weight: 600; line-height: 1.4; color: var(--sl-text); }
  .sl-text[data-variant="hint"] { font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }
  .sl-text[data-variant="label"] { font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sl-muted); }
  .sl-text[data-variant="mono"] { font-family: var(--sl-font-mono); font-size: var(--sl-font-size-sm); }
  .sl-text[data-muted] { color: var(--sl-muted); }
  .sl-text[data-variant="title"] + .sl-text { margin-block-start: 2px; }

  /* List */
  .sl-list { display: grid; margin: 0; padding: 0; list-style: none; }
  .sl-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-block-start: 1px solid var(--sl-line); }
  .sl-list-item:first-child { padding-block-start: 0; border-block-start: 0; }
  .sl-list-item[data-align="start"] { align-items: flex-start; }
  .sl-list-item[data-size="sm"] { min-height: var(--sl-control-md); padding: 0; font-size: var(--sl-font-size-md); }
  .sl-list[data-divided="none"] .sl-list-item { padding: 4px 0; border-block-start: 0; }
  /* Slots: media and actions keep their size; the content between them takes
     the rest and truncates. A slotted item may shrink below its text, or the
     list's grid track would grow to fit it. The content's padding, taken back
     by the margin, leaves room for a focus ring that the overflow would clip. */
  .sl-list-item[data-slotted] { min-inline-size: 0; }
  .sl-list-item-media, .sl-list-item-actions { display: flex; flex: none; align-items: center; gap: var(--sl-space-xs); }
  .sl-list-item-content {
    flex: 1 1 0%;
    min-inline-size: 0;
    margin: calc(-1 * var(--sl-space-2xs));
    padding: var(--sl-space-2xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sl-list-item[data-align="start"] .sl-list-item-content { white-space: normal; overflow-wrap: anywhere; }
  /* stack: the item is the query container, and its two ends (the body's
     children, or the content column's with slots) sit apart like a plain
     row's until the row is narrower than 20rem, then one under the other. */
  .sl-list-item[data-stack] { container-type: inline-size; }
  .sl-list-item-body, .sl-list-item[data-stack] > .sl-list-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-inline-size: 0;
  }
  .sl-list-item-body { flex: 1 1 auto; }
  .sl-list-item[data-stack] > .sl-list-item-content { white-space: normal; overflow-wrap: anywhere; }
  .sl-list-item[data-align="start"] > :is(.sl-list-item-body, .sl-list-item-content) { align-items: flex-start; }
  @container (max-width: 20rem) {
    .sl-list-item-body, .sl-list-item[data-stack] > .sl-list-item-content {
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-start;
      gap: var(--sl-space-2xs);
    }
  }

  /* Kbd */
  .sl-kbd {
    flex-shrink: 0;
    padding: 1px 6px;
    border: 1px solid var(--sl-line-strong);
    border-radius: 4px;
    font: var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    color: var(--sl-muted);
  }

  /* Typing dots */
  .sl-dots { display: inline-flex; gap: 3px; }
  .sl-dot { width: 5px; height: 5px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant); animation: sl-dot 1s ease-in-out infinite; }
  .sl-dot:nth-child(2) { animation-delay: .15s; }
  .sl-dot:nth-child(3) { animation-delay: .3s; }
  @keyframes sl-dot { 0%, 100% { opacity: .3; transform: var(--sl-slant) translateY(0); } 50% { opacity: 1; transform: var(--sl-slant) translateY(-2px); } }
}
/* Controls: Switch, Segmented, Slider, CodeInput, Chip, Alert, Progress, Disclosure, CommandBar,
   ButtonGroup, ToggleButton, ToggleGroup, BarPicker. */

@layer slant {
  /* ButtonGroup (the attached buttons' corners are Button's, in primitives.css) */
  .sl-btn-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs); }
  .sl-btn-group[data-orientation="vertical"] { flex-direction: column; align-items: stretch; }
  .sl-btn-group[data-attached] { flex-wrap: nowrap; gap: 0; }
  /* ButtonGroup.Separator: a hairline across the group. In an attached bar it
     sits on the border its neighbours share (they overlap it), raised so it
     shows, and inside the bar's outer borders. */
  .sl-btn-group-separator { flex: none; align-self: stretch; background: var(--sl-line-strong); }
  .sl-btn-group-separator[aria-orientation="vertical"] { inline-size: 1px; margin-block: var(--sl-space-2xs); }
  .sl-btn-group-separator[aria-orientation="horizontal"] { block-size: 1px; margin-inline: var(--sl-space-2xs); }
  .sl-btn-group-separator[data-attached] { position: relative; z-index: 1; }
  .sl-btn-group-separator[data-attached][aria-orientation="vertical"] { margin-block: 1px; margin-inline-start: -1px; }
  .sl-btn-group-separator[data-attached][aria-orientation="horizontal"] { margin-inline: 1px; margin-block-start: -1px; }
  /* Between solid buttons, a line of the fill's own text colour. */
  .sl-btn-group-separator[data-variant="primary"] { background: color-mix(in srgb, var(--sl-accent-text) 45%, var(--sl-accent)); }
  /* ButtonGroup.Text: a static cell in a button's box, for a count or a unit. */
  .sl-btn-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--sl-control-md);
    padding: 0 12px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
  }
  .sl-btn-group-text[data-size="sm"] { min-height: var(--sl-control-sm); padding: 0 10px; font-size: var(--sl-font-size-sm); }
  .sl-btn-group-text[data-size="lg"] { min-height: var(--sl-control-lg); padding: 0 var(--sl-space-lg); font-size: var(--sl-font-size-lg); }
  /* In an attached bar, the same shared borders and outer corners as Button's. */
  .sl-btn-group-text[data-attached="horizontal"]:not(:first-child) { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }
  .sl-btn-group-text[data-attached="horizontal"]:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
  .sl-btn-group-text[data-attached="vertical"]:not(:first-child) { margin-block-start: -1px; border-start-start-radius: 0; border-start-end-radius: 0; }
  .sl-btn-group-text[data-attached="vertical"]:not(:last-child) { border-end-start-radius: 0; border-end-end-radius: 0; }

  /* ToggleButton: Button with a pressed state. Off reads quieter: muted text
     (in the accent and neutral tones), and a secondary toggle sits on the
     field background. On is Segmented's chosen look: the raised surface, an
     inset hairline and full-strength text. A primary toggle fills with its
     tone only while pressed. */
  .sl-toggle:is([data-tone="accent"], [data-tone="neutral"]):not([data-pressed], [data-variant="primary"]) { color: var(--sl-muted); }
  .sl-toggle:is([data-tone="accent"], [data-tone="neutral"]):not([data-pressed], [data-variant="primary"]):hover { color: var(--sl-text); }
  .sl-toggle[data-variant="secondary"]:not([data-pressed]) { background: var(--sl-bg); }
  .sl-toggle[data-pressed]:not([data-variant="primary"]) { background: var(--sl-surface-2); box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  .sl-toggle[data-variant="primary"]:not([data-pressed]) { border-color: var(--sl-line-strong); background: var(--sl-bg); color: var(--sl-muted); }
  .sl-toggle[data-variant="primary"]:not([data-pressed]):hover { border-color: var(--sl-muted); color: var(--sl-text); }
  .sl-toggle {
    transition: transform var(--sl-duration-fast), background var(--sl-duration-base), border-color var(--sl-duration-base), color var(--sl-duration-base),
      box-shadow var(--sl-duration-base), border-radius var(--sl-duration-slow), opacity var(--sl-duration-base);
  }

  /* ToggleGroup: spaced like a ButtonGroup, or attached into one bar (the
     items' shared corners are Button's, in primitives.css). */
  .sl-toggle-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2xs); }
  .sl-toggle-group[data-orientation="vertical"] { flex-direction: column; align-items: stretch; }
  .sl-toggle-group[data-attached] { flex-wrap: nowrap; gap: 0; }

  /* Segmented */
  .sl-segmented { display: flex; padding: 3px; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); background: var(--sl-bg); }
  .sl-segmented-option {
    flex: 1;
    min-height: calc(var(--sl-control-md) - 8px);
    border: 0;
    border-radius: calc(var(--sl-radius-small) - 2px);
    background: transparent;
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    font-weight: 500;
    transition: background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-segmented-option[aria-checked="true"] { background: var(--sl-surface-2); color: var(--sl-text); box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  .sl-segmented[data-size="sm"] { display: inline-flex; gap: 2px; }
  .sl-segmented[data-size="sm"] .sl-segmented-option { flex: none; min-height: calc(var(--sl-control-sm) - 8px); padding: 0 10px; font: 500 var(--sl-font-size-sm)/1 var(--sl-font-mono); }
  .sl-segmented[data-size="sm"] .sl-segmented-option[aria-checked="true"] { box-shadow: none; }
  .sl-segmented-option:disabled { opacity: var(--sl-disabled-opacity); }

  /* Progress */
  .sl-progress { height: 4px; overflow: hidden; border-radius: 99px; background: var(--sl-surface-2); }
  .sl-progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--sl-tone, var(--sl-accent)); transition: width var(--sl-duration-base) linear; }
  /* Indeterminate: a block of four slanted pixels sweeps from the inline start to
     the end, faint at the tail and solid at the head. The block's own transform is
     the rest frame that reduced motion keeps: a static partial fill, cut into
     fading pixels, so it reads as working rather than as 30% done. */
  .sl-progress[data-indeterminate] .sl-progress-fill {
    display: flex;
    gap: 2px;
    width: 30%;
    background: none;
    animation: sl-progress-sweep calc(var(--sl-duration-slower) * 2) var(--sl-ease-in-out) infinite;
  }
  .sl-progress-cell { flex: 1; border-radius: 1px; background: var(--sl-tone, var(--sl-accent)); transform: var(--sl-slant); }
  .sl-progress-cell:nth-child(1) { opacity: .3; }
  .sl-progress-cell:nth-child(2) { opacity: .55; }
  .sl-progress-cell:nth-child(3) { opacity: .8; }
  /* The block starts at the inline start either way (it is in flow); the sweep
     runs along the inline axis, so under RTL it travels right to left. */
  [dir="rtl"] .sl-progress[data-indeterminate] .sl-progress-fill { --sl-progress-sweep: -1; }
  /* From just past the start to just past the end: the block is 30% of the track. */
  @keyframes sl-progress-sweep {
    from { transform: translateX(calc(-100% * var(--sl-progress-sweep, 1))); }
    to { transform: translateX(calc(340% * var(--sl-progress-sweep, 1))); }
  }

  /* Switch */
  .sl-switch {
    --sl-switch-width: 40px;
    --sl-switch-height: 22px;
    --sl-switch-knob: 14px;
    position: relative;
    flex-shrink: 0;
    width: var(--sl-switch-width);
    height: var(--sl-switch-height);
    padding: 0;
    border: 1px solid var(--sl-line-strong);
    border-radius: calc(var(--sl-radius-small) + 2px);
    background: var(--sl-surface-2);
    transition: background var(--sl-duration-base), border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-switch[data-size="sm"] { --sl-switch-width: 32px; --sl-switch-height: 18px; --sl-switch-knob: 10px; border-radius: var(--sl-radius-small); }
  .sl-switch:disabled { opacity: var(--sl-disabled-opacity); }
  /* The knob sits 3px in from the inside of the 1px border, at either end. */
  .sl-switch-knob {
    position: absolute;
    inset-block-start: calc((var(--sl-switch-height) - 2px - var(--sl-switch-knob)) / 2);
    inset-inline-start: 3px;
    width: var(--sl-switch-knob);
    height: var(--sl-switch-knob);
    border-radius: 4px;
    background: var(--sl-muted);
    transform: var(--sl-slant);
    transition: inset-inline-start var(--sl-duration-slow) var(--sl-ease-out), background var(--sl-duration-base);
  }
  .sl-switch[aria-checked="true"] { border-color: var(--sl-accent); background: var(--sl-accent); }
  .sl-switch[aria-checked="true"] .sl-switch-knob { inset-inline-start: calc(var(--sl-switch-width) - 5px - var(--sl-switch-knob)); background: var(--sl-accent-text); }
  .sl-switch[data-size="sm"] .sl-switch-knob { border-radius: 3px; }

  /* Slider */
  .sl-slider-head { display: flex; justify-content: space-between; gap: 12px; margin-block-end: 8px; font-size: var(--sl-font-size-md); color: var(--sl-muted); }
  .sl-slider-value { font-family: var(--sl-font-mono); color: var(--sl-text); }
  .sl-slider-input { --sl-slider-to: 90deg; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
  .sl-slider-input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--sl-slider-to), var(--sl-accent) var(--fill), var(--sl-line-strong) var(--fill)); }
  .sl-slider-input::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--sl-slider-to), var(--sl-accent) var(--fill), var(--sl-line-strong) var(--fill)); }
  .sl-slider-input::-webkit-slider-thumb { width: 16px; height: 16px; margin-block-start: -6px; border: 0; border-radius: 4px; background: var(--sl-text); transform: var(--sl-slant); -webkit-appearance: none; appearance: none; }
  .sl-slider-input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 4px; background: var(--sl-text); transform: var(--sl-slant); }

  /* The fill runs from the inline start. :dir() would also catch an ltr subtree in an rtl page, but it needs Chrome 120 and Safari 16.4, past the baseline. */
  [dir="rtl"] .sl-slider-input { --sl-slider-to: 270deg; }
  /* Disabled dims the track and thumb; the label and readout keep their contrast. */
  .sl-slider-input:disabled { opacity: var(--sl-disabled-opacity); cursor: default; }

  /* Range: two range inputs stacked on one track. Only their thumbs take the
     pointer. Behind them, ::before is the empty track, full width as a single
     slider's, and ::after the fill between the thumbs, inset by half a thumb
     at each end so its edges sit under the thumbs' centres. */
  .sl-slider-range { --sl-slider-to: 90deg; position: relative; height: 22px; }
  .sl-slider-range::before,
  .sl-slider-range::after { content: ""; position: absolute; inset-block-start: 9px; height: 4px; border-radius: 2px; }
  .sl-slider-range::before { inset-inline: 0; background: var(--sl-line-strong); }
  .sl-slider-range::after {
    inset-inline: 8px;
    background: linear-gradient(var(--sl-slider-to), transparent var(--from), var(--sl-accent) var(--from), var(--sl-accent) var(--to), transparent var(--to));
  }
  [dir="rtl"] .sl-slider-range { --sl-slider-to: 270deg; }
  .sl-slider-range .sl-slider-input { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
  .sl-slider-range .sl-slider-input[data-raised] { z-index: 2; }
  .sl-slider-range .sl-slider-input::-webkit-slider-runnable-track { background: transparent; }
  .sl-slider-range .sl-slider-input::-moz-range-track { background: transparent; }
  .sl-slider-range .sl-slider-input::-webkit-slider-thumb { pointer-events: auto; }
  .sl-slider-range .sl-slider-input::-moz-range-thumb { pointer-events: auto; }
  /* Both inputs span the whole track, so the focus ring goes on the thumb that has focus. */
  .sl-slider-range .sl-slider-input:focus-visible { outline: none; }
  .sl-slider-range .sl-slider-input:focus-visible::-webkit-slider-thumb { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-slider-range .sl-slider-input:focus-visible::-moz-range-thumb { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }

  /* Inset: a tall track with the name and value inside it. The fill holds a
     second copy of the text in --sl-accent-text, as wide as the track, and
     clips it to itself; the range input lies on top, see-through. */
  .sl-slider-inset {
    --sl-slider-span: 1;
    position: relative;
    display: block;
    height: var(--sl-control-md);
    overflow: hidden;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface-2);
    font-size: var(--sl-font-size-md);
  }
  .sl-slider-inset:has(.sl-slider-input:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-slider-fill { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: var(--fill); overflow: hidden; background: var(--sl-accent); }
  .sl-slider-text {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sl-space-md);
    inline-size: 100%;
    padding-inline: var(--sl-space-md);
    color: var(--sl-text);
    white-space: nowrap;
    pointer-events: none;
  }
  .sl-slider-fill .sl-slider-text { inline-size: calc(100% * var(--sl-slider-span)); color: var(--sl-accent-text); }
  .sl-slider-name { overflow: hidden; font-weight: 500; text-overflow: ellipsis; }
  .sl-slider-readout { flex-shrink: 0; font-family: var(--sl-font-mono); }
  /* A zero-width thumb maps the pointer straight onto the track, as the fill is drawn. */
  .sl-slider-inset .sl-slider-input { position: absolute; inset: 0; height: 100%; opacity: 0; }
  .sl-slider-inset .sl-slider-input::-webkit-slider-runnable-track { height: 100%; background: none; }
  .sl-slider-inset .sl-slider-input::-moz-range-track { height: 100%; background: none; }
  .sl-slider-inset .sl-slider-input::-webkit-slider-thumb { width: 0; height: 100%; margin: 0; }
  .sl-slider-inset .sl-slider-input::-moz-range-thumb { width: 0; height: 100%; }
  .sl-slider[data-variant="inset"][data-disabled] .sl-slider-inset { opacity: var(--sl-disabled-opacity); }

  /* Code input */
  .sl-code { display: grid; grid-template-columns: repeat(var(--sl-code-length, 6), minmax(0, 1fr)); gap: 6px; }
  .sl-code .sl-code-digit { height: calc(var(--sl-control-lg) + 4px); padding: 0; text-align: center; font: 500 var(--sl-font-size-xl)/1 var(--sl-font-mono); }
  .sl-code .sl-code-digit:disabled { opacity: var(--sl-disabled-opacity); }

  /* Chip */
  .sl-chip {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 7px;
    min-height: var(--sl-control-sm);
    padding: 0 10px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-tone, var(--sl-muted));
    font-size: var(--sl-font-size-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--sl-duration-base), border-color var(--sl-duration-base), border-radius var(--sl-duration-slow), transform var(--sl-duration-fast);
  }
  .sl-chip:enabled:active { transform: scale(.96); }
  .sl-chip:disabled, .sl-chip[data-disabled] { opacity: var(--sl-disabled-opacity); }
  .sl-chip:disabled:active { transform: none; }
  /* Selected: the accent's soft fill and border; the text stays --sl-text so it holds its contrast on Paper. */
  .sl-chip[data-selected] { border-color: var(--sl-accent); background: var(--sl-accent-soft); color: var(--sl-text); }
  /* Removable: the × sits just inside the end edge. With a main button, it
     covers the chip from the start edge, and the chip draws its focus ring. */
  .sl-chip[data-removable] { gap: var(--sl-space-3xs); padding-inline-end: 3px; }
  .sl-chip:has(> .sl-chip-main) { padding-inline-start: 0; }
  .sl-chip-main {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    gap: 7px;
    padding: 0 var(--sl-space-3xs) 0 10px;
    border: 0;
    border-radius: inherit;
    background: none;
    transition: transform var(--sl-duration-fast);
  }
  .sl-chip-main:focus-visible { outline: none; }
  .sl-chip:has(> .sl-chip-main:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-chip-main:enabled:active { transform: scale(.96); }
  .sl-chip-remove {
    position: relative;
    display: inline-grid;
    flex: none;
    place-items: center;
    width: calc(var(--sl-control-sm) - 8px);
    height: calc(var(--sl-control-sm) - 8px);
    padding: 0;
    border: 0;
    border-radius: calc(var(--sl-radius-small) - 2px);
    background: transparent;
    color: var(--sl-muted);
    transition: background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-chip-remove:enabled:hover { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-chip-pulse { animation: sl-chip-pulse 1.6s ease-in-out infinite; }
  @keyframes sl-chip-pulse { 50% { opacity: .35; } }

  /* Alert */
  .sl-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    transition: border-radius var(--sl-duration-slow);
  }
  .sl-alert-pixel { margin-block-start: 5px; }
  .sl-alert-body { min-width: 0; }
  .sl-alert-progress { height: 3px; margin-block-start: 10px; border-radius: 2px; background: var(--sl-line); }

  /* Disclosure */
  .sl-disclosure-heading { margin: 0; font: inherit; }
  .sl-disclosure-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sl-text);
    font-size: var(--sl-font-size-lg);
    font-weight: 500;
    text-align: start;
  }
  .sl-disclosure-toggle:disabled { opacity: var(--sl-disabled-opacity); }
  .sl-disclosure-toggle[aria-disabled="true"] { cursor: default; }
  .sl-disclosure-icon { flex-shrink: 0; color: var(--sl-muted); transition: transform var(--sl-duration-slow) var(--sl-ease-out), color var(--sl-duration-base); }
  .sl-disclosure[data-open] .sl-disclosure-icon { transform: rotate(45deg); color: var(--sl-accent); }
  .sl-disclosure-panel { padding-block-end: 12px; font-size: var(--sl-font-size-md); line-height: 1.6; color: var(--sl-muted); }
  .sl-disclosure[data-open] .sl-disclosure-panel { animation: sl-disclosure-open var(--sl-duration-slow) var(--sl-ease-out); }
  @keyframes sl-disclosure-open { from { opacity: 0; transform: translateY(-4px); } }

  /* Command bar */
  .sl-command { display: flex; flex-direction: column; min-width: 0; }
  .sl-command-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-block-end: 1px solid var(--sl-line-field); color: var(--sl-muted); }
  .sl-command-search-icon { flex-shrink: 0; }
  .sl-command-search .sl-command-input { flex: 1; min-width: 0; min-height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .sl-command-list { margin: 0; padding: 6px; list-style: none; }
  .sl-command-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: var(--sl-radius-small);
    font-size: var(--sl-font-size-lg);
    cursor: pointer;
    transition: border-radius var(--sl-duration-slow);
  }
  .sl-command-option[aria-selected="true"] { background: var(--sl-surface-2); }
  .sl-command-option[aria-selected="true"] .sl-command-name::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-end: 10px; border-radius: 1.5px; background: var(--sl-accent); transform: var(--sl-slant); vertical-align: 2px; }
  .sl-command-option[aria-disabled="true"] { color: var(--sl-muted); cursor: default; }
  /* A disabled command that is highlighted keeps its mark, in the muted colour. */
  .sl-command-option[aria-disabled="true"] .sl-command-name::before { background: var(--sl-muted); }
  /* A disabled command's reason: a smaller line under the name, starting
     where the name's text does, past the mark when it is highlighted. */
  .sl-command-text { display: grid; min-width: 0; padding-block: 4px; }
  .sl-command-reason { font-size: var(--sl-font-size-sm); line-height: 1.4; }
  .sl-command-option[aria-selected="true"] .sl-command-reason { padding-inline-start: 16px; }
  .sl-command-status { margin: 0; padding: 10px 16px; border-block-start: 1px solid var(--sl-line); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }

  /* BarPicker: columns of slanted-pixel lights in a tray like Segmented's. Lit
     lights fill from the bottom; the chosen column's take --sl-tone and glow,
     brightest at the top, and the other columns show a muted mix of the tone.
     A change pours upward: each light's transition waits one step longer. */
  .sl-bar-picker {
    --sl-bar-picker-light: 10px;
    --sl-bar-picker-gap: 4px;
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
  }
  .sl-bar-picker[data-size="sm"] { --sl-bar-picker-light: 7px; --sl-bar-picker-gap: 3px; display: inline-flex; }
  .sl-bar-picker-option {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 4px 8px;
    border: 0;
    border-radius: calc(var(--sl-radius-small) - 2px);
    background: transparent;
    color: var(--sl-muted);
    transition: background var(--sl-duration-base), color var(--sl-duration-base), box-shadow var(--sl-duration-base);
  }
  .sl-bar-picker[data-size="sm"] .sl-bar-picker-option { flex: none; gap: 6px; min-width: var(--sl-control-sm); padding: 7px 5px 6px; }
  .sl-bar-picker-option:enabled:hover:not([aria-checked="true"]) { background: color-mix(in srgb, var(--sl-surface-2) 55%, transparent); color: var(--sl-text); }
  .sl-bar-picker-option[aria-checked="true"] { background: var(--sl-surface-2); color: var(--sl-text); box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  .sl-bar-picker-option:disabled { opacity: var(--sl-disabled-opacity); }
  .sl-bar-picker-lights { display: flex; flex-direction: column; gap: var(--sl-bar-picker-gap); }
  .sl-bar-picker-light {
    display: block;
    width: var(--sl-bar-picker-light);
    height: var(--sl-bar-picker-light);
    border-radius: 26%;
    background: var(--sl-line);
    transform: var(--sl-slant);
    transition: background var(--sl-duration-base) var(--sl-ease-out), box-shadow var(--sl-duration-slow) var(--sl-ease-out);
    transition-delay: calc(var(--sl-bar-picker-step, 0) * 16ms);
  }
  .sl-bar-picker-light[data-lit] { background: color-mix(in srgb, var(--sl-tone) 30%, var(--sl-line-strong)); }
  .sl-bar-picker-option:enabled:hover:not([aria-checked="true"]) .sl-bar-picker-light[data-lit] { background: color-mix(in srgb, var(--sl-tone) 55%, var(--sl-line-strong)); }
  /* The chosen column: a faint tint in its dark lights, the tone and a soft glow in its lit ones. */
  .sl-bar-picker-option[aria-checked="true"] .sl-bar-picker-light { background: color-mix(in srgb, var(--sl-tone) 12%, var(--sl-line)); }
  .sl-bar-picker-option[aria-checked="true"] .sl-bar-picker-light[data-lit] { background: var(--sl-tone); box-shadow: 0 0 6px color-mix(in srgb, var(--sl-tone) 35%, transparent); }
  /* Its top lit light (the first lit one, since the top light comes first) glows brightest. */
  .sl-bar-picker-option[aria-checked="true"] .sl-bar-picker-light[data-lit]:first-child,
  .sl-bar-picker-option[aria-checked="true"] .sl-bar-picker-light:not([data-lit]) + .sl-bar-picker-light[data-lit] { box-shadow: 0 0 10px 1px color-mix(in srgb, var(--sl-tone) 60%, transparent); }
  .sl-bar-picker-label { max-width: 100%; overflow: hidden; font-size: var(--sl-font-size-sm); font-weight: 500; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .sl-bar-picker[data-size="sm"] .sl-bar-picker-label { font: 500 var(--sl-font-size-xs)/1.25 var(--sl-font-mono); }
  /* HoldButton: a Button whose wait is a row of slanted pixels behind the
     label, revealed from the inline start as the component writes
     --sl-hold-progress (0–1) each frame. JS drives it, so it still fills
     under reduced motion. The label keeps its contrast over the cells: they
     are the tone's soft tint on secondary and ghost, and the tone pushed
     away from --sl-tone-text on primary. */
  .sl-hold {
    --sl-hold-progress: 0;
    --sl-hold-cell: var(--sl-tone-soft);
    --sl-hold-to: 90deg;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  /* Neutral's soft tint is the secondary button's own surface. */
  .sl-hold[data-tone="neutral"] { --sl-hold-cell: var(--sl-line-strong); }
  .sl-hold[data-variant="primary"] { --sl-hold-cell: color-mix(in oklab, var(--sl-tone) 70%, var(--sl-text)); }
  [dir="rtl"] .sl-hold { --sl-hold-to: 270deg; }
  /* The cells lean with the slant token; the box runs past both ends so the
     skew leaves no gap at the corners, and the button's overflow trims it. */
  .sl-hold-fill {
    position: absolute;
    inset-block: 0;
    inset-inline: calc(var(--sl-space-xs) * -1);
    z-index: -1;
    background: repeating-linear-gradient(var(--sl-hold-to), var(--sl-hold-cell) 0 6px, transparent 6px 8px);
    transform: var(--sl-slant);
    clip-path: inset(0 calc((1 - var(--sl-hold-progress)) * 100%) 0 0);
    pointer-events: none;
  }
  [dir="rtl"] .sl-hold-fill { clip-path: inset(0 0 0 calc((1 - var(--sl-hold-progress)) * 100%)); }
  .sl-hold[data-confirmed] .sl-hold-fill { background: var(--sl-hold-cell); }
  .sl-hold-label { display: inline-flex; align-items: center; gap: 6px; }
  /* Forced colours drop the tints: the progress becomes a system-coloured bar along the bottom edge. */
  @media (forced-colors: active) {
    .sl-hold .sl-hold-fill, .sl-hold[data-confirmed] .sl-hold-fill { inset-block-start: auto; block-size: 3px; background: Highlight; forced-color-adjust: none; }
  }
  /* XYPad */
  .sl-xy-pad {
    --sl-xy-pad-size: 200px;
    --sl-xy-pad-thumb: 14px;
    display: flex;
    flex-direction: column;
    gap: var(--sl-space-sm);
    inline-size: var(--sl-xy-pad-size);
    max-inline-size: 100%;
  }
  .sl-xy-pad[data-size="sm"] { --sl-xy-pad-size: 140px; --sl-xy-pad-thumb: 12px; }
  .sl-xy-pad[data-size="lg"] { --sl-xy-pad-size: 260px; }
  .sl-xy-pad[data-disabled] { opacity: var(--sl-disabled-opacity); }
  /* The field. x runs from the inline start (so it mirrors under RTL) and y up
     from the block end; --sl-xy-pad-x and --sl-xy-pad-y are the thumb's place as
     percentages. The grid of quarters is drawn with physical gradients, which
     is fine: it is symmetric, so it looks the same mirrored. */
  .sl-xy-pad-field {
    position: relative;
    inline-size: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background-color: var(--sl-bg);
    background-image:
      linear-gradient(90deg, transparent calc(25% - 1px), var(--sl-line) 0 25%, transparent 0 calc(50% - 1px), var(--sl-line) 0 50%, transparent 0 calc(75% - 1px), var(--sl-line) 0 75%, transparent 0),
      linear-gradient(180deg, transparent calc(25% - 1px), var(--sl-line) 0 25%, transparent 0 calc(50% - 1px), var(--sl-line) 0 50%, transparent 0 calc(75% - 1px), var(--sl-line) 0 75%, transparent 0);
    cursor: crosshair;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    transition: border-color var(--sl-duration-base);
  }
  .sl-xy-pad:not([data-disabled]) .sl-xy-pad-field:hover,
  .sl-xy-pad-field[data-dragging] { border-color: var(--sl-line-strong); }
  .sl-xy-pad[data-disabled] .sl-xy-pad-field { cursor: default; }
  /* The two range inputs: focusable and named, but out of sight; the thumb
     shows their focus. */
  .sl-xy-pad-input {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 1px;
    block-size: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
  }
  /* The crosshair: one hairline through the thumb along each axis, kept inside the border at the ends. */
  .sl-xy-pad-line {
    position: absolute;
    background: var(--sl-line-strong);
    pointer-events: none;
    transition: inset-inline-start var(--sl-duration-fast) var(--sl-ease-out), inset-block-start var(--sl-duration-fast) var(--sl-ease-out), background var(--sl-duration-base);
  }
  .sl-xy-pad-line[data-axis="x"] { inset-block: 0; inset-inline-start: min(var(--sl-xy-pad-x), calc(100% - 1px)); inline-size: 1px; }
  .sl-xy-pad-line[data-axis="y"] { inset-inline: 0; inset-block-start: min(calc(100% - var(--sl-xy-pad-y)), calc(100% - 1px)); block-size: 1px; }
  /* The line of the axis being moved turns accent: the focused one, or both while dragging. */
  .sl-xy-pad-input[data-axis="x"]:focus-visible ~ .sl-xy-pad-line[data-axis="x"],
  .sl-xy-pad-input[data-axis="y"]:focus-visible ~ .sl-xy-pad-line[data-axis="y"],
  .sl-xy-pad-field[data-dragging] .sl-xy-pad-line { background: var(--sl-accent); }
  /* The thumb: a slanted pixel centred on the point, ringed in the page colour
     so it stands off the crosshair; it carries the focus ring for both inputs. */
  .sl-xy-pad-thumb {
    position: absolute;
    inset-inline-start: var(--sl-xy-pad-x);
    inset-block-start: calc(100% - var(--sl-xy-pad-y));
    inline-size: var(--sl-xy-pad-thumb);
    block-size: var(--sl-xy-pad-thumb);
    margin-inline-start: calc(var(--sl-xy-pad-thumb) / -2);
    margin-block-start: calc(var(--sl-xy-pad-thumb) / -2);
    border-radius: 3px;
    background: var(--sl-accent);
    box-shadow: 0 0 0 2px var(--sl-bg);
    transform: var(--sl-slant);
    pointer-events: none;
    transition: inset-inline-start var(--sl-duration-fast) var(--sl-ease-out), inset-block-start var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-xy-pad-input:focus-visible ~ .sl-xy-pad-thumb { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  /* A drag follows the pointer exactly; only key steps glide. */
  .sl-xy-pad-field[data-dragging] .sl-xy-pad-thumb,
  .sl-xy-pad-field[data-dragging] .sl-xy-pad-line { transition: none; }
  .sl-xy-pad-readout {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sl-space-2xs);
    font: var(--sl-font-size-sm)/1.4 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--sl-muted);
  }
  .sl-xy-pad-readout-value { color: var(--sl-text); }
  .sl-xy-pad-readout-value + .sl-xy-pad-readout-separator { margin-inline: var(--sl-space-3xs); }
  /* end XYPad */

  /* CopyButton */
  /* A Button whose icon turns to a check, popping in, and whose text turns
     to Copied for a moment. Both labels sit in one grid cell, the one not on
     show hidden, so the button keeps the wider one's width and nothing beside
     it moves; the text starts at the icon. On a primary fill the check keeps
     the button's text colour, elsewhere it takes the success colour. */
  .sl-copy-button-icon { flex-shrink: 0; }
  .sl-copy-button[data-copied] .sl-copy-button-icon { animation: sl-pop var(--sl-duration-base) var(--sl-ease-out); }
  .sl-copy-button[data-copied]:not([data-variant="primary"]) .sl-copy-button-icon { color: var(--sl-success); }
  .sl-copy-button-text { display: inline-grid; justify-items: start; }
  .sl-copy-button-label { grid-area: 1 / 1; }
  .sl-copy-button-label[aria-hidden="true"] { visibility: hidden; }
  /* end CopyButton */

  /* SplitButton */
  /* The two halves are an attached ButtonGroup's buttons (corners and shared
     border are Button's); the menu half is narrower than a square icon button. */
  .sl-btn.sl-split-button-menu { padding-inline: var(--sl-space-xs); }
  .sl-btn.sl-split-button-menu[data-size="sm"] { padding-inline: var(--sl-space-2xs); }
  .sl-btn.sl-split-button-menu[data-size="lg"] { padding-inline: var(--sl-space-sm); }
  /* Secondary halves already share a hairline border. Ghost and primary ones
     have none that shows, so the menu half draws a seam on the shared edge,
     raised over the action so the action's hover fill can't cover it. */
  .sl-split-button-menu:is([data-variant="ghost"], [data-variant="primary"])::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset-block: var(--sl-space-xs);
    inset-inline-start: -1px;
    inline-size: 1px;
    background: var(--sl-line-strong);
    pointer-events: none;
  }
  .sl-split-button-menu[data-size="sm"]::before { inset-block: var(--sl-space-2xs); }
  /* On a fill, a line of the fill's own text colour, as ButtonGroup.Separator draws. */
  .sl-split-button-menu[data-variant="primary"]::before { background: color-mix(in srgb, var(--sl-tone-text) 45%, var(--sl-tone)); }
  /* end SplitButton */
}
/* Forms: Field, Label, Textarea, Checkbox, RadioGroup, InputGroup,
   NumberInput, SearchField, Rating, ThemeSelector, FileDrop, the shared
   listbox, Select, Combobox, TagInput, DatePicker, TimeField, SecretInput,
   Repeater, KeyValueEditor, ShortcutRecorder, DateTimePicker. */

@layer slant {
  /* Label */
  .sl-label { display: inline-flex; align-items: baseline; gap: var(--sl-space-3xs); font-size: var(--sl-font-size-md); font-weight: 500; line-height: 1.4; color: var(--sl-text); }
  .sl-label[data-disabled] { opacity: var(--sl-disabled-opacity); }
  .sl-label-required { color: var(--sl-danger); }
  .sl-label-hint { margin-inline-start: var(--sl-space-2xs); font-size: var(--sl-font-size-sm); font-weight: 400; color: var(--sl-muted); }
  /* With an action: the label at the inline start, the action at the end of its line. */
  .sl-label-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sl-space-3xs) var(--sl-space-md); min-width: 0; }
  .sl-label-action { font-size: var(--sl-font-size-sm); line-height: 1.4; }

  /* Field: the label over the control, then the description and the error.
     Horizontal puts the label and the control on one row. */
  .sl-field { display: grid; gap: var(--sl-space-xs); min-width: 0; }
  .sl-field[data-orientation="horizontal"] { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--sl-space-md); }
  .sl-field[data-orientation="horizontal"] > .sl-field-description,
  .sl-field[data-orientation="horizontal"] > .sl-field-error { grid-column: 1 / -1; }
  .sl-field-description { margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }
  .sl-field-error { display: flex; align-items: baseline; gap: var(--sl-space-xs); margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-danger); }
  .sl-field-error-mark { flex-shrink: 0; width: 6px; height: 6px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant) translateY(-1px); }
  /* The label hugs its text, so a click beside it doesn't reach the control. */
  .sl-field-label { justify-self: start; }

  /* Textarea: Input's field, padded on every side, with a vertical resize
     handle; autosize sets the height itself and drops the handle. */
  .sl-textarea {
    display: block;
    width: 100%;
    padding: var(--sl-space-xs) var(--sl-space-md);
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    font: var(--sl-font-size-lg)/1.5 var(--sl-font-sans);
    resize: vertical;
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-textarea::placeholder { color: var(--sl-muted); }
  .sl-textarea:focus { border-color: var(--sl-accent); }
  .sl-textarea[aria-invalid="true"] { border-color: var(--sl-danger); }
  .sl-textarea[data-mono] { font-family: var(--sl-font-mono); }
  .sl-textarea[data-autosize] { resize: none; overflow-y: hidden; }
  .sl-textarea:disabled { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-textarea:read-only:not(:disabled) { background: var(--sl-surface-2); }

  /* Checkbox: the native input hidden inside its label and drawn as the
     slanted square, the label and description beside it. The card variant is
     a bordered row that is one click target. A group is a column, or a
     wrapping row; cards share a row in equal columns. */
  .sl-checkbox-group { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-sm); min-width: 0; }
  .sl-checkbox-group[data-orientation="horizontal"] { flex-direction: row; flex-wrap: wrap; column-gap: var(--sl-space-lg); }
  .sl-checkbox-group[data-variant="card"] { align-items: stretch; gap: var(--sl-space-xs); }
  .sl-checkbox-group[data-variant="card"][data-orientation="horizontal"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--sl-checkbox-card-min, 10rem)), 1fr)); }
  .sl-checkbox {
    --sl-checkbox-box: 16px;
    position: relative;
    display: inline-grid;
    grid-template-columns: var(--sl-checkbox-box);
    grid-auto-columns: minmax(0, 1fr);
    align-items: start;
    column-gap: var(--sl-space-sm);
    min-width: 0;
    color: var(--sl-text);
    font-size: var(--sl-font-size-md);
    line-height: 1.4;
    cursor: pointer;
  }
  .sl-checkbox[data-size="sm"] { --sl-checkbox-box: 14px; font-size: var(--sl-font-size-sm); }
  .sl-checkbox[data-disabled] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-checkbox-input { position: absolute; opacity: 0; pointer-events: none; }
  .sl-checkbox-box {
    display: grid;
    place-items: center;
    width: var(--sl-checkbox-box);
    height: var(--sl-checkbox-box);
    /* Centred on the first line of the label. */
    margin-block-start: calc((1.4em - var(--sl-checkbox-box)) / 2);
    border: 1.5px solid var(--sl-line-strong);
    border-radius: calc(var(--sl-radius-small) / 2);
    background: var(--sl-bg);
    color: var(--sl-accent-text);
    transform: var(--sl-slant);
    transition: background var(--sl-duration-base), border-color var(--sl-duration-base);
  }
  .sl-checkbox:not([data-disabled], [data-checked], [data-indeterminate], [data-invalid]):hover .sl-checkbox-box { border-color: var(--sl-muted); }
  .sl-checkbox[data-invalid] .sl-checkbox-box { border-color: var(--sl-danger); }
  .sl-checkbox[data-checked] .sl-checkbox-box,
  .sl-checkbox[data-indeterminate] .sl-checkbox-box { border-color: var(--sl-accent); background: var(--sl-accent); }
  .sl-checkbox:has(.sl-checkbox-input:focus-visible) .sl-checkbox-box { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-checkbox-check { width: 80%; height: 80%; stroke-width: 3; }
  .sl-checkbox-dash { width: 55%; height: 2px; border-radius: 1px; background: currentColor; }
  .sl-checkbox-body { display: grid; grid-column: 2; gap: var(--sl-space-3xs); min-width: 0; }
  .sl-checkbox-description { font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }
  .sl-checkbox[data-size="sm"] .sl-checkbox-description { font-size: var(--sl-font-size-xs); }
  .sl-checkbox[data-variant="card"] {
    display: grid;
    column-gap: var(--sl-space-md);
    padding: var(--sl-space-md);
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    transition: border-color var(--sl-duration-base), background var(--sl-duration-base);
  }
  .sl-checkbox[data-variant="card"]:not([data-disabled], [data-checked], [data-indeterminate], [data-invalid]):hover { border-color: var(--sl-line-strong); }
  .sl-checkbox[data-variant="card"][data-invalid] { border-color: var(--sl-danger); }
  .sl-checkbox[data-variant="card"][data-checked],
  .sl-checkbox[data-variant="card"][data-indeterminate] { border-color: var(--sl-accent); background: var(--sl-accent-soft); }
  .sl-checkbox[data-variant="card"]:has(.sl-checkbox-input:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-checkbox[data-variant="card"]:has(.sl-checkbox-input:focus-visible) .sl-checkbox-box { outline: 0; }
  .sl-checkbox[data-variant="card"] .sl-checkbox-label { font-weight: 600; }

  /* RadioGroup: native radios hidden inside their labels, each drawn as a
     slanted-pixel mark that fills with the accent (and a pixel in the middle)
     when chosen. Cards are bordered rows, the PlanPicker look: the chosen one
     fills with the soft accent and its mark carries a check. Media cards put
     the picture on top, the mark in its corner and the text beneath. */
  .sl-radio-group { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-sm); min-width: 0; }
  .sl-radio-group[data-orientation="horizontal"] { flex-direction: row; flex-wrap: wrap; column-gap: var(--sl-space-lg); }
  .sl-radio-group[data-variant="card"] { align-items: stretch; gap: var(--sl-space-xs); }
  .sl-radio-group[data-variant="card"][data-orientation="horizontal"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--sl-radio-card-min, 10rem)), 1fr)); }
  .sl-radio {
    --sl-radio-mark: 14px;
    position: relative;
    display: inline-grid;
    grid-template-columns: var(--sl-radio-mark);
    grid-auto-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: var(--sl-space-sm);
    min-width: 0;
    color: var(--sl-text);
    font-size: var(--sl-font-size-md);
    line-height: 1.4;
    cursor: pointer;
  }
  .sl-radio[data-size="sm"] { --sl-radio-mark: 12px; font-size: var(--sl-font-size-sm); }
  .sl-radio[data-disabled] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-radio-input { position: absolute; opacity: 0; pointer-events: none; }
  .sl-radio-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--sl-radio-mark);
    height: var(--sl-radio-mark);
    /* Centred on the first line of the label. */
    margin-block-start: calc((1.4em - var(--sl-radio-mark)) / 2);
    border: 1.5px solid var(--sl-line-strong);
    border-radius: calc(var(--sl-radius-small) / 2);
    background: var(--sl-bg);
    color: var(--sl-accent-text);
    transform: var(--sl-slant);
    transition: background var(--sl-duration-base), border-color var(--sl-duration-base);
  }
  /* The chosen mark's inner pixel; cards show the check instead. */
  .sl-radio-mark::after {
    content: "";
    position: absolute;
    inset: 28%;
    border-radius: 1px;
    background: currentColor;
    transform: scale(0);
    transition: transform var(--sl-duration-base) var(--sl-ease-out);
  }
  .sl-radio:not([data-disabled], [data-checked]):hover .sl-radio-mark { border-color: var(--sl-muted); }
  .sl-radio-group[aria-invalid="true"] .sl-radio:not([data-checked]) .sl-radio-mark { border-color: var(--sl-danger); }
  .sl-radio[data-checked] .sl-radio-mark { border-color: var(--sl-accent); background: var(--sl-accent); }
  .sl-radio[data-checked] .sl-radio-mark::after { transform: none; }
  .sl-radio:has(.sl-radio-input:focus-visible) .sl-radio-mark { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-radio-check { width: 80%; height: 80%; stroke-width: 3; }
  .sl-radio-body { display: grid; grid-column: 2; gap: var(--sl-space-3xs); min-width: 0; }
  .sl-radio-description { font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }
  .sl-radio[data-size="sm"] .sl-radio-description { font-size: var(--sl-font-size-xs); }
  .sl-radio-aside { grid-row: 1; grid-column: 3; align-self: center; text-align: end; }
  .sl-radio[data-variant="card"] {
    --sl-radio-mark: 16px;
    display: grid;
    align-items: center;
    column-gap: var(--sl-space-md);
    padding: var(--sl-space-md);
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    transition: border-color var(--sl-duration-base), background var(--sl-duration-base);
  }
  .sl-radio[data-variant="card"][data-size="sm"] { --sl-radio-mark: 14px; padding: var(--sl-space-sm) var(--sl-space-md); }
  .sl-radio[data-variant="card"] .sl-radio-mark { margin: 0; }
  .sl-radio[data-variant="card"] .sl-radio-mark::after { content: none; }
  .sl-radio[data-variant="card"] .sl-radio-label { font-weight: 600; }
  .sl-radio[data-variant="card"]:not([data-disabled], [data-checked]):hover { border-color: var(--sl-line-strong); }
  .sl-radio-group[aria-invalid="true"] .sl-radio[data-variant="card"]:not([data-checked]) { border-color: var(--sl-danger); }
  .sl-radio[data-variant="card"][data-checked] { border-color: var(--sl-accent); background: var(--sl-accent-soft); }
  .sl-radio[data-variant="card"]:has(.sl-radio-input:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-radio[data-variant="card"]:has(.sl-radio-input:focus-visible) .sl-radio-mark { outline: 0; }
  .sl-radio[data-media] { grid-template-columns: minmax(0, 1fr) auto; align-items: start; row-gap: var(--sl-space-sm); }
  .sl-radio-media { display: grid; grid-row: 1; grid-column: 1 / -1; overflow: hidden; border-radius: calc(var(--sl-radius-small) / 2); background: var(--sl-surface-2); }
  .sl-radio[data-media] .sl-radio-mark {
    position: absolute;
    inset-block-start: calc(var(--sl-space-md) + var(--sl-space-xs));
    inset-inline-end: calc(var(--sl-space-md) + var(--sl-space-xs));
    z-index: 1;
  }
  .sl-radio[data-media] .sl-radio-body { grid-row: 2; grid-column: 1; }
  .sl-radio[data-media] .sl-radio-aside { grid-row: 2; grid-column: 2; align-self: start; }

  /* InputGroup: one field drawn around a control and its addons. The group
     takes Input's border, background, focus, invalid and disabled looks, and
     the Input inside goes bare. --sl-input-group-pad is the field's inset (a
     lone Input's padding); --sl-input-group-hug the tighter one of an addon
     holding a control, as close at the side as above and below. */
  .sl-input-group {
    --sl-input-group-height: var(--sl-control-md);
    --sl-input-group-pad: 12px;
    --sl-input-group-hug: max(var(--sl-space-3xs), calc((var(--sl-input-group-height) - 2px - var(--sl-control-sm)) / 2));
    display: flex;
    align-items: stretch;
    min-width: 0;
    min-height: var(--sl-input-group-height);
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    cursor: text;
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-input-group[data-size="sm"] { --sl-input-group-height: var(--sl-control-sm); --sl-input-group-pad: 10px; }
  .sl-input-group[data-size="lg"] { --sl-input-group-height: var(--sl-control-lg); --sl-input-group-pad: 14px; }
  /* With no addon on a side, the inset that lines the text up with a lone
     Input's (the bare input keeps --sl-space-xs of its own). */
  .sl-input-group:not(:has(> .sl-input-group-addon[data-side="start"])) { padding-inline-start: calc(var(--sl-input-group-pad) - var(--sl-space-xs)); }
  .sl-input-group:not(:has(> .sl-input-group-addon[data-side="end"])) { padding-inline-end: calc(var(--sl-input-group-pad) - var(--sl-space-xs)); }
  .sl-input-group:focus-within { border-color: var(--sl-accent); }
  .sl-input-group:has(> :focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-input-group:has([aria-invalid="true"]) { border-color: var(--sl-danger); }
  .sl-input-group:has(> [readonly]:not(:disabled)) { background: var(--sl-surface-2); }
  .sl-input-group:has(> :disabled) { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-input-group-addon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--sl-space-xs);
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    line-height: 1;
    white-space: nowrap;
  }
  .sl-input-group-addon[data-side="start"] { padding-inline-start: calc(var(--sl-input-group-pad) - 2px); }
  .sl-input-group-addon[data-side="end"] { padding-inline-end: calc(var(--sl-input-group-pad) - 2px); }
  /* An addon holding a control (a small Button, the stepper pair) hugs the
     edge. :enabled and :disabled match any form control without naming an
     element or another component's class. */
  .sl-input-group-addon[data-side="start"]:has(:is(:enabled, :disabled)) { padding-inline-start: var(--sl-input-group-hug); }
  .sl-input-group-addon[data-side="end"]:has(:is(:enabled, :disabled)) { padding-inline-end: var(--sl-input-group-hug); }

  /* NumberInput: tabular digits, and the stepper pair stacked in the
     trailing addon as two small ghost buttons, sized to the group's inner
     height so their icons never make it taller. */
  .sl-number-input-field { font-variant-numeric: tabular-nums; }
  .sl-number-input-steppers {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 1px;
    height: calc(var(--sl-input-group-height) - 2px);
    padding-block: var(--sl-input-group-hug);
  }
  .sl-number-input-step {
    display: grid;
    place-items: center;
    width: 22px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: max(1px, calc(var(--sl-radius-small) - 3px));
    background: transparent;
    color: var(--sl-muted);
    transition: background var(--sl-duration-base), color var(--sl-duration-base), opacity var(--sl-duration-base);
  }
  .sl-number-input-step:hover:not(:disabled) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-number-input-step:disabled { opacity: var(--sl-disabled-opacity); }
  /* A disabled field is dimmed whole; its steppers aren't dimmed twice. */
  .sl-number-input:has(> :disabled) .sl-number-input-step:disabled { opacity: 1; }

  /* SearchField: the browser's own clear button and search styling give way
     to the field's; the clear button is a small ghost × sized to the group. */
  .sl-search-field-input { appearance: none; }
  .sl-search-field-input::-webkit-search-cancel-button,
  .sl-search-field-input::-webkit-search-decoration { appearance: none; }
  .sl-search-field-icon { flex-shrink: 0; }
  .sl-search-field-clear {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: min(var(--sl-control-sm), calc(var(--sl-input-group-height) - 6px));
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: max(1px, calc(var(--sl-radius-small) - 2px));
    background: transparent;
    color: var(--sl-muted);
    transition: background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-search-field-clear:hover:not(:disabled) { background: var(--sl-surface-2); color: var(--sl-text); }

  /* Rating: a row of slanted pixels. The marks up to the rating, or up to the
     hovered one while the pointer previews, fill with the accent. */
  .sl-rating { --sl-rating-mark: 14px; --sl-rating-item: var(--sl-control-sm); display: inline-flex; align-items: center; }
  .sl-rating[data-size="sm"] { --sl-rating-mark: 10px; --sl-rating-item: calc(var(--sl-control-sm) - 6px); }
  .sl-rating[data-size="lg"] { --sl-rating-mark: 18px; --sl-rating-item: var(--sl-control-md); }
  .sl-rating[data-readonly] { gap: calc(var(--sl-rating-mark) / 2); padding-inline: 2px; }
  .sl-rating[data-disabled] { opacity: var(--sl-disabled-opacity); }
  .sl-rating-item {
    display: inline-grid;
    place-items: center;
    width: calc(var(--sl-rating-mark) + 10px);
    height: var(--sl-rating-item);
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
  }
  .sl-rating-mark {
    display: block;
    width: var(--sl-rating-mark);
    height: var(--sl-rating-mark);
    border: 1.5px solid var(--sl-muted);
    border-radius: calc(var(--sl-rating-mark) / 4);
    transform: var(--sl-slant);
    transition: background var(--sl-duration-fast), border-color var(--sl-duration-fast), transform var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-rating-mark[data-filled] { border-color: var(--sl-accent); background: var(--sl-accent); }
  .sl-rating-item:enabled:active .sl-rating-mark { transform: var(--sl-slant) scale(.85); }

  /* ThemeSelector: each swatch is a nested .slant[data-theme], so inside it the
     --sl-* tokens are its own theme's. The chosen ring and the focus ring are
     the selector's theme, captured on the root while the tokens are still the
     outer ones (a custom property inherits its resolved value). */
  .sl-theme-selector {
    --sl-theme-selector-ring: var(--sl-accent);
    --sl-theme-selector-focus: var(--sl-focus-ring);
    --sl-theme-selector-tile: 44px;
    display: grid;
    grid-template-columns: repeat(var(--sl-theme-selector-count, 4), minmax(0, 1fr));
    gap: var(--sl-space-sm);
    min-width: 0;
  }
  /* md fills its row, one column per theme; sm hugs its tiles, as Segmented's sizes do. */
  .sl-theme-selector[data-size="sm"] { --sl-theme-selector-tile: 32px; gap: var(--sl-space-xs); max-inline-size: calc(var(--sl-theme-selector-count, 4) * 88px); }
  .sl-theme-option { position: relative; display: grid; gap: var(--sl-space-xs); min-width: 0; cursor: pointer; }
  .sl-theme-input { position: absolute; opacity: 0; pointer-events: none; }
  .sl-theme-swatch {
    position: relative;
    display: block;
    height: var(--sl-theme-selector-tile);
    overflow: hidden;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    transition: border-color var(--sl-duration-fast), box-shadow var(--sl-duration-fast);
  }
  .sl-theme-swatch-pixel { position: absolute; inset-inline-start: 8px; inset-block-end: 8px; width: 12px; height: 12px; border-radius: 3px; background: var(--sl-accent); transform: var(--sl-slant); }
  .sl-theme-swatch-bar { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; width: 18px; height: 10px; border: 1px solid var(--sl-line); border-radius: 3px; background: var(--sl-surface); }
  .sl-theme-selector[data-size="sm"] .sl-theme-swatch-pixel { inset-inline-start: 6px; inset-block-end: 6px; width: 9px; height: 9px; border-radius: 2px; }
  .sl-theme-selector[data-size="sm"] .sl-theme-swatch-bar { inset-block-start: 6px; inset-inline-end: 6px; width: 14px; height: 8px; border-radius: 2px; }
  .sl-theme-option[data-checked] .sl-theme-swatch { border-color: var(--sl-theme-selector-ring); box-shadow: 0 0 0 1px var(--sl-theme-selector-ring); }
  .sl-theme-option:has(.sl-theme-input:focus-visible) .sl-theme-swatch { outline: var(--sl-theme-selector-focus); outline-offset: calc(var(--sl-focus-ring-offset) + 1px); }
  .sl-theme-name { overflow: hidden; font-size: var(--sl-font-size-sm); line-height: 1.4; text-align: center; text-overflow: ellipsis; white-space: nowrap; color: var(--sl-muted); }
  .sl-theme-option[data-checked] .sl-theme-name { color: var(--sl-text); }
  .sl-theme-option[data-disabled] { cursor: default; opacity: var(--sl-disabled-opacity); }

  /* FileDrop: a dashed zone over a hidden file input; the focus ring is the zone's. */
  .sl-file-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sl-space-sm);
    min-width: 0;
    padding: var(--sl-space-xl) var(--sl-space-lg);
    border: 1px dashed var(--sl-line-strong);
    border-radius: var(--sl-radius);
    background: var(--sl-bg);
    color: var(--sl-muted);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--sl-duration-base), background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-file-drop[data-size="sm"] { flex-direction: row; justify-content: flex-start; gap: var(--sl-space-md); padding: var(--sl-space-sm) var(--sl-space-md); text-align: start; }
  .sl-file-drop:hover { border-color: var(--sl-accent); }
  .sl-file-drop:has(.sl-file-drop-input:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-file-drop[data-dragging] { border-style: solid; border-color: var(--sl-accent); background: var(--sl-accent-soft); color: var(--sl-text); }
  .sl-file-drop[data-invalid] { border-color: var(--sl-danger); }
  .sl-file-drop[data-disabled] { border-color: var(--sl-line-strong); cursor: default; opacity: var(--sl-disabled-opacity); }
  .sl-file-drop-input { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .sl-file-drop-icon { flex-shrink: 0; color: var(--sl-muted); }
  .sl-file-drop[data-dragging] .sl-file-drop-icon { color: var(--sl-accent); }
  .sl-file-drop-body { display: grid; justify-items: center; gap: var(--sl-space-2xs); min-width: 0; }
  .sl-file-drop[data-size="sm"] .sl-file-drop-body { justify-items: start; }
  .sl-file-drop-prompt { font-size: var(--sl-font-size-md); line-height: 1.5; }
  .sl-file-drop-button {
    display: inline-flex;
    align-items: center;
    min-height: var(--sl-control-sm);
    margin-inline-end: var(--sl-space-2xs);
    padding: 0 10px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface-2);
    color: var(--sl-text);
    font-weight: 500;
  }
  .sl-file-drop[data-size="sm"] .sl-file-drop-button { min-height: calc(var(--sl-control-sm) - 4px); padding: 0 8px; }
  .sl-file-drop-hint { font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }
  .sl-file-drop[data-dragging] .sl-file-drop-hint { color: var(--sl-text); }
  /* scope="window": while files are dragged over the page, a tint across the
     viewport, an inset dashed frame, and the prompt on a panel of its own. The
     overlay alone takes the drag (its contents let the pointer through), so a
     drag leaving it has left the window. It fades in, by opacity only; under
     reduced motion base.css drops the fade. */
  .sl-portal.sl-file-drop-layer { z-index: var(--sl-z-overlay); }
  .sl-file-drop-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--sl-z-overlay);
    display: flex;
    padding: var(--sl-space-lg);
    background: color-mix(in srgb, var(--sl-bg) 72%, transparent);
    animation: sl-file-drop-overlay-in var(--sl-duration-fast) var(--sl-ease-out);
  }
  @keyframes sl-file-drop-overlay-in { from { opacity: 0; } }
  .sl-file-drop-overlay-frame {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: 2px dashed var(--sl-accent);
    border-radius: var(--sl-radius-large);
    background: color-mix(in srgb, var(--sl-accent) 8%, transparent);
    pointer-events: none;
  }
  .sl-file-drop-overlay-body {
    display: grid;
    justify-items: center;
    gap: var(--sl-space-xs);
    max-width: min(420px, 100%);
    padding: var(--sl-space-lg) var(--sl-space-xl);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-md);
    color: var(--sl-text);
    text-align: center;
  }
  .sl-file-drop-overlay-icon { color: var(--sl-accent); }
  .sl-file-drop-overlay-prompt { font-size: var(--sl-font-size-lg); font-weight: 600; line-height: 1.4; }
  .sl-file-drop-overlay-hint { font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }

  /* Listbox: the list Select opens and Combobox and TagInput filter
     (internal/listbox.tsx). Drawn like Menu's list; the options are never
     focused, so the active one is lit by data-active, not :focus. */
  .sl-listbox-popup {
    z-index: var(--sl-z-dropdown);
    max-width: min(420px, calc(100vw - 16px));
    padding: 4px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-md);
    animation: sl-in var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-listbox { max-height: min(296px, 45vh); margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; outline: none; }
  .sl-listbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding-block: 4px;
    padding-inline: 6px 10px;
    border-radius: calc(var(--sl-radius-small) - 2px);
    font-size: var(--sl-font-size-md);
    line-height: 1.35;
    color: var(--sl-text);
    cursor: pointer;
  }
  .sl-listbox-option[data-active] { background: var(--sl-surface-2); }
  .sl-listbox-option[aria-disabled="true"] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-listbox-check { display: grid; flex-shrink: 0; place-items: center; width: 16px; color: var(--sl-accent); }
  .sl-listbox-text { display: grid; min-width: 0; }
  .sl-listbox-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-listbox-description { font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  /* A disabled option that says why: the check, label and description dim as
     usual, and the reason under them stays at full strength, so the line the
     reader needs is the one they can read. */
  .sl-listbox-option[data-reason] { opacity: 1; }
  .sl-listbox-option[data-reason] :is(.sl-listbox-check, .sl-listbox-label, .sl-listbox-description) { opacity: var(--sl-disabled-opacity); }
  .sl-listbox-reason { font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  /* What the popup shows instead of a list: no matches, or still loading. */
  .sl-listbox-empty { margin: 0; padding: 6px 10px; font-size: var(--sl-font-size-sm); color: var(--sl-muted); }

  /* Select: a button drawn like .sl-input at each size, showing the chosen
     option (or the muted placeholder) at the start, cut short with an
     ellipsis, and a muted chevron at the inline end that turns while open.
     Focused or open, the border takes the accent; invalid, the danger colour,
     which wins. The list it opens is the shared listbox above. */
  .sl-select {
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-xs);
    width: 100%;
    min-height: var(--sl-control-md);
    padding-block: 0;
    padding-inline: 12px 10px;
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    font-size: var(--sl-font-size-lg);
    text-align: start;
    vertical-align: middle;
    transition: border-color var(--sl-duration-base);
  }
  .sl-select:hover:where(:enabled:not([aria-readonly="true"])) { border-color: var(--sl-muted); }
  .sl-select:is(:focus, [aria-expanded="true"]) { border-color: var(--sl-accent); }
  .sl-select:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-select[aria-invalid="true"] { border-color: var(--sl-danger); }
  .sl-select[data-size="sm"] { min-height: var(--sl-control-sm); padding-inline: 10px 8px; font-size: var(--sl-font-size-md); }
  .sl-select[data-size="lg"] { min-height: var(--sl-control-lg); padding-inline: 14px 12px; }
  .sl-select:disabled { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-select[aria-readonly="true"]:not(:disabled) { background: var(--sl-surface-2); cursor: default; }
  .sl-select-value { flex: 1 1 auto; min-width: 0; overflow: hidden; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
  .sl-select-value[data-placeholder] { color: var(--sl-muted); }
  .sl-select-chevron { flex-shrink: 0; color: var(--sl-muted); transition: transform var(--sl-duration-fast) var(--sl-ease-out); }
  .sl-select[aria-expanded="true"] .sl-select-chevron { transform: rotate(180deg); }

  /* Combobox: an InputGroup whose trailing addon is a small ghost chevron
     button, sized to the group like SearchField's clear button. The field
     keeps the accent border while its list is open, unless it is invalid,
     and the chevron turns to point at the open list. */
  .sl-combobox[data-open]:not(:has([aria-invalid="true"])) { border-color: var(--sl-accent); }
  .sl-combobox-toggle {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: min(var(--sl-control-sm), calc(var(--sl-input-group-height) - 6px));
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: max(1px, calc(var(--sl-radius-small) - 2px));
    background: transparent;
    color: var(--sl-muted);
    cursor: default;
    transition: background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-combobox-toggle:hover:not(:disabled) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-combobox-chevron { transition: transform var(--sl-duration-base) var(--sl-ease-out); }
  .sl-combobox[data-open] .sl-combobox-chevron { transform: rotate(180deg); }

  /* TagInput: Input's field, wrapping its tags onto as many lines as they
     need, with the input taking the rest of the last line (or one of its
     own). One line is a control height: the tags are the field's inner
     height. Each tag is a hairline token on the second surface with a small
     ghost ×, which the arrow keys reach from the input. */
  .sl-tag-input {
    --sl-tag-input-height: var(--sl-control-md);
    --sl-tag-input-pad: 12px;
    --sl-tag-input-tag: calc(var(--sl-tag-input-height) - 2px - 2 * var(--sl-space-2xs));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-2xs);
    min-width: 0;
    min-height: var(--sl-tag-input-height);
    padding: var(--sl-space-2xs);
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    cursor: text;
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-tag-input[data-size="sm"] { --sl-tag-input-height: var(--sl-control-sm); --sl-tag-input-pad: 10px; }
  .sl-tag-input[data-size="lg"] { --sl-tag-input-height: var(--sl-control-lg); --sl-tag-input-pad: 14px; }
  .sl-tag-input:focus-within { border-color: var(--sl-accent); }
  .sl-tag-input:has(> .sl-tag-input-field:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-tag-input[data-invalid] { border-color: var(--sl-danger); }
  .sl-tag-input[data-readonly] { background: var(--sl-surface-2); }
  /* Disabled, the border and the input dim but the tags keep their contrast:
     their text sits in no disabled control, so it isn't exempt from it. */
  .sl-tag-input[data-disabled] { border-color: var(--sl-line); cursor: default; }
  .sl-tag-input[data-disabled] .sl-tag-input-field { opacity: var(--sl-disabled-opacity); }
  .sl-tag-input[data-disabled] .sl-tag-input-tag { background: transparent; }
  .sl-tag-input-tags { display: flex; flex-wrap: wrap; gap: var(--sl-space-2xs); min-width: 0; margin: 0; padding: 0; list-style: none; }
  .sl-tag-input-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-3xs);
    min-width: 0;
    max-width: 100%;
    height: var(--sl-tag-input-tag);
    padding-inline: var(--sl-space-sm) var(--sl-space-3xs);
    border: 1px solid var(--sl-line);
    border-radius: max(1px, calc(var(--sl-radius-small) - 2px));
    background: var(--sl-surface-2);
    color: var(--sl-text);
    font-size: var(--sl-font-size-sm);
    font-weight: 500;
    line-height: 1;
    cursor: default;
  }
  /* Read-only or disabled there is no ×, and the text sits evenly inside. */
  .sl-tag-input-tag:not(:has(> .sl-tag-input-tag-remove)) { padding-inline-end: var(--sl-space-sm); }
  .sl-tag-input-tag-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-tag-input-tag-remove {
    display: grid;
    flex: none;
    place-items: center;
    width: calc(var(--sl-tag-input-tag) - 6px);
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: max(1px, calc(var(--sl-radius-small) - 3px));
    background: transparent;
    color: var(--sl-muted);
    transition: background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-tag-input-tag-remove:hover { background: var(--sl-line); color: var(--sl-text); }
  /* The bare input; its text lines up with a lone Input's when there are no tags. */
  .sl-tag-input-field {
    flex: 1 1 6rem;
    min-width: 6rem;
    height: var(--sl-tag-input-tag);
    padding: 0 calc(var(--sl-tag-input-pad) - var(--sl-space-2xs));
    border: 0;
    background: transparent;
    color: inherit;
    font: var(--sl-font-size-lg)/1 var(--sl-font-sans);
  }
  .sl-tag-input[data-size="sm"] .sl-tag-input-field { font-size: var(--sl-font-size-md); }
  .sl-tag-input-tags + .sl-tag-input-field { padding-inline-start: var(--sl-space-2xs); }
  .sl-tag-input-field::placeholder { color: var(--sl-muted); }
  .sl-tag-input-field:focus-visible { outline: 0; }
  .sl-tag-input-field:disabled { cursor: default; }

  /* DatePicker: an InputGroup with tabular digits and a small ghost calendar
     button sized to the group; the accent border stays while the calendar is
     open, and the calendar opens in a panel drawn like Popover's. */
  .sl-date-picker-input { font-variant-numeric: tabular-nums; }
  .sl-date-picker[data-open] { border-color: var(--sl-accent); }
  .sl-date-picker-button[data-icon][data-size] {
    width: min(var(--sl-control-sm), calc(var(--sl-input-group-height) - 6px));
    min-height: 0;
    aspect-ratio: 1;
    color: var(--sl-muted);
  }
  .sl-date-picker-button[data-icon][data-size]:hover:not(:disabled) { color: var(--sl-text); }
  .sl-date-picker-popup {
    z-index: var(--sl-z-dropdown);
    /* useAnchor keeps 8px from each edge of the viewport. */
    width: min(296px, calc(100vw - 2 * var(--sl-space-sm)));
    padding: var(--sl-space-md);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-md);
    animation: sl-in var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-date-picker-popup:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }

  /* TimeField: Input's field around a row of spinbutton segments. The row
     keeps the time's own order under RTL (the field itself still sits at the
     inline start); the focused segment fills with the accent, and the field
     takes the focus ring while the keyboard is in it. --sl-time-field-pad
     lines the digits up with a lone Input's text, less the segment's own inset. */
  .sl-time-field {
    --sl-time-field-pad: 12px;
    display: flex;
    align-items: center;
    inline-size: 100%;
    min-inline-size: 0;
    min-block-size: var(--sl-control-md);
    padding-inline: calc(var(--sl-time-field-pad) - var(--sl-space-3xs));
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    font: var(--sl-font-size-lg)/1 var(--sl-font-sans);
    cursor: text;
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-time-field[data-size="sm"] { --sl-time-field-pad: 10px; min-block-size: var(--sl-control-sm); font-size: var(--sl-font-size-md); }
  .sl-time-field[data-size="lg"] { --sl-time-field-pad: 14px; min-block-size: var(--sl-control-lg); }
  .sl-time-field:focus-within { border-color: var(--sl-accent); }
  .sl-time-field:has(:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-time-field[data-invalid] { border-color: var(--sl-danger); }
  .sl-time-field[data-readonly]:not([data-disabled]) { background: var(--sl-surface-2); }
  .sl-time-field[data-disabled] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-time-field-segments {
    display: inline-flex;
    align-items: center;
    min-inline-size: 0;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .sl-time-field-segment {
    min-inline-size: 2ch;
    padding: var(--sl-space-3xs);
    border-radius: max(1px, calc(var(--sl-radius-small) - 3px));
    text-align: center;
    user-select: none;
    transition: background var(--sl-duration-fast), color var(--sl-duration-fast);
  }
  .sl-time-field-segment[data-placeholder] { color: var(--sl-muted); }
  .sl-time-field-segment:focus { outline: 0; background: var(--sl-accent); color: var(--sl-accent-text); }
  .sl-time-field-literal { white-space: pre; }

  /* SecretInput: an InputGroup around a monospace input, with a small ghost
     reveal toggle and, when copyable, a copy button in the trailing addon,
     each sized to the group like DatePicker's calendar button. The toggle
     keeps the text colour while the value shows. */
  .sl-secret-input-field { font-variant-ligatures: none; }
  .sl-secret-input-action[data-icon][data-size] {
    width: min(var(--sl-control-sm), calc(var(--sl-input-group-height) - 6px));
    min-height: 0;
    aspect-ratio: 1;
    color: var(--sl-muted);
  }
  .sl-secret-input-action[data-icon][data-size]:hover:not(:disabled, [aria-disabled="true"]),
  .sl-secret-input-reveal[aria-pressed="true"][data-icon][data-size] { color: var(--sl-text); }
  /* A disabled field is dimmed whole; its buttons aren't dimmed twice. */
  .sl-secret-input:has(> :disabled) .sl-secret-input-action:disabled { opacity: 1; }
  /* end SecretInput */

  /* Repeater */
  /* The rows sit in one hairline box on the surface, divided by hairlines.
     Each row is a grip, the caller's fields and its buttons at the inline
     end, which wrap under the fields when the row is narrow. The dragged row
     lifts with an accent edge. The child combinators keep a list nested in a
     row to its own rules. */
  .sl-repeater { --sl-repeater-control: var(--sl-control-md); --sl-repeater-pad: var(--sl-space-sm); display: grid; gap: var(--sl-space-sm); min-inline-size: 0; }
  .sl-repeater[data-size="sm"] { --sl-repeater-control: var(--sl-control-sm); --sl-repeater-pad: var(--sl-space-xs); }
  .sl-repeater[data-dragging] { cursor: grabbing; user-select: none; }
  .sl-repeater-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); background: var(--sl-surface); }
  .sl-repeater[data-invalid] > .sl-repeater-list { border-color: var(--sl-danger); }
  .sl-repeater-row { position: relative; container-type: inline-size; }
  .sl-repeater-row + .sl-repeater-row { border-block-start: 1px solid var(--sl-line); }
  .sl-repeater-row[data-dragging] { z-index: 1; border-radius: var(--sl-radius-small); background: var(--sl-surface); box-shadow: 0 0 0 1px var(--sl-accent), var(--sl-shadow-md); }
  .sl-repeater-item { display: flex; align-items: flex-start; gap: var(--sl-space-xs) var(--sl-space-sm); padding: var(--sl-repeater-pad); }
  /* The grip: six slanted pixels, muted until the row is hovered. */
  .sl-repeater-handle {
    display: grid;
    flex: none;
    place-items: center;
    inline-size: 12px;
    block-size: var(--sl-repeater-control);
    color: var(--sl-muted);
    opacity: .5;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: opacity var(--sl-duration-fast), color var(--sl-duration-fast);
  }
  .sl-repeater-handle::before { content: ""; inline-size: 6px; block-size: 14px; background: conic-gradient(from 270deg at 2px 2px, currentColor 25%, transparent 0) 0 0 / 4px 6px; transform: var(--sl-slant); }
  .sl-repeater-row:hover > .sl-repeater-item > .sl-repeater-handle { opacity: 1; }
  .sl-repeater-handle:hover { color: var(--sl-text); }
  .sl-repeater-row[data-dragging] > .sl-repeater-item > .sl-repeater-handle { opacity: 1; color: var(--sl-accent); cursor: grabbing; }
  .sl-repeater[data-disabled] > .sl-repeater-list > .sl-repeater-row > .sl-repeater-item > .sl-repeater-handle { opacity: var(--sl-disabled-opacity); color: var(--sl-muted); cursor: default; }
  .sl-repeater-content { flex: 1 1 0; min-inline-size: 0; }
  .sl-repeater-actions { display: flex; flex: none; align-items: center; gap: var(--sl-space-3xs); min-block-size: var(--sl-repeater-control); }
  .sl-repeater-empty { margin: 0; padding: var(--sl-space-sm) var(--sl-space-md); border: 1px dashed var(--sl-line-strong); border-radius: var(--sl-radius-small); color: var(--sl-muted); font-size: var(--sl-font-size-md); line-height: 1.5; }
  .sl-repeater-add { justify-self: start; }
  @container (max-width: 28rem) {
    .sl-repeater-item { flex-wrap: wrap; }
    .sl-repeater-actions { flex-basis: 100%; justify-content: flex-end; min-block-size: 0; }
  }
  /* end Repeater */

  /* KeyValueEditor */
  /* Repeater's rows, each a grid of cells: the key, the type (with several
     types) and the value. The column heads over them share the grid, inset
     like a row (the list's border, the row's padding) with room for the grip
     and the row's three buttons, which they drop when the buttons wrap. */
  .sl-key-value-editor { --sl-key-value-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .sl-key-value-editor[data-typed] { --sl-key-value-columns: minmax(0, 1fr) minmax(6.5rem, .7fr) minmax(0, 1.5fr); }
  .sl-key-value-head {
    display: flex;
    container-type: inline-size;
    align-items: end;
    gap: var(--sl-space-sm);
    margin-inline: 1px;
    margin-block-end: calc(var(--sl-space-3xs) - var(--sl-space-sm));
    padding-inline: var(--sl-repeater-pad);
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .sl-key-value-head-grip { flex: none; inline-size: 12px; }
  .sl-key-value-head-columns, .sl-key-value-row { display: grid; grid-template-columns: var(--sl-key-value-columns); gap: var(--sl-space-xs) var(--sl-space-sm); }
  .sl-key-value-head-columns { flex: 1 1 0; min-inline-size: 0; }
  .sl-key-value-head-cell { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-key-value-head-actions { display: flex; flex: none; gap: var(--sl-space-3xs); }
  .sl-key-value-head-action { inline-size: var(--sl-repeater-control); }
  @container (max-width: 28rem) {
    .sl-key-value-head-actions { display: none; }
  }
  .sl-key-value-row { align-items: start; }
  .sl-key-value-cell { display: grid; gap: var(--sl-space-3xs); min-inline-size: 0; }
  .sl-key-value-cell[data-type="boolean"] { align-content: start; justify-items: start; }
  .sl-key-value-switch { margin-block: calc((var(--sl-repeater-control) - 22px) / 2); }
  .sl-key-value-switch[data-size="sm"] { margin-block: calc((var(--sl-repeater-control) - 18px) / 2); }
  .sl-key-value-json { min-block-size: var(--sl-repeater-control); }
  .sl-key-value-editor[data-size="sm"] .sl-key-value-json { padding-block: 3px; padding-inline: 10px; font-size: var(--sl-font-size-md); }
  .sl-key-value-error { display: flex; align-items: baseline; gap: var(--sl-space-xs); margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.4; color: var(--sl-danger); }
  .sl-key-value-error-mark { flex-shrink: 0; inline-size: 6px; block-size: 6px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant) translateY(-1px); }
  /* end KeyValueEditor */

  /* ShortcutRecorder */
  /* Input's field around the record button, which fills it, and a small
     ghost × at the inline end while there is a shortcut to clear. The
     shortcut shows as key caps in their own left-to-right order, as one is
     written in any script, or as the muted placeholder. Recording, the
     border takes the accent and a slanted accent pixel pulses before the
     modifiers held so far and the muted prompt; a refusal turns the border
     to danger and gives its reason on a line under the field. */
  .sl-shortcut-recorder {
    --sl-shortcut-recorder-height: var(--sl-control-md);
    --sl-shortcut-recorder-pad: 12px;
    --sl-shortcut-recorder-clear: min(var(--sl-control-sm), calc(var(--sl-shortcut-recorder-height) - 6px));
    position: relative;
    display: flex;
    align-items: center;
    min-inline-size: 0;
    min-block-size: var(--sl-shortcut-recorder-height);
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-shortcut-recorder[data-size="sm"] { --sl-shortcut-recorder-height: var(--sl-control-sm); --sl-shortcut-recorder-pad: 10px; }
  .sl-shortcut-recorder[data-size="lg"] { --sl-shortcut-recorder-height: var(--sl-control-lg); --sl-shortcut-recorder-pad: 14px; }
  .sl-shortcut-recorder:hover:not([data-disabled], [data-readonly]) { border-color: var(--sl-muted); }
  .sl-shortcut-recorder:is(:focus-within, [data-recording]) { border-color: var(--sl-accent); }
  .sl-shortcut-recorder:has(> .sl-shortcut-recorder-button:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-shortcut-recorder[data-invalid] { border-color: var(--sl-danger); }
  .sl-shortcut-recorder[data-readonly]:not([data-disabled]) { background: var(--sl-surface-2); }
  .sl-shortcut-recorder[data-disabled] { opacity: var(--sl-disabled-opacity); }
  .sl-shortcut-recorder-button {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    align-self: stretch;
    gap: var(--sl-space-xs);
    min-inline-size: 0;
    padding-block: 0;
    padding-inline: var(--sl-shortcut-recorder-pad);
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    font: var(--sl-font-size-lg)/1 var(--sl-font-sans);
    text-align: start;
  }
  .sl-shortcut-recorder[data-size="sm"] .sl-shortcut-recorder-button { font-size: var(--sl-font-size-md); }
  .sl-shortcut-recorder-button:focus-visible { outline: 0; }
  .sl-shortcut-recorder-button:disabled { cursor: default; }
  .sl-shortcut-recorder:has(> .sl-shortcut-recorder-clear) .sl-shortcut-recorder-button { padding-inline-end: var(--sl-space-xs); }
  .sl-shortcut-recorder-value { display: flex; flex: 1 1 auto; align-items: center; gap: var(--sl-space-xs); min-inline-size: 0; overflow: hidden; line-height: 1.4; white-space: nowrap; }
  .sl-shortcut-recorder-value[data-placeholder] { color: var(--sl-muted); }
  .sl-shortcut-recorder-keys { display: inline-flex; align-items: center; gap: var(--sl-space-3xs); min-inline-size: 0; direction: ltr; unicode-bidi: isolate; }
  .sl-shortcut-recorder-key { color: var(--sl-text); font-size: var(--sl-font-size-sm); }
  .sl-shortcut-recorder[data-size="sm"] .sl-shortcut-recorder-key { font-size: var(--sl-font-size-xs); }
  .sl-shortcut-recorder-prompt { min-inline-size: 0; overflow: hidden; color: var(--sl-muted); text-overflow: ellipsis; }
  .sl-shortcut-recorder-mark {
    flex: none;
    inline-size: 6px;
    block-size: 6px;
    border-radius: 1.5px;
    background: var(--sl-accent);
    transform: var(--sl-slant);
    animation: sl-shortcut-recorder-pulse 1.2s ease-in-out infinite;
  }
  @keyframes sl-shortcut-recorder-pulse { 50% { opacity: .35; } }
  .sl-shortcut-recorder-clear[data-icon][data-size] {
    flex: none;
    width: var(--sl-shortcut-recorder-clear);
    min-height: 0;
    aspect-ratio: 1;
    margin-inline-end: calc((var(--sl-shortcut-recorder-height) - 2px - var(--sl-shortcut-recorder-clear)) / 2);
    color: var(--sl-muted);
  }
  .sl-shortcut-recorder-clear[data-icon][data-size]:hover { color: var(--sl-text); }
  .sl-shortcut-recorder-error { display: flex; align-items: baseline; gap: var(--sl-space-xs); margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-danger); }
  .sl-shortcut-recorder-error-mark { flex-shrink: 0; width: 6px; height: 6px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant) translateY(-1px); }
  /* end ShortcutRecorder */

  /* DateTimePicker: a DatePicker and a TimeField side by side, each drawn
     as its own field, wrapping under each other when the group is narrow.
     Under them, the time-zone line, whose box is kept while it waits for
     the browser's zone so nothing moves when it fills, then the range error,
     drawn as Field's error is. */
  .sl-date-time-picker { display: grid; gap: var(--sl-space-xs); min-inline-size: 0; }
  .sl-date-time-picker-controls { display: flex; flex-wrap: wrap; gap: var(--sl-space-xs); min-inline-size: 0; }
  .sl-date-time-picker-date { flex: 3 1 10.5rem; min-inline-size: 0; }
  .sl-date-time-picker-time { flex: 2 1 7.5rem; }
  .sl-date-time-picker-zone {
    min-block-size: calc(var(--sl-font-size-sm) * 1.5);
    margin: 0;
    font-size: var(--sl-font-size-sm);
    line-height: 1.5;
    color: var(--sl-muted);
  }
  .sl-date-time-picker-error {
    display: flex;
    align-items: baseline;
    gap: var(--sl-space-xs);
    margin: 0;
    font-size: var(--sl-font-size-sm);
    line-height: 1.5;
    color: var(--sl-danger);
  }
  .sl-date-time-picker-error-mark {
    flex-shrink: 0;
    inline-size: 6px;
    block-size: 6px;
    border-radius: 1.5px;
    background: currentColor;
    transform: var(--sl-slant) translateY(-1px);
  }
  /* end DateTimePicker */
}
/* Overlays: Popover, Tooltip, Dialog, Drawer, ContextMenu, ImageViewer. Anchored layers
   are portaled and placed by useAnchor (position: fixed, data-side); the
   modal ones are native <dialog>s in the browser's top layer. */

@layer slant {
  /* Popover */
  .sl-popover {
    z-index: var(--sl-z-dropdown);
    /* useAnchor keeps 8px from each edge of the viewport. */
    max-width: min(360px, calc(100vw - 2 * var(--sl-space-sm)));
    padding: var(--sl-space-md);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-md);
    font-size: var(--sl-font-size-md);
    animation: sl-in var(--sl-duration-fast) var(--sl-ease-out);
  }

  /* Tooltip */
  /* Each tooltip's host is always mounted, so it would sit under a popover
     opened later at the same z-index; the layer lifts it above. */
  .sl-portal.sl-tooltip-layer { z-index: var(--sl-z-tooltip); }
  .sl-tooltip {
    z-index: var(--sl-z-tooltip);
    max-width: 280px;
    padding-block: var(--sl-space-2xs);
    padding-inline: var(--sl-space-sm);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface-2);
    color: var(--sl-text);
    font-size: var(--sl-font-size-sm);
    line-height: 1.4;
    overflow-wrap: break-word;
    box-shadow: var(--sl-shadow-sm);
    animation: sl-in var(--sl-duration-fast) var(--sl-ease-out);
  }
  /* Closed, it stays in the DOM for aria-describedby; a display on its className mustn't show it. */
  .sl-tooltip[hidden] { display: none !important; }

  /* Dialog */
  /* A native <dialog> shown with showModal(): the browser lifts it into the
     top layer, above any z-index. Closed, the browser hides it, so `display`
     is only set while [open]. */
  .sl-dialog {
    width: min(var(--sl-dialog-width, 440px), calc(100vw - 2 * var(--sl-space-lg)));
    max-width: none;
    max-height: calc(100dvh - 2 * var(--sl-space-xl));
    /* The regions pad themselves inline; this keeps the ends even with or without a title or footer. */
    padding-block: var(--sl-space-md);
    padding-inline: 0;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-large);
    background: var(--sl-surface);
    color: var(--sl-text);
    box-shadow: var(--sl-shadow-lg);
  }
  /* Rises in by its inset, never a transform: a transform would make the dialog the
     containing block of the fixed menus and popovers opened inside it, and
     place them off by the dialog's own offset. */
  .sl-dialog[open] { display: flex; flex-direction: column; animation: sl-dialog-in var(--sl-duration-slow) var(--sl-ease-out); }
  @keyframes sl-dialog-in { from { opacity: 0; inset-block-start: var(--sl-space-xs); } }
  /* A literal: ::backdrop inherits no custom properties before Chrome 122. */
  .sl-dialog::backdrop, .sl-drawer::backdrop { background: rgb(0 0 0 / .5); }
  /* The panel takes focus itself only when it holds nothing focusable; it is its own cue. */
  .sl-dialog:focus-visible, .sl-drawer:focus-visible { outline: none; }
  .sl-dialog-title {
    flex: none;
    margin: 0;
    padding-block: var(--sl-space-sm);
    padding-inline: var(--sl-space-lg);
    font-size: var(--sl-font-size-xl);
    font-weight: 600;
    line-height: 1.3;
  }
  .sl-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-block: var(--sl-space-sm);
    padding-inline: var(--sl-space-lg);
    font-size: var(--sl-font-size-md);
    line-height: 1.6;
  }
  /* Focused while it scrolls (it joins the tab order then): the ring goes inside, as the panel would clip it outside. */
  .sl-dialog-body:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-dialog-footer {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--sl-space-sm);
    padding-block: var(--sl-space-md) var(--sl-space-sm);
    padding-inline: var(--sl-space-lg);
  }
  /* An alert's answers share one row of equal columns under the question, as a system alert's do. */
  .sl-dialog[role="alertdialog"] .sl-dialog-footer, .sl-drawer[role="alertdialog"] .sl-dialog-footer { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; }
  /* With `acknowledge`, the footer stacks the checkbox's row over the answers'
     row, which takes the footer's own layout (an alert's equal columns too).
     :is() lifts it over the alertdialog rule above. */
  :is(.sl-dialog, .sl-drawer) .sl-dialog-footer[data-acknowledge] { display: flex; flex-direction: column; align-items: stretch; gap: var(--sl-space-md); }
  .sl-dialog-acknowledge { display: flex; min-width: 0; }
  .sl-dialog-answers { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-sm); }
  .sl-dialog[role="alertdialog"] .sl-dialog-answers, .sl-drawer[role="alertdialog"] .sl-dialog-answers { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; }

  /* Drawer */
  /* The same modal on a screen edge. `start` and `end` are inline edges, so
     they swap on a right-to-left page; `bottom` is a bottom sheet. */
  .sl-drawer {
    --sl-drawer-inset: 0px;
    width: min(var(--sl-drawer-size, 360px), calc(100vw - var(--sl-space-2xl)));
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    inset-block: 0;
    inset-inline: auto 0;
    padding-block: var(--sl-space-md);
    padding-inline: 0;
    border: 0;
    border-inline-start: 1px solid var(--sl-line-strong);
    background: var(--sl-surface);
    color: var(--sl-text);
    box-shadow: var(--sl-shadow-lg);
  }
  .sl-drawer[data-side="start"] { inset-inline: 0 auto; border-inline-start: 0; border-inline-end: 1px solid var(--sl-line-strong); }
  .sl-drawer[data-side="bottom"] {
    width: auto;
    max-height: min(var(--sl-drawer-size, 85dvh), calc(100dvh - var(--sl-space-2xl)));
    inset-block: auto 0;
    inset-inline: 0;
    border-inline-start: 0;
    border-block-start: 1px solid var(--sl-line-strong);
    border-start-start-radius: var(--sl-radius-large);
    border-start-end-radius: var(--sl-radius-large);
  }
  /* The bottom sheet's grab bar: a picture, with no gesture of its own. */
  .sl-drawer[data-side="bottom"]::before {
    content: '';
    flex: none;
    align-self: center;
    width: 36px;
    height: 4px;
    margin-block-end: var(--sl-space-xs);
    border-radius: var(--sl-radius-full);
    background: var(--sl-line-strong);
  }
  /* floating: PanelUI's Sheet, clear of its edge and rounded all round. */
  .sl-drawer[data-variant="floating"] {
    --sl-drawer-inset: var(--sl-space-md);
    width: min(var(--sl-drawer-size, 360px), calc(100vw - 2 * var(--sl-drawer-inset)));
    inset-block: var(--sl-drawer-inset);
    inset-inline: auto var(--sl-drawer-inset);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-large);
    /* The drag area: the sheet outside the Body, which scrolls and keeps its own touch-action. */
    touch-action: none;
    /* How a drag let go short of dismissing springs back. */
    transition: transform var(--sl-duration-base) var(--sl-ease-out);
  }
  .sl-drawer[data-variant="floating"][data-side="start"] { inset-inline: var(--sl-drawer-inset) auto; }
  .sl-drawer[data-variant="floating"][data-side="bottom"] {
    width: auto;
    max-height: min(var(--sl-drawer-size, 85dvh), calc(100dvh - 2 * var(--sl-drawer-inset)));
    inset-block: auto var(--sl-drawer-inset);
    inset-inline: var(--sl-drawer-inset);
  }
  .sl-drawer[data-dragging] { transition: none; }
  @media (min-width: 640px) {
    .sl-drawer[data-variant="floating"] { --sl-drawer-inset: var(--sl-space-lg); }
  }
  .sl-drawer-dismiss { position: absolute; inset-block-start: var(--sl-space-sm); inset-inline-end: var(--sl-space-sm); }
  /* Room for the close button beside the title. */
  .sl-drawer[data-variant="floating"] .sl-dialog-title { padding-inline-end: calc(var(--sl-space-lg) + var(--sl-control-sm)); }
  /* Slides in from its edge by a negative margin on that edge, never a transform, which
     would misplace fixed layers opened inside (see .sl-dialog[open]). The margins are
     logical, so a right-to-left page needs nothing more; a percentage is of the
     viewport's width, which clears any panel. */
  .sl-drawer[open] { display: flex; flex-direction: column; animation: sl-drawer-from-end var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-drawer[open][data-side="start"] { animation-name: sl-drawer-from-start; }
  .sl-drawer[open][data-side="bottom"] { animation-name: sl-drawer-from-bottom; }
  @keyframes sl-drawer-from-end { from { margin-inline-end: -100%; } }
  @keyframes sl-drawer-from-start { from { margin-inline-start: -100%; } }
  @keyframes sl-drawer-from-bottom { from { margin-block-end: -100dvh; } }

  /* ContextMenu */
  /* The list is Menu's (.sl-menu-list). The region keeps a box of its own,
     never display: contents: opened by `open`, the list hangs from it. */
  .sl-context-menu { display: block; }
  /* The 0×0 point a right-click opens the list at. Its left and top are the
     pointer's, set by the script, so it takes no inset here. */
  .sl-context-menu-point { position: fixed; inline-size: 0; block-size: 0; pointer-events: none; }

  /* ImageViewer */
  /* The gallery: a grid of square thumbnails, each a button cropping its image. */
  .sl-image-viewer { display: block; }
  .sl-image-viewer-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--sl-image-viewer-thumb-size, 96px), 1fr));
    gap: var(--sl-space-sm);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .sl-image-viewer-item { min-width: 0; margin: 0; padding: 0; }
  .sl-image-viewer-thumb {
    display: block;
    inline-size: 100%;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface-2);
    transition: border-color var(--sl-duration-base);
  }
  .sl-image-viewer-thumb:hover { border-color: var(--sl-muted); }
  .sl-image-viewer-thumb-image { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
  /* The image in the viewer has left its slot: the empty frame stays behind under the backdrop. */
  .sl-image-viewer-thumb[data-viewing] .sl-image-viewer-thumb-image { opacity: 0; }

  /* The viewer: Dialog's panel across the viewport less a margin. The image
     grows out of its thumbnail, outside the panel, so the panel doesn't clip
     (the browser's :modal style would scroll it). Its surfaces fade in and out
     around that; never a transform on the dialog (see .sl-dialog[open]). */
  .sl-image-viewer-dialog {
    --sl-dialog-width: 100vw;
    height: calc(100dvh - 2 * var(--sl-space-xl));
    padding: var(--sl-space-sm);
    gap: var(--sl-space-sm);
    overflow: visible;
  }
  .sl-image-viewer-dialog[open] { animation-name: sl-image-viewer-in; }
  .sl-image-viewer-dialog[data-closing] { animation: sl-image-viewer-out var(--sl-duration-base) var(--sl-ease-out) forwards; }
  /* Darker than Dialog's, as a picture wants; a literal, as ::backdrop inherits no custom properties before Chrome 122. */
  .sl-image-viewer-dialog::backdrop { background: rgb(0 0 0 / .72); }
  .sl-image-viewer-dialog[open]::backdrop { animation: sl-image-viewer-show 300ms ease-out; }
  .sl-image-viewer-dialog[data-closing]::backdrop { animation: sl-image-viewer-hide 200ms ease-out forwards; }
  @keyframes sl-image-viewer-in { from { border-color: transparent; background-color: transparent; box-shadow: none; } }
  @keyframes sl-image-viewer-out { to { border-color: transparent; background-color: transparent; box-shadow: none; } }
  @keyframes sl-image-viewer-show { from { opacity: 0; } }
  @keyframes sl-image-viewer-hide { to { opacity: 0; } }

  /* The toolbar: stepping and the position at the start, zoom and close at the end. */
  .sl-image-viewer-bar {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sl-space-xs);
  }
  .sl-image-viewer-group { display: flex; align-items: center; gap: var(--sl-space-3xs); }
  .sl-image-viewer-position {
    margin: 0;
    padding-inline: var(--sl-space-xs);
    color: var(--sl-muted);
    font-size: var(--sl-font-size-sm);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  /* Previous points back along the reading direction. */
  [dir="rtl"] .sl-image-viewer-step svg { transform: scaleX(-1); }

  /* The figure takes focus for the viewer's keys; its ring is drawn on the stage they act on. */
  .sl-image-viewer-figure {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--sl-space-sm);
    min-height: 0;
    margin: 0;
  }
  .sl-image-viewer-figure:focus-visible { outline: none; }
  .sl-image-viewer-figure:focus-visible .sl-image-viewer-stage { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  /* It clips the zoomed image (clip, so it never becomes a scroller), except
     while the image flies between it and its thumbnail. */
  .sl-image-viewer-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: clip;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    background: var(--sl-bg);
    cursor: zoom-in;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
  }
  .sl-image-viewer-dialog:is([data-entering], [data-closing]) .sl-image-viewer-stage { overflow: visible; }
  /* Zoomed, a drag pans it. */
  .sl-image-viewer-stage[data-zoomed] { cursor: grab; touch-action: none; }
  .sl-image-viewer-stage[data-panning] { cursor: grabbing; }
  .sl-image-viewer-image {
    position: absolute;
    inset: 0;
    max-inline-size: 100%;
    max-block-size: 100%;
    margin: auto;
    object-fit: contain;
    -webkit-user-drag: none;
    transition: transform var(--sl-duration-base) var(--sl-ease-out);
  }
  /* A drag, a wheel or a pinch moves it as the hand does. */
  .sl-image-viewer-stage[data-gesture] .sl-image-viewer-image { transition: none; }
  .sl-image-viewer-caption {
    flex: none;
    margin: 0;
    padding-inline: var(--sl-space-sm);
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    line-height: 1.5;
    text-align: center;
  }
  .sl-image-viewer-dialog[open] :is(.sl-image-viewer-bar, .sl-image-viewer-caption) { animation: sl-image-viewer-show var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-image-viewer-dialog[open] .sl-image-viewer-stage { animation: sl-image-viewer-in var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-image-viewer-dialog[data-closing] :is(.sl-image-viewer-bar, .sl-image-viewer-caption) { animation: sl-image-viewer-hide var(--sl-duration-base) var(--sl-ease-out) forwards; }
  .sl-image-viewer-dialog[data-closing] .sl-image-viewer-stage { animation: sl-image-viewer-out var(--sl-duration-base) var(--sl-ease-out) forwards; }

  /* HoverCard */
  /* A bare span trigger: text with more behind it, marked as an abbreviation
     is. A trigger given with asChild keeps its own look. */
  .sl-hover-card-trigger {
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
    text-underline-offset: 3px;
    border-radius: 2px;
  }
  /* Popover's surface. It rises in as the popover does; layers opened inside
     portal into its host, beside it, so the rise never moves them. */
  .sl-hover-card {
    z-index: var(--sl-z-dropdown);
    /* useAnchor keeps 8px from each edge of the viewport. */
    max-width: min(320px, calc(100vw - 2 * var(--sl-space-sm)));
    padding: var(--sl-space-md);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    color: var(--sl-text);
    box-shadow: var(--sl-shadow-md);
    font-size: var(--sl-font-size-md);
    line-height: 1.5;
    overflow-wrap: break-word;
    animation: sl-in var(--sl-duration-fast) var(--sl-ease-out);
  }
  /* end HoverCard */
}
/* Navigation: Tabs, Menu, Toast, Stepper, Breadcrumb, Pagination, Tree, TableOfContents, Sidebar, DocumentTabs, KeyHints, ShortcutSheet. */

@layer slant {
  /* Tabs */
  .sl-tabs[data-orientation="vertical"] { display: flex; align-items: flex-start; gap: var(--sl-space-lg); }
  .sl-tablist { position: relative; display: flex; gap: var(--sl-space-3xs); border-block-end: 1px solid var(--sl-line); }
  .sl-tablist[data-orientation="vertical"] { flex: none; flex-direction: column; border-block-end: 0; border-inline-start: 1px solid var(--sl-line); }
  .sl-tab {
    min-height: 36px;
    padding-block: 0;
    padding-inline: var(--sl-space-md);
    border: 0;
    background: transparent;
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    font-weight: 500;
    transition: color var(--sl-duration-base);
  }
  .sl-tab[data-orientation="vertical"] { text-align: start; }
  .sl-tab:hover:not(:disabled), .sl-tab[aria-selected="true"] { color: var(--sl-text); }
  .sl-tab:disabled { opacity: var(--sl-disabled-opacity); }
  .sl-tab-indicator {
    position: absolute;
    inset-block-end: -1px;
    /* Measured with offsetLeft/offsetTop, which are physical, so these stay physical too. */
    left: 0;
    width: var(--w);
    height: 2px;
    border-radius: 1px;
    background: var(--sl-accent);
    transform: translateX(var(--x));
  }
  /* Vertical: a bar on the inline-start edge, over the list's border. */
  .sl-tablist[data-orientation="vertical"] > .sl-tab-indicator {
    inset-block-end: auto;
    top: 0;
    left: auto;
    inset-inline-start: -1px;
    width: 2px;
    height: var(--h);
    transform: translateY(var(--y));
  }
  /* Slides only once it has a first position, so it doesn't sweep in on mount. */
  .sl-tab-indicator[data-ready] {
    transition: transform var(--sl-duration-slow) var(--sl-ease-out), width var(--sl-duration-slow) var(--sl-ease-out), height var(--sl-duration-slow) var(--sl-ease-out);
  }
  .sl-tabpanel { padding-block-start: var(--sl-space-md); outline-offset: 4px; animation: sl-in var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-tabpanel[data-orientation="vertical"] { flex: 1; min-width: 0; padding-block-start: 0; }
  /* Unselected panels stay mounted; a display set on the panel's own className mustn't reveal them. */
  .sl-tabpanel[hidden] { display: none !important; }

  /* Menu */
  /* The list is portaled to the body and placed by useAnchor (position: fixed, data-side). */
  .sl-menu { display: inline-flex; width: fit-content; }
  .sl-menu-list {
    z-index: var(--sl-z-dropdown);
    min-width: 200px;
    padding: 4px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-md);
    animation: sl-in var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding-block: 0;
    padding-inline: 6px 10px;
    border-radius: calc(var(--sl-radius-small) - 2px);
    font-size: var(--sl-font-size-md);
    cursor: pointer;
    outline: none;
  }
  .sl-menu-item[data-active] { background: var(--sl-surface-2); }
  .sl-menu-item[aria-disabled="true"] { opacity: .5; cursor: default; }
  .sl-menu-check { display: grid; place-items: center; width: 16px; color: var(--sl-accent); }
  .sl-menu-box { display: grid; place-items: center; width: 14px; height: 14px; margin: 0 1px; border: 1px solid var(--sl-line-strong); border-radius: 3px; }
  .sl-menu-item[aria-checked="true"] .sl-menu-box { border-color: var(--sl-accent); background: var(--sl-accent); color: var(--sl-accent-text); }
  .sl-menu-separator { height: 1px; margin: 4px; background: var(--sl-line); }
  /* A submenu's parent item stays lit while its list is open and focus is in there. */
  .sl-menu-item[aria-expanded="true"] { background: var(--sl-surface-2); }
  /* Shortcut hints and the submenu chevron sit at the item's inline end. */
  .sl-menu-shortcut {
    margin-inline-start: auto;
    padding-inline-start: var(--sl-space-lg);
    font: var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--sl-muted);
  }
  .sl-menu-chevron { flex-shrink: 0; margin-inline-start: auto; color: var(--sl-muted); }
  [dir="rtl"] .sl-menu-chevron { transform: scaleX(-1); }
  /* A capped list (maxHeight) scrolls, and so does one holding a sticky group,
     which otherwise stops at the viewport's height less useAnchor's 8px each side. */
  .sl-menu-list:is([data-scroll], :has(> .sl-menu-group[data-sticky])) { overflow-y: auto; overscroll-behavior: contain; }
  .sl-menu-list:has(> .sl-menu-group[data-sticky]) { max-block-size: calc(100dvh - 16px); }
  /* A sticky group's heading stays at the top of the scrolling list while its
     items pass under it, until the group's end pushes it out. It sits over the
     list's 4px top padding, on the surface's own background with a hairline. */
  .sl-menu-group-label {
    position: sticky;
    inset-block-start: -4px;
    z-index: 1;
    padding-block: 6px 4px;
    padding-inline: 6px 10px;
    border-block-end: 1px solid var(--sl-line);
    background: var(--sl-surface);
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-xs)/16px var(--sl-font-mono);
  }
  /* An item the arrows reach scrolls clear of the heading pinned above it (27px tall). */
  .sl-menu-group[data-sticky] > .sl-menu-item { scroll-margin-block-start: 28px; }

  /* Toast */
  .sl-toasts { display: grid; gap: 8px; min-height: 64px; }
  .sl-toasts[data-position="fixed"] { position: fixed; z-index: var(--sl-z-toast); width: min(360px, calc(100vw - 2 * var(--sl-space-lg))); min-height: 0; }
  /* A fixed Toaster's corner, in logical terms, so `end` is the left of a right-to-left page. */
  .sl-toasts[data-placement^="top-"] { inset-block-start: var(--sl-space-lg); }
  .sl-toasts[data-placement^="bottom-"] { inset-block-end: var(--sl-space-lg); }
  .sl-toasts[data-placement$="-start"] { inset-inline-start: var(--sl-space-lg); }
  .sl-toasts[data-placement$="-end"] { inset-inline-end: var(--sl-space-lg); }
  .sl-toast {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    overflow: hidden;
    padding-block: 10px 12px;
    padding-inline: 12px 10px;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    animation: sl-toast-in var(--sl-duration-slow) var(--sl-ease-out);
  }
  .sl-toast-pixel { margin-block-start: 5px; }
  /* With an action, each part after the body takes the next column at its own
     width, so the action sits between the body and the dismiss button, and
     ends the row when there is none. */
  .sl-toast[data-action] { grid-template-columns: auto minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: auto; }
  /* The timer bar drains towards the inline start. transform-origin has no
     logical keywords, so right-to-left flips it by hand. */
  .sl-toast-timer {
    position: absolute;
    inset-inline-start: 0;
    inset-block-end: 0;
    width: 100%;
    height: 2px;
    background: var(--sl-line-strong);
    transform-origin: left;
    animation: sl-toast-timer var(--sl-toast-life, 4s) linear forwards;
  }
  [dir="rtl"] .sl-toast-timer { transform-origin: right; }
  /* Held while the pointer is over the Toaster or focus is inside it. */
  .sl-toast[data-paused] .sl-toast-timer { animation-play-state: paused; }
  @keyframes sl-toast-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
  @keyframes sl-toast-timer { to { transform: scaleX(0); } }

  /* Stepper */
  .sl-steps { display: grid; margin: 0; padding: 0; list-style: none; }
  .sl-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding-block-end: 14px; }
  .sl-step:not(:last-child)::before { content: ''; position: absolute; inset-block: 24px 2px; inset-inline-start: 10px; width: 1px; background: var(--sl-line); }
  .sl-step[data-state="complete"]:not(:last-child)::before { background: var(--sl-accent); }
  .sl-step-mark {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-accent-text);
    transition: background var(--sl-duration-base), border-color var(--sl-duration-base);
  }
  .sl-step[data-state="complete"] .sl-step-mark { border-color: var(--sl-accent); background: var(--sl-accent); }
  .sl-step[data-state="current"] .sl-step-mark { border-color: var(--sl-accent); }
  /* A failed step's mark fills in danger as a complete one fills in accent; its name stays --sl-text. */
  .sl-step[data-state="failed"] .sl-step-mark { border-color: var(--sl-danger); background: var(--sl-danger); }
  .sl-step[data-state="skipped"] .sl-step-mark { color: var(--sl-muted); }
  .sl-step-name { margin: 2px 0 0; font-size: var(--sl-font-size-lg); font-weight: 500; }
  .sl-step-detail { margin-block-start: 2px; }
  .sl-step:is([data-state="upcoming"], [data-state="skipped"]) .sl-step-name { color: var(--sl-muted); }
  .sl-step-content { margin-block-start: var(--sl-space-xs); }
  .sl-step-action { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs); margin-block-start: var(--sl-space-sm); }

  /* Breadcrumb */
  .sl-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-2xs) var(--sl-space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--sl-font-size-md);
    line-height: 1.4;
  }
  .sl-breadcrumb-item { display: inline-flex; align-items: center; gap: var(--sl-space-xs); min-width: 0; }
  /* The separator: a short slash in the muted colour that leans the reading
     direction's way. Drawn rather than written, so it's never read or focused. */
  .sl-breadcrumb-item + .sl-breadcrumb-item::before {
    content: '';
    flex: none;
    width: 1px;
    height: .9em;
    background: var(--sl-muted);
    transform: rotate(20deg);
  }
  [dir="rtl"] .sl-breadcrumb-item + .sl-breadcrumb-item::before { transform: rotate(-20deg); }
  /* Crumbs on the way truncate; the current one keeps its full text. */
  .sl-breadcrumb-link, .sl-breadcrumb-text {
    display: block;
    max-width: var(--sl-breadcrumb-max, 14em);
    overflow: hidden;
    color: var(--sl-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sl-breadcrumb-link {
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: none;
    text-align: start;
    text-decoration: none;
    transition: color var(--sl-duration-base);
  }
  .sl-breadcrumb-link:hover { color: var(--sl-text); text-decoration: underline; text-underline-offset: 2px; }
  .sl-breadcrumb-current, .sl-breadcrumb-link[aria-current="page"] {
    max-width: none;
    color: var(--sl-text);
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  /* The "…" button: its hover background reaches past the dots without
     pushing them further from the separators than any other crumb. */
  .sl-breadcrumb-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline: calc(-1 * var(--sl-space-2xs));
    padding-block: 0;
    padding-inline: var(--sl-space-2xs);
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-muted);
    line-height: 1.4;
    transition: background var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-breadcrumb-more:hover { background: var(--sl-surface-2); color: var(--sl-text); }
  /* The status after the last crumb. With one, the nav lays the list and it
     in a wrapping row, crumb-spaced; without one the nav is untouched. It
     shrinks by wrapping, never by an ellipsis, and an empty one (kept as a
     live region) draws no slash. */
  .sl-breadcrumb:has(> .sl-breadcrumb-status) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-2xs) var(--sl-space-xs);
  }
  .sl-breadcrumb:has(> .sl-breadcrumb-status) > .sl-breadcrumb-list { min-inline-size: 0; }
  .sl-breadcrumb-status {
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-xs);
    max-inline-size: 100%;
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .sl-breadcrumb-status::before {
    content: '';
    flex: none;
    width: 1px;
    height: .9em;
    background: var(--sl-muted);
    transform: rotate(20deg);
  }
  [dir="rtl"] .sl-breadcrumb-status::before { transform: rotate(-20deg); }
  .sl-breadcrumb-status:empty::before { content: none; }

  /* Pagination */
  .sl-pagination-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-2xs); margin: 0; padding: 0; list-style: none; }
  .sl-pagination-item { display: flex; }
  /* Every slot (page, arrow, gap) has the same minimum width, so the row holds
     still as the current page moves. */
  .sl-pagination-page, .sl-pagination-arrow, .sl-pagination-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--sl-control-md);
    height: var(--sl-control-md);
    padding-block: 0;
    padding-inline: var(--sl-space-xs);
    font-size: var(--sl-font-size-md);
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }
  .sl-pagination-page, .sl-pagination-arrow {
    border: 1px solid transparent;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-muted);
    font-weight: 500;
    text-decoration: none;
    transition: background var(--sl-duration-base), border-color var(--sl-duration-base), color var(--sl-duration-base);
  }
  .sl-pagination-page:hover, .sl-pagination-arrow:hover:not(:disabled, [aria-disabled="true"]) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-pagination-page[aria-current="page"] { border-color: var(--sl-accent); background: var(--sl-accent); color: var(--sl-accent-text); }
  .sl-pagination-arrow:disabled, .sl-pagination-arrow[aria-disabled="true"] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-pagination-gap { padding-inline: 0; color: var(--sl-muted); }
  .sl-pagination-status { padding-inline: var(--sl-space-sm); font-size: var(--sl-font-size-md); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .sl-pagination[data-size="sm"] :is(.sl-pagination-page, .sl-pagination-arrow, .sl-pagination-gap) {
    min-width: var(--sl-control-sm);
    height: var(--sl-control-sm);
    font-size: var(--sl-font-size-sm);
  }
  .sl-pagination[data-size="sm"] .sl-pagination-status { font-size: var(--sl-font-size-sm); }
  /* The chevrons point the reading direction's way. */
  [dir="rtl"] .sl-pagination-chevron { transform: scaleX(-1); }

  /* Tree */
  /* Each row indents by its level (--sl-tree-level, set on the row) with
     logical padding, so the tree mirrors under RTL. Hover, selection and the
     focus ring paint the row, never the item, whose box also holds its open
     children. */
  .sl-tree, .sl-tree-group { margin: 0; padding: 0; list-style: none; }
  .sl-tree { --sl-tree-indent: 16px; font-size: var(--sl-font-size-md); }
  .sl-tree[data-size="md"] { font-size: var(--sl-font-size-lg); }
  .sl-tree-row {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2xs);
    min-height: var(--sl-control-sm);
    padding-block: 0;
    padding-inline: calc(var(--sl-space-2xs) + var(--sl-tree-level, 0) * var(--sl-tree-indent)) var(--sl-space-sm);
    border-radius: calc(var(--sl-radius-small) - 2px);
    color: var(--sl-text);
    cursor: default;
    user-select: none;
  }
  .sl-tree[data-size="md"] .sl-tree-row { min-height: var(--sl-control-md); }
  .sl-tree-row:hover { background: var(--sl-surface-2); }
  .sl-tree-item[data-selected] > .sl-tree-row { background: var(--sl-accent-soft); color: var(--sl-text); }
  .sl-tree-item[data-disabled] > .sl-tree-row { background: transparent; opacity: var(--sl-disabled-opacity); }
  .sl-tree-item:focus-visible { outline: none; }
  .sl-tree-item:focus-visible > .sl-tree-row { outline: var(--sl-focus-ring); outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-tree-twisty { display: grid; flex: none; place-items: center; width: 16px; height: 16px; color: var(--sl-muted); cursor: pointer; }
  .sl-tree-twisty:empty { cursor: inherit; }
  .sl-tree-item[data-disabled] > .sl-tree-row .sl-tree-twisty { cursor: inherit; }
  /* The chevron points to the inline end, and down while open. */
  .sl-tree-chevron { transition: transform var(--sl-duration-fast) var(--sl-ease-out); }
  .sl-tree-item[data-open] > .sl-tree-row .sl-tree-chevron { transform: rotate(90deg); }
  [dir="rtl"] .sl-tree-chevron { transform: scaleX(-1); }
  [dir="rtl"] .sl-tree-item[data-open] > .sl-tree-row .sl-tree-chevron { transform: scaleX(-1) rotate(90deg); }
  .sl-tree-icon { display: inline-flex; flex: none; color: var(--sl-muted); }
  .sl-tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* A status after the label, part of the name, then the actions at the
     inline end. The actions keep their place while hidden, so showing them
     on hover or focus never moves the row's text. */
  .sl-tree-status { display: inline-flex; flex: none; align-items: center; gap: var(--sl-space-2xs); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-tree-item[data-selected] > .sl-tree-row .sl-tree-status { color: var(--sl-text); }
  .sl-tree-actions { display: inline-flex; flex: none; align-items: center; gap: var(--sl-space-3xs); visibility: hidden; }
  .sl-tree-row:hover > .sl-tree-actions,
  .sl-tree-item:focus > .sl-tree-row > .sl-tree-actions,
  .sl-tree-actions:focus-within { visibility: visible; }
  /* Children on their way: a busy line where they will appear, one level in. */
  .sl-tree-loading {
    display: flex;
    align-items: center;
    min-height: var(--sl-control-sm);
    padding-inline: calc(var(--sl-space-2xs) + var(--sl-tree-level, 0) * var(--sl-tree-indent)) var(--sl-space-sm);
    color: var(--sl-muted);
  }
  .sl-tree[data-size="md"] .sl-tree-loading { min-height: var(--sl-control-md); }
  .sl-tree-loading-mark { display: grid; flex: none; place-items: center; width: 16px; height: 16px; }
  /* The row standing in for children that failed to load: the failure, then
     the way out. The whole row retries. */
  .sl-tree-item[data-status="error"] > .sl-tree-row { cursor: pointer; }
  .sl-tree-error { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sl-danger); }
  .sl-tree-retry { flex: none; color: var(--sl-text); text-decoration: underline; text-underline-offset: 2px; }

  /* Table of contents */
  /* A column of links on a rail along the inline-start edge. The marker slides
     along the rail to the current link (and jumps under reduced motion, where
     base.css turns transitions off). It's measured with offsetTop, so the nav
     is its offset parent. */
  .sl-toc { position: relative; font-size: var(--sl-font-size-md); }
  .sl-toc-label {
    margin-block: 0 var(--sl-space-sm);
    margin-inline: 0;
    font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sl-muted);
  }
  .sl-toc-list { margin: 0; padding: 0; border-inline-start: 1px solid var(--sl-line); list-style: none; }
  .sl-toc-link {
    display: block;
    padding-block: var(--sl-space-2xs);
    padding-inline: var(--sl-space-md) 0;
    border-radius: var(--sl-radius-small);
    color: var(--sl-muted);
    line-height: 1.45;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color var(--sl-duration-base);
  }
  .sl-toc-link[data-level="2"] { padding-inline-start: calc(var(--sl-space-md) * 2); font-size: var(--sl-font-size-sm); }
  .sl-toc-link[data-level="3"] { padding-inline-start: calc(var(--sl-space-md) * 3); font-size: var(--sl-font-size-sm); }
  .sl-toc-link:hover, .sl-toc-link[aria-current="location"] { color: var(--sl-text); }
  /* Inside the link, so a scrolling column doesn't clip the ring. */
  .sl-toc-link:focus-visible { outline-offset: calc(var(--sl-focus-ring-width) * -1); }
  .sl-toc-marker {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 2px;
    height: var(--sl-toc-h, 0);
    transform: translateY(var(--sl-toc-y, 0));
    pointer-events: none;
  }
  /* A short bar: the link's height, less a little at each end. */
  .sl-toc-marker::before { content: ''; position: absolute; inset-block: var(--sl-space-2xs); inset-inline: 0; border-radius: 1px; background: var(--sl-accent); }
  .sl-toc-marker[data-ready] { transition: transform var(--sl-duration-slow) var(--sl-ease-out), height var(--sl-duration-slow) var(--sl-ease-out); }

  /* Sidebar */
  /* An app's navigation column: the Header's content, the nav's body (which
     scrolls on its own) and the Footer's. Open it is --sl-sidebar-width wide,
     as a rail of icons --sl-sidebar-rail; hidden it's gone. Below the collapse
     breakpoint the CSS hides it and shows the trigger, so the page is right
     before hydration, and the trigger opens the same content in a Drawer. */
  .sl-sidebar { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; }
  .sl-sidebar-column {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-self: stretch;
    inline-size: var(--sl-sidebar-width, 240px);
    min-height: 0;
    overflow: clip;
    border-inline-end: 1px solid var(--sl-line);
    background: var(--sl-surface);
    transition: inline-size var(--sl-duration-base) var(--sl-ease-out);
  }
  .sl-sidebar-column[hidden] { display: none; }
  .sl-sidebar-header { flex: none; padding-block: var(--sl-space-md) var(--sl-space-2xs); padding-inline: var(--sl-space-md); }
  .sl-sidebar-nav { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
  .sl-sidebar-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: var(--sl-space-sm);
    /* The margin a current item scrolled into view keeps from the body's edges. */
    scroll-padding-block: var(--sl-space-sm);
  }
  .sl-sidebar-footer { flex: none; padding-block: var(--sl-space-sm); padding-inline: var(--sl-space-md); border-block-start: 1px solid var(--sl-line); }
  .sl-sidebar-section + .sl-sidebar-section { margin-block-start: var(--sl-space-lg); }
  .sl-sidebar-section-label {
    padding-block: var(--sl-space-2xs);
    padding-inline: var(--sl-space-lg) var(--sl-space-sm);
    overflow: hidden;
    font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    letter-spacing: .12em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--sl-muted);
  }
  .sl-sidebar-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
  .sl-sidebar-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sl-space-sm);
    inline-size: 100%;
    min-height: var(--sl-control-md);
    padding-block: var(--sl-space-2xs);
    padding-inline: var(--sl-space-lg) var(--sl-space-sm);
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    line-height: 1.35;
    text-align: start;
    text-decoration: none;
    transition: color var(--sl-duration-fast), background var(--sl-duration-fast);
  }
  /* The slanted pixel at the inline start marks the current page, and shows faintly on hover. */
  .sl-sidebar-item::before {
    content: '';
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: var(--sl-space-xs);
    inline-size: 6px;
    block-size: 6px;
    margin-block-start: -3px;
    border-radius: 1.5px;
    background: currentColor;
    opacity: 0;
    transform: var(--sl-slant) scale(.4);
    transition: opacity var(--sl-duration-fast), transform var(--sl-duration-fast);
  }
  .sl-sidebar-item:hover { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-sidebar-item:hover::before { opacity: .45; transform: var(--sl-slant); }
  .sl-sidebar-item[aria-current="page"] { background: var(--sl-accent-soft); color: var(--sl-text); font-weight: 500; }
  .sl-sidebar-item[aria-current="page"]::before { background: var(--sl-accent); opacity: 1; transform: var(--sl-slant); }
  /* Inside the item, so the scrolling body doesn't clip the ring. */
  .sl-sidebar-item:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-sidebar-item:is([aria-disabled="true"], :disabled) { background: transparent; color: var(--sl-muted); cursor: default; opacity: var(--sl-disabled-opacity); }
  .sl-sidebar-item:is([aria-disabled="true"], :disabled)::before { opacity: 0; }
  .sl-sidebar-icon { position: relative; display: inline-flex; flex: none; }
  .sl-sidebar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-sidebar-count { flex: none; font: var(--sl-font-size-xs)/1 var(--sl-font-mono); font-variant-numeric: tabular-nums; color: var(--sl-muted); }
  .sl-sidebar-item[aria-current="page"] .sl-sidebar-count { color: var(--sl-text); }

  /* The drawer: the Header's content, the nav in the Drawer's scrolling Body,
     then the Footer's, with items tall enough for a finger. */
  .sl-sidebar-drawer .sl-sidebar-drawer-body { padding-inline: var(--sl-space-sm); }
  .sl-sidebar-drawer :is(.sl-sidebar-header, .sl-sidebar-footer) { padding-inline: var(--sl-space-lg); }
  .sl-sidebar-drawer .sl-sidebar-body { overflow: visible; padding: 0; }
  .sl-sidebar-drawer .sl-sidebar-item { min-height: var(--sl-control-lg); }

  /* Icons: a rail of square items. Labels, counts and section labels are
     visually hidden but still name things; a count becomes a pixel on the
     icon's corner, the marker a slanted bar at the rail's edge, and a
     hairline separates the sections. Scoped to the column, so the drawer
     always shows everything. */
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column { inline-size: var(--sl-sidebar-rail, calc(var(--sl-control-md) + 2 * var(--sl-space-sm))); }
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column :is(.sl-sidebar-header, .sl-sidebar-footer) { padding-inline: var(--sl-space-sm); }
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column .sl-sidebar-item { justify-content: center; padding-inline: 0; }
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column :is(.sl-sidebar-label, .sl-sidebar-count, .sl-sidebar-section-label) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column .sl-sidebar-item::before {
    inset-inline-start: calc(-1 * var(--sl-space-sm));
    inline-size: 3px;
    block-size: 16px;
    margin-block-start: -8px;
    border-radius: 1px;
  }
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column .sl-sidebar-item[data-count] .sl-sidebar-icon::after {
    content: '';
    position: absolute;
    inset-block-start: -3px;
    inset-inline-end: -4px;
    inline-size: 6px;
    block-size: 6px;
    border-radius: 1.5px;
    background: var(--sl-accent);
    box-shadow: 0 0 0 2px var(--sl-surface);
    transform: var(--sl-slant);
  }
  .sl-sidebar[data-mode="icons"] > .sl-sidebar-column .sl-sidebar-section + .sl-sidebar-section {
    margin-block-start: var(--sl-space-sm);
    padding-block-start: var(--sl-space-sm);
    border-block-start: 1px solid var(--sl-line);
  }

  /* Collapse: below the breakpoint the column hides and the trigger shows;
     above it, the reverse. The same widths as the media query in Sidebar.tsx. */
  .sl-sidebar > .sl-sidebar-trigger { align-self: flex-start; }
  .sl-sidebar[data-collapse="always"] > .sl-sidebar-column { display: none; }
  @media (width <= 640px) { .sl-sidebar[data-collapse="sm"] > .sl-sidebar-column { display: none; } }
  @media (width > 640px) { .sl-sidebar[data-collapse="sm"] > .sl-sidebar-trigger { display: none; } }
  @media (width <= 900px) { .sl-sidebar[data-collapse="md"] > .sl-sidebar-column { display: none; } }
  @media (width > 900px) { .sl-sidebar[data-collapse="md"] > .sl-sidebar-trigger { display: none; } }
  @media (width <= 1200px) { .sl-sidebar[data-collapse="lg"] > .sl-sidebar-column { display: none; } }
  @media (width > 1200px) { .sl-sidebar[data-collapse="lg"] > .sl-sidebar-trigger { display: none; } }
  /* end Sidebar */

  /* DocumentTabs */
  /* A bar over the work area. The tabs scroll sideways without a scrollbar
     (the open-tabs menu reaches every tab). The bar's hairline is an inset
     shadow, so the selected tab, on the page background with a hairline frame
     open at the bottom and an accent line along its top, covers it and joins
     the panel below. */
  .sl-document-tabs { display: flex; flex-direction: column; min-inline-size: 0; }
  .sl-document-tabs-bar {
    display: flex;
    align-items: stretch;
    gap: var(--sl-space-3xs);
    min-inline-size: 0;
    padding-block: var(--sl-space-2xs) 0;
    padding-inline: var(--sl-space-2xs);
    background: var(--sl-surface);
    box-shadow: inset 0 -1px 0 var(--sl-line);
  }
  .sl-document-tabs-list {
    display: flex;
    flex: 0 1 auto;
    gap: var(--sl-space-3xs);
    min-inline-size: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .sl-document-tabs-list::-webkit-scrollbar { display: none; }
  .sl-document-tabs-overflow, .sl-document-tabs-add { flex: none; align-self: center; }
  .sl-document-tab {
    position: relative;
    display: flex;
    flex: none;
    border: 1px solid transparent;
    border-block-end: 0;
    border-start-start-radius: var(--sl-radius-small);
    border-start-end-radius: var(--sl-radius-small);
    color: var(--sl-muted);
    transition: color var(--sl-duration-fast), background-color var(--sl-duration-fast);
  }
  .sl-document-tab:not([data-selected], [data-disabled]):hover { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-document-tab[data-selected] {
    border-color: var(--sl-line);
    background: var(--sl-bg);
    box-shadow: inset 0 2px 0 var(--sl-accent);
    color: var(--sl-text);
  }
  .sl-document-tab[data-disabled] { opacity: var(--sl-disabled-opacity); }
  .sl-document-tab[data-dragging] { z-index: 1; background: var(--sl-surface-2); box-shadow: var(--sl-shadow-sm); color: var(--sl-text); }
  .sl-document-tab-button {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--sl-space-xs);
    min-block-size: var(--sl-control-md);
    padding-block: 0;
    padding-inline: var(--sl-space-md);
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: var(--sl-font-size-md);
    user-select: none;
    -webkit-user-select: none;
  }
  .sl-document-tabs[data-size="sm"] .sl-document-tab-button {
    min-block-size: var(--sl-control-sm);
    padding-inline: var(--sl-space-sm);
    font-size: var(--sl-font-size-sm);
  }
  /* Room at the inline end for the close control or the unsaved dot, which sit over the button. */
  .sl-document-tab:is([data-closable], [data-dirty]) .sl-document-tab-button { padding-inline-end: calc(var(--sl-space-xs) * 2 + 18px); }
  .sl-document-tab-button:focus-visible { outline: var(--sl-focus-ring); outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-document-tab[data-selected] .sl-document-tab-button { font-weight: 500; }
  .sl-document-tab[data-dragging] .sl-document-tab-button { cursor: grabbing; }
  .sl-document-tab-icon { display: inline-flex; flex: none; color: var(--sl-muted); }
  .sl-document-tab-label { max-inline-size: var(--sl-document-tab-max, 180px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* The close control shows on the selected tab, a hovered one and the
     focused one; a dirty tab keeps its dot there until hovered. */
  .sl-document-tab-close {
    position: absolute;
    inset-block: 0;
    inset-inline-end: var(--sl-space-xs);
    display: grid;
    place-items: center;
    inline-size: 18px;
    block-size: 18px;
    margin-block: auto;
    padding: 0;
    border: 0;
    border-radius: calc(var(--sl-radius-small) - 3px);
    background: transparent;
    color: var(--sl-muted);
    visibility: hidden;
  }
  .sl-document-tab-close:hover { background: var(--sl-line); color: var(--sl-text); }
  .sl-document-tab:is([data-selected], :hover, :focus-within) .sl-document-tab-close { visibility: visible; }
  .sl-document-tab[data-dirty]:not(:hover) .sl-document-tab-close { visibility: hidden; }
  .sl-document-tab-dirty, .sl-document-tabs-entry-dirty {
    flex: none;
    inline-size: 7px;
    block-size: 7px;
    border-radius: 1.5px;
    background: currentColor;
    transform: var(--sl-slant);
    pointer-events: none;
  }
  .sl-document-tab-dirty { position: absolute; inset-block: 0; inset-inline-end: calc(var(--sl-space-xs) + 5.5px); margin-block: auto; }
  .sl-document-tab[data-closable]:hover .sl-document-tab-dirty { visibility: hidden; }
  .sl-document-tabs-panel { flex: 1; min-block-size: 0; background: var(--sl-bg); }
  .sl-document-tabs-panel:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  /* The open-tabs menu's entries: the label over its detail, the dot at the end. */
  .sl-document-tabs-entry { display: flex; flex: 1; align-items: center; gap: var(--sl-space-sm); min-inline-size: 0; }
  .sl-document-tabs-entry-icon { display: inline-flex; flex: none; color: var(--sl-muted); }
  .sl-document-tabs-entry-text { display: flex; flex: 1; flex-direction: column; min-inline-size: 0; padding-block: var(--sl-space-2xs); }
  .sl-document-tabs-entry-label, .sl-document-tabs-entry-detail { max-inline-size: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-document-tabs-entry-detail { font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-document-tabs-entry-dirty { color: var(--sl-muted); }
  /* end DocumentTabs */

  /* KeyHints */
  /* The root is its own container (a named one, so a bar inside another
     container still asks about itself): below 32rem the secondary tier steps
     aside. A container takes its width from where it sits, not from its
     content, so in a flex row give it room (flex: 1). */
  .sl-key-hints {
    --sl-key-hint-height: var(--sl-control-sm);
    container: sl-key-hints / inline-size;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-3xs) var(--sl-space-lg);
    min-inline-size: 0;
    font-size: var(--sl-font-size-sm);
    line-height: 1.4;
  }
  .sl-key-hints[data-size="md"] { --sl-key-hint-height: var(--sl-control-md); font-size: var(--sl-font-size-md); }
  .sl-key-hints-tier { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3xs) var(--sl-space-xs); min-inline-size: 0; }
  /* The secondary tier recedes: muted, at the inline end. */
  .sl-key-hints-tier[data-tier="secondary"] { margin-inline-start: auto; }
  .sl-key-hint {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: var(--sl-space-2xs);
    min-block-size: var(--sl-key-hint-height);
    padding-block: 0;
    padding-inline: var(--sl-space-2xs) var(--sl-space-xs);
    border: 1px solid transparent;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-text);
    white-space: nowrap;
    transition: background-color var(--sl-duration-fast), border-color var(--sl-duration-fast);
  }
  .sl-key-hint[data-tier="secondary"], .sl-key-hint[data-disabled] { color: var(--sl-muted); }
  .sl-key-hint:where(button):hover:not(:disabled) { border-color: var(--sl-line); background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-key-hint:where(button):active:not(:disabled) { border-color: var(--sl-line-strong); }
  .sl-key-hint:disabled { opacity: var(--sl-disabled-opacity); }
  @container sl-key-hints (max-width: 32rem) {
    .sl-key-hints-tier[data-tier="secondary"] { display: none; }
  }
  /* The caps for one shortcut, shared with ShortcutSheet: alternatives side by side, split by a muted slash. */
  .sl-key-combos { display: inline-flex; flex: none; align-items: center; gap: var(--sl-space-3xs); }
  .sl-key-combo { display: inline-flex; align-items: center; gap: 2px; font: inherit; }
  .sl-key-combo-or { color: var(--sl-muted); font-size: var(--sl-font-size-xs); }
  /* end KeyHints */

  /* ShortcutSheet */
  /* A wider Dialog, held near the top of the viewport rather than centred, so
     the search stays put while the list shrinks under it. */
  .sl-shortcut-sheet { --sl-dialog-width: 560px; margin-block: min(12vh, 6rem) auto; }
  .sl-dialog.sl-shortcut-sheet { max-height: calc(100dvh - min(12vh, 6rem) - var(--sl-space-xl)); }
  .sl-shortcut-sheet-header { display: flex; flex: none; align-items: center; gap: var(--sl-space-sm); padding-inline-end: var(--sl-space-md); }
  .sl-shortcut-sheet-title { flex: 1; min-inline-size: 0; }
  .sl-shortcut-sheet-close { flex: none; }
  .sl-shortcut-sheet-search { flex: none; padding-block: var(--sl-space-2xs) var(--sl-space-xs); padding-inline: var(--sl-space-lg); }
  .sl-shortcut-sheet-body { display: grid; align-content: start; gap: var(--sl-space-lg); }
  .sl-shortcut-group { display: grid; gap: var(--sl-space-2xs); }
  .sl-shortcut-group-title {
    display: flex;
    align-items: center;
    gap: var(--sl-space-xs);
    margin: 0;
    color: var(--sl-muted);
    font: 600 var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  /* The slanted pixel that marks each section. */
  .sl-shortcut-group-title::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; background: var(--sl-accent); transform: var(--sl-slant); }
  .sl-shortcut-list { display: grid; margin: 0; }
  .sl-shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sl-space-md);
    padding-block: var(--sl-space-xs);
    border-block-start: 1px solid var(--sl-line);
  }
  .sl-shortcut-row:first-child { border-block-start: 0; }
  .sl-shortcut-term { display: grid; min-inline-size: 0; margin: 0; }
  .sl-shortcut-label { color: var(--sl-text); }
  .sl-shortcut-description { font-size: var(--sl-font-size-sm); }
  .sl-shortcut-description, .sl-shortcut-row[data-disabled] .sl-shortcut-label { color: var(--sl-muted); }
  .sl-shortcut-keys { flex: none; margin: 0; }
  .sl-shortcut-sheet-empty { margin: 0; color: var(--sl-muted); }
  /* end ShortcutSheet */
}
/* Layout: Accordion, Separator, ScrollArea, Splitter, Carousel, PageHeader. */

@layer slant {
  /* Accordion */
  .sl-accordion { display: flex; flex-direction: column; min-inline-size: 0; }
  .sl-accordion-item + .sl-accordion-item { border-block-start: 1px solid var(--sl-line); }

  /* Separator */
  .sl-separator { flex-shrink: 0; align-self: stretch; margin: 0; background: var(--sl-line); }
  .sl-separator[data-orientation="horizontal"] { block-size: 1px; }
  .sl-separator[data-orientation="vertical"] { inline-size: 1px; min-block-size: 1em; }
  .sl-separator[data-label] { display: flex; align-items: center; gap: var(--sl-space-sm); block-size: auto; inline-size: auto; background: none; }
  .sl-separator[data-label][data-orientation="vertical"] { flex-direction: column; }
  .sl-separator[data-label]::before, .sl-separator[data-label]::after { content: ""; flex: 1; background: var(--sl-line); }
  .sl-separator[data-label][data-orientation="horizontal"]::before, .sl-separator[data-label][data-orientation="horizontal"]::after { block-size: 1px; }
  .sl-separator[data-label][data-orientation="vertical"]::before, .sl-separator[data-label][data-orientation="vertical"]::after { inline-size: 1px; }
  .sl-separator-label { flex-shrink: 0; color: var(--sl-muted); font-size: var(--sl-font-size-sm); line-height: 1.4; }

  /* ScrollArea */
  /* Each edge's fade is 0 until the component marks content hidden past it;
     the two gradients meet in one mask (source-in is the -webkit- intersect). */
  .sl-scroll-area {
    --sl-scroll-fade-top: 0px;
    --sl-scroll-fade-bottom: 0px;
    --sl-scroll-fade-start: 0px;
    --sl-scroll-fade-end: 0px;
    --sl-scroll-inline: to right;
    min-inline-size: 0;
    min-block-size: 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sl-line-strong) transparent;
  }
  [dir="rtl"] .sl-scroll-area { --sl-scroll-inline: to left; }
  .sl-scroll-area[data-orientation="vertical"] { overflow-x: hidden; }
  .sl-scroll-area[data-orientation="horizontal"] { overflow-y: hidden; }
  .sl-scroll-area[data-overflow-top] { --sl-scroll-fade-top: var(--sl-scroll-fade); }
  .sl-scroll-area[data-overflow-bottom] { --sl-scroll-fade-bottom: var(--sl-scroll-fade); }
  .sl-scroll-area[data-overflow-start] { --sl-scroll-fade-start: var(--sl-scroll-fade); }
  .sl-scroll-area[data-overflow-end] { --sl-scroll-fade-end: var(--sl-scroll-fade); }
  .sl-scroll-area[data-fade] {
    --sl-scroll-mask:
      linear-gradient(to bottom, transparent, #000 var(--sl-scroll-fade-top), #000 calc(100% - var(--sl-scroll-fade-bottom)), transparent),
      linear-gradient(var(--sl-scroll-inline), transparent, #000 var(--sl-scroll-fade-start), #000 calc(100% - var(--sl-scroll-fade-end)), transparent);
    -webkit-mask-image: var(--sl-scroll-mask);
    mask-image: var(--sl-scroll-mask);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  /* A mask clips the focus ring drawn outside the box: drop it while focused from the keyboard. */
  .sl-scroll-area[data-fade]:focus-visible { -webkit-mask-image: none; mask-image: none; }

  /* Splitter */
  /* The first pane takes --sl-split of the root, the second the rest. Each
     pane can shrink to nothing and scrolls its own overflow. */
  .sl-splitter { display: flex; min-inline-size: 0; min-block-size: 0; }
  .sl-splitter[data-orientation="vertical"] { flex-direction: column; }
  .sl-splitter-pane { flex: 1 1 0; min-inline-size: 0; min-block-size: 0; overflow: auto; }
  .sl-splitter-pane:first-child { flex: 0 0 var(--sl-split, 50%); }
  /* While dragging, the cursor holds across the panes and nothing selects. */
  .sl-splitter[data-dragging] { cursor: col-resize; -webkit-user-select: none; user-select: none; }
  .sl-splitter[data-dragging][data-orientation="vertical"] { cursor: row-resize; }
  /* The handle is a wide, invisible hit area over a hairline: its negative
     margins leave it 1px of layout, so the panes split the rest. */
  .sl-splitter-handle {
    position: relative;
    z-index: 1;
    display: grid;
    flex: none;
    place-items: center;
    inline-size: var(--sl-space-sm);
    margin-inline: calc(var(--sl-space-sm) / -2 + 0.5px);
    cursor: col-resize;
    touch-action: none;
  }
  .sl-splitter-handle[data-orientation="vertical"] {
    inline-size: auto;
    block-size: var(--sl-space-sm);
    margin-inline: 0;
    margin-block: calc(var(--sl-space-sm) / -2 + 0.5px);
    cursor: row-resize;
  }
  .sl-splitter-handle::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(50% - 0.5px);
    inline-size: 1px;
    background: var(--sl-line);
    transition: background-color var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-splitter-handle[data-orientation="vertical"]::before { inset-block: calc(50% - 0.5px) auto; inset-inline: 0; inline-size: auto; block-size: 1px; }
  .sl-splitter-grip {
    position: relative;
    inline-size: 4px;
    block-size: var(--sl-space-xl);
    border-radius: var(--sl-radius-full);
    background: var(--sl-line-strong);
    transition: background-color var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-splitter-handle[data-orientation="vertical"] .sl-splitter-grip { inline-size: var(--sl-space-xl); block-size: 4px; }
  .sl-splitter-handle:hover::before, .sl-splitter-handle:focus-visible::before, .sl-splitter-handle[data-dragging]::before,
  .sl-splitter-handle:hover .sl-splitter-grip, .sl-splitter-handle:focus-visible .sl-splitter-grip, .sl-splitter-handle[data-dragging] .sl-splitter-grip { background: var(--sl-accent); }
  /* The ring goes round the grip, not the whole hit area's length. */
  .sl-splitter-handle:focus-visible { outline: none; }
  .sl-splitter-handle:focus-visible .sl-splitter-grip { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }

  /* Carousel */
  .sl-carousel { --sl-carousel-gap: var(--sl-space-md); display: flex; flex-direction: column; gap: var(--sl-space-sm); min-inline-size: 0; }
  /* A scroll-snap track: touch and trackpads still scroll it, but no
     scrollbar shows, and an overscroll never turns into a history swipe.
     The component scrolls it with an explicit behavior, so none is set here. */
  .sl-carousel-track {
    position: relative;
    display: flex;
    gap: var(--sl-carousel-gap);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--sl-radius);
  }
  .sl-carousel-track::-webkit-scrollbar { display: none; }
  /* --sl-carousel-per-view slides fill the track, with the gaps between them. */
  .sl-carousel-slide {
    flex: 0 0 calc((100% - (var(--sl-carousel-per-view, 1) - 1) * var(--sl-carousel-gap)) / var(--sl-carousel-per-view, 1));
    min-inline-size: 0;
    scroll-snap-align: start;
  }
  .sl-carousel-controls { display: flex; align-items: center; gap: var(--sl-space-xs); }
  .sl-carousel-indicators { display: flex; flex: 1; flex-wrap: wrap; align-items: center; min-inline-size: 0; }
  /* A 24px target around a small slanted pixel; the current one stretches and takes the accent. */
  .sl-carousel-indicator {
    display: grid;
    place-items: center;
    inline-size: 24px;
    block-size: 24px;
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
  }
  .sl-carousel-indicator::before {
    content: "";
    inline-size: 6px;
    block-size: 6px;
    border-radius: 1.5px;
    background: var(--sl-line-strong);
    transform: var(--sl-slant);
    transition: inline-size var(--sl-duration-base) var(--sl-ease-out), background-color var(--sl-duration-fast);
  }
  .sl-carousel-indicator:hover::before { background: var(--sl-muted); }
  .sl-carousel-indicator[aria-current="true"]::before { inline-size: 16px; background: var(--sl-accent); }
  /* The chevrons point the reading direction's way: under RTL, previous points right. */
  [dir="rtl"] .sl-carousel-chevron { transform: scaleX(-1); }

  /* Carousel autoplay: the play/pause button comes first in the DOM (the first
     control in the tab order) and is drawn at the start of the controls row. */
  .sl-carousel[data-autoplay] { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sl-space-xs); }
  .sl-carousel[data-autoplay] > .sl-carousel-track { grid-column: 1 / -1; grid-row: 1; }
  .sl-carousel[data-autoplay] > .sl-carousel-rotation { grid-column: 1; grid-row: 2; align-self: center; }
  .sl-carousel[data-autoplay] > .sl-carousel-controls { grid-column: 2; grid-row: 2; min-inline-size: 0; }
  /* end Carousel autoplay */

  /* PageHeader */
  /* The root is the query container. The title's size follows the level
     through --sl-page-header-title-size, which an app can set too. */
  .sl-page-header {
    --sl-page-header-title-size: var(--sl-font-size-2xl);
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: var(--sl-space-md);
    min-inline-size: 0;
  }
  .sl-page-header[data-level="2"] { --sl-page-header-title-size: var(--sl-font-size-xl); }
  .sl-page-header:is([data-level="3"], [data-level="4"], [data-level="5"], [data-level="6"]) { --sl-page-header-title-size: var(--sl-font-size-lg); }
  .sl-page-header-breadcrumb, .sl-page-header-extra { min-inline-size: 0; }
  /* The text in the first column, the actions in the second across both
     rows, so a description that isn't text (a div after the hgroup) stays
     under the title. */
  .sl-page-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: var(--sl-space-lg);
  }
  .sl-page-header-text {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1;
    gap: var(--sl-space-2xs);
    min-inline-size: 0;
    margin: 0;
  }
  .sl-page-header-eyebrow {
    margin: 0;
    font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sl-muted);
  }
  .sl-page-header-title {
    margin: 0;
    font-size: var(--sl-page-header-title-size);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--sl-text);
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  .sl-page-header-description {
    max-inline-size: 70ch;
    margin: 0;
    font-size: var(--sl-font-size-lg);
    line-height: 1.5;
    color: var(--sl-muted);
  }
  .sl-page-header-row > .sl-page-header-description { grid-column: 1; grid-row: 2; margin-block-start: var(--sl-space-2xs); }
  .sl-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-items: center;
    align-self: center;
    justify-content: flex-end;
    gap: var(--sl-space-xs);
  }
  /* Narrow: one column, the actions under the text from the inline start. */
  @container (max-width: 36rem) {
    .sl-page-header-row { grid-template-columns: minmax(0, 1fr); }
    .sl-page-header-actions {
      grid-column: 1;
      grid-row: 3;
      align-self: start;
      justify-content: flex-start;
      margin-block-start: var(--sl-space-md);
    }
  }
  /* end PageHeader */
}
/* Data: StatCard, Sparkline, BarChart, Timeline, FileList, Meter, PlanPicker, Table, Calendar, DayGrid, RangeMeter, Stat. */

@layer slant {
  /* StatCard */
  .sl-stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-block-start: 1px solid var(--sl-line); list-style: none; }
  .sl-stat-value { margin: 2px 0 6px; font: 600 var(--sl-font-size-2xl)/1.1 var(--sl-font-mono); letter-spacing: -.02em; }

  /* Sparkline */
  .sl-spark { display: block; overflow: visible; }
  .sl-spark-line { fill: none; stroke: var(--sl-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: sl-draw var(--sl-duration-slower) var(--sl-ease-out); }
  @keyframes sl-draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }

  /* BarChart: the bars. The frame, tooltip, axes and legend are the chart core (charts.css). */
  .sl-chart-bar {
    fill: var(--sl-chart-mark, var(--sl-line-strong));
    transform-box: fill-box;
    transform-origin: bottom;
    animation: sl-grow var(--sl-duration-slower) var(--sl-ease-out) both;
    transition: fill var(--sl-duration-fast), opacity var(--sl-duration-fast);
  }
  /* One series lights the shown bar in the accent; several fade the other categories. */
  .sl-chart[data-kind="bar"]:not([data-variant]) .sl-chart-group[data-shown] .sl-chart-bar { fill: var(--sl-accent); }
  .sl-chart[data-kind="bar"][data-variant][data-showing] .sl-chart-group:not([data-shown]) .sl-chart-bar { opacity: .45; }
  .sl-chart-bar[data-cursor] { stroke: var(--sl-text); stroke-width: 1px; }
  @keyframes sl-grow { from { transform: scaleY(0); } }

  /* Timeline */
  .sl-timeline { margin: 0; padding: 0; list-style: none; }
  .sl-timeline-item { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; padding: 0 0 14px; }
  .sl-timeline-item:not(:last-child)::before { content: ''; position: absolute; inset-block: 14px 0; inset-inline-start: 6px; width: 1px; background: var(--sl-line-strong); }
  .sl-timeline-node { width: 10px; height: 10px; margin-block-start: 4px; margin-inline-start: 1px; --sl-pop-transform: var(--sl-slant); border: 1.5px solid var(--sl-line-strong); border-radius: 2px; transform: var(--sl-slant); transition: background var(--sl-duration-slow), border-color var(--sl-duration-slow); }
  .sl-timeline-item[data-done] .sl-timeline-node { border-color: var(--sl-accent); background: var(--sl-accent); }
  .sl-timeline-item[data-fresh] .sl-timeline-node { animation: sl-pop var(--sl-duration-slower) var(--sl-ease-out); }
  .sl-timeline-title { display: block; font-size: var(--sl-font-size-md); font-weight: 500; }
  .sl-timeline-meta { display: block; font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-timeline-item:not([data-done]) .sl-timeline-title { color: var(--sl-muted); }
  .sl-timeline-time { font: var(--sl-font-size-xs)/1.8 var(--sl-font-mono); color: var(--sl-muted); white-space: nowrap; }
  /* Horizontal: equal columns that never scroll, the node on top, the connector
     along the inline axis from one node to the next, the text under it. All
     logical, so under RTL the steps run from the right. */
  .sl-timeline[data-orientation="horizontal"] { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
  .sl-timeline[data-orientation="horizontal"] .sl-timeline-item { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding: 0; padding-inline-end: var(--sl-space-md); }
  .sl-timeline[data-orientation="horizontal"] .sl-timeline-item:not(:last-child)::before { inset-block: 5px auto; inset-inline: 15px 3px; width: auto; height: 1px; }
  .sl-timeline[data-orientation="horizontal"] .sl-timeline-node { margin-block-start: 0; }
  .sl-timeline[data-orientation="horizontal"] .sl-timeline-body { overflow-wrap: anywhere; }
  .sl-timeline[data-orientation="horizontal"] .sl-timeline-time { white-space: normal; }

  /* FileList */
  .sl-files { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .sl-file { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid transparent; border-radius: var(--sl-radius-small); transition: border-color var(--sl-duration-base); }
  .sl-file[data-status="failed"] { border-color: color-mix(in srgb, var(--sl-danger) 45%, var(--sl-line)); }
  .sl-file-type { display: grid; place-items: center; height: 38px; border: 1px solid var(--sl-line-strong); border-radius: var(--sl-radius-small); background: var(--sl-bg); font: 600 10px/1 var(--sl-font-mono); letter-spacing: .04em; color: var(--sl-muted); }
  .sl-file-body { display: grid; gap: 4px; min-width: 0; }
  .sl-file-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
  /* The name takes the free space, so Retry and remove sit together at the end. */
  .sl-file-name { overflow: hidden; margin-inline-end: auto; font-size: var(--sl-font-size-md); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  /* The remove ×: a small ghost button, muted until hovered, its height
     tucked into the row's so adding it doesn't push the status line down. */
  .sl-file-remove { flex-shrink: 0; margin-block: calc(-1 * var(--sl-space-xs)); margin-inline-end: calc(-1 * var(--sl-space-2xs)); color: var(--sl-muted); }
  .sl-file-remove:hover { color: var(--sl-text); }
  .sl-file-meta { font: var(--sl-font-size-xs)/1.4 var(--sl-font-mono); color: var(--sl-muted); }
  .sl-file[data-status="failed"] .sl-file-meta { color: var(--sl-danger); }

  /* Meter */
  .sl-meter[data-variant="bar"] { height: 4px; overflow: hidden; border-radius: 99px; background: var(--sl-surface-2); }
  .sl-meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--sl-tone, var(--sl-accent)); transition: width var(--sl-duration-base) linear; }
  .sl-meter[data-variant="pixels"] { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; }
  .sl-meter-cell { aspect-ratio: 1 / 1.6; border-radius: 2px; background: var(--sl-surface-2); transform: var(--sl-slant); transition: background var(--sl-duration-slow); }
  .sl-meter-cell[data-lit] { background: var(--sl-tone, var(--sl-accent)); }

  /* PlanPicker: RadioGroup's cards draw the plans; only the price is its own. */
  .sl-plan-price { font: 600 15px/1 var(--sl-font-mono); white-space: nowrap; }
  .sl-plan-period { font-size: var(--sl-font-size-xs); font-weight: 400; color: var(--sl-muted); }

  /* Table */
  .sl-table { overflow-x: auto; }
  .sl-table-inner { width: 100%; border-collapse: collapse; font-size: var(--sl-font-size-md); }
  .sl-table-header { padding: 0 0 8px; border-block-end: 1px solid var(--sl-line); text-align: start; }
  .sl-table-header[data-numeric], .sl-table-cell[data-numeric] { text-align: end; }
  .sl-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  /* aria-sort is only on sortable headers, whose label is a button. */
  .sl-table-header[aria-sort] .sl-table-sort:hover, .sl-table-header[aria-sort="ascending"] .sl-table-sort, .sl-table-header[aria-sort="descending"] .sl-table-sort { color: var(--sl-text); }
  .sl-table-sort-icon { opacity: .5; }
  .sl-table-header[aria-sort="ascending"] .sl-table-sort-icon, .sl-table-header[aria-sort="descending"] .sl-table-sort-icon { opacity: 1; color: var(--sl-accent); }
  .sl-table-cell { padding: 8px 0; border-block-end: 1px solid var(--sl-line); }
  .sl-table-row:last-child .sl-table-cell { border-block-end: 0; }
  /* Selection: a narrow checkbox column, and the accent-soft background on a
     selected row. Selectable tables pad their outer edges so that background
     doesn't run into the text. */
  .sl-table-select { inline-size: 0; padding-inline: var(--sl-space-sm); white-space: nowrap; vertical-align: middle; }
  .sl-table[data-selectable] .sl-table-header:last-child, .sl-table[data-selectable] .sl-table-cell:last-child { padding-inline-end: var(--sl-space-sm); }
  .sl-table-check { display: block; inline-size: 14px; block-size: 14px; accent-color: var(--sl-accent); cursor: pointer; }
  .sl-table-check:disabled { cursor: default; opacity: var(--sl-disabled-opacity); }
  .sl-table-row[data-selected] { background: var(--sl-accent-soft); color: var(--sl-text); }
  /* Expandable rows: a narrow toggle column whose chevron turns down while the
     row is open, and the detail row under it, one cell wide, sharing the row's
     bottom line. */
  .sl-table-expand-cell { inline-size: 0; padding-inline: 0 var(--sl-space-xs); white-space: nowrap; vertical-align: middle; }
  .sl-table[data-selectable] .sl-table-expand-cell { padding-inline-start: 0; }
  .sl-table-expand {
    display: grid;
    place-items: center;
    inline-size: 20px;
    block-size: 20px;
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-muted);
    transition: color var(--sl-duration-fast), background var(--sl-duration-fast);
  }
  .sl-table-expand:hover, .sl-table-expand[aria-expanded="true"] { color: var(--sl-text); }
  .sl-table-expand:hover { background: var(--sl-surface-2); }
  .sl-table-expand-icon { transition: transform var(--sl-duration-fast) var(--sl-ease-out); }
  .sl-table-expand[aria-expanded="true"] .sl-table-expand-icon { transform: rotate(90deg); }
  [dir="rtl"] .sl-table-expand-icon { transform: scaleX(-1); }
  [dir="rtl"] .sl-table-expand[aria-expanded="true"] .sl-table-expand-icon { transform: scaleX(-1) rotate(90deg); }
  .sl-table-row[data-expanded] > .sl-table-cell { border-block-end: 0; }
  .sl-table-detail-cell { padding: 0 0 var(--sl-space-md); border-block-end: 1px solid var(--sl-line); }
  .sl-table-detail:last-child > .sl-table-detail-cell { border-block-end: 0; }
  /* The details start under the first column: past the toggle (20px and its
     gap) and, in a selectable table, the checkbox (14px and its padding). */
  .sl-table-detail-cell { padding-inline: calc(20px + var(--sl-space-xs)) var(--sl-space-sm); }
  .sl-table[data-selectable] .sl-table-detail-cell { padding-inline-start: calc(14px + 2 * var(--sl-space-sm) + 20px + var(--sl-space-xs)); }
  /* Group bands: each band's heading row, its name with a slanted pixel and its
     count after it, over a hairline. */
  .sl-table-group-header { padding: var(--sl-space-lg) 0 var(--sl-space-xs); border-block-end: 1px solid var(--sl-line); font-size: var(--sl-font-size-md); font-weight: 600; text-align: start; }
  .sl-table[data-selectable] .sl-table-group-header { padding-inline: var(--sl-space-sm); }
  .sl-table-group-name::before { content: ''; display: inline-block; inline-size: 6px; block-size: 6px; margin-inline-end: var(--sl-space-xs); border-radius: 1px; background: var(--sl-line-strong); vertical-align: .1em; transform: var(--sl-slant); }
  .sl-table-group-count { margin-inline-start: var(--sl-space-2xs); font: 400 var(--sl-font-size-xs)/1 var(--sl-font-mono); color: var(--sl-muted); }
  /* Stacked records (layout="stack"). The wrapper is the container, and below
     36rem every row becomes a record: the checkbox and the toggle on its top
     line, then each cell as its column's label beside its value. The header
     row turns into a wrapping strip of the sort buttons; the other headers
     stay for screen readers only. Child combinators keep a table nested in a
     detail row out of it. */
  .sl-table[data-layout="stack"] { container: sl-table / inline-size; }
  .sl-table-cell-label { display: none; }
  @container sl-table (max-width: 36rem) {
    .sl-table[data-layout="stack"] > .sl-table-inner,
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-head,
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body,
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > :is(.sl-table-detail, .sl-table-group-row),
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > * > :is(.sl-table-detail-cell, .sl-table-group-header) { display: block; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-head > .sl-table-head-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: var(--sl-space-xs) var(--sl-space-md);
      padding-block-end: var(--sl-space-sm);
      border-block-end: 1px solid var(--sl-line);
    }
    .sl-table[data-layout="stack"][data-selectable] > .sl-table-inner > .sl-table-head > .sl-table-head-row { padding-inline: var(--sl-space-sm); }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-head > * > .sl-table-header { display: block; inline-size: auto; padding: 0; border: 0; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-head > * > .sl-table-expand-cell { display: none; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-head > * > .sl-table-header:not([aria-sort], .sl-table-select) {
      position: absolute;
      inline-size: 1px;
      block-size: 1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      column-gap: var(--sl-space-xs);
      padding-block: var(--sl-space-sm);
      border-block-end: 1px solid var(--sl-line);
    }
    .sl-table[data-layout="stack"][data-selectable] > .sl-table-inner > .sl-table-body > .sl-table-row,
    .sl-table[data-layout="stack"][data-selectable] > .sl-table-inner > .sl-table-body > * > .sl-table-group-header { padding-inline: var(--sl-space-sm); }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row:is(:last-child, [data-expanded]) { border-block-end: 0; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row > .sl-table-cell {
      display: grid;
      flex: 1 0 100%;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      align-items: baseline;
      column-gap: var(--sl-space-md);
      padding: var(--sl-space-3xs) 0;
      border: 0;
      text-align: start;
    }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row > .sl-table-cell:is(.sl-table-select, .sl-table-expand-cell) {
      display: block;
      flex: none;
      inline-size: auto;
      padding: 0 0 var(--sl-space-2xs);
    }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row > .sl-table-expand-cell:empty { display: none; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row > .sl-table-cell > .sl-table-cell-label {
      display: block;
      font: 500 var(--sl-font-size-xs)/1.8 var(--sl-font-mono);
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--sl-muted);
      overflow-wrap: anywhere;
    }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row[data-selected] > .sl-table-cell > .sl-table-cell-label { color: var(--sl-text); }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-row > .sl-table-cell > .sl-table-cell-value { min-inline-size: 0; overflow-wrap: anywhere; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-detail { border-block-end: 1px solid var(--sl-line); }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-detail:last-child { border-block-end: 0; }
    .sl-table[data-layout="stack"] > .sl-table-inner > .sl-table-body > .sl-table-detail > .sl-table-detail-cell { padding-inline: 0; border: 0; }
    .sl-table[data-layout="stack"][data-selectable] > .sl-table-inner > .sl-table-body > .sl-table-detail > .sl-table-detail-cell { padding-inline: var(--sl-space-sm); }
  }

  /* Calendar */
  .sl-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: var(--sl-space-sm); }
  /* Previous sits at the inline start, so under RTL its chevron points right. */
  [dir="rtl"] .sl-calendar .sl-calendar-chevron { transform: scaleX(-1); }
  .sl-calendar-grid { display: grid; gap: var(--sl-space-3xs); }
  .sl-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sl-space-3xs); }
  .sl-calendar-weekday { padding: var(--sl-space-2xs) 0; font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); text-align: center; color: var(--sl-muted); }
  .sl-calendar-day {
    width: 100%;
    aspect-ratio: 1;
    max-height: 36px;
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-text);
    font: var(--sl-font-size-md)/1 var(--sl-font-mono);
    transition: background var(--sl-duration-fast);
  }
  .sl-calendar-day:hover { background: var(--sl-surface-2); }
  .sl-calendar-day[data-outside] { color: var(--sl-muted); }
  .sl-calendar-day[data-today] { box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  .sl-calendar-day[data-between] { border-radius: 0; background: var(--sl-accent-soft); }
  .sl-calendar-day[data-edge] { background: var(--sl-accent); color: var(--sl-accent-text); }
  /* Outside min and max, or isDateDisabled: dimmed, still focusable, never picked. */
  .sl-calendar-day[aria-disabled="true"] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-calendar-day[aria-disabled="true"]:not([data-edge], [data-between]):hover { background: transparent; }

  /* StatCard target */
  .sl-stat-target { display: grid; gap: var(--sl-space-xs); margin-block-start: var(--sl-space-sm); }
  .sl-stat-target-bar { block-size: 4px; overflow: hidden; border-radius: var(--sl-radius-full); background: var(--sl-line); }
  .sl-stat-target-fill { display: block; block-size: 100%; border-radius: inherit; background: var(--sl-accent); transition: inline-size var(--sl-duration-slow) var(--sl-ease-out), background var(--sl-duration-slow); }
  .sl-stat-target[data-met] .sl-stat-target-fill { background: var(--sl-success); }
  .sl-stat-target-caption { margin: 0; font: var(--sl-font-size-xs)/1.4 var(--sl-font-mono); color: var(--sl-muted); font-variant-numeric: tabular-nums; }

  /* DayGrid */
  .sl-day-grid { position: relative; min-width: 0; }
  /* One track for the weekday names, then one per week. The rows and the month
     line are subgrids, so every row shares the same columns. A long range
     scrolls; the padding gives the focus ring room inside the scroller, and the
     margin hands it back so the grid lines up with the text around it. */
  .sl-day-grid-grid {
    display: grid;
    grid-template-columns: max-content repeat(var(--sl-day-grid-weeks, 1), minmax(10px, 16px));
    gap: 3px;
    margin: calc(-1 * var(--sl-space-xs));
    padding: var(--sl-space-xs);
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .sl-day-grid-months, .sl-day-grid-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
  /* Before subgrid (Chrome 117), each row repeats the tracks itself, with a
     fixed track for the weekday names so the rows still line up. */
  @supports not (grid-template-columns: subgrid) {
    .sl-day-grid-grid, .sl-day-grid-months, .sl-day-grid-row { grid-template-columns: 3em repeat(var(--sl-day-grid-weeks, 1), minmax(10px, 16px)); }
    .sl-day-grid-months, .sl-day-grid-row { column-gap: 3px; }
  }
  .sl-day-grid-months { min-block-size: 14px; }
  .sl-day-grid-month, .sl-day-grid-weekday { font: 10px/1 var(--sl-font-mono); letter-spacing: .02em; color: var(--sl-muted); white-space: nowrap; }
  .sl-day-grid-month { align-self: end; min-width: 0; }
  .sl-day-grid-weekday { grid-column: 1; padding-inline-end: var(--sl-space-xs); text-align: end; }
  .sl-day-grid-cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 26%; }
  .sl-day-grid-cell[data-date] { cursor: pointer; }
  /* The dot is a slanted pixel whose side follows the square root of the value
     (so its area follows the value); a quiet day keeps a small, faint one. */
  .sl-day-grid-dot {
    inline-size: calc(36% + 44% * var(--sl-day-grid-level, 0));
    aspect-ratio: 1;
    border-radius: 26%;
    background: var(--sl-tone, var(--sl-accent));
    transform: var(--sl-slant);
    transition: inline-size var(--sl-duration-slow) var(--sl-ease-out), background var(--sl-duration-base), transform var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-day-grid-cell[data-quiet] .sl-day-grid-dot { inline-size: 26%; background: var(--sl-line-strong); }
  .sl-day-grid-cell[data-date]:hover .sl-day-grid-dot { transform: var(--sl-slant) scale(1.18); }
  .sl-day-grid-cell[data-quiet]:hover .sl-day-grid-dot { background: var(--sl-muted); }
  /* The selected day and the focus ring are slanted outlines, like the dots. */
  .sl-day-grid-cell[aria-selected="true"]::before,
  .sl-day-grid-cell:focus-visible::after { content: ''; position: absolute; border-radius: 30%; transform: var(--sl-slant); pointer-events: none; }
  .sl-day-grid-cell[aria-selected="true"]::before { inset: -1.5px; border: 1.5px solid var(--sl-text); }
  .sl-day-grid-cell:focus-visible { z-index: 1; outline: none; }
  .sl-day-grid-cell:focus-visible::after { inset: -4.5px; border: var(--sl-focus-ring-width) solid var(--sl-accent); }
  .sl-day-grid-summary { margin: var(--sl-space-md) 0 0; font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); }
  /* Over the hovered or focused day; left and top are measured, so physical. */
  .sl-day-grid-tip {
    position: absolute;
    z-index: 2;
    display: flex;
    gap: 6px;
    padding: 3px 7px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    box-shadow: var(--sl-shadow-sm);
    font: 500 var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    color: var(--sl-text);
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 6px));
  }
  .sl-day-grid-tip[data-align="left"] { transform: translate(0, calc(-100% - 6px)); }
  .sl-day-grid-tip[data-align="right"] { transform: translate(-100%, calc(-100% - 6px)); }
  .sl-day-grid-tip-date { color: var(--sl-muted); }

  /* RangeMeter */
  .sl-range-meter { display: grid; gap: var(--sl-space-xs); min-inline-size: 0; }
  /* The readout rides between two spacers that share the free space in the
     ratio of the value (--sl-range-meter-at, 0–1), so it follows the peak, never
     leaves the meter, and mirrors with the flex row under RTL. */
  .sl-range-meter-head { display: flex; }
  .sl-range-meter-head::before, .sl-range-meter-head::after { content: ''; transition: flex-grow var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-range-meter-head::before { flex-grow: var(--sl-range-meter-at, 0); }
  .sl-range-meter-head::after { flex-grow: calc(1 - var(--sl-range-meter-at, 0)); }
  .sl-range-meter-value {
    flex: none;
    padding: 1px 7px;
    border-radius: var(--sl-radius-small);
    background: var(--sl-tone-soft);
    /* A fifth of the way to the text colour, so it holds 4.5:1 on Paper too. */
    color: color-mix(in srgb, var(--sl-tone) 80%, var(--sl-text));
    font: 600 var(--sl-font-size-sm)/1.5 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    /* "34 min" keeps its own order inside an RTL layout. */
    unicode-bidi: plaintext;
  }
  .sl-range-meter-ruler { display: flex; align-items: flex-end; justify-content: space-between; block-size: 32px; padding-inline: 3px; }
  /* A hairline leaning 9° from its foot, as the slanted pixel does. */
  .sl-range-meter-tick {
    flex: none;
    inline-size: 2px;
    border-radius: 1px;
    background: var(--sl-line-strong);
    transform: var(--sl-slant);
    transform-origin: 50% 100%;
    transition: height var(--sl-duration-slow) var(--sl-ease-out), background-color var(--sl-duration-slow);
  }
  .sl-range-meter-tick[data-lit] { background: var(--sl-tone); }

  /* Stat */
  .sl-figure { display: grid; align-content: start; gap: var(--sl-space-xs); min-inline-size: 0; margin: 0; list-style: none; }
  .sl-figure-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sl-space-2xs) 3px; }
  /* No leading, so the figure's baseline lines up with the badge's. */
  .sl-figure-value { font: 600 calc(var(--sl-font-size-2xl) * 1.5)/1 var(--sl-font-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--sl-text); }
  .sl-figure-unit { font: 500 var(--sl-font-size-lg)/1 var(--sl-font-mono); color: var(--sl-muted); }
  .sl-figure-badge { display: inline-flex; margin-inline-start: var(--sl-space-xs); }
  .sl-figure[data-size="md"] .sl-figure-value { font-size: var(--sl-font-size-2xl); letter-spacing: -.02em; }
  .sl-figure[data-size="md"] .sl-figure-unit { font-size: var(--sl-font-size-sm); }
  .sl-figure[data-size="md"] .sl-figure-badge { margin-inline-start: var(--sl-space-2xs); }

  /* RelativeTime */
  /* Inline text in the font and colour around it. Tabular figures keep a
     ticking "12 seconds ago" the same width from second to second, and the
     phrase never breaks across lines. Its base direction comes from its own
     words (plaintext), so a time in another script sits in a sentence without
     reordering it. The radius rounds the focus ring. Stale: the warning
     colour, a fifth of the way to the text colour so it holds 4.5:1 on
     Paper's surfaces as well as the dark themes'. */
  .sl-relative-time {
    border-radius: var(--sl-radius-small);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    unicode-bidi: plaintext;
  }
  .sl-relative-time[tabindex] { cursor: default; }
  .sl-relative-time[data-stale] { color: color-mix(in srgb, var(--sl-warning) 80%, var(--sl-text)); }
  /* end RelativeTime */

  /* BarChart horizontal, whiskers and negatives */
  /* Every bar grows from zero: a negative one downward; lying down, rightward,
     or leftward below zero. */
  .sl-chart-bar[data-negative] { transform-origin: top; }
  .sl-chart[data-orientation="horizontal"] .sl-chart-bar { transform-origin: left; animation-name: sl-bar-grow-x; }
  .sl-chart[data-orientation="horizontal"] .sl-chart-bar[data-negative] { transform-origin: right; }
  @keyframes sl-bar-grow-x { from { transform: scaleX(0); } }
  /* Under bars that go both ways, the zero line is stronger than the grid. */
  .sl-chart-zero { stroke: var(--sl-muted); stroke-width: 1px; shape-rendering: crispEdges; }
  /* A whisker reads on every bar colour: the text colour, softened. It and the
     value labels fade in as the bars arrive (sl-chart-fade is AreaChart's, in charts.css). */
  .sl-chart-whisker {
    fill: none;
    stroke: var(--sl-text);
    stroke-opacity: .7;
    stroke-width: 1px;
    animation: sl-chart-fade var(--sl-duration-slow) var(--sl-ease-out) var(--sl-duration-slow) both;
  }
  .sl-chart-value-label {
    fill: var(--sl-text);
    font: 500 10px/1 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    animation: sl-chart-fade var(--sl-duration-slow) var(--sl-ease-out) var(--sl-duration-slow) both;
  }
  /* A horizontal chart's names sit over their rows' hover targets and let the pointer through. */
  .sl-chart-row-label { pointer-events: none; }
  /* end BarChart horizontal, whiskers and negatives */

  /* Meter thresholds and estimated */
  /* A threshold is a hairline across the bar, standing 3px past it on both
     sides, at its share of the track (--sl-meter-at, set by the component). */
  .sl-meter[data-variant="bar"][data-thresholds] { position: relative; overflow: visible; margin-block: 3px; }
  .sl-meter-threshold {
    position: absolute;
    inset-block: -3px;
    inset-inline-start: var(--sl-meter-at, 0%);
    inline-size: 1px;
    margin-inline-start: -.5px;
    background: var(--sl-line-strong);
  }
  /* In pixels, the cell that starts at a threshold gets a hairline in the gap
     before it; a threshold at the very end marks the last cell's far side. */
  .sl-meter-cell[data-threshold-start], .sl-meter-cell[data-threshold-end] { position: relative; }
  .sl-meter-cell[data-threshold-start]::before, .sl-meter-cell[data-threshold-end]::after {
    content: '';
    position: absolute;
    inset-block: -3px;
    inline-size: 1px;
    background: var(--sl-line-strong);
  }
  .sl-meter-cell[data-threshold-start]::before { inset-inline-start: -2px; }
  .sl-meter-cell[data-threshold-end]::after { inset-inline-end: -2px; }
  /* Estimated: the fill (or each lit pixel) hatched in the tone over its soft tint. */
  .sl-meter[data-estimated] .sl-meter-fill,
  .sl-meter[data-estimated] .sl-meter-cell[data-lit] {
    background: repeating-linear-gradient(-45deg, var(--sl-tone, var(--sl-accent)) 0 2px, var(--sl-tone-soft, var(--sl-accent-soft)) 2px 5px);
  }
  /* end Meter thresholds and estimated */

  /* SegmentBar */
  .sl-segment-bar { display: grid; gap: var(--sl-space-xs); min-inline-size: 0; }
  .sl-segment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sl-space-3xs) var(--sl-space-md);
    font-size: var(--sl-font-size-sm);
  }
  .sl-segment-caption { font-weight: 500; color: var(--sl-text); }
  .sl-segment-total { color: var(--sl-muted); }
  .sl-segment-total-value, .sl-segment-value { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; color: var(--sl-text); }
  /* The segments sit side by side with a 2px gap of the surface between them,
     and the track rounds the ends. Each one's flex-basis is its share; the gaps
     shrink them all in proportion. What remains of a total is the empty track. */
  .sl-segment-track { display: flex; gap: 2px; block-size: 10px; overflow: hidden; border-radius: 99px; }
  .sl-segment-bar[data-size="sm"] .sl-segment-track { block-size: 6px; }
  .sl-segment-bar[data-size="lg"] .sl-segment-track { block-size: 16px; }
  .sl-segment {
    flex-grow: 0;
    flex-shrink: 1;
    min-inline-size: 0;
    background: var(--sl-segment-color, var(--sl-line-strong));
    transition: flex-basis var(--sl-duration-slow) var(--sl-ease-out), opacity var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-segment-rest { flex: 1 1 0; min-inline-size: 0; background: var(--sl-surface-2); transition: background-color var(--sl-duration-fast) var(--sl-ease-out); }
  .sl-segment[data-tone], .sl-segment-key[data-tone] { background: var(--sl-tone); }
  /* Hovering a segment or its legend row lights both and fades the others. */
  .sl-segment-bar[data-showing] .sl-segment:not([data-active]) { opacity: .4; }
  .sl-segment-rest[data-active] { background: var(--sl-line-strong); }
  .sl-segment-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sl-space-2xs) var(--sl-space-lg);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--sl-font-size-sm);
    color: var(--sl-muted);
  }
  .sl-segment-item { display: inline-flex; align-items: center; gap: var(--sl-space-xs); transition: color var(--sl-duration-fast) var(--sl-ease-out); }
  .sl-segment-item[data-active] { color: var(--sl-text); }
  .sl-segment-share { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  /* The key: a slanted pixel in the segment's colour; the remainder's is the empty track, outlined. */
  .sl-segment-key {
    flex: none;
    inline-size: 8px;
    block-size: 8px;
    border-radius: 2px;
    background: var(--sl-segment-color, var(--sl-line-strong));
    transform: var(--sl-slant);
  }
  .sl-segment-key[data-remaining] { background: var(--sl-surface-2); box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  /* end SegmentBar */
}
/* Content: Prose, MarkdownEditor, DiffView, FieldDiff, DescriptionList, JsonTree. */
@layer slant {
  /* Prose */
  /* The one place Slant styles bare elements, since rendered markdown has no
     classes. The element rules reach only inside a .slant root and have no
     specificity (:where), so any class of your own wins. Their :not() guard
     keeps them off Slant components in the prose: an element with an sl-*
     class other than Prose's own sl-prose-*, and everything inside one, so a
     CodeBlock, Kbd, Table or Separator keeps its own look. Spacing comes
     between siblings, so the first and last blocks have no outer margin;
     margins skip only what is inside a component, so a component's root
     still takes its place in the flow. */
  :where(.slant) .sl-prose {
    --sl-prose-text: var(--sl-font-size-lg);
    --sl-prose-small: var(--sl-font-size-md);
    --sl-prose-h1: var(--sl-font-size-2xl);
    --sl-prose-h2: var(--sl-font-size-xl);
    --sl-prose-h3: calc((var(--sl-font-size-lg) + var(--sl-font-size-xl)) / 2);
    --sl-prose-flow: var(--sl-space-lg);
    --sl-prose-section: var(--sl-space-2xl);
    --sl-prose-tight: var(--sl-space-sm);
    --sl-prose-item: var(--sl-space-2xs);
    font-size: var(--sl-prose-text);
    line-height: 1.65;
    color: var(--sl-text);
    overflow-wrap: break-word;
  }
  :where(.slant) .sl-prose[data-size="sm"] {
    --sl-prose-text: var(--sl-font-size-md);
    --sl-prose-small: var(--sl-font-size-sm);
    --sl-prose-h1: var(--sl-font-size-xl);
    --sl-prose-h2: var(--sl-font-size-lg);
    --sl-prose-h3: var(--sl-font-size-md);
    --sl-prose-flow: var(--sl-space-sm);
    --sl-prose-section: var(--sl-space-lg);
    --sl-prose-tight: var(--sl-space-2xs);
    --sl-prose-item: var(--sl-space-3xs);
    line-height: 1.6;
  }
  :where(.slant) .sl-prose[data-size="lg"] {
    --sl-prose-text: var(--sl-font-size-xl);
    --sl-prose-small: var(--sl-font-size-lg);
    --sl-prose-h1: calc(var(--sl-font-size-2xl) * 1.5);
    --sl-prose-h2: calc(var(--sl-font-size-2xl) * 1.2);
    --sl-prose-h3: var(--sl-font-size-2xl);
    --sl-prose-flow: var(--sl-space-xl);
    --sl-prose-section: calc(var(--sl-space-2xl) * 1.5);
    --sl-prose-tight: var(--sl-space-md);
    --sl-prose-item: var(--sl-space-xs);
    line-height: 1.7;
  }
  :where(.slant) .sl-prose[data-measure] { max-inline-size: 70ch; }

  /* Flow: no browser margins, then space between siblings at the top level
     and inside items, quotes, details and figures; more above a heading,
     less under one. */
  :where(.slant .sl-prose) :where(p, h1, h2, h3, h4, h5, h6, ul, ol, dl, dd, blockquote, figure, pre, hr):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { margin: 0; }
  :where(.slant .sl-prose) > :where(* + *),
  :where(.slant .sl-prose) :where(li, dd, blockquote, details, figure):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) > :where(* + :is(p, ul, ol, dl, pre, blockquote, figure, table, details, div, hr, h1, h2, h3, h4, h5, h6)) { margin-block-start: var(--sl-prose-flow); }
  :where(.slant .sl-prose) :where(* + :is(h1, h2, h3, h4, h5, h6)):not(:where(.sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { margin-block-start: var(--sl-prose-section); }
  :where(.slant .sl-prose) :where(:is(h1, h2, h3, h4, h5, h6) + *):not(:where(.sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { margin-block-start: var(--sl-prose-tight); }

  /* Headings on the type scale. */
  :where(.slant .sl-prose) :where(h1, h2, h3, h4, h5, h6):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-size: var(--sl-prose-text); font-weight: 600; line-height: 1.3; color: var(--sl-text); text-wrap: balance; }
  :where(.slant .sl-prose) :where(h1):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-size: var(--sl-prose-h1); line-height: 1.2; letter-spacing: -.02em; }
  :where(.slant .sl-prose) :where(h2):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-size: var(--sl-prose-h2); line-height: 1.25; letter-spacing: -.01em; }
  :where(.slant .sl-prose) :where(h3):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-size: var(--sl-prose-h3); }
  :where(.slant .sl-prose) :where(h6):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-size: var(--sl-prose-small); color: var(--sl-muted); }

  /* Text: links in the accent, underlined, with the focus ring. */
  :where(.slant .sl-prose) :where(a):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { border-radius: 2px; color: var(--sl-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
  :where(.slant .sl-prose) :where(a:hover):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { text-decoration-thickness: 2px; }
  :where(.slant .sl-prose) :where(a:focus-visible, summary:focus-visible):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  :where(.slant .sl-prose) :where(strong, b):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-weight: 600; color: var(--sl-text); }
  :where(.slant .sl-prose) :where(del, s):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { color: var(--sl-muted); text-decoration: line-through; }
  :where(.slant .sl-prose) :where(mark):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-inline: .15em; border-radius: 2px; background: var(--sl-accent-soft); color: var(--sl-text); }
  :where(.slant .sl-prose) :where(sub, sup):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { line-height: 0; }

  /* Lists, indented at the inline start (so on the right under RTL), their
     markers muted; nested lists change marker and sit close under their item. */
  :where(.slant .sl-prose) :where(ul, ol):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-inline-start: 1.5em; list-style-type: disc; }
  :where(.slant .sl-prose) :where(ol):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { list-style-type: decimal; }
  :where(.slant .sl-prose) :where(ul ul, ol ul):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { list-style-type: circle; }
  :where(.slant .sl-prose) :where(ul ul ul, ol ul ul, ul ol ul, ol ol ul):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { list-style-type: square; }
  :where(.slant .sl-prose) :where(ol ol, ul ol):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { list-style-type: lower-alpha; }
  :where(.slant .sl-prose) :where(ol ol ol, ul ol ol, ol ul ol, ul ul ol):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { list-style-type: lower-roman; }
  :where(.slant .sl-prose) :where(li):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *))::marker { color: var(--sl-muted); font-variant-numeric: tabular-nums; }
  :where(.slant .sl-prose) :where(ul, ol):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) > :where(li + li) { margin-block-start: var(--sl-prose-item); }
  /* A loose list (items holding paragraphs) spaces its items like blocks. */
  :where(.slant .sl-prose) :where(ul, ol):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) > :where(li:has(> p) + li, li + li:has(> p)) { margin-block-start: var(--sl-prose-flow); }
  :where(.slant .sl-prose) :where(li):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) > :where(ul, ol) { margin-block-start: var(--sl-prose-item); }
  /* Task lists: the box hangs where the marker was. */
  :where(.slant .sl-prose) :where(li:has(> input[type="checkbox"]:first-child, > p:first-child > input[type="checkbox"]:first-child)):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { list-style-type: none; }
  :where(.slant) .sl-prose-check { inline-size: .95em; block-size: .95em; margin-block: 0; margin-inline: -1.35em .4em; vertical-align: -.1em; accent-color: var(--sl-accent); cursor: default; }

  /* Quotes and definitions. */
  :where(.slant .sl-prose) :where(blockquote):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-inline-start: var(--sl-space-lg); border-inline-start: 1px solid var(--sl-line-strong); color: var(--sl-muted); }
  :where(.slant .sl-prose) :where(dt):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-weight: 600; color: var(--sl-text); }
  :where(.slant .sl-prose) :where(dd):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-inline-start: var(--sl-space-lg); }
  :where(.slant .sl-prose) :where(dt + dd):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { margin-block-start: var(--sl-space-3xs); }
  :where(.slant .sl-prose) :where(dd + dt):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { margin-block-start: var(--sl-prose-tight); }

  /* Code: inline in a hairline on the surface, blocks framed like CodeBlock
     without its bar, both left to right. */
  :where(.slant .sl-prose) :where(code:not(pre *), kbd, samp):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding: .1em .35em; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); background: var(--sl-surface); color: var(--sl-text); font-family: var(--sl-font-mono); font-size: .875em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  :where(.slant .sl-prose) :where(pre):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding: var(--sl-space-md) var(--sl-space-lg); overflow-x: auto; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-bg); color: var(--sl-text); font: var(--sl-prose-small)/1.65 var(--sl-font-mono); white-space: pre; tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--sl-line-strong) transparent; }
  :where(.slant .sl-prose) :where(pre code):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font: inherit; }

  /* Tables in Table's look: hairline rows, mono capital headers, and a
     wrapper (from the element map) that scrolls them sideways. */
  :where(.slant) .sl-prose-table { max-inline-size: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--sl-line-strong) transparent; }
  :where(.slant .sl-prose) :where(table):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { inline-size: 100%; border-collapse: collapse; font-size: var(--sl-prose-small); line-height: 1.5; }
  :where(.slant .sl-prose) :where(th, td):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-block: var(--sl-space-sm); padding-inline: 0 var(--sl-space-lg); border-block-end: 1px solid var(--sl-line); text-align: start; vertical-align: top; }
  :where(.slant .sl-prose) :where(th:last-child, td:last-child):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-inline-end: 0; }
  :where(.slant .sl-prose) :where(thead th):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding-block-start: 0; color: var(--sl-muted); font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); letter-spacing: .08em; text-transform: uppercase; vertical-align: bottom; }
  :where(.slant .sl-prose) :where(tbody th):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { font-weight: 600; color: var(--sl-text); }
  :where(.slant .sl-prose) :where(tbody tr:last-child > *):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { border-block-end: 0; }
  :where(.slant .sl-prose) :where(caption):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { caption-side: bottom; padding-block-start: var(--sl-space-sm); color: var(--sl-muted); text-align: start; }

  /* Media, disclosures and rules. */
  :where(.slant .sl-prose) :where(img, video):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { max-inline-size: 100%; block-size: auto; }
  :where(.slant .sl-prose) :where(figcaption):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { margin-block-start: var(--sl-space-xs); color: var(--sl-muted); font-size: var(--sl-prose-small); }
  :where(.slant .sl-prose) :where(details):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { padding: var(--sl-space-sm) var(--sl-space-md); border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); }
  :where(.slant .sl-prose) :where(summary):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { border-radius: 2px; color: var(--sl-text); font-weight: 600; cursor: pointer; }
  :where(.slant .sl-prose) :where(hr):not(:where([class^="sl-"]:not([class^="sl-prose"]), [class*=" sl-"]:not([class*=" sl-prose"]), .sl-prose [class^="sl-"]:not([class^="sl-prose"]) *, .sl-prose [class*=" sl-"]:not([class*=" sl-prose"]) *)) { block-size: 0; margin-block: var(--sl-prose-section); border: 0; border-block-start: 1px solid var(--sl-line); }
  /* The map's rule is a Separator: its own class outranks .sl-separator's margin. */
  :where(.slant) .sl-prose-hr { margin-block: var(--sl-prose-section, var(--sl-space-2xl)); }
  :where(.slant) .sl-prose-hr:first-child { margin-block-start: 0; }
  :where(.slant) .sl-prose-hr:last-child { margin-block-end: 0; }
  :where(.slant .sl-prose) > :where(:first-child) { margin-block-start: 0; }
  :where(.slant .sl-prose) > :where(:last-child) { margin-block-end: 0; }
  /* end Prose */
  /* MarkdownEditor */
  /* One field drawn like .sl-input: the bar of tools and the Write/Preview
     switch on top, a hairline under it, then the bare textarea or the
     preview in its place. The frame takes the focus, invalid and read-only
     looks; disabled parts dim themselves, so nothing dims twice. */
  .sl-markdown-editor {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-markdown-editor:focus-within { border-color: var(--sl-accent); }
  .sl-markdown-editor:has(> .sl-markdown-editor-field:focus-visible) { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-markdown-editor[data-invalid] { border-color: var(--sl-danger); }
  .sl-markdown-editor[data-readonly]:not([data-disabled]) { background: var(--sl-surface-2); }
  .sl-markdown-editor[data-disabled] { border-color: var(--sl-line); }
  .sl-markdown-editor-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-xs);
    padding: var(--sl-space-3xs);
    border-block-end: 1px solid var(--sl-line);
  }
  .sl-markdown-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3xs); min-width: 0; }
  .sl-markdown-toolbar-separator {
    flex: none;
    inline-size: 1px;
    block-size: calc(var(--sl-control-sm) - 2 * var(--sl-space-xs));
    margin-inline: var(--sl-space-3xs);
    background: var(--sl-line);
  }
  .sl-markdown-mode { margin-inline-start: auto; }
  .sl-markdown-tip { display: inline-flex; align-items: center; gap: var(--sl-space-sm); }
  .sl-markdown-tip-keys { display: inline-flex; gap: var(--sl-space-3xs); }
  /* The field is bare inside the frame; hidden (in preview) it must not show,
     though .sl-textarea sets a display. */
  .sl-markdown-editor-field,
  .sl-markdown-editor-field:read-only:not(:disabled) { flex: 1 1 auto; border: 0; border-radius: 0; background: transparent; }
  .sl-markdown-editor-field:focus-visible { outline: 0; }
  .sl-markdown-editor-field[hidden] { display: none; }
  /* The preview sits where the field was, padded like it, at least its rows
     tall until the field's own height is known. A focus ring inside it, as
     it only takes focus while it scrolls. */
  .sl-markdown-preview {
    min-block-size: calc(var(--sl-markdown-editor-rows, 6) * 1.5em + 2 * var(--sl-space-xs));
    padding: var(--sl-space-xs) var(--sl-space-md);
    overflow: auto;
    font-size: var(--sl-font-size-lg);
    line-height: 1.5;
    overflow-wrap: break-word;
  }
  .sl-markdown-preview:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-markdown-preview-empty { margin: 0; color: var(--sl-muted); }
  .sl-markdown-editor[data-size="sm"] :is(.sl-markdown-editor-field, .sl-markdown-preview) { padding: var(--sl-space-2xs) var(--sl-space-sm); font-size: var(--sl-font-size-md); }
  .sl-markdown-editor[data-size="sm"] .sl-markdown-preview { min-block-size: calc(var(--sl-markdown-editor-rows, 6) * 1.5em + 2 * var(--sl-space-2xs)); }
  .sl-markdown-editor[data-size="lg"] .sl-markdown-editor-bar { padding: var(--sl-space-2xs); }
  .sl-markdown-editor[data-size="lg"] :is(.sl-markdown-editor-field, .sl-markdown-preview) { padding: var(--sl-space-sm) var(--sl-space-lg); }
  .sl-markdown-editor[data-size="lg"] .sl-markdown-preview { min-block-size: calc(var(--sl-markdown-editor-rows, 6) * 1.5em + 2 * var(--sl-space-sm)); }
  /* end MarkdownEditor */
  /* DiffView */
  /* A framed block like CodeBlock's: a bar (title, totals, header, change
     buttons, layout) over a body that scrolls by itself. The rows sit in a
     column as wide as the widest line, so each line's tint runs the full width
     when the body scrolls sideways; the body is a size container, so a fold's
     label and the content under a line can stick to its visible width. */
  .sl-diff { display: flex; flex-direction: column; min-inline-size: 0; overflow: hidden; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-bg); color: var(--sl-text); }
  .sl-diff-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs) var(--sl-space-md); min-block-size: calc(var(--sl-control-sm) + 2 * var(--sl-space-xs)); padding: var(--sl-space-xs); padding-inline-start: var(--sl-space-md); border-block-end: 1px solid var(--sl-line); }
  .sl-diff-title { min-inline-size: 0; overflow: hidden; font: var(--sl-font-size-sm)/1.4 var(--sl-font-mono); color: var(--sl-text); text-overflow: ellipsis; white-space: nowrap; }
  .sl-diff-stats { display: inline-flex; flex: none; align-items: center; gap: var(--sl-space-sm); font: var(--sl-font-size-xs)/1.4 var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  .sl-diff-stat { display: inline-flex; align-items: center; gap: var(--sl-space-2xs); }
  .sl-diff-stat::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant); }
  .sl-diff-stat[data-type="add"] { color: var(--sl-success); }
  .sl-diff-stat[data-type="remove"] { color: var(--sl-danger); }
  .sl-diff-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs); margin-inline-start: auto; }
  .sl-diff-header, .sl-diff-nav { display: flex; align-items: center; gap: var(--sl-space-3xs); min-inline-size: 0; }
  .sl-diff-body { flex: 1 1 auto; min-block-size: 0; overflow: auto; container-type: inline-size; font: var(--sl-font-size-sm)/1.65 var(--sl-font-mono); tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--sl-line-strong) transparent; }
  .sl-diff-body:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-diff-rows { display: flex; flex-direction: column; inline-size: max-content; min-inline-size: 100%; }
  .sl-diff[data-wrap] .sl-diff-rows { inline-size: auto; }
  /* A change block; the current one carries an accent rule at its start. */
  .sl-diff-block { position: relative; display: flex; flex-direction: column; }
  .sl-diff-block[data-current]::before { content: ''; position: absolute; z-index: 2; inset-block: 0; inset-inline-start: 0; inline-size: 3px; background: var(--sl-accent); pointer-events: none; }
  /* A line: the gutter (action, numbers, sign) and the code. Split, a grid of
     two equal sides, old and new, each its own gutter and code. */
  .sl-diff-line { display: flex; white-space: pre; }
  .sl-diff-line[data-split] { display: grid; grid-template-columns: 1fr 1fr; }
  .sl-diff[data-wrap] .sl-diff-line[data-split] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sl-diff-line:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-diff-side { display: flex; min-inline-size: 0; }
  .sl-diff-side[data-side="new"] { border-inline-start: 1px solid var(--sl-line); }
  .sl-diff-side[data-empty] { background: var(--sl-surface); }
  .sl-diff-line[data-type="add"], .sl-diff-side[data-type="add"] { background: var(--sl-success-soft); }
  .sl-diff-line[data-type="remove"], .sl-diff-side[data-type="remove"] { background: var(--sl-danger-soft); }
  /* The line's action: one line tall whatever it holds (a taller control
     overhangs the row instead of growing it), shown on hover and focus. */
  .sl-diff-action { position: relative; z-index: 1; display: flex; flex: none; align-items: center; justify-content: center; inline-size: var(--sl-control-sm); block-size: 1lh; white-space: normal; opacity: 0; transition: opacity var(--sl-duration-fast); }
  .sl-diff-line:hover .sl-diff-action, .sl-diff-line:focus-within .sl-diff-action { opacity: 1; }
  @media (hover: none) { .sl-diff-action { opacity: 1; } }
  .sl-diff-number { flex: none; inline-size: calc(var(--sl-diff-digits, 2) * 1ch + 2 * var(--sl-space-sm)); padding-inline: var(--sl-space-sm); color: var(--sl-muted); text-align: end; font-variant-numeric: tabular-nums; -webkit-user-select: none; user-select: none; }
  .sl-diff-sign { flex: none; inline-size: calc(1ch + var(--sl-space-sm)); color: var(--sl-text); text-align: center; -webkit-user-select: none; user-select: none; }
  .sl-diff-code { flex: 1 0 auto; min-block-size: 1lh; padding-inline: var(--sl-space-xs) var(--sl-space-lg); }
  .sl-diff[data-wrap] .sl-diff-code { flex: 1 1 0; min-inline-size: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .sl-diff-said { -webkit-user-select: none; user-select: none; }
  /* Changed words: a stronger tint of the line's own, the text unchanged. */
  .sl-diff-mark { border-radius: 2px; color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  :is(.sl-diff-line, .sl-diff-side)[data-type="add"] .sl-diff-mark { background: color-mix(in srgb, var(--sl-success) 28%, var(--sl-surface)); }
  :is(.sl-diff-line, .sl-diff-side)[data-type="remove"] .sl-diff-mark { background: color-mix(in srgb, var(--sl-danger) 28%, var(--sl-surface)); }
  @media (forced-colors: active) { .sl-diff-mark { text-decoration: underline; } }
  /* On a tinted line the token colours lean towards the text, so they keep
     4.5:1 on the tint and on a marked word's stronger one, Paper included. */
  :is(.sl-diff-line, .sl-diff-side):is([data-type="add"], [data-type="remove"]) .sl-code-token[data-token="comment"] { color: color-mix(in srgb, var(--sl-muted) 40%, var(--sl-text)); }
  :is(.sl-diff-line, .sl-diff-side):is([data-type="add"], [data-type="remove"]) .sl-code-token[data-token="string"] { color: color-mix(in srgb, var(--sl-success) 60%, var(--sl-text)); }
  :is(.sl-diff-line, .sl-diff-side):is([data-type="add"], [data-type="remove"]) .sl-code-token[data-token="keyword"] { color: color-mix(in srgb, var(--sl-accent) 60%, var(--sl-text)); }
  :is(.sl-diff-line, .sl-diff-side):is([data-type="add"], [data-type="remove"]) .sl-code-token[data-token="attribute"] { color: color-mix(in srgb, var(--sl-warning) 60%, var(--sl-text)); }
  :is(.sl-diff-line, .sl-diff-side):is([data-type="add"], [data-type="remove"]) .sl-code-token[data-token="number"] { color: color-mix(in srgb, var(--sl-danger) 60%, var(--sl-text)); }
  /* Folded runs (a button) and the runs a hunk list leaves out (a count), on
     the surface between hairlines. Their labels, and the content under a line,
     are the body's visible width and stick to both its inline edges, so they
     stay in view however far it scrolls sideways, in either direction. */
  .sl-diff-fold-row, .sl-diff-gap { border-block: 1px solid var(--sl-line); background: var(--sl-surface); }
  .sl-diff-fold-row:first-child, .sl-diff-gap:first-child { border-block-start: 0; }
  .sl-diff-fold-row:last-child, .sl-diff-gap:last-child { border-block-end: 0; }
  .sl-diff-fold, .sl-diff-gap-text { position: sticky; inset-inline: 0; display: block; inline-size: 100cqi; padding: var(--sl-space-3xs) var(--sl-space-md); color: var(--sl-muted); font: var(--sl-font-size-xs)/1.6 var(--sl-font-sans); text-align: start; white-space: normal; }
  .sl-diff-fold { border: 0; background: transparent; transition: color var(--sl-duration-fast), background-color var(--sl-duration-fast); }
  .sl-diff-fold:hover { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-diff-fold:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-diff-empty { padding: var(--sl-space-md) var(--sl-space-lg); color: var(--sl-muted); font: var(--sl-font-size-sm)/1.5 var(--sl-font-sans); }
  /* Content under a line, across the body's visible width, in the page's own type. */
  .sl-diff-after { border-block: 1px solid var(--sl-line); background: var(--sl-bg); }
  .sl-diff-after-content { position: sticky; inset-inline: 0; inline-size: 100cqi; padding: var(--sl-space-sm) var(--sl-space-md); font: var(--sl-font-size-md)/1.5 var(--sl-font-sans); white-space: normal; }
  /* The code reads left to right under RTL too; words of the page's own
     (folds, counts, "No changes", content under a line) follow the page. */
  [dir="rtl"] .sl-diff-fold, [dir="rtl"] .sl-diff-gap-text, [dir="rtl"] .sl-diff-empty, [dir="rtl"] .sl-diff-after-content { direction: rtl; }
  /* end DiffView */
  /* FieldDiff */
  /* A named size container, so a narrow one stacks each row into a block. */
  .sl-field-diff { container: sl-field-diff / inline-size; position: relative; min-inline-size: 0; color: var(--sl-text); font-size: var(--sl-font-size-md); }
  .sl-field-diff-bar { display: flex; align-items: center; justify-content: flex-end; gap: var(--sl-space-sm); margin-block-end: var(--sl-space-md); }
  .sl-field-diff-toggle { color: var(--sl-muted); font-size: var(--sl-font-size-sm); cursor: pointer; user-select: none; }
  .sl-field-diff-table { inline-size: 100%; border-collapse: collapse; }
  .sl-field-diff-header {
    padding: 0 var(--sl-space-sm) var(--sl-space-sm);
    border-block-end: 1px solid var(--sl-line);
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono);
    letter-spacing: .08em;
    text-align: start;
    text-transform: uppercase;
  }
  .sl-field-diff-field, .sl-field-diff-cell, .sl-field-diff-change, .sl-field-diff-none {
    padding: var(--sl-space-sm);
    border-block-end: 1px solid var(--sl-line);
    text-align: start;
    vertical-align: top;
  }
  .sl-field-diff-header:first-child, .sl-field-diff-field, .sl-field-diff-none { padding-inline-start: 0; }
  .sl-field-diff-row:last-child > * { border-block-end: 0; }
  .sl-field-diff-field { inline-size: 22%; font-weight: 500; overflow-wrap: anywhere; }
  .sl-field-diff-cell { inline-size: 39%; overflow-wrap: anywhere; }
  /* The change column shrinks to its badge. */
  .sl-field-diff-change, .sl-field-diff-header:last-child { inline-size: 0; padding-inline-end: 0; white-space: nowrap; }
  .sl-field-diff-side { display: none; }
  .sl-field-diff-value { inline-size: fit-content; max-inline-size: 100%; }
  /* The side that changed sits on its soft tone, text at --sl-text (Paper's contrast). */
  .sl-field-diff-value[data-marked] { margin-inline: calc(-1 * var(--sl-space-2xs)); padding-inline: var(--sl-space-2xs); border-radius: var(--sl-radius-small); color: var(--sl-text); }
  .sl-field-diff-cell[data-side="before"] > .sl-field-diff-value[data-marked] { background: var(--sl-danger-soft); }
  .sl-field-diff-cell[data-side="after"] > .sl-field-diff-value[data-marked] { background: var(--sl-success-soft); }
  .sl-field-diff-empty, .sl-field-diff-none, .sl-field-diff-hidden { color: var(--sl-muted); }
  .sl-field-diff-hidden { margin: var(--sl-space-sm) 0 0; font-size: var(--sl-font-size-sm); }
  @container sl-field-diff (max-width: 30rem) {
    .sl-field-diff-table, .sl-field-diff-table > tbody { display: block; }
    /* The column headers stay for screen readers; each cell shows its side's label instead. */
    .sl-field-diff-head { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .sl-field-diff-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: var(--sl-space-xs) var(--sl-space-sm);
      padding-block: var(--sl-space-md);
      border-block-end: 1px solid var(--sl-line);
    }
    .sl-field-diff-row:first-child { padding-block-start: 0; }
    .sl-field-diff-row:last-child { border-block-end: 0; }
    .sl-field-diff-row > * { inline-size: auto; padding: 0; border-block-end: 0; }
    .sl-field-diff-change { grid-row: 1; grid-column: 2; }
    .sl-field-diff-cell, .sl-field-diff-none { grid-column: 1 / -1; }
    .sl-field-diff-side { display: block; color: var(--sl-muted); font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); letter-spacing: .08em; text-transform: uppercase; }
  }
  /* end FieldDiff */
  /* DescriptionList */
  .sl-description-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sl-space-sm) var(--sl-space-xl); margin: 0; color: var(--sl-text); font-size: var(--sl-font-size-md); line-height: 1.5; }
  .sl-description-list[data-size="sm"] { row-gap: var(--sl-space-xs); font-size: var(--sl-font-size-sm); }
  /* Two columns while each can be 15rem wide, else one. No container query, so
     the list needs no size containment and sizes to its content anywhere. */
  .sl-description-list[data-columns="2"] { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(15rem, calc(50% - var(--sl-space-xl) / 2 - 1px))), 1fr)); }
  .sl-description-item, .sl-description-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--sl-space-3xs) var(--sl-space-md);
    align-items: baseline;
    min-inline-size: 0;
  }
  .sl-description-list[data-layout="stacked"] > :is(.sl-description-item, .sl-description-group) { grid-template-columns: minmax(0, 1fr); }
  .sl-description-term { margin: 0; color: var(--sl-muted); overflow-wrap: anywhere; }
  .sl-description-value { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sl-space-2xs); min-inline-size: 0; margin: 0; }
  .sl-description-text { min-inline-size: 0; overflow-wrap: anywhere; }
  .sl-description-item[data-mono] > .sl-description-value > .sl-description-text { font-family: var(--sl-font-mono); font-size: var(--sl-font-size-sm); }
  .sl-description-list[data-size="sm"] > .sl-description-item[data-mono] > .sl-description-value > .sl-description-text { font-size: var(--sl-font-size-xs); }
  .sl-description-item[data-empty] > .sl-description-value > .sl-description-text { color: var(--sl-muted); }
  /* The copy button overhangs the line, so it doesn't make the row taller. */
  .sl-description-copy { margin-block: calc(-1 * var(--sl-space-xs)); }
  .sl-description-copy[data-copied] .sl-description-copy-icon { color: var(--sl-success); }
  .sl-description-hint { flex-basis: 100%; color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
  .sl-description-list[data-size="sm"] .sl-description-hint { font-size: var(--sl-font-size-xs); }
  /* A group's term heads its nested list, which sits on a hairline. */
  .sl-description-group > .sl-description-value { display: block; }
  .sl-description-list[data-nested] { padding-inline-start: var(--sl-space-md); border-inline-start: 1px solid var(--sl-line); }
  /* end DescriptionList */
  /* JsonTree */
  /* Tree's rows in the mono face, framed on the theme's background like
     CodeBlock, so the token colours on the values keep 4.5:1. Keys are plain
     text, indexes and counts muted. A row is one line: long keys and values
     end in an ellipsis. The ⋯ button sits at the row's end, shown on hover,
     on the focused row and while its menu is open (always on touch). */
  .sl-tree.sl-json-tree { padding: var(--sl-space-2xs); border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-bg); color: var(--sl-text); font-family: var(--sl-font-mono); font-size: var(--sl-font-size-sm); }
  .sl-tree.sl-json-tree[data-size="md"] { font-size: var(--sl-font-size-md); }
  .sl-json-row { display: flex; align-items: center; gap: var(--sl-space-xs); min-inline-size: 0; }
  .sl-json-key { flex: 0 1 auto; min-inline-size: 0; max-inline-size: 60%; overflow: hidden; color: var(--sl-text); text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
  .sl-json-key[data-index] { color: var(--sl-muted); font-variant-numeric: tabular-nums; }
  .sl-json-colon { flex: none; margin-inline-start: calc(-1 * var(--sl-space-xs)); color: var(--sl-muted); }
  .sl-json-value { flex: 0 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
  .sl-json-brackets { flex: none; color: var(--sl-muted); }
  .sl-json-count { flex: none; color: var(--sl-muted); white-space: nowrap; unicode-bidi: isolate; }
  .sl-json-actions { flex: none; margin-inline-start: auto; opacity: 0; transition: opacity var(--sl-duration-fast); }
  .sl-json-tree .sl-tree-row:hover .sl-json-actions,
  .sl-json-item:focus > .sl-tree-row .sl-json-actions,
  .sl-json-actions[aria-expanded="true"] { opacity: 1; }
  @media (hover: none) { .sl-json-actions { opacity: 1; } }
  .sl-json-more > .sl-tree-row { color: var(--sl-accent); cursor: pointer; }
  .sl-json-more > .sl-tree-row:hover .sl-json-more-label { text-decoration: underline; text-underline-offset: 2px; }
  .sl-json-more-label { unicode-bidi: isolate; }
  /* end JsonTree */
}
/* Charts: the chart core that BarChart (data.css) and the charts below share,
   then LineChart, AreaChart, PieChart and Heatmap. Marks take their colour
   from --sl-chart-1 … --sl-chart-5 (series) or the accent (one series);
   text never wears a series colour. */

@layer slant {
  /* Chart core */
  .sl-chart { display: grid; gap: var(--sl-space-sm); min-width: 0; }
  .sl-chart-frame { position: relative; }
  .sl-chart-plot { position: relative; border-radius: var(--sl-radius-small); }
  /* The drawing is physical: SVG never mirrors, so text anchors stay put under RTL. */
  .sl-chart-svg { display: block; width: 100%; overflow: visible; direction: ltr; }
  /* A mark's hover target: its whole band or column, wider than the mark. */
  .sl-chart-hit { fill: transparent; }
  .sl-chart-gridline { stroke: var(--sl-line); stroke-width: 1px; shape-rendering: crispEdges; }
  .sl-chart-gridline[data-zero] { stroke: var(--sl-line-strong); }
  .sl-chart-value-tick, .sl-chart-tick { fill: var(--sl-muted); font: 10px/1 var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  .sl-chart-tooltip {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    padding: 3px 7px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    font: 500 var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    white-space: nowrap;
    transform: translate(-50%, var(--sl-chart-tooltip-y, -100%));
    pointer-events: none;
  }
  /* Physical, like the plot it points into: near a side it lines up with that
     side, and near the top it hangs below the point instead of over the legend. */
  .sl-chart-tooltip[data-align="start"] { transform: translate(-8px, var(--sl-chart-tooltip-y, -100%)); }
  .sl-chart-tooltip[data-align="end"] { transform: translate(calc(-100% + 8px), var(--sl-chart-tooltip-y, -100%)); }
  .sl-chart-tooltip[data-side="below"] { --sl-chart-tooltip-y: 14px; }
  .sl-chart-tooltip-label, .sl-chart-tooltip-series { color: var(--sl-muted); }
  .sl-chart-tooltip-rows { display: grid; flex-basis: 100%; gap: 1px; }
  /* With rows, the title sits over them and the box is as wide as the widest
     line (a wrapping flex box would be as wide as all of them side by side). */
  .sl-chart-tooltip:has(> .sl-chart-tooltip-rows) { display: grid; justify-items: start; }
  .sl-chart-tooltip-row { display: flex; align-items: center; gap: 6px; padding-inline: 3px; margin-inline: -3px; border-radius: 2px; }
  .sl-chart-tooltip-row[data-active] { background: var(--sl-surface-2); }
  .sl-chart-tooltip-value { font-weight: 600; }
  /* A series' colour key: a short line for lines, a slanted pixel for bars, areas and slices. */
  .sl-chart-key { flex: none; inline-size: 10px; block-size: 2px; border-radius: 1px; background: var(--sl-chart-key); }
  .sl-chart-key[data-shape="rect"] { inline-size: 8px; block-size: 8px; border-radius: 2px; transform: var(--sl-slant); }
  .sl-chart-legend { display: flex; flex-wrap: wrap; gap: var(--sl-space-2xs) var(--sl-space-lg); margin: 0; padding: 0; list-style: none; font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-chart-legend-item { display: inline-flex; align-items: center; gap: var(--sl-space-xs); }
  .sl-chart-table { width: 100%; border-collapse: collapse; font-size: var(--sl-font-size-sm); }
  .sl-chart-table-caption { padding-block-end: var(--sl-space-xs); color: var(--sl-muted); text-align: start; }
  .sl-chart-table-head, .sl-chart-table-cell { padding: var(--sl-space-2xs) var(--sl-space-sm); border-block-end: 1px solid var(--sl-line); text-align: start; }
  .sl-chart-table-head { font-weight: 500; color: var(--sl-muted); }
  .sl-chart-table-cell { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; }

  /* LineChart: the lines, dots and crosshair, which AreaChart draws over its fills too.
     Each series sets --sl-chart-mark (the accent for one series). Lines draw in over
     pathLength="1" with sl-draw, the keyframes Sparkline defines in data.css. */
  .sl-chart-line {
    fill: none;
    stroke: var(--sl-chart-mark, var(--sl-accent));
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: sl-draw var(--sl-duration-slower) var(--sl-ease-out);
  }
  /* A dot rings itself in the surface, so it reads where lines cross; the markers and
     the end dot fade in as the line arrives (sl-chart-fade, in AreaChart's section). */
  .sl-chart-dot { fill: var(--sl-chart-mark, var(--sl-accent)); stroke: var(--sl-chart-surface, var(--sl-bg)); stroke-width: 2px; }
  .sl-chart-dot:not([data-shown]) { animation: sl-chart-fade var(--sl-duration-slow) var(--sl-ease-out) var(--sl-duration-slow) both; }
  /* The keyboard cursor's dot swaps its surface ring for the text colour. */
  .sl-chart-dot[data-cursor] { stroke: var(--sl-text); }
  .sl-chart-crosshair { stroke: var(--sl-line-strong); stroke-width: 1px; shape-rendering: crispEdges; }

  /* AreaChart: a soft fill of the series colour under each line, fading in. */
  .sl-chart-area { fill: var(--sl-chart-mark, var(--sl-accent)); fill-opacity: .1; animation: sl-chart-fade var(--sl-duration-slower) var(--sl-ease-out) both; }
  @keyframes sl-chart-fade { from { opacity: 0; } }

  /* PieChart: a donut. The ring is physical like every chart; the body (the
     donut, then its legend) is HTML and follows the reading direction. */
  .sl-pie-body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-md) var(--sl-space-xl); }
  .sl-pie-frame { flex: none; }
  .sl-pie-plot { border-radius: var(--sl-radius-full); }
  .sl-pie-track { fill: var(--sl-line); }
  /* The ring sweeps in through its mask; sl-draw is Sparkline's keyframe, in data.css. */
  .sl-pie-sweep { animation: sl-draw var(--sl-duration-slower) var(--sl-ease-out); }
  .sl-pie-slice {
    fill: var(--sl-chart-mark);
    transform-box: view-box;
    transform-origin: 50% 50%;
    transition: opacity var(--sl-duration-fast) var(--sl-ease-out), transform var(--sl-duration-fast) var(--sl-ease-out);
  }
  /* The shown slice lifts 3px at its rim (--sl-pie-lift is that scale, set by the component); the others fade. */
  .sl-pie-slice[data-shown] { transform: scale(var(--sl-pie-lift, 1)); }
  .sl-pie[data-showing] .sl-pie-slice:not([data-shown]) { opacity: .35; }
  /* The readout in the hole: the total, or the shown slice. --sl-pie-hole is the hole's diameter. */
  .sl-pie-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center; pointer-events: none; }
  .sl-pie-center-value {
    font-family: var(--sl-font-mono);
    font-size: min(var(--sl-font-size-xl), calc(var(--sl-pie-hole) * .17));
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--sl-text);
  }
  .sl-pie-center-label { max-inline-size: calc(var(--sl-pie-hole) * .72); overflow: hidden; font-size: var(--sl-font-size-xs); line-height: 1.3; color: var(--sl-muted); text-overflow: ellipsis; white-space: nowrap; }
  .sl-pie-center-share { font: 500 var(--sl-font-size-xs)/1.3 var(--sl-font-mono); font-variant-numeric: tabular-nums; color: var(--sl-muted); }
  .sl-pie-legend { display: grid; flex: 1 1 9rem; gap: var(--sl-space-2xs); min-inline-size: 0; max-inline-size: 18rem; margin: 0; padding: 0; list-style: none; font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-pie-legend-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sl-space-xs); transition: color var(--sl-duration-fast) var(--sl-ease-out); }
  .sl-pie-legend-item[data-shown] { color: var(--sl-text); }
  .sl-pie-legend-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sl-pie-legend-share { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; }

  /* Heatmap: a column per week, a row per weekday, each day a slanted pixel.
     Physical like every chart (direction: ltr on the plot), so the weeks run
     left to right under RTL too; the plot scrolls sideways when they outrun
     it. The month and weekday labels share the cells' 12px + 3px pitch. */
  .sl-heatmap { --sl-heatmap-cell: 12px; --sl-heatmap-gap: 3px; }
  .sl-heatmap-plot { overflow-x: auto; direction: ltr; padding: var(--sl-space-2xs); }
  .sl-heatmap-layout { display: grid; grid-template-columns: auto auto; justify-content: start; gap: var(--sl-space-2xs) var(--sl-space-xs); inline-size: max-content; }
  .sl-heatmap-months { display: grid; grid-column: 2; grid-auto-columns: var(--sl-heatmap-cell); column-gap: var(--sl-heatmap-gap); }
  .sl-heatmap-weekdays { display: grid; grid-row: 2; grid-column: 1; grid-template-rows: repeat(7, var(--sl-heatmap-cell)); row-gap: var(--sl-heatmap-gap); }
  .sl-heatmap-month, .sl-heatmap-weekday { overflow: hidden; color: var(--sl-muted); font: 10px/var(--sl-heatmap-cell) var(--sl-font-mono); white-space: nowrap; }
  .sl-heatmap-grid {
    display: grid;
    grid-row: 2;
    grid-column: 2;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, var(--sl-heatmap-cell));
    grid-auto-columns: var(--sl-heatmap-cell);
    gap: var(--sl-heatmap-gap);
  }
  /* The ramp: an empty day is the raised surface; level n of N mixes n/N of the
     accent into it (--sl-heatmap-mix, set by the component). Mixing in oklab
     moves lightness in a straight line, so the steps stay in order in every theme. */
  .sl-heatmap-cell, .sl-heatmap-swatch {
    inline-size: var(--sl-heatmap-cell);
    block-size: var(--sl-heatmap-cell);
    border: 1px solid color-mix(in oklab, var(--sl-text) 8%, transparent);
    border-radius: 2px;
    background: var(--sl-surface-2);
    transform: var(--sl-slant);
  }
  .sl-heatmap-cell[data-level]:not([data-level="0"]), .sl-heatmap-swatch:not([data-level="0"]) {
    background: color-mix(in oklab, var(--sl-accent) var(--sl-heatmap-mix), var(--sl-surface-2));
  }
  /* The days before the start and after the end hold their place, unseen. */
  .sl-heatmap-cell[data-pad] { visibility: hidden; }
  .sl-heatmap-cell[data-shown] { outline: 1.5px solid var(--sl-text); outline-offset: 1px; }
  .sl-heatmap-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sl-space-2xs) var(--sl-space-lg); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-heatmap-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sl-space-xs); margin: 0; }
  .sl-heatmap-readout-value { font-family: var(--sl-font-mono); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--sl-text); }
  .sl-heatmap-key { display: inline-flex; align-items: center; gap: var(--sl-heatmap-gap); }
  .sl-heatmap-key-label { margin-inline: var(--sl-space-3xs); }

  /* LineChart numeric x, legend toggles and crosshair readout */
  /* A legend whose entries show and hide series (LineChart, AreaChart and
     ScatterChart with two or more): each name is a quiet toggle button. A
     hidden series' key goes hollow and its name is struck through, so the
     state never rests on colour; the last one showing stays put. */
  .sl-chart-legend-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-xs);
    margin-inline: calc(var(--sl-space-2xs) * -1);
    padding: 1px var(--sl-space-2xs);
    border: 0;
    border-radius: var(--sl-radius-small);
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color var(--sl-duration-fast) var(--sl-ease-out), background var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-chart-legend-toggle:hover:not([aria-disabled="true"]) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-chart-legend-toggle[aria-pressed="false"] { text-decoration: line-through; }
  .sl-chart-legend-toggle[aria-disabled="true"] { cursor: default; }
  .sl-chart-key[data-hollow] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sl-chart-key); }
  .sl-chart-key[data-shape="line"][data-hollow] { block-size: 6px; border-radius: 3px; }
  /* Axis titles, level, in rows of their own (x under the labels, y over the value ticks). */
  .sl-chart-axis-title { fill: var(--sl-muted); font: 500 10px/1 var(--sl-font-sans); letter-spacing: .02em; }
  /* The crosshair's level hairline, and its readouts on the axes in the tooltip's surface. */
  .sl-chart-readout {
    position: absolute;
    z-index: 1;
    padding: 1px 4px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-text);
    font: 500 10px/1.4 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transform: translateY(-50%);
    pointer-events: none;
  }
  /* end LineChart numeric x, legend toggles and crosshair readout */

  /* ScatterChart */
  /* Each point a slanted pixel in its series' colour (the accent for one),
     ringed in the surface so overlapping points stay apart; they fade in. The
     shown point is drawn again on top, larger; the keyboard cursor's ring
     takes the text colour. */
  .sl-scatter-point {
    fill: var(--sl-chart-mark, var(--sl-accent));
    stroke: var(--sl-chart-surface, var(--sl-bg));
    stroke-width: 1px;
    transform: var(--sl-slant);
    transform-box: fill-box;
    transform-origin: center;
    animation: sl-chart-fade var(--sl-duration-slow) var(--sl-ease-out) both;
  }
  .sl-scatter-point[data-shown] { stroke-width: 2px; animation: none; }
  .sl-scatter-point[data-cursor] { stroke: var(--sl-text); }
  .sl-scatter-empty { fill: var(--sl-muted); font: var(--sl-font-size-sm) var(--sl-font-sans); }
  /* end ScatterChart */

  /* SpanTimeline */
  /* Nested spans as bars on a time axis. The label column sits at the plot's
     left and, like the rest of the drawing, never mirrors; the zoom row above
     the plot follows the reading direction. Bars take --sl-span-color (a
     categorical slot or a tone, set by the component) and grow in from their
     start when their row appears. */
  .sl-span-zoom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sl-space-2xs) var(--sl-space-sm); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-span-zoom-range { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  /* Horizontal drags zoom, so they never select text or scroll the page sideways; vertical ones still scroll. */
  .sl-span-plot { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  .sl-span-row-fill, .sl-span-hit { fill: transparent; }
  .sl-span-row[data-shown] .sl-span-row-fill, .sl-span-row[data-cursor] .sl-span-row-fill { fill: var(--sl-surface-2); }
  .sl-span-toggle, .sl-span-label-cell, .sl-span-mark { cursor: pointer; }
  .sl-span-chevron { fill: none; stroke: var(--sl-muted); stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; }
  .sl-span-toggle:hover .sl-span-chevron { stroke: var(--sl-text); }
  .sl-span-label { fill: var(--sl-text); font: 11px/1 var(--sl-font-mono); }
  .sl-span-bar {
    fill: var(--sl-span-color, var(--sl-chart-1));
    transform-box: fill-box;
    transform-origin: left;
    animation: sl-span-grow var(--sl-duration-slower) var(--sl-ease-out) both;
  }
  /* The keyboard cursor's bar is ringed in the text colour, so it shows on every bar colour. */
  .sl-span-bar[data-cursor] { stroke: var(--sl-text); stroke-width: 1.5px; }
  @keyframes sl-span-grow { from { transform: scaleX(0); } }
  .sl-span-duration, .sl-span-marker-label { font: 10px/1 var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  .sl-span-duration { fill: var(--sl-muted); }
  .sl-span-marker-group { pointer-events: none; }
  .sl-span-marker { stroke: var(--sl-text); stroke-width: 1px; stroke-dasharray: 3 3; opacity: .7; shape-rendering: crispEdges; }
  .sl-span-marker-label { fill: var(--sl-text); }
  .sl-span-brush { fill: color-mix(in oklab, var(--sl-accent) 14%, transparent); stroke: var(--sl-accent); stroke-width: 1px; shape-rendering: crispEdges; pointer-events: none; }
  .sl-span-table-name { padding-inline-start: calc(var(--sl-space-sm) + (var(--sl-span-level, 1) - 1) * 12px); }
  .sl-span-table-detail { display: block; font-size: var(--sl-font-size-xs); font-weight: 400; }
  /* end SpanTimeline */
}
/* Feedback: Spinner, Skeleton, Shimmer, EmptyState, Countdown, ErrorSummary,
   SaveStatus, Checklist. */

@layer slant {
  /* Spinner: a 2×2 of slanted pixels in the text colour (or the tone's), lit
     in turn around the square, start to end along the top row and back along
     the bottom, each fading as the light moves on. The grid is logical, so
     RTL turns the other way. Each pixel's resting opacity is the frame shown
     with motion off: the head full and the trail behind it fading, which
     still reads as busy. The animation's first frame is that same frame. */
  .sl-spinner {
    --sl-spinner-size: 16px;
    --sl-spinner-gap: 2px;
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: var(--sl-spinner-gap);
    flex-shrink: 0;
    inline-size: var(--sl-spinner-size);
    block-size: var(--sl-spinner-size);
    vertical-align: middle;
  }
  .sl-spinner[data-size="sm"] { --sl-spinner-size: 12px; }
  .sl-spinner[data-size="lg"] { --sl-spinner-size: 22px; --sl-spinner-gap: 3px; }
  .sl-spinner[data-tone] { color: var(--sl-tone); }
  .sl-spinner-pixel {
    border-radius: calc(var(--sl-spinner-size) / 8);
    background: currentColor;
    opacity: var(--sl-spinner-rest, 1);
    transform: var(--sl-slant);
    animation: sl-spinner 1s linear var(--sl-spinner-delay, 0s) infinite;
  }
  /* The order: start-top, end-top, end-bottom, start-bottom. */
  .sl-spinner-pixel:nth-child(2) { --sl-spinner-rest: .25; --sl-spinner-delay: -.75s; }
  .sl-spinner-pixel:nth-child(4) { --sl-spinner-rest: .5; --sl-spinner-delay: -.5s; }
  .sl-spinner-pixel:nth-child(3) { --sl-spinner-rest: .75; --sl-spinner-delay: -.25s; }
  @keyframes sl-spinner { 0% { opacity: 1; } 75%, 100% { opacity: .25; } }
  /* Forced colours would paint the pixels' background as Canvas; keep them in
     the (forced) text colour. */
  @media (forced-colors: active) {
    .sl-spinner-pixel { forced-color-adjust: none; }
  }

  /* Skeleton: placeholder shapes in --sl-line, always aria-hidden. Text is a
     column of bars, each centred in a 1.5em line box, so N lines take the
     room of N lines of body text; the last of several is shorter. A soft band
     of ink sweeps across each shape from the inline start, and rests out of
     sight with motion off. The transparent outline is what forced colours
     paint, so the shapes stay visible there. */
  .sl-skeleton { display: block; inline-size: var(--sl-skeleton-width, auto); }
  .sl-skeleton[data-variant="text"] { display: grid; }
  .sl-skeleton-line,
  .sl-skeleton[data-variant="block"],
  .sl-skeleton[data-variant="circle"] {
    position: relative;
    overflow: hidden;
    background: var(--sl-line);
    outline: 1px solid transparent;
    outline-offset: -1px;
  }
  .sl-skeleton-line {
    --sl-skeleton-bar: var(--sl-skeleton-height, .8em);
    block-size: var(--sl-skeleton-bar);
    margin-block: max(0px, calc((1.5em - var(--sl-skeleton-bar)) / 2));
    border-radius: var(--sl-radius-small);
  }
  .sl-skeleton-line:last-child:not(:first-child) { inline-size: 60%; }
  .sl-skeleton[data-variant="block"] { block-size: var(--sl-skeleton-height, 64px); border-radius: var(--sl-radius); }
  .sl-skeleton[data-variant="circle"] {
    flex-shrink: 0;
    inline-size: var(--sl-skeleton-width, 32px);
    block-size: var(--sl-skeleton-height, auto);
    aspect-ratio: 1;
    border-radius: 50%;
  }
  .sl-skeleton[data-animate] .sl-skeleton-line::after,
  .sl-skeleton[data-animate]:is([data-variant="block"], [data-variant="circle"])::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sl-text) 8%, transparent), transparent);
    transform: translateX(-100%);
    animation: sl-skeleton-sweep 1.6s var(--sl-ease-in-out) infinite;
  }
  [dir="rtl"] .sl-skeleton[data-animate] .sl-skeleton-line::after,
  [dir="rtl"] .sl-skeleton[data-animate]:is([data-variant="block"], [data-variant="circle"])::after { animation-direction: reverse; }
  @keyframes sl-skeleton-sweep { to { transform: translateX(100%); } }

  /* Shimmer: muted text with a band of full text colour sweeping across it
     from the inline start, painted through background-clip: text. `color`
     stays --sl-muted, so contrast checks and fallbacks read a colour that
     holds 4.5:1; only the fill is transparent. With motion reduced there is
     no sweep, so the gradient goes and the text is plain muted, painted in
     its own colour; forced colours drop the effect the same way. Inactive,
     the span adds no style at all. */
  .sl-shimmer[data-active] {
    color: var(--sl-muted);
    background-image: linear-gradient(90deg, var(--sl-muted) 40%, var(--sl-text) 50%, var(--sl-muted) 60%);
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sl-shimmer var(--sl-shimmer-duration, 2000ms) linear infinite;
  }
  [dir="rtl"] .sl-shimmer[data-active] { animation-direction: reverse; }
  @keyframes sl-shimmer { to { background-position: 0 0; } }
  @media (prefers-reduced-motion: reduce), (forced-colors: active) {
    .sl-shimmer[data-active] { background: none; -webkit-text-fill-color: currentColor; }
  }

  /* EmptyState: a quiet, centred column. The default mark is a 3×2 grid of
     slanted pixels in hairline colours: two filled, an empty slot, and the lit
     pixel that belongs in it waiting above. A custom icon inherits the muted
     colour. The title is in the text colour, the description muted, the
     actions a centred row. The grid and the row are logical, so RTL mirrors
     them. Forced colours keep the pixels in the text colour. */
  .sl-empty-state {
    --sl-empty-state-pixel: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sl-space-xs);
    padding: var(--sl-space-2xl) var(--sl-space-xl);
    text-align: center;
  }
  .sl-empty-state[data-size="sm"] { --sl-empty-state-pixel: 7px; gap: var(--sl-space-2xs); padding: var(--sl-space-lg) var(--sl-space-md); }
  .sl-empty-state-icon { display: flex; justify-content: center; margin-block-end: var(--sl-space-sm); color: var(--sl-muted); }
  .sl-empty-state[data-size="sm"] .sl-empty-state-icon { margin-block-end: var(--sl-space-2xs); }
  .sl-empty-state-mark {
    display: grid;
    grid-template-columns: repeat(3, var(--sl-empty-state-pixel));
    grid-template-rows: repeat(2, var(--sl-empty-state-pixel));
    gap: calc(var(--sl-empty-state-pixel) * .3);
  }
  .sl-empty-state-pixel {
    grid-row: 2;
    border-radius: calc(var(--sl-empty-state-pixel) / 4);
    background: var(--sl-line-strong);
    transform: var(--sl-slant);
  }
  .sl-empty-state-pixel[data-lit] { grid-area: 1 / 3; background: var(--sl-accent); }
  .sl-empty-state-pixel[data-hollow] { grid-column: 3; background: transparent; box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  .sl-empty-state-title { margin: 0; font-size: var(--sl-font-size-lg); font-weight: 600; line-height: 1.4; color: var(--sl-text); }
  .sl-empty-state[data-size="sm"] .sl-empty-state-title { font-size: var(--sl-font-size-md); }
  .sl-empty-state-description { max-inline-size: 42ch; font-size: var(--sl-font-size-md); line-height: 1.5; color: var(--sl-muted); }
  .sl-empty-state[data-size="sm"] .sl-empty-state-description { font-size: var(--sl-font-size-sm); }
  .sl-empty-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sl-space-sm); margin-block-start: var(--sl-space-sm); }
  .sl-empty-state[data-size="sm"] .sl-empty-state-actions { margin-block-start: var(--sl-space-2xs); }
  @media (forced-colors: active) {
    .sl-empty-state-pixel { forced-color-adjust: none; background: CanvasText; }
    .sl-empty-state-pixel[data-hollow] { background: transparent; box-shadow: inset 0 0 0 1px CanvasText; }
  }

  /* Countdown: mono digits, two to a group, with a colon of two slanted
     pixels between groups. The digits run left to right in every direction,
     as times do in RTL scripts; the timer itself is inline content, so it
     sits at the inline start. A group that changes re-enters with a short
     drop, which motion-off leaves out. At zero (data-done) and while paused
     the digits turn muted, which still holds 4.5:1; counting up, it is never
     done, and turns muted only while paused. Forced colours keep the colon in
     the text colour. */
  .sl-countdown {
    display: inline-flex;
    align-items: center;
    color: var(--sl-text);
    font: 600 var(--sl-font-size-2xl)/1.1 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    white-space: nowrap;
  }
  .sl-countdown[data-size="sm"] { font-size: var(--sl-font-size-lg); font-weight: 500; line-height: 1.4; letter-spacing: 0; }
  .sl-countdown[data-size="lg"] { font-size: calc(var(--sl-font-size-2xl) * 1.6); }
  .sl-countdown:is([data-done], [data-paused]) { color: var(--sl-muted); }
  .sl-countdown-digits { display: inline-flex; align-items: center; direction: ltr; }
  .sl-countdown-group { display: inline-block; min-inline-size: 2ch; text-align: center; animation: sl-countdown-tick var(--sl-duration-base) var(--sl-ease-out); }
  .sl-countdown-separator { display: inline-flex; flex-direction: column; gap: .2em; padding-inline: .16em; }
  .sl-countdown-pixel {
    inline-size: max(2px, .14em);
    block-size: max(2px, .14em);
    border-radius: 1px;
    background: var(--sl-muted);
    transform: var(--sl-slant);
  }
  @keyframes sl-countdown-tick { from { opacity: .4; transform: translateY(-.12em); } }
  @media (forced-colors: active) {
    .sl-countdown-pixel { forced-color-adjust: none; background: CanvasText; }
  }

  /* ErrorSummary: a panel in the danger tone, as Alert's danger tone looks: a
     danger border on the danger -soft background, with every line of text in
     --sl-text (on Paper, the danger colour itself would not hold 4.5:1 on its
     soft tint). A slanted danger pixel leads the heading; the list and the
     description line up with the heading's text; the links are underlined in
     the danger colour, thicker on hover. Focus moved to it by keyboard shows
     the ring around the panel. */
  .sl-error-summary {
    --sl-error-summary-indent: calc(8px + var(--sl-space-sm));
    padding: var(--sl-space-md) var(--sl-space-lg);
    border: 1px solid var(--sl-danger);
    border-radius: var(--sl-radius-small);
    background: var(--sl-danger-soft);
    color: var(--sl-text);
    font-size: var(--sl-font-size-md);
    line-height: 1.5;
  }
  .sl-error-summary-head { display: flex; align-items: center; gap: var(--sl-space-sm); }
  .sl-error-summary-title { margin: 0; font-size: var(--sl-font-size-lg); font-weight: 600; line-height: 1.4; color: var(--sl-text); }
  .sl-error-summary-description { margin-block-start: var(--sl-space-2xs); padding-inline-start: var(--sl-error-summary-indent); }
  .sl-error-summary-list {
    display: grid;
    gap: var(--sl-space-2xs);
    margin: var(--sl-space-xs) 0 0;
    padding: 0;
    padding-inline-start: var(--sl-error-summary-indent);
    list-style: none;
  }
  .sl-error-summary-link {
    color: var(--sl-text);
    font-weight: 500;
    text-decoration-line: underline;
    text-decoration-color: var(--sl-danger);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
  }
  .sl-error-summary-link:hover { text-decoration-thickness: 2px; }
  .sl-error-summary-link:focus-visible { border-radius: 2px; }
  /* end ErrorSummary */

  /* SaveStatus: one line that never changes width. The mark sits in a fixed
     square in the state's tone (a check, the Spinner, the accent pixel, a
     warning or danger icon). The line is one grid cell holding every state's
     label stacked, the others hidden, so it is as wide as the longest; the
     time and the Retry keep their room in every state, Retry hidden outside
     error and offline. The calm states read muted, the ones that need the
     reader in --sl-text. The time follows a slanted pixel of a separator. */
  .sl-save-status {
    --sl-save-status-mark: 16px;
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-xs);
    min-block-size: var(--sl-control-sm);
    border-radius: var(--sl-radius-small);
    color: var(--sl-muted);
    font-size: var(--sl-font-size-md);
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
  }
  .sl-save-status[data-size="sm"] { --sl-save-status-mark: 14px; gap: var(--sl-space-2xs); font-size: var(--sl-font-size-sm); }
  .sl-save-status-mark {
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    inline-size: var(--sl-save-status-mark);
    block-size: var(--sl-save-status-mark);
    color: var(--sl-tone);
  }
  .sl-save-status-line { display: inline-grid; }
  .sl-save-status-label { grid-area: 1 / 1; }
  .sl-save-status-label:not([data-shown]) { visibility: hidden; }
  .sl-save-status:is([data-state="unsaved"], [data-state="offline"], [data-state="conflict"], [data-state="error"]) .sl-save-status-line { color: var(--sl-text); }
  .sl-save-status-time { display: inline-flex; align-items: center; gap: var(--sl-space-xs); font-variant-numeric: tabular-nums; }
  .sl-save-status-separator {
    flex-shrink: 0;
    inline-size: 3px;
    block-size: 3px;
    border-radius: 1px;
    background: currentColor;
    transform: var(--sl-slant);
  }
  .sl-save-status-retry, .sl-save-status-action { display: inline-flex; align-items: center; }
  .sl-save-status-retry:not([data-shown]) { visibility: hidden; }
  @media (forced-colors: active) {
    .sl-save-status-separator { forced-color-adjust: none; background: CanvasText; }
  }
  /* end SaveStatus */

  /* Checklist: compact rows split by hairlines. The tones are only on the
     marks (a check in success, an X in danger, a warning triangle, a muted
     circle or Spinner for pending, a muted dash for skipped); every line of
     text is --sl-text or --sl-muted, which hold their contrast in every
     theme. A skipped check's label is muted. The action sits at the row's
     inline end in its own column, made only when there is one. A group's
     heading and count share a row over a hairline. */
  .sl-checklist { display: flex; flex-direction: column; gap: var(--sl-space-md); color: var(--sl-text); font-size: var(--sl-font-size-md); line-height: 1.5; }
  .sl-checklist-summary { margin: 0; color: var(--sl-muted); font-size: var(--sl-font-size-sm); font-variant-numeric: tabular-nums; }
  .sl-checklist-group { display: flex; flex-direction: column; }
  .sl-checklist-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sl-space-2xs) var(--sl-space-md);
    padding-block-end: var(--sl-space-2xs);
    border-block-end: 1px solid var(--sl-line);
  }
  .sl-checklist-group-label { margin: 0; color: var(--sl-text); font-size: var(--sl-font-size-md); font-weight: 600; line-height: 1.4; }
  .sl-checklist-group-count { color: var(--sl-muted); font-size: var(--sl-font-size-sm); font-variant-numeric: tabular-nums; }
  .sl-checklist-list { margin: 0; padding: 0; list-style: none; }
  .sl-checklist-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: var(--sl-space-sm);
    padding-block: var(--sl-space-xs);
  }
  .sl-checklist-item + .sl-checklist-item { border-block-start: 1px solid var(--sl-line); }
  .sl-checklist-mark { display: grid; place-items: center; inline-size: 16px; block-size: 1.5em; color: var(--sl-tone); }
  .sl-checklist-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-3xs); min-inline-size: 0; }
  .sl-checklist-label { font-weight: 500; overflow-wrap: anywhere; }
  .sl-checklist-item[data-status="skipped"] .sl-checklist-label { color: var(--sl-muted); }
  .sl-checklist-reason { color: var(--sl-muted); font-size: var(--sl-font-size-sm); overflow-wrap: anywhere; }
  .sl-checklist-next { font-size: var(--sl-font-size-sm); overflow-wrap: anywhere; }
  .sl-checklist-next-lead { font-weight: 600; }
  .sl-checklist-evidence {
    color: var(--sl-text);
    font-size: var(--sl-font-size-sm);
    text-decoration-line: underline;
    text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
    transition: text-decoration-color var(--sl-duration-base);
  }
  .sl-checklist-evidence:hover { text-decoration-color: currentColor; }
  .sl-checklist-evidence:focus-visible { border-radius: 2px; }
  .sl-checklist-action { display: flex; grid-column: 3; align-items: center; gap: var(--sl-space-xs); }
  /* end Checklist */
}
/* People: Avatar, AvatarStack, PixelBuddy, AvatarEditor. */

@layer slant {
  /* Avatar */
  .sl-avatar {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: var(--sl-avatar-size, 34px);
    height: var(--sl-avatar-size, 34px);
    border: 2px solid var(--sl-surface);
    border-radius: 50%;
    background: var(--sl-surface-2);
    font: 600 var(--sl-font-size-xs)/1 var(--sl-font-mono);
    color: var(--sl-text);
    animation: sl-pop var(--sl-duration-slow) var(--sl-ease-out);
  }
  .sl-avatar[data-tone="accent"] { background: var(--sl-accent-soft); color: var(--sl-accent); }
  .sl-avatar[data-overflow] { color: var(--sl-muted); }
  /* The photo sits over the initials, which show until it loads and stay if it
     fails; once it has loaded they hide, so a transparent photo shows no letters. */
  .sl-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
  .sl-avatar[data-loaded] .sl-avatar-initials { visibility: hidden; }
  .sl-avatar-status {
    position: absolute;
    inset-inline-end: -1px;
    inset-block-end: -1px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--sl-surface);
    border-radius: 3px;
    background: var(--sl-muted);
    transform: var(--sl-slant);
  }
  .sl-avatar-status[data-status="online"] { background: var(--sl-success); }
  .sl-avatar-status[data-status="away"] { background: var(--sl-warning); }

  /* AvatarStack */
  .sl-avatars { display: flex; margin: 0; padding: 0; padding-inline-start: 8px; list-style: none; }
  .sl-avatars-item { display: flex; margin-inline-start: -8px; }

  /* PixelBuddy */
  /* The body's fill and ink are the identity palette's, set in the markup;
     the ground and the motion come from the theme. Motion runs only
     while the buddy carries data-running (on screen, tab visible, not held,
     motion allowed), so a stopped buddy stands in its resting pose: on the
     ground, eyes open. Each buddy starts its loops at its own --sl-buddy-phase. */
  .sl-buddy { display: block; flex: none; overflow: visible; }
  .sl-buddy-motion { transform-box: fill-box; transform-origin: 50% 85%; }
  .sl-buddy-eyes, .sl-buddy-ground { transform-box: fill-box; transform-origin: center; }
  .sl-buddy-ground { fill: var(--sl-line-strong, currentColor); opacity: .9; }
  .sl-buddy[data-motion="working"][data-running] .sl-buddy-motion { animation: sl-buddy-float 2.4s var(--sl-ease-in-out) infinite calc(var(--sl-buddy-phase, 0) * -2.4s); }
  .sl-buddy[data-motion="working"][data-running] .sl-buddy-ground { animation: sl-buddy-ground 2.4s var(--sl-ease-in-out) infinite calc(var(--sl-buddy-phase, 0) * -2.4s); }
  .sl-buddy[data-motion="working"][data-running] .sl-buddy-eyes { animation: sl-buddy-blink 3.2s infinite calc(var(--sl-buddy-phase, 0) * -3.2s); }
  /* Under a mouse, a running buddy hops with a squash and stretch and blinks once. */
  @media (hover: hover) {
    .sl-buddy[data-running]:hover .sl-buddy-motion { animation: sl-buddy-hop var(--sl-duration-slower) var(--sl-ease-out); }
    .sl-buddy[data-running]:hover .sl-buddy-eyes { animation: sl-buddy-blink-once var(--sl-duration-slower); }
  }
  @keyframes sl-buddy-float { 50% { transform: translateY(-10%); } }
  @keyframes sl-buddy-ground { 50% { transform: scaleX(.7); opacity: .45; } }
  @keyframes sl-buddy-blink { 0%, 92%, 100% { transform: none; } 96% { transform: scaleY(.1); } }
  @keyframes sl-buddy-blink-once { 0%, 100% { transform: none; } 50% { transform: scaleY(.1); } }
  @keyframes sl-buddy-hop {
    0%, 100% { transform: none; }
    18% { transform: translateY(3%) scale(1.12, .86); }
    48% { transform: translateY(-18%) scale(.94, 1.08); }
    78% { transform: translateY(0) scale(1.06, .94); }
  }

  /* AvatarEditor */
  /* The preview beside the controls, wrapping above them when the row is
     narrow (no media query: the controls claim the room first). */
  .sl-avatar-editor { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--sl-space-xl); min-width: 0; }
  .sl-avatar-editor-preview {
    display: flex;
    flex: 1 1 200px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sl-space-md);
    min-width: 0;
    padding: var(--sl-space-xl) var(--sl-space-lg);
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    /* A recessed well with a faint dot grid: the pixel floor the buddy stands on. */
    background: radial-gradient(circle, color-mix(in srgb, var(--sl-text) 10%, transparent) 1px, transparent 1.5px) 0 0 / 14px 14px, var(--sl-bg);
    transition: border-radius var(--sl-duration-slow);
  }
  .sl-avatar-editor-stage { position: relative; padding-block-start: 14px; line-height: 0; }
  .sl-avatar-editor-stage .sl-buddy { position: relative; }
  /* The buddy's shadow, under its bottom edge. The lean puts that edge right of
     centre whatever the text direction, so this one is placed physically. */
  .sl-avatar-editor-stage::before {
    content: '';
    position: absolute;
    bottom: 3%;
    left: 22%;
    width: 70%;
    height: 7%;
    border-radius: 50%;
    background: color-mix(in srgb, var(--sl-text) 14%, transparent);
    filter: blur(3px);
  }
  .sl-avatar-editor-name { max-width: 100%; font-size: var(--sl-font-size-lg); font-weight: 600; text-align: center; overflow-wrap: anywhere; }
  .sl-avatar-editor-controls { display: grid; flex: 999 1 300px; align-content: start; gap: var(--sl-space-lg); min-width: 0; }
  .sl-avatar-editor-group { display: grid; gap: var(--sl-space-sm); min-width: 0; }
  .sl-avatar-editor-group + .sl-avatar-editor-group { padding-block-start: var(--sl-space-lg); border-block-start: 1px solid var(--sl-line); }
  .sl-avatar-editor-choices { display: flex; flex-wrap: wrap; gap: var(--sl-space-2xs); }
  .sl-avatar-editor-choice {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sl-space-2xs);
    min-inline-size: 58px;
    padding: 7px 6px 6px;
    border: 1px solid transparent;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-muted);
    font-size: var(--sl-font-size-xs);
    line-height: 1.2;
    transition: background var(--sl-duration-base), border-color var(--sl-duration-base), color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-avatar-editor-choice:hover { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-avatar-editor-choice[aria-checked="true"] { border-color: var(--sl-accent); background: var(--sl-accent-soft); color: var(--sl-text); }
  /* The checked mark on named options: a slanted pixel in the corner. */
  .sl-avatar-editor-group:not([data-group="color"]) .sl-avatar-editor-choice[aria-checked="true"]::after {
    content: '';
    position: absolute;
    inset-block-start: 5px;
    inset-inline-end: 5px;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--sl-accent);
    transform: var(--sl-slant);
  }
  .sl-avatar-editor-group[data-group="color"] .sl-avatar-editor-choice { min-inline-size: 0; padding: 5px; }
  .sl-avatar-editor-choice-label { white-space: nowrap; }
  /* An option's buddy hops when the pointer reaches anywhere on the option. */
  @media (hover: hover) {
    .sl-avatar-editor-choice:hover .sl-buddy[data-running] .sl-buddy-motion { animation: sl-buddy-hop var(--sl-duration-slower) var(--sl-ease-out); }
    .sl-avatar-editor-choice:hover .sl-buddy[data-running] .sl-buddy-eyes { animation: sl-buddy-blink-once var(--sl-duration-slower); }
  }
  .sl-avatar-editor-custom { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-sm) var(--sl-space-md); padding-block-start: var(--sl-space-2xs); }
  .sl-avatar-editor-custom-label { display: inline-flex; align-items: center; gap: var(--sl-space-sm); font-size: var(--sl-font-size-sm); color: var(--sl-muted); cursor: pointer; }
  .sl-avatar-editor-custom[data-active] .sl-avatar-editor-custom-label { color: var(--sl-text); }
  /* The native colour input, drawn as a slanted swatch of the chosen fill. */
  .sl-avatar-editor-color {
    inline-size: 26px;
    block-size: 26px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--sl-line-strong);
    border-radius: 7px;
    background: none;
    transform: var(--sl-slant);
    cursor: pointer;
    appearance: none;
  }
  .sl-avatar-editor-color::-webkit-color-swatch-wrapper { padding: 0; }
  .sl-avatar-editor-color::-webkit-color-swatch { border: 0; border-radius: 0; }
  .sl-avatar-editor-color::-moz-color-swatch { border: 0; border-radius: 0; }
  .sl-avatar-editor-custom[data-active] .sl-avatar-editor-color { border-color: var(--sl-accent); box-shadow: 0 0 0 1px var(--sl-accent); }
  .sl-avatar-editor-hex { inline-size: 12ch; min-height: var(--sl-control-sm); padding-inline: 8px; font-size: var(--sl-font-size-sm); }
  /* The "+N" bubble as a button: it opens the full list. */
  .sl-avatars-more { padding: 0; transition: background var(--sl-duration-base), color var(--sl-duration-base); }
  .sl-avatars-more:hover { color: var(--sl-text); }
  .sl-avatars-more[aria-expanded="true"] { background: var(--sl-accent-soft); color: var(--sl-accent); }
  /* The full list, right after the stack: one row per person. It sets a display,
     so it restates [hidden] itself. */
  .sl-avatars-panel { display: grid; gap: var(--sl-space-xs); margin: 0; margin-block-start: var(--sl-space-sm); padding: 0; list-style: none; animation: sl-in var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-avatars-panel[hidden] { display: none; }
  .sl-avatars-panel-item { display: flex; align-items: center; gap: var(--sl-space-sm); min-width: 0; }
  .sl-avatars-panel-name { overflow: hidden; font-size: var(--sl-font-size-md); text-overflow: ellipsis; white-space: nowrap; }
  .sl-avatars-panel-status { flex-shrink: 0; font-size: var(--sl-font-size-sm); color: var(--sl-muted); }

  /* Avatar tint and placeholder. A tint is a chart colour mixed softly into
     the surface, with the initials in --sl-text, so they read in every theme.
     Unassigned is a dashed hairline circle, unfilled, with a muted glyph. */
  .sl-avatar[data-tint="1"] { --sl-avatar-tint: var(--sl-chart-1); }
  .sl-avatar[data-tint="2"] { --sl-avatar-tint: var(--sl-chart-2); }
  .sl-avatar[data-tint="3"] { --sl-avatar-tint: var(--sl-chart-3); }
  .sl-avatar[data-tint="4"] { --sl-avatar-tint: var(--sl-chart-4); }
  .sl-avatar[data-tint="5"] { --sl-avatar-tint: var(--sl-chart-5); }
  .sl-avatar[data-tint] { background: color-mix(in srgb, var(--sl-avatar-tint) 24%, var(--sl-surface)); color: var(--sl-text); }
  .sl-avatar[data-unassigned] { border: 1px dashed var(--sl-muted); background: transparent; color: var(--sl-muted); }
  .sl-avatar-glyph { display: block; }
  /* end Avatar tint and placeholder */
}
/* Chat and AI: Thread, Message, PromptInput, CodeBlock, Reasoning, Sources,
   AgentPlan, AgentTask, Marker. Each component keeps to its own section. */

@layer slant {
  /* Thread (positioned, so the messages' hidden author prefixes scroll and clip with the log) */
  .sl-thread { position: relative; display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow-y: auto; padding: 12px 0; overscroll-behavior: contain; }

  /* Message (rises in with sl-in from base.css). The root lines the bubble and
     its actions up by author; the bubble shrinks to its content, up to the root. */
  .sl-message { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sl-space-2xs); max-width: 85%; margin: 0; animation: sl-in var(--sl-duration-slow) var(--sl-ease-out); }
  .sl-message[data-author="assistant"] { align-self: flex-start; }
  .sl-message[data-author="user"] { align-self: flex-end; }
  .sl-message-bubble { max-width: 100%; padding: 8px 11px; border-radius: var(--sl-radius); font-size: var(--sl-font-size-md); line-height: 1.5; overflow-wrap: break-word; }
  .sl-message[data-author="assistant"] .sl-message-bubble { border: 1px solid var(--sl-line); background: var(--sl-surface-2); border-end-start-radius: var(--sl-radius-small); }
  .sl-message[data-author="user"] .sl-message-bubble { background: var(--sl-accent); color: var(--sl-accent-text); border-end-end-radius: var(--sl-radius-small); }
  .sl-message[data-typing] .sl-message-bubble { display: flex; align-items: center; }
  .sl-message[data-author="assistant"][data-typing] .sl-message-bubble { color: var(--sl-muted); }

  /* Thread: jump to latest. The frame holds the log and, beside it (never in
     its live region), the button floating centred over the log's foot. */
  .sl-thread-frame { position: relative; isolation: isolate; }
  .sl-thread-jump {
    position: absolute;
    inset-inline: 0;
    inset-block-end: var(--sl-space-sm);
    z-index: 1;
    width: max-content;
    margin-inline: auto;
    box-shadow: var(--sl-shadow-md);
    animation: sl-in var(--sl-duration-base) var(--sl-ease-out);
  }

  /* Message: actions. Quiet icon buttons under an answer, muted until hovered or pressed. */
  .sl-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3xs); }
  .sl-message-action { color: var(--sl-muted); }
  .sl-message-action:is(:hover, [aria-pressed="true"]) { color: var(--sl-text); }

  /* PromptInput: one surface holding the attachments, a bare field that
     grows, and a bar under it with the toolbar at the inline start and send
     at the end. The surface takes the focus ring (:focus-within), so the
     textarea's own goes. */
  .sl-prompt {
    display: grid;
    gap: var(--sl-space-2xs);
    margin: 0;
    padding: var(--sl-space-sm);
    border: 1px solid var(--sl-line-field);
    border-radius: var(--sl-radius);
    background: var(--sl-surface);
    color: var(--sl-text);
    transition: border-color var(--sl-duration-base), border-radius var(--sl-duration-slow);
  }
  .sl-prompt:focus-within { border-color: var(--sl-accent); outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); }
  .sl-prompt-files { margin-block-end: var(--sl-space-2xs); }
  .sl-prompt-field { padding: var(--sl-space-2xs) var(--sl-space-xs); border: 0; border-radius: 0; background: transparent; }
  .sl-prompt-field:focus-visible { outline: 0; }
  .sl-prompt-bar { display: flex; align-items: center; gap: var(--sl-space-xs); min-width: 0; }
  .sl-prompt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-3xs); min-width: 0; }
  .sl-prompt-send { flex-shrink: 0; margin-inline-start: auto; }

  /* CodeBlock: a framed block on the theme's background, a bar (header slot,
     the language or file name, copy) over a pre that scrolls by itself. The
     token colours hold 4.5:1 on --sl-bg in every theme. */
  .sl-code { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-bg); color: var(--sl-text); }
  .sl-code-bar { display: flex; align-items: center; gap: var(--sl-space-sm); min-block-size: calc(var(--sl-control-sm) + 2 * var(--sl-space-xs)); padding: var(--sl-space-xs); padding-inline-start: var(--sl-space-sm); border-block-end: 1px solid var(--sl-line); }
  .sl-code-header { display: flex; align-items: center; gap: var(--sl-space-3xs); min-width: 0; }
  .sl-code-title { flex: 1; min-width: 0; overflow: hidden; font: var(--sl-font-size-xs)/1.4 var(--sl-font-mono); color: var(--sl-muted); text-overflow: ellipsis; white-space: nowrap; }
  /* Alone at the start, the title lines up with the code under it. */
  .sl-code-title:first-child { padding-inline-start: calc(var(--sl-space-lg) - var(--sl-space-sm)); }
  .sl-code-copy { flex-shrink: 0; margin-inline-start: auto; }
  /* The wrap toggle sits before Copy and takes over the push to the end. */
  .sl-code-wrap { flex-shrink: 0; margin-inline-start: auto; }
  .sl-code-wrap + .sl-code-copy { margin-inline-start: 0; }
  .sl-code-copy[data-copied] .sl-code-copy-icon { color: var(--sl-success); }
  .sl-code-pre { flex: 1 1 auto; margin: 0; padding: var(--sl-space-md) var(--sl-space-lg); overflow: auto; font: var(--sl-font-size-sm)/1.65 var(--sl-font-mono); color: var(--sl-text); white-space: pre; tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--sl-line-strong) transparent; }
  .sl-code-pre:focus-visible { outline-offset: calc(-1 * var(--sl-focus-ring-width)); }
  .sl-code-text { font: inherit; }
  .sl-code[data-wrap] .sl-code-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  /* Line numbers: a grid of number and line, the numbers muted, right-aligned and left out of a selection. */
  .sl-code[data-numbered] .sl-code-text { display: grid; grid-template-columns: auto max-content; column-gap: var(--sl-space-md); }
  .sl-code[data-numbered][data-wrap] .sl-code-text { grid-template-columns: auto minmax(0, 1fr); }
  .sl-code-number { color: var(--sl-muted); text-align: end; font-variant-numeric: tabular-nums; -webkit-user-select: none; user-select: none; }
  .sl-code-token[data-token="comment"] { color: var(--sl-muted); font-style: italic; }
  .sl-code-token[data-token="string"] { color: var(--sl-success); }
  .sl-code-token[data-token="keyword"] { color: var(--sl-accent); }
  .sl-code-token[data-token="attribute"] { color: var(--sl-warning); }
  .sl-code-token[data-token="number"] { color: var(--sl-danger); }

  /* Reasoning: a quiet, inline toggle (muted, the size of body text) whose
     sparkle lights up while the model thinks, over the reasoning in smaller
     muted text behind a hairline that drops from the sparkle. */
  .sl-reasoning { min-inline-size: 0; }
  .sl-reasoning-toggle { inline-size: fit-content; max-inline-size: 100%; min-block-size: var(--sl-control-sm); justify-content: flex-start; gap: var(--sl-space-xs); color: var(--sl-muted); font-size: var(--sl-font-size-md); transition: color var(--sl-duration-base); }
  .sl-reasoning-toggle:enabled:not([aria-disabled="true"]):hover { color: var(--sl-text); }
  .sl-reasoning-icon { flex-shrink: 0; transition: color var(--sl-duration-base); }
  .sl-reasoning[data-thinking] .sl-reasoning-icon { color: var(--sl-accent); }
  .sl-reasoning-title { min-inline-size: 0; overflow-wrap: anywhere; }
  .sl-reasoning-body { margin-inline-start: var(--sl-space-xs); padding-inline-start: var(--sl-space-md); border-inline-start: 1px solid var(--sl-line-strong); font-size: var(--sl-font-size-sm); line-height: 1.6; color: var(--sl-muted); overflow-wrap: anywhere; }

  /* Sources: the same quiet toggle, led by overlapping site initials, over a
     numbered list: underlined links, the site muted beside each, and an
     optional muted line under it. */
  .sl-sources { min-inline-size: 0; }
  .sl-sources-toggle { inline-size: fit-content; max-inline-size: 100%; min-block-size: var(--sl-control-sm); justify-content: flex-start; gap: var(--sl-space-xs); color: var(--sl-muted); font-size: var(--sl-font-size-md); transition: color var(--sl-duration-base); }
  .sl-sources-toggle:enabled:not([aria-disabled="true"]):hover { color: var(--sl-text); }
  .sl-sources-chips { display: inline-flex; flex-shrink: 0; }
  .sl-sources-chip { display: inline-grid; place-items: center; inline-size: 18px; block-size: 18px; border: 1px solid var(--sl-line-strong); border-radius: var(--sl-radius-full); background: var(--sl-surface-2); color: var(--sl-text); font: 600 10px/1 var(--sl-font-sans); }
  .sl-sources-chip + .sl-sources-chip { margin-inline-start: -5px; }
  .sl-sources-title { min-inline-size: 0; overflow-wrap: anywhere; }
  .sl-sources-list { margin: 0; padding-inline-start: 2em; list-style: decimal; line-height: 1.5; }
  .sl-sources-item { padding-inline-start: var(--sl-space-3xs); }
  .sl-sources-item + .sl-sources-item { margin-block-start: var(--sl-space-sm); }
  .sl-sources-item::marker { color: var(--sl-muted); font-family: var(--sl-font-mono); font-size: var(--sl-font-size-xs); font-variant-numeric: tabular-nums; }
  /* The link and the site are isolated, so the site follows the link in the
     inline direction whatever script either is in (English titles under RTL). */
  .sl-sources-link, .sl-sources-site { unicode-bidi: isolate; }
  .sl-sources-link { color: var(--sl-text); text-decoration-line: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; overflow-wrap: anywhere; transition: text-decoration-color var(--sl-duration-base); }
  .sl-sources-link:hover { text-decoration-color: currentColor; }
  .sl-sources-external { display: inline-block; margin-inline-start: var(--sl-space-3xs); vertical-align: -1px; color: var(--sl-muted); }
  [dir="rtl"] .sl-sources-external { transform: scaleX(-1); }
  .sl-sources-site { margin-inline-start: var(--sl-space-xs); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-sources-description { margin-block-start: var(--sl-space-3xs); font-size: var(--sl-font-size-sm); color: var(--sl-muted); overflow-wrap: anywhere; }

  /* AgentPlan */
  .sl-plan { display: flex; flex-direction: column; gap: var(--sl-space-md); padding: var(--sl-space-lg); border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); }
  .sl-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--sl-space-md); }
  .sl-plan-title { margin: 0; font-size: var(--sl-font-size-lg); font-weight: 600; line-height: 1.4; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-plan-progress { margin: 0; font: var(--sl-font-size-xs)/1.8 var(--sl-font-mono); font-variant-numeric: tabular-nums; color: var(--sl-muted); white-space: nowrap; }
  .sl-plan-description { flex-basis: 100%; }

  /* AgentTask (the mark takes its colour from data-tone; the output is a Disclosure) */
  .sl-task { display: flex; flex-direction: column; gap: var(--sl-space-sm); padding: var(--sl-space-md); border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); transition: border-color var(--sl-duration-base); }
  .sl-task[data-status="running"] { border-color: color-mix(in srgb, var(--sl-accent) 45%, var(--sl-line)); }
  .sl-task[data-status="failed"] { border-color: color-mix(in srgb, var(--sl-danger) 45%, var(--sl-line)); }
  .sl-task[data-output] { padding-block-end: var(--sl-space-xs); }
  .sl-task-head { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--sl-space-sm); align-items: start; }
  .sl-task-mark { display: grid; place-items: center; inline-size: 16px; block-size: 20px; color: var(--sl-tone, var(--sl-muted)); }
  .sl-task-text { min-inline-size: 0; }
  .sl-task-title { margin: 0; font-size: var(--sl-font-size-md); font-weight: 500; line-height: 20px; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-task[data-status="pending"] .sl-task-title { color: var(--sl-muted); }
  .sl-task-detail { overflow-wrap: anywhere; }
  .sl-task-steps { margin-block-start: 2px; margin-inline-start: calc(16px + var(--sl-space-sm)); }
  .sl-task-output { margin-inline: calc(var(--sl-space-md) * -1); padding-inline: var(--sl-space-md); border-block-start: 1px solid var(--sl-line); }
  .sl-task .sl-task-toggle { min-height: var(--sl-control-sm); font-size: var(--sl-font-size-sm); }

  /* Marker: a centred row (mark, text, time) with a hairline out to each side. */
  .sl-marker {
    display: flex;
    align-items: center;
    gap: var(--sl-space-sm);
    margin: 0;
    padding-block: var(--sl-space-2xs);
    color: var(--sl-muted);
    font-size: var(--sl-font-size-sm);
    line-height: 1.4;
    animation: sl-in var(--sl-duration-slow) var(--sl-ease-out);
  }
  .sl-marker::before, .sl-marker::after { content: ""; flex: 1 1 0; min-width: var(--sl-space-lg); border-block-start: 1px solid var(--sl-line); }
  .sl-marker-icon { display: inline-flex; flex-shrink: 0; align-items: center; color: var(--sl-tone, var(--sl-accent)); }
  .sl-marker-text { min-width: 0; text-align: center; overflow-wrap: anywhere; }
  .sl-marker-time { flex-shrink: 0; font-family: var(--sl-font-mono); font-size: var(--sl-font-size-xs); font-variant-numeric: tabular-nums; }

  /* AgentApproval: a card with a warning strip while it waits (a pulsing
     slanted pixel and the waiting line, text in --sl-text on the soft tone),
     the tool in mono over the title and the reason, the request in a region
     that scrolls past about eight lines, and the answers along the foot.
     Answered, the strip goes and a status line replaces the answers. */
  .sl-approval { display: flex; flex-direction: column; min-inline-size: 0; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); color: var(--sl-text); transition: border-color var(--sl-duration-base); }
  .sl-approval[data-state="waiting"] { border-color: color-mix(in srgb, var(--sl-warning) 50%, var(--sl-line)); }
  .sl-approval-strip {
    display: flex;
    align-items: center;
    gap: var(--sl-space-xs);
    padding: var(--sl-space-xs) var(--sl-space-md);
    border-block-end: 1px solid color-mix(in srgb, var(--sl-warning) 30%, var(--sl-line));
    border-start-start-radius: calc(var(--sl-radius) - 1px);
    border-start-end-radius: calc(var(--sl-radius) - 1px);
    background: var(--sl-warning-soft);
    color: var(--sl-text);
    font-size: var(--sl-font-size-sm);
    line-height: 1.4;
  }
  .sl-approval-pulse { animation: sl-approval-pulse 1.6s ease-in-out infinite; }
  @keyframes sl-approval-pulse { 50% { opacity: .3; } }
  .sl-approval-waiting { min-inline-size: 0; overflow-wrap: anywhere; }
  .sl-approval-body { display: flex; flex-direction: column; gap: var(--sl-space-2xs); min-inline-size: 0; padding: var(--sl-space-md) var(--sl-space-md) var(--sl-space-xs); }
  .sl-approval-tool { font: var(--sl-font-size-xs)/1.5 var(--sl-font-mono); color: var(--sl-muted); overflow-wrap: anywhere; }
  .sl-approval-title { margin: 0; font-size: var(--sl-font-size-md); font-weight: 600; line-height: 1.45; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-approval-reason { margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); overflow-wrap: anywhere; }
  /* The em is the region's own 12px, so the cap is eight 1.65 lines and the padding of a plain-text request. */
  .sl-approval-detail {
    max-block-size: calc(8 * 1.65em + 2 * var(--sl-space-sm) + 2px);
    margin-block-start: var(--sl-space-xs);
    overflow: auto;
    border-radius: var(--sl-radius-small);
    font-size: var(--sl-font-size-sm);
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--sl-line-strong) transparent;
  }
  .sl-approval-text { margin: 0; padding: var(--sl-space-sm) var(--sl-space-md); border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); background: var(--sl-bg); font: var(--sl-font-size-sm)/1.65 var(--sl-font-mono); color: var(--sl-text); white-space: pre-wrap; overflow-wrap: anywhere; }
  .sl-approval-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs) var(--sl-space-md); padding: var(--sl-space-xs) var(--sl-space-md) var(--sl-space-md); }
  .sl-approval-keys { flex: 1 1 12em; min-inline-size: 0; font-size: var(--sl-font-size-xs); line-height: 1.4; color: var(--sl-muted); }
  .sl-approval-buttons { display: flex; flex-wrap: wrap; gap: var(--sl-space-xs); margin-inline-start: auto; }
  .sl-approval-status { display: flex; align-items: center; gap: var(--sl-space-xs); padding: var(--sl-space-xs) var(--sl-space-md) var(--sl-space-md); font-size: var(--sl-font-size-sm); line-height: 1.4; color: var(--sl-text); }
  .sl-approval-mark { display: inline-grid; flex-shrink: 0; place-items: center; inline-size: 18px; block-size: 18px; border-radius: var(--sl-radius-small); background: var(--sl-tone-soft); color: var(--sl-tone); transform: var(--sl-slant); }
  /* Touch screens have no Enter or Escape to hint at. */
  @media (hover: none) { .sl-approval-keys { display: none; } }
  @media (prefers-reduced-motion: reduce) { .sl-approval-pulse { animation: none; } }
  /* end AgentApproval */

  /* AgentQuestions: a card with the title, a fieldset per question (a muted
     mono number over the question, a muted description, the choices as
     RadioGroup or CheckboxGroup cards, the Other field under them and the
     error under all), and the answers along the foot. Sent, it holds each
     question over its answer behind a hairline, and a status line. */
  .sl-questions { display: flex; flex-direction: column; gap: var(--sl-space-lg); min-inline-size: 0; margin: 0; padding: var(--sl-space-md); border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); color: var(--sl-text); }
  .sl-questions[data-submitted] { gap: var(--sl-space-md); }
  .sl-questions-title { margin: 0; font-size: var(--sl-font-size-md); font-weight: 600; line-height: 1.45; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-question { display: flex; flex-direction: column; gap: var(--sl-space-xs); min-inline-size: 0; margin: 0; padding: 0; border: 0; }
  /* The rendered legend sits outside the fieldset's flex layout, so it keeps its own gap. */
  .sl-question-legend { display: flex; flex-direction: column; gap: var(--sl-space-3xs); margin-block-end: var(--sl-space-xs); padding: 0; }
  .sl-question-number { font: var(--sl-font-size-xs)/1.5 var(--sl-font-mono); font-variant-numeric: tabular-nums; color: var(--sl-muted); }
  .sl-question-text { font-size: var(--sl-font-size-md); font-weight: 500; line-height: 1.45; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-question-description { margin: calc(var(--sl-space-3xs) - var(--sl-space-xs)) 0 var(--sl-space-3xs); font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); overflow-wrap: anywhere; }
  .sl-question-choices { min-inline-size: 0; }
  .sl-question-badge { margin-inline-start: var(--sl-space-2xs); padding: 0 var(--sl-space-xs); font-size: var(--sl-font-size-xs); vertical-align: 1px; }
  /* A chosen card has the badge's own soft fill, so a hairline keeps it apart. */
  .sl-question-choices [data-checked] .sl-question-badge { border-color: color-mix(in srgb, var(--sl-accent) 45%, transparent); }
  .sl-question-other { margin-block-start: var(--sl-space-3xs); }
  .sl-question-other[data-alone] { margin-block-start: 0; }
  .sl-question-error { display: flex; align-items: baseline; gap: var(--sl-space-xs); margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-danger); }
  .sl-question-error-mark { flex-shrink: 0; inline-size: 6px; block-size: 6px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant) translateY(-1px); }
  .sl-questions-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sl-space-xs); }
  .sl-questions-summary { display: flex; flex-direction: column; gap: var(--sl-space-md); min-inline-size: 0; border-radius: var(--sl-radius-small); }
  .sl-questions-answers { display: grid; gap: var(--sl-space-sm); margin: 0; }
  .sl-questions-answer { display: grid; gap: var(--sl-space-3xs); min-inline-size: 0; padding-inline-start: var(--sl-space-sm); border-inline-start: 2px solid var(--sl-line-strong); }
  .sl-questions-question { font-size: var(--sl-font-size-sm); line-height: 1.5; color: var(--sl-muted); overflow-wrap: anywhere; }
  .sl-questions-reply { margin: 0; font-size: var(--sl-font-size-md); line-height: 1.5; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-questions-reply[data-empty] { color: var(--sl-muted); }
  .sl-questions-replies { display: flex; flex-wrap: wrap; gap: var(--sl-space-2xs); margin: 0; padding: 0; list-style: none; }
  .sl-questions-reply-item { min-inline-size: 0; padding: 0 var(--sl-space-xs); border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); background: var(--sl-surface-2); }
  .sl-questions-status { display: flex; align-items: center; gap: var(--sl-space-xs); margin: 0; font-size: var(--sl-font-size-sm); line-height: 1.4; color: var(--sl-text); }
  .sl-questions-mark { display: inline-grid; flex-shrink: 0; place-items: center; inline-size: 18px; block-size: 18px; border-radius: var(--sl-radius-small); background: var(--sl-success-soft); color: var(--sl-success); transform: var(--sl-slant); }
  /* end AgentQuestions */

  /* AgentTask subtasks: a Disclosure like the output's, holding a nested list.
     Each level below the first steps in under a hairline guide that runs down
     its inline start, centred under the parent's mark, so RTL mirrors it. */
  .sl-task[data-subtasks] { padding-block-end: var(--sl-space-xs); }
  .sl-task-subtasks { margin-inline: calc(var(--sl-space-md) * -1); padding-inline: var(--sl-space-md); border-block-start: 1px solid var(--sl-line); }
  .sl-task-subtasks + .sl-task-output { margin-block-start: calc(var(--sl-space-sm) * -1); }
  .sl-task-tree { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
  .sl-task-tree .sl-task-tree { margin-block-start: 2px; margin-inline-start: 5px; padding-inline-start: 9px; border-inline-start: 1px solid var(--sl-line-strong); }
  .sl-task-subtask { min-inline-size: 0; }
  .sl-task-subtask-row { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: var(--sl-space-xs); align-items: start; }
  .sl-task-subtask-mark { display: grid; place-items: center; inline-size: 12px; block-size: 20px; color: var(--sl-tone, var(--sl-muted)); }
  .sl-task-subtask-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sl-space-sm); min-inline-size: 0; line-height: 20px; }
  .sl-task-subtask-title { min-inline-size: 0; font-size: var(--sl-font-size-md); color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-task-subtask[data-status="pending"] > .sl-task-subtask-row .sl-task-subtask-title { color: var(--sl-muted); }
  .sl-task-subtask-detail { min-inline-size: 0; font-size: var(--sl-font-size-sm); color: var(--sl-muted); overflow-wrap: anywhere; }
  /* end AgentTask subtasks */

  /* PromptInput triggers and chips. The field sits over a mirror of its text
     that marks each chip: the mirror copies the field's font (.sl-textarea's),
     padding (.sl-prompt-field's) and wrapping, scrolls with it, and keeps its
     own text transparent, so the field's text on top is what reads, in
     --sl-text over the chip's soft fill in every theme. The chip's spread
     shadow pads it without moving a letter. */
  .sl-prompt-editor { position: relative; display: grid; min-width: 0; }
  .sl-prompt-editor > .sl-prompt-field { position: relative; }
  .sl-prompt-mirror {
    position: absolute;
    inset: 0;
    overflow: hidden;
    margin: 0;
    padding: var(--sl-space-2xs) var(--sl-space-xs);
    border: 0;
    color: transparent;
    font: var(--sl-font-size-lg)/1.5 var(--sl-font-sans);
    letter-spacing: normal;
    word-spacing: normal;
    text-align: start;
    text-indent: 0;
    text-transform: none;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    pointer-events: none;
    user-select: none;
  }
  .sl-prompt[data-disabled] .sl-prompt-mirror { opacity: var(--sl-disabled-opacity); }
  .sl-prompt-chip {
    border-radius: calc(var(--sl-radius-small) - 2px);
    background: var(--sl-accent-soft);
    box-shadow: 0 0 0 2px var(--sl-accent-soft);
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  /* end PromptInput triggers and chips */
}
/* PixelField: a surface of slanted pixels with a light that follows the
   pointer. Part of the media group, in its own partial because the site's home
   page draws one and loads this file with the core styles (slant-core.css). */

@layer slant {
  /* PixelField */
  /* The field fills its container's width. Each cell is square and its mark
     fills the middle three quarters, so the gaps scale with the field. A mark
     rests in the text colour mixed faintly into the background; --sl-lift
     (0–1, written from the pointer) mixes in the accent and raises it: off
     the plane in the plane variant, larger in the flat one. The cells never
     move, only their marks, so the measured centres stay put. */
  .sl-pixel-field {
    --sl-pixel-field-rest: color-mix(in srgb, var(--sl-text) 15%, var(--sl-bg));
    /* How far a lit mark rises (--sl-pixel-field-depth, 44px, can be set by
       the host) and how much it grows; the variants pick one. Flat marks
       also rest a little smaller, so the field facing you stays airy. */
    --sl-pixel-field-rise: var(--sl-pixel-field-depth, 44px);
    --sl-pixel-field-grow: 0;
    --sl-pixel-field-size: 1;
    --sl-pixel-field-wave-keys: sl-pixel-field-wave;
    --sl-pixel-field-ripple-keys: sl-pixel-field-ripple;
    /* The middle diagonal, where the reduced-motion resting frame draws its band. */
    --sl-pixel-field-crest: calc((var(--sl-pixel-field-columns, 12) + var(--sl-pixel-field-rows, 12) - 2) / 2);
    display: grid;
    place-items: center;
    min-width: 0;
    perspective: 1400px;
  }
  .sl-pixel-field[data-variant="flat"] {
    --sl-pixel-field-rise: 0px;
    --sl-pixel-field-grow: .26;
    --sl-pixel-field-size: .86;
    --sl-pixel-field-wave-keys: sl-pixel-field-breathe;
    --sl-pixel-field-ripple-keys: sl-pixel-field-swell;
  }
  .sl-pixel-field-plane {
    display: grid;
    grid-template-columns: repeat(var(--sl-pixel-field-columns, 12), minmax(0, 1fr));
    width: 100%;
    transform-style: preserve-3d;
  }
  /* Tilted, a square plane's footprint is about 1.4× its width: 70% keeps it inside the field. */
  .sl-pixel-field[data-variant="plane"] .sl-pixel-field-plane {
    width: 70%;
    transform: rotateX(56deg) rotateZ(-38deg);
  }
  .sl-pixel-field-cell {
    --sl-lift: 0;
    position: relative;
    aspect-ratio: 1;
    color: color-mix(in srgb, var(--sl-accent) calc(var(--sl-lift) * 100%), var(--sl-pixel-field-rest));
    transform-style: preserve-3d;
    transition: color var(--sl-duration-slow) var(--sl-ease-out);
  }
  /* The mark. A slow wave runs through the field along its diagonals: each
     cell's phase is set back by its column plus its row (--sl-wave, written
     once the field mounts; without it the animation is invalid, so the
     server-rendered field holds still until then). */
  .sl-pixel-field-cell::before,
  .sl-pixel-field[data-shape="cross"] .sl-pixel-field-cell::after {
    content: '';
    position: absolute;
    inset: 12.5%;
    border-radius: 26%;
    background: currentColor;
    transform: var(--sl-slant);
    translate: 0 0 calc(var(--sl-lift) * var(--sl-pixel-field-rise));
    scale: calc(var(--sl-pixel-field-size) + var(--sl-lift) * var(--sl-pixel-field-grow));
    transition: translate var(--sl-duration-slower) var(--sl-ease-out), scale var(--sl-duration-slower) var(--sl-ease-out);
    animation: var(--sl-pixel-field-wave-keys) 5s var(--sl-ease-in-out) calc(var(--sl-wave) * -140ms) infinite;
  }
  /* A short stroke, and a small plus of two strokes, leaning back like the pixel. */
  .sl-pixel-field[data-shape="line"] .sl-pixel-field-cell::before { inset-block: 8%; inset-inline: 42%; border-radius: var(--sl-radius-full); }
  .sl-pixel-field[data-shape="cross"] .sl-pixel-field-cell::before { inset-block: 22%; inset-inline: 43%; border-radius: var(--sl-radius-full); }
  .sl-pixel-field[data-shape="cross"] .sl-pixel-field-cell::after { inset-block: 43%; inset-inline: 22%; border-radius: var(--sl-radius-full); }
  /* A press: every mark rises once and takes the accent, later the farther
     it is from the press (--sl-ripple-delay), then rejoins the wave. */
  .sl-pixel-field-cell[data-ripple]::before,
  .sl-pixel-field[data-shape="cross"] .sl-pixel-field-cell[data-ripple]::after {
    animation:
      var(--sl-pixel-field-wave-keys) 5s var(--sl-ease-in-out) calc(var(--sl-wave) * -140ms) infinite,
      var(--sl-pixel-field-ripple-keys) calc(var(--sl-duration-slower) * 1.4) var(--sl-ease-out) var(--sl-ripple-delay, 0ms);
  }
  /* Off screen, in a hidden tab, or with running={false}: hold still. */
  .sl-pixel-field:not([data-running]) .sl-pixel-field-cell::before,
  .sl-pixel-field:not([data-running]) .sl-pixel-field-cell::after { animation-play-state: paused; }

  @keyframes sl-pixel-field-wave {
    0%, 100% { transform: translateZ(0) var(--sl-slant); opacity: .62; }
    50% { transform: translateZ(calc(var(--sl-pixel-field-depth, 44px) * .27)) var(--sl-slant); opacity: 1; }
  }
  @keyframes sl-pixel-field-breathe {
    0%, 100% { transform: var(--sl-slant) scale(.8); opacity: .62; }
    50% { transform: var(--sl-slant) scale(1); opacity: 1; }
  }
  /* Only the peak is written: the ripple leaves and rejoins the wave wherever it is. */
  @keyframes sl-pixel-field-ripple {
    35% { transform: translateZ(calc(var(--sl-pixel-field-depth, 44px) * .77)) var(--sl-slant); background: var(--sl-accent); opacity: 1; }
  }
  @keyframes sl-pixel-field-swell {
    35% { transform: var(--sl-slant) scale(1.24); background: var(--sl-accent); opacity: 1; }
  }

  /* Reduced motion: no wave, no light, no ripple (base.css stops the
     animations and transitions), and a composed resting frame instead: one
     soft band of partly lit, slightly raised marks across the middle
     diagonal, fading to the resting colour on either side. */
  @media (prefers-reduced-motion: reduce) {
    .sl-pixel-field-cell {
      /* Before the field mounts, a cell has no --sl-wave; the fallback puts it far off the band, at rest. */
      --sl-pixel-field-band: max(0, 1 - max(var(--sl-wave, -99) - var(--sl-pixel-field-crest), var(--sl-pixel-field-crest) - var(--sl-wave, -99)) / max(1, var(--sl-pixel-field-crest) * .32));
      color: color-mix(in srgb, var(--sl-accent) calc(var(--sl-pixel-field-band) * 72%), var(--sl-pixel-field-rest));
    }
    .sl-pixel-field-cell::before,
    .sl-pixel-field[data-shape="cross"] .sl-pixel-field-cell::after {
      opacity: calc(.62 + var(--sl-pixel-field-band) * .38);
      translate: 0 0 calc(var(--sl-pixel-field-band) * var(--sl-pixel-field-rise) * .3);
      scale: calc(var(--sl-pixel-field-size) - var(--sl-pixel-field-grow) * .7 * (1 - var(--sl-pixel-field-band)));
    }
  }
}
/* Media and motion: NotFound, Planet, Soundwave, RollingNumber, TiltCard.
   PixelField has its own partial (pixel-field.css), because the site's home
   page draws one and loads it with the core styles. */

@layer slant {
  /* Gradient: theme-coloured light for hero and footer surfaces. */
  .sl-gradient {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    inline-size: 100%;
    block-size: var(--sl-gradient-height, 20rem);
    background: var(--sl-bg);
    pointer-events: none;
  }
  .sl-gradient-field { position: absolute; inset: 0; }
  .sl-gradient-canvas { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; opacity: 0; }
  .sl-gradient[data-ribbon-renderer="webgl"] .sl-gradient-canvas { opacity: 1; }
  .sl-gradient[data-ribbon-renderer="webgl"] .sl-gradient-field { visibility: hidden; }
  .sl-gradient[data-variant="columns"] .sl-gradient-field {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
  }
  .sl-gradient-column {
    position: relative;
    block-size: 36%;
    background: linear-gradient(to top,
      color-mix(in srgb, var(--sl-gradient-color, var(--sl-accent)) 35%, var(--sl-gradient-highlight, var(--sl-text))) 0%,
      var(--sl-gradient-color, var(--sl-accent)) 24%,
      color-mix(in srgb, var(--sl-gradient-color, var(--sl-accent)) 65%, transparent) 52%,
      transparent 100%);
  }
  .sl-gradient-column:nth-child(2), .sl-gradient-column:nth-child(6) { block-size: 56%; }
  .sl-gradient-column:nth-child(3), .sl-gradient-column:nth-child(5) { block-size: 76%; }
  .sl-gradient-column:nth-child(4) { block-size: 100%; }
  .sl-gradient[data-guides] .sl-gradient-column + .sl-gradient-column::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 1px;
    background: repeating-linear-gradient(to top, var(--sl-gradient-highlight, var(--sl-text)) 0 2px, transparent 2px 9px);
    opacity: .4;
  }
  .sl-gradient[data-variant="glow"] .sl-gradient-field {
    background: radial-gradient(ellipse at 50% 100%,
      color-mix(in srgb, var(--sl-gradient-color, var(--sl-accent)) 30%, var(--sl-gradient-highlight, var(--sl-text))) 0%,
      var(--sl-gradient-color, var(--sl-accent)) 20%,
      color-mix(in srgb, var(--sl-gradient-color, var(--sl-accent)) 45%, transparent) 42%,
      transparent 72%);
  }
  .sl-gradient[data-variant="horizon"] .sl-gradient-field {
    background: radial-gradient(ellipse 80% 65% at 50% 105%,
      var(--sl-gradient-highlight, var(--sl-text)) 0%,
      var(--sl-gradient-color, var(--sl-accent)) 28%,
      color-mix(in srgb, var(--sl-gradient-color, var(--sl-accent)) 28%, transparent) 58%,
      transparent 100%);
  }
  .sl-gradient[data-variant="ribbon"] .sl-gradient-field {
    background: linear-gradient(to bottom, var(--sl-gradient-color, var(--sl-accent)) 38%, var(--sl-gradient-highlight, var(--sl-text)) 84%);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3Cfilter id='b' x='-10%25' y='-20%25' width='120%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='6'/%3E%3C/filter%3E%3Cpath fill='white' filter='url(%23b)' d='M-40 145C150 245 230 250 400 185S620 105 800 185S1050 245 1240 145V440H-40Z'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
  }
  /* The shaded edge follows the same curve, slightly below its warm lip. */
  .sl-gradient[data-variant="ribbon"] .sl-gradient-field::before {
    content: '';
    position: absolute;
    inset: 0;
    translate: 0 7%;
    background: var(--sl-gradient-secondary, var(--sl-muted));
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3Cfilter id='b' x='-10%25' y='-100%25' width='120%25' height='300%25'%3E%3CfeGaussianBlur stdDeviation='12'/%3E%3C/filter%3E%3Cpath fill='none' stroke='white' stroke-width='64' filter='url(%23b)' d='M-40 145C150 245 230 250 400 185S620 105 800 185S1050 245 1240 145'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
  }
  /* A tiny embedded tile moves with the light and needs no asset request. */
  .sl-gradient[data-grain] .sl-gradient-field::after {
    content: '';
    position: absolute;
    inset: -3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='3' intercept='-1'/%3E%3CfeFuncG type='linear' slope='3' intercept='-1'/%3E%3CfeFuncB type='linear' slope='3' intercept='-1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Cpath filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
    opacity: var(--sl-gradient-grain-opacity, .28);
    mix-blend-mode: soft-light;
    mask-image: linear-gradient(to top, #000 65%, transparent);
  }

  /* Basic fields move on the compositor. The ribbon's CSS is its still
     fallback; its canvas renderer retains its own phase when paused. */
  @media (prefers-reduced-motion: no-preference) {
    .sl-gradient-column {
      transform-origin: 50% 100%;
      animation: sl-gradient-rise var(--sl-gradient-duration, 12s) var(--sl-ease-in-out) infinite paused;
    }
    .sl-gradient-column:nth-child(2), .sl-gradient-column:nth-child(6) { animation-delay: calc(var(--sl-gradient-duration, 12s) * -.14); }
    .sl-gradient-column:nth-child(3), .sl-gradient-column:nth-child(5) { animation-delay: calc(var(--sl-gradient-duration, 12s) * -.28); }
    .sl-gradient-column:nth-child(4) { animation-delay: calc(var(--sl-gradient-duration, 12s) * -.42); }
    .sl-gradient[data-variant="glow"] .sl-gradient-field {
      transform-origin: 50% 100%;
      animation: sl-gradient-drift var(--sl-gradient-duration, 12s) var(--sl-ease-in-out) infinite paused;
    }
    .sl-gradient[data-variant="horizon"] .sl-gradient-field {
      transform-origin: 50% 100%;
      animation: sl-gradient-breathe var(--sl-gradient-duration, 12s) var(--sl-ease-in-out) infinite paused;
    }
    .sl-gradient[data-grain]:where(:not([data-variant="ribbon"])) .sl-gradient-field::after {
      animation: sl-gradient-grain 240ms steps(1, end) infinite paused;
    }
    .sl-gradient[data-running] .sl-gradient-column,
    .sl-gradient[data-running] .sl-gradient-field,
    .sl-gradient[data-running] .sl-gradient-field::before,
    .sl-gradient[data-running] .sl-gradient-field::after { animation-play-state: running; }

    @keyframes sl-gradient-rise {
      0%, 100% { transform: scaleY(.72); opacity: .76; }
      50% { transform: scaleY(1); opacity: 1; }
    }
    @keyframes sl-gradient-drift {
      0%, 100% { transform: translateX(-6%) scale(1.18, 1.04); opacity: .78; }
      50% { transform: translateX(6%) scale(1.18, 1.14); opacity: 1; }
    }
    @keyframes sl-gradient-breathe {
      0%, 100% { transform: scale(1.18, .84); opacity: .76; }
      50% { transform: scale(1.04, 1.16); opacity: 1; }
    }
    @keyframes sl-gradient-grain {
      0%, 100% { transform: translate(0, 0); }
      25% { transform: translate(-2px, 1px); }
      50% { transform: translate(1px, -2px); }
      75% { transform: translate(-1px, -1px); }
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .sl-gradient-canvas { display: none; }
    .sl-gradient[data-ribbon-renderer="webgl"] .sl-gradient-field { visibility: visible; }
  }

  /* NotFound */
  .sl-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sl-space-md);
    padding: var(--sl-space-2xl) var(--sl-space-lg);
    text-align: center;
    /* Pushed pixels can travel past the code's box: clip them at the sides,
       so a phone never scrolls sideways. */
    overflow-x: clip;
  }
  /* The code shrinks its pixels to fit the width it is given, up to
     --sl-not-found-pixel-size. It reads left to right in every direction,
     like the digits it draws. */
  .sl-not-found-code {
    display: flex;
    justify-content: center;
    inline-size: 100%;
    margin-block-end: var(--sl-space-lg);
    container-type: inline-size;
    direction: ltr;
  }
  .sl-not-found-grid {
    --sl-not-found-cell: min(var(--sl-not-found-pixel-size, 14px), 100cqi / (var(--sl-not-found-columns) * 1.3));
    display: grid;
    grid-template-columns: repeat(var(--sl-not-found-columns), var(--sl-not-found-cell));
    grid-auto-rows: var(--sl-not-found-cell);
    gap: calc(var(--sl-not-found-cell) * .3);
  }
  .sl-not-found-pixel { position: relative; }
  .sl-not-found-pixel::before, .sl-not-found-pixel[data-lit]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26%;
    transform: var(--sl-slant);
  }
  /* Every cell keeps a faint socket, so a pixel the pointer moves leaves its place behind. */
  .sl-not-found-pixel::before { background: color-mix(in srgb, var(--sl-text) 6%, transparent); }
  .sl-not-found-pixel[data-lit]::after {
    background: var(--sl-accent);
    translate: var(--sl-push-x, 0px) var(--sl-push-y, 0px);
    /* Settling home takes longer than stepping aside (see :hover below). */
    transition: translate var(--sl-duration-slower) var(--sl-ease-out);
    /* A soft band of light crosses the code on the diagonal every few seconds. */
    animation: sl-not-found-shimmer 7s var(--sl-ease-in-out) infinite;
    animation-delay: calc(var(--sl-wave, 0) * 45ms - 7s);
  }
  .sl-not-found:hover .sl-not-found-pixel[data-lit]::after { transition-duration: var(--sl-duration-slow); }
  .sl-not-found:not([data-running]) .sl-not-found-pixel::after { animation-play-state: paused; }
  /* Held at its start, every pixel sits in the long rest between bands. */
  @keyframes sl-not-found-shimmer {
    0%, 16%, 100% { background: var(--sl-accent); scale: 1; }
    6% { background: color-mix(in srgb, var(--sl-accent) 62%, var(--sl-text)); scale: 1.12; }
  }
  .sl-not-found-title {
    margin: 0;
    font-size: var(--sl-font-size-2xl);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--sl-text);
    text-wrap: balance;
  }
  .sl-not-found-description {
    max-inline-size: 46ch;
    margin: 0;
    font-size: var(--sl-font-size-lg);
    line-height: 1.55;
    color: var(--sl-muted);
    text-wrap: pretty;
  }
  .sl-not-found-action {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sl-space-sm);
    margin-block-start: var(--sl-space-sm);
  }

  /* Planet */
  /* The globe is its own disc: the surface, a hairline rim, and a slight
     deepening toward the limb (--sl-bg is the deeper of the two in every
     theme), with a faint accent halo for an atmosphere. The dots are a canvas
     over it; the markers and the tooltip sit over that, placed by left and top
     from the projection, since a globe never mirrors. */
  .sl-planet {
    position: relative;
    inline-size: min(100%, var(--sl-planet-size, 320px));
    aspect-ratio: 1;
    border: 1px solid var(--sl-line);
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, var(--sl-surface) 38%, color-mix(in srgb, var(--sl-bg) 70%, var(--sl-surface)));
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--sl-accent) 6%, transparent), var(--sl-shadow-md);
    cursor: grab;
    /* On a touch screen a vertical swipe still scrolls the page; a sideways one turns the globe. */
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sl-planet[data-dragging] { cursor: grabbing; }
  .sl-planet:focus-visible { outline-offset: 4px; }
  .sl-planet-dots { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border-radius: 50%; pointer-events: none; }
  /* A marker is itself a slanted pixel: a ring in its tone around a solid
     core, on a socket of the surface so it stands clear of the land dots. It
     shrinks and fades a little toward the limb (--sl-planet-depth, 1 at the
     centre to 0 at the edge, set from JS). */
  .sl-planet-marker {
    position: absolute;
    inline-size: 24px;
    block-size: 24px;
    padding: 0;
    border: 0;
    border-radius: 30%;
    background: none;
    translate: -50% -50%;
    scale: calc(.7 + .3 * var(--sl-planet-depth, 1));
    transform: var(--sl-slant);
    opacity: calc(.45 + .55 * var(--sl-planet-depth, 1));
  }
  .sl-planet-marker[hidden], .sl-planet-tooltip[hidden] { display: none; }
  .sl-planet-marker::before, .sl-planet-marker::after { content: ''; position: absolute; inset: 0; margin: auto; border-radius: 26%; }
  .sl-planet-marker::before {
    inline-size: 16px;
    block-size: 16px;
    border: 1.5px solid var(--sl-tone);
    background: color-mix(in srgb, var(--sl-tone) 14%, var(--sl-surface));
    box-shadow: 0 0 0 2px var(--sl-surface);
    transition: background var(--sl-duration-fast);
  }
  .sl-planet-marker::after { inline-size: 6px; block-size: 6px; background: var(--sl-tone); transition: inline-size var(--sl-duration-fast), block-size var(--sl-duration-fast); }
  .sl-planet-marker:hover::before, .sl-planet-marker:focus-visible::before, .sl-planet-marker[aria-pressed="true"]::before {
    background: color-mix(in srgb, var(--sl-tone) 30%, var(--sl-surface));
  }
  .sl-planet-marker[aria-pressed="true"]::after { inline-size: 8px; block-size: 8px; }
  /* The selected marker's ring breathes, slowly, and holds when the globe does. */
  .sl-planet-marker[aria-pressed="true"]::before { animation: sl-planet-breathe 2.8s var(--sl-ease-in-out) infinite; }
  .sl-planet:not([data-running]) .sl-planet-marker::before { animation-play-state: paused; }
  @keyframes sl-planet-breathe { 50% { transform: scale(1.22); } }
  .sl-planet-tooltip {
    position: absolute;
    z-index: 1;
    padding: 3px 8px;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    box-shadow: var(--sl-shadow-sm);
    font: 500 var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    color: var(--sl-text);
    white-space: nowrap;
    translate: -50% calc(-100% - 16px);
    pointer-events: none;
  }

  /* Soundwave */
  .sl-soundwave { display: inline-flex; max-inline-size: 100%; vertical-align: middle; }
  .sl-soundwave-svg { display: block; max-inline-size: 100%; block-size: auto; overflow: visible; }
  .sl-soundwave-mark, .sl-soundwave-core { fill: var(--sl-tone, var(--sl-accent)); }
  .sl-soundwave[data-variant="rings"] .sl-soundwave-mark { fill: none; stroke: var(--sl-tone, var(--sl-accent)); }
  .sl-soundwave-hub { fill: none; stroke: var(--sl-tone, var(--sl-accent)); stroke-opacity: .4; }
  .sl-soundwave-line { fill: none; stroke: var(--sl-tone, var(--sl-accent)); stroke-linecap: round; stroke-linejoin: round; }
  .sl-soundwave-area { fill: color-mix(in srgb, var(--sl-tone, var(--sl-accent)) 16%, transparent); }
  /* Frames ease into each other only while the wave runs, so a held frame, a
     wave off screen and the reduced-motion frame never move. Browsers that
     can't animate SVG geometry simply step from frame to frame. */
  .sl-soundwave[data-running] :is(.sl-soundwave-mark, .sl-soundwave-line, .sl-soundwave-area) {
    transition-property: x, y, width, height, rx, opacity, d;
    transition-duration: var(--sl-duration-fast);
    transition-timing-function: var(--sl-ease-out);
  }

  /* RollingNumber */
  /* It takes the surrounding font, with digits of one width so nothing
     shifts sideways while they roll. */
  .sl-rolling-number { font-variant-numeric: tabular-nums; white-space: pre; }
  /* Each digit is a window one line tall onto a strip of the digits (twice
     over, so a roll can wrap). clip-path rather than overflow keeps the
     window on the text's baseline; the hidden sizer gives it its width. */
  .sl-rolling-number-digit, .sl-rolling-number-mark { display: inline-block; clip-path: inset(0 -.12em); }
  .sl-rolling-number-digit { position: relative; }
  .sl-rolling-number-sizer { visibility: hidden; }
  .sl-rolling-number-strip {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(calc(var(--sl-digit, 0) * -5%));
  }
  .sl-rolling-number-strip > span { display: block; }

  /* TiltCard */
  /* A raised card at rest. While the pointer is over it, it turns in its own
     perspective and lifts its layers into the same 3D space (preserve-3d,
     which is why nothing here clips or isolates). Following the pointer is
     quick; settling back is slow and soft. */
  .sl-tilt-card {
    position: relative;
    padding: 18px;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-large);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-md);
    transform-style: preserve-3d;
    transition:
      transform var(--sl-duration-slower) var(--sl-ease-out),
      box-shadow var(--sl-duration-slower) var(--sl-ease-out),
      border-color var(--sl-duration-slow),
      background var(--sl-duration-slow);
  }
  .sl-tilt-card[data-active] {
    border-color: var(--sl-line-strong);
    box-shadow: var(--sl-shadow-lg);
    transform: perspective(900px) rotateX(var(--sl-tilt-x, 0deg)) rotateY(var(--sl-tilt-y, 0deg)) scale(var(--sl-tilt-scale, 1));
    transition-duration: var(--sl-duration-base), var(--sl-duration-slow), var(--sl-duration-slow), var(--sl-duration-slow);
  }
  .sl-tilt-card-layer {
    transform-style: preserve-3d;
    transition: transform var(--sl-duration-slower) var(--sl-ease-out);
  }
  /* Forward by the depth, and a touch further against the lean than the
     perspective alone would carry it. */
  .sl-tilt-card[data-active] .sl-tilt-card-layer {
    transform: translate3d(
      calc(sin(var(--sl-tilt-y, 0deg)) * var(--sl-tilt-depth, 20px) * .6),
      calc(sin(var(--sl-tilt-x, 0deg)) * var(--sl-tilt-depth, 20px) * -.6),
      var(--sl-tilt-depth, 20px));
    transition-duration: var(--sl-duration-base);
  }
  /* The light: a faint accent tint under the pointer, and the far side falling
     off toward the page background, which is darker than the surface in every
     theme. So the near side reads as lit on Paper too, where a brighter spot
     would not show. */
  .sl-tilt-card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--sl-glare-x, 50%) var(--sl-glare-y, 50%),
      color-mix(in srgb, var(--sl-accent) 9%, transparent),
      transparent 42%,
      color-mix(in srgb, var(--sl-bg) 70%, transparent) 100%);
    transition: opacity var(--sl-duration-slower) var(--sl-ease-out);
  }
  .sl-tilt-card[data-active] > .sl-tilt-card-glare { opacity: 1; transition-duration: var(--sl-duration-slow); }

  /* Compare */
  /* Both sides share one grid cell: the after side in flow (it sets the
     height when no aspect ratio does), the before side over it, clipped at
     --sl-compare-value from the inline start (the top when vertical). The
     frame clips nothing itself, so the grip and its ring can overhang an
     edge; each side clips its own content to the frame's radius. */
  .sl-compare {
    --sl-compare-grip: var(--sl-control-sm);
    position: relative;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    min-block-size: 0;
    border-radius: var(--sl-radius);
    background: var(--sl-surface-2);
    isolation: isolate;
    cursor: ew-resize;
    /* A vertical swipe still scrolls the page on a touch screen; a sideways one moves the seam. */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sl-compare[data-orientation="vertical"] { cursor: ns-resize; touch-action: pan-x; }
  .sl-compare[data-disabled] { cursor: default; touch-action: auto; }
  .sl-compare-layer {
    position: relative;
    display: grid;
    grid-area: 1 / 1;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    min-inline-size: 0;
    min-block-size: 0;
    overflow: hidden;
    border-radius: inherit;
  }
  .sl-compare-layer[data-side="before"] {
    position: absolute;
    inset: 0;
    z-index: 1;
    clip-path: inset(0 calc(100% - var(--sl-compare-value)) 0 0);
  }
  [dir="rtl"] .sl-compare[data-orientation="horizontal"] > .sl-compare-layer[data-side="before"] { clip-path: inset(0 0 0 calc(100% - var(--sl-compare-value))); }
  .sl-compare[data-orientation="vertical"] > .sl-compare-layer[data-side="before"] { clip-path: inset(0 0 calc(100% - var(--sl-compare-value)) 0); }
  /* The captions: small mono chips in the top corners (after's at the bottom
     when vertical), on a veil of the page background. */
  .sl-compare-caption {
    position: absolute;
    inset-block-start: var(--sl-space-sm);
    inset-inline-start: var(--sl-space-sm);
    padding: var(--sl-space-3xs) var(--sl-space-xs);
    border-radius: var(--sl-radius-small);
    background: color-mix(in srgb, var(--sl-bg) 84%, transparent);
    color: var(--sl-text);
    font: 500 var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    white-space: nowrap;
    pointer-events: none;
  }
  .sl-compare-caption[data-side="after"] { inset-inline: auto var(--sl-space-sm); }
  .sl-compare[data-orientation="vertical"] > .sl-compare-layer > .sl-compare-caption[data-side="after"] { inset-block: auto var(--sl-space-sm); }
  /* The seam: a grip-wide strip centred on the line, with the hairline down
     its middle; only the grip takes the pointer (the frame handles the press). */
  .sl-compare-seam {
    position: absolute;
    z-index: 2;
    inset-block: 0;
    inset-inline-start: var(--sl-compare-value);
    display: grid;
    place-items: center;
    inline-size: var(--sl-compare-grip);
    margin-inline-start: calc(var(--sl-compare-grip) / -2);
    pointer-events: none;
  }
  .sl-compare-seam::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(50% - 1px);
    inline-size: 2px;
    background: var(--sl-accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--sl-bg) 40%, transparent);
  }
  .sl-compare[data-orientation="vertical"] > .sl-compare-seam {
    inset-block: var(--sl-compare-value) auto;
    inset-inline: 0;
    inline-size: auto;
    block-size: var(--sl-compare-grip);
    margin-inline-start: 0;
    margin-block-start: calc(var(--sl-compare-grip) / -2);
  }
  .sl-compare[data-orientation="vertical"] > .sl-compare-seam::before { inset-block: calc(50% - 1px) auto; inset-inline: 0; inline-size: auto; block-size: 2px; }
  /* The grip is a slanted pixel in the accent, with two notches cut in it
     across the way it moves. */
  .sl-compare-grip {
    position: relative;
    display: grid;
    place-items: center;
    inline-size: var(--sl-compare-grip);
    block-size: var(--sl-compare-grip);
    border-radius: 26%;
    background: var(--sl-accent);
    color: var(--sl-accent-text);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--sl-bg) 40%, transparent), var(--sl-shadow-md);
    transform: var(--sl-slant);
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    transition: scale var(--sl-duration-fast) var(--sl-ease-out), background-color var(--sl-duration-fast);
  }
  .sl-compare-grip::before { content: ""; inline-size: 8px; block-size: 40%; border-inline: 2px solid currentColor; }
  .sl-compare[data-orientation="vertical"] > .sl-compare-seam > .sl-compare-grip::before { inline-size: 40%; block-size: 8px; border-inline: 0; border-block: 2px solid currentColor; }
  .sl-compare[data-dragging] > .sl-compare-seam > .sl-compare-grip { scale: 1.08; cursor: grabbing; }
  .sl-compare[data-dragging] { cursor: grabbing; }
  .sl-compare[data-disabled] > .sl-compare-seam > .sl-compare-grip { background: var(--sl-line-strong); color: var(--sl-muted); box-shadow: none; cursor: default; }
  .sl-compare[data-disabled] > .sl-compare-seam::before { background: var(--sl-line-strong); }
}
/* DeviceFrame: a decorative shell around live content. */
@layer slant {
  .sl-device-frame {
    box-sizing: border-box;
    min-inline-size: 0;
    inline-size: 100%;
    padding: 8px;
    border: 1px solid var(--sl-line-strong);
    background: var(--sl-surface-2);
    color: var(--sl-text);
  }
  .sl-device-frame[data-variant="phone"] {
    max-inline-size: 300px;
    border-radius: 36px;
  }
  .sl-device-frame-chrome {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-inline-size: 0;
    min-block-size: 36px;
    padding: 4px 12px 10px;
    pointer-events: none;
    user-select: none;
  }
  .sl-device-frame[data-variant="phone"] .sl-device-frame-chrome {
    flex-direction: column;
    padding-block-start: 8px;
  }
  .sl-device-frame-speaker {
    flex: none;
    inline-size: 48px;
    block-size: 5px;
    border-radius: var(--sl-radius-full);
    background: var(--sl-line-strong);
  }
  .sl-device-frame-title {
    min-inline-size: 0;
    max-inline-size: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--sl-muted);
    font-size: var(--sl-font-size-sm);
    line-height: 1.4;
  }
  .sl-device-frame-viewport {
    min-inline-size: 0;
    block-size: var(--sl-device-frame-height, 30rem);
    overflow: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
    border-radius: 26px;
    background: var(--sl-bg);
    isolation: isolate;
  }
  .sl-device-frame[data-variant="browser"] {
    border-radius: var(--sl-radius-large);
  }
  .sl-device-frame[data-variant="browser"] .sl-device-frame-chrome {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }
  .sl-device-frame[data-variant="browser"] .sl-device-frame-title { text-align: center; }
  .sl-device-frame-dots { display: flex; gap: 5px; }
  .sl-device-frame-dots span {
    inline-size: 7px;
    block-size: 7px;
    border-radius: 50%;
    background: var(--sl-muted);
  }
  .sl-device-frame[data-variant="browser"] .sl-device-frame-viewport {
    block-size: var(--sl-device-frame-height, 22rem);
    border-radius: var(--sl-radius);
  }
}
@layer slant {
  .sl-brand-field {
    position: relative;
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: var(--sl-brand-field-height, 24rem);
    overflow: hidden;
    isolation: isolate;
    background: var(--sl-bg);
    pointer-events: none;
  }

  /* Keep the drawing's scale on phones; only the outer lines are cropped. */
  .sl-brand-field-guides {
    position: absolute;
    inset-block-start: 50%;
    left: 50%;
    inline-size: calc(var(--sl-brand-field-mark-size, 72px) * 12);
    block-size: calc(var(--sl-brand-field-mark-size, 72px) * 8);
    max-inline-size: none;
    translate: -50% -50%;
    stroke: color-mix(in srgb, var(--sl-text) 18%, transparent);
    stroke-width: 1;
    mask-image: radial-gradient(ellipse at center, #000 4%, transparent 68%);
  }

  .sl-brand-field-mark {
    position: relative;
    inline-size: var(--sl-brand-field-mark-size, 72px);
    block-size: var(--sl-brand-field-mark-size, 72px);
    border-radius: 26%;
    transform: var(--sl-slant);
    background: linear-gradient(135deg,
      color-mix(in srgb, var(--sl-bg) 97%, var(--sl-text)),
      var(--sl-bg) 48%,
      color-mix(in srgb, var(--sl-bg) 94%, #000));
    box-shadow:
      inset 1px 1px 1px color-mix(in srgb, var(--sl-text) 10%, transparent),
      inset -1px -1px 2px color-mix(in srgb, #000 35%, transparent),
      4px 5px 12px color-mix(in srgb, #000 18%, transparent),
      -2px -2px 8px color-mix(in srgb, var(--sl-text) 3%, transparent);
  }
}
/* Ticket: the panels are masked, so the notches reveal any surface behind them. */
@layer slant {
  .sl-ticket {
    container-type: inline-size;
    min-inline-size: 0;
    inline-size: 100%;
    color: var(--sl-text);
  }
  .sl-ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sl-ticket[data-media] > .sl-ticket-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .sl-ticket-media, .sl-ticket-body {
    min-inline-size: 0;
    border: 1px solid var(--sl-line-strong);
    background: var(--sl-surface);
  }
  .sl-ticket-media {
    display: grid;
    min-block-size: 13rem;
    overflow: hidden;
    border-inline-end: 0;
    border-start-start-radius: var(--sl-radius-large);
    border-end-start-radius: var(--sl-radius-large);
    background: var(--sl-surface-2);
    -webkit-mask-image:
      radial-gradient(circle at var(--sl-ticket-media-edge, right) top, transparent 12px, #000 12.5px),
      radial-gradient(circle at var(--sl-ticket-media-edge, right) bottom, transparent 12px, #000 12.5px);
    mask-image:
      radial-gradient(circle at var(--sl-ticket-media-edge, right) top, transparent 12px, #000 12.5px),
      radial-gradient(circle at var(--sl-ticket-media-edge, right) bottom, transparent 12px, #000 12.5px);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .sl-ticket-media > :is(img, video) { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
  .sl-ticket-body { display: flex; flex-direction: column; border-radius: var(--sl-radius-large); overflow-wrap: anywhere; }
  .sl-ticket[data-media] .sl-ticket-body {
    border-inline-start-style: dashed;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    -webkit-mask-image:
      radial-gradient(circle at var(--sl-ticket-body-edge, left) top, transparent 12px, #000 12.5px),
      radial-gradient(circle at var(--sl-ticket-body-edge, left) bottom, transparent 12px, #000 12.5px);
    mask-image:
      radial-gradient(circle at var(--sl-ticket-body-edge, left) top, transparent 12px, #000 12.5px),
      radial-gradient(circle at var(--sl-ticket-body-edge, left) bottom, transparent 12px, #000 12.5px);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .sl-ticket:dir(rtl) { --sl-ticket-media-edge: left; --sl-ticket-body-edge: right; }
  .sl-ticket-content { flex: 1; min-inline-size: 0; padding: 24px; }
  .sl-ticket-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-inline: 24px; padding-block: 16px; border-block-start: 1px solid var(--sl-line); }

  @container (max-width: 480px) {
    .sl-ticket[data-media] > .sl-ticket-layout { grid-template-columns: minmax(0, 1fr); }
    .sl-ticket-media {
      min-block-size: 10rem;
      border-inline-end: 1px solid var(--sl-line-strong);
      border-block-end: 0;
      border-start-end-radius: var(--sl-radius-large);
      border-end-start-radius: 0;
      -webkit-mask-image: radial-gradient(circle at left bottom, transparent 12px, #000 12.5px), radial-gradient(circle at right bottom, transparent 12px, #000 12.5px);
      mask-image: radial-gradient(circle at left bottom, transparent 12px, #000 12.5px), radial-gradient(circle at right bottom, transparent 12px, #000 12.5px);
    }
    .sl-ticket[data-media] .sl-ticket-body {
      border-inline-start-style: solid;
      border-block-start-style: dashed;
      border-start-end-radius: 0;
      border-end-start-radius: var(--sl-radius-large);
      -webkit-mask-image: radial-gradient(circle at left top, transparent 12px, #000 12.5px), radial-gradient(circle at right top, transparent 12px, #000 12.5px);
      mask-image: radial-gradient(circle at left top, transparent 12px, #000 12.5px), radial-gradient(circle at right top, transparent 12px, #000 12.5px);
    }
    .sl-ticket-content { padding: 20px; }
    .sl-ticket-footer { margin-inline: 20px; }
  }
}
@layer slant {
  .sl-receipt {
    position: relative;
    isolation: isolate;
    inline-size: 100%;
    min-inline-size: 0;
    padding: var(--sl-space-xl) var(--sl-space-xl) calc(var(--sl-space-xl) + 8px);
    color: var(--sl-text);
    font: var(--sl-font-size-md)/1.6 var(--sl-font-mono);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
  .sl-receipt::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--sl-surface);
    border-radius: var(--sl-radius-small) var(--sl-radius-small) 0 0;
    mask-image: linear-gradient(#000, #000), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 0H16L8 8Z'/%3E%3C/svg%3E");
    mask-size: 100% calc(100% - 8px), 16px 8px;
    mask-position: top, bottom;
    mask-repeat: no-repeat, repeat-x;
    pointer-events: none;
  }
  .sl-receipt-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sl-space-xs);
    padding-block-end: var(--sl-space-lg);
    text-align: center;
  }
  .sl-receipt-pixel {
    inline-size: 10px;
    block-size: 10px;
    border-radius: 2px;
    background: var(--sl-accent);
    transform: var(--sl-slant);
    margin-block-end: var(--sl-space-sm);
  }
  .sl-receipt-caption, .sl-receipt-description { margin: 0; color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
  .sl-receipt-caption { letter-spacing: .08em; text-transform: uppercase; }
  .sl-receipt-title { margin: 0; font: 600 var(--sl-font-size-xl)/1.4 var(--sl-font-mono); text-wrap: balance; }
  .sl-receipt-items { list-style: none; margin: 0; padding: var(--sl-space-lg) 0; border-block: 1px dashed var(--sl-line-strong); }
  .sl-receipt-item { display: flex; align-items: baseline; gap: var(--sl-space-sm); min-inline-size: 0; }
  .sl-receipt-item + .sl-receipt-item { margin-block-start: var(--sl-space-sm); }
  .sl-receipt-number { flex: 0 0 2ch; color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
  .sl-receipt-label { min-inline-size: 0; flex: 0 1 auto; }
  .sl-receipt-leader { flex: 1 0 8px; border-block-end: 1px dotted var(--sl-line-strong); }
  .sl-receipt-value { min-inline-size: 0; max-inline-size: 45%; flex: 0 1 auto; text-align: end; }
  .sl-receipt-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sl-space-sm) var(--sl-space-lg); margin: 0; padding-block-start: var(--sl-space-lg); }
  .sl-receipt-total dt { font-weight: 500; }
  .sl-receipt-total dd { margin: 0; font-size: var(--sl-font-size-2xl); font-weight: 600; }
  .sl-receipt-footer { display: grid; gap: var(--sl-space-sm); margin-block-start: var(--sl-space-xl); }
}
@layer slant {
  .sl-terminal {
    min-inline-size: 0;
    inline-size: 100%;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    background: var(--sl-bg);
    color: var(--sl-text);
  }
  .sl-terminal-header {
    display: flex;
    align-items: center;
    gap: var(--sl-space-sm);
    min-block-size: 44px;
    padding: var(--sl-space-xs) var(--sl-space-md);
    border-block-end: 1px solid var(--sl-line);
    border-radius: var(--sl-radius) var(--sl-radius) 0 0;
    background: var(--sl-surface);
  }
  .sl-terminal-pixel {
    inline-size: 7px;
    block-size: 7px;
    flex: 0 0 7px;
    border-radius: 2px;
    background: var(--sl-accent);
    transform: var(--sl-slant);
  }
  .sl-terminal-title {
    min-inline-size: 0;
    flex: 1;
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-sm)/1.5 var(--sl-font-mono);
    overflow-wrap: anywhere;
  }
  .sl-terminal-scroll {
    max-block-size: var(--sl-terminal-max-height, 20rem);
    border-radius: 0 0 var(--sl-radius) var(--sl-radius);
    scrollbar-color: var(--sl-line-strong) transparent;
    scrollbar-width: thin;
  }
  .sl-terminal-scroll:focus-visible { outline-offset: -3px; }
  .sl-terminal-pre {
    inline-size: max-content;
    min-inline-size: 100%;
    margin: 0;
    padding: var(--sl-space-lg);
    color: var(--sl-text);
    font: var(--sl-font-size-md)/1.7 var(--sl-font-mono);
    tab-size: 2;
  }
  .sl-terminal-pre code { font: inherit; }
  .sl-terminal-pre ::selection { color: var(--sl-text); background: var(--sl-accent-soft); }
  .sl-terminal-status { margin: 0; color: var(--sl-muted); font: var(--sl-font-size-sm)/1.5 var(--sl-font-sans); }
  .sl-terminal-status:not(:empty) { padding: 0 var(--sl-space-lg) var(--sl-space-md); }
  .sl-terminal-exit { flex-shrink: 0; }

  /* The fold: a ghost button on its own row between the kept lines, a dashed
     hairline for the lines it hides. It stays at the start of the viewport
     while the output scrolls sideways, and is left out of a selection. */
  .sl-terminal-pre .sl-terminal-fold {
    position: sticky;
    inset-inline-start: 0;
    display: flex;
    inline-size: fit-content;
    margin-block: var(--sl-space-2xs);
    border: 1px dashed var(--sl-line-strong);
    color: var(--sl-muted);
    -webkit-user-select: none;
    user-select: none;
  }
  .sl-terminal-pre .sl-terminal-fold:hover { border-color: var(--sl-muted); color: var(--sl-text); }

  /* ANSI colour. Each of the eight is a token that holds 4.5:1 on --sl-bg in
     every theme: black and white are the muted and body text, red, green,
     yellow and blue the status and accent colours, magenta and cyan chart
     colours mixed toward the text until they pass on Paper. A background is
     the colour's soft tint with body text on it, whatever the foreground;
     inverse draws the background colour on the foreground colour (body text
     by default). Dim is the muted text on a run with no colour or background. */
  .sl-terminal-ansi[data-fg="black"] { --sl-terminal-fg: var(--sl-muted); }
  .sl-terminal-ansi[data-fg="red"] { --sl-terminal-fg: var(--sl-danger); }
  .sl-terminal-ansi[data-fg="green"] { --sl-terminal-fg: var(--sl-success); }
  .sl-terminal-ansi[data-fg="yellow"] { --sl-terminal-fg: var(--sl-warning); }
  .sl-terminal-ansi[data-fg="blue"] { --sl-terminal-fg: var(--sl-accent); }
  .sl-terminal-ansi[data-fg="magenta"] { --sl-terminal-fg: color-mix(in srgb, var(--sl-chart-5) 60%, var(--sl-text)); }
  .sl-terminal-ansi[data-fg="cyan"] { --sl-terminal-fg: color-mix(in srgb, var(--sl-chart-1) 60%, var(--sl-text)); }
  .sl-terminal-ansi[data-fg="white"] { --sl-terminal-fg: var(--sl-text); }
  .sl-terminal-ansi[data-bg="black"] { --sl-terminal-bg: color-mix(in srgb, var(--sl-muted) 16%, var(--sl-surface)); }
  .sl-terminal-ansi[data-bg="red"] { --sl-terminal-bg: var(--sl-danger-soft); }
  .sl-terminal-ansi[data-bg="green"] { --sl-terminal-bg: var(--sl-success-soft); }
  .sl-terminal-ansi[data-bg="yellow"] { --sl-terminal-bg: var(--sl-warning-soft); }
  .sl-terminal-ansi[data-bg="blue"] { --sl-terminal-bg: var(--sl-accent-soft); }
  .sl-terminal-ansi[data-bg="magenta"] { --sl-terminal-bg: color-mix(in srgb, var(--sl-chart-5) 16%, var(--sl-surface)); }
  .sl-terminal-ansi[data-bg="cyan"] { --sl-terminal-bg: color-mix(in srgb, var(--sl-chart-1) 16%, var(--sl-surface)); }
  .sl-terminal-ansi[data-bg="white"] { --sl-terminal-bg: color-mix(in srgb, var(--sl-text) 16%, var(--sl-surface)); }
  .sl-terminal-ansi[data-fg] { color: var(--sl-terminal-fg); }
  .sl-terminal-ansi[data-dim]:not([data-fg], [data-bg], [data-inverse]) { color: var(--sl-muted); }
  .sl-terminal-ansi[data-bg] { background: var(--sl-terminal-bg); color: var(--sl-text); }
  .sl-terminal-ansi[data-inverse] { background: var(--sl-terminal-fg, var(--sl-text)); color: var(--sl-bg); }
  .sl-terminal-ansi[data-bold] { font-weight: 700; }
  .sl-terminal-ansi[data-italic] { font-style: italic; }
  .sl-terminal-ansi[data-underline] { text-decoration: underline; text-underline-offset: 0.2em; }
}
@layer slant {
  .sl-goal-progress { min-inline-size: 0; padding: var(--sl-space-xl); border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); }
  .sl-goal-progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sl-space-lg); overflow-wrap: anywhere; }
  .sl-goal-progress-heading > span { font-size: var(--sl-font-size-xl); font-weight: 500; }
  .sl-goal-progress-heading strong { flex-shrink: 0; font-family: var(--sl-font-mono); font-size: 42px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
  .sl-goal-progress-heading strong span { font-size: var(--sl-font-size-xl); color: var(--sl-muted); }
  .sl-goal-progress-summary { margin-block-start: var(--sl-space-md); color: var(--sl-muted); font-size: var(--sl-font-size-md); overflow-wrap: anywhere; }
  .sl-goal-progress-meters { display: grid; gap: var(--sl-space-lg); margin-block-start: var(--sl-space-xl); }
  .sl-goal-progress-meters > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, 2fr) 4ch; align-items: center; gap: var(--sl-space-md); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-goal-progress-meters > div > span:first-child { overflow-wrap: anywhere; }
  .sl-goal-progress-meters > div > span:last-child { text-align: end; font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  .sl-goal-progress-breakdown { margin-block-start: var(--sl-space-xl); padding-block-start: var(--sl-space-xl); border-block-start: 1px solid var(--sl-line); }
  .sl-goal-progress-strip { display: flex; gap: 2px; block-size: 6px; overflow: hidden; border-radius: 2px; background: var(--sl-surface-2); }
  .sl-goal-progress-strip > span { flex-basis: 0; min-inline-size: 0; background: var(--sl-tone); }
  .sl-goal-progress-breakdown ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sl-space-sm) var(--sl-space-xl); list-style: none; margin: var(--sl-space-lg) 0 0; padding: 0; }
  .sl-goal-progress-breakdown li { display: flex; align-items: center; gap: var(--sl-space-sm); color: var(--sl-muted); font-size: var(--sl-font-size-sm); min-inline-size: 0; }
  .sl-goal-progress-breakdown li > span:nth-child(2) { overflow-wrap: anywhere; }
  .sl-goal-progress-breakdown li > span:last-child { min-inline-size: 0; margin-inline-start: auto; overflow-wrap: anywhere; text-align: end; font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; color: var(--sl-text); }
  .sl-goal-progress-dot { inline-size: 6px; block-size: 6px; flex-shrink: 0; background: var(--sl-tone); transform: var(--sl-slant); }
}
@layer slant {
  .sl-permission-matrix { max-inline-size: 100%; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); }
  .sl-permission-matrix table { inline-size: 100%; border-collapse: collapse; text-align: start; font-size: var(--sl-font-size-md); }
  .sl-permission-matrix caption { padding: var(--sl-space-lg); text-align: start; color: var(--sl-text); font-weight: 500; font-size: var(--sl-font-size-lg); }
  .sl-permission-matrix th, .sl-permission-matrix td { padding: var(--sl-space-md) var(--sl-space-lg); border-block-start: 1px solid var(--sl-line); }
  .sl-permission-matrix thead th { color: var(--sl-muted); background: var(--sl-surface-2); font-size: var(--sl-font-size-sm); font-weight: 400; }
  .sl-permission-matrix tbody th { min-inline-size: 9rem; max-inline-size: 24rem; font-weight: 400; overflow-wrap: anywhere; }
  .sl-permission-matrix thead th:not(:first-child), .sl-permission-matrix td { text-align: center; }
  .sl-permission-matrix td { min-inline-size: 4rem; }
  .sl-permission-matrix .sl-checkbox { display: inline-flex; vertical-align: middle; }
  .sl-permission-state { position: relative; display: inline-flex; vertical-align: middle; color: var(--sl-muted); }
  .sl-permission-state[data-allowed] { color: var(--sl-accent); }
  .sl-permission-empty { margin: 0; padding: var(--sl-space-lg); color: var(--sl-muted); }
}
/* IssueCard: compact work items that retain readable metadata in narrow lanes. */
@layer slant {
  .sl-issue-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-inline-size: 0;
    padding: 16px;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    background: var(--sl-surface);
    color: var(--sl-text);
    overflow-wrap: anywhere;
  }
  .sl-issue-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .sl-issue-card-serial { margin-inline-end: auto; font-family: var(--sl-font-mono); font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-issue-card-priority { color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
  .sl-issue-card-title { font-size: var(--sl-font-size-lg); font-weight: 600; line-height: 1.5; }
  .sl-issue-card-title a { color: inherit; text-decoration: none; }
  .sl-issue-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .sl-issue-card-title :is(a, button):focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); border-radius: 2px; }
  .sl-issue-card-tags { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 0; padding: 0; }
  .sl-issue-card-tags li { min-inline-size: 0; max-inline-size: 100%; }
  .sl-issue-card-tags .sl-badge { max-inline-size: 100%; white-space: normal; }
  .sl-issue-card-progress { display: flex; flex-direction: column; gap: 7px; }
  .sl-issue-card-progress-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
  .sl-issue-card-progress-label > :last-child { font-family: var(--sl-font-mono); font-variant-numeric: tabular-nums; }
  .sl-issue-card-progress-track { block-size: 3px; background: var(--sl-line); overflow: hidden; }
  .sl-issue-card-progress-track span { display: block; block-size: 100%; background: var(--sl-accent); }
  .sl-issue-card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
  .sl-issue-card-due { min-inline-size: 0; color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
  .sl-issue-card-assignee { display: flex; align-items: center; gap: 6px; min-inline-size: 0; font-size: var(--sl-font-size-sm); }
  .sl-issue-card-extra { min-inline-size: 0; padding-block-start: 12px; border-block-start: 1px solid var(--sl-line); }
}
@layer slant {
  .sl-funnel { min-inline-size: 0; }
  .sl-funnel-steps {
    display: grid;
    grid-template-columns: repeat(var(--sl-funnel-columns), minmax(60px, 1fr));
    gap: var(--sl-space-sm);
    margin: 0;
    padding: 0 0 var(--sl-space-xs);
    list-style: none;
  }
  .sl-funnel-step {
    position: relative;
    display: grid;
    grid-template-rows: 1.5em var(--sl-funnel-height, 10rem) auto auto 1fr;
    align-content: start;
    min-inline-size: 0;
    gap: 6px;
  }
  .sl-funnel-label {
    grid-row: 3;
    color: var(--sl-text);
    font-size: var(--sl-font-size-sm);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .sl-funnel-value {
    grid-row: 4;
    color: var(--sl-muted);
    font-family: var(--sl-font-mono);
    font-size: var(--sl-font-size-sm);
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .sl-funnel-change {
    grid-row: 1;
    color: var(--sl-muted);
    font-family: var(--sl-font-mono);
    font-size: var(--sl-font-size-xs);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
  }
  .sl-funnel-track {
    grid-row: 2;
    position: relative;
    overflow: hidden;
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface-2);
  }
  .sl-funnel-fill {
    position: absolute;
    inset: 0;
    transform: scaleY(var(--sl-funnel-fill));
    transform-origin: center bottom;
    background: var(--sl-muted);
    opacity: .45;
  }
  .sl-funnel-step[data-drop] .sl-funnel-track { background: var(--sl-tone-soft); }
  .sl-funnel-step[data-drop] .sl-funnel-fill { background: var(--sl-tone); opacity: 1; }
  .sl-funnel-step[data-drop] .sl-funnel-change { color: var(--sl-tone); }
  .sl-funnel-drop {
    grid-row: 5;
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: var(--sl-tone);
    font-size: var(--sl-font-size-xs);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .sl-funnel-drop .sl-pixel { flex: none; }
  .sl-funnel-empty { margin: 0; color: var(--sl-muted); font-size: var(--sl-font-size-sm); }
}
@layer slant {
  .sl-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-xs);
    min-inline-size: 0;
  }
  .sl-filter-bar-condition {
    flex-shrink: 1;
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
  }
  .sl-filter-bar-condition .sl-chip-label {
    min-inline-size: 0;
    padding-block: var(--sl-space-3xs);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .sl-filter-bar-key { color: var(--sl-muted); font-weight: 400; }
  .sl-filter-bar-value { color: var(--sl-text); }
  .sl-filter-bar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-xs);
    min-inline-size: 0;
    max-inline-size: 100%;
  }

  /* Saved views: the picker, the Modified badge and Reset and Update lead the
     bar, held together and set off from the conditions by a hairline. The
     hairline is the group's last item, so when the group wraps it stays
     beside its last control instead of running down the whole group. */
  .sl-filter-bar-view {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sl-space-xs);
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  .sl-filter-bar-view:not(:last-child)::after {
    content: '';
    align-self: stretch;
    inline-size: 1px;
    background: var(--sl-line);
  }
  /* A Select fills its container; here it fits its view's name. */
  .sl-filter-bar .sl-filter-bar-view-picker {
    inline-size: auto;
    min-inline-size: 8rem;
    max-inline-size: 100%;
  }
  .sl-filter-bar-view-status { display: inline-flex; }
  /* Empty, the live region stays in place without adding a gap. */
  .sl-filter-bar-view-status:empty { margin-inline-start: calc(var(--sl-space-xs) * -1); }
}
/* Editor: the pieces of an editing surface. Workbench frames a canvas (Flow)
   with a Toolbar over it, an Inspector beside it and Tracks under it; LaneBoard
   and CommandDock work inside it or alone. Each component keeps to its own
   section, between its two markers. */
@layer slant {
  /* Workbench */
  /* The root is the size container; the grid inside it is what responds, since
     a container can't query itself. Grid areas follow the writing direction,
     so the inspector mirrors under RTL with no extra rules. */
  .sl-workbench { container-type: inline-size; min-inline-size: 0; color: var(--sl-text); }
  .sl-workbench[data-variant="framed"] { overflow: hidden; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-large); background: var(--sl-surface); }
  .sl-workbench > .sl-workbench-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sl-workbench-inspector, 280px);
    grid-template-rows: minmax(320px, 1fr) auto;
    grid-template-areas: "canvas inspector" "tracks tracks";
    block-size: 100%;
  }
  .sl-workbench[data-inspector-side="start"] > .sl-workbench-grid {
    grid-template-columns: var(--sl-workbench-inspector, 280px) minmax(0, 1fr);
    grid-template-areas: "inspector canvas" "tracks tracks";
  }
  .sl-workbench-canvas {
    grid-area: canvas;
    position: relative;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    min-inline-size: 0;
    min-block-size: 0;
    background: var(--sl-bg);
  }
  /* The toolbar shares the canvas's cell and sits over it, sized to its content. */
  .sl-workbench-toolbar {
    grid-area: canvas;
    z-index: 2;
    align-self: start;
    justify-self: center;
    display: flex;
    max-inline-size: calc(100% - 2 * var(--sl-space-sm));
    margin: var(--sl-space-sm);
  }
  .sl-workbench-toolbar[data-placement="bottom"] { align-self: end; }
  .sl-workbench-inspector {
    grid-area: inspector;
    min-inline-size: 0;
    min-block-size: 0;
    overflow: auto;
    border-inline-start: 1px solid var(--sl-line);
    background: var(--sl-surface);
  }
  .sl-workbench[data-inspector-side="start"] .sl-workbench-inspector { border-inline-start: 0; border-inline-end: 1px solid var(--sl-line); }
  .sl-workbench-tracks { grid-area: tracks; min-inline-size: 0; border-block-start: 1px solid var(--sl-line); background: var(--sl-surface); }
  /* Narrow: one column, canvas over inspector over tracks. */
  @container (max-width: 640px) {
    .sl-workbench[data-inspector-side] > .sl-workbench-grid {
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(280px, auto) auto auto;
      grid-template-areas: "canvas" "inspector" "tracks";
    }
    .sl-workbench[data-inspector-side] .sl-workbench-inspector { border-inline: 0; border-block-start: 1px solid var(--sl-line); }
  }
  /* Resizable and wide: the regions sit in Splitter panes, whose handles draw
     the hairlines, so the regions drop theirs. Each pane is a one-cell grid its
     region fills; the stage is the canvas's cell, shared with the toolbar. */
  .sl-workbench-split { block-size: 100%; }
  .sl-workbench-pane { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
  .sl-workbench-stage { display: grid; grid-template: "canvas" minmax(0, 1fr) / minmax(0, 1fr); min-block-size: 0; }
  .sl-workbench[data-layout="split"] :is(.sl-workbench-inspector, .sl-workbench-tracks) { grid-area: auto; border: 0; }
  /* end Workbench */

  /* Flow */
  /* The canvas clips rather than scrolls (overflow: clip is no scroll
     container), so focusing a node outside the view never scrolls it: the
     viewport pans instead. The world inside it is physical, like an SVG: it
     is placed by its top-left corner, nodes and edge labels by left and top,
     the ports on the left and right where the edges attach, and none of it
     mirrors under RTL. Only the controls' corner follows the direction. */
  .sl-flow {
    position: relative;
    isolation: isolate;
    overflow: clip;
    min-inline-size: 0;
    block-size: 360px;
    background: var(--sl-bg);
    color: var(--sl-text);
    font-size: var(--sl-font-size-md);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .sl-flow[data-variant="framed"] { border: 1px solid var(--sl-line); border-radius: var(--sl-radius); }
  .sl-flow[data-variant="plain"] { block-size: 100%; min-block-size: 200px; }
  .sl-flow[data-panning] { cursor: grabbing; }
  /* The ring sits inside, where a clipping region around the canvas can't cut it. */
  .sl-flow:focus-visible { outline-offset: calc(var(--sl-focus-ring-width) * -1); }

  /* The dot grid: tiny slanted pixels that move and scale with the view. */
  .sl-flow-background { position: absolute; inset: 0; pointer-events: none; }
  .sl-flow-grid-dot { fill: var(--sl-line); transform: var(--sl-slant); transform-box: fill-box; transform-origin: center; }

  .sl-flow-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
  .sl-flow-edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
  .sl-flow-labels, .sl-flow-nodes { position: absolute; top: 0; left: 0; }

  /* Edges: a quiet line by default (the strong hairline taken halfway to
     muted, which --sl-line-strong alone is too faint for on Paper), the
     tone's colour with one. Animated dashes travel from `from` to `to` at a
     constant pace (a travelling dash needs linear timing); under reduced
     motion they stand still, dashed. */
  .sl-flow-edge { color: color-mix(in srgb, var(--sl-muted) 50%, var(--sl-line-strong)); }
  .sl-flow-edge[data-tone] { color: var(--sl-tone); }
  .sl-flow-edge-path { fill: none; stroke: currentColor; stroke-width: 1.5px; stroke-linecap: round; }
  .sl-flow-edge-arrow { fill: currentColor; stroke: currentColor; stroke-width: 1px; stroke-linejoin: round; }
  .sl-flow-edge[data-dashed] > .sl-flow-edge-path, .sl-flow-edge[data-animated] > .sl-flow-edge-path { stroke-dasharray: 6 5; stroke-linecap: butt; }
  .sl-flow-edge[data-animated] > .sl-flow-edge-path { animation: sl-flow-dash var(--sl-duration-slower) linear infinite; }
  @keyframes sl-flow-dash { to { stroke-dashoffset: -11; } }
  /* An edge's label: a small mono pill centred on the curve's middle. */
  .sl-flow-edge-label {
    position: absolute;
    padding: 1px var(--sl-space-xs);
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    white-space: nowrap;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .sl-flow-edge-label[data-tone] { border-color: var(--sl-tone); }

  /* Nodes: Slint panels. A tone marks the label with a slanted pixel; the
     selected node sits on the selection pill. */
  .sl-flow-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sl-space-3xs);
    inline-size: max-content;
    min-inline-size: 120px;
    max-inline-size: 240px;
    min-block-size: var(--sl-control-lg);
    padding: var(--sl-space-sm) var(--sl-space-md);
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-sm);
    color: var(--sl-text);
    font-size: var(--sl-font-size-md);
    line-height: 1.3;
    text-align: start;
    transition: border-color var(--sl-duration-fast) var(--sl-ease-out), background var(--sl-duration-fast) var(--sl-ease-out), box-shadow var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-flow-node:hover { border-color: var(--sl-line-strong); }
  .sl-flow-node[data-movable] { cursor: grab; }
  .sl-flow-node[data-dragging] { z-index: 1; cursor: grabbing; box-shadow: var(--sl-shadow-md); }
  .sl-flow-node[aria-pressed="true"] { border-color: var(--sl-accent); background: var(--sl-accent-soft); box-shadow: inset 0 0 0 1px var(--sl-accent), var(--sl-shadow-sm); }
  .sl-flow-node-head { display: flex; align-items: center; gap: var(--sl-space-xs); min-inline-size: 0; font-weight: 500; }
  .sl-flow-node-pixel { flex: none; inline-size: 8px; block-size: 8px; border-radius: 2px; background: var(--sl-tone); transform: var(--sl-slant); }
  .sl-flow-node-icon { display: inline-flex; flex: none; color: var(--sl-muted); }
  .sl-flow-node[data-tone] .sl-flow-node-icon { color: var(--sl-tone); }
  .sl-flow-node-label { min-inline-size: 0; overflow-wrap: anywhere; }
  .sl-flow-node-description { color: var(--sl-muted); font-size: var(--sl-font-size-sm); overflow-wrap: anywhere; }
  /* Ports: slanted pixels on the physical sides the edges attach to. */
  .sl-flow-port {
    position: absolute;
    top: 50%;
    inline-size: 8px;
    block-size: 8px;
    margin-block-start: -4px;
    border: 1.5px solid var(--sl-line-strong);
    border-radius: 2px;
    background: var(--sl-bg);
    transform: var(--sl-slant);
    transition: border-color var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-flow-port[data-side="left"] { left: -4.5px; }
  .sl-flow-port[data-side="right"] { right: -4.5px; }
  .sl-flow-node[aria-pressed="true"] > .sl-flow-port { border-color: var(--sl-accent); }

  /* The zoom cluster: a small Slint group in the inline-end bottom corner. */
  .sl-flow-controls {
    position: absolute;
    z-index: 2;
    inset-block-end: var(--sl-space-sm);
    inset-inline-end: var(--sl-space-sm);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    box-shadow: var(--sl-shadow-sm);
    cursor: default;
  }
  .sl-flow-control {
    display: grid;
    place-items: center;
    inline-size: var(--sl-control-sm);
    block-size: var(--sl-control-sm);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sl-muted);
    transition: background var(--sl-duration-fast), color var(--sl-duration-fast);
  }
  .sl-flow-control + .sl-flow-control, .sl-flow-control + .sl-flow-zoom, .sl-flow-zoom + .sl-flow-control { border-inline-start: 1px solid var(--sl-line); }
  .sl-flow-control:hover:not([aria-disabled="true"]) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-flow-control[aria-disabled="true"] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-flow-control:focus-visible { outline-offset: calc(var(--sl-focus-ring-width) * -1); }
  .sl-flow-zoom {
    display: grid;
    place-items: center;
    min-inline-size: 48px;
    padding-inline: var(--sl-space-xs);
    color: var(--sl-text);
    font: 500 var(--sl-font-size-xs)/1 var(--sl-font-mono);
  }
  /* end Flow */

  /* Toolbar */
  /* --sl-toolbar-item is an item's height, and its width when it holds only an icon. */
  .sl-toolbar {
    --sl-toolbar-item: var(--sl-control-md);
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-3xs);
    padding: var(--sl-space-2xs);
    border: 1px solid var(--sl-line);
    border-radius: calc(var(--sl-radius-small) + var(--sl-space-2xs));
    background: var(--sl-surface);
  }
  .sl-toolbar[data-size="sm"] { --sl-toolbar-item: var(--sl-control-sm); }
  .sl-toolbar[data-orientation="vertical"] { flex-direction: column; align-items: stretch; }
  /* Floating, over a canvas: a shadow instead of the hairline. */
  .sl-toolbar[data-variant="floating"] { border-color: transparent; box-shadow: var(--sl-shadow-md); }

  .sl-toolbar-tools { position: relative; display: flex; gap: var(--sl-space-3xs); }
  .sl-toolbar-tools[data-orientation="vertical"] { flex-direction: column; }
  /* The selection pill. It comes first in the group, so the (positioned) tools
     paint over it. Measured with offsetLeft/offsetTop, which are physical, so
     its placement stays physical too. Hidden until it has a first position. */
  .sl-toolbar-pill {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--w);
    height: var(--h);
    border-radius: var(--sl-radius-small);
    background: var(--sl-accent-soft);
    box-shadow: inset 0 0 0 1px var(--sl-accent);
    transform: translate(var(--x), var(--y));
    visibility: hidden;
    pointer-events: none;
  }
  /* Slides only once it has a first position, so it doesn't sweep in on mount. */
  .sl-toolbar-pill[data-ready] {
    visibility: visible;
    transition: transform var(--sl-duration-base) var(--sl-ease-out), width var(--sl-duration-base) var(--sl-ease-out), height var(--sl-duration-base) var(--sl-ease-out);
  }

  /* Items: square icon buttons on the control scale, ghost until hovered; one
     with visible text grows to fit it. */
  .sl-toolbar-item {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: var(--sl-space-xs);
    min-inline-size: var(--sl-toolbar-item);
    block-size: var(--sl-toolbar-item);
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-sm)/1 var(--sl-font-sans);
    white-space: nowrap;
    transition: background var(--sl-duration-fast) var(--sl-ease-out), color var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-toolbar-item[data-text] { padding-inline: var(--sl-space-sm); }
  .sl-toolbar-item:hover:not(:disabled, [aria-checked="true"]) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-toolbar-item:disabled { opacity: var(--sl-disabled-opacity); }
  .sl-toolbar-icon { display: inline-flex; flex: none; }
  .sl-toolbar-tool[aria-checked="true"] { color: var(--sl-text); }
  /* Until the pill has a first position (the server's HTML, the first frame),
     the chosen tool draws its own. */
  .sl-toolbar-tools:not(:has(> .sl-toolbar-pill[data-ready])) .sl-toolbar-tool[aria-checked="true"] {
    background: var(--sl-accent-soft);
    box-shadow: inset 0 0 0 1px var(--sl-accent);
  }
  .sl-toolbar-button[aria-pressed="true"] { background: var(--sl-surface-2); color: var(--sl-text); box-shadow: inset 0 0 0 1px var(--sl-line-strong); }
  .sl-toolbar-button[data-tone] .sl-toolbar-icon { color: var(--sl-tone); }
  .sl-toolbar-button[data-tone]:hover:not(:disabled) { background: var(--sl-tone-soft); }

  /* A hairline across the toolbar: upright in a row, flat in a column. */
  .sl-toolbar-separator {
    flex: none;
    align-self: center;
    inline-size: 1px;
    block-size: calc(var(--sl-toolbar-item) - 2 * var(--sl-space-xs));
    margin-inline: var(--sl-space-2xs);
    background: var(--sl-line);
  }
  .sl-toolbar-separator[data-orientation="horizontal"] {
    inline-size: calc(var(--sl-toolbar-item) - 2 * var(--sl-space-xs));
    block-size: 1px;
    margin-block: var(--sl-space-2xs);
    margin-inline: 0;
  }
  /* end Toolbar */

  /* Inspector */
  /* Vertical Tabs underneath: the root, rail, tabs and pages are Tabs' own
     elements carrying these classes as well. Tabs styles its vertical root and
     rail with [data-orientation] at two classes' weight, so the rules for those
     two match it with the same attribute and win by coming later (this file
     follows navigation.css). The tablist's sliding bar stays: it runs down the
     rail's inline-start edge, over the frame, beside the selected icon, and the
     icon itself sits on the selection pill. */
  .sl-inspector[data-orientation] { align-items: stretch; gap: 0; min-inline-size: 0; color: var(--sl-text); }
  .sl-inspector[data-variant="framed"] { border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-surface); }
  .sl-inspector-rail[data-orientation] {
    gap: var(--sl-space-3xs);
    padding: var(--sl-space-xs);
    border-inline-start: 0;
    border-inline-end: 1px solid var(--sl-line);
  }
  .sl-inspector-tab {
    display: grid;
    place-items: center;
    inline-size: var(--sl-control-md);
    block-size: var(--sl-control-md);
    min-block-size: 0;
    padding: 0;
    border-radius: var(--sl-radius-small);
    color: var(--sl-muted);
    transition: background var(--sl-duration-fast), color var(--sl-duration-fast), box-shadow var(--sl-duration-fast);
  }
  .sl-inspector-tab[aria-selected="false"]:hover:not(:disabled) { background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-inspector-tab[aria-selected="true"] { background: var(--sl-accent-soft); color: var(--sl-text); box-shadow: inset 0 0 0 1px var(--sl-accent); }
  /* A page scrolls inside the inspector when the root is given a height; its
     focus ring is drawn inside, where the frame can't cover it. */
  .sl-inspector-page { overflow: auto; outline-offset: calc(var(--sl-focus-ring-width) * -1); }
  /* The title row is as tall as the rail's first icon with its padding on
     both sides, so the title lines up with that icon. */
  .sl-inspector-title {
    display: flex;
    align-items: center;
    gap: var(--sl-space-xs);
    min-block-size: calc(var(--sl-control-md) + 2 * var(--sl-space-xs));
    padding-inline: var(--sl-space-md);
    border-block-end: 1px solid var(--sl-line);
    font-size: var(--sl-font-size-md);
    font-weight: 600;
    line-height: 1.3;
  }
  .sl-inspector-title::before { content: ''; flex: none; inline-size: 7px; block-size: 7px; border-radius: 1.5px; background: var(--sl-accent); transform: var(--sl-slant); }
  .sl-inspector-section { padding: var(--sl-space-xs) var(--sl-space-md) var(--sl-space-md); }
  .sl-inspector-section + .sl-inspector-section { border-block-start: 1px solid var(--sl-line); }
  .sl-inspector-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-sm); min-block-size: var(--sl-control-sm); }
  .sl-inspector-section-title { flex: 1; min-inline-size: 0; font-size: var(--sl-font-size-sm); font-weight: 600; line-height: 1.3; }
  .sl-inspector-section-toggle {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2xs);
    inline-size: 100%;
    min-block-size: var(--sl-control-sm);
    padding: 0;
    border: 0;
    border-radius: var(--sl-radius-small);
    background: transparent;
    font-weight: inherit;
    text-align: start;
  }
  .sl-inspector-chevron { flex: none; color: var(--sl-muted); transition: transform var(--sl-duration-base) var(--sl-ease-out), color var(--sl-duration-fast); }
  .sl-inspector-section-toggle:hover > .sl-inspector-chevron { color: var(--sl-text); }
  /* Closed, the chevron points along the line, toward the inline end. */
  .sl-inspector-section-toggle[aria-expanded="false"] > .sl-inspector-chevron { transform: rotate(-90deg); }
  [dir="rtl"] .sl-inspector-section-toggle[aria-expanded="false"] > .sl-inspector-chevron { transform: rotate(90deg); }
  .sl-inspector-section-actions { display: flex; flex: none; align-items: center; gap: var(--sl-space-xs); }
  .sl-inspector-section-body { display: grid; gap: var(--sl-space-xs); padding-block-start: var(--sl-space-xs); }
  .sl-inspector-section-body[hidden], .sl-inspector-section-body:empty { display: none; }
  /* Only after the user opens it (a page rises in as a whole on its own). */
  .sl-inspector-section-body[data-animate] { animation: sl-in var(--sl-duration-slow) var(--sl-ease-out); }
  /* Controls keep their own width in the second column; one that is 100%
     wide (an Input) fills it, and two of those share it. */
  .sl-inspector-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    gap: var(--sl-space-3xs) var(--sl-space-sm);
    min-block-size: var(--sl-control-sm);
  }
  .sl-inspector-row-label { min-inline-size: 0; font-size: var(--sl-font-size-sm); line-height: 1.3; color: var(--sl-muted); overflow-wrap: anywhere; }
  .sl-inspector-row-control { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs); min-inline-size: 0; }
  .sl-inspector-row-hint { grid-column: 2; font-size: var(--sl-font-size-xs); line-height: 1.4; color: var(--sl-muted); }
  /* end Inspector */

  /* Tracks */
  /* A header column beside the lanes. Every row shares the column's width and
     the lanes' padding, so the ruler, the clips, the gridlines and the
     playhead's line all measure time across the same box. Positions are
     percentages on inset-inline-start, so the timeline mirrors under RTL. */
  .sl-tracks {
    --sl-tracks-head: clamp(112px, 24%, 168px);
    --sl-tracks-pad: var(--sl-space-md);
    --sl-tracks-ruler: var(--sl-control-sm);
    position: relative;
    isolation: isolate;
    min-inline-size: 0;
    background: var(--sl-surface);
    color: var(--sl-text);
    font-size: var(--sl-font-size-md);
  }
  .sl-tracks[data-variant="framed"] { overflow: hidden; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); }
  .sl-tracks-top, .sl-tracks-track { display: grid; grid-template-columns: var(--sl-tracks-head) minmax(0, 1fr); }
  .sl-tracks-top { block-size: var(--sl-tracks-ruler); border-block-end: 1px solid var(--sl-line); }
  .sl-tracks-track + .sl-tracks-track { border-block-start: 1px solid var(--sl-line); }

  /* The readout in the corner: the time, then the length, in mono. */
  .sl-tracks-time {
    display: flex;
    align-items: center;
    gap: var(--sl-space-2xs);
    min-inline-size: 0;
    padding-inline: var(--sl-space-md) var(--sl-space-sm);
    border-inline-end: 1px solid var(--sl-line);
    font: 500 var(--sl-font-size-xs)/1 var(--sl-font-mono);
    white-space: nowrap;
  }
  .sl-tracks-total { color: var(--sl-muted); }
  .sl-tracks-total::before { content: "/ "; }

  /* The ruler: press or drag anywhere on it to scrub. */
  .sl-tracks-ruler { min-inline-size: 0; padding-inline: var(--sl-tracks-pad); cursor: ew-resize; touch-action: none; user-select: none; }
  .sl-tracks-scale, .sl-tracks-clips { position: relative; block-size: 100%; }
  .sl-tracks-ticks { position: absolute; inset: 0; }
  .sl-tracks-tick { position: absolute; inset-block: 5px 0; inline-size: 1px; background: var(--sl-line-strong); }
  .sl-tracks-tick[data-minor] { inset-block-start: auto; block-size: 4px; }
  .sl-tracks-tick-label {
    position: absolute;
    inset-block-start: 5px;
    margin-inline-start: var(--sl-space-2xs);
    color: var(--sl-muted);
    font: 500 var(--sl-font-size-xs)/1 var(--sl-font-mono);
    white-space: nowrap;
  }
  .sl-tracks-tick-label[data-end] { margin-inline: 0 var(--sl-space-2xs); }

  /* The playhead's handle: a slanted pixel in the accent, over the line. */
  .sl-tracks-playhead {
    position: absolute;
    z-index: 2;
    inset-block-end: 3px;
    inline-size: 12px;
    block-size: 12px;
    margin-inline-start: -6px;
    border-radius: 2px;
    background: var(--sl-accent);
    transform: var(--sl-slant);
    cursor: ew-resize;
  }

  /* Gridlines (behind the clips) and the playhead's line (over them) share the
     lanes' horizontal box: past the header column and the lane padding. */
  .sl-tracks-gridlines, .sl-tracks-overlay {
    position: absolute;
    inset-block: 0;
    inset-inline: calc(var(--sl-tracks-head) + var(--sl-tracks-pad)) var(--sl-tracks-pad);
    pointer-events: none;
  }
  .sl-tracks-gridlines { inset-block-start: var(--sl-tracks-ruler); }
  .sl-tracks-overlay { z-index: 1; }
  .sl-tracks-gridline { position: absolute; inset-block: 0; inline-size: 1px; background: var(--sl-line); }
  .sl-tracks-line { position: absolute; inset-block: calc(var(--sl-tracks-ruler) - 9px) 0; inline-size: 1px; margin-inline-start: -.5px; background: var(--sl-accent); }

  /* A track's header: its tone pixel, icon and name. */
  .sl-tracks-head {
    display: flex;
    align-items: center;
    gap: var(--sl-space-xs);
    min-inline-size: 0;
    padding-inline: var(--sl-space-md) var(--sl-space-sm);
    border-inline-end: 1px solid var(--sl-line);
  }
  .sl-tracks-pixel { flex: none; inline-size: 8px; block-size: 8px; border-radius: 2px; background: var(--sl-tone); transform: var(--sl-slant); }
  .sl-tracks-icon { display: inline-flex; flex: none; color: var(--sl-muted); }
  .sl-tracks-name { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

  /* A lane, on the darker ground, and its clips: soft tone fills with a tone hairline. */
  .sl-tracks-lane { min-inline-size: 0; padding: var(--sl-space-xs) var(--sl-tracks-pad); background: var(--sl-bg); }
  .sl-tracks-clips { block-size: var(--sl-control-sm); }
  .sl-tracks-clip {
    position: absolute;
    inset-block: 0;
    display: flex;
    align-items: center;
    gap: var(--sl-space-xs);
    min-inline-size: 0;
    overflow: hidden;
    padding-block: 0;
    padding-inline: var(--sl-space-xs);
    border: 1px solid color-mix(in srgb, var(--sl-tone) 55%, var(--sl-line));
    border-radius: var(--sl-radius-small);
    background: var(--sl-tone-soft);
    color: var(--sl-text);
    font-size: var(--sl-font-size-sm);
    font-weight: 500;
    text-align: start;
    transition: border-color var(--sl-duration-fast) var(--sl-ease-out), box-shadow var(--sl-duration-fast) var(--sl-ease-out);
  }
  .sl-tracks-clip:hover:not(:disabled) { border-color: var(--sl-tone); }
  /* The selection: an accent hairline ring. */
  .sl-tracks-clip[aria-pressed="true"] { border-color: var(--sl-accent); box-shadow: 0 0 0 1px var(--sl-accent); }
  .sl-tracks-clip:disabled { opacity: var(--sl-disabled-opacity); }
  .sl-tracks-clip-pixel { flex: none; inline-size: 6px; block-size: 6px; border-radius: 1.5px; background: var(--sl-tone); transform: var(--sl-slant); }
  .sl-tracks-clip-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* end Tracks */

  /* LaneBoard */
  /* The board is the carried card's containing block; the lanes scroll
     sideways inside it, so a card carried against the board escapes their clip. */
  .sl-lane-board { position: relative; min-inline-size: 0; }
  .sl-lane-board[data-dragging] { cursor: grabbing; user-select: none; }
  .sl-lane-board-lanes { display: flex; align-items: flex-start; gap: var(--sl-space-md); overflow-x: auto; padding-block-end: var(--sl-space-3xs); scrollbar-width: thin; }
  .sl-lane {
    display: flex;
    flex: 1 0 220px;
    flex-direction: column;
    min-inline-size: 220px;
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius);
    background: var(--sl-surface);
    transition: border-color var(--sl-duration-fast);
  }
  /* The lane a lifted card is in, or over. */
  .sl-lane[data-over] { border-color: var(--sl-line-strong); }
  .sl-lane-header { display: flex; align-items: center; gap: var(--sl-space-sm); min-block-size: var(--sl-control-md); padding-inline: var(--sl-space-md) var(--sl-space-sm); border-block-end: 1px solid var(--sl-line); }
  .sl-lane-pixel, .sl-lane-card-pixel { flex: none; inline-size: 8px; block-size: 8px; border-radius: 2px; background: var(--sl-tone); transform: var(--sl-slant); }
  .sl-lane-card-pixel { inline-size: 7px; block-size: 7px; border-radius: 1.5px; }
  .sl-lane-title { flex: 1; min-inline-size: 0; overflow: hidden; font: 500 var(--sl-font-size-xs)/1.5 var(--sl-font-mono); letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; color: var(--sl-muted); }
  .sl-lane-count { flex: none; min-inline-size: 22px; padding: 3px 6px; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-small); background: var(--sl-surface-2); font: 500 var(--sl-font-size-xs)/1 var(--sl-font-mono); text-align: center; color: var(--sl-muted); }
  .sl-lane-list { display: flex; flex-direction: column; gap: var(--sl-space-xs); margin: 0; padding: var(--sl-space-sm); list-style: none; }
  .sl-lane-item { display: block; }
  .sl-lane-card {
    position: relative;
    display: grid;
    gap: var(--sl-space-2xs);
    padding: var(--sl-space-sm) var(--sl-space-md);
    border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius-small);
    background: var(--sl-bg);
    font-size: var(--sl-font-size-md);
    line-height: 1.4;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: border-color var(--sl-duration-fast), background var(--sl-duration-fast), box-shadow var(--sl-duration-base), transform var(--sl-duration-base) var(--sl-ease-out);
  }
  .sl-lane-card:hover { border-color: var(--sl-line-strong); }
  .sl-lane-card:focus-visible { border-color: var(--sl-line-strong); background: var(--sl-surface-2); }
  /* The selection pill: a lifted card sits on the accent's soft fill with an
     accent hairline, raised, with a slanted-pixel marker at its inline end. */
  .sl-lane-card[data-lifted] { border-color: var(--sl-accent); background: var(--sl-accent-soft); box-shadow: var(--sl-shadow-md); }
  .sl-lane-card[data-lifted]::after {
    content: '';
    position: absolute;
    inset-block-start: var(--sl-space-sm);
    inset-inline-end: var(--sl-space-sm);
    inline-size: 6px;
    block-size: 6px;
    border-radius: 1.5px;
    background: var(--sl-accent);
    transform: var(--sl-slant);
  }
  /* Carried by the pointer: out of its lane and tilted by the slant. top and
     left are physical by nature here, since the pointer's coordinates are. */
  .sl-lane-card[data-dragging] {
    position: absolute;
    z-index: var(--sl-z-dropdown);
    top: var(--sl-lane-carry-y);
    left: var(--sl-lane-carry-x);
    inline-size: var(--sl-lane-carry-width);
    transform: var(--sl-slant);
    cursor: grabbing;
    pointer-events: none;
  }
  .sl-lane-card[aria-disabled="true"] { opacity: var(--sl-disabled-opacity); cursor: default; }
  .sl-lane-card[aria-disabled="true"]:hover { border-color: var(--sl-line); }
  /* The slot a carried card would land in, at the card's height. */
  .sl-lane-placeholder { border: 1px dashed var(--sl-line-strong); border-radius: var(--sl-radius-small); }
  .sl-lane-card-head { display: flex; align-items: center; gap: var(--sl-space-xs); min-inline-size: 0; padding-inline-end: var(--sl-space-sm); }
  .sl-lane-card-title { min-inline-size: 0; font-weight: 500; color: var(--sl-text); overflow-wrap: anywhere; }
  .sl-lane-card-description { font-size: var(--sl-font-size-sm); color: var(--sl-muted); }
  .sl-lane-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sl-space-xs) var(--sl-space-sm); font: var(--sl-font-size-xs)/1.5 var(--sl-font-mono); color: var(--sl-muted); }
  .sl-lane-empty {
    display: grid;
    place-items: center;
    min-block-size: calc(var(--sl-control-lg) + var(--sl-space-lg));
    margin: var(--sl-space-sm);
    border: 1px dashed var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    font-size: var(--sl-font-size-sm);
    color: var(--sl-muted);
  }
  /* end LaneBoard */

  /* CommandDock */
  /* The root takes its slot's width. The surface inside starts at the closed
     button's width (measured into --sl-command-dock-closed; fit-content until
     then, and on the server) and grows to the root's width when it opens. The
     icon, the row marks and the status line share one 16px column, so the
     icon stays put as the button turns into the field. */
  .sl-command-dock {
    --sl-command-dock-control: var(--sl-control-md);
    display: block;
    min-inline-size: 0;
    font: var(--sl-font-size-md)/1.4 var(--sl-font-sans);
  }
  .sl-command-dock[data-size="sm"] { --sl-command-dock-control: var(--sl-control-sm); }
  .sl-command-dock-surface {
    display: flex;
    flex-direction: column;
    inline-size: var(--sl-command-dock-closed, fit-content);
    max-inline-size: 100%;
    border: 1px solid var(--sl-line-strong);
    border-radius: var(--sl-radius-small);
    background: var(--sl-surface);
    color: var(--sl-text);
    transition: inline-size var(--sl-duration-slow) var(--sl-ease-out), border-color var(--sl-duration-base), border-radius var(--sl-duration-slow), box-shadow var(--sl-duration-base);
  }
  .sl-command-dock:not([data-open]) .sl-command-dock-surface:hover { border-color: var(--sl-muted); }
  .sl-command-dock[data-open] .sl-command-dock-surface { inline-size: 100%; border-radius: var(--sl-radius); box-shadow: var(--sl-shadow-sm); }
  /* The field's focus is the surface's: an accent hairline, doubled. */
  .sl-command-dock-surface:has(.sl-command-dock-input:focus-visible) { border-color: var(--sl-accent); box-shadow: 0 0 0 1px var(--sl-accent); }

  .sl-command-dock-trigger {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: var(--sl-space-sm);
    inline-size: max-content;
    min-block-size: calc(var(--sl-command-dock-control) - 2px);
    padding-block: 0;
    padding-inline: var(--sl-space-sm) var(--sl-space-md);
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--sl-text);
    font-weight: 500;
    white-space: nowrap;
  }
  .sl-command-dock-trigger[hidden], .sl-command-dock-panel[hidden] { display: none; }
  .sl-command-dock-icon { display: inline-grid; flex-shrink: 0; place-items: center; inline-size: 16px; block-size: 16px; color: var(--sl-muted); transition: color var(--sl-duration-base); }
  .sl-command-dock-trigger:hover .sl-command-dock-icon { color: var(--sl-text); }
  /* The closed button's accent: a slanted pixel after the title. */
  .sl-command-dock-pixel { flex-shrink: 0; inline-size: 6px; block-size: 6px; border-radius: 1.5px; background: var(--sl-accent); transform: var(--sl-slant); }

  /* Open: the field, then the rows, then the status line, under hairlines. */
  .sl-command-dock-panel { display: flex; flex-direction: column; min-inline-size: 0; animation: sl-in var(--sl-duration-base) var(--sl-ease-out); }
  .sl-command-dock-field {
    display: flex;
    align-items: center;
    gap: var(--sl-space-sm);
    min-block-size: calc(var(--sl-command-dock-control) - 2px);
    padding-inline: var(--sl-space-sm) 3px;
  }
  .sl-command-dock-input {
    flex: 1;
    min-inline-size: 0;
    block-size: calc(var(--sl-command-dock-control) - 2px);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sl-text);
  }
  .sl-command-dock-input::placeholder { color: var(--sl-muted); }
  .sl-command-dock-input:focus-visible { outline: none; }
  .sl-command-dock-send {
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    inline-size: calc(var(--sl-command-dock-control) - 8px);
    block-size: calc(var(--sl-command-dock-control) - 8px);
    padding: 0;
    border: 1px solid transparent;
    border-radius: max(0px, calc(var(--sl-radius-small) - 2px));
    background: var(--sl-accent);
    color: var(--sl-accent-text);
    transition: background var(--sl-duration-base), color var(--sl-duration-base), opacity var(--sl-duration-base);
  }
  .sl-command-dock-send:disabled { background: transparent; color: var(--sl-muted); opacity: var(--sl-disabled-opacity); }
  .sl-command-dock-send:focus-visible { outline-offset: 1px; }
  /* While answering, the button is Stop: a slanted pixel on the quiet surface. */
  .sl-command-dock-send[data-stop] { border-color: var(--sl-line-strong); background: var(--sl-surface-2); color: var(--sl-text); }
  .sl-command-dock-stop { inline-size: 8px; block-size: 8px; border-radius: 1.5px; background: currentColor; transform: var(--sl-slant); }

  .sl-command-dock-rows { display: grid; gap: var(--sl-space-3xs); margin: 0; padding: var(--sl-space-2xs); border-block-start: 1px solid var(--sl-line); list-style: none; }
  .sl-command-dock-rows:empty { display: none; }
  /* Each row rises in as it arrives; reduced motion shows it at rest. */
  .sl-command-dock-row { display: flex; min-inline-size: 0; animation: sl-in var(--sl-duration-base) var(--sl-ease-out); }
  .sl-command-dock-action, .sl-command-dock-entry {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--sl-space-sm);
    min-inline-size: 0;
    min-block-size: calc(var(--sl-command-dock-control) - 2px);
    padding: var(--sl-space-2xs);
    border-radius: max(0px, calc(var(--sl-radius-small) - 2px));
    color: var(--sl-text);
    text-align: start;
  }
  .sl-command-dock-action { border: 0; background: transparent; transition: background var(--sl-duration-fast), box-shadow var(--sl-duration-fast); }
  /* Plain rows are notes in the answer: quieter than the actions. */
  .sl-command-dock-entry { color: var(--sl-muted); }
  .sl-command-dock-entry .sl-command-dock-row-label { font-weight: 400; }
  .sl-command-dock-action:hover { background: var(--sl-surface-2); }
  /* The focused row sits on the selection pill. */
  .sl-command-dock-action:focus-visible { outline: none; background: var(--sl-accent-soft); box-shadow: inset 0 0 0 1px var(--sl-accent); }
  .sl-command-dock-mark { display: inline-grid; flex-shrink: 0; place-items: center; inline-size: 16px; block-size: 16px; color: var(--sl-tone); }
  .sl-command-dock-mark-pixel { inline-size: 8px; block-size: 8px; border-radius: 2px; background: currentColor; transform: var(--sl-slant); }
  .sl-command-dock-row-text { display: grid; flex: 1; gap: 1px; min-inline-size: 0; }
  .sl-command-dock-row-label { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  .sl-command-dock-row-description { overflow: hidden; font-size: var(--sl-font-size-sm); color: var(--sl-muted); text-overflow: ellipsis; white-space: nowrap; }

  .sl-command-dock-status {
    display: flex;
    align-items: center;
    gap: var(--sl-space-sm);
    min-block-size: var(--sl-control-sm);
    margin: 0;
    padding-inline: var(--sl-space-sm);
    border-block-start: 1px solid var(--sl-line);
    font: var(--sl-font-size-xs)/1.4 var(--sl-font-mono);
    color: var(--sl-muted);
  }
  .sl-command-dock-dots { color: var(--sl-accent); }
  .sl-command-dock-done { flex-shrink: 0; inline-size: 6px; block-size: 6px; margin-inline: 5px; border-radius: 1.5px; background: var(--sl-accent); transform: var(--sl-slant); }
  /* end CommandDock */
}
/* The nine loaders: pure CSS 3D built from rounded pixels, coloured by the
   --sl-* tokens. Every shape rests in a composed frame when motion is off, and
   the Loader stage pauses them all when running is false. */

@layer slant {
  .sl-loader {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    perspective: 900px;
    pointer-events: none;
  }
  .sl-loader[data-paused] *, .sl-loader[data-paused] *::before, .sl-loader[data-paused] *::after { animation-play-state: paused !important; }

  /* 1 · Pixel cube */
  .sl-ld-cube {
    --s: 104px;
    --half: calc(var(--s) / 2);
    position: relative;
    width: var(--s);
    height: var(--s);
    transform-style: preserve-3d;
    transform: rotateX(-24deg) rotateY(36deg);
    animation: sl-ld-cube-turn 9s linear infinite;
  }
  .sl-ld-cube-face {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 5px;
    border: 1px solid color-mix(in srgb, var(--sl-accent) 24%, transparent);
    border-radius: 14%;
    background: color-mix(in srgb, var(--sl-accent) 6%, transparent);
    transform: var(--face);
    /* Only faces turned toward the viewer render, so the cube reads as solid. */
    backface-visibility: hidden;
  }
  .sl-ld-cube-pixel {
    border-radius: 28%;
    background: var(--sl-accent);
    opacity: calc(.3 + var(--p) * .06);
    animation: sl-ld-cube-pulse 2.7s ease-in-out infinite;
    animation-delay: calc(var(--p) * .3s - 2.7s);
  }
  @keyframes sl-ld-cube-turn { to { transform: rotateX(-24deg) rotateY(396deg); } }
  @keyframes sl-ld-cube-pulse { 0%, 100% { opacity: .26; } 40% { opacity: 1; } }

  /* 2 · Wave grid */
  .sl-ld-wave {
    --pitch: 24px;
    position: relative;
    width: calc(7 * var(--pitch));
    height: calc(7 * var(--pitch));
    margin-top: 28px;
    transform-style: preserve-3d;
    transform: rotateX(58deg) rotateZ(45deg);
  }
  .sl-ld-wave-cell {
    position: absolute;
    left: calc(var(--x) * var(--pitch));
    top: calc(var(--y) * var(--pitch));
    width: calc(var(--pitch) - 5px);
    height: calc(var(--pitch) - 5px);
    border-radius: 28%;
    background: var(--sl-line);
    transform-style: preserve-3d;
  }
  .sl-ld-wave-tile {
    position: absolute;
    inset: 0;
    border-radius: 28%;
    background: var(--sl-accent);
    opacity: .8;
    transform: translateZ(var(--rest));
    animation: sl-ld-wave-rise 2.4s ease-in-out infinite;
    /* Phase lags with distance, so the wave travels outward from the centre. */
    animation-delay: calc(var(--d) * .22s - 2.4s);
  }
  @keyframes sl-ld-wave-rise {
    0%, 100% { transform: translateZ(0); opacity: .38; }
    50% { transform: translateZ(30px); opacity: 1; }
  }

  /* 3 · Pixel orbit */
  .sl-ld-orbit { position: relative; width: 0; height: 0; transform-style: preserve-3d; }
  .sl-ld-orbit-core {
    position: absolute;
    left: -12px;
    top: -12px;
    width: 24px;
    height: 24px;
    border-radius: 28%;
    background: var(--sl-accent);
    transform: var(--sl-slant);
  }
  /* Rings lean back by --tilt-x and turn about the view axis by --tilt-z, like an atom. */
  .sl-ld-orbit-ring { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateZ(var(--tilt-z)) rotateX(var(--tilt-x)); }
  .sl-ld-orbit-ring::before {
    content: '';
    position: absolute;
    left: calc(var(--r) * -1);
    top: calc(var(--r) * -1);
    width: calc(var(--r) * 2);
    height: calc(var(--r) * 2);
    border: 1px solid var(--sl-line);
    border-radius: 50%;
  }
  .sl-ld-orbit-spin { position: absolute; left: 0; top: 0; transform-style: preserve-3d; animation: sl-ld-orbit-spin var(--duration) linear infinite; }
  .sl-ld-orbit-spin.sl-ld-reverse { animation-direction: reverse; }
  .sl-ld-orbit-pixel {
    position: absolute;
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 28%;
    background: currentColor;
    transform: rotate(var(--angle)) translateX(var(--r)) var(--sl-slant);
  }
  .sl-ld-tone-accent { color: var(--sl-accent); }
  .sl-ld-tone-muted { color: var(--sl-muted); }
  .sl-ld-tone-faint { color: color-mix(in srgb, var(--sl-accent) 50%, transparent); }
  @keyframes sl-ld-orbit-spin { to { transform: rotate(360deg); } }

  /* 4 · Helix */
  .sl-ld-helix {
    --pitch: 11px;
    --r: 38px;
    position: relative;
    width: 0;
    height: calc(17 * var(--pitch));
    transform-style: preserve-3d;
    transform: rotateZ(-14deg) rotateY(20deg);
    animation: sl-ld-helix-spin 6s linear infinite;
  }
  .sl-ld-helix-level {
    position: absolute;
    left: 0;
    top: calc(var(--i) * var(--pitch));
    transform-style: preserve-3d;
    transform: rotateY(calc(var(--i) * 21deg));
  }
  .sl-ld-helix-rung { position: absolute; left: calc(var(--r) * -1); top: -1px; width: calc(var(--r) * 2); height: 2px; border-radius: 1px; background: var(--sl-line); }
  .sl-ld-helix-pixel { position: absolute; top: -4.5px; width: 9px; height: 9px; border-radius: 28%; }
  .sl-ld-strand-a { left: calc(var(--r) * -1 - 4.5px); background: var(--sl-accent); }
  .sl-ld-strand-b { left: calc(var(--r) - 4.5px); background: var(--sl-muted); }
  @keyframes sl-ld-helix-spin {
    from { transform: rotateZ(-14deg) rotateY(0deg); }
    to { transform: rotateZ(-14deg) rotateY(360deg); }
  }

  /* 5 · Stack flip */
  .sl-ld-stack {
    position: relative;
    width: 64px;
    height: 64px;
    margin-top: 36px;
    transform-style: preserve-3d;
    transform: rotateX(32deg) rotateY(-24deg);
  }
  .sl-ld-stack-card {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: translate3d(0, calc(var(--p) * -12px), calc(var(--p) * -26px));
    opacity: calc(1 - var(--p) * .22);
    animation: sl-ld-stack-shuffle 2.8s cubic-bezier(.5, 0, .25, 1) infinite;
    /* A quarter cycle apart: one card flips while the others step forward. */
    animation-delay: calc(var(--k) * -.7s);
  }
  .sl-ld-stack-face { position: absolute; inset: 0; border-radius: 26%; background: var(--sl-accent); transform: var(--sl-slant); }
  @keyframes sl-ld-stack-shuffle {
    0%, 4% { transform: translate3d(0, 0, 0) rotateX(0deg); opacity: 1; }
    15% { transform: translate3d(0, -60px, 26px) rotateX(-180deg); opacity: .9; }
    25%, 40% { transform: translate3d(0, -36px, -78px) rotateX(-360deg); opacity: .34; }
    50%, 65% { transform: translate3d(0, -24px, -52px) rotateX(-360deg); opacity: .56; }
    75%, 90% { transform: translate3d(0, -12px, -26px) rotateX(-360deg); opacity: .78; }
    100% { transform: translate3d(0, 0, 0) rotateX(-360deg); opacity: 1; }
  }

  /* 6 · Pixel ring: a head sweeps around the ring, lifting each pixel as it passes. */
  .sl-ld-ring { position: relative; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(52deg); }
  .sl-ld-ring::before {
    content: '';
    position: absolute;
    left: -64px;
    top: -64px;
    width: 128px;
    height: 128px;
    border: 1px solid var(--sl-line);
    border-radius: 50%;
  }
  .sl-ld-ring-slot { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; transform-style: preserve-3d; transform: rotate(var(--a)) translateX(64px); }
  .sl-ld-ring-pixel {
    position: absolute;
    inset: 0;
    border-radius: 28%;
    background: var(--sl-accent);
    opacity: calc(.18 + var(--rest) * .82);
    transform: translateZ(calc(var(--rest) * 16px)) var(--sl-slant) scale(calc(.8 + var(--rest) * .35));
    animation: sl-ld-ring-sweep 1.2s linear infinite;
    /* Each pixel trails the one before by a twelfth of the sweep. */
    animation-delay: calc(var(--i) * .1s - 1.2s);
  }
  @keyframes sl-ld-ring-sweep {
    0% { opacity: 1; transform: translateZ(16px) var(--sl-slant) scale(1.15); }
    70%, 100% { opacity: .18; transform: translateZ(0) var(--sl-slant) scale(.8); }
  }

  /* 7 · Stack drop: four pixels fall into a well, the full row flashes and clears. */
  .sl-ld-well {
    --cell: 26px;
    --gap: 6px;
    position: relative;
    width: calc(4 * var(--cell) + 3 * var(--gap));
    height: calc(3 * var(--cell) + 2 * var(--gap));
    margin-top: 24px;
    transform-style: preserve-3d;
    transform: rotateX(18deg) rotateY(-24deg);
  }
  .sl-ld-well-wall, .sl-ld-well-floor { position: absolute; border-radius: 2px; background: var(--sl-line); }
  .sl-ld-well-wall { bottom: -6px; width: 3px; height: calc(100% + 6px); }
  .sl-ld-well-wall.sl-ld-left { left: -8px; }
  .sl-ld-well-wall.sl-ld-right { right: -8px; }
  .sl-ld-well-floor { left: -8px; right: -8px; bottom: -8px; height: 3px; }
  .sl-ld-drop {
    position: absolute;
    left: calc(var(--c) * (var(--cell) + var(--gap)));
    bottom: 0;
    width: var(--cell);
    height: var(--cell);
    transform-origin: 50% 100%;
    animation: 3.2s linear infinite;
  }
  .sl-ld-drop-pixel { position: absolute; inset: 0; border-radius: 26%; background: var(--sl-accent); transform: var(--sl-slant); }
  .sl-ld-drop:nth-child(4) { animation-name: sl-ld-drop-0; }
  .sl-ld-drop:nth-child(5) { animation-name: sl-ld-drop-1; }
  .sl-ld-drop:nth-child(6) { animation-name: sl-ld-drop-2; }
  .sl-ld-drop:nth-child(7) { animation-name: sl-ld-drop-3; }
  .sl-ld-drop .sl-ld-drop-pixel { animation: sl-ld-drop-flash 3.2s linear infinite; }
  /* Shared clock: drops at 0.15s, 0.6s, 1.05s, 1.5s; the row flashes at 1.95–2.2s and clears by 2.7s. */
  @keyframes sl-ld-drop-0 {
    0%, 4.7% { opacity: 0; transform: translateY(-120px); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
    4.8% { opacity: 1; }
    14.1% { transform: translateY(0) scale(1.12, .84); }
    17%, 71.9% { opacity: 1; transform: translateY(0) scale(1); }
    84.4%, 100% { opacity: 0; transform: translateY(0) scale(.3); }
  }
  @keyframes sl-ld-drop-1 {
    0%, 18.75% { opacity: 0; transform: translateY(-120px); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
    18.85% { opacity: 1; }
    28.1% { transform: translateY(0) scale(1.12, .84); }
    31%, 71.9% { opacity: 1; transform: translateY(0) scale(1); }
    84.4%, 100% { opacity: 0; transform: translateY(0) scale(.3); }
  }
  @keyframes sl-ld-drop-2 {
    0%, 32.8% { opacity: 0; transform: translateY(-120px); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
    32.9% { opacity: 1; }
    42.2% { transform: translateY(0) scale(1.12, .84); }
    45%, 71.9% { opacity: 1; transform: translateY(0) scale(1); }
    84.4%, 100% { opacity: 0; transform: translateY(0) scale(.3); }
  }
  @keyframes sl-ld-drop-3 {
    0%, 46.9% { opacity: 0; transform: translateY(-120px); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
    47% { opacity: 1; }
    56.25% { transform: translateY(0) scale(1.12, .84); }
    59%, 71.9% { opacity: 1; transform: translateY(0) scale(1); }
    84.4%, 100% { opacity: 0; transform: translateY(0) scale(.3); }
  }
  @keyframes sl-ld-drop-flash {
    0%, 60.9%, 68.75%, 100% { background: var(--sl-accent); }
    64% { background: var(--sl-text); }
  }

  /* 8 · Scan grid: a bar sweeps the plane and each row lifts as it passes. */
  .sl-ld-scan {
    --pitch: 20px;
    position: relative;
    width: calc(8 * var(--pitch));
    height: calc(8 * var(--pitch));
    margin-top: 20px;
    transform-style: preserve-3d;
    transform: rotateX(58deg) rotateZ(-28deg);
  }
  .sl-ld-scan-cell {
    position: absolute;
    left: calc(var(--x) * var(--pitch));
    top: calc(var(--y) * var(--pitch));
    width: calc(var(--pitch) - 5px);
    height: calc(var(--pitch) - 5px);
    border-radius: 28%;
    background: var(--sl-line);
    transform-style: preserve-3d;
  }
  .sl-ld-scan-pixel {
    position: absolute;
    inset: 0;
    border-radius: 28%;
    background: var(--sl-accent);
    opacity: calc(.22 + var(--rest) * .78);
    transform: translateZ(calc(var(--rest) * 14px));
    animation: sl-ld-scan-lift 2.6s ease-out infinite;
    /* Rows light 0.12s apart, matching the bar's sweep. */
    animation-delay: calc(var(--y) * .12s - 2.6s);
  }
  @keyframes sl-ld-scan-lift {
    0% { opacity: 1; transform: translateZ(14px); }
    30%, 100% { opacity: .22; transform: translateZ(0); }
  }
  .sl-ld-scan-bar {
    position: absolute;
    left: -10px;
    right: -10px;
    top: -2px;
    height: 4px;
    border-radius: 2px;
    background: var(--sl-accent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--sl-accent) 60%, transparent);
    opacity: .9;
    transform: translate3d(0, calc(3.5 * var(--pitch)), 16px);
    animation: sl-ld-scan-bar 2.6s linear infinite;
  }
  @keyframes sl-ld-scan-bar {
    0% { opacity: .9; transform: translate3d(0, calc(.5 * var(--pitch)), 16px); }
    36.9% { opacity: .9; transform: translate3d(0, calc(8.5 * var(--pitch)), 16px); }
    42%, 100% { opacity: 0; transform: translate3d(0, calc(8.5 * var(--pitch)), 16px); }
  }

  /* 9 · Squash bounce: one pixel bouncing with squash and stretch over its shadow. */
  .sl-ld-bounce { position: relative; width: 200px; height: 180px; transform-style: preserve-3d; }
  .sl-ld-bounce-floor {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 90px;
    border: 1px solid var(--sl-line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--sl-line) 30%, transparent);
    transform: rotateX(72deg);
    transform-origin: 50% 100%;
  }
  .sl-ld-bounce-shadow {
    position: absolute;
    left: calc(50% - 30px);
    bottom: 20px;
    width: 60px;
    height: 14px;
    border-radius: 50%;
    /* Tinted rather than black, so the landing reads on dark and light themes. */
    background: color-mix(in srgb, var(--sl-accent) 70%, transparent);
    opacity: .5;
    filter: blur(4px);
    animation: sl-ld-bounce-shadow 1.1s infinite;
  }
  .sl-ld-bounce-body {
    position: absolute;
    left: calc(50% - 22px);
    bottom: 26px;
    width: 44px;
    height: 44px;
    transform-origin: 50% 100%;
    animation: sl-ld-bounce 1.1s infinite;
  }
  .sl-ld-bounce-pixel { position: absolute; inset: 0; border-radius: 26%; background: var(--sl-accent); transform: var(--sl-slant); }
  @keyframes sl-ld-bounce {
    0% { transform: translateY(-84px) scale(.94, 1.06); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
    44% { transform: translateY(0) scale(.9, 1.12); animation-timing-function: linear; }
    50% { transform: translateY(0) scale(1.24, .74); animation-timing-function: ease-out; }
    58% { transform: translateY(-10px) scale(.92, 1.1); animation-timing-function: cubic-bezier(.1, .55, .4, 1); }
    100% { transform: translateY(-84px) scale(.94, 1.06); }
  }
  @keyframes sl-ld-bounce-shadow {
    0%, 100% { opacity: .18; transform: scaleX(.55); }
    44%, 50% { opacity: .5; transform: scaleX(1.1); }
    58% { opacity: .42; transform: scaleX(.95); }
  }
}
