/* Generated by nbdev-export. Edit the source notebooks. */

@layer reset, tokens, base, layout, components, app, utilities;

@layer reset {
  @scope (:root, [ui]) to ([unstyle]) {
    :where(:scope, *), ::before, ::after { box-sizing: border-box; }
    :where(body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, blockquote, pre, figure, figcaption, hr) { margin: 0; }
    :where(button, input, textarea, select) { font: inherit; }
    :where(img, picture, video, canvas, svg) { max-inline-size: 100%; }
    :where(img:not([height]), img[width], picture, video, canvas, svg) { block-size: auto; }
    :where(img[height]:not([width])) { inline-size: auto; object-fit: contain; object-position: left top; }
  }
}

@layer tokens {
  @scope (:root, [ui]) to ([unstyle]) {
    :where(:scope):root {
      color-scheme: light dark;
      --hue: 260; --neutral-hue: 260;
      --hue-danger: 25; --hue-warning: 75; --hue-success: 145; --hue-info: 230;
    }
    :where(:scope, *) {
      &[ui-theme=system] { color-scheme: light dark; }
      &[ui-theme=light] { color-scheme: light; }
      &[ui-theme=dark] { color-scheme: dark; }
      &[ui-tone=danger] { --hue: var(--hue-danger); }
      &[ui-tone=warning] { --hue: var(--hue-warning); }
      &[ui-tone=success] { --hue: var(--hue-success); }
      &[ui-tone=info] { --hue: var(--hue-info); }
    }
    [prose] mark { --hue: var(--hue-warning); }

    :where(:scope):is(:root, [ui]), :where(:scope, *)[ui-tone], [prose] mark {
      --n-3: light-dark(oklch(0.9914 clamp(0, 0.00801 + 0.00551*cos((1*var(--neutral-hue) - 136.63)*1deg) + 0.00329*cos((2*var(--neutral-hue) - 268.97)*1deg) + 0.00139*cos((3*var(--neutral-hue) - 327.76)*1deg) + 0.00123*cos((4*var(--neutral-hue) - 93.61)*1deg) + 0.00125*cos((5*var(--neutral-hue) - 211.17)*1deg) + 0.00034*cos((6*var(--neutral-hue) - 339.8)*1deg) + 0.00023*cos((7*var(--neutral-hue) - 56.25)*1deg) + 0.00038*cos((8*var(--neutral-hue) - 125.04)*1deg) + 0.00015*cos((9*var(--neutral-hue) - 283.35)*1deg) + 7e-05*cos((10*var(--neutral-hue) - 349.22)*1deg) + 0.00021*cos((11*var(--neutral-hue) - 12.11)*1deg) + 0.00015*cos((12*var(--neutral-hue) - 161.94)*1deg), 0.02) var(--neutral-hue)), oklch(0.1026 clamp(0, 0.01959 + 0.00041*cos((1*var(--neutral-hue) - 19.99)*1deg), 0.02) var(--neutral-hue))); /* base: the lightness extreme (the default page) */
      --n-2: light-dark(oklch(0.9506 0.02 var(--neutral-hue)), oklch(0.1434 0.02 var(--neutral-hue))); /* raised surface: cards, inputs */
      --n-1: light-dark(oklch(0.7903 0.02 var(--neutral-hue)), oklch(0.3385 0.02 var(--neutral-hue))); /* hairline borders, separators */
      --n: light-dark(oklch(0.6503 0.02 var(--neutral-hue)), oklch(0.4611 0.02 var(--neutral-hue))); /* disabled text and controls */
      --n1: light-dark(oklch(0.5247 0.02 var(--neutral-hue)), oklch(0.5812 0.02 var(--neutral-hue))); /* muted and placeholder text */
      --n2: light-dark(oklch(0.4217 0.02 var(--neutral-hue)), oklch(0.7918 0.02 var(--neutral-hue))); /* body text; body text on surface */
      --v-3: light-dark(oklch(0.913 0.03581 var(--hue)), oklch(0.1825 clamp(0, 0.05701 + 0.02563*cos((1*var(--hue) - 325.45)*1deg) + 0.01252*cos((2*var(--hue) - 263.8)*1deg) + 0.00819*cos((3*var(--hue) - 96.1)*1deg) + 0.00256*cos((4*var(--hue) - 85.33)*1deg) + 0.0017*cos((5*var(--hue) - 319.1)*1deg) + 0.0034*cos((6*var(--hue) - 157.26)*1deg) + 0.00073*cos((7*var(--hue) - 138.05)*1deg) + 0.00112*cos((8*var(--hue) - 2.43)*1deg) + 0.00177*cos((9*var(--hue) - 237.19)*1deg) + 0.00037*cos((10*var(--hue) - 228.33)*1deg) + 0.00064*cos((11*var(--hue) - 69.15)*1deg), 0.09221) var(--hue))); /* subtle background wash; distinct from raised surface */
      --v-2: light-dark(oklch(0.7453 clamp(0, 0.12952 + 0.00279*cos((1*var(--hue) - 18.52)*1deg), 0.13231) var(--hue)), oklch(0.3792 clamp(0, 0.11554 + 0.05156*cos((1*var(--hue) - 327.56)*1deg) + 0.02507*cos((2*var(--hue) - 264.93)*1deg) + 0.01578*cos((3*var(--hue) - 92.55)*1deg) + 0.00467*cos((4*var(--hue) - 86.48)*1deg) + 0.00337*cos((5*var(--hue) - 312.62)*1deg) + 0.00706*cos((6*var(--hue) - 156.72)*1deg) + 0.00165*cos((7*var(--hue) - 144.83)*1deg) + 0.00212*cos((8*var(--hue) - 5.61)*1deg) + 0.00327*cos((9*var(--hue) - 233.15)*1deg), 0.18274) var(--hue))); /* wash hover, selected */
      --v-1: light-dark(oklch(0.6068 clamp(0, 0.15177 + 0.03348*cos((1*var(--hue) - 339.18)*1deg) + 0.01411*cos((2*var(--hue) - 265.25)*1deg) + 0.02027*cos((3*var(--hue) - 71.84)*1deg) + 0.00504*cos((4*var(--hue) - 202.5)*1deg) + 0.00284*cos((5*var(--hue) - 280.18)*1deg) + 0.00522*cos((6*var(--hue) - 138.11)*1deg), 0.18647) var(--hue)), oklch(0.5094 clamp(0, 0.14536 + 0.05279*cos((1*var(--hue) - 334.05)*1deg) + 0.02127*cos((2*var(--hue) - 276.04)*1deg) + 0.02169*cos((3*var(--hue) - 73.93)*1deg) + 0.00271*cos((4*var(--hue) - 80.86)*1deg) + 0.00309*cos((5*var(--hue) - 307.8)*1deg) + 0.00789*cos((6*var(--hue) - 145.12)*1deg) + 0.00091*cos((7*var(--hue) - 251.54)*1deg) + 0.00153*cos((8*var(--hue) - 336.58)*1deg) + 0.00362*cos((9*var(--hue) - 213.73)*1deg), 0.19989) var(--hue))); /* border, focus ring; large accent text */
      --v: light-dark(oklch(0.5109 clamp(0, 0.14555 + 0.0526*cos((1*var(--hue) - 334.09)*1deg) + 0.02117*cos((2*var(--hue) - 275.99)*1deg) + 0.02172*cos((3*var(--hue) - 73.84)*1deg) + 0.00264*cos((4*var(--hue) - 81.88)*1deg) + 0.00308*cos((5*var(--hue) - 307.72)*1deg) + 0.00788*cos((6*var(--hue) - 144.99)*1deg) + 0.00097*cos((7*var(--hue) - 254.36)*1deg) + 0.00156*cos((8*var(--hue) - 336.36)*1deg) + 0.00359*cos((9*var(--hue) - 214.08)*1deg), 0.19985) var(--hue)), oklch(0.71 clamp(0, 0.13825 + 0.01049*cos((1*var(--hue) - 10.64)*1deg) + 0.00723*cos((2*var(--hue) - 226.95)*1deg), 0.14949) var(--hue))); /* solid fill with base-coloured label; accent text on surface */
      --v1: light-dark(oklch(0.4609 clamp(0, 0.13622 + 0.05574*cos((1*var(--hue) - 331.36)*1deg) + 0.02464*cos((2*var(--hue) - 272.89)*1deg) + 0.0188*cos((3*var(--hue) - 78.49)*1deg) + 0.00313*cos((4*var(--hue) - 73.47)*1deg) + 0.00393*cos((5*var(--hue) - 301.46)*1deg) + 0.00794*cos((6*var(--hue) - 154.72)*1deg) + 0.00129*cos((7*var(--hue) - 189.47)*1deg) + 0.00145*cos((8*var(--hue) - 338.99)*1deg) + 0.00411*cos((9*var(--hue) - 219.84)*1deg), 0.19816) var(--hue)), oklch(0.7553 clamp(0, 0.12589 + 0.00123*cos((1*var(--hue) - 87.5)*1deg), 0.12713) var(--hue))); /* solid hover */
      --v2: light-dark(oklch(0.4111 clamp(0, 0.12402 + 0.05381*cos((1*var(--hue) - 328.74)*1deg) + 0.02534*cos((2*var(--hue) - 267.43)*1deg) + 0.01666*cos((3*var(--hue) - 87.73)*1deg) + 0.00394*cos((4*var(--hue) - 85.73)*1deg) + 0.00349*cos((5*var(--hue) - 305.12)*1deg) + 0.00764*cos((6*var(--hue) - 156.18)*1deg) + 0.00167*cos((7*var(--hue) - 153.78)*1deg) + 0.00191*cos((8*var(--hue) - 7.44)*1deg) + 0.00338*cos((9*var(--hue) - 227.69)*1deg), 0.19058) var(--hue)), oklch(0.8024 clamp(0, 0.0999 + 0.00111*cos((1*var(--hue) - 86.68)*1deg), 0.10104) var(--hue))); /* strong accent text on surface; alert text on wash */
      --color-text: var(--n2); --color-muted: var(--n1);
      --color-background: var(--n-3); --color-surface: var(--n-2); --color-border: var(--n-1);
      --color-accent: var(--v); --color-on-accent: var(--n-3);
      --ring: 2px solid var(--v-1);
    }
    :where(:scope, *)[ui-tone=neutral] {
      --v-3: var(--n-2); --v-2: var(--n-1); --v-1: var(--n); --v: var(--n1); --v1: var(--n2); --v2: var(--n2);
    }

    :where(:scope):root {
      --font: system-ui, sans-serif;
      --font-mono: ui-monospace, Menlo, Consolas, monospace;
      --text: 1rem;
      --weight: 400; --weight1: 600;
      --leading: 1.5; --leading-1: 1.25;
      --prose-scale: .75;
      --prose-font-scale: 1;
      --prose-leading: 1.45;
      --prose-measure: 65ch;
      --space: 1rem;
      --radius: .5rem; --radius-full: 9999px;
      --relief: 1;
      --motion: 150ms;
      --ease: cubic-bezier(.2, 0, 0, 1);
      @media (prefers-reduced-motion: reduce) { --motion: 0ms; }
    }

    :where(:scope, *), ::before, ::after {
      --text-1: calc(var(--text) * .875);
      --text1: calc(var(--text) * 1.25);
      --text2: calc(var(--text) * 1.5);
      --text3: calc(var(--text) * 2);
      --space-3: calc(var(--space) * .25);
      --space-2: calc(var(--space) * .5);
      --space-1: calc(var(--space) * .75);
      --space1: calc(var(--space) * 1.5);
      --space2: calc(var(--space) * 2);
      --space3: calc(var(--space) * 3);
      --radius-1: calc(var(--radius) * .5);
      --radius1: calc(var(--radius) * 2);
    }

    @keyframes ui-spin { to { rotate: 1turn; } }

    :where(:scope, *)[ui], :where(:scope):root { --face: var(--color-surface); }
    :where(:scope, *), ::before, ::after {
      --tint: oklch(from currentColor l c h / .08);
      --hi: oklch(from var(--face) calc(l + .16) c h / var(--relief));
      --lo: oklch(from var(--face) calc(l - .16) c h / var(--relief));
      --shadow-color: light-dark(rgb(0 0 0 / calc(.12 * var(--relief))), rgb(0 0 0 / calc(.5 * var(--relief))));
      --floating-shadow: light-dark(rgb(0 0 0 / .12), rgb(0 0 0 / .5));
      --bevel: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
      --bevel-in: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
      --raised: 0 2px 4px var(--shadow-color);
      --sunken: inset 0 2px 4px var(--shadow-color);
      --floating: 0 4px 12px var(--floating-shadow), 0 12px 32px var(--floating-shadow);
    }
  }
}

@layer base {
  @scope (:root, [ui]) to ([unstyle]) {
    :where(:scope):is([ui], :root) { background: var(--color-background); color: var(--color-text); accent-color: var(--color-accent); }
    :where(:scope, *):is([ui], body) { font: var(--weight) var(--text)/var(--leading) var(--font); }
    :where(:scope, *):focus-visible { outline: var(--ring); outline-offset: 2px; }
    :where(h1, h2, h3, h4, h5, h6) { font-family: var(--font-heading, inherit); font-weight: var(--weight1); line-height: var(--leading-1); text-wrap: balance; }
    :where(h1) { font-size: var(--text3); }
    :where(h2) { font-size: var(--text2); }
    :where(h3) { font-size: var(--text1); }
    :where(h4, h5, h6) { font-size: var(--text); }
    :where(a) { color: var(--color-accent); text-underline-offset: .15em; }
    :where(code, kbd, pre, samp) { font-family: var(--font-mono); }
    :where(small) { font-size: var(--text-1); }
    :where(svg.ui-icon, svg[icon], svg:has(> use)) { inline-size: 1.25em; block-size: 1.25em; flex: none; vertical-align: -.25em; }
    .ui-divider { border: 0; border-block-start: 1px solid var(--color-border); }

    /* Typography folded in from typrose, based on Tailwind Labs' typography styles.
     * MIT License
     * Copyright (c) 2026 Answer.AI
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to deal
     * in the Software without restriction, including without limitation the rights
     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     * copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice shall be included in all
     * copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     * SOFTWARE.
     */

    :where(:scope, *)[prose] {
      --sp: calc(var(--prose-scale) * 1em);
      max-inline-size: var(--prose-measure); overflow-wrap: anywhere;
      font-size: calc(var(--text) * var(--prose-font-scale)); line-height: var(--prose-leading); color: var(--color-text);

      /* Use block-start margins for vertical spacing; outer edges are cleared at the container boundary. */
      :where(p, ol, ul, dl) { margin-block-start: var(--sp); }
      :where(dt) { margin-block-start: var(--sp); font-weight: var(--weight1); }
      :where(dd) { margin-block-start: calc(var(--sp) * .25); padding-inline-start: 1.375em; }
      :where(li) { margin-block-start: calc(var(--sp) * .25); }
      :where(ol, ul) {
        padding-inline-start: 1.7em;
        > :where(li) { padding-inline-start: .375em; }
        > :where(li)::marker { color: var(--color-muted); }
        :where(ol, ul) { margin: 0; }
      }
      :where(ol) {
        list-style-type: decimal;
        > :where(li)::marker { font-weight: var(--weight); }
        &:where([type="A"], [type="A" s]) { list-style-type: upper-alpha; }
        &:where([type="a"], [type="a" s]) { list-style-type: lower-alpha; }
        &:where([type="I"], [type="I" s]) { list-style-type: upper-roman; }
        &:where([type="i"], [type="i" s]) { list-style-type: lower-roman; }
        &:where([type="1"]) { list-style-type: decimal; }
      }
      :where(ul) { list-style-type: disc; }
      > :where(ol, ul) > li {
        :where(p) { margin-block-start: calc(var(--sp) * .5); }
        > :where(p:first-child) { margin-block-start: calc(var(--sp) * .75); }
      }
      :where(p + :is(ol, ul)) { margin-block-start: calc(var(--sp) * .25); }

      :where(h1) { font-size: 2.25em; font-weight: 800; line-height: 1.1; margin-block-start: calc(var(--sp) * 1.4); :where(strong) { font-weight: 900; } }
      :where(h2) { font-size: 1.5em; font-weight: 700; line-height: 1.3; margin-block-start: calc(var(--sp) * 1.4); :where(strong) { font-weight: 800; } }
      :where(h3) { font-size: 1.25em; font-weight: var(--weight1); line-height: 1.4; margin-block-start: calc(var(--sp) * 1.2); }
      :where(h4, h5, h6) { font-size: 1em; font-weight: var(--weight1); line-height: 1.4; margin-block-start: calc(var(--sp) * 1.25); }
      :where(:is(h3, h4, h5, h6) strong) { font-weight: 700; }
      :where(.lead) { font-size: 1.25em; line-height: 1.6; color: var(--color-muted); margin-block-start: var(--sp); }

      :where(a:not([btn])) { color: var(--color-accent); text-decoration: underline; text-underline-offset: .15em; font-weight: 500; }
      :where(strong) { font-weight: var(--weight1); }

      :where(img, picture, video, figure) { margin-block-start: calc(var(--sp) * 1.5); }
      :where(picture) { display: block; }
      :where(img, video) { display: block; border-radius: var(--radius); }
      :where(figcaption) { font-size: .875em; line-height: 1.4; color: var(--color-muted); margin-block-start: calc(var(--sp) * .5); }
      :where(small) { font-size: .875em; color: var(--color-muted); }

      :where(blockquote) {
        font-style: italic; font-weight: 500; margin-block-start: calc(var(--sp) * 1.5); padding-inline-start: 1em;
        border-inline-start: .25rem solid var(--color-border); quotes: "\201C" "\201D" "\2018" "\2019";
      }

      :where(*:not(pre) > code) {
        font-size: .875em; font-weight: var(--weight1); background: var(--color-surface);
        padding: .1em .3rem; border-radius: var(--radius-1); line-height: 1.2rem;
      }
      :where(pre) {
        font-size: inherit; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto;
        padding: .25rem .3rem; border-radius: var(--radius-1); background: var(--color-surface); margin-block-start: var(--sp);
        :where(code) { padding: 0; background: none; font: inherit; }
      }
      :where(kbd) {
        font-size: .875em; font-weight: 500; font-family: inherit; padding: .125em .3125em; border-radius: var(--radius-1);
        box-shadow: 0 0 0 1px var(--color-border), 0 3px 0 var(--color-border);
      }
      :where(mark) { background: var(--v-3); color: var(--v2); padding: .1em .2em; border-radius: var(--radius-1); }

      /* Prose tables wrap and scroll, independently of the application [table] skin. */
      :where(table) {
        display: block; inline-size: fit-content; max-inline-size: calc(100% + 1em); overflow-x: auto; border-collapse: collapse;
        font-size: .875em; line-height: 1.5; margin-block: calc(var(--sp) * 2) 0; margin-inline: -.5em;
        :where(caption) { inline-size: max-content; max-inline-size: 100%; padding-inline: .5em; }
        :where(th, td) { text-align: start; overflow-wrap: break-word; }
        :where(thead) {
          border-block-end: 1px solid var(--color-border);
          :where(th) { font-weight: var(--weight1); vertical-align: bottom; padding-block: 0 calc(var(--sp) * .5); padding-inline: .5em; }
        }
        :where(tbody) {
          :where(tr:not(:last-child)) { border-block-end: 1px solid var(--color-border); }
          :where(th, td) { vertical-align: baseline; padding-block: calc(var(--sp) * .5); padding-inline: .5em; }
        }
        :where(tfoot) {
          border-block-start: 1px solid var(--color-border);
          :where(th, td) { vertical-align: top; padding-block: calc(var(--sp) * .5); padding-inline: .5em; }
        }
      }

      :where(hr) {
        border: 0; margin-block-start: var(--sp); position: relative; block-size: 1.25rem;
        background: radial-gradient(circle, transparent 6px, var(--color-border) 6px 8px, transparent 8px) center / 20px 20px no-repeat;
        &::before, &::after { content: ''; position: absolute; inset-block-start: 50%; inline-size: calc(50% - .75rem); border-block-end: 1px solid var(--color-border); }
        &::before { inset-inline-start: 0; }
        &::after { inset-inline-end: 0; }
      }

      :where(h1 + *) { margin-block-start: calc(var(--sp) * 1.5); }
      :where(h2 + *) { margin-block-start: var(--sp); }
      :where(:is(h3, h4, h5, h6) + *) { margin-block-start: calc(var(--sp) * .5); }
      :where(picture > img, figure > :not(figcaption)) { margin-block: 0; }
      > :first-child { margin-block-start: 0; }
      > :last-child { margin-block-end: 0; }
    }

    [prose-size=sm] { --prose-scale: .7; --prose-font-scale: .875; }
    [prose-size=lg] { --prose-scale: .8; --prose-font-scale: 1.125; }
    [prose-size=xl] { --prose-scale: .9; --prose-font-scale: 1.25; }
    [prose-size="2xl"] { --prose-scale: 1.1; --prose-font-scale: 1.5; }
  }
}

@layer layout {
  @scope (:root, [ui]) to ([unstyle]) {
    :where(:scope, *):is([stack], [cluster], [grid]) {
      --gap: var(--space); gap: var(--gap);
      &:is(ul, ol) { padding: 0; list-style: none; }
    }
    :where(:scope, *)[stack] { display: flex; flex-direction: column; }
    :where(:scope, *)[cluster] { display: flex; flex-wrap: wrap; align-items: center; justify-content: start; }
    :where(:scope, *)[grid] {
      --grid-min: 16rem; display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min)), 1fr));
      > * { min-inline-size: 0; }
    }
    :where(:scope, *):is([stack], [cluster]) > [grow] { flex: 1; min-inline-size: 0; min-block-size: 0; }
    :where(:scope, *)[toolbar] { display: flex; align-items: center; gap: var(--space-2); min-inline-size: 0; }

    :where(:scope, *)[flow] {
      --flow-space: .5em; display: grid; align-content: start; row-gap: var(--flow-space);
      > :is(h1, h2, h3, h4, h5, h6):not(:first-child) { margin-block-start: .5em; }
    }
  }
}

@layer components {
  @scope (:root, [ui]) to ([unstyle]) {
    :where(:scope, *)[btn] {
      --face: var(--color-accent);
      --ui-held-face: var(--v2);
      --ui-held-shadow: var(--bevel-in), var(--sunken);
      --ui-pad-block: var(--space-2);
      --ui-pad-inline: var(--space);
      --ui-press: 0px;
      --busy-delay: 200ms;
      position: relative;
      display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
      padding: calc(var(--ui-pad-block) + var(--ui-press)) calc(var(--ui-pad-inline) - var(--ui-press))
        calc(var(--ui-pad-block) - var(--ui-press)) calc(var(--ui-pad-inline) + var(--ui-press));
      border: 1px solid transparent; border-radius: var(--radius);
      background: var(--face); color: var(--color-on-accent); box-shadow: var(--bevel), var(--raised);
      font: inherit; font-weight: var(--weight1); line-height: var(--leading-1);
      text-align: center; text-decoration: none; cursor: pointer;
      transition: background var(--motion) var(--ease), box-shadow var(--motion) var(--ease), padding calc(var(--motion) / 2) var(--ease), opacity var(--motion) var(--ease);

      & > :where(span) { display: inline-flex; align-items: center; justify-content: inherit; gap: var(--space-2); }
      &:where(:hover:not(:disabled)) { --face: var(--v1); }
      &:where(:active:not(:disabled)) { --ui-press: calc(1px * var(--relief)); }
      &:where([btn-size=sm]) { --ui-pad-block: var(--space-3); --ui-pad-inline: var(--space-2); font-size: var(--text-1); }
      &:where([btn-size=lg]) { --ui-pad-block: var(--space-1); --ui-pad-inline: var(--space1); font-size: var(--text1); }
      &:where([btn-variant=secondary]) {
        --face: var(--color-surface); --ui-held-face: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
        &:where(:hover:not(:disabled)) { --face: var(--v-3); }
        &:where([aria-pressed=true], [aria-expanded=true], [aria-busy=true]) { --ui-held-face: var(--v-3); color: var(--v2); }
        &:where(.htmx-request) { --ui-held-face: var(--v-3); &::after { color: var(--v2); } }
      }
      &:where([btn-variant=quiet], [btn-variant=editable]) {
        --face: transparent; --ui-held-face: color-mix(in oklch, currentColor 12%, transparent); --ui-held-shadow: none;
        --ui-press: 0px; color: inherit; box-shadow: none;
        &:where(:hover:not(:disabled)) { --face: var(--tint); }
      }
      &:where([btn-variant=editable]) {
        --ui-pad-inline: var(--space-1); inline-size: 100%; justify-content: start; border-color: var(--n); border-style: dashed;
        font-weight: inherit; text-align: start; cursor: text;
      }
      &:where(:is(:active, [aria-busy=true], [aria-pressed=true], [aria-expanded=true]):not(:disabled)) {
        --face: var(--ui-held-face); box-shadow: var(--ui-held-shadow);
      }
      &:where(:disabled) { opacity: .5; box-shadow: none; cursor: default; }
      &:where([aria-busy=true]) { -webkit-text-fill-color: transparent; }
      &:where([aria-busy=true], .htmx-request) {
        & > :where(span, svg) { opacity: 0; }
        &::after {
          content: ''; position: absolute; inset: 0; margin: auto; inline-size: 1.25em; block-size: 1.25em;
          border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: var(--radius-full);
          animation: ui-spin calc(var(--motion) * 5) linear infinite;
        }
      }
      &:where(.htmx-request:not([aria-busy=true])) {
        animation: ui-busy-held 0s linear var(--busy-delay) both;
        & > :where(span, svg) { transition: opacity var(--motion) var(--ease) var(--busy-delay); }
        &::after { animation: ui-spin calc(var(--motion) * 5) linear infinite, ui-busy-in var(--motion) var(--ease) var(--busy-delay) both; }
      }
      &:where([btn-icon]) {
        --ui-pad-inline: var(--ui-pad-block);
        & > :where(span) { inline-size: 1.25em; block-size: 1.25em; }
      }
      &:is([copyfor], [copy]) {
        & > svg > use:last-child { display: none; }
        &[copied] > svg > use:first-child { display: none; }
        &[copied] > svg > use:last-child { display: inline; }
      }
      @media (prefers-reduced-motion: reduce) {
        transition: none;
        &:where([aria-busy=true], .htmx-request)::after { animation-duration: 2s, 0s; }
      }
    }
    @keyframes ui-busy-held { to { --face: var(--ui-held-face); box-shadow: var(--ui-held-shadow); -webkit-text-fill-color: transparent; } }
    @keyframes ui-busy-in { from { opacity: 0; } }

    :where(:scope, *):where([input], [textarea], [select]) {
      --face: var(--color-background);
      inline-size: 100%; min-inline-size: 0; padding: var(--space-2) var(--space-1);
      border: 1px solid var(--color-border); border-radius: var(--radius);
      background: var(--face); color: var(--color-text); box-shadow: var(--bevel-in), var(--sunken);
      font: inherit;
      transition: border-color var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
      &::placeholder { color: var(--color-muted); }
      &:disabled { --face: var(--n-2); color: var(--n); box-shadow: var(--bevel-in); }
    }
    :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch]):is(:user-invalid, [aria-invalid=true]) {
      border-color: light-dark(oklch(52% .18 var(--hue-danger)), oklch(75% .14 var(--hue-danger)));
    }
    :where(:scope, *):where([input][type=number]) {
      appearance: textfield;
      &::-webkit-inner-spin-button, &::-webkit-outer-spin-button { appearance: none; margin: 0; }
    }
    :where(:scope, *):where([textarea]) { min-block-size: 5rem; resize: vertical; field-sizing: content; }
    :where(:scope, *):where([checkbox], [radio]) {
      --face: var(--color-background);
      appearance: none; display: inline-grid; place-content: center; flex: none;
      inline-size: 1.15em; block-size: 1.15em; margin: 0; padding: 0;
      border: 1px solid var(--color-border); border-radius: var(--radius-1);
      background: var(--face); color: var(--color-accent); box-shadow: var(--sunken); vertical-align: middle;
      transition: background var(--motion) var(--ease), border-color var(--motion) var(--ease);
      &::before {
        content: ''; inline-size: .6em; block-size: .6em; background: var(--color-on-accent); scale: 0; transition: scale var(--motion) var(--ease);
      }
      &:disabled { --face: var(--n-2); border-color: var(--n-1); }
    }
    :where(:scope, *):where([checkbox]) {
      &::before { clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
      &:is(:checked, :indeterminate) {
        --face: var(--color-accent); border-color: var(--color-accent);
        &::before { scale: 1; }
        &:disabled { --face: var(--n-1); border-color: var(--n-1); }
      }
      &:indeterminate::before { clip-path: none; block-size: .15em; }
    }
    :where(:scope, *):where([radio]) {
      &, &::before { border-radius: var(--radius-full); }
      &::before { background: var(--color-accent); }
      &:checked {
        border-color: var(--color-accent);
        &::before { scale: 1; }
        &:disabled::before { background: var(--n); }
      }
    }
    :where(:scope, *):where([switch]) {
      --face: var(--color-background);
      appearance: none; display: inline-grid; align-items: center; flex: none;
      inline-size: 2.75em; block-size: 1.5em; margin: 0; padding: 2px;
      border: 1px solid var(--color-border); border-radius: var(--radius-full);
      background: var(--face); box-shadow: var(--bevel-in), var(--sunken); vertical-align: middle;
      transition: background var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
      &::before {
        --face: var(--n-2);
        content: ''; inline-size: calc(1.5em - 6px); block-size: calc(1.5em - 6px); border-radius: var(--radius-full);
        background: var(--face); box-shadow: var(--bevel), var(--raised);
        transition: translate var(--motion) var(--ease), background var(--motion) var(--ease);
      }
      &:checked {
        --face: var(--color-accent);
        &::before { translate: 1.25em 0; --face: var(--color-on-accent); }
        &:dir(rtl)::before { translate: -1.25em 0; }
      }
      &:disabled {
        --face: var(--n-2); box-shadow: var(--bevel-in);
        &::before { --face: var(--n-1); box-shadow: var(--bevel); }
      }
    }
    :where(:scope, *):where([range]) {
      --ui-track: .6em; --ui-thumb: 1.25em; --ui-range-direction: to right;
      appearance: none; inline-size: 100%; block-size: 1.5em; margin: 0; padding: 0; background: transparent;
      &::-webkit-slider-runnable-track {
        --face: var(--color-background);
        block-size: var(--ui-track); border: 1px solid var(--color-border); border-radius: var(--radius-full);
        background: linear-gradient(var(--ui-range-direction), var(--color-accent) var(--ui-range-fill, 0%), var(--face) 0); box-shadow: var(--bevel-in), var(--sunken);
      }
      &::-moz-range-track {
        --face: var(--color-background);
        block-size: var(--ui-track); border: 1px solid var(--color-border); border-radius: var(--radius-full);
        background: linear-gradient(var(--ui-range-direction), var(--color-accent) var(--ui-range-fill, 0%), var(--face) 0); box-shadow: var(--bevel-in), var(--sunken);
      }
      &::-webkit-slider-thumb {
        --face: var(--color-accent);
        appearance: none; inline-size: var(--ui-thumb); block-size: var(--ui-thumb); border: 0; border-radius: var(--radius-full);
        margin-block-start: calc((var(--ui-track) - var(--ui-thumb)) / 2 - 1px);
        background: var(--face); box-shadow: var(--bevel), var(--raised);
      }
      &::-moz-range-thumb {
        --face: var(--color-accent);
        inline-size: var(--ui-thumb); block-size: var(--ui-thumb); border: 0; border-radius: var(--radius-full);
        background: var(--face); box-shadow: var(--bevel), var(--raised);
      }
      &:active {
        &::-webkit-slider-thumb { box-shadow: var(--bevel-in), var(--sunken); }
        &::-moz-range-thumb { box-shadow: var(--bevel-in), var(--sunken); }
      }
      &:disabled {
        opacity: .5;
        &::-webkit-slider-runnable-track { background: linear-gradient(var(--ui-range-direction), var(--n) var(--ui-range-fill, 0%), var(--n-2) 0); }
        &::-moz-range-track { background: linear-gradient(var(--ui-range-direction), var(--n) var(--ui-range-fill, 0%), var(--n-2) 0); }
        &::-webkit-slider-thumb { --face: var(--n-1); box-shadow: var(--bevel); }
        &::-moz-range-thumb { --face: var(--n-1); box-shadow: var(--bevel); }
      }
      &:dir(rtl) { --ui-range-direction: to left; }
    }
    :where(:scope, *)[group] {
      display: inline-flex; align-items: stretch; gap: 0; min-inline-size: 0; border-radius: var(--radius);
      & > :where([btn], [input], [textarea], [select]) {
        border-radius: 0;
        &:first-child { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
        &:last-child { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
        & + :where([btn], [input], [textarea], [select]) { margin-inline-start: -1px; }
      }
      &:where(:has(> :is([input], [textarea], [select]))) { inline-size: 100%; }
      & > :where([btn]) { flex: none; }
      & > :where([input], [textarea], [select]) {
        flex: 1; min-inline-size: 0;
        &:focus-visible { outline: none; }
      }
      &:where(:has(> :is([input], [textarea], [select]):focus-visible)) { outline: var(--ring); outline-offset: 2px; }
      &[group-variant=inset] {
        --face: var(--color-background);
        align-items: center; padding-inline-end: var(--space-3); border: 1px solid var(--color-border);
        background: var(--face); box-shadow: var(--bevel-in), var(--sunken);
        & > :where([btn], [input], [textarea], [select]) { margin: 0; border-radius: var(--radius-1); }
        & > :where([input], [textarea], [select]) { border: 0; background: transparent; box-shadow: none; }
        & > :where([btn]) { --ui-pad-block: var(--space-3); --ui-pad-inline: var(--space-2); }
      }
    }
    :where(:scope, *)[field] {
      display: grid; gap: var(--space-3); min-inline-size: 0; font-size: var(--text-1);
      & > :where(label) { justify-self: start; font-weight: var(--weight1); }
      & > :where([field-control]) { min-inline-size: 0; }
      & > :where(small) { color: var(--color-muted); font-size: inherit; }
      &[field-inline] {
        grid-template-columns: auto 1fr; align-items: center; column-gap: var(--space-2);
        & > :where(label) { grid-column: 2; grid-row: 1; font-weight: var(--weight); }
        & > :where([field-control]) { grid-column: 1; grid-row: 1; display: flex; }
        & > :where(small) { grid-column: 1 / -1; }
      }
      &:where(:has(:disabled)) > :where(label) { color: var(--n); }
    }
    :where(:scope, *):where(small, p)[ui-tone]:not([ui-tone=neutral]) { color: var(--v2); }
    :where(:scope, *):where([fieldset]) {
      min-inline-size: 0; margin: 0; padding: var(--space); border: 1px solid var(--color-border); border-radius: var(--radius);
      & > :where(legend) { padding-inline: var(--space-2); font-weight: var(--weight1); }
    }
    @media (prefers-reduced-motion: reduce) {
      :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch]), :where([checkbox], [radio], [switch])::before { transition: none; }
    }
    @media (forced-colors: active) {
      :where(:scope, *):where([checkbox], [radio], [switch]) {
        appearance: auto;
        &::before { display: none; }
      }
      :where(:scope, *):where([range]) {
        appearance: auto;
        &::-webkit-slider-thumb { appearance: auto; }
      }
    }

    :where(:scope, *)[card] { --face: var(--color-surface); padding: var(--space); background: var(--face); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--raised); }
    :where(:scope, *)[badge] {
      display: inline-block; padding: .125em .5em; border-radius: var(--radius-1);
      background: var(--v-3); color: var(--v2); font-size: var(--text-1); font-weight: var(--weight1); line-height: var(--leading-1);
      &[badge-variant=secondary] { background: var(--color-surface); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border); }
    }
    :where(:scope, *)[avatar] {
      display: inline-grid; place-items: center; vertical-align: middle; flex: none;
      inline-size: var(--avatar-size, 2.5rem); block-size: var(--avatar-size, 2.5rem); border-radius: var(--radius-full);
      object-fit: cover; background: var(--v-3); color: var(--v2); font-size: calc(var(--avatar-size, 2.5rem) * .4);
      font-weight: var(--weight1); line-height: 1;
    }
    :where(:scope, *)[btn]:has(> [avatar]:only-child) {
      --ui-pad-block: 1px; --ui-pad-inline: 1px; border-radius: var(--radius-full);
      --face: var(--color-surface); border-color: var(--color-border);
    }

    :where(:scope, *)[alert] {
      display: flex; align-items: flex-start; gap: var(--space); padding: var(--space); border: 1px solid var(--v-2);
      border-radius: var(--radius); background: var(--v-3); color: var(--v2);
      > [stack] { --gap: var(--space-2); flex: 1; min-inline-size: 0; }
    }
    :where(:scope, *)[progress] { inline-size: 100%; block-size: var(--space-2); accent-color: var(--color-accent); }
    :where(:scope, *)[spinner] {
      display: inline-flex; align-items: center; gap: var(--space-2);
      &::before {
        content: ""; inline-size: 1em; block-size: 1em; flex: none; border: 2px solid currentColor;
        border-inline-end-color: transparent; border-radius: var(--radius-full); animation: ui-spin calc(var(--motion) * 5) linear infinite;
      }
      @media (prefers-reduced-motion: reduce) { &::before { animation: none; } }
    }
    :where(:scope, *)[skeleton] { display: block; inline-size: 100%; block-size: 1em; background: var(--n-1); border-radius: var(--radius-1); }

    :where(:scope, *)[table-frame] {
      overflow-x: auto; contain: inline-size; background: var(--color-background); border: 1px solid var(--color-border);
      border-radius: var(--radius); box-shadow: var(--raised);
      table[table] {
        :where(th, td) { white-space: nowrap; }
        :where(thead th) { background: var(--color-surface); }
      }
    }
    table[table]:where(:scope, *) {
      inline-size: 100%; border-collapse: separate; border-spacing: 0;
      :where(th, td) { padding: var(--space-2) var(--space); text-align: start; }
      :where(thead th) { color: var(--color-text); font-weight: var(--weight1); border-block-end: 1px solid var(--color-border); }
      :where(tbody tr + tr > *, tfoot tr > *) { border-block-start: 1px solid var(--color-border); }
      :where(tfoot th) { font-weight: var(--weight1); }
      :where(caption) { caption-side: bottom; padding: var(--space-2) var(--space); color: var(--color-muted); font-size: var(--text-1); text-align: start; }
      :is(th, td)[num] { text-align: end; font-variant-numeric: tabular-nums; }
    }

    :where(:scope):root:has([navbar][navbar-sticky]) { scroll-padding-block-start: calc(var(--navbar-size, 0px) + var(--space)); }
    :where(:scope, *)[navbar] {
      padding: var(--space-2) var(--space); border-block-end: 1px solid var(--color-border);
      background: var(--color-background); color: var(--color-text);
      &[navbar-sticky] { position: sticky; inset-block-start: 0; z-index: 10; }
      &[navbar-vivid] {
        --face: var(--color-accent); background: var(--face); color: var(--color-on-accent);
        > [navbar-row] > nav > a[aria-current=page] { background: var(--tint); color: inherit; }
      }
      &[navbar-align=center] > [navbar-row] > nav { margin-inline: auto; }
      &[navbar-align=end] > [navbar-row] > nav { margin-inline-start: auto; }
      &:is([navbar-align=center], [navbar-align=end]) > [navbar-row] > [navbar-end] { margin-inline-start: 0; }
      &[data-compact]:not([data-fitting]) {
        > [navbar-row] {
          > [navbar-toggle] { display: inline-flex; }
          > [navbar-end] { margin-inline-start: auto; }
          > nav { display: none; order: 1; flex-basis: 100%; margin: 0; }
        }
        &[data-open] > [navbar-row] > nav { display: grid; gap: var(--space-2); }
      }
      &[data-fitting] {
        > [navbar-row] {
          inline-size: max-content; max-inline-size: none; flex-wrap: nowrap;
          > nav { flex: none; flex-wrap: nowrap; }
        }
        &[data-compact] > [navbar-row] > [navbar-toggle] { display: inline-flex; position: absolute; }
      }
    }
    [navbar-row] {
      display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space); min-inline-size: 0;
      > [navbar-brand] {
        display: inline-flex; align-items: center; gap: var(--space-3); flex: none; color: inherit;
        font-size: var(--text1); font-weight: var(--weight1); text-decoration: none; white-space: nowrap;
      }
      > nav {
        display: flex; flex-wrap: wrap; gap: var(--space-3);
        > a {
          display: inline-block; padding: var(--space-3) var(--space-2); border-radius: var(--radius-1);
          color: inherit; text-decoration: none;
          &:is(:hover, :focus-visible) { background: var(--tint); }
          &[aria-current=page] { background: var(--v-3); color: var(--v2); }
        }
      }
      > [navbar-end] { display: flex; align-items: center; gap: var(--space-2); flex: none; margin-inline-start: auto; }
      > [navbar-toggle] { display: none; flex: none; }
    }

    :where(:scope, *)[responsive-toolbar] {
      flex: 1; min-inline-size: 0;
      &[data-compact] {
        &:not([data-fitting]) > [toolbar-actions] { display: none; }
        > [toolbar-menu] { display: flex; align-items: center; gap: var(--space-3); }
      }
      &[data-fitting] {
        > [toolbar-actions] { inline-size: max-content; max-inline-size: none; flex: none; }
        > [toolbar-menu] { position: absolute; }
      }
    }
    [toolbar-actions], [toolbar-group] { display: flex; align-items: center; gap: var(--space-3); }
    [toolbar-group] + [toolbar-group] { border-inline-start: 1px solid var(--color-border); padding-inline-start: var(--space-2); margin-inline-start: var(--space-3); }
    [toolbar-menu] { display: none; }
    [toolbar-divider] { block-size: 1.25em; border-inline-start: 1px solid var(--color-border); margin-inline: var(--space-3); }
    [toolbar-shortcut] { margin-inline-start: auto; padding-inline-start: var(--space); color: var(--color-muted); font: inherit; font-size: var(--text-1); }

    :where(:scope, *)[breadcrumb] {
      min-inline-size: 0;
      &[data-compact] {
        &:not([data-fitting]) [breadcrumb-parents] { display: none; }
        [breadcrumb-collapse] { display: block; }
      }
      &[data-fitting] {
        [breadcrumb-collapse] { position: absolute; }
        > [breadcrumb-row] { inline-size: max-content; max-inline-size: none; }
      }
    }
    [breadcrumb-row] {
      display: flex; align-items: center; gap: var(--breadcrumb-gap, var(--space-3)); min-inline-size: 0;
      > :not([breadcrumb-current]) { flex: none; }
    }
    [breadcrumb-parents] {
      display: contents;
      > a { flex: none; white-space: nowrap; }
    }
    [breadcrumb-collapse] { display: none; }
    [breadcrumb-ancestor] { min-inline-size: 0; overflow-wrap: anywhere; }
    [breadcrumb-current] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    :where(:scope, *):is([dialog], [popup], [dropdown], [toast]) {
      --face: var(--color-surface);
      background: var(--face); color: var(--color-text);
      border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--floating);
    }
    :where(:scope, *)[dialog] {
      flex-direction: column; gap: var(--space); border-radius: var(--radius1);
      inline-size: min(32rem, calc(100vw - 2 * var(--space))); max-inline-size: none; max-block-size: calc(100dvh - 2 * var(--space));
      overflow: auto; padding: var(--space1);
      > header {
        min-block-size: calc(1.25em + var(--space) + 2px); padding-inline-end: calc(1.25em + var(--space) * 2 + 2px);
        > div { min-inline-size: 0; }
        h2 { margin: 0; font-size: var(--text1); font-weight: var(--weight1); }
        p { margin: var(--space-3) 0 0; color: var(--color-muted); }
      }
      > [dialog-close] { position: absolute; inset-block-start: var(--space1); inset-inline-end: var(--space1); }
      > footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
      > div { min-block-size: 0; }
      &:is([dialog-side='start'], [dialog-side='end']) {
        inset: 0; inset-inline-start: auto; translate: none; block-size: 100dvh; max-block-size: none;
        inline-size: min(var(--drawer-size, 24rem), 100vw); border-radius: 0; border-block: 0; border-inline-end: 0;
        --dialog-entry: ui-drawer-enter; --slide: 100%;
      }
      &[dialog-side='start'] {
        inset-inline: 0 auto; border-inline: 0; border-inline-end: 1px solid var(--color-border); --slide: -100%;
        &:dir(rtl) { --slide: 100%; }
      }
      &[dialog-side='end']:dir(rtl) { --slide: -100%; }
      @media (width < 40rem) {
        &:is([dialog-side='start'], [dialog-side='end']) { inline-size: 100vw; border: 0; }
      }
    }
    dialog:where(:scope, *)[dialog] {
      &[open] { display: flex; animation: var(--dialog-entry, ui-dialog-enter) var(--motion) var(--ease); }
      &::backdrop { background: oklch(from var(--n2) l c h / .4); }
    }

    :where(:scope, *):is([popup], [dropdown]) {
      z-index: 60; overflow: auto;
      position: fixed; inset: auto; margin: 0; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
      position-try-order: most-block-size; max-block-size: calc(100% - 16px);
      &:popover-open { animation: ui-floating-enter var(--motion) var(--ease); }
      @supports not (position-area: center) { max-block-size: var(--floating-available-height, calc(100dvh - 16px)); }
    }
    :where(:scope, *)[popup] { inline-size: max-content; max-inline-size: min(24rem, calc(100vw - 2 * var(--space))); padding: var(--space); }
    :where(:scope, *)[dropdown] {
      min-inline-size: min(12rem, calc(100vw - 2 * var(--space))); padding: var(--space-3);
      &:popover-open { display: grid; }
      hr { inline-size: 100%; margin-block: var(--space-3); border: 0; border-block-start: 1px solid var(--color-border); }
      > :not([menu-item], hr, [option-group]) { padding: var(--space-2) var(--space-1); }
    }
    [menu-item] {
      display: flex; align-items: center; gap: var(--space-2); inline-size: 100%; padding: var(--space-2) var(--space-1);
      border: 0; background: none; box-shadow: none; font: inherit; text-align: start;
      border-radius: var(--radius-1); color: inherit; text-decoration: none; cursor: pointer; user-select: none;
      &:not(:disabled, [aria-disabled=true]):is(:hover, :focus-visible), &[aria-pressed=true] { background: var(--v-3); color: var(--v2); }
      &[ui-tone='danger'] { color: var(--color-accent); }
      &:is(:disabled, [aria-disabled=true]) { color: var(--n1); cursor: default; opacity: .55; }
    }
    [menu-label] { font-size: var(--text-1); font-weight: var(--weight1); color: var(--color-muted); padding-block: var(--space-3); }
    [option-group] {
      > summary {
        padding: var(--space-2) var(--space-1); cursor: pointer;
        > svg { vertical-align: middle; margin-inline-end: var(--space-2); }
      }
      > [menu-item] { padding-inline-start: var(--space1); }
    }

    :where(:scope, *)[tooltip] {
      display: inline-block; position: relative;
      > [role=tooltip] {
        z-index: 70; inline-size: max-content; max-inline-size: min(20rem, calc(100vw - 2 * var(--space))); overflow-wrap: anywhere;
        background: var(--n2); color: var(--n-3); border-radius: var(--radius-1); padding: var(--space-3) var(--space-2);
        font-size: var(--text-1); line-height: var(--leading); box-shadow: var(--floating); border: 0;
        position: fixed; inset: auto; position-area: top; position-try-fallbacks: flip-block; margin-block-end: var(--tooltip-gap, 6px);
        visibility: hidden; opacity: 0; transition: opacity var(--motion) var(--ease) 150ms, visibility 0s linear calc(var(--motion) + 150ms);
        @supports not (position-area: center) { position: absolute; inset: auto auto 100% 0; }
      }
      &:is(:hover, :has(:focus-visible)) > [role=tooltip] { visibility: visible; opacity: 1; transition: none; }
    }
    :root:has([tooltip]:is(:hover, :has(:focus-visible))) [tooltip]:not(:hover, :has(:focus-visible)) > [role=tooltip] { transition: none; }

    @keyframes ui-dialog-enter { from { opacity: 0; transform: translateY(var(--space-2)); } }
    @keyframes ui-drawer-enter { from { transform: translateX(var(--slide)); } }
    @keyframes ui-floating-enter { from { opacity: 0; transform: translateY(-2px); } }

    :where(:scope, *)[tabs] {
      display: grid; gap: var(--space);
      &[tabs-orientation='vertical'] {
        grid-template-columns: auto minmax(0, 1fr);
        [tablist] { flex-direction: column; border: 0; border-inline-end: 1px solid var(--color-border); }
        [tab] {
          text-align: start; border-block-end: 0; border-inline-end: 2px solid transparent;
          &[aria-selected='true'] { border-inline-end-color: var(--color-accent); }
        }
      }
    }
    [tablist] { display: flex; gap: var(--space-3); border-block-end: 1px solid var(--color-border); overflow-x: auto; }
    [tab] {
      flex-shrink: 0; border: 0; border-block-end: 2px solid transparent; padding: var(--space-2) var(--space);
      background: none; color: var(--color-muted); font: inherit; font-weight: var(--weight1); cursor: pointer;
      &[aria-selected='true'] { border-color: var(--color-accent); color: var(--v2); }
      &:hover:not(:disabled) { background: var(--v-3); color: var(--v2); }
      &:disabled { opacity: .5; cursor: default; }
    }
    [tabpanel] {
      min-inline-size: 0;
      &[hidden] { display: none; }
    }
    :where(:scope, *)[accordion] { display: grid; gap: var(--space-2); }
    :where(:scope, *)[disclosure] {
      border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface);
      > summary {
        padding: var(--space-2) var(--space); cursor: pointer; font-weight: var(--weight1);
        &::marker { color: var(--color-muted); }
        &:hover { color: var(--v2); }
      }
      > :not(summary) { padding: var(--space-2) var(--space) var(--space); }
    }

    :where(:scope, *)[toast] {
      display: flex; align-items: flex-start; gap: var(--space); pointer-events: auto;
      padding: var(--space-2) var(--space);
      animation: ui-toast-lifetime var(--toast-duration) linear forwards;
      &:is(:hover, :focus-within) { animation-play-state: paused; }
      > div { display: grid; gap: var(--space-3); flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
      &[ui-tone]:not([ui-tone='neutral']) { --face: var(--v-3); color: var(--v2); border-color: var(--v-2); }
    }
    :where(:scope, *)[toaster] {
      position: fixed; z-index: 45; inset-block-start: var(--space); inset-inline-end: var(--space);
      display: grid; gap: var(--space-2); inline-size: min(22rem, calc(100vw - 2 * var(--space))); pointer-events: none;
      &[popover] {
        inset: auto; inset-block-start: var(--space); inset-inline-end: var(--space); margin: 0;
        padding: var(--space-3); border: 0; background: none; overflow: visible; color: inherit;
        &:not(:popover-open) { display: none; }
      }
      &:is([toaster-position='bottom-end'], [toaster-position='bottom-start']) { inset-block: auto var(--space); }
      &:is([toaster-position='top-start'], [toaster-position='bottom-start']) { inset-inline: var(--space) auto; }
    }

    @keyframes ui-toast-lifetime { from { opacity: 1; } to { opacity: 1; } }
  }
}

@layer utilities {
  @scope (:root, [ui]) to ([unstyle]) {
    .ui-visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ui-hidden, :where(:scope, *)[hidden]:not([hidden=until-found]) { display: none !important; }

    .p-0 { padding: 0; }
    .p-1 { padding: var(--space-3); }
    .p-2 { padding: var(--space-2); }
    .p-3 { padding: var(--space-1); }
    .p-4 { padding: var(--space); }
    .p-6 { padding: var(--space1); }
    .px-0 { padding-inline: 0; }
    .px-1 { padding-inline: var(--space-3); }
    .px-2 { padding-inline: var(--space-2); }
    .px-3 { padding-inline: var(--space-1); }
    .px-4 { padding-inline: var(--space); }
    .px-6 { padding-inline: var(--space1); }
    .py-0 { padding-block: 0; }
    .py-1 { padding-block: var(--space-3); }
    .py-2 { padding-block: var(--space-2); }
    .py-3 { padding-block: var(--space-1); }
    .py-4 { padding-block: var(--space); }
    .py-6 { padding-block: var(--space1); }
    .gap-0 { gap: 0; }
    .gap-1 { gap: var(--space-3); }
    .gap-2 { gap: var(--space-2); }
    .gap-3 { gap: var(--space-1); }
    .gap-4 { gap: var(--space); }
    .gap-6 { gap: var(--space1); }
    .gap-8 { gap: var(--space2); }
    .gap-12 { gap: var(--space3); }
    .mx-auto { margin-inline: auto; }
    .flex { display: flex; }
    .flex-col { flex-direction: column; }
    .flex-wrap { flex-wrap: wrap; }
    .flex-nowrap { flex-wrap: nowrap; }
    .items-start { align-items: start; }
    .items-center { align-items: center; }
    .justify-center { justify-content: center; }
    .justify-between { justify-content: space-between; }
    .justify-end { justify-content: end; }
    .flex-1 { flex: 1; }
    .flex-none { flex: none; }
    .min-w-0 { min-inline-size: 0; }
    .text-center { text-align: center; }
    .text-muted { color: var(--color-muted); }
    .truncate { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabular-nums { font-variant-numeric: tabular-nums; }
    [responsive-layout] { container: ui-layout / inline-size; }
    @container ui-layout (width < 48rem) { .ui-wide-only { display: none !important; } }
    @container ui-layout (width >= 48rem) { .ui-compact-only { display: none !important; } }
  }
}


@layer app {
/* foot.base */
body > footer {
border-block-start: 1px solid var(--color-border); font-size: var(--text-1);
}
/* 7913002ec467 */
body { min-block-size: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; inline-size: 100%; max-inline-size: 64rem; margin-inline: auto; padding: var(--space2) var(--space); display: flex; flex-direction: column; gap: var(--space1);
  > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space); }
  > [prose] { max-inline-size: 72ch; margin-inline: auto; } }
/* Stat.base */
[card][stat] {
> data { font-size: var(--text2); font-weight: var(--weight1); }
}
/* Swatch.base */
i[swatch] {
display: inline-block; inline-size: .75em; block-size: .75em; border-radius: var(--radius-1); background: var(--c); margin-inline-end: .5em;
}
/* a702d74a58e2 */
:root { --c-ai: var(--v); --c-inst: var(--n-1); --c-cpu: light-dark(oklch(.62 .13 calc(var(--hue) + 40)), oklch(.72 .11 calc(var(--hue) + 40))); --c-ram: light-dark(oklch(.62 .13 calc(var(--hue) + 100)), oklch(.72 .11 calc(var(--hue) + 100))); --c-hd: light-dark(oklch(.62 .13 calc(var(--hue) + 160)), oklch(.72 .11 calc(var(--hue) + 160))); --c-bw: light-dark(oklch(.62 .13 calc(var(--hue) + 220)), oklch(.72 .11 calc(var(--hue) + 220))); }
/* Chart.base */
[chart] {
display: grid; grid-template-columns: auto 1fr; grid-template-rows: 14rem auto; column-gap: var(--space-3); row-gap: var(--space-3);
font-size: var(--text-1);
> [axis] { display: flex; flex-direction: column-reverse; justify-content: space-between; text-align: end; line-height: 0; }
> ol { display: flex; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--color-border);
  background: repeating-linear-gradient(to top, var(--color-border) 0 1px, transparent 1px calc(100% / var(--lines)));
  > li { flex: 1; &:hover { background: oklch(from var(--n2) l c h / .07); } } }
[tooltip] { display: flex; justify-content: center; align-items: end; block-size: 100%; }
[bar] { display: flex; flex-direction: column-reverse; gap: 1px; inline-size: min(74%, 44px); > i { background: var(--c); } }
> [labels] { grid-column: 2; display: flex; > span { flex: 1; text-align: center; } }
}
/* Legend.base */
[legend] {
font-size: var(--text-1); data { color: var(--color-text); }
}
/* Pager.base */
[pager] {
> span { display: inline-flex; min-inline-size: 11rem;
  margin-inline: -1px; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); font-weight: var(--weight1); line-height: var(--leading-1); }
}
/* 32946b0a0c07 */
[usage] {
  select { inline-size: auto; }
  [empty] { padding: var(--space2); border: 1px dashed var(--color-border); border-radius: var(--radius); } }
@media (max-width: 52rem) {
  [controls] { inline-size: 100%; > * { flex: 1 1 100%; }
    [group] { display: flex;
      > [btn] { flex: 1; &[aria-label] { flex: none; } }
      > span { min-inline-size: 0; flex: 1; } }
    select { inline-size: 100%; } } }
/* Logo.base */
[logo] {
flex: none; inline-size: 2.5rem; block-size: 2.5rem; display: grid; place-items: center; background: var(--n-3); border: 1px solid var(--n-1); border-radius: var(--radius);
svg { inline-size: 1.5rem; block-size: 1.5rem; }
}
/* bb023a85e129 */
@keyframes dialog-cell { from { display: none; opacity: 0; translate: 0 6px; } }
/* DialogDemo.base */
[dialog-demo] {
--cell-face: var(--n-3); --cell-line: var(--n-1); display: flex; flex-direction: column-reverse; block-size: 22rem; overflow-y: auto; overflow-anchor: none; scrollbar-width: thin; scrollbar-color: var(--cell-line) transparent; font-size: var(--text-1);
> [stack] { margin-block-end: auto; }
[cell] { padding: var(--space-2) var(--space-1); background: var(--cell-face); border: 1px solid var(--cell-line); border-inline-start: 3px solid var(--v); border-radius: var(--radius-1);
  animation: dialog-cell calc(var(--motion) * 2) var(--ease) var(--at) backwards paused;
  > small { display: block; margin-block-end: var(--space-3); font-family: var(--font); font-size: calc(var(--text) * .7); font-weight: var(--weight1); color: var(--v1); }
  > p { white-space: pre-wrap; min-block-size: 1lh; } }
&[play] [cell] { animation-play-state: running; }
:is([cell=code], [cell=output], [cell=error]) { font-family: var(--font-mono); font-size: calc(var(--text) * .85); }
:is([cell=asst], [cell=output], [cell=error]) { margin-inline-start: var(--space1); }
}
/* 8ec374d98780 */
@keyframes lamp { 50% { box-shadow: 0 0 0 7px transparent; } }
/* DemoWindow.base */
[demo-window] {
--face: var(--n-3); overflow: hidden;
> [cluster] { background: var(--n-2); border-block-end: 1px solid var(--color-border); }
[lamp] { inline-size: .5rem; block-size: .5rem; border-radius: var(--radius-full); background: var(--v); box-shadow: 0 0 0 3px var(--v-3); animation: lamp calc(var(--motion) * 12) var(--ease) infinite; }
}
/* AppPreview.base */
[app-preview] {
margin-block-start: var(--space-2); font-family: var(--font); font-size: calc(var(--text) * .75); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
> figcaption { background: var(--n2); color: var(--n-3); }
h5 { font-size: var(--text); }
[btn] { --ui-pad-block: 2px; --ui-pad-inline: var(--space-2); font-size: inherit; border-radius: var(--radius-full); box-shadow: none; }
ul { display: grid; grid-template-columns: 1fr 1fr; list-style: none; }
li { padding: var(--space-2); text-align: center; background: var(--n-2); border-radius: var(--radius-1);
  &::before { content: ''; display: block; aspect-ratio: 4 / 3; margin-block-end: var(--space-3); background: linear-gradient(135deg, var(--v-3), var(--v-2)); border-radius: var(--radius-1); } }
}
/* Hero.base */
[hero] {
display: grid; grid-template-columns: 1.15fr 1fr;
> [stack] { > h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
  > p { font-size: var(--text1); max-inline-size: 32ch; text-wrap: pretty; } }
@media (width < 50rem) { grid-template-columns: 1fr; }
}
/* SectionHead.base */
header[section-head] {
max-inline-size: 44rem;
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { font-size: var(--text1); text-wrap: pretty; }
}
/* HowItWorks.base */
#how {
@media (width < 50rem) { > header > p > br { display: none; } }
}
/* UseCases.base */
#use-cases {
[grid] { grid-template-columns: repeat(2, 1fr); @media (width < 36rem) { grid-template-columns: 1fr; } }
a[card] { color: inherit; text-decoration: none; }
}
/* Values.base */
[values] {
max-inline-size: 42rem;
> p:first-child { font-size: var(--text1); }
> [cluster] { padding-block-start: var(--space); border-block-start: 1px solid var(--color-border); }
}
/* Story.base */
[story] {
break-inside: avoid; margin-block-end: var(--space);
blockquote { border: 0; padding: 0; font-style: italic;
  > svg { float: inline-start; inline-size: 1.1em; block-size: 1.1em; margin: .2em var(--space-3) 0 0; scale: -1 1; } }
figcaption { line-height: var(--leading-1); }
}
/* 5efce8493987 */
#story-list { columns: 18rem; column-gap: var(--space); }
/* PricingCard.base */
[pricing] {
max-inline-size: 38rem;
ul { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space); list-style: none; padding: 0; text-align: start; }
li { display: flex; gap: var(--space-2); svg { color: var(--color-accent); } }
@media (width < 30rem) { ul { grid-template-columns: 1fr; } }
details { inline-size: 100%;
  &[open] > summary svg { rotate: 180deg; }
  > :not(summary) { margin-block-start: var(--space); text-align: start; } }
summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-3); color: var(--color-accent); font-weight: var(--weight1);
  &::-webkit-details-marker { display: none; }
  svg { transition: rotate var(--motion) var(--ease); } }
}
/* Mailing.base */
#mailing {
> form { inline-size: min(100%, 28rem); }
> p { text-align: center; }
}
/* LinkList.base */
[links] {
li + li { border-block-start: 1px solid var(--color-border); }
a { display: flex; align-items: center; gap: var(--space); padding-block: var(--space-1); color: inherit; text-decoration: none;
  &:hover { color: var(--color-accent); > svg { color: inherit; } }
  > small { flex: none; inline-size: 2ch; text-align: end; color: var(--color-muted); font-variant-numeric: tabular-nums; }
  > span { flex: 1; }
  > svg { flex: none; color: var(--color-muted); } }
}
/* 66d2f8c8f463 */
@keyframes power-draw { 0% { stroke-dashoffset: 50; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -50; } }
/* PowerKey.base */
button[power] {
flex: none; inline-size: 2.75rem; block-size: 2.75rem;
&:is([aria-busy=true], .htmx-request) {
  --hue: var(--hue-warning); color: var(--v2);
  > svg { opacity: 1; }
  &::after { content: none; }
  path[arc] { stroke-dasharray: 50; animation: power-draw 2.2s ease-in-out infinite; }
}
}
/* Instances.base */
[instances] {
strong { overflow-wrap: anywhere; font-size: var(--text1); }
> li { flex-wrap: nowrap; padding-block: var(--space-1);
  & + li { border-block-start: 1px solid var(--color-border); }
  @media (width < 40rem) { flex-wrap: wrap; > [actions] { inline-size: 100%; padding-inline-start: calc(2.75rem + var(--space)); } } }
}
/* admin */
[admin] {
  --text: .875rem; --space: .625rem; --radius: .375rem; --relief: .15;
  main { max-inline-size: none; padding: var(--space); }
  [admin-grid] { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space); align-items: start; }
  @media (min-width: 56rem) { [admin-grid] { grid-template-columns: minmax(22rem, 32rem) minmax(0, 1fr); } }
  [select] { inline-size: auto; flex: none; }
  pre { max-block-size: 65dvh; overflow: auto; font-size: var(--text-1); white-space: pre; }
}
}
