Commit 7f106b545 for llama.cpp

commit 7f106b545965d601eb875ec8d2381288ee9b98f9
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date:   Tue Nov 17 14:39:03 2026 +0100

    ui: Llama UI design system: tokens, surfaces and fonts (#32468)

    * ui: bring @ggml-org/llama-ui into ui/lib/ui

    The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui
    repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui
    from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its
    package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the
    layout.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: Llama UI design system: tokens, surfaces and brand

    The design system from allozaur/docs/storybook-overhaul: three tiers of
    tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base
    components on the new tokens (Tabs and GlassKey among them). It also
    restyles the stack's features with it, replacing the plain stand-ins they
    used until now. DESIGN.md is generated from the tokens. The Storybook that
    documents it is the next PR.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: have Llama Chat use @ggml-org/llama-ui for its base components, tokens and fonts

    Llama Chat kept its own copy of the design system: 29 base components, the
    three tiers of tokens, the surfaces, the theme and the fonts, next to the 12
    components ui/lib/ui held. The copy goes, and the library gets what it lacked.

    ui/lib/ui
    - the 17 base components the app had and the library did not (alert,
      alert-dialog, button-group, checkbox, collapsible, context-menu, dialog,
      drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area,
      skeleton, table, tabs, textarea), with vaul-svelte for the drawer
    - the inset-group and selected-row tokens and surfaces
    - sources import each other by relative path instead of $lib, which in an
      app points at the app's own src/lib
    - theme.css no longer imports tw-animate-css: it is a peer dependency that
      the consumer imports before the theme, as it does Tailwind
    - 0.3.0

    ui/apps/chat
    - imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as
      @ggml-org/llama-ui/utils; app.css imports the library's theme.css
    - compiles the library from source, with no install or build of it:
      scripts/vite-plugin-llama-ui.ts resolves its entry points and what it
      imports, and svelte.config.js gives TypeScript the same paths
    - src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts
      are removed; components.json moves to the library

    Builds
    - CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and
      rebuilds when a library source changes
    - the Dockerfiles copy the library's sources; the Nix derivation takes ui/
      as its source

    The built CSS has the same rules in the same order, apart from one
    zero-specificity rule and the @font-face rules moving, plus ten utilities
    and two tokens that only the library's own components use.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: AGENTS.md places Llama UI in ui/lib/ui

    Llama Chat's AGENTS.md says where each part lives: Llama UI is
    ui/lib/ui, and Chat imports its tokens, fonts and base components
    from there.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: Llama Sans and Llama Mono from llama-brand's latest, and shell commands marked in bash code

    The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes
    from 10 to 36. Bash code blocks mark shell commands and flags.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: open submenus outside the menu they come from

    A submenu was rendered inside its parent menu, so the menu's scroll box
    clipped it: the glass menus' backdrop filter, and the filter and transform
    of the open animation, make the menu the containing block even for the
    fixed-position submenu. Dropdown and context submenus now render in a
    portal, like the menus themselves.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: draw submenus like the menu they open from

    Submenus had smaller corners than their menus, and context menus had none
    of the dropdown's glass. Context-menu parts now match the dropdown's, and
    both submenus take the menu's corners and height cap, with their first row
    level with the row that opens them, 4px past the menu's edge. Sub-triggers
    take the items' radius and pointer.

    The submenus' height cap and zoom origin named the dropdown's CSS variables,
    which bits-ui does not set on submenus; they now use its --bits-menu-* ones.
    The chat group submenu takes the actions menu's z-[999999] layer, as it no
    longer renders inside that menu.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: keep a late current-node write off a closed or switched conversation

    updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node.

    Assisted-by: Claude (Fable 5.2)

    * ui: have Llama Chat use the library's Model UI and app components

    Llama Chat still kept its own copies of what the library holds above the
    base components. It now takes them from @ggml-org/llama-ui too, and its
    copies go.

    ui/lib/ui
    - ModelId gains what Chat's had: the model's own draft kind, draft
      sidecars with their quant (ModelDraftSidecars, new), aliases, hideName
      and a tooltip, in the same badge order
    - entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group>
      (actions, content, forms, misc) and @ggml-org/llama-ui/models

    ui/apps/chat
    - ActionIcon, SearchInput, SyntaxHighlightedCode, Logo,
      ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars
      come from the library; Chat's copies and the two constants only they
      used are removed
    - ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw
      id and applies the user's display settings, ModelOrgAvatar hides the
      avatar while Hub metadata is off
    - the svelte/* TypeScript path falls back to Svelte's types/index.d.ts:
      svelte/reactivity has no file of its own, so a library source importing
      it got its types from ui/lib/ui's own install when there was one

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: Llama UI takes the brand's colours and logo from llama-brand

    @ggml-org/llama-brand is now a dependency of the library, by the same GitHub
    tarball Llama Chat already installs, which now names it @ggml-org/llama-brand
    too.

    - primitives.css drops the 25 tokens it held copies of (the neutral
      greys, sand, the skies and cinder) and builds on llama-brand's
      css/colors.css instead; the skies' gradients point at llama-brand's.
      Apps import that file before theme.css, as they do Tailwind and
      tw-animate-css: the library's stylesheets import no package, so an app
      that compiles them from source resolves it from its own node_modules
    - Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes
    - Llama Chat's TypeScript paths resolve llama-brand from its own
      node_modules, like the library's other dependencies

    The fonts stay as the library's WOFF2 copies until llama-brand ships
    WOFF2 builds of them.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: have Llama Chat take the library's constants, enums and helpers

    Llama Chat redefined most of what the library exports next to its
    components. Where the two were the same, Chat now re-exports the library's
    from the files that held them, so its own imports stay as they are.

    - the library gets entry points for them: @ggml-org/llama-ui/constants,
      @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and
      @ggml-org/llama-ui/models carries the model data with the Model UI
    - from the library now: the shared CSS classes and code-block constants,
      the byte units, the memory-fit constants and minMemoryTierGb, the bit
      depth labels, the capability and modality icons, labels and order,
      ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities,
      formatParameters, highlightCode and trimCodePadding
    - the library's modality order follows Chat's: vision, video, audio
    - Chat keeps its own where they differ: UI_DATA_ATTRS and
      ModelDownloadProgress are supersets of the library's (the latter extends
      it now), and formatFileSize counts in 1024s

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: give the chat form's add key and model selector a tighter shadow

    In light, the two keys inside the chat form, white on its white glass, took
    the control elevation, whose soft spread blended into the form. They take a
    new elevation-key instead: a 0.5px hairline all round and a 1px drop. In
    dark they keep the control elevation. Chosen from the options in
    Scrapbook › UI › Composer keys.

    - semantic tokens: --elevation-key (light: the hairline and the drop; dark:
      the control elevation)
    - component token: --chat-form-key-shadow, for the add key and every model
      selector trigger
    - DESIGN.md names it next to the other elevations

    Assisted-by: Claude (Opus 5.5 Medium)

diff --git a/.devops/cann.Dockerfile b/.devops/cann.Dockerfile
index 1d4393613..83df40950 100644
--- a/.devops/cann.Dockerfile
+++ b/.devops/cann.Dockerfile
@@ -25,6 +25,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM ${CANN_BASE_IMAGE} AS build
diff --git a/.devops/cpu.Dockerfile b/.devops/cpu.Dockerfile
index 605247ac2..e195b5ac8 100644
--- a/.devops/cpu.Dockerfile
+++ b/.devops/cpu.Dockerfile
@@ -15,6 +15,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile
index 33f686577..20501c1be 100644
--- a/.devops/cuda.Dockerfile
+++ b/.devops/cuda.Dockerfile
@@ -23,6 +23,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM ${BASE_CUDA_DEV_CONTAINER} AS build
diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile
index 214e3d320..16326ebbd 100644
--- a/.devops/intel.Dockerfile
+++ b/.devops/intel.Dockerfile
@@ -17,6 +17,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS build
diff --git a/.devops/musa.Dockerfile b/.devops/musa.Dockerfile
index b4185c932..dbf9e0b41 100644
--- a/.devops/musa.Dockerfile
+++ b/.devops/musa.Dockerfile
@@ -21,6 +21,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM ${BASE_MUSA_DEV_CONTAINER} AS build
diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix
index 021063276..4ac844ff9 100644
--- a/.devops/nix/package.nix
+++ b/.devops/nix/package.nix
@@ -182,7 +182,9 @@ effectiveStdenv.mkDerivation (finalAttrs: {
   webui = stdenvNoCC.mkDerivation {
     pname = "webui";
     version = llamaVersion;
-    src = lib.cleanSource ../../ui/apps/chat;
+    # the app compiles Llama UI from its source in ../../lib/ui, so the source is ui/ as a whole
+    src = lib.cleanSource ../../ui;
+    sourceRoot = "source/apps/chat";

     nativeBuildInputs = [
       nodejs
diff --git a/.devops/openvino.Dockerfile b/.devops/openvino.Dockerfile
index de6a16c75..e290bde9b 100644
--- a/.devops/openvino.Dockerfile
+++ b/.devops/openvino.Dockerfile
@@ -34,6 +34,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 ## Build Image
diff --git a/.devops/rocm.Dockerfile b/.devops/rocm.Dockerfile
index ab4ef0b74..9e667660f 100644
--- a/.devops/rocm.Dockerfile
+++ b/.devops/rocm.Dockerfile
@@ -23,6 +23,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 ### Build image
diff --git a/.devops/vulkan.Dockerfile b/.devops/vulkan.Dockerfile
index ce40d6969..dc8a87667 100644
--- a/.devops/vulkan.Dockerfile
+++ b/.devops/vulkan.Dockerfile
@@ -15,6 +15,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
diff --git a/.devops/zendnn.Dockerfile b/.devops/zendnn.Dockerfile
index ef9d4de45..cbc3696ed 100644
--- a/.devops/zendnn.Dockerfile
+++ b/.devops/zendnn.Dockerfile
@@ -15,6 +15,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./
 RUN npm ci

 COPY ui/apps/chat/ ./
+# the app compiles Llama UI from its source next to it
+COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json
+COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/
 RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build

 FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
diff --git a/.github/workflows/ui-self-hosted.yml b/.github/workflows/ui-self-hosted.yml
index 4eb6620d0..346f1cfb4 100644
--- a/.github/workflows/ui-self-hosted.yml
+++ b/.github/workflows/ui-self-hosted.yml
@@ -18,6 +18,7 @@ on:
       '.github/workflows/ui-self-hosted.yml',
       '.github/workflows/ui-build-self-hosted.yml',
       'ui/apps/chat/**.*',
+      'ui/lib/ui/**.*',
       'tools/server/tests/**.*'
     ]
   pull_request:
@@ -26,6 +27,7 @@ on:
       '.github/workflows/ui-self-hosted.yml',
       '.github/workflows/ui-build-self-hosted.yml',
       'ui/apps/chat/**.*',
+      'ui/lib/ui/**.*',
       'tools/server/tests/**.*'
     ]

diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml
index 0c9b85ecd..abf55d709 100644
--- a/.github/workflows/ui.yml
+++ b/.github/workflows/ui.yml
@@ -14,6 +14,7 @@ on:
       '.github/workflows/ui.yml',
       '.github/workflows/ui-build.yml',
       'ui/apps/chat/**.*',
+      'ui/lib/**.*',
       'tools/server/tests/**.*'
     ]
   pull_request:
@@ -22,6 +23,7 @@ on:
       '.github/workflows/ui.yml',
       '.github/workflows/ui-build.yml',
       'ui/apps/chat/**.*',
+      'ui/lib/**.*',
       'tools/server/tests/**.*'
     ]

@@ -107,6 +109,33 @@ jobs:
         run: npm run test:unit
         working-directory: ui/apps/chat

+  lib-checks:
+    name: Library checks
+    runs-on: ubuntu-24.04
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v6
+        with:
+          ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
+
+      - name: Setup Node.js
+        uses: actions/setup-node@v6
+        with:
+          node-version: "24"
+          package-manager-cache: false
+
+      - name: Install dependencies
+        run: npm ci
+        working-directory: ui/lib/ui
+
+      - name: Run type checking
+        run: npm run check
+        working-directory: ui/lib/ui
+
+      - name: Build the package
+        run: npm run prepack
+        working-directory: ui/lib/ui
+
   e2e-tests:
     name: E2E Tests
     needs: ui-build
diff --git a/scripts/ui-assets.cmake b/scripts/ui-assets.cmake
index 8dcb804eb..bfaa4ca4c 100644
--- a/scripts/ui-assets.cmake
+++ b/scripts/ui-assets.cmake
@@ -19,7 +19,11 @@ set(LLAMA_UI_GZIP     "" CACHE STRING "Apply gzip compress to assets to save ban

 set(DIST_DIR     "${UI_BINARY_DIR}/dist")
 set(SRC_DIST_DIR "${UI_SOURCE_DIR}/dist")
-set(WORK_DIR     "${UI_BINARY_DIR}/ui-src")
+# The stage keeps the layout of ui/: the app in apps/chat, with the sources of
+# Llama UI that it compiles next to it in lib/ui (see ui/apps/chat/scripts/llama-ui.js).
+set(STAGE_DIR    "${UI_BINARY_DIR}/ui-src")
+set(WORK_DIR     "${STAGE_DIR}/apps/chat")
+set(UI_LIB_DIR   "${UI_SOURCE_DIR}/../../lib/ui")
 set(STAMP_FILE   "${UI_BINARY_DIR}/.ui-stamp")
 set(EMBED_STAMP  "${UI_BINARY_DIR}/.ui-embed.sha256")
 set(UI_CPP       "${UI_BINARY_DIR}/ui.cpp")
@@ -316,6 +320,16 @@ function(npm_build_should_skip out_var)
 endfunction()

 function(stage_sources)
+    # everything but the app goes: the library, restaged below, and what a stage
+    # from before this layout left at the top, its node_modules included
+    if(EXISTS "${STAGE_DIR}")
+        file(GLOB staged RELATIVE "${STAGE_DIR}" "${STAGE_DIR}/*")
+        list(REMOVE_ITEM staged "apps")
+        foreach(entry ${staged})
+            file(REMOVE_RECURSE "${STAGE_DIR}/${entry}")
+        endforeach()
+    endif()
+
     if(EXISTS "${WORK_DIR}")
         file(GLOB staged RELATIVE "${WORK_DIR}" "${WORK_DIR}/*")
         list(REMOVE_ITEM staged "node_modules")
@@ -329,6 +343,16 @@ function(stage_sources)
         NO_SOURCE_PERMISSIONS
         PATTERN "node_modules" EXCLUDE
     )
+
+    # what the app reads of the library: its sources and the dependency list
+    file(COPY "${UI_LIB_DIR}/package.json"
+        DESTINATION "${STAGE_DIR}/lib/ui"
+        NO_SOURCE_PERMISSIONS
+    )
+    file(COPY "${UI_LIB_DIR}/src/lib"
+        DESTINATION "${STAGE_DIR}/lib/ui/src"
+        NO_SOURCE_PERMISSIONS
+    )
 endfunction()

 function(npm_build out_var)
diff --git a/ui/README.md b/ui/README.md
new file mode 100644
index 000000000..97e6a35e7
--- /dev/null
+++ b/ui/README.md
@@ -0,0 +1,20 @@
+# ui
+
+The UI of llama.cpp: the packages in `lib` and the apps built on them.
+
+```text
+ui/
+├── lib/
+│   └── ui/     @ggml-org/llama-ui: design tokens, fonts, surfaces and components
+└── apps/
+    └── chat/   Llama Chat, the chat app that llama-server serves
+```
+
+- [`lib/ui`](lib/ui/README.md) draws the parts and handles interaction, with no business logic. It is built with
+  `@sveltejs/package` and published to npm as `@ggml-org/llama-ui`. Apps in this repo skip the package: they compile
+  its sources as part of their own build, so they hold no copy of a component, a token or a font.
+- [`apps/chat`](apps/chat/README.md) talks to llama-server, stores conversations and runs the agentic loop. CMake
+  builds it into llama-server (see `scripts/ui-assets.cmake`).
+
+Each folder is its own npm package with its own `package-lock.json`: run `npm ci` in the one you work on. Building,
+checking and testing `apps/chat` needs no install in `lib/ui`.
diff --git a/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte b/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte
index ba0cabc56..76d15b48d 100644
--- a/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte
+++ b/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as Tooltip from '../../src/lib/components/ui/tooltip';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';

 	interface Props {
 		children: any;
diff --git a/ui/apps/chat/AGENTS.md b/ui/apps/chat/AGENTS.md
new file mode 100644
index 000000000..efb369e1a
--- /dev/null
+++ b/ui/apps/chat/AGENTS.md
@@ -0,0 +1,6 @@
+# Instructions for ui/apps/chat
+
+These add to the repository's [AGENTS.md](../../../AGENTS.md) for work in `ui/apps/chat`: **Llama Chat**, the chat client that llama-server bundles. **Llama UI**, the library, is `ui/lib/ui` (`@ggml-org/llama-ui`): Chat imports its tokens, fonts and base components from there (`@ggml-org/llama-ui/ui/<name>`) and keeps no copy of them. `DESIGN.md` lives here.
+
+- **Design:** [DESIGN.md](DESIGN.md) holds the tokens, roles and rules, written for agents. Follow it for anything visual; when it and the CSS disagree, the CSS wins and DESIGN.md is updated.
+- **Components:** the `SKILL.md` next to a component folder (such as [src/lib/components/app/SKILL.md](src/lib/components/app/SKILL.md)) holds that folder's conventions.
diff --git a/ui/apps/chat/DESIGN.md b/ui/apps/chat/DESIGN.md
new file mode 100644
index 000000000..c91d011bb
--- /dev/null
+++ b/ui/apps/chat/DESIGN.md
@@ -0,0 +1,1150 @@
+---
+version: alpha
+name: Llama UI - Matte Glass
+description: >-
+  Llama UI, the design system and components of Llama Chat, the chat client llama-server
+  bundles. Neutral and quiet: frosted matte surfaces with faint
+  blue-grey hairlines, near-flat fills, and status colours for success, warning, error and info. Tokens come in
+  three tiers: primitives, semantic tokens (with a "-dark" twin where dark mode differs)
+  and components. Generated from ui/lib/ui/src/lib/styles/tokens/*.css.
+colors:
+  primary: '{colors.action-primary}'
+  neutral-0: 'oklch(1 0 0)'
+  neutral-25: 'oklch(0.988 0 0)'
+  neutral-50: 'oklch(0.985 0 0)'
+  neutral-100: 'oklch(0.97 0 0)'
+  neutral-150: 'oklch(0.95 0 0)'
+  neutral-200: 'oklch(0.922 0 0)'
+  neutral-300: 'oklch(0.87 0 0)'
+  neutral-400: 'oklch(0.708 0 0)'
+  neutral-500: 'oklch(0.556 0 0)'
+  neutral-750: 'oklch(0.29 0 0)'
+  neutral-800: 'oklch(0.269 0 0)'
+  neutral-900: 'oklch(0.205 0 0)'
+  neutral-925: 'oklch(0.16 0 0)'
+  neutral-950: 'oklch(0.145 0 0)'
+  cool-gray-50: 'oklch(0.958 0.002 250)'
+  cool-gray-100: 'oklch(0.938 0.004 250)'
+  cool-gray-200: 'oklch(0.91 0.005 250)'
+  cool-gray-300: 'oklch(0.86 0.007 250)'
+  cool-gray-400: 'oklch(0.81 0.01 250)'
+  art-day-sky: 'oklch(0.78 0.075 245)'
+  art-night-sky: 'oklch(0.33 0.07 256)'
+  art-cinder: 'oklch(0.68 0.18 46)'
+  art-cinder-light: 'oklch(0.85 0.065 46)'
+  sand-50: 'oklch(0.965 0.01 80)'
+  sand-100: 'oklch(0.936 0.015 81)'
+  sand-200: 'oklch(0.89 0.02 80)'
+  sand-400: 'oklch(0.72 0.025 76)'
+  sand-900: 'oklch(0.272 0.013 72)'
+  red-400: 'oklch(0.69 0.2 27)'
+  red-500: 'oklch(0.6 0.235 27)'
+  red-450: 'oklch(0.635 0.229 28)'
+  red-550: 'oklch(0.588 0.236 28)'
+  red-600: 'oklch(0.55 0.22 27)'
+  red-800: 'oklch(0.43 0.17 27)'
+  yellow-300: 'oklch(0.9 0.14 84)'
+  yellow-400: 'oklch(0.85 0.17 84)'
+  yellow-800: 'oklch(0.5 0.1 84)'
+  green-400: 'oklch(0.81 0.16 148)'
+  green-450: 'oklch(0.756 0.197 147)'
+  green-500: 'oklch(0.73 0.2 148)'
+  green-550: 'oklch(0.669 0.197 147)'
+  green-650: 'oklch(0.52 0.17 147)'
+  green-800: 'oklch(0.45 0.14 148)'
+  amber-250: 'oklch(0.842 0.165 84)'
+  amber-400: 'oklch(0.752 0.157 78)'
+  amber-650: 'oklch(0.547 0.116 74)'
+  blue-400: 'oklch(0.7 0.163 255)'
+  blue-450: 'oklch(0.67 0.173 256)'
+  blue-500: 'oklch(0.62 0.15 255)'
+  blue-550: 'oklch(0.587 0.177 256)'
+  blue-650: 'oklch(0.535 0.177 256)'
+  blue-800: 'oklch(0.42 0.11 255)'
+  white-a2: 'oklch(1 0 0 / 0.02)'
+  white-a4: 'oklch(1 0 0 / 0.04)'
+  white-a6: 'oklch(1 0 0 / 0.06)'
+  white-a9: 'oklch(1 0 0 / 0.09)'
+  white-a12: 'oklch(1 0 0 / 0.12)'
+  white-a18: 'oklch(1 0 0 / 0.18)'
+  white-a20: 'oklch(1 0 0 / 0.2)'
+  white-a30: 'oklch(1 0 0 / 0.3)'
+  white-a50: 'oklch(1 0 0 / 0.5)'
+  black-a6: 'oklch(0 0 0 / 0.06)'
+  black-a30: 'oklch(0 0 0 / 0.3)'
+  black-a40: 'oklch(0 0 0 / 0.4)'
+  surface-page: '{colors.neutral-0}'
+  surface-muted: '{colors.neutral-100}'
+  surface-emphasis: '{colors.neutral-150}'
+  surface-selected: '{colors.neutral-150}'
+  surface-raised: '{colors.neutral-0}'
+  surface-lifted: '{colors.neutral-0}'
+  surface-pressed: '{colors.neutral-0}'
+  surface-glass: 'oklch(0.97 0 0 / 0.6)'
+  surface-code: '{colors.neutral-50}'
+  surface-overlay: '{colors.black-a40}'
+  fg-default: '{colors.neutral-950}'
+  fg-muted: '{colors.neutral-500}'
+  fg-on-action: '{colors.neutral-50}'
+  fg-on-danger: '{colors.neutral-0}'
+  fg-code: '{colors.neutral-950}'
+  fg-danger: '{colors.red-600}'
+  fg-success: '{colors.green-650}'
+  fg-warning: '{colors.amber-650}'
+  fg-info: '{colors.blue-650}'
+  line-default: '{colors.neutral-300}'
+  line-field: '{colors.neutral-200}'
+  line-control: '{colors.neutral-300}'
+  line-focus: '{colors.neutral-400}'
+  line-danger: '{colors.fill-danger}'
+  fill-success: '{colors.green-550}'
+  fill-warning: '{colors.amber-400}'
+  fill-danger: '{colors.red-550}'
+  fill-info: '{colors.blue-550}'
+  surface-success: 'color-mix(in oklab, {colors.fill-success} 11%, {colors.surface-page})'
+  surface-warning: 'color-mix(in oklab, {colors.fill-warning} 11%, {colors.surface-page})'
+  surface-danger: 'color-mix(in oklab, {colors.fill-danger} 11%, {colors.surface-page})'
+  surface-info: 'color-mix(in oklab, {colors.fill-info} 11%, {colors.surface-page})'
+  line-success-soft: 'color-mix(in oklab, {colors.fill-success} 34%, {colors.line-default})'
+  line-warning-soft: 'color-mix(in oklab, {colors.fill-warning} 34%, {colors.line-default})'
+  line-danger-soft: 'color-mix(in oklab, {colors.fill-danger} 34%, {colors.line-default})'
+  line-info-soft: 'color-mix(in oklab, {colors.fill-info} 34%, {colors.line-default})'
+  edge-rest-side: '{colors.cool-gray-200}'
+  edge-rest-mid: '{colors.cool-gray-100}'
+  edge-focus-side: '{colors.cool-gray-400}'
+  edge-focus-mid: '{colors.cool-gray-300}'
+  edge-ambient-side: '{colors.cool-gray-100}'
+  edge-ambient-mid: '{colors.cool-gray-50}'
+  edge-faint: '{colors.cool-gray-100}'
+  edge-raised: '{colors.cool-gray-200}'
+  action-primary: '{colors.neutral-900}'
+  action-primary-hover: 'oklch(0.205 0 0 / 0.9)'
+  action-danger: '{colors.fill-danger}'
+  action-danger-hover: 'color-mix(in oklch, {colors.fill-danger} 90%, transparent)'
+  action-quiet: 'oklch(0.97 0 0 / 0.3)'
+  action-quiet-hover: '{colors.neutral-100}'
+  action-ghost-hover: 'oklch(0.556 0 0 / 0.1)'
+  field-background: 'oklch(1 0 0)'
+  field-shade: '{colors.black-a6}'
+  status-danger: '{colors.fill-danger}'
+  status-danger-rim: '{colors.red-400}'
+  status-danger-glyph: '{colors.red-800}'
+  status-warning: '{colors.fill-warning}'
+  status-warning-rim: '{colors.yellow-300}'
+  status-warning-glyph: '{colors.yellow-800}'
+  status-success: '{colors.fill-success}'
+  status-success-rim: '{colors.green-400}'
+  status-success-glyph: '{colors.green-800}'
+  status-info: '{colors.fill-info}'
+  status-info-rim: '{colors.blue-400}'
+  status-info-glyph: '{colors.blue-800}'
+  highlight-inner: '{colors.white-a50}'
+  highlight-inverse: '{colors.white-a12}'
+  sheen-start: '{colors.white-a20}'
+  sheen-end: 'transparent'
+  surface-page-dark: '{colors.neutral-925}'
+  surface-muted-dark: '{colors.neutral-800}'
+  surface-emphasis-dark: '{colors.neutral-750}'
+  surface-selected-dark: '{colors.neutral-800}'
+  surface-raised-dark: '{colors.neutral-900}'
+  surface-lifted-dark: 'oklch(0.371 0 0 / 0.8)'
+  surface-pressed-dark: 'oklch(0.985 0 0 / 0.14)'
+  surface-glass-dark: 'oklch(0.269 0 0 / 0.75)'
+  surface-code-dark: '{colors.neutral-900}'
+  fg-default-dark: '{colors.neutral-50}'
+  fg-muted-dark: '{colors.neutral-400}'
+  fg-on-action-dark: '{colors.neutral-900}'
+  fg-code-dark: '{colors.neutral-300}'
+  fg-danger-dark: '{colors.red-450}'
+  fg-success-dark: '{colors.green-450}'
+  fg-warning-dark: '{colors.amber-250}'
+  fg-info-dark: '{colors.blue-400}'
+  line-default-dark: '{colors.white-a30}'
+  line-field-dark: '{colors.white-a30}'
+  line-control-dark: '{colors.white-a12}'
+  line-focus-dark: '{colors.neutral-500}'
+  line-danger-dark: '{colors.fill-danger-dark}'
+  fill-success-dark: '{colors.green-450}'
+  fill-warning-dark: '{colors.amber-250}'
+  fill-danger-dark: '{colors.red-450}'
+  fill-info-dark: '{colors.blue-450}'
+  surface-success-dark: 'color-mix(in oklab, {colors.fill-success-dark} 16%, {colors.surface-page-dark})'
+  surface-warning-dark: 'color-mix(in oklab, {colors.fill-warning-dark} 16%, {colors.surface-page-dark})'
+  surface-danger-dark: 'color-mix(in oklab, {colors.fill-danger-dark} 16%, {colors.surface-page-dark})'
+  surface-info-dark: 'color-mix(in oklab, {colors.fill-info-dark} 16%, {colors.surface-page-dark})'
+  line-success-soft-dark: 'color-mix(in oklab, {colors.fill-success-dark} 38%, {colors.line-default-dark})'
+  line-warning-soft-dark: 'color-mix(in oklab, {colors.fill-warning-dark} 38%, {colors.line-default-dark})'
+  line-danger-soft-dark: 'color-mix(in oklab, {colors.fill-danger-dark} 38%, {colors.line-default-dark})'
+  line-info-soft-dark: 'color-mix(in oklab, {colors.fill-info-dark} 38%, {colors.line-default-dark})'
+  edge-rest-side-dark: '{colors.white-a6}'
+  edge-rest-mid-dark: '{colors.white-a4}'
+  edge-focus-side-dark: '{colors.white-a18}'
+  edge-focus-mid-dark: '{colors.white-a12}'
+  edge-ambient-side-dark: '{colors.white-a4}'
+  edge-ambient-mid-dark: '{colors.white-a2}'
+  edge-faint-dark: '{colors.white-a4}'
+  edge-raised-dark: '{colors.white-a9}'
+  action-primary-dark: '{colors.neutral-200}'
+  action-primary-hover-dark: 'oklch(0.922 0 0 / 0.9)'
+  action-danger-dark: 'color-mix(in oklch, {colors.fill-danger-dark} 58%, transparent)'
+  action-danger-hover-dark: 'color-mix(in oklch, {colors.fill-danger-dark} 68%, transparent)'
+  action-quiet-dark: 'oklch(0.708 0 0 / 0.15)'
+  action-quiet-hover-dark: 'oklch(0.708 0 0 / 0.25)'
+  action-ghost-hover-dark: 'oklch(0.708 0 0 / 0.1)'
+  field-background-dark: '{colors.white-a9}'
+  field-shade-dark: '{colors.black-a30}'
+  highlight-inner-dark: '{colors.white-a4}'
+  sheen-start-dark: '{colors.white-a2}'
+typography:
+  heading:
+    fontFamily: system-ui
+    fontSize: 1.5rem
+    fontWeight: 600
+    lineHeight: 2rem
+  title:
+    fontFamily: system-ui
+    fontSize: 1.125rem
+    fontWeight: 600
+    lineHeight: 1.75rem
+  body:
+    fontFamily: system-ui
+    fontSize: 1rem
+    fontWeight: 400
+    lineHeight: 1.5rem
+  body-sm:
+    fontFamily: system-ui
+    fontSize: 0.875rem
+    fontWeight: 400
+    lineHeight: 1.25rem
+  label:
+    fontFamily: system-ui
+    fontSize: 0.875rem
+    fontWeight: 500
+    lineHeight: 1.25rem
+  label-sm:
+    fontFamily: system-ui
+    fontSize: 0.75rem
+    fontWeight: 500
+    lineHeight: 1rem
+  caption:
+    fontFamily: system-ui
+    fontSize: 0.75rem
+    fontWeight: 400
+    lineHeight: 1rem
+  code:
+    fontFamily: Llama Mono
+    fontSize: 0.875rem
+    fontWeight: 400
+    lineHeight: 1.25rem
+rounded:
+  control: 0.5rem
+  panel: 0.625rem
+  card: 0.875rem
+  container: 1rem
+  surface: 1.5rem
+  surface-lg: 2rem
+  full: 9999px
+spacing:
+  xs: 4px
+  sm: 8px
+  md: 12px
+  lg: 16px
+  xl: 24px
+  2xl: 32px
+components:
+  chat-form:
+    backgroundColor: '#f9f9f9'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.surface}'
+    typography: '{typography.body}'
+  chat-form-dark:
+    backgroundColor: '#202020'
+    textColor: '{colors.fg-default-dark}'
+  chat-form-placeholder:
+    textColor: '{colors.fg-muted}'
+  chat-form-placeholder-dark:
+    textColor: '{colors.fg-muted-dark}'
+  chat-form-edge:
+    backgroundColor: '{colors.edge-rest-side}'
+  chat-form-edge-dark:
+    backgroundColor: '{colors.edge-rest-side-dark}'
+  chat-form-edge-focus:
+    backgroundColor: '{colors.edge-focus-side}'
+  chat-form-edge-focus-dark:
+    backgroundColor: '{colors.edge-focus-side-dark}'
+  card:
+    backgroundColor: '#f9f9f9'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.card}'
+    padding: '24px'
+  card-dark:
+    backgroundColor: '#202020'
+    textColor: '{colors.fg-default-dark}'
+  card-edge:
+    backgroundColor: '{colors.edge-rest-side}'
+  card-edge-dark:
+    backgroundColor: '{colors.edge-rest-side-dark}'
+  sidebar:
+    backgroundColor: '#f9f9f9'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.container}'
+  sidebar-dark:
+    backgroundColor: '#1c1c1c'
+    textColor: '{colors.fg-default-dark}'
+  sidebar-edge:
+    backgroundColor: '{colors.edge-ambient-side}'
+  sidebar-edge-dark:
+    backgroundColor: '{colors.edge-ambient-side-dark}'
+  inset-group:
+    backgroundColor: 'oklch(1 0 0 / 0.85)'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.card}'
+  inset-group-dark:
+    backgroundColor: 'oklch(0.985 0 0 / 0.03)'
+    textColor: '{colors.fg-default-dark}'
+  inset-group-edge:
+    backgroundColor: '{colors.edge-ambient-side}'
+  inset-group-edge-dark:
+    backgroundColor: '{colors.edge-ambient-side-dark}'
+  selected-row:
+    backgroundColor: 'oklch(0.145 0 0 / 0.05)'
+    textColor: '{colors.fg-default}'
+  selected-row-dark:
+    backgroundColor: 'oklch(0.985 0 0 / 0.05)'
+    textColor: '{colors.fg-default-dark}'
+  user-bubble:
+    backgroundColor: '#f3f3f3'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.surface}'
+    typography: '{typography.body}'
+  user-bubble-dark:
+    backgroundColor: '#181818'
+    textColor: '{colors.fg-default-dark}'
+  user-bubble-edge:
+    backgroundColor: '{colors.edge-faint}'
+  user-bubble-edge-dark:
+    backgroundColor: '{colors.edge-faint-dark}'
+  floating-panel:
+    backgroundColor: '#ffffff'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.panel}'
+    typography: '{typography.body-sm}'
+  floating-panel-dark:
+    backgroundColor: '#161616'
+    textColor: '{colors.fg-default-dark}'
+  floating-panel-edge:
+    backgroundColor: '{colors.edge-raised}'
+  floating-panel-edge-dark:
+    backgroundColor: '{colors.edge-raised-dark}'
+  dialog:
+    backgroundColor: '#ffffff'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.panel}'
+  dialog-dark:
+    backgroundColor: '#0d0d0d'
+    textColor: '{colors.fg-default-dark}'
+  tooltip:
+    backgroundColor: '{colors.action-primary}'
+    textColor: '{colors.fg-on-action}'
+    rounded: '{rounded.control}'
+    typography: '{typography.caption}'
+  tooltip-dark:
+    backgroundColor: '{colors.action-primary-dark}'
+    textColor: '{colors.fg-on-action-dark}'
+  button-primary:
+    backgroundColor: '{colors.action-primary}'
+    textColor: '{colors.fg-on-action}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '36px'
+  button-primary-dark:
+    backgroundColor: '{colors.action-primary-dark}'
+    textColor: '{colors.fg-on-action-dark}'
+  button-primary-hover:
+    backgroundColor: '#2e2e2e'
+    textColor: '{colors.fg-on-action}'
+  button-primary-hover-dark:
+    backgroundColor: '#cfcfcf'
+    textColor: '{colors.fg-on-action-dark}'
+  button-secondary:
+    backgroundColor: '#f9f9f9'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '36px'
+  button-secondary-dark:
+    backgroundColor: '#202020'
+    textColor: '{colors.fg-default-dark}'
+  button-secondary-hover:
+    backgroundColor: '#f7f7f7'
+    textColor: '{colors.fg-default}'
+  button-secondary-hover-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+    textColor: '{colors.fg-default-dark}'
+  button-secondary-border:
+    backgroundColor: 'oklch(0.87 0 0 / 0.3)'
+  button-secondary-border-dark:
+    backgroundColor: 'oklch(1 0 0 / 0.06)'
+  button-tertiary:
+    backgroundColor: '#fcfcfc'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '36px'
+  button-tertiary-dark:
+    backgroundColor: '#232323'
+    textColor: '{colors.fg-default-dark}'
+  button-tertiary-hover:
+    backgroundColor: '{colors.action-quiet-hover}'
+    textColor: '{colors.fg-default}'
+  button-tertiary-hover-dark:
+    backgroundColor: '#323232'
+    textColor: '{colors.fg-default-dark}'
+  button-tertiary-border:
+    backgroundColor: '{colors.surface-muted}'
+  button-tertiary-border-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+  button-outline:
+    backgroundColor: '{colors.field-background}'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '36px'
+  button-outline-dark:
+    backgroundColor: '#232323'
+    textColor: '{colors.fg-default-dark}'
+  button-outline-border:
+    backgroundColor: '{colors.line-control}'
+  button-outline-border-dark:
+    backgroundColor: '{colors.line-control-dark}'
+  button-outline-hover:
+    backgroundColor: '#f1f1f1'
+    textColor: '{colors.fg-default}'
+  button-outline-hover-dark:
+    backgroundColor: '#1c1c1c'
+    textColor: '{colors.fg-default-dark}'
+  button-ghost:
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+  button-ghost-dark:
+    textColor: '{colors.fg-default-dark}'
+  button-ghost-hover:
+    backgroundColor: '#f1f1f1'
+    textColor: '{colors.fg-default}'
+  button-ghost-hover-dark:
+    backgroundColor: '#1c1c1c'
+    textColor: '{colors.fg-default-dark}'
+  button-destructive:
+    backgroundColor: '{colors.action-danger}'
+    textColor: '{colors.fg-on-danger}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '36px'
+  button-destructive-dark:
+    backgroundColor: '#952420'
+    textColor: '{colors.fg-on-danger}'
+  button-destructive-hover:
+    backgroundColor: '#ea262d'
+    textColor: '{colors.fg-on-danger}'
+  button-destructive-hover-dark:
+    backgroundColor: '#ac2824'
+    textColor: '{colors.fg-on-danger}'
+  toggle-on:
+    backgroundColor: '{colors.surface-selected}'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '36px'
+  toggle-on-dark:
+    backgroundColor: '{colors.surface-selected-dark}'
+    textColor: '{colors.fg-default-dark}'
+  toggle-hover:
+    backgroundColor: '#f1f1f1'
+    textColor: '{colors.fg-default}'
+  toggle-hover-dark:
+    backgroundColor: '#1c1c1c'
+    textColor: '{colors.fg-default-dark}'
+  toggle-group:
+    backgroundColor: '#f9f9f9'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+    height: '32px'
+  toggle-group-dark:
+    backgroundColor: '#202020'
+    textColor: '{colors.fg-default-dark}'
+  toggle-group-border:
+    backgroundColor: 'oklch(0.87 0 0 / 0.3)'
+  toggle-group-border-dark:
+    backgroundColor: 'oklch(1 0 0 / 0.06)'
+  toggle-group-seam:
+    backgroundColor: '{colors.line-control}'
+  toggle-group-seam-dark:
+    backgroundColor: '{colors.line-control-dark}'
+  toggle-group-key-muted:
+    backgroundColor: '{colors.surface-muted}'
+    textColor: 'oklch(0.145 0 0 / 0.7)'
+  toggle-group-key-muted-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+    textColor: 'oklch(0.985 0 0 / 0.7)'
+  toggle-group-key-on:
+    backgroundColor: '{colors.surface-pressed}'
+    textColor: '{colors.fg-default}'
+  toggle-group-key-on-dark:
+    backgroundColor: '#2e2e2e'
+    textColor: '{colors.fg-default-dark}'
+  tabs-list:
+    backgroundColor: '{colors.surface-muted}'
+    rounded: '{rounded.panel}'
+    height: '36px'
+    padding: '2px'
+  tabs-list-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+  tabs-trigger:
+    backgroundColor: '{colors.surface-muted}'
+    textColor: 'oklch(0.145 0 0 / 0.7)'
+    rounded: '{rounded.control}'
+    typography: '{typography.label}'
+  tabs-trigger-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+    textColor: 'oklch(0.985 0 0 / 0.7)'
+  tabs-trigger-active:
+    backgroundColor: '{colors.surface-lifted}'
+    textColor: '{colors.fg-default}'
+  tabs-trigger-active-dark:
+    backgroundColor: '#363636'
+    textColor: '{colors.fg-default-dark}'
+  switch-track:
+    backgroundColor: '{colors.surface-muted}'
+    rounded: '{rounded.full}'
+    height: '18px'
+    width: '32px'
+  switch-track-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+  switch-track-on:
+    backgroundColor: '{colors.action-primary}'
+  switch-track-on-dark:
+    backgroundColor: '{colors.action-primary-dark}'
+  switch-thumb:
+    backgroundColor: '{colors.surface-lifted}'
+    rounded: '{rounded.full}'
+    size: '16px'
+  switch-thumb-dark:
+    backgroundColor: '{colors.surface-lifted-dark}'
+  switch-thumb-on:
+    backgroundColor: '{colors.surface-lifted}'
+  switch-thumb-on-dark:
+    backgroundColor: '{colors.surface-raised-dark}'
+  copy-feedback:
+    backgroundColor: '{colors.surface-page}'
+    textColor: '{colors.fg-success}'
+  copy-feedback-dark:
+    backgroundColor: '{colors.surface-page-dark}'
+    textColor: '{colors.fg-success-dark}'
+  input:
+    backgroundColor: '{colors.field-background}'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.body-sm}'
+    height: '36px'
+  input-dark:
+    backgroundColor: '#232323'
+    textColor: '{colors.fg-default-dark}'
+  input-placeholder:
+    textColor: '{colors.fg-muted}'
+  input-placeholder-dark:
+    textColor: '{colors.fg-muted-dark}'
+  input-border:
+    backgroundColor: '{colors.line-field}'
+  input-border-dark:
+    backgroundColor: '{colors.line-field-dark}'
+  input-border-focus:
+    backgroundColor: '{colors.line-focus}'
+  input-border-focus-dark:
+    backgroundColor: '{colors.line-focus-dark}'
+  input-border-invalid:
+    backgroundColor: '{colors.line-danger}'
+  input-border-invalid-dark:
+    backgroundColor: '{colors.line-danger-dark}'
+  badge-default:
+    backgroundColor: '{colors.action-primary}'
+    textColor: '{colors.fg-on-action}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+    padding: '2px 8px'
+  badge-default-dark:
+    backgroundColor: '{colors.action-primary-dark}'
+    textColor: '{colors.fg-on-action-dark}'
+  badge-secondary:
+    backgroundColor: '#dadada'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-secondary-dark:
+    backgroundColor: '#252525'
+    textColor: '{colors.fg-default-dark}'
+  badge-outline:
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-outline-dark:
+    textColor: '{colors.fg-default-dark}'
+  badge-outline-border:
+    backgroundColor: '{colors.line-default}'
+  badge-outline-border-dark:
+    backgroundColor: '{colors.line-default-dark}'
+  badge-destructive:
+    backgroundColor: '{colors.action-danger}'
+    textColor: '{colors.fg-on-danger}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-destructive-dark:
+    backgroundColor: '#952420'
+    textColor: '{colors.fg-on-danger}'
+  badge-success:
+    backgroundColor: '{colors.surface-success}'
+    textColor: '{colors.fg-success}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-success-dark:
+    backgroundColor: '{colors.surface-success-dark}'
+    textColor: '{colors.fg-success-dark}'
+  badge-warning:
+    backgroundColor: '{colors.surface-warning}'
+    textColor: '{colors.fg-warning}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-warning-dark:
+    backgroundColor: '{colors.surface-warning-dark}'
+    textColor: '{colors.fg-warning-dark}'
+  badge-danger:
+    backgroundColor: '{colors.surface-danger}'
+    textColor: '{colors.fg-danger}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-danger-dark:
+    backgroundColor: '{colors.surface-danger-dark}'
+    textColor: '{colors.fg-danger-dark}'
+  badge-info:
+    backgroundColor: '{colors.surface-info}'
+    textColor: '{colors.fg-info}'
+    rounded: '{rounded.control}'
+    typography: '{typography.label-sm}'
+  badge-info-dark:
+    backgroundColor: '{colors.surface-info-dark}'
+    textColor: '{colors.fg-info-dark}'
+  code-block:
+    backgroundColor: '{colors.surface-code}'
+    textColor: '{colors.fg-code}'
+    rounded: '{rounded.panel}'
+    typography: '{typography.code}'
+  code-block-dark:
+    backgroundColor: '{colors.surface-code-dark}'
+    textColor: '{colors.fg-code-dark}'
+  dialog-overlay:
+    backgroundColor: '{colors.surface-overlay}'
+  list-row-selected:
+    backgroundColor: '{colors.surface-selected}'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+  list-row-selected-dark:
+    backgroundColor: '{colors.surface-selected-dark}'
+    textColor: '{colors.fg-default-dark}'
+  panel-muted:
+    backgroundColor: '{colors.surface-muted}'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.panel}'
+  panel-muted-dark:
+    backgroundColor: '{colors.surface-muted-dark}'
+    textColor: '{colors.fg-default-dark}'
+  chip-emphasis:
+    backgroundColor: '{colors.surface-emphasis}'
+    textColor: '{colors.fg-default}'
+    rounded: '{rounded.control}'
+  chip-emphasis-dark:
+    backgroundColor: '{colors.surface-emphasis-dark}'
+    textColor: '{colors.fg-default-dark}'
+  page:
+    backgroundColor: '{colors.surface-page}'
+    textColor: '{colors.fg-default}'
+  page-dark:
+    backgroundColor: '{colors.surface-page-dark}'
+    textColor: '{colors.fg-default-dark}'
+  chat-form-edge-mid:
+    backgroundColor: '{colors.edge-rest-mid}'
+  chat-form-edge-mid-dark:
+    backgroundColor: '{colors.edge-rest-mid-dark}'
+  chat-form-edge-mid-focus:
+    backgroundColor: '{colors.edge-focus-mid}'
+  chat-form-edge-mid-focus-dark:
+    backgroundColor: '{colors.edge-focus-mid-dark}'
+  sidebar-edge-mid:
+    backgroundColor: '{colors.edge-ambient-mid}'
+  sidebar-edge-mid-dark:
+    backgroundColor: '{colors.edge-ambient-mid-dark}'
+  inset-group-edge-mid:
+    backgroundColor: '{colors.edge-ambient-mid}'
+  inset-group-edge-mid-dark:
+    backgroundColor: '{colors.edge-ambient-mid-dark}'
+  glass-highlight:
+    backgroundColor: '{colors.highlight-inner}'
+  glass-highlight-dark:
+    backgroundColor: '{colors.highlight-inner-dark}'
+  tooltip-highlight:
+    backgroundColor: '{colors.highlight-inverse}'
+  user-bubble-sheen:
+    backgroundColor: '{colors.sheen-start}'
+  user-bubble-sheen-dark:
+    backgroundColor: '{colors.sheen-start-dark}'
+  field-shade:
+    backgroundColor: '{colors.field-shade}'
+  field-shade-dark:
+    backgroundColor: '{colors.field-shade-dark}'
+  status-lamp-danger-rim:
+    backgroundColor: '{colors.status-danger-rim}'
+  status-lamp-warning-rim:
+    backgroundColor: '{colors.status-warning-rim}'
+  status-lamp-success-rim:
+    backgroundColor: '{colors.status-success-rim}'
+  status-lamp-danger:
+    backgroundColor: '{colors.status-danger}'
+    textColor: '{colors.status-danger-glyph}'
+    rounded: '{rounded.full}'
+    size: '8px'
+  status-lamp-warning:
+    backgroundColor: '{colors.status-warning}'
+    textColor: '{colors.status-warning-glyph}'
+    rounded: '{rounded.full}'
+    size: '8px'
+  status-lamp-success:
+    backgroundColor: '{colors.status-success}'
+    textColor: '{colors.status-success-glyph}'
+    rounded: '{rounded.full}'
+    size: '8px'
+---
+
+## Overview
+
+**Llama UI** is the design system and component library this file describes. **Llama Chat**,
+built from it, is the local, private chat client that llama-server bundles, and the native
+Llama apps (Llama for Mac, Llama for Windows) open it in their own window. It should feel calm
+and tool-like: neutral greys, plenty of space, and surfaces that read as frosted matte glass
+rather than shiny plastic. Depth comes from blur, a faint hairline edge and soft shadows,
+never from strong gradients. Colour is reserved for meaning: the status colours (success,
+warning, error and info), destructive actions, and the content itself.
+
+There are three layers between a person and a model: the **model** (the weights, a GGUF
+file), the **service** (the server that runs inference: llama.cpp and llama-server) and the
+**application** (the harness, the UI and UX). The harness, the agentic loop, is its own headless
+package, Llama Harness (`@ggml-org/llama-harness`), next to Llama UI (`@ggml-org/llama-ui`). Llama UI and Llama Chat are the application
+layer. Running all three locally is the point: people choose their model and keep their
+conversations and traces, so the UI never assumes a cloud account or hides which model runs.
+The service need not be on the same machine: a server can be run by one person and shared by
+many (a family, a team, a community), so the UI should make clear which server a model runs on.
+
+This file is the how, written for agents first. Its principles, as rules to apply here:
+
+- **Function first.** Every element has a job and takes its measurements from a shared role
+  (control heights, corners, icon sizes, type roles); never give one component its own.
+- **Simple by default, deep on request.** The first screen offers a suggested model and
+  sensible defaults; advanced settings (sampling, penalties, system prompts, recipes) sit one
+  step away behind a disclosure, never on the default path. Prefer plain words to terms like
+  GGUF, quantization or speculative decoding, and explain a term where it must appear.
+- **The content is the loudest thing.** The conversation carries the weight and the colour;
+  the interface around it stays neutral and quiet.
+- **Colour has one job.** Greys build everything; status colours show status and nothing else;
+  art colours and cinder are for artwork and the odd brand detail, never for the UI's controls.
+- **Recognisable, easy to change.** Keep the character in the icon, the type and one
+  accent, so an app built on Llama UI can restyle it through component tokens alone.
+- **Design lives in code.** The CSS is the source of truth; prefer what is generated or
+  derived over hand-tuned values, and record the reason next to the value.
+- **Reuse before adding.** An existing role before a new token, an existing component before
+  a new one.
+
+Design tokens come in three tiers, each in its own file under `ui/lib/ui/src/lib/styles/tokens/`:
+
+1. **Primitives** (`primitives.css`): raw values named by what they are, such as
+   `neutral-900`, `cool-gray-200`, `red-500`, `white-a30`, `font-size-14` or `length-24`.
+   Only semantic tokens point at them.
+2. **Semantic tokens** (`semantic.css`): named by purpose, such as `surface-glass`,
+   `fg-muted`, `line-field`, `edge-focus-side`, `action-primary` or `status-warning`. They
+   point at primitives and are the only tier that changes between light and dark. The type,
+   corner, icon size and control height roles live here too and are Tailwind utilities:
+   `text-label`, `rounded-control`, `size-icon-md`, `h-control-md`.
+3. **Component tokens** (`components.css`): one group per component, named
+   `[component]-[variant]-[property]-[state]`, such as `chat-form-edge-side-focus` or
+   `button-secondary-background-hover`. They point at semantic tokens, and components read
+   them as `bg-(--button-primary-background)` and similar.
+
+The front matter of this file mirrors those three files. When they disagree, the CSS wins
+and this file should be updated to match.
+
+Light mode is the base. A semantic token whose dark value differs has a `-dark` twin here,
+and components list a `-dark` entry wherever their colours change. Translucent component
+fills are given as they render over the page, so contrast checks see the real colour.
+
+## Colors
+
+The palette is achromatic. Hue appears only in the hairline edges (a cool grey at hue 250,
+kept almost neutral) and in the status colours, which serve function only: green for success,
+amber for warning, red for errors and blue for information, saturated enough to read at a
+glance and tuned to text contrast in both modes. Each status has one root colour, its fill (`fill-*`),
+and everything in that status derives from it: the soft surface and line of alerts and badges,
+the border of an invalid field, the lamp. Red keeps to the same rule, so there is one red: the
+danger button and the solid danger badge are the fill itself (`action-danger`), solid in light
+mode and frosted, translucent matte glass in dark (58% of the fill over the page). Never style a
+danger control with its own red (`bg-destructive`, `bg-red-500` …): use the `destructive`
+variant, which `AlertDialog.Action` takes too, or the status tokens. Cinder (`art-cinder`, `oklch(0.68 0.18 46)`, #ee6c1e) is the brand's one accent orange: the .cpp of the llama.cpp
+logotype, the mark on a detail in the brand pages and the warm pop in artwork. It is not part of the UI palette. Sand (`sand-50` to `sand-900`) is the warm neutral for communications
+(posters, boards, the site); the UI itself stays on the greys.
+
+Backgrounds stay neutral as a rule, in the UI and in communications alike: greys and sand
+behind, colour only where it serves a purpose, functional (status, a selection, focus) or
+creative (a shape, a numeral, an illustration). Artwork takes its colours from the greys, sand and
+the `art-*` primitives: the day sky and the night sky (llama.app's light and dark hero grounds) and
+cinder, the accent orange; never from the status colours, and never red.
+
+Light mode has two surface themes, which share everything else (the palette, buttons, fields,
+badges, shadows and dark mode): **Paper**, the default, sets white panels, fields and keys on a
+faint grey page (`neutral-25`); **Matte** sets grey glass on a white page. Matte is the
+`theme-matte` class on `<html>`, chosen with the Light surfaces setting (Settings → General), and only its surface tokens differ: `surface-page`,
+`surface-glass`, `surface-code`, `field-background` and `float-panel-background-modal`.
+
+- **Surfaces:** `surface-page` for the page, `surface-muted` for quiet panels,
+  `surface-emphasis` and `surface-selected` for stronger fills and hover or selected rows,
+  `surface-raised` for menus and dialogs, `surface-lifted` for a selection raised on a
+  recessed track, `surface-pressed` for a key pressed in, `surface-glass` for the translucent matte fill, `surface-code` for code and
+  `surface-overlay` behind dialogs.
+- **Foreground:** `fg-default` and `fg-muted` for text and icons, `fg-on-action` and
+  `fg-on-danger` on filled buttons, `fg-code` for code, `fg-danger` for errors,
+  `fg-success` for confirmations such as a copied check, `fg-warning` for cautions and
+  `fg-info` for neutral notices.
+- **Lines:** `line-default` for dividers, `line-control` for outlined controls (soft in dark
+  mode), `line-field` for inputs, `line-focus` for focus and `line-danger` for invalid fields.
+- **Edges:** the hairlines of matte surfaces, darker at the sides than in the middle.
+  `edge-rest-*` at rest, `edge-focus-*` when focus is inside, `edge-ambient-*` for large
+  quiet containers whose edge never changes, `edge-faint` for the user bubble and
+  `edge-raised` for floating panels.
+- **Actions:** `action-primary` (near black in light mode, near white in dark mode) and its
+  hover, `action-danger` and its hover, and `action-ghost-hover`.
+- **Status fills:** `fill-success`, `fill-warning`, `fill-danger` and `fill-info` are each
+  status colour at its brightest, for dots, lamps and other small solid marks. They are
+  brighter than the matching `fg-*` text colour, which keeps to a readable lightness (4.5:1 on
+  the soft surfaces), and are a little lighter again in dark mode.
+- **Status surfaces:** `surface-success`, `surface-warning`, `surface-danger` and
+  `surface-info` are soft tints of each status fill for alerts and soft badges, with
+  `line-*-soft` hairlines to match. They are mixed in oklab so the hue holds over the page.
+  Soft status badges are pills with a small dot in the status fill before the label.
+- **Status:** `status-danger`, `status-warning`, `status-success` and `status-info` are the
+  lamp fills for error or stopped, loading or warning, ready or connected, and informational. They take the status
+  fills, and each has a lighter `-rim` and a darker `-glyph`. Known gap: the glyph on the red lamp
+  reaches only about 2:1 and on the green lamp about 3.2:1, below WCAG AA, so the lamp colour
+  must never be the only signal; pair it with a label or tooltip.
+
+## Typography
+
+The UI uses Llama Sans for all text, headings included (with the system sans-serif stack as its
+fallback), and Llama Mono for code (with the system monospace stack as its fallback). Llama Sans
+is one variable font with an optical size axis: the browser sets it from the font-size, so text at
+16px gets the UI spacing and kerning, 36px and up the tighter Display setting and text under 16px a
+looser Small one, with a blend in between. Nothing needs choosing per element; pin a point only to
+show it, with `font-variation-settings: 'opsz' 16` or `36`. Its line box is 1.25 at every size, centred on the
+cap height; large headings set `line-height: 1.15` themselves. Llama Mono keeps every character,
+its coding ligatures included, in one cell, so code and numbers line up in columns. Type is set through roles that fix size, line height and weight together:
+
+- `body` (16/24, 400): chat messages and the chat input.
+- `body-sm` (14/20, 400): most text, fields and lists.
+- `label` (14/20, 500): buttons and field labels.
+- `label-sm` (12/16, 500): badges and compact labels.
+- `caption` (12/16, 400): tooltips, hints and metadata.
+- `title` (18/28, 600) and `heading` (24/32, 600): rare headings; there is no display size.
+
+When a component lets callers override the size, keep an explicit weight class next to the
+role (`text-label font-medium`) so a size override does not drop the weight. Placeholders
+in the chat form are engraved: muted text with a 1px highlight below it in light mode and a
+1px shadow above it in dark mode (the `engraved` utility).
+
+## Layout
+
+Spacing follows a 4px grid. Gaps of 4 to 12px (`xs` to `md`) dominate inside controls and
+lists; 16 to 32px (`lg` to `2xl`) separate sections. Controls are 32, 36 or 40px tall
+(`h-control-sm`, `h-control-md`, `h-control-lg`) and icons are 12, 14, 16 or 20px
+(`size-icon-xs` to `size-icon-lg`). Square boxes use `size-N`, never a matching `h-N w-N`
+pair, and icons use the `size-icon-*` roles. Inside buttons, toggles and menu items an icon is
+16px (`size-icon-md`) unless a smaller control calls for less. The chat column is centred with
+a generous bottom offset so the floating chat form never covers the last message. The desktop
+sidebar is 18rem wide by default, can be resized, and collapses to a 3rem strip.
+
+### Safe areas
+
+The page runs under the status bar and over the home indicator (`viewport-fit=cover`), which
+an installed iPhone app always shows and a browser tab mostly does not. The insets are
+`--safe-area-top` and `--safe-area-bottom` (0 where there is none). Anything pinned to a screen
+edge keeps clear of them with the safe-area utilities from `src/lib/styles/safe-area.css`,
+never a hand-written `calc()`:
+
+- `pt-safe`, `pb-safe`: padding of just the inset, e.g. a sheet that fills the screen.
+- `pt-safe-N`, `pb-safe-N`: a spacing step plus the inset, e.g. `pt-safe-12` for the chat,
+  whose messages start 3rem below the top on a phone.
+- `pt-(--page-top)`: where a page with a title, like Models, Projects or Library, starts on a
+  phone: a row below the corner controls, so the title clears both the menu key and the fade
+  under the status bar.
+- `top-safe-N`, `bottom-safe-N`: the same for absolutely or fixedly placed controls, e.g.
+  `top-safe-2.5` for the expanded chat form's collapse button.
+- `top-(--corner-control-top)`, `bottom-(--corner-control-bottom)`,
+  `right-(--corner-control-side)`: the phone's corner controls, like the menu key and a page's
+  floating key. They follow the insets differently
+  in the installed app (see Corners below).
+
+**Corners in the installed app.** The status bar and the home indicator set the screen's top
+and bottom apart on their own, so a corner control does not add its usual gap on top of their
+insets there. At the top it sits just below the status bar (`--corner-control-top`, the inset
+plus 0.25rem). At the bottom the home indicator is a short bar in the middle and the corners
+beside it are free, so a bottom corner action ignores its inset instead of stacking above the
+indicator. Its gaps from the bottom and the side are always equal, 1.75rem
+(`--corner-control-bottom` is defined from `--corner-control-side`), which keeps a 56px key
+about concentric with an iPhone's rounded screen corner. Only what spans the bottom edge's
+middle, like a sheet's last row, clears the inset with `pb-safe` or `bottom-safe-N`. In a
+browser tab the top keeps 1rem and the bottom its 1.75rem beyond the insets.
+
+A control placed inside a padded box still needs its own `top-safe-N`: absolute positions
+ignore the padding. Dialogs keep clear of the insets on their own (see Dialogs on phones under
+Components). At the top, every route on a phone has the `status-bar-fade` from the root
+layout: solid behind the status bar and the row of corner controls under it, fading out down to
+`--page-top`, like the fade under the desktop tab bar, so content scrolls away under them
+instead of colliding with the clock or the chat's header. A route needs no fade of its own;
+what covers the whole screen, like the expanded chat form, hides it, and it fades out as the
+page slides aside for the sidebar. Check
+pinned content with the insets simulated, since they are 0 in a desktop browser.
+
+## Elevation & Depth
+
+Depth is built from the matte utilities in `ui/lib/ui/src/lib/styles/surfaces.css`. Pick the one that
+matches the role of the surface instead of combining raw shadows.
+
+- **`matte-glass`:** large resting surfaces. A translucent fill with a backdrop blur, an
+  inner highlight, a soft drop shadow and a 1px hairline whose sides are slightly darker than
+  its middle. The hairline is drawn on a masked `::before` so it never tints the fill. Focus
+  inside swaps the hairline to the focus edge; the shadow stays the same. Its colours come
+  from slot variables, and `chat-form-surface`, `card-surface`, `sidebar-surface` and
+  `inset-group-surface` point those slots at one component's tokens, so each component needs
+  a single class.
+- **`matte-float`** and **`matte-float-modal`:** menus, popovers, select lists, hover cards
+  and drawers, and dialogs over the page colour. An 86% opaque panel with blur, a faint edge
+  and a deeper shadow. The edge is a hairline ring baked into the shadow as its last layer,
+  never a border next to a shadow, which would read as a double edge; the panel's border stays transparent so its size does not change. In light mode dialogs are solid white instead: over the dimmed page a
+  translucent white turns grey.
+- **`matte-key`:** buttons, selects, toggles and tabs. The matte finish: on top of the
+  button's own fill it adds a light blur, a fill barely lighter at the top (`--key-sheen`, 12% white in light mode, 2% in dark)
+  and a small drop shadow. It never changes the button colour and draws no rim of its own: every
+  `matte-key` control has a border, and a rim inside it would double the edge. Nothing marks
+  the top edge alone, so the edge looks the same all round, with no gloss.
+- **`matte-key-solid`:** primary and danger buttons. The same sheen, fainter
+  (`--key-sheen-solid`), the same blur, and an even 1px hairline in a shade of the fill drawn
+  inside the button (`--key-edge`), so the width does not change. The danger key stays matte
+  glass rather than metal: its sheen is almost none (`--button-danger-sheen`), and in dark mode
+  it is a frosted, translucent red (`red-500` at 58%) whose edge is a soft tint of the red, never
+  a lighter rim.
+- **`elevated-control`**, **`elevated-surface`** and **`elevated-raised`:** cards, floating
+  bars and thumbnails. An elevation token with a hairline ring baked in as its last layer, so
+  the edge melts into the shadow and the shadow deepens in dark mode. The ring is
+  `--elevation-ring` (black 5%, white 18% in dark) at `--elevation-ring-width` (1px). They
+  replace a border plus a shadow; never add a border to them.
+- **`matte-well`:** inputs, textareas and checkboxes. A shallow inset shade so
+  fields read as recessed.
+- **`matte-sheen`** and **`matte-sheen-solid`:** the user message bubble and badges. An
+  almost invisible top-to-bottom sheen, fainter on solid fills.
+- **`status-lamp`** and **`matte-orb`** with `orb-danger`, `orb-warning` or `orb-success`:
+  small status dots and the recording button. A near-flat fill barely lighter at the top and
+  an even hairline, with no glow.
+
+The elevation tokens are `elevation-surface`, `elevation-control`, `elevation-raised`,
+`elevation-inset` and `elevation-tooltip`. The drop shadows are smooth stacks: a few soft
+layers instead of one hard one, the closest the darkest and smallest, each further layer about
+twice the offset and blur and fainter, the far ones pulled in with a negative spread, so the
+shadow fades out instead of ending in a visible edge. They stay as close as upstream's
+Tailwind shadows: `elevation-surface` reaches about 20px, like `shadow-lg`, `elevation-raised`
+about 38px, like `shadow-xl`, and `elevation-control` is three tight layers reaching no further
+than 4px, so buttons and other controls sit close to the page. Two softer steps sit below them: `elevation-soft` for the chat form,
+which floats only a little, and `elevation-faint` for the user message bubble, which barely
+lifts. The keys inside the chat form, the add key and the model selector, take `elevation-key`
+(`--chat-form-key-shadow`): a 0.5px hairline all round and a 1px drop, since the control elevation's soft
+spread blends into the white form; in dark it is the control elevation. Dark mode deepens the same stacks. Tailwind's own `shadow-xs` to `shadow-2xl` are
+built the same way (`tokens/semantic.css`), each reaching about as far as Tailwind's default for
+it. Every
+button carries `elevation-control` (`--button-shadow`); a ghost button only while hovered. Overlays behind dialogs are `surface-overlay`
+with a 2px blur.
+
+## Shapes
+
+Corners are soft and consistent, set through roles: `control` (8px) for buttons, fields and
+badges, `panel` (10px) for menus and dialogs, `card` (14px) for cards, `container` (16px) for
+the sidebar, and `surface` (24px) for the chat form and message bubbles, rising to
+`surface-lg` (32px) for the chat form on small screens. Status lamps, avatars and the round
+icon buttons in the chat form are fully round.
+
+## Brand
+
+- **Logo:** the llama.cpp mark, one inline SVG (`Logo`) filled with the current text colour,
+  so it follows the theme with no light and dark copies. It is sized by `--size`, 1rem by
+  default: 14px in model rows, 16px in the sidebar. Colour it with a text token such as
+  `fg-default` or `fg-muted`, never a raw colour.
+- **App icons:** the mark in `#111111` on white, or `#fafafa` on `#111111` in dark mode
+  (`FAVICON_COLORS`, `THEME_COLORS`). The favicon keeps a 4% margin (`FAVICON_PADDING`), so
+  the logo spans 96% of it. The maskable and Apple touch icons are white squares with the
+  logo at 67% (the generator's 30% padding); its farthest point reaches 73%, inside the 80%
+  maskable safe zone. The PWA icons are white circles with the logo at 57%
+  (`make-icons-circular.js`, 85% of the square icon).
+- **Splash screens:** white, or `#111111` in dark mode, with the logo centred at 24% of the
+  screen's shorter side (`SPLASH_PADDING`).
+- The icons and splash screens in `static/` are build output of `npm run build-pwa-assets`,
+  drawn from `logo.svg`; change the source or the constants, never the generated files.
+
+## Components
+
+- **Buttons:** six variants.
+  - `default`: the solid primary button, including the chat submit button.
+  - `secondary`: the matte glass button, the same fill as the chat form with a faint border,
+    also used for the chat form's Stop and Skip reasoning buttons.
+  - `tertiary`: a faint grey tint with a soft muted border, quieter than secondary and
+    still a visible button; kept for low-emphasis actions that need more presence than
+    ghost.
+  - `outline`: the input fill with a `line-control` border, for secondary actions in dialogs
+    and forms.
+  - `ghost`: no fill until hovered, for icon buttons and quiet actions.
+  - `destructive`: red, for deleting and other irreversible actions.
+
+  All except ghost carry `matte-key`. Sizes are sm (32px), default (36px) and lg (40px), plus
+  square icon sizes.
+
+- **Badges:** four variants with the same names: `default`, `secondary` (a light foreground
+  tint), `outline` and `destructive`, plus the soft status badges `success`, `warning`, `danger` and
+  `info`. Badges are a fill or a border with the faint matte sheen and no inner rim.
+- **Toggles:** the same corners, type, heights, padding and icon size as buttons, with
+  square `icon-sm`, `icon` and `icon-lg` sizes for icon-only toggles. `default` has no fill
+  until hovered; `outline` borrows the outline button. Pressed toggles take
+  `toggle-background-on`.
+- **Button groups:** joined buttons share one shadow, drawn by the group, and one border at
+  each seam. A group separator replaces the seam border. Filled buttons draw a seam in their
+  own text colour (`button-primary-seam`, `button-danger-seam`) instead.
+- **Selection on a track:** a choice that moves along a track is a recessed track with the
+  selection raised on it, never a row of outlined buttons. The track is `surface-muted` with
+  the inset shade (`elevation-inset`); the selection is a `surface-lifted` chip with
+  `elevation-control`, and unselected options are softened text with no fill. Tabs use the
+  same track for their list, with the active tab raised (`tabs-*`); a `line` variant
+  underlines the active tab instead. The chip or underline slides between tabs in 300ms on a
+  plain ease-out, with a stretch of at most 5% along the move that is gone by the time it
+  lands; with reduced motion it jumps instead. The switch is the same track with a raised
+  thumb; switched on, the track takes the primary colour. The message statistics view switcher
+  uses the tabs tokens.
+- **Toggle groups:** a row of keys, like an old stereo's, not a track. At rest the group is
+  a secondary button, the same glass fill, border and shadow as a select trigger, with a
+  `line-control` seam between keys. A pressed key turns white (`surface-pressed`, the lightest
+  fill in dark mode) and sinks in under a subtle inner shadow (`elevation-pressed`), its label
+  a pixel lower. While any key is pressed, the others turn grey in light mode
+  (`surface-muted`) and mute their labels, so the pressed one stands out. A group is as tall
+  as a control of its size.
+- **Chat form:** one `chat-form-surface` holding the input, attachments and actions. Its fill
+  is the muted grey at 60% in light mode and 75% in dark mode.
+- **User message bubble:** the primary colour at 5% with `matte-sheen` and the very faint
+  `edge-faint` hairline, so it separates from the page without a visible border.
+- **Sidebar:** `sidebar-surface`, the muted fill at 60% with no inner highlight and the
+  ambient edge. On small screens it keeps a plain `shadow-md` instead.
+- **Inset groups:** `inset-group-surface` gathers rows inside a glass panel, like the
+  sidebar footer's Models, MCP and Settings, instead of a rule between them and the rows
+  above. In light mode it is a soft white (`surface-raised` at 85%) on the grey glass; in dark
+  mode a raised fill would be darker than the glass, so it is a 3% tint of the text colour. It
+  takes the sidebar's ambient edge, no inner highlight and only a faint, wide shade under it
+  (`0 2px 8px -4px`, 8% black in light, 40% in dark), with the card radius. It reads as part of
+  the panel: no tight contact shadow and no solid border, which make a button, and no inset
+  shade, which makes a field. Unlike the other `matte-glass` surfaces it does not blur: it
+  already sits on glass, and a second backdrop blur re-paints the panel's fill behind it and
+  turns the group visibly lighter, whatever its own fill.
+- **Selected rows:** `selected-row-surface` marks the row a sidebar list is on: a
+  conversation, a project or a top action, on desktop and on a phone. It is a 5% tint of the
+  text colour, under hover's 10%, with the inset group's edge and shade, so the selected row
+  reads as picked out rather than hovered, in both modes. It keeps the row's own radius, and
+  hover and press fills still paint over it.
+- **Fields:** `matte-well` with a 1px `line-field` outline and the standard 3px focus ring.
+- **Floating panels:** every menu, popover, select list, hover card and drawer uses
+  `matte-float`; dialogs use `matte-float-modal`.
+- **Chat header on phones:** a chat shows its title and, under it, its working directory
+  centred between the menu key and the context gauge, on the top fade. The directory is the
+  folder's name (the full path is its title) and tapping it opens the directory picker, which
+  on a phone is a drawer. A new chat has no header yet: it offers "Set working directory" in
+  the + menu instead, and no chip sits under the form on a phone. The header steps aside with
+  the corner keys while the expanded chat form covers the screen.
+- **Dialogs on phones:** below `md` every dialog is full screen, whatever size it takes on a
+  desktop. The shared `Dialog.Content` does this, so a dialog sets only its desktop size and
+  never its own phone size. Its top and bottom borders take the height of the status bar and
+  the home indicator, transparent, so the content keeps clear of both with no change to its
+  padding (see Safe areas). A dialog that draws its own full-screen content instead, like the
+  attachment preview, keeps clear with `pt-safe`, `pb-safe` and `top-safe-N` itself. Alerts
+  (`AlertDialog`: confirmations, renames, errors) are the exception: a short question with a
+  button or two, they stay small and centred on a phone too. A place the sidebar opens, like
+  Settings, MCP Servers or Servers, is no dialog on a phone at all but a page at its own route
+  (`#/settings`, `#/mcp-servers`, `#/servers`), with the menu key and a title like any phone page; a
+  desktop or tablet keeps it a dialog over the page it was opened from.
+- **Glass keys:** a round key that floats over the page and lets it show through, like the
+  menu and context gauge keys at a phone's top corners and the key back to a chat's bottom, is
+  a `GlassKey` (`GLASS_KEY_CLASS`): white glass (`surface-glass`), a faint `line-default`
+  hairline, and `matte-key`'s blur and saturation with its small shadow, so what scrolls under
+  it softens instead of showing sharp behind the icon. 40px at the corners, 36px over the
+  page; its icon is a 2px-stroke glyph in `fg-default` on the 24px icon grid, the context
+  gauge's dial drawn the same way. Don't rebuild one from a ghost `Button` plus classes: the
+  button's own blur overrides `matte-key`'s.
+- **A page's main action on phones:** below `md` the action that adds to a page, like New
+  project or New prompt, leaves the page's header for a `FloatingActionButton`: a round 56px
+  `default` (primary) key with a large shadow and only a `+` icon, pinned in the bottom-right
+  corner 1.75rem from both edges (`--corner-control-side`, `--corner-control-bottom`; in the
+  installed app beside the home indicator rather than above it, see Safe areas), where the
+  thumb rests. It is portalled to the body, so its place on screen never depends on the page's
+  box, and slides with the page when the sidebar opens, by the same offset and ease
+  (`--sidebar-reveal-x`), taking no taps while the page is aside. The page keeps room under its
+  last row (`max-md:pb-safe-24`) so the key never covers it. One per page, only for its main
+  action; from `md` up the action stays a button in the header.
+- **Copy feedback:** a copy action turns its icon into a `fg-success` check for 1.5s
+  (`COPY_FEEDBACK_RESET_MS`), only when the copy succeeded, then back. The icon pops in with a
+  150ms fade and scale, skipped on first render and with reduced motion.
+- **Tooltips:** the inverse of the page, the primary colour with a faint inner rim.
+- **Status:** server, model and MCP connection states use the status lamps, never coloured
+  text alone.
+
+## Do's and Don'ts
+
+- Do keep fills flat. Gradients, if any, must be barely perceptible; a visible gradient
+  makes the UI look like a 2000s interface.
+- Do keep edges faint. At rest a hairline should blend in; on focus it should be noticeable
+  but never strong.
+- Do keep the shadow the same on focus. Focus is shown by the edge and the focus ring, not by
+  lifting the surface.
+- Do use the status colours only for status. Buttons keep their neutral colours, and the
+  submit button stays black in light mode and white in dark mode.
+- Do read component tokens in components, semantic tokens in shared styles, and primitives
+  only in semantic tokens.
+- Do add a new colour as a primitive first, then give it a semantic name before any
+  component uses it.
+- Do give motion a job: show where something went or what changed, like a selection sliding
+  to its new place. A barely visible stretch along a move, or a settle past the target by a
+  pixel or two, can make that feel physical; keep it under about 5% and 300ms, and drop it
+  entirely with reduced motion. Never let a bounce carry something past the edge of its
+  container, such as a tab indicator past its track; there, slide without one. If you notice
+  the effect itself rather than the change it shows, it is too much.
+- Do reach for the surface utility that matches the component instead of adding raw
+  `shadow-*`, `border-*` and `backdrop-blur-*` combinations.
+- Don't use Tailwind's palette classes (`text-amber-500`, `bg-green-500/10`) for meaning in
+  new code; use the semantic tokens. Some older components still do and are being moved over.
+- Don't introduce new accent hues (such as a blue submit button) without a design decision.
+- Don't put white rims or highlights on large ambient containers such as the sidebar.
+- Don't animate for decoration: no motion on things that did not change, no bounces on
+  entrances, and nothing that delays the user.
+- Don't stack two glass surfaces with blur directly on top of each other.
+- Don't give a dialog its own size on a phone: every dialog is full screen there. Only alerts
+  stay small and centred.
+- Don't put more than one floating key on a phone page, or use one for anything but the
+  page's main action.
+- Don't lift a bottom corner action above the home indicator's inset in the installed app,
+  or give it a different gap from the bottom than from the side: the corners beside the
+  indicator are free, and `--corner-control-bottom` and `--corner-control-side` keep the two
+  gaps equal.
diff --git a/ui/apps/chat/README.md b/ui/apps/chat/README.md
index d8849892e..1e3bf68f3 100644
--- a/ui/apps/chat/README.md
+++ b/ui/apps/chat/README.md
@@ -339,7 +339,7 @@ flowchart TB

 #### Components (`src/lib/components/`)

-Components are organized in `app/` (application-specific) and `ui/` (shadcn-svelte primitives).
+Application components live in `app/`. The base components (the shadcn-svelte primitives: button, dialog, tooltip…), the design tokens, the fonts and the surfaces are Llama UI's, in [`ui/lib/ui`](../../lib/ui/README.md): the app imports them as `@ggml-org/llama-ui/ui/<name>` and compiles them from source as part of its own build, with no install or build of the library (see `scripts/llama-ui.js`).

 **Chat Components** (`app/chat/`):

@@ -688,14 +688,14 @@ llama-server serves the UI with `Cross-Origin-Embedder-Policy: require-corp` and

 The sidebar stacks four surfaces, outermost first:

-| Layer | Example                            | Corners                            |
-| ----- | ---------------------------------- | ---------------------------------- |
-| Page  | the body background                | none                               |
-| Panel | the sidebar                        | `rounded-2xl`                      |
-| Group | the sidebar's footer, inset in it  | `rounded-(--surface-group-radius)` |
-| Row   | Models, MCP or Settings in a group | `rounded-(--surface-row-radius)`   |
+| Layer | Example                            | Corners                          |
+| ----- | ---------------------------------- | -------------------------------- |
+| Page  | the body background                | none                             |
+| Panel | the sidebar                        | `rounded-2xl`                    |
+| Group | the sidebar's footer, inset in it  | `inset-group-surface`            |
+| Row   | Models, MCP or Settings in a group | `rounded-(--surface-row-radius)` |

-A row keeps its corners concentric with its group's: its radius is the group's less the padding between their edges, so the curves run parallel instead of pinching at the corners. `app.css` holds the three tokens (`--surface-group-radius`, `--surface-group-padding` and the derived `--surface-row-radius`); change the group's radius or padding there and the rows follow. A group pads its rows with `p-(--surface-group-padding)`. `SidebarNavigationActions` rounds every row from the token, so the actions at the top of the sidebar (New chat, Search) match the footer's rows; a phone sizes its rows for a thumb instead. A selected row is raised and edged (`bg-background`, `shadow-sm`, `ring-1`), where a hovered one is only tinted, so the two never look alike. The group's hairline border is left out of the sum. `tests/client/nested-surfaces.svelte.test.ts` checks the rule on the rendered footer.
+A row keeps its corners concentric with its group's: its radius is the group's less the padding between their edges, so the curves run parallel instead of pinching at the corners. `app.css` holds the three tokens (`--surface-group-radius`, which follows the design system's `--inset-group-radius`, `--surface-group-padding` and the derived `--surface-row-radius`); change the group's radius or padding and the rows follow. A group pads its rows with `p-(--surface-group-padding)`. `SidebarNavigationActions` rounds every row from the token, so the actions at the top of the sidebar (New chat, Search) match the footer's rows; a phone sizes its rows for a thumb instead. A selected row takes `selected-row-surface`, the group's edge and shade around a tint, where a hovered one is only tinted, so the two never look alike. The group's hairline border is left out of the sum. `tests/client/nested-surfaces.svelte.test.ts` checks the rule on the rendered footer.

 ---

@@ -748,7 +748,7 @@ npm run check         # TypeScript type checking
 ui/apps/chat/
 ├── src/
 │   ├── lib/
-│   │   ├── components/   # UI components (app/, ui/)
+│   │   ├── components/   # Application components (base ones come from ui/lib/ui)
 │   │   ├── hooks/        # Svelte hooks
 │   │   ├── stores/       # State management
 │   │   ├── services/     # API and database services
diff --git a/ui/apps/chat/package-lock.json b/ui/apps/chat/package-lock.json
index 6a2d2f958..44b5ffa32 100644
--- a/ui/apps/chat/package-lock.json
+++ b/ui/apps/chat/package-lock.json
@@ -16,6 +16,7 @@
 				"@codemirror/view": "6.43.15",
 				"@eslint/compat": "2.1.1",
 				"@eslint/js": "10.0.1",
+				"@ggml-org/llama-brand": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
 				"@internationalized/date": "3.12.2",
 				"@lezer/highlight": "1.2.5",
 				"@lucide/svelte": "1.46.0",
@@ -54,7 +55,6 @@
 				"globals": "16.5.0",
 				"highlight.js": "11.11.1",
 				"http-server": "14.1.1",
-				"llama-brand": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
 				"mdsvex": "0.12.7",
 				"mermaid": "11.17.2",
 				"mode-watcher": "1.1.0",
@@ -1097,6 +1097,13 @@
 			"dev": true,
 			"license": "MIT"
 		},
+		"node_modules/@ggml-org/llama-brand": {
+			"version": "0.1.0",
+			"resolved": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
+			"integrity": "sha512-kRDXUIUdfcDt7w4hh3JrFTpqxf2i7R0PHVLGnwUdr4L8EMqE32mEECoXUz1uoUlFaQ+h6QaVHvJWS5y98AoaYA==",
+			"dev": true,
+			"license": "CC-BY-NC-4.0"
+		},
 		"node_modules/@hono/node-server": {
 			"version": "2.1.6",
 			"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.6.tgz",
@@ -9159,13 +9166,6 @@
 				"node": ">=10"
 			}
 		},
-		"node_modules/llama-brand": {
-			"version": "0.1.0",
-			"resolved": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
-			"integrity": "sha512-kRDXUIUdfcDt7w4hh3JrFTpqxf2i7R0PHVLGnwUdr4L8EMqE32mEECoXUz1uoUlFaQ+h6QaVHvJWS5y98AoaYA==",
-			"dev": true,
-			"license": "CC-BY-NC-4.0"
-		},
 		"node_modules/locate-character": {
 			"version": "3.0.0",
 			"resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
diff --git a/ui/apps/chat/package.json b/ui/apps/chat/package.json
index af7d451f5..ae3455084 100644
--- a/ui/apps/chat/package.json
+++ b/ui/apps/chat/package.json
@@ -79,7 +79,7 @@
 		"globals": "16.5.0",
 		"highlight.js": "11.11.1",
 		"http-server": "14.1.1",
-		"llama-brand": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
+		"@ggml-org/llama-brand": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
 		"mdsvex": "0.12.7",
 		"mermaid": "11.17.2",
 		"mode-watcher": "1.1.0",
diff --git a/ui/apps/chat/scripts/brand-favicons.ts b/ui/apps/chat/scripts/brand-favicons.ts
index 87a058516..4a15cd1b0 100644
--- a/ui/apps/chat/scripts/brand-favicons.ts
+++ b/ui/apps/chat/scripts/brand-favicons.ts
@@ -10,8 +10,8 @@ const require = createRequire(import.meta.url);

 /** The web favicons llama-brand draws for the UI, optically centred, keyed by the file they become. */
 export const BRAND_FAVICONS = {
-	[FAVICON_PATHS.SVG_DARK]: 'llama-brand/logo/svg/app/web/favicon-dark.svg',
-	[FAVICON_PATHS.SVG_LIGHT]: 'llama-brand/logo/svg/app/web/favicon.svg'
+	[FAVICON_PATHS.SVG_DARK]: '@ggml-org/llama-brand/logo/svg/app/web/favicon-dark.svg',
+	[FAVICON_PATHS.SVG_LIGHT]: '@ggml-org/llama-brand/logo/svg/app/web/favicon.svg'
 } as const;

 /**
diff --git a/ui/apps/chat/scripts/llama-ui.js b/ui/apps/chat/scripts/llama-ui.js
new file mode 100644
index 000000000..c4eb26af7
--- /dev/null
+++ b/ui/apps/chat/scripts/llama-ui.js
@@ -0,0 +1,76 @@
+import { readFileSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
+
+/**
+ * Llama UI (@ggml-org/llama-ui, in ui/lib/ui) has no build step in the repo: this app compiles it
+ * from source. vite.config.ts (through vite-plugin-llama-ui.ts) and tsconfig.json share what that
+ * takes; tests/unit/llama-ui-tsconfig-paths.test.ts checks that tsconfig.json's paths match:
+ *
+ * - LLAMA_UI_EXPORTS maps the entry points of the package to their sources, as the exports of
+ *   its package.json map them to its build, so an import reads the same either way.
+ * - LLAMA_UI_DEPENDENCIES lists what those sources import. They sit outside this folder, so
+ *   walking up from them would not find this app's node_modules, and would find a second copy
+ *   of Svelte if ui/lib/ui has its own install. Both configs resolve these names from this
+ *   app's node_modules instead.
+ */
+// with forward slashes on every platform, as Vite writes the paths of the modules it handles
+const root = fileURLToPath(new URL('../../../lib/ui/', import.meta.url)).replace(/\\/g, '/');
+const packageJson = JSON.parse(readFileSync(`${root}package.json`, 'utf8'));
+const source = `${root}src/lib`;
+/** [import specifier, source path]; `*` stands for one path segment or more. */
+const LLAMA_UI_EXPORTS = [
+	['@ggml-org/llama-ui/ui/*', `${source}/components/ui/*/index.ts`],
+	['@ggml-org/llama-ui/app/*', `${source}/components/app/*/index.ts`],
+	['@ggml-org/llama-ui/models', `${source}/components/models/index.ts`],
+	['@ggml-org/llama-ui/constants', `${source}/constants/index.ts`],
+	['@ggml-org/llama-ui/enums', `${source}/enums/index.ts`],
+	['@ggml-org/llama-ui/code', `${source}/utils/index.ts`],
+	['@ggml-org/llama-ui/utils', `${source}/components/ui/utils.ts`],
+	['@ggml-org/llama-ui/styles/*', `${source}/styles/*`],
+	['@ggml-org/llama-ui/theme.css', `${source}/styles/theme.css`],
+	['@ggml-org/llama-ui/tokens.css', `${source}/styles/tokens.css`],
+	['@ggml-org/llama-ui/fonts.css', `${source}/styles/fonts.css`],
+	['@ggml-org/llama-ui/surfaces.css', `${source}/styles/surfaces.css`],
+	['@ggml-org/llama-ui', `${source}/index.ts`]
+];
+
+/** The folder of the library, ending in a slash. */
+export const LLAMA_UI_ROOT = root;
+
+/** The packages the library's sources import: its dependencies and peer dependencies. */
+export const LLAMA_UI_DEPENDENCIES = Object.keys({
+	...packageJson.dependencies,
+	...packageJson.peerDependencies
+}).sort();
+
+/** The entry points as Vite aliases. */
+export const LLAMA_UI_ALIASES = LLAMA_UI_EXPORTS.map(([specifier, path]) => ({
+	find: new RegExp(`^${specifier.replace(/[.]/g, '\\.').replace('*', '(.+)')}$`),
+	replacement: path.replace('*', '$1')
+}));
+
+/**
+ * The entry points and the dependencies as TypeScript paths.
+ * @param {string} nodeModules this app's node_modules, as the tsconfig that takes the paths sees it
+ */
+export function llamaUiPaths(nodeModules) {
+	/** @type {Record<string, string[]>} */
+	const paths = {};
+
+	for (const [specifier, path] of LLAMA_UI_EXPORTS) paths[specifier] = [path];
+
+	for (const name of LLAMA_UI_DEPENDENCIES) {
+		paths[name] = [`${nodeModules}/${name}`];
+		paths[`${name}/*`] = [`${nodeModules}/${name}/*`];
+	}
+
+	// Svelte declares the subpaths with no file of their own (svelte/reactivity, svelte/attachments) in
+	// types/index.d.ts, which only its package exports point at; without this fallback, a library source
+	// that imports one would get its types from a second copy of Svelte in ui/lib/ui/node_modules
+	paths['svelte/*'] = [`${nodeModules}/svelte/*`, `${nodeModules}/svelte/types/index.d.ts`];
+
+	// the icons sit behind lucide's package exports, which a path mapping does not read
+	paths['@lucide/svelte/icons/*'] = [`${nodeModules}/@lucide/svelte/dist/icons/*`];
+
+	return paths;
+}
diff --git a/ui/apps/chat/scripts/vite-plugin-llama-ui.ts b/ui/apps/chat/scripts/vite-plugin-llama-ui.ts
new file mode 100644
index 000000000..f7c86cb32
--- /dev/null
+++ b/ui/apps/chat/scripts/vite-plugin-llama-ui.ts
@@ -0,0 +1,53 @@
+import { LLAMA_UI_ALIASES, LLAMA_UI_DEPENDENCIES, LLAMA_UI_ROOT } from './llama-ui.js';
+import { fileURLToPath } from 'node:url';
+import { type Plugin, transformWithOxc } from 'vite';
+
+const TYPESCRIPT_FILE = /\.ts$/;
+// what the library's sources need of a tsconfig: imports and exports stay as written
+const TSCONFIG = { compilerOptions: { verbatimModuleSyntax: true } };
+// the app's tsconfig.json, for every module and for the dependency scan alike
+const APP_TSCONFIG = fileURLToPath(new URL('../tsconfig.json', import.meta.url));
+const LIBRARY_FILE = new RegExp(`^${LLAMA_UI_ROOT.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`);
+
+/**
+ * Compiles Llama UI (@ggml-org/llama-ui, in ui/lib/ui) from its source as part of this app, with
+ * no install or build of the library itself (see ./llama-ui.js for the why):
+ *
+ * - its entry points resolve to their sources,
+ * - what those sources import resolves from this app's node_modules,
+ * - the dev server may serve them,
+ * - their TypeScript is stripped here, and the app's tsconfig.json applies to them. Vite would
+ *   read the tsconfig.json nearest to each file, and the library's extends one that only exists
+ *   once the library is installed.
+ */
+export function llamaUiPlugin(): Plugin {
+	return {
+		config() {
+			return {
+				// the scan looks for each file's nearest tsconfig on its own, see `tsconfig` below
+				optimizeDeps: { rolldownOptions: { tsconfig: APP_TSCONFIG } },
+				oxc: { exclude: [/\.js$/, LIBRARY_FILE] },
+				resolve: { alias: LLAMA_UI_ALIASES, dedupe: LLAMA_UI_DEPENDENCIES },
+				server: { fs: { allow: [LLAMA_UI_ROOT] } },
+				// one tsconfig for every module, instead of the nearest one, which for the library's
+				// sources extends a config only its own install has
+				tsconfig: APP_TSCONFIG
+			};
+		},
+		enforce: 'pre',
+		name: 'llama-ui',
+		async transform(code, id) {
+			const file = id.split('?')[0];
+
+			if (!LIBRARY_FILE.test(file) || !TYPESCRIPT_FILE.test(file)) return;
+
+			const result = await transformWithOxc(code, file, {
+				lang: 'ts',
+				sourcemap: true,
+				tsconfig: TSCONFIG
+			});
+
+			return { code: result.code, map: result.map };
+		}
+	};
+}
diff --git a/ui/apps/chat/sources.cmake b/ui/apps/chat/sources.cmake
index afabc19a6..7e506c0ec 100644
--- a/ui/apps/chat/sources.cmake
+++ b/ui/apps/chat/sources.cmake
@@ -3,6 +3,8 @@
 set(UI_SOURCE_GLOBS
     src/*
     static/*
+    # Llama UI, which the app compiles from source
+    ../../lib/ui/src/lib/*
 )

 set(UI_SOURCE_FILES
@@ -11,5 +13,8 @@ set(UI_SOURCE_FILES
     src/.gitignore
     vite.config.ts
     tsconfig.json
+    scripts/llama-ui.js
+    scripts/vite-plugin-llama-ui.ts
+    ../../lib/ui/package.json
     scripts/vite-plugin-llama-cpp-build.ts
 )
diff --git a/ui/apps/chat/src/app.css b/ui/apps/chat/src/app.css
index 7a92c0ba0..9b7d1aeb6 100644
--- a/ui/apps/chat/src/app.css
+++ b/ui/apps/chat/src/app.css
@@ -5,39 +5,15 @@
 @plugin '@tailwindcss/forms';
 @plugin '@tailwindcss/typography';
 @import 'tw-animate-css';
+/* the brand's colours, which Llama UI's primitives build on */
+@import '@ggml-org/llama-brand/css/colors.css';
+/* Llama UI's theme (ui/lib/ui): fonts, tokens, surfaces, the shadcn names and the base styles
+   its components read. By path rather than as @ggml-org/llama-ui/theme.css: prettier's Tailwind
+   plugin reads this file too, and it knows no aliases */
+@import '../../../lib/ui/src/lib/styles/theme.css';
 @import './lib/styles/safe-area.css';

-@custom-variant dark (&:is(.dark *));
-
-/* shadcn components key their orientation styles off these, toggle-group among them */
-@custom-variant data-horizontal (&[data-orientation='horizontal']);
-@custom-variant data-vertical (&[data-orientation='vertical']);
-
-/*
- * Tailwind v4 dropped the pointer cursor from buttons. Every control a user can
- * press gets it back, and anything disabled keeps the cursor its own class asks for.
- */
-@layer base {
-	button:not(:disabled),
-	[role='button']:not([data-disabled]),
-	[role='checkbox']:not([data-disabled]),
-	[role='combobox']:not([data-disabled]),
-	[role='menuitem']:not([data-disabled]),
-	[role='menuitemcheckbox']:not([data-disabled]),
-	[role='menuitemradio']:not([data-disabled]),
-	[role='option']:not([data-disabled]),
-	[role='radio']:not([data-disabled]),
-	[role='switch']:not([data-disabled]),
-	[role='tab']:not([data-disabled]),
-	label[for],
-	select,
-	summary {
-		cursor: pointer;
-	}
-}
-
 :root {
-	--radius: 0.625rem;
 	/* the page runs under the status bar and over the home indicator
 	   (viewport-fit=cover); what is pinned to a screen edge keeps clear of them
 	   with the pt-safe / pb-safe utilities (see lib/styles/safe-area.css) */
@@ -49,39 +25,6 @@
 	--page-top: calc(var(--corner-control-top) + 3.75rem);
 	/* expanded desktop sidebar width, overridden once the user drags its edge */
 	--sidebar-width: 18rem;
-	--background: oklch(1 0 0);
-	--foreground: oklch(0.145 0 0);
-	--card: oklch(1 0 0);
-	--card-foreground: oklch(0.145 0 0);
-	--popover: oklch(1 0 0);
-	--popover-foreground: oklch(0.145 0 0);
-	--primary: oklch(0.205 0 0);
-	--primary-foreground: oklch(0.985 0 0);
-	--secondary: oklch(0.95 0 0);
-	--secondary-foreground: oklch(0.205 0 0);
-	--muted: oklch(0.97 0 0);
-	--muted-foreground: oklch(0.556 0 0);
-	--accent: oklch(0.95 0 0);
-	--accent-foreground: oklch(0.205 0 0);
-	--destructive: oklch(0.577 0.245 27.325);
-	--border: oklch(0.875 0 0);
-	--input: oklch(0.92 0 0);
-	--ring: oklch(0.708 0 0);
-	--chart-1: oklch(0.646 0.222 41.116);
-	--chart-2: oklch(0.6 0.118 184.704);
-	--chart-3: oklch(0.398 0.07 227.392);
-	--chart-4: oklch(0.828 0.189 84.429);
-	--chart-5: oklch(0.769 0.188 70.08);
-	--sidebar: oklch(0.985 0 0);
-	--sidebar-foreground: oklch(0.145 0 0);
-	--sidebar-primary: oklch(0.205 0 0);
-	--sidebar-primary-foreground: oklch(0.985 0 0);
-	--sidebar-accent: oklch(0.97 0 0);
-	--sidebar-accent-foreground: oklch(0.205 0 0);
-	--sidebar-border: oklch(0.922 0 0);
-	--sidebar-ring: oklch(0.708 0 0);
-	--code-background: oklch(0.985 0 0);
-	--code-foreground: oklch(0.145 0 0);
 	/* phone sidebar width, which the page slides aside to reveal */
 	--sidebar-reveal: min(80dvw, 20rem);
 	/* the desktop sidebar's muted/60 over the page, made opaque so the slid page's corners can match it */
@@ -96,9 +39,6 @@
 		var(--sidebar-reveal-tint) calc(var(--sidebar-reveal-progress) * 100%),
 		var(--background)
 	);
-	--font-mono:
-		ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
-		'Liberation Mono', Menlo, monospace;
 	--layer-popover: 1000000;

 	--chat-form-area-height: 8rem;
@@ -110,7 +50,7 @@
 	   group's: its radius is the group's less the padding between their edges. The sidebar's
 	   actions above the footer share the row radius, so every action row rounds alike. See "Nested
 	   surfaces" in the README; tests/client/nested-surfaces.svelte.test.ts holds the rule */
-	--surface-group-radius: 1rem;
+	--surface-group-radius: var(--inset-group-radius);
 	--surface-group-padding: 0.25rem;
 	--surface-row-radius: calc(var(--surface-group-radius) - var(--surface-group-padding));

@@ -150,86 +90,12 @@

 .dark {
 	--chat-form-sheet-fill: color-mix(in oklab, var(--muted) 75%, var(--background));
-	--background: oklch(0.16 0 0);
-	--foreground: oklch(0.985 0 0);
-	--card: oklch(0.205 0 0);
-	--card-foreground: oklch(0.985 0 0);
-	--popover: oklch(0.205 0 0);
-	--popover-foreground: oklch(0.985 0 0);
-	--primary: oklch(0.922 0 0);
-	--primary-foreground: oklch(0.205 0 0);
-	--secondary: oklch(0.29 0 0);
-	--secondary-foreground: oklch(0.985 0 0);
-	--muted: oklch(0.269 0 0);
-	--muted-foreground: oklch(0.708 0 0);
-	--accent: oklch(0.269 0 0);
-	--accent-foreground: oklch(0.985 0 0);
-	--destructive: oklch(0.704 0.191 22.216);
-	--border: oklch(1 0 0 / 30%);
-	--input: oklch(1 0 0 / 30%);
-	--ring: oklch(0.556 0 0);
-	--chart-1: oklch(0.488 0.243 264.376);
-	--chart-2: oklch(0.696 0.17 162.48);
-	--chart-3: oklch(0.769 0.188 70.08);
-	--chart-4: oklch(0.627 0.265 303.9);
-	--chart-5: oklch(0.645 0.246 16.439);
-	--sidebar: oklch(0.2 0 0);
-	--sidebar-foreground: oklch(0.985 0 0);
-	--sidebar-primary: oklch(0.488 0.243 264.376);
-	--sidebar-primary-foreground: oklch(0.985 0 0);
-	--sidebar-accent: oklch(0.269 0 0);
-	--sidebar-accent-foreground: oklch(0.985 0 0);
-	--sidebar-border: oklch(1 0 0 / 10%);
-	--sidebar-ring: oklch(0.556 0 0);
-	--code-background: oklch(0.225 0 0);
-	--code-foreground: oklch(0.875 0 0);
-}
-
-@theme inline {
-	--radius-sm: calc(var(--radius) - 4px);
-	--radius-md: calc(var(--radius) - 2px);
-	--radius-lg: var(--radius);
-	--radius-xl: calc(var(--radius) + 4px);
-	--color-background: var(--background);
-	--color-foreground: var(--foreground);
-	--color-card: var(--card);
-	--color-card-foreground: var(--card-foreground);
-	--color-popover: var(--popover);
-	--color-popover-foreground: var(--popover-foreground);
-	--color-primary: var(--primary);
-	--color-primary-foreground: var(--primary-foreground);
-	--color-secondary: var(--secondary);
-	--color-secondary-foreground: var(--secondary-foreground);
-	--color-muted: var(--muted);
-	--color-muted-foreground: var(--muted-foreground);
-	--color-accent: var(--accent);
-	--color-accent-foreground: var(--accent-foreground);
-	--color-destructive: var(--destructive);
-	--color-border: var(--border);
-	--color-input: var(--input);
-	--color-ring: var(--ring);
-	--color-chart-1: var(--chart-1);
-	--color-chart-2: var(--chart-2);
-	--color-chart-3: var(--chart-3);
-	--color-chart-4: var(--chart-4);
-	--color-chart-5: var(--chart-5);
-	--color-sidebar: var(--sidebar);
-	--color-sidebar-foreground: var(--sidebar-foreground);
-	--color-sidebar-primary: var(--sidebar-primary);
-	--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
-	--color-sidebar-accent: var(--sidebar-accent);
-	--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
-	--color-sidebar-border: var(--sidebar-border);
-	--color-sidebar-ring: var(--sidebar-ring);
 }

 @layer base {
-	* {
-		@apply border-border outline-ring/50;
-	}
-
+	/* over the theme's page background: it blends into the sidebar tint as the phone sidebar opens */
 	body {
-		@apply bg-(--sidebar-reveal-bg) text-foreground antialiased;
+		@apply bg-(--sidebar-reveal-bg);
 		scrollbar-width: thin;
 		scrollbar-gutter: stable;
 	}
@@ -292,7 +158,7 @@
 	}

 	*:hover {
-		scrollbar-color: color-mix(in oklch, var(--muted-foreground) 30%, transparent) transparent;
+		scrollbar-color: color-mix(in oklch, var(--fg-muted) 30%, transparent) transparent;
 	}

 	*::-webkit-scrollbar {
@@ -311,15 +177,11 @@
 	}

 	*:hover::-webkit-scrollbar-thumb {
-		background: color-mix(in oklch, var(--muted-foreground) 30%, transparent);
+		background: color-mix(in oklch, var(--fg-muted) 30%, transparent);
 	}

 	*::-webkit-scrollbar-thumb:hover {
-		background: color-mix(in oklch, var(--muted-foreground) 50%, transparent);
-	}
-
-	:where(code, pre, kbd, samp) {
-		font-family: var(--font-mono);
+		background: color-mix(in oklch, var(--fg-muted) 50%, transparent);
 	}
 }

diff --git a/ui/apps/chat/src/lib/components/app/actions/ActionIconCopyToClipboard.svelte b/ui/apps/chat/src/lib/components/app/actions/ActionIconCopyToClipboard.svelte
index b5cceb336..6edd21db1 100644
--- a/ui/apps/chat/src/lib/components/app/actions/ActionIconCopyToClipboard.svelte
+++ b/ui/apps/chat/src/lib/components/app/actions/ActionIconCopyToClipboard.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
-	import ActionIcon from './ActionIcon.svelte';
-	import { Copy } from '@lucide/svelte';
-	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
+	import { ActionIcon } from '@ggml-org/llama-ui/app/actions';
+	import { Check, Copy } from '@lucide/svelte';
+	import { COPY_FEEDBACK_RESET_MS, ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { copyToClipboard } from '#lib/utils/index.ts';

 	interface Props {
@@ -11,12 +11,39 @@
 	}

 	let { ariaLabel = 'Copy to clipboard', canCopy = true, text }: Props = $props();
+
+	// after a copy the icon turns into a green check for a moment, then back
+	let isCopied = $state(false);
+	// the swap pops in only after the first copy, never on the initial render
+	let hasSwapped = $state(false);
+	let resetTimer: ReturnType<typeof setTimeout> | undefined;
+
+	let iconClass = $derived(
+		[
+			ICON_CLASS_DEFAULT,
+			isCopied && 'text-fg-success',
+			hasSwapped && 'animate-in fade-in zoom-in-75 duration-150 motion-reduce:animate-none'
+		]
+			.filter(Boolean)
+			.join(' ')
+	);
+
+	async function copy() {
+		if (!canCopy || !(await copyToClipboard(text))) return;
+
+		clearTimeout(resetTimer);
+		isCopied = true;
+		hasSwapped = true;
+		resetTimer = setTimeout(() => (isCopied = false), COPY_FEEDBACK_RESET_MS);
+	}
+
+	$effect(() => () => clearTimeout(resetTimer));
 </script>

 <ActionIcon
 	disabled={!canCopy}
-	icon={Copy}
-	iconSize={ICON_CLASS_DEFAULT}
-	onclick={() => canCopy && copyToClipboard(text)}
+	icon={isCopied ? Check : Copy}
+	iconSize={iconClass}
+	onclick={copy}
 	tooltip={ariaLabel}
 />
diff --git a/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte b/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte
index 93a4079f3..d4a307799 100644
--- a/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte
+++ b/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte
@@ -1,5 +1,6 @@
 <script lang="ts">
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
+	import { GLASS_KEY_CLASS } from '#lib/constants/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';
 	import type { Component, Snippet } from 'svelte';
 	import type { HTMLButtonAttributes } from 'svelte/elements';
@@ -33,11 +34,7 @@
 		{...props}
 		{...rest}
 		aria-label={label}
-		class={[
-			'inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/20 bg-muted/60 text-accent-foreground shadow-sm backdrop-blur-sm transition-colors hover:bg-muted',
-			size === 'md' ? 'size-10' : 'size-9',
-			className
-		]}
+		class={[GLASS_KEY_CLASS, size === 'md' ? 'size-10' : 'size-9', className]}
 		type="button"
 	>
 		{#if Icon}
@@ -48,7 +45,7 @@
 	</button>
 {/snippet}

-<!-- a round key over the page: the menu and context gauge keys at a phone's top corners, and the
+<!-- a round matte glass key: the menu and context gauge keys at a phone's top corners, and the
      key back to the bottom of a chat -->
 {#if tooltip && !deviceStore.isMobile}
 	<Tooltip.Root>
diff --git a/ui/apps/chat/src/lib/components/app/actions/index.ts b/ui/apps/chat/src/lib/components/app/actions/index.ts
index 73ab76913..8b0279d06 100644
--- a/ui/apps/chat/src/lib/components/app/actions/index.ts
+++ b/ui/apps/chat/src/lib/components/app/actions/index.ts
@@ -7,7 +7,7 @@
  */

 /** Styled icon button for action triggers with tooltip. */
-export { default as ActionIcon } from './ActionIcon.svelte';
+export { ActionIcon } from '@ggml-org/llama-ui/app/actions';

 /** Copy-to-clipboard icon button with clipboard logic. */
 export { default as ActionIconCopyToClipboard } from './ActionIconCopyToClipboard.svelte';
diff --git a/ui/apps/chat/src/lib/components/app/badges/BadgesModality.svelte b/ui/apps/chat/src/lib/components/app/badges/BadgesModality.svelte
index 113185634..7c921732d 100644
--- a/ui/apps/chat/src/lib/components/app/badges/BadgesModality.svelte
+++ b/ui/apps/chat/src/lib/components/app/badges/BadgesModality.svelte
@@ -22,7 +22,7 @@
 			className
 		]}
 	>
-		<ModalityIcon class="h-3 w-3" />
+		<ModalityIcon class="size-icon-xs" />

 		{MODALITY_LABELS[modality]}
 	</span>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpResource.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpResource.svelte
index 40a16bc4b..6fb3c294f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpResource.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemMcpResource.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { AlertCircle, Loader2 } from '@lucide/svelte';
 	import { X } from '@lucide/svelte';
 	import { ActionIcon } from '#lib/components/app/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
 	import type { MCPResourceAttachment } from '#lib/types/index.ts';
 	import { getResourceDisplayName, getResourceIcon } from '#lib/utils/index.ts';
@@ -23,7 +23,7 @@
 	const favicon = $derived(mcpStore.getServerFavicon(attachment.resource.serverName));

 	function getStatusClass(attachment: MCPResourceAttachment): string {
-		if (attachment.error) return 'border-red-500/50 bg-red-500/10';
+		if (attachment.error) return 'border-line-danger-soft bg-surface-danger';

 		if (attachment.loading) return 'border-border/50 bg-muted/30';

@@ -45,11 +45,11 @@
 			type="button"
 		>
 			{#if attachment.loading}
-				<Loader2 class="h-3 w-3 animate-spin text-muted-foreground" />
+				<Loader2 class="size-icon-xs animate-spin text-muted-foreground" />
 			{:else if attachment.error}
-				<AlertCircle class="h-3 w-3 text-red-500" />
+				<AlertCircle class="size-icon-xs text-fg-danger" />
 			{:else}
-				<ResourceIcon class="h-3 w-3 text-muted-foreground" />
+				<ResourceIcon class="size-icon-xs text-muted-foreground" />
 			{/if}

 			<span class="max-w-[150px] truncate text-xs">
@@ -60,7 +60,7 @@
 				<ActionIcon
 					class="-my-2 -mr-1.5 bg-transparent"
 					icon={X}
-					iconSize="h-2 w-2"
+					iconSize="size-icon-md"
 					onclick={() => onRemove?.(attachment.id)}
 					stopPropagationOnClick
 					tooltip="Remove"
@@ -74,7 +74,7 @@
 			{#if favicon}
 				<img
 					alt={attachment.resource.serverName}
-					class="h-3 w-3 shrink-0 rounded-sm"
+					class="size-3 shrink-0 rounded-sm"
 					onerror={(e) => {
 						(e.currentTarget as HTMLImageElement).style.display = 'none';
 					}}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailFile.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailFile.svelte
index 64c28ccb4..2725104c6 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailFile.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailFile.svelte
@@ -107,7 +107,7 @@

 {#snippet fileIcon()}
 	<div
-		class="flex h-8 w-8 items-center justify-center rounded bg-primary/10 text-xs font-medium text-primary"
+		class="flex size-8 items-center justify-center rounded bg-primary/10 text-xs font-medium text-primary"
 	>
 		{#if isAudio}
 			<Music class="{ICON_CLASS_DEFAULT} text-white/70" />
@@ -129,7 +129,7 @@
 	<button
 		aria-label={readonly ? `Preview ${name}` : undefined}
 		class="rounded-lg border border-border bg-muted p-3 {className} cursor-pointer {readonly
-			? 'w-full max-w-2xl transition-shadow hover:shadow-md'
+			? 'w-full max-w-2xl transition-shadow hover:shadow-(--elevation-surface)'
 			: `group relative text-left ${textContent ? 'max-h-24 max-w-72' : 'max-w-36'}`} overflow-hidden"
 		{onclick}
 		type="button"
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailImage.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailImage.svelte
index 13f13f2ee..be9951f37 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailImage.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItemThumbnailImage.svelte
@@ -35,13 +35,11 @@
 	<img alt={name} class="{height} {width} cursor-pointer object-cover {imageClass}" src={preview} />
 {/snippet}

-<div
-	class="group relative min-w-0 overflow-hidden rounded-lg bg-muted shadow-lg dark:border dark:border-muted {className}"
->
+<div class="group relative min-w-0 overflow-hidden rounded-lg bg-muted elevated-raised {className}">
 	{#if onclick}
 		<button
 			aria-label="Preview {name}"
-			class="block h-full w-full rounded-lg focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:outline-none"
+			class="block size-full rounded-lg focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:outline-none"
 			{onclick}
 			type="button"
 		>
@@ -53,7 +51,7 @@

 	{#if label}
 		<span
-			class="pointer-events-none absolute bottom-1 left-1 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium text-white"
+			class="pointer-events-none absolute bottom-1 left-1 rounded-md bg-black/40 px-1.5 py-0.5 text-[10px] font-medium text-white matte-chip backdrop-blur-md [--badge-highlight:rgb(255_255_255/0.18)]"
 		>
 			{label}
 		</span>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreview.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreview.svelte
index c7aeab3cd..de23eb85d 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreview.svelte
@@ -189,7 +189,7 @@
 	<div class="relative flex min-h-0 flex-1 items-center justify-center overflow-hidden">
 		<ChatAttachmentsPreviewNavButtons onNext={next} onPrev={prev} show={allItems.length > 1} />

-		<div class="flex h-full w-full flex-col items-center justify-start overflow-auto py-4">
+		<div class="flex size-full flex-col items-center justify-start overflow-auto py-4">
 			{#if currentItem}
 				<ChatAttachmentsPreviewFileInfo {displayName} {fileSize} />

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemAudio.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemAudio.svelte
index 90392c957..53653599f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemAudio.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemAudio.svelte
@@ -11,7 +11,7 @@

 <div class="flex flex-1 items-center justify-center p-8">
 	<div class="w-full max-w-md text-center">
-		<Music class="mx-auto mb-4 h-16 w-16 text-white/50" />
+		<Music class="mx-auto mb-4 size-16 text-white/50" />

 		{#if audioSrc}
 			<audio class="mb-4 w-full" controls src={audioSrc}>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemImage.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemImage.svelte
index 155fad87b..65b670534 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemImage.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemImage.svelte
@@ -11,7 +11,7 @@
 	<div class="flex flex-1 items-center justify-center">
 		<img
 			alt={currentItem?.name || 'preview'}
-			class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg"
+			class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-(--elevation-raised)"
 			src={displayPreview}
 		/>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemPdf.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemPdf.svelte
index a1651e975..f270a0751 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemPdf.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemPdf.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as Alert from '@ggml-org/llama-ui/ui/alert';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { Eye, FileText, Info } from '@lucide/svelte';
 	import { SyntaxHighlightedCode } from '#lib/components/app/index.ts';
-	import * as Alert from '#lib/components/ui/alert/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ICON_CLASS_DEFAULT, PDF_AS_IMAGES_LEGACY_CONTENT_REGEX } from '#lib/constants/index.ts';
 	import { AttachmentType, MimeTypeApplication, PdfViewMode } from '#lib/enums/index.ts';
 	import type { ChatAttachmentDisplayItem } from '#lib/types/index.ts';
@@ -208,7 +208,11 @@
 	{#each pdfImages as image, index (index)}
 		<p class="mb-2 text-sm text-white/50">Page {index + 1}</p>

-		<img alt="PDF Page {index + 1}" class="mx-auto max-w-[85vw] rounded-lg shadow-lg" src={image} />
+		<img
+			alt="PDF Page {index + 1}"
+			class="mx-auto max-w-[85vw] rounded-lg shadow-(--elevation-raised)"
+			src={image}
+		/>

 		<div class="h-4"></div>
 	{/each}
@@ -220,7 +224,7 @@
 	<div class="flex flex-1 items-center justify-center p-8">
 		<div class="text-center">
 			<div
-				class="mx-auto mb-4 h-8 w-8 animate-spin rounded-full border-4 border-white border-t-transparent"
+				class="mx-auto mb-4 size-8 animate-spin rounded-full border-4 border-white border-t-transparent"
 			></div>

 			<p class="text-white/70">{message}</p>
@@ -231,7 +235,7 @@
 {#snippet status(message: string, detail?: string)}
 	<div class="flex flex-1 items-center justify-center p-8">
 		<div class="text-center">
-			<FileText class="mx-auto mb-4 h-16 w-16 text-white/50" />
+			<FileText class="mx-auto mb-4 size-16 text-white/50" />

 			<p class={['text-white/70', detail && 'mb-4']}>{message}</p>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemUnavailable.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemUnavailable.svelte
index d3002a939..72176f5f2 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemUnavailable.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemUnavailable.svelte
@@ -10,7 +10,7 @@

 <div class="flex flex-1 items-center justify-center p-8">
 	<div class="text-center">
-		<IconComponent class="mx-auto mb-4 h-16 w-16 text-white/50" />
+		<IconComponent class="mx-auto mb-4 size-16 text-white/50" />

 		<p class="text-white/70">Preview not available for this file type</p>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemVideo.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemVideo.svelte
index ed3da1403..ab0a2479a 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemVideo.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemVideo.svelte
@@ -11,7 +11,7 @@

 <div class="flex flex-1 items-center justify-center p-8">
 	<div class="w-full max-w-md text-center">
-		<Video class="mx-auto mb-4 h-16 w-16 text-white/50" />
+		<Video class="mx-auto mb-4 size-16 text-white/50" />

 		{#if videoSrc}
 			<video class="mb-4 w-full" controls src={videoSrc}>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewNavButtons.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewNavButtons.svelte
index 07121ae96..fa1ffa709 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewNavButtons.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewNavButtons.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { ChevronLeft, ChevronRight } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';

 	interface Props {
 		onPrev: () => void;
@@ -14,20 +14,20 @@
 {#if show}
 	<Button
 		aria-label="Previous"
-		class="absolute top-1/2 left-4 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!"
+		class="absolute top-1/2 left-4 z-10 size-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!"
 		onclick={onPrev}
 		size="icon"
-		variant="secondary"
+		variant="outline"
 	>
 		<ChevronLeft class="size-4" />
 	</Button>

 	<Button
 		aria-label="Next"
-		class="absolute top-1/2 right-4 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!"
+		class="absolute top-1/2 right-4 z-10 size-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!"
 		onclick={onNext}
 		size="icon"
-		variant="secondary"
+		variant="outline"
 	>
 		<ChevronRight class="size-4" />
 	</Button>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewThumbnailStrip.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewThumbnailStrip.svelte
index 59da00977..513d97a12 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewThumbnailStrip.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewThumbnailStrip.svelte
@@ -48,10 +48,10 @@
 					onclick={() => onNavigate(index)}
 				>
 					{#if (item.isImage || item.isPdf) && item.preview}
-						<img alt={item.name} class="h-12 w-12 object-cover" src={item.preview} />
+						<img alt={item.name} class="size-12 object-cover" src={item.preview} />
 					{:else}
 						<div
-							class="bg-foreground-muted/50 flex h-12 w-12 flex-col items-center justify-center gap-0.5 py-1"
+							class="bg-foreground-muted/50 flex size-12 flex-col items-center justify-center gap-0.5 py-1"
 						>
 							{#if item.isAudio}
 								<Music class="{ICON_CLASS_DEFAULT} text-white/70" />
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatForm.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatForm.svelte
index a9eb1a003..0c44d125f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatForm.svelte
@@ -17,7 +17,6 @@
 		CLIPBOARD_CONTENT_QUOTE_PREFIX,
 		ICON_CLASS_DEFAULT,
 		INITIAL_FILE_SIZE,
-		INPUT_CLASSES,
 		PROMPT_CONTENT_SEPARATOR,
 		SETTING_CONFIG_DEFAULT
 	} from '#lib/constants/index.ts';
@@ -678,9 +677,10 @@
 	<div
 		bind:this={cardEl}
 		class={[
-			INPUT_CLASSES,
-			'backdrop-blur-md group/chat-form relative flex shrink flex-col overflow-hidden transition-[min-height,padding,border-radius,border-color,background-color] duration-400 ease-[var(--chat-form-resize-ease,cubic-bezier(0.3,1.12,0.5,1))] motion-reduce:transition-none',
-			isSingleRow ? 'rounded-(--chat-form-single-row-radius)' : 'rounded-4xl md:rounded-3xl',
+			'chat-form-surface group/chat-form relative flex shrink flex-col overflow-hidden outline-none transition-[min-height,padding,border-radius,border-color,background-color] duration-400 ease-[var(--chat-form-resize-ease,cubic-bezier(0.3,1.12,0.5,1))] motion-reduce:transition-none',
+			isSingleRow
+				? 'rounded-(--chat-form-single-row-radius)'
+				: 'rounded-(--chat-form-radius-compact) md:rounded-(--chat-form-radius)',
 			// on a phone the sheet's animation moves it (see useChatFormExpansion): only its
 			// border, hidden on the sheet, fades back in after
 			'max-md:transition-[border-color] max-md:duration-200',
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte
index 3d25f8498..b22d03c7b 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Plus } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { ATTACHMENT_TOOLTIP_TEXT, ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';

 	interface Props {
@@ -15,7 +15,7 @@
 <Tooltip.Root>
 	<Tooltip.Trigger class="w-full">
 		<Button
-			class="file-upload-button bg-background h-9 w-9 rounded-full p-0 shadow-sm md:h-8 md:w-8 dark:bg-muted-foreground/15"
+			class="file-upload-button bg-background size-9 rounded-full p-0 shadow-(--chat-form-key-shadow) md:size-8 dark:bg-muted-foreground/15"
 			{disabled}
 			{onclick}
 			type="button"
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte
index 96794269d..b777b7c00 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDrawer.svelte
@@ -1,4 +1,8 @@
 <script lang="ts">
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
+	import * as Drawer from '@ggml-org/llama-ui/ui/drawer';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import {
 		ChevronDown,
 		ChevronRight,
@@ -10,10 +14,6 @@
 		PencilRuler,
 		Video
 	} from '@lucide/svelte';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
-	import * as Drawer from '#lib/components/ui/drawer/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import {
 		ATTACHMENT_FILE_ITEMS,
 		ATTACHMENT_MENU_TEXT,
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
index 01ba47cfb..77d10bd9e 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
@@ -1,10 +1,10 @@
 <script lang="ts">
+	import { buttonVariants } from '@ggml-org/llama-ui/ui/button';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import { File, Folder, Image, MessageSquare, Mic, Plus, Video } from '@lucide/svelte';
 	import { ChatFormActionAddToolsSubmenu } from '#lib/components/app/index.ts';
-	import { buttonVariants } from '#lib/components/ui/button/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import {
 		ATTACHMENT_FILE_ITEMS,
 		ATTACHMENT_MENU_TEXT,
@@ -78,7 +78,7 @@
 						class={cn(
 							// ghost brings no fill of its own for the muted composer surface to fight over
 							buttonVariants({ variant: 'ghost' }),
-							'file-upload-button h-8 w-8 cursor-pointer rounded-full bg-background p-0 shadow-sm dark:bg-muted-foreground/15'
+							'file-upload-button matte-key size-8 [--button-shadow:var(--chat-form-key-shadow)] cursor-pointer rounded-full bg-background p-0 dark:bg-muted-foreground/15'
 						)}
 						disabled={chatFormActions.disabled}
 					>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
index 7a64543a9..3e152f44c 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte
@@ -1,9 +1,9 @@
 <script lang="ts">
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Check, ChevronDown, ChevronRight, Info, Loader2, PencilRuler } from '@lucide/svelte';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { ATTACHMENT_MENU_TEXT, CLI_FLAGS, ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { useToolsPanel } from '#lib/hooks/use-tools-panel.svelte.ts';
 	import { mcpStore, toolsStore } from '#lib/stores/index.ts';
@@ -90,9 +90,9 @@
 				class="flex min-w-0 flex-1 items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50"
 			>
 				{#if isExpanded}
-					<ChevronDown class="h-3.5 w-3.5 shrink-0" />
+					<ChevronDown class="size-icon-sm shrink-0" />
 				{:else}
-					<ChevronRight class="h-3.5 w-3.5 shrink-0" />
+					<ChevronRight class="size-icon-sm shrink-0" />
 				{/if}

 				<span class="inline-flex min-w-0 items-center gap-1.5 font-medium">
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionReasoning.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionReasoning.svelte
index b46203f05..04fd275fd 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionReasoning.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionReasoning.svelte
@@ -1,9 +1,9 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Drawer from '@ggml-org/llama-ui/ui/drawer';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Check, Info, Lightbulb, LightbulbOff } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Drawer from '#lib/components/ui/drawer/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { ICON_CLASS_DEFAULT, REASONING_EFFORT_LABELS } from '#lib/constants/index.ts';
 	import { ReasoningEffort } from '#lib/enums/index.ts';
 	import { useReasoningMenu } from '#lib/hooks/use-reasoning-menu.svelte.ts';
@@ -30,9 +30,9 @@
 {#snippet triggerLabel()}
 	<span class="flex items-center gap-0.75 {reasoning.isOff ? 'text-muted-foreground' : ''}">
 		{#if reasoning.isOff}
-			<LightbulbOff class="size-3.25 max-md:size-4 shrink-0" />
+			<LightbulbOff class="size-3.25 max-md:size-icon-md shrink-0" />
 		{:else}
-			<Lightbulb class="size-3.25 max-md:size-4 shrink-0" />
+			<Lightbulb class="size-3.25 max-md:size-icon-md shrink-0" />
 		{/if}

 		{#if !isDefault}
@@ -64,7 +64,7 @@

 		{#if level.hasInfo}
 			<!-- no hover on a phone: the hint rides on the icon's own title there -->
-			<Info class="h-3.5 w-3.5 shrink-0 text-muted-foreground" title={MAX_EFFORT_HINT} />
+			<Info class="size-icon-md shrink-0 text-muted-foreground" title={MAX_EFFORT_HINT} />
 		{/if}
 	</button>
 {/snippet}
@@ -132,7 +132,7 @@
 					{#if level.hasInfo}
 						<Tooltip.Root>
 							<Tooltip.Trigger>
-								<Info class="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+								<Info class="size-icon-md shrink-0 text-muted-foreground" />
 							</Tooltip.Trigger>

 							<Tooltip.Content side="right">
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionRecord.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionRecord.svelte
index 8034c0bc8..8664af6b2 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionRecord.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionRecord.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Mic, MicOff, Square } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';

 	interface Props {
@@ -37,14 +37,15 @@
 	<Tooltip.Root>
 		<Tooltip.Trigger>
 			<Button
-				class="h-8 w-8 max-md:h-9 max-md:w-9 rounded-full p-0 {isRecording
-					? 'animate-pulse bg-red-500 text-white hover:bg-red-600'
+				class="size-8 max-md:size-9 rounded-full p-0 {isRecording
+					? 'matte-orb orb-danger animate-pulse text-white! hover:bg-transparent'
 					: showWarning
-						? 'bg-amber-500/15 text-amber-600 hover:bg-amber-500/25 dark:text-amber-400'
+						? 'bg-surface-warning text-fg-warning hover:bg-surface-warning'
 						: ''}"
 				disabled={disabled || isLoading || !hasAudioModality}
 				onclick={onMicClick}
 				type="button"
+				variant={isRecording || showWarning ? 'ghost' : 'default'}
 			>
 				<span class="sr-only"
 					>{isRecording
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionSubmit.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionSubmit.svelte
index abce28e7c..bf2ae23df 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionSubmit.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionSubmit.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { ArrowUp } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';

 	interface Props {
 		canSend?: boolean;
@@ -18,9 +18,9 @@
 {#snippet submitButton(props = {})}
 	<Button
 		class={[
-			'md:h-8 md:w-8 h-9 w-9 rounded-full p-0',
+			'md:size-8 size-9 rounded-full p-0',
 			showErrorState &&
-				'bg-red-400/10 text-red-400 hover:bg-red-400/20 hover:text-red-400 disabled:opacity-100'
+				'bg-surface-danger text-fg-danger hover:bg-surface-danger/80 hover:text-fg-danger disabled:opacity-100'
 		]}
 		disabled={isDisabled}
 		type="submit"
@@ -28,7 +28,7 @@
 	>
 		<span class="sr-only">Send</span>

-		<ArrowUp class="h-12 w-12" />
+		<ArrowUp class="size-icon-md" />
 	</Button>
 {/snippet}

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte
index b485c6cf1..987c5a350 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte
@@ -1,4 +1,5 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { SkipForward, Square } from '@lucide/svelte';
 	import {
 		ChatFormActionReasoning,
@@ -8,7 +9,6 @@
 		ChatFormContextGauge,
 		ModelsSelector
 	} from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ICON_CLASS_DEFAULT, SET_WORKING_DIRECTORY_LABEL } from '#lib/constants/index.ts';
 	import { setChatFormActionsContext } from '#lib/contexts/index.ts';
 	import { FileTypeCategory } from '#lib/enums/index.ts';
@@ -162,7 +162,7 @@

 	{#if isReasoning && !canSend}
 		<Button
-			class="group h-8 w-8 rounded-full p-0 max-md:h-9 max-md:w-9"
+			class="group size-8 rounded-full p-0 max-md:size-9"
 			onclick={() =>
 				ChatService.stopReasoning(activeMessage?.completionId ?? '', activeMessage?.model)}
 			title="Skip reasoning"
@@ -179,7 +179,7 @@

 	{#if isLoading && !canSend}
 		<Button
-			class="group h-8 w-8 rounded-full p-0 max-md:h-9 max-md:w-9 hover:bg-destructive/10!"
+			class="group size-8 rounded-full p-0 max-md:size-9 hover:bg-destructive/10!"
 			onclick={onStop}
 			type="button"
 			variant="secondary"
@@ -187,7 +187,7 @@
 			<span class="sr-only">Stop</span>

 			<Square
-				class="h-8 w-8 fill-muted-foreground stroke-muted-foreground group-hover:fill-destructive group-hover:stroke-destructive hover:fill-destructive hover:stroke-destructive"
+				class="size-icon-md fill-muted-foreground stroke-muted-foreground group-hover:fill-destructive group-hover:stroke-destructive hover:fill-destructive hover:stroke-destructive"
 			/>
 		</Button>
 	{:else if shouldShowRecordButton}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ChatFormContextGauge.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ChatFormContextGauge.svelte
index 3e53044bc..221e7b511 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ChatFormContextGauge.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ChatFormContextGauge.svelte
@@ -7,6 +7,7 @@
 		gaugeTriggerLeave,
 		gaugeTriggerPointerDown
 	} from './gauge-popup.svelte';
+	import GlassKey from '#lib/components/app/actions/GlassKey.svelte';
 	import { useContextGauge } from '#lib/hooks/use-context-gauge.svelte.ts';
 	import { chatStore, conversationsStore, deviceStore } from '#lib/stores/index.ts';
 	import { untrack } from 'svelte';
@@ -50,22 +51,38 @@
 	});
 </script>

-<div
-	aria-label="Context usage"
-	class={['flex cursor-default items-center justify-center', className]}
-	data-context-gauge-trigger
-	onclick={gaugeTriggerClick}
-	onkeydown={gaugeTriggerKeydown}
-	onpointerdown={gaugeTriggerPointerDown}
-	onpointerenter={gaugeTriggerEnter}
-	onpointerleave={gaugeTriggerLeave}
-	role="button"
-	tabindex="0"
->
-	<!-- a phone gets the larger dial: the trigger is a touch target there -->
-	<ContextGaugeDial
-		level={gauge.colorLevel}
-		percent={gauge.contextPercent}
-		size={corner ? 'key' : deviceStore.isMobile ? 'md' : 'sm'}
-	/>
-</div>
+{#snippet dial(size: 'sm' | 'md' | 'key')}
+	<ContextGaugeDial level={gauge.colorLevel} percent={gauge.contextPercent} {size} />
+{/snippet}
+
+{#if corner}
+	<!-- a phone's corner key, the same glass key as the menu key across from it -->
+	<GlassKey
+		class={className}
+		data-context-gauge-trigger
+		label="Context usage"
+		onclick={gaugeTriggerClick}
+		onkeydown={gaugeTriggerKeydown}
+		onpointerdown={gaugeTriggerPointerDown}
+		onpointerenter={gaugeTriggerEnter}
+		onpointerleave={gaugeTriggerLeave}
+	>
+		{@render dial('key')}
+	</GlassKey>
+{:else}
+	<div
+		aria-label="Context usage"
+		class={['flex cursor-default items-center justify-center', className]}
+		data-context-gauge-trigger
+		onclick={gaugeTriggerClick}
+		onkeydown={gaugeTriggerKeydown}
+		onpointerdown={gaugeTriggerPointerDown}
+		onpointerenter={gaugeTriggerEnter}
+		onpointerleave={gaugeTriggerLeave}
+		role="button"
+		tabindex="0"
+	>
+		<!-- a phone gets the larger dial: the trigger is a touch target there -->
+		{@render dial(deviceStore.isMobile ? 'md' : 'sm')}
+	</div>
+{/if}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte
index 5b0823c96..3627c7419 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { Loader2 } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';

 	interface Props {
 		modelId: string | null;
@@ -15,11 +15,11 @@
 	<div class="flex flex-col gap-2 border-t border-border/50 pt-2 text-xs text-muted-foreground">
 		<span>Available context size is only visible once the model is loaded.</span>

-		<Button class="self-start" onclick={onLoad} size="sm" variant="secondary">Load model</Button>
+		<Button class="self-start" onclick={onLoad} size="sm" variant="outline">Load model</Button>
 	</div>
 {:else if isLoading}
 	<div class="flex items-center gap-2 border-t border-border/50 pt-2 text-xs text-muted-foreground">
-		<Loader2 class="h-3.5 w-3.5 animate-spin" />
+		<Loader2 class="size-icon-sm animate-spin" />

 		<span>Loading model...</span>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugePopup.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugePopup.svelte
index 7e38378a5..802dd7e8d 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugePopup.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugePopup.svelte
@@ -8,9 +8,9 @@
 		gaugePopup,
 		gaugePopupClose
 	} from './gauge-popup.svelte';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Drawer from '@ggml-org/llama-ui/ui/drawer';
 	import { FoldVertical, Loader2 } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Drawer from '#lib/components/ui/drawer/index.ts';
 	import { useContextGauge } from '#lib/hooks/use-context-gauge.svelte.ts';
 	import { agenticStore, chatStore, conversationsStore, deviceStore } from '#lib/stores/index.ts';
 	import { formatParameters } from '#lib/utils/formatters.ts';
@@ -90,13 +90,13 @@
 			disabled={isCompactDisabled}
 			onclick={handleCompact}
 			size="sm"
-			variant="tertiary"
+			variant="secondary"
 		>
 			{#if isCompacting}
-				<Loader2 class="h-3.5 w-3.5 animate-spin" />
+				<Loader2 class="size-icon-md animate-spin" />
 				Compacting...
 			{:else}
-				<FoldVertical class="h-3.5 w-3.5" />
+				<FoldVertical class="size-icon-md" />
 				Compact conversation
 			{/if}
 		</Button>
@@ -172,7 +172,7 @@
 {:else if gaugePopup.open}
 	<div
 		bind:this={cardEl}
-		class="absolute z-50 w-64 -translate-x-1/2 rounded-xl border border-border bg-popover p-1.5 text-sm text-popover-foreground shadow-md dark:border-border/20"
+		class="absolute z-50 w-64 -translate-x-1/2 rounded-xl border matte-float p-1.5 text-sm"
 		onpointerenter={gaugeCardEnter}
 		onpointerleave={gaugeCardLeave}
 		role="status"
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/context-gauge.ts b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/context-gauge.ts
index cbbf5820d..2cddf3701 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/context-gauge.ts
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/context-gauge.ts
@@ -17,9 +17,9 @@ export function colorLevelFromPercent(percent: number | null): ColorLevel {
 export function colorLevelTextClass(level: ColorLevel): string {
 	switch (level) {
 		case ColorLevel.CRITICAL:
-			return 'text-red-400';
+			return 'text-fg-danger';
 		case ColorLevel.WARNING:
-			return 'text-amber-400';
+			return 'text-fg-warning';
 		case ColorLevel.OK:
 			return 'text-muted-foreground';
 		default:
@@ -30,11 +30,11 @@ export function colorLevelTextClass(level: ColorLevel): string {
 export function colorLevelBgClass(level: ColorLevel): string {
 	switch (level) {
 		case ColorLevel.CRITICAL:
-			return 'bg-red-500';
+			return 'bg-fill-danger';
 		case ColorLevel.WARNING:
-			return 'bg-amber-500';
+			return 'bg-fill-warning';
 		case ColorLevel.OK:
-			return 'bg-green-500';
+			return 'bg-fill-success';
 		default:
 			return 'bg-muted';
 	}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectory.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectory.svelte
index c3e676c01..db49bdcf3 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectory.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectory.svelte
@@ -1,10 +1,10 @@
 <script lang="ts">
 	import ChatFormCurrentWorkingDirectoryChip from './ChatFormCurrentWorkingDirectoryChip.svelte';
 	import ChatFormCurrentWorkingDirectoryResultsList from './ChatFormCurrentWorkingDirectoryResultsList.svelte';
+	import { SearchInput } from '@ggml-org/llama-ui/app/forms';
+	import * as Drawer from '@ggml-org/llama-ui/ui/drawer';
+	import * as Popover from '@ggml-org/llama-ui/ui/popover';
 	import { FolderOpen, X } from '@lucide/svelte';
-	import SearchInput from '#lib/components/app/forms/SearchInput.svelte';
-	import * as Drawer from '#lib/components/ui/drawer/index.ts';
-	import * as Popover from '#lib/components/ui/popover/index.ts';
 	import {
 		DEFAULT_MOBILE_BREAKPOINT,
 		HOME_TILDE,
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryChip.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryChip.svelte
index c33581059..d25792a03 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryChip.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryChip.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Folder, X } from '@lucide/svelte';
 	import { ActionIcon } from '#lib/components/app/actions/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { SET_WORKING_DIRECTORY_LABEL } from '#lib/constants/index.ts';
 	import { abbreviateWorkingDir } from '#lib/utils/index.ts';

@@ -35,7 +35,7 @@
 	]}
 >
 	<div class="flex min-w-0 items-center gap-1 cursor-pointer">
-		<Folder class="w-3.5 h-3.5" />
+		<Folder class="size-icon-sm" />

 		{#if showTooltip && displayLabelTitle}
 			<Tooltip.Root>
@@ -60,10 +60,10 @@
 		>
 			<ActionIcon
 				ariaLabel="Reset working directory"
-				class="!h-4 !w-4 shrink-0 text-muted-foreground hover:text-foreground"
+				class="!size-icon-md !shrink-0 text-muted-foreground hover:text-foreground"
 				{disabled}
 				icon={X}
-				iconSize="h-3 w-3"
+				iconSize="size-icon-md"
 				onclick={onClear}
 				stopPropagationOnClick
 				tooltip="Reset working directory"
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryResultsList.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryResultsList.svelte
index 12be95012..ef69d0f5a 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryResultsList.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormCurrentWorkingDirectory/ChatFormCurrentWorkingDirectoryResultsList.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import { Folder } from '@lucide/svelte';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import { UI_DATA_ATTRS } from '#lib/constants/index.ts';
 	import { highlightMatch } from '#lib/utils/index.ts';
 	import { fly } from 'svelte/transition';
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerItemHeader.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerItemHeader.svelte
index 9b7905815..3ad71b092 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerItemHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerItemHeader.svelte
@@ -22,7 +22,7 @@
 		{#if faviconUrl}
 			<img
 				alt=""
-				class="h-3 w-3 shrink-0 rounded-sm"
+				class="size-3 shrink-0 rounded-sm"
 				onerror={(e) => {
 					(e.currentTarget as HTMLImageElement).style.display = 'none';
 				}}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerList.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerList.svelte
index 8082ad23b..6a39949c7 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerList.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerList.svelte
@@ -1,6 +1,6 @@
 <script generics="T" lang="ts">
+	import { ScrollArea } from '@ggml-org/llama-ui/ui/scroll-area';
 	import { SearchInput } from '#lib/components/app/index.ts';
-	import ScrollArea from '#lib/components/ui/scroll-area/scroll-area.svelte';
 	import { CHAT_FORM_POPOVER_MAX_HEIGHT, UI_DATA_ATTRS } from '#lib/constants/index.ts';
 	import { useScrollActiveRow } from '#lib/hooks/use-scroll-active-row.svelte.ts';
 	import type { Snippet } from 'svelte';
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerListItemSkeleton.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerListItemSkeleton.svelte
index 36910eda4..aee380f14 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerListItemSkeleton.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerListItemSkeleton.svelte
@@ -11,7 +11,7 @@
 	<div class="min-w-0 flex-1 space-y-2">
 		<!-- Server label skeleton -->
 		<div class="mb-2 flex items-center gap-1.5">
-			<div class="h-3 w-3 shrink-0 animate-pulse rounded-sm bg-muted"></div>
+			<div class="size-3 shrink-0 animate-pulse rounded-sm bg-muted"></div>

 			<div class="h-3 w-24 animate-pulse rounded bg-muted"></div>
 		</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerPopover.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerPopover.svelte
index 4351fafad..427b8569d 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerPopover.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPicker/ChatFormPickerPopover.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as Popover from '#lib/components/ui/popover/index.ts';
+	import * as Popover from '@ggml-org/llama-ui/ui/popover';
 	import type { Snippet } from 'svelte';

 	interface Props {
@@ -42,7 +42,7 @@

 	<Popover.Content
 		align="start"
-		class="w-[var(--bits-popover-anchor-width)] max-w-none rounded-xl border-border/50 p-0 shadow-xl {className}"
+		class="w-[var(--bits-popover-anchor-width)] max-w-none rounded-xl p-0 {className}"
 		{customAnchor}
 		onOpenAutoFocus={(event) => event.preventDefault()}
 		onkeydown={onKeydown}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerCommand.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerCommand.svelte
index e7ef15422..299ebf682 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerCommand.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerCommand.svelte
@@ -131,7 +131,7 @@
 					if (!command.disabled) nav.setHover(index);
 				}}
 			>
-				<Icon class="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" />
+				<Icon class="mt-0.5 size-icon-md shrink-0 text-muted-foreground" />

 				<div class="flex min-w-0 flex-1 flex-col">
 					<span class="font-mono text-sm font-medium">/{command.name}</span>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPickerMcpPrompts.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPickerMcpPrompts.svelte
index c40c879af..7b657cb86 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPickerMcpPrompts.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPickerMcpPrompts.svelte
@@ -1,4 +1,5 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
 	import {
 		ChatFormPickerItemHeader,
 		ChatFormPickerList,
@@ -7,7 +8,6 @@
 		ChatFormPickerPopover,
 		ChatFormPromptPickerArgumentForm
 	} from '#lib/components/app/chat/index.ts';
-	import Badge from '#lib/components/ui/badge/badge.svelte';
 	import { KeyboardKey } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
 	import type { GetPromptResult, MCPPromptInfo, MCPServerSettingsEntry } from '#lib/types/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentForm.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentForm.svelte
index f3eb6dbce..1c647e44f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentForm.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import ChatFormPromptPickerArgumentInput from './ChatFormPromptPickerArgumentInput.svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import type { MCPPromptInfo } from '#lib/types/index.ts';

 	interface Props {
@@ -67,7 +67,7 @@
 	{/if}

 	<div class="mt-8 flex justify-end gap-2">
-		<Button onclick={onCancel} size="sm" type="button" variant="secondary">Cancel</Button>
+		<Button onclick={onCancel} size="sm" type="button" variant="outline">Cancel</Button>

 		<Button size="sm" type="submit">Use Prompt</Button>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentInput.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentInput.svelte
index c4d0e8239..244126da1 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentInput.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMcpPrompts/ChatFormPromptPickerArgumentInput.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import { Label } from '#lib/components/ui/label/index.ts';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
 	import type { MCPPromptInfo } from '#lib/types/index.ts';
 	import { fly } from 'svelte/transition';

@@ -66,7 +66,7 @@
 	{#if isAutocompleteActive && suggestions.length > 0}
 		<div
 			transition:fly={{ duration: 100, y: -5 }}
-			class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border border-border/50 bg-background shadow-lg"
+			class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border matte-float"
 		>
 			{#each suggestions as suggestion, i (suggestion)}
 				<button
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMention.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMention.svelte
index 62696940a..cb6e8264d 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMention.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormPickers/ChatFormPickerMention.svelte
@@ -1,9 +1,9 @@
 <script lang="ts">
+	import * as Popover from '@ggml-org/llama-ui/ui/popover';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { File, Folder } from '@lucide/svelte';
 	import { ChatFormPickerList, ChatFormPickerListItem } from '#lib/components/app/chat/index.ts';
 	import HighlightedMatch from '#lib/components/app/forms/HighlightedMatch.svelte';
-	import * as Popover from '#lib/components/ui/popover/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { FILE_GLOB_SEARCH_PICKERS, HOME_TILDE, SEARCH } from '#lib/constants/index.ts';
 	import {
 		BuiltInTool,
@@ -216,10 +216,7 @@

 	<Popover.Content
 		align="start"
-		class={[
-			'w-[var(--bits-popover-anchor-width)] max-w-none rounded-xl border-border/50 p-0 shadow-xl',
-			className
-		]}
+		class={['w-[var(--bits-popover-anchor-width)] max-w-none rounded-xl p-0', className]}
 		{customAnchor}
 		onCloseAutoFocus={(event) => event.preventDefault()}
 		onOpenAutoFocus={(event) => event.preventDefault()}
@@ -248,7 +245,7 @@
 					{@const Icon = entry.type === FileMentionEntryType.DIRECTORY ? Folder : File}
 					<Icon
 						class={[
-							'mt-0.5 h-4 w-4 shrink-0',
+							'mt-0.5 size-icon-md shrink-0',
 							entry.type === FileMentionEntryType.DIRECTORY
 								? 'text-amber-500'
 								: 'text-muted-foreground'
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCompaction.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCompaction.svelte
index 193da5186..36e8c77ef 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCompaction.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCompaction.svelte
@@ -126,7 +126,7 @@
 			collapsible={hasContent}
 			flushBody
 			icon={isSummarizing ? Loader2 : FoldVertical}
-			iconClass={isSummarizing ? 'h-3.5 w-3.5 animate-spin' : 'h-3.5 w-3.5'}
+			iconClass={isSummarizing ? 'size-icon-sm animate-spin' : 'size-icon-sm'}
 			onToggle={handleToggle}
 			shimmerTitle={isSummarizing || !hasContent}
 			{title}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCwdChange.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCwdChange.svelte
index edb65d783..959016a26 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCwdChange.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageCwdChange.svelte
@@ -18,7 +18,7 @@
 {#if info}
 	<div class="text-muted-foreground flex items-center gap-2 py-1.5 {className}">
 		{#if info.path === null}
-			<FolderX class="text-muted-foreground/60 h-3.5 w-3.5 shrink-0" />
+			<FolderX class="text-muted-foreground/60 size-icon-sm shrink-0" />

 			<span class="text-foreground/80 text-sm font-medium">Working directory cleared</span>
 		{:else}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPromptContent.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPromptContent.svelte
index b88217e94..27af803f0 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPromptContent.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPromptContent.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Card } from '@ggml-org/llama-ui/ui/card';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { TruncatedText } from '#lib/components/app/misc/index.ts';
-	import { Card } from '#lib/components/ui/card/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { McpPromptVariant } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
 	import type { DatabaseMessageExtraMcpPrompt } from '#lib/types/index.ts';
@@ -100,7 +100,7 @@
 					{#if serverFavicon}
 						<img
 							alt=""
-							class="h-3.5 w-3.5 shrink-0 rounded-sm"
+							class="size-3.5 shrink-0 rounded-sm"
 							onerror={(e) => {
 								(e.currentTarget as HTMLImageElement).style.display = 'none';
 							}}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte
index 3b79d9653..df2097b5a 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import { Card } from '@ggml-org/llama-ui/ui/card';
 	import { Check, X } from '@lucide/svelte';
 	import { ChatMessageActionIcons, MarkdownContent } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import { Card } from '#lib/components/ui/card/index.ts';
 	import { INPUT_CLASSES } from '#lib/constants/index.ts';
 	import { getChatMessageEditContext } from '#lib/contexts/index.ts';
 	import { KeyboardKey } from '#lib/enums/index.ts';
@@ -97,7 +97,7 @@

 			<div class="mt-2 flex justify-end gap-2">
 				<Button class="h-8 px-3" onclick={editCtx.cancel} size="sm" variant="outline">
-					<X class="mr-1 h-3 w-3" />
+					<X class="mr-1 size-icon-md" />

 					Cancel
 				</Button>
@@ -108,7 +108,7 @@
 					onclick={editCtx.save}
 					size="sm"
 				>
-					<Check class="mr-1 h-3 w-3" />
+					<Check class="mr-1 size-icon-md" />

 					Save
 				</Button>
@@ -159,7 +159,7 @@
 									class="pointer-events-none absolute right-0 bottom-4 left-0 flex justify-center opacity-0 transition-opacity group-hover/expand:opacity-100"
 								>
 									<Button
-										class="rounded-full px-4 py-1.5 text-xs shadow-md"
+										class="rounded-full px-4 py-1.5 text-xs shadow-(--elevation-surface)"
 										size="sm"
 										variant="outline"
 									>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockDefault.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockDefault.svelte
index 8ee9bb125..c86e8fdca 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockDefault.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockDefault.svelte
@@ -41,7 +41,7 @@
 				<span>Input</span>

 				{#if ctx.isStreaming}
-					<Loader2 class="h-3 w-3 animate-spin" />
+					<Loader2 class="size-icon-xs animate-spin" />
 				{/if}
 			</div>

@@ -86,7 +86,7 @@
 				<span>Output</span>

 				{#if ctx.isPending}
-					<Loader2 class="h-3 w-3 animate-spin" />
+					<Loader2 class="size-icon-xs animate-spin" />
 				{/if}
 			</div>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockEditFile.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockEditFile.svelte
index 853147a09..4af58619e 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockEditFile.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockEditFile.svelte
@@ -54,9 +54,9 @@
 	{#snippet children(_meta, ctx)}
 		{#if editFileBody?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-red-500/10 p-2 text-xs text-red-600 italic dark:text-red-400"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
 			>
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{editFileBody.errorMessage}</span>
 			</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockExecShellCommand.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockExecShellCommand.svelte
index bdb858d95..d8d3ff2a2 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockExecShellCommand.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockExecShellCommand.svelte
@@ -249,7 +249,7 @@
 	{#snippet children(_meta, ctx)}
 		{#if (ctx.isPending && !commandStreaming) || (isLive && !section.toolResult)}
 			<div class="flex items-start gap-2 text-xs text-muted-foreground/70">
-				<Loader2 class="h-3 w-3 animate-spin" />
+				<Loader2 class="size-icon-xs animate-spin" />
 				Executing command...
 			</div>
 		{:else if ctx.isInterrupted}
@@ -259,8 +259,8 @@
 				<span>Command interrupted before it returned output</span>
 			</div>
 		{:else if execShellError}
-			<div class="flex items-start gap-2 text-xs text-red-600 italic dark:text-red-400">
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+			<div class="flex items-start gap-2 text-xs text-fg-danger italic">
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{execShellError}</span>
 			</div>
@@ -286,7 +286,7 @@
 				{#if isExitCodeFinalLine && execShellExitStatus}
 					<div class={exitBadgeClass}>
 						{#if execShellExitStatus.timedOut}
-							<AlertTriangle class="h-3 w-3" />
+							<AlertTriangle class="size-icon-xs" />

 							<span>timed out</span>

@@ -294,11 +294,11 @@

 							<span>exit {execShellExitStatus.code}</span>
 						{:else if execShellExitStatus.code === 0}
-							<Check class="h-3 w-3" />
+							<Check class="size-icon-xs" />

 							<span>exit 0</span>
 						{:else}
-							<XCircle class="h-3 w-3" />
+							<XCircle class="size-icon-xs" />

 							<span>exit {execShellExitStatus.code}</span>
 						{/if}
@@ -364,34 +364,20 @@
 		line-height: 1;
 	}

+	/* the status tokens, which follow the theme on their own */
 	.exit-badge.success {
-		background: color-mix(in oklch, var(--color-green-500, #22c55e) 14%, transparent);
-		color: var(--color-green-700, #15803d);
-	}
-
-	:global(.dark) .exit-badge.success {
-		background: color-mix(in oklch, var(--color-green-400, #4ade80) 18%, transparent);
-		color: var(--color-green-300, #86efac);
+		background: var(--surface-success);
+		color: var(--fg-success);
 	}

 	.exit-badge.failure {
-		background: color-mix(in oklch, var(--color-red-500, #ef4444) 14%, transparent);
-		color: var(--color-red-700, #b91c1c);
-	}
-
-	:global(.dark) .exit-badge.failure {
-		background: color-mix(in oklch, var(--color-red-400, #f87171) 18%, transparent);
-		color: var(--color-red-300, #fca5a5);
+		background: var(--surface-danger);
+		color: var(--fg-danger);
 	}

 	.exit-badge.warning {
-		background: color-mix(in oklch, var(--color-amber-500, #f59e0b) 14%, transparent);
-		color: var(--color-amber-700, #b45309);
-	}
-
-	:global(.dark) .exit-badge.warning {
-		background: color-mix(in oklch, var(--color-amber-400, #fbbf24) 18%, transparent);
-		color: var(--color-amber-300, #fcd34d);
+		background: var(--surface-warning);
+		color: var(--fg-warning);
 	}

 	.exit-sep {
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockFileGlobSearch.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockFileGlobSearch.svelte
index 78faf8beb..b8865da52 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockFileGlobSearch.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockFileGlobSearch.svelte
@@ -45,9 +45,9 @@
 			</div>
 		{:else if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-red-500/10 p-2 text-xs text-red-600 italic dark:text-red-400"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
 			>
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{meta.errorMessage}</span>
 			</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetDatetime.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetDatetime.svelte
index 3152c9c1e..37124dcf5 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetDatetime.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetDatetime.svelte
@@ -43,17 +43,16 @@
 </script>

 <div class="text-muted-foreground flex items-center gap-2 py-1.5">
-	<Clock class="text-muted-foreground/60 h-3.5 w-3.5 shrink-0" />
+	<Clock class="text-muted-foreground/60 size-icon-sm shrink-0" />

 	{#if showSpinner}
 		<span class="text-foreground/80 text-sm font-medium">Current time</span>

-		<Loader2 class="text-muted-foreground/70 h-3 w-3 animate-spin" />
+		<Loader2 class="text-muted-foreground/70 size-icon-xs animate-spin" />
 	{:else if dateMeta.errorMessage}
 		<span class="text-foreground/80 text-sm font-medium">Current time&nbsp;</span>

-		<span class="text-red-600 text-xs italic dark:text-red-400">-&nbsp;{dateMeta.errorMessage}</span
-		>
+		<span class="text-fg-danger text-xs italic">-&nbsp;{dateMeta.errorMessage}</span>
 	{:else if dateMeta.dateString}
 		<span class="text-foreground/80 text-sm font-medium">Current time is&nbsp;</span>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte
index 6875eba65..545921065 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte
@@ -60,9 +60,9 @@
 	{#snippet children(meta, _ctx)}
 		{#if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-red-500/10 p-2 text-xs text-red-600 italic dark:text-red-400"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
 			>
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{meta.errorMessage}</span>
 			</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte
index b7a75e557..406275565 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte
@@ -39,9 +39,9 @@
 			</div>
 		{:else if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-red-500/10 p-2 text-xs text-red-600 italic dark:text-red-400"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
 			>
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{meta.errorMessage}</span>
 			</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte
index 3d54120fb..947266bc5 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte
@@ -75,7 +75,7 @@
 				<div class="mt-2">
 					<img
 						alt={readMediaMeta?.fileName ?? 'media'}
-						class="max-h-[60vh] max-w-full rounded-lg object-contain shadow-lg"
+						class="max-h-[60vh] max-w-full rounded-lg object-contain shadow-(--elevation-raised)"
 						loading="lazy"
 						src={mediaAttachment.base64Url}
 					/>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte
index e819e9f97..c790dd994 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte
@@ -27,9 +27,9 @@
 			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">Running...</div>
 		{:else if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-red-500/10 p-2 text-xs text-red-600 italic dark:text-red-400"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
 			>
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{meta.errorMessage}</span>
 			</div>
@@ -51,7 +51,7 @@
 			/>

 			<div class="mb-2 mt-3 flex items-center gap-2 text-xs text-muted-foreground/70">
-				<Terminal class="h-3 w-3" />
+				<Terminal class="size-icon-xs" />

 				<span>Console</span>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte
index eed512c56..2ed631a4f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as HoverCard from '@ggml-org/llama-ui/ui/hover-card';
 	import { Globe, Loader2 } from '@lucide/svelte';
 	import { CollapsibleContentBlock } from '#lib/components/app/index.ts';
-	import * as HoverCard from '#lib/components/ui/hover-card/index.ts';
 	import { ICON_CLASS_DEFAULT, ICON_CLASS_SPIN } from '#lib/constants/index.ts';
 	import { AgenticSectionType } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
@@ -97,12 +97,12 @@
 				{#if faviconUrl}
 					<img
 						alt=""
-						class="h-3 w-3 shrink-0 rounded-sm"
+						class="size-3 shrink-0 rounded-sm"
 						onerror={hideBrokenIcon}
 						src={faviconUrl}
 					/>
 				{:else}
-					<Globe class="text-muted-foreground/70 h-3 w-3 shrink-0" />
+					<Globe class="text-muted-foreground/70 size-icon-xs shrink-0" />
 				{/if}

 				<span class="truncate font-medium text-foreground/80">{result.title}</span>
@@ -163,7 +163,7 @@
 		</div>
 	{:else if showSpinner}
 		<div class="text-muted-foreground/70 flex items-center gap-2 py-1 text-xs italic">
-			<Loader2 class="h-3 w-3 animate-spin" />
+			<Loader2 class="size-icon-xs animate-spin" />

 			<span>Searching...</span>
 		</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockWriteFile.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockWriteFile.svelte
index 3b980f428..bc4908245 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockWriteFile.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockWriteFile.svelte
@@ -46,9 +46,9 @@
 	{#snippet children(_meta, ctx)}
 		{#if writeFileBody?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-red-500/10 p-2 text-xs text-red-600 italic dark:text-red-400"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
 			>
-				<XCircle class="mt-0.5 h-3 w-3 shrink-0" />
+				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{writeFileBody.errorMessage}</span>
 			</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserBubble.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserBubble.svelte
index e5e642321..0ceb3fc14 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserBubble.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserBubble.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Card } from '@ggml-org/llama-ui/ui/card';
 	import { ChatAttachmentsList, MarkdownContent, MentionText } from '#lib/components/app/index.ts';
-	import { Card } from '#lib/components/ui/card/index.ts';
 	import { settingsStore } from '#lib/stores/index.ts';
 	import type { DatabaseMessageExtra } from '#lib/types/database.js';

@@ -65,7 +65,7 @@

 {#if content.trim()}
 	<Card
-		class="chat-message-user-bubble max-w-[80%] overflow-y-auto rounded-[1.125rem] border-none bg-primary/5 px-3.75 py-1.5 {textColorClass} backdrop-blur-md data-multiline:py-2.5 {cardBgClass}"
+		class="chat-message-user-bubble max-w-[80%] overflow-y-auto rounded-[1.125rem] matte-sheen border-none bg-(--user-bubble-background) px-3.75 py-1.5 {textColorClass} backdrop-blur-md data-multiline:py-2.5 {cardBgClass}"
 		data-multiline={isMultiline ? '' : undefined}
 		style="{maxHeightStyle} overflow-wrap: anywhere; word-break: break-word;"
 	>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardContinueRequest.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardContinueRequest.svelte
index f2a12323f..68be708ed 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardContinueRequest.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardContinueRequest.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import ChatMessageActionCard from './ChatMessageActionCard.svelte';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { RotateCw } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';

 	interface Props {
 		onDecision: (shouldContinue: boolean) => void;
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardPermissionRequest.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardPermissionRequest.svelte
index 23a7662bc..214f9dea2 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardPermissionRequest.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCardPermissionRequest.svelte
@@ -1,10 +1,10 @@
 <script lang="ts">
+	import { Button, buttonVariants } from '@ggml-org/llama-ui/ui/button';
+	import * as ButtonGroup from '@ggml-org/llama-ui/ui/button-group';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import { ChevronDown, ShieldQuestion } from '@lucide/svelte';
 	import { ChatMessageActionCard } from '#lib/components/app/index.ts';
-	import { Button, buttonVariants } from '#lib/components/ui/button/index.ts';
-	import * as ButtonGroup from '#lib/components/ui/button-group/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import { TOOL_SERVER_LABELS } from '#lib/constants/index.ts';
 	import { ToolPermissionDecision, ToolSource } from '#lib/enums/index.ts';
 	import { toolsStore } from '#lib/stores/index.ts';
@@ -26,13 +26,8 @@

 	{#snippet actions()}
 		<DropdownMenu.Root>
-			<ButtonGroup.Root class="overflow-hidden rounded-md shadow-sm">
-				<Button
-					class="!rounded-r-none !shadow-none"
-					onclick={() => onDecision(ToolPermissionDecision.ONCE)}
-					size="sm"
-					variant="secondary"
-				>
+			<ButtonGroup.Root>
+				<Button onclick={() => onDecision(ToolPermissionDecision.ONCE)} size="sm" variant="outline">
 					Allow once
 				</Button>

@@ -41,11 +36,11 @@
 				<DropdownMenu.Trigger
 					aria-label="More allow options"
 					class={cn(
-						buttonVariants({ size: 'sm', variant: 'secondary' }),
-						'inline-flex cursor-pointer items-center !rounded-l-none !shadow-none !px-2'
+						buttonVariants({ size: 'sm', variant: 'outline' }),
+						'inline-flex cursor-pointer items-center !px-2'
 					)}
 				>
-					<ChevronDown class="h-3.5 w-3.5" />
+					<ChevronDown class="size-icon-sm" />
 				</DropdownMenu.Trigger>
 			</ButtonGroup.Root>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIcons.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIcons.svelte
index 454433b2e..5139f2cbf 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIcons.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIcons.svelte
@@ -1,14 +1,14 @@
 <script lang="ts">
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
+	import { Switch } from '@ggml-org/llama-ui/ui/switch';
 	import { ArrowRight, Copy, Edit, GitBranch, RefreshCw, Trash2 } from '@lucide/svelte';
 	import {
 		ActionIcon,
 		ChatMessageActionIconsBranchingControls,
 		DialogConfirmation
 	} from '#lib/components/app/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import Input from '#lib/components/ui/input/input.svelte';
-	import Label from '#lib/components/ui/label/label.svelte';
-	import { Switch } from '#lib/components/ui/switch/index.ts';
 	import { getChatMessageActionsContext, getChatMessageEditContext } from '#lib/contexts/index.ts';
 	import { conversationsStore } from '#lib/stores/index.ts';
 	import { untrack } from 'svelte';
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIconsBranchingControls.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIconsBranchingControls.svelte
index 12bc39651..b5f7c67d7 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIconsBranchingControls.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionIcons/ChatMessageActionIconsBranchingControls.svelte
@@ -30,7 +30,7 @@
 		role="navigation"
 	>
 		<ActionIcon
-			class="h-5 w-5 p-0 {!hasPrevious ? '!cursor-not-allowed opacity-30' : ''}"
+			class="size-icon-lg p-0 {!hasPrevious ? '!cursor-not-allowed opacity-30' : ''}"
 			disabled={!hasPrevious}
 			icon={ChevronLeft}
 			onclick={() => messageActions.navigateToSibling(previousSiblingId!)}
@@ -42,7 +42,7 @@
 		</span>

 		<ActionIcon
-			class="h-5 w-5 p-0 {!hasNext ? 'opacity-30' : ''}"
+			class="size-icon-lg p-0 {!hasNext ? 'opacity-30' : ''}"
 			disabled={!hasNext}
 			icon={ChevronRight}
 			onclick={() => messageActions.navigateToSibling(nextSiblingId!)}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageEditForm.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageEditForm.svelte
index 27090e8a8..e4b7a276f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageEditForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageEditForm.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import { Switch } from '@ggml-org/llama-ui/ui/switch';
 	import { AlertTriangle, X } from '@lucide/svelte';
 	import { ChatForm, DialogConfirmation } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import { Switch } from '#lib/components/ui/switch/index.ts';
 	import { getChatMessageEditContext } from '#lib/contexts/index.ts';
 	import { KeyboardKey, MessageRole } from '#lib/enums/index.ts';
 	import { chatStore } from '#lib/stores/index.ts';
@@ -138,7 +138,7 @@
 	{/if}

 	<Button class="h-7 px-3 text-xs" onclick={attemptCancel} size="sm" variant="ghost">
-		<X class="mr-1 h-3 w-3" />
+		<X class="mr-1 size-icon-md" />

 		Cancel
 	</Button>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageReasoningBlock.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageReasoningBlock.svelte
index aac623520..df9eee314 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageReasoningBlock.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageReasoningBlock.svelte
@@ -126,7 +126,7 @@
 <CollapsibleContentBlock
 	class="my-2"
 	icon={Lightbulb}
-	iconClass="h-3.5 w-3.5"
+	iconClass="size-icon-sm"
 	{onToggle}
 	{open}
 	{shimmerTitle}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte
index e877cdb11..6b4498e43 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { BookOpenText, Clock, Gauge, Layers, Sparkles, WholeWord, Wrench } from '@lucide/svelte';
 	import { ChatMessageStatisticsBadge } from '#lib/components/app/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { DEFAULT_PERFORMANCE_TIME, MS_PER_SECOND } from '#lib/constants/index.ts';
 	import { ChatMessageStatisticsMode, ChatMessageStatsView } from '#lib/enums/index.ts';
 	import type { ChatMessageAgenticTimings } from '#lib/types/chat.js';
@@ -145,17 +145,17 @@
 			{#snippet child({ props })}
 				<button
 					{...props}
-					class="inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors {activeView ===
+					class="inline-flex size-5 items-center justify-center rounded-sm transition-colors {activeView ===
 					opts.view
-						? 'bg-background text-foreground shadow-sm'
+						? 'bg-(--tabs-background-active) text-(--tabs-text-active) shadow-(--tabs-shadow-active)'
 						: opts.disabled
 							? 'cursor-not-allowed opacity-40'
-							: 'hover:text-foreground'}"
+							: 'hover:text-(--tabs-text-active)'}"
 					disabled={opts.disabled}
 					onclick={() => !opts.disabled && (activeView = opts.view)}
 					type="button"
 				>
-					<IconComponent class="h-3 w-3" />
+					<IconComponent class="size-icon-xs" />

 					<span class="sr-only">{opts.label}</span>
 				</button>
@@ -170,7 +170,9 @@

 <div class="inline-flex items-center text-xs text-muted-foreground">
 	{#if isSwitchable}
-		<div class="inline-flex items-center rounded-sm bg-muted-foreground/15 p-0.5">
+		<div
+			class="inline-flex items-center gap-0.5 rounded-md bg-(--tabs-track) p-0.5 shadow-(--tabs-track-shadow)"
+		>
 			{#if hasPromptStats || isLive}
 				{@render viewButton({
 					icon: BookOpenText,
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatisticsBadge.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatisticsBadge.svelte
index 0d982e801..865958acc 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatisticsBadge.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatisticsBadge.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { BadgeInfo } from '#lib/components/app/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { copyToClipboard } from '#lib/utils/index.ts';
 	import type { Component } from 'svelte';

@@ -25,7 +25,7 @@
 			{#snippet child({ props })}
 				<BadgeInfo {...props} class={className} onclick={handleClick}>
 					{#snippet icon()}
-						<IconComponent class="h-3 w-3" />
+						<IconComponent class="size-icon-xs" />
 					{/snippet}

 					{value}
@@ -40,7 +40,7 @@
 {:else}
 	<BadgeInfo class={className} onclick={handleClick}>
 		{#snippet icon()}
-			<IconComponent class="h-3 w-3" />
+			<IconComponent class="size-icon-xs" />
 		{/snippet}

 		{value}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte
index a62552ae7..911f07434 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte
@@ -302,7 +302,7 @@
 		{#if deviceStore.isMobile && showContextGauge.current && !uiStore.isComposerExpanded}
 			<div transition:fade={{ duration: CHAT_FORM_CHROME_FADE_MS }}>
 				<ChatFormContextGauge
-					class="sidebar-reveal-pin-top fixed top-(--corner-control-top) right-4 z-20 size-10 rounded-full bg-muted/60 border border-border/20 shadow-sm backdrop-blur-sm"
+					class="sidebar-reveal-pin-top fixed top-(--corner-control-top) right-4 z-20"
 					corner
 				/>
 			</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenActionScrollDown.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenActionScrollDown.svelte
index 0b5695ba0..916b18f33 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenActionScrollDown.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenActionScrollDown.svelte
@@ -1,19 +1,19 @@
 <script lang="ts">
 	import { ArrowDown } from '@lucide/svelte';
-	import ActionIcon from '#lib/components/app/actions/ActionIcon.svelte';
+	import GlassKey from '#lib/components/app/actions/GlassKey.svelte';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';

 	let { onclick }: { onclick: (e?: MouseEvent) => void } = $props();
 </script>

 <div class="pointer-events-auto flex justify-center relative h-0">
-	<ActionIcon
-		ariaLabel="Scroll to bottom"
-		class="h-9 w-9 rounded-full bg-muted/60 border border-border/20 shadow-sm text-accent-foreground absolute bottom-4"
+	<GlassKey
+		class="absolute bottom-4"
 		icon={ArrowDown}
-		iconSize={ICON_CLASS_DEFAULT}
+		iconClass={ICON_CLASS_DEFAULT}
+		label="Scroll to bottom"
 		{onclick}
-		size="lg"
-		tooltip="Scroll to bottom"
+		size="sm"
+		tooltip
 	/>
 </div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte
index ab4adb2c2..c3ae91a2f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte
@@ -6,9 +6,9 @@
 	class="pointer-events-none fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm"
 >
 	<div
-		class="flex flex-col items-center justify-center rounded-2xl border-2 border-dashed border-border bg-background p-12 shadow-lg"
+		class="flex flex-col items-center justify-center rounded-2xl border-2 border-dashed border-border bg-background p-12 shadow-(--elevation-raised)"
 	>
-		<Upload class="mb-4 h-12 w-12 text-muted-foreground" />
+		<Upload class="mb-4 size-12 text-muted-foreground" />

 		<p class="text-lg font-medium text-foreground">Attach a file</p>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte
index a189230c2..497c1efc2 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Alert from '@ggml-org/llama-ui/ui/alert';
 	import { AlertTriangle, Loader2, RefreshCw } from '@lucide/svelte';
-	import * as Alert from '#lib/components/ui/alert/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { serverStore } from '#lib/stores/index.ts';

@@ -26,7 +26,7 @@
 						disabled={serverStore.loading}
 						onclick={() => serverStore.fetch()}
 					>
-						<RefreshCw class="h-3 w-3 {serverStore.loading ? 'animate-spin' : ''}" />
+						<RefreshCw class="size-icon-xs {serverStore.loading ? 'animate-spin' : ''}" />
 						{serverStore.loading ? 'Retrying...' : 'Retry'}
 					</button>
 				{/if}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenStreamResumeStatus.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenStreamResumeStatus.svelte
index db852bf51..efa20c5e9 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenStreamResumeStatus.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenStreamResumeStatus.svelte
@@ -12,7 +12,7 @@
 		class="pointer-events-auto mx-auto mt-2 mb-2 flex max-w-[48rem] items-center gap-2 rounded-md border border-blue-400/40 bg-blue-50/60 px-3 py-1.5 text-sm text-blue-700 dark:bg-blue-950/40 dark:text-blue-200"
 		role="status"
 	>
-		<Loader2 class="h-3.5 w-3.5 animate-spin" />
+		<Loader2 class="size-icon-sm animate-spin" />

 		<span>Reconnecting to the stream...</span>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsItem.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsItem.svelte
index 5f9cac084..c01af20d6 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsItem.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import { Loader2, Square, X } from '@lucide/svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import {
 		ICON_CLASS_SM,
 		ICON_CLASS_XS,
@@ -90,7 +90,7 @@
 					<button
 						{...props}
 						aria-label="Stop generation"
-						class="stop-button relative z-10 flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground"
+						class="stop-button relative z-10 flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground"
 						onclick={(e) => handleActionClick(e, () => onStop?.(tab.id, e))}
 					>
 						<Loader2
@@ -125,7 +125,7 @@
 					{...props}
 					aria-label="Close tab"
 					class={cn(
-						'relative z-10 flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground transition-opacity hover:bg-foreground/10 hover:text-foreground',
+						'relative z-10 flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground transition-opacity hover:bg-foreground/10 hover:text-foreground',
 						contentOpacity
 					)}
 					onclick={(e) => handleActionClick(e, () => onClose?.(tab.id))}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsNewChatButton.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsNewChatButton.svelte
index 89cb8a508..a3a8f1439 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsNewChatButton.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabsNewChatButton.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Plus } from '@lucide/svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';

 	interface Props {
diff --git a/ui/apps/chat/src/lib/components/app/content/CollapsibleContentBlock.svelte b/ui/apps/chat/src/lib/components/app/content/CollapsibleContentBlock.svelte
index 3085946bc..3ada95f93 100644
--- a/ui/apps/chat/src/lib/components/app/content/CollapsibleContentBlock.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/CollapsibleContentBlock.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import ChevronDown from '@lucide/svelte/icons/chevron-down';
 	import CollapsibleRegion from '#lib/components/app/misc/CollapsibleRegion.svelte';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import type { Snippet } from 'svelte';
 	import type { Component } from 'svelte';
diff --git a/ui/apps/chat/src/lib/components/app/content/CollapsibleTerminalBlock.svelte b/ui/apps/chat/src/lib/components/app/content/CollapsibleTerminalBlock.svelte
index 27e8e89e3..4ffb20526 100644
--- a/ui/apps/chat/src/lib/components/app/content/CollapsibleTerminalBlock.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/CollapsibleTerminalBlock.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import ChevronDown from '@lucide/svelte/icons/chevron-down';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import type { Snippet } from 'svelte';
 	import type { Component } from 'svelte';
diff --git a/ui/apps/chat/src/lib/components/app/content/MarkdownContent/markdown-content.css b/ui/apps/chat/src/lib/components/app/content/MarkdownContent/markdown-content.css
index 3a4fff8b0..49aee0e04 100644
--- a/ui/apps/chat/src/lib/components/app/content/MarkdownContent/markdown-content.css
+++ b/ui/apps/chat/src/lib/components/app/content/MarkdownContent/markdown-content.css
@@ -309,9 +309,7 @@ div.markdown-user-content :global(.table-wrapper) {
 .markdown-content :global(.code-language) {
 	color: var(--color-foreground);
 	font-weight: 500;
-	font-family:
-		ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
-		'Liberation Mono', Menlo, monospace;
+	font-family: var(--font-mono);
 	text-transform: uppercase;
 	font-size: 0.75rem;
 	letter-spacing: 0.05em;
diff --git a/ui/apps/chat/src/lib/components/app/content/MarkdownEditor/MarkdownEditor.svelte b/ui/apps/chat/src/lib/components/app/content/MarkdownEditor/MarkdownEditor.svelte
index b4caad5c8..c0afb6119 100644
--- a/ui/apps/chat/src/lib/components/app/content/MarkdownEditor/MarkdownEditor.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/MarkdownEditor/MarkdownEditor.svelte
@@ -358,7 +358,7 @@

 	div :global(.cm-placeholder) {
 		color: var(--muted-foreground);
-		text-shadow: none;
+		text-shadow: var(--text-shadow-engraved);
 	}

 	/* The markdown img styles must not reach the editor's invisible caret helpers */
diff --git a/ui/apps/chat/src/lib/components/app/content/MermaidPreviewControls.svelte b/ui/apps/chat/src/lib/components/app/content/MermaidPreviewControls.svelte
index 77abf1604..5c0e03021 100644
--- a/ui/apps/chat/src/lib/components/app/content/MermaidPreviewControls.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/MermaidPreviewControls.svelte
@@ -35,7 +35,7 @@
 	<div class="mermaid-preview-controls-inner flex items-center gap-1 rounded-lg bg-muted p-1">
 		<button
 			aria-label="Zoom out"
-			class="mermaid-preview-btn flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
+			class="mermaid-preview-btn flex size-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
 			onclick={onZoomOut}
 			title="Zoom out"
 		>
@@ -49,7 +49,7 @@

 		<button
 			aria-label="Zoom in"
-			class="mermaid-preview-btn flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
+			class="mermaid-preview-btn flex size-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
 			onclick={onZoomIn}
 			title="Zoom in"
 		>
@@ -60,7 +60,7 @@

 		<button
 			aria-label="Reset view"
-			class="mermaid-preview-btn flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
+			class="mermaid-preview-btn flex size-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
 			onclick={onResetView}
 			title="Reset view"
 		>
@@ -71,7 +71,7 @@

 		<button
 			aria-label="Download SVG"
-			class="mermaid-preview-btn flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
+			class="mermaid-preview-btn flex size-8 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-foreground transition-colors hover:bg-muted-foreground/15 active:bg-muted-foreground/25"
 			onclick={downloadSvg}
 			title="Download SVG"
 		>
diff --git a/ui/apps/chat/src/lib/components/app/content/index.ts b/ui/apps/chat/src/lib/components/app/content/index.ts
index 9f6bcf0c6..80ecfa936 100644
--- a/ui/apps/chat/src/lib/components/app/content/index.ts
+++ b/ui/apps/chat/src/lib/components/app/content/index.ts
@@ -78,7 +78,7 @@ export { default as MentionText } from './MentionText.svelte';
  * <SyntaxHighlightedCode code={jsonString} language="json" />
  * ```
  */
-export { default as SyntaxHighlightedCode } from './SyntaxHighlightedCode.svelte';
+export { SyntaxHighlightedCode } from '@ggml-org/llama-ui/app/content';

 /**
  * **CollapsibleContentBlock** - Expandable content card
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogChatAttachmentsPreview.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogChatAttachmentsPreview.svelte
index 2dddf5e9e..e9ad59163 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogChatAttachmentsPreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogChatAttachmentsPreview.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as DialogUI from '@ggml-org/llama-ui/ui/dialog';
 	import { X } from '@lucide/svelte';
 	import { ChatAttachmentsPreview } from '#lib/components/app/index.ts';
-	import * as DialogUI from '#lib/components/ui/dialog/index.ts';
 	import { KeyboardKey } from '#lib/enums/index.ts';
 	import { Dialog } from 'bits-ui';

diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogChatError.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogChatError.svelte
index cdd5cf131..b4f71905e 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogChatError.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogChatError.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
 	import { AlertTriangle, TimerOff } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
 	import { ErrorDialogType } from '#lib/enums/index.ts';

 	interface Props {
@@ -38,9 +38,9 @@
 		<AlertDialog.Header>
 			<AlertDialog.Title class="flex items-center gap-2">
 				{#if isTimeout}
-					<TimerOff class={`h-5 w-5 ${iconClass}`} />
+					<TimerOff class={`size-icon-lg ${iconClass}`} />
 				{:else}
-					<AlertTriangle class={`h-5 w-5 ${iconClass}`} />
+					<AlertTriangle class={`size-icon-lg ${iconClass}`} />
 				{/if}

 				{title}
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogConfirmation.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogConfirmation.svelte
index 949406511..fdb60ed5c 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogConfirmation.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogConfirmation.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
 	import { KeyboardKey } from '#lib/enums/index.ts';
 	import type { Component, Snippet } from 'svelte';

@@ -55,7 +55,9 @@
 				{#if icon}
 					{@const IconComponent = icon}

-					<IconComponent class="h-5 w-5 {variant === 'destructive' ? 'text-destructive' : ''}" />
+					<IconComponent
+						class="size-icon-lg {variant === 'destructive' ? 'text-destructive' : ''}"
+					/>
 				{/if}
 				{title}
 			</AlertDialog.Title>
@@ -72,10 +74,7 @@
 		<AlertDialog.Footer>
 			<AlertDialog.Cancel onclick={onCancel}>{cancelText}</AlertDialog.Cancel>

-			<AlertDialog.Action
-				class={variant === 'destructive' ? 'bg-destructive text-white hover:bg-destructive/80' : ''}
-				onclick={onConfirm}
-			>
+			<AlertDialog.Action onclick={onConfirm} {variant}>
 				{confirmText}
 			</AlertDialog.Action>
 		</AlertDialog.Footer>
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationRename.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationRename.svelte
index 259d23c8e..4da5c0209 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationRename.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationRename.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
 	import { Pencil } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import { Input } from '#lib/components/ui/input/index.ts';

 	interface Props {
 		open: boolean;
@@ -54,7 +54,7 @@
 	<AlertDialog.Content>
 		<AlertDialog.Header>
 			<AlertDialog.Title class="flex items-center gap-2">
-				<Pencil class="h-5 w-5" />
+				<Pencil class="size-icon-lg" />
 				Rename conversation
 			</AlertDialog.Title>

diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationSelection.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationSelection.svelte
index 8bf832e3a..b06289beb 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationSelection.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationSelection.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { ConversationSelection } from '#lib/components/app/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';

 	interface Props {
 		conversations: DatabaseConversation[];
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogDiscoverModels.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogDiscoverModels.svelte
index 7a244427c..a1eeb46a4 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogDiscoverModels.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogDiscoverModels.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import ModelsDiscover from '#lib/components/app/models/discover/ModelsDiscover.svelte';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { DISCOVER_ICON } from '#lib/constants/index.ts';
 	import { uiStore } from '#lib/stores/index.ts';
 	import { untrack } from 'svelte';
@@ -36,7 +36,7 @@
 	>
 		<Dialog.Header class="flex flex-row items-center p-2 pr-8">
 			<Dialog.Title class="flex min-h-7 items-center gap-2">
-				<DISCOVER_ICON class="h-5 w-5" />
+				<DISCOVER_ICON class="size-icon-lg" />

 				<span>Discover</span>
 			</Dialog.Title>
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogEmptyFileAlert.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogEmptyFileAlert.svelte
index 369b58c8d..382ce96bb 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogEmptyFileAlert.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogEmptyFileAlert.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
 	import { FileX } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';

 	interface Props {
 		open: boolean;
@@ -20,7 +20,7 @@
 	<AlertDialog.Content>
 		<AlertDialog.Header>
 			<AlertDialog.Title class="flex items-center gap-2">
-				<FileX class="h-5 w-5 text-destructive" />
+				<FileX class="size-icon-lg text-destructive" />

 				Empty Files Detected
 			</AlertDialog.Title>
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogExportSettings.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogExportSettings.svelte
index 4a671650b..9afa1b17d 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogExportSettings.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogExportSettings.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
 	import { Shield, ShieldOff } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import Label from '#lib/components/ui/label/label.svelte';

 	let {
 		includeSensitiveData = $bindable(false),
@@ -28,9 +28,9 @@
 		<AlertDialog.Header>
 			<AlertDialog.Title class="flex items-center gap-2">
 				{#if includeSensitiveData}
-					<ShieldOff class="h-5 w-5 text-destructive" />
+					<ShieldOff class="size-icon-lg text-destructive" />
 				{:else}
-					<Shield class="h-5 w-5 text-destructive" />
+					<Shield class="size-icon-lg text-destructive" />
 				{/if}
 				Export Settings
 			</AlertDialog.Title>
@@ -69,10 +69,7 @@
 		<AlertDialog.Footer>
 			<AlertDialog.Cancel onclick={onCancel}>Cancel</AlertDialog.Cancel>

-			<AlertDialog.Action
-				class="bg-destructive text-white hover:bg-destructive/80"
-				onclick={onConfirm}
-			>
+			<AlertDialog.Action onclick={onConfirm} variant="destructive">
 				{#if includeSensitiveData}
 					Export Anyway
 				{:else}
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogFileUploadError.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogFileUploadError.svelte
index b40957162..c1340542e 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogFileUploadError.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogFileUploadError.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';

 	interface Props {
 		open: boolean;
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogGroup.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogGroup.svelte
index 7552ef8bb..379b9862c 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogGroup.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogGroup.svelte
@@ -1,9 +1,9 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
 	import { FolderPlus, Pencil } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import { Label } from '#lib/components/ui/label/index.ts';
 	import { GROUP_NAME_MAX_LENGTH } from '#lib/constants/index.ts';
 	import { groupsStore, uiStore } from '#lib/stores/index.ts';
 	import { untrack } from 'svelte';
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogGroupPicker.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogGroupPicker.svelte
index 5f8ff513c..77f24269b 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogGroupPicker.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogGroupPicker.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { Check, Plus } from '@lucide/svelte';
 	import { SearchInput } from '#lib/components/app/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { groupsStore, uiStore } from '#lib/stores/index.ts';

 	let options = $derived(uiStore.groupPicker);
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcePreview.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcePreview.svelte
index 6703f9a88..b6ad53a51 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcePreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcePreview.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { Download } from '@lucide/svelte';
 	import { ActionIconCopyToClipboard, SyntaxHighlightedCode } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { DEFAULT_RESOURCE_FILENAME, MIME_TYPE_SUBSTRINGS } from '#lib/constants/index.ts';
 	import { MimeTypeText } from '#lib/enums/index.ts';
 	import { deviceStore, mcpStore } from '#lib/stores/index.ts';
@@ -68,7 +68,7 @@
 							{#if favicon}
 								<img
 									alt=""
-									class="h-3 w-3 shrink-0 rounded-sm"
+									class="size-3 shrink-0 rounded-sm"
 									onerror={(e) => {
 										(e.currentTarget as HTMLImageElement).style.display = 'none';
 									}}
@@ -94,14 +94,14 @@
 			/>

 			<Button
-				class="h-7 w-7 p-0"
+				class="size-7 p-0"
 				disabled={!extra.content}
 				onclick={handleDownload}
 				size="sm"
 				title="Download content"
 				variant="ghost"
 			>
-				<Download class="h-3.5 w-3.5" />
+				<Download class="size-icon-md" />
 			</Button>
 		</div>

diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcesBrowser.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcesBrowser.svelte
index f6089ca7d..8eeb35581 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcesBrowser.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcesBrowser.svelte
@@ -1,12 +1,12 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { Braces, FolderOpen, Loader2, Plus, X } from '@lucide/svelte';
 	import {
 		McpResourcePreview,
 		McpResourcesBrowser,
 		McpResourceTemplateForm
 	} from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { ICON_CLASS_DEFAULT, PANEL_CLOSE_MOBILE_CLASS } from '#lib/constants/index.ts';
 	import { deviceStore, mcpStore } from '#lib/stores/index.ts';
 	import type {
@@ -262,7 +262,7 @@
 	>
 		<Dialog.Header class="border-b border-border/30 px-4 py-3" showCloseButton={false}>
 			<Dialog.Title class="flex items-center gap-2">
-				<FolderOpen class="h-5 w-5" />
+				<FolderOpen class="size-icon-lg" />

 				<span>MCP Resources</span>

@@ -322,10 +322,10 @@

 						{#if templatePreviewLoading}
 							<div class="flex flex-1 items-center justify-center">
-								<Loader2 class="h-6 w-6 animate-spin text-muted-foreground" />
+								<Loader2 class="size-6 animate-spin text-muted-foreground" />
 							</div>
 						{:else if templatePreviewError}
-							<div class="flex flex-1 flex-col items-center justify-center gap-2 text-red-500">
+							<div class="flex flex-1 flex-col items-center justify-center gap-2 text-fg-danger">
 								<span class="text-sm">{templatePreviewError}</span>

 								<Button
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte
index bf4a5f8c8..6f68e615b 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { McpServerCardCompact, McpServerForm } from '#lib/components/app/mcp/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import {
 		DISMISSED_RECOMMENDED_MCP_SERVERS_LOCALSTORAGE_KEY,
 		HEADERS,
@@ -294,9 +294,7 @@
 			</div>

 			<Dialog.Footer>
-				<Button onclick={() => handleOpenChange(false)} size="sm" variant="secondary">
-					Cancel
-				</Button>
+				<Button onclick={() => handleOpenChange(false)} size="sm" variant="outline">Cancel</Button>

 				<Button aria-label="Save" disabled={!canSave} size="sm" type="submit" variant="default">
 					Add
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServers.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServers.svelte
index 442709820..508fe8430 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServers.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServers.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { McpLogo } from '#lib/components/app/index.ts';
 	import { SettingsMcpServers } from '#lib/components/app/settings/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';

 	interface Props {
@@ -24,7 +24,7 @@
 	>
 		<Dialog.Header>
 			<Dialog.Title class="flex items-center gap-2">
-				<McpLogo class="h-5 w-5" />
+				<McpLogo class="size-5" />

 				<span>MCP Servers</span>
 			</Dialog.Title>
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogMermaidPreview.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogMermaidPreview.svelte
index 7ec6ce6f6..9c6d8abf9 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMermaidPreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMermaidPreview.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { MermaidPreview } from '#lib/components/app/content/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';

 	interface Props {
 		open: boolean;
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogModelNotAvailable.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogModelNotAvailable.svelte
index 679bb9c64..6d5115a6c 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogModelNotAvailable.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogModelNotAvailable.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
 	import { AlertTriangle, ArrowRight } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
 	import { ICON_CLASS_DEFAULT, URL_PARAMS } from '#lib/constants/index.ts';
 	import { goto } from '$app/navigation';
 	import { page } from '$app/state';
@@ -34,7 +34,7 @@
 	<AlertDialog.Content class="max-w-lg">
 		<AlertDialog.Header>
 			<AlertDialog.Title class="flex items-center gap-2">
-				<AlertTriangle class="h-5 w-5 text-amber-500" />
+				<AlertTriangle class="size-icon-lg text-amber-500" />
 				Model Not Available
 			</AlertDialog.Title>

diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte
index 76a76d98f..9df54c530 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { ArrowDown, ArrowUp, CornerDownLeft, MessageSquare, Pin, X } from '@lucide/svelte';
 	import { ActionIcon, KeyboardShortcutInfo } from '#lib/components/app/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import {
 		ICON_CLASS_DEFAULT,
 		ICON_CLASS_SM,
diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogSettingsChat.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogSettingsChat.svelte
index e3c7974df..55092b90f 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogSettingsChat.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogSettingsChat.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { Settings, X } from '@lucide/svelte';
 	import { SettingsChat } from '#lib/components/app/settings/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { PANEL_CLOSE_MOBILE_CLASS } from '#lib/constants/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';

@@ -26,7 +26,7 @@
 	>
 		<Dialog.Header class="md:p-0 p-4" showCloseButton={false}>
 			<Dialog.Title class="flex items-center gap-2">
-				<Settings class="h-5 w-5" />
+				<Settings class="size-icon-lg" />

 				<span>Settings</span>
 			</Dialog.Title>
diff --git a/ui/apps/chat/src/lib/components/app/forms/InputWithSuggestions.svelte b/ui/apps/chat/src/lib/components/app/forms/InputWithSuggestions.svelte
index bf7b16371..31cc5ffc1 100644
--- a/ui/apps/chat/src/lib/components/app/forms/InputWithSuggestions.svelte
+++ b/ui/apps/chat/src/lib/components/app/forms/InputWithSuggestions.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import { Label } from '#lib/components/ui/label/index.ts';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
 	import { fly } from 'svelte/transition';

 	interface Props {
@@ -60,7 +60,7 @@
 	{#if isAutocompleteActive && suggestions.length > 0}
 		<div
 			transition:fly={{ duration: 100, y: -5 }}
-			class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border border-border/50 bg-background shadow-lg"
+			class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border matte-float"
 		>
 			{#each suggestions as suggestion, i (suggestion)}
 				<button
diff --git a/ui/apps/chat/src/lib/components/app/forms/KeyValuePairs.svelte b/ui/apps/chat/src/lib/components/app/forms/KeyValuePairs.svelte
index c826e8189..8c6d9072d 100644
--- a/ui/apps/chat/src/lib/components/app/forms/KeyValuePairs.svelte
+++ b/ui/apps/chat/src/lib/components/app/forms/KeyValuePairs.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Input } from '@ggml-org/llama-ui/ui/input';
 	import { Plus, Trash2 } from '@lucide/svelte';
-	import { Input } from '#lib/components/ui/input/index.ts';
 	import {
 		KEY_VALUE_PAIR_KEY_MAX_LENGTH,
 		KEY_VALUE_PAIR_VALUE_MAX_LENGTH
@@ -120,7 +120,7 @@
 			onclick={addPair}
 			type="button"
 		>
-			<Plus class="h-3 w-3" />
+			<Plus class="size-icon-xs" />
 			{addButtonLabel}
 		</button>
 	</div>
@@ -160,7 +160,7 @@
 						onclick={() => removePair(index)}
 						type="button"
 					>
-						<Trash2 class="h-3.5 w-3.5" />
+						<Trash2 class="size-icon-sm" />
 					</button>
 				</div>
 			{/each}
diff --git a/ui/apps/chat/src/lib/components/app/forms/index.ts b/ui/apps/chat/src/lib/components/app/forms/index.ts
index 87594d7e3..bed6e1531 100644
--- a/ui/apps/chat/src/lib/components/app/forms/index.ts
+++ b/ui/apps/chat/src/lib/components/app/forms/index.ts
@@ -41,7 +41,7 @@ export { default as KeyValuePairs } from './KeyValuePairs.svelte';
  * Input field optimized for search with clear button and keyboard handling.
  * Supports placeholder, autofocus, and change callbacks.
  */
-export { default as SearchInput } from './SearchInput.svelte';
+export { SearchInput } from '@ggml-org/llama-ui/app/forms';

 /**
  * **HighlightedMatch** - Substring-match text highlight
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpActiveServersAvatars.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpActiveServersAvatars.svelte
index 2b13e52a9..c61c68a74 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpActiveServersAvatars.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpActiveServersAvatars.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import McpLogo from './McpLogo.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { ICON_CLASS_DEFAULT, MAX_DISPLAYED_MCP_AVATARS } from '#lib/constants/index.ts';
 	import { HealthCheckStatus, ToolSource } from '#lib/enums/index.ts';
 	import { conversationsStore, mcpStore } from '#lib/stores/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpCapabilitiesBadges.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpCapabilitiesBadges.svelte
index f7d22e952..d10118a15 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpCapabilitiesBadges.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpCapabilitiesBadges.svelte
@@ -1,4 +1,5 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
 	import {
 		Database,
 		ExternalLink,
@@ -8,7 +9,6 @@
 		Sparkles,
 		Wrench
 	} from '@lucide/svelte';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
 	import type { MCPCapabilitiesInfo } from '#lib/types/index.ts';

 	interface Props {
@@ -22,7 +22,7 @@
 {#if capabilities}
 	{#if capabilities.server.tools}
 		<Badge class="h-5 gap-1 bg-green-50 px-1.5 text-[10px] dark:bg-green-950" variant="outline">
-			<Wrench class="h-3 w-3 text-green-600 dark:text-green-400" />
+			<Wrench class="size-icon-xs text-green-600 dark:text-green-400" />

 			Tools
 		</Badge>
@@ -42,17 +42,17 @@
 			tabindex={0}
 			variant="outline"
 		>
-			<Database class="h-3 w-3 text-blue-600 dark:text-blue-400" />
+			<Database class="size-icon-xs text-blue-600 dark:text-blue-400" />

 			Resources

-			<ExternalLink class="h-3 w-3 text-blue-600 dark:text-blue-400" />
+			<ExternalLink class="size-icon-xs text-blue-600 dark:text-blue-400" />
 		</Badge>
 	{/if}

 	{#if capabilities.server.prompts}
 		<Badge class="h-5 gap-1 bg-purple-50 px-1.5 text-[10px] dark:bg-purple-950" variant="outline">
-			<MessageSquare class="h-3 w-3 text-purple-600 dark:text-purple-400" />
+			<MessageSquare class="size-icon-xs text-purple-600 dark:text-purple-400" />

 			Prompts
 		</Badge>
@@ -60,7 +60,7 @@

 	{#if capabilities.server.logging}
 		<Badge class="h-5 gap-1 bg-orange-50 px-1.5 text-[10px] dark:bg-orange-950" variant="outline">
-			<FileText class="h-3 w-3 text-orange-600 dark:text-orange-400" />
+			<FileText class="size-icon-xs text-orange-600 dark:text-orange-400" />

 			Logging
 		</Badge>
@@ -68,7 +68,7 @@

 	{#if capabilities.server.completions}
 		<Badge class="h-5 gap-1 bg-cyan-50 px-1.5 text-[10px] dark:bg-cyan-950" variant="outline">
-			<Sparkles class="h-3 w-3 text-cyan-600 dark:text-cyan-400" />
+			<Sparkles class="size-icon-xs text-cyan-600 dark:text-cyan-400" />

 			Completions
 		</Badge>
@@ -76,7 +76,7 @@

 	{#if capabilities.server.tasks}
 		<Badge class="h-5 gap-1 bg-pink-50 px-1.5 text-[10px] dark:bg-pink-950" variant="outline">
-			<ListChecks class="h-3 w-3 text-pink-600 dark:text-pink-400" />
+			<ListChecks class="size-icon-xs text-pink-600 dark:text-pink-400" />

 			Tasks
 		</Badge>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpConnectionLogs.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpConnectionLogs.svelte
index aaa1354cd..e4a861377 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpConnectionLogs.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpConnectionLogs.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
 	import { ChevronDown, ChevronRight } from '@lucide/svelte';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
 	import type { MCPConnectionLog } from '#lib/types/index.ts';
 	import { formatTime, getMcpLogLevelClass, getMcpLogLevelIcon } from '#lib/utils/index.ts';

@@ -35,9 +35,9 @@
 				class="flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
 			>
 				{#if isExpanded}
-					<ChevronDown class="h-3.5 w-3.5" />
+					<ChevronDown class="size-icon-sm" />
 				{:else}
-					<ChevronRight class="h-3.5 w-3.5" />
+					<ChevronRight class="size-icon-sm" />
 				{/if}

 				<span>Connection Log ({logs.length})</span>
@@ -60,7 +60,7 @@
 							{formatTime(log.timestamp)}
 						</span>

-						<IconComponent class="mt-0.5 h-3 w-3 shrink-0" />
+						<IconComponent class="mt-0.5 size-icon-xs shrink-0" />

 						<span class="break-all">{log.message}</span>
 					</div>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpResourcePreview.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpResourcePreview.svelte
index 218eb30cc..6f81d0a29 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourcePreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourcePreview.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { AlertCircle, Download, FileText, Loader2 } from '@lucide/svelte';
 	import { ActionIconCopyToClipboard } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { MimeTypeApplication, MimeTypeText } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
@@ -77,7 +77,7 @@
 <div class={['flex flex-col gap-3', className]}>
 	{#if !resource}
 		<div class="flex flex-col items-center justify-center gap-2 py-8 text-muted-foreground">
-			<FileText class="h-8 w-8 opacity-50" />
+			<FileText class="size-8 opacity-50" />

 			<span class="text-sm">Select a resource to preview</span>
 		</div>
@@ -101,14 +101,14 @@
 				/>

 				<Button
-					class="h-7 w-7 p-0"
+					class="size-7 p-0"
 					disabled={isLoading || !getResourceTextContent(content)}
 					onclick={handleDownload}
 					size="sm"
 					title="Download content"
 					variant="ghost"
 				>
-					<Download class="h-3.5 w-3.5" />
+					<Download class="size-icon-md" />
 				</Button>
 			</div>
 		</div>
@@ -116,11 +116,11 @@
 		<div class="min-h-[200px] overflow-auto rounded-md border bg-muted/30 p-3 break-all">
 			{#if isLoading}
 				<div class="flex items-center justify-center py-8">
-					<Loader2 class="h-6 w-6 animate-spin text-muted-foreground" />
+					<Loader2 class="size-6 animate-spin text-muted-foreground" />
 				</div>
 			{:else if error}
-				<div class="flex flex-col items-center justify-center gap-2 py-8 text-red-500">
-					<AlertCircle class="h-6 w-6" />
+				<div class="flex flex-col items-center justify-center gap-2 py-8 text-fg-danger">
+					<AlertCircle class="size-6" />

 					<span class="text-sm">{error}</span>
 				</div>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpResourceTemplateForm.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpResourceTemplateForm.svelte
index 729f05767..1fe047660 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourceTemplateForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourceTemplateForm.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { InputWithSuggestions } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { MIN_AUTOCOMPLETE_INPUT_LENGTH } from '#lib/constants/index.ts';
 	import { KeyboardKey } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
@@ -164,7 +164,7 @@
 	{/if}

 	<div class="flex justify-end gap-2 pt-1">
-		<Button onclick={onCancel} size="sm" type="button" variant="secondary">Cancel</Button>
+		<Button onclick={onCancel} size="sm" type="button" variant="outline">Cancel</Button>

 		<Button disabled={!isComplete} size="sm" type="submit">Read Resource</Button>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserHeader.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserHeader.svelte
index 8ea4f5c6c..852fbc0ea 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserHeader.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { Loader2, RefreshCw } from '@lucide/svelte';
 	import { SearchInput } from '#lib/components/app/forms/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';

 	interface Props {
@@ -23,7 +23,7 @@
 		/>

 		<Button
-			class="h-8 w-8 p-0"
+			class="size-8 p-0"
 			disabled={isLoading}
 			onclick={onRefresh}
 			size="sm"
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserServerItem.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserServerItem.svelte
index c50b76072..48d9d523f 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserServerItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserServerItem.svelte
@@ -5,10 +5,10 @@
 		type ResourceTreeNode,
 		sortTreeChildren
 	} from './mcp-resources-browser';
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
 	import { Braces, ChevronDown, ChevronRight, FolderOpen, Loader2 } from '@lucide/svelte';
 	import { McpServerIdentity } from '#lib/components/app/mcp/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
 	import type {
@@ -95,12 +95,12 @@
 				class="flex w-full items-center gap-2 rounded px-2 py-1 text-sm hover:bg-muted/50"
 			>
 				{#if isFolderExpanded}
-					<ChevronDown class="h-3 w-3" />
+					<ChevronDown class="size-icon-xs" />
 				{:else}
-					<ChevronRight class="h-3 w-3" />
+					<ChevronRight class="size-icon-xs" />
 				{/if}

-				<FolderOpen class="h-3.5 w-3.5 text-muted-foreground" />
+				<FolderOpen class="size-icon-sm text-muted-foreground" />

 				<span class="font-medium">{node.name}</span>

@@ -140,7 +140,7 @@
 				onclick={(e: MouseEvent) => handleResourceClick(resource, e)}
 				title={resourceDisplayName}
 			>
-				<ResourceIcon class="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+				<ResourceIcon class="size-icon-sm shrink-0 text-muted-foreground" />

 				<span class="min-w-0 flex-1 truncate text-left">
 					{resourceDisplayName}
@@ -155,9 +155,9 @@
 		class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50"
 	>
 		{#if isExpanded}
-			<ChevronDown class="h-3.5 w-3.5" />
+			<ChevronDown class="size-icon-sm" />
 		{:else}
-			<ChevronRight class="h-3.5 w-3.5" />
+			<ChevronRight class="size-icon-sm" />
 		{/if}

 		<span class="inline-flex flex-col items-start gap-1 text-left">
@@ -181,14 +181,14 @@
 		</span>

 		{#if serverRes.loading}
-			<Loader2 class="ml-auto h-3 w-3 animate-spin text-muted-foreground" />
+			<Loader2 class="ml-auto size-icon-xs animate-spin text-muted-foreground" />
 		{/if}
 	</Collapsible.Trigger>

 	<Collapsible.Content>
 		<div class="ml-4 flex flex-col gap-0.5 border-l border-border/50 pl-2">
 			{#if serverRes.error}
-				<div class="py-1 text-xs text-red-500">
+				<div class="py-1 text-xs text-fg-danger">
 					Error: {serverRes.error}
 				</div>
 			{:else if !hasContent}
@@ -221,7 +221,7 @@
 							onclick={() => onTemplateSelect(template)}
 							title={template.uriTemplate}
 						>
-							<Braces class="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+							<Braces class="size-icon-sm shrink-0 text-muted-foreground" />

 							<span class="min-w-0 flex-1 truncate text-left">
 								{template.title || template.name}
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCard.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCard.svelte
index c899706f5..efdc06966 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCard.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCard.svelte
@@ -1,4 +1,6 @@
 <script lang="ts">
+	import * as Card from '@ggml-org/llama-ui/ui/card';
+	import { Skeleton } from '@ggml-org/llama-ui/ui/skeleton';
 	import {
 		McpConnectionLogs,
 		McpServerCardActions,
@@ -8,8 +10,6 @@
 		McpServerCardToolsList,
 		McpServerInfo
 	} from '#lib/components/app/mcp/index.ts';
-	import * as Card from '#lib/components/ui/card/index.ts';
-	import { Skeleton } from '#lib/components/ui/skeleton/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { HealthCheckStatus } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardActions.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardActions.svelte
index f0ee59190..f7a8208c1 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardActions.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { Pencil, RefreshCw, Trash2 } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';

 	interface Props {
 		isHealthChecking: boolean;
@@ -13,28 +13,28 @@
 </script>

 <div class="flex shrink-0 items-center gap-1">
-	<Button aria-label="Edit" class="h-7 w-7" onclick={onEdit} size="icon" variant="ghost">
-		<Pencil class="h-3.5 w-3.5" />
+	<Button aria-label="Edit" class="size-7" onclick={onEdit} size="icon" variant="ghost">
+		<Pencil class="size-icon-md" />
 	</Button>

 	<Button
 		aria-label="Refresh"
-		class="h-7 w-7"
+		class="size-7"
 		disabled={isHealthChecking}
 		onclick={onRefresh}
 		size="icon"
 		variant="ghost"
 	>
-		<RefreshCw class="h-3.5 w-3.5" />
+		<RefreshCw class="size-icon-md" />
 	</Button>

 	<Button
 		aria-label="Delete"
-		class="hover:text-destructive-foreground h-7 w-7 text-destructive hover:bg-destructive/10"
+		class="hover:text-destructive-foreground size-7 text-destructive hover:bg-destructive/10"
 		onclick={onDelete}
 		size="icon"
 		variant="ghost"
 	>
-		<Trash2 class="h-3.5 w-3.5" />
+		<Trash2 class="size-icon-md" />
 	</Button>
 </div>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte
index 7e3c4281c..4abd93ed0 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as Card from '#lib/components/ui/card/index.ts';
+	import * as Card from '@ggml-org/llama-ui/ui/card';
 	import type { RecommendedMCPServer } from '#lib/types/index.ts';
 	import { mode } from 'mode-watcher';

@@ -31,7 +31,7 @@
 		{#if activeIconUrl}
 			<img
 				alt=""
-				class="h-5 w-5 shrink-0 rounded"
+				class="size-5 shrink-0 rounded"
 				decoding="async"
 				loading="lazy"
 				src={activeIconUrl}
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardDeleteDialog.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardDeleteDialog.svelte
index 88f6d13d6..98711dd26 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardDeleteDialog.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardDeleteDialog.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';

 	interface Props {
 		open: boolean;
@@ -25,12 +25,7 @@
 		<AlertDialog.Footer>
 			<AlertDialog.Cancel>Cancel</AlertDialog.Cancel>

-			<AlertDialog.Action
-				class="text-destructive-foreground bg-destructive hover:bg-destructive/90"
-				onclick={onConfirm}
-			>
-				Delete
-			</AlertDialog.Action>
+			<AlertDialog.Action onclick={onConfirm} variant="destructive">Delete</AlertDialog.Action>
 		</AlertDialog.Footer>
 	</AlertDialog.Content>
 </AlertDialog.Root>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardEditForm.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardEditForm.svelte
index a26f37c00..6de492214 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardEditForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardEditForm.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { McpServerForm } from '#lib/components/app/mcp/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { parseHeadersToArray } from '#lib/utils/index.ts';

 	interface Props {
@@ -85,7 +85,7 @@
 		/>

 		<div class="flex items-center justify-end gap-2">
-			<Button onclick={onCancel} size="sm" variant="secondary">Cancel</Button>
+			<Button onclick={onCancel} size="sm" variant="outline">Cancel</Button>

 			<Button disabled={!canSave} size="sm" type="submit">
 				{serverUrl.trim() ? 'Update' : 'Add'}
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardHeader.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardHeader.svelte
index 5111ae35a..7805e9688 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardHeader.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
+	import { Switch } from '@ggml-org/llama-ui/ui/switch';
 	import { McpCapabilitiesBadges, McpServerIdentity } from '#lib/components/app/mcp/index.ts';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
-	import { Switch } from '#lib/components/ui/switch/index.ts';
 	import { MCP_TRANSPORT_ICONS, MCP_TRANSPORT_LABELS } from '#lib/constants/index.ts';
 	import { MCPTransportType } from '#lib/enums/index.ts';
 	import type { MCPCapabilitiesInfo, MCPServerInfo } from '#lib/types/index.ts';
@@ -38,7 +38,7 @@
 				<McpServerIdentity
 					{displayName}
 					{faviconUrl}
-					iconClass="h-5 w-5"
+					iconClass="size-icon-lg"
 					iconRounded="rounded"
 					nameClass="leading-6 font-medium"
 					{serverInfo}
@@ -51,7 +51,7 @@
 						{@const TransportIcon = MCP_TRANSPORT_ICONS[transportType]}
 						<Badge class="h-5 gap-1 px-1.5 text-[10px]" variant="outline">
 							{#if TransportIcon}
-								<TransportIcon class="h-3 w-3" />
+								<TransportIcon class="size-icon-xs" />
 							{/if}

 							{MCP_TRANSPORT_LABELS[transportType] || transportType}
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardToolsList.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardToolsList.svelte
index 33de7f108..d1a0c7ec2 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardToolsList.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardToolsList.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
 	import { ChevronDown, ChevronRight } from '@lucide/svelte';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';

 	interface Tool {
 		name: string;
@@ -23,9 +23,9 @@
 		class="flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
 	>
 		{#if isExpanded}
-			<ChevronDown class="h-3.5 w-3.5" />
+			<ChevronDown class="size-icon-sm" />
 		{:else}
-			<ChevronRight class="h-3.5 w-3.5" />
+			<ChevronRight class="size-icon-sm" />
 		{/if}

 		<span>{toolsCount} tools available · Show details</span>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCardSkeleton.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCardSkeleton.svelte
index cb4f7a030..1554dd4f2 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCardSkeleton.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCardSkeleton.svelte
@@ -1,12 +1,12 @@
 <script lang="ts">
-	import * as Card from '#lib/components/ui/card/index.ts';
-	import { Skeleton } from '#lib/components/ui/skeleton/index.ts';
+	import * as Card from '@ggml-org/llama-ui/ui/card';
+	import { Skeleton } from '@ggml-org/llama-ui/ui/skeleton';
 </script>

 <Card.Root class="grid gap-3 p-4">
 	<div class="flex items-center justify-between gap-4">
 		<div class="flex items-center gap-2">
-			<Skeleton class="h-5 w-5 rounded" />
+			<Skeleton class="size-5 rounded" />

 			<Skeleton class="h-5 w-28" />

@@ -33,10 +33,10 @@
 	<Skeleton class="h-3.5 w-36" />

 	<div class="flex justify-end gap-2">
-		<Skeleton class="h-8 w-8 rounded" />
+		<Skeleton class="size-8 rounded" />

-		<Skeleton class="h-8 w-8 rounded" />
+		<Skeleton class="size-8 rounded" />

-		<Skeleton class="h-8 w-8 rounded" />
+		<Skeleton class="size-8 rounded" />
 	</div>
 </Card.Root>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte
index c1b38c222..c0dd254e7 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Switch } from '@ggml-org/llama-ui/ui/switch';
 	import { KeyValuePairs } from '#lib/components/app/index.ts';
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import { Switch } from '#lib/components/ui/switch/index.ts';
 	import { CLI_FLAGS, HEADERS, MCP_SERVER_URL_PLACEHOLDER } from '#lib/constants/index.ts';
 	import { UrlProtocol } from '#lib/enums/index.ts';
 	import { mcpStore } from '#lib/stores/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerIdentity.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerIdentity.svelte
index 9ebddc3cb..d55235b55 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerIdentity.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerIdentity.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
 	import { ExternalLink } from '@lucide/svelte';
 	import { McpLogo } from '#lib/components/app/mcp/index.ts';
 	import { TruncatedText } from '#lib/components/app/misc/index.ts';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
 	import type { MCPServerInfo } from '#lib/types/index.ts';
 	import { sanitizeExternalUrl } from '#lib/utils/index.ts';

@@ -20,7 +20,7 @@
 	let {
 		displayName,
 		faviconUrl = null,
-		iconClass = 'h-5 w-5',
+		iconClass = 'size-icon-lg',
 		iconRounded = 'rounded-sm',
 		nameClass,
 		serverInfo,
@@ -57,7 +57,7 @@
 			rel="noopener noreferrer"
 			target="_blank"
 		>
-			<ExternalLink class="h-3 w-3" />
+			<ExternalLink class="size-icon-xs" />
 		</a>
 	{/if}
 </span>
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerInfo.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerInfo.svelte
index 40fe59665..7f88764e8 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerInfo.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerInfo.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
 	import { ChevronDown, ChevronRight } from '@lucide/svelte';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';

 	interface Props {
 		instructions?: string;
@@ -18,9 +18,9 @@
 			class="flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
 		>
 			{#if isExpanded}
-				<ChevronDown class="h-3.5 w-3.5" />
+				<ChevronDown class="size-icon-sm" />
 			{:else}
-				<ChevronRight class="h-3.5 w-3.5" />
+				<ChevronRight class="size-icon-sm" />
 			{/if}

 			<span>Server instructions</span>
diff --git a/ui/apps/chat/src/lib/components/app/misc/CollapsibleSection.svelte b/ui/apps/chat/src/lib/components/app/misc/CollapsibleSection.svelte
index 2a1f78b4a..ffa0e2182 100644
--- a/ui/apps/chat/src/lib/components/app/misc/CollapsibleSection.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/CollapsibleSection.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import CollapsibleRegion from './CollapsibleRegion.svelte';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
 	import { ChevronDown, ChevronUp } from '@lucide/svelte';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import type { Snippet } from 'svelte';

diff --git a/ui/apps/chat/src/lib/components/app/misc/ConversationSelection.svelte b/ui/apps/chat/src/lib/components/app/misc/ConversationSelection.svelte
index 1568f16fa..ca71f59c2 100644
--- a/ui/apps/chat/src/lib/components/app/misc/ConversationSelection.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/ConversationSelection.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
-	import SearchInput from '#lib/components/app/forms/SearchInput.svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import { ScrollArea } from '#lib/components/ui/scroll-area/index.ts';
+	import { SearchInput } from '@ggml-org/llama-ui/app/forms';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import { ScrollArea } from '@ggml-org/llama-ui/ui/scroll-area';
 	import { UI_DATA_ATTRS } from '#lib/constants/index.ts';
 	import { useMarqueeSelection } from '#lib/hooks/use-marquee-selection.svelte.ts';
 	import { SvelteSet } from 'svelte/reactivity';
diff --git a/ui/apps/chat/src/lib/components/app/misc/ScrollCarousel.svelte b/ui/apps/chat/src/lib/components/app/misc/ScrollCarousel.svelte
index 816bcdaf4..cec8cb448 100644
--- a/ui/apps/chat/src/lib/components/app/misc/ScrollCarousel.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/ScrollCarousel.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import { ChevronLeft, ChevronRight } from '@lucide/svelte';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { ScrollCarouselVariant } from '#lib/enums/index.ts';
 	import { useScrollCarousel } from '#lib/hooks/use-scroll-carousel.svelte.ts';
@@ -78,7 +78,7 @@
 >
 	<button
 		class={cn(
-			'absolute z-10 flex h-6 w-6 items-center justify-center rounded-full shadow-md transition-opacity',
+			'absolute z-10 flex size-6 items-center justify-center rounded-full shadow-(--elevation-surface) transition-opacity',
 			isCenter
 				? 'top-1/2 left-4 -translate-y-1/2 bg-background/25 backdrop-blur-xs hover:bg-background/45 disabled:pointer-events-none disabled:opacity-0'
 				: 'left-2 bg-muted backdrop-blur-sm hover:bg-accent',
@@ -111,7 +111,7 @@

 	<button
 		class={cn(
-			'absolute z-10 flex h-6 w-6 items-center justify-center rounded-full shadow-md transition-opacity',
+			'absolute z-10 flex size-6 items-center justify-center rounded-full shadow-(--elevation-surface) transition-opacity',
 			isCenter
 				? 'top-1/2 right-4 -translate-y-1/2 bg-background/25 backdrop-blur-xs hover:bg-background/45 disabled:pointer-events-none disabled:opacity-0'
 				: 'right-2 bg-muted backdrop-blur-sm hover:bg-accent',
diff --git a/ui/apps/chat/src/lib/components/app/misc/TruncatedText.svelte b/ui/apps/chat/src/lib/components/app/misc/TruncatedText.svelte
index 020c3eb42..88c4d899d 100644
--- a/ui/apps/chat/src/lib/components/app/misc/TruncatedText.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/TruncatedText.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';

 	interface Props {
 		text: string;
@@ -33,7 +33,9 @@

 {#if isTruncated && showTooltip}
 	<Tooltip.Root>
-		<Tooltip.Trigger class="{className} min-w-0">
+		<!-- as wide as the plain span below: a trigger that shrank to its text would stop
+		     truncating, flip back to the plain span and loop -->
+		<Tooltip.Trigger class="{className} block w-full min-w-0 text-left">
 			<span bind:this={textElement} class="block truncate">
 				{text}
 			</span>
diff --git a/ui/apps/chat/src/lib/components/app/misc/index.ts b/ui/apps/chat/src/lib/components/app/misc/index.ts
index 89a3c5313..8bb162917 100644
--- a/ui/apps/chat/src/lib/components/app/misc/index.ts
+++ b/ui/apps/chat/src/lib/components/app/misc/index.ts
@@ -58,7 +58,7 @@ export { default as CodeBlockActions } from './CodeBlockActions.svelte';
  * Inline SVG of the application logo. Accepts styling via the standard
  * `class` and `style` props and inherits color via `currentColor`.
  */
-export { default as Logo } from './Logo.svelte';
+export { Logo } from '@ggml-org/llama-ui/app/misc';

 /** Two-line menu glyph for the phone sidebar toggle, its lower line two thirds as long. */
 export { default as MenuIcon } from './MenuIcon.svelte';
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelAvatar.svelte b/ui/apps/chat/src/lib/components/app/models/ModelAvatar.svelte
index 61f679886..eb20342ce 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelAvatar.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelAvatar.svelte
@@ -31,7 +31,7 @@
 		fallback,
 		option,
 		quantPositionClass = '-bottom-1 -right-1',
-		quantSize = 'h-3 w-3',
+		quantSize = 'size-3',
 		showBaseModelAvatar,
 		showQuantBadge = true,
 		showRepoOrgAvatar,
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelBadge.svelte b/ui/apps/chat/src/lib/components/app/models/ModelBadge.svelte
index 14360b4bf..2676db489 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelBadge.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelBadge.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import ModelId from './ModelId.svelte';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { ActionIconCopyToClipboard, BadgeInfo } from '#lib/components/app/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { MODEL_ICON } from '#lib/constants/index.ts';
 	import { modelsStore, serverStore } from '#lib/stores/index.ts';

@@ -29,7 +29,7 @@
 {#snippet badgeContent(triggerProps?: Record<string, unknown>)}
 	<BadgeInfo {...triggerProps ?? {}} class={className} {onclick}>
 		{#snippet icon()}
-			<MODEL_ICON class="h-3 w-3" />
+			<MODEL_ICON class="size-icon-xs" />
 		{/snippet}

 		{#if model}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelCapabilities.svelte b/ui/apps/chat/src/lib/components/app/models/ModelCapabilities.svelte
index 91b32796a..023412df8 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelCapabilities.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelCapabilities.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import ModelCapabilityIcons from './ModelCapabilityIcons.svelte';
+	import { ModelCapabilityIcons } from '@ggml-org/llama-ui/models';
 	import { MODEL_ID } from '#lib/constants/index.ts';
 	import { ModelCapability } from '#lib/enums/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelDraftSubline.svelte b/ui/apps/chat/src/lib/components/app/models/ModelDraftSubline.svelte
index 4d0348219..9d308c0bb 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelDraftSubline.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelDraftSubline.svelte
@@ -40,7 +40,7 @@
 	{/if}

 	{#if state === ModelRowDownloadState.DOWNLOADED}
-		<Check class="ml-auto h-4 w-4 shrink-0 text-green-500" />
+		<Check class="ml-auto size-icon-md shrink-0 text-green-500" />
 	{:else}
 		<span class="ml-auto flex shrink-0 items-center">
 			{#if percent !== null}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelId.svelte b/ui/apps/chat/src/lib/components/app/models/ModelId.svelte
index 524da072e..485ad5682 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelId.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelId.svelte
@@ -1,18 +1,15 @@
+<!--
+	Llama UI's ModelId for a raw model id: parses it, adds the user's display settings (raw names, quantization,
+	tags) and leaves out the auxiliary sidecars.
+-->
 <script lang="ts">
-	import ModelCapabilityIcons from './ModelCapabilityIcons.svelte';
-	import ModelDraftSidecars from './ModelDraftSidecars.svelte';
-	import { Database, ScrollText } from '@lucide/svelte';
+	import { ModelId as LlamaUiModelId } from '@ggml-org/llama-ui/models';
 	import { TruncatedText } from '#lib/components/app/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
-	import { MODEL_BADGE_CLASS, MODEL_VARIANT_BADGE_CLASS } from '#lib/constants/index.ts';
 	import type { ModelDraftSidecar } from '#lib/enums/index.ts';
-	import { HuggingFaceService } from '#lib/services/index.ts';
 	import { ModelsService } from '#lib/services/models.service.ts';
 	import { settingsStore } from '#lib/stores/index.ts';
-	import type { ModelModalities } from '#lib/types/models.js';
-	import { type ModelSidecarBadge } from '#lib/types/models.js';
+	import type { ModelModalities, ModelSidecarBadge } from '#lib/types/models.js';
 	import { isAuxSidecar } from '#lib/utils/index.ts';
-	import { formatParameters } from '#lib/utils/index.ts';

 	interface Props {
 		modelId: string;
@@ -50,41 +47,18 @@
 	}

 	let {
-		aliases,
 		class: className = '',
-		contextLength,
-		draftKinds = [],
 		draftSidecars = [],
-		hideCapabilities = false,
-		hideModalities = false,
-		hideName = false,
-		hideOrgName = false,
 		hideParameters = false,
 		hideQuantization,
 		hideTags,
-		iconsOnNewLine = false,
-		modalities,
 		modelId,
 		showRaw = undefined,
 		showRawTooltip = false,
-		sizeRange,
-		stackId = false,
-		supportsThinking = false,
-		supportsToolUse = false,
 		tags,
-		title,
-		wrap = false,
 		...rest
 	}: Props = $props();

-	const badgeClass = MODEL_BADGE_CLASS;
-	const tagBadgeClass =
-		'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground';
-	const variantBadgeClass = MODEL_VARIANT_BADGE_CLASS;
-
-	/** Alias badges beyond this many collapse into a single `+x more` badge. */
-	const MAX_ALIAS_BADGES = 2;
-
 	let parsed = $derived(ModelsService.parseModelId(modelId));
 	let resolvedShowRaw = $derived(
 		showRaw ?? (settingsStore.config.showRawModelNames as boolean) ?? false
@@ -93,169 +67,22 @@
 		hideQuantization ?? !settingsStore.config.showModelQuantization
 	);
 	let resolvedHideTags = $derived(hideTags ?? !settingsStore.config.showModelTags);
-
-	let uniqueAliases = $derived([...new Set(aliases ?? [])]);
-	let uniqueTags = $derived([...new Set([...(parsed.tags ?? []), ...(tags ?? [])])]);
-	let uniqueDraftSidecars = $derived(draftSidecars.filter((badge) => !isAuxSidecar(badge.kind)));
-	// the model id can already name one of the kinds
-	let uniqueDraftKinds = $derived([
-		...new Set(draftKinds.filter((kind) => kind !== parsed.sidecar))
-	]);
-
-	let primaryAlias = $derived(uniqueAliases.length === 1 ? uniqueAliases[0] : null);
-	let displayName = $derived(primaryAlias ?? parsed.modelName ?? modelId);
-
-	let hasBadges = $derived(
-		parsed.sidecar ||
-			uniqueDraftKinds.length > 0 ||
-			uniqueDraftSidecars.length > 0 ||
-			(parsed.params && !hideParameters) ||
-			(parsed.quantization && !resolvedHideQuantization) ||
-			primaryAlias ||
-			uniqueAliases.length > 1 ||
-			(uniqueTags.length > 0 && !resolvedHideTags)
-	);
 </script>

 {#if resolvedShowRaw}
-	<TruncatedText class="font-medium {className}" showTooltip={false} text={modelId} {...rest} />
+	<TruncatedText class="font-medium {className}" showTooltip={false} text={modelId} />
 {:else}
-	{#snippet nameAndBadges()}
-		{#if !hideName}
-			<span class="min-w-0 truncate font-medium {stackId ? 'basis-full' : ''}">
-				{#if !hideOrgName && parsed.orgName}{parsed.orgName}/{/if}{displayName}
-			</span>
-		{/if}
-
-		{#if hasBadges}
-			<!-- the badges keep their width, so a long id truncates around them instead of
-			     a label being cut in half -->
-			<span
-				class="inline-flex min-w-0 items-center gap-1 overflow-hidden {wrap
-					? 'flex-wrap'
-					: 'shrink-0'}"
-			>
-				{#if parsed.sidecar}
-					<span class={variantBadgeClass} title={`${parsed.sidecar.toUpperCase()} draft model`}>
-						{parsed.sidecar}
-					</span>
-				{/if}
-
-				{#if parsed.params && !hideParameters}
-					<span class={badgeClass}>
-						{parsed.params}{parsed.activatedParams ? `-${parsed.activatedParams}` : ''}
-					</span>
-				{/if}
-
-				{#if parsed.quantization && !resolvedHideQuantization}
-					<span class={badgeClass}>
-						{parsed.quantization}
-					</span>
-				{/if}
-
-				{#each uniqueDraftKinds as kind (kind)}
-					<span class={variantBadgeClass} title="{kind.toUpperCase()} draft model">
-						{kind}
-					</span>
-				{/each}
-
-				<ModelDraftSidecars {draftSidecars} />
-
-				{#if primaryAlias}
-					{#if primaryAlias !== parsed.modelName}
-						<span class="{badgeClass} max-w-32 truncate" title={parsed.modelName ?? modelId}>
-							{parsed.modelName ?? modelId}
-						</span>
-					{/if}
-				{:else if uniqueAliases.length > 1}
-					{#each uniqueAliases.slice(0, MAX_ALIAS_BADGES) as alias (alias)}
-						<span class="{badgeClass} max-w-32 truncate" title={alias}>
-							{alias}
-						</span>
-					{/each}
-
-					{#if uniqueAliases.length > MAX_ALIAS_BADGES}
-						<span class={badgeClass} title={uniqueAliases.slice(MAX_ALIAS_BADGES).join(', ')}>
-							+{uniqueAliases.length - MAX_ALIAS_BADGES} more
-						</span>
-					{/if}
-				{/if}
-
-				{#if uniqueTags.length > 0 && !resolvedHideTags}
-					{#each uniqueTags as tag (tag)}
-						<span class={tagBadgeClass}>{tag}</span>
-					{/each}
-				{/if}
-			</span>
-		{/if}
-	{/snippet}
-
-	<!-- badges, tags and icons do not shrink, so overflow-hidden bounds the id -->
-	<span
-		class="flex min-w-0 items-center gap-1.5 overflow-hidden {wrap
-			? 'flex-wrap'
-			: ''} {iconsOnNewLine ? 'flex-col items-start' : ''} {className}"
-		{title}
+	<LlamaUiModelId
 		{...rest}
-	>
-		<span
-			class="flex min-w-0 items-center gap-1.5 max-md:gap-0.5 {wrap || stackId ? 'flex-wrap' : ''}"
-		>
-			{#if showRawTooltip}
-				<Tooltip.Root>
-					<Tooltip.Trigger class="flex min-w-0 items-center gap-1.5">
-						{@render nameAndBadges()}
-					</Tooltip.Trigger>
-
-					<Tooltip.Content>
-						<p>{modelId}</p>
-					</Tooltip.Content>
-				</Tooltip.Root>
-			{:else}
-				{@render nameAndBadges()}
-			{/if}
-
-			{#if !iconsOnNewLine}
-				<ModelCapabilityIcons
-					{hideCapabilities}
-					{hideModalities}
-					{modalities}
-					{supportsThinking}
-					{supportsToolUse}
-				/>
-			{/if}
-		</span>
-
-		{#if iconsOnNewLine || contextLength || sizeRange}
-			<span class="inline-flex items-center gap-1.5">
-				{#if iconsOnNewLine}
-					<ModelCapabilityIcons
-						{hideCapabilities}
-						{hideModalities}
-						{modalities}
-						{supportsThinking}
-						{supportsToolUse}
-					/>
-				{/if}
-
-				{#if contextLength}
-					<span class="inline-flex items-center gap-1 text-muted-foreground">
-						<ScrollText class="h-3 w-3" />
-
-						<span class="text-xs">{formatParameters(contextLength)}</span>
-					</span>
-				{/if}
-
-				{#if sizeRange}
-					<span class="inline-flex items-center gap-1 text-muted-foreground">
-						<Database class="h-3 w-3" />
-
-						<span class="text-xs"
-							>{HuggingFaceService.formatSizeRange(sizeRange.min, sizeRange.max)}</span
-						>
-					</span>
-				{/if}
-			</span>
-		{/if}
-	</span>
+		activatedParams={parsed.activatedParams ?? undefined}
+		class={className}
+		draftSidecars={draftSidecars.filter((badge) => !isAuxSidecar(badge.kind))}
+		name={parsed.modelName ?? modelId}
+		org={parsed.orgName ?? undefined}
+		params={hideParameters ? undefined : (parsed.params ?? undefined)}
+		quantization={resolvedHideQuantization ? undefined : (parsed.quantization ?? undefined)}
+		sidecar={parsed.sidecar ?? undefined}
+		tags={resolvedHideTags ? [] : [...(parsed.tags ?? []), ...(tags ?? [])]}
+		tooltip={showRawTooltip ? modelId : undefined}
+	/>
 {/if}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte b/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte
index 209b74ba1..4c54d751c 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte
@@ -37,26 +37,26 @@
 		{#if showAction && revealOnHover}
 			{#if isFailed}
 				<MODEL_LOAD_ICONS.failed
-					class="h-3.5 w-3.5 text-red-500 group-hover:hidden [@media(pointer:coarse)]:hidden"
+					class="size-icon-sm text-status-danger group-hover:hidden [@media(pointer:coarse)]:hidden"
 				/>
 			{:else}
 				<span
-					class="h-2 w-2 rounded-full group-hover:hidden [@media(pointer:coarse)]:hidden {isSleeping
-						? 'bg-orange-400'
+					class="size-2 rounded-full group-hover:hidden [@media(pointer:coarse)]:hidden {isSleeping
+						? 'status-lamp orb-warning'
 						: isLoaded
-							? 'bg-green-500'
+							? 'status-lamp orb-success'
 							: 'bg-muted-foreground/50'}"
 				></span>
 			{/if}
 		{:else}
 			{#if isFailed}
-				<MODEL_LOAD_ICONS.failed class="h-3.5 w-3.5 text-red-500" />
+				<MODEL_LOAD_ICONS.failed class="size-icon-sm text-status-danger" />
 			{:else}
 				<span
-					class="h-2 w-2 rounded-full {isSleeping
-						? 'bg-orange-400'
+					class="size-2 rounded-full {isSleeping
+						? 'status-lamp orb-warning'
 						: isLoaded
-							? 'bg-green-500'
+							? 'status-lamp orb-success'
 							: 'bg-muted-foreground/50'}"
 				></span>
 			{/if}
@@ -73,9 +73,9 @@
 		>
 			{#if isFailed}
 				<ActionIcon
-					class="h-5 w-5 text-red-500 hover:text-foreground"
+					class="size-icon-lg text-fg-danger hover:text-foreground"
 					icon={MODEL_LOAD_ICONS.retry}
-					iconSize="h-4 w-4"
+					iconSize="size-icon-md"
 					onclick={() => modelsStore.status.load(option.model)}
 					stopPropagationOnClick
 					tooltip="Retry loading model"
@@ -83,9 +83,9 @@
 				/>
 			{:else if isLoaded || isSleeping}
 				<ActionIcon
-					class="h-5 w-5 hover:text-foreground"
+					class="size-icon-lg hover:text-foreground"
 					icon={MODEL_LOAD_ICONS.unload}
-					iconSize="h-4 w-4"
+					iconSize="size-icon-md"
 					onclick={() => modelsStore.status.unload(option.model)}
 					stopPropagationOnClick
 					tooltip="Unload model"
@@ -93,9 +93,9 @@
 				/>
 			{:else}
 				<ActionIcon
-					class="h-5 w-5 hover:text-foreground"
+					class="size-icon-lg hover:text-foreground"
 					icon={MODEL_LOAD_ICONS.load}
-					iconSize="h-4 w-4"
+					iconSize="size-icon-md"
 					onclick={() => modelsStore.status.load(option.model)}
 					stopPropagationOnClick
 					tooltip="Load model"
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte b/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte
index afd62d72f..39b377b04 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte
@@ -1,130 +1,18 @@
+<!--
+	Llama UI's ModelOrgAvatar, shown only while the Hub metadata setting is on.
+-->
 <script lang="ts">
-	import { DARK_INVERT_AVATAR_ORGS } from '#lib/constants/index.ts';
+	import { ModelOrgAvatar as LlamaUiModelOrgAvatar } from '@ggml-org/llama-ui/models';
 	import { HuggingFaceService } from '#lib/services/index.ts';
-	import { SvelteMap } from 'svelte/reactivity';
+	import type { ComponentProps } from 'svelte';

-	// Avatars a failed request is cooling down for. A failure hides the image
-	// immediately, but the org gets another chance on a later mount: the cooldown
-	// expires on its own, so a transient network blip is not permanent for the
-	// session. A row remounting inside the cooldown renders the monogram instead
-	// of re-requesting the same failing URL.
-	const AVATAR_RETRY_DELAY_MS = 60_000;
-	const failedAvatarOrgs = new SvelteMap<string, number>();
-
-	/** True while an org's failed avatar is still inside its retry cooldown. */
-	function isAvatarCoolingDown(org: string): boolean {
-		const failedAt = failedAvatarOrgs.get(org);
-
-		// a stale entry reads as not failed and is dropped on the next onerror
-		return failedAt !== undefined && Date.now() - failedAt < AVATAR_RETRY_DELAY_MS;
-	}
-
-	interface Props {
-		class?: string;
-		org: string;
-		quantOrg?: string;
-		size?: string;
-		baseImageClass?: string;
-		quantImageClass?: string;
-		quantPositionClass?: string;
-		quantSize?: string;
-	}
-
-	let {
-		baseImageClass = '',
-		class: className = '',
-		org,
-		quantImageClass = 'h-full w-full',
-		quantOrg,
-		quantPositionClass = '-bottom-0.75 -right-0.75',
-		quantSize = 'h-4.25 w-4.25',
-		size = 'h-9 w-9'
-	}: Props = $props();
+	let props: ComponentProps<typeof LlamaUiModelOrgAvatar> = $props();

 	// With the Hub metadata setting off there is nothing to fetch and nothing to
 	// show: the avatar is hidden entirely instead of falling back to a monogram.
 	let hubEnabled = $derived(HuggingFaceService.isEnabled());
-	let orgAvatarFailed = $derived(isAvatarCoolingDown(org));
-	let quantAvatarFailed = $derived(isAvatarCoolingDown(quantOrg ?? ''));
-
-	let invertAvatar = $derived(DARK_INVERT_AVATAR_ORGS.includes(org));
-	let invertQuant = $derived(DARK_INVERT_AVATAR_ORGS.includes(quantOrg ?? ''));
-
-	// Monogram fallback: org initial on a hue derived from its name, so each org
-	// gets a stable distinct color.
-	let hue = $derived.by(() => {
-		let h = 0;
-
-		for (let i = 0; i < org.length; i++) h = (h * 31 + org.charCodeAt(i)) >>> 0;
-
-		return h % 360;
-	});
-
-	let quantHue = $derived.by(() => {
-		const name = quantOrg ?? '';
-
-		let h = 0;
-
-		for (let i = 0; i < name.length; i++) h = (h * 31 + name.charCodeAt(i)) >>> 0;
-
-		return h % 360;
-	});
 </script>

 {#if hubEnabled}
-	<span class="relative inline-flex shrink-0 {className}">
-		{#if orgAvatarFailed}
-			<span
-				aria-hidden="true"
-				class="flex {size} items-center justify-center rounded-md text-sm font-semibold text-white"
-				style="background-color: hsl({hue} 60% 45%)"
-			>
-				{org.charAt(0).toUpperCase()}
-			</span>
-		{:else}
-			<div class="rounded-md">
-				<!-- the server serves the app under COEP require-corp, so a cross-origin
-				     image has to be fetched in CORS mode to be allowed -->
-				<img
-					alt=""
-					class="{size} rounded-md {invertAvatar ? 'dark:invert' : ''} {baseImageClass}"
-					crossorigin="anonymous"
-					loading="lazy"
-					onerror={() => {
-						failedAvatarOrgs.set(org, Date.now());
-					}}
-					src={HuggingFaceService.getAvatarUrl(org)}
-				/>
-			</div>
-		{/if}
-
-		{#if quantOrg && quantOrg !== org}
-			<!-- native title instead of a floating tooltip: long model lists mount one badge per row -->
-			<span
-				class="absolute {quantPositionClass} {quantSize} overflow-hidden rounded-full border border-background bg-muted"
-				title={quantOrg}
-			>
-				{#if quantAvatarFailed}
-					<span
-						aria-hidden="true"
-						class="flex h-full w-full items-center justify-center rounded-full text-[8px] font-semibold text-white"
-						style="background-color: hsl({quantHue} 60% 45%)"
-					>
-						{quantOrg.charAt(0).toUpperCase()}
-					</span>
-				{:else}
-					<img
-						alt=""
-						class="{quantImageClass} rounded-full {invertQuant ? 'dark:invert' : ''}"
-						crossorigin="anonymous"
-						loading="lazy"
-						onerror={() => {
-							failedAvatarOrgs.set(quantOrg ?? '', Date.now());
-						}}
-						src={HuggingFaceService.getAvatarUrl(quantOrg)}
-					/>
-				{/if}
-			</span>
-		{/if}
-	</span>
+	<LlamaUiModelOrgAvatar {...props} />
 {/if}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte b/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte
index 775924e93..33be4c624 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte
@@ -26,9 +26,9 @@
 >
 	<span class={revealOnHover ? revealClass : ''}>
 		<ActionIcon
-			class="h-5 w-5 hover:text-foreground"
+			class="size-icon-lg hover:text-foreground"
 			icon={Info}
-			iconSize="h-4 w-4"
+			iconSize="size-icon-md"
 			onclick={() => uiStore.openModelDetails(option.id)}
 			tooltip="Manage model"
 			tooltipAsTitle
@@ -36,12 +36,12 @@
 	</span>

 	{#if isFav}
-		<span class="flex h-5 w-5 items-center justify-center">
+		<span class="flex size-5 items-center justify-center">
 			<span class="flex group-hover:hidden [@media(pointer:coarse)]:hidden">
 				<ActionIcon
-					class="h-5 w-5 text-rose-500"
+					class="size-icon-lg text-rose-500"
 					icon={Heart}
-					iconSize="h-4 w-4"
+					iconSize="size-icon-md"
 					onclick={() => modelsStore.toggleFavorite(option.model)}
 					tooltip="Remove from favorites"
 					tooltipAsTitle
@@ -50,9 +50,9 @@

 			<span class="hidden group-hover:flex [@media(pointer:coarse)]:flex">
 				<ActionIcon
-					class="h-5 w-5 hover:text-foreground"
+					class="size-icon-lg hover:text-foreground"
 					icon={HeartOff}
-					iconSize="h-4 w-4"
+					iconSize="size-icon-md"
 					onclick={() => modelsStore.toggleFavorite(option.model)}
 					tooltip="Remove from favorites"
 					tooltipAsTitle
@@ -62,9 +62,9 @@
 	{:else}
 		<span class={revealOnHover ? revealClass : ''}>
 			<ActionIcon
-				class="h-5 w-5 hover:text-foreground"
+				class="size-icon-lg hover:text-foreground"
 				icon={Heart}
-				iconSize="h-4 w-4"
+				iconSize="size-icon-md"
 				onclick={() => modelsStore.toggleFavorite(option.model)}
 				tooltip="Add to favorites"
 				tooltipAsTitle
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerDownloadControl.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerDownloadControl.svelte
index 6a5b55408..66bbd0b12 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerDownloadControl.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerDownloadControl.svelte
@@ -35,9 +35,9 @@

 	<div class="hidden group-hover:flex [@media(pointer:coarse)]:flex">
 		<ActionIcon
-			class="h-5 w-5 hover:text-foreground"
+			class="size-icon-lg hover:text-foreground"
 			icon={isPaused ? MODEL_DOWNLOAD_ICONS.resume : MODEL_DOWNLOAD_ICONS.pause}
-			iconSize="h-4 w-4"
+			iconSize="size-icon-md"
 			onclick={() => void modelsStore.status.toggleDownload(option.model)}
 			stopPropagationOnClick
 			tooltip={isPaused ? 'Resume downloading' : 'Pause downloading'}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerFilters.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerFilters.svelte
index 3e3f17abd..27aaf8b2b 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerFilters.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerFilters.svelte
@@ -1,11 +1,10 @@
 <script lang="ts">
+	import * as Select from '@ggml-org/llama-ui/ui/select';
+	import * as ToggleGroup from '@ggml-org/llama-ui/ui/toggle-group';
 	import { ScrollCarousel } from '#lib/components/app/index.ts';
-	import * as Select from '#lib/components/ui/select/index.ts';
-	import * as ToggleGroup from '#lib/components/ui/toggle-group/index.ts';
 	import {
 		CAPABILITY_ICONS,
 		CAPABILITY_LABELS,
-		FILTER_TOGGLE_GROUP_CLASS,
 		FILTER_TOGGLE_ITEM_CLASS,
 		FILTER_TRIGGER_CLASS,
 		MODALITY_FLAG_KEYS,
@@ -118,8 +117,8 @@
 	</Select.Root>

 	<ToggleGroup.Root
-		class={FILTER_TOGGLE_GROUP_CLASS}
 		onValueChange={setToggles}
+		size="icon-sm"
 		type="multiple"
 		value={[...capabilities, ...modalities]}
 	>
@@ -130,7 +129,7 @@
 				title={toggle.label}
 				value={toggle.value}
 			>
-				<toggle.icon class="h-3.5 w-3.5" />
+				<toggle.icon class="size-icon-md" />
 			</ToggleGroup.Item>
 		{/each}
 	</ToggleGroup.Root>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfiguration.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfiguration.svelte
index ffb1af9c8..4af8e0d24 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfiguration.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfiguration.svelte
@@ -1,13 +1,13 @@
 <script lang="ts">
-	import ModelDownloadProgressBar from '../../ModelDownloadProgressBar.svelte';
 	import { downloadProgressFor } from '../utils';
 	import ModelsManagerModelConfigurationActions from './ModelsManagerModelConfigurationActions.svelte';
 	import ModelsManagerModelConfigurationHeader from './ModelsManagerModelConfigurationHeader.svelte';
 	import ModelsManagerModelConfigurationInformation from './ModelsManagerModelConfigurationInformation.svelte';
+	import { ModelDownloadProgressBar } from '@ggml-org/llama-ui/models';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Trash2 } from '@lucide/svelte';
 	import { DialogConfirmDownload } from '#lib/components/app/dialogs/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { ModelDownloadConfirmAction, ServerModelStatus } from '#lib/enums/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
 	import { deviceStore, modelsStore, uiStore } from '#lib/stores/index.ts';
@@ -204,7 +204,7 @@
 		size="sm"
 		variant="ghost"
 	>
-		<Trash2 class="h-4 w-4" />
+		<Trash2 class="size-icon-md" />
 		Delete this model from disk
 	</Button>
 {/snippet}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationActions.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationActions.svelte
index f3c2746b5..9f0183e31 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationActions.svelte
@@ -1,4 +1,5 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import {
 		Compass,
 		Eject,
@@ -10,7 +11,6 @@
 		SquarePen,
 		Trash2
 	} from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { conversationsStore, deviceStore, uiStore } from '#lib/stores/index.ts';

 	interface Props {
@@ -61,28 +61,28 @@
 	{#if isDownload}
 		<!-- an in-flight download cannot load or chat: it pauses, resumes, cancels -->
 		<div class="flex gap-3">
-			<Button class="flex-1 gap-1.5" onclick={onToggleDownload} {size} variant="secondary">
+			<Button class="flex-1 gap-1.5" onclick={onToggleDownload} {size} variant="outline">
 				{#if isDownloadPaused}
-					<Play class="h-3.5 w-3.5" />
+					<Play class="size-icon-md" />

 					Resume downloading
 				{:else}
-					<Pause class="h-3.5 w-3.5" />
+					<Pause class="size-icon-md" />

 					Pause downloading
 				{/if}
 			</Button>

-			<Button class="flex-1 gap-1.5" onclick={onRequestCancelDownload} {size} variant="secondary">
-				<Trash2 class="h-3.5 w-3.5" />
+			<Button class="flex-1 gap-1.5" onclick={onRequestCancelDownload} {size} variant="outline">
+				<Trash2 class="size-icon-md" />

 				Cancel download
 			</Button>
 		</div>

 		{#if onSeeInDiscover && discoverEnabled}
-			<Button class="gap-1.5" onclick={onSeeInDiscover} {size} variant="tertiary">
-				<Compass class="h-3.5 w-3.5" />
+			<Button class="gap-1.5" onclick={onSeeInDiscover} {size} variant="secondary">
+				<Compass class="size-icon-md" />

 				See in Discover
 			</Button>
@@ -92,11 +92,11 @@
 			<!-- a phone picks its model in the manager, so pointing this chat at it leads -->
 			<Button class="w-full gap-1.5" onclick={hasChat ? onUseInChat : onUseInNewChat} {size}>
 				{#if hasChat}
-					<MessageSquare class="h-3.5 w-3.5" />
+					<MessageSquare class="size-icon-md" />

 					Use in this chat
 				{:else}
-					<SquarePen class="h-3.5 w-3.5" />
+					<SquarePen class="size-icon-md" />

 					Start a new chat
 				{/if}
@@ -106,7 +106,7 @@
 		<div class="flex gap-3 mt-2">
 			{#if !isMobile}
 				<Button class="flex-1 gap-1.5" onclick={onUseInNewChat} {size}>
-					<SquarePen class="h-3.5 w-3.5" />
+					<SquarePen class="size-icon-md" />

 					Start a new chat
 				</Button>
@@ -118,18 +118,18 @@
 					disabled={isLoading}
 					onclick={onToggleLoad}
 					{size}
-					variant="secondary"
+					variant="outline"
 				>
 					{#if isLoading}
-						<Loader2 class="h-3.5 w-3.5 animate-spin" />
+						<Loader2 class="size-icon-md animate-spin" />

 						Loading...
 					{:else if isLoaded}
-						<Eject class="h-3.5 w-3.5" />
+						<Eject class="size-icon-md" />

 						Unload model
 					{:else}
-						<Power class="h-3.5 w-3.5" />
+						<Power class="size-icon-md" />

 						Load model
 					{/if}
@@ -137,8 +137,8 @@
 			{/if}

 			{#if onSeeInDiscover && discoverEnabled}
-				<Button class="flex-1 gap-1.5" onclick={onSeeInDiscover} {size} variant="tertiary">
-					<Compass class="h-3.5 w-3.5" />
+				<Button class="flex-1 gap-1.5" onclick={onSeeInDiscover} {size} variant="secondary">
+					<Compass class="size-icon-md" />

 					See in Discover
 				</Button>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationHeader.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationHeader.svelte
index 072b69e26..fd17d4c0d 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationHeader.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
 	import ModelsManagerModelConfigurationActions from './ModelsManagerModelConfigurationActions.svelte';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { X } from '@lucide/svelte';
 	import { ModelAvatar, ModelId } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ServerModelStatus } from '#lib/enums/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';
 	import type { ModelOption } from '#lib/types/models.js';
@@ -57,15 +57,16 @@
 	});

 	let statusDot = $derived.by(() => {
-		if (isDownload) return isDownloadPaused ? 'bg-yellow-500' : 'bg-blue-500 animate-pulse';
+		if (isDownload)
+			return isDownloadPaused ? 'status-lamp orb-warning' : 'status-lamp orb-blue animate-pulse';

-		if (status === ServerModelStatus.FAILED) return 'bg-red-500';
+		if (status === ServerModelStatus.FAILED) return 'status-lamp orb-danger';

 		if (status === ServerModelStatus.LOADING) return 'bg-muted-foreground/50 animate-pulse';

-		if (status === ServerModelStatus.SLEEPING) return 'bg-orange-400';
+		if (status === ServerModelStatus.SLEEPING) return 'status-lamp orb-warning';

-		if (isLoaded) return 'bg-green-500';
+		if (isLoaded) return 'status-lamp orb-success';

 		return 'bg-muted-foreground/50';
 	});
@@ -81,9 +82,9 @@
 			<ModelAvatar
 				{option}
 				quantPositionClass="-bottom-1.5 -right-1.5"
-				quantSize="h-6 w-6"
+				quantSize="size-6"
 				showBaseModelAvatar
-				size="h-12 w-12"
+				size="size-12"
 			/>

 			<div class="min-w-0">
@@ -100,7 +101,7 @@

 				<p class="mt-1 flex items-center gap-x-2 text-xs text-muted-foreground">
 					<span class="flex shrink-0 items-center gap-1">
-						<span class="h-2 w-2 shrink-0 rounded-full {statusDot}"></span>
+						<span class="size-2 shrink-0 rounded-full {statusDot}"></span>

 						{statusLabel}
 					</span>
@@ -112,12 +113,12 @@
 		{#if !isMobile}
 			<Button
 				aria-label="Close details"
-				class="h-7 w-7"
+				class="size-7"
 				onclick={onClose}
 				size="icon"
 				variant="ghost"
 			>
-				<X class="h-4 w-4" />
+				<X class="size-icon-md" />
 			</Button>
 		{/if}
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationInformation.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationInformation.svelte
index 2d14a4e21..f26d64db3 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationInformation.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelConfiguration/ModelsManagerModelConfigurationInformation.svelte
@@ -1,10 +1,10 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
 	import {
 		ActionIconCopyToClipboard,
 		BadgesModality,
 		CollapsibleSection
 	} from '#lib/components/app/index.ts';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
 	import { modelsStore } from '#lib/stores/index.ts';
 	import type { ApiLlamaCppServerProps } from '#lib/types/api.js';
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelDrawer.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelDrawer.svelte
index 4c4804076..32890eb88 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelDrawer.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelDrawer.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import ModelsManagerModelConfiguration from './ModelsManagerModelConfiguration/ModelsManagerModelConfiguration.svelte';
 	import { downloadGroups, findModelOption } from './utils';
-	import * as Drawer from '#lib/components/ui/drawer/index.ts';
+	import * as Drawer from '@ggml-org/llama-ui/ui/drawer';
 	import {
 		conversationsStore,
 		deviceStore,
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelRow.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelRow.svelte
index 62f5f28b8..1f25c3a55 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelRow.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelRow.svelte
@@ -2,12 +2,12 @@
 	import ModelAvatar from '../ModelAvatar.svelte';
 	import ModelCapabilities from '../ModelCapabilities.svelte';
 	import ModelContext from '../ModelContext.svelte';
-	import ModelDownloadProgressBar from '../ModelDownloadProgressBar.svelte';
 	import ModelDraftSubline from '../ModelDraftSubline.svelte';
 	import ModelId from '../ModelId.svelte';
 	import ModelsManagerStatusCell from './ModelsManagerStatusCell.svelte';
 	import { modelRowActions } from './row-actions';
 	import { configuredContext, downloadProgressFor, isRowControlClick } from './utils';
+	import { ModelDownloadProgressBar } from '@ggml-org/llama-ui/models';
 	import { Heart, MoreHorizontal } from '@lucide/svelte';
 	import { ContextMenuActions, DropdownMenuActions } from '#lib/components/app/index.ts';
 	import { MODEL_ROW_GRID_CLASS, MODEL_ROW_TRAILING_CELL_CLASS } from '#lib/constants/index.ts';
@@ -106,7 +106,7 @@

 					{#if favorite}
 						<!-- the heart is decorative, the button's text carries the state -->
-						<Heart aria-hidden="true" class="h-3.5 w-3.5 shrink-0 text-rose-500" />
+						<Heart aria-hidden="true" class="size-icon-sm shrink-0 text-rose-500" />

 						<span class="sr-only">favorited</span>
 					{/if}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelsTable.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelsTable.svelte
index 852317974..e24f4e91b 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelsTable.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerModelsTable.svelte
@@ -9,6 +9,7 @@
 		type ModelQuantGroup,
 		type ModelsTableGroup
 	} from './utils';
+	import * as Empty from '@ggml-org/llama-ui/ui/empty';
 	import {
 		ArrowDown,
 		ArrowUp,
@@ -29,7 +30,6 @@
 		ModelAvatar,
 		ModelsSection
 	} from '#lib/components/app/index.ts';
-	import * as Empty from '#lib/components/ui/empty/index.ts';
 	import {
 		FAMILY_ROW_WINDOW,
 		type ModalityKey,
@@ -218,9 +218,9 @@

 		{#if sortKey === key}
 			{#if sortAsc}
-				<ArrowUp class="h-3 w-3" />
+				<ArrowUp class="size-icon-xs" />
 			{:else}
-				<ArrowDown class="h-3 w-3" />
+				<ArrowDown class="size-icon-xs" />
 			{/if}
 		{/if}
 	</button>
@@ -303,9 +303,9 @@
 				: ''}"
 		>
 			{#if expanded}
-				<ChevronUp class="h-3.5 w-3.5 text-muted-foreground" />
+				<ChevronUp class="size-icon-sm text-muted-foreground" />
 			{:else}
-				<ChevronDown class="h-3.5 w-3.5 text-muted-foreground" />
+				<ChevronDown class="size-icon-sm text-muted-foreground" />
 			{/if}
 		</span>
 	</div>
@@ -370,13 +370,13 @@
 			{#if group.items.length > 0}
 				{#snippet groupIcon()}
 					{#if group.kind === ModelsTableGroupKind.DOWNLOADING}
-						<Download class="h-3.5 w-3.5 shrink-0" />
+						<Download class="size-icon-sm shrink-0" />
 					{:else if group.kind === ModelsTableGroupKind.FAVORITES}
-						<Heart class="h-3.5 w-3.5 shrink-0" />
+						<Heart class="size-icon-sm shrink-0" />
 					{:else if group.kind === ModelsTableGroupKind.LOADED}
-						<Power class="h-3.5 w-3.5 shrink-0" />
+						<Power class="size-icon-sm shrink-0" />
 					{:else if group.kind === ModelsTableGroupKind.HIDDEN}
-						<EyeOff class="h-3.5 w-3.5 shrink-0" />
+						<EyeOff class="size-icon-sm shrink-0" />
 					{:else if group.kind === ModelsTableGroupKind.LOCAL}
 						<Logo class="shrink-0" style="--size: 0.875rem" />
 					{/if}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerQuantRow.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerQuantRow.svelte
index 3488d47f4..2099309e5 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerQuantRow.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerQuantRow.svelte
@@ -1,15 +1,16 @@
 <script lang="ts">
 	import ModelContext from '../ModelContext.svelte';
-	import ModelDraftSidecars from '../ModelDraftSidecars.svelte';
 	import ModelsManagerStatusCell from './ModelsManagerStatusCell.svelte';
 	import { modelRowActions } from './row-actions';
 	import { configuredContext, isRowControlClick } from './utils';
+	import { ModelDraftSidecars } from '@ggml-org/llama-ui/models';
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
 	import { MoreHorizontal } from '@lucide/svelte';
 	import { ContextMenuActions, DropdownMenuActions } from '#lib/components/app/index.ts';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
 	import { MODEL_ROW_GRID_CLASS, MODEL_ROW_TRAILING_CELL_CLASS } from '#lib/constants/index.ts';
 	import { modelsStore } from '#lib/stores/index.ts';
 	import type { ModelOption } from '#lib/types/models.js';
+	import { isAuxSidecar } from '#lib/utils/index.ts';

 	interface Props {
 		isFavorite: (option: ModelOption) => boolean;
@@ -60,7 +61,9 @@
 		>
 			<Badge class="h-5 shrink-0 px-1.5 text-[10px]" variant="secondary">{quant}</Badge>

-			<ModelDraftSidecars draftSidecars={option.draftSidecars} />
+			<ModelDraftSidecars
+				draftSidecars={option.draftSidecars?.filter((badge) => !isAuxSidecar(badge.kind))}
+			/>

 			<span class="truncate text-sm text-muted-foreground">{option.model}</span>
 		</button>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerRepoRow.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerRepoRow.svelte
index c3e8c80bf..eee8d9ebb 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerRepoRow.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerRepoRow.svelte
@@ -79,17 +79,17 @@

 	<span class="justify-self-center max-md:hidden">
 		<span
-			class="block h-2.5 w-2.5 rounded-full {anyLoaded
-				? 'bg-emerald-500'
+			class="block size-2.5 rounded-full {anyLoaded
+				? 'status-lamp orb-success'
 				: 'border border-muted-foreground/50'}"
 		></span>
 	</span>

 	<span class="flex justify-center {MODEL_ROW_TRAILING_CELL_CLASS}">
 		{#if expanded}
-			<ChevronUp class="h-3.5 w-3.5 text-muted-foreground" />
+			<ChevronUp class="size-icon-sm text-muted-foreground" />
 		{:else}
-			<ChevronDown class="h-3.5 w-3.5 text-muted-foreground" />
+			<ChevronDown class="size-icon-sm text-muted-foreground" />
 		{/if}
 	</span>
 </div>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerTableToolbar.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerTableToolbar.svelte
index ed4e4687f..5fea4873d 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerTableToolbar.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerTableToolbar.svelte
@@ -1,9 +1,9 @@
 <script lang="ts">
 	import ModelsManagerFilters from './ModelsManagerFilters.svelte';
 	import { hasActiveFilters } from './utils';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { X } from '@lucide/svelte';
 	import { SearchInput } from '#lib/components/app/forms/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { type ModalityKey } from '#lib/constants/index.ts';
 	import { ModelCapability } from '#lib/enums/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';
@@ -74,7 +74,7 @@
 			size="sm"
 			variant="ghost"
 		>
-			<X class="h-3.5 w-3.5" />
+			<X class="size-icon-md" />

 			Clear filters
 		</Button>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSection.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSection.svelte
index d411c8729..de731fc44 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSection.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSection.svelte
@@ -72,7 +72,7 @@
 				}}
 				type="button"
 			>
-				<ChevronLeft class="h-3.5 w-3.5" />
+				<ChevronLeft class="size-icon-sm" />
 			</button>
 		{/if}

@@ -83,9 +83,9 @@
 		<span class="truncate">{label}</span>

 		{#if loading}
-			<Loader2 class="h-3 w-3 shrink-0 animate-spin" />
+			<Loader2 class="size-icon-xs shrink-0 animate-spin" />
 		{:else if error}
-			<CircleAlert class="h-3 w-3 shrink-0 text-destructive" />
+			<CircleAlert class="size-icon-xs shrink-0 text-destructive" />
 		{/if}

 		{#if count !== undefined}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte
index 742f13230..ba8741883 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte
@@ -1,5 +1,6 @@
 <script lang="ts">
 	import ModelLoadHighlight from '../ModelLoadHighlight.svelte';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { ChevronDown, Loader2 } from '@lucide/svelte';
 	import {
 		ModelId,
@@ -9,7 +10,6 @@
 		ModelsSelectorOption,
 		ModelsSelectorTriggerIcon
 	} from '#lib/components/app/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import {
 		DROPDOWN_MENU_CONTENT_SEARCH_SELECTOR,
 		MODEL_ICON,
@@ -217,7 +217,7 @@

 {#snippet selectorTriggerInner()}
 	<ModelsSelectorTriggerIcon
-		class="mr-0.375 size-3.5 max-md:size-4 shrink-0"
+		class="mr-0.375 size-icon-sm max-md:size-icon-md shrink-0"
 		option={selectedOption}
 	/>

@@ -275,7 +275,7 @@
 			<button
 				aria-disabled="true"
 				aria-selected="true"
-				class="flex w-full cursor-not-allowed items-center bg-red-400/10 p-2 text-left text-sm text-red-400"
+				class="flex w-full cursor-not-allowed items-center bg-surface-danger p-2 text-left text-sm text-fg-danger"
 				disabled
 				role="option"
 				type="button"
@@ -311,7 +311,7 @@

 {#if ms.loading && ms.options.length === 0 && ms.isMultiModel}
 	<div class="flex items-center gap-2 text-xs text-muted-foreground">
-		<Loader2 class="h-3.5 w-3.5 animate-spin" />
+		<Loader2 class="size-icon-sm animate-spin" />

 		Loading models...
 	</div>
@@ -321,7 +321,7 @@
 			class="inline-flex items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs text-muted-foreground"
 			style="max-width: min(calc(100cqw - 10rem), 48rem)"
 		>
-			<MODEL_ICON class="h-3.5 w-3.5 shrink-0" />
+			<MODEL_ICON class="size-icon-sm shrink-0" />
 		</span>
 	{:else}
 		<span class="text-xs text-muted-foreground">No models yet.</span>
@@ -329,7 +329,7 @@
 {:else if ms.isMultiModel}
 	{#if isMobile}
 		<button
-			class="relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 max-md:gap-1.5 max-md:h-7 max-md:px-2.25 max-md:py-1 max-md:text-[13px] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground"
+			class="relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-xs shadow-(--chat-form-key-shadow) transition hover:bg-muted-foreground/20 max-md:gap-1.5 max-md:h-7 max-md:px-2.25 max-md:py-1 max-md:text-[13px] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground"
 			disabled={disabled || ms.updating}
 			onclick={() => ms.handleOpenChange(true)}
 			style="max-width: min(calc(100vw-4rem), 32rem)"
@@ -366,7 +366,7 @@
 	<!-- a phone has no manager: the single model still gets the drawer, so its
 	     load control, actions and information stay reachable -->
 	<button
-		class="relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 max-md:gap-1.5 max-md:h-7 max-md:px-2.25 max-md:py-1 max-md:text-[13px] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground"
+		class="relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-xs shadow-(--chat-form-key-shadow) transition hover:bg-muted-foreground/20 max-md:gap-1.5 max-md:h-7 max-md:px-2.25 max-md:py-1 max-md:text-[13px] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground"
 		disabled={disabled || ms.updating}
 		onclick={() => ms.handleOpenChange(true)}
 		style="max-width: min(calc(100vw-4rem), 32rem)"
@@ -396,9 +396,9 @@
 				<button
 					{...props}
 					class={[
-						`inline-flex cursor-pointer items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground`,
+						`inline-flex cursor-pointer items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-(--chat-form-key-shadow) transition hover:bg-muted-foreground/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground`,
 						!ms.isCurrentModelInCache
-							? 'bg-red-400/10 text-red-400! hover:bg-red-400/20 hover:text-red-400'
+							? 'bg-surface-danger text-fg-danger! hover:bg-surface-danger/80 hover:text-fg-danger'
 							: forceForegroundText
 								? 'text-foreground'
 								: 'text-foreground',
@@ -408,7 +408,10 @@
 					onclick={() => ms.handleOpenChange(true)}
 					style="max-width: min(calc(100cqw - 6.5rem), 32rem)"
 				>
-					<ModelsSelectorTriggerIcon class="mr-0.375 size-3.5 shrink-0" option={selectedOption} />
+					<ModelsSelectorTriggerIcon
+						class="mr-0.375 size-icon-sm shrink-0"
+						option={selectedOption}
+					/>

 					{#if selectedOption}
 						<ModelId
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDownloadItem.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDownloadItem.svelte
index 0de2898c1..012b7e7c9 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDownloadItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDownloadItem.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
-	import ModelDownloadProgressBar from '../ModelDownloadProgressBar.svelte';
 	import ModelDraftSubline from '../ModelDraftSubline.svelte';
 	import ModelOrgAvatar from '../ModelOrgAvatar.svelte';
+	import { ModelDownloadProgressBar } from '@ggml-org/llama-ui/models';
 	import { Info, Loader2, Pause, Play, X } from '@lucide/svelte';
 	import { ActionIcon, ModelId } from '#lib/components/app/index.ts';
 	import { ModelRowDownloadState } from '#lib/enums/index.ts';
@@ -81,8 +81,8 @@
 					org={fetchedBaseModelOrg ?? orgName}
 					quantOrg={orgName}
 					quantPositionClass="-bottom-1 -right-1"
-					quantSize="h-3 w-3"
-					size="h-6 w-6"
+					quantSize="size-3"
+					size="size-6"
 				/>
 			{/if}

@@ -107,30 +107,30 @@
 		     when paused; opacity only for the spinner, the spin owns the transform -->
 		<button
 			aria-label={actionText}
-			class="relative inline-flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center"
+			class="relative inline-flex size-5 shrink-0 cursor-pointer items-center justify-center"
 			onclick={() => void modelsStore.status.toggleDownload(entry.repoWithTag)}
 			type="button"
 		>
 			{#if entry.isPaused}
 				<Play
-					class="absolute h-4 w-4 scale-75 opacity-0 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
+					class="absolute size-icon-md scale-75 opacity-0 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			{:else}
 				<Loader2
-					class="absolute h-4 w-4 animate-spin text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+					class="absolute size-icon-md animate-spin text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
 				/>

 				<Pause
-					class="absolute h-4 w-4 opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
+					class="absolute size-icon-md opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			{/if}
 		</button>

 		<!-- the row actions keep the sizing and reveal of the other selector rows -->
 		<ActionIcon
-			class="pointer-events-none h-5 w-5 shrink-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 hover:text-foreground [@media(pointer:coarse)]:pointer-events-auto [@media(pointer:coarse)]:opacity-100"
+			class="pointer-events-none size-icon-lg shrink-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 hover:text-foreground [@media(pointer:coarse)]:pointer-events-auto [@media(pointer:coarse)]:opacity-100"
 			icon={Info}
-			iconSize="h-4 w-4"
+			iconSize="size-icon-md"
 			onclick={() => uiStore.openModelDetails(entry.repoWithTag)}
 			tooltip="Manage model"
 			tooltipAsTitle
@@ -138,9 +138,9 @@

 		<ActionIcon
 			ariaLabel="Cancel downloading"
-			class="pointer-events-none h-5 w-5 shrink-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 hover:text-destructive [@media(pointer:coarse)]:pointer-events-auto [@media(pointer:coarse)]:opacity-100"
+			class="pointer-events-none size-icon-lg shrink-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 hover:text-destructive [@media(pointer:coarse)]:pointer-events-auto [@media(pointer:coarse)]:opacity-100"
 			icon={X}
-			iconSize="h-4 w-4"
+			iconSize="size-icon-md"
 			onclick={() => onRequestCancel?.(entry.repoWithTag)}
 		/>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDrawer.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDrawer.svelte
index a07866196..4a0f24360 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDrawer.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDrawer.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Drawer, DrawerContent } from '@ggml-org/llama-ui/ui/drawer';
 	import { DropdownMenuSearchable } from '#lib/components/app/index.ts';
-	import { Drawer, DrawerContent } from '#lib/components/ui/drawer/index.ts';
 	import { uiStore } from '#lib/stores/index.ts';
 	import type { Snippet } from 'svelte';

diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte
index 561299c99..c8900aa64 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte
@@ -1,5 +1,7 @@
 <script lang="ts">
 	import ModelLoadHighlight from '../ModelLoadHighlight.svelte';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { ChevronDown, Loader2 } from '@lucide/svelte';
 	import {
 		DropdownMenuSearchable,
@@ -8,8 +10,6 @@
 		ModelsSelectorOption,
 		ModelsSelectorTriggerIcon
 	} from '#lib/components/app/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { MODEL_ICON } from '#lib/constants/index.ts';
 	import { KeyboardKey, ServerModelStatus } from '#lib/enums/index.ts';
 	import type { UseModelsSelectorReturn } from '#lib/hooks/use-models-selector.svelte.ts';
@@ -97,7 +97,7 @@
 </script>

 {#snippet selectorTriggerInner()}
-	<ModelsSelectorTriggerIcon class="mr-0.375 size-3.5 shrink-0" option={selectedOption} />
+	<ModelsSelectorTriggerIcon class="mr-0.375 size-icon-sm shrink-0" option={selectedOption} />

 	<span class="flex min-w-0 items-center gap-0.5">
 		{#if selectedOption}
@@ -154,9 +154,9 @@
 				<DropdownMenu.Trigger
 					{...props}
 					class={[
-						`relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 max-md:h-8 max-md:px-2.25 max-md:py-1.25 max-md:text-[13px] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground`,
+						`relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-xs shadow-(--chat-form-key-shadow) transition hover:bg-muted-foreground/20 max-md:h-8 max-md:px-2.25 max-md:py-1.25 max-md:text-[13px] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground`,
 						!ms.isCurrentModelInCache
-							? 'bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400'
+							? 'border-line-danger-soft bg-surface-danger !text-fg-danger hover:bg-surface-danger/80'
 							: 'text-foreground',
 						open && 'text-foreground',
 						'max-w-[min(calc(100vw-4rem) md:max-w-[min(calc(100cqw-9rem),25rem)]'
@@ -208,7 +208,7 @@
 			{#snippet footer()}
 				<DropdownMenu.Group class="px-2">
 					<DropdownMenu.Item class="gap-2" onSelect={handleManageModels}>
-						<MODEL_ICON class="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+						<MODEL_ICON class="size-icon-md shrink-0 text-muted-foreground" />

 						Manage models
 					</DropdownMenu.Item>
@@ -225,7 +225,7 @@
 			<button
 				aria-disabled="true"
 				aria-selected="true"
-				class="flex w-full cursor-not-allowed items-center bg-red-400/10 p-2 text-left text-sm text-red-400"
+				class="flex w-full cursor-not-allowed items-center bg-surface-danger p-2 text-left text-sm text-fg-danger"
 				disabled
 				role="option"
 				type="button"
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorList.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorList.svelte
index 27ce6106e..4e0b81d97 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorList.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorList.svelte
@@ -1,5 +1,6 @@
 <script lang="ts">
 	import ModelsSelectorDownloadItem from './ModelsSelectorDownloadItem.svelte';
+	import { Logo } from '@ggml-org/llama-ui/app/misc';
 	import { Heart, Power } from '@lucide/svelte';
 	import { DialogConfirmDownload } from '#lib/components/app/dialogs/index.ts';
 	import {
@@ -8,7 +9,6 @@
 		ModelsSection,
 		ModelsSelectorOption
 	} from '#lib/components/app/index.ts';
-	import Logo from '#lib/components/app/misc/Logo.svelte';
 	import {
 		LOCAL_BACKEND_ID,
 		MODEL_ROW_WINDOW,
@@ -177,7 +177,7 @@
 		sticky
 	>
 		{#snippet icon()}
-			<Power class="h-3.5 w-3.5 shrink-0" />
+			<Power class="size-icon-sm shrink-0" />
 		{/snippet}

 		{#each loaded as item (item.option.id)}
@@ -190,7 +190,7 @@
 	<!-- Favorites come first; the sections below skip them -->
 	<ModelsSection label="Favorites" persistKey="favorites" revealChevronOnHover sticky>
 		{#snippet icon()}
-			<Heart class="h-3.5 w-3.5 shrink-0" />
+			<Heart class="size-icon-sm shrink-0" />
 		{/snippet}

 		{#each favorites as item (`fav-${item.option.id}`)}
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorTriggerIcon.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorTriggerIcon.svelte
index f07109c0f..a7be8dc17 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorTriggerIcon.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorTriggerIcon.svelte
@@ -9,7 +9,7 @@
 		option?: ModelOption | null;
 	}

-	let { class: className = 'h-3.5 w-3.5', option }: Props = $props();
+	let { class: className = 'size-icon-sm', option }: Props = $props();
 </script>

 {#if option}
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscover.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscover.svelte
index 800439f65..46cc9d16a 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscover.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscover.svelte
@@ -1,5 +1,6 @@
 <script lang="ts">
 	import ModelsDiscoverListItem from './ModelsDiscoverList/ModelsDiscoverListItem.svelte';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { Download } from '@lucide/svelte';
 	import { DialogConfirmDownload } from '#lib/components/app/dialogs/index.ts';
 	import { ModelsSection } from '#lib/components/app/index.ts';
@@ -8,7 +9,6 @@
 		ModelsDiscoverList,
 		ModelsDiscoverListSearch
 	} from '#lib/components/app/models/discover/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ModelDownloadConfirmAction } from '#lib/enums/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
 	import { modelsDiscoverStore, modelsStore, uiStore } from '#lib/stores/index.ts';
@@ -147,7 +147,7 @@
 			stickyClass="sticky z-10 bg-background"
 		>
 			{#snippet icon()}
-				<Download class="h-3.5 w-3.5 shrink-0" />
+				<Download class="size-icon-sm shrink-0" />
 			{/snippet}

 			{#each downloadEntries as entry (entry.repoWithTag)}
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverChatTemplateDialog.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverChatTemplateDialog.svelte
index df706e0bc..8cfe3c93e 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverChatTemplateDialog.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverChatTemplateDialog.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Dialog from '@ggml-org/llama-ui/ui/dialog';
 	import { Check, Copy, X } from '@lucide/svelte';
 	import { SyntaxHighlightedCode } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Dialog from '#lib/components/ui/dialog/index.ts';
 	import { COPY_FEEDBACK_RESET_MS } from '#lib/constants/index.ts';
 	import { copyToClipboard } from '#lib/utils/index.ts';

@@ -45,12 +45,12 @@
 				class="h-auto gap-1.5 px-2 py-1 text-xs"
 				onclick={() => void copy()}
 				size="sm"
-				variant="tertiary"
+				variant="secondary"
 			>
 				{#if copied}
-					<Check class="size-3.5 text-green-500" />
+					<Check class="size-icon-sm text-fg-success" />
 				{:else}
-					<Copy class="size-3.5" />
+					<Copy class="size-icon-sm" />
 				{/if}

 				Copy
@@ -61,7 +61,7 @@
 				class="ml-auto inline-flex cursor-pointer items-center justify-center rounded-md p-1.5 text-muted-foreground/70 transition-colors hover:bg-muted-foreground/10 hover:text-foreground"
 				type="button"
 			>
-				<X class="h-4 w-4" />
+				<X class="size-icon-md" />
 			</Dialog.Close>
 		</Dialog.Header>

diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptions.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptions.svelte
index a71ed4400..ce0e8283a 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptions.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptions.svelte
@@ -1,9 +1,9 @@
 <script lang="ts">
 	import { classify, draftBadgeOf, sortDraftKinds } from './download-options.utils';
 	import ModelsDiscoverDetailsDownloadOptionsRow from './ModelsDiscoverDetailsDownloadOptionsRow.svelte';
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import * as Select from '@ggml-org/llama-ui/ui/select';
 	import { DialogConfirmDownload } from '#lib/components/app/dialogs/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import * as Select from '#lib/components/ui/select/index.ts';
 	import {
 		ModelDownloadConfirmAction,
 		ModelDraftSidecar,
@@ -186,7 +186,7 @@
 </script>

 {#if bitDepthRows.length}
-	<section class="rounded-3xl border border-border/30 bg-muted/60 shadow-sm dark:border-border/20">
+	<section class="rounded-3xl bg-muted/60 elevated-control">
 		<!-- One chip per main quant, each an independent download action. The draft
 			 of that quant rides with it and badges the chip; the server picks its file,
 			 the way -hf does. -->
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte
index 1a2324ced..407f5786c 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Select from '@ggml-org/llama-ui/ui/select';
 	import { Check, Copy } from '@lucide/svelte';
-	import * as Select from '#lib/components/ui/select/index.ts';
 	import {
 		COPY_FEEDBACK_RESET_MS,
 		MODEL_ID,
@@ -61,7 +61,7 @@
 </script>

 <div
-	class="relative flex items-center gap-2 overflow-hidden rounded-lg border border-border/40 bg-background py-2.5 pl-4 pr-10 shadow-xs dark:border-border/35 dark:bg-background/50"
+	class="relative flex items-center gap-2 overflow-hidden rounded-lg bg-background py-2.5 pl-4 pr-10 elevated-control dark:bg-background/50"
 >
 	<!-- Single line: long commands scroll horizontally instead of wrapping. -->
 	<div
@@ -128,9 +128,9 @@
 		type="button"
 	>
 		{#if copied}
-			<Check class="h-3.5 w-3.5 text-green-500" />
+			<Check class="size-icon-sm text-fg-success" />
 		{:else}
-			<Copy class="h-3.5 w-3.5" />
+			<Copy class="size-icon-sm" />
 		{/if}
 	</button>
 </div>
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDraftDownloadButton.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDraftDownloadButton.svelte
index 068e76d15..2ba973c2c 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDraftDownloadButton.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDraftDownloadButton.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Download } from '@lucide/svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
 	import { modelsStore } from '#lib/stores/index.ts';
 	import type { ModelCompanionDraft } from '#lib/types/index.ts';
@@ -36,7 +36,7 @@
 			<button
 				{...props}
 				aria-label={tooltipText}
-				class="group relative inline-flex h-auto cursor-pointer items-center gap-1 rounded-md border border-dashed border-border/60 px-2 py-1 text-left font-mono text-xs shadow-sm transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] hover:bg-muted-foreground/10 hover:border-border active:scale-[0.97] dark:border-border/40 dark:hover:bg-muted-foreground/15"
+				class="group relative inline-flex h-auto cursor-pointer items-center gap-1 rounded-md border border-dashed border-border/60 px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] hover:bg-muted-foreground/10 hover:border-border active:scale-[0.97] dark:border-border/40 dark:hover:bg-muted-foreground/15"
 				onclick={addDraft}
 				type="button"
 			>
@@ -49,7 +49,7 @@
 				<span>{HuggingFaceService.formatFileSize(companion.size)}</span>

 				<Download
-					class="h-3.5 w-3.5 text-muted-foreground transition-colors duration-150 group-hover:text-foreground"
+					class="size-icon-sm text-muted-foreground transition-colors duration-150 group-hover:text-foreground"
 				/>
 			</button>
 		{/snippet}
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte
index 1a8bf4985..77657058c 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
-	import ModelDownloadProgressBar from '../../../ModelDownloadProgressBar.svelte';
 	import { labelFor } from './download-options.utils';
+	import { ModelDownloadProgressBar } from '@ggml-org/llama-ui/models';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { Check, Download, Loader2, Pause, Play, RotateCw, X } from '@lucide/svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
 	import { modelsStore } from '#lib/stores/index.ts';
 	import type { ModelQuantChip } from '#lib/types/index.ts';
@@ -90,7 +90,7 @@
 			{companion.kind}{companion.quant ? `:${companion.quant}` : ''}

 			{#if companion.onDisk}
-				<Check class="h-2.5 w-2.5" />
+				<Check class="size-2.5" />
 			{/if}
 		</span>
 	{/if}
@@ -119,7 +119,7 @@
 	<button
 		{...props}
 		aria-label={tooltipText}
-		class="group relative inline-flex h-auto cursor-pointer items-center gap-1 rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-sm transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
+		class="group relative inline-flex h-auto cursor-pointer items-center gap-1 rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
 					border-green-600/25 bg-green-500/5 hover:border-destructive/50 hover:bg-destructive/10 dark:border-green-500/30 dark:bg-green-500/10 dark:hover:border-destructive/50 dark:hover:bg-destructive/15"
 		onclick={() => onRequestDelete?.(entry.repoWithTag)}
 		type="button"
@@ -131,13 +131,13 @@
 		<span>{HuggingFaceService.formatFileSize(downloadBytes)}</span>

 		<!-- icon slot: crossfade check -> x; touch devices show the delete affordance directly -->
-		<span class="relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center">
+		<span class="relative inline-flex size-3.5 shrink-0 items-center justify-center">
 			<Check
-				class="absolute h-3.5 w-3.5 text-green-500 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-75 group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+				class="absolute size-icon-sm text-green-500 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-75 group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
 			/>

 			<X
-				class="absolute h-3.5 w-3.5 scale-75 text-destructive opacity-0 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
+				class="absolute size-icon-sm scale-75 text-destructive opacity-0 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 			/>
 		</span>
 	</button>
@@ -167,25 +167,25 @@
 		{#if entry.isDownloading}
 			<!-- spinner fades into the pause affordance on hover; opacity only, the
 			     spin keyframes own the transform so scale would fight them -->
-			<span class="relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center">
+			<span class="relative inline-flex size-3.5 shrink-0 items-center justify-center">
 				<Loader2
-					class="absolute h-3.5 w-3.5 animate-spin text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+					class="absolute size-icon-sm animate-spin text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
 				/>

 				<Pause
-					class="absolute h-3.5 w-3.5 opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			</span>
 		{:else}
 			<!-- paused: the state at rest, the resume affordance taking its place on
 			     hover, the way the spinner gives way to the pause action above -->
-			<span class="relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center">
+			<span class="relative inline-flex size-3.5 shrink-0 items-center justify-center">
 				<Pause
-					class="absolute h-3.5 w-3.5 text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+					class="absolute size-icon-sm text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
 				/>

 				<Play
-					class="absolute h-3.5 w-3.5 opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			</span>
 		{/if}
@@ -198,12 +198,12 @@
 	<button
 		{...props}
 		aria-label="Cancel downloading"
-		class="relative grid h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center text-muted-foreground/70"
+		class="relative grid size-3.5 shrink-0 cursor-pointer items-center justify-center text-muted-foreground/70"
 		onclick={() => onRequestCancel?.(entry.repoWithTag)}
 		type="button"
 	>
 		<X
-			class="h-3.5 w-3.5 transition-[opacity,transform,color] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] text-destructive [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
+			class="size-icon-sm transition-[opacity,transform,color] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] text-destructive [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 		/>
 	</button>
 {/snippet}
@@ -213,7 +213,7 @@
 	<button
 		{...props}
 		aria-label={tooltipText}
-		class="group relative inline-flex h-auto cursor-pointer items-center gap-1 overflow-hidden rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-sm transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
+		class="group relative inline-flex h-auto cursor-pointer items-center gap-1 overflow-hidden rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
 				border-border/30 bg-background hover:bg-muted-foreground/10 dark:border-border/20 dark:bg-muted-foreground/15 dark:text-secondary-foreground dark:hover:bg-muted-foreground/25
 				{entry.isFailed ? 'border-destructive!' : ''}"
 		onclick={() => void startDownload()}
@@ -221,7 +221,7 @@
 	>
 		{#if entry.isFailed}
 			<span
-				class="rounded-md bg-destructive px-1 py-0.5 text-[10px] font-semibold tracking-wide text-destructive-foreground uppercase"
+				class="rounded-md bg-(--badge-danger-background) px-1 py-0.5 text-[10px] font-semibold tracking-wide text-(--badge-danger-text) uppercase"
 			>
 				Failed
 			</span>
@@ -231,12 +231,12 @@

 		<span>{HuggingFaceService.formatFileSize(downloadBytes)}</span>

-		<span class="inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center">
+		<span class="inline-flex size-3.5 shrink-0 items-center justify-center">
 			{#if entry.isFailed}
-				<RotateCw class="h-3.5 w-3.5 text-destructive" />
+				<RotateCw class="size-icon-sm text-destructive" />
 			{:else}
 				<Download
-					class="h-3.5 w-3.5 text-muted-foreground transition-colors duration-150 group-hover:text-foreground"
+					class="size-icon-sm text-muted-foreground transition-colors duration-150 group-hover:text-foreground"
 				/>
 			{/if}
 		</span>
@@ -250,7 +250,7 @@
 	     inside the chip cancels the download. The X slot is reserved, so the chip
 	     never reflows when the affordance fades in -->
 	<div
-		class="group relative inline-flex h-auto items-center gap-1 overflow-hidden rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-sm transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
+		class="group relative inline-flex h-auto items-center gap-1 overflow-hidden rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
 			{entry.isPaused
 			? 'border-yellow-600/40 bg-yellow-500/10 hover:bg-yellow-500/20 dark:border-yellow-500/30 dark:bg-yellow-500/10'
 			: 'border-border/30 bg-background hover:bg-muted-foreground/10 dark:border-border/20 dark:bg-muted-foreground/15'}"
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsRow.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsRow.svelte
index 37d492e3c..c50758575 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsRow.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsRow.svelte
@@ -87,7 +87,7 @@
 				{/if}

 				<ChevronDown
-					class="h-3 w-3 shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] {commandOpen
+					class="size-icon-xs shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] {commandOpen
 						? 'rotate-180'
 						: ''}"
 				/>
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHeader.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHeader.svelte
index ad0836df5..136acf32e 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHeader.svelte
@@ -1,10 +1,10 @@
 <script lang="ts">
-	import ModelCapabilityIcons from '../../ModelCapabilityIcons.svelte';
 	import ModelOrgAvatar from '../../ModelOrgAvatar.svelte';
 	import ModelsDiscoverDetailsHfHubStats from './ModelsDiscoverDetailsHfHubStats.svelte';
 	import ModelsDiscoverDetailsMetadata from './ModelsDiscoverDetailsMetadata.svelte';
+	import { ModelCapabilityIcons } from '@ggml-org/llama-ui/models';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { ExternalLink } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { HuggingFaceService } from '#lib/services/index.ts';
 	import type { HfModelDetailInfo, HfModelGguf } from '#lib/types/huggingface.js';
 	import type { ModelModalities } from '#lib/types/models.js';
@@ -48,8 +48,8 @@
 				org={avatarOrg}
 				{quantOrg}
 				quantPositionClass="-bottom-1.5 -right-1.5"
-				quantSize="h-6 w-6"
-				size="h-12 w-12"
+				quantSize="size-6"
+				size="size-12"
 			/>

 			<div class="min-w-0">
@@ -58,7 +58,7 @@

 					<ModelCapabilityIcons
 						gapClass="gap-2"
-						iconSize="h-4 w-4"
+						iconSize="size-icon-md"
 						{modalities}
 						supportsThinking={hasReasoning}
 						supportsToolUse={hasTools}
@@ -76,7 +76,7 @@
 							rel="noopener noreferrer"
 							target="_blank"
 						>
-							<ExternalLink class="h-3 w-3" />
+							<ExternalLink class="size-icon-xs" />
 						</a>
 					</div>
 				{/if}
@@ -89,9 +89,9 @@
 			rel="noopener noreferrer"
 			size="sm"
 			target="_blank"
-			variant="tertiary"
+			variant="secondary"
 		>
-			<img alt="" class="h-3.5 w-3.5" src={asset('recommended-mcp/huggingface.ico')} />
+			<img alt="" class="size-3.5" src={asset('recommended-mcp/huggingface.ico')} />

 			View on Hugging Face

diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHfHubStats.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHfHubStats.svelte
index 11381aa46..9fd00e11f 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHfHubStats.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsHfHubStats.svelte
@@ -13,14 +13,14 @@
 <div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground">
 	{#if typeof details.downloads === 'number'}
 		<span class="inline-flex items-center gap-1.5">
-			<Download class="h-3.5 w-3.5" />
+			<Download class="size-icon-sm" />
 			{HuggingFaceService.formatDownloads(details.downloads)}
 		</span>
 	{/if}

 	{#if typeof details.likes === 'number'}
 		<span class="inline-flex items-center gap-1.5">
-			<Heart class="h-3.5 w-3.5" />
+			<Heart class="size-icon-sm" />
 			{HuggingFaceService.formatLikes(details.likes)}
 		</span>
 	{/if}
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadata.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadata.svelte
index 4c6c3883c..ec651ef68 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadata.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadata.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
 	import ModelsDiscoverChatTemplateDialog from './ModelsDiscoverChatTemplateDialog.svelte';
 	import ModelsDiscoverDetailsMetadataItem from './ModelsDiscoverDetailsMetadataItem.svelte';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { MessageSquareCode } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { modelsDiscoverStore } from '#lib/stores/index.ts';
 	import type { HfModelDetailInfo, HfModelGguf } from '#lib/types/huggingface.js';
 	import { formatParameters } from '#lib/utils/index.ts';
@@ -54,7 +54,7 @@
 			class="h-auto gap-1.5 px-2.5 py-1 text-xs"
 			onclick={() => (chatTemplateOpen = true)}
 			size="sm"
-			variant="tertiary"
+			variant="secondary"
 		>
 			<MessageSquareCode class="size-3" />
 			Chat template
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadataItem.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadataItem.svelte
index 4bfc027d8..bd0d9402d 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadataItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsMetadataItem.svelte
@@ -10,7 +10,7 @@
 <!-- Metadata chip: label | value pair, matching the HF model page style, on the
      raised surface the tertiary button variant uses -->
 <span
-	class="inline-flex items-center divide-x divide-border rounded-md border border-border/30 bg-muted/60 text-xs shadow-sm dark:border-border/20 dark:bg-muted/75"
+	class="inline-flex items-center divide-x divide-border rounded-md bg-muted/60 text-xs elevated-control dark:bg-muted/75"
 >
 	<span class="px-2.5 py-1 text-muted-foreground">{label}</span>

diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsReadme.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsReadme.svelte
index 2504eebc6..86d590de7 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsReadme.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsReadme.svelte
@@ -9,9 +9,7 @@
 </script>

 {#if readme}
-	<section
-		class="p-3 rounded-3xl border border-border/30 bg-muted/60 shadow-sm dark:border-border/20"
-	>
+	<section class="p-3 rounded-3xl bg-muted/60 elevated-control">
 		<MarkdownContent allowHtml class="prose-sm max-w-none" content={readme} />
 	</section>
 {/if}
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsSkeleton.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsSkeleton.svelte
index 950a5c9c6..184149538 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsSkeleton.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsSkeleton.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { Skeleton } from '#lib/components/ui/skeleton/index.ts';
+	import { Skeleton } from '@ggml-org/llama-ui/ui/skeleton';
 </script>

 <!-- Static skeleton of ModelsDiscoverDetails: header, metadata chips, download options and readme lines. -->
@@ -8,7 +8,7 @@
 	<div class="space-y-3">
 		<div class="flex items-start justify-between gap-3">
 			<div class="flex min-w-0 items-center gap-2">
-				<Skeleton class="h-12 w-12 rounded-md" />
+				<Skeleton class="size-12 rounded-md" />

 				<div class="min-w-0 space-y-1.5">
 					<Skeleton class="h-5 w-56 max-w-full" />
@@ -47,7 +47,7 @@
 	</div>

 	<!-- Download options: quant rows and the draft opt-in line -->
-	<div class="rounded-3xl border border-border/30 bg-muted/60 shadow-sm dark:border-border/20">
+	<div class="rounded-3xl bg-muted/60 elevated-control">
 		<div class="flex w-full flex-col divide-y divide-border/50 px-4 pb-1 dark:divide-border/35">
 			{#each [0, 1, 2] as _, index (index)}
 				<div
@@ -84,7 +84,7 @@
 	</div>

 	<!-- Readme -->
-	<div class="p-3 rounded-3xl border border-border/30 bg-muted/60 shadow-sm dark:border-border/20">
+	<div class="p-3 rounded-3xl bg-muted/60 elevated-control">
 		<div class="space-y-2.5">
 			<Skeleton class="h-3.5 w-full" />

diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItem.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItem.svelte
index d9f64bdba..b33ca55f0 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItem.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
-	import ModelDownloadProgressBar from '../../ModelDownloadProgressBar.svelte';
 	import ModelDraftSubline from '../../ModelDraftSubline.svelte';
 	import ModelId from '../../ModelId.svelte';
 	import ModelOrgAvatar from '../../ModelOrgAvatar.svelte';
+	import { ModelDownloadProgressBar } from '@ggml-org/llama-ui/models';
 	import { Pause, Play, X } from '@lucide/svelte';
 	import { ActionIcon } from '#lib/components/app/index.ts';
 	import { HF_MMPROJ_FILENAME_TOKEN, MODEL_ID } from '#lib/constants/index.ts';
@@ -210,7 +210,7 @@
 				<span class="hidden items-center gap-0.5 group-hover:flex [@media(pointer:coarse)]:flex">
 					<ActionIcon
 						icon={state.isPaused ? Play : Pause}
-						iconSize="h-4 w-4"
+						iconSize="size-icon-md"
 						onclick={() => void modelsStore.status.toggleDownload(state.repoWithTag)}
 						stopPropagationOnClick
 						tooltip={state.isPaused ? 'Resume downloading' : 'Pause downloading'}
@@ -220,7 +220,7 @@
 					<ActionIcon
 						class="text-muted-foreground hover:text-destructive"
 						icon={X}
-						iconSize="h-4 w-4"
+						iconSize="size-icon-md"
 						onclick={() => state.onRequestCancel?.(state.repoWithTag)}
 						stopPropagationOnClick
 						tooltip="Cancel downloading"
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItemSkeleton.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItemSkeleton.svelte
index 2f9bb81de..ba4a2f946 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItemSkeleton.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItemSkeleton.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { Skeleton } from '#lib/components/ui/skeleton/index.ts';
+	import { Skeleton } from '@ggml-org/llama-ui/ui/skeleton';

 	interface Props {
 		/** Row index; varies skeleton widths so the list does not look mechanical. */
@@ -24,7 +24,7 @@
 <!-- Static skeleton of ModelsDiscoverListItem: avatar, name and badge rows. -->
 <li>
 	<div class="flex w-full items-start gap-2.5 rounded-lg p-2.5 text-left">
-		<Skeleton class="h-9 w-9 shrink-0 rounded-md" />
+		<Skeleton class="size-9 shrink-0 rounded-md" />

 		<div class="min-w-0 flex-1 space-y-1.5">
 			<Skeleton class="{nameWidth} h-4 max-w-full" />
diff --git a/ui/apps/chat/src/lib/components/app/models/index.ts b/ui/apps/chat/src/lib/components/app/models/index.ts
index c2736fb77..19f043b6b 100644
--- a/ui/apps/chat/src/lib/components/app/models/index.ts
+++ b/ui/apps/chat/src/lib/components/app/models/index.ts
@@ -48,17 +48,17 @@ export { default as ModelCapabilities } from './ModelCapabilities.svelte';
 export { default as ModelContext } from './ModelContext.svelte';
 export { default as ModelId } from './ModelId.svelte';
 export { default as ModelAvatar } from './ModelAvatar.svelte';
-export { default as ModelDownloadProgressBar } from './ModelDownloadProgressBar.svelte';
+export { ModelDownloadProgressBar } from '@ggml-org/llama-ui/models';
 export { default as ModelLoadControl } from './ModelLoadControl.svelte';
 export { default as ModelOrgAvatar } from './ModelOrgAvatar.svelte';
 export { default as ModelRowActions } from './ModelRowActions.svelte';
 export { default as ModelsSection } from './ModelsSection.svelte';

 /** Capability and modality icon row, shared by every model-id surface. */
-export { default as ModelCapabilityIcons } from './ModelCapabilityIcons.svelte';
+export { ModelCapabilityIcons } from '@ggml-org/llama-ui/models';

 /** Draft sidecar badges, rendered as `+ [KIND] [QUANT]` per sidecar. */
-export { default as ModelDraftSidecars } from './ModelDraftSidecars.svelte';
+export { ModelDraftSidecars } from '@ggml-org/llama-ui/models';

 /** Compact draft download line, embedded in the item it belongs to. */
 export { default as ModelDraftSubline } from './ModelDraftSubline.svelte';
diff --git a/ui/apps/chat/src/lib/components/app/navigation/ContextMenuActions.svelte b/ui/apps/chat/src/lib/components/app/navigation/ContextMenuActions.svelte
index 5d0a8c180..2f6791807 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/ContextMenuActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/ContextMenuActions.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import MenuActionsList from './MenuActionsList.svelte';
-	import * as ContextMenu from '#lib/components/ui/context-menu/index.ts';
+	import * as ContextMenu from '@ggml-org/llama-ui/ui/context-menu';
 	import { MenuKind } from '#lib/enums/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';
 	import type { MenuAction } from '#lib/types/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuActions.svelte b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuActions.svelte
index 94700147a..4ec52452d 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuActions.svelte
@@ -1,10 +1,10 @@
 <script lang="ts">
 	import MenuActionsList from './MenuActionsList.svelte';
+	import * as Drawer from '@ggml-org/llama-ui/ui/drawer';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import { Separator } from '@ggml-org/llama-ui/ui/separator';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { KeyboardShortcutInfo } from '#lib/components/app/index.ts';
-	import * as Drawer from '#lib/components/ui/drawer/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import { Separator } from '#lib/components/ui/separator/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { MenuKind } from '#lib/enums/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';
 	import type { MenuAction } from '#lib/types/index.ts';
@@ -82,7 +82,7 @@
 						onclick={(event) => runAction(action, event)}
 						type="button"
 					>
-						{@render iconComponent(action.icon, 'h-4 w-4 shrink-0')}
+						{@render iconComponent(action.icon, 'size-icon-md shrink-0')}

 						<span class="flex flex-1 flex-col">
 							{action.label}
diff --git a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte
index 2bd3ac74d..4bfccbc91 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { cn } from '@ggml-org/llama-ui/utils';
 	import { SearchInput } from '#lib/components/app/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
 	import type { Snippet } from 'svelte';

 	interface Props {
diff --git a/ui/apps/chat/src/lib/components/app/navigation/MenuActionsList.svelte b/ui/apps/chat/src/lib/components/app/navigation/MenuActionsList.svelte
index 6af7a2077..a7041c21f 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/MenuActionsList.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/MenuActionsList.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as ContextMenu from '@ggml-org/llama-ui/ui/context-menu';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { KeyboardShortcutInfo } from '#lib/components/app/index.ts';
-	import * as ContextMenu from '#lib/components/ui/context-menu/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { MenuKind } from '#lib/enums/index.ts';
 	import { deviceStore } from '#lib/stores/index.ts';
 	import type { MenuAction } from '#lib/types/index.ts';
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte
index a18b7771c..52c9903fb 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte
@@ -568,7 +568,7 @@
 			'h-dvh md:h-[calc(100dvh-1.125rem)]',
 			// phone: it stays put under the page, which slides aside to uncover it
 			isOnMobile && 'bg-(--sidebar-reveal-bg)',
-			'md:rounded-2xl',
+			'md:rounded-(--sidebar-radius)',
 			'flex flex-col justify-between',
 			// desktop only: on a phone the background follows the reveal frame by frame
 			'md:transition-[width,padding,margin,background-color,box-shadow,backdrop-filter] md:duration-200 md:ease-out',
@@ -576,7 +576,7 @@
 			isSettling && 'md:duration-300 md:ease-[cubic-bezier(0.34,1.56,0.64,1)]',
 			isDocked && !uiStore.isSidebarExpanded ? 'md:w-12' : 'md:w-(--sidebar-width)',
 			(uiStore.isSidebarExpanded || (isFloating && isPeeking)) &&
-				'md:bg-muted/60 md:backdrop-blur-xl max-md:shadow-md',
+				'md:sidebar-surface max-md:shadow-(--elevation-surface)',
 			isFloating && 'md:-mr-[calc(var(--sidebar-width)-3rem)]',
 			isStripHidden && 'md:pointer-events-none',
 			// on a phone the expanded chat form fills the screen, so the logo button over
@@ -621,7 +621,7 @@
 								: 'Go to start'}
 						class="pointer-events-auto size-10 rounded-full! md:size-9 {isStripHidden
 							? 'bg-transparent! hover:bg-transparent!'
-							: 'bg-muted/60 border border-border/20 backdrop-blur-sm bg-background! hover:bg-background! dark:bg-muted-foreground/15! dark:hover:bg-muted-foreground/15!'}"
+							: 'matte-key bg-surface-raised! hover:bg-surface-raised! dark:bg-muted-foreground/15! dark:hover:bg-muted-foreground/15!'}"
 						href={uiStore.isSidebarExpanded && !isLogoToggle ? ROUTES.START : undefined}
 						icon={isLogoToggle && logoHovered
 							? uiStore.isSidebarExpanded
@@ -645,7 +645,7 @@
 				{#if isOnMobile}
 					<ActionIcon
 						ariaLabel="Search"
-						class="bg-muted/60 border border-border/20 backdrop-blur-sm size-10 rounded-full! bg-background! hover:bg-background! dark:bg-muted-foreground/15! dark:hover:bg-muted-foreground/15!"
+						class="matte-key size-10 rounded-full! bg-surface-raised! hover:bg-surface-raised! dark:bg-muted-foreground/15! dark:hover:bg-muted-foreground/15!"
 						icon={Search}
 						iconSize="size-4.5"
 						onclick={() => handleSidebarAction(SidebarAction.SEARCH)}
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationActions.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationActions.svelte
index 0c65fd543..165fb0ebe 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationActions.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { KeyboardShortcutInfo } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import {
 		ICON_CLASS_DEFAULT,
 		ICON_STRIP_TRANSITION_DELAY_MULTIPLIER,
@@ -104,9 +104,7 @@
 			<div transition:fade={itemTransition}>
 				<Button
 					class="w-full min-w-9 justify-between px-2 backdrop-blur-none! hover:[&>kbd]:opacity-100 rounded-(--surface-row-radius) max-md:h-12 max-md:rounded-2xl max-md:px-3 max-md:text-[17px] {isActive
-						? // raised and edged, where a hover only tints: bg-accent matched the hover in light
-							// and sank below an inset group's fill in dark
-							'bg-background text-accent-foreground shadow-sm ring-1 ring-border/50 hover:bg-background dark:bg-foreground/15 dark:hover:bg-foreground/15'
+						? 'selected-row-surface text-accent-foreground'
 						: ''}"
 					href={item.route}
 					onclick={() => {
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte
index 77f25f90d..70202c483 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte
@@ -1,5 +1,7 @@
 <script lang="ts">
 	import SidebarNavigationGroupSubmenu from './SidebarNavigationGroupSubmenu.svelte';
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import {
 		Download,
 		FolderInput,
@@ -17,8 +19,6 @@
 	} from '@lucide/svelte';
 	import { ContextMenuActions, DropdownMenuActions } from '#lib/components/app/index.ts';
 	import { TruncatedText } from '#lib/components/app/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import {
 		FORK_TREE_DEPTH_PADDING,
 		ICON_CLASS_DEFAULT,
@@ -323,7 +323,7 @@
 		class={[
 			'group flex min-h-9 w-full cursor-pointer items-center justify-between space-x-3 rounded-lg px-2 py-1.5 text-left select-none [-webkit-touch-callout:none] transition-[background-color,color,scale] hover:bg-foreground/10 hover:text-foreground max-md:min-h-12 max-md:rounded-2xl max-md:px-3.5 max-md:py-3 md:min-h-8 md:py-1',
 			isLanding && 'invisible',
-			isActive ? 'bg-accent text-accent-foreground' : 'text-foreground/75',
+			isActive ? 'selected-row-surface text-accent-foreground' : 'text-foreground/75',
 			contextMenuOpen && 'bg-foreground/10',
 			isSelected && 'bg-primary/10 hover:bg-primary/15',
 			isSelectionMode && 'is-selection-mode',
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationFooter.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationFooter.svelte
index 2b51e615c..b236dc3db 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationFooter.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationFooter.svelte
@@ -13,7 +13,7 @@
 <!-- the footer: managing the app around the chats, a group inset in the sidebar, its rows
      rounded concentric with it (see the nested surfaces in app.css) -->
 <SidebarNavigationActions
-	class="mx-2 mb-2 rounded-(--surface-group-radius) border border-border/20 bg-background/55 p-(--surface-group-padding) shadow-sm dark:bg-foreground/5"
+	class="inset-group-surface mx-2 mb-2 p-(--surface-group-padding)"
 	items={SIDEBAR_FOOTER_ITEMS}
 	{onAction}
 />
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSubmenu.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSubmenu.svelte
index e16eb5957..59c9d0b8c 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSubmenu.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSubmenu.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import * as ContextMenu from '@ggml-org/llama-ui/ui/context-menu';
+	import * as DropdownMenu from '@ggml-org/llama-ui/ui/dropdown-menu';
 	import { Check, FolderInput, Plus } from '@lucide/svelte';
 	import { SearchInput } from '#lib/components/app/index.ts';
-	import * as ContextMenu from '#lib/components/ui/context-menu/index.ts';
-	import * as DropdownMenu from '#lib/components/ui/dropdown-menu/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { MenuKind } from '#lib/enums/index.ts';
 	import { groupsStore, uiStore } from '#lib/stores/index.ts';
@@ -74,11 +74,11 @@
 		<span class="flex-1 whitespace-nowrap">{label}</span>
 	</Menu.SubTrigger>

+	<!-- the actions menu it opens from sits above dialogs and toasts (z-[999999]); a submenu renders
+	     apart from it, so it takes the same layer -->
 	<Menu.SubContent
-		alignOffset={-6}
-		class="w-64 p-1.5"
+		class="z-[999999] w-64 p-1.5"
 		onOpenAutoFocus={(event) => event.preventDefault()}
-		sideOffset={6}
 	>
 		<SearchInput
 			bind:ref={searchInput}
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSelectionBar.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSelectionBar.svelte
index b15eb3410..8bad1e4d4 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSelectionBar.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSelectionBar.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
 	import { Download, Pin, PinOff, Trash2, X } from '@lucide/svelte';
 	import { ActionIcon, DialogConfirmation } from '#lib/components/app/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
 	import { TooltipSide } from '#lib/enums/index.ts';

 	interface Props {
@@ -72,7 +72,7 @@

 <div
 	aria-label="Bulk actions for selected conversations"
-	class="flex items-center gap-1.5 rounded-xl border border-border/50 bg-background/50 px-2 py-1.5 shadow-sm backdrop-blur-xl {className}"
+	class="flex items-center gap-1.5 rounded-xl bg-background/50 px-2 py-1.5 elevated-surface backdrop-blur-xl {className}"
 	role="toolbar"
 >
 	<label class="flex min-w-0 cursor-pointer items-center gap-2">
@@ -91,12 +91,12 @@
 	<div class="ml-auto flex items-center gap-0.75">
 		<ActionIcon
 			ariaLabel={pinTooltip}
-			class="h-7 w-7 rounded-md bg-transparent backdrop-blur-none hover:bg-accent! {pinDisabled
+			class="size-7 rounded-md bg-transparent backdrop-blur-none hover:bg-accent! {pinDisabled
 				? 'cursor-not-allowed'
 				: ''} {!pinDisabled ? 'opacity-100' : 'opacity-40'}"
 			disabled={pinDisabled}
 			icon={someSelectedPinned ? PinOff : Pin}
-			iconSize="h-3.5 w-3.5"
+			iconSize="size-icon-sm"
 			onclick={onBulkPinToggle}
 			size="sm"
 			tooltip={pinTooltip}
@@ -105,12 +105,12 @@

 		<ActionIcon
 			ariaLabel="Export selected"
-			class="h-7 w-7 rounded-md bg-transparent backdrop-blur-none hover:bg-accent! {hasSelection
+			class="size-7 rounded-md bg-transparent backdrop-blur-none hover:bg-accent! {hasSelection
 				? 'opacity-100'
 				: 'opacity-40'}"
 			disabled={!hasSelection}
 			icon={Download}
-			iconSize="h-3.5 w-3.5"
+			iconSize="size-icon-sm"
 			onclick={onBulkExport}
 			size="sm"
 			tooltip={hasSelection ? 'Export' : 'Export'}
@@ -119,12 +119,12 @@

 		<ActionIcon
 			ariaLabel="Delete selected"
-			class="h-7 w-7 rounded-md bg-transparent backdrop-blur-none hover:bg-destructive/10! dark:hover:bg-destructive/20! disabled:hover:bg-transparent {hasSelection
+			class="size-7 rounded-md bg-transparent backdrop-blur-none hover:bg-destructive/10! dark:hover:bg-destructive/20! disabled:hover:bg-transparent {hasSelection
 				? 'opacity-100'
 				: 'opacity-40'}"
 			disabled={!hasSelection}
 			icon={Trash2}
-			iconSize="h-3.5 w-3.5 text-destructive"
+			iconSize="size-icon-sm text-destructive"
 			onclick={handleDeleteClick}
 			size="sm"
 			tooltip="Delete selected"
@@ -135,9 +135,9 @@

 		<ActionIcon
 			ariaLabel="Exit bulk selection mode"
-			class="h-7 w-7 rounded-md bg-transparent backdrop-blur-none hover:bg-accent!"
+			class="size-7 rounded-md bg-transparent backdrop-blur-none hover:bg-accent!"
 			icon={X}
-			iconSize="h-3.5 w-3.5"
+			iconSize="size-icon-sm"
 			onclick={onClose}
 			size="sm"
 			tooltip="Exit bulk selection mode"
diff --git a/ui/apps/chat/src/lib/components/app/servers/ServerErrorSplash.svelte b/ui/apps/chat/src/lib/components/app/servers/ServerErrorSplash.svelte
index 9754888cd..fab3edba4 100644
--- a/ui/apps/chat/src/lib/components/app/servers/ServerErrorSplash.svelte
+++ b/ui/apps/chat/src/lib/components/app/servers/ServerErrorSplash.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
 	import { AlertTriangle, CheckCircle, Key, RefreshCw, XCircle } from '@lucide/svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import Label from '#lib/components/ui/label/label.svelte';
 	import { HEADERS, ICON_CLASS_DEFAULT, ROUTES, SETTINGS_KEYS } from '#lib/constants/index.ts';
 	import { KeyboardKey } from '#lib/enums/index.ts';
 	import { serverStore, settingsStore } from '#lib/stores/index.ts';
@@ -129,9 +129,9 @@
 	<div class="w-full max-w-md px-4 text-center">
 		<div in:fade={{ duration: 300 }} class="mb-6">
 			<div
-				class="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10"
+				class="mx-auto mb-4 flex size-16 items-center justify-center rounded-full bg-destructive/10"
 			>
-				<AlertTriangle class="h-8 w-8 text-destructive" />
+				<AlertTriangle class="size-8 text-destructive" />
 			</div>

 			<h2 class="mb-2 text-xl font-semibold">Server Connection Error</h2>
diff --git a/ui/apps/chat/src/lib/components/app/servers/ServerLoadingSplash.svelte b/ui/apps/chat/src/lib/components/app/servers/ServerLoadingSplash.svelte
index 30e6a3bf3..8e687391b 100644
--- a/ui/apps/chat/src/lib/components/app/servers/ServerLoadingSplash.svelte
+++ b/ui/apps/chat/src/lib/components/app/servers/ServerLoadingSplash.svelte
@@ -14,8 +14,8 @@
 <div class="flex h-full items-center justify-center {className}">
 	<div class="text-center">
 		<div in:fade={{ duration: 300 }} class="mb-4">
-			<div class="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-muted">
-				<Server class="h-8 w-8 animate-pulse text-muted-foreground" />
+			<div class="mx-auto mb-4 flex size-16 items-center justify-center rounded-full bg-muted">
+				<Server class="size-8 animate-pulse text-muted-foreground" />
 			</div>

 			<h2 class="mb-2 text-xl font-semibold">Connecting to Server</h2>
diff --git a/ui/apps/chat/src/lib/components/app/servers/ServerStatus.svelte b/ui/apps/chat/src/lib/components/app/servers/ServerStatus.svelte
index a50961ee9..630079fd9 100644
--- a/ui/apps/chat/src/lib/components/app/servers/ServerStatus.svelte
+++ b/ui/apps/chat/src/lib/components/app/servers/ServerStatus.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { AlertTriangle, Server } from '@lucide/svelte';
-	import { Badge } from '#lib/components/ui/badge/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { modelsStore, serverStore } from '#lib/stores/index.ts';

@@ -18,11 +18,11 @@
 	let serverData = $derived(serverStore.props);

 	function getStatusColor() {
-		if (loading) return 'bg-yellow-500';
+		if (loading) return 'status-lamp orb-warning';

-		if (error) return 'bg-red-500';
+		if (error) return 'status-lamp orb-danger';

-		if (serverData) return 'bg-green-500';
+		if (serverData) return 'status-lamp orb-success';

 		return 'bg-gray-500';
 	}
@@ -40,14 +40,14 @@

 <div class="flex items-center space-x-3 {className}">
 	<div class="flex items-center space-x-2">
-		<div class="h-2 w-2 rounded-full {getStatusColor()}"></div>
+		<div class="size-2 rounded-full {getStatusColor()}"></div>

 		<span class="text-sm text-muted-foreground">{getStatusText()}</span>
 	</div>

 	{#if serverData && !error}
 		<Badge class="text-xs" variant="outline">
-			<Server class="mr-1 h-3 w-3" />
+			<Server class="mr-1 size-icon-xs" />

 			{model || 'Unknown Model'}
 		</Badge>
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte
index 5193e9954..1ced25e50 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChat.svelte
@@ -1,4 +1,5 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { RefreshCw } from '@lucide/svelte';
 	import {
 		SettingsChatDesktopSidebar,
@@ -9,7 +10,6 @@
 		SettingsFooter,
 		SettingsResetButton
 	} from '#lib/components/app/settings/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import {
 		NUMERIC_FIELDS,
 		POSITIVE_INTEGER_FIELDS,
@@ -20,6 +20,7 @@
 	import { ColorMode } from '#lib/enums/ui.enums.ts';
 	import { modelsStore, serverStore, settingsStore } from '#lib/stores/index.ts';
 	import type { SettingsSection, SettingsSectionTitle } from '#lib/types/index.ts';
+	import { applySurfaceTheme } from '#lib/utils/index.ts';
 	import { setMode } from 'mode-watcher';
 	import { fade } from 'svelte/transition';
 	interface Props {
@@ -89,6 +90,9 @@
 	function handleConfigChange(key: string, value: string | boolean) {
 		localConfig[key] = value;

+		// the surface theme previews at once, like the colour theme
+		if (key === SETTINGS_KEYS.SURFACE_THEME) applySurfaceTheme(value);
+
 		// discover needs the hub metadata reads: checking it turns the hub on,
 		// unchecking it turns the hub back off, so the checkbox never lies
 		if (key === SETTINGS_KEYS.ENABLE_DISCOVER_MODELS) {
@@ -99,6 +103,7 @@
 	function handleReset() {
 		localConfig = { ...settingsStore.config };
 		setMode(localConfig.theme as ColorMode);
+		applySurfaceTheme(localConfig[SETTINGS_KEYS.SURFACE_THEME]);
 		mobileHeader?.updateCarousel();
 	}

@@ -153,7 +158,7 @@
 	}
 </script>

-<div in:fade={{ duration: 150 }} class="mx-auto flex h-full w-full flex-col">
+<div in:fade={{ duration: 150 }} class="mx-auto flex size-full flex-col">
 	<div class="flex flex-1 flex-col md:flex-row md:gap-4">
 		<SettingsChatDesktopSidebar
 			isActive={(section: SettingsSection) => section.slug === activeSlug}
@@ -190,7 +195,7 @@
 									<SettingsResetButton onReset={handleReset} />

 									<Button onclick={() => window.location.reload()} variant="outline">
-										<RefreshCw class="h-3 w-3" />
+										<RefreshCw class="size-icon-md" />
 										Reload app
 									</Button>
 								</div>
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatFields.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatFields.svelte
index 4cc31df35..324fc5219 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatFields.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatFields.svelte
@@ -1,13 +1,18 @@
 <script lang="ts">
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import { Input } from '@ggml-org/llama-ui/ui/input';
+	import { Label } from '@ggml-org/llama-ui/ui/label';
+	import * as RadioGroup from '@ggml-org/llama-ui/ui/radio-group';
+	import * as Select from '@ggml-org/llama-ui/ui/select';
+	import { Textarea } from '@ggml-org/llama-ui/ui/textarea';
 	import { FlaskConical, RotateCcw } from '@lucide/svelte';
 	import { SettingsChatParameterSourceIndicator } from '#lib/components/app/settings/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import Label from '#lib/components/ui/label/label.svelte';
-	import * as RadioGroup from '#lib/components/ui/radio-group/index.ts';
-	import * as Select from '#lib/components/ui/select/index.ts';
-	import { Textarea } from '#lib/components/ui/textarea/index.ts';
-	import { ICON_CLASS_DEFAULT, SETTING_CONFIG_INFO, SETTINGS_KEYS } from '#lib/constants/index.ts';
+	import {
+		ICON_CLASS_DEFAULT,
+		ICON_CLASS_SM,
+		SETTING_CONFIG_INFO,
+		SETTINGS_KEYS
+	} from '#lib/constants/index.ts';
 	import { SettingsFieldType } from '#lib/enums/settings.enums.ts';
 	import { modelsStore, serverStore, settingsStore } from '#lib/stores/index.ts';
 	import { normalizeFloatingPoint } from '#lib/utils/precision.ts';
@@ -77,7 +82,7 @@
 						{field.label}

 						{#if field.isExperimental}
-							<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
+							<FlaskConical class="size-icon-sm text-muted-foreground" />
 						{/if}
 					</Label>

@@ -109,7 +114,7 @@
 					{#if isCustomRealTime}
 						<button
 							aria-label="Reset to default"
-							class="absolute top-1/2 right-2 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded transition-colors hover:bg-muted"
+							class="absolute top-1/2 right-2 inline-flex size-5 -translate-y-1/2 items-center justify-center rounded transition-colors hover:bg-muted"
 							onclick={() => {
 								settingsStore.resetParameterToServerDefault(field.key);
 								onConfigChange(field.key, '');
@@ -117,7 +122,7 @@
 							title="Reset to default"
 							type="button"
 						>
-							<RotateCcw class="h-3 w-3" />
+							<RotateCcw class="size-icon-xs" />
 						</button>
 					{/if}
 				</div>
@@ -133,7 +138,7 @@
 						{field.label}

 						{#if field.isExperimental}
-							<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
+							<FlaskConical class="size-icon-sm text-muted-foreground" />
 						{/if}
 					</Label>
 				{/if}
@@ -186,7 +191,7 @@
 						{field.label}

 						{#if field.isExperimental}
-							<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
+							<FlaskConical class="size-icon-sm text-muted-foreground" />
 						{/if}
 					</Label>

@@ -211,7 +216,7 @@
 							<div class="flex items-center gap-2">
 								{#if selectedOption?.icon}
 									{@const IconComponent = selectedOption.icon}
-									<IconComponent class={ICON_CLASS_DEFAULT} />
+									<IconComponent class={ICON_CLASS_SM} />
 								{/if}

 								{selectedOption?.label || `Select ${field.label.toLowerCase()}`}
@@ -221,7 +226,7 @@
 						{#if isCustomRealTime}
 							<button
 								aria-label="Reset to default"
-								class="absolute top-1/2 right-8 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded transition-colors hover:bg-muted"
+								class="absolute top-1/2 right-8 inline-flex size-5 -translate-y-1/2 items-center justify-center rounded transition-colors hover:bg-muted"
 								onclick={() => {
 									settingsStore.resetParameterToServerDefault(field.key);
 									onConfigChange(field.key, '');
@@ -229,7 +234,7 @@
 								title="Reset to default"
 								type="button"
 							>
-								<RotateCcw class="h-3 w-3" />
+								<RotateCcw class="size-icon-xs" />
 							</button>
 						{/if}
 					</div>
@@ -266,7 +271,7 @@
 					{field.label}

 					{#if field.isExperimental}
-						<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
+						<FlaskConical class="size-icon-sm text-muted-foreground" />
 					{/if}
 				</Label>

@@ -291,7 +296,7 @@
 								{opt.label}

 								{#if opt.isExperimental}
-									<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
+									<FlaskConical class="size-icon-sm text-muted-foreground" />
 								{/if}
 							</Label>
 						</div>
@@ -325,7 +330,7 @@
 							{field.label}

 							{#if field.isExperimental}
-								<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
+								<FlaskConical class="size-icon-sm text-muted-foreground" />
 							{/if}
 						</label>

diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportSection.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportSection.svelte
index 5d6e9b1fd..39c91af65 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportSection.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportSection.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { Button, type ButtonVariant } from '#lib/components/ui/button/index.ts';
+	import { Button, type ButtonVariant } from '@ggml-org/llama-ui/ui/button';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import type { Component } from 'svelte';

diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportTab.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportTab.svelte
index a85a69b36..9f95d5e44 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportTab.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatImportExportTab.svelte
@@ -282,7 +282,7 @@

 		<SettingsChatImportExportSection
 			IconComponent={Trash2}
-			buttonClass="text-destructive-foreground justify-start justify-self-start bg-destructive hover:bg-destructive/80 md:w-auto"
+			buttonClass="justify-start justify-self-start md:w-auto"
 			buttonText="Delete all conversations"
 			buttonVariant="destructive"
 			description="Permanently delete all conversations and their messages. This action cannot be undone. Consider exporting your conversations first if you want to keep a backup."
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatParameterSourceIndicator.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatParameterSourceIndicator.svelte
index 9dc9efb00..0e1712da8 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatParameterSourceIndicator.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatParameterSourceIndicator.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Badge } from '@ggml-org/llama-ui/ui/badge';
 	import { Wrench } from '@lucide/svelte';
-	import { Badge } from '#lib/components/ui/badge/index.ts';

 	interface Props {
 		class?: string;
@@ -13,7 +13,7 @@
 	class="h-5 bg-orange-100 px-1.5 py-0.5 text-xs text-orange-800 dark:bg-orange-900 dark:text-orange-200 {className}"
 	variant="secondary"
 >
-	<Wrench class="mr-1 h-3 w-3" />
+	<Wrench class="mr-1 size-icon-xs" />

 	Custom
 </Badge>
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
index b9e17e9c0..354fdecd0 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChat/SettingsChatToolsTab.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import { Checkbox } from '@ggml-org/llama-ui/ui/checkbox';
+	import * as Collapsible from '@ggml-org/llama-ui/ui/collapsible';
 	import { ChevronDown, ChevronRight } from '@lucide/svelte';
 	import { McpServerIdentity, TruncatedText } from '#lib/components/app/index.ts';
-	import { Checkbox } from '#lib/components/ui/checkbox/index.ts';
-	import * as Collapsible from '#lib/components/ui/collapsible/index.ts';
 	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
 	import { ToolSource } from '#lib/enums/tools.enums.ts';
 	import { conversationsStore, mcpStore, permissionsStore, toolsStore } from '#lib/stores/index.ts';
@@ -40,9 +40,9 @@
 					class="flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm hover:bg-muted/50"
 				>
 					{#if isExpanded}
-						<ChevronDown class="h-3.5 w-3.5 shrink-0" />
+						<ChevronDown class="size-icon-sm shrink-0" />
 					{:else}
-						<ChevronRight class="h-3.5 w-3.5 shrink-0" />
+						<ChevronRight class="size-icon-sm shrink-0" />
 					{/if}

 					<Checkbox
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsFooter.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsFooter.svelte
index af90772a3..ffcc4c291 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsFooter.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsFooter.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { Button } from '#lib/components/ui/button/index.ts';
+	import { Button } from '@ggml-org/llama-ui/ui/button';

 	interface Props {
 		hasChanges?: boolean;
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsMcpServers.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsMcpServers.svelte
index d631e8673..316939d80 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsMcpServers.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsMcpServers.svelte
@@ -1,12 +1,12 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Empty from '@ggml-org/llama-ui/ui/empty';
 	import { Plus } from '@lucide/svelte';
 	import {
 		DialogMcpResourcesBrowser,
 		DialogMcpServerAddNew
 	} from '#lib/components/app/dialogs/index.ts';
 	import { McpServerCard, McpServerCardSkeleton } from '#lib/components/app/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Empty from '#lib/components/ui/empty/index.ts';
 	import { HealthCheckStatus } from '#lib/enums/index.ts';
 	import { mcpStore, toolsStore } from '#lib/stores/index.ts';
 	import { goto } from '$app/navigation';
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsResetButton.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsResetButton.svelte
index 40b605f9e..967e7f827 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsResetButton.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsResetButton.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
+	import * as AlertDialog from '@ggml-org/llama-ui/ui/alert-dialog';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import { RotateCcw } from '@lucide/svelte';
-	import * as AlertDialog from '#lib/components/ui/alert-dialog/index.ts';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { settingsStore } from '#lib/stores/index.ts';

 	interface Props {
@@ -26,7 +26,7 @@

 {#if settingsStore.hasCustomSettings}
 	<Button onclick={handleResetClick} variant="outline">
-		<RotateCcw class="h-3 w-3" />
+		<RotateCcw class="size-icon-md" />

 		Reset to default
 	</Button>
diff --git a/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte b/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte
index 70a961111..00cde3c6b 100644
--- a/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte
+++ b/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
-	import { Button } from '#lib/components/ui/button/index.ts';
-	import * as Card from '#lib/components/ui/card/index.ts';
+	import { Button } from '@ggml-org/llama-ui/ui/button';
+	import * as Card from '@ggml-org/llama-ui/ui/card';

 	let { needRefresh: needRefreshProp, updateServiceWorker } = $props();
 	let needRefresh = $derived(needRefreshProp ?? false);
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte b/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte
deleted file mode 100644
index 1f67f5483..000000000
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte
+++ /dev/null
@@ -1,18 +0,0 @@
-<script lang="ts">
-	import { buttonVariants } from '#lib/components/ui/button/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
-	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
-
-	let {
-		class: className,
-		ref = $bindable(null),
-		...restProps
-	}: AlertDialogPrimitive.ActionProps = $props();
-</script>
-
-<AlertDialogPrimitive.Action
-	bind:ref
-	class={cn(buttonVariants(), className)}
-	data-slot="alert-dialog-action"
-	{...restProps}
-/>
diff --git a/ui/apps/chat/src/lib/components/ui/alert/alert.svelte b/ui/apps/chat/src/lib/components/ui/alert/alert.svelte
deleted file mode 100644
index f35ef82aa..000000000
--- a/ui/apps/chat/src/lib/components/ui/alert/alert.svelte
+++ /dev/null
@@ -1,44 +0,0 @@
-<script lang="ts" module>
-	import { tv, type VariantProps } from 'tailwind-variants';
-
-	export const alertVariants = tv({
-		base: 'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
-		defaultVariants: {
-			variant: 'default'
-		},
-		variants: {
-			variant: {
-				default: 'bg-card text-card-foreground',
-				destructive:
-					'text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current'
-			}
-		}
-	});
-
-	export type AlertVariant = VariantProps<typeof alertVariants>['variant'];
-</script>
-
-<script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
-	import type { HTMLAttributes } from 'svelte/elements';
-
-	let {
-		children,
-		class: className,
-		ref = $bindable(null),
-		variant = 'default',
-		...restProps
-	}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
-		variant?: AlertVariant;
-	} = $props();
-</script>
-
-<div
-	bind:this={ref}
-	class={cn(alertVariants({ variant }), className)}
-	data-slot="alert"
-	{...restProps}
-	role="alert"
->
-	{@render children?.()}
-</div>
diff --git a/ui/apps/chat/src/lib/components/ui/badge/badge.svelte b/ui/apps/chat/src/lib/components/ui/badge/badge.svelte
deleted file mode 100644
index 217a54244..000000000
--- a/ui/apps/chat/src/lib/components/ui/badge/badge.svelte
+++ /dev/null
@@ -1,51 +0,0 @@
-<script lang="ts" module>
-	import { tv, type VariantProps } from 'tailwind-variants';
-
-	export const badgeVariants = tv({
-		base: 'focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3',
-		defaultVariants: {
-			variant: 'default'
-		},
-		variants: {
-			variant: {
-				default: 'bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent',
-				destructive:
-					'bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white',
-				outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
-				secondary:
-					'bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent',
-				tertiary:
-					'bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25 border-transparent'
-			}
-		}
-	});
-
-	export type BadgeVariant = VariantProps<typeof badgeVariants>['variant'];
-</script>
-
-<script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
-	import type { HTMLAnchorAttributes } from 'svelte/elements';
-
-	let {
-		children,
-		class: className,
-		href,
-		ref = $bindable(null),
-		variant = 'default',
-		...restProps
-	}: WithElementRef<HTMLAnchorAttributes> & {
-		variant?: BadgeVariant;
-	} = $props();
-</script>
-
-<svelte:element
-	this={href ? 'a' : 'span'}
-	bind:this={ref}
-	class={cn(badgeVariants({ variant }), className, 'backdrop-blur-sm')}
-	data-slot="badge"
-	{href}
-	{...restProps}
->
-	{@render children?.()}
-</svelte:element>
diff --git a/ui/apps/chat/src/lib/components/ui/button-group/button-group-root.svelte b/ui/apps/chat/src/lib/components/ui/button-group/button-group-root.svelte
deleted file mode 100644
index fee33a07c..000000000
--- a/ui/apps/chat/src/lib/components/ui/button-group/button-group-root.svelte
+++ /dev/null
@@ -1,21 +0,0 @@
-<script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
-	import type { Snippet } from 'svelte';
-	import type { HTMLAttributes } from 'svelte/elements';
-
-	interface Props extends HTMLAttributes<HTMLDivElement> {
-		children: Snippet;
-	}
-
-	let { children, class: className, ...restProps }: Props = $props();
-</script>
-
-<div
-	class={cn(
-		'flex items-center [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child):not(:last-child)]:rounded-none',
-		className
-	)}
-	{...restProps}
->
-	{@render children()}
-</div>
diff --git a/ui/apps/chat/src/lib/components/ui/button-group/button-group-separator.svelte b/ui/apps/chat/src/lib/components/ui/button-group/button-group-separator.svelte
deleted file mode 100644
index f277f3d46..000000000
--- a/ui/apps/chat/src/lib/components/ui/button-group/button-group-separator.svelte
+++ /dev/null
@@ -1,8 +0,0 @@
-<script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
-	import type { HTMLAttributes } from 'svelte/elements';
-
-	let { ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
-</script>
-
-<div class={cn('shrink-0 self-stretch bg-border', 'w-px')} {...restProps}></div>
diff --git a/ui/apps/chat/src/lib/components/ui/button/button.svelte b/ui/apps/chat/src/lib/components/ui/button/button.svelte
deleted file mode 100644
index a182511da..000000000
--- a/ui/apps/chat/src/lib/components/ui/button/button.svelte
+++ /dev/null
@@ -1,92 +0,0 @@
-<script lang="ts" module>
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
-	import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
-	import { tv, type VariantProps } from 'tailwind-variants';
-
-	export const buttonVariants = tv({
-		base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
-		defaultVariants: {
-			size: 'default',
-			variant: 'default'
-		},
-		variants: {
-			size: {
-				default: 'h-9 px-4 py-2 has-[>svg]:px-3',
-				icon: 'size-9',
-				'icon-lg': 'size-10',
-				'icon-sm': 'size-5 rounded-sm',
-				lg: 'h-10 rounded-lg px-6 has-[>svg]:px-4',
-				sm: 'h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5'
-			},
-			variant: {
-				default: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',
-				destructive:
-					'bg-destructive shadow-sm hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white!',
-				ghost: 'hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm',
-				link: 'text-primary underline-offset-4 hover:underline',
-				outline:
-					'shadow-sm hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm dark:border-input border',
-				secondary:
-					'bg-muted/30 dark:bg-muted-foreground/15 dark:text-secondary-foreground shadow-sm border-muted border text-foreground hover:bg-muted dark:hover:bg-muted-foreground/25',
-				tertiary:
-					'bg-muted/60 dark:bg-muted/75 shadow-sm border border-border/30 text-foreground hover:bg-muted/80 dark:border-border/20 dark:hover:bg-muted'
-			}
-		}
-	});
-
-	export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
-	export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
-
-	export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
-		WithElementRef<HTMLAnchorAttributes> & {
-			variant?: ButtonVariant;
-			size?: ButtonSize;
-		};
-</script>
-
-<script lang="ts">
-	let {
-		children,
-		class: className,
-		disabled,
-		href = undefined,
-		ref = $bindable(null),
-		size = 'default',
-		type = 'button',
-		variant = 'default',
-		...restProps
-	}: ButtonProps = $props();
-</script>
-
-{#if href}
-	<a
-		bind:this={ref}
-		aria-disabled={disabled}
-		class={cn(buttonVariants({ size, variant }), className)}
-		data-slot="button"
-		href={disabled ? undefined : href}
-		role={disabled ? 'link' : undefined}
-		tabindex={disabled ? -1 : undefined}
-		{...restProps}
-	>
-		{@render children?.()}
-	</a>
-{:else}
-	<button
-		bind:this={ref}
-		class={cn(buttonVariants({ size, variant }), className)}
-		data-slot="button"
-		{disabled}
-		{type}
-		{...restProps}
-	>
-		{@render children?.()}
-	</button>
-{/if}
-
-<style>
-	a,
-	button {
-		cursor: pointer;
-	}
-</style>
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-sub-content.svelte b/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-sub-content.svelte
deleted file mode 100644
index b7e8f6ab7..000000000
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-sub-content.svelte
+++ /dev/null
@@ -1,20 +0,0 @@
-<script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
-	import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';
-
-	let {
-		class: className,
-		ref = $bindable(null),
-		...restProps
-	}: ContextMenuPrimitive.SubContentProps = $props();
-</script>
-
-<ContextMenuPrimitive.SubContent
-	bind:ref
-	class={cn(
-		'z-50 max-h-(--bits-menu-content-available-height) min-w-[8rem] origin-(--bits-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20',
-		className
-	)}
-	data-slot="context-menu-sub-content"
-	{...restProps}
-/>
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-content.svelte b/ui/apps/chat/src/lib/components/ui/drawer/drawer-content.svelte
deleted file mode 100644
index 768d4221d..000000000
--- a/ui/apps/chat/src/lib/components/ui/drawer/drawer-content.svelte
+++ /dev/null
@@ -1,40 +0,0 @@
-<script lang="ts">
-	import DrawerOverlay from './drawer-overlay.svelte';
-	import DrawerPortal from './drawer-portal.svelte';
-	import type { WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
-	import type { ComponentProps } from 'svelte';
-	import { Drawer as DrawerPrimitive } from 'vaul-svelte';
-
-	let {
-		children,
-		class: className,
-		overlayClass,
-		portalProps,
-		ref = $bindable(null),
-		...restProps
-	}: DrawerPrimitive.ContentProps & {
-		overlayClass?: string;
-		portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DrawerPortal>>;
-	} = $props();
-</script>
-
-<DrawerPortal {...portalProps}>
-	<DrawerOverlay class={overlayClass} />
-
-	<DrawerPrimitive.Content
-		bind:ref
-		class={cn(
-			'bg-popover text-popover-foreground flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b group/drawer-content fixed z-50 data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm',
-			className
-		)}
-		data-slot="drawer-content"
-		{...restProps}
-	>
-		<div
-			class="bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
-		></div>
-
-		{@render children?.()}
-	</DrawerPrimitive.Content>
-</DrawerPortal>
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte b/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte
deleted file mode 100644
index ade3bb970..000000000
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte
+++ /dev/null
@@ -1,20 +0,0 @@
-<script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
-	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
-
-	let {
-		class: className,
-		ref = $bindable(null),
-		...restProps
-	}: DropdownMenuPrimitive.SubContentProps = $props();
-</script>
-
-<DropdownMenuPrimitive.SubContent
-	bind:ref
-	class={cn(
-		'z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20',
-		className
-	)}
-	data-slot="dropdown-menu-sub-content"
-	{...restProps}
-/>
diff --git a/ui/apps/chat/src/lib/components/ui/input/input.svelte b/ui/apps/chat/src/lib/components/ui/input/input.svelte
deleted file mode 100644
index 3dd32cb17..000000000
--- a/ui/apps/chat/src/lib/components/ui/input/input.svelte
+++ /dev/null
@@ -1,52 +0,0 @@
-<script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
-	import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
-
-	type InputType = Exclude<HTMLInputTypeAttribute, 'file'>;
-
-	type Props = WithElementRef<
-		Omit<HTMLInputAttributes, 'type'> &
-			({ type: 'file'; files?: FileList } | { type?: InputType; files?: undefined })
-	>;
-
-	let {
-		class: className,
-		files = $bindable(),
-		ref = $bindable(null),
-		type,
-		value = $bindable(),
-		...restProps
-	}: Props = $props();
-</script>
-
-{#if type === 'file'}
-	<input
-		bind:files
-		bind:this={ref}
-		bind:value
-		class={cn(
-			'flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30',
-			'focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',
-			'aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
-			className
-		)}
-		data-slot="input"
-		type="file"
-		{...restProps}
-	/>
-{:else}
-	<input
-		bind:this={ref}
-		bind:value
-		class={cn(
-			'flex h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base shadow-xs ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30',
-			'focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',
-			'aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
-			className
-		)}
-		data-slot="input"
-		style="backdrop-filter: blur(0.5rem);"
-		{type}
-		{...restProps}
-	/>
-{/if}
diff --git a/ui/apps/chat/src/lib/components/ui/switch/switch.svelte b/ui/apps/chat/src/lib/components/ui/switch/switch.svelte
deleted file mode 100644
index ddeeb9d21..000000000
--- a/ui/apps/chat/src/lib/components/ui/switch/switch.svelte
+++ /dev/null
@@ -1,29 +0,0 @@
-<script lang="ts">
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
-	import { Switch as SwitchPrimitive } from 'bits-ui';
-
-	let {
-		checked = $bindable(false),
-		class: className,
-		ref = $bindable(null),
-		...restProps
-	}: WithoutChildrenOrChild<SwitchPrimitive.RootProps> = $props();
-</script>
-
-<SwitchPrimitive.Root
-	bind:checked
-	bind:ref
-	class={cn(
-		'peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80',
-		className
-	)}
-	data-slot="switch"
-	{...restProps}
->
-	<SwitchPrimitive.Thumb
-		class={cn(
-			'pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground'
-		)}
-		data-slot="switch-thumb"
-	/>
-</SwitchPrimitive.Root>
diff --git a/ui/apps/chat/src/lib/components/ui/textarea/textarea.svelte b/ui/apps/chat/src/lib/components/ui/textarea/textarea.svelte
deleted file mode 100644
index 26e12630f..000000000
--- a/ui/apps/chat/src/lib/components/ui/textarea/textarea.svelte
+++ /dev/null
@@ -1,22 +0,0 @@
-<script lang="ts">
-	import { cn, type WithElementRef, type WithoutChildren } from '#lib/components/ui/utils.ts';
-	import type { HTMLTextareaAttributes } from 'svelte/elements';
-
-	let {
-		class: className,
-		ref = $bindable(null),
-		value = $bindable(),
-		...restProps
-	}: WithoutChildren<WithElementRef<HTMLTextareaAttributes>> = $props();
-</script>
-
-<textarea
-	bind:this={ref}
-	bind:value
-	class={cn(
-		'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40',
-		className
-	)}
-	data-slot="textarea"
-	{...restProps}
-></textarea>
diff --git a/ui/apps/chat/src/lib/components/ui/toggle-group/toggle-group-item.svelte b/ui/apps/chat/src/lib/components/ui/toggle-group/toggle-group-item.svelte
deleted file mode 100644
index b20efb487..000000000
--- a/ui/apps/chat/src/lib/components/ui/toggle-group/toggle-group-item.svelte
+++ /dev/null
@@ -1,35 +0,0 @@
-<script lang="ts">
-	import { getToggleGroupCtx } from './toggle-group.svelte';
-	import { type ToggleVariants, toggleVariants } from '#lib/components/ui/toggle/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
-	import { ToggleGroup as ToggleGroupPrimitive } from 'bits-ui';
-
-	let {
-		class: className,
-		ref = $bindable(null),
-		size,
-		value = $bindable(),
-		variant,
-		...restProps
-	}: ToggleGroupPrimitive.ItemProps & ToggleVariants = $props();
-
-	const ctx = getToggleGroupCtx();
-</script>
-
-<ToggleGroupPrimitive.Item
-	bind:ref
-	class={cn(
-		'group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t',
-		toggleVariants({
-			size: ctx.size || size,
-			variant: ctx.variant || variant
-		}),
-		className
-	)}
-	data-size={ctx.size || size}
-	data-slot="toggle-group-item"
-	data-spacing={ctx.spacing}
-	data-variant={ctx.variant || variant}
-	{value}
-	{...restProps}
-/>
diff --git a/ui/apps/chat/src/lib/components/ui/toggle-group/toggle-group.svelte b/ui/apps/chat/src/lib/components/ui/toggle-group/toggle-group.svelte
deleted file mode 100644
index 5297923da..000000000
--- a/ui/apps/chat/src/lib/components/ui/toggle-group/toggle-group.svelte
+++ /dev/null
@@ -1,75 +0,0 @@
-<script lang="ts" module>
-	import { toggleVariants } from '#lib/components/ui/toggle/index.ts';
-	import { getContext, setContext } from 'svelte';
-	import type { VariantProps } from 'tailwind-variants';
-
-	type ToggleVariants = VariantProps<typeof toggleVariants>;
-
-	interface ToggleGroupContext extends ToggleVariants {
-		spacing?: number;
-		orientation?: 'horizontal' | 'vertical';
-	}
-
-	export function setToggleGroupCtx(props: ToggleGroupContext) {
-		setContext('toggleGroup', props);
-	}
-
-	export function getToggleGroupCtx() {
-		return getContext<Required<ToggleGroupContext>>('toggleGroup');
-	}
-</script>
-
-<script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
-	import { ToggleGroup as ToggleGroupPrimitive } from 'bits-ui';
-
-	let {
-		class: className,
-		orientation = 'horizontal',
-		ref = $bindable(null),
-		size = 'default',
-		spacing = 0,
-		value = $bindable(),
-		variant = 'default',
-		...restProps
-	}: ToggleGroupPrimitive.RootProps &
-		ToggleVariants & {
-			spacing?: number;
-			orientation?: 'horizontal' | 'vertical';
-		} = $props();
-
-	setToggleGroupCtx({
-		get orientation() {
-			return orientation;
-		},
-		get size() {
-			return size;
-		},
-		get spacing() {
-			return spacing;
-		},
-		get variant() {
-			return variant;
-		}
-	});
-</script>
-
-<!--
-Discriminated Unions + Destructing (required for bindable) do not
-get along, so we shut typescript up by casting `value` to `never`.
--->
-<ToggleGroupPrimitive.Root
-	bind:ref
-	bind:value={value as never}
-	class={cn(
-		'rounded-md group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-vertical:flex-col data-vertical:items-stretch',
-		className
-	)}
-	data-size={size}
-	data-slot="toggle-group"
-	data-spacing={spacing}
-	data-variant={variant}
-	{orientation}
-	style={`--gap: ${spacing}`}
-	{...restProps}
-/>
diff --git a/ui/apps/chat/src/lib/components/ui/toggle/toggle.svelte b/ui/apps/chat/src/lib/components/ui/toggle/toggle.svelte
deleted file mode 100644
index efd3f6f09..000000000
--- a/ui/apps/chat/src/lib/components/ui/toggle/toggle.svelte
+++ /dev/null
@@ -1,54 +0,0 @@
-<script lang="ts" module>
-	import { tv, type VariantProps } from 'tailwind-variants';
-
-	export const toggleVariants = tv({
-		base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive gap-1 rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] inline-flex items-center justify-center whitespace-nowrap disabled:pointer-events-none disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 group/toggle",
-		defaultVariants: {
-			size: 'default',
-			variant: 'default'
-		},
-		variants: {
-			size: {
-				default:
-					'h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
-				lg: 'h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
-				sm: "h-7 min-w-7 rounded-md px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5"
-			},
-			variant: {
-				default:
-					'bg-transparent hover:bg-muted-foreground/10 hover:text-accent-foreground backdrop-blur-sm data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
-				outline:
-					'border bg-background shadow-sm hover:bg-muted-foreground/10 hover:text-accent-foreground backdrop-blur-sm data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:border-input'
-			}
-		}
-	});
-
-	export type ToggleVariant = VariantProps<typeof toggleVariants>['variant'];
-	export type ToggleSize = VariantProps<typeof toggleVariants>['size'];
-	export type ToggleVariants = VariantProps<typeof toggleVariants>;
-</script>
-
-<script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
-	import { Toggle as TogglePrimitive } from 'bits-ui';
-
-	let {
-		class: className,
-		pressed = $bindable(false),
-		ref = $bindable(null),
-		size = 'default',
-		variant = 'default',
-		...restProps
-	}: TogglePrimitive.RootProps & {
-		variant?: ToggleVariant;
-		size?: ToggleSize;
-	} = $props();
-</script>
-
-<TogglePrimitive.Root
-	bind:pressed
-	bind:ref
-	class={cn(toggleVariants({ size, variant }), className)}
-	data-slot="toggle"
-	{...restProps}
-/>
diff --git a/ui/apps/chat/src/lib/components/ui/utils.ts b/ui/apps/chat/src/lib/components/ui/utils.ts
deleted file mode 100644
index 97525cc42..000000000
--- a/ui/apps/chat/src/lib/components/ui/utils.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { type ClassValue, clsx } from 'clsx';
-import { twMerge } from 'tailwind-merge';
-
-export function cn(...inputs: ClassValue[]) {
-	return twMerge(clsx(inputs));
-}
-
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export type WithoutChild<T> = T extends { child?: any } ? Omit<T, 'child'> : T;
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export type WithoutChildren<T> = T extends { children?: any } ? Omit<T, 'children'> : T;
-export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
-export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null };
diff --git a/ui/apps/chat/src/lib/constants/auto-scroll.constants.ts b/ui/apps/chat/src/lib/constants/auto-scroll.constants.ts
index 61a0ae274..932cd1104 100644
--- a/ui/apps/chat/src/lib/constants/auto-scroll.constants.ts
+++ b/ui/apps/chat/src/lib/constants/auto-scroll.constants.ts
@@ -6,10 +6,6 @@ export const LANDING_EAGER_ROWS = 8;
 // Reasoning block: stickier because reasoning fires many small
 // incremental DOM writes that easily drift a few pixels off bottom.
 export const REASONING_SCROLL_AT_BOTTOM_THRESHOLD_PX = 64;
-// Syntax-highlighted code: stickier than the chat main view because line
-// wrap reflows while the highlight.js pass settles can drift a few pixels
-// off bottom.
-export const SYNTAX_CODE_SCROLL_AT_BOTTOM_THRESHOLD_PX = 32;
 // Streaming tool output (e.g. exec_shell_command): shell commands produce
 // lots of small line writes and the exit-code line appended at the tail
 // past the last user-visible frame is what triggers DOM drift, so use a
diff --git a/ui/apps/chat/src/lib/constants/code-block.constants.ts b/ui/apps/chat/src/lib/constants/code-block.constants.ts
index 05db575f9..c3ae149a0 100644
--- a/ui/apps/chat/src/lib/constants/code-block.constants.ts
+++ b/ui/apps/chat/src/lib/constants/code-block.constants.ts
@@ -1,50 +1,9 @@
-// Constants for the markdown code-block renderer: language/fence handling and CSS classes.
-
-/** Parsing and escaping helpers for the markdown code-block renderer. */
-export const CODE_BLOCK = {
-	AMPERSAND_REGEX: /&/g,
-	/** Language fallback used when no language is specified. */
-	DEFAULT_LANGUAGE: 'text',
-	/** Matches opening/closing markdown code fences. */
-	FENCE_PATTERN: /^```|\n```/g,
-	GT_REGEX: />/g,
-	/** Matches the language specifier at the start of a code fence. */
-	LANG_PATTERN: /^(\w*)\n?/,
-	LT_REGEX: /</g,
-
-	// Matches the `text:` prefix that file-type identifiers use to denote a
-	// plain-text language (e.g. `text:typescript`). Used by tool-call renderers
-	// to recover the underlying highlight.js language.
-	TEXT_LANGUAGE_PREFIX_REGEX: /^text:/,
-	// Whitespace-only empty lines (between start of string and first non-empty line).
-	// Used by trimCodePadding to drop leading/trailing phantom blank rows from LLM
-	// payload wrappers without touching internal blank lines.
-	TRIM_LEADING_PADDING_REGEX: /^(?:[ \t]*\n)+/,
-
-	TRIM_TRAILING_PADDING_REGEX: /(?:\n[ \t]*)+$/
-} as const;
+export {
+	CODE_BLOCK,
+	CODE_BLOCK_CLASS,
+	FILE_EXTENSION_SEPARATOR,
+	FILE_PATH_SEPARATOR_REGEX,
+	TEXT_LANGUAGE_PREFIX_REGEX
+} from '@ggml-org/llama-ui/constants';

-// Matches either Unix or Windows path separators so `String.split(REGEX)` can
-// recover the trailing file-name segment from either `/foo/bar.txt` or
-// `C:\foo\bar.txt`. Used wherever a parameter accepts a user-supplied path.
-export const FILE_PATH_SEPARATOR_REGEX = /[\\/]/;
-
-// Separates a file name from its extension, e.g. the '.' in `cover.png`.
-export const FILE_EXTENSION_SEPARATOR = '.';
-
-// Matches the `text:` prefix that file-type identifiers use to denote a
-// plain-text language (e.g. `text:typescript`). Used by tool-call renderers
-// to recover the underlying highlight.js language.
-export const TEXT_LANGUAGE_PREFIX_REGEX = /^text:/;
-
-/** CSS classes applied by the markdown code-block renderer. */
-export const CODE_BLOCK_CLASS = {
-	ACTIONS: 'code-block-actions',
-	COPY_BTN: 'copy-code-btn',
-	HEADER: 'code-block-header',
-	LANGUAGE: 'code-language',
-	PREVIEW_BTN: 'preview-code-btn',
-	RELATIVE: 'relative',
-	SCROLL_CONTAINER: 'code-block-scroll-container',
-	WRAPPER: 'code-block-wrapper'
-} as const;
+// Constants for the markdown code-block renderer: language/fence handling and CSS classes.
diff --git a/ui/apps/chat/src/lib/constants/css-classes.constants.ts b/ui/apps/chat/src/lib/constants/css-classes.constants.ts
index d90ca2a5f..4ef04f9a6 100644
--- a/ui/apps/chat/src/lib/constants/css-classes.constants.ts
+++ b/ui/apps/chat/src/lib/constants/css-classes.constants.ts
@@ -1,41 +1,38 @@
-export const BOX_BORDER =
-	'border border-border/30 focus-within:border-border  dark:border-border/20 dark:focus-within:border-border';
-
-export const INPUT_CLASSES = `
-    bg-muted/60 dark:bg-muted/75
-    ${BOX_BORDER}
-    shadow-sm
-    outline-none
-    text-foreground
-`;
+export {
+	BOX_BORDER,
+	FILTER_TOGGLE_ITEM_CLASS,
+	FILTER_TRIGGER_CLASS,
+	ICON_CLASS_DEFAULT,
+	INPUT_CLASSES,
+	PANEL_CLOSE_MOBILE_CLASS
+} from '@ggml-org/llama-ui/constants';
+export { MODEL_BADGE_CLASS, MODEL_VARIANT_BADGE_CLASS } from '@ggml-org/llama-ui/models';

 export const PANEL_CLASSES = `
     bg-background
-    border border-border/30 dark:border-border/20
-    shadow-sm backdrop-blur-lg!
+    elevated-control backdrop-blur-lg!
     rounded-t-lg!
 `;

 export const CHAT_FORM_POPOVER_MAX_HEIGHT = 'max-h-80';
 export const DIALOG_SUBMENU_CONTENT = 'w-60';

-/** Close control of a dialog, a panel or the navigation rail on a phone: one tap target,
- *  one cross, one look. Each site adds the offsets that keep the cross on the 16px inset
- *  the titles sit on. */
-export const PANEL_CLOSE_MOBILE_CLASS =
-	'max-md:grid max-md:size-10 max-md:place-items-center max-md:rounded-full max-md:text-muted-foreground max-md:opacity-100 max-md:hover:bg-accent max-md:hover:text-accent-foreground';
-
 /** Shape of a chat tab, shared with the breadcrumb items next to the project tabs. */
 export const TAB_SURFACE_CLASS =
 	'flex h-8 items-center rounded-lg border text-sm whitespace-nowrap backdrop-blur-xl';

 /** Tab surface at rest: invisible until hovered. */
 export const TAB_SURFACE_IDLE_CLASS =
-	'border-transparent hover:bg-primary/10 hover:border-border/10 hover:shadow-sm';
+	'border-transparent hover:bg-primary/10 hover:border-border/10 hover:shadow-(--elevation-control)';
+
+/** A round matte glass key (see GlassKey): white glass over the page, a faint hairline, and
+ *  matte-key's blur and saturation with its small shadow, so what scrolls under it softens. */
+export const GLASS_KEY_CLASS =
+	'matte-key flex shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/20 bg-surface-glass text-accent-foreground outline-none transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50';

 /** Tab surface of the open tab. */
 export const TAB_SURFACE_ACTIVE_CLASS =
-	'bg-muted/60 border-border/10 shadow-sm text-accent-foreground hover:bg-primary/15';
+	'matte-key bg-muted/60 border-border/10 text-accent-foreground hover:bg-primary/15';

 /** Selects the focused chat-form input (either renderer) to restore focus after model actions. */
 export const CHAT_INPUT_FOCUS_SELECTOR =
@@ -53,31 +50,6 @@ export const DROPDOWN_MENU_CONTENT_SEARCH_SELECTOR = '[data-slot="dropdown-menu-
 export const SELECTOR_GROUP_STICKY_OFFSET =
 	'top: calc(var(--dropdown-sticky-height, 0px) + 2.25rem - 1px)';

-/** Filter controls above the model table: one box, one height, one fill. */
-export const FILTER_TRIGGER_CLASS = `
-    h-8
-    gap-1.5
-    rounded-md
-    px-3
-    text-sm
-    font-medium
-    transition-colors
-    hover:bg-muted/80 dark:hover:bg-muted
-    ${INPUT_CLASSES}
-`;
-
-/** The filter toggles' shared box: the same fill, border and shadow as a filter trigger. */
-export const FILTER_TOGGLE_GROUP_CLASS = `
-    h-8
-    overflow-hidden
-    divide-x divide-border/30 dark:divide-border/20
-    ${INPUT_CLASSES}
-`;
-
-/** One filter toggle of the models manager toolbar; its group draws the box. */
-export const FILTER_TOGGLE_ITEM_CLASS =
-	'h-full rounded-none hover:bg-muted/80 dark:hover:bg-muted data-[state=on]:bg-muted-foreground/15 data-[state=on]:text-foreground dark:data-[state=on]:bg-muted-foreground/25';
-
 /** Column grid shared by every row of the models manager table. Below md the context,
  *  status and actions columns are dropped, so a phone gives the whole width to the
  *  model id and floats the row's last cell at the row's end. */
@@ -89,22 +61,11 @@ export const MODEL_ROW_GRID_CLASS =
 export const MODEL_ROW_TRAILING_CELL_CLASS =
 	'max-md:absolute max-md:top-1/2 max-md:right-3 max-md:-translate-y-1/2';

-/** Neutral model badge: params, quantization, tags. */
-export const MODEL_BADGE_CLASS =
-	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25';
-
-/** Emphasis model badge: draft sidecars and other markers that must stand out. */
-export const MODEL_VARIANT_BADGE_CLASS =
-	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-1.5 py-0 text-[10px] font-mono font-semibold uppercase tracking-wide text-primary-foreground';
-
-/** Default Tailwind size class for inline icon components (lucide, etc.). */
-export const ICON_CLASS_DEFAULT = 'h-4 w-4';
-
 /** Small Tailwind size class for inline icons. */
-export const ICON_CLASS_SM = 'h-3.5 w-3.5';
+export const ICON_CLASS_SM = 'size-icon-sm';

 /** Extra-small Tailwind size class for inline icons. */
-export const ICON_CLASS_XS = 'h-3 w-3';
+export const ICON_CLASS_XS = 'size-icon-xs';

 /** Icon size + spinning animation; used for live-streaming tool indicators. */
-export const ICON_CLASS_SPIN = 'h-4 w-4 animate-spin';
+export const ICON_CLASS_SPIN = 'size-icon-md animate-spin';
diff --git a/ui/apps/chat/src/lib/constants/huggingface.constants.ts b/ui/apps/chat/src/lib/constants/huggingface.constants.ts
index 9a9ce6885..ca444b016 100644
--- a/ui/apps/chat/src/lib/constants/huggingface.constants.ts
+++ b/ui/apps/chat/src/lib/constants/huggingface.constants.ts
@@ -5,11 +5,22 @@
  * Reference: https://huggingface.co/docs/huggingface_hub/package_reference/hf_api
  */

+import { GIGABYTE, KILOBYTE, MEGABYTE } from '@ggml-org/llama-ui/models';
+export {
+	BYTE_LABEL,
+	GIGABYTE,
+	GIGABYTE_LABEL,
+	HF_AVATARS_URL,
+	KILOBYTE,
+	KILOBYTE_LABEL,
+	MEGABYTE,
+	MEGABYTE_LABEL
+} from '@ggml-org/llama-ui/models';
+
 // API endpoints

 export const HF_BASE_URL = 'https://huggingface.co';
 export const HF_API_MODELS_URL = `${HF_BASE_URL}/api/models`;
-export const HF_AVATARS_URL = `${HF_BASE_URL}/api/avatars`;

 // Query params

@@ -176,9 +187,6 @@ export const HF_TASK_TAGS: readonly string[] = [
 // Formatting

 export const BYTE = 1;
-export const KILOBYTE = 1_000;
-export const MEGABYTE = 1_000_000;
-export const GIGABYTE = 1_000_000_000;
 export const TERABYTE = 1_000_000_000_000;

 /**
@@ -199,11 +207,6 @@ export const HF_SIZE_SUFFIX_BYTES: Readonly<Record<string, number>> = {
 	t: TERABYTE
 };

-export const BYTE_LABEL = 'B';
-export const KILOBYTE_LABEL = 'KB';
-export const MEGABYTE_LABEL = 'MB';
-export const GIGABYTE_LABEL = 'GB';
-
 /** Count suffixes for compact number formatting, e.g. `1.5K`, `2.0M`. */
 export const KILO_LABEL = 'K';
 export const MEGA_LABEL = 'M';
diff --git a/ui/apps/chat/src/lib/constants/icons.constants.ts b/ui/apps/chat/src/lib/constants/icons.constants.ts
index 338fc35d9..fa0a36e20 100644
--- a/ui/apps/chat/src/lib/constants/icons.constants.ts
+++ b/ui/apps/chat/src/lib/constants/icons.constants.ts
@@ -3,17 +3,16 @@
  * Centralized configuration to ensure consistent icon usage across the app
  */

+import { MODALITY_FLAG_KEYS, MODALITY_ORDER } from '@ggml-org/llama-ui/models';
 import {
 	CircleAlert as LoadFailedIcon,
 	Compass as DiscoverIcon,
 	Eject as UnloadIcon,
-	Eye as VisionIcon,
 	File as FileIcon,
 	FileText as FileTextIcon,
 	FolderOpen as CwdCommandIcon,
 	FoldVertical as CompactCommandIcon,
 	Image as ImageIcon,
-	Lightbulb as ReasoningIcon,
 	Loader2 as LoadingIcon,
 	Mic as AudioIcon,
 	Package as ModelIcon,
@@ -22,17 +21,19 @@ import {
 	Power as LoadIcon,
 	RotateCw as RetryIcon,
 	Sparkles as PromptCommandIcon,
-	Video as VideoIcon,
-	Wrench as ToolUseIcon
+	Video as VideoIcon
 } from '@lucide/svelte';
-import {
-	ChatFormCommandAction,
-	FileTypeCategory,
-	ModelCapability,
-	ModelModality
-} from '#lib/enums/index.ts';
-import type { ModelCapabilities, ModelModalities } from '#lib/types/models.js';
+import { ChatFormCommandAction, FileTypeCategory, ModelCapability } from '#lib/enums/index.ts';
+import type { ModelCapabilities } from '#lib/types/models.js';
 import type { Component } from 'svelte';
+export {
+	CAPABILITY_ICONS,
+	CAPABILITY_LABELS,
+	MODALITY_FLAG_KEYS,
+	MODALITY_ICONS,
+	MODALITY_LABELS,
+	MODALITY_ORDER
+} from '@ggml-org/llama-ui/models';

 export const FILE_TYPE_ICONS = {
 	[FileTypeCategory.AUDIO]: AudioIcon,
@@ -50,35 +51,6 @@ export const MODEL_ICON = ModelIcon;
 /** The mark for the Discover Models surface and its entry points. */
 export const DISCOVER_ICON = DiscoverIcon;

-export const MODALITY_ICONS = {
-	[ModelModality.AUDIO]: AudioIcon,
-	[ModelModality.VIDEO]: VideoIcon,
-	[ModelModality.VISION]: VisionIcon
-} as const;
-
-export const MODALITY_LABELS = {
-	[ModelModality.AUDIO]: 'Audio',
-	[ModelModality.VIDEO]: 'Video',
-	[ModelModality.VISION]: 'Vision'
-} as const;
-
-/** Maps an input ModelModality to the boolean flag it drives on the ModelModalities type */
-export const MODALITY_FLAG_KEYS: Record<
-	Exclude<ModelModality, ModelModality.TEXT>,
-	keyof ModelModalities
-> = {
-	[ModelModality.AUDIO]: 'audio',
-	[ModelModality.VIDEO]: 'video',
-	[ModelModality.VISION]: 'vision'
-};
-
-/** Modalities in the order the filters and the model cards list them. */
-export const MODALITY_ORDER: Exclude<ModelModality, ModelModality.TEXT>[] = [
-	ModelModality.VISION,
-	ModelModality.VIDEO,
-	ModelModality.AUDIO
-];
-
 /** Boolean flag a modality drives on the ModelModalities type. */
 export type ModalityKey = (typeof MODALITY_FLAG_KEYS)[keyof typeof MODALITY_FLAG_KEYS];

@@ -87,16 +59,6 @@ export const MODALITY_KEYS: ModalityKey[] = MODALITY_ORDER.map(
 	(modality) => MODALITY_FLAG_KEYS[modality]
 );

-export const CAPABILITY_ICONS: Record<ModelCapability, Component> = {
-	[ModelCapability.REASONING]: ReasoningIcon,
-	[ModelCapability.TOOL_USE]: ToolUseIcon
-} as const;
-
-export const CAPABILITY_LABELS: Record<ModelCapability, string> = {
-	[ModelCapability.REASONING]: 'Reasoning',
-	[ModelCapability.TOOL_USE]: 'Tool use'
-} as const;
-
 /** Maps a ModelCapability to the boolean flag it drives on the ModelCapabilities type */
 export const CAPABILITY_FLAG_KEYS: Record<ModelCapability, keyof ModelCapabilities> = {
 	[ModelCapability.REASONING]: 'reasoning',
diff --git a/ui/apps/chat/src/lib/constants/mention-badge.constants.ts b/ui/apps/chat/src/lib/constants/mention-badge.constants.ts
index f0873dc4a..63c975a01 100644
--- a/ui/apps/chat/src/lib/constants/mention-badge.constants.ts
+++ b/ui/apps/chat/src/lib/constants/mention-badge.constants.ts
@@ -8,7 +8,7 @@
 export const MENTION_BADGE_CLASSNAME =
 	'inline-flex w-fit shrink-0 items-center gap-1 whitespace-nowrap rounded-md border border-border/50 bg-foreground/5 px-1.5 py-0.5 text-xs font-mono text-foreground hover:bg-foreground/10 dark:bg-foreground/10 dark:text-secondary-foreground';

-export const MENTION_BADGE_ICON_CLASSNAME = 'h-3 w-3 shrink-0';
+export const MENTION_BADGE_ICON_CLASSNAME = 'size-icon-xs shrink-0';

 /** Regex flag that makes the mention scanner walk every link in a message instead of the first. */
 export const MENTION_LINK_SCAN_FLAGS = 'g';
diff --git a/ui/apps/chat/src/lib/constants/model-compatibility.constants.ts b/ui/apps/chat/src/lib/constants/model-compatibility.constants.ts
index 5d65f8d62..e9ce54c4d 100644
--- a/ui/apps/chat/src/lib/constants/model-compatibility.constants.ts
+++ b/ui/apps/chat/src/lib/constants/model-compatibility.constants.ts
@@ -8,25 +8,11 @@
  * any caller share one source.
  */

-/** Bytes in one mebibyte (MiB), used to convert a file size to MB. */
-export const MIB_BYTES = 1_048_576;
-
-/** MiB in one tier unit; the tiers below are binary sizes, i.e. GiB. */
-export const MB_PER_GB = 1024;
-
-/** Overhead multiplier applied to the file size when estimating weight memory. */
-export const QUANT_WEIGHT = 1.05;
-
-/** Share of RAM the app allows the model to occupy. */
-export const RAM_BUDGET_RATIO = 0.75;
-
-/** Fixed RAM overhead (MB) reserved for the system and KV cache. */
-export const RAM_OVERHEAD_MB = 2048;
-
-/**
- * Memory tiers (GB) covering the RAM sizes common machines ship with, in
- * small enough steps that the requirement reads honestly. Device-agnostic on
- * purpose: the server exposes no host RAM, so the UI presents the tier and
- * lets the user judge.
- */
-export const MEM_TIERS = [4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024];
+export {
+	MB_PER_GB,
+	MEM_TIERS,
+	MIB_BYTES,
+	QUANT_WEIGHT,
+	RAM_BUDGET_RATIO,
+	RAM_OVERHEAD_MB
+} from '@ggml-org/llama-ui/models';
diff --git a/ui/apps/chat/src/lib/constants/models-discover-download.constants.ts b/ui/apps/chat/src/lib/constants/models-discover-download.constants.ts
index 06dae965f..dff1a2959 100644
--- a/ui/apps/chat/src/lib/constants/models-discover-download.constants.ts
+++ b/ui/apps/chat/src/lib/constants/models-discover-download.constants.ts
@@ -5,6 +5,12 @@

 import { ModelDraftSidecar } from '#lib/enums/index.ts';

+export {
+	BIT_DEPTH_LABEL_SUFFIX,
+	OTHER_BIT_DEPTH,
+	OTHER_BIT_DEPTH_LABEL
+} from '@ggml-org/llama-ui/models';
+
 /**
  * `--spec-type` value for each draft sidecar.
  */
@@ -15,14 +21,6 @@ export const SPEC_TYPE: Record<ModelDraftSidecar, string> = {
 	[ModelDraftSidecar.MTP]: 'draft-mtp'
 };

-/** Bit-depth bucket for files that carry no quant token; rendered as "Other". */
-export const OTHER_BIT_DEPTH = 99;
-
-export const OTHER_BIT_DEPTH_LABEL = 'Other';
-
-/** Suffix appended after a bit-depth number to label a row, e.g. `4-bit`. */
-export const BIT_DEPTH_LABEL_SUFFIX = '-bit';
-
 /**
  * Fixed tokens of the standalone `llama serve` command preview, so the command
  * builder and its rendered spans share one source of the CLI spelling.
diff --git a/ui/apps/chat/src/lib/constants/settings-keys.constants.ts b/ui/apps/chat/src/lib/constants/settings-keys.constants.ts
index 910f492a3..c94f97ff7 100644
--- a/ui/apps/chat/src/lib/constants/settings-keys.constants.ts
+++ b/ui/apps/chat/src/lib/constants/settings-keys.constants.ts
@@ -70,6 +70,7 @@ export const SETTINGS_KEYS = {
 	SHOW_THOUGHT_IN_PROGRESS: 'showThoughtInProgress',
 	SHOW_TOOL_CALL_IN_PROGRESS: 'showToolCallInProgress',
 	SINGLE_ROW_CHAT_FORM: 'singleRowChatForm',
+	SURFACE_THEME: 'surfaceTheme',
 	SYMBOLIC_MATH_ENABLED: 'symbolicMathEnabled',
 	SYSTEM_MESSAGE: 'systemMessage',
 	// Sampling
diff --git a/ui/apps/chat/src/lib/constants/settings.constants.ts b/ui/apps/chat/src/lib/constants/settings.constants.ts
index 034764e76..56f167abf 100644
--- a/ui/apps/chat/src/lib/constants/settings.constants.ts
+++ b/ui/apps/chat/src/lib/constants/settings.constants.ts
@@ -8,7 +8,9 @@ import { FILE_GLOB_SEARCH_PICKERS } from './working-directory.constants';
 import {
 	Code,
 	Database,
+	File,
 	Funnel,
+	GlassWater,
 	ListRestart,
 	Monitor,
 	Moon,
@@ -16,7 +18,7 @@ import {
 	SlidersVertical,
 	Sun
 } from '@lucide/svelte';
-import { SyncableParameterType } from '#lib/enums/index.ts';
+import { SurfaceTheme, SyncableParameterType } from '#lib/enums/index.ts';
 import { SettingsFieldType } from '#lib/enums/settings.enums.ts';
 import { ColorMode } from '#lib/enums/ui.enums.ts';
 import type {
@@ -75,6 +77,17 @@ export const SETTINGS_REGISTRY: SettingsSectionEntry[] = [
 				],
 				type: SettingsFieldType.SELECT
 			},
+			{
+				defaultValue: SurfaceTheme.PAPER,
+				help: 'Choose how the light theme draws its surfaces: Paper puts white panels, fields and buttons on a faint grey page; Matte puts grey glass on a white page. Dark mode is the same for both.',
+				key: SETTINGS_KEYS.SURFACE_THEME,
+				label: 'Light surfaces',
+				options: [
+					{ icon: File, label: 'Paper', value: SurfaceTheme.PAPER },
+					{ icon: GlassWater, label: 'Matte', value: SurfaceTheme.MATTE }
+				],
+				type: SettingsFieldType.SELECT
+			},
 			{
 				defaultValue: '',
 				help: `Set the API Key if you are using <code> ${CLI_FLAGS.API_KEY} </code> option for the server.`,
diff --git a/ui/apps/chat/src/lib/constants/ui.constants.ts b/ui/apps/chat/src/lib/constants/ui.constants.ts
index 4a2f159b3..e76cd31b7 100644
--- a/ui/apps/chat/src/lib/constants/ui.constants.ts
+++ b/ui/apps/chat/src/lib/constants/ui.constants.ts
@@ -98,9 +98,6 @@ export const DEFAULT_MOBILE_BREAKPOINT = 768;
 /** Models listed per remote provider before the "+ X more" line; search covers the rest. */
 export const REMOTE_PROVIDER_MODEL_LIMIT = 12;

-/** Orgs whose avatar is dark and needs inverting in dark mode. */
-export const DARK_INVERT_AVATAR_ORGS = ['openai'];
-
 /** Model rows mounted before the list scrolls; a local catalog can hold hundreds. */
 export const MODEL_ROW_WINDOW = 50;

diff --git a/ui/apps/chat/src/lib/enums/boolean-string.enums.ts b/ui/apps/chat/src/lib/enums/boolean-string.enums.ts
index 80a4f72bc..13ed040ae 100644
--- a/ui/apps/chat/src/lib/enums/boolean-string.enums.ts
+++ b/ui/apps/chat/src/lib/enums/boolean-string.enums.ts
@@ -1,5 +1 @@
-/** String representation of a boolean used in data attributes and persisted values. */
-export enum BooleanString {
-	FALSE = 'false',
-	TRUE = 'true'
-}
+export { BooleanString } from '@ggml-org/llama-ui/enums';
diff --git a/ui/apps/chat/src/lib/enums/index.ts b/ui/apps/chat/src/lib/enums/index.ts
index 4006034e2..29fd94373 100644
--- a/ui/apps/chat/src/lib/enums/index.ts
+++ b/ui/apps/chat/src/lib/enums/index.ts
@@ -103,6 +103,7 @@ export {
 	ScrollCarouselVariant,
 	SidebarAction,
 	SidebarSectionKind,
+	SurfaceTheme,
 	TooltipSide,
 	UrlProtocol
 } from './ui.enums';
diff --git a/ui/apps/chat/src/lib/enums/model.enums.ts b/ui/apps/chat/src/lib/enums/model.enums.ts
index 2f25c26f4..e3a4d7b4f 100644
--- a/ui/apps/chat/src/lib/enums/model.enums.ts
+++ b/ui/apps/chat/src/lib/enums/model.enums.ts
@@ -1,29 +1,4 @@
-export enum ModelModality {
-	AUDIO = 'AUDIO',
-	TEXT = 'TEXT',
-	VIDEO = 'VIDEO',
-	VISION = 'VISION'
-}
-
-export enum ModelCapability {
-	REASONING = 'reasoning',
-	TOOL_USE = 'tools'
-}
-
-/**
- * Speculative-decoding draft sidecars (server spec-type draft-*).
- * Filenames use the lowercase token, e.g. `mtp-<name>.gguf` or `-mtp` suffix.
- */
-export enum ModelDraftSidecar {
-	/** DFlash block-diffusion draft (spec-type draft-dflash). */
-	DFLASH = 'dflash',
-	/** DSpark block-diffusion draft (spec-type draft-dspark). */
-	DSPARK = 'dspark',
-	/** EAGLE-3 speculative draft (spec-type draft-eagle3). */
-	EAGLE3 = 'eagle3',
-	/** Multi-token-prediction draft head (spec-type draft-mtp). */
-	MTP = 'mtp'
-}
+export { ModelCapability, ModelDraftSidecar, ModelModality } from '@ggml-org/llama-ui/models';

 /**
  * Non-draft sidecar file types. A sidecar is any auxiliary GGUF file
diff --git a/ui/apps/chat/src/lib/enums/ui.enums.ts b/ui/apps/chat/src/lib/enums/ui.enums.ts
index c4c0156cc..2ea3e5f31 100644
--- a/ui/apps/chat/src/lib/enums/ui.enums.ts
+++ b/ui/apps/chat/src/lib/enums/ui.enums.ts
@@ -1,14 +1,9 @@
-export enum ColorMode {
-	DARK = 'dark',
-	LIGHT = 'light',
-	SYSTEM = 'system'
-}
+export { ColorMode, TooltipSide } from '@ggml-org/llama-ui/enums';

-export enum TooltipSide {
-	BOTTOM = 'bottom',
-	LEFT = 'left',
-	RIGHT = 'right',
-	TOP = 'top'
+/** The light surface theme: Paper (white panels on a faint grey page) or Matte (grey glass on white). */
+export enum SurfaceTheme {
+	MATTE = 'matte',
+	PAPER = 'paper'
 }

 /**
diff --git a/ui/apps/chat/src/lib/stores/conversations/index.svelte.ts b/ui/apps/chat/src/lib/stores/conversations/index.svelte.ts
index 7e198a319..4aace719c 100644
--- a/ui/apps/chat/src/lib/stores/conversations/index.svelte.ts
+++ b/ui/apps/chat/src/lib/stores/conversations/index.svelte.ts
@@ -808,10 +808,14 @@ class ConversationsStore implements ConversationsPreferencesHost {
 	 * @param nodeId - The new current node ID
 	 */
 	async updateCurrentNode(nodeId: string): Promise<void> {
-		if (!this.activeConversation) return;
+		const conversationId = this.activeConversation?.id;
+
+		if (!conversationId) return;
+
+		await DatabaseService.updateCurrentNode(conversationId, nodeId);

-		await DatabaseService.updateCurrentNode(this.activeConversation.id, nodeId);
-		this.activeConversation.currNode = nodeId;
+		// the active conversation can change or close during the write
+		if (this.activeConversation?.id === conversationId) this.activeConversation.currNode = nodeId;
 	}

 	/**
diff --git a/ui/apps/chat/src/lib/types/models.d.ts b/ui/apps/chat/src/lib/types/models.d.ts
index c900d1eea..9d0594073 100644
--- a/ui/apps/chat/src/lib/types/models.d.ts
+++ b/ui/apps/chat/src/lib/types/models.d.ts
@@ -1,11 +1,11 @@
+import type {
+	ModelDownloadProgress as LlamaUiModelDownloadProgress,
+	ModelModalities
+} from '@ggml-org/llama-ui/models';
 import type { ModelSidecar } from '#lib/constants/model-id.constants.ts';
 import type { ApiModelDataEntry, ApiModelDetails, ApiModelLoadStage } from '#lib/types/api.js';

-export interface ModelModalities {
-	vision: boolean;
-	audio: boolean;
-	video: boolean;
-}
+export type { ModelModalities } from '@ggml-org/llama-ui/models';

 export interface ModelCapabilities {
 	reasoning: boolean;
@@ -44,9 +44,7 @@ export interface ModelDownloadFileProgress {
 }

 /** Progress of an in-flight download, summed across its files. */
-export interface ModelDownloadProgress {
-	downloadedBytes: number;
-	totalBytes: number;
+export interface ModelDownloadProgress extends LlamaUiModelDownloadProgress {
 	/** Per-file progress keyed by file URL. */
 	files: Record<string, ModelDownloadFileProgress>;
 }
diff --git a/ui/apps/chat/src/lib/utils/code.ts b/ui/apps/chat/src/lib/utils/code.ts
index 9b3daa3f6..cc9eba2d3 100644
--- a/ui/apps/chat/src/lib/utils/code.ts
+++ b/ui/apps/chat/src/lib/utils/code.ts
@@ -1,5 +1,6 @@
 import { CODE_BLOCK, NEWLINE } from '#lib/constants/index.ts';
-import hljs from 'highlight.js';
+
+export { highlightCode, trimCodePadding } from '@ggml-org/llama-ui/code';

 export interface IncompleteCodeBlock {
 	language: string;
@@ -61,83 +62,6 @@ export function splitGluedClosingCodeFences(markdown: string): string {
 	return changed ? lines.join(NEWLINE) : markdown;
 }

-/**
- * Strips empty lines (whitespace-only) from the start and end of code.
- *
- * Tool call payloads frequently arrive with surrounding whitespace from LLM
- * formatting (`"\nfunction ...\n"`). Preserving those newlines makes hljs emit
- * a leading/trailing empty line that `<pre>` then renders as a phantom row,
- * pushing real content away from the box edge. The trim keeps the body intact
- * so internal blank lines are still rendered as such.
- */
-function trimCodePadding(code: string): string {
-	return code
-		.replace(CODE_BLOCK.TRIM_LEADING_PADDING_REGEX, '')
-		.replace(CODE_BLOCK.TRIM_TRAILING_PADDING_REGEX, '');
-}
-
-function escapeCode(code: string): string {
-	return code
-		.replace(CODE_BLOCK.AMPERSAND_REGEX, '&amp;')
-		.replace(CODE_BLOCK.LT_REGEX, '&lt;')
-		.replace(CODE_BLOCK.GT_REGEX, '&gt;');
-}
-
-/** Bounded cache for highlightCode results. */
-const HIGHLIGHT_CACHE_MAX_SIZE = 64;
-const highlightCache = new Map<string, string>();
-
-/**
- * Highlights code using highlight.js
- * @param code - The code to highlight
- * @param language - The programming language
- * @param autoDetect - Fall back to `highlightAuto` when `language` is unknown.
- *   Callers rendering a still-streaming block should pass false: auto-detection
- *   costs ~38ms per call and re-guesses on every chunk, so the language (and
- *   therefore the whole highlight) flickers as the block grows.
- * @returns HTML string with syntax highlighting
- */
-export function highlightCode(code: string, language: string, autoDetect = true): string {
-	if (!code) return '';
-
-	// Cache key includes language and autoDetect flag since results differ.
-	// During streaming, the same code string may be highlighted repeatedly
-	// (e.g., when text after a code block changes but the code itself doesn't).
-	const cacheKey = `${language}:${autoDetect}:${code}`;
-	const cached = highlightCache.get(cacheKey);
-
-	if (cached) return cached;
-
-	const trimmed = trimCodePadding(code);
-
-	let result: string;
-
-	try {
-		const lang = language.toLowerCase();
-		const isSupported = hljs.getLanguage(lang);
-
-		if (isSupported) {
-			result = hljs.highlight(trimmed, { language: lang }).value;
-		} else if (autoDetect) {
-			result = hljs.highlightAuto(trimmed).value;
-		} else {
-			result = escapeCode(trimmed);
-		}
-	} catch {
-		result = escapeCode(trimmed);
-	}
-
-	if (highlightCache.size >= HIGHLIGHT_CACHE_MAX_SIZE) {
-		highlightCache.delete(highlightCache.keys().next().value!);
-	}
-
-	highlightCache.set(cacheKey, result);
-
-	return result;
-}
-
-export { trimCodePadding };
-
 /**
  * Detects if markdown ends with an incomplete code block (opened but not closed).
  * Returns the code block info if found, null otherwise.
diff --git a/ui/apps/chat/src/lib/utils/css.ts b/ui/apps/chat/src/lib/utils/css.ts
index 99351a7f4..eaca26f1b 100644
--- a/ui/apps/chat/src/lib/utils/css.ts
+++ b/ui/apps/chat/src/lib/utils/css.ts
@@ -1,3 +1,15 @@
+import { SurfaceTheme } from '#lib/enums/index.ts';
+
+/**
+ * Applies the light surface theme: Matte sets the theme-matte class on <html>, which the tokens
+ * read (see tokens/semantic.css); Paper, the default, needs no class.
+ */
+export function applySurfaceTheme(theme: unknown): void {
+	if (typeof document === 'undefined') return;
+
+	document.documentElement.classList.toggle('theme-matte', theme === SurfaceTheme.MATTE);
+}
+
 /**
  * Converts a rem CSS value to pixels based on the document root font size.
  */
diff --git a/ui/apps/chat/src/lib/utils/formatters.ts b/ui/apps/chat/src/lib/utils/formatters.ts
index 9177ca6e2..866c0a792 100644
--- a/ui/apps/chat/src/lib/utils/formatters.ts
+++ b/ui/apps/chat/src/lib/utils/formatters.ts
@@ -8,6 +8,8 @@ import {
 	SHORT_DURATION_THRESHOLD
 } from '#lib/constants/index.ts';

+export { formatParameters } from '@ggml-org/llama-ui/models';
+
 /**
  * Formats file size in bytes to human readable format
  * Supports Bytes, KB, MB, and GB
@@ -27,35 +29,6 @@ export function formatFileSize(bytes: number | unknown): string {
 	return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
 }

-/**
- * Format parameter count to human-readable format (B, M, K)
- *
- * Billions keep one decimal for hub counts (`15.2B`) and none for whole
- * values (id-parsed counts are integers anyway, e.g. `8B`).
- *
- * @param params - Parameter count
- * @returns Human-readable parameter count
- */
-export function formatParameters(params: number | unknown): string {
-	if (typeof params !== 'number') return 'Unknown';
-
-	if (params >= 1e9) {
-		const billions = params / 1e9;
-
-		return `${Number.isInteger(billions) ? billions : billions.toFixed(1)}B`;
-	}
-
-	if (params >= 1e6) {
-		return `${(params / 1e6).toFixed(2)}M`;
-	}
-
-	if (params >= 1e3) {
-		return `${(params / 1e3).toFixed(2)}K`;
-	}
-
-	return params.toString();
-}
-
 /** Separator between the context values shown for one model, e.g. `8192 / 4096`. */
 const CONTEXT_VALUE_SEPARATOR = ' / ';
 /** Unit the context values are shown in. */
diff --git a/ui/apps/chat/src/lib/utils/index.ts b/ui/apps/chat/src/lib/utils/index.ts
index a3c50d37d..a05445513 100644
--- a/ui/apps/chat/src/lib/utils/index.ts
+++ b/ui/apps/chat/src/lib/utils/index.ts
@@ -376,7 +376,7 @@ export { type GgufMetadata, type GgufValue, readGgufMetadata } from './gguf-meta
 export { uuid } from './uuid';

 // CSS utilities
-export { remToPx } from './css';
+export { applySurfaceTheme, remToPx } from './css';

 // Audio format helper (used by agentic store and chat service)
 export { getAudioInputFormat } from './audio-format';
diff --git a/ui/apps/chat/src/lib/utils/model-compatibility.ts b/ui/apps/chat/src/lib/utils/model-compatibility.ts
index 0f4627eff..4c6be60b3 100644
--- a/ui/apps/chat/src/lib/utils/model-compatibility.ts
+++ b/ui/apps/chat/src/lib/utils/model-compatibility.ts
@@ -9,29 +9,4 @@
  * device-specific budgets are deliberately ignored - callers present the
  * requirement and let the user judge.
  */
-import {
-	MB_PER_GB,
-	MEM_TIERS,
-	MIB_BYTES,
-	QUANT_WEIGHT,
-	RAM_BUDGET_RATIO,
-	RAM_OVERHEAD_MB
-} from '#lib/constants/index.ts';
-
-/**
- * Smallest memory tier (GB) that can run a model of the given file size,
- * or null if nothing fits even the largest tier.
- */
-export function minMemoryTierGb(sizeBytes: number): number | null {
-	if (!sizeBytes) return null;
-
-	const weightMb = (sizeBytes / MIB_BYTES) * QUANT_WEIGHT;
-
-	for (const tier of MEM_TIERS) {
-		const budgetMb = tier * MB_PER_GB * RAM_BUDGET_RATIO - RAM_OVERHEAD_MB;
-
-		if (weightMb <= budgetMb) return tier;
-	}
-
-	return null;
-}
+export { minMemoryTierGb } from '@ggml-org/llama-ui/models';
diff --git a/ui/apps/chat/src/routes/+error.svelte b/ui/apps/chat/src/routes/+error.svelte
index b1a203dda..289d6d45f 100644
--- a/ui/apps/chat/src/routes/+error.svelte
+++ b/ui/apps/chat/src/routes/+error.svelte
@@ -39,10 +39,10 @@
 		<div class="w-full max-w-md px-4 text-center">
 			<div class="mb-6">
 				<div
-					class="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10"
+					class="mx-auto mb-4 flex size-16 items-center justify-center rounded-full bg-destructive/10"
 				>
 					<svg
-						class="h-8 w-8 text-destructive"
+						class="size-8 text-destructive"
 						fill="none"
 						stroke="currentColor"
 						viewBox="0 0 24 24"
diff --git a/ui/apps/chat/src/routes/+layout.svelte b/ui/apps/chat/src/routes/+layout.svelte
index 1e8723025..af29c1f8f 100644
--- a/ui/apps/chat/src/routes/+layout.svelte
+++ b/ui/apps/chat/src/routes/+layout.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
 	import '../app.css';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import { GlassKey, MenuIcon, SidebarNavigation } from '#lib/components/app/index.ts';
 	import { PwaMetaTags, PwaRefreshAlert } from '#lib/components/pwa/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import {
 		BOX_BORDER,
 		CHAT_FORM_CHROME_FADE_MS,
@@ -33,7 +33,7 @@
 	} from '#lib/stores/index.ts';
 	import { initStores } from '#lib/stores/init.ts';
 	import { withBase } from '#lib/utils/base-path.ts';
-	import { hapticTap } from '#lib/utils/index.ts';
+	import { applySurfaceTheme, hapticTap } from '#lib/utils/index.ts';
 	import { browser } from '$app/env';
 	import { afterNavigate, goto } from '$app/navigation';
 	import { page } from '$app/state';
@@ -53,6 +53,11 @@

 	let chatSidebar: { editActiveConversation?: () => void } | undefined = $state();

+	// the light surface theme (Paper or Matte) follows the saved setting
+	$effect(() => {
+		applySurfaceTheme(settingsStore.config[SETTINGS_KEYS.SURFACE_THEME]);
+	});
+
 	let showBuildVersion = $derived(
 		settingsStore.config[SETTINGS_KEYS.SHOW_BUILD_VERSION] as boolean
 	);
diff --git a/ui/apps/chat/src/routes/models/+page.svelte b/ui/apps/chat/src/routes/models/+page.svelte
index e803baf01..e82954308 100644
--- a/ui/apps/chat/src/routes/models/+page.svelte
+++ b/ui/apps/chat/src/routes/models/+page.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import { Button } from '@ggml-org/llama-ui/ui/button';
 	import ModelsManager from '#lib/components/app/models/ModelsManager/ModelsManager.svelte';
-	import { Button } from '#lib/components/ui/button/index.ts';
 	import { APP_NAME, DISCOVER_ICON } from '#lib/constants/index.ts';
 	import { modelsStore, uiStore } from '#lib/stores/index.ts';
 	import { onMount } from 'svelte';
@@ -42,7 +42,7 @@
 				size="sm"
 				variant="tertiary"
 			>
-				<DISCOVER_ICON class="h-3.5 w-3.5" />
+				<DISCOVER_ICON class="size-icon-md" />

 				Discover Models
 			</Button>
diff --git a/ui/apps/chat/tests/client/components/AgenticPerfWrapper.svelte b/ui/apps/chat/tests/client/components/AgenticPerfWrapper.svelte
index 54b76a12a..ac41c8ffa 100644
--- a/ui/apps/chat/tests/client/components/AgenticPerfWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/AgenticPerfWrapper.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import { perfState } from './agentic-perf-state.svelte';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ChatMessageAgenticContent from '#lib/components/app/chat/ChatMessages/ChatMessageAgenticContent.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 </script>

 <Tooltip.Provider>
diff --git a/ui/apps/chat/tests/client/components/ChatFormActionRecordWrapper.svelte b/ui/apps/chat/tests/client/components/ChatFormActionRecordWrapper.svelte
index 20468f8cf..cdc4a46ed 100644
--- a/ui/apps/chat/tests/client/components/ChatFormActionRecordWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/ChatFormActionRecordWrapper.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ChatFormActionRecord from '#lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionRecord.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';

 	let {
 		hasAudioModality = true,
diff --git a/ui/apps/chat/tests/client/components/ChatFormTestWrapper.svelte b/ui/apps/chat/tests/client/components/ChatFormTestWrapper.svelte
index 4bcf0a637..badea196b 100644
--- a/ui/apps/chat/tests/client/components/ChatFormTestWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/ChatFormTestWrapper.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ChatForm from '#lib/components/app/chat/ChatForm/ChatForm.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { untrack } from 'svelte';

 	interface Props {
diff --git a/ui/apps/chat/tests/client/components/ChatMessagesPerfWrapper.svelte b/ui/apps/chat/tests/client/components/ChatMessagesPerfWrapper.svelte
index c5efc16ed..a033ea02f 100644
--- a/ui/apps/chat/tests/client/components/ChatMessagesPerfWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/ChatMessagesPerfWrapper.svelte
@@ -2,8 +2,8 @@
 	// Mounts the real ChatMessages list against the real conversations store, so
 	// the harness exercises `displayMessages` (which rebuilds every message's
 	// toolMessages array) rather than a single message subtree.
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ChatMessages from '#lib/components/app/chat/ChatMessages/ChatMessages.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import { conversationsStore } from '#lib/stores/conversations/index.svelte.ts';
 </script>

diff --git a/ui/apps/chat/tests/client/components/ChatScreenFormTestWrapper.svelte b/ui/apps/chat/tests/client/components/ChatScreenFormTestWrapper.svelte
index 479c4f7c7..39e5bdab4 100644
--- a/ui/apps/chat/tests/client/components/ChatScreenFormTestWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/ChatScreenFormTestWrapper.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ChatScreenForm from '#lib/components/app/chat/ChatScreen/ChatScreenForm.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 </script>

 <Tooltip.Provider>
diff --git a/ui/apps/chat/tests/client/components/ConversationRowHarness.svelte b/ui/apps/chat/tests/client/components/ConversationRowHarness.svelte
index 359545f96..8641618a2 100644
--- a/ui/apps/chat/tests/client/components/ConversationRowHarness.svelte
+++ b/ui/apps/chat/tests/client/components/ConversationRowHarness.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import SidebarNavigationConversationItem from '#lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import type { ComponentProps } from 'svelte';

 	let props: ComponentProps<typeof SidebarNavigationConversationItem> = $props();
diff --git a/ui/apps/chat/tests/client/components/ModelsManagerRowWrapper.svelte b/ui/apps/chat/tests/client/components/ModelsManagerRowWrapper.svelte
index fa6fd187f..494ccd81a 100644
--- a/ui/apps/chat/tests/client/components/ModelsManagerRowWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/ModelsManagerRowWrapper.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ModelsManagerModelRow from '#lib/components/app/models/ModelsManager/ModelsManagerModelRow.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 	import type { ModelOption } from '#lib/types/models.js';

 	interface Props {
diff --git a/ui/apps/chat/tests/client/components/ModelsManagerWrapper.svelte b/ui/apps/chat/tests/client/components/ModelsManagerWrapper.svelte
index e489f1842..26af1bf32 100644
--- a/ui/apps/chat/tests/client/components/ModelsManagerWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/ModelsManagerWrapper.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import ModelsManager from '#lib/components/app/models/ModelsManager/ModelsManager.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 </script>

 <!-- The rows mount tooltips, which need the provider +layout.svelte supplies. -->
diff --git a/ui/apps/chat/tests/client/components/SidebarNavigationHarness.svelte b/ui/apps/chat/tests/client/components/SidebarNavigationHarness.svelte
index 5ac2128c5..1afc6af73 100644
--- a/ui/apps/chat/tests/client/components/SidebarNavigationHarness.svelte
+++ b/ui/apps/chat/tests/client/components/SidebarNavigationHarness.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 	import SidebarNavigation from '#lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
 </script>

 <!-- the sidebar with the tooltip provider +layout.svelte gives it -->
diff --git a/ui/apps/chat/tests/client/components/TestWrapper.svelte b/ui/apps/chat/tests/client/components/TestWrapper.svelte
index 6e0f79b25..3f050cdec 100644
--- a/ui/apps/chat/tests/client/components/TestWrapper.svelte
+++ b/ui/apps/chat/tests/client/components/TestWrapper.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import Page from '../../../src/routes/(chat)/+page.svelte';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
+	import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
 </script>

 <!--
diff --git a/ui/apps/chat/tests/stories/a11y/ActionIcon.a11y.stories.svelte b/ui/apps/chat/tests/stories/a11y/ActionIcon.a11y.stories.svelte
index 7c02688b3..cef659d6c 100644
--- a/ui/apps/chat/tests/stories/a11y/ActionIcon.a11y.stories.svelte
+++ b/ui/apps/chat/tests/stories/a11y/ActionIcon.a11y.stories.svelte
@@ -1,7 +1,7 @@
 <script lang="ts" module>
+	import { ActionIcon } from '@ggml-org/llama-ui/app/actions';
 	import { Copy } from '@lucide/svelte';
 	import { defineMeta } from '@storybook/addon-svelte-csf';
-	import ActionIcon from '#lib/components/app/actions/ActionIcon.svelte';
 	import { expect } from 'storybook/test';

 	const { Story } = defineMeta({
diff --git a/ui/apps/chat/tests/unit/code.test.ts b/ui/apps/chat/tests/unit/code.test.ts
index 0e4713031..2ecaf69f0 100644
--- a/ui/apps/chat/tests/unit/code.test.ts
+++ b/ui/apps/chat/tests/unit/code.test.ts
@@ -149,3 +149,37 @@ describe('splitGluedClosingCodeFences', () => {
 		expect(splitGluedClosingCodeFences(input)).toBe(input);
 	});
 });
+
+describe('highlightCode in bash', () => {
+	const API_CALL = `curl http://localhost:9931/v1/chat/completions \\
+  -H "Content-Type: application/json" \\
+  -d '{"model": "x"}'`;
+
+	it('marks a command name as a built-in', () => {
+		expect(highlightCode(API_CALL, 'bash')).toContain('<span class="hljs-built_in">curl</span>');
+	});
+
+	it('marks flags as attributes', () => {
+		const html = highlightCode('brew install --cask llama-app -LsSf', 'bash');
+
+		expect(html).toContain('<span class="hljs-attr">--cask</span>');
+		expect(html).toContain('<span class="hljs-attr">-LsSf</span>');
+	});
+
+	it('marks the command after a pipe', () => {
+		expect(highlightCode('curl -LsSf https://llama.app/install.sh | sh', 'bash')).toContain(
+			'| <span class="hljs-built_in">sh</span>'
+		);
+	});
+
+	it("doesn't mark a continued line's first word as a command", () => {
+		expect(highlightCode('brew \\\n  install x', 'bash')).not.toContain('hljs-built_in">install');
+	});
+
+	it('leaves keywords, and flags inside strings, as they were', () => {
+		const html = highlightCode('if true; then\n  echo "hi -x"\nfi', 'bash');
+
+		expect(html).toContain('<span class="hljs-keyword">if</span>');
+		expect(html).not.toContain('hljs-attr">-x');
+	});
+});
diff --git a/ui/apps/chat/tests/unit/conversations-store.test.ts b/ui/apps/chat/tests/unit/conversations-store.test.ts
index 1770e40b2..8bb231316 100644
--- a/ui/apps/chat/tests/unit/conversations-store.test.ts
+++ b/ui/apps/chat/tests/unit/conversations-store.test.ts
@@ -67,6 +67,31 @@ describe('active conversation identity', () => {
 		expect(conversationsStore.activeConversation?.currNode).toBe('node-2');
 	});

+	it('does not fail when the conversation closes during the updateCurrentNode write', async () => {
+		await loadActive(makeConversation(), []);
+		updateCurrentNodeMock.mockImplementation(async () => {
+			conversationsStore.clearActiveConversation();
+		});
+
+		await expect(conversationsStore.updateCurrentNode('node-2')).resolves.toBeUndefined();
+
+		expect(updateCurrentNodeMock).toHaveBeenCalledWith('conv-1', 'node-2');
+		expect(conversationsStore.activeConversation).toBeNull();
+	});
+
+	it('leaves another conversation alone when it opens during the updateCurrentNode write', async () => {
+		await loadActive(makeConversation(), []);
+		updateCurrentNodeMock.mockImplementation(async () => {
+			await loadActive(makeConversation({ currNode: 'other-node', id: 'conv-2' }), []);
+		});
+
+		await conversationsStore.updateCurrentNode('node-2');
+
+		expect(updateCurrentNodeMock).toHaveBeenCalledWith('conv-1', 'node-2');
+		expect(conversationsStore.activeConversation?.id).toBe('conv-2');
+		expect(conversationsStore.activeConversation?.currNode).toBe('other-node');
+	});
+
 	it('writes renamed and pinned fields in place on applyConversationUpdate', async () => {
 		await loadActive(makeConversation(), []);
 		const before = conversationsStore.activeConversation;
diff --git a/ui/apps/chat/tests/unit/llama-ui-tsconfig-paths.test.ts b/ui/apps/chat/tests/unit/llama-ui-tsconfig-paths.test.ts
new file mode 100644
index 000000000..cf49df8a7
--- /dev/null
+++ b/ui/apps/chat/tests/unit/llama-ui-tsconfig-paths.test.ts
@@ -0,0 +1,30 @@
+import { llamaUiPaths } from '../../scripts/llama-ui.js';
+import { readFileSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { describe, expect, it } from 'vitest';
+
+// tsconfig.json spells out Llama UI's paths for TypeScript; scripts/llama-ui.js derives the same
+// from the library's package.json, so a dependency the library gains must reach tsconfig.json too
+const APP_DIR = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
+
+function absolute(paths: Record<string, string[]>): Record<string, string[]> {
+	return Object.fromEntries(
+		Object.entries(paths).map(([specifier, targets]) => [
+			specifier,
+			targets.map((target) => resolve(APP_DIR, target))
+		])
+	);
+}
+
+describe("tsconfig.json's Llama UI paths", () => {
+	it('match what scripts/llama-ui.js derives from the library', () => {
+		const tsconfig = JSON.parse(readFileSync(resolve(APP_DIR, 'tsconfig.json'), 'utf8'));
+		const expected = absolute(llamaUiPaths(resolve(APP_DIR, 'node_modules')));
+		const actual = absolute(tsconfig.compilerOptions.paths);
+
+		for (const [specifier, targets] of Object.entries(expected)) {
+			expect(actual[specifier], specifier).toEqual(targets);
+		}
+	});
+});
diff --git a/ui/apps/chat/tsconfig.json b/ui/apps/chat/tsconfig.json
index 0d6fa04d1..abe5aed2e 100644
--- a/ui/apps/chat/tsconfig.json
+++ b/ui/apps/chat/tsconfig.json
@@ -1,6 +1,48 @@
 {
 	"extends": "$app/tsconfig",
 	"compilerOptions": {
+		"paths": {
+			"@ggml-org/llama-ui/ui/*": ["../../lib/ui/src/lib/components/ui/*/index.ts"],
+			"@ggml-org/llama-ui/app/*": ["../../lib/ui/src/lib/components/app/*/index.ts"],
+			"@ggml-org/llama-ui/models": ["../../lib/ui/src/lib/components/models/index.ts"],
+			"@ggml-org/llama-ui/constants": ["../../lib/ui/src/lib/constants/index.ts"],
+			"@ggml-org/llama-ui/enums": ["../../lib/ui/src/lib/enums/index.ts"],
+			"@ggml-org/llama-ui/code": ["../../lib/ui/src/lib/utils/index.ts"],
+			"@ggml-org/llama-ui/utils": ["../../lib/ui/src/lib/components/ui/utils.ts"],
+			"@ggml-org/llama-ui/styles/*": ["../../lib/ui/src/lib/styles/*"],
+			"@ggml-org/llama-ui/theme.css": ["../../lib/ui/src/lib/styles/theme.css"],
+			"@ggml-org/llama-ui/tokens.css": ["../../lib/ui/src/lib/styles/tokens.css"],
+			"@ggml-org/llama-ui/fonts.css": ["../../lib/ui/src/lib/styles/fonts.css"],
+			"@ggml-org/llama-ui/surfaces.css": ["../../lib/ui/src/lib/styles/surfaces.css"],
+			"@ggml-org/llama-ui": ["../../lib/ui/src/lib/index.ts"],
+			"@internationalized/date": ["./node_modules/@internationalized/date"],
+			"@internationalized/date/*": ["./node_modules/@internationalized/date/*"],
+			"@lucide/svelte": ["./node_modules/@lucide/svelte"],
+			"@lucide/svelte/*": ["./node_modules/@lucide/svelte/*"],
+			"bits-ui": ["./node_modules/bits-ui"],
+			"bits-ui/*": ["./node_modules/bits-ui/*"],
+			"clsx": ["./node_modules/clsx"],
+			"clsx/*": ["./node_modules/clsx/*"],
+			"highlight.js": ["./node_modules/highlight.js"],
+			"highlight.js/*": ["./node_modules/highlight.js/*"],
+			"@ggml-org/llama-brand": ["./node_modules/@ggml-org/llama-brand"],
+			"@ggml-org/llama-brand/*": ["./node_modules/@ggml-org/llama-brand/*"],
+			"mode-watcher": ["./node_modules/mode-watcher"],
+			"mode-watcher/*": ["./node_modules/mode-watcher/*"],
+			"svelte": ["./node_modules/svelte"],
+			"svelte/*": ["./node_modules/svelte/*", "./node_modules/svelte/types/index.d.ts"],
+			"tailwind-merge": ["./node_modules/tailwind-merge"],
+			"tailwind-merge/*": ["./node_modules/tailwind-merge/*"],
+			"tailwind-variants": ["./node_modules/tailwind-variants"],
+			"tailwind-variants/*": ["./node_modules/tailwind-variants/*"],
+			"tailwindcss": ["./node_modules/tailwindcss"],
+			"tailwindcss/*": ["./node_modules/tailwindcss/*"],
+			"tw-animate-css": ["./node_modules/tw-animate-css"],
+			"tw-animate-css/*": ["./node_modules/tw-animate-css/*"],
+			"vaul-svelte": ["./node_modules/vaul-svelte"],
+			"vaul-svelte/*": ["./node_modules/vaul-svelte/*"],
+			"@lucide/svelte/icons/*": ["./node_modules/@lucide/svelte/dist/icons/*"]
+		},
 		"sourceMap": true,
 		"strict": true
 	},
diff --git a/ui/apps/chat/vite.config.ts b/ui/apps/chat/vite.config.ts
index 8e1f42e9a..7f24f5963 100644
--- a/ui/apps/chat/vite.config.ts
+++ b/ui/apps/chat/vite.config.ts
@@ -1,4 +1,5 @@
 import { buildInfoPlugin } from './scripts/vite-plugin-build-info';
+import { llamaUiPlugin } from './scripts/vite-plugin-llama-ui';
 import { nerdamerPlugin } from './scripts/vite-plugin-nerdamer';
 import { pwaManifestPlugin } from './scripts/vite-plugin-pwa-manifest';
 import { relativizeBasePlugin } from './scripts/vite-plugin-relativize-base';
@@ -43,6 +44,7 @@ export default defineConfig(({ mode }) => {
 		},

 		plugins: [
+			llamaUiPlugin(),
 			tailwindcss(),
 			sveltekit({
 				adapter: adapter({
diff --git a/ui/lib/ui/.gitignore b/ui/lib/ui/.gitignore
new file mode 100644
index 000000000..cd8a373ca
--- /dev/null
+++ b/ui/lib/ui/.gitignore
@@ -0,0 +1,26 @@
+node_modules
+
+# Output
+.output
+.vercel
+.netlify
+.wrangler
+/.svelte-kit
+/build
+/dist
+
+# OS
+.DS_Store
+Thumbs.db
+
+# Env
+.env
+.env.*
+!.env.example
+!.env.test
+
+# Vite
+vite.config.js.timestamp-*
+vite.config.ts.timestamp-*
+.vitest/
+
diff --git a/ui/lib/ui/.npmrc b/ui/lib/ui/.npmrc
new file mode 100644
index 000000000..d5831dd51
--- /dev/null
+++ b/ui/lib/ui/.npmrc
@@ -0,0 +1,2 @@
+engine-strict=true
+legacy-peer-deps=true
diff --git a/ui/lib/ui/LICENSE b/ui/lib/ui/LICENSE
new file mode 100644
index 000000000..50c59c51c
--- /dev/null
+++ b/ui/lib/ui/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) ggml
+
+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.
diff --git a/ui/lib/ui/README.md b/ui/lib/ui/README.md
new file mode 100644
index 000000000..6efb96756
--- /dev/null
+++ b/ui/lib/ui/README.md
@@ -0,0 +1,72 @@
+# @ggml-org/llama-ui
+
+Llama UI, the design system of Llama Chat and the Llama apps, as a package: its tokens, fonts, surfaces and
+components, for Llama Chat (`ui/apps/chat`) and llama.pages (llama.app). It lives in llama.cpp at `ui/lib/ui`,
+beside the apps built on it in `ui/apps`.
+
+## Use
+
+```css
+/* app.css */
+@import 'tailwindcss';
+@import 'tw-animate-css';
+@import '@ggml-org/llama-brand/css/colors.css';
+@import '@ggml-org/llama-ui/theme.css';
+```
+
+```svelte
+<script lang="ts">
+	import { Badge, Button } from '@ggml-org/llama-ui';
+</script>
+
+<Button variant="secondary">View on Hugging Face</Button>
+<Badge variant="success">Downloaded</Badge>
+```
+
+- `theme.css`: everything: fonts, tokens, surfaces, the Tailwind theme and base styles. It needs Tailwind 4,
+  `tw-animate-css` (both peer dependencies) and `@ggml-org/llama-brand`'s `css/colors.css` imported before it.
+- `tokens.css`: the three tiers of tokens only, also after `@ggml-org/llama-brand`'s `css/colors.css`. `fonts.css`: Llama Sans and Llama Mono. `surfaces.css`: the matte
+  surface utilities.
+- Dark mode is the `dark` class on `<html>`; the Matte light surfaces are the `theme-matte` class.
+
+## What's in it
+
+- **Foundations:** the primitive, semantic and component tokens, the type roles (`text-body`, `text-label`…), corner,
+  icon and control-height roles, the matte surfaces and elevations, Llama Sans and Llama Mono.
+- **Components:** every base component of Llama Chat: Alert, AlertDialog, Badge, Button, ButtonGroup, Card, Checkbox,
+  Collapsible, ContextMenu, Dialog, Drawer, DropdownMenu, Empty, HoverCard, Input, Label, Popover, RadioGroup,
+  ScrollArea, Select, Separator, Skeleton, Switch, Table, Tabs, Textarea, Toggle, ToggleGroup and Tooltip. Each is
+  also its own entry point (`@ggml-org/llama-ui/ui/dialog`), with `cn` and `tv` at `@ggml-org/llama-ui/utils`. Then ActionIcon (an icon button with a tooltip), SearchInput (a search field with a clear button), SyntaxHighlightedCode (code as Llama Chat shows it, in highlight.js's GitHub themes; needs `mode-watcher`) and Logo (the brand mark, llama-brand's icon), at `@ggml-org/llama-ui/app/actions`, `app/forms`, `app/content` and `app/misc`. `FILTER_TRIGGER_CLASS` and `FILTER_TOGGLE_ITEM_CLASS` style a filters bar the way Llama Chat's Models Manager does.
+- **App mockups:** MacMenu (Llama for Mac's menu) and WindowsTray (Llama for Windows' tray flyout), the native apps' UIs as the brand's communications draw them, with an `annotate` snippet to pin a page's numbered callouts to their edges.
+- **Model UI:** how a model is shown in Llama Chat and on llama.app: `ModelCard`, `ModelFamilyCard` (a family as llama.app's catalog
+  shows it), `ModelId` (name, badges, capability,
+  context and size icons), `ModelCapabilityIcons` (icons or labelled badges), `ModelOrgAvatar`, `ModelMetadataItem`,
+  `ModelQuantOptions`, `ModelQuantChip`, `ModelQuantRow`, `ModelDraftSidecars`, `ModelDownloadProgressBar`, plus the formatters and
+  `minMemoryTierGb` and `summarizeSizes`, at `@ggml-org/llama-ui/models`. They take model data in and report what the user did out;
+  fetching and downloading stay in the app.
+
+Next: llama.app's model page.
+
+The constants, enums and code helpers the components use are entry points too, for an app that shows the same things:
+`@ggml-org/llama-ui/constants` (the shared classes and code-block constants), `@ggml-org/llama-ui/enums` (`ColorMode`,
+`TooltipSide`, `BooleanString`) and `@ggml-org/llama-ui/code` (`highlightCode`, `trimCodePadding`). The model data
+(constants, enums, formatters and types) comes with the Model UI at `@ggml-org/llama-ui/models`.
+
+## How the apps in this repo use it
+
+Llama Chat does not install the package: it compiles these sources as part of its own build, so a change here
+shows in the app at once and the app keeps no copy of a component or a token. For that to work:
+
+- Sources under `src/lib` import each other by relative path, never through `$lib`, which in an app points at
+  the app's own `src/lib`.
+- What they import from npm is listed in `dependencies` or `peerDependencies`: the app reads that list to resolve
+  those packages from its own `node_modules` (`ui/apps/chat/scripts/llama-ui.js`).
+- Stylesheets import no package. An app imports Tailwind, `tw-animate-css` and `@ggml-org/llama-brand`'s `css/colors.css`
+  (the brand's colours, under the names the primitives use) itself, before `theme.css`.
+- A component added with shadcn-svelte (`components.json`) arrives with `$lib` imports: make them relative.
+
+## Development
+
+- `npm run dev`: a small SvelteKit check page (`src/routes`)
+- `npm run check`: svelte-check
+- `npm run prepack`: build the library into `dist/` and run publint
diff --git a/ui/apps/chat/components.json b/ui/lib/ui/components.json
similarity index 100%
rename from ui/apps/chat/components.json
rename to ui/lib/ui/components.json
diff --git a/ui/lib/ui/package-lock.json b/ui/lib/ui/package-lock.json
new file mode 100644
index 000000000..543d49f6f
--- /dev/null
+++ b/ui/lib/ui/package-lock.json
@@ -0,0 +1,4419 @@
+{
+	"name": "@ggml-org/llama-ui",
+	"version": "0.3.0",
+	"lockfileVersion": 3,
+	"requires": true,
+	"packages": {
+		"": {
+			"name": "@ggml-org/llama-ui",
+			"version": "0.3.0",
+			"license": "MIT",
+			"dependencies": {
+				"@ggml-org/llama-brand": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
+				"@internationalized/date": "^3.12.4",
+				"@lucide/svelte": "1.46.0",
+				"bits-ui": "2.18.1",
+				"clsx": "^2.1.1",
+				"highlight.js": "^11.11.1",
+				"tailwind-merge": "^3.7.0",
+				"tailwind-variants": "^3.3.1",
+				"vaul-svelte": "1.0.0-next.7"
+			},
+			"devDependencies": {
+				"@sveltejs/adapter-auto": "^8.0.0",
+				"@sveltejs/kit": "^3.0.0",
+				"@sveltejs/package": "^2.5.8",
+				"@sveltejs/vite-plugin-svelte": "^7.2.0",
+				"@tailwindcss/vite": "^4.3.3",
+				"@types/node": "^24",
+				"@vitest/browser-playwright": "5.0.5",
+				"@vitest/coverage-v8": "5.0.5",
+				"mode-watcher": "^1.1.0",
+				"playwright": "^1.60.0",
+				"publint": "^0.3.21",
+				"svelte": "^5.57.1",
+				"svelte-check": "^4.6.0",
+				"tailwindcss": "^4.3.3",
+				"tw-animate-css": "1.4.0",
+				"typescript": "^6.0.3",
+				"vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
+				"vite-plus": "1.3.0",
+				"vitest": "5.0.5",
+				"vitest-browser-svelte": "^2.1.1"
+			},
+			"peerDependencies": {
+				"mode-watcher": "^1.1.0",
+				"svelte": "^5.0.0",
+				"tailwindcss": "^4.1.0",
+				"tw-animate-css": "^1.4.0"
+			}
+		},
+		"node_modules/@babel/code-frame": {
+			"version": "7.29.7",
+			"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
+			"integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@babel/helper-validator-identifier": "^7.29.7",
+				"js-tokens": "^4.0.0",
+				"picocolors": "^1.1.1"
+			},
+			"engines": {
+				"node": ">=6.9.0"
+			}
+		},
+		"node_modules/@babel/helper-string-parser": {
+			"version": "7.29.7",
+			"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",
+			"integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6.9.0"
+			}
+		},
+		"node_modules/@babel/helper-validator-identifier": {
+			"version": "7.29.7",
+			"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
+			"integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6.9.0"
+			}
+		},
+		"node_modules/@babel/parser": {
+			"version": "7.29.9",
+			"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz",
+			"integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@babel/types": "^7.29.8"
+			},
+			"bin": {
+				"parser": "bin/babel-parser.js"
+			},
+			"engines": {
+				"node": ">=6.0.0"
+			}
+		},
+		"node_modules/@babel/runtime": {
+			"version": "7.29.10",
+			"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.10.tgz",
+			"integrity": "sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6.9.0"
+			}
+		},
+		"node_modules/@babel/types": {
+			"version": "7.29.8",
+			"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz",
+			"integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@babel/helper-string-parser": "^7.29.7",
+				"@babel/helper-validator-identifier": "^7.29.7"
+			},
+			"engines": {
+				"node": ">=6.9.0"
+			}
+		},
+		"node_modules/@bcoe/v8-coverage": {
+			"version": "1.0.2",
+			"resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz",
+			"integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=18"
+			}
+		},
+		"node_modules/@blazediff/core": {
+			"version": "1.10.0",
+			"resolved": "https://registry.npmjs.org/@blazediff/core/-/core-1.10.0.tgz",
+			"integrity": "sha512-AOQff0zgR7cGsZL+4E7hVkmujoPUpm0J9xzWGWZj5wCjd3gmxESXAPfKyuzs93VdpQNFhHlBhfOjrcZ+XTERtQ==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@floating-ui/core": {
+			"version": "1.8.0",
+			"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.8.0.tgz",
+			"integrity": "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==",
+			"license": "MIT",
+			"dependencies": {
+				"@floating-ui/utils": "^0.2.12"
+			}
+		},
+		"node_modules/@floating-ui/dom": {
+			"version": "1.8.0",
+			"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.8.0.tgz",
+			"integrity": "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==",
+			"license": "MIT",
+			"dependencies": {
+				"@floating-ui/core": "^1.8.0",
+				"@floating-ui/utils": "^0.2.12"
+			}
+		},
+		"node_modules/@floating-ui/utils": {
+			"version": "0.2.12",
+			"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.12.tgz",
+			"integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==",
+			"license": "MIT"
+		},
+		"node_modules/@ggml-org/llama-brand": {
+			"version": "0.1.0",
+			"resolved": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
+			"integrity": "sha512-kRDXUIUdfcDt7w4hh3JrFTpqxf2i7R0PHVLGnwUdr4L8EMqE32mEECoXUz1uoUlFaQ+h6QaVHvJWS5y98AoaYA==",
+			"license": "CC-BY-NC-4.0"
+		},
+		"node_modules/@internationalized/date": {
+			"version": "3.12.4",
+			"resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.12.4.tgz",
+			"integrity": "sha512-M1dEn4c1U1HsSlaVR8upZtSqvXrTkHDfv18H01uCSJyjVLDxnBR38v/fMxecmlwXKR4i9HeZcmgQAPE6A+aGJQ==",
+			"license": "Apache-2.0",
+			"dependencies": {
+				"@swc/helpers": "^0.5.0"
+			}
+		},
+		"node_modules/@jridgewell/gen-mapping": {
+			"version": "0.3.13",
+			"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+			"integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/sourcemap-codec": "^1.5.0",
+				"@jridgewell/trace-mapping": "^0.3.24"
+			}
+		},
+		"node_modules/@jridgewell/remapping": {
+			"version": "2.3.5",
+			"resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+			"integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/gen-mapping": "^0.3.5",
+				"@jridgewell/trace-mapping": "^0.3.24"
+			}
+		},
+		"node_modules/@jridgewell/resolve-uri": {
+			"version": "3.1.2",
+			"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+			"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6.0.0"
+			}
+		},
+		"node_modules/@jridgewell/sourcemap-codec": {
+			"version": "1.6.0",
+			"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
+			"integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@jridgewell/trace-mapping": {
+			"version": "0.3.31",
+			"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+			"integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/resolve-uri": "^3.1.0",
+				"@jridgewell/sourcemap-codec": "^1.4.14"
+			}
+		},
+		"node_modules/@lucide/svelte": {
+			"version": "1.46.0",
+			"resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-1.46.0.tgz",
+			"integrity": "sha512-Ru8jDjoCVLJ7J7pPRUdY+odSBV2BI6rj68JTmT+ENq/ZwYOPGPAiKVvKz+XLyAoK4HAwlRTzZHpsMvrHfsetqg==",
+			"license": "ISC",
+			"peerDependencies": {
+				"svelte": "^5"
+			}
+		},
+		"node_modules/@oxc-project/runtime": {
+			"version": "0.154.0",
+			"resolved": "https://registry.npmjs.org/@oxc-project/runtime/-/runtime-0.154.0.tgz",
+			"integrity": "sha512-cBQNGoh659BNgvA8OC/e4BNDtFkv03dJaYdkp2adgOQNtISNAPQ+nB4S8XvWtNk7Xl+0g+7aa+iRGR25Xycd1Q==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxc-project/types": {
+			"version": "0.154.0",
+			"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.154.0.tgz",
+			"integrity": "sha512-KYOUGQFlLWR+s4QMV2Q9ko38TZm7EdO87Qm7rvZLqk/webse/cDjtyxKhg/47l0byCbs/k46LT8qc4PKjAikzA==",
+			"dev": true,
+			"license": "MIT",
+			"funding": {
+				"url": "https://github.com/sponsors/oxc-project"
+			}
+		},
+		"node_modules/@oxfmt/binding-android-arm-eabi": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.73.0.tgz",
+			"integrity": "sha512-dhunAdMbi/4o0Y66/+Wl6rpsNqpvE4i26Qw6bB77A97L2lJoktWg6m+X9QOon8iOEEqzD9rEZqFi5uZ4oIzhCA==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-android-arm64": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.73.0.tgz",
+			"integrity": "sha512-dBoypjC2/xeyKyIhN2waX0/XeoccH9k0lVVe+sGRc4X8HSJVRtqyZDoXdr7bGY9A75c51dX0z0dLDpGQKwCdCg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-darwin-arm64": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.73.0.tgz",
+			"integrity": "sha512-Tn7Y+qWIpCQK+qdYwBcn6YvqeBuPiuG3tcNlYg16a5QL2o3rSmrgBB1nCyYqo0uvc1LNrfQW9/CK2tzFuID/Fg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-darwin-x64": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.73.0.tgz",
+			"integrity": "sha512-yVb0E0tg/+9Xc9YJCBq66qF1DC/aN5mhb5nnHz0k4ikwkMANtSul2VPDSwjYdXR6/DFimc+pPUgLBqkIa5Ctuw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-freebsd-x64": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.73.0.tgz",
+			"integrity": "sha512-IKR4lFnBkYNL9Uqdxa5GMTQLvnLj+3sDwTvh2atHCzah0xeo+1xR5bigRU8uyXlOsA4VpXUn0UAimq4E4RBGmQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"freebsd"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-arm-gnueabihf": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.73.0.tgz",
+			"integrity": "sha512-7qnZ4g0ZCO3aZevOOQpZIABYwwXJW1lLDo2elviGdPQ0i11255xKEMFsi97fC1/nauQFseCJfELUy/k2JoOP+g==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-arm-musleabihf": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.73.0.tgz",
+			"integrity": "sha512-36eBico2j/WPB84gb4FYd/jjqGCKOwU4M+TWLBUIqlnzTozQueLy0joA5BwsSp2OZFVkOlpCwvA3ndPamdiyLw==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-arm64-gnu": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.73.0.tgz",
+			"integrity": "sha512-VZ3cSgCAT18knKo52DcACmAuIoqG6qVEyeZRFbJd0xmYQ8GyYjuBc6IAh6MZHijT6q7p4/HPI+6ZWsCuhdV6iw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-arm64-musl": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.73.0.tgz",
+			"integrity": "sha512-8YVzH59XSHcqwXNgc5qK851zCqwpmBgOifARXEPPe5/xTsIbHceYoPZAyqfpYV0CfKmzSaEDBgYHFza4rhx+Zw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-ppc64-gnu": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.73.0.tgz",
+			"integrity": "sha512-MqRJnmCys0rwOgpWyEidSA7v/bvOqfNDJhPkQoR9mPVYrvSmMaW2Xhdpl28cbTA+brOM1is62GjIvJplVlUVpw==",
+			"cpu": [
+				"ppc64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-riscv64-gnu": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.73.0.tgz",
+			"integrity": "sha512-4t2F3SWJSK/O/kRRFnL0elJzn75fJGGu71gs1HtiWcS80SmJOpkHiwwLnTp9suGdns8VHEPxYS0GTcyVwHKWBA==",
+			"cpu": [
+				"riscv64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-riscv64-musl": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.73.0.tgz",
+			"integrity": "sha512-D8b4I8I1kLdJQFwdFXNV+cwh3xWSiNKofjdGUk0nDpc0AHOds8T+poGbP9RWQMvgsvMb9OMgp/aV7ahBR37TbQ==",
+			"cpu": [
+				"riscv64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-s390x-gnu": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.73.0.tgz",
+			"integrity": "sha512-QrC1S5VL1+N5rvorB15jH7CPvjVHA7GyUI5oVEd8Bd9m5605RDBQYTxDQ920DuylRoZOh2V7/xXpfCtFUrojUQ==",
+			"cpu": [
+				"s390x"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-x64-gnu": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.73.0.tgz",
+			"integrity": "sha512-dFcUKQPltCEPa+YlkF3zqufn6nJPZdG73LpnjBvZFFsU3laCMssDXSYB99mVaj43FqdEgjpz5TO6gbYXcczd9g==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-linux-x64-musl": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.73.0.tgz",
+			"integrity": "sha512-LmQe+nV8e+eUwfPNCxDF+owbsg88toBiR/8rZRgVOeKQP3MaGefXZRvBoc1UG37iWEQ/9JlCXG9Mc4nf4N3agw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-openharmony-arm64": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.73.0.tgz",
+			"integrity": "sha512-8weOr1OKknE0G2DbR6ejJUT9AOsoBU6cXlsetmbihHv1K+bK7qP61T6lJxY0k/aAO7GyOJiRGNlL+04r4eH8Xg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"openharmony"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-win32-arm64-msvc": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.73.0.tgz",
+			"integrity": "sha512-mZV+QxXYgb8E18gzAFItb937VIsE4dqWdStrD3tRRC52UubOYEuU+e7NaIqUsGdB5YsJqNeuck3Ue/af2r9wyA==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-win32-ia32-msvc": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.73.0.tgz",
+			"integrity": "sha512-QJPUsbgUb97ZPPMkFUq6VQq0fLhC4Np19KL9aB/qKVwXnpKE6MIiILXqzhKnQ/UbnEDjKJ7Xv1d6zH4bYPCUdQ==",
+			"cpu": [
+				"ia32"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxfmt/binding-win32-x64-msvc": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.73.0.tgz",
+			"integrity": "sha512-cGcze2fu+ykIaFtkEvZlkZ3HvnCLk+WISthtq99zWTWn0x13t5L9TxvGdLZMUMvtfYR+ICkiCwKnguVubdcw0w==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint-tsgolint/darwin-arm64": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-7.0.2004.tgz",
+			"integrity": "sha512-uJk3ttju7Lz+Nv8WG4CsLyewoL1qf/Ny8S8OksJ7Bm/F14Tc9gMfW6arM1PCc57IzH/X/I79YsCWTgxX1FKibQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			]
+		},
+		"node_modules/@oxlint-tsgolint/darwin-x64": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-7.0.2004.tgz",
+			"integrity": "sha512-0BFfHTzDxNDFPcu0UZAXT6CyCJHAXM0dZveyDb4KEHa2qF/DSnOKOrmvK/wFuFol9kvijbGM9JfuOsor+zWXRw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			]
+		},
+		"node_modules/@oxlint-tsgolint/linux-arm64": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-7.0.2004.tgz",
+			"integrity": "sha512-TAehQc+qdRXyDN3nl/r/3/oPrBVrbtrDeGMkFyG6mf+XphpoJ2lAMVFLclyvrVZCw02RbKROjyw8h72XwQQHcw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@oxlint-tsgolint/linux-x64": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-7.0.2004.tgz",
+			"integrity": "sha512-LPunZvm6ZbWPfHMAyfZf9ci3HHvNEzLejO8zdqO3GoVGoSEHqqufHUD7+OgeatVSaJP7uXDJ2HaNOHIoH7go4Q==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@oxlint-tsgolint/win32-arm64": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-7.0.2004.tgz",
+			"integrity": "sha512-FVWplzDImWhiuawnIZVETaQecv4GWom6Jv4Fx2xj7hhXXDZ5okEgiw1gTCImHTIQsi2ycC5oSxVwrn69bMh7iw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			]
+		},
+		"node_modules/@oxlint-tsgolint/win32-x64": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-7.0.2004.tgz",
+			"integrity": "sha512-7PsxuUx11Ry9DYTWcljTzRbmZY9B6O9fFFfZV+aodQEMy6pfRT3fhoQRv9PtGN/89z1pPz3nFKrsFm6WqNtX7w==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			]
+		},
+		"node_modules/@oxlint/binding-android-arm-eabi": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.88.0.tgz",
+			"integrity": "sha512-k6Fgkf86ubfeH4GvqYsRolfuVAp0pfYVZvifSlXNHPdMaWUOfxUrmLEeDD7hF6U2oJuhsVxhSWq86/xCJ+9MmA==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-android-arm64": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.88.0.tgz",
+			"integrity": "sha512-AsIyhl9o1ejwtac7NMbhKpMdSml6NWR0ljKjZERxC8OHYDAW8o/Om9n1QHVLi4VCEUo42Zte2/Op9kyoGpJZMg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-darwin-arm64": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.88.0.tgz",
+			"integrity": "sha512-qgBjB7eEKcCB4RqjXGuoSZq74g0wD09fWFJ+HWcCJcKaga8TeUHtb+BY0SsxdleSLBgx4RZ7qmgo0EzqEq7JoQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-darwin-x64": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.88.0.tgz",
+			"integrity": "sha512-sCz3X5Mw/xdzEzn4fsCt1Iq8NKJnGNfhR+b9B5k+4DysYAHsmIhYoocnBPiQ9kvY3+pUun2A0Z8Vtun/Nv6YoQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-freebsd-x64": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.88.0.tgz",
+			"integrity": "sha512-xTOdYOIqCufgIj0knvxu86FBfovP6QBiD7ngNva01gb8xPQCD5gXkE5APGczH35zStim1O3zqvFbLQmY85xXRg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"freebsd"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-arm-gnueabihf": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.88.0.tgz",
+			"integrity": "sha512-BLadtw88NdYJBrAtC1dYzrPfSP2d5zgx6iuZycdD0YmZBJ2Nqbit9Z4PSaIb6gxK25dweArGMPbOmq/0ugwUPg==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-arm-musleabihf": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.88.0.tgz",
+			"integrity": "sha512-wILSczl/DaZsCcf7j7tvNbssp8hxEHIJxrv4j7+JjI3TAL1U/JTWbeUtoJJC/vo8+2hkTmHLYoKJjmiNbijdXw==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-arm64-gnu": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.88.0.tgz",
+			"integrity": "sha512-jutT2Hy8JCuZuMwIFHo2HtyxfOfBJHyQxlBHBK1SL9W2f8n/WhjAP0FnDMz9d/mjhv9+QA0mx5AdQ9fDjsrFFg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-arm64-musl": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.88.0.tgz",
+			"integrity": "sha512-8N8iGV9hh4Lkeuq7QsEkjoXNRRflqR1G2qyoGYXcA0k5qllrdqmfylKEXyHIVERxqNDyMO4StqDQ0uLxXcBQAg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-ppc64-gnu": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.88.0.tgz",
+			"integrity": "sha512-5ydcQt3znNQ/rGEWYRvpS2cK9+T18P2VYgnyJ+eloEAwi9YUmsXy5VGrRqNWIK6qzWwHGnEE3ojVqqQNo+f0hA==",
+			"cpu": [
+				"ppc64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-riscv64-gnu": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.88.0.tgz",
+			"integrity": "sha512-iGx0uvFT54b/5DPJdEBCxYIrVB3v0uTy+JhRh3CyEp8/22BXDkG8rffkFwREdLsdj9mOrPbJYVOZw8ipcBuzjw==",
+			"cpu": [
+				"riscv64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-riscv64-musl": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.88.0.tgz",
+			"integrity": "sha512-Wt47mKMWelVjRjuR7BCFxXkB0m79K1sTEbqMHRWciKUgo5iv7sWsF4RXSOyFYHD9zerNrkRZblnN273rhwOA1Q==",
+			"cpu": [
+				"riscv64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-s390x-gnu": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.88.0.tgz",
+			"integrity": "sha512-g3L12KCS4+1gtUt3RbJ4F+Yxx4LNmmZLEPfhd8rAHEJjJk2lAgNfnjGoP/phJyhG5WS6VbNYbJtadJelNfvTMA==",
+			"cpu": [
+				"s390x"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-x64-gnu": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.88.0.tgz",
+			"integrity": "sha512-og/XHVDOD9ZJgRiZkT9DgzQd4sr+JZW7e4l17Q/jVMZiIbeEd4uIu9iAoUbTF1gIvVZoRc4QDOxyVUvQGp4WHg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-linux-x64-musl": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.88.0.tgz",
+			"integrity": "sha512-EmhBsp+xuKb6YbZNEMLBo80Xw71AZOIm18do8ni/GLX/Lw1XzNhVYpbxO1KasYtoAvrGtCOdCPULRlIE0bPbTQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-openharmony-arm64": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.88.0.tgz",
+			"integrity": "sha512-DBUcx/KwYdg1DAz+G01P/GFv512J04EsZadbHptx2FTpWT/MWRg21ZToNHt9pnsfQRBQ3et/g+vqzbvrdAVbuA==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"openharmony"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-win32-arm64-msvc": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.88.0.tgz",
+			"integrity": "sha512-xeVd0n4XG5HvynxfYvXi6uB+JvZbVZataowPS8cYpMbYg9mwE4sSyElFQd4LVJFifq8bRLDSR18XgEildmcXAg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-win32-ia32-msvc": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.88.0.tgz",
+			"integrity": "sha512-MA6iOw//amleaz2mVMsZrA7NHlEexjTrhIxSMFCXQi6IUuQO+3Od00GZhr2iCYw6RFzMW36jkKK/WHBXMsoQAw==",
+			"cpu": [
+				"ia32"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/binding-win32-x64-msvc": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.88.0.tgz",
+			"integrity": "sha512-3Sz6rVWe8Dy+ufsXurFN1GX2dX43F/lQMSLelK9gFjiba7nHvLlqlhR5cHlWVnCpSqUY1hN9pyCX9XToe6ve6g==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			}
+		},
+		"node_modules/@oxlint/plugins": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/@oxlint/plugins/-/plugins-1.88.0.tgz",
+			"integrity": "sha512-G2xbfWTrbqYRhR/vfeKNMQf/sS3/ti0iKJAAkRxHuXWZH/hne/dyIb9QKk5LuR6cJLARxsL6FMoAYmfspd74MQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/oxc-project"
+			}
+		},
+		"node_modules/@polka/url": {
+			"version": "1.0.0-next.29",
+			"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz",
+			"integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@publint/pack": {
+			"version": "0.1.7",
+			"resolved": "https://registry.npmjs.org/@publint/pack/-/pack-0.1.7.tgz",
+			"integrity": "sha512-4EDEmvxWtgsCnnVeBvtFIFZtUhPPt1+bA9JrSwU4Sa//6oKtzCSlGGXYJr44OD9aGISymbieJ4mCKHUygUDU+g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"tinyexec": "^1.3.0"
+			},
+			"engines": {
+				"node": ">=18"
+			},
+			"funding": {
+				"url": "https://bjornlu.com/sponsor"
+			}
+		},
+		"node_modules/@rolldown/pluginutils": {
+			"version": "1.0.1",
+			"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz",
+			"integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@standard-schema/spec": {
+			"version": "1.1.0",
+			"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
+			"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@sveltejs/acorn-typescript": {
+			"version": "1.0.13",
+			"resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.13.tgz",
+			"integrity": "sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ==",
+			"dev": true,
+			"license": "MIT",
+			"peerDependencies": {
+				"acorn": "^8.9.0"
+			}
+		},
+		"node_modules/@sveltejs/adapter-auto": {
+			"version": "8.0.0",
+			"resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-8.0.0.tgz",
+			"integrity": "sha512-CKOwUS865xfoZn3CpM868slPfitsQ4vmxAR/yOfTIguAwStgkhjhzV0zEhmkzPalH338LJ9XnQX9vfQeY7220A==",
+			"dev": true,
+			"license": "MIT",
+			"peerDependencies": {
+				"@sveltejs/kit": "^3.0.0-next.0"
+			}
+		},
+		"node_modules/@sveltejs/kit": {
+			"version": "3.2.0",
+			"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-3.2.0.tgz",
+			"integrity": "sha512-zhb8GTeFd/6BwfqaY4wKIF7eFACYOgn/KNppV6UHFBHk174B4d7xTtN7x0PxaPPlwnCTgbnpaYF6r9lirz0Biw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/trace-mapping": "^0.3.31",
+				"@rolldown/pluginutils": "^1.0.1",
+				"@standard-schema/spec": "^1.1.0",
+				"cookie": "^2.0.1",
+				"devalue": "^5.9.4",
+				"esm-env": "^1.2.2",
+				"magic-string": "^1.2.3",
+				"mrmime": "^2.0.1",
+				"sirv": "^3.0.2"
+			},
+			"bin": {
+				"svelte-kit": "svelte-kit.js"
+			},
+			"engines": {
+				"node": ">=22.17"
+			},
+			"peerDependencies": {
+				"@opentelemetry/api": "^1.0.0",
+				"@sveltejs/vite-plugin-svelte": "^7.0.0",
+				"svelte": "^5.57.1",
+				"typescript": "^6.0.0",
+				"vite": "^8.0.12"
+			},
+			"peerDependenciesMeta": {
+				"@opentelemetry/api": {
+					"optional": true
+				},
+				"typescript": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@sveltejs/load-config": {
+			"version": "0.2.3",
+			"resolved": "https://registry.npmjs.org/@sveltejs/load-config/-/load-config-0.2.3.tgz",
+			"integrity": "sha512-VT3qmUb8pRV2QrZjd8iAmtg8lf4W0TIjZbvXtz5MKei/q96teWZgGJyyidJzOjzZzvdq616eSRVeMYIQChUTAQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">= 18.0.0"
+			}
+		},
+		"node_modules/@sveltejs/package": {
+			"version": "2.5.8",
+			"resolved": "https://registry.npmjs.org/@sveltejs/package/-/package-2.5.8.tgz",
+			"integrity": "sha512-zeBbsXYvHiBu56v4gJaGQoEHzg96w0E1j3dOMX8vo56s6vI5eQ57ZEZhudjwjnegnVitRRu5MrmhO0eNvaonIw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"chokidar": "^5.0.0",
+				"kleur": "^4.1.5",
+				"sade": "^1.8.1",
+				"semver": "^7.5.4",
+				"svelte2tsx": "~0.7.55"
+			},
+			"bin": {
+				"svelte-package": "svelte-package.js"
+			},
+			"engines": {
+				"node": "^16.14 || >=18"
+			},
+			"peerDependencies": {
+				"svelte": "^3.44.0 || ^4.0.0 || ^5.0.0-next.1"
+			}
+		},
+		"node_modules/@sveltejs/vite-plugin-svelte": {
+			"version": "7.3.1",
+			"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-7.3.1.tgz",
+			"integrity": "sha512-ZPsLN8B1e/En+Ak5s4V7srFDT532oS0qieLsQwu63NGKsS+iAjoO2Js1BochlHlglcU+Pt7WAO3C5Ee+4f6gVA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"deepmerge": "^4.3.1",
+				"magic-string": "^1.0.0",
+				"obug": "^2.1.0",
+				"vitefu": "^1.1.2"
+			},
+			"engines": {
+				"node": "^20.19 || ^22.12 || >=24"
+			},
+			"peerDependencies": {
+				"svelte": "^5.46.4",
+				"vite": "^8.0.0-beta.7 || ^8.0.0"
+			}
+		},
+		"node_modules/@swc/helpers": {
+			"version": "0.5.24",
+			"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.24.tgz",
+			"integrity": "sha512-6tcXo4kA8HgGO7AVmawB57RYi/piBPYVHVcO6dXjX+SZw8GoHmi262sp4v2Ha2kNP9Cx84qei27yT+fjS1lxgg==",
+			"license": "Apache-2.0"
+		},
+		"node_modules/@tailwindcss/node": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz",
+			"integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/remapping": "^2.3.5",
+				"enhanced-resolve": "^5.24.1",
+				"jiti": "^2.7.0",
+				"lightningcss": "1.32.0",
+				"magic-string": "^0.30.21",
+				"source-map-js": "^1.2.1",
+				"tailwindcss": "4.3.3"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
+			"integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
+			"dev": true,
+			"license": "MPL-2.0",
+			"dependencies": {
+				"detect-libc": "^2.0.3"
+			},
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			},
+			"optionalDependencies": {
+				"lightningcss-android-arm64": "1.32.0",
+				"lightningcss-darwin-arm64": "1.32.0",
+				"lightningcss-darwin-x64": "1.32.0",
+				"lightningcss-freebsd-x64": "1.32.0",
+				"lightningcss-linux-arm-gnueabihf": "1.32.0",
+				"lightningcss-linux-arm64-gnu": "1.32.0",
+				"lightningcss-linux-arm64-musl": "1.32.0",
+				"lightningcss-linux-x64-gnu": "1.32.0",
+				"lightningcss-linux-x64-musl": "1.32.0",
+				"lightningcss-win32-arm64-msvc": "1.32.0",
+				"lightningcss-win32-x64-msvc": "1.32.0"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-android-arm64": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",
+			"integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-arm64": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",
+			"integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-x64": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",
+			"integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-freebsd-x64": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",
+			"integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"freebsd"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm-gnueabihf": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",
+			"integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-gnu": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",
+			"integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-musl": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",
+			"integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-gnu": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",
+			"integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-musl": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",
+			"integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-win32-arm64-msvc": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",
+			"integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/lightningcss-win32-x64-msvc": {
+			"version": "1.32.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",
+			"integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/@tailwindcss/node/node_modules/magic-string": {
+			"version": "0.30.21",
+			"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
+			"integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/sourcemap-codec": "^1.5.5"
+			}
+		},
+		"node_modules/@tailwindcss/oxide": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz",
+			"integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">= 20"
+			},
+			"optionalDependencies": {
+				"@tailwindcss/oxide-android-arm64": "4.3.3",
+				"@tailwindcss/oxide-darwin-arm64": "4.3.3",
+				"@tailwindcss/oxide-darwin-x64": "4.3.3",
+				"@tailwindcss/oxide-freebsd-x64": "4.3.3",
+				"@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3",
+				"@tailwindcss/oxide-linux-arm64-gnu": "4.3.3",
+				"@tailwindcss/oxide-linux-arm64-musl": "4.3.3",
+				"@tailwindcss/oxide-linux-x64-gnu": "4.3.3",
+				"@tailwindcss/oxide-linux-x64-musl": "4.3.3",
+				"@tailwindcss/oxide-wasm32-wasi": "4.3.3",
+				"@tailwindcss/oxide-win32-arm64-msvc": "4.3.3",
+				"@tailwindcss/oxide-win32-x64-msvc": "4.3.3"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-android-arm64": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz",
+			"integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-darwin-arm64": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz",
+			"integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-darwin-x64": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz",
+			"integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-freebsd-x64": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz",
+			"integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"freebsd"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz",
+			"integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz",
+			"integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-linux-arm64-musl": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz",
+			"integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-linux-x64-gnu": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz",
+			"integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-linux-x64-musl": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz",
+			"integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz",
+			"integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==",
+			"bundleDependencies": [
+				"@napi-rs/wasm-runtime",
+				"@emnapi/core",
+				"@emnapi/runtime",
+				"@tybys/wasm-util",
+				"@emnapi/wasi-threads",
+				"tslib"
+			],
+			"cpu": [
+				"wasm32"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"dependencies": {
+				"@emnapi/core": "^1.11.1",
+				"@emnapi/runtime": "^1.11.1",
+				"@emnapi/wasi-threads": "^1.2.2",
+				"@napi-rs/wasm-runtime": "^1.1.4",
+				"@tybys/wasm-util": "^0.10.2",
+				"tslib": "^2.8.1"
+			},
+			"engines": {
+				"node": ">=14.0.0"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": {
+			"version": "1.11.1",
+			"dev": true,
+			"inBundle": true,
+			"license": "MIT",
+			"optional": true,
+			"dependencies": {
+				"@emnapi/wasi-threads": "1.2.2",
+				"tslib": "^2.4.0"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": {
+			"version": "1.11.1",
+			"dev": true,
+			"inBundle": true,
+			"license": "MIT",
+			"optional": true,
+			"dependencies": {
+				"tslib": "^2.4.0"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
+			"version": "1.2.2",
+			"dev": true,
+			"inBundle": true,
+			"license": "MIT",
+			"optional": true,
+			"dependencies": {
+				"tslib": "^2.4.0"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": {
+			"version": "1.1.4",
+			"dev": true,
+			"inBundle": true,
+			"license": "MIT",
+			"optional": true,
+			"dependencies": {
+				"@tybys/wasm-util": "^0.10.1"
+			},
+			"funding": {
+				"type": "github",
+				"url": "https://github.com/sponsors/Brooooooklyn"
+			},
+			"peerDependencies": {
+				"@emnapi/core": "^1.7.1",
+				"@emnapi/runtime": "^1.7.1"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": {
+			"version": "0.10.2",
+			"dev": true,
+			"inBundle": true,
+			"license": "MIT",
+			"optional": true,
+			"dependencies": {
+				"tslib": "^2.4.0"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": {
+			"version": "2.8.1",
+			"dev": true,
+			"inBundle": true,
+			"license": "0BSD",
+			"optional": true
+		},
+		"node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz",
+			"integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/oxide-win32-x64-msvc": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz",
+			"integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">= 20"
+			}
+		},
+		"node_modules/@tailwindcss/vite": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz",
+			"integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@tailwindcss/node": "4.3.3",
+				"@tailwindcss/oxide": "4.3.3",
+				"tailwindcss": "4.3.3"
+			},
+			"peerDependencies": {
+				"vite": "^5.2.0 || ^6 || ^7 || ^8"
+			}
+		},
+		"node_modules/@testing-library/dom": {
+			"version": "10.4.2",
+			"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.2.tgz",
+			"integrity": "sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@babel/code-frame": "^7.10.4",
+				"@babel/runtime": "^7.12.5",
+				"@types/aria-query": "^5.0.1",
+				"aria-query": "5.3.0",
+				"dom-accessibility-api": "^0.5.9",
+				"lz-string": "^1.5.0",
+				"picocolors": "1.1.1",
+				"pretty-format": "^27.0.2"
+			},
+			"engines": {
+				"node": ">=18"
+			}
+		},
+		"node_modules/@testing-library/dom/node_modules/aria-query": {
+			"version": "5.3.0",
+			"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
+			"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"dependencies": {
+				"dequal": "^2.0.3"
+			}
+		},
+		"node_modules/@testing-library/svelte-core": {
+			"version": "1.1.3",
+			"resolved": "https://registry.npmjs.org/@testing-library/svelte-core/-/svelte-core-1.1.3.tgz",
+			"integrity": "sha512-KkMAvXeWorxN2Yn0kdC1lfoAItxpoj4uOWzxK5leDrNxonLvS5nwBFvztrroyTszQ0Wf/EU6iLT8JhY5qcn22g==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=16"
+			},
+			"peerDependencies": {
+				"svelte": "^3 || ^4 || ^5 || ^5.0.0-next.0"
+			}
+		},
+		"node_modules/@testing-library/user-event": {
+			"version": "14.6.8",
+			"resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.8.tgz",
+			"integrity": "sha512-vgSSqnANMnkcYR/vUNDbwS7aM3OErRLNUG8vCVVlj4oc6cKffUrccX7UAS5AmJQQNZTSibi9z5GvvRZ0aYgUCQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=12",
+				"npm": ">=6"
+			},
+			"peerDependencies": {
+				"@testing-library/dom": ">=7.21.4"
+			}
+		},
+		"node_modules/@types/aria-query": {
+			"version": "5.0.4",
+			"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
+			"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@types/chai": {
+			"version": "5.2.3",
+			"resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
+			"integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@types/deep-eql": "*",
+				"assertion-error": "^2.0.1"
+			}
+		},
+		"node_modules/@types/deep-eql": {
+			"version": "4.0.2",
+			"resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
+			"integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@types/estree": {
+			"version": "1.0.9",
+			"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+			"integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/@types/node": {
+			"version": "24.19.2",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
+			"integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"undici-types": ">=7.24.0 <7.24.7"
+			}
+		},
+		"node_modules/@vitest/browser": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-5.0.5.tgz",
+			"integrity": "sha512-IDMoZX/iZ8rkilw7weaSgN8tJ7iZ9hUv0wYoKXyiyjWjWFwLSWAY707DcVTgxTYOudWC1E3HA9LYn7kVa9a7uQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@blazediff/core": "1.10.0",
+				"@vitest/mocker": "5.0.5",
+				"@vitest/ui": "5.0.5",
+				"@vitest/utils": "5.0.5",
+				"magic-string": "^1.4.3",
+				"pngjs": "^7.0.0",
+				"sirv": "^3.0.2",
+				"tinyrainbow": "^3.2.0",
+				"ws": "^8.22.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"vitest": "5.0.5"
+			}
+		},
+		"node_modules/@vitest/browser-playwright": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/browser-playwright/-/browser-playwright-5.0.5.tgz",
+			"integrity": "sha512-lcdThFUUcMV9mGGV1SUiZXPxfjgW4CssA7o3STxzh8WK0tT2r526kc12tZIBRZfoLMwkhxjLmMXkWXONzdsDQw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@vitest/browser": "5.0.5",
+				"@vitest/mocker": "5.0.5",
+				"tinyrainbow": "^3.2.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"playwright": "*",
+				"vitest": "5.0.5"
+			},
+			"peerDependenciesMeta": {
+				"playwright": {
+					"optional": false
+				}
+			}
+		},
+		"node_modules/@vitest/browser-preview": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/browser-preview/-/browser-preview-5.0.5.tgz",
+			"integrity": "sha512-ViNg4UlomGSJHtnnr7Txm+55P7/aAMMoS+1WYnWjp5w5tzf7YEUAICcs2sb1uMovEnC8el/8zUfkWZ8+7fPCKA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@testing-library/dom": "^10.4.2",
+				"@testing-library/user-event": "^14.6.7",
+				"@vitest/browser": "5.0.5"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"vitest": "5.0.5"
+			}
+		},
+		"node_modules/@vitest/coverage-v8": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.0.5.tgz",
+			"integrity": "sha512-4KpkGdIrSqBihx/JyP/e+S+IKB98etg1XDQiLAxksLfcShnwi1VReGeOT9NI43hLHbknosKp/1CCLn9Zgcs8mg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@bcoe/v8-coverage": "^1.0.2",
+				"@vitest/istanbul-lib-coverage": "^1.0.2",
+				"@vitest/istanbul-lib-report": "^1.0.2",
+				"ast-v8-to-istanbul": "^1.0.7",
+				"magicast": "^0.5.5",
+				"obug": "^3.0.0",
+				"std-env": "^4.3.0",
+				"tinyrainbow": "^3.2.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"@vitest/browser": "5.0.5",
+				"vitest": "5.0.5"
+			},
+			"peerDependenciesMeta": {
+				"@vitest/browser": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@vitest/coverage-v8/node_modules/obug": {
+			"version": "3.0.0",
+			"resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz",
+			"integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==",
+			"dev": true,
+			"funding": [
+				"https://github.com/sponsors/sxzz",
+				"https://opencollective.com/debug"
+			],
+			"license": "MIT",
+			"engines": {
+				"node": ">=12.20.0"
+			}
+		},
+		"node_modules/@vitest/istanbul-lib-coverage": {
+			"version": "1.0.2",
+			"resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.2.tgz",
+			"integrity": "sha512-9J/JMwOf9AoJhAywhrn7ScKTL38hsWQP/qPG60OtaAFcQ5OXPwKsxZFlbnuCKmZ61m8/lGgHYnFpdyQZUvG/iA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=22"
+			}
+		},
+		"node_modules/@vitest/istanbul-lib-report": {
+			"version": "1.0.2",
+			"resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-1.0.2.tgz",
+			"integrity": "sha512-gUsfXZJbzPamoIY5TvHFiMMoXESBrUMo+xqaj+rYrWI69+EnvRlYBlP96ZnHPY4vX8kyUpgAnFUCg5wZG/HkDQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@vitest/istanbul-lib-coverage": "1.0.2"
+			},
+			"engines": {
+				"node": ">=22"
+			}
+		},
+		"node_modules/@vitest/mocker": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.0.5.tgz",
+			"integrity": "sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/trace-mapping": "0.3.31",
+				"@vitest/spy": "5.0.5",
+				"estree-walker": "^3.0.3",
+				"magic-string": "^1.4.3"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"msw": "^2.4.9 || ^3.0.0",
+				"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
+			},
+			"peerDependenciesMeta": {
+				"msw": {
+					"optional": true
+				},
+				"vite": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@vitest/pretty-format": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-5.0.5.tgz",
+			"integrity": "sha512-24sSdIlMA9DVPXnYiB9siwU0bTd887Y9jX3+vabztCSsvHwo7ipvJ/a2L3Rljw8+2rK1f5fCj3h5U9I/Jsqgbw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"tinyrainbow": "^3.2.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			}
+		},
+		"node_modules/@vitest/snapshot": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-5.0.5.tgz",
+			"integrity": "sha512-dHyFElWMQy0wFBGrIaPPeUWfJFh+jAUrv46ImIJGd8CADdKV3mlrAu3FyD0wesdxELFCs9M807e040Kba/XKtA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@vitest/pretty-format": "5.0.5",
+				"@vitest/utils": "5.0.5",
+				"magic-string": "^1.4.3",
+				"pathe": "^2.0.3"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			}
+		},
+		"node_modules/@vitest/spy": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.0.5.tgz",
+			"integrity": "sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==",
+			"dev": true,
+			"license": "MIT",
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			}
+		},
+		"node_modules/@vitest/ui": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-5.0.5.tgz",
+			"integrity": "sha512-dCoGUOdgmCaSB2g+WQ/spPCBkytAWdNUkFSXY4z+eYp2d8JEOY8v0uDRaJTG9qf/kTlTVZ4CuYMYMz/f1HS/qQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@vitest/utils": "5.0.5",
+				"fflate": "^0.8.3",
+				"flatted": "^3.4.4",
+				"pathe": "^2.0.3",
+				"sirv": "^3.0.2",
+				"tinyrainbow": "^3.2.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"vitest": "5.0.5"
+			}
+		},
+		"node_modules/@vitest/utils": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-5.0.5.tgz",
+			"integrity": "sha512-/rBu7gzLDQI/SC79Tn98b5DwOgaHU/Gt4I9OVeP3YofzNaYtbImRCOJQmT1S6vOJg9gEIlWC+r3QxKkjuSa1nQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@vitest/pretty-format": "5.0.5",
+				"convert-source-map": "^2.0.0",
+				"tinyrainbow": "^3.2.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-darwin-arm64": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-darwin-arm64/-/vite-plus-darwin-arm64-1.3.0.tgz",
+			"integrity": "sha512-BF4W+UwGxUkHPrH2pZLhafJfkJT20WZIbMzZgZLGQ44LPpZPX8Sb+qtblUnXUkkCzTqad4XtSPgiLKglvZkNQQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-darwin-x64": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-darwin-x64/-/vite-plus-darwin-x64-1.3.0.tgz",
+			"integrity": "sha512-vLZTk0r+s3e7mycj4SGBbcpK+xyM8a86hXQZtQbJyW7xrGJzsavISy7/m4gGZpWN32Hl4Tmx9V/ffeaoXLkRdg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-linux-arm64-gnu": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-linux-arm64-gnu/-/vite-plus-linux-arm64-gnu-1.3.0.tgz",
+			"integrity": "sha512-H43Dj9RkEyjOFXxTk3DLTa6hqmHhxUN9vbbqNdwQoc3/TPNhC1zsLZy3qgUFbYGLdS7M9jICCqFzj5GDSYrhIw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-linux-arm64-musl": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-linux-arm64-musl/-/vite-plus-linux-arm64-musl-1.3.0.tgz",
+			"integrity": "sha512-Se2GlvzUZOvFy+5hoQHoG7LFeiplKs+EJwaskayCSLwZAP+e6/LTK7EK+8OcdMpmdsLPtZoTJHkIjSzrQowJwQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-linux-x64-gnu": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-linux-x64-gnu/-/vite-plus-linux-x64-gnu-1.3.0.tgz",
+			"integrity": "sha512-moxojk6zmog2SaLE4/cG75acE6X3cjR0/52Ba8OG2ct0r+dv55VSE0kellAuxS6o9VHy7TBhkIpwpFpQ34rnAA==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-linux-x64-musl": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-linux-x64-musl/-/vite-plus-linux-x64-musl-1.3.0.tgz",
+			"integrity": "sha512-CykxH008Dy9u20Myki9/UIqq3Dbo1ZMqa098aS6AtWp3QKyEKzSLPB3jKDUklgmu83xiFe5BpPA+33oF0yNY7A==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-win32-arm64-msvc": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-win32-arm64-msvc/-/vite-plus-win32-arm64-msvc-1.3.0.tgz",
+			"integrity": "sha512-l61S9b8aeiDpi8wPRfz4HonqRkLpt/OVYs0sCskvlXYSW/L8qfLOtuWH/xpF8xDjMIfBefKejBVfU1UlRax5Tw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@voidzero-dev/vite-plus-win32-x64-msvc": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-win32-x64-msvc/-/vite-plus-win32-x64-msvc-1.3.0.tgz",
+			"integrity": "sha512-b6Ng8YezA6JA3adQBNA+8Mn26+OX4fw/tsPfnk//5Cx+1XFDZoAxWYXtGzc0yUQPEKnoGtfw/0OUvcibg61yYg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/@yuku-core/binding-android-arm64": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-android-arm64/-/binding-android-arm64-0.19.0.tgz",
+			"integrity": "sha512-wdL2XmTiZixAOaHk9Z0JJZ8u9Qm8d333Zjpc6gaxXFX+UR5BlsfxZ7a2+2Rm71pamppsPYGUGFq2oVLbh6DISw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"android"
+			]
+		},
+		"node_modules/@yuku-core/binding-darwin-arm64": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-darwin-arm64/-/binding-darwin-arm64-0.19.0.tgz",
+			"integrity": "sha512-7sNJa6XJhyetnTy64jw3NEi4YgUcezHk1G5GH9FSvXAuC8wIlbaOwT9lgq5qo5sspjrZJQlBR1TWflP49uRpMw==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			]
+		},
+		"node_modules/@yuku-core/binding-darwin-x64": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-darwin-x64/-/binding-darwin-x64-0.19.0.tgz",
+			"integrity": "sha512-pTC7dYEc59isdyizc3nsuyFNBu2LU5wMYZ1be6UMr59PY/AJNtO1aBLWV0MgL/z7C1nv/2sX4TNjGgKLoeevJw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			]
+		},
+		"node_modules/@yuku-core/binding-freebsd-x64": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-freebsd-x64/-/binding-freebsd-x64-0.19.0.tgz",
+			"integrity": "sha512-xrZjF6XOEwyLOiDIfrwDdRCS6ghxcJeirNC1KivQhVcUwlRonaU79S3/Uiyx3lBylPnT8qKJ3/aMT+H52nGTJQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"freebsd"
+			]
+		},
+		"node_modules/@yuku-core/binding-linux-arm-gnu": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-linux-arm-gnu/-/binding-linux-arm-gnu-0.19.0.tgz",
+			"integrity": "sha512-0OyIH53C0I1CbADHn9FSdCfX5qbpeLwJhmOVhonFJNYheybOnkSJ50qGMfTJIb8y5zrwqvLs7FVBvz6Fk8maZg==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@yuku-core/binding-linux-arm-musl": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-linux-arm-musl/-/binding-linux-arm-musl-0.19.0.tgz",
+			"integrity": "sha512-z/iPfkCOCSXE34VXNt0uP1ORSW+4mEa9b5CiJcWZeqZH08g49bFU/jRM2T04f+Wpw5mJ6HIzNBiojxeAbrHjeg==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@yuku-core/binding-linux-arm64-gnu": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.19.0.tgz",
+			"integrity": "sha512-jLNTi+gzaRwBJ+gwhCJ+rDb5dmx/8hEBx93UWd7hjMSqPTL1D1wvVSvXVAldV5kALvju7b0/m51EHEhs4+I1fA==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@yuku-core/binding-linux-arm64-musl": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.19.0.tgz",
+			"integrity": "sha512-YwyPIdW/rN2Fmv0MTFWi47FaB3F9g+2b+sJISyAw83Yd60RWH4T3Nx6XkAHHVN+uKJNBAd6So7/BVihSiFYvuQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@yuku-core/binding-linux-x64-gnu": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.19.0.tgz",
+			"integrity": "sha512-/vskaAXVX3ESR43FiTdfiYS7z1b9uoQJwVQ/0RgUHgN2sWoAyCZs+aX4CgU7eKGIHTVfp9VFwv+c+2XchYiEtQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@yuku-core/binding-linux-x64-musl": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-linux-x64-musl/-/binding-linux-x64-musl-0.19.0.tgz",
+			"integrity": "sha512-FuXL5igeSKib9Rye02TdH+D6SQezTyGxIATMu1Qsn/QywrzwpGl35OLpS2C1x5vpGLeVE2XgiLd5mVPFHmIglQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"linux"
+			]
+		},
+		"node_modules/@yuku-core/binding-win32-arm64": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-win32-arm64/-/binding-win32-arm64-0.19.0.tgz",
+			"integrity": "sha512-YuJAe7zEKT1Xa7LuHlhGJpPnYQeVtvo0rZvNjJRqkH0hQGOw4C8QeP30Tg5VKGzZfo2x8CjhjEhKt4TmLwfmdg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			]
+		},
+		"node_modules/@yuku-core/binding-win32-x64": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-core/binding-win32-x64/-/binding-win32-x64-0.19.0.tgz",
+			"integrity": "sha512-o8iY/mXwlRkedp0LNTr4+TEfXTPQwoNZmv6k+1WIAd1ZXEn8xJJTBCtB0osaVvdZo/x/cNmV16UrWrrGpM5Mvw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"win32"
+			]
+		},
+		"node_modules/@yuku-toolchain/types": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/@yuku-toolchain/types/-/types-0.19.0.tgz",
+			"integrity": "sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/acorn": {
+			"version": "8.19.0",
+			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz",
+			"integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
+			"dev": true,
+			"license": "MIT",
+			"bin": {
+				"acorn": "bin/acorn"
+			},
+			"engines": {
+				"node": ">=0.4.0"
+			}
+		},
+		"node_modules/ansi-regex": {
+			"version": "5.0.1",
+			"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+			"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=8"
+			}
+		},
+		"node_modules/ansi-styles": {
+			"version": "5.2.0",
+			"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+			"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=10"
+			},
+			"funding": {
+				"url": "https://github.com/chalk/ansi-styles?sponsor=1"
+			}
+		},
+		"node_modules/aria-query": {
+			"version": "5.3.1",
+			"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.1.tgz",
+			"integrity": "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"engines": {
+				"node": ">= 0.4"
+			}
+		},
+		"node_modules/assertion-error": {
+			"version": "2.0.1",
+			"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
+			"integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=12"
+			}
+		},
+		"node_modules/ast-v8-to-istanbul": {
+			"version": "1.0.7",
+			"resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.7.tgz",
+			"integrity": "sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/trace-mapping": "^0.3.31",
+				"estree-walker": "^3.0.3",
+				"js-tokens": "^10.0.0"
+			}
+		},
+		"node_modules/ast-v8-to-istanbul/node_modules/js-tokens": {
+			"version": "10.0.0",
+			"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz",
+			"integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/axobject-query": {
+			"version": "4.1.0",
+			"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",
+			"integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"engines": {
+				"node": ">= 0.4"
+			}
+		},
+		"node_modules/bits-ui": {
+			"version": "2.18.1",
+			"resolved": "https://registry.npmjs.org/bits-ui/-/bits-ui-2.18.1.tgz",
+			"integrity": "sha512-KkemzKFH4T3gt3H+P86JcnAWExjByv/6vlwjm/BoCwTPHu03yiCdxbghdJLvFReQTe0acCAiRcKfmixxD6XvlA==",
+			"license": "MIT",
+			"dependencies": {
+				"@floating-ui/core": "^1.7.1",
+				"@floating-ui/dom": "^1.7.1",
+				"esm-env": "^1.1.2",
+				"runed": "^0.35.1",
+				"svelte-toolbelt": "^0.10.6",
+				"tabbable": "^6.2.0"
+			},
+			"engines": {
+				"node": ">=20"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/huntabyte"
+			},
+			"peerDependencies": {
+				"@internationalized/date": "^3.8.1",
+				"svelte": "^5.33.0"
+			}
+		},
+		"node_modules/bits-ui/node_modules/runed": {
+			"version": "0.35.1",
+			"resolved": "https://registry.npmjs.org/runed/-/runed-0.35.1.tgz",
+			"integrity": "sha512-2F4Q/FZzbeJTFdIS/PuOoPRSm92sA2LhzTnv6FXhCoENb3huf5+fDuNOg1LNvGOouy3u/225qxmuJvcV3IZK5Q==",
+			"funding": [
+				"https://github.com/sponsors/huntabyte",
+				"https://github.com/sponsors/tglide"
+			],
+			"license": "MIT",
+			"dependencies": {
+				"dequal": "^2.0.3",
+				"esm-env": "^1.0.0",
+				"lz-string": "^1.5.0"
+			},
+			"peerDependencies": {
+				"@sveltejs/kit": "^2.21.0",
+				"svelte": "^5.7.0"
+			},
+			"peerDependenciesMeta": {
+				"@sveltejs/kit": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/bits-ui/node_modules/svelte-toolbelt": {
+			"version": "0.10.7",
+			"resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.10.7.tgz",
+			"integrity": "sha512-gjuUVEEpo38UJCeI1ssE3NxG31tYENczPTcTGTXf4338qAQNdR9I1oAEbQY0KQFmbdUojNIhHuRNix7ThwFNxQ==",
+			"funding": [
+				"https://github.com/sponsors/huntabyte"
+			],
+			"dependencies": {
+				"clsx": "^2.1.1",
+				"runed": "^0.35.1",
+				"style-to-object": "^1.0.8"
+			},
+			"engines": {
+				"node": ">=18",
+				"pnpm": ">=8.7.0"
+			},
+			"peerDependencies": {
+				"svelte": "^5.30.2"
+			}
+		},
+		"node_modules/chai": {
+			"version": "6.3.0",
+			"resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz",
+			"integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=18"
+			}
+		},
+		"node_modules/chokidar": {
+			"version": "5.0.0",
+			"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",
+			"integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"readdirp": "^5.0.0"
+			},
+			"engines": {
+				"node": ">= 20.19.0"
+			},
+			"funding": {
+				"url": "https://paulmillr.com/funding/"
+			}
+		},
+		"node_modules/clsx": {
+			"version": "2.1.1",
+			"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+			"integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+			"license": "MIT",
+			"engines": {
+				"node": ">=6"
+			}
+		},
+		"node_modules/convert-source-map": {
+			"version": "2.0.0",
+			"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+			"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/cookie": {
+			"version": "2.0.1",
+			"resolved": "https://registry.npmjs.org/cookie/-/cookie-2.0.1.tgz",
+			"integrity": "sha512-yuToqVvRrj6pfDXREyQAAv8SkAEk/8GS3jQRTiUMm66TVtBYmqQeoEjL2Lmq8Rpo6271vH76InTChTitEAm65w==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=22"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/express"
+			}
+		},
+		"node_modules/dedent-js": {
+			"version": "1.0.1",
+			"resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz",
+			"integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/deepmerge": {
+			"version": "4.3.1",
+			"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+			"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=0.10.0"
+			}
+		},
+		"node_modules/dequal": {
+			"version": "2.0.3",
+			"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
+			"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
+			"license": "MIT",
+			"engines": {
+				"node": ">=6"
+			}
+		},
+		"node_modules/detect-libc": {
+			"version": "2.1.2",
+			"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+			"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"engines": {
+				"node": ">=8"
+			}
+		},
+		"node_modules/devalue": {
+			"version": "5.9.4",
+			"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.9.4.tgz",
+			"integrity": "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/dom-accessibility-api": {
+			"version": "0.5.16",
+			"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
+			"integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/enhanced-resolve": {
+			"version": "5.26.0",
+			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz",
+			"integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"graceful-fs": "^4.2.4",
+				"tapable": "^2.3.3"
+			},
+			"engines": {
+				"node": ">=10.13.0"
+			}
+		},
+		"node_modules/es-module-lexer": {
+			"version": "2.3.2",
+			"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz",
+			"integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/esm-env": {
+			"version": "1.2.2",
+			"resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz",
+			"integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==",
+			"license": "MIT"
+		},
+		"node_modules/esrap": {
+			"version": "2.4.0",
+			"resolved": "https://registry.npmjs.org/esrap/-/esrap-2.4.0.tgz",
+			"integrity": "sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/sourcemap-codec": "^1.4.15"
+			},
+			"peerDependencies": {
+				"@typescript-eslint/types": "^8.2.0"
+			},
+			"peerDependenciesMeta": {
+				"@typescript-eslint/types": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/estree-walker": {
+			"version": "3.0.3",
+			"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+			"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@types/estree": "^1.0.0"
+			}
+		},
+		"node_modules/expect-type": {
+			"version": "1.4.0",
+			"resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz",
+			"integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"engines": {
+				"node": ">=12.0.0"
+			}
+		},
+		"node_modules/fdir": {
+			"version": "6.5.0",
+			"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+			"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=12.0.0"
+			},
+			"peerDependencies": {
+				"picomatch": "^3 || ^4"
+			},
+			"peerDependenciesMeta": {
+				"picomatch": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/fflate": {
+			"version": "0.8.3",
+			"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz",
+			"integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/flatted": {
+			"version": "3.4.4",
+			"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz",
+			"integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==",
+			"dev": true,
+			"license": "ISC"
+		},
+		"node_modules/fsevents": {
+			"version": "2.3.3",
+			"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+			"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+			"dev": true,
+			"hasInstallScript": true,
+			"license": "MIT",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+			}
+		},
+		"node_modules/graceful-fs": {
+			"version": "4.2.11",
+			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+			"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+			"dev": true,
+			"license": "ISC"
+		},
+		"node_modules/highlight.js": {
+			"version": "11.11.1",
+			"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz",
+			"integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==",
+			"license": "BSD-3-Clause",
+			"engines": {
+				"node": ">=12.0.0"
+			}
+		},
+		"node_modules/inline-style-parser": {
+			"version": "0.2.7",
+			"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
+			"integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==",
+			"license": "MIT"
+		},
+		"node_modules/is-reference": {
+			"version": "3.0.3",
+			"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz",
+			"integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@types/estree": "^1.0.6"
+			}
+		},
+		"node_modules/jiti": {
+			"version": "2.7.0",
+			"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
+			"integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
+			"dev": true,
+			"license": "MIT",
+			"bin": {
+				"jiti": "lib/jiti-cli.mjs"
+			}
+		},
+		"node_modules/js-tokens": {
+			"version": "4.0.0",
+			"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+			"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/kleur": {
+			"version": "4.1.5",
+			"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+			"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6"
+			}
+		},
+		"node_modules/lightningcss": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
+			"integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",
+			"dev": true,
+			"license": "MPL-2.0",
+			"dependencies": {
+				"detect-libc": "^2.0.3"
+			},
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			},
+			"optionalDependencies": {
+				"lightningcss-android-arm64": "1.33.0",
+				"lightningcss-darwin-arm64": "1.33.0",
+				"lightningcss-darwin-x64": "1.33.0",
+				"lightningcss-freebsd-x64": "1.33.0",
+				"lightningcss-linux-arm-gnueabihf": "1.33.0",
+				"lightningcss-linux-arm64-gnu": "1.33.0",
+				"lightningcss-linux-arm64-musl": "1.33.0",
+				"lightningcss-linux-x64-gnu": "1.33.0",
+				"lightningcss-linux-x64-musl": "1.33.0",
+				"lightningcss-win32-arm64-msvc": "1.33.0",
+				"lightningcss-win32-x64-msvc": "1.33.0"
+			}
+		},
+		"node_modules/lightningcss-android-arm64": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",
+			"integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"android"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-darwin-arm64": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz",
+			"integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-darwin-x64": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz",
+			"integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"darwin"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-freebsd-x64": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz",
+			"integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"freebsd"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-linux-arm-gnueabihf": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz",
+			"integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==",
+			"cpu": [
+				"arm"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-linux-arm64-gnu": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz",
+			"integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-linux-arm64-musl": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz",
+			"integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-linux-x64-gnu": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz",
+			"integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"glibc"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-linux-x64-musl": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz",
+			"integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"libc": [
+				"musl"
+			],
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"linux"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-win32-arm64-msvc": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz",
+			"integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==",
+			"cpu": [
+				"arm64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/lightningcss-win32-x64-msvc": {
+			"version": "1.33.0",
+			"resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz",
+			"integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==",
+			"cpu": [
+				"x64"
+			],
+			"dev": true,
+			"license": "MPL-2.0",
+			"optional": true,
+			"os": [
+				"win32"
+			],
+			"engines": {
+				"node": ">= 12.0.0"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/parcel"
+			}
+		},
+		"node_modules/locate-character": {
+			"version": "3.0.0",
+			"resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
+			"integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/lz-string": {
+			"version": "1.5.0",
+			"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
+			"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
+			"license": "MIT",
+			"bin": {
+				"lz-string": "bin/bin.js"
+			}
+		},
+		"node_modules/magic-string": {
+			"version": "1.4.3",
+			"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz",
+			"integrity": "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/sourcemap-codec": "^1.6.0"
+			}
+		},
+		"node_modules/magicast": {
+			"version": "0.5.5",
+			"resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz",
+			"integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@babel/parser": "^7.29.7",
+				"@babel/types": "^7.29.7",
+				"source-map-js": "^1.2.1"
+			}
+		},
+		"node_modules/mode-watcher": {
+			"version": "1.1.0",
+			"resolved": "https://registry.npmjs.org/mode-watcher/-/mode-watcher-1.1.0.tgz",
+			"integrity": "sha512-mUT9RRGPDYenk59qJauN1rhsIMKBmWA3xMF+uRwE8MW/tjhaDSCCARqkSuDTq8vr4/2KcAxIGVjACxTjdk5C3g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"runed": "^0.25.0",
+				"svelte-toolbelt": "^0.7.1"
+			},
+			"peerDependencies": {
+				"svelte": "^5.27.0"
+			}
+		},
+		"node_modules/mri": {
+			"version": "1.2.0",
+			"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
+			"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=4"
+			}
+		},
+		"node_modules/mrmime": {
+			"version": "2.0.1",
+			"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
+			"integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=10"
+			}
+		},
+		"node_modules/nanoid": {
+			"version": "3.3.20",
+			"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
+			"integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
+			"dev": true,
+			"funding": [
+				{
+					"type": "github",
+					"url": "https://github.com/sponsors/ai"
+				}
+			],
+			"license": "MIT",
+			"bin": {
+				"nanoid": "bin/nanoid.cjs"
+			},
+			"engines": {
+				"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+			}
+		},
+		"node_modules/obug": {
+			"version": "2.2.1",
+			"resolved": "https://registry.npmjs.org/obug/-/obug-2.2.1.tgz",
+			"integrity": "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==",
+			"dev": true,
+			"funding": [
+				"https://github.com/sponsors/sxzz",
+				"https://opencollective.com/debug"
+			],
+			"license": "MIT",
+			"engines": {
+				"node": ">=12.20.0"
+			}
+		},
+		"node_modules/oxfmt": {
+			"version": "0.73.0",
+			"resolved": "https://registry.npmjs.org/oxfmt/-/oxfmt-0.73.0.tgz",
+			"integrity": "sha512-Ke4xbpuzqIBP4bkd48q815RhqWNJqOBzxVA9199M4qcF0y0LtpUv7UTg1dJ5ea6jw0RBUDZvX3qOUMNmmxfxbw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"tinypool": "2.2.0"
+			},
+			"bin": {
+				"oxfmt": "bin/oxfmt"
+			},
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/oxc-project"
+			},
+			"optionalDependencies": {
+				"@oxfmt/binding-android-arm-eabi": "0.73.0",
+				"@oxfmt/binding-android-arm64": "0.73.0",
+				"@oxfmt/binding-darwin-arm64": "0.73.0",
+				"@oxfmt/binding-darwin-x64": "0.73.0",
+				"@oxfmt/binding-freebsd-x64": "0.73.0",
+				"@oxfmt/binding-linux-arm-gnueabihf": "0.73.0",
+				"@oxfmt/binding-linux-arm-musleabihf": "0.73.0",
+				"@oxfmt/binding-linux-arm64-gnu": "0.73.0",
+				"@oxfmt/binding-linux-arm64-musl": "0.73.0",
+				"@oxfmt/binding-linux-ppc64-gnu": "0.73.0",
+				"@oxfmt/binding-linux-riscv64-gnu": "0.73.0",
+				"@oxfmt/binding-linux-riscv64-musl": "0.73.0",
+				"@oxfmt/binding-linux-s390x-gnu": "0.73.0",
+				"@oxfmt/binding-linux-x64-gnu": "0.73.0",
+				"@oxfmt/binding-linux-x64-musl": "0.73.0",
+				"@oxfmt/binding-openharmony-arm64": "0.73.0",
+				"@oxfmt/binding-win32-arm64-msvc": "0.73.0",
+				"@oxfmt/binding-win32-ia32-msvc": "0.73.0",
+				"@oxfmt/binding-win32-x64-msvc": "0.73.0"
+			},
+			"peerDependencies": {
+				"@astrojs/compiler-rs": "^0.4.0 || ^0.5.0",
+				"svelte": "^5.0.0",
+				"vite-plus": "*"
+			},
+			"peerDependenciesMeta": {
+				"@astrojs/compiler-rs": {
+					"optional": true
+				},
+				"svelte": {
+					"optional": true
+				},
+				"vite-plus": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/oxlint": {
+			"version": "1.88.0",
+			"resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.88.0.tgz",
+			"integrity": "sha512-uIcFgw8BmqvFRGzH5+r7d2zJMEexwNSrEmM6WQNnGh3VkO0XYTEFoyxyNE6tjKMUib9Cue4XJA2DoWruO5D6aw==",
+			"dev": true,
+			"license": "MIT",
+			"bin": {
+				"oxlint": "bin/oxlint"
+			},
+			"engines": {
+				"node": "^20.19.0 || >=22.12.0"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/oxc-project"
+			},
+			"optionalDependencies": {
+				"@oxlint/binding-android-arm-eabi": "1.88.0",
+				"@oxlint/binding-android-arm64": "1.88.0",
+				"@oxlint/binding-darwin-arm64": "1.88.0",
+				"@oxlint/binding-darwin-x64": "1.88.0",
+				"@oxlint/binding-freebsd-x64": "1.88.0",
+				"@oxlint/binding-linux-arm-gnueabihf": "1.88.0",
+				"@oxlint/binding-linux-arm-musleabihf": "1.88.0",
+				"@oxlint/binding-linux-arm64-gnu": "1.88.0",
+				"@oxlint/binding-linux-arm64-musl": "1.88.0",
+				"@oxlint/binding-linux-ppc64-gnu": "1.88.0",
+				"@oxlint/binding-linux-riscv64-gnu": "1.88.0",
+				"@oxlint/binding-linux-riscv64-musl": "1.88.0",
+				"@oxlint/binding-linux-s390x-gnu": "1.88.0",
+				"@oxlint/binding-linux-x64-gnu": "1.88.0",
+				"@oxlint/binding-linux-x64-musl": "1.88.0",
+				"@oxlint/binding-openharmony-arm64": "1.88.0",
+				"@oxlint/binding-win32-arm64-msvc": "1.88.0",
+				"@oxlint/binding-win32-ia32-msvc": "1.88.0",
+				"@oxlint/binding-win32-x64-msvc": "1.88.0"
+			},
+			"peerDependencies": {
+				"oxlint-tsgolint": ">=7.0.2003",
+				"vite-plus": "*"
+			},
+			"peerDependenciesMeta": {
+				"oxlint-tsgolint": {
+					"optional": true
+				},
+				"vite-plus": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/oxlint-tsgolint": {
+			"version": "7.0.2004",
+			"resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-7.0.2004.tgz",
+			"integrity": "sha512-vQ9WDF3fiZJvRdSDosNOflerOCOpwol6vWzVDxW76RcU19cjTh7engvkHLvmv+tzedR8fAiJUVUGr6IVZdkzXQ==",
+			"dev": true,
+			"license": "MIT",
+			"bin": {
+				"tsgolint": "bin/tsgolint.js"
+			},
+			"optionalDependencies": {
+				"@oxlint-tsgolint/darwin-arm64": "7.0.2004",
+				"@oxlint-tsgolint/darwin-x64": "7.0.2004",
+				"@oxlint-tsgolint/linux-arm64": "7.0.2004",
+				"@oxlint-tsgolint/linux-x64": "7.0.2004",
+				"@oxlint-tsgolint/win32-arm64": "7.0.2004",
+				"@oxlint-tsgolint/win32-x64": "7.0.2004"
+			}
+		},
+		"node_modules/package-manager-detector": {
+			"version": "1.9.0",
+			"resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.9.0.tgz",
+			"integrity": "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/pathe": {
+			"version": "2.0.3",
+			"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+			"integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/picocolors": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+			"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+			"dev": true,
+			"license": "ISC"
+		},
+		"node_modules/picomatch": {
+			"version": "4.0.7",
+			"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+			"integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=12"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/jonschlinkert"
+			}
+		},
+		"node_modules/playwright": {
+			"version": "1.64.1",
+			"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz",
+			"integrity": "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"dependencies": {
+				"playwright-core": "1.64.1"
+			},
+			"bin": {
+				"playwright": "cli.js"
+			},
+			"engines": {
+				"node": ">=20"
+			}
+		},
+		"node_modules/playwright-core": {
+			"version": "1.64.1",
+			"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz",
+			"integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"bin": {
+				"playwright-core": "cli.js"
+			},
+			"engines": {
+				"node": ">=20"
+			}
+		},
+		"node_modules/pngjs": {
+			"version": "7.0.0",
+			"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-7.0.0.tgz",
+			"integrity": "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=14.19.0"
+			}
+		},
+		"node_modules/postcss": {
+			"version": "8.5.30",
+			"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.30.tgz",
+			"integrity": "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==",
+			"dev": true,
+			"funding": [
+				{
+					"type": "opencollective",
+					"url": "https://opencollective.com/postcss/"
+				},
+				{
+					"type": "tidelift",
+					"url": "https://tidelift.com/funding/github/npm/postcss"
+				},
+				{
+					"type": "github",
+					"url": "https://github.com/sponsors/ai"
+				}
+			],
+			"license": "MIT",
+			"dependencies": {
+				"nanoid": "^3.3.20",
+				"picocolors": "^1.1.1",
+				"source-map-js": "^1.2.2"
+			},
+			"engines": {
+				"node": "^10 || ^12 || >=14"
+			}
+		},
+		"node_modules/pretty-format": {
+			"version": "27.5.1",
+			"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
+			"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"ansi-regex": "^5.0.1",
+				"ansi-styles": "^5.0.0",
+				"react-is": "^17.0.1"
+			},
+			"engines": {
+				"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+			}
+		},
+		"node_modules/publint": {
+			"version": "0.3.25",
+			"resolved": "https://registry.npmjs.org/publint/-/publint-0.3.25.tgz",
+			"integrity": "sha512-WMMbn/d7JqRlfXQL/JUI4n5skC8cJ5WVr8/wT5mmiYWkUdENkZr1I5rgs2+dQPVRgoJd+JRYtB46MTsuDylw9g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@publint/pack": "^0.1.7",
+				"package-manager-detector": "^1.8.0",
+				"picocolors": "^1.1.1",
+				"sade": "^1.8.1"
+			},
+			"bin": {
+				"publint": "src/cli.js"
+			},
+			"engines": {
+				"node": ">=18"
+			},
+			"funding": {
+				"url": "https://bjornlu.com/sponsor"
+			}
+		},
+		"node_modules/react-is": {
+			"version": "17.0.2",
+			"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+			"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/readdirp": {
+			"version": "5.1.1",
+			"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz",
+			"integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">= 20.19.0"
+			},
+			"funding": {
+				"type": "individual",
+				"url": "https://paulmillr.com/funding/"
+			}
+		},
+		"node_modules/runed": {
+			"version": "0.25.0",
+			"resolved": "https://registry.npmjs.org/runed/-/runed-0.25.0.tgz",
+			"integrity": "sha512-7+ma4AG9FT2sWQEA0Egf6mb7PBT2vHyuHail1ie8ropfSjvZGtEAx8YTmUjv/APCsdRRxEVvArNjALk9zFSOrg==",
+			"dev": true,
+			"funding": [
+				"https://github.com/sponsors/huntabyte",
+				"https://github.com/sponsors/tglide"
+			],
+			"dependencies": {
+				"esm-env": "^1.0.0"
+			},
+			"peerDependencies": {
+				"svelte": "^5.7.0"
+			}
+		},
+		"node_modules/sade": {
+			"version": "1.8.1",
+			"resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
+			"integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"mri": "^1.1.0"
+			},
+			"engines": {
+				"node": ">=6"
+			}
+		},
+		"node_modules/scule": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz",
+			"integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/semver": {
+			"version": "7.8.5",
+			"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+			"integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+			"dev": true,
+			"license": "ISC",
+			"bin": {
+				"semver": "bin/semver.js"
+			},
+			"engines": {
+				"node": ">=10"
+			}
+		},
+		"node_modules/sirv": {
+			"version": "3.0.2",
+			"resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz",
+			"integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@polka/url": "^1.0.0-next.24",
+				"mrmime": "^2.0.0",
+				"totalist": "^3.0.0"
+			},
+			"engines": {
+				"node": ">=18"
+			}
+		},
+		"node_modules/source-map-js": {
+			"version": "1.2.2",
+			"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
+			"integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
+			"dev": true,
+			"license": "BSD-3-Clause",
+			"engines": {
+				"node": ">=0.10.0"
+			}
+		},
+		"node_modules/std-env": {
+			"version": "4.3.0",
+			"resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz",
+			"integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/style-to-object": {
+			"version": "1.0.14",
+			"resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz",
+			"integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==",
+			"license": "MIT",
+			"dependencies": {
+				"inline-style-parser": "0.2.7"
+			}
+		},
+		"node_modules/svelte": {
+			"version": "5.57.2",
+			"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.57.2.tgz",
+			"integrity": "sha512-1YiPCAXT0Ct6g1vOMmSLa0Nsc3QRMvtDF32ihgglGVrugIuIK38RyDiFNXVDhtQ81TJjSO57NdMw6DyYLqSGDQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/remapping": "^2.3.5",
+				"@jridgewell/sourcemap-codec": "^1.6.0",
+				"@sveltejs/acorn-typescript": "^1.0.13",
+				"@types/estree": "^1.0.9",
+				"acorn": "^8.18.0",
+				"aria-query": "5.3.1",
+				"axobject-query": "^4.1.0",
+				"clsx": "^2.1.1",
+				"devalue": "^5.9.2",
+				"esm-env": "^1.2.1",
+				"esrap": "^2.3.6",
+				"is-reference": "^3.0.3",
+				"locate-character": "^3.0.0",
+				"magic-string": "^0.30.11",
+				"zimmerframe": "^1.1.2"
+			},
+			"engines": {
+				"node": ">=18"
+			}
+		},
+		"node_modules/svelte-check": {
+			"version": "4.7.7",
+			"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.7.7.tgz",
+			"integrity": "sha512-Ge2IMdeTpbJuzNFGRiiMg0RWgbScysKQu7xwcyFJ22+DU9F5nPX51+Q3gHmGqRxYQMx2knreVWt5oCtfe0vf2g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/trace-mapping": "^0.3.25",
+				"@sveltejs/load-config": "^0.2.3",
+				"chokidar": "^4.0.1",
+				"fdir": "^6.2.0",
+				"picocolors": "^1.0.0",
+				"sade": "^1.7.4"
+			},
+			"bin": {
+				"svelte-check": "bin/svelte-check"
+			},
+			"engines": {
+				"node": ">= 18.0.0"
+			},
+			"peerDependencies": {
+				"svelte": "^4.0.0 || ^5.0.0-next.0",
+				"typescript": "^5.0.0 || ^6.0.0"
+			}
+		},
+		"node_modules/svelte-check/node_modules/chokidar": {
+			"version": "4.0.3",
+			"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
+			"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"readdirp": "^4.0.1"
+			},
+			"engines": {
+				"node": ">= 14.16.0"
+			},
+			"funding": {
+				"url": "https://paulmillr.com/funding/"
+			}
+		},
+		"node_modules/svelte-check/node_modules/readdirp": {
+			"version": "4.1.2",
+			"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
+			"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">= 14.18.0"
+			},
+			"funding": {
+				"type": "individual",
+				"url": "https://paulmillr.com/funding/"
+			}
+		},
+		"node_modules/svelte-toolbelt": {
+			"version": "0.7.1",
+			"resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.7.1.tgz",
+			"integrity": "sha512-HcBOcR17Vx9bjaOceUvxkY3nGmbBmCBBbuWLLEWO6jtmWH8f/QoWmbyUfQZrpDINH39en1b8mptfPQT9VKQ1xQ==",
+			"funding": [
+				"https://github.com/sponsors/huntabyte"
+			],
+			"dependencies": {
+				"clsx": "^2.1.1",
+				"runed": "^0.23.2",
+				"style-to-object": "^1.0.8"
+			},
+			"engines": {
+				"node": ">=18",
+				"pnpm": ">=8.7.0"
+			},
+			"peerDependencies": {
+				"svelte": "^5.0.0"
+			}
+		},
+		"node_modules/svelte-toolbelt/node_modules/runed": {
+			"version": "0.23.4",
+			"resolved": "https://registry.npmjs.org/runed/-/runed-0.23.4.tgz",
+			"integrity": "sha512-9q8oUiBYeXIDLWNK5DfCWlkL0EW3oGbk845VdKlPeia28l751VpfesaB/+7pI6rnbx1I6rqoZ2fZxptOJLxILA==",
+			"funding": [
+				"https://github.com/sponsors/huntabyte",
+				"https://github.com/sponsors/tglide"
+			],
+			"dependencies": {
+				"esm-env": "^1.0.0"
+			},
+			"peerDependencies": {
+				"svelte": "^5.7.0"
+			}
+		},
+		"node_modules/svelte/node_modules/magic-string": {
+			"version": "0.30.21",
+			"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
+			"integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@jridgewell/sourcemap-codec": "^1.5.5"
+			}
+		},
+		"node_modules/svelte2tsx": {
+			"version": "0.7.62",
+			"resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.62.tgz",
+			"integrity": "sha512-ZXfsmL0jzAs01ho0w5z5LSIC2WgSdpTF0QCwaXLq7oHgho4P9fTgHlLp1pKAx6/xtVYRSW5nGH5ZRpEHZCqliA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"dedent-js": "^1.0.1",
+				"scule": "^1.3.0"
+			},
+			"peerDependencies": {
+				"svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0",
+				"typescript": "^4.9.4 || ^5.0.0 || ^6.0.0"
+			}
+		},
+		"node_modules/tabbable": {
+			"version": "6.5.1",
+			"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.5.1.tgz",
+			"integrity": "sha512-dMCuwDUY6Noz3zVKLefBC4wq+aJV20yc7vWmM7uTNGwtQSFF5kX7OUIUsxuVajz/bdt5Xqdah3/0NLjth+cM5A==",
+			"license": "MIT"
+		},
+		"node_modules/tailwind-merge": {
+			"version": "3.7.0",
+			"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.7.0.tgz",
+			"integrity": "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA==",
+			"license": "MIT",
+			"funding": {
+				"type": "github",
+				"url": "https://github.com/sponsors/dcastil"
+			}
+		},
+		"node_modules/tailwind-variants": {
+			"version": "3.3.1",
+			"resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-3.3.1.tgz",
+			"integrity": "sha512-4pAvwUtM4HKBiRZftncAbpn6V9Hhwoa5Fl7O2u5zbp7Z5Cvu+/o/6+176WY3WCEES209543quG8zFIcXCsc5Jw==",
+			"license": "MIT",
+			"engines": {
+				"node": ">=16.9.x",
+				"pnpm": ">=7.x"
+			},
+			"peerDependencies": {
+				"tailwind-merge": ">=3.0.0",
+				"tailwindcss": "*"
+			},
+			"peerDependenciesMeta": {
+				"tailwind-merge": {
+					"optional": true
+				},
+				"tailwindcss": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/tailwindcss": {
+			"version": "4.3.3",
+			"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz",
+			"integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/tapable": {
+			"version": "2.3.3",
+			"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz",
+			"integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6"
+			},
+			"funding": {
+				"type": "opencollective",
+				"url": "https://opencollective.com/webpack"
+			}
+		},
+		"node_modules/tinybench": {
+			"version": "6.2.2",
+			"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.2.tgz",
+			"integrity": "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=20.0.0"
+			}
+		},
+		"node_modules/tinyexec": {
+			"version": "1.3.1",
+			"resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz",
+			"integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=18"
+			}
+		},
+		"node_modules/tinyglobby": {
+			"version": "0.2.17",
+			"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+			"integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"fdir": "^6.5.0",
+				"picomatch": "^4.0.4"
+			},
+			"engines": {
+				"node": ">=12.0.0"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/SuperchupuDev"
+			}
+		},
+		"node_modules/tinypool": {
+			"version": "2.2.0",
+			"resolved": "https://registry.npmjs.org/tinypool/-/tinypool-2.2.0.tgz",
+			"integrity": "sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": "^20.0.0 || >=22.0.0"
+			}
+		},
+		"node_modules/tinyrainbow": {
+			"version": "3.2.0",
+			"resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz",
+			"integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=14.0.0"
+			}
+		},
+		"node_modules/totalist": {
+			"version": "3.0.1",
+			"resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz",
+			"integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=6"
+			}
+		},
+		"node_modules/tw-animate-css": {
+			"version": "1.4.0",
+			"resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz",
+			"integrity": "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==",
+			"dev": true,
+			"license": "MIT",
+			"funding": {
+				"url": "https://github.com/sponsors/Wombosvideo"
+			}
+		},
+		"node_modules/typescript": {
+			"version": "6.0.3",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
+			"integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
+			"dev": true,
+			"license": "Apache-2.0",
+			"bin": {
+				"tsc": "bin/tsc",
+				"tsserver": "bin/tsserver"
+			},
+			"engines": {
+				"node": ">=14.17"
+			}
+		},
+		"node_modules/undici-types": {
+			"version": "7.24.6",
+			"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
+			"integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
+			"dev": true,
+			"license": "MIT"
+		},
+		"node_modules/vaul-svelte": {
+			"version": "1.0.0-next.7",
+			"resolved": "https://registry.npmjs.org/vaul-svelte/-/vaul-svelte-1.0.0-next.7.tgz",
+			"integrity": "sha512-7zN7Bi3dFQixvvbUJY9uGDe7Ws/dGZeBQR2pXdXmzQiakjrxBvWo0QrmsX3HK+VH+SZOltz378cmgmCS9f9rSg==",
+			"license": "MIT",
+			"dependencies": {
+				"runed": "^0.23.2",
+				"svelte-toolbelt": "^0.7.1"
+			},
+			"engines": {
+				"node": ">=18",
+				"pnpm": ">=8.7.0"
+			},
+			"peerDependencies": {
+				"svelte": "^5.0.0"
+			}
+		},
+		"node_modules/vaul-svelte/node_modules/runed": {
+			"version": "0.23.4",
+			"resolved": "https://registry.npmjs.org/runed/-/runed-0.23.4.tgz",
+			"integrity": "sha512-9q8oUiBYeXIDLWNK5DfCWlkL0EW3oGbk845VdKlPeia28l751VpfesaB/+7pI6rnbx1I6rqoZ2fZxptOJLxILA==",
+			"funding": [
+				"https://github.com/sponsors/huntabyte",
+				"https://github.com/sponsors/tglide"
+			],
+			"dependencies": {
+				"esm-env": "^1.0.0"
+			},
+			"peerDependencies": {
+				"svelte": "^5.7.0"
+			}
+		},
+		"node_modules/vite": {
+			"name": "@voidzero-dev/vite-plus-core",
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/@voidzero-dev/vite-plus-core/-/vite-plus-core-1.3.0.tgz",
+			"integrity": "sha512-Bk/LBwNrxoB8XbGUtGJE3r+U9P4puvdZ6UH36ekygE1J+on/ytwM/yBgQwBnvmX6/MVax+2xxj8wk0N/KkyNeA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@oxc-project/runtime": "=0.154.0",
+				"@oxc-project/types": "=0.154.0",
+				"lightningcss": "^1.33.0",
+				"postcss": "^8.5.29",
+				"yuku-parser": "0.19.0"
+			},
+			"engines": {
+				"node": "^20.19.0 || ^22.18.0 || >=24.11.0"
+			},
+			"optionalDependencies": {
+				"@voidzero-dev/vite-plus-darwin-arm64": "1.3.0",
+				"@voidzero-dev/vite-plus-darwin-x64": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-arm64-gnu": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-arm64-musl": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-x64-gnu": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-x64-musl": "1.3.0",
+				"@voidzero-dev/vite-plus-win32-arm64-msvc": "1.3.0",
+				"@voidzero-dev/vite-plus-win32-x64-msvc": "1.3.0",
+				"fsevents": "~2.3.3"
+			},
+			"peerDependencies": {
+				"@arethetypeswrong/core": "^0.18.1",
+				"@types/node": "^20.19.0 || >=22.12.0",
+				"@typescript/native-preview": "*",
+				"@vitejs/devtools": "^0.7.1",
+				"@volar/typescript": "~2.4.0",
+				"@vue/language-core": "~3.2.0 || ~3.3.0",
+				"esbuild": "^0.27.0 || ^0.28.0",
+				"jiti": ">=1.21.0",
+				"less": "^4.0.0",
+				"publint": "^0.3.8",
+				"sass": "^1.70.0",
+				"sass-embedded": "^1.70.0",
+				"stylus": ">=0.54.8",
+				"sugarss": "^5.0.0",
+				"terser": "^5.16.0",
+				"tsx": "^4.8.1",
+				"typescript": "^5.0.0 || ^6.0.0 || ^7.0.0",
+				"unplugin-unused": ">=0.5.0",
+				"unrun": "*",
+				"vue-tsc": "~3.2.0 || ~3.3.0",
+				"yaml": "^2.4.2"
+			},
+			"peerDependenciesMeta": {
+				"@arethetypeswrong/core": {
+					"optional": true
+				},
+				"@types/node": {
+					"optional": true
+				},
+				"@typescript/native-preview": {
+					"optional": true
+				},
+				"@vitejs/devtools": {
+					"optional": true
+				},
+				"@volar/typescript": {
+					"optional": true
+				},
+				"@vue/language-core": {
+					"optional": true
+				},
+				"esbuild": {
+					"optional": true
+				},
+				"jiti": {
+					"optional": true
+				},
+				"less": {
+					"optional": true
+				},
+				"publint": {
+					"optional": true
+				},
+				"sass": {
+					"optional": true
+				},
+				"sass-embedded": {
+					"optional": true
+				},
+				"stylus": {
+					"optional": true
+				},
+				"sugarss": {
+					"optional": true
+				},
+				"terser": {
+					"optional": true
+				},
+				"tsx": {
+					"optional": true
+				},
+				"typescript": {
+					"optional": true
+				},
+				"unplugin-unused": {
+					"optional": true
+				},
+				"unrun": {
+					"optional": true
+				},
+				"vue-tsc": {
+					"optional": true
+				},
+				"yaml": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/vite-plus": {
+			"version": "1.3.0",
+			"resolved": "https://registry.npmjs.org/vite-plus/-/vite-plus-1.3.0.tgz",
+			"integrity": "sha512-wZGsDeYfPcrCegqgY68pJJHGTpEZdsZvIMH2/mWXkGkBD72UY3M7z24Sv3ZeOL/FrqbbtyqBOfkKO6BvoQ8wMw==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@oxc-project/types": "=0.154.0",
+				"@oxlint/plugins": "=1.88.0",
+				"@vitest/browser": "5.0.5",
+				"@vitest/browser-preview": "5.0.5",
+				"@vitest/mocker": "5.0.5",
+				"@vitest/pretty-format": "5.0.5",
+				"@vitest/snapshot": "5.0.5",
+				"@vitest/spy": "5.0.5",
+				"@vitest/utils": "5.0.5",
+				"oxfmt": "=0.73.0",
+				"oxlint": "=1.88.0",
+				"oxlint-tsgolint": "=7.0.2004",
+				"vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
+				"vitest": "5.0.5"
+			},
+			"bin": {
+				"vp": "bin/vp",
+				"vpr": "bin/vpr"
+			},
+			"engines": {
+				"node": "^22.18.0 || ^24.11.0 || >=26.0.0"
+			},
+			"optionalDependencies": {
+				"@voidzero-dev/vite-plus-darwin-arm64": "1.3.0",
+				"@voidzero-dev/vite-plus-darwin-x64": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-arm64-gnu": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-arm64-musl": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-x64-gnu": "1.3.0",
+				"@voidzero-dev/vite-plus-linux-x64-musl": "1.3.0",
+				"@voidzero-dev/vite-plus-win32-arm64-msvc": "1.3.0",
+				"@voidzero-dev/vite-plus-win32-x64-msvc": "1.3.0"
+			},
+			"peerDependencies": {
+				"@vitest/browser-playwright": "5.0.5",
+				"@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0",
+				"playwright": "*"
+			},
+			"peerDependenciesMeta": {
+				"@vitest/browser-playwright": {
+					"optional": true
+				},
+				"@vitest/browser-webdriverio": {
+					"optional": true
+				},
+				"playwright": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/vitefu": {
+			"version": "1.1.3",
+			"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz",
+			"integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==",
+			"dev": true,
+			"license": "MIT",
+			"workspaces": [
+				"tests/deps/*",
+				"tests/projects/*",
+				"tests/projects/workspace/packages/*"
+			],
+			"peerDependencies": {
+				"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
+			},
+			"peerDependenciesMeta": {
+				"vite": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/vitest": {
+			"version": "5.0.5",
+			"resolved": "https://registry.npmjs.org/vitest/-/vitest-5.0.5.tgz",
+			"integrity": "sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@types/chai": "^5.2.2",
+				"@vitest/mocker": "5.0.5",
+				"chai": "^6.3.0",
+				"es-module-lexer": "^2.3.2",
+				"expect-type": "^1.4.0",
+				"magic-string": "^1.4.3",
+				"obug": "^3.0.0",
+				"picomatch": "^4.0.7",
+				"std-env": "^4.3.0",
+				"tinybench": "^6.2.2",
+				"tinyexec": "^1.3.1",
+				"tinyglobby": "^0.2.17",
+				"why-is-node-running": "3.2.1"
+			},
+			"bin": {
+				"vitest": "vitest.mjs"
+			},
+			"engines": {
+				"node": "^22.12.0 || ^24.0.0 || >=26.0.0"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"@edge-runtime/vm": "*",
+				"@opentelemetry/api": "^1.9.0",
+				"@types/node": "^22.0.0 || >=24.0.0",
+				"@vitest/browser-playwright": "5.0.5",
+				"@vitest/browser-preview": "5.0.5",
+				"@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0",
+				"@vitest/coverage-istanbul": "5.0.5",
+				"@vitest/coverage-v8": "5.0.5",
+				"@vitest/ui": "5.0.5",
+				"happy-dom": "*",
+				"jsdom": "*",
+				"vite": "^6.4.0 || ^7.0.0 || ^8.0.0"
+			},
+			"peerDependenciesMeta": {
+				"@edge-runtime/vm": {
+					"optional": true
+				},
+				"@opentelemetry/api": {
+					"optional": true
+				},
+				"@types/node": {
+					"optional": true
+				},
+				"@vitest/browser-playwright": {
+					"optional": true
+				},
+				"@vitest/browser-preview": {
+					"optional": true
+				},
+				"@vitest/browser-webdriverio": {
+					"optional": true
+				},
+				"@vitest/coverage-istanbul": {
+					"optional": true
+				},
+				"@vitest/coverage-v8": {
+					"optional": true
+				},
+				"@vitest/ui": {
+					"optional": true
+				},
+				"happy-dom": {
+					"optional": true
+				},
+				"jsdom": {
+					"optional": true
+				},
+				"vite": {
+					"optional": false
+				}
+			}
+		},
+		"node_modules/vitest-browser-svelte": {
+			"version": "2.2.1",
+			"resolved": "https://registry.npmjs.org/vitest-browser-svelte/-/vitest-browser-svelte-2.2.1.tgz",
+			"integrity": "sha512-dVjmXuk58eLSloA41Lvz5ALMqWVzK7Gk5TvY5KWFbI8VoEO1nJF1/M498NwJRbxlnjaEZrASd02h+NDS/T9mBA==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@testing-library/svelte-core": "^1.1.3"
+			},
+			"funding": {
+				"url": "https://opencollective.com/vitest"
+			},
+			"peerDependencies": {
+				"svelte": "^3 || ^4 || ^5 || ^5.0.0-next.0",
+				"vitest": "^4.0.0"
+			}
+		},
+		"node_modules/vitest/node_modules/obug": {
+			"version": "3.0.0",
+			"resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz",
+			"integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==",
+			"dev": true,
+			"funding": [
+				"https://github.com/sponsors/sxzz",
+				"https://opencollective.com/debug"
+			],
+			"license": "MIT",
+			"engines": {
+				"node": ">=12.20.0"
+			}
+		},
+		"node_modules/why-is-node-running": {
+			"version": "3.2.1",
+			"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz",
+			"integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==",
+			"dev": true,
+			"license": "MIT",
+			"bin": {
+				"why-is-node-running": "cli.js"
+			},
+			"engines": {
+				"node": ">=20.11"
+			}
+		},
+		"node_modules/ws": {
+			"version": "8.22.0",
+			"resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz",
+			"integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==",
+			"dev": true,
+			"license": "MIT",
+			"engines": {
+				"node": ">=10.0.0"
+			},
+			"peerDependencies": {
+				"bufferutil": "^4.0.1",
+				"utf-8-validate": ">=5.0.2"
+			},
+			"peerDependenciesMeta": {
+				"bufferutil": {
+					"optional": true
+				},
+				"utf-8-validate": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/yuku-core": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/yuku-core/-/yuku-core-0.19.0.tgz",
+			"integrity": "sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@yuku-toolchain/types": "^0.19.0"
+			},
+			"engines": {
+				"node": ">=14.18.0"
+			},
+			"optionalDependencies": {
+				"@yuku-core/binding-android-arm64": "0.19.0",
+				"@yuku-core/binding-darwin-arm64": "0.19.0",
+				"@yuku-core/binding-darwin-x64": "0.19.0",
+				"@yuku-core/binding-freebsd-x64": "0.19.0",
+				"@yuku-core/binding-linux-arm-gnu": "0.19.0",
+				"@yuku-core/binding-linux-arm-musl": "0.19.0",
+				"@yuku-core/binding-linux-arm64-gnu": "0.19.0",
+				"@yuku-core/binding-linux-arm64-musl": "0.19.0",
+				"@yuku-core/binding-linux-x64-gnu": "0.19.0",
+				"@yuku-core/binding-linux-x64-musl": "0.19.0",
+				"@yuku-core/binding-win32-arm64": "0.19.0",
+				"@yuku-core/binding-win32-x64": "0.19.0"
+			}
+		},
+		"node_modules/yuku-parser": {
+			"version": "0.19.0",
+			"resolved": "https://registry.npmjs.org/yuku-parser/-/yuku-parser-0.19.0.tgz",
+			"integrity": "sha512-XrBh9ZiQK5mJVRxZBAvD6LwRyAYrK3MFtH3+onyuxFL5hFD44EC3QOmIC1FjTj6H2MMwq46/NAI+NZxLZPZgxg==",
+			"dev": true,
+			"license": "MIT",
+			"dependencies": {
+				"@yuku-toolchain/types": "^0.19.0",
+				"yuku-core": "0.19.0"
+			},
+			"engines": {
+				"node": ">=14.18.0"
+			}
+		},
+		"node_modules/zimmerframe": {
+			"version": "1.1.5",
+			"resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.5.tgz",
+			"integrity": "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==",
+			"dev": true,
+			"license": "MIT"
+		}
+	}
+}
diff --git a/ui/lib/ui/package.json b/ui/lib/ui/package.json
new file mode 100644
index 000000000..f29f6d109
--- /dev/null
+++ b/ui/lib/ui/package.json
@@ -0,0 +1,122 @@
+{
+	"name": "@ggml-org/llama-ui",
+	"version": "0.3.0",
+	"description": "Shared UI library for llama.cpp frontend apps.",
+	"license": "MIT",
+	"repository": {
+		"type": "git",
+		"url": "git+https://github.com/ggml-org/llama.cpp.git",
+		"directory": "ui/lib/ui"
+	},
+	"homepage": "https://github.com/ggml-org/llama.cpp/tree/master/ui/lib/ui",
+	"files": [
+		"dist",
+		"!dist/**/*.test.*",
+		"!dist/**/*.spec.*",
+		"!dist/**/*.stories.*"
+	],
+	"type": "module",
+	"sideEffects": [
+		"**/*.css"
+	],
+	"types": "./dist/index.d.ts",
+	"svelte": "./dist/index.js",
+	"imports": {
+		"#lib": "./src/lib/index.js",
+		"#lib/*": "./src/lib/*"
+	},
+	"exports": {
+		".": {
+			"types": "./dist/index.d.ts",
+			"svelte": "./dist/index.js"
+		},
+		"./ui/*": {
+			"types": "./dist/components/ui/*/index.d.ts",
+			"svelte": "./dist/components/ui/*/index.js"
+		},
+		"./app/*": {
+			"types": "./dist/components/app/*/index.d.ts",
+			"svelte": "./dist/components/app/*/index.js"
+		},
+		"./constants": {
+			"types": "./dist/constants/index.d.ts",
+			"svelte": "./dist/constants/index.js"
+		},
+		"./enums": {
+			"types": "./dist/enums/index.d.ts",
+			"svelte": "./dist/enums/index.js"
+		},
+		"./code": {
+			"types": "./dist/utils/index.d.ts",
+			"svelte": "./dist/utils/index.js"
+		},
+		"./models": {
+			"types": "./dist/components/models/index.d.ts",
+			"svelte": "./dist/components/models/index.js"
+		},
+		"./utils": {
+			"types": "./dist/components/ui/utils.d.ts",
+			"svelte": "./dist/components/ui/utils.js"
+		},
+		"./styles/*": "./dist/styles/*",
+		"./theme.css": "./dist/styles/theme.css",
+		"./tokens.css": "./dist/styles/tokens.css",
+		"./fonts.css": "./dist/styles/fonts.css",
+		"./surfaces.css": "./dist/styles/surfaces.css"
+	},
+	"scripts": {
+		"dev": "vp dev",
+		"build": "vp build && npm run prepack",
+		"preview": "vp preview",
+		"prepare": "svelte-kit sync || echo ''",
+		"prepack": "svelte-kit sync && svelte-package && publint",
+		"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+		"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
+		"test:unit": "vp test",
+		"test": "npm run test:unit -- --run",
+		"watch:package": "svelte-kit sync && svelte-package -w"
+	},
+	"devDependencies": {
+		"@sveltejs/adapter-auto": "^8.0.0",
+		"@sveltejs/kit": "^3.0.0",
+		"@sveltejs/package": "^2.5.8",
+		"@sveltejs/vite-plugin-svelte": "^7.2.0",
+		"@tailwindcss/vite": "^4.3.3",
+		"@types/node": "^24",
+		"@vitest/browser-playwright": "5.0.5",
+		"@vitest/coverage-v8": "5.0.5",
+		"mode-watcher": "^1.1.0",
+		"playwright": "^1.60.0",
+		"publint": "^0.3.21",
+		"svelte": "^5.57.1",
+		"svelte-check": "^4.6.0",
+		"tailwindcss": "^4.3.3",
+		"tw-animate-css": "1.4.0",
+		"typescript": "^6.0.3",
+		"vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
+		"vite-plus": "1.3.0",
+		"vitest": "5.0.5",
+		"vitest-browser-svelte": "^2.1.1"
+	},
+	"peerDependencies": {
+		"mode-watcher": "^1.1.0",
+		"svelte": "^5.0.0",
+		"tailwindcss": "^4.1.0",
+		"tw-animate-css": "^1.4.0"
+	},
+	"overrides": {
+		"vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
+		"vitest": "5.0.5"
+	},
+	"dependencies": {
+		"@internationalized/date": "^3.12.4",
+		"@lucide/svelte": "1.46.0",
+		"bits-ui": "2.18.1",
+		"clsx": "^2.1.1",
+		"highlight.js": "^11.11.1",
+		"@ggml-org/llama-brand": "https://codeload.github.com/ggml-org/llama-brand/tar.gz/f05540643c1ca2a18d732ed6491c839686da9a3a",
+		"tailwind-merge": "^3.7.0",
+		"tailwind-variants": "^3.3.1",
+		"vaul-svelte": "1.0.0-next.7"
+	}
+}
diff --git a/ui/lib/ui/src/app.css b/ui/lib/ui/src/app.css
new file mode 100644
index 000000000..91f24fcf2
--- /dev/null
+++ b/ui/lib/ui/src/app.css
@@ -0,0 +1,7 @@
+@import 'tailwindcss';
+@import 'tw-animate-css';
+@import '@ggml-org/llama-brand/css/colors.css';
+@import './lib/styles/theme.css';
+
+/* stories may use classes the components do not, so tailwind scans them too */
+@source '../tests';
diff --git a/ui/lib/ui/src/app.d.ts b/ui/lib/ui/src/app.d.ts
new file mode 100644
index 000000000..520c4217a
--- /dev/null
+++ b/ui/lib/ui/src/app.d.ts
@@ -0,0 +1,13 @@
+// See https://svelte.dev/docs/kit/types#app.d.ts
+// for information about these interfaces
+declare global {
+  namespace App {
+    // interface Error {}
+    // interface Locals {}
+    // interface PageData {}
+    // interface PageState {}
+    // interface Platform {}
+  }
+}
+
+export {};
diff --git a/ui/lib/ui/src/app.html b/ui/lib/ui/src/app.html
new file mode 100644
index 000000000..49fe65eec
--- /dev/null
+++ b/ui/lib/ui/src/app.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <link rel="icon" href="%sveltekit.assets%/favicon.svg" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="text-scale" content="scale" />
+    %sveltekit.head%
+  </head>
+  <body data-sveltekit-preload-data="hover">
+    <div style="display: contents">%sveltekit.body%</div>
+  </body>
+</html>
diff --git a/ui/lib/ui/src/lib/assets/fonts/LlamaMono.woff2 b/ui/lib/ui/src/lib/assets/fonts/LlamaMono.woff2
new file mode 100644
index 000000000..c8cd45657
Binary files /dev/null and b/ui/lib/ui/src/lib/assets/fonts/LlamaMono.woff2 differ
diff --git a/ui/lib/ui/src/lib/assets/fonts/LlamaSans.woff2 b/ui/lib/ui/src/lib/assets/fonts/LlamaSans.woff2
new file mode 100644
index 000000000..936d1c1d1
Binary files /dev/null and b/ui/lib/ui/src/lib/assets/fonts/LlamaSans.woff2 differ
diff --git a/ui/lib/ui/src/lib/assets/fonts/OFL.txt b/ui/lib/ui/src/lib/assets/fonts/OFL.txt
new file mode 100644
index 000000000..04e95fc55
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/fonts/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
\ No newline at end of file
diff --git a/ui/lib/ui/src/lib/assets/hf-logo.svg b/ui/lib/ui/src/lib/assets/hf-logo.svg
new file mode 100644
index 000000000..d55ea22a2
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/hf-logo.svg
@@ -0,0 +1,8 @@
+<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M230.721 172.7C230.183 170.673 229.313 168.75 228.146 167.008C228.396 166.091 228.587 165.159 228.714 164.217C229.543 158.241 227.471 152.77 223.567 148.537C221.452 146.225 219.185 144.698 216.784 143.761C218.36 137.018 219.157 130.117 219.161 123.193C219.161 120.03 218.982 116.932 218.682 113.88C218.526 112.356 218.337 110.836 218.115 109.32C217.428 104.847 216.408 100.431 215.064 96.11C214.183 93.2707 213.164 90.476 212.01 87.736C210.281 83.6782 208.262 79.75 205.969 75.982C204.465 73.475 202.827 71.0508 201.062 68.72C200.197 67.543 199.296 66.3938 198.358 65.274C195.58 61.898 192.561 58.7277 189.325 55.788C188.25 54.7997 187.145 53.8453 186.01 52.926C184.893 51.9943 183.751 51.0927 182.586 50.222C180.241 48.4766 177.818 46.8392 175.324 45.315C161.543 36.945 145.382 32.145 128.109 32.145C77.817 32.145 37.057 72.907 37.057 123.196C37.055 130.208 37.867 137.196 39.477 144.02C37.317 144.958 35.247 146.42 33.327 148.535C29.424 152.766 27.351 158.217 28.18 164.193C28.306 165.142 28.495 166.082 28.747 167.006C27.5811 168.749 26.7117 170.673 26.174 172.7C24.974 177.261 25.369 181.374 26.894 184.978C25.236 189.688 25.65 194.704 27.809 199.065C29.379 202.25 31.626 204.714 34.396 206.916C37.689 209.534 41.811 211.758 46.783 213.892C52.715 216.422 59.956 218.799 63.249 219.671C71.755 221.873 79.911 223.269 88.177 223.337C99.954 223.446 110.096 220.677 117.357 213.59C120.924 214.027 124.515 214.246 128.109 214.244C131.906 214.236 135.699 213.997 139.467 213.529C146.711 220.661 156.892 223.455 168.712 223.343C176.977 223.277 185.133 221.881 193.617 219.676C196.932 218.804 204.17 216.427 210.105 213.897C215.077 211.76 219.199 209.536 222.514 206.922C225.263 204.719 227.508 202.256 229.079 199.071C231.26 194.709 231.652 189.693 230.017 184.983C231.527 181.379 231.92 177.257 230.721 172.7ZM222.281 184.673C223.952 187.844 224.059 191.427 222.585 194.764C220.349 199.821 214.795 203.805 204.008 208.082C197.3 210.742 191.158 212.443 191.104 212.458C182.232 214.759 174.208 215.928 167.262 215.928C155.76 215.928 147.201 212.754 141.773 206.486C132.594 208.05 123.222 208.103 114.026 206.644C108.591 212.808 100.081 215.928 88.676 215.928C81.729 215.928 73.706 214.759 64.833 212.458C64.779 212.443 58.639 210.742 51.929 208.082C41.143 203.805 35.587 199.824 33.352 194.764C31.878 191.427 31.985 187.844 33.656 184.673C33.81 184.378 33.976 184.091 34.153 183.813C33.1516 182.309 32.4799 180.61 32.182 178.827C31.8842 177.045 31.967 175.22 32.425 173.472C33.089 170.949 34.46 168.851 36.322 167.344C35.425 165.87 34.8365 164.23 34.592 162.522C34.056 158.808 35.289 155.1 38.062 152.076C40.222 149.723 43.275 148.428 46.655 148.428H46.745C44.1965 140.259 42.9044 131.75 42.913 123.193C42.913 76.522 80.749 38.683 127.427 38.683C174.104 38.683 211.94 76.518 211.94 123.193C211.947 131.773 210.646 140.304 208.081 148.492C208.489 148.452 208.889 148.432 209.282 148.431C212.662 148.431 215.716 149.726 217.874 152.079C220.647 155.1 221.881 158.811 221.344 162.525C221.1 164.233 220.511 165.873 219.615 167.347C221.477 168.854 222.849 170.952 223.512 173.475C223.97 175.223 224.053 177.048 223.755 178.831C223.458 180.613 222.786 182.312 221.784 183.816C221.961 184.091 222.129 184.378 222.281 184.673Z" fill="white"/>
+<path d="M221.784 183.816C222.786 182.312 223.458 180.613 223.756 178.831C224.053 177.048 223.97 175.223 223.512 173.475C222.848 170.952 221.476 168.854 219.615 167.347C220.512 165.873 221.1 164.233 221.344 162.525C221.881 158.811 220.648 155.103 217.874 152.079C215.716 149.726 212.662 148.431 209.282 148.431C208.889 148.431 208.489 148.452 208.081 148.492C210.643 140.304 211.942 131.774 211.933 123.195C211.933 76.5231 174.097 38.6851 127.424 38.6851C80.75 38.6851 42.9099 76.5191 42.9099 123.195C42.9015 131.752 44.1936 140.261 46.742 148.43H46.6519C43.2719 148.43 40.219 149.724 38.06 152.077C35.287 155.098 34.0529 158.81 34.5899 162.523C34.8346 164.231 35.4231 165.872 36.3199 167.346C34.4579 168.852 33.086 170.95 32.422 173.473C31.9642 175.222 31.8817 177.047 32.1799 178.83C32.4781 180.612 33.1501 182.312 34.1519 183.816C33.9739 184.094 33.8099 184.381 33.6549 184.676C31.9849 187.847 31.877 191.43 33.352 194.767C35.588 199.824 41.1419 203.808 51.9289 208.085C58.6359 210.745 64.779 212.446 64.833 212.461C73.705 214.762 81.729 215.931 88.675 215.931C100.081 215.931 108.591 212.811 114.026 206.647C123.222 208.106 132.594 208.052 141.773 206.489C147.201 212.757 155.76 215.931 167.262 215.931C174.208 215.931 182.232 214.762 191.103 212.461C191.158 212.446 197.298 210.745 204.008 208.085C214.795 203.808 220.35 199.824 222.585 194.767C224.059 191.43 223.952 187.847 222.281 184.676C222.129 184.379 221.961 184.091 221.784 183.816ZM110.137 196.997C109.669 197.815 109.168 198.614 108.635 199.391C107.23 201.448 105.382 203.02 103.237 204.188C99.1369 206.424 93.947 207.205 88.675 207.205C80.346 207.205 71.808 205.256 67.023 204.015C66.787 203.954 37.689 195.735 41.373 188.739C41.993 187.562 43.0129 187.092 44.2979 187.092C49.4849 187.092 58.9299 194.816 62.9889 194.816C63.8959 194.816 64.5359 194.43 64.7969 193.488C66.5269 187.284 38.5039 184.676 40.8639 175.692C41.2799 174.102 42.41 173.456 43.998 173.456C50.856 173.455 66.248 185.516 69.467 185.516C69.714 185.516 69.8909 185.443 69.9869 185.291C70.0009 185.268 70.015 185.246 70.028 185.222C71.539 182.727 70.6719 180.913 60.3209 174.573L59.3269 173.968C47.9359 167.074 39.9409 162.925 44.4879 157.975C45.0109 157.404 45.7529 157.151 46.6539 157.151C47.7219 157.151 49.0149 157.508 50.4389 158.108C56.4549 160.645 64.793 167.564 68.276 170.581C68.8239 171.057 69.3683 171.538 69.9089 172.022C69.9089 172.022 74.319 176.608 76.985 176.608C77.599 176.608 78.1199 176.366 78.4729 175.768C80.364 172.58 60.9099 157.838 59.8129 151.755C59.0689 147.634 60.3349 145.546 62.6749 145.546C63.7879 145.546 65.1459 146.02 66.6449 146.971C71.2949 149.922 80.2729 165.35 83.5599 171.352C84.6619 173.363 86.5429 174.213 88.2379 174.213C91.6009 174.213 94.2299 170.87 88.5459 166.622C80.0029 160.23 83.001 149.782 87.078 149.139C87.252 149.111 87.4279 149.097 87.6029 149.097C91.3109 149.097 92.9459 155.486 92.9459 155.486C92.9459 155.486 97.7399 167.524 105.975 175.753C113.447 183.222 114.491 189.351 110.137 196.997ZM136.766 198.407L136.339 198.458L135.611 198.541C135.228 198.581 134.844 198.619 134.459 198.654L134.084 198.688L133.741 198.717L133.255 198.756L132.718 198.795L132.182 198.83L132.063 198.838C131.923 198.846 131.783 198.855 131.641 198.862L131.462 198.872C131.296 198.881 131.13 198.889 130.962 198.896L130.381 198.921L129.854 198.939L129.502 198.949H129.323C129.213 198.949 129.104 198.955 128.994 198.956H128.82C128.71 198.956 128.601 198.956 128.491 198.961L128.043 198.967H127.418C126.927 198.967 126.437 198.962 125.949 198.952L125.553 198.943C125.44 198.943 125.327 198.938 125.216 198.934L124.796 198.922L124.275 198.902L123.805 198.881L123.684 198.876L123.237 198.853C123.112 198.846 122.989 198.84 122.865 198.831L122.576 198.814C122.213 198.791 121.85 198.766 121.487 198.738L121.107 198.707C120.947 198.695 120.787 198.68 120.628 198.666C120.441 198.65 120.254 198.632 120.067 198.614C119.754 198.585 119.441 198.553 119.128 198.519H119.113C123.683 188.324 121.372 178.802 112.137 169.575C106.08 163.526 102.051 154.594 101.215 152.633C99.5229 146.828 95.045 140.375 87.608 140.375C86.979 140.375 86.351 140.425 85.73 140.523C82.472 141.036 79.624 142.911 77.592 145.733C75.396 143.002 73.262 140.831 71.332 139.605C68.422 137.76 65.5179 136.824 62.6889 136.824C59.1579 136.824 56.0019 138.274 53.8019 140.904L53.7459 140.971C53.7039 140.798 53.6639 140.625 53.6229 140.451L53.6179 140.428C53.1992 138.638 52.8477 136.833 52.5639 135.016C52.5639 135.004 52.5639 134.992 52.5579 134.98C52.5359 134.843 52.5159 134.705 52.4949 134.568C52.4334 134.162 52.3757 133.755 52.3219 133.348C52.2979 133.163 52.2719 132.978 52.2489 132.793L52.1809 132.238C52.1589 132.053 52.1409 131.885 52.1209 131.709L52.115 131.665C52.0351 130.945 51.9651 130.225 51.9049 129.503L51.8829 129.226L51.8479 128.754C51.8379 128.625 51.8279 128.495 51.8209 128.365C51.8209 128.334 51.8159 128.304 51.8149 128.275C51.7895 127.913 51.7678 127.55 51.7499 127.187C51.7399 126.998 51.7299 126.81 51.7219 126.62L51.7019 126.124L51.6969 125.974L51.6809 125.517L51.6709 125.128C51.6709 124.973 51.6629 124.818 51.6609 124.663C51.6579 124.508 51.6539 124.338 51.6529 124.174C51.6509 124.01 51.6529 123.848 51.6479 123.685C51.6439 123.521 51.6479 123.358 51.6479 123.195C51.6479 81.3421 85.5789 47.4111 127.436 47.4111C169.292 47.4111 203.222 81.3411 203.222 123.195V124.174C203.222 124.337 203.217 124.501 203.214 124.663C203.214 124.798 203.208 124.931 203.204 125.068C203.204 125.188 203.199 125.309 203.195 125.425C203.195 125.578 203.186 125.731 203.181 125.884V125.896L203.16 126.427C203.153 126.582 203.147 126.738 203.139 126.893L203.134 127.003L203.107 127.499C203.048 128.562 202.967 129.623 202.866 130.683V130.696C202.849 130.87 202.832 131.044 202.813 131.218L202.768 131.629L202.679 132.433L202.628 132.84L202.565 133.319C202.542 133.493 202.519 133.668 202.493 133.841C202.467 134.036 202.438 134.23 202.409 134.424L202.34 134.883L202.258 135.403C202.23 135.576 202.2 135.748 202.168 135.92C202.135 136.093 202.109 136.265 202.079 136.437C202.019 136.781 201.956 137.125 201.89 137.468C201.789 137.981 201.686 138.493 201.58 139.005L201.47 139.512C201.434 139.681 201.395 139.851 201.357 140.02C199.224 137.947 196.399 136.818 193.284 136.818C190.457 136.818 187.55 137.753 184.641 139.598C182.711 140.824 180.578 142.996 178.381 145.726C176.346 142.904 173.498 141.029 170.242 140.516C169.621 140.418 168.993 140.368 168.364 140.368C160.925 140.368 156.45 146.821 154.757 152.626C153.917 154.587 149.887 163.519 143.825 169.577C134.596 178.775 132.268 188.254 136.766 198.407ZM215.007 177.998L214.977 178.087C214.901 178.288 214.813 178.484 214.714 178.674C214.639 178.814 214.558 178.95 214.47 179.082C214.303 179.331 214.12 179.569 213.921 179.793C213.875 179.845 213.831 179.897 213.779 179.948C213.707 180.025 213.634 180.101 213.559 180.175C212.213 181.509 210.161 182.679 207.841 183.752C207.578 183.871 207.311 183.99 207.042 184.11L206.774 184.229C206.595 184.308 206.416 184.386 206.228 184.463C206.049 184.541 205.863 184.619 205.677 184.695L205.119 184.925C203.814 185.462 202.477 185.974 201.173 186.479L200.615 186.696L200.064 186.912C199.697 187.055 199.335 187.198 198.979 187.341L198.448 187.555L197.926 187.768L197.67 187.876C197.499 187.947 197.332 188.018 197.165 188.089C193.328 189.736 190.567 191.411 191.147 193.489C191.163 193.548 191.181 193.604 191.201 193.659C191.253 193.813 191.324 193.958 191.413 194.095C191.465 194.176 191.525 194.253 191.592 194.323C192.274 195.032 193.515 194.92 195.08 194.357C195.3 194.276 195.519 194.192 195.736 194.104L195.872 194.048C196.23 193.896 196.609 193.726 196.996 193.542C197.093 193.496 197.191 193.452 197.289 193.401C199.203 192.465 201.372 191.205 203.524 190.058C204.385 189.593 205.258 189.152 206.142 188.733C208.18 187.774 210.096 187.094 211.636 187.094C212.359 187.094 212.997 187.242 213.529 187.582L213.618 187.641C213.952 187.876 214.232 188.178 214.441 188.528C214.482 188.595 214.522 188.666 214.561 188.739C215.322 190.184 214.685 191.68 213.194 193.147C211.763 194.556 209.537 195.937 207.007 197.215C206.819 197.31 206.631 197.405 206.44 197.498C198.91 201.196 189.049 203.981 188.912 204.016C186.284 204.697 182.526 205.591 178.292 206.26L177.666 206.358L177.563 206.373C177.089 206.445 176.614 206.512 176.138 206.574C175.655 206.639 175.167 206.698 174.676 206.753L174.586 206.763C172.806 206.968 171.019 207.104 169.228 207.169H169.202C168.554 207.192 167.907 207.204 167.259 207.204H166.512C165.524 207.191 164.538 207.146 163.553 207.07C163.53 207.07 163.505 207.07 163.482 207.064C163.129 207.037 162.777 207.004 162.425 206.965C162.06 206.926 161.696 206.882 161.333 206.833C161.094 206.801 160.856 206.765 160.618 206.726C160.376 206.687 160.134 206.647 159.893 206.605L159.564 206.543L159.539 206.538C159.192 206.472 158.847 206.399 158.503 206.319C158.303 206.274 158.104 206.23 157.907 206.176L157.788 206.146C157.69 206.122 157.595 206.096 157.498 206.07L157.445 206.056L157.137 205.966C157.025 205.935 156.913 205.901 156.801 205.868L156.762 205.857L156.471 205.768C156.361 205.734 156.251 205.698 156.142 205.662L155.874 205.573L155.677 205.504C155.487 205.437 155.298 205.368 155.111 205.296L154.933 205.226L154.786 205.168C154.502 205.054 154.22 204.935 153.941 204.81L153.756 204.72L153.725 204.706C153.659 204.675 153.594 204.644 153.528 204.617C153.399 204.555 153.271 204.491 153.144 204.426L153.105 204.407L152.921 204.31C152.594 204.139 152.274 203.957 151.96 203.764L151.788 203.658C151.702 203.605 151.616 203.55 151.532 203.494L151.308 203.346L151.067 203.18L150.923 203.077C150.771 202.969 150.622 202.857 150.476 202.742L150.243 202.563C150.15 202.488 150.058 202.412 149.967 202.335C149.89 202.272 149.815 202.206 149.74 202.14L149.734 202.135C149.653 202.064 149.574 201.993 149.495 201.92C149.417 201.849 149.339 201.777 149.263 201.704L149.254 201.695C149.174 201.619 149.096 201.542 149.019 201.463C148.942 201.385 148.863 201.307 148.788 201.227C148.713 201.148 148.636 201.067 148.562 200.984C148.488 200.902 148.42 200.827 148.35 200.746L148.327 200.719C148.259 200.641 148.192 200.562 148.126 200.481C147.983 200.31 147.844 200.135 147.71 199.956C147.575 199.776 147.443 199.592 147.314 199.405L147.191 199.221C147.027 198.981 146.867 198.739 146.712 198.493C146.596 198.316 146.483 198.138 146.373 197.957C146.302 197.844 146.234 197.73 146.166 197.618L146.138 197.572C146.073 197.462 146.009 197.354 145.947 197.245C145.911 197.186 145.877 197.127 145.845 197.066C145.812 197.004 145.774 196.941 145.739 196.878L145.682 196.779L145.647 196.715C145.58 196.595 145.514 196.474 145.45 196.352C145.42 196.298 145.391 196.244 145.36 196.192L145.271 196.019L145.181 195.848C144.956 195.398 144.743 194.942 144.543 194.48L144.472 194.311C144.426 194.198 144.383 194.086 144.337 193.975C144.315 193.921 144.293 193.868 144.274 193.814C144.167 193.537 144.067 193.257 143.975 192.975C143.942 192.874 143.91 192.775 143.88 192.675C143.808 192.448 143.743 192.219 143.685 191.988C143.614 191.719 143.551 191.448 143.498 191.175C143.487 191.12 143.476 191.065 143.467 191.012C143.415 190.745 143.373 190.476 143.34 190.206C143.332 190.153 143.326 190.1 143.32 190.047L143.303 189.885C143.281 189.673 143.264 189.46 143.254 189.247C143.254 189.193 143.249 189.139 143.247 189.087C143.242 188.981 143.24 188.875 143.239 188.769C143.183 184.496 145.345 180.388 149.968 175.767C158.203 167.54 162.997 155.501 162.997 155.501C162.997 155.501 163.126 154.996 163.394 154.269C163.431 154.168 163.47 154.064 163.514 153.955C163.67 153.548 163.846 153.148 164.041 152.758L164.08 152.683C164.246 152.351 164.428 152.027 164.624 151.712C164.67 151.639 164.714 151.567 164.765 151.494C164.912 151.277 165.067 151.065 165.23 150.86C165.319 150.749 165.416 150.639 165.513 150.532C165.552 150.49 165.59 150.448 165.631 150.408C166.108 149.915 166.653 149.513 167.27 149.299L167.348 149.273C167.4 149.256 167.452 149.24 167.505 149.225C167.566 149.209 167.627 149.195 167.69 149.182L167.719 149.176C167.849 149.15 167.981 149.133 168.114 149.124H168.125C168.194 149.124 168.264 149.117 168.335 149.117C168.424 149.117 168.507 149.117 168.594 149.126C168.684 149.134 168.773 149.144 168.863 149.158C169.605 149.276 170.311 149.718 170.919 150.4C171.15 150.66 171.358 150.94 171.54 151.236C171.66 151.428 171.773 151.631 171.88 151.845C171.923 151.934 171.964 152.016 172.004 152.104C172.108 152.33 172.202 152.56 172.284 152.795C172.479 153.345 172.626 153.911 172.723 154.487C172.807 154.992 172.857 155.502 172.873 156.013C172.881 156.286 172.881 156.563 172.873 156.842C172.819 158.14 172.553 159.421 172.086 160.634C172.044 160.745 171.997 160.857 171.952 160.969C171.86 161.195 171.759 161.417 171.65 161.634C171.569 161.799 171.484 161.965 171.392 162.13C171.332 162.24 171.269 162.35 171.206 162.46C171.045 162.734 170.871 163.006 170.684 163.277L170.571 163.439C170.129 164.055 169.637 164.633 169.099 165.167C168.569 165.698 168.001 166.189 167.4 166.637C166.798 167.083 166.233 167.577 165.711 168.114C164.208 169.691 163.858 171.083 164.196 172.138C164.25 172.304 164.321 172.465 164.407 172.617C164.508 172.791 164.628 172.951 164.764 173.097L164.817 173.152L164.871 173.206C164.925 173.258 164.982 173.309 165.043 173.359L165.103 173.407C165.248 173.519 165.402 173.619 165.563 173.707C165.61 173.732 165.652 173.757 165.705 173.781C165.879 173.866 166.058 173.939 166.242 173.998C166.293 174.015 166.344 174.03 166.396 174.046L166.461 174.063L166.551 174.087L166.628 174.106L166.712 174.124L166.795 174.141L166.874 174.154C166.932 174.164 166.992 174.174 167.052 174.181L167.109 174.19L167.213 174.2L167.277 174.207L167.382 174.214H167.444L167.554 174.22H167.9L167.999 174.214L168.113 174.207L168.252 174.194L168.382 174.179C168.412 174.179 168.442 174.171 168.472 174.165C168.872 174.107 169.264 174.001 169.639 173.849L169.798 173.782C169.887 173.743 169.977 173.702 170.059 173.658C170.235 173.57 170.406 173.47 170.57 173.361C170.799 173.211 171.015 173.043 171.217 172.858C171.265 172.815 171.312 172.769 171.358 172.725C171.381 172.703 171.403 172.682 171.425 172.658C171.469 172.613 171.514 172.569 171.558 172.52C171.878 172.168 172.155 171.78 172.383 171.363C174.34 167.804 176.391 164.298 178.534 160.849L178.828 160.378L179.125 159.907C179.273 159.668 179.423 159.433 179.572 159.199L179.722 158.965C180.22 158.185 180.726 157.41 181.241 156.641L181.546 156.185C182.158 155.278 182.768 154.396 183.373 153.558L183.674 153.143C184.332 152.236 185.017 151.348 185.728 150.482L186.01 150.144C186.057 150.088 186.1 150.032 186.151 149.978C186.244 149.868 186.337 149.761 186.428 149.657C186.474 149.604 186.517 149.552 186.566 149.5L186.834 149.198L186.968 149.051C187.103 148.906 187.235 148.767 187.365 148.634C187.455 148.544 187.538 148.455 187.624 148.371C188.131 147.853 188.69 147.388 189.293 146.985L189.433 146.895C189.567 146.805 189.706 146.721 189.848 146.645C192.212 145.303 194.169 145.204 195.296 146.331C195.978 147.013 196.356 148.144 196.335 149.718C196.335 149.787 196.335 149.857 196.33 149.929V150.006C196.33 150.078 196.324 150.15 196.318 150.223C196.318 150.313 196.308 150.402 196.299 150.492C196.29 150.581 196.285 150.649 196.276 150.729C196.276 150.751 196.272 150.774 196.268 150.798C196.262 150.867 196.253 150.938 196.243 151.009C196.243 151.03 196.243 151.052 196.235 151.074C196.224 151.169 196.21 151.263 196.194 151.357C196.183 151.447 196.168 151.531 196.152 151.619L196.126 151.768C196.1 151.91 196.067 152.05 196.026 152.188C195.948 152.447 195.854 152.7 195.743 152.946C195.588 153.284 195.417 153.613 195.229 153.933C195.125 154.111 195.018 154.286 194.907 154.459C194.793 154.638 194.673 154.819 194.549 155.002C194.233 155.454 193.905 155.897 193.564 156.33L193.408 156.527C192.852 157.22 192.278 157.899 191.686 158.562L191.499 158.772C191.247 159.053 190.991 159.336 190.729 159.62L190.532 159.834C190.401 159.977 190.264 160.12 190.132 160.264C190.001 160.407 189.864 160.552 189.726 160.697L189.315 161.13L188.898 161.566L188.478 162.002C188.196 162.294 187.913 162.586 187.628 162.878C183.573 167.037 179.301 171.182 177.855 173.766C177.758 173.934 177.671 174.108 177.593 174.285C177.387 174.755 177.301 175.157 177.36 175.482C177.379 175.589 177.416 175.691 177.471 175.785C177.552 175.926 177.651 176.056 177.766 176.172C177.819 176.224 177.875 176.272 177.934 176.316C178.232 176.528 178.591 176.637 178.957 176.627H179.071L179.188 176.618L179.305 176.605L179.402 176.591C179.415 176.589 179.429 176.587 179.442 176.583L179.531 176.566L179.554 176.561L179.653 176.54L179.688 176.531C179.723 176.522 179.757 176.513 179.792 176.503C179.827 176.493 179.875 176.48 179.917 176.466C180.093 176.413 180.265 176.35 180.434 176.278C180.523 176.242 180.61 176.203 180.696 176.161C180.741 176.141 180.786 176.12 180.828 176.098L180.962 176.032C181.282 175.866 181.594 175.685 181.898 175.491L182.031 175.401C182.076 175.373 182.121 175.344 182.164 175.312L182.297 175.223L182.368 175.174L182.56 175.039C182.739 174.916 182.906 174.789 183.075 174.66L183.09 174.648L183.359 174.44C183.726 174.15 184.074 173.858 184.39 173.583L184.6 173.399L184.619 173.381L184.729 173.284C184.987 173.052 185.217 172.836 185.408 172.658L185.487 172.581C185.556 172.516 185.619 172.455 185.676 172.403L185.788 172.292L185.828 172.253L185.839 172.242L185.956 172.125L186.03 172.048L186.039 172.041L186.074 172.009L186.118 171.969L186.132 171.956L186.169 171.922L186.373 171.743L186.487 171.641C186.548 171.588 186.607 171.534 186.666 171.479L186.802 171.358C186.827 171.338 186.851 171.316 186.876 171.294L187.019 171.169L187.229 170.984L187.341 170.887C187.776 170.509 188.305 170.052 188.913 169.537L189.162 169.326L189.573 168.981L189.994 168.63C190.544 168.173 191.136 167.688 191.762 167.185L192.173 166.855C192.523 166.576 192.882 166.292 193.246 166.006C193.393 165.891 193.542 165.776 193.694 165.662C194.066 165.373 194.44 165.086 194.817 164.803C195.675 164.155 196.56 163.506 197.456 162.874L197.84 162.606C198.109 162.421 198.377 162.235 198.645 162.054L198.888 161.89C199.367 161.565 199.853 161.248 200.343 160.939L200.586 160.786L200.827 160.636C201.069 160.486 201.309 160.339 201.548 160.196L201.787 160.053L202.265 159.775L202.734 159.506L202.829 159.454L203.2 159.25C203.355 159.166 203.509 159.085 203.663 159.006L203.892 158.888L204.115 158.776C204.193 158.739 204.27 158.7 204.346 158.663C204.848 158.415 205.36 158.187 205.88 157.979C206.021 157.919 206.161 157.865 206.3 157.818L206.71 157.674C206.833 157.633 206.953 157.594 207.068 157.559L207.108 157.547C207.17 157.527 207.232 157.509 207.293 157.493L207.311 157.488C207.439 157.451 207.566 157.419 207.691 157.389H207.7C208.054 157.304 208.414 157.243 208.777 157.206C208.944 157.189 209.111 157.18 209.279 157.181H209.363C209.475 157.181 209.583 157.188 209.69 157.199C209.739 157.199 209.788 157.209 209.836 157.215H209.856C209.904 157.221 209.952 157.228 210 157.239C210.047 157.248 210.095 157.256 210.141 157.267H210.156C210.203 157.277 210.245 157.289 210.294 157.303C210.548 157.374 210.79 157.484 211.012 157.628C211.121 157.699 211.223 157.779 211.317 157.868L211.344 157.894C211.362 157.91 211.379 157.927 211.395 157.944L211.444 157.997C211.846 158.418 212.178 158.901 212.428 159.427L212.466 159.517C212.551 159.717 212.618 159.924 212.666 160.135C212.808 160.781 212.753 161.455 212.508 162.07C212.415 162.318 212.302 162.557 212.169 162.785C211.858 163.309 211.489 163.796 211.07 164.237L210.981 164.332C210.848 164.472 210.71 164.612 210.565 164.752C210.501 164.815 210.434 164.877 210.367 164.94L210.162 165.129L210.055 165.224C209.797 165.454 209.532 165.677 209.263 165.893C209.1 166.025 208.936 166.154 208.77 166.281C208.184 166.729 207.587 167.161 206.979 167.578C206.612 167.83 206.242 168.077 205.869 168.321C204.95 168.924 204.021 169.512 203.083 170.084C201.115 171.294 198.934 172.588 196.609 173.995L196.007 174.36C195.348 174.762 194.726 175.146 194.14 175.512L193.845 175.697L193.287 176.055C192.917 176.292 192.548 176.531 192.179 176.77L191.882 176.966C191.737 177.06 191.593 177.156 191.449 177.252L191.308 177.342L190.876 177.633L190.647 177.79L190.379 177.976L190.13 178.149C189.713 178.444 189.325 178.725 188.968 178.992L188.834 179.094C188.624 179.253 188.416 179.415 188.211 179.58C187.902 179.829 187.62 180.067 187.367 180.296L187.243 180.409C187.172 180.474 187.102 180.539 187.035 180.603C186.989 180.648 186.946 180.693 186.898 180.736L186.834 180.8C186.691 180.944 186.551 181.091 186.416 181.242L186.35 181.318C186.203 181.488 186.075 181.651 185.963 181.81L185.913 181.881C185.825 182.009 185.744 182.141 185.671 182.277C185.652 182.311 185.635 182.345 185.618 182.379L185.569 182.481L185.536 182.555L185.515 182.605L185.498 182.65L185.475 182.711C185.413 182.88 185.37 183.056 185.345 183.234L185.337 183.296L185.331 183.354V183.669C185.331 183.695 185.331 183.721 185.338 183.749L185.343 183.797C185.343 183.823 185.349 183.848 185.353 183.876C185.357 183.902 185.364 183.949 185.372 183.986V183.991C185.379 184.026 185.386 184.06 185.395 184.095C185.404 184.13 185.413 184.17 185.424 184.206C185.443 184.277 185.467 184.347 185.492 184.417C185.508 184.459 185.523 184.5 185.54 184.541C185.54 184.549 185.546 184.558 185.55 184.566L185.586 184.647L185.636 184.758C185.69 184.873 185.749 184.985 185.813 185.094L185.879 185.208L185.947 185.322C185.959 185.341 185.973 185.359 185.988 185.376L186.01 185.399L186.035 185.422L186.061 185.442C186.099 185.469 186.14 185.49 186.183 185.505C186.206 185.513 186.23 185.519 186.254 185.525C186.831 185.655 188.017 185.178 189.593 184.346C189.682 184.298 189.78 184.248 189.875 184.196L190.355 183.934L190.589 183.804C190.756 183.715 190.926 183.614 191.1 183.515L191.417 183.336C193.5 182.137 195.988 180.597 198.56 179.093C198.801 178.952 199.043 178.811 199.285 178.672L199.771 178.361C200.335 178.038 200.902 177.719 201.471 177.404C202.188 177.01 202.91 176.626 203.639 176.254L204.115 176.013C204.431 175.857 204.744 175.705 205.053 175.557C205.651 175.273 206.256 175.003 206.868 174.748L207.203 174.612L207.243 174.596C209.018 173.893 210.627 173.459 211.929 173.459C212.21 173.456 212.492 173.48 212.769 173.528H212.778C212.867 173.544 212.948 173.562 213.031 173.582H213.046C213.259 173.636 213.466 173.713 213.662 173.812C213.937 173.954 214.184 174.143 214.393 174.371C214.489 174.477 214.574 174.592 214.649 174.714C214.789 174.929 214.899 175.162 214.978 175.406C215.01 175.501 215.038 175.594 215.067 175.693C215.278 176.45 215.257 177.253 215.007 177.998Z" fill="#FF9D00"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M203.21 123.685V123.194C203.21 81.34 169.292 47.411 127.435 47.411C85.5791 47.411 51.648 81.342 51.648 123.194V123.358C51.646 123.467 51.645 123.576 51.648 123.685C51.6529 123.848 51.6546 124.011 51.653 124.174L51.6581 124.534L51.661 124.663C51.661 124.723 51.6631 124.782 51.6651 124.842C51.6681 124.937 51.67 125.033 51.67 125.128L51.681 125.517L51.697 125.974L51.702 126.124L51.722 126.597V126.62C51.73 126.805 51.7401 126.989 51.7491 127.173L51.75 127.187C51.76 127.375 51.7701 127.564 51.7821 127.753C51.7921 127.927 51.802 128.101 51.815 128.275L51.8171 128.306C51.8258 128.455 51.8358 128.605 51.847 128.754L51.85 128.794L51.883 129.226L51.8861 129.254C51.8921 129.338 51.898 129.422 51.906 129.503C51.9658 130.224 52.0355 130.945 52.1151 131.664L52.12 131.709L52.181 132.238L52.2491 132.793L52.299 133.17L52.322 133.347C52.3753 133.755 52.433 134.162 52.495 134.568L52.4991 134.595L52.558 134.979C52.8435 136.808 53.1971 138.626 53.618 140.429L53.6231 140.451L53.655 140.586L53.746 140.971L53.802 140.904C56.002 138.274 59.158 136.824 62.689 136.824C65.519 136.824 68.4221 137.76 71.3321 139.605C73.2621 140.831 75.3961 143.002 77.5921 145.733C79.6241 142.911 82.4721 141.035 85.7301 140.523C86.3513 140.425 86.9792 140.376 87.6081 140.375C95.0441 140.375 99.523 146.828 101.215 152.633C102.051 154.594 106.08 163.526 112.156 169.568C121.392 178.795 123.703 188.316 119.132 198.511H119.148C119.459 198.546 119.772 198.578 120.087 198.607C120.274 198.625 120.46 198.643 120.648 198.659L120.714 198.665L121.127 198.7L121.507 198.73C121.869 198.758 122.232 198.784 122.596 198.807L122.885 198.824L123.114 198.838L123.256 198.846L123.703 198.869L123.825 198.874L124.294 198.895L124.816 198.915L125.235 198.927L125.305 198.929C125.394 198.933 125.483 198.936 125.572 198.936L125.668 198.939C126.258 198.953 126.847 198.96 127.437 198.959H128.063L128.51 198.954C128.62 198.949 128.729 198.949 128.84 198.949H129.014L129.165 198.945C129.224 198.943 129.283 198.941 129.343 198.941H129.522L129.873 198.932L130.401 198.914L130.982 198.888C131.15 198.882 131.316 198.873 131.482 198.865L131.661 198.854L131.927 198.84L132.083 198.831L132.201 198.823L132.738 198.788L133.274 198.749L133.761 198.71L134.103 198.681L134.479 198.647C135.107 198.591 135.733 198.525 136.359 198.45L136.786 198.399C132.287 188.247 134.616 178.767 143.813 169.577C149.876 163.519 153.905 154.587 154.745 152.625C156.438 146.821 160.914 140.368 168.352 140.368C168.981 140.368 169.61 140.418 170.231 140.516C173.486 141.028 176.334 142.904 178.369 145.726C180.566 142.996 182.699 140.823 184.63 139.597C187.539 137.753 190.445 136.817 193.272 136.817C196.388 136.817 199.212 137.947 201.345 140.02C201.384 139.851 201.422 139.682 201.459 139.512L201.568 139.006C201.607 138.821 201.646 138.636 201.683 138.451C201.749 138.124 201.815 137.797 201.878 137.467C201.944 137.125 202.007 136.781 202.067 136.437L202.098 136.251C202.117 136.141 202.135 136.031 202.156 135.92C202.19 135.748 202.218 135.576 202.246 135.402L202.257 135.336L202.328 134.883L202.398 134.424V134.42C202.449 134.081 202.497 133.742 202.542 133.403L202.553 133.319L202.616 132.841L202.667 132.433L202.757 131.629L202.792 131.306L202.801 131.218C202.82 131.044 202.838 130.87 202.854 130.696V130.682C202.867 130.544 202.881 130.405 202.893 130.266C202.964 129.478 203.024 128.686 203.072 127.891C203.081 127.761 203.088 127.63 203.096 127.499V127.493L203.122 127.002L203.128 126.892C203.144 126.56 203.158 126.228 203.169 125.896V125.884L203.174 125.754C203.179 125.645 203.183 125.535 203.183 125.425L203.185 125.381C203.189 125.278 203.193 125.172 203.193 125.067L203.196 124.977C203.199 124.872 203.202 124.768 203.202 124.663L203.204 124.574C203.207 124.441 203.21 124.307 203.21 124.174V123.685ZM108.638 199.391C114.64 190.59 114.214 183.984 105.98 175.754C97.7441 167.523 92.951 155.487 92.951 155.487C92.951 155.487 91.1621 148.496 87.0821 149.138C83.0021 149.78 80.0091 160.227 88.5521 166.622C97.0941 173.017 86.8521 177.353 83.5641 171.352C80.2761 165.35 71.299 149.923 66.645 146.972C61.991 144.021 58.718 145.675 59.815 151.757C60.36 154.776 65.4281 159.929 70.1631 164.743C74.9671 169.627 79.428 174.163 78.474 175.768C76.581 178.955 69.9141 172.023 69.9141 172.023C69.9141 172.023 49.038 153.025 44.494 157.976C40.304 162.539 46.765 166.418 56.7211 172.397C57.5671 172.905 58.4391 173.429 59.3321 173.969C70.7231 180.865 71.609 182.684 69.992 185.293C69.395 186.257 65.582 183.968 60.892 181.153C52.897 176.352 42.3551 170.023 40.8661 175.688C39.5781 180.591 47.334 183.595 54.368 186.32C60.228 188.59 65.5881 190.666 64.7991 193.484C63.9821 196.406 59.5531 193.969 54.7121 191.305C49.2771 188.314 43.3221 185.038 41.3731 188.735C37.6901 195.725 66.7831 203.954 67.0231 204.015C76.4231 206.453 100.295 211.619 108.638 199.391ZM147.303 199.391C141.301 190.59 141.727 183.984 149.962 175.754C158.197 167.523 162.99 155.487 162.99 155.487C162.99 155.487 164.779 148.496 168.859 149.138C172.939 149.78 175.932 160.227 167.39 166.622C158.847 173.017 169.089 177.353 172.377 171.352C175.666 165.35 184.637 149.923 189.291 146.972C193.945 144.021 197.22 145.675 196.122 151.757C195.578 154.776 190.509 159.929 185.774 164.744C180.97 169.628 176.509 174.163 177.462 175.768C179.355 178.955 186.027 172.019 186.027 172.019C186.027 172.019 206.902 153.022 211.448 157.973C215.637 162.535 209.176 166.415 199.219 172.394C198.348 172.917 197.478 173.441 196.609 173.966C185.218 180.862 184.332 182.681 185.948 185.289C186.546 186.254 190.359 183.964 195.048 181.149C203.044 176.349 213.586 170.019 215.075 175.685C216.364 180.588 208.607 183.592 201.573 186.317C195.713 188.587 190.353 190.663 191.141 193.481C191.957 196.402 196.385 193.965 201.225 191.301C206.66 188.31 212.616 185.032 214.564 188.732C218.248 195.726 189.15 203.947 188.915 204.007C179.515 206.453 155.643 211.619 147.303 199.391Z" fill="#FFD21E"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M152.047 102.567C153.229 102.985 154.108 104.257 154.944 105.468C156.074 107.104 157.126 108.627 158.74 107.769C160.644 106.756 162.205 105.202 163.225 103.302C164.246 101.402 164.681 99.2427 164.475 97.096C164.321 95.4908 163.813 93.9398 162.987 92.5548C162.161 91.1697 161.038 89.985 159.7 89.0862C158.361 88.1874 156.839 87.5968 155.245 87.3569C153.65 87.117 152.022 87.2339 150.478 87.699C148.934 88.1639 147.513 88.9653 146.316 90.0455C145.119 91.1257 144.176 92.4578 143.556 93.946C142.936 95.4342 142.653 97.0415 142.728 98.652C142.804 100.263 143.235 101.836 143.992 103.26C144.74 104.667 146.4 104.003 148.152 103.302C149.525 102.753 150.956 102.181 152.047 102.567ZM100.672 102.567C99.49 102.985 98.611 104.258 97.775 105.468C96.645 107.105 95.592 108.627 93.979 107.769C91.5845 106.501 89.7482 104.386 88.8278 101.838C87.9075 99.2895 87.9692 96.4896 89.0008 93.9841C90.0324 91.4786 91.9601 89.4471 94.408 88.2855C96.856 87.1239 99.6488 86.9156 102.242 87.701C104.307 88.3228 106.141 89.5427 107.513 91.2065C108.885 92.8704 109.732 94.9035 109.949 97.049C110.165 99.1945 109.74 101.356 108.728 103.26C107.979 104.667 106.319 104.003 104.567 103.303C103.193 102.753 101.764 102.181 100.672 102.567ZM144.099 149.318C152.242 142.903 155.233 132.429 155.233 125.977C155.233 120.877 151.802 122.482 146.309 125.202L145.999 125.355C140.957 127.852 134.245 131.177 126.877 131.177C119.508 131.177 112.796 127.852 107.755 125.354C102.084 122.545 98.527 120.783 98.527 125.978C98.527 132.634 101.709 143.563 110.443 149.912C111.596 147.573 113.219 145.497 115.211 143.813C117.202 142.129 119.52 140.874 122.018 140.126C122.89 139.866 123.788 141.367 124.707 142.904C125.594 144.386 126.501 145.902 127.423 145.902C128.406 145.902 129.371 144.408 130.314 142.95C131.299 141.425 132.26 139.94 133.189 140.237C137.864 141.738 141.775 144.993 144.099 149.318Z" fill="#32343D"/>
+<path d="M144.097 149.317C139.856 152.659 134.219 154.9 126.878 154.9C119.981 154.9 114.587 152.922 110.443 149.911C111.596 147.572 113.219 145.495 115.211 143.812C117.202 142.128 119.52 140.873 122.018 140.125C123.73 139.614 125.545 145.901 127.423 145.901C129.433 145.901 131.37 139.655 133.189 140.236C137.863 141.738 141.773 144.993 144.097 149.317Z" fill="#FF323D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M81.2 111.64C80.2312 112.288 79.1173 112.687 77.9572 112.801C76.7971 112.916 75.6267 112.742 74.55 112.295C73.6893 111.94 72.9072 111.418 72.2488 110.759C71.5903 110.101 71.0684 109.319 70.713 108.458C70.267 107.381 70.0935 106.211 70.2082 105.051C70.3228 103.891 70.7219 102.777 71.37 101.808C72.1488 100.642 73.2558 99.7333 74.5512 99.1967C75.8466 98.6601 77.272 98.5197 78.6471 98.7935C80.0223 99.0672 81.2853 99.7427 82.2764 100.734C83.2675 101.726 83.9422 102.99 84.215 104.365C84.4883 105.74 84.3477 107.165 83.8113 108.46C83.2748 109.755 82.3654 110.861 81.2 111.64ZM182.613 111.64C181.644 112.288 180.53 112.687 179.37 112.801C178.209 112.916 177.039 112.742 175.962 112.295C175.101 111.939 174.319 111.418 173.661 110.759C173.003 110.101 172.481 109.319 172.125 108.458C171.68 107.381 171.507 106.211 171.621 105.051C171.736 103.891 172.135 102.777 172.782 101.808C173.364 100.936 174.133 100.205 175.032 99.6658C175.931 99.1269 176.938 98.7942 177.981 98.6917C179.025 98.5891 180.078 98.7193 181.064 99.0728C182.051 99.4264 182.947 99.9944 183.688 100.736C184.68 101.727 185.355 102.99 185.628 104.365C185.902 105.74 185.761 107.165 185.224 108.46C184.687 109.755 183.779 110.861 182.613 111.64Z" fill="#FFAD03"/>
+</svg>
\ No newline at end of file
diff --git a/ui/lib/ui/src/lib/assets/model-logos/gemma.svg b/ui/lib/ui/src/lib/assets/model-logos/gemma.svg
new file mode 100644
index 000000000..c750e8403
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/model-logos/gemma.svg
@@ -0,0 +1,8 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M15.9999 31.7947C15.9857 29.718 15.5506 27.665 14.7201 25.76C13.1243 21.9243 10.0757 18.8758 6.24001 17.28C4.33424 16.4493 2.28041 16.0141 0.20292 16C0.135302 16.0005 0.0676607 16.0004 0 16C0.0676621 15.9996 0.135303 15.9996 0.20292 16C2.27652 15.9871 4.32798 15.566 6.24001 14.76C8.13414 13.9422 9.85745 12.7753 11.32 11.3201C12.7715 9.86274 13.9262 8.13746 14.7201 6.23997C15.5506 4.335 15.9857 2.28203 15.9999 0.205388C15.9995 0.136948 15.9995 0.0684839 16 0C16.0004 0.068485 16.0004 0.13695 15.9999 0.205388C16.013 2.27819 16.4343 4.32882 17.2403 6.23997C18.058 8.13418 19.2248 9.85754 20.68 11.3201C22.1425 12.7753 23.8658 13.9422 25.7599 14.76C27.672 15.566 29.7235 15.9871 31.7971 16C31.8647 15.9996 31.9323 15.9996 32 16C31.9323 16.0004 31.8647 16.0005 31.7971 16C29.7196 16.0141 27.6657 16.4493 25.7599 17.28C23.8625 18.0738 22.1373 19.2285 20.68 20.68C19.2248 22.1425 18.058 23.8658 17.2403 25.76C16.4343 27.6712 16.013 29.7219 15.9999 31.7947C16.0004 31.8631 16.0004 31.9315 15.9999 32C15.9995 31.9316 15.9995 31.8631 15.9999 31.7947Z" fill="currentColor"/>
+<path d="M16 0.205078C16.0131 2.27788 16.4342 4.32908 17.2402 6.24023C18.0578 8.13435 19.2246 9.85785 20.6797 11.3203C22.1421 12.7755 23.8657 13.942 25.7598 14.7598C27.6717 15.5657 29.7233 15.9871 31.7969 16C29.7194 16.0141 27.6655 16.4496 25.7598 17.2803L25.4062 17.4326C23.6479 18.2189 22.0459 19.3189 20.6797 20.6797C19.2246 22.1421 18.0578 23.8656 17.2402 25.7598C16.435 27.6689 16.014 29.7175 16 31.7881C15.9849 29.7137 15.5493 27.6627 14.7197 25.7598C13.1738 22.0442 10.265 19.0668 6.59766 17.4336L6.24023 17.2803C4.33452 16.4496 2.28055 16.0141 0.203125 16C2.14709 15.9879 4.07148 15.6167 5.87988 14.9062L6.24023 14.7598C8.13426 13.942 9.85788 12.7754 11.3203 11.3203C12.6811 9.95407 13.7811 8.35212 14.5674 6.59375L14.7197 6.24023C15.5502 4.33526 15.9858 2.28172 16 0.205078Z" fill="currentColor"/>
+<path d="M3 20C3 19.4477 3.44772 19 4 19C4.55228 19 5 19.4477 5 20V27H12C12.5523 27 13 27.4477 13 28C13 28.5523 12.5523 29 12 29H3V20Z" fill="currentColor"/>
+<path d="M29 12C29 12.5523 28.5523 13 28 13C27.4477 13 27 12.5523 27 12L27 5L20 5C19.4477 5 19 4.55229 19 4C19 3.44772 19.4477 3 20 3L29 3L29 12Z" fill="currentColor"/>
+<path d="M12 3C12.5523 3 13 3.44772 13 4C13 4.55228 12.5523 5 12 5H5V12C5 12.5523 4.55229 13 4 13C3.44771 13 3 12.5523 3 12V3H12Z" fill="currentColor"/>
+<path d="M20 29C19.4477 29 19 28.5523 19 28C19 27.4477 19.4477 27 20 27L27 27L27 20C27 19.4477 27.4477 19 28 19C28.5523 19 29 19.4477 29 20L29 29L20 29Z" fill="currentColor"/>
+</svg>
diff --git a/ui/lib/ui/src/lib/assets/model-logos/gpt.svg b/ui/lib/ui/src/lib/assets/model-logos/gpt.svg
new file mode 100644
index 000000000..187c7768d
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/model-logos/gpt.svg
@@ -0,0 +1,3 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M29.0232 13.2796C29.3642 12.2698 29.4825 11.1982 29.37 10.1384C29.2576 9.07858 28.917 8.05566 28.3718 7.1399C26.7127 4.29027 23.3776 2.82391 20.1202 3.51358C19.3992 2.71527 18.5174 2.0786 17.5328 1.64541C16.5481 1.21222 15.483 0.992336 14.4072 1.0002C11.0773 0.993611 8.12328 3.10743 7.09991 6.23398C6.04673 6.44432 5.05037 6.87635 4.17702 7.50135C3.30367 8.12635 2.57332 8.93003 2.0345 9.85898C1.22033 11.242 0.872342 12.85 1.04189 14.4458C1.21143 16.0416 1.88952 17.5407 2.9761 18.7217C2.63517 19.7315 2.51686 20.8031 2.62932 21.8629C2.74178 22.9227 3.08233 23.9457 3.62758 24.8614C5.2866 27.7097 8.62178 29.1774 11.8792 28.4877C12.6002 29.2858 13.4821 29.9222 14.4667 30.3552C15.4514 30.7881 16.5165 31.0078 17.5921 30.9998C20.9233 31.0077 23.8787 28.8899 24.9034 25.7634C25.9564 25.5527 26.9526 25.1204 27.8257 24.4952C28.6989 23.8699 29.4289 23.0661 29.9675 22.1371C30.7807 20.7541 31.1279 19.1464 30.9579 17.5512C30.7878 15.9559 30.1096 14.4575 29.0232 13.277V13.2796ZM17.5947 29.0389C16.2645 29.0421 14.9747 28.5819 13.947 27.7374C13.9932 27.7137 14.0736 27.6702 14.1263 27.6372L20.1795 24.1876C20.3307 24.1028 20.4565 23.9794 20.5441 23.8299C20.6317 23.6804 20.6779 23.5103 20.678 23.337V14.9161L23.2364 16.3732C23.2655 16.3881 23.2822 16.4114 23.2866 16.4431V23.4175C23.2826 26.519 20.7374 29.0323 17.5947 29.0389ZM5.35253 23.8803C4.68505 22.7453 4.44379 21.4097 4.67205 20.1129L4.85272 20.2184L10.9059 23.6693C11.2132 23.846 11.5943 23.846 11.9016 23.6693L19.2933 19.4575V22.3731C19.2943 22.3882 19.2916 22.4033 19.2854 22.4171C19.2792 22.4309 19.2697 22.443 19.2577 22.4522L13.1373 25.9374C10.4114 27.4869 6.92979 26.5664 5.35253 23.8803ZM3.75813 10.8401C4.4288 9.69707 5.47866 8.82506 6.72538 8.37549L6.72142 8.58252V15.4831C6.72162 15.656 6.76776 15.8257 6.85512 15.9749C6.94248 16.1242 7.06792 16.2475 7.2186 16.3323L14.609 20.5428L12.0506 21.9999C12.038 22.0081 12.0237 22.0131 12.0087 22.0145C11.9938 22.0159 11.9787 22.0136 11.9649 22.0078L5.84312 18.5186C3.12248 16.9639 2.19011 13.5301 3.75813 10.8414M24.7821 15.669L17.3903 11.4572L19.9487 10.0014C19.9615 9.99299 19.9761 9.98787 19.9913 9.98649C20.0065 9.98511 20.0217 9.98751 20.0358 9.99349L26.1575 13.48C28.8821 15.0334 29.8158 18.4725 28.2412 21.1612C27.5715 22.3035 26.5232 23.1755 25.2779 23.6258V16.5182C25.2794 16.3453 25.2342 16.1752 25.1472 16.0258C25.0602 15.8763 24.9332 15.7531 24.7821 15.669ZM27.3286 11.8858L27.1493 11.7803L21.0948 8.32933C20.9433 8.24283 20.772 8.19734 20.5976 8.19734C20.4232 8.19734 20.2518 8.24283 20.1004 8.32933L12.7087 12.5411V9.62558C12.7077 9.61048 12.7104 9.59537 12.7166 9.58158C12.7228 9.56778 12.7323 9.55572 12.7443 9.54646L18.8634 6.06387C21.5906 4.5118 25.0748 5.43619 26.6481 8.12626C27.3115 9.26295 27.5528 10.5922 27.3286 11.8858ZM11.3187 17.0813L8.75893 15.6242C8.7457 15.6176 8.73424 15.6079 8.72552 15.596C8.7168 15.5841 8.71107 15.5702 8.70882 15.5556V8.57988C8.71146 5.47575 11.2646 2.95974 14.4112 2.96237C15.7432 2.96237 17.0316 3.42391 18.055 4.26258L17.8743 4.36279L11.8211 7.81374C11.6693 7.8973 11.5428 8.02032 11.4551 8.16979C11.3673 8.31926 11.3216 8.48964 11.3226 8.66295L11.3187 17.0813ZM12.7087 14.1249L16.0016 12.2497L19.2933 14.1249V17.8751L16.0003 19.7503L12.7073 17.8751L12.7087 14.1249Z" fill="currentColor"/>
+</svg>
diff --git a/ui/lib/ui/src/lib/assets/model-logos/liquid.svg b/ui/lib/ui/src/lib/assets/model-logos/liquid.svg
new file mode 100644
index 000000000..6df35fc6d
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/model-logos/liquid.svg
@@ -0,0 +1,5 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M16.465 11.97L16.454 11.976L20.106 18.102C20.596 18.828 20.881 19.693 20.881 20.623C20.881 21.503 20.626 22.327 20.183 23.029L27.623 20.706L15.984 2L13.181 6.517L16.465 11.97Z" fill="currentColor"/>
+<path d="M10.208 30L16.053 25.271C16.048 25.271 16.043 25.271 16.038 25.271C13.363 25.271 11.195 23.19 11.195 20.624C11.195 19.696 11.479 18.834 11.967 18.108L15.421 12.303L12.55 7.535L4.377 20.707L10.198 30H10.208Z" fill="currentColor"/>
+<path d="M18.524 24.612C18.524 24.612 18.523 24.612 18.523 24.613L11.876 30H21.739L26.738 22.103L18.524 24.613V24.612Z" fill="currentColor"/>
+</svg>
diff --git a/ui/lib/ui/src/lib/assets/model-logos/meta.svg b/ui/lib/ui/src/lib/assets/model-logos/meta.svg
new file mode 100644
index 000000000..045f3adb6
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/model-logos/meta.svg
@@ -0,0 +1,3 @@
+<svg width="32" height="32" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" fill="currentColor"/>
+</svg>
diff --git a/ui/lib/ui/src/lib/assets/model-logos/qwen.svg b/ui/lib/ui/src/lib/assets/model-logos/qwen.svg
new file mode 100644
index 000000000..efff7e958
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/model-logos/qwen.svg
@@ -0,0 +1,3 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M20.7345 12.8891C20.8022 12.8891 20.8135 12.9231 20.7796 12.9683L19.6385 14.9706L16.0796 21.2376C16.0796 21.2715 16.0457 21.2715 16.0118 21.2715C15.9779 21.2715 15.9666 21.2715 15.944 21.2376L11.2326 13.0136C11.1987 12.9683 11.2326 12.9457 11.2665 12.9457H11.5716L20.7458 12.9118H20.7345V12.8891ZM12.1591 1.93891C12.1252 1.93891 12.1139 1.93891 12.0913 1.97285L8.1821 8.82806C8.1482 8.89593 8.08041 8.92986 8.00133 8.92986H4.09213C4.01304 8.92986 3.99045 8.9638 4.04694 9.03167L11.967 22.9005C12.0009 22.9457 11.9783 22.9796 11.9218 22.9796H8.11431C8.00133 22.9796 7.89964 23.0475 7.84315 23.1606L6.04673 26.3167C5.97894 26.4186 6.01283 26.4864 6.14841 26.4864H13.9442C14.012 26.4864 14.0572 26.5204 14.0798 26.5882L15.9892 29.948C16.057 30.0611 16.1022 30.0611 16.17 29.948L22.9941 17.991L24.0674 16.1131C24.0674 16.0792 24.1013 16.0792 24.1352 16.0792C24.1691 16.0792 24.1804 16.0792 24.203 16.1131L26.1463 19.5747C26.1802 19.6199 26.2254 19.6538 26.2932 19.6538L30.0668 19.6199C30.0781 19.6199 30.1007 19.6199 30.112 19.586V19.5407L26.1576 12.5837C26.1237 12.5385 26.1237 12.4819 26.1576 12.4367L26.5644 11.7466L28.0896 9.04299C28.1235 8.99774 28.0896 8.9638 28.0444 8.9638H12.2269C12.1478 8.9638 12.1252 8.92986 12.1817 8.86199L14.1476 5.43439C14.1815 5.38914 14.1815 5.33258 14.1476 5.28733L12.2834 2.0181C12.2834 1.98416 12.2495 1.97285 12.2156 1.97285H12.1704L12.1591 1.93891ZM16.8366 1.40724C17.3789 2.34615 17.9099 3.28507 18.4296 4.24661C18.4748 4.32579 18.5426 4.35973 18.6443 4.35973H26.2141C26.4514 4.35973 26.6547 4.50679 26.8129 4.81222L28.7901 8.31901C29.0387 8.77149 29.1291 8.97511 28.824 9.46154C28.4738 10.0498 28.1235 10.638 27.7846 11.2376L27.2761 12.1425C27.1293 12.414 26.9711 12.5272 27.2309 12.8439L30.8577 19.1787C31.0949 19.586 31.0046 19.8462 30.8125 20.2421C30.2137 21.3167 29.6036 22.3801 28.9822 23.4321C28.7675 23.8054 28.4964 23.9412 28.0557 23.9412C26.9937 23.9299 25.9429 23.9412 24.8809 23.9525C24.8357 23.9525 24.8018 23.9864 24.7679 24.0204C23.5477 26.1923 22.3162 28.3416 21.0734 30.4909C20.8361 30.8982 20.5537 31 20.0792 31H15.9666C15.6841 31 15.4808 30.8869 15.3339 30.6267L13.5036 27.448C13.4923 27.4027 13.4358 27.3801 13.3906 27.3801H6.40827C6.02413 27.414 5.65129 27.3801 5.32364 27.267L3.14308 23.4887C3.0075 23.2398 3.0075 23.0023 3.14308 22.7534L4.78133 19.8688C4.82652 19.7896 4.82652 19.6878 4.78133 19.5973C3.92266 18.1041 3.07529 16.6222 2.22792 15.129L1.15459 13.2285C0.93992 12.81 0.917323 12.5611 1.29017 11.9163C1.92287 10.8077 2.54427 9.6991 3.18827 8.5905C3.36904 8.27376 3.60631 8.13801 3.97915 8.13801H7.5155C7.58329 8.13801 7.62848 8.10407 7.66238 8.05882L11.4812 1.3733C11.6168 1.15837 11.7975 1.03394 12.0461 1.03394H14.2154L15.605 1C16.0796 1 16.5993 1.04525 16.8253 1.47511V1.40724H16.8366Z" fill="currentColor"/>
+</svg>
diff --git a/ui/lib/ui/src/lib/assets/qr-network.svg b/ui/lib/ui/src/lib/assets/qr-network.svg
new file mode 100644
index 000000000..2c42cff1c
--- /dev/null
+++ b/ui/lib/ui/src/lib/assets/qr-network.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" shape-rendering="crispEdges"><path fill="currentColor" d="M1 1h1v1h-1zM2 1h1v1h-1zM3 1h1v1h-1zM4 1h1v1h-1zM5 1h1v1h-1zM6 1h1v1h-1zM7 1h1v1h-1zM14 1h1v1h-1zM17 1h1v1h-1zM19 1h1v1h-1zM20 1h1v1h-1zM21 1h1v1h-1zM22 1h1v1h-1zM23 1h1v1h-1zM24 1h1v1h-1zM25 1h1v1h-1zM1 2h1v1h-1zM7 2h1v1h-1zM9 2h1v1h-1zM10 2h1v1h-1zM13 2h1v1h-1zM15 2h1v1h-1zM17 2h1v1h-1zM19 2h1v1h-1zM25 2h1v1h-1zM1 3h1v1h-1zM3 3h1v1h-1zM4 3h1v1h-1zM5 3h1v1h-1zM7 3h1v1h-1zM10 3h1v1h-1zM11 3h1v1h-1zM13 3h1v1h-1zM15 3h1v1h-1zM17 3h1v1h-1zM19 3h1v1h-1zM21 3h1v1h-1zM22 3h1v1h-1zM23 3h1v1h-1zM25 3h1v1h-1zM1 4h1v1h-1zM3 4h1v1h-1zM4 4h1v1h-1zM5 4h1v1h-1zM7 4h1v1h-1zM12 4h1v1h-1zM13 4h1v1h-1zM14 4h1v1h-1zM17 4h1v1h-1zM19 4h1v1h-1zM21 4h1v1h-1zM22 4h1v1h-1zM23 4h1v1h-1zM25 4h1v1h-1zM1 5h1v1h-1zM3 5h1v1h-1zM4 5h1v1h-1zM5 5h1v1h-1zM7 5h1v1h-1zM9 5h1v1h-1zM12 5h1v1h-1zM13 5h1v1h-1zM16 5h1v1h-1zM17 5h1v1h-1zM19 5h1v1h-1zM21 5h1v1h-1zM22 5h1v1h-1zM23 5h1v1h-1zM25 5h1v1h-1zM1 6h1v1h-1zM7 6h1v1h-1zM10 6h1v1h-1zM11 6h1v1h-1zM14 6h1v1h-1zM16 6h1v1h-1zM17 6h1v1h-1zM19 6h1v1h-1zM25 6h1v1h-1zM1 7h1v1h-1zM2 7h1v1h-1zM3 7h1v1h-1zM4 7h1v1h-1zM5 7h1v1h-1zM6 7h1v1h-1zM7 7h1v1h-1zM9 7h1v1h-1zM11 7h1v1h-1zM13 7h1v1h-1zM15 7h1v1h-1zM17 7h1v1h-1zM19 7h1v1h-1zM20 7h1v1h-1zM21 7h1v1h-1zM22 7h1v1h-1zM23 7h1v1h-1zM24 7h1v1h-1zM25 7h1v1h-1zM10 8h1v1h-1zM11 8h1v1h-1zM12 8h1v1h-1zM13 8h1v1h-1zM14 8h1v1h-1zM15 8h1v1h-1zM1 9h1v1h-1zM3 9h1v1h-1zM5 9h1v1h-1zM7 9h1v1h-1zM11 9h1v1h-1zM12 9h1v1h-1zM15 9h1v1h-1zM16 9h1v1h-1zM17 9h1v1h-1zM21 9h1v1h-1zM24 9h1v1h-1zM4 10h1v1h-1zM5 10h1v1h-1zM8 10h1v1h-1zM11 10h1v1h-1zM12 10h1v1h-1zM13 10h1v1h-1zM14 10h1v1h-1zM15 10h1v1h-1zM16 10h1v1h-1zM18 10h1v1h-1zM20 10h1v1h-1zM25 10h1v1h-1zM1 11h1v1h-1zM3 11h1v1h-1zM4 11h1v1h-1zM6 11h1v1h-1zM7 11h1v1h-1zM10 11h1v1h-1zM11 11h1v1h-1zM13 11h1v1h-1zM19 11h1v1h-1zM21 11h1v1h-1zM23 11h1v1h-1zM24 11h1v1h-1zM25 11h1v1h-1zM1 12h1v1h-1zM2 12h1v1h-1zM5 12h1v1h-1zM10 12h1v1h-1zM11 12h1v1h-1zM13 12h1v1h-1zM15 12h1v1h-1zM16 12h1v1h-1zM19 12h1v1h-1zM20 12h1v1h-1zM24 12h1v1h-1zM3 13h1v1h-1zM7 13h1v1h-1zM10 13h1v1h-1zM11 13h1v1h-1zM13 13h1v1h-1zM15 13h1v1h-1zM17 13h1v1h-1zM21 13h1v1h-1zM22 13h1v1h-1zM24 13h1v1h-1zM25 13h1v1h-1zM2 14h1v1h-1zM3 14h1v1h-1zM5 14h1v1h-1zM10 14h1v1h-1zM11 14h1v1h-1zM12 14h1v1h-1zM13 14h1v1h-1zM14 14h1v1h-1zM19 14h1v1h-1zM20 14h1v1h-1zM22 14h1v1h-1zM25 14h1v1h-1zM1 15h1v1h-1zM3 15h1v1h-1zM5 15h1v1h-1zM6 15h1v1h-1zM7 15h1v1h-1zM8 15h1v1h-1zM9 15h1v1h-1zM12 15h1v1h-1zM13 15h1v1h-1zM15 15h1v1h-1zM17 15h1v1h-1zM19 15h1v1h-1zM23 15h1v1h-1zM24 15h1v1h-1zM25 15h1v1h-1zM2 16h1v1h-1zM4 16h1v1h-1zM5 16h1v1h-1zM10 16h1v1h-1zM13 16h1v1h-1zM14 16h1v1h-1zM16 16h1v1h-1zM17 16h1v1h-1zM20 16h1v1h-1zM22 16h1v1h-1zM24 16h1v1h-1zM1 17h1v1h-1zM4 17h1v1h-1zM5 17h1v1h-1zM7 17h1v1h-1zM9 17h1v1h-1zM12 17h1v1h-1zM15 17h1v1h-1zM16 17h1v1h-1zM17 17h1v1h-1zM18 17h1v1h-1zM19 17h1v1h-1zM20 17h1v1h-1zM21 17h1v1h-1zM9 18h1v1h-1zM11 18h1v1h-1zM12 18h1v1h-1zM16 18h1v1h-1zM17 18h1v1h-1zM21 18h1v1h-1zM22 18h1v1h-1zM24 18h1v1h-1zM25 18h1v1h-1zM1 19h1v1h-1zM2 19h1v1h-1zM3 19h1v1h-1zM4 19h1v1h-1zM5 19h1v1h-1zM6 19h1v1h-1zM7 19h1v1h-1zM14 19h1v1h-1zM17 19h1v1h-1zM19 19h1v1h-1zM21 19h1v1h-1zM23 19h1v1h-1zM24 19h1v1h-1zM25 19h1v1h-1zM1 20h1v1h-1zM7 20h1v1h-1zM12 20h1v1h-1zM17 20h1v1h-1zM21 20h1v1h-1zM22 20h1v1h-1zM23 20h1v1h-1zM24 20h1v1h-1zM1 21h1v1h-1zM3 21h1v1h-1zM4 21h1v1h-1zM5 21h1v1h-1zM7 21h1v1h-1zM9 21h1v1h-1zM10 21h1v1h-1zM11 21h1v1h-1zM13 21h1v1h-1zM16 21h1v1h-1zM17 21h1v1h-1zM18 21h1v1h-1zM19 21h1v1h-1zM20 21h1v1h-1zM21 21h1v1h-1zM24 21h1v1h-1zM25 21h1v1h-1zM1 22h1v1h-1zM3 22h1v1h-1zM4 22h1v1h-1zM5 22h1v1h-1zM7 22h1v1h-1zM10 22h1v1h-1zM12 22h1v1h-1zM13 22h1v1h-1zM14 22h1v1h-1zM16 22h1v1h-1zM17 22h1v1h-1zM18 22h1v1h-1zM19 22h1v1h-1zM21 22h1v1h-1zM23 22h1v1h-1zM24 22h1v1h-1zM1 23h1v1h-1zM3 23h1v1h-1zM4 23h1v1h-1zM5 23h1v1h-1zM7 23h1v1h-1zM9 23h1v1h-1zM10 23h1v1h-1zM12 23h1v1h-1zM13 23h1v1h-1zM15 23h1v1h-1zM16 23h1v1h-1zM19 23h1v1h-1zM20 23h1v1h-1zM22 23h1v1h-1zM25 23h1v1h-1zM1 24h1v1h-1zM7 24h1v1h-1zM13 24h1v1h-1zM14 24h1v1h-1zM15 24h1v1h-1zM18 24h1v1h-1zM21 24h1v1h-1zM23 24h1v1h-1zM24 24h1v1h-1zM1 25h1v1h-1zM2 25h1v1h-1zM3 25h1v1h-1zM4 25h1v1h-1zM5 25h1v1h-1zM6 25h1v1h-1zM7 25h1v1h-1zM9 25h1v1h-1zM10 25h1v1h-1zM11 25h1v1h-1zM12 25h1v1h-1zM15 25h1v1h-1zM17 25h1v1h-1zM19 25h1v1h-1zM20 25h1v1h-1zM21 25h1v1h-1zM24 25h1v1h-1zM25 25h1v1h-1z"/></svg>
diff --git a/ui/apps/chat/src/lib/components/app/actions/ActionIcon.svelte b/ui/lib/ui/src/lib/components/app/actions/ActionIcon.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/app/actions/ActionIcon.svelte
rename to ui/lib/ui/src/lib/components/app/actions/ActionIcon.svelte
index 138f9b6f7..d98cc325a 100644
--- a/ui/apps/chat/src/lib/components/app/actions/ActionIcon.svelte
+++ b/ui/lib/ui/src/lib/components/app/actions/ActionIcon.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
-	import { Button, type ButtonSize, type ButtonVariant } from '#lib/components/ui/button/index.ts';
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
-	import { TooltipSide } from '#lib/enums/index.ts';
+	import { Button, type ButtonSize, type ButtonVariant } from '../../ui/button';
+	import * as Tooltip from '../../ui/tooltip';
+	import { TooltipSide } from '../../../enums';
 	import type { Component } from 'svelte';

 	interface Props {
@@ -26,7 +26,7 @@
 		disabled = false,
 		href = '',
 		icon,
-		iconSize = 'h-3 w-3',
+		iconSize = 'size-icon-md',
 		onclick,
 		size = 'sm',
 		stopPropagationOnClick = false,
@@ -44,7 +44,7 @@
 	<Button
 		{...props}
 		aria-label={ariaLabel || tooltip}
-		class="h-6 w-6 p-0 {className} flex hover:bg-transparent data-[state=open]:bg-transparent!"
+		class="size-6 p-0 {className} flex hover:bg-transparent data-[state=open]:bg-transparent!"
 		{disabled}
 		{href}
 		onclick={(e: MouseEvent) => {
diff --git a/ui/lib/ui/src/lib/components/app/actions/index.ts b/ui/lib/ui/src/lib/components/app/actions/index.ts
new file mode 100644
index 000000000..c7b04b13c
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/app/actions/index.ts
@@ -0,0 +1,2 @@
+/** Styled icon button for action triggers with tooltip. */
+export { default as ActionIcon } from './ActionIcon.svelte';
diff --git a/ui/apps/chat/src/lib/components/app/content/SyntaxHighlightedCode.svelte b/ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte
similarity index 78%
rename from ui/apps/chat/src/lib/components/app/content/SyntaxHighlightedCode.svelte
rename to ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte
index d2a3b6ecc..0facb87b1 100644
--- a/ui/apps/chat/src/lib/components/app/content/SyntaxHighlightedCode.svelte
+++ b/ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte
@@ -1,7 +1,9 @@
 <script lang="ts">
-	import { SYNTAX_CODE_SCROLL_AT_BOTTOM_THRESHOLD_PX } from '#lib/constants/index.ts';
-	import { ColorMode } from '#lib/enums/index.ts';
-	import { highlightCode, loadHighlightTheme } from '#lib/utils/index.ts';
+	import { SYNTAX_CODE_SCROLL_AT_BOTTOM_THRESHOLD_PX, UI_DATA_ATTRS } from '../../../constants';
+	import { BooleanString, ColorMode } from '../../../enums';
+	import { highlightCode } from '../../../utils';
+	import githubLightCss from 'highlight.js/styles/github.css?inline';
+	import githubDarkCss from 'highlight.js/styles/github-dark.css?inline';
 	import { mode } from 'mode-watcher';

 	interface Props {
@@ -32,6 +34,24 @@
 	const SCROLL_BOTTOM_THRESHOLD_PX = SYNTAX_CODE_SCROLL_AT_BOTTOM_THRESHOLD_PX;
 	let pendingFrame: number | null = null;

+	function loadHighlightTheme(isDark: boolean) {
+		// a library has no $app/environment; this only runs in an effect, in the browser
+		if (typeof document === 'undefined') return;
+
+		const existingThemes = document.querySelectorAll(
+			`style[${UI_DATA_ATTRS.HIGHLIGHT_THEME_PREVIEW}]`
+		);
+
+		existingThemes.forEach((style) => style.remove());
+
+		const style = document.createElement('style');
+
+		style.setAttribute(UI_DATA_ATTRS.HIGHLIGHT_THEME_PREVIEW, BooleanString.TRUE);
+		style.textContent = isDark ? githubDarkCss : githubLightCss;
+
+		document.head.appendChild(style);
+	}
+
 	function isAtBottom(): boolean {
 		if (!scrollEl) return false;

diff --git a/ui/lib/ui/src/lib/components/app/content/index.ts b/ui/lib/ui/src/lib/components/app/content/index.ts
new file mode 100644
index 000000000..4b54220eb
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/app/content/index.ts
@@ -0,0 +1 @@
+export { default as SyntaxHighlightedCode } from './SyntaxHighlightedCode.svelte';
diff --git a/ui/apps/chat/src/lib/components/app/forms/SearchInput.svelte b/ui/lib/ui/src/lib/components/app/forms/SearchInput.svelte
similarity index 93%
rename from ui/apps/chat/src/lib/components/app/forms/SearchInput.svelte
rename to ui/lib/ui/src/lib/components/app/forms/SearchInput.svelte
index 624f9c209..12dada776 100644
--- a/ui/apps/chat/src/lib/components/app/forms/SearchInput.svelte
+++ b/ui/lib/ui/src/lib/components/app/forms/SearchInput.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import { Search, X } from '@lucide/svelte';
-	import { Input } from '#lib/components/ui/input/index.ts';
-	import { ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
+	import { Input } from '../../ui/input';
+	import { ICON_CLASS_DEFAULT } from '../../../constants';

 	interface Props {
 		autofocus?: boolean;
diff --git a/ui/lib/ui/src/lib/components/app/forms/index.ts b/ui/lib/ui/src/lib/components/app/forms/index.ts
new file mode 100644
index 000000000..a13e1cf66
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/app/forms/index.ts
@@ -0,0 +1 @@
+export { default as SearchInput } from './SearchInput.svelte';
diff --git a/ui/apps/chat/src/lib/components/app/misc/Logo.svelte b/ui/lib/ui/src/lib/components/app/misc/Logo.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/app/misc/Logo.svelte
rename to ui/lib/ui/src/lib/components/app/misc/Logo.svelte
index 0dc5bb0bd..0193fa5c7 100644
--- a/ui/apps/chat/src/lib/components/app/misc/Logo.svelte
+++ b/ui/lib/ui/src/lib/components/app/misc/Logo.svelte
@@ -1,5 +1,5 @@
 <script>
-	import icon from 'llama-brand/logo/svg/icon/icon-light.svg?raw';
+	import icon from '@ggml-org/llama-brand/logo/svg/icon/icon-light.svg?raw';

 	// llama-brand draws the icon in its ink; currentColor lets it follow the text colour.
 	const logoMark = icon.replace(/fill="#[0-9a-f]{3,8}"/gi, 'fill="currentColor"');
diff --git a/ui/lib/ui/src/lib/components/app/misc/index.ts b/ui/lib/ui/src/lib/components/app/misc/index.ts
new file mode 100644
index 000000000..9e1c9cd02
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/app/misc/index.ts
@@ -0,0 +1,2 @@
+/** Application brand mark */
+export { default as Logo } from './Logo.svelte';
diff --git a/ui/lib/ui/src/lib/components/mockups/MacMenu.svelte b/ui/lib/ui/src/lib/components/mockups/MacMenu.svelte
new file mode 100644
index 000000000..60bd466f3
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/mockups/MacMenu.svelte
@@ -0,0 +1,477 @@
+<!--
+	Llama for Mac's menu (0.47), rebuilt from its source (ggml-org/Llama-macOS, Llama/Menu: Layout, Theme, HeaderView,
+	ModelItemView, CatalogItemView, BrowseModelsRow, FooterView) in light mode, every size in points as the app sets it:
+	300 wide, rows inset 5 then 8, 40-point model rows with a 28-point round icon, 13 and 11-point system type at 85,
+	45 and 32% black. The header with the server's dot and address (and, with `network`, the QR code for phones), the
+	installed models with their chips, Recommended for your Mac, Browse models, and the version with Settings and
+	Quit. The models are small and medium ones from llama.app's catalog; their logos are the app's own ModelLogos.
+	`installed` and `recommended` replace the rows (none installed is the first launch, with a grey dot), and
+	`downloading` shows the first recommended row's download in progress. Under a `.dark` ancestor it takes macOS's
+	dark menu material. `annotate` pins a page's own marks (numbered callouts) to the menu's edge, level with the part
+	they point at: the address, Open chat and Recommended for your Mac.
+
+	From the Communications' Mac App Store screenshots in ui/apps/chat (tests/stories/brand/communications/store).
+-->
+<script lang="ts" module>
+	export type MacMenuPart = 'address' | 'chat' | 'recommended';
+
+	export interface MacMenuRow {
+		active?: boolean;
+		logo: string;
+		name: string;
+		params?: string;
+		quant?: string;
+		subtitle: string;
+		vision?: boolean;
+	}
+</script>
+
+<script lang="ts">
+	import gemma from '../../assets/model-logos/gemma.svg?raw';
+	import gpt from '../../assets/model-logos/gpt.svg?raw';
+	import liquid from '../../assets/model-logos/liquid.svg?raw';
+	import qwen from '../../assets/model-logos/qwen.svg?raw';
+	import qr from '../../assets/qr-network.svg?raw';
+	import {
+		ArrowDown,
+		ArrowUpRight,
+		ChevronRight,
+		Copy,
+		Glasses,
+		LayoutGrid,
+		QrCode
+	} from '@lucide/svelte';
+
+	import type { Snippet } from 'svelte';
+
+	type Row = MacMenuRow;
+
+	interface Props {
+		/** a page's mark (a numbered callout) for a part of the menu, centred on the menu's edge level with it */
+		annotate?: Snippet<[MacMenuPart]>;
+		/** the first recommended row's download, from 0 to 1 */
+		downloading?: number;
+		/** the installed models, in place of the default ones; none is the first launch */
+		installed?: Row[];
+		/** the server reachable from other devices: its network address, and the QR code open */
+		network?: boolean;
+		/** the models recommended for this Mac, in place of the default ones */
+		recommended?: Row[];
+	}
+
+	const INSTALLED: Row[] = [
+		{
+			active: true,
+			logo: gemma,
+			name: 'gemma-4',
+			params: 'E4B',
+			quant: 'Q4_K_M',
+			subtitle: '4.59 GB  ∣  128k ctx',
+			vision: true
+		},
+		{
+			logo: gpt,
+			name: 'gpt-oss',
+			params: '20B',
+			quant: 'MXFP4',
+			subtitle: '12.1 GB  ∣  128k ctx'
+		},
+		{
+			logo: liquid,
+			name: 'LFM3-Omni',
+			params: '2B',
+			quant: 'Q8_0',
+			subtitle: '1.8 GB  ∣  32k ctx',
+			vision: true
+		}
+	];
+	const RECOMMENDED: Row[] = [
+		{
+			logo: liquid,
+			name: 'LFM2.5',
+			params: '24B-A2B',
+			quant: 'Q4_K_M',
+			subtitle: 'Good first model  ∣  14.5 GB'
+		},
+		{
+			logo: qwen,
+			name: 'Qwen3.8',
+			params: '27B',
+			quant: 'Q4_K_M',
+			subtitle: '16.8 GB',
+			vision: true
+		}
+	];
+	let {
+		annotate,
+		downloading,
+		installed = INSTALLED,
+		network = false,
+		recommended = RECOMMENDED
+	}: Props = $props();
+
+	const host = $derived(network ? '100.101.42.7:9931' : 'localhost:9931');
+</script>
+
+{#snippet title(row: Row)}
+	<span class="title">
+		{row.name}{#if row.params}<i class="chip squared">{row.params}</i>{/if}{#if row.quant}<i
+				class="chip rounded">{row.quant}</i
+			>{/if}{#if row.vision}<Glasses class="vision" size={13} strokeWidth={1.75} />{/if}
+	</span>
+{/snippet}
+
+<!-- a page's mark, on the menu's edge on the side given -->
+{#snippet mark(part: MacMenuPart, side: 'left' | 'right')}
+	{#if annotate}<span class={['mark', side]}>{@render annotate(part)}</span>{/if}
+{/snippet}
+
+{#snippet modelRow(row: Row, trailing: 'chevron' | 'install', progress?: number)}
+	<div class="row model">
+		<span class={['icon', { active: row.active }]}>{@html row.logo}</span>
+
+		<span class="text">
+			{@render title(row)}
+
+			<span class="subtitle">{row.subtitle}</span>
+		</span>
+
+		{#if trailing === 'chevron'}
+			<ChevronRight class="trailing" size={14} strokeWidth={2} />
+		{:else if progress !== undefined}
+			<span class="percent">{Math.round(progress * 100)}%</span>
+
+			<i class="progress"><i style:width="{progress * 100}%"></i></i>
+		{:else}
+			<ArrowDown class="trailing" size={14} strokeWidth={2} />
+		{/if}
+	</div>
+{/snippet}
+
+<div class="menu">
+	<div class="row header">
+		<p class="name">Llama <i class={['dot', { idle: installed.length === 0 }]}></i></p>
+
+		<p class="actions">
+			<span class="anchor">{@render mark('address', 'left')}{host}</span>
+
+			<Copy class="glyph" size={11} strokeWidth={2} />
+
+			{#if network}<QrCode class="glyph qr" size={11} strokeWidth={2} />{/if}
+
+			{#if installed.length}<span class="open anchor">Open chat{@render mark('chat', 'right')}</span>{/if}
+		</p>
+
+		{#if network}<span class="qrcode">{@html qr}</span>{/if}
+	</div>
+
+	<i class="separator"></i>
+
+	<p class="row section">Installed <span class="link">models</span></p>
+
+	{#each installed as row (row.name)}{@render modelRow(row, 'chevron')}{:else}<p class="row none">
+			None yet
+		</p>{/each}
+
+	<i class="separator"></i>
+
+	<p class="row section anchor">{@render mark('recommended', 'left')}Recommended for your Mac</p>
+
+	{#each recommended as row, i (row.name)}{@render modelRow(
+			row,
+			'install',
+			i === 0 ? downloading : undefined
+		)}{/each}
+
+	<i class="separator"></i>
+
+	<div class="row model">
+		<span class="icon"><LayoutGrid size={16} strokeWidth={1.75} /></span>
+
+		<span class="text">
+			<span class="title">Browse models</span>
+
+			<span class="subtitle">Full catalog on the web</span>
+		</span>
+
+		<ArrowUpRight class="trailing" size={14} strokeWidth={2} />
+	</div>
+
+	<i class="separator"></i>
+
+	<div class="row footer">
+		<span>0.47.0<span class="tertiary"> · llama.cpp b12110</span></span>
+
+		<span class="buttons"><span>Settings</span><span>Quit</span></span>
+	</div>
+</div>
+
+<style>
+	/* the menu: macOS's light menu material, 300 points wide */
+	.menu {
+		--primary: rgb(0 0 0 / 0.85);
+		--secondary: rgb(0 0 0 / 0.45);
+		--tertiary: rgb(0 0 0 / 0.32);
+		--subtle: rgb(0 0 0 / 0.06);
+		--border: rgb(0 0 0 / 0.15);
+		--separator: rgb(0 0 0 / 0.1);
+		--link: #0068da;
+
+		display: flex;
+		flex-direction: column;
+		width: 300px;
+		box-sizing: border-box;
+		padding: 5px 0;
+		border: 0.5px solid rgb(0 0 0 / 0.12);
+		border-radius: 10px;
+		background: rgb(246 246 246 / 0.9);
+		color: var(--primary);
+		font:
+			400 13px / 1.25 -apple-system,
+			BlinkMacSystemFont,
+			'SF Pro Text',
+			system-ui,
+			sans-serif;
+		box-shadow:
+			0 10px 30px rgb(0 0 0 / 0.18),
+			0 0 0 0.5px rgb(0 0 0 / 0.06);
+		backdrop-filter: blur(30px) saturate(1.6);
+	}
+	/* macOS's dark menu material, under a page's dark theme */
+	:global(.dark) .menu {
+		--primary: rgb(255 255 255 / 0.88);
+		--secondary: rgb(255 255 255 / 0.55);
+		--tertiary: rgb(255 255 255 / 0.4);
+		--subtle: rgb(255 255 255 / 0.1);
+		--border: rgb(255 255 255 / 0.2);
+		--separator: rgb(255 255 255 / 0.12);
+		--link: #3d9bff;
+		--icon: rgb(255 255 255 / 0.75);
+		--trailing: rgb(255 255 255 / 0.3);
+
+		border-color: rgb(255 255 255 / 0.14);
+		background: rgb(40 40 42 / 0.82);
+		box-shadow:
+			0 10px 30px rgb(0 0 0 / 0.45),
+			0 0 0 0.5px rgb(0 0 0 / 0.6);
+	}
+	.menu p {
+		margin: 0;
+	}
+	/* a page's mark: a box of no size on the menu's edge, its content centred on it. Every anchor's text starts 13.5
+	   points in (the row's 5 and 8, and the border's half) */
+	.anchor {
+		position: relative;
+	}
+	.mark {
+		position: absolute;
+		top: 50%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 0;
+		height: 0;
+	}
+	.mark.left {
+		left: -13.5px;
+	}
+	.mark.right {
+		right: -13.5px;
+	}
+	.section.anchor .mark.left {
+		left: -5.5px;
+	}
+	/* every row: inset 5 from the menu, then 8 more to its content, 4 above and below */
+	.row {
+		margin: 0 5px;
+		padding: 4px 8px;
+	}
+	.header {
+		display: grid;
+		gap: 4px;
+	}
+	.name {
+		display: flex;
+		align-items: baseline;
+		gap: 6px;
+		font-weight: 600;
+	}
+	.dot {
+		width: 6px;
+		height: 6px;
+		border-radius: 50%;
+		background: #34c759;
+		transform: translateY(-1px);
+	}
+	.actions {
+		display: flex;
+		align-items: center;
+		gap: 6px;
+		font-size: 11px;
+	}
+	.actions :global(.glyph) {
+		color: var(--secondary);
+	}
+	.actions :global(.qr) {
+		margin-left: 4px;
+	}
+	.open {
+		margin-left: auto;
+		color: var(--link);
+	}
+	.qrcode {
+		display: block;
+		width: 90px;
+		height: 90px;
+		margin-top: 6px;
+		color: rgb(0 0 0 / 0.88);
+	}
+	.qrcode :global(svg) {
+		display: block;
+		width: 100%;
+		height: 100%;
+	}
+	:global(.dark) .qrcode {
+		color: rgb(255 255 255 / 0.88);
+	}
+	.dot.idle {
+		background: rgb(0 0 0 / 0.25);
+	}
+	.none {
+		color: var(--secondary);
+		font-size: 11px;
+	}
+	.percent {
+		color: var(--secondary);
+		font-size: 11px;
+		font-variant-numeric: tabular-nums;
+	}
+	.progress {
+		position: absolute;
+		right: 8px;
+		bottom: 0;
+		left: 44px;
+		height: 3px;
+		overflow: hidden;
+		border-radius: 2px;
+		background: var(--subtle);
+	}
+	.progress i {
+		display: block;
+		height: 100%;
+		background: var(--link);
+	}
+	.separator {
+		display: block;
+		height: 1px;
+		margin: 5.5px 13px;
+		background: var(--separator);
+	}
+	.section {
+		font-size: 11px;
+	}
+	.link {
+		margin-left: 2px;
+		color: var(--link);
+	}
+	.model {
+		position: relative;
+		display: flex;
+		align-items: center;
+		gap: 6px;
+		height: 40px;
+		box-sizing: border-box;
+	}
+	/* a model's icon: its maker's logo in a 28-point circle, in the accent when it is loaded */
+	.icon {
+		display: grid;
+		flex: none;
+		place-items: center;
+		width: 28px;
+		height: 28px;
+		border-radius: 50%;
+		background: var(--subtle);
+		color: var(--icon, rgb(0 0 0 / 0.65));
+	}
+	.icon :global(svg) {
+		width: 16px;
+		height: 16px;
+	}
+	.icon.active {
+		background: #007aff;
+		color: #fff;
+	}
+	.text {
+		display: grid;
+		flex: 1;
+		gap: 2px;
+		min-width: 0;
+	}
+	.title {
+		display: flex;
+		align-items: center;
+		gap: 4px;
+		white-space: nowrap;
+	}
+	/* the chips, 14 points high in 9-point medium text: the size outlined, the quant filled */
+	.chip {
+		display: inline-grid;
+		place-items: center;
+		height: 14px;
+		padding: 0 5px;
+		box-sizing: border-box;
+		color: var(--secondary);
+		font:
+			500 9px / 1 -apple-system,
+			BlinkMacSystemFont,
+			'SF Pro Text',
+			system-ui,
+			sans-serif;
+		font-style: normal;
+		letter-spacing: 0.01em;
+	}
+	.squared {
+		border: 1px solid var(--border);
+		border-radius: 4px;
+	}
+	.rounded {
+		border-radius: 7px;
+		background: var(--subtle);
+	}
+	.title :global(.vision) {
+		color: var(--tertiary);
+	}
+	.subtitle {
+		overflow: hidden;
+		color: var(--secondary);
+		font-size: 11px;
+		white-space: pre;
+		text-overflow: ellipsis;
+	}
+	.row :global(.trailing) {
+		flex: none;
+		color: var(--trailing, rgb(0 0 0 / 0.26));
+	}
+	.footer {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		height: 28px;
+		padding-block: 0;
+		box-sizing: border-box;
+		font-size: 11px;
+	}
+	.tertiary {
+		color: var(--secondary);
+	}
+	.buttons {
+		display: flex;
+		gap: 5px;
+	}
+	.buttons span {
+		padding: 2px 4px;
+		border: 1px solid var(--border);
+		border-radius: 5px;
+		color: var(--secondary);
+	}
+</style>
diff --git a/ui/lib/ui/src/lib/components/mockups/WindowsTray.svelte b/ui/lib/ui/src/lib/components/mockups/WindowsTray.svelte
new file mode 100644
index 000000000..1c97d3f12
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/mockups/WindowsTray.svelte
@@ -0,0 +1,650 @@
+<!--
+	Llama for Windows' tray flyout, measured off a screenshot of the app (Morgan's build, November 2026; Windows 11
+	dark at 200%, so every size here is half the screenshot's pixels): the icon with settings and quit; the Models card,
+	a fixed height that clips its list, with the installed models (a chip, the name, tags for size, quant, vision and
+	file size, and folder, delete and run) and, under "Browse more", llama.app's catalog with each maker's logo (the
+	macOS app's ModelLogos); the Hugging Face search; and the server's status with its build. The catalog's lines come
+	without the app's stray Markdown asterisks. `card` draws the Models card alone, for a close-up. `view="details"`
+	shows a model's page in the card instead (after the 0.13 release notes' screenshot): its sizes, and its versions with
+	the fit verdict for this PC, fits or might fit. Always in Windows 11's dark theme, as measured. `annotate` pins a
+	page's own marks (numbered callouts) to the flyout's edge, level with the part they point at: the installed models
+	(on the right, by their run buttons), Browse more, the Hugging Face search and the server's status.
+
+	From the Communications' Microsoft Store screenshots in ui/apps/chat (tests/stories/brand/communications/store).
+-->
+<script lang="ts" module>
+	export type WindowsTrayPart = 'browse' | 'installed' | 'search' | 'status';
+</script>
+
+<script lang="ts">
+	import hfLogo from '../../assets/hf-logo.svg?url';
+	import gemma from '../../assets/model-logos/gemma.svg?raw';
+	import gpt from '../../assets/model-logos/gpt.svg?raw';
+	import liquid from '../../assets/model-logos/liquid.svg?raw';
+	import meta from '../../assets/model-logos/meta.svg?raw';
+	import qwen from '../../assets/model-logos/qwen.svg?raw';
+	import { Logo } from '../app/misc';
+	import {
+		ArrowLeft,
+		Check,
+		ChevronRight,
+		Cpu,
+		Download,
+		Eye,
+		Folder,
+		Monitor,
+		Play,
+		Power,
+		Search,
+		Settings,
+		SquareArrowOutUpRight,
+		Trash2
+	} from '@lucide/svelte';
+	import type { Snippet } from 'svelte';
+
+	interface Props {
+		/** a page's mark (a numbered callout) for a part of the flyout, centred on the flyout's edge level with it */
+		annotate?: Snippet<[WindowsTrayPart]>;
+		/** the Models card alone */
+		card?: boolean;
+		/** the model list, or a model's page with its versions and their fit verdicts */
+		view?: 'details' | 'list';
+	}
+
+	let { annotate, card = false, view = 'list' }: Props = $props();
+
+	// LFM 2.5's page as the app shows it: one size, two versions, each with whether it fits this PC
+	const versions = [
+		{ fit: 'maybe', label: 'Higher quality', quant: 'Q8_0', size: '25.5 GB' },
+		{ fit: 'yes', label: 'Balanced', quant: 'Q4_K_M', size: '14.5 GB' }
+	] as const;
+
+	// small and medium models from llama.app's catalog
+	const installed = [
+		{ name: 'Gemma 4', size: '4.59 GB', tags: ['E4B', 'Q4_K_M'] },
+		{ name: 'LFM 3 Omni', size: '1.8 GB', tags: ['2B', 'Q8_0'] }
+	];
+	// the logos as the app shows them: most in white on the tile, Meta's and Liquid's on a white plate of their own
+	const catalog = [
+		{
+			about: 'OpenAI’s open-weight family for local reasoning and agents.',
+			logo: gpt,
+			name: 'GPT-OSS',
+			sizes: '20B · 120B'
+		},
+		{
+			about: 'Google’s most capable open agentic models for your laptops.',
+			logo: gemma,
+			name: 'Gemma 4',
+			sizes: 'E2B · E4B · 12B · 26B-A4B · 31B'
+		},
+		{
+			about: 'Alibaba’s multimodal mid-sized models for coding and research.',
+			logo: qwen,
+			name: 'Qwen 3.8',
+			sizes: '27B'
+		},
+		{
+			about: 'Meta’s local model to run on your laptop powering always-on agents.',
+			logo: meta,
+			name: 'Muse Glimmer',
+			plate: 'square',
+			sizes: '30B'
+		},
+		{
+			about: 'Liquid AI’s fast local model for reasoning and tool use.',
+			logo: liquid,
+			name: 'LFM 2.5',
+			plate: 'round',
+			sizes: '24B-A2B'
+		},
+		{
+			about: 'Liquid AI’s tiny omni model for text, images, and audio.',
+			logo: liquid,
+			name: 'LFM 3 Omni',
+			plate: 'round',
+			sizes: '2B'
+		}
+	];
+</script>
+
+<!-- a page's mark, on the flyout's edge on the side given -->
+{#snippet mark(part: WindowsTrayPart, side: 'left' | 'right')}
+	{#if annotate && !card}<span class={['mark', side]}>{@render annotate(part)}</span>{/if}
+{/snippet}
+
+{#snippet models()}
+	<div class="card">
+		<p class="card-title">
+			Models <span class="open"><SquareArrowOutUpRight size={13} strokeWidth={1.5} /></span>
+		</p>
+
+		{#each installed as m (m.name)}
+			<div class="row installed">
+				<span class="tile"><Cpu size={18} strokeWidth={1.75} /></span>
+
+				<span class="info">
+					<b>{m.name}</b>
+
+					<span class="tags">
+						{#each m.tags as tag (tag)}<i>{tag}</i>{/each}
+
+						<i aria-label="vision"><Eye size={11} strokeWidth={1.5} /></i>
+
+						<span>{m.size}</span>
+					</span>
+				</span>
+
+				<span class="actions">
+					<Folder size={17} strokeWidth={1.2} />
+
+					<Trash2 size={17} strokeWidth={1.2} />
+
+					<Play size={17} strokeWidth={1.2} />
+				</span>
+			</div>
+		{/each}
+
+		<p class="browse">Browse more</p>
+
+		{#each catalog as m (m.name)}
+			<div class="row">
+				<span class="tile">
+					<span class={['logo', m.plate]}>{@html m.logo}</span>
+				</span>
+
+				<span class="info">
+					<b>{m.name}<span class="bar">|</span><span class="sizes">{m.sizes}</span></b>
+
+					<small>{m.about}</small>
+				</span>
+
+				<ChevronRight size={13} strokeWidth={1.5} />
+			</div>
+		{/each}
+	</div>
+{/snippet}
+
+{#snippet details()}
+	<div class="card details">
+		<p class="back"><ArrowLeft size={15} strokeWidth={1.5} />Models</p>
+
+		<div class="model">
+			<span class="tile big"><span class="logo round">{@html liquid}</span></span>
+
+			<span class="info">
+				<b>LFM 2.5</b>
+
+				<small class="clamp"
+					>Liquid AI’s reasoning mixture-of-experts model with 24B parameters and 2B active, built
+					for fast on-device agents.</small
+				>
+			</span>
+		</div>
+
+		<p class="label">Choose a model size</p>
+
+		<span class="size">24B-A2B</span>
+
+		<p class="label">Choose a version</p>
+
+		{#each versions as v (v.quant)}
+			<div class="version">
+				<Download size={16} strokeWidth={1.25} />
+
+				<span class="name">{v.label}</span>
+
+				<span class="weight">{v.quant} · {v.size}</span>
+
+				<span
+					aria-label={v.fit === 'yes' ? 'Fits this PC' : 'Might fit this PC'}
+					class={['fit', v.fit]}
+					role="img"
+				>
+					{#if v.fit === 'yes'}<Check size={9} strokeWidth={3} />{:else}?{/if}
+				</span>
+			</div>
+		{/each}
+	</div>
+{/snippet}
+
+{#snippet body()}
+	{#if view === 'details'}{@render details()}{:else}{@render models()}{/if}
+{/snippet}
+
+{#if card}
+	<div class="flyout only-card">{@render body()}</div>
+{:else}
+	<div class="flyout">
+		<!-- the card clips its list, so its parts' marks hang off the flyout, at their rows' fixed heights -->
+		{#if view === 'list'}
+			<span class="card-mark installed-mark">{@render mark('installed', 'right')}</span>
+			<span class="card-mark browse-mark">{@render mark('browse', 'left')}</span>
+		{/if}
+
+		<div class="head">
+			<Logo class="icon" style="--size: 20px" />
+
+			<span class="buttons"
+				><Settings size={15} strokeWidth={1.5} /><Power size={15} strokeWidth={1.5} /></span
+			>
+		</div>
+
+		{@render body()}
+
+		<div class="search">
+			{@render mark('search', 'left')}
+			<span class="hf"><img alt="Hugging Face" src={hfLogo} /></span>
+
+			<span class="field">Search models …<Search size={12} strokeWidth={1.75} /></span>
+		</div>
+
+		<p class="status">
+			{@render mark('status', 'left')}
+			<i class="dot"></i>0.14.1.0 - version: 0.8.0-dev (build 12019, commit 1052f7e1d)<Monitor
+				size={13}
+				strokeWidth={1.75}
+			/>
+		</p>
+	</div>
+{/if}
+
+<style>
+	/* a model's page in the card: measured off the 0.13 release notes' screenshot, at half its pixels */
+	.details {
+		padding: 10px 16px 16px 24px;
+	}
+	.back {
+		display: flex;
+		align-items: center;
+		gap: 8px;
+		height: 31.5px;
+		margin: 0;
+		color: rgb(255 255 255 / 0.82);
+		font-size: 13.5px;
+	}
+	.model {
+		display: flex;
+		align-items: flex-start;
+		gap: 10px;
+		margin: 10px 0 0 -1.5px;
+	}
+	.tile.big {
+		width: 40px;
+		height: 40px;
+	}
+	.tile.big .logo.round {
+		width: 28px;
+		height: 28px;
+		padding: 5px;
+	}
+	.clamp {
+		display: -webkit-box;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 2;
+		line-clamp: 2;
+		white-space: normal !important;
+	}
+	.label {
+		margin: 16px 0 8px;
+		color: rgb(255 255 255 / 0.85);
+		font-size: 13px;
+		font-weight: 600;
+	}
+	.size {
+		display: inline-grid;
+		place-items: center;
+		align-self: flex-start;
+		height: 29px;
+		padding: 0 8px;
+		box-sizing: border-box;
+		border: 1.5px solid #4cc2ff;
+		border-radius: 4px;
+		background: #3c3d3f;
+		font-size: 13px;
+		font-weight: 600;
+	}
+	.version {
+		display: flex;
+		align-items: center;
+		gap: 12px;
+		height: 30px;
+		padding: 0 4px;
+		color: rgb(255 255 255 / 0.85);
+	}
+	.version .name {
+		flex: 1;
+		color: #fff;
+		font-size: 14px;
+	}
+	.weight {
+		font-size: 13px;
+	}
+	.fit {
+		display: grid;
+		place-items: center;
+		width: 12.5px;
+		height: 12.5px;
+		border-radius: 2.5px;
+		font:
+			700 10px / 1 'Segoe UI Variable Text',
+			'Segoe UI',
+			system-ui,
+			sans-serif;
+	}
+	.fit.maybe {
+		background: #fe9a00;
+		color: #1a1a1a;
+	}
+	.fit.yes {
+		background: #009966;
+		color: #fff;
+	}
+
+	/* Windows 11's dark acrylic flyout, its card a step lighter, in Segoe UI where there is one */
+	.flyout {
+		position: relative;
+		display: flex;
+		flex-direction: column;
+		width: 417px;
+		height: 560px;
+		box-sizing: border-box;
+		border: 1px solid rgb(255 255 255 / 0.16);
+		border-radius: 8px;
+		background: #242422;
+		color: #fff;
+		font:
+			400 12.5px / 1.3 'Segoe UI Variable Text',
+			'Segoe UI',
+			system-ui,
+			sans-serif;
+		box-shadow: 0 16px 40px rgb(0 0 0 / 0.4);
+	}
+	.only-card {
+		width: auto;
+		height: auto;
+		border: 0;
+		background: none;
+		box-shadow: none;
+	}
+	.head {
+		display: flex;
+		flex: none;
+		align-items: center;
+		justify-content: space-between;
+		height: 44px;
+		margin: 0 15px;
+		border-bottom: 1px solid rgb(255 255 255 / 0.12);
+	}
+	.head :global(.icon) {
+		display: grid;
+		color: #fff;
+	}
+	/* a page's mark: a box of no size on the flyout's edge, its content centred on it. The card and its rows start 17
+	   pixels in (its margin and the flyout's border), the search and the status 16 */
+	.mark {
+		position: absolute;
+		top: 50%;
+		z-index: 1;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 0;
+		height: 0;
+	}
+	.mark.left {
+		left: -17px;
+	}
+	.mark.right {
+		right: -16px;
+	}
+	/* the card's top is 58 pixels down (the border, the 44 head and the 13 above it), its title 31.5 high, the
+	   installed rows 48 each and Browse more 28 */
+	.card-mark {
+		position: absolute;
+		right: 0;
+		left: 0;
+		height: 0;
+	}
+	.installed-mark {
+		top: 113.5px;
+	}
+	.browse-mark {
+		top: 199.5px;
+	}
+	.card-mark .mark.left {
+		left: 0;
+	}
+	.card-mark .mark.right {
+		right: 0;
+	}
+	.search .mark.left,
+	.status .mark.left {
+		left: -16px;
+	}
+	.buttons {
+		display: flex;
+		gap: 13px;
+	}
+
+	.card {
+		display: flex;
+		flex: none;
+		flex-direction: column;
+		width: 386px;
+		height: 410px;
+		box-sizing: border-box;
+		margin: 13px 15px 0 16px;
+		overflow: hidden;
+		border-radius: 8px;
+		background: #31302d;
+		box-shadow:
+			0 0 0 1px rgb(0 0 0 / 0.18),
+			0 1px 2px rgb(0 0 0 / 0.3);
+	}
+	.card-title {
+		display: flex;
+		flex: none;
+		align-items: center;
+		gap: 10px;
+		height: 31.5px;
+		margin: 0;
+		padding: 7px 0 0 9px;
+		box-sizing: border-box;
+		color: rgb(255 255 255 / 0.82);
+		font-size: 13.5px;
+	}
+	.open {
+		display: grid;
+		color: rgb(255 255 255 / 0.75);
+	}
+
+	.row {
+		position: relative;
+		display: flex;
+		flex: none;
+		align-items: center;
+		gap: 10.5px;
+		height: 45.5px;
+		padding: 0 19px 0 16px;
+		color: #fff;
+	}
+	.installed {
+		height: 48px;
+		padding-right: 22px;
+	}
+	/* the separators run from the tile's edge to 16px short of the card's */
+	.row + .row::before {
+		position: absolute;
+		top: 0;
+		right: 16px;
+		left: 16px;
+		height: 1px;
+		background: rgb(255 255 255 / 0.1);
+		content: '';
+	}
+	.tile {
+		display: grid;
+		flex: none;
+		place-items: center;
+		width: 32px;
+		height: 32px;
+		border-radius: 4px;
+		background: #474541;
+	}
+	.logo {
+		display: grid;
+		place-items: center;
+		width: 22.5px;
+		height: 22.5px;
+		color: #fff;
+	}
+	.logo :global(svg) {
+		width: 100%;
+		height: 100%;
+	}
+	/* Meta's mark in its blue on a white square, Liquid's in black on a white disc */
+	.logo.square {
+		width: 24px;
+		height: 24px;
+		padding: 3px;
+		box-sizing: border-box;
+		border-radius: 1px;
+		background: #fff;
+		color: #0668e1;
+	}
+	.logo.round {
+		width: 23px;
+		height: 23px;
+		padding: 4px;
+		box-sizing: border-box;
+		border-radius: 50%;
+		background: #fff;
+		color: #000;
+	}
+	.info {
+		display: grid;
+		flex: 1;
+		gap: 2px;
+		min-width: 0;
+	}
+	.info b {
+		overflow: hidden;
+		font-weight: 600;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+	}
+	.bar {
+		margin: 0 7px;
+		color: rgb(255 255 255 / 0.7);
+		font-weight: 400;
+	}
+	.sizes {
+		color: rgb(255 255 255 / 0.85);
+		font-weight: 400;
+	}
+	.info small {
+		overflow: hidden;
+		color: rgb(255 255 255 / 0.85);
+		font-size: 10.75px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+	}
+	.tags {
+		display: flex;
+		align-items: center;
+		gap: 7px;
+		color: rgb(255 255 255 / 0.85);
+		font-size: 11px;
+	}
+	.tags i {
+		display: inline-grid;
+		place-items: center;
+		height: 15px;
+		padding: 0 4px;
+		border-radius: 3px;
+		background: #474541;
+		font-style: normal;
+	}
+	.actions {
+		display: flex;
+		gap: 11.5px;
+		color: rgb(255 255 255 / 0.8);
+	}
+	.row :global(.lucide-chevron-right) {
+		flex: none;
+		color: rgb(255 255 255 / 0.75);
+	}
+	.browse {
+		display: flex;
+		flex: none;
+		align-items: center;
+		gap: 8px;
+		height: 28px;
+		margin: 0;
+		padding: 0 7.5px 0 8.5px;
+		color: rgb(255 255 255 / 0.62);
+		font-size: 11.5px;
+	}
+	.browse::before,
+	.browse::after {
+		flex: 1;
+		height: 1px;
+		background: rgb(255 255 255 / 0.1);
+		content: '';
+	}
+
+	.search {
+		position: relative;
+		display: flex;
+		flex: none;
+		gap: 4px;
+		height: 32px;
+		margin: 13.5px 14px 0 15px;
+	}
+	.hf {
+		display: grid;
+		flex: none;
+		place-items: center;
+		width: 32px;
+		border-radius: 4px;
+		background: #393937;
+	}
+	.hf img {
+		width: 19px;
+		height: 19px;
+	}
+	.field {
+		display: flex;
+		flex: 1;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 14px 0 11.5px;
+		border-radius: 4px;
+		background: #343431;
+		box-shadow: inset 0 -1px 0 #a4a4a2;
+		color: rgb(255 255 255 / 0.78);
+		font-size: 12.5px;
+	}
+	.status {
+		position: relative;
+		display: flex;
+		flex: 1;
+		align-items: center;
+		justify-content: center;
+		gap: 7px;
+		margin: 13px 15px 0;
+		border-top: 1px solid rgb(255 255 255 / 0.1);
+		font-size: 11px;
+		font-weight: 600;
+	}
+	.status :global(svg) {
+		color: #4d9be6;
+	}
+	.dot {
+		width: 7px;
+		height: 7px;
+		border-radius: 50%;
+		background: #6dbe61;
+	}
+</style>
diff --git a/ui/lib/ui/src/lib/components/mockups/index.ts b/ui/lib/ui/src/lib/components/mockups/index.ts
new file mode 100644
index 000000000..1a7f128f6
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/mockups/index.ts
@@ -0,0 +1,11 @@
+// mockups of the native apps' UIs, as the brand's communications draw them: Llama for Mac's menu and Llama for
+// Windows' tray flyout
+export {
+  default as MacMenu,
+  type MacMenuPart,
+  type MacMenuRow,
+} from "./MacMenu.svelte";
+export {
+  default as WindowsTray,
+  type WindowsTrayPart,
+} from "./WindowsTray.svelte";
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelCapabilityIcons.svelte b/ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte
similarity index 63%
rename from ui/apps/chat/src/lib/components/app/models/ModelCapabilityIcons.svelte
rename to ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte
index bd1fe1863..93876fcf8 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelCapabilityIcons.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte
@@ -1,5 +1,6 @@
 <script lang="ts">
-	import * as Tooltip from '#lib/components/ui/tooltip/index.ts';
+	import { Badge } from '../ui/badge';
+	import * as Tooltip from '../ui/tooltip';
 	import {
 		CAPABILITY_ICONS,
 		CAPABILITY_LABELS,
@@ -7,11 +8,13 @@
 		MODALITY_ICONS,
 		MODALITY_LABELS,
 		MODALITY_ORDER
-	} from '#lib/constants/index.ts';
-	import { ModelCapability } from '#lib/enums/index.ts';
-	import type { ModelModalities } from '#lib/types/models.js';
+	} from '../../models/constants';
+	import { ModelCapability } from '../../models/enums';
+	import type { ModelModalities } from '../../models/types';

 	interface Props {
+		/** Name every capability in an outline badge, the way the MCP server cards do. */
+		asBadges?: boolean;
 		modalities?: ModelModalities;
 		supportsThinking?: boolean;
 		supportsToolUse?: boolean;
@@ -22,10 +25,11 @@
 	}

 	let {
+		asBadges = false,
 		gapClass = 'gap-1.25',
 		hideCapabilities = false,
 		hideModalities = false,
-		iconSize = 'h-3 w-3',
+		iconSize = 'size-icon-xs',
 		modalities,
 		supportsThinking = false,
 		supportsToolUse = false
@@ -48,7 +52,33 @@
 	);
 </script>

-{#if hasIcons}
+{#if hasIcons && asBadges}
+	<span class="inline-flex flex-wrap items-center gap-1.5">
+		{#if !hideCapabilities}
+			{#each capabilities as capability (capability)}
+				{@const Icon = CAPABILITY_ICONS[capability]}
+
+				<Badge class="h-5 gap-1 px-1.5 text-[10px]" variant="outline">
+					<Icon class="size-icon-xs text-muted-foreground" />
+
+					{CAPABILITY_LABELS[capability]}
+				</Badge>
+			{/each}
+		{/if}
+
+		{#if !hideModalities}
+			{#each shownModalities as modality (modality)}
+				{@const Icon = MODALITY_ICONS[modality]}
+
+				<Badge class="h-5 gap-1 px-1.5 text-[10px]" variant="outline">
+					<Icon class="size-icon-xs text-muted-foreground" />
+
+					{MODALITY_LABELS[modality]}
+				</Badge>
+			{/each}
+		{/if}
+	</span>
+{:else if hasIcons}
 	<span class="inline-flex items-center {gapClass}">
 		{#if !hideCapabilities}
 			{#each capabilities as capability (capability)}
diff --git a/ui/lib/ui/src/lib/components/models/ModelCard.svelte b/ui/lib/ui/src/lib/components/models/ModelCard.svelte
new file mode 100644
index 000000000..f6fc5076f
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelCard.svelte
@@ -0,0 +1,104 @@
+<script lang="ts">
+	import * as Card from '../ui/card';
+	import type { Snippet } from 'svelte';
+
+	interface Props {
+		/** Avatar at the card's top left. */
+		avatar: Snippet;
+		/** The model's name and badges, beside the avatar; the card's one button. */
+		title: Snippet;
+		/** Controls at the top right, e.g. an actions menu. */
+		actions?: Snippet;
+		/** Body between the header and the footer: capabilities, a description. */
+		children?: Snippet;
+		class?: string;
+		/** Faded, e.g. a hidden model. */
+		dimmed?: boolean;
+		/** Muted facts at the bottom left. */
+		footer?: Snippet;
+		/** Bottom right of the footer, e.g. a load control. */
+		footerEnd?: Snippet;
+		onSelect?: () => void;
+		/** Laid over the card's edge, e.g. a download progress bar. */
+		overlay?: Snippet;
+		/** `aria-pressed` of the card's button; undefined leaves it a plain button. */
+		pressed?: boolean;
+		selected?: boolean;
+		/** Native title of the card's button, e.g. the full model id. */
+		tooltip?: string;
+		/** Makes the card a link instead of a button, for pages where a model has a page of its own (llama-ui only). */
+		href?: string;
+	}
+
+	let {
+		actions,
+		avatar,
+		children,
+		class: className = '',
+		dimmed = false,
+		footer,
+		footerEnd,
+		href,
+		onSelect,
+		overlay,
+		pressed,
+		selected = false,
+		title,
+		tooltip
+	}: Props = $props();
+</script>
+
+<!-- The surface of the MCP server cards. The title button (or link) stretches over the whole card,
+     so a click anywhere opens the model, while the controls stack above it: a button
+     nested in a button is invalid. -->
+<Card.Root
+	class={[
+		'relative min-w-0 gap-3! overflow-hidden bg-muted/30 p-4 transition-colors hover:bg-muted/50',
+		selected && 'ring-1 ring-primary/40',
+		dimmed && 'opacity-60',
+		className
+	]}
+>
+	<div class="flex min-w-0 items-start gap-3">
+		<svelte:element
+			this={href ? 'a' : 'button'}
+			aria-pressed={href ? undefined : pressed}
+			class="flex min-w-0 flex-1 cursor-pointer items-center gap-3 text-left before:absolute before:inset-0 before:content-[''] focus-visible:outline-none focus-visible:before:rounded-xl focus-visible:before:ring-2 focus-visible:before:ring-ring/50"
+			{href}
+			onclick={onSelect}
+			role={href ? 'link' : 'button'}
+			title={tooltip}
+			type={href ? undefined : 'button'}
+		>
+			{@render avatar()}
+
+			<span class="min-w-0 flex-1">
+				{@render title()}
+			</span>
+		</svelte:element>
+
+		{#if actions}
+			<div class="relative z-10 -mt-1 -mr-1.5 shrink-0">
+				{@render actions()}
+			</div>
+		{/if}
+	</div>
+
+	{@render children?.()}
+
+	{#if footer || footerEnd}
+		<div class="mt-auto flex min-h-6 items-center justify-between gap-3 text-xs">
+			<div class="min-w-0 text-muted-foreground">
+				{@render footer?.()}
+			</div>
+
+			{#if footerEnd}
+				<div class="relative z-10 flex shrink-0 items-center">
+					{@render footerEnd()}
+				</div>
+			{/if}
+		</div>
+	{/if}
+
+	{@render overlay?.()}
+</Card.Root>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelDownloadProgressBar.svelte b/ui/lib/ui/src/lib/components/models/ModelDownloadProgressBar.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/app/models/ModelDownloadProgressBar.svelte
rename to ui/lib/ui/src/lib/components/models/ModelDownloadProgressBar.svelte
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelDraftSidecars.svelte b/ui/lib/ui/src/lib/components/models/ModelDraftSidecars.svelte
similarity index 64%
rename from ui/apps/chat/src/lib/components/app/models/ModelDraftSidecars.svelte
rename to ui/lib/ui/src/lib/components/models/ModelDraftSidecars.svelte
index 8b9c4e071..6fd15ebbe 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelDraftSidecars.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelDraftSidecars.svelte
@@ -1,24 +1,23 @@
+<!--
+	A model's draft sidecars, one badge each, titled with the sidecar's own quant when it has one.
+-->
 <script lang="ts">
-	import { MODEL_VARIANT_BADGE_CLASS } from '#lib/constants/index.ts';
-	import type { ModelSidecarBadge } from '#lib/types/models.js';
-	import { isAuxSidecar } from '#lib/utils/index.ts';
+	import { MODEL_VARIANT_BADGE_CLASS } from '../../models/constants';
+	import type { ModelDraftSidecarBadge } from '../../models/types';
 	import { SvelteSet } from 'svelte/reactivity';

 	interface Props {
 		/** Draft sidecars available for the model, each with its own quant. */
-		draftSidecars?: ModelSidecarBadge[];
+		draftSidecars?: ModelDraftSidecarBadge[];
 	}

 	let { draftSidecars = [] }: Props = $props();

-	// the router listing and the --model-draft args both report a model's drafts, so
-	// the same sidecar can arrive twice
+	// an app can learn of the same sidecar from more than one place
 	let badges = $derived.by(() => {
 		const seen = new SvelteSet<string>();

 		return draftSidecars.filter((badge) => {
-			if (isAuxSidecar(badge.kind)) return false;
-
 			const key = `${badge.kind}:${badge.quant ?? ''}`;

 			if (seen.has(key)) return false;
diff --git a/ui/lib/ui/src/lib/components/models/ModelFamilyCard.svelte b/ui/lib/ui/src/lib/components/models/ModelFamilyCard.svelte
new file mode 100644
index 000000000..9ebbced0e
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelFamilyCard.svelte
@@ -0,0 +1,130 @@
+<!--
+	A model family as llama.app's catalog shows it, built on ModelCard: the maker's avatar with the publisher of the
+	GGUFs in the corner, the name over its sizes in one quiet line, what it can do as icons at the top right (each named
+	in its tooltip), the description, then the download and the memory it needs at the foot and the release month (or
+	Non-commercial, or a status such as "Downloaded") at the end. The whole card is one link or button.
+-->
+<script lang="ts">
+	import ModelCapabilityIcons from './ModelCapabilityIcons.svelte';
+	import ModelCard from './ModelCard.svelte';
+	import ModelOrgAvatar from './ModelOrgAvatar.svelte';
+	import { Database, MemoryStick } from '@lucide/svelte';
+	import { formatFileSize, formatSizeRange } from '../../models/format';
+	import type { ModelModalities, ModelSizeRange } from '../../models/types';
+	import type { Snippet } from 'svelte';
+
+	interface Props {
+		/** The family's name, e.g. `Gemma 4`. */
+		name: string;
+		/** The maker's Hugging Face org, e.g. `google`; its avatar leads the card. */
+		org: string;
+		/** Who published the GGUFs, e.g. `ggml-org`, in the avatar's corner when it isn't the maker. */
+		quantOrg?: string;
+		/** The family's sizes in one line, e.g. from `summarizeSizes`: `E2B–31B · 5 sizes`. */
+		sizes: string;
+		modalities?: ModelModalities;
+		supportsThinking?: boolean;
+		supportsToolUse?: boolean;
+		/** Download size across the family's files, in bytes. */
+		sizeRange?: ModelSizeRange | null;
+		/** Memory (GB) the smallest size needs. */
+		memGb?: number | null;
+		/** When it came out, e.g. `Mar 2026`; shown at the end of the foot. */
+		released?: string;
+		/** The license forbids commercial use; takes the release month's place, in the warning ink. */
+		nonCommercial?: boolean;
+		/** Takes the foot's end before Non-commercial and the release month, e.g. a status Badge saying the family is
+		 * already on this computer. */
+		status?: Snippet;
+		/** Plain description, two lines at most; `children` replaces it for richer text. */
+		description?: string;
+		children?: Snippet;
+		href?: string;
+		onSelect?: () => void;
+		class?: string;
+	}
+
+	let {
+		children,
+		class: className = '',
+		description,
+		href,
+		memGb = null,
+		modalities,
+		name,
+		nonCommercial = false,
+		onSelect,
+		org,
+		quantOrg,
+		released,
+		sizeRange = null,
+		sizes,
+		status,
+		supportsThinking = false,
+		supportsToolUse = false
+	}: Props = $props();
+</script>
+
+<ModelCard class={className} {href} {onSelect} tooltip={name}>
+	{#snippet avatar()}
+		<ModelOrgAvatar {org} {quantOrg} />
+	{/snippet}
+
+	{#snippet title()}
+		<span class="flex min-w-0 flex-col gap-0.5">
+			<span class="truncate font-medium">{name}</span>
+
+			<span class="truncate font-mono text-caption text-muted-foreground tabular-nums">{sizes}</span>
+		</span>
+	{/snippet}
+
+	<!-- at the top right, where the card keeps its controls: above the card's link, so each icon's tooltip is its own
+	     button rather than one nested in the link -->
+	{#snippet actions()}
+		<span class="flex h-9 items-center pr-1.5">
+			<ModelCapabilityIcons {modalities} {supportsThinking} {supportsToolUse} />
+		</span>
+	{/snippet}
+
+	<!-- body-sm rather than the app cards' 12px: on a page people read to choose, the two lines carry the pitch -->
+	<div class="line-clamp-2 text-body-sm text-pretty text-muted-foreground">
+		{#if children}
+			{@render children()}
+		{:else if description}
+			{description}
+		{/if}
+	</div>
+
+	{#snippet footer()}
+		<span class="flex items-center gap-3 whitespace-nowrap tabular-nums">
+			{#if sizeRange}
+				<span class="inline-flex items-center gap-1" title="Download size">
+					<Database class="size-icon-xs" />
+
+					{sizeRange.min === sizeRange.max
+						? formatFileSize(sizeRange.min)
+						: formatSizeRange(sizeRange.min, sizeRange.max)}
+				</span>
+			{/if}
+
+			{#if memGb}
+				<span class="inline-flex items-center gap-1" title="Memory the smallest size needs">
+					<MemoryStick class="size-icon-xs" />
+
+					{memGb} GB+
+				</span>
+			{/if}
+		</span>
+	{/snippet}
+
+	{#snippet footerEnd()}
+		{#if status}
+			{@render status()}
+		{:else if nonCommercial}
+			<!-- in the warning ink rather than a badge, so it costs no more room than the date it replaces -->
+			<span class="text-(--fg-warning)" title="The license forbids commercial use">Non-commercial</span>
+		{:else if released}
+			<span class="text-muted-foreground tabular-nums" title="Released">{released}</span>
+		{/if}
+	{/snippet}
+</ModelCard>
diff --git a/ui/lib/ui/src/lib/components/models/ModelId.svelte b/ui/lib/ui/src/lib/components/models/ModelId.svelte
new file mode 100644
index 000000000..eb9f8a4fb
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelId.svelte
@@ -0,0 +1,245 @@
+<!--
+	A model's name with its badges (draft kind, parameters, quantization, drafts, aliases, tags) and its capability,
+	context and size icons. The app passes the parts it already knows (a parsed id, a catalog entry) and the user's
+	display settings as the props it sets or leaves out, so the same markup serves Llama Chat and llama.app.
+-->
+<script lang="ts">
+	import ModelCapabilityIcons from './ModelCapabilityIcons.svelte';
+	import ModelDraftSidecars from './ModelDraftSidecars.svelte';
+	import * as Tooltip from '../ui/tooltip';
+	import { Database, ScrollText } from '@lucide/svelte';
+	import {
+		MODEL_BADGE_CLASS,
+		MODEL_TAG_BADGE_CLASS,
+		MODEL_VARIANT_BADGE_CLASS
+	} from '../../models/constants';
+	import { formatParameters, formatSizeRange } from '../../models/format';
+	import type { ModelDraftSidecarBadge, ModelModalities, ModelSizeRange } from '../../models/types';
+
+	interface Props {
+		/** The model's name, e.g. `gemma-4` or `Gemma 4 E4B`. */
+		name: string;
+		/** The org or author, shown before the name as `org/name` unless `hideOrgName`. */
+		org?: string;
+		/** Total parameters, e.g. `26B`. */
+		params?: string;
+		/** Parameters active per token in a mixture of experts, e.g. `A4B`; joined to `params` as `26B-A4B`. */
+		activatedParams?: string;
+		/** Quantization, e.g. `Q4_K_M`. */
+		quantization?: string;
+		/** The draft kind the model itself is, e.g. `mtp` for an MTP head; badged first. */
+		sidecar?: string;
+		/** Draft sidecar kinds the model comes with, e.g. `mtp`, one badge each and no quant. */
+		draftKinds?: string[];
+		/** Draft sidecars the model comes with, badged with their own quant. */
+		draftSidecars?: ModelDraftSidecarBadge[];
+		/**
+		 * Names the model is served under. One alias replaces the name, which moves to a badge; more than one are
+		 * badged after the name, two at most and then `+x more`.
+		 */
+		aliases?: string[];
+		tags?: string[];
+		modalities?: ModelModalities;
+		supportsThinking?: boolean;
+		supportsToolUse?: boolean;
+		/** Context length in tokens; renders a context icon when set. */
+		contextLength?: number;
+		/** Min/max file size across quants, in bytes; renders a size icon when set. */
+		sizeRange?: ModelSizeRange | null;
+		hideName?: boolean;
+		hideOrgName?: boolean;
+		hideCapabilities?: boolean;
+		hideModalities?: boolean;
+		/** Render the capability/modality/context icons on a second row. */
+		iconsOnNewLine?: boolean;
+		/** Give the name a row of its own, with its badges and icons together under it. */
+		stackId?: boolean;
+		/** Allow badges to wrap onto new lines instead of truncating. */
+		wrap?: boolean;
+		/** Native title for the root element; keeps long lists light where a floating tooltip per row is too costly. */
+		title?: string;
+		/** Shown in a tooltip over the name and badges, e.g. the raw id the name was parsed from. */
+		tooltip?: string;
+		class?: string;
+	}
+
+	let {
+		activatedParams,
+		aliases = [],
+		class: className = '',
+		contextLength,
+		draftKinds = [],
+		draftSidecars = [],
+		hideCapabilities = false,
+		hideModalities = false,
+		hideName = false,
+		hideOrgName = false,
+		iconsOnNewLine = false,
+		modalities,
+		name,
+		org,
+		params,
+		quantization,
+		sidecar,
+		sizeRange,
+		stackId = false,
+		supportsThinking = false,
+		supportsToolUse = false,
+		tags = [],
+		title,
+		tooltip,
+		wrap = false,
+		...rest
+	}: Props = $props();
+
+	/** Alias badges beyond this many collapse into a single `+x more` badge. */
+	const MAX_ALIAS_BADGES = 2;
+
+	let uniqueAliases = $derived([...new Set(aliases)]);
+	let uniqueTags = $derived([...new Set(tags)]);
+	// the model itself can already be one of the kinds
+	let uniqueDraftKinds = $derived([...new Set(draftKinds.filter((kind) => kind !== sidecar))]);
+
+	let primaryAlias = $derived(uniqueAliases.length === 1 ? uniqueAliases[0] : null);
+	let displayName = $derived(primaryAlias ?? name);
+
+	let hasBadges = $derived(
+		sidecar ||
+			uniqueDraftKinds.length > 0 ||
+			draftSidecars.length > 0 ||
+			params ||
+			quantization ||
+			primaryAlias ||
+			uniqueAliases.length > 1 ||
+			uniqueTags.length > 0
+	);
+</script>
+
+{#snippet nameAndBadges()}
+	{#if !hideName}
+		<span class="min-w-0 truncate font-medium {stackId ? 'basis-full' : ''}">
+			{#if !hideOrgName && org}{org}/{/if}{displayName}
+		</span>
+	{/if}
+
+	{#if hasBadges}
+		<!-- the badges keep their width, so a long name truncates around them instead of
+		     a label being cut in half -->
+		<span
+			class="inline-flex min-w-0 items-center gap-1 overflow-hidden {wrap
+				? 'flex-wrap'
+				: 'shrink-0'}"
+		>
+			{#if sidecar}
+				<span class={MODEL_VARIANT_BADGE_CLASS} title={`${sidecar.toUpperCase()} draft model`}>
+					{sidecar}
+				</span>
+			{/if}
+
+			{#if params}
+				<span class={MODEL_BADGE_CLASS}>
+					{params}{activatedParams ? `-${activatedParams}` : ''}
+				</span>
+			{/if}
+
+			{#if quantization}
+				<span class={MODEL_BADGE_CLASS}>{quantization}</span>
+			{/if}
+
+			{#each uniqueDraftKinds as kind (kind)}
+				<span class={MODEL_VARIANT_BADGE_CLASS} title="{kind.toUpperCase()} draft model">
+					{kind}
+				</span>
+			{/each}
+
+			<ModelDraftSidecars {draftSidecars} />
+
+			{#if primaryAlias}
+				{#if primaryAlias !== name}
+					<span class="{MODEL_BADGE_CLASS} max-w-32 truncate" title={name}>{name}</span>
+				{/if}
+			{:else if uniqueAliases.length > 1}
+				{#each uniqueAliases.slice(0, MAX_ALIAS_BADGES) as alias (alias)}
+					<span class="{MODEL_BADGE_CLASS} max-w-32 truncate" title={alias}>{alias}</span>
+				{/each}
+
+				{#if uniqueAliases.length > MAX_ALIAS_BADGES}
+					<span class={MODEL_BADGE_CLASS} title={uniqueAliases.slice(MAX_ALIAS_BADGES).join(', ')}>
+						+{uniqueAliases.length - MAX_ALIAS_BADGES} more
+					</span>
+				{/if}
+			{/if}
+
+			{#each uniqueTags as tag (tag)}
+				<span class={MODEL_TAG_BADGE_CLASS}>{tag}</span>
+			{/each}
+		</span>
+	{/if}
+{/snippet}
+
+<!-- badges, tags and icons do not shrink, so overflow-hidden bounds the name -->
+<span
+	class="flex min-w-0 items-center gap-1.5 overflow-hidden {wrap ? 'flex-wrap' : ''} {iconsOnNewLine
+		? 'flex-col items-start'
+		: ''} {className}"
+	{title}
+	{...rest}
+>
+	<span
+		class="flex min-w-0 items-center gap-1.5 max-md:gap-0.5 {wrap || stackId ? 'flex-wrap' : ''}"
+	>
+		{#if tooltip}
+			<Tooltip.Root>
+				<Tooltip.Trigger class="flex min-w-0 items-center gap-1.5">
+					{@render nameAndBadges()}
+				</Tooltip.Trigger>
+
+				<Tooltip.Content>
+					<p>{tooltip}</p>
+				</Tooltip.Content>
+			</Tooltip.Root>
+		{:else}
+			{@render nameAndBadges()}
+		{/if}
+
+		{#if !iconsOnNewLine}
+			<ModelCapabilityIcons
+				{hideCapabilities}
+				{hideModalities}
+				{modalities}
+				{supportsThinking}
+				{supportsToolUse}
+			/>
+		{/if}
+	</span>
+
+	{#if iconsOnNewLine || contextLength || sizeRange}
+		<span class="inline-flex items-center gap-1.5">
+			{#if iconsOnNewLine}
+				<ModelCapabilityIcons
+					{hideCapabilities}
+					{hideModalities}
+					{modalities}
+					{supportsThinking}
+					{supportsToolUse}
+				/>
+			{/if}
+
+			{#if contextLength}
+				<span class="inline-flex items-center gap-1 text-muted-foreground">
+					<ScrollText class="size-icon-xs" />
+
+					<span class="text-xs">{formatParameters(contextLength)}</span>
+				</span>
+			{/if}
+
+			{#if sizeRange}
+				<span class="inline-flex items-center gap-1 text-muted-foreground">
+					<Database class="size-icon-xs" />
+
+					<span class="text-xs">{formatSizeRange(sizeRange.min, sizeRange.max)}</span>
+				</span>
+			{/if}
+		</span>
+	{/if}
+</span>
diff --git a/ui/lib/ui/src/lib/components/models/ModelMetadataItem.svelte b/ui/lib/ui/src/lib/components/models/ModelMetadataItem.svelte
new file mode 100644
index 000000000..b3e9a0c81
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelMetadataItem.svelte
@@ -0,0 +1,19 @@
+<!-- ui/apps/chat's ModelsDiscoverDetailsMetadataItem, under a name of its own: one fact about a model as a label | value chip -->
+<script lang="ts">
+	interface Props {
+		label: string;
+		value: string;
+	}
+
+	let { label, value }: Props = $props();
+</script>
+
+<!-- Metadata chip: label | value pair, matching the HF model page style, on the
+     raised surface the tertiary button variant uses -->
+<span
+	class="inline-flex items-center divide-x divide-border rounded-md border border-border/30 bg-muted/60 text-xs shadow-sm dark:border-border/20 dark:bg-muted/75"
+>
+	<span class="px-2.5 py-1 text-muted-foreground">{label}</span>
+
+	<span class="px-2.5 py-1 font-medium">{value}</span>
+</span>
diff --git a/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte b/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte
new file mode 100644
index 000000000..8a983d457
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte
@@ -0,0 +1,125 @@
+<script lang="ts">
+	import { DARK_INVERT_AVATAR_ORGS } from '../../models/constants';
+	import { getAvatarUrl } from '../../models/format';
+	import { SvelteMap } from 'svelte/reactivity';
+
+	// Avatars a failed request is cooling down for. A failure hides the image
+	// immediately, but the org gets another chance on a later mount: the cooldown
+	// expires on its own, so a transient network blip is not permanent for the
+	// session. A row remounting inside the cooldown renders the monogram instead
+	// of re-requesting the same failing URL.
+	const AVATAR_RETRY_DELAY_MS = 60_000;
+	const failedAvatarOrgs = new SvelteMap<string, number>();
+
+	/** True while an org's failed avatar is still inside its retry cooldown. */
+	function isAvatarCoolingDown(org: string): boolean {
+		const failedAt = failedAvatarOrgs.get(org);
+
+		// a stale entry reads as not failed and is dropped on the next onerror
+		return failedAt !== undefined && Date.now() - failedAt < AVATAR_RETRY_DELAY_MS;
+	}
+
+	interface Props {
+		class?: string;
+		org: string;
+		quantOrg?: string;
+		size?: string;
+		baseImageClass?: string;
+		quantImageClass?: string;
+		quantPositionClass?: string;
+		quantSize?: string;
+	}
+
+	let {
+		baseImageClass = '',
+		class: className = '',
+		org,
+		quantImageClass = 'size-full',
+		quantOrg,
+		quantPositionClass = '-bottom-0.75 -right-0.75',
+		quantSize = 'size-4.25',
+		size = 'size-9'
+	}: Props = $props();
+
+	let orgAvatarFailed = $derived(isAvatarCoolingDown(org));
+	let quantAvatarFailed = $derived(isAvatarCoolingDown(quantOrg ?? ''));
+
+	let invertAvatar = $derived(DARK_INVERT_AVATAR_ORGS.includes(org));
+	let invertQuant = $derived(DARK_INVERT_AVATAR_ORGS.includes(quantOrg ?? ''));
+
+	// Monogram fallback: org initial on a hue derived from its name, so each org
+	// gets a stable distinct color.
+	let hue = $derived.by(() => {
+		let h = 0;
+
+		for (let i = 0; i < org.length; i++) h = (h * 31 + org.charCodeAt(i)) >>> 0;
+
+		return h % 360;
+	});
+
+	let quantHue = $derived.by(() => {
+		const name = quantOrg ?? '';
+
+		let h = 0;
+
+		for (let i = 0; i < name.length; i++) h = (h * 31 + name.charCodeAt(i)) >>> 0;
+
+		return h % 360;
+	});
+</script>
+
+<span class="relative inline-flex shrink-0 {className}">
+	{#if orgAvatarFailed}
+		<span
+			aria-hidden="true"
+			class="flex {size} items-center justify-center rounded-md text-sm font-semibold text-white"
+			style="background-color: hsl({hue} 60% 45%)"
+		>
+			{org.charAt(0).toUpperCase()}
+		</span>
+	{:else}
+		<div class="rounded-md">
+			<!-- the server serves the app under COEP require-corp, so a cross-origin
+			     image has to be fetched in CORS mode to be allowed -->
+			<img
+				alt=""
+				class="{size} rounded-md {invertAvatar ? 'dark:invert' : ''} {baseImageClass}"
+				crossorigin="anonymous"
+				loading="lazy"
+				onerror={() => {
+					failedAvatarOrgs.set(org, Date.now());
+				}}
+				src={getAvatarUrl(org)}
+			/>
+		</div>
+	{/if}
+
+	{#if quantOrg && quantOrg !== org}
+		<!-- native title instead of a floating tooltip: long model lists mount one badge per row -->
+		<span
+			class="absolute {quantPositionClass} {quantSize} overflow-hidden rounded-full border border-background bg-muted"
+			title={quantOrg}
+		>
+			{#if quantAvatarFailed}
+				<span
+					aria-hidden="true"
+					class="flex size-full items-center justify-center rounded-full text-[8px] font-semibold text-white"
+					style="background-color: hsl({quantHue} 60% 45%)"
+				>
+					{quantOrg.charAt(0).toUpperCase()}
+				</span>
+			{:else}
+				<img
+					alt=""
+					class="{quantImageClass} rounded-full {invertQuant ? 'dark:invert' : ''}"
+					crossorigin="anonymous"
+					loading="lazy"
+					onerror={() => {
+						failedAvatarOrgs.set(quantOrg ?? '', Date.now());
+					}}
+					src={getAvatarUrl(quantOrg)}
+				/>
+			{/if}
+		</span>
+	{/if}
+</span>
diff --git a/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte b/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte
new file mode 100644
index 000000000..f8c375964
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte
@@ -0,0 +1,301 @@
+<!--
+	One quant of a model as a chip: its label, any draft riding with it, its size and the action its state allows.
+	The props-in version of ui/apps/chat's ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton: the app passes the state
+	and gets each action back as a callback; it never downloads anything itself. An idle chip with `href` is a link,
+	for pages that hand the install to another app (llama.app's Install, a deep link).
+-->
+<script lang="ts">
+	import ModelDownloadProgressBar from './ModelDownloadProgressBar.svelte';
+	import { Check, Download, Loader2, Pause, Play, RotateCw, X } from '@lucide/svelte';
+	import * as Tooltip from '../ui/tooltip';
+	import { SIDECAR_BADGE_CLASS } from '../../models/constants';
+	import { formatFileSize } from '../../models/format';
+	import type {
+		ModelDownloadProgress,
+		ModelQuantCompanion,
+		ModelQuantState
+	} from '../../models/types';
+	import type { Snippet } from 'svelte';
+
+	interface Props {
+		/** The quant, e.g. `Q4_K_M`. */
+		label: string;
+		/** The quant file's size in bytes. */
+		sizeBytes?: number;
+		state?: ModelQuantState;
+		/** Live while downloading, frozen while paused. */
+		progress?: ModelDownloadProgress | null;
+		/** A draft model pulled with this quant, e.g. an MTP head; its size counts in the chip's. */
+		companion?: ModelQuantCompanion | null;
+		/** Makes an idle chip a link instead of a download button. */
+		href?: string;
+		/** Overrides the idle chip's tooltip and label, e.g. `Install Q4_K_M`. */
+		actionLabel?: string;
+		onDownload?: () => void;
+		onPause?: () => void;
+		onResume?: () => void;
+		/** Ask the app to confirm cancelling; the chip owns no dialog. */
+		onCancel?: () => void;
+		/** Ask the app to confirm deleting; the chip owns no dialog. */
+		onDelete?: () => void;
+	}
+
+	let {
+		actionLabel,
+		companion = null,
+		href,
+		label,
+		onCancel,
+		onDelete,
+		onDownload,
+		onPause,
+		onResume,
+		progress = null,
+		sizeBytes = 0,
+		state = 'idle'
+	}: Props = $props();
+
+	let isDownloaded = $derived(state === 'downloaded');
+	let isDownloading = $derived(state === 'downloading');
+	let isPaused = $derived(state === 'paused');
+	let isFailed = $derived(state === 'failed');
+
+	let percent = $derived(
+		progress && progress.totalBytes > 0
+			? Math.round((progress.downloadedBytes / progress.totalBytes) * 100)
+			: null
+	);
+
+	/**
+	 * The joined draft reads once it rides along or lands: a downloaded model
+	 * missing its draft keeps to its own weights, and the draft gets its own chip.
+	 */
+	let showsCompanion = $derived(companion ? (companion.onDisk ?? false) || !isDownloaded : false);
+
+	/** What the chip's actions name: the quant and, when it rides along, its draft. */
+	let downloadLabel = $derived(
+		showsCompanion && companion
+			? `${label} + ${companion.kind.toUpperCase()}${companion.quant ? `:${companion.quant}` : ''}`
+			: label
+	);
+
+	let tooltipText = $derived(
+		isDownloading
+			? 'Pause downloading'
+			: isPaused
+				? 'Resume downloading'
+				: isDownloaded
+					? `Delete ${downloadLabel}`
+					: isFailed
+						? `Retry download: ${downloadLabel}`
+						: (actionLabel ?? `Download ${downloadLabel}`)
+	);
+
+	let downloadBytes = $derived(
+		(sizeBytes ?? 0) + (showsCompanion && companion ? (companion.sizeBytes ?? 0) : 0)
+	);
+</script>
+
+{#snippet chipBody(dividerClass: string)}
+	<!-- label, joined draft and divider: identical on every chip state. The draft
+	     rides with this quant, so it reads as part of the same chip:
+	     `Q4_K_M + [MTP:Q8_0] | 20.0 GB`, the size covering both files. -->
+	<span class="font-medium">{label}</span>
+
+	{#if showsCompanion && companion}
+		<span class="text-muted-foreground/60">+</span>
+
+		<span class="{SIDECAR_BADGE_CLASS} inline-flex items-center gap-0.5">
+			<!-- the draft's own quant, so a 4-bit model paired with a 16-bit draft head reads at a glance -->
+			{companion.kind}{companion.quant ? `:${companion.quant}` : ''}
+
+			{#if companion.onDisk}
+				<Check class="size-2.5" />
+			{/if}
+		</span>
+	{/if}
+
+	<span class={dividerClass}></span>
+{/snippet}
+
+<!-- every chip is a tooltip trigger; the button renders as the trigger's child
+     so no nested button element is created -->
+{#snippet tooltipTrigger(tip: string, button: Snippet<[Record<string, unknown>]>)}
+	<Tooltip.Root>
+		<Tooltip.Trigger>
+			{#snippet child({ props })}
+				{@render button(props)}
+			{/snippet}
+		</Tooltip.Trigger>
+
+		<Tooltip.Content>
+			<p>{tip}</p>
+		</Tooltip.Content>
+	</Tooltip.Root>
+{/snippet}
+
+{#snippet deleteChip(props: Record<string, unknown>)}
+	<!-- downloaded chips are delete actions: green check by default, red X on hover -->
+	<button
+		{...props}
+		aria-label={tooltipText}
+		class="group relative inline-flex h-auto cursor-pointer items-center gap-1 rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
+					border-green-600/25 bg-green-500/5 hover:border-destructive/50 hover:bg-destructive/10 dark:border-green-500/30 dark:bg-green-500/10 dark:hover:border-destructive/50 dark:hover:bg-destructive/15"
+		onclick={() => onDelete?.()}
+		type="button"
+	>
+		{@render chipBody(
+			'-my-1 mx-0.75 w-px self-stretch bg-green-600/25 transition-colors duration-200 group-hover:bg-destructive/30 dark:bg-green-600/30 dark:group-hover:bg-destructive/30'
+		)}
+
+		<span>{formatFileSize(downloadBytes)}</span>
+
+		<!-- icon slot: crossfade check -> x; touch devices show the delete affordance directly -->
+		<span class="relative inline-flex size-3.5 shrink-0 items-center justify-center">
+			<Check
+				class="absolute size-icon-sm text-green-500 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-75 group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+			/>
+
+			<X
+				class="absolute size-icon-sm scale-75 text-destructive opacity-0 transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
+			/>
+		</span>
+	</button>
+{/snippet}
+
+{#snippet pauseResumeChip(props: Record<string, unknown>)}
+	<button
+		{...props}
+		aria-label={tooltipText}
+		class="flex h-auto min-w-0 flex-1 cursor-pointer items-center gap-1 text-left"
+		onclick={() => (isDownloading ? onPause?.() : onResume?.())}
+		type="button"
+	>
+		{@render chipBody('-my-1 mx-0.75 w-px self-stretch bg-border')}
+
+		{#if percent !== null}
+			<span class="mr-1 tabular-nums">{percent}%</span>
+		{:else if isPaused}
+			<span>Paused</span>
+		{:else}
+			<span>{formatFileSize(downloadBytes)}</span>
+		{/if}
+
+		{#if isDownloading}
+			<!-- spinner fades into the pause affordance on hover; opacity only, the
+			     spin keyframes own the transform so scale would fight them -->
+			<span class="relative inline-flex size-3.5 shrink-0 items-center justify-center">
+				<Loader2
+					class="absolute size-icon-sm animate-spin text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+				/>
+
+				<Pause
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
+				/>
+			</span>
+		{:else}
+			<!-- paused: the state at rest, the resume affordance taking its place on
+			     hover, the way the spinner gives way to the pause action above -->
+			<span class="relative inline-flex size-3.5 shrink-0 items-center justify-center">
+				<Pause
+					class="absolute size-icon-sm text-muted-foreground transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
+				/>
+
+				<Play
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
+				/>
+			</span>
+		{/if}
+	</button>
+{/snippet}
+
+{#snippet cancelChip(props: Record<string, unknown>)}
+	<!-- cancel slot: same fixed slot and fade as the pause / play affordances
+	     so the two icons line up exactly; the X turns destructive on its hover -->
+	<button
+		{...props}
+		aria-label="Cancel downloading"
+		class="relative grid size-3.5 shrink-0 cursor-pointer items-center justify-center text-muted-foreground/70"
+		onclick={() => onCancel?.()}
+		type="button"
+	>
+		<X
+			class="size-icon-sm transition-[opacity,transform,color] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] text-destructive [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
+		/>
+	</button>
+{/snippet}
+
+{#snippet idleChipContent()}
+	{#if isFailed}
+		<span
+			class="rounded-md bg-(--badge-danger-background) px-1 py-0.5 text-[10px] font-semibold tracking-wide text-(--badge-danger-text) uppercase"
+		>
+			Failed
+		</span>
+	{/if}
+
+	{@render chipBody('-my-1 mx-0.75 w-px self-stretch bg-border')}
+
+	<span>{formatFileSize(downloadBytes)}</span>
+
+	<span class="inline-flex size-3.5 shrink-0 items-center justify-center">
+		{#if isFailed}
+			<RotateCw class="size-icon-sm text-destructive" />
+		{:else}
+			<Download
+				class="size-icon-sm text-muted-foreground transition-colors duration-150 group-hover:text-foreground"
+			/>
+		{/if}
+	</span>
+{/snippet}
+
+{#snippet downloadChip(props: Record<string, unknown>)}
+	{@const chipClass = `group relative inline-flex h-auto cursor-pointer items-center gap-1 overflow-hidden rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
+				border-border/30 bg-background hover:bg-muted-foreground/10 dark:border-border/20 dark:bg-muted-foreground/15 dark:text-secondary-foreground dark:hover:bg-muted-foreground/25
+				${isFailed ? 'border-destructive!' : ''}`}
+
+	<!-- idle chips download on click (retry when the last attempt failed), or follow their link -->
+	{#if href && !isFailed}
+		<a {...props} aria-label={tooltipText} class={chipClass} {href} onclick={() => onDownload?.()}>
+			{@render idleChipContent()}
+		</a>
+	{:else}
+		<button
+			{...props}
+			aria-label={tooltipText}
+			class={chipClass}
+			onclick={() => onDownload?.()}
+			type="button"
+		>
+			{@render idleChipContent()}
+		</button>
+	{/if}
+{/snippet}
+
+{#if isDownloaded}
+	{@render tooltipTrigger(tooltipText, deleteChip)}
+{:else if isDownloading || isPaused}
+	<!-- in-flight / paused chips: the chip body pauses / resumes on click, the X
+	     inside the chip cancels the download. The X slot is reserved, so the chip
+	     never reflows when the affordance fades in -->
+	<div
+		class="group relative inline-flex h-auto items-center gap-1 overflow-hidden rounded-md! border px-2 py-1 text-left font-mono text-xs shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.97]
+			{isPaused
+			? 'border-yellow-600/40 bg-yellow-500/10 hover:bg-yellow-500/20 dark:border-yellow-500/30 dark:bg-yellow-500/10'
+			: 'border-border/30 bg-background hover:bg-muted-foreground/10 dark:border-border/20 dark:bg-muted-foreground/15'}"
+	>
+		{@render tooltipTrigger(tooltipText, pauseResumeChip)}
+
+		{@render tooltipTrigger('Cancel downloading', cancelChip)}
+
+		{#if percent !== null}
+			<ModelDownloadProgressBar
+				downloadedBytes={progress?.downloadedBytes ?? 0}
+				overlay
+				totalBytes={progress?.totalBytes ?? 0}
+			/>
+		{/if}
+	</div>
+{:else}
+	{@render tooltipTrigger(tooltipText, downloadChip)}
+{/if}
diff --git a/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte b/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte
new file mode 100644
index 000000000..2fa676a6f
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte
@@ -0,0 +1,34 @@
+<!--
+	The panel a model's quant rows sit in: rounded, on the raised muted surface, one hairline between rows. The shell of
+	ui/apps/chat's ModelsDiscoverDetailsDownloadOptions, with the rows (ModelQuantRow) as children and an optional footer
+	under them, where the app puts its draft-model pick.
+-->
+<script lang="ts">
+	import type { Snippet } from 'svelte';
+
+	interface Props {
+		/** The rows, one ModelQuantRow per bit depth. */
+		children: Snippet;
+		/** Under the rows, behind a hairline: an option that applies to every chip above. */
+		footer?: Snippet;
+		class?: string;
+	}
+
+	let { children, class: className = '', footer }: Props = $props();
+</script>
+
+<section
+	class="@container rounded-3xl border border-border/30 bg-muted/60 shadow-sm dark:border-border/20 {className}"
+>
+	<div class="flex w-full flex-col divide-y divide-border/50 px-4 pb-1 dark:divide-border/35">
+		{@render children()}
+	</div>
+
+	{#if footer}
+		<div
+			class="flex flex-wrap items-center justify-start gap-x-1.5 gap-y-1 border-t border-border/50 px-4 py-2.5 text-xs text-muted-foreground dark:border-border/35"
+		>
+			{@render footer()}
+		</div>
+	{/if}
+</section>
diff --git a/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte b/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte
new file mode 100644
index 000000000..58ab8a9cc
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte
@@ -0,0 +1,89 @@
+<!--
+	One bit depth of a model: its label ("4-bit"), the memory its quants need, and their chips. The props-in version of
+	ui/apps/chat's ModelsDiscoverDetailsDownloadOptionsRow: the chips come in as children, and a `command` snippet, when
+	given, opens under the row from its label, the way the app shows the command for that quant.
+-->
+<script lang="ts">
+	import { ChevronDown } from '@lucide/svelte';
+	import {
+		BIT_DEPTH_LABEL_SUFFIX,
+		GIGABYTE_LABEL,
+		OTHER_BIT_DEPTH,
+		OTHER_BIT_DEPTH_LABEL
+	} from '../../models/constants';
+	import type { Snippet } from 'svelte';
+	import { cubicOut } from 'svelte/easing';
+	import { slide } from 'svelte/transition';
+
+	interface Props {
+		/** Bit depth of the row; `99` renders as "Other". */
+		bitDepth: number;
+		/** Memory (GB) the row's quants need at least, e.g. from `minMemoryTierGb`. */
+		memGb?: number | null;
+		/** The row's quant chips. */
+		children: Snippet;
+		/** Opens under the row from its label, e.g. a copyable command for the row's main quant. */
+		command?: Snippet;
+	}
+
+	let { bitDepth, children, command, memGb = null }: Props = $props();
+
+	// collapsed until asked for
+	let commandOpen = $state(false);
+</script>
+
+{#snippet labelBody()}
+	<span class="flex items-center gap-1">
+		{#if bitDepth === OTHER_BIT_DEPTH}
+			{OTHER_BIT_DEPTH_LABEL}
+		{:else}
+			{bitDepth}{BIT_DEPTH_LABEL_SUFFIX}
+		{/if}
+
+		{#if command}
+			<ChevronDown
+				class="size-icon-xs shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] {commandOpen
+					? 'rotate-180'
+					: ''}"
+			/>
+		{/if}
+	</span>
+
+	{#if memGb}
+		<span class="text-[10px] whitespace-nowrap text-muted-foreground/60 @max-lg:whitespace-normal">
+			needs at least {memGb}{GIGABYTE_LABEL} memory
+		</span>
+	{/if}
+{/snippet}
+
+<div class="py-3">
+	<div class="grid grid-cols-[5rem_1fr] items-center gap-3 @max-lg:grid-cols-1 @max-lg:gap-1.5">
+		{#if command}
+			<!-- the row's own label opens its command -->
+			<button
+				aria-expanded={commandOpen}
+				class="flex w-fit cursor-pointer flex-col items-start gap-0.5 text-left text-sm tabular-nums text-muted-foreground transition-colors hover:text-foreground @max-lg:flex-row @max-lg:items-baseline @max-lg:gap-2"
+				onclick={() => (commandOpen = !commandOpen)}
+				type="button"
+			>
+				{@render labelBody()}
+			</button>
+		{:else}
+			<span
+				class="flex w-fit flex-col items-start gap-0.5 text-sm tabular-nums text-muted-foreground @max-lg:flex-row @max-lg:items-baseline @max-lg:gap-2"
+			>
+				{@render labelBody()}
+			</span>
+		{/if}
+
+		<div class="flex flex-wrap justify-end gap-1.5 @max-lg:justify-start">
+			{@render children()}
+		</div>
+	</div>
+
+	{#if command && commandOpen}
+		<div transition:slide={{ duration: 200, easing: cubicOut }} class="pt-2">
+			{@render command()}
+		</div>
+	{/if}
+</div>
diff --git a/ui/lib/ui/src/lib/components/models/index.ts b/ui/lib/ui/src/lib/components/models/index.ts
new file mode 100644
index 000000000..3b8dcbe3c
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/models/index.ts
@@ -0,0 +1,18 @@
+/**
+ * Model UI: how a model is shown in Llama Chat and on llama.app. Every component takes model data in and reports
+ * what the user did out; fetching, downloading and loading models stay in each app.
+ */
+export { default as ModelCard } from './ModelCard.svelte';
+export { default as ModelDraftSidecars } from './ModelDraftSidecars.svelte';
+export { default as ModelCapabilityIcons } from './ModelCapabilityIcons.svelte';
+export { default as ModelDownloadProgressBar } from './ModelDownloadProgressBar.svelte';
+export { default as ModelFamilyCard } from './ModelFamilyCard.svelte';
+export { default as ModelId } from './ModelId.svelte';
+export { default as ModelMetadataItem } from './ModelMetadataItem.svelte';
+export { default as ModelOrgAvatar } from './ModelOrgAvatar.svelte';
+export { default as ModelQuantChip } from './ModelQuantChip.svelte';
+export { default as ModelQuantOptions } from './ModelQuantOptions.svelte';
+export { default as ModelQuantRow } from './ModelQuantRow.svelte';
+
+// the data they take: constants, enums, formatters and types
+export * from '../../models/index.js';
diff --git a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte
new file mode 100644
index 000000000..d1ec60774
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte
@@ -0,0 +1,19 @@
+<script lang="ts">
+	import { type ButtonVariant, buttonVariants } from '../button/index.js';
+	import { cn } from '../utils.js';
+	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		ref = $bindable(null),
+		variant = 'default',
+		...restProps
+	}: AlertDialogPrimitive.ActionProps & { variant?: ButtonVariant } = $props();
+</script>
+
+<AlertDialogPrimitive.Action
+	bind:ref
+	class={cn(buttonVariants({ variant }), className)}
+	data-slot="alert-dialog-action"
+	{...restProps}
+/>
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte
similarity index 75%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte
index 40c8e5d68..fc8618b8c 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
-	import { buttonVariants } from '#lib/components/ui/button/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { buttonVariants } from '../button/index.js';
+	import { cn } from '../utils.js';
 	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
similarity index 88%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
index 69fc35684..0db939fe0 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import AlertDialogOverlay from './alert-dialog-overlay.svelte';
-	import { cn, type WithoutChild, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild, type WithoutChildrenOrChild } from '../utils.js';
 	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';

 	let {
@@ -19,7 +19,7 @@
 	<AlertDialogPrimitive.Content
 		bind:ref
 		class={cn(
-			'fixed z-[999999] grid gap-4 border border-border bg-popover p-6 text-popover-foreground shadow-md duration-200 dark:border-border/20',
+			'fixed z-[999999] grid gap-4 border matte-float-modal p-6 duration-200',
 			// centered on every screen: an alert is short, so a phone shows it as a card of its
 			// own height rather than as a drawer from the bottom, which it is not. The phone's
 			// 90% is a width, so a caller's max-w-* still caps it on wider screens
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
index d04d0e219..269af2034 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte
index d38ddd253..3b5ddbf3f 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte
index fa2ea07bb..c04632e32 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
similarity index 55%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
index 73ed3731b..1fcd2ce0d 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';

 	let {
@@ -12,7 +12,7 @@
 <AlertDialogPrimitive.Overlay
 	bind:ref
 	class={cn(
-		'fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0',
+		'fixed inset-0 z-50 bg-(--float-panel-overlay) backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0',
 		className
 	)}
 	data-slot="alert-dialog-overlay"
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
index ad5d93404..0e79cfe01 100644
--- a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/alert-dialog/index.ts b/ui/lib/ui/src/lib/components/ui/alert-dialog/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/alert-dialog/index.ts
rename to ui/lib/ui/src/lib/components/ui/alert-dialog/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/alert/alert-description.svelte b/ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/alert/alert-description.svelte
rename to ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte
index ce3fae378..b3dee5f69 100644
--- a/ui/apps/chat/src/lib/components/ui/alert/alert-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/alert/alert-title.svelte b/ui/lib/ui/src/lib/components/ui/alert/alert-title.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/alert/alert-title.svelte
rename to ui/lib/ui/src/lib/components/ui/alert/alert-title.svelte
index 315d6d964..989c74935 100644
--- a/ui/apps/chat/src/lib/components/ui/alert/alert-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert/alert-title.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/lib/ui/src/lib/components/ui/alert/alert.svelte b/ui/lib/ui/src/lib/components/ui/alert/alert.svelte
new file mode 100644
index 000000000..b5589531d
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/alert/alert.svelte
@@ -0,0 +1,51 @@
+<script lang="ts" module>
+	import { tv } from '../utils';
+	import type { VariantProps } from 'tailwind-variants';
+
+	export const alertVariants = tv({
+		base: 'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-icon-md [&>svg]:translate-y-0.5 [&>svg]:text-current',
+		defaultVariants: {
+			variant: 'default'
+		},
+		variants: {
+			variant: {
+				default: 'bg-card text-card-foreground',
+				// status alerts: a soft surface and line in the status colour, the icon in it, the text as usual
+				destructive:
+					'bg-surface-danger border-line-danger-soft text-card-foreground [&>svg]:text-fg-danger *:data-[slot=alert-description]:text-muted-foreground',
+				info: 'bg-surface-info border-line-info-soft text-card-foreground [&>svg]:text-fg-info *:data-[slot=alert-description]:text-muted-foreground',
+				success:
+					'bg-surface-success border-line-success-soft text-card-foreground [&>svg]:text-fg-success *:data-[slot=alert-description]:text-muted-foreground',
+				warning:
+					'bg-surface-warning border-line-warning-soft text-card-foreground [&>svg]:text-fg-warning *:data-[slot=alert-description]:text-muted-foreground'
+			}
+		}
+	});
+
+	export type AlertVariant = VariantProps<typeof alertVariants>['variant'];
+</script>
+
+<script lang="ts">
+	import { cn, type WithElementRef } from '../utils.js';
+	import type { HTMLAttributes } from 'svelte/elements';
+
+	let {
+		children,
+		class: className,
+		ref = $bindable(null),
+		variant = 'default',
+		...restProps
+	}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
+		variant?: AlertVariant;
+	} = $props();
+</script>
+
+<div
+	bind:this={ref}
+	class={cn(alertVariants({ variant }), className)}
+	data-slot="alert"
+	{...restProps}
+	role="alert"
+>
+	{@render children?.()}
+</div>
diff --git a/ui/apps/chat/src/lib/components/ui/alert/index.ts b/ui/lib/ui/src/lib/components/ui/alert/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/alert/index.ts
rename to ui/lib/ui/src/lib/components/ui/alert/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/badge/badge.svelte b/ui/lib/ui/src/lib/components/ui/badge/badge.svelte
new file mode 100644
index 000000000..c56f02b67
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/badge/badge.svelte
@@ -0,0 +1,61 @@
+<script lang="ts" module>
+	import { tv } from '../utils';
+	import type { VariantProps } from 'tailwind-variants';
+
+	export const badgeVariants = tv({
+		base: 'focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-control border px-2 py-0.5 text-label-sm font-medium transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-icon-xs',
+		defaultVariants: {
+			variant: 'default'
+		},
+		variants: {
+			variant: {
+				// soft status badges: a pill in the status colour, a dot before the label, on its own soft surface and line
+				danger:
+					"matte-sheen bg-surface-danger text-fg-danger border-line-danger-soft rounded-full gap-1.5 before:size-1.5 before:shrink-0 before:rounded-full before:bg-fill-danger before:content-['']",
+				default:
+					'matte-sheen-solid bg-(--badge-primary-background) text-(--badge-primary-text) [a&]:hover:bg-(--badge-primary-background-hover) border-transparent',
+				// solid, for what needs attention now
+				destructive:
+					'matte-sheen-solid bg-(--badge-danger-background) [a&]:hover:bg-(--badge-danger-background-hover) focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 border-transparent text-(--badge-danger-text)',
+				info: "matte-sheen bg-surface-info text-fg-info border-line-info-soft rounded-full gap-1.5 before:size-1.5 before:shrink-0 before:rounded-full before:bg-fill-info before:content-['']",
+				outline:
+					'text-(--badge-text) border-(--badge-outline-border) [a&]:hover:bg-(--badge-outline-background-hover)',
+				secondary:
+					'matte-sheen bg-(--badge-secondary-background) text-(--badge-text) [a&]:hover:bg-(--badge-secondary-background-hover) border-transparent',
+				success:
+					"matte-sheen bg-surface-success text-fg-success border-line-success-soft rounded-full gap-1.5 before:size-1.5 before:shrink-0 before:rounded-full before:bg-fill-success before:content-['']",
+				warning:
+					"matte-sheen bg-surface-warning text-fg-warning border-line-warning-soft rounded-full gap-1.5 before:size-1.5 before:shrink-0 before:rounded-full before:bg-fill-warning before:content-['']"
+			}
+		}
+	});
+
+	export type BadgeVariant = VariantProps<typeof badgeVariants>['variant'];
+</script>
+
+<script lang="ts">
+	import { cn, type WithElementRef } from '../utils';
+	import type { HTMLAnchorAttributes } from 'svelte/elements';
+
+	let {
+		children,
+		class: className,
+		href,
+		ref = $bindable(null),
+		variant = 'default',
+		...restProps
+	}: WithElementRef<HTMLAnchorAttributes> & {
+		variant?: BadgeVariant;
+	} = $props();
+</script>
+
+<svelte:element
+	this={href ? 'a' : 'span'}
+	bind:this={ref}
+	class={cn(badgeVariants({ variant }), className)}
+	data-slot="badge"
+	{href}
+	{...restProps}
+>
+	{@render children?.()}
+</svelte:element>
diff --git a/ui/apps/chat/src/lib/components/ui/badge/index.ts b/ui/lib/ui/src/lib/components/ui/badge/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/badge/index.ts
rename to ui/lib/ui/src/lib/components/ui/badge/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/button-group/button-group-root.svelte b/ui/lib/ui/src/lib/components/ui/button-group/button-group-root.svelte
new file mode 100644
index 000000000..24e99606c
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/button-group/button-group-root.svelte
@@ -0,0 +1,30 @@
+<script lang="ts">
+	import { cn } from '../utils';
+	import type { Snippet } from 'svelte';
+	import type { HTMLAttributes } from 'svelte/elements';
+
+	interface Props extends HTMLAttributes<HTMLDivElement> {
+		children: Snippet;
+	}
+
+	let { children, class: className, ...restProps }: Props = $props();
+</script>
+
+<!--
+	joined buttons share one shadow, drawn by the group. Bordered buttons share one border
+	at each seam, or the separator instead; filled buttons draw a seam in their own text
+	colour, so a separator between them is hidden.
+-->
+<div
+	class={cn(
+		'flex w-fit items-center rounded-control shadow-(--button-shadow) *:shadow-none *:[--button-shadow:none] *:focus-visible:z-10',
+		'[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>*:has(+[data-slot=button-group-separator])]:border-r-0',
+		'[&>[data-variant=default]:not(:first-child)]:border-l [&>[data-variant=default]]:border-l-(--button-primary-seam) [&>[data-variant=destructive]:not(:first-child)]:border-l [&>[data-variant=destructive]]:border-l-(--button-danger-seam)',
+		'[&>[data-slot=button-group-separator]:has(+[data-variant=default],+[data-variant=destructive])]:hidden',
+		className
+	)}
+	data-slot="button-group"
+	{...restProps}
+>
+	{@render children()}
+</div>
diff --git a/ui/lib/ui/src/lib/components/ui/button-group/button-group-separator.svelte b/ui/lib/ui/src/lib/components/ui/button-group/button-group-separator.svelte
new file mode 100644
index 000000000..62e5163da
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/button-group/button-group-separator.svelte
@@ -0,0 +1,12 @@
+<script lang="ts">
+	import { cn } from '../utils';
+	import type { HTMLAttributes } from 'svelte/elements';
+
+	let { class: className, ...restProps }: HTMLAttributes<HTMLDivElement> = $props();
+</script>
+
+<div
+	class={cn('w-px shrink-0 self-stretch bg-(--button-outline-border)', className)}
+	data-slot="button-group-separator"
+	{...restProps}
+></div>
diff --git a/ui/apps/chat/src/lib/components/ui/button-group/index.ts b/ui/lib/ui/src/lib/components/ui/button-group/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/button-group/index.ts
rename to ui/lib/ui/src/lib/components/ui/button-group/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/button/button.svelte b/ui/lib/ui/src/lib/components/ui/button/button.svelte
new file mode 100644
index 000000000..dc9d04da2
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/button/button.svelte
@@ -0,0 +1,96 @@
+<script lang="ts" module>
+	import { cn, type WithElementRef } from '../utils';
+	import { tv } from '../utils';
+	import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
+	import type { VariantProps } from 'tailwind-variants';
+
+	export const buttonVariants = tv({
+		base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-control text-label font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-icon-md [&_svg]:pointer-events-none [&_svg]:shrink-0",
+		defaultVariants: {
+			size: 'default',
+			variant: 'default'
+		},
+		variants: {
+			size: {
+				default: 'h-control-md px-4 py-2 has-[>svg]:px-3',
+				icon: 'size-(--height-control-md)',
+				'icon-lg': 'size-(--height-control-lg)',
+				'icon-sm': 'size-5 rounded-sm',
+				lg: 'h-control-lg rounded-panel px-6 has-[>svg]:px-4',
+				sm: 'h-control-sm gap-1.5 rounded-control px-3 has-[>svg]:px-2.5'
+			},
+			variant: {
+				default:
+					'matte-key-solid [--key-edge:var(--button-primary-edge)] bg-(--button-primary-background) text-(--button-primary-text) hover:bg-(--button-primary-background-hover)',
+				destructive:
+					'matte-key-solid [--key-edge:var(--button-danger-edge)] [--key-sheen-solid:var(--button-danger-sheen)] bg-(--button-danger-background) hover:bg-(--button-danger-background-hover) focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-(--button-danger-text)!',
+				ghost:
+					'hover:text-(--button-text) hover:bg-(--button-ghost-background-hover) hover:shadow-(--button-shadow) backdrop-blur-sm',
+				outline:
+					'matte-key bg-(--button-outline-background) hover:text-(--button-text) hover:bg-(--button-ghost-background-hover) border border-(--button-outline-border)',
+				secondary:
+					'matte-key bg-(--button-secondary-background) border border-(--button-secondary-border) text-(--button-text) hover:bg-(--button-secondary-background-hover)',
+				tertiary:
+					'matte-key bg-(--button-tertiary-background) border border-(--button-tertiary-border) text-(--button-text) hover:bg-(--button-tertiary-background-hover)'
+			}
+		}
+	});
+
+	export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
+	export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
+
+	export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
+		WithElementRef<HTMLAnchorAttributes> & {
+			variant?: ButtonVariant;
+			size?: ButtonSize;
+		};
+</script>
+
+<script lang="ts">
+	let {
+		children,
+		class: className,
+		disabled,
+		href = undefined,
+		ref = $bindable(null),
+		size = 'default',
+		type = 'button',
+		variant = 'default',
+		...restProps
+	}: ButtonProps = $props();
+</script>
+
+{#if href}
+	<a
+		bind:this={ref}
+		aria-disabled={disabled}
+		class={cn(buttonVariants({ size, variant }), className)}
+		data-slot="button"
+		data-variant={variant}
+		href={disabled ? undefined : href}
+		role={disabled ? 'link' : undefined}
+		tabindex={disabled ? -1 : undefined}
+		{...restProps}
+	>
+		{@render children?.()}
+	</a>
+{:else}
+	<button
+		bind:this={ref}
+		class={cn(buttonVariants({ size, variant }), className)}
+		data-slot="button"
+		data-variant={variant}
+		{disabled}
+		{type}
+		{...restProps}
+	>
+		{@render children?.()}
+	</button>
+{/if}
+
+<style>
+	a,
+	button {
+		cursor: pointer;
+	}
+</style>
diff --git a/ui/lib/ui/src/lib/components/ui/button/button.svelte.spec.ts b/ui/lib/ui/src/lib/components/ui/button/button.svelte.spec.ts
new file mode 100644
index 000000000..44356af26
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/button/button.svelte.spec.ts
@@ -0,0 +1,52 @@
+import { createRawSnippet } from 'svelte';
+import { describe, expect, it, vi } from 'vite-plus/test';
+import { render } from 'vitest-browser-svelte';
+import Button from './button.svelte';
+
+function textSnippet(text: string) {
+	return createRawSnippet(() => ({
+		render: () => `<span>${text}</span>`,
+		setup: () => {}
+	}));
+}
+
+describe('Button', () => {
+	it('renders children and handles clicks', async () => {
+		const onclick = vi.fn();
+		const screen = await render(Button, {
+			props: { onclick, children: textSnippet('click me') }
+		});
+
+		await expect.element(screen.getByRole('button', { name: 'click me' })).toBeInTheDocument();
+
+		await screen.getByRole('button', { name: 'click me' }).click();
+
+		expect(onclick).toHaveBeenCalledOnce();
+	});
+
+	it('applies variant classes', async () => {
+		const screen = await render(Button, {
+			props: { variant: 'destructive', children: textSnippet('danger') }
+		});
+		const el = screen.getByRole('button', { name: 'danger' }).element() as HTMLElement;
+
+		expect(el.dataset.variant).toBe('destructive');
+		expect(el.className).toContain('bg-(--button-danger-background)');
+	});
+
+	it('renders an anchor when href is set', async () => {
+		const screen = await render(Button, {
+			props: { href: 'https://example.com', children: textSnippet('link') }
+		});
+
+		expect(screen.getByRole('link', { name: 'link' })).toBeInTheDocument();
+	});
+
+	it('disables the button when disabled is set', async () => {
+		const screen = await render(Button, {
+			props: { disabled: true, children: textSnippet('nope') }
+		});
+
+		expect(screen.getByRole('button', { name: 'nope' })).toBeDisabled();
+	});
+});
diff --git a/ui/apps/chat/src/lib/components/ui/button/index.ts b/ui/lib/ui/src/lib/components/ui/button/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/button/index.ts
rename to ui/lib/ui/src/lib/components/ui/button/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/card/card-action.svelte b/ui/lib/ui/src/lib/components/ui/card/card-action.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/card/card-action.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card-action.svelte
index 15318f2ac..42723c0c8 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card-action.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-action.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/card/card-content.svelte b/ui/lib/ui/src/lib/components/ui/card/card-content.svelte
similarity index 83%
rename from ui/apps/chat/src/lib/components/ui/card/card-content.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card-content.svelte
index d8e62baa4..5e97f017f 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-content.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/card/card-description.svelte b/ui/lib/ui/src/lib/components/ui/card/card-description.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/card/card-description.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card-description.svelte
index 2d1f3f513..33c8d88ca 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-description.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/card/card-footer.svelte b/ui/lib/ui/src/lib/components/ui/card/card-footer.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/card/card-footer.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card-footer.svelte
index d990dfb76..6e16d71d7 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card-footer.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-footer.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/card/card-header.svelte b/ui/lib/ui/src/lib/components/ui/card/card-header.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/card/card-header.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card-header.svelte
index 9872f9be0..c7c4d2c47 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card-header.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-header.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/card/card-title.svelte b/ui/lib/ui/src/lib/components/ui/card/card-title.svelte
similarity index 83%
rename from ui/apps/chat/src/lib/components/ui/card/card-title.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card-title.svelte
index f334faa99..9561e58f2 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-title.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/card/card.svelte b/ui/lib/ui/src/lib/components/ui/card/card.svelte
similarity index 56%
rename from ui/apps/chat/src/lib/components/ui/card/card.svelte
rename to ui/lib/ui/src/lib/components/ui/card/card.svelte
index 77ac66219..15a56a8ef 100644
--- a/ui/apps/chat/src/lib/components/ui/card/card.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card.svelte
@@ -1,6 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
-	import { BOX_BORDER } from '#lib/constants/index.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
@@ -13,11 +12,7 @@

 <div
 	bind:this={ref}
-	class={cn(
-		'flex flex-col gap-6 rounded-xl bg-card py-6 text-card-foreground shadow-sm',
-		BOX_BORDER,
-		className
-	)}
+	class={cn('card-surface flex flex-col gap-6 rounded-(--card-radius) py-6', className)}
 	data-slot="card"
 	{...restProps}
 >
diff --git a/ui/apps/chat/src/lib/components/ui/card/index.ts b/ui/lib/ui/src/lib/components/ui/card/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/card/index.ts
rename to ui/lib/ui/src/lib/components/ui/card/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/checkbox/checkbox.svelte b/ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte
similarity index 54%
rename from ui/apps/chat/src/lib/components/ui/checkbox/checkbox.svelte
rename to ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte
index 37d67033d..15076c6c1 100644
--- a/ui/apps/chat/src/lib/components/ui/checkbox/checkbox.svelte
+++ b/ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import CheckIcon from '@lucide/svelte/icons/check';
 	import MinusIcon from '@lucide/svelte/icons/minus';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { Checkbox as CheckboxPrimitive } from 'bits-ui';

 	let {
@@ -18,7 +18,7 @@
 	bind:indeterminate
 	bind:ref
 	class={cn(
-		'peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary',
+		'peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background matte-well transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary',
 		className
 	)}
 	data-slot="checkbox"
diff --git a/ui/apps/chat/src/lib/components/ui/checkbox/index.ts b/ui/lib/ui/src/lib/components/ui/checkbox/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/checkbox/index.ts
rename to ui/lib/ui/src/lib/components/ui/checkbox/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/collapsible/collapsible-content.svelte b/ui/lib/ui/src/lib/components/ui/collapsible/collapsible-content.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/collapsible/collapsible-content.svelte
rename to ui/lib/ui/src/lib/components/ui/collapsible/collapsible-content.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/collapsible/collapsible-trigger.svelte b/ui/lib/ui/src/lib/components/ui/collapsible/collapsible-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/collapsible/collapsible-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/collapsible/collapsible-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/collapsible/collapsible.svelte b/ui/lib/ui/src/lib/components/ui/collapsible/collapsible.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/collapsible/collapsible.svelte
rename to ui/lib/ui/src/lib/components/ui/collapsible/collapsible.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/collapsible/index.ts b/ui/lib/ui/src/lib/components/ui/collapsible/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/collapsible/index.ts
rename to ui/lib/ui/src/lib/components/ui/collapsible/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-content.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte
similarity index 59%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-content.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte
index 85f2830cc..a0359b7ad 100644
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';

 	let {
@@ -16,7 +16,7 @@
 	<ContextMenuPrimitive.Content
 		bind:ref
 		class={cn(
-			'z-50 max-h-[calc(var(--bits-context-menu-content-available-height)-1rem)] min-w-[8rem] origin-(--bits-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20',
+			'z-50 max-h-[calc(var(--bits-context-menu-content-available-height)-1rem)] min-w-[8rem] origin-(--bits-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border matte-float p-1.5 text-popover-foreground outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
 			className
 		)}
 		data-slot="context-menu-content"
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-group.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-group.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-group.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-group.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-item.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte
similarity index 81%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-item.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte
index 462d40514..fed7c6bf3 100644
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';

 	let {
@@ -17,7 +17,7 @@
 <ContextMenuPrimitive.Item
 	bind:ref
 	class={cn(
-		"relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",
+		"relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",
 		className
 	)}
 	data-inset={inset}
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-label.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-label.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte
index 93d47aa65..fde19cf1e 100644
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-separator.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-separator.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-separator.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-separator.svelte
index ef4bf9dd6..708354ce1 100644
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-separator.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-separator.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-shortcut.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
index 8524f5396..ca06258a2 100644
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-sub-content.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-sub-content.svelte
new file mode 100644
index 000000000..201342d17
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-sub-content.svelte
@@ -0,0 +1,39 @@
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';
+
+	// rows sit 7px inside a menu (its 1px border and p-1.5): these offsets line the submenu's first row
+	// up with the row it opens from, and set it 4px past the menu's edge, as a menu is 4px off its trigger
+	const ROW_INSET = 7;
+	const GAP = 4;
+
+	let {
+		align = 'start',
+		alignOffset = -ROW_INSET,
+		class: className,
+		portalProps,
+		ref = $bindable(null),
+		sideOffset = ROW_INSET + GAP,
+		...restProps
+	}: ContextMenuPrimitive.SubContentProps & {
+		portalProps?: ContextMenuPrimitive.PortalProps;
+	} = $props();
+</script>
+
+<!-- A submenu leaves the menu it opens from: inside it, the menu's scroll box (and the filter and
+     transform of its open animation) would clip the submenu wherever it sits outside that box.
+     bits-ui sets its shared --bits-menu-* variables on a submenu, not the menu's own names -->
+<ContextMenuPrimitive.Portal {...portalProps}>
+	<ContextMenuPrimitive.SubContent
+		bind:ref
+		{align}
+		{alignOffset}
+		class={cn(
+			'z-50 max-h-[calc(var(--bits-menu-content-available-height)-1rem)] min-w-[8rem] origin-(--bits-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border matte-float p-1.5 text-popover-foreground outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
+			className
+		)}
+		data-slot="context-menu-sub-content"
+		{sideOffset}
+		{...restProps}
+	/>
+</ContextMenuPrimitive.Portal>
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-sub-trigger.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-sub-trigger.svelte
similarity index 78%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-sub-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-sub-trigger.svelte
index e9e2534d6..cf5877999 100644
--- a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-sub-trigger.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-sub-trigger.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';

 	let {
@@ -17,7 +17,7 @@
 <ContextMenuPrimitive.SubTrigger
 	bind:ref
 	class={cn(
-		"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
+		"flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md [&_svg:not([class*='text-'])]:text-muted-foreground",
 		className
 	)}
 	data-inset={inset}
@@ -26,5 +26,5 @@
 >
 	{@render children?.()}

-	<ChevronRightIcon class="ml-auto size-4" />
+	<ChevronRightIcon class="ml-auto size-icon-md" />
 </ContextMenuPrimitive.SubTrigger>
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/context-menu-trigger.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/context-menu/context-menu-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/context-menu/context-menu-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/context-menu/index.ts b/ui/lib/ui/src/lib/components/ui/context-menu/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/context-menu/index.ts
rename to ui/lib/ui/src/lib/components/ui/context-menu/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-close.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-close.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-close.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-close.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-content.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-content.svelte
similarity index 80%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-content.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-content.svelte
index 57c0e72f0..34256d980 100644
--- a/ui/apps/chat/src/lib/components/ui/dialog/dialog-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-content.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import * as Dialog from './index.js';
 	import XIcon from '@lucide/svelte/icons/x';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils';
 	import { Dialog as DialogPrimitive } from 'bits-ui';
 	import type { Snippet } from 'svelte';

@@ -27,7 +27,7 @@
 	<DialogPrimitive.Content
 		bind:ref
 		class={cn(
-			`fixed top-[50%] left-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto rounded-lg border border-border/30 bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,
+			`fixed top-[50%] left-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto rounded-lg border matte-float-modal p-6 duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,
 			'max-h-[100dvh] max-w-full size-auto sm:max-w-lg md:w-auto md:size-auto md:max-w-[calc(100%-2rem)]',
 			// a phone shows every dialog full screen, whatever size it asks for on a desktop. The
 			// status bar and the home indicator get transparent borders of their own height, so
@@ -42,7 +42,7 @@

 		{#if showCloseButton}
 			<DialogPrimitive.Close
-				class="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
+				class="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md"
 			>
 				<XIcon />

diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-description.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-description.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte
index 36da42dd7..2beb3d338 100644
--- a/ui/apps/chat/src/lib/components/ui/dialog/dialog-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils';
 	import { Dialog as DialogPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-footer.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-footer.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-footer.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-footer.svelte
index 59f093c24..fc4793b81 100644
--- a/ui/apps/chat/src/lib/components/ui/dialog/dialog-footer.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-footer.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-header.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-header.svelte
similarity index 88%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-header.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-header.svelte
index 4194329ba..a42227b19 100644
--- a/ui/apps/chat/src/lib/components/ui/dialog/dialog-header.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-header.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import XIcon from '@lucide/svelte/icons/x';
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
-	import { PANEL_CLOSE_MOBILE_CLASS } from '#lib/constants/index.ts';
+	import { cn, type WithElementRef } from '../utils';
+	import { PANEL_CLOSE_MOBILE_CLASS } from '../../../constants';
 	import { Dialog as DialogPrimitive } from 'bits-ui';
 	import type { HTMLAttributes } from 'svelte/elements';

@@ -34,7 +34,7 @@

 	{#if showCloseButton}
 		<DialogPrimitive.Close
-			class="absolute top-0 right-0 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none max-md:-top-3 max-md:-right-3 {PANEL_CLOSE_MOBILE_CLASS} [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
+			class="absolute top-0 right-0 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none max-md:-top-3 max-md:-right-3 {PANEL_CLOSE_MOBILE_CLASS} [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md"
 		>
 			<XIcon />

diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-overlay.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte
similarity index 53%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-overlay.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte
index 3535f5946..ccc598073 100644
--- a/ui/apps/chat/src/lib/components/ui/dialog/dialog-overlay.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils';
 	import { Dialog as DialogPrimitive } from 'bits-ui';

 	let {
@@ -12,7 +12,7 @@
 <DialogPrimitive.Overlay
 	bind:ref
 	class={cn(
-		'fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0',
+		'fixed inset-0 z-50 bg-(--float-panel-overlay) backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0',
 		className
 	)}
 	data-slot="dialog-overlay"
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-title.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-title.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte
index 57cc0152c..c44545769 100644
--- a/ui/apps/chat/src/lib/components/ui/dialog/dialog-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils';
 	import { Dialog as DialogPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/dialog-trigger.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/dialog/dialog-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/dialog/dialog-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/dialog/index.ts b/ui/lib/ui/src/lib/components/ui/dialog/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/dialog/index.ts
rename to ui/lib/ui/src/lib/components/ui/dialog/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-close.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-close.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-close.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-close.svelte
diff --git a/ui/lib/ui/src/lib/components/ui/drawer/drawer-content.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-content.svelte
new file mode 100644
index 000000000..87e3fbd9e
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-content.svelte
@@ -0,0 +1,40 @@
+<script lang="ts">
+	import DrawerOverlay from './drawer-overlay.svelte';
+	import DrawerPortal from './drawer-portal.svelte';
+	import type { WithoutChildrenOrChild } from '../utils.js';
+	import { cn } from '../utils.js';
+	import type { ComponentProps } from 'svelte';
+	import { Drawer as DrawerPrimitive } from 'vaul-svelte';
+
+	let {
+		children,
+		class: className,
+		overlayClass,
+		portalProps,
+		ref = $bindable(null),
+		...restProps
+	}: DrawerPrimitive.ContentProps & {
+		overlayClass?: string;
+		portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DrawerPortal>>;
+	} = $props();
+</script>
+
+<DrawerPortal {...portalProps}>
+	<DrawerOverlay class={overlayClass} />
+
+	<DrawerPrimitive.Content
+		bind:ref
+		class={cn(
+			'matte-float text-popover-foreground flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b group/drawer-content fixed z-50 data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm',
+			className
+		)}
+		data-slot="drawer-content"
+		{...restProps}
+	>
+		<div
+			class="bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
+		></div>
+
+		{@render children?.()}
+	</DrawerPrimitive.Content>
+</DrawerPortal>
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-description.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-description.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte
index 6ea5d7725..1fed8a423 100644
--- a/ui/apps/chat/src/lib/components/ui/drawer/drawer-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Drawer as DrawerPrimitive } from 'vaul-svelte';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-footer.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-footer.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-footer.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-footer.svelte
index 8e9735115..1eab7014f 100644
--- a/ui/apps/chat/src/lib/components/ui/drawer/drawer-footer.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-footer.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-header.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-header.svelte
similarity index 88%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-header.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-header.svelte
index 7c2852483..1aaaad4fb 100644
--- a/ui/apps/chat/src/lib/components/ui/drawer/drawer-header.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-header.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-nested.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-nested.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-nested.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-nested.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-overlay.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-overlay.svelte
similarity index 90%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-overlay.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-overlay.svelte
index 72894cc31..fa6ee329b 100644
--- a/ui/apps/chat/src/lib/components/ui/drawer/drawer-overlay.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-overlay.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Drawer as DrawerPrimitive } from 'vaul-svelte';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-portal.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-portal.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-portal.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-portal.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-title.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-title.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte
index 9280b55ef..00529a134 100644
--- a/ui/apps/chat/src/lib/components/ui/drawer/drawer-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Drawer as DrawerPrimitive } from 'vaul-svelte';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer-trigger.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/drawer.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/drawer/drawer.svelte
rename to ui/lib/ui/src/lib/components/ui/drawer/drawer.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/drawer/index.ts b/ui/lib/ui/src/lib/components/ui/drawer/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/drawer/index.ts
rename to ui/lib/ui/src/lib/components/ui/drawer/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte
similarity index 91%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte
index fb93de91b..86efc27b5 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import CheckIcon from '@lucide/svelte/icons/check';
 	import MinusIcon from '@lucide/svelte/icons/minus';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
 	import type { Snippet } from 'svelte';

@@ -22,7 +22,7 @@
 	bind:indeterminate
 	bind:ref
 	class={cn(
-		"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+		"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md",
 		className
 	)}
 	data-slot="dropdown-menu-checkbox-item"
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
similarity index 57%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
index 48f22e010..c5e9a4b5c 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';

 	let {
@@ -17,7 +17,7 @@
 	<DropdownMenuPrimitive.Content
 		bind:ref
 		class={cn(
-			'z-50 max-h-[calc(var(--bits-dropdown-menu-content-available-height)-1rem)] min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20',
+			'z-50 max-h-[calc(var(--bits-dropdown-menu-content-available-height)-1rem)] min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border matte-float p-1.5 text-popover-foreground outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
 			className
 		)}
 		data-slot="dropdown-menu-content"
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte
similarity index 91%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte
index f7d04a620..465fa17ad 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
 	import type { ComponentProps } from 'svelte';

diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
similarity index 81%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
index 02b205aa7..311cf592a 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';

 	let {
@@ -17,7 +17,7 @@
 <DropdownMenuPrimitive.Item
 	bind:ref
 	class={cn(
-		"relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",
+		"relative flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",
 		className
 	)}
 	data-inset={inset}
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
index ba147d839..c08b51de7 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte
similarity index 89%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte
index 328816a92..477f01ed7 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import CircleIcon from '@lucide/svelte/icons/circle';
-	import { cn, type WithoutChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';

 	let {
@@ -14,7 +14,7 @@
 <DropdownMenuPrimitive.RadioItem
 	bind:ref
 	class={cn(
-		"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+		"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md",
 		className
 	)}
 	data-slot="dropdown-menu-radio-item"
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte
index aa10d52f9..bae1a68a0 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
index fbc0b3afe..52fba5ae6 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte
new file mode 100644
index 000000000..b599c733f
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte
@@ -0,0 +1,39 @@
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
+
+	// rows sit 7px inside a menu (its 1px border and p-1.5): these offsets line the submenu's first row
+	// up with the row it opens from, and set it 4px past the menu's edge, as a menu is 4px off its trigger
+	const ROW_INSET = 7;
+	const GAP = 4;
+
+	let {
+		align = 'start',
+		alignOffset = -ROW_INSET,
+		class: className,
+		portalProps,
+		ref = $bindable(null),
+		sideOffset = ROW_INSET + GAP,
+		...restProps
+	}: DropdownMenuPrimitive.SubContentProps & {
+		portalProps?: DropdownMenuPrimitive.PortalProps;
+	} = $props();
+</script>
+
+<!-- A submenu leaves the menu it opens from: inside it, the menu's scroll box (and the filter and
+     transform of its open animation) would clip the submenu wherever it sits outside that box.
+     bits-ui sets its shared --bits-menu-* variables on a submenu, not the menu's own names -->
+<DropdownMenuPrimitive.Portal {...portalProps}>
+	<DropdownMenuPrimitive.SubContent
+		bind:ref
+		{align}
+		{alignOffset}
+		class={cn(
+			'z-50 max-h-[calc(var(--bits-menu-content-available-height)-1rem)] min-w-[8rem] origin-(--bits-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border matte-float p-1.5 text-popover-foreground outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
+			className
+		)}
+		data-slot="dropdown-menu-sub-content"
+		{sideOffset}
+		{...restProps}
+	/>
+</DropdownMenuPrimitive.Portal>
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte
similarity index 79%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte
index e206a79aa..8d1c59249 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';

 	let {
@@ -17,7 +17,7 @@
 <DropdownMenuPrimitive.SubTrigger
 	bind:ref
 	class={cn(
-		"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
+		"flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md [&_svg:not([class*='text-'])]:text-muted-foreground",
 		className
 	)}
 	data-inset={inset}
@@ -26,5 +26,5 @@
 >
 	{@render children?.()}

-	<ChevronRightIcon class="ml-auto size-4" />
+	<ChevronRightIcon class="ml-auto size-icon-md" />
 </DropdownMenuPrimitive.SubTrigger>
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/dropdown-menu/index.ts b/ui/lib/ui/src/lib/components/ui/dropdown-menu/index.ts
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/dropdown-menu/index.ts
rename to ui/lib/ui/src/lib/components/ui/dropdown-menu/index.ts
index cf03db7f1..92c3171e4 100644
--- a/ui/apps/chat/src/lib/components/ui/dropdown-menu/index.ts
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/index.ts
@@ -12,8 +12,9 @@ import SubContent from './dropdown-menu-sub-content.svelte';
 import SubTrigger from './dropdown-menu-sub-trigger.svelte';
 import Trigger from './dropdown-menu-trigger.svelte';
 import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
-const Sub = DropdownMenuPrimitive.Sub;
-const Root = DropdownMenuPrimitive.Root;
+// annotated so svelte-package can name the types in the generated declarations
+const Sub: typeof DropdownMenuPrimitive.Sub = DropdownMenuPrimitive.Sub;
+const Root: typeof DropdownMenuPrimitive.Root = DropdownMenuPrimitive.Root;

 export {
 	CheckboxItem,
diff --git a/ui/apps/chat/src/lib/components/ui/empty/empty-content.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/empty/empty-content.svelte
rename to ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte
index 0592b551f..14d082454 100644
--- a/ui/apps/chat/src/lib/components/ui/empty/empty-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/empty/empty-description.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/empty/empty-description.svelte
rename to ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte
index 36f901c87..0cbd35df8 100644
--- a/ui/apps/chat/src/lib/components/ui/empty/empty-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/empty/empty-header.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-header.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/empty/empty-header.svelte
rename to ui/lib/ui/src/lib/components/ui/empty/empty-header.svelte
index 805a4d0f3..98bb3e170 100644
--- a/ui/apps/chat/src/lib/components/ui/empty/empty-header.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-header.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/empty/empty-media.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-media.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/empty/empty-media.svelte
rename to ui/lib/ui/src/lib/components/ui/empty/empty-media.svelte
index 3aa51ee9d..a552f2a75 100644
--- a/ui/apps/chat/src/lib/components/ui/empty/empty-media.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-media.svelte
@@ -1,5 +1,6 @@
 <script lang="ts" module>
-	import { tv, type VariantProps } from 'tailwind-variants';
+	import { tv } from '../utils';
+	import type { VariantProps } from 'tailwind-variants';

 	export const emptyMediaVariants = tv({
 		base: 'mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0',
@@ -9,7 +10,7 @@
 		variants: {
 			variant: {
 				default: 'bg-transparent',
-				icon: "bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-4"
+				icon: "bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-icon-md"
 			}
 		}
 	});
@@ -18,7 +19,7 @@
 </script>

 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/empty/empty-title.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/empty/empty-title.svelte
rename to ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte
index cc473e2e9..9c307533d 100644
--- a/ui/apps/chat/src/lib/components/ui/empty/empty-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/empty/empty.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/empty/empty.svelte
rename to ui/lib/ui/src/lib/components/ui/empty/empty.svelte
index 65a598bb4..1dfb2c7c0 100644
--- a/ui/apps/chat/src/lib/components/ui/empty/empty.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/empty/index.ts b/ui/lib/ui/src/lib/components/ui/empty/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/empty/index.ts
rename to ui/lib/ui/src/lib/components/ui/empty/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/hover-card/hover-card-content.svelte b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte
similarity index 55%
rename from ui/apps/chat/src/lib/components/ui/hover-card/hover-card-content.svelte
rename to ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte
index b338adfaa..d4421376f 100644
--- a/ui/apps/chat/src/lib/components/ui/hover-card/hover-card-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import HoverCardPortal from './hover-card-portal.svelte';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { LinkPreview as HoverCardPrimitive } from 'bits-ui';
 	import type { ComponentProps } from 'svelte';

@@ -21,7 +21,7 @@
 		bind:ref
 		{align}
 		class={cn(
-			'z-50 w-64 origin-(--bits-link-preview-content-transform-origin) rounded-xl border border-border bg-popover p-1.5 text-sm text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20',
+			'z-50 w-64 origin-(--bits-link-preview-content-transform-origin) rounded-xl border matte-float p-1.5 text-sm text-popover-foreground outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
 			className
 		)}
 		data-slot="hover-card-content"
diff --git a/ui/apps/chat/src/lib/components/ui/hover-card/hover-card-portal.svelte b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-portal.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/hover-card/hover-card-portal.svelte
rename to ui/lib/ui/src/lib/components/ui/hover-card/hover-card-portal.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/hover-card/hover-card-trigger.svelte b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/hover-card/hover-card-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/hover-card/hover-card-trigger.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/hover-card/hover-card.svelte b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/hover-card/hover-card.svelte
rename to ui/lib/ui/src/lib/components/ui/hover-card/hover-card.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/hover-card/index.ts b/ui/lib/ui/src/lib/components/ui/hover-card/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/hover-card/index.ts
rename to ui/lib/ui/src/lib/components/ui/hover-card/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/input/index.ts b/ui/lib/ui/src/lib/components/ui/input/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/input/index.ts
rename to ui/lib/ui/src/lib/components/ui/input/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/input/input.svelte b/ui/lib/ui/src/lib/components/ui/input/input.svelte
new file mode 100644
index 000000000..7ab732538
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/input/input.svelte
@@ -0,0 +1,52 @@
+<script lang="ts">
+	import { cn, type WithElementRef } from '../utils';
+	import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
+
+	type InputType = Exclude<HTMLInputTypeAttribute, 'file'>;
+
+	type Props = WithElementRef<
+		Omit<HTMLInputAttributes, 'type'> &
+			({ type: 'file'; files?: FileList } | { type?: InputType; files?: undefined })
+	>;
+
+	let {
+		class: className,
+		files = $bindable(),
+		ref = $bindable(null),
+		type,
+		value = $bindable(),
+		...restProps
+	}: Props = $props();
+</script>
+
+{#if type === 'file'}
+	<input
+		bind:files
+		bind:this={ref}
+		bind:value
+		class={cn(
+			'flex h-control-md w-full min-w-0 rounded-control border border-(--input-border) bg-transparent px-3 pt-1.5 text-label font-medium matte-well ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-(--input-placeholder) disabled:cursor-not-allowed disabled:opacity-50 dark:bg-(--input-background)',
+			'focus-visible:border-(--input-border-focus) focus-visible:ring-[3px] focus-visible:ring-ring/50',
+			'aria-invalid:border-(--input-border-invalid) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
+			className
+		)}
+		data-slot="input"
+		type="file"
+		{...restProps}
+	/>
+{:else}
+	<input
+		bind:this={ref}
+		bind:value
+		class={cn(
+			'flex h-control-md w-full min-w-0 rounded-control border border-(--input-border) bg-(--input-background) px-3 py-1 text-body matte-well ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-(--input-placeholder) disabled:cursor-not-allowed disabled:opacity-50 md:text-body-sm',
+			'focus-visible:border-(--input-border-focus) focus-visible:ring-[3px] focus-visible:ring-ring/50',
+			'aria-invalid:border-(--input-border-invalid) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
+			className
+		)}
+		data-slot="input"
+		style="backdrop-filter: blur(0.5rem);"
+		{type}
+		{...restProps}
+	/>
+{/if}
diff --git a/ui/apps/chat/src/lib/components/ui/label/index.ts b/ui/lib/ui/src/lib/components/ui/label/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/label/index.ts
rename to ui/lib/ui/src/lib/components/ui/label/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/label/label.svelte b/ui/lib/ui/src/lib/components/ui/label/label.svelte
similarity index 90%
rename from ui/apps/chat/src/lib/components/ui/label/label.svelte
rename to ui/lib/ui/src/lib/components/ui/label/label.svelte
index 7d8ad50ad..787948a46 100644
--- a/ui/apps/chat/src/lib/components/ui/label/label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/label/label.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Label as LabelPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/popover/index.ts b/ui/lib/ui/src/lib/components/ui/popover/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/popover/index.ts
rename to ui/lib/ui/src/lib/components/ui/popover/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/popover/popover-close.svelte b/ui/lib/ui/src/lib/components/ui/popover/popover-close.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/popover/popover-close.svelte
rename to ui/lib/ui/src/lib/components/ui/popover/popover-close.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/popover/popover-content.svelte b/ui/lib/ui/src/lib/components/ui/popover/popover-content.svelte
similarity index 59%
rename from ui/apps/chat/src/lib/components/ui/popover/popover-content.svelte
rename to ui/lib/ui/src/lib/components/ui/popover/popover-content.svelte
index 133569c3a..502193dd6 100644
--- a/ui/apps/chat/src/lib/components/ui/popover/popover-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/popover/popover-content.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import PopoverPortal from './popover-portal.svelte';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { Popover as PopoverPrimitive } from 'bits-ui';
 	import type { ComponentProps } from 'svelte';

@@ -25,7 +25,7 @@
 		{align}
 		{avoidCollisions}
 		class={cn(
-			'z-50 w-72 origin-(--bits-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
+			'z-50 w-72 origin-(--bits-popover-content-transform-origin) rounded-md border matte-float p-4 text-popover-foreground outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
 			className
 		)}
 		{collisionPadding}
diff --git a/ui/apps/chat/src/lib/components/ui/popover/popover-portal.svelte b/ui/lib/ui/src/lib/components/ui/popover/popover-portal.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/popover/popover-portal.svelte
rename to ui/lib/ui/src/lib/components/ui/popover/popover-portal.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/popover/popover-trigger.svelte b/ui/lib/ui/src/lib/components/ui/popover/popover-trigger.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/popover/popover-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/popover/popover-trigger.svelte
index 407f8e832..3f3711b98 100644
--- a/ui/apps/chat/src/lib/components/ui/popover/popover-trigger.svelte
+++ b/ui/lib/ui/src/lib/components/ui/popover/popover-trigger.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Popover as PopoverPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/popover/popover.svelte b/ui/lib/ui/src/lib/components/ui/popover/popover.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/popover/popover.svelte
rename to ui/lib/ui/src/lib/components/ui/popover/popover.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/radio-group/index.ts b/ui/lib/ui/src/lib/components/ui/radio-group/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/radio-group/index.ts
rename to ui/lib/ui/src/lib/components/ui/radio-group/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/radio-group/radio-group-item.svelte b/ui/lib/ui/src/lib/components/ui/radio-group/radio-group-item.svelte
similarity index 94%
rename from ui/apps/chat/src/lib/components/ui/radio-group/radio-group-item.svelte
rename to ui/lib/ui/src/lib/components/ui/radio-group/radio-group-item.svelte
index 8399951bb..d731b223b 100644
--- a/ui/apps/chat/src/lib/components/ui/radio-group/radio-group-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/radio-group/radio-group-item.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import CircleIcon from '@lucide/svelte/icons/circle';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { RadioGroup as RadioGroupPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/radio-group/radio-group.svelte b/ui/lib/ui/src/lib/components/ui/radio-group/radio-group.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/radio-group/radio-group.svelte
rename to ui/lib/ui/src/lib/components/ui/radio-group/radio-group.svelte
index c0919ed53..98370b9da 100644
--- a/ui/apps/chat/src/lib/components/ui/radio-group/radio-group.svelte
+++ b/ui/lib/ui/src/lib/components/ui/radio-group/radio-group.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { RadioGroup as RadioGroupPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/scroll-area/index.ts b/ui/lib/ui/src/lib/components/ui/scroll-area/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/scroll-area/index.ts
rename to ui/lib/ui/src/lib/components/ui/scroll-area/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte b/ui/lib/ui/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte
similarity index 91%
rename from ui/apps/chat/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte
rename to ui/lib/ui/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte
index 7c92cfb23..cbd9c58c1 100644
--- a/ui/apps/chat/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte
+++ b/ui/lib/ui/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithoutChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild } from '../utils';
 	import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/scroll-area/scroll-area.svelte b/ui/lib/ui/src/lib/components/ui/scroll-area/scroll-area.svelte
similarity index 94%
rename from ui/apps/chat/src/lib/components/ui/scroll-area/scroll-area.svelte
rename to ui/lib/ui/src/lib/components/ui/scroll-area/scroll-area.svelte
index b0822e594..3a3776fda 100644
--- a/ui/apps/chat/src/lib/components/ui/scroll-area/scroll-area.svelte
+++ b/ui/lib/ui/src/lib/components/ui/scroll-area/scroll-area.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import { Scrollbar } from './index.js';
-	import { cn, type WithoutChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild } from '../utils';
 	import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/select/index.ts b/ui/lib/ui/src/lib/components/ui/select/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/select/index.ts
rename to ui/lib/ui/src/lib/components/ui/select/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-content.svelte b/ui/lib/ui/src/lib/components/ui/select/select-content.svelte
similarity index 80%
rename from ui/apps/chat/src/lib/components/ui/select/select-content.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-content.svelte
index 341d77b7a..07b7e1113 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-content.svelte
@@ -1,7 +1,7 @@
 <script lang="ts">
 	import SelectScrollDownButton from './select-scroll-down-button.svelte';
 	import SelectScrollUpButton from './select-scroll-up-button.svelte';
-	import { cn, type WithoutChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild } from '../utils.js';
 	import { Select as SelectPrimitive } from 'bits-ui';
 	import { onDestroy, onMount } from 'svelte';

@@ -88,7 +88,7 @@
 	<SelectPrimitive.Content
 		bind:ref
 		class={cn(
-			'relative z-[var(--layer-popover,1000000)] max-h-(--bits-select-content-available-height) min-w-[8rem] origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover dark:border-border/20 text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:translate-x-1 data-[side=right]:slide-in-from-left-2 data-[side=top]:-translate-y-1 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
+			'relative z-[var(--layer-popover,1000000)] max-h-(--bits-select-content-available-height) min-w-[8rem] origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border matte-float text-popover-foreground data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:translate-x-1 data-[side=right]:slide-in-from-left-2 data-[side=top]:-translate-y-1 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
 			className
 		)}
 		data-slot="select-content"
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-group-heading.svelte b/ui/lib/ui/src/lib/components/ui/select/select-group-heading.svelte
similarity index 90%
rename from ui/apps/chat/src/lib/components/ui/select/select-group-heading.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-group-heading.svelte
index 1a1aede1b..11839c357 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-group-heading.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-group-heading.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Select as SelectPrimitive } from 'bits-ui';
 	import type { ComponentProps } from 'svelte';

diff --git a/ui/apps/chat/src/lib/components/ui/select/select-group.svelte b/ui/lib/ui/src/lib/components/ui/select/select-group.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/select/select-group.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-group.svelte
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-item.svelte b/ui/lib/ui/src/lib/components/ui/select/select-item.svelte
similarity index 83%
rename from ui/apps/chat/src/lib/components/ui/select/select-item.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-item.svelte
index 225db450f..a4d0b158c 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-item.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import CheckIcon from '@lucide/svelte/icons/check';
-	import { cn, type WithoutChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild } from '../utils.js';
 	import { Select as SelectPrimitive } from 'bits-ui';

 	let {
@@ -16,7 +16,7 @@
 <SelectPrimitive.Item
 	bind:ref
 	class={cn(
-		"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
+		"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
 		className
 	)}
 	data-slot="select-item"
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-label.svelte b/ui/lib/ui/src/lib/components/ui/select/select-label.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/select/select-label.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-label.svelte
index 411428209..c756c725f 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-label.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-scroll-down-button.svelte b/ui/lib/ui/src/lib/components/ui/select/select-scroll-down-button.svelte
similarity index 87%
rename from ui/apps/chat/src/lib/components/ui/select/select-scroll-down-button.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-scroll-down-button.svelte
index fa057e2db..d8dcd2271 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-scroll-down-button.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-scroll-down-button.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import ChevronDownIcon from '@lucide/svelte/icons/chevron-down';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { Select as SelectPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-scroll-up-button.svelte b/ui/lib/ui/src/lib/components/ui/select/select-scroll-up-button.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/select/select-scroll-up-button.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-scroll-up-button.svelte
index 6b519ca9a..88c729903 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-scroll-up-button.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-scroll-up-button.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import ChevronUpIcon from '@lucide/svelte/icons/chevron-up';
-	import { cn, type WithoutChildrenOrChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
 	import { Select as SelectPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-separator.svelte b/ui/lib/ui/src/lib/components/ui/select/select-separator.svelte
similarity index 74%
rename from ui/apps/chat/src/lib/components/ui/select/select-separator.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-separator.svelte
index 950124312..1cd4d06ad 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-separator.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-separator.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
-	import { Separator } from '#lib/components/ui/separator/index.ts';
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { Separator } from '../separator/index.js';
+	import { cn } from '../utils.js';
 	import type { Separator as SeparatorPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/select/select-trigger.svelte b/ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte
similarity index 88%
rename from ui/apps/chat/src/lib/components/ui/select/select-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte
index 142608dd4..fbe100290 100644
--- a/ui/apps/chat/src/lib/components/ui/select/select-trigger.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte
@@ -1,6 +1,6 @@
 <script lang="ts">
 	import ChevronDownIcon from '@lucide/svelte/icons/chevron-down';
-	import { cn, type WithoutChild } from '#lib/components/ui/utils.ts';
+	import { cn, type WithoutChild } from '../utils.js';
 	import { Select as SelectPrimitive } from 'bits-ui';

 	let {
@@ -21,10 +21,10 @@

 	const baseClasses = $derived(
 		variant === 'plain'
-			? "group inline-flex w-full items-center justify-end gap-2 whitespace-nowrap px-0 py-0 text-sm font-medium text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3 [&_svg:not([class*='text-'])]:text-muted-foreground"
+			? "group inline-flex w-full items-center justify-end gap-2 whitespace-nowrap px-0 py-0 text-sm font-medium text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-xs [&_svg:not([class*='text-'])]:text-muted-foreground"
 			: size === 'xs'
 				? xsClasses
-				: "flex w-fit items-center justify-between gap-2 rounded-md border border-border/30 bg-muted/60 px-3 py-2 text-sm whitespace-nowrap shadow-sm transition-colors outline-none select-none hover:bg-muted/80 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:border-border/20 dark:bg-muted/75 dark:hover:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-muted-foreground"
+				: "flex w-fit items-center justify-between gap-2 rounded-md border border-border/30 bg-muted/60 px-3 py-2 text-sm whitespace-nowrap matte-key transition-colors outline-none select-none hover:bg-muted/80 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:border-border/20 dark:bg-muted/75 dark:hover:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-sm [&_svg:not([class*='text-'])]:text-muted-foreground"
 	);

 	const chevronClasses = $derived(
diff --git a/ui/apps/chat/src/lib/components/ui/separator/index.ts b/ui/lib/ui/src/lib/components/ui/separator/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/separator/index.ts
rename to ui/lib/ui/src/lib/components/ui/separator/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/separator/separator.svelte b/ui/lib/ui/src/lib/components/ui/separator/separator.svelte
similarity index 90%
rename from ui/apps/chat/src/lib/components/ui/separator/separator.svelte
rename to ui/lib/ui/src/lib/components/ui/separator/separator.svelte
index 222804da1..59183d27d 100644
--- a/ui/apps/chat/src/lib/components/ui/separator/separator.svelte
+++ b/ui/lib/ui/src/lib/components/ui/separator/separator.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Separator as SeparatorPrimitive } from 'bits-ui';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/skeleton/index.ts b/ui/lib/ui/src/lib/components/ui/skeleton/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/skeleton/index.ts
rename to ui/lib/ui/src/lib/components/ui/skeleton/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/skeleton/skeleton.svelte b/ui/lib/ui/src/lib/components/ui/skeleton/skeleton.svelte
similarity index 93%
rename from ui/apps/chat/src/lib/components/ui/skeleton/skeleton.svelte
rename to ui/lib/ui/src/lib/components/ui/skeleton/skeleton.svelte
index 2f21146ca..dc9baced4 100644
--- a/ui/apps/chat/src/lib/components/ui/skeleton/skeleton.svelte
+++ b/ui/lib/ui/src/lib/components/ui/skeleton/skeleton.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef, type WithoutChildren } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef, type WithoutChildren } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/switch/index.ts b/ui/lib/ui/src/lib/components/ui/switch/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/switch/index.ts
rename to ui/lib/ui/src/lib/components/ui/switch/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/switch/switch.svelte b/ui/lib/ui/src/lib/components/ui/switch/switch.svelte
new file mode 100644
index 000000000..5029ad263
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/switch/switch.svelte
@@ -0,0 +1,29 @@
+<script lang="ts">
+	import { cn, type WithoutChildrenOrChild } from '../utils.js';
+	import { Switch as SwitchPrimitive } from 'bits-ui';
+
+	let {
+		checked = $bindable(false),
+		class: className,
+		ref = $bindable(null),
+		...restProps
+	}: WithoutChildrenOrChild<SwitchPrimitive.RootProps> = $props();
+</script>
+
+<SwitchPrimitive.Root
+	bind:checked
+	bind:ref
+	class={cn(
+		'peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-(--switch-track) shadow-(--switch-track-shadow) transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--switch-track-on)',
+		className
+	)}
+	data-slot="switch"
+	{...restProps}
+>
+	<SwitchPrimitive.Thumb
+		class={cn(
+			'pointer-events-none block size-4 rounded-full bg-(--switch-thumb) shadow-(--switch-thumb-shadow) ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=checked]:bg-(--switch-thumb-on) data-[state=unchecked]:translate-x-0'
+		)}
+		data-slot="switch-thumb"
+	/>
+</SwitchPrimitive.Root>
diff --git a/ui/apps/chat/src/lib/components/ui/table/index.ts b/ui/lib/ui/src/lib/components/ui/table/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/table/index.ts
rename to ui/lib/ui/src/lib/components/ui/table/index.ts
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-body.svelte b/ui/lib/ui/src/lib/components/ui/table/table-body.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/table/table-body.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-body.svelte
index d0308db76..1ca165d14 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-body.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-body.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-caption.svelte b/ui/lib/ui/src/lib/components/ui/table/table-caption.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/table/table-caption.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-caption.svelte
index 838dae090..3908b2970 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-caption.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-caption.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-cell.svelte b/ui/lib/ui/src/lib/components/ui/table/table-cell.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/table/table-cell.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-cell.svelte
index 8540ba08f..c4aee6bd1 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-cell.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-cell.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLTdAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-footer.svelte b/ui/lib/ui/src/lib/components/ui/table/table-footer.svelte
similarity index 85%
rename from ui/apps/chat/src/lib/components/ui/table/table-footer.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-footer.svelte
index 34f4e405e..784c6b026 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-footer.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-footer.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-head.svelte b/ui/lib/ui/src/lib/components/ui/table/table-head.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/table/table-head.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-head.svelte
index 460670677..4e8ee9f80 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-head.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-head.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLThAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-header.svelte b/ui/lib/ui/src/lib/components/ui/table/table-header.svelte
similarity index 84%
rename from ui/apps/chat/src/lib/components/ui/table/table-header.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-header.svelte
index 5e6611436..a874e5ad3 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-header.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-header.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table-row.svelte b/ui/lib/ui/src/lib/components/ui/table/table-row.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/table/table-row.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table-row.svelte
index 5daf5ab90..93495bfe8 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table-row.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-row.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/apps/chat/src/lib/components/ui/table/table.svelte b/ui/lib/ui/src/lib/components/ui/table/table.svelte
similarity index 86%
rename from ui/apps/chat/src/lib/components/ui/table/table.svelte
rename to ui/lib/ui/src/lib/components/ui/table/table.svelte
index 97844c1e2..21b047ef9 100644
--- a/ui/apps/chat/src/lib/components/ui/table/table.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn, type WithElementRef } from '#lib/components/ui/utils.ts';
+	import { cn, type WithElementRef } from '../utils.js';
 	import type { HTMLTableAttributes } from 'svelte/elements';

 	let {
diff --git a/ui/lib/ui/src/lib/components/ui/tabs/index.ts b/ui/lib/ui/src/lib/components/ui/tabs/index.ts
new file mode 100644
index 000000000..95bbb3676
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/tabs/index.ts
@@ -0,0 +1,18 @@
+import Root from './tabs.svelte';
+import Content from './tabs-content.svelte';
+import List, { type TabsListVariant, tabsListVariants } from './tabs-list.svelte';
+import Trigger from './tabs-trigger.svelte';
+
+export {
+	Root,
+	Content,
+	List,
+	Trigger,
+	tabsListVariants,
+	type TabsListVariant,
+	//
+	Root as Tabs,
+	Content as TabsContent,
+	List as TabsList,
+	Trigger as TabsTrigger
+};
diff --git a/ui/lib/ui/src/lib/components/ui/tabs/tabs-content.svelte b/ui/lib/ui/src/lib/components/ui/tabs/tabs-content.svelte
new file mode 100644
index 000000000..0407e177b
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/tabs/tabs-content.svelte
@@ -0,0 +1,17 @@
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { Tabs as TabsPrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		ref = $bindable(null),
+		...restProps
+	}: TabsPrimitive.ContentProps = $props();
+</script>
+
+<TabsPrimitive.Content
+	bind:ref
+	class={cn('flex-1 text-body-sm outline-none', className)}
+	data-slot="tabs-content"
+	{...restProps}
+/>
diff --git a/ui/lib/ui/src/lib/components/ui/tabs/tabs-list.svelte b/ui/lib/ui/src/lib/components/ui/tabs/tabs-list.svelte
new file mode 100644
index 000000000..bc4ec9aec
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/tabs/tabs-list.svelte
@@ -0,0 +1,170 @@
+<script lang="ts" module>
+	import { tv } from '../utils';
+	import type { VariantProps } from 'tailwind-variants';
+
+	// default: the segmented track, 2px around the triggers, as tall as a default control
+	export const tabsListVariants = tv({
+		base: 'group/tabs-list relative inline-flex w-fit items-center justify-center text-(--tabs-text) group-data-[orientation=horizontal]/tabs:h-control-md group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col',
+		defaultVariants: {
+			variant: 'default'
+		},
+		variants: {
+			variant: {
+				default: 'gap-0.5 rounded-panel bg-(--tabs-track) p-0.5 shadow-(--tabs-track-shadow)',
+				line: 'gap-1 bg-transparent'
+			}
+		}
+	});
+
+	export type TabsListVariant = VariantProps<typeof tabsListVariants>['variant'];
+
+	/** Gap between a trigger and the line variant's underline, and the underline's thickness. */
+	const LINE_OFFSET = 2;
+	const LINE_WIDTH = 2;
+
+	// a plain ease-out with no overshoot: a bounce would carry the first and last tab past the track
+	const SLIDE_EASE = 'cubic-bezier(0.23, 1, 0.32, 1)';
+	const SLIDE_MS = 300;
+	const SIZE_MS = 250;
+
+	/** Stretch along the move, 2% to 5% with the distance, and half that as squash across it. */
+	function stretchFor(distance: number): number {
+		return Math.min(0.05, 0.02 + distance / 4000);
+	}
+</script>
+
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { Tabs as TabsPrimitive } from 'bits-ui';
+	import { untrack } from 'svelte';
+	import { prefersReducedMotion } from 'svelte/motion';
+
+	let {
+		children,
+		class: className,
+		ref = $bindable(null),
+		variant = 'default',
+		...restProps
+	}: TabsPrimitive.ListProps & {
+		variant?: TabsListVariant;
+	} = $props();
+
+	// the active tab's box inside the list; the indicator slides to it
+	let box = $state<{ height: number; width: number; x: number; y: number } | null>(null);
+	// off until the indicator has been placed once, so it does not fly in from the corner;
+	// a plain flag, since the effect below must not depend on it
+	let isAnimated = $state(false);
+	let isPlaced = false;
+	let indicatorEl: HTMLSpanElement | null = $state(null);
+	// the last measured box, kept outside state so measuring never re-runs the effect
+	let lastBox: { x: number; y: number } | null = null;
+
+	let indicator = $derived.by(() => {
+		if (!box) return null;
+
+		if (variant !== 'line') return box;
+
+		const vertical = ref?.dataset.orientation === 'vertical';
+
+		return vertical
+			? { height: box.height, width: LINE_WIDTH, x: box.x + box.width + LINE_OFFSET, y: box.y }
+			: { height: LINE_WIDTH, width: box.width, x: box.x, y: box.y + box.height + LINE_OFFSET };
+	});
+
+	function measure() {
+		const active = ref?.querySelector<HTMLElement>(
+			'[data-slot="tabs-trigger"][data-state="active"]'
+		);
+
+		// a transition switched on in the same update as a move still runs for that move
+		if (isPlaced && active) isAnimated = true;
+
+		isPlaced = !!active;
+
+		box = active
+			? {
+					height: active.offsetHeight,
+					width: active.offsetWidth,
+					x: active.offsetLeft,
+					y: active.offsetTop
+				}
+			: null;
+
+		if (box && lastBox && isAnimated) stretch(box.x - lastBox.x, box.y - lastBox.y);
+
+		lastBox = box && { x: box.x, y: box.y };
+	}
+
+	/** A barely visible stretch along the move that settles as the slide lands. */
+	function stretch(dx: number, dy: number) {
+		const distance = Math.hypot(dx, dy);
+
+		if (!indicatorEl || distance < 1 || prefersReducedMotion.current) return;
+
+		const amount = stretchFor(distance);
+		const along = 1 + amount;
+		// the underline is too thin to squash; only the chip narrows across the move
+		const across = variant === 'line' ? 1 : 1 - amount / 2;
+		const peak = Math.abs(dx) >= Math.abs(dy) ? `${along} ${across}` : `${across} ${along}`;
+
+		indicatorEl.animate([{ scale: '1 1' }, { offset: 0.35, scale: peak }, { scale: '1 1' }], {
+			duration: SLIDE_MS,
+			easing: 'ease-out'
+		});
+	}
+
+	$effect(() => {
+		const list = ref;
+
+		if (!list) return;
+
+		// measure reads state of its own; only a new list element should re-run this
+		untrack(measure);
+
+		// a new active tab flips data-state; labels and layout changes resize the triggers
+		const mutations = new MutationObserver(measure);
+
+		mutations.observe(list, { attributeFilter: ['data-state'], childList: true, subtree: true });
+
+		const resizes = new ResizeObserver(measure);
+
+		resizes.observe(list);
+		for (const trigger of list.querySelectorAll('[data-slot="tabs-trigger"]')) {
+			resizes.observe(trigger);
+		}
+
+		return () => {
+			mutations.disconnect();
+			resizes.disconnect();
+		};
+	});
+</script>
+
+<TabsPrimitive.List
+	bind:ref
+	class={cn(tabsListVariants({ variant }), className)}
+	data-slot="tabs-list"
+	data-variant={variant}
+	{...restProps}
+>
+	<span
+		bind:this={indicatorEl}
+		style:height={indicator ? `${indicator.height}px` : undefined}
+		style:transition={isAnimated && !prefersReducedMotion.current
+			? `translate ${SLIDE_MS}ms ${SLIDE_EASE}, width ${SIZE_MS}ms ${SLIDE_EASE}, height ${SIZE_MS}ms ${SLIDE_EASE}`
+			: undefined}
+		style:translate={indicator ? `${indicator.x}px ${indicator.y}px` : undefined}
+		style:width={indicator ? `${indicator.width}px` : undefined}
+		aria-hidden="true"
+		class={cn(
+			'pointer-events-none absolute top-0 left-0',
+			variant === 'line'
+				? 'rounded-full bg-(--tabs-line-active)'
+				: 'rounded-control bg-(--tabs-background-active) shadow-(--tabs-shadow-active)',
+			!indicator && 'hidden'
+		)}
+		data-slot="tabs-indicator"
+	></span>
+
+	{@render children?.()}
+</TabsPrimitive.List>
diff --git a/ui/lib/ui/src/lib/components/ui/tabs/tabs-trigger.svelte b/ui/lib/ui/src/lib/components/ui/tabs/tabs-trigger.svelte
new file mode 100644
index 000000000..33e8342a4
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/tabs/tabs-trigger.svelte
@@ -0,0 +1,22 @@
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { Tabs as TabsPrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		ref = $bindable(null),
+		...restProps
+	}: TabsPrimitive.TriggerProps = $props();
+</script>
+
+<!-- muted until active; the list draws the raised chip or underline and slides it between triggers -->
+<TabsPrimitive.Trigger
+	bind:ref
+	class={cn(
+		"relative inline-flex h-full flex-1 items-center justify-center gap-1.5 rounded-control px-3 text-label font-medium whitespace-nowrap transition-colors duration-250 ease-[cubic-bezier(0.23,1,0.32,1)] outline-none hover:text-(--tabs-text-active) focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start group-data-[orientation=vertical]/tabs:py-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-icon-md",
+		'data-[state=active]:text-(--tabs-text-active)',
+		className
+	)}
+	data-slot="tabs-trigger"
+	{...restProps}
+/>
diff --git a/ui/lib/ui/src/lib/components/ui/tabs/tabs.svelte b/ui/lib/ui/src/lib/components/ui/tabs/tabs.svelte
new file mode 100644
index 000000000..4826b868d
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/tabs/tabs.svelte
@@ -0,0 +1,19 @@
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { Tabs as TabsPrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		ref = $bindable(null),
+		value = $bindable(''),
+		...restProps
+	}: TabsPrimitive.RootProps = $props();
+</script>
+
+<TabsPrimitive.Root
+	bind:ref
+	bind:value
+	class={cn('group/tabs flex gap-2 data-[orientation=horizontal]:flex-col', className)}
+	data-slot="tabs"
+	{...restProps}
+/>
diff --git a/ui/apps/chat/src/lib/components/ui/textarea/index.ts b/ui/lib/ui/src/lib/components/ui/textarea/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/textarea/index.ts
rename to ui/lib/ui/src/lib/components/ui/textarea/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte b/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte
new file mode 100644
index 000000000..20852a788
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte
@@ -0,0 +1,22 @@
+<script lang="ts">
+	import { cn, type WithElementRef, type WithoutChildren } from '../utils';
+	import type { HTMLTextareaAttributes } from 'svelte/elements';
+
+	let {
+		class: className,
+		ref = $bindable(null),
+		value = $bindable(),
+		...restProps
+	}: WithoutChildren<WithElementRef<HTMLTextareaAttributes>> = $props();
+</script>
+
+<textarea
+	bind:this={ref}
+	bind:value
+	class={cn(
+		'flex field-sizing-content min-h-16 w-full rounded-control border border-(--input-border) bg-(--input-background) px-3 py-2 text-body matte-well transition-[color,box-shadow] outline-none placeholder:text-(--input-placeholder) focus-visible:border-(--input-border-focus) focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-(--input-border-invalid) aria-invalid:ring-destructive/20 md:text-body-sm dark:aria-invalid:ring-destructive/40',
+		className
+	)}
+	data-slot="textarea"
+	{...restProps}
+></textarea>
diff --git a/ui/apps/chat/src/lib/components/ui/toggle-group/index.ts b/ui/lib/ui/src/lib/components/ui/toggle-group/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/toggle-group/index.ts
rename to ui/lib/ui/src/lib/components/ui/toggle-group/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/toggle-group/toggle-group-item.svelte b/ui/lib/ui/src/lib/components/ui/toggle-group/toggle-group-item.svelte
new file mode 100644
index 000000000..9e252c2fd
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/toggle-group/toggle-group-item.svelte
@@ -0,0 +1,36 @@
+<script lang="ts">
+	import { getToggleGroupCtx } from './toggle-group.svelte';
+	import { type ToggleSize, toggleVariants } from '../toggle/index.js';
+	import { cn } from '../utils.js';
+	import { ToggleGroup as ToggleGroupPrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		ref = $bindable(null),
+		size,
+		value = $bindable(),
+		...restProps
+	}: ToggleGroupPrimitive.ItemProps & { size?: ToggleSize } = $props();
+
+	const ctx = getToggleGroupCtx();
+</script>
+
+<!--
+	a key: pressed, it turns white and sinks in, its label a pixel lower; while any key is
+	pressed, the others turn grey and mute their labels
+-->
+<ToggleGroupPrimitive.Item
+	bind:ref
+	class={cn(
+		toggleVariants({ size: ctx.size || size, variant: 'default' }),
+		'h-auto shrink-0 rounded-none text-(--toggle-group-key-text) backdrop-blur-none hover:bg-(--toggle-group-key-background-hover) hover:text-(--toggle-group-key-text) focus:z-10 focus-visible:z-10',
+		'border-(--toggle-group-seam) group-data-[orientation=horizontal]/toggle-group:not-first:border-l group-data-[orientation=vertical]/toggle-group:not-first:border-t',
+		'group-has-[[data-state=on]]/toggle-group:data-[state=off]:bg-(--toggle-group-key-background-idle) group-has-[[data-state=on]]/toggle-group:data-[state=off]:text-(--toggle-group-key-text-muted) group-has-[[data-state=on]]/toggle-group:data-[state=off]:hover:bg-(--toggle-group-key-background-idle-hover) group-has-[[data-state=on]]/toggle-group:data-[state=off]:hover:text-(--toggle-group-key-text)',
+		'data-[state=on]:bg-(--toggle-group-key-background-on) data-[state=on]:text-(--toggle-group-key-text) data-[state=on]:shadow-(--toggle-group-key-shadow-on) data-[state=on]:hover:bg-(--toggle-group-key-background-on) data-[state=on]:*:translate-y-px',
+		className
+	)}
+	data-size={ctx.size || size}
+	data-slot="toggle-group-item"
+	{value}
+	{...restProps}
+/>
diff --git a/ui/lib/ui/src/lib/components/ui/toggle-group/toggle-group.svelte b/ui/lib/ui/src/lib/components/ui/toggle-group/toggle-group.svelte
new file mode 100644
index 000000000..293f1cf5d
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/toggle-group/toggle-group.svelte
@@ -0,0 +1,72 @@
+<script lang="ts" module>
+	import type { ToggleSize } from '../toggle/index.js';
+	import { getContext, setContext } from 'svelte';
+
+	/** A group is as tall as a control of its size; its keys fill it. */
+	const GROUP_HEIGHT: Record<NonNullable<ToggleSize>, string> = {
+		default: 'data-[orientation=horizontal]:h-control-md',
+		icon: 'data-[orientation=horizontal]:h-control-md',
+		'icon-lg': 'data-[orientation=horizontal]:h-control-lg',
+		'icon-sm': 'data-[orientation=horizontal]:h-control-sm',
+		lg: 'data-[orientation=horizontal]:h-control-lg',
+		sm: 'data-[orientation=horizontal]:h-control-sm'
+	};
+
+	interface ToggleGroupContext {
+		size?: ToggleSize;
+		orientation?: 'horizontal' | 'vertical';
+	}
+
+	export function setToggleGroupCtx(props: ToggleGroupContext) {
+		setContext('toggleGroup', props);
+	}
+
+	export function getToggleGroupCtx() {
+		return getContext<Required<ToggleGroupContext>>('toggleGroup');
+	}
+</script>
+
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { ToggleGroup as ToggleGroupPrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		orientation = 'horizontal',
+		ref = $bindable(null),
+		size = 'sm',
+		value = $bindable(),
+		...restProps
+	}: ToggleGroupPrimitive.RootProps & {
+		size?: ToggleSize;
+		orientation?: 'horizontal' | 'vertical';
+	} = $props();
+
+	setToggleGroupCtx({
+		get orientation() {
+			return orientation;
+		},
+		get size() {
+			return size;
+		}
+	});
+</script>
+
+<!-- a row of keys like a secondary button, an outline-coloured seam between them -->
+<!--
+Discriminated Unions + Destructing (required for bindable) do not
+get along, so we shut typescript up by casting `value` to `never`.
+-->
+<ToggleGroupPrimitive.Root
+	bind:ref
+	bind:value={value as never}
+	class={cn(
+		'group/toggle-group flex w-fit flex-row items-stretch overflow-hidden rounded-control border border-(--toggle-group-border) bg-(--toggle-group-background) shadow-(--toggle-group-shadow) matte-key data-vertical:flex-col',
+		GROUP_HEIGHT[size ?? 'sm'],
+		className
+	)}
+	data-size={size}
+	data-slot="toggle-group"
+	{orientation}
+	{...restProps}
+/>
diff --git a/ui/apps/chat/src/lib/components/ui/toggle/index.ts b/ui/lib/ui/src/lib/components/ui/toggle/index.ts
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/toggle/index.ts
rename to ui/lib/ui/src/lib/components/ui/toggle/index.ts
diff --git a/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte b/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte
new file mode 100644
index 000000000..c03007e45
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte
@@ -0,0 +1,57 @@
+<script lang="ts" module>
+	import { tv } from '../utils';
+	import type { VariantProps } from 'tailwind-variants';
+
+	export const toggleVariants = tv({
+		base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive gap-2 rounded-control text-label font-medium outline-none transition-all focus-visible:ring-[3px] inline-flex items-center justify-center whitespace-nowrap disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-icon-md [&_svg]:pointer-events-none [&_svg]:shrink-0 group/toggle hover:text-(--toggle-text) hover:bg-(--toggle-background-hover) data-[state=on]:bg-(--toggle-background-on) data-[state=on]:hover:bg-(--toggle-background-on) data-[state=on]:text-(--toggle-text)",
+		defaultVariants: {
+			size: 'default',
+			variant: 'default'
+		},
+		// the same heights, padding and corners as button; icon sizes are square
+		variants: {
+			size: {
+				default: 'h-control-md px-4 has-[>svg]:px-3',
+				icon: 'size-(--height-control-md)',
+				'icon-lg': 'size-(--height-control-lg) rounded-panel',
+				'icon-sm': 'size-(--height-control-sm)',
+				lg: 'h-control-lg rounded-panel px-6 has-[>svg]:px-4',
+				sm: 'h-control-sm gap-1.5 px-3 has-[>svg]:px-2.5'
+			},
+			variant: {
+				default: 'bg-transparent backdrop-blur-sm',
+				outline:
+					'matte-key border border-(--button-outline-border) bg-(--button-outline-background)'
+			}
+		}
+	});
+
+	export type ToggleVariant = VariantProps<typeof toggleVariants>['variant'];
+	export type ToggleSize = VariantProps<typeof toggleVariants>['size'];
+	export type ToggleVariants = VariantProps<typeof toggleVariants>;
+</script>
+
+<script lang="ts">
+	import { cn } from '../utils.js';
+	import { Toggle as TogglePrimitive } from 'bits-ui';
+
+	let {
+		class: className,
+		pressed = $bindable(false),
+		ref = $bindable(null),
+		size = 'default',
+		variant = 'default',
+		...restProps
+	}: TogglePrimitive.RootProps & {
+		variant?: ToggleVariant;
+		size?: ToggleSize;
+	} = $props();
+</script>
+
+<TogglePrimitive.Root
+	bind:pressed
+	bind:ref
+	class={cn(toggleVariants({ size, variant }), className)}
+	data-slot="toggle"
+	{...restProps}
+/>
diff --git a/ui/apps/chat/src/lib/components/ui/tooltip/index.ts b/ui/lib/ui/src/lib/components/ui/tooltip/index.ts
similarity index 53%
rename from ui/apps/chat/src/lib/components/ui/tooltip/index.ts
rename to ui/lib/ui/src/lib/components/ui/tooltip/index.ts
index 48177b6af..a942ba541 100644
--- a/ui/apps/chat/src/lib/components/ui/tooltip/index.ts
+++ b/ui/lib/ui/src/lib/components/ui/tooltip/index.ts
@@ -2,9 +2,10 @@ import Content from './tooltip-content.svelte';
 import Trigger from './tooltip-trigger.svelte';
 import { Tooltip as TooltipPrimitive } from 'bits-ui';

-const Root = TooltipPrimitive.Root;
-const Provider = TooltipPrimitive.Provider;
-const Portal = TooltipPrimitive.Portal;
+// annotated so svelte-package can name the types in the generated declarations
+const Root: typeof TooltipPrimitive.Root = TooltipPrimitive.Root;
+const Provider: typeof TooltipPrimitive.Provider = TooltipPrimitive.Provider;
+const Portal: typeof TooltipPrimitive.Portal = TooltipPrimitive.Portal;

 export {
 	Root,
diff --git a/ui/apps/chat/src/lib/components/ui/tooltip/tooltip-content.svelte b/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte
similarity index 72%
rename from ui/apps/chat/src/lib/components/ui/tooltip/tooltip-content.svelte
rename to ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte
index 49e1d9a4d..ce16318aa 100644
--- a/ui/apps/chat/src/lib/components/ui/tooltip/tooltip-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cn } from '#lib/components/ui/utils.ts';
+	import { cn } from '../utils.js';
 	import { Tooltip as TooltipPrimitive } from 'bits-ui';

 	let {
@@ -18,7 +18,7 @@

 	const contentClass = $derived(
 		cn(
-			'z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:fill-mode-forwards',
+			'z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-(--tooltip-background) px-3 py-1.5 shadow-[inset_0_0_0_1px_var(--tooltip-highlight),var(--tooltip-shadow)] text-caption text-balance text-(--tooltip-text) fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:fill-mode-forwards',
 			className
 		)
 	);
diff --git a/ui/apps/chat/src/lib/components/ui/tooltip/tooltip-trigger.svelte b/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-trigger.svelte
similarity index 100%
rename from ui/apps/chat/src/lib/components/ui/tooltip/tooltip-trigger.svelte
rename to ui/lib/ui/src/lib/components/ui/tooltip/tooltip-trigger.svelte
diff --git a/ui/lib/ui/src/lib/components/ui/utils.ts b/ui/lib/ui/src/lib/components/ui/utils.ts
new file mode 100644
index 000000000..16a0f6379
--- /dev/null
+++ b/ui/lib/ui/src/lib/components/ui/utils.ts
@@ -0,0 +1,33 @@
+import { type ClassValue, clsx } from 'clsx';
+import { extendTailwindMerge } from 'tailwind-merge';
+import { createTV } from 'tailwind-variants';
+
+// the type, corner, icon and height roles from src/lib/styles/tokens/semantic.css, so text-label is
+// merged as a font size and rounded-control as a radius rather than dropped or kept twice
+const mergeConfig = {
+	extend: {
+		classGroups: {
+			h: [{ h: ['control-sm', 'control-md', 'control-lg'] }],
+			size: [{ size: ['icon-xs', 'icon-sm', 'icon-md', 'icon-lg'] }]
+		},
+		theme: {
+			radius: ['control', 'panel', 'card', 'container', 'surface', 'surface-lg'],
+			text: ['body', 'body-sm', 'label', 'label-sm', 'caption', 'title', 'heading']
+		}
+	}
+};
+const twMerge = extendTailwindMerge(mergeConfig);
+
+/** tailwind-variants with the same merge rules as cn, so variants keep the token roles. */
+export const tv = createTV({ twMergeConfig: mergeConfig });
+
+export function cn(...inputs: ClassValue[]) {
+	return twMerge(clsx(inputs));
+}
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export type WithoutChild<T> = T extends { child?: any } ? Omit<T, 'child'> : T;
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export type WithoutChildren<T> = T extends { children?: any } ? Omit<T, 'children'> : T;
+export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
+export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null };
diff --git a/ui/lib/ui/src/lib/constants/code-block.constants.ts b/ui/lib/ui/src/lib/constants/code-block.constants.ts
new file mode 100644
index 000000000..d395f861e
--- /dev/null
+++ b/ui/lib/ui/src/lib/constants/code-block.constants.ts
@@ -0,0 +1,59 @@
+// Constants for the markdown code-block renderer: language/fence handling and CSS classes.
+
+/** Parsing and escaping helpers for the markdown code-block renderer. */
+export const CODE_BLOCK = {
+  AMPERSAND_REGEX: /&/g,
+  /** Language fallback used when no language is specified. */
+  DEFAULT_LANGUAGE: "text",
+  /** Matches opening/closing markdown code fences. */
+  FENCE_PATTERN: /^```|\n```/g,
+  GT_REGEX: />/g,
+  /** Matches the language specifier at the start of a code fence. */
+  LANG_PATTERN: /^(\w*)\n?/,
+  LT_REGEX: /</g,
+  /**
+   * A shell command's name: the first word of the code or of a line (unless the line before it ends in a `\` continuation),
+   * or the first after `|`, `;`, `&`, `(` or `$(`, but not a shell keyword.
+   * highlight.js compiles grammars multiline, so the code's start is `(?<![\s\S])`, not `^`.
+   */
+  SHELL_COMMAND_REGEX:
+    /(?<=(?:(?<![\s\S])|[^\\\s][ \t]*\n|\n\n|[|;&(][ \t]*|\$\([ \t]*)[ \t]*)(?!(?:if|then|else|elif|fi|for|while|until|do|done|case|esac|function|in|select|time)\b)[A-Za-z_][\w.+-]*(?=[ \t\n;|&)]|$)/,
+  /** A shell command's flag: `-x`, `-LsSf` or `--long-name`, after whitespace. */
+  SHELL_FLAG_REGEX: /(?<=[ \t])--?[A-Za-z0-9][\w-]*/,
+
+  // Matches the `text:` prefix that file-type identifiers use to denote a
+  // plain-text language (e.g. `text:typescript`). Used by tool-call renderers
+  // to recover the underlying highlight.js language.
+  TEXT_LANGUAGE_PREFIX_REGEX: /^text:/,
+  // Whitespace-only empty lines (between start of string and first non-empty line).
+  // Used by trimCodePadding to drop leading/trailing phantom blank rows from LLM
+  // payload wrappers without touching internal blank lines.
+  TRIM_LEADING_PADDING_REGEX: /^(?:[ \t]*\n)+/,
+
+  TRIM_TRAILING_PADDING_REGEX: /(?:\n[ \t]*)+$/,
+} as const;
+
+// Matches either Unix or Windows path separators so `String.split(REGEX)` can
+// recover the trailing file-name segment from either `/foo/bar.txt` or
+// `C:\foo\bar.txt`. Used wherever a parameter accepts a user-supplied path.
+export const FILE_PATH_SEPARATOR_REGEX = /[\\/]/;
+
+// Separates a file name from its extension, e.g. the '.' in `cover.png`.
+export const FILE_EXTENSION_SEPARATOR = ".";
+
+// Matches the `text:` prefix that file-type identifiers use to denote a
+// plain-text language (e.g. `text:typescript`). Used by tool-call renderers
+// to recover the underlying highlight.js language.
+export const TEXT_LANGUAGE_PREFIX_REGEX = /^text:/;
+
+/** CSS classes applied by the markdown code-block renderer. */
+export const CODE_BLOCK_CLASS = {
+  ACTIONS: "code-block-actions",
+  COPY_BTN: "copy-code-btn",
+  HEADER: "code-block-header",
+  LANGUAGE: "code-language",
+  PREVIEW_BTN: "preview-code-btn",
+  RELATIVE: "relative",
+  SCROLL_CONTAINER: "code-block-scroll-container",
+  WRAPPER: "code-block-wrapper",
+} as const;
diff --git a/ui/lib/ui/src/lib/constants/css-classes.constants.ts b/ui/lib/ui/src/lib/constants/css-classes.constants.ts
new file mode 100644
index 000000000..05889db8d
--- /dev/null
+++ b/ui/lib/ui/src/lib/constants/css-classes.constants.ts
@@ -0,0 +1,36 @@
+// only the classes the copied components import, from ui/apps/chat's css-classes.constants.ts
+
+export const BOX_BORDER =
+	'border border-border/30 focus-within:border-border  dark:border-border/20 dark:focus-within:border-border';
+
+export const INPUT_CLASSES = `
+    bg-muted/60 dark:bg-muted/75
+    ${BOX_BORDER}
+    matte-key
+    outline-none
+    text-foreground
+`;
+
+/** Filter controls above the model table: one box, one height, one fill. */
+export const FILTER_TRIGGER_CLASS = `
+    h-8
+    gap-1.5
+    rounded-md
+    px-3
+    text-sm
+    font-medium
+    transition-colors
+    hover:bg-muted/80 dark:hover:bg-muted
+    ${INPUT_CLASSES}
+`;
+
+/** One filter toggle of the models manager toolbar: a 32px wide key in the 32px tall group. */
+export const FILTER_TOGGLE_ITEM_CLASS = 'w-8';
+
+export const ICON_CLASS_DEFAULT = 'size-icon-md';
+
+/** Close control of a dialog, a panel or the navigation rail on a phone: one tap target,
+ *  one cross, one look. Each site adds the offsets that keep the cross on the 16px inset
+ *  the titles sit on. */
+export const PANEL_CLOSE_MOBILE_CLASS =
+	'max-md:grid max-md:size-10 max-md:place-items-center max-md:rounded-full max-md:text-muted-foreground max-md:opacity-100 max-md:hover:bg-accent max-md:hover:text-accent-foreground';
diff --git a/ui/lib/ui/src/lib/constants/index.ts b/ui/lib/ui/src/lib/constants/index.ts
new file mode 100644
index 000000000..a9cdefa47
--- /dev/null
+++ b/ui/lib/ui/src/lib/constants/index.ts
@@ -0,0 +1,3 @@
+export * from './css-classes.constants';
+export * from './code-block.constants';
+export * from './ui.constants';
diff --git a/ui/lib/ui/src/lib/constants/ui.constants.ts b/ui/lib/ui/src/lib/constants/ui.constants.ts
new file mode 100644
index 000000000..ff1bde2c9
--- /dev/null
+++ b/ui/lib/ui/src/lib/constants/ui.constants.ts
@@ -0,0 +1,9 @@
+// only the constants the copied components import, from ui/apps/chat's ui.constants.ts and auto-scroll.constants.ts
+
+/** Data attributes the UI sets on the document. */
+export const UI_DATA_ATTRS = {
+	HIGHLIGHT_THEME_PREVIEW: 'data-highlight-theme-preview'
+} as const;
+
+/** How close to the bottom (px) a streaming code block counts as at the bottom. */
+export const SYNTAX_CODE_SCROLL_AT_BOTTOM_THRESHOLD_PX = 32;
diff --git a/ui/lib/ui/src/lib/enums/boolean-string.enums.ts b/ui/lib/ui/src/lib/enums/boolean-string.enums.ts
new file mode 100644
index 000000000..80a4f72bc
--- /dev/null
+++ b/ui/lib/ui/src/lib/enums/boolean-string.enums.ts
@@ -0,0 +1,5 @@
+/** String representation of a boolean used in data attributes and persisted values. */
+export enum BooleanString {
+	FALSE = 'false',
+	TRUE = 'true'
+}
diff --git a/ui/lib/ui/src/lib/enums/index.ts b/ui/lib/ui/src/lib/enums/index.ts
new file mode 100644
index 000000000..f0d4cc1de
--- /dev/null
+++ b/ui/lib/ui/src/lib/enums/index.ts
@@ -0,0 +1,3 @@
+// The enums the components share with the apps built on them.
+export { BooleanString } from './boolean-string.enums.js';
+export { ColorMode, TooltipSide } from './ui.enums.js';
diff --git a/ui/lib/ui/src/lib/enums/ui.enums.ts b/ui/lib/ui/src/lib/enums/ui.enums.ts
new file mode 100644
index 000000000..f4b1188cc
--- /dev/null
+++ b/ui/lib/ui/src/lib/enums/ui.enums.ts
@@ -0,0 +1,13 @@
+export enum ColorMode {
+	DARK = 'dark',
+	LIGHT = 'light',
+	SYSTEM = 'system'
+}
+
+// From ui/apps/chat's src/lib/enums/ui.enums.ts: the enums the package's components use.
+export enum TooltipSide {
+	BOTTOM = 'bottom',
+	LEFT = 'left',
+	RIGHT = 'right',
+	TOP = 'top'
+}
diff --git a/ui/lib/ui/src/lib/index.ts b/ui/lib/ui/src/lib/index.ts
new file mode 100644
index 000000000..8fe7855e9
--- /dev/null
+++ b/ui/lib/ui/src/lib/index.ts
@@ -0,0 +1,41 @@
+// public API of the library; grows as pieces are extracted from Llama UI (ui/apps/chat in llama.cpp) and llama.pages.
+// Styles are separate entry points: @ggml-org/llama-ui/theme.css (everything), tokens.css, fonts.css, surfaces.css.
+export { cn, tv, type WithElementRef, type WithoutChild, type WithoutChildren, type WithoutChildrenOrChild } from './components/ui/utils.js';
+export { ActionIcon } from './components/app/actions/index.js';
+export { SyntaxHighlightedCode } from './components/app/content/index.js';
+export { SearchInput } from './components/app/forms/index.js';
+export { Logo } from './components/app/misc/index.js';
+export { FILTER_TOGGLE_ITEM_CLASS, FILTER_TRIGGER_CLASS, PANEL_CLOSE_MOBILE_CLASS } from './constants/index.js';
+export { ColorMode, TooltipSide } from './enums/index.js';
+export { highlightCode } from './utils/index.js';
+export * as Alert from './components/ui/alert/index.js';
+export * as AlertDialog from './components/ui/alert-dialog/index.js';
+export { Badge, badgeVariants, type BadgeVariant } from './components/ui/badge/index.js';
+export { Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant } from './components/ui/button/index.js';
+export * as ButtonGroup from './components/ui/button-group/index.js';
+export * as Card from './components/ui/card/index.js';
+export { Checkbox } from './components/ui/checkbox/index.js';
+export * as Collapsible from './components/ui/collapsible/index.js';
+export * as ContextMenu from './components/ui/context-menu/index.js';
+export * as Dialog from './components/ui/dialog/index.js';
+export * as Drawer from './components/ui/drawer/index.js';
+export * as DropdownMenu from './components/ui/dropdown-menu/index.js';
+export * as Empty from './components/ui/empty/index.js';
+export * as HoverCard from './components/ui/hover-card/index.js';
+export { Input } from './components/ui/input/index.js';
+export { Label } from './components/ui/label/index.js';
+export * as Popover from './components/ui/popover/index.js';
+export * as RadioGroup from './components/ui/radio-group/index.js';
+export * as ScrollArea from './components/ui/scroll-area/index.js';
+export * as Select from './components/ui/select/index.js';
+export { Separator } from './components/ui/separator/index.js';
+export { Skeleton } from './components/ui/skeleton/index.js';
+export { Switch } from './components/ui/switch/index.js';
+export * as Table from './components/ui/table/index.js';
+export * as Tabs from './components/ui/tabs/index.js';
+export { Textarea } from './components/ui/textarea/index.js';
+export { Toggle, toggleVariants } from './components/ui/toggle/index.js';
+export * as ToggleGroup from './components/ui/toggle-group/index.js';
+export * as Tooltip from './components/ui/tooltip/index.js';
+export * from './components/mockups/index.js';
+export * from './components/models/index.js';
diff --git a/ui/lib/ui/src/lib/models/constants.ts b/ui/lib/ui/src/lib/models/constants.ts
new file mode 100644
index 000000000..2f8899e9c
--- /dev/null
+++ b/ui/lib/ui/src/lib/models/constants.ts
@@ -0,0 +1,93 @@
+// Model UI's constants, from ui/apps/chat's src/lib/constants (css-classes, icons, ui, huggingface,
+// models-discover-download and model-compatibility).
+import { ModelCapability, ModelModality } from './enums.js';
+import type { ModelModalities } from './types.js';
+import {
+	Eye as VisionIcon,
+	Lightbulb as ReasoningIcon,
+	Mic as AudioIcon,
+	Video as VideoIcon,
+	Wrench as ToolUseIcon
+} from '@lucide/svelte';
+import type { Component } from 'svelte';
+
+/** Neutral model badge: params, quantization, tags. */
+export const MODEL_BADGE_CLASS =
+	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25';
+
+/** Emphasis model badge: draft sidecars and other markers that must stand out. */
+export const MODEL_VARIANT_BADGE_CLASS =
+	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-1.5 py-0 text-[10px] font-mono font-semibold uppercase tracking-wide text-primary-foreground';
+
+/** Tag badge: free-form tags on a model id. */
+export const MODEL_TAG_BADGE_CLASS =
+	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground';
+
+/** A draft that rides with a quant chip, e.g. `MTP:Q8_0`. */
+export const SIDECAR_BADGE_CLASS =
+	'rounded-md bg-primary px-1 py-0.5 text-[10px] font-semibold tracking-wide text-primary-foreground uppercase';
+
+export const MODALITY_ICONS = {
+	[ModelModality.AUDIO]: AudioIcon,
+	[ModelModality.VIDEO]: VideoIcon,
+	[ModelModality.VISION]: VisionIcon
+};
+
+export const MODALITY_LABELS = {
+	[ModelModality.AUDIO]: 'Audio',
+	[ModelModality.VIDEO]: 'Video',
+	[ModelModality.VISION]: 'Vision'
+};
+
+export const MODALITY_FLAG_KEYS: Record<Exclude<ModelModality, ModelModality.TEXT>, keyof ModelModalities> = {
+	[ModelModality.AUDIO]: 'audio',
+	[ModelModality.VIDEO]: 'video',
+	[ModelModality.VISION]: 'vision'
+};
+
+export const MODALITY_ORDER: Exclude<ModelModality, ModelModality.TEXT>[] = [
+	ModelModality.VISION,
+	ModelModality.VIDEO,
+	ModelModality.AUDIO
+];
+
+export const CAPABILITY_ICONS: Record<ModelCapability, Component> = {
+	[ModelCapability.REASONING]: ReasoningIcon,
+	[ModelCapability.TOOL_USE]: ToolUseIcon
+};
+
+export const CAPABILITY_LABELS: Record<ModelCapability, string> = {
+	[ModelCapability.REASONING]: 'Reasoning',
+	[ModelCapability.TOOL_USE]: 'Tool use'
+};
+
+/** Orgs whose avatar is a dark mark on transparent, inverted in dark mode. */
+export const DARK_INVERT_AVATAR_ORGS = ['openai'];
+
+export const HF_AVATARS_URL = 'https://huggingface.co/api/avatars';
+
+/** Bit depth that collects every quant no other row takes. */
+export const OTHER_BIT_DEPTH = 99;
+export const OTHER_BIT_DEPTH_LABEL = 'Other';
+export const BIT_DEPTH_LABEL_SUFFIX = '-bit';
+
+export const KILOBYTE = 1_000;
+export const MEGABYTE = 1_000_000;
+export const GIGABYTE = 1_000_000_000;
+export const BYTE_LABEL = 'B';
+export const KILOBYTE_LABEL = 'KB';
+export const MEGABYTE_LABEL = 'MB';
+export const GIGABYTE_LABEL = 'GB';
+
+/** Bytes in one mebibyte (MiB), used to convert a file size to MB. */
+export const MIB_BYTES = 1_048_576;
+/** MiB in one tier unit; the tiers below are binary sizes, i.e. GiB. */
+export const MB_PER_GB = 1024;
+/** Overhead multiplier applied to the file size when estimating weight memory. */
+export const QUANT_WEIGHT = 1.05;
+/** Share of RAM the app allows the model to occupy. */
+export const RAM_BUDGET_RATIO = 0.75;
+/** Fixed RAM overhead (MB) reserved for the system and KV cache. */
+export const RAM_OVERHEAD_MB = 2048;
+/** Memory sizes devices come with, in GB; a model is shown against the smallest it fits. */
+export const MEM_TIERS = [4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024];
diff --git a/ui/lib/ui/src/lib/models/enums.ts b/ui/lib/ui/src/lib/models/enums.ts
new file mode 100644
index 000000000..a3c2b7844
--- /dev/null
+++ b/ui/lib/ui/src/lib/models/enums.ts
@@ -0,0 +1,28 @@
+// From ui/apps/chat's src/lib/enums/model.enums.ts: the parts Model UI reads.
+
+export enum ModelModality {
+	AUDIO = 'AUDIO',
+	TEXT = 'TEXT',
+	VIDEO = 'VIDEO',
+	VISION = 'VISION'
+}
+
+export enum ModelCapability {
+	REASONING = 'reasoning',
+	TOOL_USE = 'tools'
+}
+
+/**
+ * Speculative-decoding draft sidecars (server spec-type draft-*).
+ * Filenames use the lowercase token, e.g. `mtp-<name>.gguf` or `-mtp` suffix.
+ */
+export enum ModelDraftSidecar {
+	/** DFlash block-diffusion draft (spec-type draft-dflash). */
+	DFLASH = 'dflash',
+	/** DSpark block-diffusion draft (spec-type draft-dspark). */
+	DSPARK = 'dspark',
+	/** EAGLE-3 speculative draft (spec-type draft-eagle3). */
+	EAGLE3 = 'eagle3',
+	/** Multi-token-prediction draft head (spec-type draft-mtp). */
+	MTP = 'mtp'
+}
diff --git a/ui/lib/ui/src/lib/models/format.spec.ts b/ui/lib/ui/src/lib/models/format.spec.ts
new file mode 100644
index 000000000..0446a55eb
--- /dev/null
+++ b/ui/lib/ui/src/lib/models/format.spec.ts
@@ -0,0 +1,53 @@
+import {
+	formatFileSize,
+	formatParameters,
+	formatSizeRange,
+	getAvatarUrl,
+	minMemoryTierGb,
+	summarizeSizes
+} from './format.js';
+import { describe, expect, it } from 'vite-plus/test';
+
+describe('Model UI formatting', () => {
+	it('formats file sizes and ranges in decimal units', () => {
+		expect(formatFileSize(12_109_566_560)).toBe('12.1 GB');
+		expect(formatFileSize(740_000_000)).toBe('740.0 MB');
+		expect(formatSizeRange(16_400_000_000, 28_600_000_000)).toBe('16.4-28.6 GB');
+	});
+
+	it('formats parameter and token counts', () => {
+		expect(formatParameters(8_000_000_000)).toBe('8B');
+		expect(formatParameters(262_144)).toBe('262.14K');
+		expect(formatParameters('n/a')).toBe('Unknown');
+	});
+
+	it('builds avatar URLs without the provider tilde', () => {
+		expect(getAvatarUrl('~openai')).toBe('https://huggingface.co/api/avatars/openai');
+	});
+});
+
+describe('minMemoryTierGb', () => {
+	it('picks the smallest tier the weights fit in', () => {
+		// gpt-oss-20b, 12.1 GB: 24 GB at 75% minus 2 GB overhead is the first budget that holds it
+		expect(minMemoryTierGb(12_109_566_560)).toBe(24);
+		expect(minMemoryTierGb(0)).toBeNull();
+	});
+
+	it("takes a platform's own tiers", () => {
+		expect(minMemoryTierGb(12_109_566_560, [8, 16, 18, 24])).toBe(24);
+		expect(minMemoryTierGb(4_000_000_000, [8, 16])).toBe(8);
+		expect(minMemoryTierGb(900_000_000_000, [8, 16])).toBeNull();
+	});
+});
+
+describe('summarizeSizes', () => {
+	it('spans the smallest to the largest and counts every size', () => {
+		expect(summarizeSizes(['E2B', 'E4B', '12B', '26B-A4B', '31B'])).toBe('E2B–31B · 5 sizes');
+		expect(summarizeSizes(['3B', '3B', '8B', '8B', '14B', '14B'])).toBe('3B–14B · 6 sizes');
+	});
+
+	it('names a single size alone', () => {
+		expect(summarizeSizes(['740M'])).toBe('740M');
+		expect(summarizeSizes([])).toBe('');
+	});
+});
diff --git a/ui/lib/ui/src/lib/models/format.ts b/ui/lib/ui/src/lib/models/format.ts
new file mode 100644
index 000000000..ef5acddac
--- /dev/null
+++ b/ui/lib/ui/src/lib/models/format.ts
@@ -0,0 +1,112 @@
+// Model UI's formatting and sizing helpers, from ui/apps/chat's HuggingFaceService (formatFileSize, formatSizeRange,
+// getAvatarUrl) and utils (formatParameters, minMemoryTierGb). Pure functions: no fetching, no stores.
+import {
+	BYTE_LABEL,
+	GIGABYTE,
+	GIGABYTE_LABEL,
+	HF_AVATARS_URL,
+	KILOBYTE,
+	KILOBYTE_LABEL,
+	MB_PER_GB,
+	MEGABYTE,
+	MEGABYTE_LABEL,
+	MEM_TIERS,
+	MIB_BYTES,
+	QUANT_WEIGHT,
+	RAM_BUDGET_RATIO,
+	RAM_OVERHEAD_MB
+} from './constants.js';
+
+/** A file size with one decimal, e.g. `4.6 GB`. */
+export function formatFileSize(bytes: number): string {
+	if (bytes >= GIGABYTE) return `${(bytes / GIGABYTE).toFixed(1)} ${GIGABYTE_LABEL}`;
+
+	if (bytes >= MEGABYTE) return `${(bytes / MEGABYTE).toFixed(1)} ${MEGABYTE_LABEL}`;
+
+	if (bytes >= KILOBYTE) return `${(bytes / KILOBYTE).toFixed(1)} ${KILOBYTE_LABEL}`;
+
+	return `${bytes} ${BYTE_LABEL}`;
+}
+
+/** A min-max size range with one shared unit, e.g. `19.0-28.6 GB`. */
+export function formatSizeRange(min: number, max: number): string {
+	const unit =
+		max >= GIGABYTE
+			? GIGABYTE_LABEL
+			: max >= MEGABYTE
+				? MEGABYTE_LABEL
+				: max >= KILOBYTE
+					? KILOBYTE_LABEL
+					: BYTE_LABEL;
+	const div =
+		unit === GIGABYTE_LABEL
+			? GIGABYTE
+			: unit === MEGABYTE_LABEL
+				? MEGABYTE
+				: unit === KILOBYTE_LABEL
+					? KILOBYTE
+					: 1;
+	const fmt = (n: number) => (div === 1 ? `${n}` : `${(n / div).toFixed(1)}`);
+
+	return `${fmt(min)}-${fmt(max)} ${unit}`;
+}
+
+/** A parameter or token count, e.g. `8B`, `262.14K`. */
+export function formatParameters(params: number | unknown): string {
+	if (typeof params !== 'number') return 'Unknown';
+
+	if (params >= 1e9) {
+		const billions = params / 1e9;
+
+		return `${Number.isInteger(billions) ? billions : billions.toFixed(1)}B`;
+	}
+
+	if (params >= 1e6) return `${(params / 1e6).toFixed(2)}M`;
+
+	if (params >= 1e3) return `${(params / 1e3).toFixed(2)}K`;
+
+	return params.toString();
+}
+
+/**
+ * Avatar URL for a Hugging Face author (org or user). 404s when the author does not exist, so callers should provide
+ * a fallback, as ModelOrgAvatar does.
+ */
+export function getAvatarUrl(author: string): string {
+	// OpenRouter-style model ids prefix the provider with a tilde (`~openai/gpt-...`); the avatars endpoint only
+	// resolves bare names
+	return `${HF_AVATARS_URL}/${author.replace(/^~/, '')}`;
+}
+
+/**
+ * Smallest memory tier (GB) that can run a model of the given file size, or null if nothing fits even the largest
+ * tier. `tiers` swaps in a platform's own sizes, such as the memory Macs ship with.
+ */
+export function minMemoryTierGb(sizeBytes: number, tiers: readonly number[] = MEM_TIERS): number | null {
+	if (!sizeBytes) return null;
+
+	const weightMb = (sizeBytes / MIB_BYTES) * QUANT_WEIGHT;
+
+	for (const tier of tiers) {
+		const budgetMb = tier * MB_PER_GB * RAM_BUDGET_RATIO - RAM_OVERHEAD_MB;
+
+		if (weightMb <= budgetMb) return tier;
+	}
+
+	return null;
+}
+
+/**
+ * A family's sizes in one line: the smallest to the largest and how many there are, e.g. `E2B–31B · 5 sizes`, or the
+ * one size, e.g. `740M`. `params` lists one parameter count per size, smallest first; repeats (a size's instruct and
+ * reasoning variants) count as sizes but appear once in the span.
+ */
+export function summarizeSizes(params: string[]): string {
+	const unique = [...new Set(params)];
+
+	if (params.length <= 1) return unique[0] ?? '';
+
+	const span = unique.length === 1 ? unique[0] : `${unique[0]}–${unique[unique.length - 1]}`;
+
+	return `${span} · ${params.length} sizes`;
+}
diff --git a/ui/lib/ui/src/lib/models/index.ts b/ui/lib/ui/src/lib/models/index.ts
new file mode 100644
index 000000000..1fbea3fb1
--- /dev/null
+++ b/ui/lib/ui/src/lib/models/index.ts
@@ -0,0 +1,4 @@
+export * from './constants.js';
+export * from './enums.js';
+export * from './format.js';
+export type * from './types.js';
diff --git a/ui/lib/ui/src/lib/models/types.ts b/ui/lib/ui/src/lib/models/types.ts
new file mode 100644
index 000000000..23221369e
--- /dev/null
+++ b/ui/lib/ui/src/lib/models/types.ts
@@ -0,0 +1,36 @@
+// The data Model UI takes in. Fetching it (from llama-server, the Hugging Face API or a curated catalog) stays in each
+// app; the components only draw it and report what the user did.
+
+export interface ModelModalities {
+	vision: boolean;
+	audio: boolean;
+	video: boolean;
+}
+
+/** A min-max size in bytes, across a repo's quants. */
+export interface ModelSizeRange {
+	min: number;
+	max: number;
+}
+
+/** Where a quant file stands on this device, as the app knows it. */
+export type ModelQuantState = 'idle' | 'downloading' | 'paused' | 'downloaded' | 'failed';
+
+/** A draft model that rides along with a quant, e.g. an MTP head. */
+export interface ModelQuantCompanion {
+	kind: string;
+	quant?: string;
+	sizeBytes?: number;
+	onDisk?: boolean;
+}
+
+/** A draft sidecar a model comes with, badged with its own quant when its file names one. */
+export interface ModelDraftSidecarBadge {
+	kind: string;
+	quant?: string | null;
+}
+
+export interface ModelDownloadProgress {
+	downloadedBytes: number;
+	totalBytes: number;
+}
diff --git a/ui/lib/ui/src/lib/styles/fonts.css b/ui/lib/ui/src/lib/styles/fonts.css
new file mode 100644
index 000000000..08197315d
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/fonts.css
@@ -0,0 +1,22 @@
+/* Llama Sans, the sans of the Llama type family (OFL, see assets/fonts/OFL.txt): one variable font for every
+   weight from 400 to 700 and every optical size from 10 to 36. The browser sets the optical size from font-size
+   (font-optical-sizing: auto), so 16px text is spaced and kerned for interfaces, 36px and up tight for headlines
+   and text under 16px looser, with a blend in between. Its line box is centred on the cap height, so labels sit in
+   the middle of buttons and chips. */
+@font-face {
+	font-family: 'Llama Sans';
+	src: url('../assets/fonts/LlamaSans.woff2') format('woff2');
+	font-weight: 400 700;
+	font-style: normal;
+	font-display: swap;
+}
+
+/* Llama Mono, the family's monospace (OFL, same file), for code, commands and numbers in columns: every character in
+   one 600-unit cell, its coding ligatures included, from 400 to 700. */
+@font-face {
+	font-family: 'Llama Mono';
+	src: url('../assets/fonts/LlamaMono.woff2') format('woff2');
+	font-weight: 400 700;
+	font-style: normal;
+	font-display: swap;
+}
diff --git a/ui/lib/ui/src/lib/styles/surfaces.css b/ui/lib/ui/src/lib/styles/surfaces.css
new file mode 100644
index 000000000..fa4aeb7ef
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/surfaces.css
@@ -0,0 +1,256 @@
+/*
+ * Matte finishes. Each reads its colours from slot variables (--glass-*, --float-*)
+ * that default to semantic tokens; the *-surface utilities below point the slots at
+ * one component's tokens, so markup needs a single class per component.
+ */
+
+/* Frosted panel: flat fill, faint inner rim, hairline border shaded darker at the sides. */
+@utility matte-glass {
+	--edge-side: var(--glass-edge-side, var(--edge-rest-side));
+	--edge-mid: var(--glass-edge-mid, var(--edge-rest-mid));
+	background-color: var(--glass-background, var(--surface-glass));
+	backdrop-filter: blur(var(--blur-surface)) saturate(1.5);
+	box-shadow:
+		inset 0 0 0 2px var(--glass-highlight, var(--highlight-inner)),
+		var(--glass-shadow, var(--elevation-surface));
+
+	/* the ring below needs a positioned box; keep fixed or sticky ones as they are */
+	&:not(.fixed, .absolute, .sticky) {
+		position: relative;
+	}
+
+	/* masked ring, so the edge gradient does not tint the translucent fill */
+	&::before {
+		content: '';
+		position: absolute;
+		inset: 0;
+		padding: 1px;
+		border-radius: inherit;
+		pointer-events: none;
+		background: linear-gradient(
+			to right,
+			var(--edge-side),
+			var(--edge-mid) 12%,
+			var(--edge-mid) 88%,
+			var(--edge-side)
+		);
+		mask:
+			linear-gradient(#000 0 0) content-box exclude,
+			linear-gradient(#000 0 0);
+	}
+
+	&:focus-within {
+		--edge-side: var(--glass-edge-side-focus, var(--edge-focus-side));
+		--edge-mid: var(--glass-edge-mid-focus, var(--edge-focus-mid));
+	}
+}
+
+@utility chat-form-surface {
+	@apply matte-glass;
+	--glass-background: var(--chat-form-background);
+	--glass-edge-side: var(--chat-form-edge-side);
+	--glass-edge-mid: var(--chat-form-edge-mid);
+	--glass-edge-side-focus: var(--chat-form-edge-side-focus);
+	--glass-edge-mid-focus: var(--chat-form-edge-mid-focus);
+	--glass-highlight: var(--chat-form-highlight);
+	--glass-shadow: var(--chat-form-shadow);
+	color: var(--chat-form-text);
+}
+
+@utility card-surface {
+	@apply matte-glass;
+	--glass-background: var(--card-background);
+	--glass-edge-side: var(--card-edge-side);
+	--glass-edge-mid: var(--card-edge-mid);
+	--glass-highlight: var(--card-highlight);
+	--glass-shadow: var(--card-shadow);
+	color: var(--card-text);
+}
+
+/* the sidebar edge stays the same while focus is inside, unlike the chat form */
+@utility sidebar-surface {
+	@apply matte-glass;
+	--glass-background: var(--sidebar-background);
+	--glass-edge-side: var(--sidebar-edge-side);
+	--glass-edge-mid: var(--sidebar-edge-mid);
+	--glass-edge-side-focus: var(--sidebar-edge-side);
+	--glass-edge-mid-focus: var(--sidebar-edge-mid);
+	--glass-highlight: var(--sidebar-highlight);
+	--glass-shadow: var(--sidebar-shadow);
+}
+
+/* Elevated surfaces (cards, floating bars, thumbnails): an elevation token with the hairline ring (--elevation-ring,
+   black 5%, white 18% in dark) baked in as its last layer, so the edge melts into the shadow and the shadow deepens
+   in dark mode. Never pair these with a border: the ring is the edge. */
+@utility elevated-control {
+	box-shadow:
+		var(--elevation-control),
+		0 0 0 var(--elevation-ring-width) var(--elevation-ring);
+}
+
+@utility elevated-surface {
+	box-shadow:
+		var(--elevation-surface),
+		0 0 0 var(--elevation-ring-width) var(--elevation-ring);
+}
+
+@utility elevated-raised {
+	box-shadow:
+		var(--elevation-raised),
+		0 0 0 var(--elevation-ring-width) var(--elevation-ring);
+}
+
+/* rows grouped inside a glass panel; the edge stays the same while focus is inside. It sits on
+   glass already, so it does not blur: a second backdrop blur re-paints the panel's own fill
+   behind it and turns the group visibly lighter, whatever its fill */
+@utility inset-group-surface {
+	@apply matte-glass;
+	backdrop-filter: none;
+	--glass-background: var(--inset-group-background);
+	--glass-edge-side: var(--inset-group-edge-side);
+	--glass-edge-mid: var(--inset-group-edge-mid);
+	--glass-edge-side-focus: var(--inset-group-edge-side);
+	--glass-edge-mid-focus: var(--inset-group-edge-mid);
+	--glass-highlight: transparent;
+	--glass-shadow: var(--inset-group-shadow);
+	border-radius: var(--inset-group-radius);
+}
+
+/* the row a sidebar list is on: the inset group's edge and shade around a tint. It keeps the
+   row's own radius, and hover or press fills (bg-*) still paint over it */
+@utility selected-row-surface {
+	@apply matte-glass;
+	backdrop-filter: none;
+	--glass-background: var(--selected-row-background);
+	--glass-edge-side: var(--inset-group-edge-side);
+	--glass-edge-mid: var(--inset-group-edge-mid);
+	--glass-edge-side-focus: var(--inset-group-edge-side);
+	--glass-edge-mid-focus: var(--inset-group-edge-mid);
+	--glass-highlight: transparent;
+	--glass-shadow: var(--inset-group-shadow);
+}
+
+/* Floating panel (menus, popovers, drawers): frosted fill, faint rim, lifted shadow. The edge is the hairline ring
+   baked into the shadow, not the border, so the two never draw a double edge; the border stays transparent so the
+   panel keeps its size. */
+@utility matte-float {
+	background-color: var(--float-background, var(--float-panel-background));
+	border-color: transparent;
+	color: var(--float-panel-text);
+	backdrop-filter: blur(var(--blur-surface)) saturate(1.5);
+	box-shadow:
+		inset 0 0 0 1px var(--float-panel-highlight),
+		var(--float-panel-shadow),
+		0 0 0 var(--elevation-ring-width) var(--float-panel-edge);
+}
+
+/* Dialogs float over the page colour rather than the raised one. */
+@utility matte-float-modal {
+	@apply matte-float;
+	--float-background: var(--float-panel-background-modal);
+}
+
+/* Recessed field (inputs, switch track, checkbox): soft inner shade, keeps Tailwind focus rings. */
+@utility matte-well {
+	--tw-inset-shadow: var(--input-shadow);
+	box-shadow:
+		var(--tw-inset-shadow), var(--tw-ring-offset-shadow, 0 0 #0000),
+		var(--tw-ring-shadow, 0 0 #0000);
+}
+
+/* Soft top-down sheen over a surface's own fill, e.g. the user message bubble and the soft badges. */
+@utility matte-sheen {
+	background-image: linear-gradient(to bottom, var(--sheen-start), var(--sheen-end));
+}
+
+/* The fainter sheen for a solid fill (solid badges): barely lighter at the top. */
+@utility matte-sheen-solid {
+	background-image: linear-gradient(to bottom, var(--key-sheen-solid), transparent);
+}
+
+/* Frosted button finish: keeps the button's own fill and border, adds blur, a fill barely lighter at the top and a
+   small drop shadow. No highlight line at the top: the edge is the same all round. */
+@utility matte-key {
+	background-image: linear-gradient(to bottom, var(--key-sheen), transparent);
+	backdrop-filter: blur(var(--blur-control)) saturate(1.4);
+	box-shadow: var(--button-shadow);
+}
+
+/* The same finish on a solid fill (primary and danger buttons): the sheen, the frosting (it shows wherever the fill is
+   translucent, as the danger key's is in dark), and an even hairline in a shade of the fill drawn inside it, so the
+   width stays the button's. Set the shade with --key-edge. */
+@utility matte-key-solid {
+	@apply matte-sheen-solid;
+	backdrop-filter: blur(var(--blur-control)) saturate(1.4);
+	box-shadow:
+		inset 0 0 0 1px var(--key-edge),
+		var(--button-shadow);
+}
+
+/* Lit colored control (record, error send): a near-flat fill barely lighter at the top, an even hairline a step
+   lighter, the glyph pressed in a little; no glow. Set the color with orb-danger, orb-warning or orb-success. */
+@utility matte-orb {
+	background-image: linear-gradient(
+		to bottom,
+		color-mix(in oklab, var(--orb), white 6%),
+		var(--orb)
+	);
+	color: var(--orb-glyph);
+	box-shadow:
+		inset 0 0 0 1px var(--orb-rim),
+		var(--button-shadow);
+	transition:
+		box-shadow 150ms ease,
+		filter 150ms ease,
+		translate 150ms ease;
+
+	& svg {
+		filter: drop-shadow(0 0.5px 0 var(--white-a30));
+	}
+
+	&:hover:not(:disabled) {
+		filter: brightness(1.05) saturate(1.05);
+	}
+
+	&:active:not(:disabled) {
+		translate: 0 0.5px;
+	}
+
+	&:disabled {
+		filter: saturate(0.25);
+		box-shadow: inset 0 0 0 1px var(--orb-rim);
+	}
+}
+
+/* Small lamp for status dots: the fill, barely lighter at the top, and a faint darker hairline; no glow. */
+@utility status-lamp {
+	background-image: linear-gradient(
+		to bottom,
+		color-mix(in oklab, var(--orb), white 12%),
+		var(--orb)
+	);
+	box-shadow: inset 0 0 0 0.5px color-mix(in oklab, var(--orb-glyph) 50%, transparent);
+}
+
+@utility orb-danger {
+	--orb: var(--status-danger);
+	--orb-rim: var(--status-danger-rim);
+	--orb-glyph: var(--status-danger-glyph);
+}
+
+@utility orb-warning {
+	--orb: var(--status-warning);
+	--orb-rim: var(--status-warning-rim);
+	--orb-glyph: var(--status-warning-glyph);
+}
+
+@utility orb-success {
+	--orb: var(--status-success);
+	--orb-rim: var(--status-success-rim);
+	--orb-glyph: var(--status-success-glyph);
+}
+
+/* Letters pressed into a matte surface. */
+@utility engraved {
+	text-shadow: var(--text-shadow-engraved);
+}
diff --git a/ui/lib/ui/src/lib/styles/theme.css b/ui/lib/ui/src/lib/styles/theme.css
new file mode 100644
index 000000000..6b2538302
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/theme.css
@@ -0,0 +1,124 @@
+/*
+ * Llama UI's theme: fonts, tokens, surfaces and the Tailwind theme the components read.
+ * Consumers import it after Tailwind, tw-animate-css, which the components' enter and exit
+ * animations come from (a peer dependency, like Tailwind), and @ggml-org/llama-brand's colours,
+ * which the primitives build on. Stylesheets here import no package, so an app that compiles
+ * these sources itself resolves all three from its own node_modules:
+ *
+ *   @import 'tailwindcss';
+ *   @import 'tw-animate-css';
+ *   @import '@ggml-org/llama-brand/css/colors.css';
+ *   @import '@ggml-org/llama-ui/theme.css';
+ *
+ * Dark mode is the `dark` class on <html>; the Matte light surfaces are the `theme-matte` class.
+ */
+
+@import './fonts.css';
+@import './tokens.css';
+@import './surfaces.css';
+
+/* the components' own classes, so Tailwind generates them in the consumer's build */
+@source '../';
+
+@custom-variant dark (&:is(.dark *));
+
+/* shadcn components key their orientation styles off these, toggle-group among them */
+@custom-variant data-horizontal (&[data-orientation='horizontal']);
+@custom-variant data-vertical (&[data-orientation='vertical']);
+
+/*
+ * Tailwind v4 dropped the pointer cursor from buttons. Every control a user can
+ * press gets it back, and anything disabled keeps the cursor its own class asks for.
+ */
+@layer base {
+	button:not(:disabled),
+	[role='button']:not([data-disabled]),
+	[role='checkbox']:not([data-disabled]),
+	[role='combobox']:not([data-disabled]),
+	[role='menuitem']:not([data-disabled]),
+	[role='menuitemcheckbox']:not([data-disabled]),
+	[role='menuitemradio']:not([data-disabled]),
+	[role='option']:not([data-disabled]),
+	[role='radio']:not([data-disabled]),
+	[role='switch']:not([data-disabled]),
+	[role='tab']:not([data-disabled]),
+	label[for],
+	select,
+	summary {
+		cursor: pointer;
+	}
+}
+
+:root {
+	--radius: 0.625rem;
+	--font-mono:
+		'Llama Mono', ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono',
+		Consolas, 'Liberation Mono', Menlo, monospace;
+
+	/*
+	 * shadcn names, kept so the vendored components and their classes keep working.
+	 * They alias semantic tokens; new code uses the semantic names directly.
+	 */
+	--background: var(--surface-page);
+	--foreground: var(--fg-default);
+	--card: var(--surface-raised);
+	--card-foreground: var(--fg-default);
+	--popover: var(--surface-raised);
+	--popover-foreground: var(--fg-default);
+	--primary: var(--action-primary);
+	--primary-foreground: var(--fg-on-action);
+	--secondary: var(--surface-emphasis);
+	--secondary-foreground: var(--fg-default);
+	--muted: var(--surface-muted);
+	--muted-foreground: var(--fg-muted);
+	--accent: var(--surface-selected);
+	--accent-foreground: var(--fg-default);
+	--destructive: var(--fg-danger);
+	--border: var(--line-default);
+	--input: var(--line-field);
+	--ring: var(--line-focus);
+	--code-background: var(--surface-code);
+	--code-foreground: var(--fg-code);
+}
+
+@theme inline {
+	/* the sans everywhere, headings included (their size sets the optical size): Llama Sans, then the system stack
+	   while it loads or if it can't */
+	--font-sans: 'Llama Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
+	--radius-sm: calc(var(--radius) - 4px);
+	--radius-md: calc(var(--radius) - 2px);
+	--radius-lg: var(--radius);
+	--radius-xl: calc(var(--radius) + 4px);
+	--color-background: var(--background);
+	--color-foreground: var(--foreground);
+	--color-card: var(--card);
+	--color-card-foreground: var(--card-foreground);
+	--color-popover: var(--popover);
+	--color-popover-foreground: var(--popover-foreground);
+	--color-primary: var(--primary);
+	--color-primary-foreground: var(--primary-foreground);
+	--color-secondary: var(--secondary);
+	--color-secondary-foreground: var(--secondary-foreground);
+	--color-muted: var(--muted);
+	--color-muted-foreground: var(--muted-foreground);
+	--color-accent: var(--accent);
+	--color-accent-foreground: var(--accent-foreground);
+	--color-destructive: var(--destructive);
+	--color-border: var(--border);
+	--color-input: var(--input);
+	--color-ring: var(--ring);
+}
+
+@layer base {
+	* {
+		@apply border-border outline-ring/50;
+	}
+
+	body {
+		@apply bg-background text-foreground antialiased;
+	}
+
+	:where(code, pre, kbd, samp) {
+		font-family: var(--font-mono);
+	}
+}
diff --git a/ui/lib/ui/src/lib/styles/tokens.css b/ui/lib/ui/src/lib/styles/tokens.css
new file mode 100644
index 000000000..01a75d709
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/tokens.css
@@ -0,0 +1,7 @@
+/*
+ * The three tiers of Llama UI's design tokens: primitives, semantic tokens (light and dark) and component tokens.
+ * Tokens only: no fonts, utilities or base styles. Most consumers want theme.css, which includes these.
+ */
+@import './tokens/primitives.css';
+@import './tokens/semantic.css';
+@import './tokens/components.css';
diff --git a/ui/lib/ui/src/lib/styles/tokens/components.css b/ui/lib/ui/src/lib/styles/tokens/components.css
new file mode 100644
index 000000000..4e62c76bb
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/tokens/components.css
@@ -0,0 +1,213 @@
+/*
+ * Tier 3: component tokens. One group per component, pattern
+ * [component]-[variant]-[property]-[state]. They point at semantic tokens only, so
+ * light and dark come for free. Components read them as bg-(--token) and friends.
+ */
+:root {
+	/* chat form: the main glass surface */
+	--chat-form-background: var(--surface-glass);
+	--chat-form-text: var(--fg-default);
+	--chat-form-placeholder: var(--fg-muted);
+	--chat-form-edge-side: var(--edge-rest-side);
+	--chat-form-edge-mid: var(--edge-rest-mid);
+	--chat-form-edge-side-focus: var(--edge-focus-side);
+	--chat-form-edge-mid-focus: var(--edge-focus-mid);
+	--chat-form-highlight: var(--highlight-inner);
+	--chat-form-shadow: var(--elevation-soft);
+	/* the keys inside it: the add key and the model selector */
+	--chat-form-key-shadow: var(--elevation-key);
+	--chat-form-radius: var(--radius-surface);
+	--chat-form-radius-compact: var(--radius-surface-lg);
+
+	/* card: a resting glass panel */
+	--card-background: var(--surface-glass);
+	--card-text: var(--fg-default);
+	--card-edge-side: var(--edge-rest-side);
+	--card-edge-mid: var(--edge-rest-mid);
+	--card-highlight: var(--highlight-inner);
+	--card-shadow: var(--elevation-surface);
+	--card-radius: var(--radius-card);
+
+	/* sidebar: a large ambient glass panel whose edge stays put on focus */
+	--sidebar-background: color-mix(in oklch, var(--surface-muted) 60%, transparent);
+	--sidebar-edge-side: var(--edge-ambient-side);
+	--sidebar-edge-mid: var(--edge-ambient-mid);
+	--sidebar-highlight: transparent;
+	--sidebar-shadow: var(--elevation-surface);
+	--sidebar-radius: var(--radius-container);
+
+	/* inset group: rows grouped inside a glass panel, e.g. the sidebar footer. A soft white on
+	   the light glass, with the sidebar's own ambient edge and a faint shade under it, so it
+	   reads as part of the panel rather than a button or a field */
+	--inset-group-background: color-mix(in oklch, var(--surface-raised) 55%, transparent);
+	--inset-group-edge-side: var(--edge-ambient-side);
+	--inset-group-edge-mid: var(--edge-ambient-mid);
+	--inset-group-shadow: 0 2px 8px -4px var(--black-a8);
+	/* a step rounder than a card, so the rows inside it (its radius less its padding, see the
+	   nested surfaces in Llama Chat's app.css) keep soft corners */
+	--inset-group-radius: var(--length-16);
+
+	/* selected row: the page a sidebar row opens is on. A tint of the text colour, under hover's,
+	   with the inset group's edge and shade so it reads as picked out rather than hovered */
+	--selected-row-background: color-mix(in oklch, var(--fg-default) 5%, transparent);
+
+	/* user message bubble */
+	--user-bubble-background: color-mix(in oklch, var(--action-primary) 5%, transparent);
+	--user-bubble-edge: var(--edge-faint);
+	--user-bubble-shadow: var(--elevation-faint);
+	--user-bubble-sheen-start: var(--sheen-start);
+	--user-bubble-sheen-end: var(--sheen-end);
+
+	/* floating panels: menus, popovers, select lists, hover cards, drawers, dialogs */
+	--float-panel-background: color-mix(in oklch, var(--surface-raised) 86%, transparent);
+	/* in light mode a translucent modal greys over the dimmed page, so it stays solid white */
+	--float-panel-background-modal: var(--surface-raised);
+	--float-panel-text: var(--fg-default);
+	--float-panel-edge: var(--edge-raised);
+	--float-panel-highlight: var(--highlight-inner);
+	--float-panel-shadow: var(--elevation-raised);
+	--float-panel-overlay: var(--surface-overlay);
+
+	/* buttons */
+	--button-primary-background: var(--action-primary);
+	--button-primary-background-hover: var(--action-primary-hover);
+	--button-primary-text: var(--fg-on-action);
+	--button-primary-seam: color-mix(in oklch, var(--fg-on-action) 25%, transparent);
+	--button-danger-background: var(--action-danger);
+	--button-danger-background-hover: var(--action-danger-hover);
+	--button-danger-text: var(--fg-on-danger);
+	--button-danger-seam: color-mix(in oklch, var(--fg-on-danger) 25%, transparent);
+	/* secondary and tertiary in light: a translucent shade of black rather than a white or grey fill, so the key is a
+	   step darker than whatever it sits on -- the off-white page, a white panel (the chat form, a card) or Matte's white
+	   page -- and reads the same on each. Tertiary is the fainter step */
+	--button-secondary-background: var(--black-a5);
+	--button-secondary-background-hover: var(--black-a8);
+	--button-secondary-border: var(--black-a6);
+	--button-tertiary-background: var(--black-a3);
+	--button-tertiary-background-hover: var(--black-a6);
+	--button-tertiary-border: var(--black-a4);
+	--button-ghost-background-hover: var(--action-ghost-hover);
+	--button-outline-background: var(--field-background);
+	--button-outline-border: var(--line-control);
+	--button-text: var(--fg-default);
+	--button-shadow: var(--elevation-control);
+	/* the matte finish: a fill barely lighter at the top; solid fills also get an even hairline in a shade of the fill.
+	   Kept faint, so keys read as frosted glass rather than polished: the danger key fainter still, since a sheen on
+	   saturated red is what turns it metallic */
+	--key-sheen: var(--white-a12);
+	--key-sheen-solid: var(--white-a6);
+	--button-primary-edge: color-mix(in oklab, var(--button-primary-background), black 30%);
+	--button-danger-sheen: var(--white-a2);
+	--button-danger-edge: color-mix(in oklab, var(--button-danger-background), black 6%);
+
+	/* toggles; the outline variant borrows the button outline */
+	--toggle-background-hover: var(--action-ghost-hover);
+	--toggle-background-on: var(--surface-selected);
+	--toggle-text: var(--fg-default);
+
+	/* toggle group: a row of keys like a secondary button; a pressed key turns white and sinks in */
+	--toggle-group-background: var(--button-secondary-background);
+	--toggle-group-border: var(--button-secondary-border);
+	--toggle-group-seam: var(--line-control);
+	--toggle-group-shadow: var(--elevation-control);
+	--toggle-group-key-text: var(--fg-default);
+	--toggle-group-key-text-muted: color-mix(in oklch, var(--fg-default) 70%, transparent);
+	--toggle-group-key-background-hover: var(--action-ghost-hover);
+	/* while a key is pressed, the others turn grey so the white one stands out */
+	--toggle-group-key-background-idle: var(--surface-muted);
+	--toggle-group-key-background-idle-hover: var(--surface-emphasis);
+	--toggle-group-key-background-on: var(--surface-pressed);
+	--toggle-group-key-shadow-on: var(--elevation-pressed);
+
+	/* tabs: the segmented track, the active tab raised on it; the line variant underlines instead */
+	--tabs-track: var(--surface-muted);
+	--tabs-track-shadow: var(--elevation-inset);
+	--tabs-text: color-mix(in oklch, var(--fg-default) 70%, transparent);
+	--tabs-text-active: var(--fg-default);
+	--tabs-background-active: var(--surface-lifted);
+	--tabs-shadow-active: var(--elevation-control);
+	--tabs-line-active: var(--fg-default);
+
+	/* switch: the same recessed track and raised thumb; on, the track takes the primary colour */
+	--switch-track: var(--surface-muted);
+	--switch-track-on: var(--action-primary);
+	--switch-track-shadow: var(--elevation-inset);
+	--switch-thumb: var(--surface-lifted);
+	--switch-thumb-on: var(--surface-lifted);
+	--switch-thumb-shadow: var(--elevation-control);
+
+	/* fields: input, textarea, checkbox */
+	--input-background: var(--field-background);
+	--input-text: var(--fg-default);
+	--input-placeholder: var(--fg-muted);
+	--input-border: var(--line-field);
+	--input-border-focus: var(--line-focus);
+	--input-border-invalid: var(--line-danger);
+	--input-shadow: var(--elevation-inset);
+
+	/* tooltips: the inverse of the page */
+	--tooltip-background: var(--action-primary);
+	--tooltip-text: var(--fg-on-action);
+	--tooltip-highlight: var(--highlight-inverse);
+	--tooltip-shadow: var(--elevation-tooltip);
+
+	/* badges */
+	--badge-primary-background: var(--action-primary);
+	--badge-primary-background-hover: var(--action-primary-hover);
+	--badge-primary-text: var(--fg-on-action);
+	--badge-secondary-background: color-mix(in oklch, var(--fg-default) 15%, transparent);
+	--badge-secondary-background-hover: color-mix(in oklch, var(--fg-default) 25%, transparent);
+	/* the solid danger badge is the danger action's red, like the button */
+	--badge-danger-background: var(--action-danger);
+	--badge-danger-background-hover: var(--action-danger-hover);
+	--badge-danger-text: var(--fg-on-danger);
+	--badge-outline-border: var(--line-default);
+	--badge-outline-background-hover: var(--surface-selected);
+	--badge-text: var(--fg-default);
+
+	/* status lamps and orbs read the status tokens through orb-danger and friends */
+}
+
+/* Matte: dialogs on the page colour (white), like the page under them */
+.theme-matte:not(.dark) {
+	--float-panel-background-modal: var(--surface-page);
+}
+
+.dark {
+	/* in dark the keys stay frosted glass and quiet fills, lighter than the page */
+	--button-secondary-background: var(--surface-glass);
+	/* a raised fill would be darker than the dark glass: a faint tint of the text colour instead */
+	--inset-group-background: color-mix(in oklch, var(--fg-default) 3%, transparent);
+	--inset-group-shadow: 0 2px 8px -4px var(--black-a40);
+	--selected-row-background: color-mix(in oklch, var(--fg-default) 5%, transparent);
+	--button-secondary-background-hover: var(--surface-muted);
+	--button-tertiary-background: var(--action-quiet);
+	--button-tertiary-background-hover: var(--action-quiet-hover);
+	--button-tertiary-border: var(--surface-muted);
+	--button-secondary-border: color-mix(in oklch, var(--line-default) 20%, transparent);
+	--badge-secondary-background: color-mix(in oklch, var(--fg-default) 10%, transparent);
+	--badge-danger-background: var(--action-danger);
+	--badge-danger-background-hover: var(--badge-danger-background);
+	--toggle-group-key-background-idle: transparent;
+	--toggle-group-key-background-idle-hover: var(--action-ghost-hover);
+	/* on the near-white track the thumb stays dark and opaque */
+	--switch-thumb-on: var(--surface-raised);
+	--float-panel-background-modal: color-mix(in oklch, var(--surface-page) 86%, transparent);
+	/* the matte finish again, from the dark fills. The danger key is matte glass: a frosted, translucent red over the
+	   page (--action-danger), its edge a soft tint of the red rather than a lighter rim, and no sheen (a lit rim and sheen on red read
+	   as metal) */
+	--key-sheen: var(--sheen-start);
+	--key-sheen-solid: var(--white-a9);
+	--button-primary-edge: color-mix(in oklab, var(--button-primary-background), black 10%);
+	--button-danger-sheen: transparent;
+	--button-danger-edge: color-mix(in oklch, var(--line-danger) 40%, transparent);
+}
+
+/* the user bubble is a card with an even, fainter edge, no inner ring and a barely noticeable shadow */
+.chat-message-user-bubble {
+	--card-shadow: var(--user-bubble-shadow);
+	/* no inner highlight ring: the bubble is a flat tint with its hairline edge */
+	--card-highlight: transparent;
+	--card-edge-side: var(--user-bubble-edge);
+	--card-edge-mid: var(--user-bubble-edge);
+}
diff --git a/ui/lib/ui/src/lib/styles/tokens/primitives.css b/ui/lib/ui/src/lib/styles/tokens/primitives.css
new file mode 100644
index 000000000..a12f96681
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/tokens/primitives.css
@@ -0,0 +1,108 @@
+/*
+ * Tier 1: primitives. Raw values named by what they are, never by where they are used.
+ * Only semantic tokens (semantic.css) reference these; components never do.
+ *
+ * The brand's own colours come from @ggml-org/llama-brand's css/colors.css, under the same names: the neutral greys
+ * (Tailwind's neutral scale plus four in-between steps), sand for communications, and the artwork colours (the day and
+ * night skies, cinder) with the skies' gradients. An app imports it before theme.css (see there); this file adds what
+ * only the interface needs.
+ */
+
+:root {
+	/* cool greys (hue 250) for hairline edges */
+	--cool-gray-50: oklch(0.958 0.002 250);
+	--cool-gray-100: oklch(0.938 0.004 250);
+	--cool-gray-200: oklch(0.91 0.005 250);
+	--cool-gray-300: oklch(0.86 0.007 250);
+	--cool-gray-400: oklch(0.81 0.01 250);
+
+	/* the skies as grounds, by llama-brand's gradients */
+	--art-day-sky-gradient: var(--gradient-day-sky);
+	--art-night-sky-gradient: var(--gradient-night-sky);
+
+	/* red, yellow and green: each scale keeps the hue of its root (red-500, yellow-400, green-500) */
+	--red-400: oklch(0.69 0.2 27);
+	--red-450: oklch(0.635 0.229 28);
+	--red-500: oklch(0.6 0.235 27);
+	--red-550: oklch(0.588 0.236 28);
+	--red-600: oklch(0.55 0.22 27);
+	--red-800: oklch(0.43 0.17 27);
+
+	--yellow-300: oklch(0.9 0.14 84);
+	--yellow-400: oklch(0.85 0.17 84);
+	--yellow-800: oklch(0.5 0.1 84);
+
+	--green-400: oklch(0.81 0.16 148);
+	--green-450: oklch(0.756 0.197 147);
+	--green-500: oklch(0.73 0.2 148);
+	--green-550: oklch(0.669 0.197 147);
+	--green-650: oklch(0.52 0.17 147);
+	--green-800: oklch(0.45 0.14 148);
+
+	/* amber and blue: the warning and info hues, as saturated as the reds and greens */
+	--amber-250: oklch(0.842 0.165 84);
+	--amber-400: oklch(0.752 0.157 78);
+	--amber-650: oklch(0.547 0.116 74);
+
+	--blue-400: oklch(0.7 0.163 255);
+	--blue-450: oklch(0.67 0.173 256);
+	--blue-500: oklch(0.62 0.15 255);
+	--blue-550: oklch(0.587 0.177 256);
+	--blue-650: oklch(0.535 0.177 256);
+	--blue-800: oklch(0.42 0.11 255);
+
+	/* translucent white and black, named by opacity in percent */
+	--white-a2: oklch(1 0 0 / 0.02);
+	--white-a4: oklch(1 0 0 / 0.04);
+	--white-a6: oklch(1 0 0 / 0.06);
+	--white-a9: oklch(1 0 0 / 0.09);
+	--white-a12: oklch(1 0 0 / 0.12);
+	--white-a18: oklch(1 0 0 / 0.18);
+	--white-a20: oklch(1 0 0 / 0.2);
+	--white-a30: oklch(1 0 0 / 0.3);
+	--white-a40: oklch(1 0 0 / 0.4);
+	--white-a50: oklch(1 0 0 / 0.5);
+	--white-a85: oklch(1 0 0 / 0.85);
+	--black-a3: oklch(0 0 0 / 0.03);
+	--black-a4: oklch(0 0 0 / 0.04);
+	--black-a5: oklch(0 0 0 / 0.05);
+	--black-a6: oklch(0 0 0 / 0.06);
+	--black-a8: oklch(0 0 0 / 0.08);
+	--black-a10: oklch(0 0 0 / 0.1);
+	--black-a12: oklch(0 0 0 / 0.12);
+	--black-a18: oklch(0 0 0 / 0.18);
+	--black-a25: oklch(0 0 0 / 0.25);
+	--black-a30: oklch(0 0 0 / 0.3);
+	--black-a35: oklch(0 0 0 / 0.35);
+	--black-a40: oklch(0 0 0 / 0.4);
+	--black-a55: oklch(0 0 0 / 0.55);
+	--black-a60: oklch(0 0 0 / 0.6);
+
+	/* type: sizes and line heights in px, weights by number */
+	--font-size-12: 0.75rem;
+	--font-size-14: 0.875rem;
+	--font-size-16: 1rem;
+	--font-size-18: 1.125rem;
+	--font-size-24: 1.5rem;
+	--line-height-16: 1rem;
+	--line-height-20: 1.25rem;
+	--line-height-24: 1.5rem;
+	--line-height-28: 1.75rem;
+	--line-height-32: 2rem;
+	--font-weight-400: 400;
+	--font-weight-500: 500;
+	--font-weight-600: 600;
+
+	/* lengths in px, for sizes, radii and blur */
+	--length-6: 0.375rem;
+	--length-8: 0.5rem;
+	--length-10: 0.625rem;
+	--length-12: 0.75rem;
+	--length-14: 0.875rem;
+	--length-16: 1rem;
+	--length-20: 1.25rem;
+	--length-24: 1.5rem;
+	--length-32: 2rem;
+	--length-36: 2.25rem;
+	--length-40: 2.5rem;
+}
diff --git a/ui/lib/ui/src/lib/styles/tokens/semantic.css b/ui/lib/ui/src/lib/styles/tokens/semantic.css
new file mode 100644
index 000000000..479a71de7
--- /dev/null
+++ b/ui/lib/ui/src/lib/styles/tokens/semantic.css
@@ -0,0 +1,329 @@
+/*
+ * Tier 2: semantic tokens. Named by purpose, they point at primitives and are the
+ * only tier that changes between light and dark. Pattern: [category]-[role]-[state].
+ *
+ * Light mode comes in two surface themes that share everything else (colours, buttons, fields,
+ * shadows): Paper, the default, puts white panels, fields and keys on a faint grey page; Matte
+ * (the theme-matte class on <html>) puts grey glass on a white page.
+ */
+:root {
+	/* surfaces: what a region of the page sits on. Paper: the page a faint grey, so glass, fields
+	   and keys, white, sit lighter than it */
+	--surface-page: var(--neutral-25);
+	--surface-muted: var(--neutral-100);
+	--surface-emphasis: var(--neutral-150);
+	--surface-selected: var(--neutral-150);
+	--surface-raised: var(--neutral-0);
+	--surface-lifted: var(--neutral-0);
+	--surface-pressed: var(--neutral-0);
+	--surface-glass: color-mix(in oklch, var(--neutral-0) 80%, transparent);
+	--surface-code: var(--neutral-100);
+	--surface-overlay: var(--black-a40);
+
+	/* foreground: text and icons */
+	--fg-default: var(--neutral-950);
+	--fg-muted: var(--neutral-500);
+	--fg-on-action: var(--neutral-50);
+	--fg-on-danger: var(--neutral-0);
+	--fg-code: var(--neutral-950);
+	--fg-danger: var(--red-600);
+	--fg-success: var(--green-650);
+	--fg-warning: var(--amber-650);
+	--fg-info: var(--blue-650);
+
+	/* lines: borders, dividers and focus */
+	--line-default: var(--neutral-300);
+	--line-field: var(--neutral-200);
+	--line-control: var(--neutral-300);
+	--line-focus: var(--neutral-400);
+	--line-danger: var(--fill-danger);
+
+	/* status: a fill per meaning (dots, lamps, solid marks), brighter than its text colour, and a soft surface and
+	   line mixed from the fill (in oklab, so the hue holds) */
+	--fill-success: var(--green-550);
+	--fill-warning: var(--amber-400);
+	--fill-danger: var(--red-550);
+	--fill-info: var(--blue-550);
+	--surface-success: color-mix(in oklab, var(--fill-success) 11%, var(--surface-page));
+	--surface-warning: color-mix(in oklab, var(--fill-warning) 11%, var(--surface-page));
+	--surface-danger: color-mix(in oklab, var(--fill-danger) 11%, var(--surface-page));
+	--surface-info: color-mix(in oklab, var(--fill-info) 11%, var(--surface-page));
+	--line-success-soft: color-mix(in oklab, var(--fill-success) 34%, var(--line-default));
+	--line-warning-soft: color-mix(in oklab, var(--fill-warning) 34%, var(--line-default));
+	--line-danger-soft: color-mix(in oklab, var(--fill-danger) 34%, var(--line-default));
+	--line-info-soft: color-mix(in oklab, var(--fill-info) 34%, var(--line-default));
+
+	/* edges: hairlines of matte surfaces, darker at the sides than in the middle */
+	--edge-rest-side: var(--cool-gray-200);
+	--edge-rest-mid: var(--cool-gray-100);
+	--edge-focus-side: var(--cool-gray-400);
+	--edge-focus-mid: var(--cool-gray-300);
+	--edge-ambient-side: var(--cool-gray-100);
+	--edge-ambient-mid: var(--cool-gray-50);
+	--edge-faint: var(--cool-gray-100);
+	--edge-raised: var(--cool-gray-200);
+
+	/* actions: fills of interactive controls */
+	--action-primary: var(--neutral-900);
+	--action-primary-hover: color-mix(in oklch, var(--neutral-900) 90%, transparent);
+	/* one red for every danger state: the danger action is the status fill itself, the alerts' red */
+	--action-danger: var(--fill-danger);
+	--action-danger-hover: color-mix(in oklch, var(--fill-danger) 90%, transparent);
+	--action-quiet: color-mix(in oklch, var(--neutral-100) 30%, transparent);
+	--action-quiet-hover: var(--neutral-100);
+	--action-ghost-hover: color-mix(in oklch, var(--neutral-500) 10%, transparent);
+
+	/* fields: editable controls */
+	--field-background: var(--neutral-0);
+	--field-shade: var(--black-a6);
+
+	/* status lamps: the status fill, a lighter rim and a darker glyph */
+	--status-danger: var(--fill-danger);
+	--status-danger-rim: var(--red-400);
+	--status-danger-glyph: var(--red-800);
+	--status-warning: var(--fill-warning);
+	--status-warning-rim: var(--yellow-300);
+	--status-warning-glyph: var(--yellow-800);
+	--status-success: var(--fill-success);
+	--status-success-rim: var(--green-400);
+	--status-success-glyph: var(--green-800);
+	--status-info: var(--fill-info);
+	--status-info-rim: var(--blue-400);
+	--status-info-glyph: var(--blue-800);
+
+	/* light effects */
+	--highlight-inner: var(--white-a50);
+	--highlight-inverse: var(--white-a12);
+	--sheen-start: var(--white-a20);
+	--sheen-end: transparent;
+	--text-shadow-engraved: 0 1px 0 var(--white-a85);
+
+	/* elevation: smooth stacks (a few soft layers rather than one hard one) that reach no further than upstream's
+	   Tailwind shadows do: a surface about 20px, like shadow-lg, a raised one about 38px, like shadow-xl; a control
+	   keeps to three tight layers (nothing past 4px), so buttons sit close to the page */
+	--elevation-surface:
+		0 1px 2px rgb(0 0 0 / 0.04), 0 3px 6px -2px rgb(0 0 0 / 0.05), 0 8px 16px -4px rgb(0 0 0 / 0.06);
+	--elevation-control:
+		0 0.5px 1px rgb(0 0 0 / 0.05), 0 1px 2px rgb(0 0 0 / 0.05), 0 2px 4px -1px rgb(0 0 0 / 0.05);
+	--elevation-raised:
+		0 2px 4px rgb(0 0 0 / 0.04), 0 6px 12px -3px rgb(0 0 0 / 0.06),
+		0 16px 28px -6px rgb(0 0 0 / 0.08);
+	/* a key on a white surface, like the chat form's: a hairline all round and a drop of 1px, so it stands apart
+	   without the control elevation's soft spread, which blends into the white */
+	--elevation-key: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 1px 1.5px rgb(0 0 0 / 0.08);
+	/* softer steps: the chat form floats only a little, its shadow close and tight (smooth near layers, nothing
+	   reaching past 6px); a message bubble barely lifts */
+	--elevation-soft:
+		0 0.5px 1px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.05), 0 2px 6px -2px rgb(0 0 0 / 0.05),
+		0 6px 16px -10px rgb(0 0 0 / 0.08);
+	--elevation-faint: 0 2px 4px rgb(0 0 0 / 0.025), 0 0.5px 1.5px rgb(0 0 0 / 0.03);
+	--elevation-inset: inset 0 1px 2px var(--field-shade);
+	--elevation-pressed: inset 0 1px 2px var(--black-a12);
+	--elevation-tooltip: var(--elevation-surface);
+	/* the hairline an elevated surface carries as the last layer of its shadow (elevated-*, matte-float), so its edge
+	   melts into the shadow instead of sitting beside it as a border that reads washed out */
+	--elevation-ring: var(--black-a5);
+	--elevation-ring-width: 1px;
+	--blur-surface: var(--length-24);
+	--blur-control: var(--length-12);
+}
+
+/* Matte, the alternative light theme: grey glass on a white page, fields on the page colour */
+.theme-matte:not(.dark) {
+	--surface-page: var(--neutral-0);
+	--surface-glass: color-mix(in oklch, var(--neutral-100) 60%, transparent);
+	--surface-code: var(--neutral-50);
+	--field-background: var(--surface-page);
+}
+
+.dark {
+	--surface-page: var(--neutral-925);
+	--surface-muted: var(--neutral-800);
+	--surface-emphasis: var(--neutral-750);
+	--surface-selected: var(--neutral-800);
+	--surface-raised: var(--neutral-900);
+	--surface-lifted: color-mix(in oklch, var(--neutral-700) 80%, transparent);
+	--surface-pressed: color-mix(in oklch, var(--neutral-50) 14%, transparent);
+	--surface-glass: color-mix(in oklch, var(--neutral-800) 75%, transparent);
+	--surface-code: var(--neutral-900);
+
+	--fg-default: var(--neutral-50);
+	--fg-muted: var(--neutral-400);
+	--fg-on-action: var(--neutral-900);
+	--fg-code: var(--neutral-300);
+	--fg-danger: var(--red-450);
+	--fg-success: var(--green-450);
+	--fg-warning: var(--amber-250);
+	--fg-info: var(--blue-400);
+
+	--line-default: var(--white-a30);
+	--line-field: var(--white-a30);
+	--line-control: var(--white-a12);
+	--line-focus: var(--neutral-500);
+	--line-danger: var(--fill-danger);
+
+	/* the status fills, and the mixes and lamps again, from the dark fills */
+	--fill-success: var(--green-450);
+	--fill-warning: var(--amber-250);
+	--fill-danger: var(--red-450);
+	--fill-info: var(--blue-450);
+	--surface-success: color-mix(in oklab, var(--fill-success) 16%, var(--surface-page));
+	--surface-warning: color-mix(in oklab, var(--fill-warning) 16%, var(--surface-page));
+	--surface-danger: color-mix(in oklab, var(--fill-danger) 16%, var(--surface-page));
+	--surface-info: color-mix(in oklab, var(--fill-info) 16%, var(--surface-page));
+	--line-success-soft: color-mix(in oklab, var(--fill-success) 38%, var(--line-default));
+	--line-warning-soft: color-mix(in oklab, var(--fill-warning) 38%, var(--line-default));
+	--line-danger-soft: color-mix(in oklab, var(--fill-danger) 38%, var(--line-default));
+	--line-info-soft: color-mix(in oklab, var(--fill-info) 38%, var(--line-default));
+	--status-danger: var(--fill-danger);
+	--status-warning: var(--fill-warning);
+	--status-success: var(--fill-success);
+	--status-info: var(--fill-info);
+
+	--edge-rest-side: var(--white-a6);
+	--edge-rest-mid: var(--white-a4);
+	--edge-focus-side: var(--white-a18);
+	--edge-focus-mid: var(--white-a12);
+	--edge-ambient-side: var(--white-a4);
+	--edge-ambient-mid: var(--white-a2);
+	--edge-faint: var(--white-a4);
+	--edge-raised: var(--white-a9);
+
+	--action-primary: var(--neutral-200);
+	--action-primary-hover: color-mix(in oklch, var(--neutral-200) 90%, transparent);
+	/* the same red as every danger state, as matte glass: the status fill, frosted and translucent over the page */
+	--action-danger: color-mix(in oklch, var(--fill-danger) 58%, transparent);
+	--action-danger-hover: color-mix(in oklch, var(--fill-danger) 68%, transparent);
+	--action-quiet: color-mix(in oklch, var(--neutral-400) 15%, transparent);
+	--action-quiet-hover: color-mix(in oklch, var(--neutral-400) 25%, transparent);
+	--action-ghost-hover: color-mix(in oklch, var(--neutral-400) 10%, transparent);
+
+	--field-background: var(--white-a9);
+	--field-shade: var(--black-a30);
+
+	--highlight-inner: var(--white-a4);
+	--sheen-start: var(--white-a2);
+	--text-shadow-engraved: 0 -1px 0 var(--black-a55);
+
+	/* the same stacks, deeper, so they still read on a dark page */
+	--elevation-surface:
+		0 1px 2px rgb(0 0 0 / 0.25), 0 3px 6px -2px rgb(0 0 0 / 0.25), 0 8px 16px -4px rgb(0 0 0 / 0.3);
+	--elevation-control:
+		0 0.5px 1px rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.25), 0 2px 4px -1px rgb(0 0 0 / 0.25);
+	--elevation-raised:
+		0 2px 4px rgb(0 0 0 / 0.25), 0 6px 12px -3px rgb(0 0 0 / 0.3), 0 16px 28px -6px rgb(0 0 0 / 0.4);
+	--elevation-key: var(--elevation-control);
+	--elevation-soft:
+		0 0.5px 1px rgb(0 0 0 / 0.25), 0 1px 3px rgb(0 0 0 / 0.25), 0 2px 6px -2px rgb(0 0 0 / 0.25),
+		0 6px 16px -10px rgb(0 0 0 / 0.35);
+	--elevation-faint: 0 2px 4px rgb(0 0 0 / 0.175), 0 0.5px 1.5px rgb(0 0 0 / 0.21);
+	--elevation-pressed: inset 0 1px 2px var(--black-a40);
+	/* a black hairline vanishes on a dark page; the ring paints on the page behind the surface, so white needs 18% to
+	   stay lighter than a raised surface's own colour */
+	--elevation-ring: var(--white-a18);
+}
+
+/*
+ * Tailwind's shadow-{size} scale, smooth: each step is a few soft layers rather than one hard one, the closest the
+ * darkest and smallest, each further layer about twice the offset and blur and fainter, the far ones pulled in with a
+ * negative spread. Stacked like that, the shadow fades out the way light does instead of ending in a visible blur
+ * edge. Each step reaches about as far as Tailwind's default for it, so the shadows stay as close as upstream's:
+ * xs about 3px, sm 5px, md 10px, lg 20px, xl 38px, 2xl 64px. The elevation tokens above are built the same way.
+ */
+@theme {
+	--shadow-xs: 0 0.5px 1px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 0 0 / 0.03);
+	--shadow-sm:
+		0 0.5px 1px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 0 0 / 0.04), 0 2px 4px -1px rgb(0 0 0 / 0.05);
+	--shadow-md:
+		0 1px 2px rgb(0 0 0 / 0.04), 0 2px 4px -1px rgb(0 0 0 / 0.05), 0 4px 8px -2px rgb(0 0 0 / 0.06);
+	--shadow-lg:
+		0 1px 2px rgb(0 0 0 / 0.04), 0 3px 6px -2px rgb(0 0 0 / 0.05), 0 8px 16px -4px rgb(0 0 0 / 0.07);
+	--shadow-xl:
+		0 2px 4px rgb(0 0 0 / 0.04), 0 6px 12px -3px rgb(0 0 0 / 0.06),
+		0 16px 28px -6px rgb(0 0 0 / 0.08);
+	--shadow-2xl:
+		0 4px 8px -2px rgb(0 0 0 / 0.05), 0 12px 24px -6px rgb(0 0 0 / 0.08),
+		0 28px 48px -12px rgb(0 0 0 / 0.14);
+}
+
+/* roles that do not change with the theme, exposed as Tailwind utilities */
+@theme inline {
+	/* type roles: text-body, text-label-sm, ... set size, line height and weight */
+	--text-body: var(--font-size-16);
+	--text-body--line-height: var(--line-height-24);
+	--text-body--font-weight: var(--font-weight-400);
+	--text-body-sm: var(--font-size-14);
+	--text-body-sm--line-height: var(--line-height-20);
+	--text-body-sm--font-weight: var(--font-weight-400);
+	--text-label: var(--font-size-14);
+	--text-label--line-height: var(--line-height-20);
+	--text-label--font-weight: var(--font-weight-500);
+	--text-label-sm: var(--font-size-12);
+	--text-label-sm--line-height: var(--line-height-16);
+	--text-label-sm--font-weight: var(--font-weight-500);
+	--text-caption: var(--font-size-12);
+	--text-caption--line-height: var(--line-height-16);
+	--text-caption--font-weight: var(--font-weight-400);
+	--text-title: var(--font-size-18);
+	--text-title--line-height: var(--line-height-28);
+	--text-title--font-weight: var(--font-weight-600);
+	--text-heading: var(--font-size-24);
+	--text-heading--line-height: var(--line-height-32);
+	--text-heading--font-weight: var(--font-weight-600);
+
+	/* icon sizes: size-icon-xs ... size-icon-lg */
+	--size-icon-xs: var(--length-12);
+	--size-icon-sm: var(--length-14);
+	--size-icon-md: var(--length-16);
+	--size-icon-lg: var(--length-20);
+
+	/* control heights and corner roles */
+	--height-control-sm: var(--length-32);
+	--height-control-md: var(--length-36);
+	--height-control-lg: var(--length-40);
+	--radius-control: var(--length-8);
+	--radius-panel: var(--length-10);
+	--radius-card: var(--length-14);
+	--radius-container: var(--length-16);
+	--radius-surface: var(--length-24);
+	--radius-surface-lg: var(--length-32);
+
+	/* colours: bg-surface-*, text-fg-*, border-line-* and border-edge-* */
+	--background-color-surface-page: var(--surface-page);
+	--background-color-surface-muted: var(--surface-muted);
+	--background-color-surface-emphasis: var(--surface-emphasis);
+	--background-color-surface-selected: var(--surface-selected);
+	--background-color-surface-raised: var(--surface-raised);
+	--background-color-surface-lifted: var(--surface-lifted);
+	--background-color-surface-glass: var(--surface-glass);
+	--background-color-surface-code: var(--surface-code);
+	--background-color-surface-overlay: var(--surface-overlay);
+	--background-color-surface-success: var(--surface-success);
+	--background-color-surface-warning: var(--surface-warning);
+	--background-color-surface-danger: var(--surface-danger);
+	--background-color-surface-info: var(--surface-info);
+	--background-color-fill-success: var(--fill-success);
+	--background-color-fill-warning: var(--fill-warning);
+	--background-color-fill-danger: var(--fill-danger);
+	--background-color-fill-info: var(--fill-info);
+	--text-color-fg-default: var(--fg-default);
+	--text-color-fg-muted: var(--fg-muted);
+	--text-color-fg-on-action: var(--fg-on-action);
+	--text-color-fg-danger: var(--fg-danger);
+	--text-color-fg-success: var(--fg-success);
+	--text-color-fg-warning: var(--fg-warning);
+	--text-color-fg-info: var(--fg-info);
+	--border-color-line-default: var(--line-default);
+	--border-color-line-field: var(--line-field);
+	--border-color-line-control: var(--line-control);
+	--border-color-line-focus: var(--line-focus);
+	--border-color-line-danger: var(--line-danger);
+	--border-color-line-success-soft: var(--line-success-soft);
+	--border-color-line-warning-soft: var(--line-warning-soft);
+	--border-color-line-danger-soft: var(--line-danger-soft);
+	--border-color-line-info-soft: var(--line-info-soft);
+	--color-status-danger: var(--status-danger);
+	--color-status-warning: var(--status-warning);
+	--color-status-success: var(--status-success);
+	--color-status-info: var(--status-info);
+}
diff --git a/ui/lib/ui/src/lib/utils/code.ts b/ui/lib/ui/src/lib/utils/code.ts
new file mode 100644
index 000000000..ca368f352
--- /dev/null
+++ b/ui/lib/ui/src/lib/utils/code.ts
@@ -0,0 +1,79 @@
+// highlightCode and its helpers, from ui/apps/chat's utils/code.ts (only what SyntaxHighlightedCode uses)
+import { CODE_BLOCK } from "../constants";
+import hljs from "highlight.js";
+import bash from "highlight.js/lib/languages/bash";
+
+// highlight.js's bash marks strings, variables and keywords but leaves a command's name and its flags plain, so a
+// command (`curl -H … -d …`) reads as one colour. Mark them too: the name as a built-in, the flags as attributes.
+hljs.registerLanguage("bash", (api) => {
+  const base = bash(api);
+
+  return {
+    ...base,
+    contains: [
+      { match: CODE_BLOCK.SHELL_COMMAND_REGEX, scope: "built_in" },
+      { match: CODE_BLOCK.SHELL_FLAG_REGEX, scope: "attr" },
+      ...(base.contains ?? []),
+    ],
+  };
+});
+
+/**
+ * Strips empty lines (whitespace-only) from the start and end of code, so hljs emits no phantom row before or after
+ * the body; internal blank lines stay.
+ */
+export function trimCodePadding(code: string): string {
+  return code
+    .replace(CODE_BLOCK.TRIM_LEADING_PADDING_REGEX, "")
+    .replace(CODE_BLOCK.TRIM_TRAILING_PADDING_REGEX, "");
+}
+
+function escapeCode(code: string): string {
+  return code
+    .replace(CODE_BLOCK.AMPERSAND_REGEX, "&amp;")
+    .replace(CODE_BLOCK.LT_REGEX, "&lt;")
+    .replace(CODE_BLOCK.GT_REGEX, "&gt;");
+}
+
+const HIGHLIGHT_CACHE_MAX_SIZE = 64;
+const highlightCache = new Map<string, string>();
+
+/** Highlights code with highlight.js in the given language, auto-detecting one it doesn't know. */
+export function highlightCode(
+  code: string,
+  language: string,
+  autoDetect = true,
+): string {
+  if (!code) return "";
+
+  const cacheKey = `${language}:${autoDetect}:${code}`;
+  const cached = highlightCache.get(cacheKey);
+
+  if (cached) return cached;
+
+  const trimmed = trimCodePadding(code);
+
+  let result: string;
+
+  try {
+    const lang = language.toLowerCase();
+
+    if (hljs.getLanguage(lang)) {
+      result = hljs.highlight(trimmed, { language: lang }).value;
+    } else if (autoDetect) {
+      result = hljs.highlightAuto(trimmed).value;
+    } else {
+      result = escapeCode(trimmed);
+    }
+  } catch {
+    result = escapeCode(trimmed);
+  }
+
+  if (highlightCache.size >= HIGHLIGHT_CACHE_MAX_SIZE) {
+    highlightCache.delete(highlightCache.keys().next().value!);
+  }
+
+  highlightCache.set(cacheKey, result);
+
+  return result;
+}
diff --git a/ui/lib/ui/src/lib/utils/index.ts b/ui/lib/ui/src/lib/utils/index.ts
new file mode 100644
index 000000000..3e3c1fdef
--- /dev/null
+++ b/ui/lib/ui/src/lib/utils/index.ts
@@ -0,0 +1 @@
+export { highlightCode, trimCodePadding } from './code';
diff --git a/ui/lib/ui/src/routes/+layout.svelte b/ui/lib/ui/src/routes/+layout.svelte
new file mode 100644
index 000000000..b0ec4e87c
--- /dev/null
+++ b/ui/lib/ui/src/routes/+layout.svelte
@@ -0,0 +1,10 @@
+<script lang="ts">
+	import '../app.css';
+	import { ModeWatcher } from 'mode-watcher';
+
+	let { children } = $props();
+</script>
+
+<ModeWatcher />
+
+{@render children()}
diff --git a/ui/lib/ui/src/routes/+page.svelte b/ui/lib/ui/src/routes/+page.svelte
new file mode 100644
index 000000000..d9c7b2d52
--- /dev/null
+++ b/ui/lib/ui/src/routes/+page.svelte
@@ -0,0 +1,22 @@
+<script lang="ts">
+	import { Badge, Button, Switch } from '#lib/index.js';
+	import { setMode, userPrefersMode } from 'mode-watcher';
+
+	const next = { light: 'dark', dark: 'system', system: 'light' } as const;
+</script>
+
+<!-- a quick check that the package's theme and components work in a SvelteKit app -->
+<div class="flex min-h-screen flex-col items-center justify-center gap-6 p-6">
+	<h1 class="text-heading">@ggml-org/llama-ui</h1>
+
+	<div class="flex flex-wrap items-center justify-center gap-3">
+		<Button>Default</Button>
+		<Button variant="secondary">Secondary</Button>
+		<Button variant="outline">Outline</Button>
+		<Badge variant="success">Downloaded</Badge>
+		<Switch aria-label="Example switch" />
+		<Button variant="ghost" onclick={() => setMode(next[userPrefersMode.current])}>
+			Mode: {userPrefersMode.current}
+		</Button>
+	</div>
+</div>
diff --git a/ui/lib/ui/src/svelte.config.js b/ui/lib/ui/src/svelte.config.js
new file mode 100644
index 000000000..e0d56086c
--- /dev/null
+++ b/ui/lib/ui/src/svelte.config.js
@@ -0,0 +1,5 @@
+// Apps in ui/apps compile these sources themselves, so their svelte-check and editors read
+// them too and look upwards from each file for a Svelte config. Without this one they would
+// load vite.config.ts a level up, which needs this package's own dependencies installed.
+// The package itself is configured in vite.config.ts.
+export default {};
diff --git a/ui/lib/ui/static/favicon.ico b/ui/lib/ui/static/favicon.ico
new file mode 100644
index 000000000..4d5fa4cdd
Binary files /dev/null and b/ui/lib/ui/static/favicon.ico differ
diff --git a/ui/lib/ui/static/favicon.svg b/ui/lib/ui/static/favicon.svg
new file mode 100644
index 000000000..e15ac3d76
--- /dev/null
+++ b/ui/lib/ui/static/favicon.svg
@@ -0,0 +1,7 @@
+<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"><g transform="translate(10.24 10.24) scale(0.96)">
+    <path d="M244.95 8C215.233 8 187.774 23.8591 172.923 49.5999L95.6009 183.625C60.2162 244.959 104.481 321.6 175.29 321.6H208L316.977 132.708C348.959 77.2719 308.95 8 244.95 8ZM208 321.6H351.947C415.982 321.6 456.013 390.91 424.013 446.377C409.155 472.132 381.681 488 351.947 488H271.29C200.481 488 156.216 411.359 191.601 350.026L208 321.6Z" fill="#111111"/>
+    <path d="M208 321.6H16L106.462 164.8L208 321.6Z" fill="#111111"/>
+    <path d="M388.923 8L208 321.6L253.6 8H388.923Z" fill="#111111"/>
+    <path d="M304 488H112L202.462 331.2L304 488Z" fill="#111111"/>
+    <path d="M496 321.6H208L419.399 454.4L496 321.6Z" fill="#111111"/>
+</g></svg>
diff --git a/ui/lib/ui/tsconfig.json b/ui/lib/ui/tsconfig.json
new file mode 100644
index 000000000..c34626e67
--- /dev/null
+++ b/ui/lib/ui/tsconfig.json
@@ -0,0 +1,7 @@
+{
+  "extends": "$app/tsconfig",
+  "compilerOptions": {
+    "strict": true
+  },
+  "include": ["src", "vite.config.ts"]
+}
diff --git a/ui/lib/ui/vite.config.ts b/ui/lib/ui/vite.config.ts
new file mode 100644
index 000000000..e09bcd2a5
--- /dev/null
+++ b/ui/lib/ui/vite.config.ts
@@ -0,0 +1,87 @@
+/// <reference types="vitest/config" />
+import { playwright } from "vite-plus/test/browser-playwright";
+import adapter from "@sveltejs/adapter-auto";
+import { sveltekit } from "@sveltejs/kit/vite";
+import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
+import tailwindcss from "@tailwindcss/vite";
+import { defineConfig, lazyPlugins } from "vite-plus";
+
+export default defineConfig({
+  fmt: {},
+  lint: {
+    jsPlugins: [
+      {
+        name: "vite-plus",
+        specifier: "vite-plus/oxlint-plugin",
+      },
+    ],
+    rules: {
+      "vite-plus/prefer-vite-plus-imports": "error",
+    },
+    options: {
+      typeAware: true,
+      typeCheck: true,
+    },
+  },
+  plugins: lazyPlugins(() => [
+    tailwindcss(),
+    sveltekit({
+      compilerOptions: {
+        // Force runes mode for the project, except for libraries. Can be removed in svelte 6.
+        runes: ({ filename }) =>
+          filename.split(/[/\\]/).includes("node_modules") ? undefined : true,
+      },
+      // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
+      // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
+      // See https://svelte.dev/docs/kit/adapters for more information about adapters.
+      adapter: adapter(),
+      // ui/apps/chat imports through $lib, which SvelteKit 3 dropped; keeping it lets its files be copied as they are
+      alias: { $lib: "src/lib" },
+      preprocess: [vitePreprocess()],
+    }),
+  ]),
+  test: {
+    // Vitest v4 compatibility: preserve mock call history.
+    // Remove after tests no longer rely on calls from setup or earlier tests.
+    // https://viteplus.dev/guide/vitest-v5#remove-unneeded-compatibility-settings
+    // https://vitest.dev/guide/migration/#clearmocks-is-enabled-by-default
+    clearMocks: false,
+    // Vitest v4 compatibility: keep separate Vite servers for inline projects.
+    // Remove when plugins and config hooks can run once for shared projects.
+    // https://viteplus.dev/guide/vitest-v5#remove-unneeded-compatibility-settings
+    // https://vitest.dev/guide/migration/#inline-projects-share-the-vite-server-by-default
+    sharedViteServer: false,
+    expect: {
+      requireAssertions: true,
+    },
+    projects: [
+      {
+        extends: "./vite.config.ts",
+        test: {
+          name: "client",
+          browser: {
+            enabled: true,
+            provider: playwright(),
+            instances: [
+              {
+                browser: "chromium",
+                headless: true,
+              },
+            ],
+          },
+          include: ["src/**/*.svelte.{test,spec}.{js,ts}"],
+          exclude: ["src/lib/server/**"],
+        },
+      },
+      {
+        extends: "./vite.config.ts",
+        test: {
+          name: "server",
+          environment: "node",
+          include: ["src/**/*.{test,spec}.{js,ts}"],
+          exclude: ["src/**/*.svelte.{test,spec}.{js,ts}"],
+        },
+      },
+    ],
+  },
+});