Commit b81aa847c for llama.cpp

commit b81aa847c288e0f7d2c72ea1871b828f1afccde1
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date:   Fri Nov 20 11:26:26 2026 +0100

    ui: slim the design tokens and set all text through type roles (#32615)

    * ui: drop component tokens that only alias a semantic token

    A component token now exists only for what a component decides itself:
    a value no semantic token has, or one that only this component changes
    between themes. Components that take a semantic token as it is read it
    directly, so 88 of the 118 component tokens go, with no change to what
    is drawn.

    Also drops semantic tokens that repeat another one (status-* is fill-*,
    elevation-tooltip is elevation-surface), the unused info lamp tokens and
    14 primitives nothing reads, and adds fg-soft for the label of an option
    that is not the picked one (tabs, toggle group).

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: add a short summary on top of DESIGN.md

    The rules most changes need, in one screen: components, colour, type,
    shape, sizes, surfaces, tokens and no arbitrary values. The sections
    below keep the detail.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: derive design tokens by rule and drop the alias layers

    Semantic tokens are either a pick (a primitive per theme) or a derivation,
    mixed from another semantic token by a fixed rule and declared once: hover
    fills, status surfaces and lines, dark shadows (--elevation-strength), the
    middle of a matte edge, a lamp's rim and glyph.

    Primitives keep colours only. shadcn's colour names stay as Tailwind
    utilities and no longer exist as variables; neutral semantic utilities that
    duplicated them are gone.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: set all text through type roles and move off-scale values onto the scale

    Tailwind's text sizes and bracketed sizes become the type roles, with a new
    text-caption-sm (10px) for tags and counts. Body and caption roles no longer
    set a weight, and line heights are written as Tailwind writes its own, so the
    swap from text-sm and text-xs changes no pixel. A unit test keeps old sizes
    from coming back.

    Arbitrary values with a scale equivalent use it (z-20, max-w-4/5, min-w-32),
    and the two easing curves repeated across the app are ease-out-quint and
    ease-sheet. DESIGN.md is updated and regenerated.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: bump @ggml-org/llama-ui to 0.5.0

    Removed and renamed tokens are breaking for an app that reads them.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: add a display type role for the biggest headline

    The greeting on a new chat keeps its 30px from md up, now as text-display
    instead of a Tailwind size.

    Assisted-by: Claude (Opus 5.5 Medium)

    * ui: one corner scale, one set of shadows and three more derived tokens

    Six corner roles named values Tailwind's rounded-md to rounded-4xl
    already have, and components used the Tailwind names nine times out of
    ten. The roles are gone; the whole scale is computed from --radius.

    Tailwind's shadow sizes were restated next to the elevation tokens and
    did not follow the theme, so they were five times fainter in dark. The
    five uses take elevation tokens and a unit test keeps both from coming
    back.

    A button group's seam is the button's own text colour at 25%, the dark
    status text is the dark status fill, and the pressed shadow scales with
    --elevation-strength like the inset one.

    Assisted-by: Claude (Opus 5.5 Medium)

diff --git a/ui/apps/chat/DESIGN.md b/ui/apps/chat/DESIGN.md
index 971685e1b..f3a1eaf98 100644
--- a/ui/apps/chat/DESIGN.md
+++ b/ui/apps/chat/DESIGN.md
@@ -38,35 +38,21 @@ colors:
   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)'
-  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)'
-  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-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)'
@@ -75,7 +61,6 @@ colors:
   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)'
@@ -83,15 +68,8 @@ colors:
   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)'
   surface-page: '{colors.neutral-25}'
   surface-muted: '{colors.neutral-100}'
   surface-emphasis: '{colors.neutral-150}'
@@ -103,6 +81,7 @@ colors:
   surface-code: '{colors.neutral-100}'
   surface-overlay: '{colors.black-a40}'
   fg-default: '{colors.neutral-950}'
+  fg-soft: 'color-mix(in oklch, {colors.fg-default} 70%, transparent)'
   fg-muted: '{colors.neutral-500}'
   fg-on-action: '{colors.neutral-50}'
   fg-on-danger: '{colors.neutral-0}'
@@ -128,39 +107,21 @@ colors:
   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-rest: '{colors.cool-gray-200}'
+  edge-focus: '{colors.cool-gray-400}'
+  edge-ambient: '{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-primary-hover: 'color-mix(in oklch, {colors.action-primary} 90%, transparent)'
   action-danger: '{colors.fill-danger}'
-  action-danger-hover: 'color-mix(in oklch, {colors.fill-danger} 90%, transparent)'
+  action-danger-hover: 'color-mix(in oklch, {colors.action-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: '{colors.neutral-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'
   elevation-ring: '{colors.black-a5}'
   surface-page-matte: '{colors.neutral-0}'
   surface-glass-matte: 'oklch(0.97 0 0 / 0.6)'
@@ -180,13 +141,14 @@ colors:
   surface-glass-dark: 'oklch(0.269 0 0 / 0.75)'
   surface-code-dark: '{colors.neutral-900}'
   fg-default-dark: '{colors.neutral-50}'
+  fg-soft-dark: 'color-mix(in oklch, {colors.fg-default-dark} 70%, transparent)'
   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}'
+  fg-danger-dark: '{colors.fill-danger-dark}'
+  fg-success-dark: '{colors.fill-success-dark}'
+  fg-warning-dark: '{colors.fill-warning-dark}'
+  fg-info-dark: '{colors.fill-info-dark}'
   line-default-dark: '{colors.white-a30}'
   line-field-dark: '{colors.white-a30}'
   line-control-dark: '{colors.white-a12}'
@@ -204,27 +166,18 @@ colors:
   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-rest-dark: '{colors.white-a6}'
+  edge-focus-dark: '{colors.white-a18}'
+  edge-ambient-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-primary-hover-dark: 'color-mix(in oklch, {colors.action-primary-dark} 90%, transparent)'
   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}'
-  status-danger-dark: '{colors.fill-danger-dark}'
-  status-warning-dark: '{colors.fill-warning-dark}'
-  status-success-dark: '{colors.fill-success-dark}'
-  status-info-dark: '{colors.fill-info-dark}'
   highlight-inner-dark: '{colors.white-a4}'
   sheen-start-dark: '{colors.white-a2}'
   elevation-ring-dark: '{colors.white-a18}'
@@ -254,6 +207,11 @@ typography:
     fontSize: 0.75rem
     fontWeight: 400
     lineHeight: 1rem
+  caption-sm:
+    fontFamily: 'Llama Sans'
+    fontSize: 0.625rem
+    fontWeight: 400
+    lineHeight: 0.875rem
   title:
     fontFamily: 'Llama Sans'
     fontSize: 1.125rem
@@ -264,18 +222,24 @@ typography:
     fontSize: 1.5rem
     fontWeight: 600
     lineHeight: 2rem
+  display:
+    fontFamily: 'Llama Sans'
+    fontSize: 1.875rem
+    fontWeight: 600
+    lineHeight: 2.25rem
   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
+  sm: 6px
+  md: 8px
+  lg: 10px
+  xl: 14px
+  2xl: 16px
+  3xl: 24px
+  4xl: 32px
   full: 9999px
 spacing:
   xs: 4px
@@ -288,7 +252,7 @@ components:
   chat-form:
     backgroundColor: '#f9f9f9'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.surface}'
+    rounded: '{rounded.3xl}'
     typography: '{typography.body}'
   chat-form-dark:
     backgroundColor: '#202020'
@@ -298,47 +262,47 @@ components:
   chat-form-placeholder-dark:
     textColor: '{colors.fg-muted-dark}'
   chat-form-edge:
-    backgroundColor: '{colors.edge-rest-side}'
+    backgroundColor: '{colors.edge-rest}'
   chat-form-edge-dark:
-    backgroundColor: '{colors.edge-rest-side-dark}'
+    backgroundColor: '{colors.edge-rest-dark}'
   chat-form-edge-focus:
-    backgroundColor: '{colors.edge-focus-side}'
+    backgroundColor: '{colors.edge-focus}'
   chat-form-edge-focus-dark:
-    backgroundColor: '{colors.edge-focus-side-dark}'
+    backgroundColor: '{colors.edge-focus-dark}'
   card:
     backgroundColor: '#f9f9f9'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.card}'
+    rounded: '{rounded.xl}'
     padding: '24px'
   card-dark:
     backgroundColor: '#202020'
     textColor: '{colors.fg-default-dark}'
   card-edge:
-    backgroundColor: '{colors.edge-rest-side}'
+    backgroundColor: '{colors.edge-rest}'
   card-edge-dark:
-    backgroundColor: '{colors.edge-rest-side-dark}'
+    backgroundColor: '{colors.edge-rest-dark}'
   sidebar:
     backgroundColor: '#f9f9f9'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.container}'
+    rounded: '{rounded.2xl}'
   sidebar-dark:
     backgroundColor: '#1c1c1c'
     textColor: '{colors.fg-default-dark}'
   sidebar-edge:
-    backgroundColor: '{colors.edge-ambient-side}'
+    backgroundColor: '{colors.edge-ambient}'
   sidebar-edge-dark:
-    backgroundColor: '{colors.edge-ambient-side-dark}'
+    backgroundColor: '{colors.edge-ambient-dark}'
   inset-group:
     backgroundColor: 'oklch(1 0 0 / 0.85)'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.card}'
+    rounded: '{rounded.xl}'
   inset-group-dark:
     backgroundColor: 'oklch(0.985 0 0 / 0.03)'
     textColor: '{colors.fg-default-dark}'
   inset-group-edge:
-    backgroundColor: '{colors.edge-ambient-side}'
+    backgroundColor: '{colors.edge-ambient}'
   inset-group-edge-dark:
-    backgroundColor: '{colors.edge-ambient-side-dark}'
+    backgroundColor: '{colors.edge-ambient-dark}'
   selected-row:
     backgroundColor: 'oklch(0.145 0 0 / 0.05)'
     textColor: '{colors.fg-default}'
@@ -348,19 +312,19 @@ components:
   user-bubble:
     backgroundColor: '#f3f3f3'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.surface}'
+    rounded: '{rounded.2xl}'
     typography: '{typography.body}'
   user-bubble-dark:
     backgroundColor: '#181818'
     textColor: '{colors.fg-default-dark}'
   user-bubble-edge:
-    backgroundColor: '{colors.edge-faint}'
+    backgroundColor: '{colors.edge-ambient}'
   user-bubble-edge-dark:
-    backgroundColor: '{colors.edge-faint-dark}'
+    backgroundColor: '{colors.edge-ambient-dark}'
   floating-panel:
     backgroundColor: '#ffffff'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.panel}'
+    rounded: '{rounded.lg}'
     typography: '{typography.body-sm}'
   floating-panel-dark:
     backgroundColor: '#161616'
@@ -376,14 +340,14 @@ components:
   dialog:
     backgroundColor: '#ffffff'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.panel}'
+    rounded: '{rounded.lg}'
   dialog-dark:
     backgroundColor: '#0d0d0d'
     textColor: '{colors.fg-default-dark}'
   tooltip:
     backgroundColor: '{colors.action-primary}'
     textColor: '{colors.fg-on-action}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.caption}'
   tooltip-dark:
     backgroundColor: '{colors.action-primary-dark}'
@@ -391,7 +355,7 @@ components:
   button-primary:
     backgroundColor: '{colors.action-primary}'
     textColor: '{colors.fg-on-action}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '36px'
   button-primary-dark:
@@ -406,7 +370,7 @@ components:
   button-secondary:
     backgroundColor: '#f9f9f9'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '36px'
   button-secondary-dark:
@@ -425,7 +389,7 @@ components:
   button-tertiary:
     backgroundColor: '#fcfcfc'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '36px'
   button-tertiary-dark:
@@ -444,7 +408,7 @@ components:
   button-outline:
     backgroundColor: '{colors.field-background}'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '36px'
   button-outline-dark:
@@ -462,7 +426,7 @@ components:
     textColor: '{colors.fg-default-dark}'
   button-ghost:
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
   button-ghost-dark:
     textColor: '{colors.fg-default-dark}'
@@ -475,7 +439,7 @@ components:
   button-destructive:
     backgroundColor: '{colors.action-danger}'
     textColor: '{colors.fg-on-danger}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '36px'
   button-destructive-dark:
@@ -490,7 +454,7 @@ components:
   toggle-on:
     backgroundColor: '{colors.surface-selected}'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '36px'
   toggle-on-dark:
@@ -505,7 +469,7 @@ components:
   toggle-group:
     backgroundColor: '#f9f9f9'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
     height: '32px'
   toggle-group-dark:
@@ -533,7 +497,7 @@ components:
     textColor: '{colors.fg-default-dark}'
   tabs-list:
     backgroundColor: '{colors.surface-muted}'
-    rounded: '{rounded.panel}'
+    rounded: '{rounded.lg}'
     height: '36px'
     padding: '2px'
   tabs-list-dark:
@@ -541,7 +505,7 @@ components:
   tabs-trigger:
     backgroundColor: '{colors.surface-muted}'
     textColor: 'oklch(0.145 0 0 / 0.7)'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label}'
   tabs-trigger-dark:
     backgroundColor: '{colors.surface-muted-dark}'
@@ -582,7 +546,7 @@ components:
   input:
     backgroundColor: '{colors.field-background}'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.body-sm}'
     height: '36px'
   input-dark:
@@ -607,7 +571,7 @@ components:
   badge-default:
     backgroundColor: '{colors.action-primary}'
     textColor: '{colors.fg-on-action}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
     padding: '2px 8px'
   badge-default-dark:
@@ -616,14 +580,14 @@ components:
   badge-secondary:
     backgroundColor: '#dadada'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-secondary-dark:
     backgroundColor: '#252525'
     textColor: '{colors.fg-default-dark}'
   badge-outline:
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-outline-dark:
     textColor: '{colors.fg-default-dark}'
@@ -634,7 +598,7 @@ components:
   badge-destructive:
     backgroundColor: '{colors.action-danger}'
     textColor: '{colors.fg-on-danger}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-destructive-dark:
     backgroundColor: '#952420'
@@ -642,7 +606,7 @@ components:
   badge-success:
     backgroundColor: '{colors.surface-success}'
     textColor: '{colors.fg-success}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-success-dark:
     backgroundColor: '{colors.surface-success-dark}'
@@ -650,7 +614,7 @@ components:
   badge-warning:
     backgroundColor: '{colors.surface-warning}'
     textColor: '{colors.fg-warning}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-warning-dark:
     backgroundColor: '{colors.surface-warning-dark}'
@@ -658,7 +622,7 @@ components:
   badge-danger:
     backgroundColor: '{colors.surface-danger}'
     textColor: '{colors.fg-danger}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-danger-dark:
     backgroundColor: '{colors.surface-danger-dark}'
@@ -666,7 +630,7 @@ components:
   badge-info:
     backgroundColor: '{colors.surface-info}'
     textColor: '{colors.fg-info}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
     typography: '{typography.label-sm}'
   badge-info-dark:
     backgroundColor: '{colors.surface-info-dark}'
@@ -674,7 +638,7 @@ components:
   code-block:
     backgroundColor: '{colors.surface-code}'
     textColor: '{colors.fg-code}'
-    rounded: '{rounded.panel}'
+    rounded: '{rounded.lg}'
     typography: '{typography.code}'
   code-block-dark:
     backgroundColor: '{colors.surface-code-dark}'
@@ -684,21 +648,21 @@ components:
   list-row-selected:
     backgroundColor: '{colors.surface-selected}'
     textColor: '{colors.fg-default}'
-    rounded: '{rounded.control}'
+    rounded: '{rounded.md}'
   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}'
+    rounded: '{rounded.lg}'
   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}'
+    rounded: '{rounded.md}'
   chip-emphasis-dark:
     backgroundColor: '{colors.surface-emphasis-dark}'
     textColor: '{colors.fg-default-dark}'
@@ -708,22 +672,6 @@ components:
   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:
@@ -734,33 +682,61 @@ components:
     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}'
+    backgroundColor: '{colors.fill-danger}'
     rounded: '{rounded.full}'
     size: '8px'
   status-lamp-warning:
-    backgroundColor: '{colors.status-warning}'
-    textColor: '{colors.status-warning-glyph}'
+    backgroundColor: '{colors.fill-warning}'
     rounded: '{rounded.full}'
     size: '8px'
   status-lamp-success:
-    backgroundColor: '{colors.status-success}'
-    textColor: '{colors.status-success-glyph}'
+    backgroundColor: '{colors.fill-success}'
     rounded: '{rounded.full}'
     size: '8px'
 ---

+## In short
+
+The rules most changes need. The sections below hold the detail and the reasons, and they
+win where this list is too short. Before adding a token, a size or a component, use what is
+here; if something really is missing, add it here first.
+
+- **Components:** take base components from Llama UI (`@ggml-org/llama-ui/ui/<name>`); do not
+  build a new one when an existing one fits. Style them through their variants
+  (`variant="outline"`, `size="sm"`), not by overriding classes.
+- **Colour:** greys build the UI; colour is for meaning only (status, destructive actions,
+  focus). Neutral colours go by shadcn's utility names (`bg-background`, `bg-muted`, `bg-card`,
+  `text-foreground`, `text-muted-foreground`, `border-border`), status by `bg-surface-*`,
+  `bg-fill-*`, `text-fg-*` and `border-line-*-soft` of `success`, `warning`, `danger` and
+  `info`, and any other semantic token as `bg-(--surface-lifted)`. In CSS, read the semantic
+  token (`var(--surface-page)`). No Tailwind palette classes, no hex.
+- **Type:** Llama Sans, and Llama Mono for code, through roles: `text-body` (16px) for chat
+  messages and the chat input, `text-body-sm` (14px) for most text, `text-label` (14px, medium)
+  for buttons and labels, `text-label-sm` and `text-caption` (12px) for badges and hints,
+  `text-caption-sm` (10px) for tags and counts, `text-title` (18px) and `text-heading` (24px)
+  for the rare heading, `text-display` (30px) for the biggest headline. Never Tailwind's own sizes (`text-sm`, `text-xs`) or a size in
+  brackets.
+- **Shape:** one corner scale, `rounded-sm` to `rounded-4xl`: `rounded-md` (8px) for controls,
+  fields and badges, `rounded-lg` (10px) for menus and dialogs, `rounded-xl` (14px) for cards,
+  `rounded-2xl` (16px) and `rounded-3xl` (24px) for the larger surfaces, `rounded-full` for
+  pills, avatars and lamps.
+- **Sizes:** Tailwind's 4px spacing scale. Icons are Lucide, `size-icon-md` (16px), or
+  `size-icon-sm` (14px) in compact controls. Controls are `h-control-sm`, `h-control-md` or
+  `h-control-lg` (32, 36, 40px).
+- **Surfaces:** one surface utility per element (`card-surface`, `matte-float`, `matte-key`,
+  `matte-well`), never raw `shadow-*`, `border-*` and `backdrop-blur-*` combinations.
+- **Tokens:** read a semantic token directly. A component token is only for a value the
+  component decides itself. A value that follows from another token is mixed from it, not
+  picked again.
+- **No arbitrary values** (`text-[11px]`, `rounded-[1.125rem]`, `p-[7px]`, `z-[20]`): pick the
+  nearest from the scale (`z-20`, `max-w-4/5`, `min-w-32`). Brackets are for what no scale can
+  hold: a `calc()`, a grid template, a list of transition properties.
+- **Motion:** `ease-out-quint` for what enters or answers a press, `ease-sheet` for a sheet
+  or a page that slides.
+- **Phones:** every dialog is full screen; only alerts stay small and centred.
+- **The conversation is the loudest thing on screen;** everything around it stays quiet.
+
 ## Overview

 **Llama UI** is the design system and component library this file describes. **Llama Chat**,
@@ -793,7 +769,7 @@ This file is the how, written for agents first. Its principles, as rules to appl
 - **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.
+  accent, so an app built on Llama UI can restyle it through semantic and 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. Content pages are
   Markdown with Svelte components in them, as `.svx` (see `AGENTS.md`).
@@ -802,18 +778,35 @@ This file is the how, written for agents first. Its principles, as rules to appl

 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.
+1. **Primitives** (`primitives.css`): raw colours named by what they are, such as
+   `neutral-900`, `cool-gray-200`, `red-550` or `white-a30`. Only semantic tokens point at
+   them. Sizes are not primitives: a role holds its own value, and spacing is Tailwind's 4px
+   grid.
 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.
+   `fg-muted`, `line-field`, `edge-focus`, `action-primary` or `fill-warning`, and the only
+   tier that changes between light and dark. Each is either a pick, which names a primitive
+   per theme, or a derivation, which is mixed from another semantic token by a fixed rule and
+   so follows it through every theme with a single declaration:
+   - soft text is the text colour at 70% (`fg-soft`);
+   - a hover fill is the fill at 90% (`action-primary-hover`);
+   - a status surface is its fill mixed into the page, and a status line its fill mixed into
+     the default line, by a share the theme sets (11% and 34% in light, 16% and 38% in dark);
+   - a dark shadow is the light one, `elevation-strength` (1 in light, 5 in dark) times as
+     dense;
+   - the middle of a matte edge is its side at two thirds, and a lamp's rim and glyph are
+     its fill mixed 30% towards white and towards black (both in `surfaces.css`).
+
+   The type, icon size and control height roles live here too and are Tailwind utilities:
+   `text-label`, `size-icon-md`, `h-control-md`. Corners are Tailwind's own `rounded-sm` to
+   `rounded-4xl`, computed from `--radius` in `theme.css`. shadcn's
+   colour names (`background`, `muted-foreground`, `border` ...) exist as Tailwind utilities
+   only, each mapped to a semantic token in `theme.css`.
+
+3. **Component tokens** (`components.css`): only what a component decides itself, named
+   `[component]-[variant]-[property]-[state]`, such as `button-secondary-background-hover` or
+   `float-panel-background-modal`: a value no semantic token has, or one that only this
+   component changes between themes. A component that takes a semantic token as it is reads
+   the semantic token, as `bg-(--action-primary)` and similar, and gets no alias here.

 The front matter's `colors`, `typography` and `rounded` are generated from the primitives, the
 semantic tokens and the font stacks by `npm run design:tokens` in `ui/apps/chat`, and CI fails
@@ -860,16 +853,18 @@ the Surface switch in Storybook's toolbar, and only its surface tokens differ: `
   `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
+- **Foreground:** `fg-default` and `fg-muted` for text and icons, `fg-soft` (the text colour
+  at 70%) for the label of an option that is not the picked one, `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.
+- **Edges:** the hairlines of matte surfaces, darker at the sides than in the middle (the
+  token is the side; the surface fades it to two thirds in the middle). `edge-rest` at rest,
+  `edge-focus` when focus is inside, `edge-ambient` for large quiet containers whose edge
+  never changes and, kept even all round, 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
@@ -880,9 +875,9 @@ the Surface switch in Storybook's toolbar, and only its surface tokens differ: `
   `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
+- **Status:** `fill-danger`, `fill-warning`, `fill-success` and `fill-info` are the
+  lamp fills for error or stopped, loading or warning, ready or connected, and informational. A lamp adds
+  a lighter rim and a darker glyph, both mixed from its fill. 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.

@@ -895,14 +890,21 @@ is one variable font with an optical size axis: the browser sets it from the fon
 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:
+its coding ligatures included, in one cell, so code and numbers line up in columns. Type is set through roles that fix size and line height together, and for labels and headings the weight too:

-- `body` (16/24, 400): chat messages and the chat input.
-- `body-sm` (14/20, 400): most text, fields and lists.
+- `body` (16/24): chat messages and the chat input.
+- `body-sm` (14/20): 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.
+- `caption` (12/16): tooltips, hints and metadata.
+- `caption-sm` (10/14): the smallest text, for tags, compact badges and counts.
+- `title` (18/28, 600) and `heading` (24/32, 600): rare headings.
+- `display` (30/36, 600): the biggest headline, such as the greeting on a new chat.
+
+Body and caption text takes the weight around it, regular unless a parent says otherwise; add
+a weight class for anything else (`text-body-sm font-semibold`). The roles are the whole
+scale: no `text-sm` or `text-xs`, and no size in brackets. On a phone a row that needs larger
+text takes the next role up (`text-body-sm max-md:text-body`).

 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
@@ -978,8 +980,8 @@ matches the role of the surface instead of combining raw shadows.
 - **`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,
   a rim and a deeper shadow. The edge is a hairline ring baked into the shadow as its last
-  layer (`float-panel-edge`). The panel's 1px border is its rim, the inner highlight
-  (`float-panel-highlight`) right inside the ring; an inset shadow for the rim would sit inside
+  layer (`edge-raised`). The panel's 1px border is its rim, the inner highlight
+  (`highlight-inner`) right inside the ring; an inset shadow for the rim would sit inside
   the border instead, and the 1px between the two would draw a double edge. 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
@@ -991,12 +993,12 @@ matches the role of the surface instead of combining raw shadows.
   (`--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
+  it is a frosted, translucent red (`fill-danger` 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
+  `--elevation-ring` (black 5%, white 18% in dark), 1px wide. 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.
@@ -1007,16 +1009,16 @@ matches the role of the surface instead of combining raw shadows.
   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
+`elevation-inset` and `elevation-pressed`; a tooltip takes `elevation-surface`. 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,
+shadow fades out instead of ending in a visible edge. They are the only shadows: Tailwind's
+own `shadow-sm` to `shadow-2xl` do not follow the theme and are not used. `elevation-surface`
+reaches about 20px, `elevation-raised` about 38px, 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
+lifts. The keys inside the chat form, the add key and the model selector, take `elevation-key`:
+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
@@ -1025,11 +1027,12 @@ 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.
+Corners are soft and consistent, on one scale that is computed from a single base radius
+(`--radius`, 10px, in `theme.css`), so changing the base moves every corner with it: `sm`
+(6px) for small marks and chips, `md` (8px) for buttons, fields and badges, `lg` (10px) for
+menus and dialogs, `xl` (14px) for cards, `2xl` (16px) for the sidebar and message bubbles,
+and `3xl` (24px) for the chat form, rising to `4xl` (32px) for the chat form on small
+screens. Status lamps, avatars and the round icon buttons in the chat form are fully round.

 ## Brand

@@ -1071,15 +1074,15 @@ icon buttons in the chat form are fully round.
 - **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`.
+  `surface-selected`.
 - **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.
+  own text colour at 25% 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
+  `elevation-control`, and unselected options are softened text (`fg-soft`) with no fill. Tabs use the
+  same track for their list, with the active tab raised; 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
@@ -1095,7 +1098,7 @@ icon buttons in the chat form are fully round.
 - **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.
+  `edge-ambient` 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
@@ -1168,8 +1171,8 @@ icon buttons in the chat form are fully round.
   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 read a semantic token directly wherever a component takes it as it is. Add a component
+  token only for a value the component decides itself, never as an alias of a semantic token.
 - 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
diff --git a/ui/apps/chat/scripts/design-md.js b/ui/apps/chat/scripts/design-md.js
index 316bf9acd..94c90b1f5 100644
--- a/ui/apps/chat/scripts/design-md.js
+++ b/ui/apps/chat/scripts/design-md.js
@@ -34,9 +34,11 @@ const THEMES = [
 ];
 // the type roles, by the @theme names Tailwind turns into text-body, text-label-sm, ...: a size with a line height
 const TYPE_ROLE = /^--text-([a-z]+(?:-[a-z]+)*)$/;
+// body and caption text takes the weight around it, which is regular unless a parent says otherwise
+const DEFAULT_WEIGHT = '400';
 // code takes the body-sm role in the mono stack (see `:where(code, pre, kbd, samp)` in theme.css)
 const CODE_ROLE = 'body-sm';
-// Tailwind's own `rounded-full`, for lamps, avatars and round buttons; the other corners are roles in semantic.css
+// Tailwind's own `rounded-full`, for lamps, avatars and round buttons; the other corners are the scale in theme.css
 const ROUNDED_FULL = '9999px';
 // the sections this script owns, in the order they appear in the front matter; the next one is written by hand
 const SECTIONS = ['colors', 'typography', 'rounded'];
@@ -104,6 +106,8 @@ const isColorLiteral = (value) =>
 	/^(oklch|oklab|rgb|hsl)\([^()]*\)$/.test(value);
 /** @param {string} value */
 const isColorMix = (value) => /^color-mix\(.*\)$/.test(value) && !/\)\s*,/.test(value);
+/** a share a theme sets for a derivation, e.g. `--status-surface-share: 11%` @param {string} value */
+const isShare = (value) => /^\d+(?:\.\d+)?%$/.test(value);
 /** @param {string} value */
 const varName = (value) => /^var\(--([\w-]+)\)$/.exec(value)?.[1];

@@ -136,7 +140,19 @@ function build() {

 		return next !== undefined && isColor(next, scope);
 	};
-	const semanticColors = [...semantic].filter(([, value]) => isColor(value, semantic));
+	/**
+	 * A value with the shares it reads written out, as the theme whose declarations are `scope` sets them, so a
+	 * derivation reads as the mix it is: `color-mix(in oklab, var(--fill-danger) 11%, var(--surface-page))`.
+	 * @param {string} value
+	 * @param {Map<string, string>} [scope]
+	 */
+	const withShares = (value, scope) =>
+		value.replace(/var\((--[\w-]+)\)/g, (reference, name) => {
+			const share = scope?.get(name) ?? semantic.get(name) ?? '';
+
+			return isShare(share) ? share : reference;
+		});
+	const semanticColors = [...semantic].filter(([, value]) => isColor(withShares(value), semantic));
 	const semanticNames = new Set(semanticColors.map(([name]) => name.slice(2)));
 	/**
 	 * A token's value as the front matter writes it: a reference to another token, a literal, or a mix of them. A
@@ -166,7 +182,7 @@ function build() {
 	const base = new Map();

 	for (const [name, value] of semanticColors) {
-		const rendered = render(value, (n) => n);
+		const rendered = render(withShares(value), (n) => n);

 		base.set(name, rendered);
 		colors.push([name.slice(2), rendered]);
@@ -190,7 +206,9 @@ function build() {
 				if (semanticNames.has(ref)) resolve(`--${ref}`);
 			}

-			const result = render(value, (n) => (twins.has(n) ? `${n}${suffix}` : n));
+			const result = render(withShares(value, overrides), (n) =>
+				twins.has(n) ? `${n}${suffix}` : n
+			);

 			rendered.set(name, result);

@@ -217,6 +235,13 @@ function build() {

 		return (name && primitives.get(`--${name}`)) ?? value ?? '';
 	};
+	// a line height is written as the line over the size, `calc(1.25 / 0.875)`: the line, in rem
+	/** @param {string | undefined} value */
+	const lineHeight = (value) => {
+		const ratio = /^calc\(([\d.]+) \/ [\d.]+\)$/.exec(value ?? '');
+
+		return ratio ? `${ratio[1]}rem` : length(value);
+	};
 	/** @type {[string, Record<string, string>][]} */
 	const typography = [];

@@ -230,8 +255,8 @@ function build() {
 			{
 				fontFamily: sans,
 				fontSize: length(value),
-				fontWeight: length(inline.get(`${name}--font-weight`)),
-				lineHeight: length(inline.get(`${name}--line-height`))
+				fontWeight: inline.get(`${name}--font-weight`) ?? DEFAULT_WEIGHT,
+				lineHeight: lineHeight(inline.get(`${name}--line-height`))
 			}
 		]);
 	}
@@ -242,11 +267,17 @@ function build() {

 	/** @type {[string, string][]} */
 	const rounded = [];
+	// the corner scale is computed from --radius: `calc(var(--radius) + 4px)`, with 1rem as 16px
+	const baseRadius = parseFloat(theme.get(':root')?.get('--radius') ?? '') * 16;

-	for (const [name, value] of inline) {
-		const role = /^--radius-([a-z-]+)$/.exec(name)?.[1];
+	for (const [name, value] of theme.get('@theme inline') ?? []) {
+		const step = /^--radius-([a-z0-9]+)$/.exec(name)?.[1];
+		const offset = /^calc\(var\(--radius\) ([+-]) ([\d.]+)px\)$/.exec(value);
+
+		if (!step) continue;

-		if (role) rounded.push([role, length(value)]);
+		if (offset) rounded.push([step, `${baseRadius + Number(offset[1] + offset[2])}px`]);
+		else if (value === 'var(--radius)') rounded.push([step, `${baseRadius}px`]);
 	}

 	rounded.push(['full', ROUNDED_FULL]);
diff --git a/ui/apps/chat/src/app.css b/ui/apps/chat/src/app.css
index cca440844..24ba6cec4 100644
--- a/ui/apps/chat/src/app.css
+++ b/ui/apps/chat/src/app.css
@@ -30,7 +30,7 @@
 	/* 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 */
-	--sidebar-reveal-tint: color-mix(in oklab, var(--muted) 60%, var(--background));
+	--sidebar-reveal-tint: color-mix(in oklab, var(--surface-muted) 60%, var(--surface-page));
 	/* how far the phone sidebar is open, 0 to 1, stepped every frame by useSidebarReveal */
 	--sidebar-reveal-progress: 0;
 	/* the same on a log curve: the sidebar's contents hold on until the page nearly covers them */
@@ -39,7 +39,7 @@
 	--sidebar-reveal-bg: color-mix(
 		in oklab,
 		var(--sidebar-reveal-tint) calc(var(--sidebar-reveal-progress) * 100%),
-		var(--background)
+		var(--surface-page)
 	);
 	--layer-popover: 1000000;

@@ -63,7 +63,7 @@
 	/* the chat form's corners while its text and actions share one row */
 	--chat-form-single-row-radius: 1.25rem;
 	/* the card's translucent fill over the page, made opaque: the phone sheet, and the page and Safari's bars around it */
-	--chat-form-sheet-fill: color-mix(in oklab, var(--muted) 60%, var(--background));
+	--chat-form-sheet-fill: color-mix(in oklab, var(--surface-muted) 60%, var(--surface-page));
 	--max-message-height: max(24rem, min(80dvh, calc(100dvh - var(--chat-form-area-height) - 12rem)));
 }

@@ -91,7 +91,7 @@
 }

 .dark {
-	--chat-form-sheet-fill: color-mix(in oklab, var(--muted) 75%, var(--background));
+	--chat-form-sheet-fill: color-mix(in oklab, var(--surface-muted) 75%, var(--surface-page));
 }

 @layer base {
@@ -202,9 +202,9 @@
 	.chat-top-fade {
 		background: linear-gradient(
 			to bottom,
-			color-mix(in srgb, var(--background) 100%, transparent) 25%,
-			color-mix(in srgb, var(--background) 80%, transparent) 50%,
-			color-mix(in srgb, var(--background) 40%, transparent) 75%,
+			color-mix(in srgb, var(--surface-page) 100%, transparent) 25%,
+			color-mix(in srgb, var(--surface-page) 80%, transparent) 50%,
+			color-mix(in srgb, var(--surface-page) 40%, transparent) 75%,
 			transparent 100%
 		);
 	}
@@ -219,8 +219,8 @@
 		height: var(--page-top);
 		background: linear-gradient(
 			to bottom,
-			var(--background) calc(var(--corner-control-top) + 1.25rem),
-			color-mix(in srgb, var(--background) 55%, transparent)
+			var(--surface-page) calc(var(--corner-control-top) + 1.25rem),
+			color-mix(in srgb, var(--surface-page) 55%, transparent)
 				calc(var(--corner-control-top) + 2.5rem),
 			transparent 100%
 		);
@@ -234,14 +234,14 @@
 	   10px Safari ignores; what it covers sits under the fade's solid part anyway */
 	.status-bar-edge {
 		height: 0.75rem;
-		background-color: var(--background);
+		background-color: var(--surface-page);
 	}

 	/* The bottom edge's counterpart, which Safari takes for its bottom toolbar the same way:
 	   without it, it finds the chat form there and takes the form's colour */
 	.screen-bottom-edge {
 		height: 0.75rem;
-		background-color: var(--background);
+		background-color: var(--surface-page);
 	}

 	/* The same fade at the bottom of a phone's screen: solid behind the home indicator and
@@ -251,8 +251,9 @@
 		height: calc(var(--safe-area-bottom) + 3rem);
 		background: linear-gradient(
 			to top,
-			var(--background) var(--safe-area-bottom),
-			color-mix(in srgb, var(--background) 60%, transparent) calc(var(--safe-area-bottom) + 1.5rem),
+			var(--surface-page) var(--safe-area-bottom),
+			color-mix(in srgb, var(--surface-page) 60%, transparent)
+				calc(var(--safe-area-bottom) + 1.5rem),
 			transparent 100%
 		);
 	}
@@ -261,7 +262,7 @@
 	   panel's translucent muted tint, and a fade above it, like the one under
 	   the tab bar, so the rows scrolling beneath end softly */
 	.sidebar-show-more {
-		--sidebar-surface: color-mix(in oklab, var(--muted) 60%, var(--background));
+		--sidebar-surface: color-mix(in oklab, var(--surface-muted) 60%, var(--surface-page));
 		background: var(--sidebar-surface);

 		&::before {
@@ -284,14 +285,14 @@
 	   over the other sections while dragged */
 	.sidebar-drag-surface,
 	.sidebar-drag-overlay {
-		background: color-mix(in oklab, var(--muted) 60%, var(--background));
+		background: color-mix(in oklab, var(--surface-muted) 60%, var(--surface-page));
 	}

 	/* the copy of a chat row that follows the pointer, raised above the page */
 	.sidebar-drag-overlay {
 		box-shadow:
 			0 10px 30px -10px rgb(0 0 0 / 0.35),
-			0 0 0 1px color-mix(in srgb, var(--foreground) 12%, transparent);
+			0 0 0 1px color-mix(in srgb, var(--fg-default) 12%, transparent);
 	}

 	/* While something is dragged, what it passes over takes no hover: only the
@@ -329,12 +330,7 @@
 	}

 	.shimmer-text {
-		background: linear-gradient(
-			90deg,
-			var(--muted-foreground),
-			var(--foreground),
-			var(--muted-foreground)
-		);
+		background: linear-gradient(90deg, var(--fg-muted), var(--fg-default), var(--fg-muted));
 		background-size: 200% 100%;
 		background-clip: text;
 		-webkit-background-clip: text;
@@ -361,16 +357,16 @@
  * so the svg also inherits them inside the preview dialog's shadow root, and follow the theme.
  */
 :root {
-	--pele-bg: var(--code-background);
-	--pele-fg: var(--code-foreground);
-	--pele-muted: var(--muted-foreground);
-	--pele-line: var(--muted-foreground);
-	--pele-surface: var(--background);
-	--pele-surface-alt: var(--muted);
-	--pele-border: var(--border);
-	--pele-accent: var(--primary);
-	--pele-critical: var(--destructive);
-	--pele-error: var(--destructive);
+	--pele-bg: var(--surface-code);
+	--pele-fg: var(--fg-code);
+	--pele-muted: var(--fg-muted);
+	--pele-line: var(--fg-muted);
+	--pele-surface: var(--surface-page);
+	--pele-surface-alt: var(--surface-muted);
+	--pele-border: var(--line-default);
+	--pele-accent: var(--action-primary);
+	--pele-critical: var(--fg-danger);
+	--pele-error: var(--fg-danger);
 	--pele-radius: calc(var(--radius) - 4px);
 }

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 7c921732d..87cc59093 100644
--- a/ui/apps/chat/src/lib/components/app/badges/BadgesModality.svelte
+++ b/ui/apps/chat/src/lib/components/app/badges/BadgesModality.svelte
@@ -18,7 +18,7 @@
 	{@const ModalityIcon = MODALITY_ICONS[modality]}
 	<span
 		class={[
-			'inline-flex items-center gap-1 rounded-md bg-muted px-2 py-1 text-xs font-medium',
+			'inline-flex items-center gap-1 rounded-md bg-muted px-2 py-1 text-caption font-medium',
 			className
 		]}
 	>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte
index 5bb7a47d7..d7284aa61 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsList/ChatAttachmentsListItem/ChatAttachmentsListItem.svelte
@@ -77,7 +77,7 @@
 				: null}
 	{#if mcpPrompt}
 		<ChatAttachmentsListItemMcpPrompt
-			class="max-w-[300px] min-w-[200px] flex-shrink-0 {className} {scrollClasses}"
+			class="max-w-75 min-w-50 flex-shrink-0 {className} {scrollClasses}"
 			isLoading={item.isLoading}
 			loadError={item.loadError}
 			onRemove={onFileRemove ? () => onFileRemove(item.id) : undefined}
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 6fb3c294f..34f142eea 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
@@ -35,7 +35,7 @@
 	<Tooltip.Trigger>
 		<button
 			class={[
-				'flex flex-shrink-0 items-center gap-1.5 rounded-md border px-2 py-0.75 text-sm transition-colors',
+				'flex flex-shrink-0 items-center gap-1.5 rounded-md border px-2 py-0.75 text-body-sm transition-colors',
 				getStatusClass(attachment),
 				onclick && 'cursor-pointer hover:bg-muted/50',
 				className
@@ -52,7 +52,7 @@
 				<ResourceIcon class="size-icon-xs text-muted-foreground" />
 			{/if}

-			<span class="max-w-[150px] truncate text-xs">
+			<span class="max-w-37.5 truncate text-caption">
 				{getResourceDisplayName(attachment.resource)}
 			</span>

@@ -70,7 +70,7 @@
 	</Tooltip.Trigger>

 	<Tooltip.Content>
-		<div class="flex items-center gap-1 text-xs">
+		<div class="flex items-center gap-1 text-caption">
 			{#if favicon}
 				<img
 					alt={attachment.resource.serverName}
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 2725104c6..f7d96cd8a 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
@@ -80,7 +80,7 @@
 {#snippet textPreview(content: string)}
 	<div class="relative">
 		<div
-			class="font-mono text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground {!readonly
+			class="font-mono text-caption leading-relaxed break-words whitespace-pre-wrap text-muted-foreground {!readonly
 				? 'max-h-3rem line-height-1.2'
 				: ''}"
 		>
@@ -107,7 +107,7 @@

 {#snippet fileIcon()}
 	<div
-		class="flex size-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-label-sm text-primary"
 	>
 		{#if isAudio}
 			<Music class="{ICON_CLASS_DEFAULT} text-white/70" />
@@ -121,7 +121,7 @@

 {#snippet info(text: string | undefined)}
 	{#if text}
-		<span class="text-xs text-muted-foreground">{text}</span>
+		<span class="text-caption text-muted-foreground">{text}</span>
 	{/if}
 {/snippet}

@@ -142,7 +142,7 @@
 			{#if readonly}
 				<div class="flex items-start gap-3">
 					<div class="flex min-w-0 flex-1 flex-col items-start text-left">
-						<span class="w-full truncate text-sm font-medium text-foreground">{name}</span>
+						<span class="w-full truncate text-label text-foreground">{name}</span>

 						{@render info(pdfProcessingMode || (size ? formatFileSize(size) : undefined))}

@@ -152,7 +152,7 @@
 					</div>
 				</div>
 			{:else}
-				<span class="mb-3 block truncate text-sm font-medium text-foreground">{name}</span>
+				<span class="mb-3 block truncate text-label text-foreground">{name}</span>

 				{#if textContent}
 					{@render textPreview(textContent)}
@@ -170,7 +170,7 @@

 		<div class="flex flex-col items-start gap-0.5">
 			<span
-				class="max-w-24 truncate text-sm font-medium text-foreground {readonly
+				class="max-w-24 truncate text-label text-foreground {readonly
 					? ''
 					: 'group-hover:pr-6'} md:max-w-32"
 			>
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 be9951f37..e031f4791 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
@@ -51,7 +51,7 @@

 	{#if label}
 		<span
-			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)]"
+			class="pointer-events-none absolute bottom-1 left-1 rounded-md bg-black/40 px-1.5 py-0.5 text-caption-sm 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/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemAudio.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemAudio.svelte
index 53653599f..f1d6a46cc 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
@@ -21,6 +21,6 @@
 			<p class="mb-4 text-white/70">Audio preview not available</p>
 		{/if}

-		<p class="text-sm text-white/50">{currentItem?.name || 'Audio'}</p>
+		<p class="text-body-sm text-white/50">{currentItem?.name || 'Audio'}</p>
 	</div>
 </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 f270a0751..07a08026c 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
@@ -206,7 +206,7 @@
 	{@render status('Failed to load PDF images', pdfImagesError)}
 {:else if pdfImages.length > 0}
 	{#each pdfImages as image, index (index)}
-		<p class="mb-2 text-sm text-white/50">Page {index + 1}</p>
+		<p class="mb-2 text-body-sm text-white/50">Page {index + 1}</p>

 		<img
 			alt="PDF Page {index + 1}"
@@ -240,7 +240,7 @@
 			<p class={['text-white/70', detail && 'mb-4']}>{message}</p>

 			{#if detail}
-				<p class="text-sm text-white/50">{detail}</p>
+				<p class="text-body-sm text-white/50">{detail}</p>
 			{/if}
 		</div>
 	</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 ab0a2479a..f3f4845d3 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
@@ -22,6 +22,6 @@
 			<p class="mb-4 text-white/70">Video preview not available</p>
 		{/if}

-		<p class="text-sm text-white/50">{currentItem?.name || 'Video'}</p>
+		<p class="text-body-sm text-white/50">{currentItem?.name || 'Video'}</p>
 	</div>
 </div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewFileInfo.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewFileInfo.svelte
index d27d54a4b..e51429a14 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewFileInfo.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewFileInfo.svelte
@@ -7,10 +7,10 @@
 	let { displayName, fileSize }: Props = $props();
 </script>

-<div class="sticky top-0 z-[20] mb-4 rounded-lg bg-black/5 px-4 py-2 text-center backdrop-blur-md">
+<div class="sticky top-0 z-20 mb-4 rounded-lg bg-black/5 px-4 py-2 text-center backdrop-blur-md">
 	<p class="font-medium text-white">{displayName}</p>

 	{#if fileSize}
-		<p class="text-xs text-white/60">{fileSize}</p>
+		<p class="text-caption text-white/60">{fileSize}</p>
 	{/if}
 </div>
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 513d97a12..2fa421520 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
@@ -61,7 +61,9 @@
 								<FileText class="{ICON_CLASS_DEFAULT} text-white/70" />
 							{/if}

-							<span class="font-mono text-[9px] text-white/60">{getFileExtension(item.name)}</span>
+							<span class="font-mono text-caption-sm text-white/60"
+								>{getFileExtension(item.name)}</span
+							>
 						</div>
 					{/if}
 				</button>
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 0c44d125f..e99c1eac3 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
@@ -678,9 +678,7 @@
 		bind:this={cardEl}
 		class={[
 			'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)',
+			isSingleRow ? 'rounded-(--chat-form-single-row-radius)' : 'rounded-4xl md:rounded-3xl',
 			// 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',
@@ -702,7 +700,7 @@
 				'max-md:pt-safe',
 				// no rim, ring or visible border along the screen's edges; the border stays
 				// transparent so nothing inside shifts by its width
-				'max-md:[--glass-edge-side:transparent] max-md:[--glass-edge-mid:transparent] max-md:[--glass-edge-side-focus:transparent] max-md:[--glass-edge-mid-focus:transparent] max-md:[--glass-highlight:transparent]',
+				'max-md:[--glass-edge:transparent] max-md:[--glass-edge-focus:transparent] max-md:[--glass-highlight:transparent]',
 				'max-md:border-transparent max-md:focus-within:border-transparent max-md:dark:border-transparent max-md:dark:focus-within:border-transparent',
 				EXPANDED_SHEET_FILL
 			],
@@ -734,7 +732,7 @@

 		<div
 			class={[
-				'relative flex flex-1 shadow-sm transition-shadow focus-within:shadow-md',
+				'relative flex flex-1 shadow-(--elevation-control) transition-shadow focus-within:shadow-(--elevation-surface)',
 				// the add button, the text and the rest of the actions, or the text above them
 				isSingleRow
 					? 'items-center gap-2 rounded-(--chat-form-single-row-radius) px-3 py-2.5'
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 b22d03c7b..e25bcb56f 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
@@ -15,7 +15,7 @@
 <Tooltip.Root>
 	<Tooltip.Trigger class="w-full">
 		<Button
-			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"
+			class="file-upload-button bg-background size-9 rounded-full p-0 shadow-(--elevation-key) 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 55e87129e..fe3bff7bd 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
@@ -77,10 +77,10 @@
 	const toolsPanel = useToolsPanel();

 	const itemClass =
-		'flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent active:bg-accent disabled:cursor-not-allowed disabled:opacity-50';
+		'flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-body-sm transition-colors hover:bg-accent active:bg-accent disabled:cursor-not-allowed disabled:opacity-50';

 	const itemRowClass =
-		'flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-accent';
+		'flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-body-sm transition-colors hover:bg-accent';
 </script>

 <div class="flex items-center gap-1 {className}">
@@ -204,9 +204,9 @@
 			/>
 		{/if}

-		<span class="min-w-0 flex-1 truncate text-sm font-medium">{group.label}</span>
+		<span class="min-w-0 flex-1 truncate text-label">{group.label}</span>

-		<span class="shrink-0 text-xs text-muted-foreground">
+		<span class="shrink-0 text-caption text-muted-foreground">
 			{enabledCount}/{group.tools.length}
 		</span>

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 b4e6aa821..78153bfbd 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
@@ -80,7 +80,7 @@
 						class={cn(
 							// ghost brings no fill of its own for the muted composer surface to fight over
 							buttonVariants({ variant: 'ghost' }),
-							'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'
+							'file-upload-button matte-key size-8 [--button-shadow:var(--elevation-key)] 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 ce32bdf31..114749086 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
@@ -23,13 +23,13 @@
 	<DropdownMenu.SubContent class="w-72 p-0">
 		{#if toolsPanel.totalToolCount === 0}
 			{#if toolsStore.loading}
-				<div class="px-3 py-4 text-center text-sm text-muted-foreground">
+				<div class="px-3 py-4 text-center text-body-sm text-muted-foreground">
 					<Loader2 class="mx-auto mb-1 {ICON_CLASS_DEFAULT} animate-spin" />

 					Loading tools...
 				</div>
 			{:else if toolsStore.isToolsEndpointUnreachable}
-				<div class="grid gap-2.5 px-3 py-4 text-sm text-muted-foreground">
+				<div class="grid gap-2.5 px-3 py-4 text-body-sm text-muted-foreground">
 					<span class="flex gap-2">
 						<Info class="mt-0.5 {ICON_CLASS_DEFAULT} shrink-0" />

@@ -54,15 +54,19 @@
 					{/if}
 				</div>
 			{:else if toolsStore.error}
-				<div class="px-3 py-4 text-center text-sm text-muted-foreground">Failed to load tools</div>
+				<div class="px-3 py-4 text-center text-body-sm text-muted-foreground">
+					Failed to load tools
+				</div>
 			{:else if toolsPanel.noToolsInfoMessage}
-				<div class="flex gap-2 px-3 py-4 text-sm text-muted-foreground">
+				<div class="flex gap-2 px-3 py-4 text-body-sm text-muted-foreground">
 					<Info class="mt-0.5 {ICON_CLASS_DEFAULT} shrink-0" />

 					<span>{toolsPanel.noToolsInfoMessage}</span>
 				</div>
 			{:else}
-				<div class="px-3 py-4 text-center text-sm text-muted-foreground">No tools available</div>
+				<div class="px-3 py-4 text-center text-body-sm text-muted-foreground">
+					No tools available
+				</div>
 			{/if}
 		{:else}
 			<div class="max-h-80 overflow-y-auto p-2 pr-1">
@@ -90,7 +94,7 @@
 	>
 		<div class="flex items-center gap-1 {groupDisabled ? 'pointer-events-none opacity-50' : ''}">
 			<Collapsible.Trigger
-				class="flex min-w-0 flex-1 items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50"
+				class="flex min-w-0 flex-1 items-center gap-2 rounded px-2 py-1.5 text-body-sm hover:bg-muted/50"
 			>
 				{#if isExpanded}
 					<ChevronDown class="size-icon-sm shrink-0" />
@@ -113,7 +117,7 @@
 					<span class="truncate">{group.label}</span>
 				</span>

-				<span class="ml-auto shrink-0 text-xs text-muted-foreground">
+				<span class="ml-auto shrink-0 text-caption text-muted-foreground">
 					{toolsPanel.getEnabledToolCount(group)}/{group.tools.length}
 				</span>
 			</Collapsible.Trigger>
@@ -146,7 +150,7 @@
 					{@const enabled = toolsPanel.isToolEnabled(entry)}
 					{@const parentDisabled = toolsPanel.isToolParentDisabled(entry)}
 					<button
-						class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/50 {parentDisabled
+						class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-body-sm transition-colors hover:bg-muted/50 {parentDisabled
 							? 'opacity-50'
 							: ''}"
 						onclick={() => toolsPanel.toggleTool(entry)}
@@ -162,7 +166,7 @@
 							{/if}
 						</span>

-						<span class="min-w-0 flex-1 truncate font-mono text-[12px]">
+						<span class="min-w-0 flex-1 truncate font-mono text-caption">
 							{entry.definition.function.name}
 						</span>
 					</button>
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 04fd275fd..91d4b7de0 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
@@ -46,7 +46,7 @@

 	<button
 		aria-pressed={reasoning.isSelected(level)}
-		class="flex min-h-11 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left text-sm transition-colors hover:bg-accent"
+		class="flex min-h-11 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left text-body-sm transition-colors hover:bg-accent"
 		onclick={() => select(level)}
 		type="button"
 	>
@@ -59,7 +59,7 @@
 		<span class="min-w-0 flex-1 truncate">{level.label}</span>

 		{#if tokenLabel}
-			<span class="shrink-0 text-[11px] text-muted-foreground opacity-60">{tokenLabel}</span>
+			<span class="shrink-0 text-caption text-muted-foreground opacity-60">{tokenLabel}</span>
 		{/if}

 		{#if level.hasInfo}
@@ -75,7 +75,7 @@
 		aria-label="Reasoning effort"
 		class="h-auto gap-1 rounded-sm bg-transparent! backdrop-blur-none! {isDefault
 			? 'px-1'
-			: 'px-1.75!'} py-1 text-xs max-md:h-8"
+			: 'px-1.75!'} py-1 text-caption max-md:h-8"
 		onclick={() => (isOpen = true)}
 		variant="ghost"
 	>
@@ -104,7 +104,7 @@
 					aria-label="Reasoning effort"
 					class="-mr-px h-6 min-w-6 gap-1 rounded-sm bg-transparent backdrop-blur-none! {isDefault
 						? 'px-1'
-						: 'px-1.75!'} py-0 text-xs hover:bg-muted-foreground/15 data-[state=open]:bg-muted-foreground/15"
+						: 'px-1.75!'} py-0 text-caption hover:bg-muted-foreground/15 data-[state=open]:bg-muted-foreground/15"
 					variant="ghost"
 				>
 					{@render triggerLabel()}
@@ -126,7 +126,7 @@
 					<span class="min-w-0 flex-1 truncate">{level.label}</span>

 					{#if tokenLabel}
-						<span class="shrink-0 text-[11px] text-muted-foreground opacity-60">{tokenLabel}</span>
+						<span class="shrink-0 text-caption text-muted-foreground opacity-60">{tokenLabel}</span>
 					{/if}

 					{#if level.hasInfo}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetailRow.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetailRow.svelte
index 620bd874e..8dc76858f 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetailRow.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetailRow.svelte
@@ -16,7 +16,7 @@
 	</div>

 	{#if subtitle}
-		<div class="text-[10px] leading-tight text-muted-foreground/70 max-md:text-[11px]">
+		<div class="text-caption-sm leading-tight text-muted-foreground/70 max-md:text-caption">
 			{subtitle}
 		</div>
 	{/if}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetails.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetails.svelte
index f57dcc636..34d22dfd6 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetails.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeDetails.svelte
@@ -33,13 +33,13 @@
 </script>

 <div class="mt-3 border-t border-border/50 pt-4">
-	<p class="text-xs text-muted-foreground max-md:text-[13px]">Token usage details</p>
+	<p class="text-caption text-muted-foreground max-md:text-body-sm">Token usage details</p>

-	<div class="flex flex-col gap-4 pt-4 text-xs max-md:gap-5 max-md:text-[13px]">
+	<div class="flex flex-col gap-4 pt-4 text-caption max-md:gap-5 max-md:text-body-sm">
 		{#if hasCumulative}
 			<div>
 				<h3
-					class="text-[11px] font-medium uppercase tracking-wide text-muted-foreground/70 mb-2 max-md:text-xs"
+					class="text-label-sm uppercase tracking-wide text-muted-foreground/70 mb-2 max-md:text-caption"
 				>
 					Across all turns
 				</h3>
@@ -68,7 +68,7 @@
 		{#if hasCurrent}
 			<div>
 				<h3
-					class="text-[11px] font-medium uppercase tracking-wide text-muted-foreground/70 mb-2 max-md:text-xs"
+					class="text-label-sm uppercase tracking-wide text-muted-foreground/70 mb-2 max-md:text-caption"
 				>
 					This turn · KV cache
 				</h3>
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 3627c7419..d2dd96f79 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
@@ -12,13 +12,17 @@
 </script>

 {#if modelId !== null && !isLoading}
-	<div class="flex flex-col gap-2 border-t border-border/50 pt-2 text-xs text-muted-foreground">
+	<div
+		class="flex flex-col gap-2 border-t border-border/50 pt-2 text-caption 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="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">
+	<div
+		class="flex items-center gap-2 border-t border-border/50 pt-2 text-caption text-muted-foreground"
+	>
 		<Loader2 class="size-icon-sm animate-spin" />

 		<span>Loading model...</span>
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 802dd7e8d..fbd645720 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
@@ -120,7 +120,7 @@
 			></div>
 		</div>

-		<div class="flex justify-between text-xs text-muted-foreground max-md:text-[13px]">
+		<div class="flex justify-between text-caption text-muted-foreground max-md:text-body-sm">
 			<span>
 				<span class={colorLevelTextClass(gauge.colorLevel)}>{gauge.contextPercent}%</span> used
 			</span>
@@ -130,7 +130,7 @@
 			</span>
 		</div>
 	{:else}
-		<div class="text-xs text-muted-foreground">No context info available</div>
+		<div class="text-caption text-muted-foreground">No context info available</div>
 	{/if}

 	{#if gauge.hasAnyUsage}
@@ -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 matte-float p-1.5 text-sm"
+		class="absolute z-50 w-64 -translate-x-1/2 rounded-xl border matte-float p-1.5 text-body-sm"
 		onpointerenter={gaugeCardEnter}
 		onpointerleave={gaugeCardLeave}
 		role="status"
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 db49bdcf3..2f9fe042e 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
@@ -339,7 +339,7 @@
 		/>

 		{#if !fileSearchEnabled}
-			<div class="px-2 py-1.5 text-sm text-muted-foreground">{searchUnavailableMessage}</div>
+			<div class="px-2 py-1.5 text-body-sm text-muted-foreground">{searchUnavailableMessage}</div>
 		{:else if query.trim() && (search.isSearching || queryResults.length > 0 || searchError)}
 			<ChatFormCurrentWorkingDirectoryResultsList
 				bind:container={listContainer}
@@ -358,8 +358,8 @@
 				class={[
 					'flex cursor-pointer items-center outline-hidden select-none hover:bg-accent hover:text-accent-foreground',
 					inDrawer
-						? 'mt-1 gap-2 rounded-lg px-2 py-2.5 text-[15px]'
-						: '-mt-1 gap-2 rounded-sm px-2 py-1.5 text-sm'
+						? 'mt-1 gap-2 rounded-lg px-2 py-2.5 text-body'
+						: '-mt-1 gap-2 rounded-sm px-2 py-1.5 text-body-sm'
 				]}
 				onclick={browseNative}
 				type="button"
@@ -375,8 +375,8 @@
 				class={[
 					'flex cursor-pointer items-center outline-hidden select-none hover:bg-accent hover:text-accent-foreground',
 					inDrawer
-						? 'gap-2 rounded-lg px-2 py-2.5 text-[15px]'
-						: 'gap-2 rounded-sm px-2 py-1.5 text-sm'
+						? 'gap-2 rounded-lg px-2 py-2.5 text-body'
+						: 'gap-2 rounded-sm px-2 py-1.5 text-body-sm'
 				]}
 				onclick={clearDirectory}
 				type="button"
@@ -393,7 +393,9 @@
 				class={['h-px', inDrawer ? 'my-1 bg-border/60' : '-mx-2 my-2 bg-border/20']}
 			></div>

-			<span class={['font-mono', inDrawer ? 'px-2 py-2 text-xs' : 'px-2 py-1.5 text-[10px]']}>
+			<span
+				class={['font-mono', inDrawer ? 'px-2 py-2 text-caption' : 'px-2 py-1.5 text-caption-sm']}
+			>
 				Searching in:

 				<span class="truncate text-muted-foreground/70" title={searchScope}
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 d25792a03..fd2e2fe60 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
@@ -30,7 +30,7 @@

 <span
 	class={[
-		'text-muted-foreground inline-flex items-center gap-1 text-xs group',
+		'text-muted-foreground inline-flex items-center gap-1 text-caption group',
 		directory && 'text-foreground'
 	]}
 >
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 ef69d0f5a..bc368ac74 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
@@ -38,18 +38,18 @@
 	class="max-h-48 overflow-y-auto py-2"
 >
 	{#if isSearching && results.length === 0}
-		<div class="px-2 py-1.5 text-sm text-muted-foreground">Searching...</div>
+		<div class="px-2 py-1.5 text-body-sm text-muted-foreground">Searching...</div>
 	{:else if error}
-		<div class="px-2 py-1.5 text-sm text-destructive">{error}</div>
+		<div class="px-2 py-1.5 text-body-sm text-destructive">{error}</div>
 	{:else if results.length === 0}
-		<div class="px-2 py-1.5 text-sm text-muted-foreground">No matching folders</div>
+		<div class="px-2 py-1.5 text-body-sm text-muted-foreground">No matching folders</div>
 	{:else}
 		{#each results as path, index (path)}
 			<button
 				type="button"
 				{...{ [UI_DATA_ATTRS.RESULT_INDEX]: index }}
 				class={cn(
-					'relative flex w-full cursor-pointer 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'
+					'relative flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-body-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground'
 				)}
 				data-highlighted={index === hoveredIndex ? '' : undefined}
 				onclick={() => onCommit?.(path)}
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 3ad71b092..5a47832c1 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
@@ -18,7 +18,7 @@
 </script>

 <div class="min-w-0 flex-1">
-	<div class="mb-0.5 flex items-center gap-1.5 text-xs text-muted-foreground">
+	<div class="mb-0.5 flex items-center gap-1.5 text-caption text-muted-foreground">
 		{#if faviconUrl}
 			<img
 				alt=""
@@ -44,7 +44,7 @@
 	</div>

 	{#if description}
-		<p class="mt-0.5 truncate text-sm text-muted-foreground">
+		<p class="mt-0.5 truncate text-body-sm text-muted-foreground">
 			{description}
 		</p>
 	{/if}
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 6a39949c7..abe0fec74 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
@@ -97,7 +97,7 @@
 			{/if}
 		{:else if items && items.length === 0}
 			{#if emptyMessage}
-				<div class="py-6 text-center text-sm text-muted-foreground">{emptyMessage}</div>
+				<div class="py-6 text-center text-body-sm text-muted-foreground">{emptyMessage}</div>
 			{/if}
 		{:else}
 			{#each items as itemData, index (itemKey(itemData, index))}
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 299ebf682..7b54d9de4 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
@@ -134,9 +134,9 @@
 				<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>
+					<span class="font-mono text-label">/{command.name}</span>

-					<span class="min-w-0 flex-1 truncate text-left text-xs text-muted-foreground">
+					<span class="min-w-0 flex-1 truncate text-left text-caption text-muted-foreground">
 						{command.description}
 					</span>
 				</div>
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 1c647e44f..c568d14d1 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
@@ -57,7 +57,7 @@

 	{#if promptError}
 		<div
-			class="flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/10 px-3 py-2 text-sm text-destructive"
+			class="flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/10 px-3 py-2 text-body-sm text-destructive"
 			role="alert"
 		>
 			<span class="shrink-0">âš </span>
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 244126da1..6030c4b16 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
@@ -46,7 +46,7 @@
 		</span>

 		{#if isLoadingSuggestions}
-			<span class="text-xs text-muted-foreground/50">...</span>
+			<span class="text-caption text-muted-foreground/50">...</span>
 		{/if}
 	</Label>

@@ -70,7 +70,7 @@
 		>
 			{#each suggestions as suggestion, i (suggestion)}
 				<button
-					class="w-full px-3 py-1.5 text-left text-sm hover:bg-accent {i === autocompleteIndex
+					class="w-full px-3 py-1.5 text-left text-body-sm hover:bg-accent {i === autocompleteIndex
 						? 'bg-accent'
 						: ''}"
 					onmousedown={() => onSelectSuggestion(suggestion)}
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 cb6e8264d..ed3c76452 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
@@ -258,7 +258,7 @@
 								<Tooltip.Root>
 									<Tooltip.Trigger>
 										{#snippet child({ props })}
-											<span {...props} class="truncate text-sm font-medium">{entry.name}</span>
+											<span {...props} class="truncate text-label">{entry.name}</span>
 										{/snippet}
 									</Tooltip.Trigger>

@@ -267,17 +267,17 @@
 									</Tooltip.Content>
 								</Tooltip.Root>
 							{:else}
-								<span class="truncate text-sm font-medium">{entry.name}</span>
+								<span class="truncate text-label">{entry.name}</span>
 							{/if}

 							<span
-								class="shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wide text-muted-foreground"
+								class="shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-caption-sm uppercase tracking-wide text-muted-foreground"
 							>
 								{entry.type}
 							</span>
 						</div>

-						<span class="min-w-0 flex-1 truncate font-mono text-left text-xs">
+						<span class="min-w-0 flex-1 truncate font-mono text-left text-caption">
 							<HighlightedMatch query={trimmedQuery} text={abbreviateHome(entry.path, home)} />
 						</span>
 					</div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte
index c37b0447f..72679c8f1 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte
@@ -199,7 +199,7 @@

 	{#if displayedModel}
 		<div class="info my-6 grid gap-4 tabular-nums">
-			<div class="inline-flex flex-wrap items-start gap-2 text-xs text-muted-foreground">
+			<div class="inline-flex flex-wrap items-start gap-2 text-caption text-muted-foreground">
 				<ChatMessageAssistantModel
 					{displayedModel}
 					isLoading={chatStore.isLoading}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantProcessingInfo.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantProcessingInfo.svelte
index 706d666c6..3d824b0b3 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantProcessingInfo.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantProcessingInfo.svelte
@@ -15,7 +15,7 @@

 <div in:fade class="{marginClass} w-full max-w-3xl">
 	<div class="flex flex-col items-start gap-2">
-		<span class="shimmer-text text-sm">
+		<span class="shimmer-text text-body-sm">
 			{modelLoadingText ??
 				processingState.getPromptProgressText() ??
 				processingState.getProcessingMessage() ??
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantRawOutput.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantRawOutput.svelte
index e5119ae35..f0afdc4b0 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantRawOutput.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistantRawOutput.svelte
@@ -24,8 +24,8 @@
 		margin-top: 1.5rem;
 		padding: 1rem 1.25rem;
 		border-radius: 1rem;
-		background: hsl(var(--muted) / 0.3);
-		color: var(--foreground);
+		background: hsl(var(--surface-muted) / 0.3);
+		color: var(--fg-default);
 		font-size: 0.875rem;
 		line-height: 1.6;
 		white-space: pre-wrap;
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 959016a26..b70fe2244 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
@@ -20,13 +20,13 @@
 		{#if info.path === null}
 			<FolderX class="text-muted-foreground/60 size-icon-sm shrink-0" />

-			<span class="text-foreground/80 text-sm font-medium">Working directory cleared</span>
+			<span class="text-foreground/80 text-label">Working directory cleared</span>
 		{:else}
 			<Folder class="text-muted-foreground/60 h-3.5 w-3.5 shrink-0" />

-			<span class="text-foreground/80 text-sm font-medium">Set working directory to&nbsp;</span>
+			<span class="text-foreground/80 text-label">Set working directory to&nbsp;</span>

-			<span class="font-mono text-foreground/90 text-sm break-all" title={info.path}>
+			<span class="font-mono text-foreground/90 text-body-sm break-all" title={info.path}>
 				{info.display}
 			</span>
 		{/if}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPrompt.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPrompt.svelte
index 32f5cceab..2caaf6e43 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPrompt.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageMcpPrompt/ChatMessageMcpPrompt.svelte
@@ -29,13 +29,13 @@
 		<ChatMessageEditForm />
 	{:else}
 		<ChatMessageMcpPromptContent
-			class="w-full max-w-[80%]"
+			class="w-full max-w-4/5"
 			prompt={mcpPrompt}
 			variant={McpPromptVariant.MESSAGE}
 		/>

 		{#if message.timestamp}
-			<div class="max-w-[80%]">
+			<div class="max-w-4/5">
 				<ChatMessageActionIcons actionsPosition="right" justify="end" />
 			</div>
 		{/if}
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 27af803f0..d1303379a 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
@@ -82,7 +82,7 @@

 	let showArgBadges = $derived(hasArguments && !isLoading && !loadError);
 	let isAttachment = $derived(variant === McpPromptVariant.ATTACHMENT);
-	let textSizeClass = $derived(isAttachment ? 'text-xs' : 'text-md');
+	let textSizeClass = $derived(isAttachment ? 'text-caption' : 'text-md');
 	let paddingClass = $derived(isAttachment ? 'px-3 py-2' : 'px-3.75 py-2.5');
 	let maxHeightStyle = $derived(
 		isAttachment ? 'max-height: 6rem;' : 'max-height: var(--max-message-height);'
@@ -94,7 +94,7 @@

 <div class="flex flex-col gap-2 {className}">
 	<div class="flex items-center justify-between gap-2">
-		<div class="inline-flex flex-wrap items-center gap-1.25 text-xs text-muted-foreground">
+		<div class="inline-flex flex-wrap items-center gap-1.25 text-caption text-muted-foreground">
 			<Tooltip.Root>
 				<Tooltip.Trigger>
 					{#if serverFavicon}
@@ -124,7 +124,7 @@
 						<Tooltip.Trigger>
 							<!-- svelte-ignore a11y_no_static_element_interactions -->
 							<span
-								class="rounded-sm bg-purple-200/60 px-1.5 py-0.5 text-[10px] leading-none text-purple-700 transition-opacity dark:bg-purple-800/40 dark:text-purple-300 {hoveredArgKey &&
+								class="rounded-sm bg-purple-200/60 px-1.5 py-0.5 text-caption-sm leading-none text-purple-700 transition-opacity dark:bg-purple-800/40 dark:text-purple-300 {hoveredArgKey &&
 								hoveredArgKey !== key
 									? 'opacity-30'
 									: ''}"
@@ -146,7 +146,7 @@

 	{#if loadError}
 		<Card
-			class="relative overflow-hidden rounded-[1.125rem] border border-destructive/50 bg-destructive/10 backdrop-blur-md"
+			class="relative overflow-hidden rounded-2xl border border-destructive/50 bg-destructive/10 backdrop-blur-md"
 		>
 			<div
 				class="overflow-y-auto {paddingClass}"
@@ -157,7 +157,7 @@
 		</Card>
 	{:else if isLoading}
 		<Card
-			class="relative overflow-hidden rounded-[1.125rem] border border-purple-200 bg-purple-500/10 px-1 py-2 backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20"
+			class="relative overflow-hidden rounded-2xl border border-purple-200 bg-purple-500/10 px-1 py-2 backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20"
 		>
 			<div
 				class="overflow-y-auto {paddingClass}"
@@ -174,7 +174,7 @@
 		</Card>
 	{:else if hasContent}
 		<Card
-			class="relative overflow-hidden rounded-[1.125rem] border border-purple-200 bg-purple-500/10 py-0 text-foreground backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20"
+			class="relative overflow-hidden rounded-2xl border border-purple-200 bg-purple-500/10 py-0 text-foreground backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20"
 		>
 			<div
 				class="overflow-y-auto {paddingClass}"
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSynthetic.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSynthetic.svelte
index 6285eea3c..4579a615b 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSynthetic.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSynthetic.svelte
@@ -19,5 +19,5 @@
 {#if isCwdChange}
 	<ChatMessageCwdChange class={className} {message} />
 {:else}
-	<span class="text-muted-foreground block text-sm {className}">{message.content}</span>
+	<span class="text-muted-foreground block text-body-sm {className}">{message.content}</span>
 {/if}
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 df2097b5a..2770f96d8 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
@@ -81,10 +81,10 @@
 	role="group"
 >
 	{#if editCtx.isEditing}
-		<div class="w-full max-w-[80%]">
+		<div class="w-full max-w-4/5">
 			<textarea
 				bind:this={textareaElement}
-				class="min-h-[60px] w-full resize-none rounded-2xl px-3 py-2 text-base md:text-sm {INPUT_CLASSES}"
+				class="min-h-15 w-full resize-none rounded-2xl px-3 py-2 text-body md:text-body-sm {INPUT_CLASSES}"
 				oninput={(e) => {
 					autoResizeTextarea(e.currentTarget);
 					editCtx.setContent(e.currentTarget.value);
@@ -116,7 +116,7 @@
 		</div>
 	{:else}
 		{#if message.content.trim()}
-			<div class="relative max-w-[80%]">
+			<div class="relative max-w-4/5">
 				<button
 					class="group/expand block w-full text-left {!isExpanded && showExpandButton
 						? 'cursor-pointer'
@@ -125,9 +125,9 @@
 					type="button"
 				>
 					<Card
-						class="overflow-y-auto rounded-[1.125rem] !border-2 !border-dashed !border-border/50 bg-muted px-3.75 py-1.5 data-[multiline]:py-2.5"
+						class="overflow-y-auto rounded-2xl !border-2 !border-dashed !border-border/50 bg-muted px-3.75 py-1.5 data-[multiline]:py-2.5"
 						data-multiline={isMultiline ? '' : undefined}
-						style="border: 2px dashed hsl(var(--border)); max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;"
+						style="border: 2px dashed hsl(var(--line-default)); max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;"
 					>
 						<div
 							class="relative transition-all duration-300 {isExpanded
@@ -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-(--elevation-surface)"
+										class="rounded-full px-4 py-1.5 text-caption shadow-(--elevation-surface)"
 										size="sm"
 										variant="outline"
 									>
@@ -172,7 +172,7 @@
 						{#if isExpanded && showExpandButton}
 							<div class="mb-2 flex justify-center">
 								<Button
-									class="rounded-full px-4 py-1.5 text-xs"
+									class="rounded-full px-4 py-1.5 text-caption"
 									onclick={(e) => {
 										e.stopPropagation();
 										toggleExpand();
@@ -190,7 +190,7 @@
 		{/if}

 		{#if message.timestamp}
-			<div class="max-w-[80%]">
+			<div class="max-w-4/5">
 				<ChatMessageActionIcons actionsPosition="right" justify="end" />
 			</div>
 		{/if}
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 c86e8fdca..f959d0028 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
@@ -37,7 +37,7 @@
 <ToolCallBlock {isStreaming} meta={null} {onToggle} {open} {section} {title}>
 	{#snippet children(_meta, ctx)}
 		{#if ctx.isStreamingCall}
-			<div class="mb-2 flex items-center gap-2 text-xs text-muted-foreground/70">
+			<div class="mb-2 flex items-center gap-2 text-caption text-muted-foreground/70">
 				<span>Input</span>

 				{#if ctx.isStreaming}
@@ -53,12 +53,12 @@
 					streaming={ctx.isCodeStreaming}
 				/>
 			{:else if ctx.isStreaming}
-				<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+				<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 					Receiving arguments...
 				</div>
 			{:else}
 				<div
-					class="rounded bg-yellow-500/10 p-2 text-xs text-yellow-600 italic dark:text-yellow-400"
+					class="rounded bg-yellow-500/10 p-2 text-caption text-yellow-600 italic dark:text-yellow-400"
 				>
 					Response was truncated
 				</div>
@@ -66,7 +66,7 @@
 		{:else}
 			{@const showInput = Boolean(section.toolArgs)}
 			{#if showInput}
-				<div class="mb-1.5 flex items-center gap-2 text-xs text-muted-foreground/70">
+				<div class="mb-1.5 flex items-center gap-2 text-caption text-muted-foreground/70">
 					<span>Input</span>
 				</div>

@@ -80,8 +80,8 @@

 			<div
 				class={showInput
-					? 'mt-4 mb-1.5 flex items-center gap-2 text-xs text-muted-foreground/70'
-					: 'mb-1.5 flex items-center gap-2 text-xs text-muted-foreground/70'}
+					? 'mt-4 mb-1.5 flex items-center gap-2 text-caption text-muted-foreground/70'
+					: 'mb-1.5 flex items-center gap-2 text-caption text-muted-foreground/70'}
 			>
 				<span>Output</span>

@@ -91,7 +91,7 @@
 			</div>

 			{#if ctx.isPending}
-				<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+				<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 					Waiting for result...
 				</div>
 			{:else if section.toolResult}
@@ -106,7 +106,7 @@
 				{:else}
 					<div class="overflow-auto">
 						{#each parsedLines as line, i (i)}
-							<div class="font-mono text-[11px] leading-relaxed whitespace-pre-wrap">
+							<div class="font-mono text-caption leading-relaxed whitespace-pre-wrap">
 								{line.text}
 							</div>

@@ -135,7 +135,9 @@
 					</div>
 				{/if}
 			{:else}
-				<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">No output</div>
+				<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
+					No output
+				</div>
 			{/if}
 		{/if}
 	{/snippet}
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 4af58619e..5e45d7c2c 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
@@ -45,7 +45,7 @@
 				</span>

 				{#if editFileMeta?.errorMessage}
-					<span class="shrink-0 text-xs italic text-muted-foreground/70">(failed)</span>
+					<span class="shrink-0 text-caption italic text-muted-foreground/70">(failed)</span>
 				{/if}
 			</span>
 		</span>
@@ -54,7 +54,7 @@
 	{#snippet children(_meta, ctx)}
 		{#if editFileBody?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-caption text-fg-danger italic"
 			>
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

@@ -63,7 +63,7 @@
 		{:else if editFileBody?.edits.length}
 			{#each editDiffs as diffLines, ei (ei)}
 				<div class={ei === 0 ? '' : 'mt-3'}>
-					<div class="mb-1.5 text-xs text-muted-foreground/70 italic">
+					<div class="mb-1.5 text-caption text-muted-foreground/70 italic">
 						Edit {ei + 1}&nbsp;of&nbsp;{editFileBody.edits.length}
 					</div>

@@ -85,7 +85,7 @@
 				</div>
 			{/each}

-			<div class="mt-1.5 text-xs text-muted-foreground/70 italic">
+			<div class="mt-1.5 text-caption text-muted-foreground/70 italic">
 				{#if editFileBody.resultMessage}
 					{editFileBody.resultMessage}{editFileBody.editsApplied != null
 						? RESULT_STAT_SEPARATOR
@@ -105,11 +105,13 @@
 				streaming={ctx.isCodeStreaming}
 			/>
 		{:else if ctx.isStreaming}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Receiving arguments...
 			</div>
 		{:else}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">No edits</div>
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
+				No edits
+			</div>
 		{/if}
 	{/snippet}
 </ToolCallBlock>
@@ -119,13 +121,13 @@
 		overflow: auto;
 		border-radius: 0.75rem;
 		border-width: 1px;
-		border-color: color-mix(in oklch, var(--border) 30%, transparent);
-		background: var(--code-background);
+		border-color: color-mix(in oklch, var(--line-default) 30%, transparent);
+		background: var(--surface-code);
 		box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
 	}

 	:global(.dark) .diff-block {
-		border-color: color-mix(in oklch, var(--border) 20%, transparent);
+		border-color: color-mix(in oklch, var(--line-default) 20%, transparent);
 	}

 	/* Each row is a 4-column grid: old-line#, marker, new-line#, text.
@@ -144,13 +146,13 @@
 		text-align: right;
 		padding-right: 0.5rem;
 		user-select: none;
-		color: color-mix(in oklch, var(--muted-foreground) 70%, transparent);
+		color: color-mix(in oklch, var(--fg-muted) 70%, transparent);
 		font-variant-numeric: tabular-nums;
 	}

 	.diff-marker {
 		text-align: center;
-		color: color-mix(in oklch, var(--muted-foreground) 70%, transparent);
+		color: color-mix(in oklch, var(--fg-muted) 70%, transparent);
 		user-select: none;
 	}

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 d8d3ff2a2..06d417f7a 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
@@ -248,18 +248,18 @@

 	{#snippet children(_meta, ctx)}
 		{#if (ctx.isPending && !commandStreaming) || (isLive && !section.toolResult)}
-			<div class="flex items-start gap-2 text-xs text-muted-foreground/70">
+			<div class="flex items-start gap-2 text-caption text-muted-foreground/70">
 				<Loader2 class="size-icon-xs animate-spin" />
 				Executing command...
 			</div>
 		{:else if ctx.isInterrupted}
-			<div class="flex items-start gap-2 text-xs text-muted-foreground/70 italic">
+			<div class="flex items-start gap-2 text-caption text-muted-foreground/70 italic">
 				<CircleStop class="mt-0.5 h-3 w-3 shrink-0" />

 				<span>Command interrupted before it returned output</span>
 			</div>
 		{:else if execShellError}
-			<div class="flex items-start gap-2 text-xs text-fg-danger italic">
+			<div class="flex items-start gap-2 text-caption text-fg-danger italic">
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{execShellError}</span>
@@ -271,7 +271,7 @@
 				onscroll={handleScrollEvent}
 			>
 				{#each outputLines as line, i (i)}
-					<div class="font-mono text-[11px] leading-relaxed whitespace-pre-wrap">{line.text}</div>
+					<div class="font-mono text-caption leading-relaxed whitespace-pre-wrap">{line.text}</div>

 					{#if line.media?.type === AttachmentType.IMAGE}
 						<img
@@ -316,13 +316,13 @@

 	.exec-wd {
 		font-family: var(--font-mono);
-		color: var(--muted-foreground);
+		color: var(--fg-muted);
 		margin-right: var(--exec-wd-margin);
 	}

 	.exec-prompt {
 		font-family: var(--font-mono);
-		color: var(--muted-foreground);
+		color: var(--fg-muted);
 		opacity: 0.55;
 		margin-right: var(--exec-wd-margin);
 	}
@@ -333,7 +333,7 @@
 		height: 1.05em;
 		margin-left: 0.15rem;
 		vertical-align: text-bottom;
-		background: var(--foreground);
+		background: var(--fg-default);
 		animation: exec-cursor-blink 1.1s steps(1) infinite;
 	}

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 b8865da52..67c5e15c3 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
@@ -40,12 +40,12 @@

 	{#snippet children(meta, ctx)}
 		{#if ctx.isPending}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Searching...
 			</div>
 		{:else if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-caption text-fg-danger italic"
 			>
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

@@ -54,17 +54,17 @@
 		{:else if meta && meta.matches.length > 0}
 			<div class="max-h-96 overflow-auto">
 				{#each meta.matches as match, i (i)}
-					<div class="font-mono text-[11px] leading-relaxed whitespace-pre-wrap">{match}</div>
+					<div class="font-mono text-caption leading-relaxed whitespace-pre-wrap">{match}</div>
 				{/each}
 			</div>

-			<div class="mt-1.5 text-xs text-muted-foreground/70 italic">
+			<div class="mt-1.5 text-caption text-muted-foreground/70 italic">
 				Total matches: <span class="font-mono">{meta.totalMatches ?? meta.matches.length}</span>
 			</div>
 		{:else}
-			<div class="text-xs text-muted-foreground/70 italic">No matches</div>
+			<div class="text-caption text-muted-foreground/70 italic">No matches</div>

-			<div class="mt-1.5 text-xs text-muted-foreground/70 italic">
+			<div class="mt-1.5 text-caption text-muted-foreground/70 italic">
 				Total matches: <span class="font-mono">{meta?.totalMatches ?? 0}</span>
 			</div>
 		{/if}
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 37124dcf5..efcec2a3f 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
@@ -46,18 +46,18 @@
 	<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>
+		<span class="text-foreground/80 text-label">Current time</span>

 		<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-foreground/80 text-label">Current time&nbsp;</span>

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

-		<span class="font-mono text-foreground/90 text-sm">{dateMeta.dateString}</span>
+		<span class="font-mono text-foreground/90 text-body-sm">{dateMeta.dateString}</span>
 	{:else}
-		<span class="text-foreground/80 text-sm font-medium">Current time</span>
+		<span class="text-foreground/80 text-label">Current time</span>
 	{/if}
 </div>
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 545921065..3b68a2d85 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,14 +60,14 @@
 	{#snippet children(meta, _ctx)}
 		{#if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-caption text-fg-danger italic"
 			>
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

 				<span>{meta.errorMessage}</span>
 			</div>
 		{:else if infoMeta.os || infoMeta.cwd}
-			<table class="w-full table-fixed border-collapse text-sm">
+			<table class="w-full table-fixed border-collapse text-body-sm">
 				<colgroup>
 					<col class="w-12" />

@@ -78,7 +78,7 @@
 					{#if infoMeta.os}
 						<tr>
 							<th
-								class="py-1 pr-3 text-left align-baseline text-[11px] font-medium tracking-wide text-muted-foreground/60 uppercase"
+								class="py-1 pr-3 text-left align-baseline text-label-sm tracking-wide text-muted-foreground/60 uppercase"
 								scope="row"
 							>
 								os
@@ -95,7 +95,7 @@
 					{#if infoMeta.cwd}
 						<tr>
 							<th
-								class="py-1 pr-3 text-left align-baseline text-[11px] font-medium tracking-wide text-muted-foreground/60 uppercase"
+								class="py-1 pr-3 text-left align-baseline text-label-sm tracking-wide text-muted-foreground/60 uppercase"
 								scope="row"
 							>
 								cwd
@@ -114,11 +114,11 @@
 				</tbody>
 			</table>
 		{:else if section.toolResult}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				{section.toolResult}
 			</div>
 		{:else}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Waiting for runtime info...
 			</div>
 		{/if}
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 406275565..29e70f3f6 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
@@ -34,12 +34,12 @@

 	{#snippet children(meta, ctx)}
 		{#if ctx.isPending}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Searching...
 			</div>
 		{:else if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-caption text-fg-danger italic"
 			>
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

@@ -48,7 +48,7 @@
 		{:else if meta && meta.matches.length > 0}
 			<div class="max-h-96 overflow-auto">
 				{#each meta.matches as match, mi (mi)}
-					<div class="font-mono text-[11px] leading-relaxed">
+					<div class="font-mono text-caption leading-relaxed">
 						<span class="text-muted-foreground/70">{match.file}</span>

 						{#if meta.showLineNumbers && match.line != null}
@@ -62,7 +62,7 @@
 				{/each}
 			</div>

-			<div class="mt-1.5 text-xs text-muted-foreground/70 italic">
+			<div class="mt-1.5 text-caption text-muted-foreground/70 italic">
 				Total matches: <span class="font-mono">{meta.totalMatches ?? meta.matches.length}</span>

 				{#if meta.showLineNumbers}
@@ -70,9 +70,9 @@
 				{/if}
 			</div>
 		{:else}
-			<div class="text-xs text-muted-foreground/70 italic">No matches</div>
+			<div class="text-caption text-muted-foreground/70 italic">No matches</div>

-			<div class="mt-1.5 text-xs text-muted-foreground/70 italic">
+			<div class="mt-1.5 text-caption text-muted-foreground/70 italic">
 				Total matches: <span class="font-mono">{meta?.totalMatches ?? 0}</span>
 			</div>
 		{/if}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadFile.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadFile.svelte
index f2660c7bf..e8c424605 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadFile.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadFile.svelte
@@ -42,7 +42,7 @@
 				maxHeight={MAX_HEIGHT_CODE_BLOCK}
 			/>
 		{:else}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Waiting for file content...
 			</div>
 		{/if}
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 947266bc5..3961b86d0 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
@@ -58,7 +58,7 @@
 	{#snippet children(_meta, _ctx)}
 		{#if section.toolResult}
 			{#if !mediaAttachment}
-				<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+				<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 					Media attachment not found in message extras
 				</div>
 			{:else if mediaAttachment.type === AttachmentType.AUDIO}
@@ -83,7 +83,7 @@
 			{/if}

 			{#if readMediaMeta?.sizeBytes || readMediaMeta?.mimeType}
-				<div class="mt-2 flex gap-4 text-xs text-muted-foreground">
+				<div class="mt-2 flex gap-4 text-caption text-muted-foreground">
 					{#if readMediaMeta?.sizeBytes}
 						<span>Size: {readMediaMeta.sizeBytes} bytes</span>
 					{/if}
@@ -95,10 +95,10 @@
 			{/if}

 			{#if readMediaMeta?.path}
-				<div class="mt-1 font-mono text-xs text-muted-foreground/60">{readMediaMeta.path}</div>
+				<div class="mt-1 font-mono text-caption text-muted-foreground/60">{readMediaMeta.path}</div>
 			{/if}
 		{:else}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Waiting for media data...
 			</div>
 		{/if}
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 c790dd994..2fd1866f3 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
@@ -24,10 +24,12 @@
 <ToolCallBlock {isStreaming} meta={runJsMeta} {onToggle} {open} {section} {title}>
 	{#snippet children(meta, ctx)}
 		{#if ctx.isPending}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">Running...</div>
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
+				Running...
+			</div>
 		{:else if meta?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-caption text-fg-danger italic"
 			>
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

@@ -50,7 +52,7 @@
 				streaming={ctx.isCodeStreaming}
 			/>

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

 				<span>Console</span>
@@ -69,7 +71,9 @@
 					/>
 				</div>
 			{:else}
-				<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">No output</div>
+				<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
+					No output
+				</div>
 			{/if}
 		{/if}
 	{/snippet}
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 2ed631a4f..78fba40f9 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
@@ -89,7 +89,7 @@
 	{#if safeUrl}
 		<HoverCard.Root closeDelay={100} openDelay={150}>
 			<HoverCard.Trigger
-				class="hover:bg-muted/80 focus-visible:ring-ring inline-flex max-w-full items-center gap-1.5 rounded-full border bg-muted px-2.5 py-1 text-xs transition-colors outline-none focus-visible:ring-2"
+				class="hover:bg-muted/80 focus-visible:ring-ring inline-flex max-w-full items-center gap-1.5 rounded-full border bg-muted px-2.5 py-1 text-caption transition-colors outline-none focus-visible:ring-2"
 				href={safeUrl}
 				rel="noopener noreferrer"
 				target="_blank"
@@ -114,14 +114,14 @@
 				<HoverCard.Content align="start" class="w-80 max-w-[90vw]" side="top" sideOffset={6}>
 					<div class="flex flex-col gap-2 px-2 py-1.5">
 						<a
-							class="line-clamp-3 text-sm font-medium leading-snug hover:underline"
+							class="line-clamp-3 text-label leading-snug hover:underline"
 							href={safeUrl}
 							rel="noopener noreferrer"
 							target="_blank">{result.title}</a
 						>

 						{#if publishDate || result.author}
-							<div class="text-muted-foreground flex items-center gap-1.5 text-[11px]">
+							<div class="text-muted-foreground flex items-center gap-1.5 text-caption">
 								{#if publishDate}
 									<span>{publishDate}</span>
 								{/if}
@@ -138,14 +138,14 @@

 						{#if result.highlights}
 							<p
-								class="text-popover-foreground/85 line-clamp-5 text-xs leading-relaxed whitespace-pre-line"
+								class="text-popover-foreground/85 line-clamp-5 text-caption leading-relaxed whitespace-pre-line"
 							>
 								{result.highlights}
 							</p>
 						{/if}

 						{#if host}
-							<div class="text-muted-foreground/80 truncate text-[11px]">{host}</div>
+							<div class="text-muted-foreground/80 truncate text-caption">{host}</div>
 						{/if}
 					</div>
 				</HoverCard.Content>
@@ -162,12 +162,12 @@
 			{/each}
 		</div>
 	{:else if showSpinner}
-		<div class="text-muted-foreground/70 flex items-center gap-2 py-1 text-xs italic">
+		<div class="text-muted-foreground/70 flex items-center gap-2 py-1 text-caption italic">
 			<Loader2 class="size-icon-xs animate-spin" />

 			<span>Searching...</span>
 		</div>
 	{:else}
-		<div class="text-muted-foreground/70 py-1 text-xs italic">No results</div>
+		<div class="text-muted-foreground/70 py-1 text-caption italic">No results</div>
 	{/if}
 </CollapsibleContentBlock>
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 bc4908245..394287ec1 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
@@ -37,7 +37,7 @@
 				</span>

 				{#if writeFileMeta?.errorMessage}
-					<span class="shrink-0 text-xs italic text-muted-foreground/70">(failed)</span>
+					<span class="shrink-0 text-caption italic text-muted-foreground/70">(failed)</span>
 				{/if}
 			</span>
 		</span>
@@ -46,7 +46,7 @@
 	{#snippet children(_meta, ctx)}
 		{#if writeFileBody?.errorMessage}
 			<div
-				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-xs text-fg-danger italic"
+				class="flex items-start gap-2 rounded bg-surface-danger p-2 text-caption text-fg-danger italic"
 			>
 				<XCircle class="mt-0.5 size-icon-xs shrink-0" />

@@ -60,7 +60,7 @@
 				streaming={ctx.isCodeStreaming}
 			/>

-			<div class="mt-1.5 text-xs text-muted-foreground/70 italic">
+			<div class="mt-1.5 text-caption text-muted-foreground/70 italic">
 				{#if writeFileBody.resultMessage}
 					{writeFileBody.resultMessage}{writeFileBody.bytesWritten != null
 						? RESULT_STAT_SEPARATOR
@@ -80,11 +80,13 @@
 				streaming={ctx.isCodeStreaming}
 			/>
 		{:else if ctx.isStreaming}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
 				Receiving arguments...
 			</div>
 		{:else}
-			<div class="rounded bg-muted/20 p-2 text-xs text-muted-foreground/70 italic">No content</div>
+			<div class="rounded bg-muted/20 p-2 text-caption text-muted-foreground/70 italic">
+				No content
+			</div>
 		{/if}
 	{/snippet}
 </ToolCallBlock>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUser.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUser.svelte
index c4e52cf17..1101287c7 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUser.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUser.svelte
@@ -85,7 +85,7 @@
 			<!-- Reading stats sourced from the assistant message that followed this turn -->
 			<div class="info my-2 grid w-full justify-items-end gap-4 tabular-nums">
 				<div
-					class="inline-flex flex-wrap items-start justify-end gap-2 text-xs text-muted-foreground"
+					class="inline-flex flex-wrap items-start justify-end gap-2 text-caption text-muted-foreground"
 				>
 					<ChatMessageStatistics
 						mode={ChatMessageStatisticsMode.READING}
@@ -99,7 +99,7 @@
 			{#if liveStats}
 				<div class="info my-2 grid w-full justify-items-end gap-4 tabular-nums">
 					<div
-						class="inline-flex flex-wrap items-start justify-end gap-2 text-xs text-muted-foreground"
+						class="inline-flex flex-wrap items-start justify-end gap-2 text-caption text-muted-foreground"
 					>
 						<ChatMessageStatistics
 							isLive
@@ -113,7 +113,7 @@
 		{/if}

 		{#if message.timestamp}
-			<div class="max-w-[80%]">
+			<div class="max-w-4/5">
 				<ChatMessageActionIcons actionsPosition="right" justify="end" />
 			</div>
 		{/if}
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 0ceb3fc14..c4f823886 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
@@ -53,7 +53,7 @@
 </script>

 {#if attachments && attachments.length > 0}
-	<div class="mb-2 max-w-[80%]">
+	<div class="mb-2 max-w-4/5">
 		<ChatAttachmentsList
 			{attachments}
 			imageHeight="max-h-40"
@@ -65,7 +65,7 @@

 {#if content.trim()}
 	<Card
-		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}"
+		class="chat-message-user-bubble max-w-4/5 overflow-y-auto rounded-2xl 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/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte
index 30a697112..73ef9091e 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageUser/ChatMessageUserPending.svelte
@@ -48,7 +48,7 @@
 			textColorClass="text-muted-foreground"
 		/>

-		<div class="max-w-[80%]">
+		<div class="max-w-4/5">
 			<div class="relative flex h-6 items-center justify-between">
 				<div class="right-0 flex items-center gap-2 opacity-100 transition-opacity">
 					<div
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCard.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCard.svelte
index b2937b2cc..452effa1e 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCard.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageActions/ChatMessageActionCard/ChatMessageActionCard.svelte
@@ -12,7 +12,7 @@
 </script>

 <div class="my-2 rounded-lg border border-(--action-card-border) bg-card p-3">
-	<div class="mb-3 flex items-center gap-2 text-sm">
+	<div class="mb-3 flex items-center gap-2 text-body-sm">
 		<IconComponent class="{ICON_CLASS_DEFAULT} shrink-0 text-muted-foreground" />

 		<span>
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 214f9dea2..42561a63b 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
@@ -44,7 +44,7 @@
 				</DropdownMenu.Trigger>
 			</ButtonGroup.Root>

-			<DropdownMenu.Content align="start" class="min-w-[8rem]">
+			<DropdownMenu.Content align="start" class="min-w-32">
 				<DropdownMenu.Item onclick={() => onDecision(ToolPermissionDecision.ALWAYS)}>
 					Always allow <pre>{toolName}</pre>
 					tool
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 5139f2cbf..a300da736 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
@@ -103,7 +103,7 @@

 	{#if showRawOutputSwitch}
 		<div class="flex items-center gap-2">
-			<span class="text-xs text-muted-foreground">Show raw output</span>
+			<span class="text-caption text-muted-foreground">Show raw output</span>

 			<Switch
 				checked={rawOutputEnabled}
@@ -161,7 +161,7 @@
 				}}
 			/>

-			<Label class="cursor-pointer text-sm font-normal" for="fork-attachments">
+			<Label class="cursor-pointer text-body-sm font-normal" for="fork-attachments">
 				Include all attachments
 			</Label>
 		</div>
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 b5f7c67d7..eb8b12448 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
@@ -26,7 +26,7 @@
 {#if siblingInfo && siblingInfo.totalSiblings > 1}
 	<div
 		aria-label="Message version {siblingInfo.currentIndex + 1} of {siblingInfo.totalSiblings}"
-		class="flex items-center gap-1 text-xs text-muted-foreground {className}"
+		class="flex items-center gap-1 text-caption text-muted-foreground {className}"
 		role="navigation"
 	>
 		<ActionIcon
@@ -37,7 +37,7 @@
 			tooltip="Previous version"
 		/>

-		<span class="px-1 font-mono text-xs">
+		<span class="px-1 font-mono text-caption">
 			{siblingInfo.currentIndex + 1}/{siblingInfo.totalSiblings}
 		</span>

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageAgenticContent.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageAgenticContent.svelte
index ba2ab8cb1..fa97fcde3 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageAgenticContent.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessageAgenticContent.svelte
@@ -268,6 +268,6 @@
 	}

 	.turn-stats {
-		border-top: 1px solid hsl(var(--muted) / 0.5);
+		border-top: 1px solid hsl(var(--surface-muted) / 0.5);
 	}
 </style>
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 e4b7a276f..48e109bce 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
@@ -100,7 +100,7 @@

 <svelte:window onkeydown={handleGlobalKeydown} />

-<div class="relative w-full max-w-[80%]">
+<div class="relative w-full max-w-4/5">
 	<ChatForm
 		bind:uploadedFiles={editCtx.editedUploadedFiles}
 		attachments={editCtx.editedExtras}
@@ -116,12 +116,12 @@
 	/>
 </div>

-<div class="mt-2 flex w-full max-w-[80%] items-center justify-between">
+<div class="mt-2 flex w-full max-w-4/5 items-center justify-between">
 	{#if isUserMessage && editCtx.showSaveOnlyOption}
 		<div class="flex items-center gap-2">
 			<Switch bind:checked={saveWithoutRegenerate} class="scale-75" id="save-only-switch" />

-			<label class="cursor-pointer text-xs text-muted-foreground" for="save-only-switch">
+			<label class="cursor-pointer text-caption text-muted-foreground" for="save-only-switch">
 				Update without re-sending
 			</label>
 		</div>
@@ -129,7 +129,7 @@
 		<div class="flex items-center gap-2">
 			<Switch bind:checked={branchAfterEdit} class="scale-75" id="branch-after-edit" />

-			<label class="cursor-pointer text-xs text-muted-foreground" for="branch-after-edit">
+			<label class="cursor-pointer text-caption text-muted-foreground" for="branch-after-edit">
 				Branch conversation after edit
 			</label>
 		</div>
@@ -137,7 +137,7 @@
 		<div></div>
 	{/if}

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

 		Cancel
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 0e232bd66..f084d6cd6 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
@@ -142,7 +142,7 @@
 			<MarkdownContent {attachments} class="text-muted-foreground" content={section.content} />
 		{:else}
 			<div
-				class="text-[13px] leading-relaxed wrap-break-word whitespace-pre-wrap text-muted-foreground"
+				class="text-body-sm leading-relaxed wrap-break-word whitespace-pre-wrap text-muted-foreground"
 			>
 				{section.content}
 			</div>
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 6b4498e43..49f6a3b29 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
@@ -147,10 +147,10 @@
 					{...props}
 					class="inline-flex size-5 items-center justify-center rounded-sm transition-colors {activeView ===
 					opts.view
-						? 'bg-(--tabs-background-active) text-(--tabs-text-active) shadow-(--tabs-shadow-active)'
+						? 'bg-(--surface-lifted) text-(--fg-default) shadow-(--elevation-control)'
 						: opts.disabled
 							? 'cursor-not-allowed opacity-40'
-							: 'hover:text-(--tabs-text-active)'}"
+							: 'hover:text-(--fg-default)'}"
 					disabled={opts.disabled}
 					onclick={() => !opts.disabled && (activeView = opts.view)}
 					type="button"
@@ -168,10 +168,10 @@
 	</Tooltip.Root>
 {/snippet}

-<div class="inline-flex items-center text-xs text-muted-foreground">
+<div class="inline-flex items-center text-caption text-muted-foreground">
 	{#if isSwitchable}
 		<div
-			class="inline-flex items-center gap-0.5 rounded-md bg-(--tabs-track) p-0.5 shadow-(--tabs-track-shadow)"
+			class="inline-flex items-center gap-0.5 rounded-md bg-(--surface-muted) p-0.5 shadow-(--elevation-inset)"
 		>
 			{#if hasPromptStats || isLive}
 				{@render viewButton({
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte
index eb8067c4b..2fd19d8f8 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte
@@ -261,7 +261,7 @@

 			{#if pendingContent}
 				<ChatMessageUserPending
-					class="mx-auto mt-12 w-full max-w-[48rem]"
+					class="mx-auto mt-12 w-full max-w-3xl"
 					content={pendingContent}
 					extras={agenticStore.getPendingSteeringMessageExtras(convId)}
 					onDelete={() => agenticStore.clearSteeringMessage(convId)}
@@ -276,7 +276,7 @@

 			{#if pendingContent}
 				<ChatMessageUserPending
-					class="mx-auto mt-12 w-full max-w-[48rem]"
+					class="mx-auto mt-12 w-full max-w-3xl"
 					content={pendingContent}
 					extras={chatStore.getPendingMessageExtras(convId)}
 					onDelete={() => chatStore.clearPendingMessage(convId)}
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 c3ae91a2f..4e8a944a6 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
@@ -10,8 +10,8 @@
 	>
 		<Upload class="mb-4 size-12 text-muted-foreground" />

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

-		<p class="text-sm text-muted-foreground">Drop your files here to upload</p>
+		<p class="text-body-sm text-muted-foreground">Drop your files here to upload</p>
 	</div>
 </div>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenGreeting.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenGreeting.svelte
index 22bde59ce..38f1a54c6 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenGreeting.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenGreeting.svelte
@@ -32,7 +32,7 @@
 	});

 	let enterClass = $derived([
-		'transition-opacity duration-300 ease-[cubic-bezier(0.23,1,0.32,1)]',
+		'transition-opacity duration-300 ease-out-quint',
 		!hasEntered && !instant && 'opacity-0'
 	]);
 </script>
@@ -60,9 +60,9 @@
 	]}
 >
 	<div style:transition-delay="{CHAT_GREETING_ENTER_DELAY_MS}ms" class={enterClass}>
-		<h1 class="mb-2 text-2xl font-semibold tracking-tight md:text-3xl">Hello there</h1>
+		<h1 class="mb-2 text-heading tracking-tight md:text-display">Hello there</h1>

-		<p class="text-muted-foreground md:text-lg">
+		<p class="text-muted-foreground md:text-title md:font-normal">
 			{serverStore.props?.modalities?.audio ? 'Record audio, type a message ' : 'Type a message'} or upload
 			files to get started
 		</p>
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenMobileHeader.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenMobileHeader.svelte
index 525967dce..b3c2b8341 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenMobileHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenMobileHeader.svelte
@@ -30,11 +30,11 @@
 <div
 	class="sidebar-reveal-pin-top pointer-events-none fixed top-(--corner-control-top) right-16 left-16 z-20 flex h-10 flex-col items-center justify-center text-center"
 >
-	<p class="w-full truncate text-[15px] leading-5 font-semibold">{title}</p>
+	<p class="w-full truncate text-body leading-5 font-semibold">{title}</p>

 	{#if showWorkingDirectory}
 		<button
-			class="pointer-events-auto max-w-full truncate text-[13px] leading-4 text-muted-foreground"
+			class="pointer-events-auto max-w-full truncate text-body-sm leading-4 text-muted-foreground"
 			onclick={onWorkingDirectoryClick}
 			title={directory ?? undefined}
 			type="button"
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 497c1efc2..cf92f6e6f 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
@@ -9,7 +9,7 @@
 </script>

 {#if hasError || isLoadingModel}
-	<div class="pointer-events-auto mx-auto mb-4 max-w-[48rem] px-1">
+	<div class="pointer-events-auto mx-auto mb-4 max-w-3xl px-1">
 		<Alert.Root variant={isLoadingModel ? 'default' : 'destructive'}>
 			{#if isLoadingModel}
 				<Loader2 class="{ICON_CLASS_DEFAULT} animate-spin" />
@@ -22,7 +22,7 @@

 				{#if !isLoadingModel}
 					<button
-						class="flex items-center gap-1.5 rounded-lg bg-destructive/20 px-2 py-1 text-xs font-medium hover:bg-destructive/30 disabled:opacity-50"
+						class="flex items-center gap-1.5 rounded-lg bg-destructive/20 px-2 py-1 text-label-sm hover:bg-destructive/30 disabled:opacity-50"
 						disabled={serverStore.loading}
 						onclick={() => serverStore.fetch()}
 					>
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 efa20c5e9..e5887f626 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
@@ -9,7 +9,7 @@
 {#if state === StreamConnectionState.RESUMING}
 	<div
 		aria-live="polite"
-		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"
+		class="pointer-events-auto mx-auto mt-2 mb-2 flex max-w-3xl items-center gap-2 rounded-md border border-blue-400/40 bg-blue-50/60 px-3 py-1.5 text-body-sm text-blue-700 dark:bg-blue-950/40 dark:text-blue-200"
 		role="status"
 	>
 		<Loader2 class="size-icon-sm animate-spin" />
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabs.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabs.svelte
index c4a68a2db..60f185e1b 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabs.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatTabs/ChatTabs.svelte
@@ -164,13 +164,13 @@
 		</ScrollCarousel>

 		<div
-			class="pointer-events-none absolute inset-y-0 left-0 z-[5] w-8 bg-gradient-to-r from-background to-transparent transition-opacity {carousel.canScrollLeft
+			class="pointer-events-none absolute inset-y-0 left-0 z-5 w-8 bg-gradient-to-r from-background to-transparent transition-opacity {carousel.canScrollLeft
 				? 'opacity-100'
 				: 'opacity-0'}"
 		></div>

 		<div
-			class="pointer-events-none absolute inset-y-0 right-0 z-[5] w-8 bg-gradient-to-l from-background to-transparent transition-opacity {carousel.canScrollRight
+			class="pointer-events-none absolute inset-y-0 right-0 z-5 w-8 bg-gradient-to-l from-background to-transparent transition-opacity {carousel.canScrollRight
 				? 'opacity-100'
 				: 'opacity-0'}"
 		></div>
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 3ada95f93..89a0b3621 100644
--- a/ui/apps/chat/src/lib/components/app/content/CollapsibleContentBlock.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/CollapsibleContentBlock.svelte
@@ -77,7 +77,7 @@
 	<div class="flex min-w-0 items-center gap-1.5">
 		{@render toggleIcon('')}

-		{@render toggleTitle('text-xs whitespace-nowrap')}
+		{@render toggleTitle('text-caption whitespace-nowrap')}

 		{#if collapsible}
 			<ChevronDown
@@ -108,7 +108,7 @@
 	</span>

 	{#if subtitle}
-		<span class="text-xs italic text-muted-foreground/70">{subtitle}</span>
+		<span class="text-caption italic text-muted-foreground/70">{subtitle}</span>
 	{/if}
 {/snippet}

@@ -142,7 +142,7 @@
 			<div class="flex min-w-0 items-start gap-2 text-muted-foreground">
 				{@render toggleIcon('mt-0.75')}

-				{@render toggleTitle('overflow-x-auto text-sm')}
+				{@render toggleTitle('overflow-x-auto text-body-sm')}
 			</div>

 			<ChevronDown
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 4ffb20526..798a0ed20 100644
--- a/ui/apps/chat/src/lib/components/app/content/CollapsibleTerminalBlock.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/CollapsibleTerminalBlock.svelte
@@ -46,7 +46,7 @@
 		onToggle?.();
 	}}
 	{open}
-	style="background: var(--code-background); border: 1px solid color-mix(in oklch, var(--border) 30%, transparent);"
+	style="background: var(--surface-code); border: 1px solid color-mix(in oklch, var(--line-default) 30%, transparent);"
 >
 	<Collapsible.Trigger
 		class={cn(
@@ -68,7 +68,7 @@

 			<span
 				class={cn(
-					'min-w-0 overflow-x-auto text-sm font-medium',
+					'min-w-0 overflow-x-auto text-body-sm font-medium',
 					shimmerTitle ? 'shimmer-text' : 'text-foreground/80'
 				)}
 			>
@@ -80,7 +80,7 @@
 			</span>

 			{#if subtitle}
-				<span class="text-xs italic text-muted-foreground/70">{subtitle}</span>
+				<span class="text-caption italic text-muted-foreground/70">{subtitle}</span>
 			{/if}
 		</div>

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 49e04bf0c..5e894d0ae 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
@@ -94,8 +94,8 @@

 /* Inline code */
 .markdown-content :global(code:not(pre code)) {
-	background: var(--muted);
-	color: var(--muted-foreground);
+	background: var(--surface-muted);
+	color: var(--fg-muted);
 	padding: 0.125rem 0.375rem;
 	border-radius: 0.375rem;
 	font-size: 0.875rem;
@@ -105,7 +105,7 @@
 	display: inline;
 	margin: 0 !important;
 	overflow: hidden !important;
-	background: var(--muted);
+	background: var(--surface-muted);
 	overflow-x: auto;
 	border-radius: 1rem;
 	border: none;
@@ -119,12 +119,12 @@

 .markdown-content :global(code) {
 	background: transparent;
-	color: var(--code-foreground);
+	color: var(--fg-code);
 }

 /* Links */
 .markdown-content :global(a) {
-	color: var(--primary);
+	color: var(--action-primary);
 	text-decoration: underline;
 	text-underline-offset: 2px;
 	transition: color 0.2s ease;
@@ -134,7 +134,7 @@

 @media (hover: hover) and (pointer: fine) {
 	.markdown-content :global(a:hover) {
-		color: var(--primary);
+		color: var(--action-primary);
 	}
 }

@@ -157,7 +157,7 @@
 }

 .markdown-content :global(li::marker) {
-	color: var(--muted-foreground);
+	color: var(--fg-muted);
 }

 /* Nested lists */
@@ -187,12 +187,12 @@

 /* Blockquotes */
 .markdown-content :global(blockquote) {
-	border-left: 4px solid var(--border);
+	border-left: 4px solid var(--line-default);
 	padding: 0.5rem 1rem;
 	margin: 1.5rem 0;
 	font-style: italic;
-	color: var(--muted-foreground);
-	background: var(--muted);
+	color: var(--fg-muted);
+	background: var(--surface-muted);
 	border-radius: 0 0.375rem 0.375rem 0;
 }

@@ -201,26 +201,26 @@
 	width: 100%;
 	margin: 1.5rem 0;
 	border-collapse: collapse;
-	border: 1px solid var(--border);
+	border: 1px solid var(--line-default);
 	border-radius: 0.375rem;
 	overflow: hidden;
 }

 .markdown-content :global(th) {
-	background: hsl(var(--muted) / 0.3);
-	border: 1px solid var(--border);
+	background: hsl(var(--surface-muted) / 0.3);
+	border: 1px solid var(--line-default);
 	padding: 0.5rem 0.75rem;
 	text-align: left;
 	font-weight: 600;
 }

 .markdown-content :global(td) {
-	border: 1px solid var(--border);
+	border: 1px solid var(--line-default);
 	padding: 0.5rem 0.75rem;
 }

 .markdown-content :global(tr:nth-child(even)) {
-	background: hsl(var(--muted) / 0.1);
+	background: hsl(var(--surface-muted) / 0.1);
 }

 /* User message markdown should keep table borders visible on light primary backgrounds */
@@ -234,7 +234,7 @@ div.markdown-user-content :global(.table-wrapper) {
 /* Horizontal rules */
 .markdown-content :global(hr) {
 	border: none;
-	border-top: 1px solid var(--border);
+	border-top: 1px solid var(--line-default);
 	margin: 1.5rem 0;
 }

@@ -254,8 +254,8 @@ div.markdown-user-content :global(.table-wrapper) {
 .markdown-content :global(.code-block-wrapper) {
 	border-radius: 0.75rem;
 	overflow: hidden;
-	border: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
-	background: var(--code-background);
+	border: 1px solid color-mix(in oklch, var(--line-default) 30%, transparent);
+	background: var(--surface-code);
 	box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
 	min-height: var(--min-message-height);
 	max-height: var(--max-message-height);
@@ -270,7 +270,7 @@ div.markdown-user-content :global(.table-wrapper) {
 }

 .markdown-content:global(.dark) :global(.code-block-wrapper) {
-	border-color: color-mix(in oklch, var(--border) 20%, transparent);
+	border-color: color-mix(in oklch, var(--line-default) 20%, transparent);
 }

 /* Scroll container for code blocks (both streaming and completed) */
@@ -329,7 +329,7 @@ div.markdown-user-content :global(.table-wrapper) {
 	justify-content: center;
 	padding: 0;
 	background: transparent;
-	color: var(--code-foreground);
+	color: var(--fg-code);
 	cursor: pointer;
 	transition: all 0.2s ease;
 }
@@ -350,7 +350,7 @@ div.markdown-user-content :global(.table-wrapper) {

 /* Pressed state marks the source view as active */
 .markdown-content :global(.toggle-source-btn[aria-pressed='true']) {
-	color: var(--primary);
+	color: var(--action-primary);
 }

 .markdown-content :global(.code-block-wrapper pre) {
@@ -363,7 +363,7 @@ div.markdown-user-content :global(.table-wrapper) {

 /* Mentions and hashtags */
 .markdown-content :global(.mention) {
-	color: hsl(var(--primary));
+	color: hsl(var(--action-primary));
 	font-weight: 500;
 	text-decoration: none;
 }
@@ -375,7 +375,7 @@ div.markdown-user-content :global(.table-wrapper) {
 }

 .markdown-content :global(.hashtag) {
-	color: hsl(var(--primary));
+	color: hsl(var(--action-primary));
 	font-weight: 500;
 	text-decoration: none;
 }
@@ -400,7 +400,7 @@ div.markdown-user-content :global(.table-wrapper) {

 	.markdown-content :global(th:hover),
 	.markdown-content :global(td:hover) {
-		background: var(--muted);
+		background: var(--surface-muted);
 	}
 }

@@ -428,7 +428,7 @@ div.markdown-user-content :global(.table-wrapper) {
 @media (hover: hover) and (pointer: fine) {
 	.markdown-content :global(blockquote:hover) {
 		border-left-width: 6px;
-		background: var(--muted);
+		background: var(--surface-muted);
 		transform: translateX(2px);
 	}
 }
@@ -439,7 +439,7 @@ div.markdown-user-content :global(.table-wrapper) {
 	top: -0.5rem;
 	left: 0.5rem;
 	font-size: 3rem;
-	color: var(--muted-foreground);
+	color: var(--fg-muted);
 	font-family: serif;
 	line-height: 1;
 }
@@ -487,7 +487,7 @@ div.markdown-user-content :global(.table-wrapper) {
 .markdown-content :global(hr) {
 	border: none;
 	height: 2px;
-	background: linear-gradient(to right, transparent, var(--border), transparent);
+	background: linear-gradient(to right, transparent, var(--line-default), transparent);
 	margin: 2rem 0;
 	position: relative;
 }
@@ -500,7 +500,7 @@ div.markdown-user-content :global(.table-wrapper) {
 	transform: translate(-50%, -50%);
 	width: 1rem;
 	height: 1rem;
-	background: var(--border);
+	background: var(--line-default);
 	border-radius: 50%;
 }

@@ -509,7 +509,7 @@ div.markdown-user-content :global(.table-wrapper) {
 	overflow-x: auto;
 	margin: 1.5rem 0;
 	border-radius: 0.5rem;
-	border: 1px solid var(--border);
+	border: 1px solid var(--line-default);
 	/* a wide table scrolls here, it does not widen the column */
 	max-width: 100%;
 }
@@ -551,7 +551,7 @@ div.markdown-user-content :global(.table-wrapper) {
 /* Dark mode adjustments */
 @media (prefers-color-scheme: dark) and (hover: hover) and (pointer: fine) {
 	.markdown-content :global(blockquote:hover) {
-		background: var(--muted);
+		background: var(--surface-muted);
 	}
 }

@@ -563,8 +563,8 @@ div.markdown-user-content :global(.table-wrapper) {
 	margin: 1.5rem 0;
 	padding: 1.5rem;
 	border-radius: 0.5rem;
-	background: var(--muted);
-	border: 1px dashed var(--border);
+	background: var(--surface-muted);
+	border: 1px dashed var(--line-default);
 }

 .markdown-content :global(.image-error-content) {
@@ -572,7 +572,7 @@ div.markdown-user-content :global(.table-wrapper) {
 	flex-direction: column;
 	align-items: center;
 	gap: 0.75rem;
-	color: var(--muted-foreground);
+	color: var(--fg-muted);
 	text-align: center;
 }

@@ -591,9 +591,9 @@ div.markdown-user-content :global(.table-wrapper) {
 	padding: 0.5rem 1rem;
 	font-size: 0.875rem;
 	font-weight: 500;
-	color: var(--primary);
-	background: var(--background);
-	border: 1px solid var(--border);
+	color: var(--action-primary);
+	background: var(--surface-page);
+	border: 1px solid var(--line-default);
 	border-radius: 0.375rem;
 	text-decoration: none;
 	transition: all 0.2s ease;
@@ -601,8 +601,8 @@ div.markdown-user-content :global(.table-wrapper) {

 @media (hover: hover) and (pointer: fine) {
 	.markdown-content :global(.image-error-link:hover) {
-		background: var(--muted);
-		border-color: var(--primary);
+		background: var(--surface-muted);
+		border-color: var(--action-primary);
 	}
 }

@@ -634,7 +634,7 @@ div.markdown-user-content :global(.table-wrapper) {
 .markdown-content :global(.mermaid-error) {
 	max-width: 100%;
 	padding: 1rem;
-	color: var(--destructive);
+	color: var(--fg-danger);
 	font-family: var(--font-mono);
 	font-size: 0.8125rem;
 	/* the caret line under the source must line up character by character */
@@ -671,8 +671,8 @@ div.markdown-user-content :global(.table-wrapper) {
 	margin: 1.5rem 0;
 	border-radius: 0.75rem;
 	overflow: hidden;
-	border: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
-	background: var(--code-background);
+	border: 1px solid color-mix(in oklch, var(--line-default) 30%, transparent);
+	background: var(--surface-code);
 	box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
 	position: relative;
 	min-height: var(--min-message-height);
@@ -681,7 +681,7 @@ div.markdown-user-content :global(.table-wrapper) {

 .markdown-content:global(.dark) :global(.mermaid-block-wrapper),
 .markdown-content:global(.dark) :global(.svg-block-wrapper) {
-	border-color: color-mix(in oklch, var(--border) 20%, transparent);
+	border-color: color-mix(in oklch, var(--line-default) 20%, transparent);
 }

 .markdown-content :global(.mermaid-scroll-container),
@@ -786,7 +786,7 @@ div.markdown-user-content :global(.table-wrapper) {
 	align-items: center;
 	justify-content: center;
 	padding: 3rem;
-	color: var(--muted-foreground);
+	color: var(--fg-muted);
 }

 .markdown-content :global(.mermaid-loading-text) {
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 c0afb6119..756457482 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
@@ -87,7 +87,7 @@
 		{ fontSize: '0.875rem', fontWeight: '600', tag: tags.heading6 },
 		{ fontWeight: '600', tag: tags.strong },
 		{ fontStyle: 'italic', tag: tags.emphasis },
-		{ color: 'var(--muted-foreground)', fontStyle: 'italic', tag: tags.quote },
+		{ color: 'var(--fg-muted)', fontStyle: 'italic', tag: tags.quote },
 		{ opacity: '0.7', tag: tags.strikethrough, textDecoration: 'line-through' },
 		{ fontFamily: 'var(--font-mono)', fontSize: '0.875rem', tag: tags.monospace }
 	]);
@@ -349,7 +349,7 @@

 	div :global(.cm-content) {
 		padding: 0;
-		caret-color: var(--foreground);
+		caret-color: var(--fg-default);
 	}

 	div :global(.cm-line) {
@@ -357,7 +357,7 @@
 	}

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

@@ -390,25 +390,25 @@
 		padding-inline: 1rem;
 		font-family: var(--font-mono);
 		font-size: 0.875rem;
-		background: var(--code-background);
-		border-inline: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
+		background: var(--surface-code);
+		border-inline: 1px solid color-mix(in oklch, var(--line-default) 30%, transparent);
 	}

 	div :global(.cm-md-raw-code-first) {
 		padding-top: 0.75rem;
-		border-top: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
+		border-top: 1px solid color-mix(in oklch, var(--line-default) 30%, transparent);
 		border-radius: 0.75rem 0.75rem 0 0;
 	}

 	div :global(.cm-md-raw-code-last) {
 		padding-bottom: 0.75rem;
-		border-bottom: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
+		border-bottom: 1px solid color-mix(in oklch, var(--line-default) 30%, transparent);
 		border-radius: 0 0 0.75rem 0.75rem;
 	}

 	/* A link reference definition renders to nothing, so it stays raw and muted */
 	div :global(.cm-md-raw-definition) {
-		color: var(--muted-foreground);
+		color: var(--fg-muted);
 		font-size: 0.875rem;
 	}
 </style>
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 18f96c529..3c18771c8 100644
--- a/ui/apps/chat/src/lib/components/app/content/MermaidPreviewControls.svelte
+++ b/ui/apps/chat/src/lib/components/app/content/MermaidPreviewControls.svelte
@@ -44,7 +44,7 @@
 		</button>

 		<span
-			class="mermaid-preview-zoom-label min-w-[3.5rem] px-0.5 text-center text-xs font-medium text-muted-foreground tabular-nums select-none"
+			class="mermaid-preview-zoom-label min-w-14 px-0.5 text-center text-label-sm text-muted-foreground tabular-nums select-none"
 			>{Math.round(scale * 100)}%</span
 		>

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 e9ad59163..119a9867e 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogChatAttachmentsPreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogChatAttachmentsPreview.svelte
@@ -69,7 +69,7 @@
 		<DialogUI.Overlay class="bg-black/85" style="z-index: 1000" />

 		<Dialog.Content
-			class="fixed inset-0 z-[1000] flex flex-col pt-safe pb-safe bg-transparent! shadow-none! backdrop-filter-none! outline-none"
+			class="fixed inset-0 z-1000 flex flex-col pt-safe pb-safe bg-transparent! shadow-none! backdrop-filter-none! outline-none"
 		>
 			<Dialog.Close
 				aria-label="Close"
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 b4f71905e..9498b8658 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogChatError.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogChatError.svelte
@@ -51,11 +51,11 @@
 			</AlertDialog.Description>
 		</AlertDialog.Header>

-		<div class={`rounded-lg border px-4 py-3 text-sm ${badgeClass}`}>
+		<div class={`rounded-lg border px-4 py-3 text-body-sm ${badgeClass}`}>
 			<p class="font-medium">{message}</p>

 			{#if contextInfo}
-				<div class="mt-2 space-y-1 text-xs opacity-80">
+				<div class="mt-2 space-y-1 text-caption opacity-80">
 					<p>
 						<span class="font-medium">Prompt tokens:</span>

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 4da5c0209..a4f234927 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationRename.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogConversationRename.svelte
@@ -62,7 +62,7 @@
 		</AlertDialog.Header>

 		<form class="space-y-2 pt-2 pb-4" onsubmit={handleSubmit}>
-			<label class="text-sm font-medium text-muted-foreground" for="conversation-rename-input">
+			<label class="text-label text-muted-foreground" for="conversation-rename-input">
 				Conversation title
 			</label>

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 382ce96bb..69230a0b4 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogEmptyFileAlert.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogEmptyFileAlert.svelte
@@ -30,13 +30,13 @@
 			</AlertDialog.Description>
 		</AlertDialog.Header>

-		<div class="space-y-3 text-sm">
+		<div class="space-y-3 text-body-sm">
 			<div class="rounded-lg bg-muted p-3">
 				<div class="mb-2 font-medium">Empty Files:</div>

 				<ul class="list-inside list-disc space-y-1 text-muted-foreground">
 					{#each emptyFiles as fileName (fileName)}
-						<li class="font-mono text-sm">{fileName}</li>
+						<li class="font-mono text-body-sm">{fileName}</li>
 					{/each}
 				</ul>
 			</div>
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 9afa1b17d..51a9486ac 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogExportSettings.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogExportSettings.svelte
@@ -55,7 +55,7 @@
 			<Checkbox bind:checked={includeSensitiveData} id="include-sensitive" />

 			<Label
-				class="text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
+				class="text-body-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
 				for="include-sensitive"
 			>
 				{#if includeSensitiveData}
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 c1340542e..d275aed96 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogFileUploadError.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogFileUploadError.svelte
@@ -29,7 +29,7 @@
 			<AlertDialog.Header>
 				<AlertDialog.Title>File Upload Error</AlertDialog.Title>

-				<AlertDialog.Description class="text-sm text-muted-foreground">
+				<AlertDialog.Description class="text-body-sm text-muted-foreground">
 					Some files cannot be uploaded with the current model.
 				</AlertDialog.Description>
 			</AlertDialog.Header>
@@ -37,16 +37,16 @@
 			<div class="!max-h-[50vh] min-h-0 flex-1 space-y-4 overflow-y-auto">
 				{#if fileErrorData.generallyUnsupported.length > 0}
 					<div class="space-y-2">
-						<h4 class="text-sm font-medium text-destructive">Unsupported File Types</h4>
+						<h4 class="text-label text-destructive">Unsupported File Types</h4>

 						<div class="space-y-1">
 							{#each fileErrorData.generallyUnsupported as file (file.name)}
 								<div class="rounded-md bg-destructive/10 px-3 py-2">
-									<p class="font-mono text-sm break-all text-destructive">
+									<p class="font-mono text-body-sm break-all text-destructive">
 										{file.name}
 									</p>

-									<p class="mt-1 text-xs text-muted-foreground">File type not supported</p>
+									<p class="mt-1 text-caption text-muted-foreground">File type not supported</p>
 								</div>
 							{/each}
 						</div>
@@ -58,11 +58,11 @@
 						<div class="space-y-1">
 							{#each fileErrorData.modalityUnsupported as file (file.name)}
 								<div class="rounded-md bg-destructive/10 px-3 py-2">
-									<p class="font-mono text-sm break-all text-destructive">
+									<p class="font-mono text-body-sm break-all text-destructive">
 										{file.name}
 									</p>

-									<p class="mt-1 text-xs text-muted-foreground">
+									<p class="mt-1 text-caption text-muted-foreground">
 										{fileErrorData.modalityReasons[file.name] || 'Not supported by current model'}
 									</p>
 								</div>
@@ -73,9 +73,9 @@
 			</div>

 			<div class="rounded-md bg-muted/50 p-3">
-				<h4 class="mb-2 text-sm font-medium">This model supports:</h4>
+				<h4 class="mb-2 text-label">This model supports:</h4>

-				<p class="text-sm text-muted-foreground">
+				<p class="text-body-sm text-muted-foreground">
 					{fileErrorData.supportedTypes.join(', ')}
 				</p>
 			</div>
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 77f24269b..2f24babb0 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogGroupPicker.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogGroupPicker.svelte
@@ -58,7 +58,7 @@
 			class="flex max-h-80 min-h-0 flex-col gap-0.5 overflow-y-auto p-1 max-md:max-h-none max-md:flex-1"
 		>
 			<button
-				class="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent disabled:pointer-events-none disabled:opacity-50"
+				class="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-body-sm hover:bg-accent disabled:pointer-events-none disabled:opacity-50"
 				disabled={!newGroupName}
 				onclick={createAndSelect}
 				type="button"
@@ -75,7 +75,7 @@

 				{#each groups as group (group.id)}
 					<button
-						class="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent"
+						class="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-body-sm hover:bg-accent"
 						onclick={() => select(group.id)}
 						type="button"
 					>
@@ -87,7 +87,7 @@
 					</button>
 				{/each}
 			{:else if newGroupName}
-				<p class="px-2 py-2 text-sm text-muted-foreground">No matching groups</p>
+				<p class="px-2 py-2 text-body-sm text-muted-foreground">No matching groups</p>
 			{/if}
 		</div>
 	</Dialog.Content>
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 b6ad53a51..d8e3d1b95 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcePreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcePreview.svelte
@@ -60,10 +60,10 @@

 			<Dialog.Description>
 				<div class="flex items-center gap-2">
-					<span class="text-xs text-muted-foreground">{extra.uri}</span>
+					<span class="text-caption text-muted-foreground">{extra.uri}</span>

 					{#if serverName}
-						<span class="flex items-center gap-1 text-xs text-muted-foreground">
+						<span class="flex items-center gap-1 text-caption text-muted-foreground">
 							·
 							{#if favicon}
 								<img
@@ -80,7 +80,7 @@
 					{/if}

 					{#if extra.mimeType}
-						<span class="rounded bg-muted px-1.5 py-0.5 text-xs">{extra.mimeType}</span>
+						<span class="rounded bg-muted px-1.5 py-0.5 text-caption">{extra.mimeType}</span>
 					{/if}
 				</div>
 			</Dialog.Description>
@@ -120,9 +120,9 @@
 				<SyntaxHighlightedCode code={extra.content} language={getLanguage()} maxHeight="70vh" />
 			{:else if extra.content}
 				<pre
-					class="max-h-[70vh] overflow-auto rounded-md border bg-muted/30 p-4 font-mono text-sm break-words whitespace-pre-wrap">{extra.content}</pre>
+					class="max-h-[70vh] overflow-auto rounded-md border bg-muted/30 p-4 font-mono text-body-sm break-words whitespace-pre-wrap">{extra.content}</pre>
 			{:else}
-				<div class="py-8 text-center text-sm text-muted-foreground">No content available</div>
+				<div class="py-8 text-center text-body-sm text-muted-foreground">No content available</div>
 			{/if}
 		</div>
 	</Dialog.Content>
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 8eeb35581..9d05aba33 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcesBrowser.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpResourcesBrowser.svelte
@@ -267,7 +267,7 @@
 				<span>MCP Resources</span>

 				{#if totalCount > 0}
-					<span class="text-sm font-normal text-muted-foreground">({totalCount})</span>
+					<span class="text-body-sm font-normal text-muted-foreground">({totalCount})</span>
 				{/if}
 			</Dialog.Title>

@@ -285,7 +285,7 @@
 			</Dialog.Close>
 		</Dialog.Header>

-		<div class="flex h-[500px] min-w-0">
+		<div class="flex h-125 min-w-0">
 			<div class="w-72 shrink-0 overflow-y-auto border-r border-border/30 p-4">
 				<McpResourcesBrowser
 					expandToUri={preSelectedUri}
@@ -303,19 +303,19 @@
 						<div class="mb-3 flex items-center gap-2">
 							<Braces class="{ICON_CLASS_DEFAULT} text-muted-foreground" />

-							<span class="text-sm font-medium">
+							<span class="text-label">
 								{selectedTemplate.title || selectedTemplate.name}
 							</span>
 						</div>

 						{#if selectedTemplate.description}
-							<p class="mb-4 text-xs text-muted-foreground">
+							<p class="mb-4 text-caption text-muted-foreground">
 								{selectedTemplate.description}
 							</p>
 						{/if}

 						<div class="mb-4 rounded-md border border-border/50 bg-muted/30 px-3 py-2">
-							<p class="font-mono text-xs break-all text-muted-foreground">
+							<p class="font-mono text-caption break-all text-muted-foreground">
 								{selectedTemplate.uriTemplate}
 							</p>
 						</div>
@@ -326,7 +326,7 @@
 							</div>
 						{:else if templatePreviewError}
 							<div class="flex flex-1 flex-col items-center justify-center gap-2 text-fg-danger">
-								<span class="text-sm">{templatePreviewError}</span>
+								<span class="text-body-sm">{templatePreviewError}</span>

 								<Button
 									onclick={() => {
@@ -370,7 +370,7 @@
 						{/each}
 					</div>
 				{:else}
-					<div class="flex h-full items-center justify-center text-sm text-muted-foreground">
+					<div class="flex h-full items-center justify-center text-body-sm text-muted-foreground">
 						Select a resource to preview
 					</div>
 				{/if}
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 6f68e615b..8650bd299 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogMcpServerAddNew.svelte
@@ -255,7 +255,7 @@
 		{#if recommendationsToShow.length > 0}
 			<div class="space-y-3 pt-2">
 				<div class="flex items-center justify-between gap-3">
-					<h3 class="text-sm font-medium">Recommended Servers</h3>
+					<h3 class="text-label">Recommended Servers</h3>

 					<Button class="text-muted-foreground" onclick={handleDismissAll} size="sm" variant="ghost"
 						>Dismiss</Button
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 6d5115a6c..5a7a6ba4d 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogModelNotAvailable.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogModelNotAvailable.svelte
@@ -44,24 +44,24 @@
 		</AlertDialog.Header>

 		<div class="space-y-3">
-			<div class="rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 py-3 text-sm">
+			<div class="rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 py-3 text-body-sm">
 				<p class="font-medium text-amber-600 dark:text-amber-400">
 					Requested: <code class="rounded bg-amber-500/20 px-1.5 py-0.5">{modelName}</code>
 				</p>
 			</div>

 			{#if availableModels.length > 0}
-				<div class="text-sm">
+				<div class="text-body-sm">
 					<p class="mb-2 font-medium text-muted-foreground">Select an available model:</p>

 					<div class="max-h-48 space-y-1 overflow-y-auto rounded-md border p-1">
 						{#each availableModels as model (model)}
 							<button
-								class="group flex w-full items-center justify-between gap-2 rounded-sm px-3 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground"
+								class="group flex w-full items-center justify-between gap-2 rounded-sm px-3 py-2 text-left text-body-sm transition-colors hover:bg-accent hover:text-accent-foreground"
 								onclick={() => handleSelectModel(model)}
 								type="button"
 							>
-								<span class="min-w-0 truncate font-mono text-xs">{model}</span>
+								<span class="min-w-0 truncate font-mono text-caption">{model}</span>

 								<ArrowRight
 									class="{ICON_CLASS_DEFAULT} shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
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 2b4e0b71d..077a6583e 100644
--- a/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte
+++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte
@@ -149,7 +149,7 @@
 		<span class="flex items-center gap-1">
 			{#each keys as Key, index (index)}
 				<kbd
-					class="inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 px-1 font-sans text-[11px]"
+					class="inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 px-1 font-sans text-caption"
 				>
 					{#if typeof Key === 'string'}
 						{Key}
@@ -172,7 +172,7 @@
 				aria-controls="search-results"
 				aria-expanded="true"
 				autocomplete="off"
-				class="h-10 min-w-0 flex-1 border-0 bg-transparent px-1 text-lg outline-none placeholder:text-muted-foreground focus:outline-none focus-visible:ring-0"
+				class="h-10 min-w-0 flex-1 border-0 bg-transparent px-1 text-title font-normal outline-none placeholder:text-muted-foreground focus:outline-none focus-visible:ring-0"
 				oninput={() => (highlighted = 0)}
 				onkeydown={handleKeydown}
 				placeholder="Search"
@@ -197,7 +197,7 @@
 				.reduce((total, previous) => total + previous.entries.length, 0)}

 			<div class="flex flex-col gap-0.5 {sectionIndex > 0 ? 'mt-3' : ''}" role="group">
-				<p class="px-2.5 pt-1 pb-1.5 text-xs font-medium text-muted-foreground">
+				<p class="px-2.5 pt-1 pb-1.5 text-label-sm text-muted-foreground">
 					{section.title}
 				</p>

@@ -208,7 +208,7 @@
 					<!-- a phone has no keyboard to move a highlight with: no row is lit there -->
 					<button
 						aria-selected={isActive}
-						class="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-sm transition-colors max-md:rounded-xl max-md:py-3 max-md:text-base {isActive
+						class="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-body-sm transition-colors max-md:rounded-xl max-md:py-3 max-md:text-body {isActive
 							? 'bg-accent text-accent-foreground'
 							: ''}"
 						id="search-result-{index}"
@@ -227,7 +227,7 @@
 						{/if}

 						{#if entry.meta}
-							<span class="max-w-[40%] shrink-0 truncate text-xs text-muted-foreground">
+							<span class="max-w-2/5 shrink-0 truncate text-caption text-muted-foreground">
 								{entry.meta}
 							</span>
 						{/if}
@@ -245,12 +245,12 @@
 				{/each}
 			</div>
 		{:else}
-			<p class="px-3 py-12 text-center text-sm text-muted-foreground">{emptyMessage}</p>
+			<p class="px-3 py-12 text-center text-body-sm text-muted-foreground">{emptyMessage}</p>
 		{/each}
 	</div>

 	<div
-		class="flex items-center gap-5 border-t border-border/30 px-4 py-2.5 text-xs text-muted-foreground max-md:hidden dark:border-border/20"
+		class="flex items-center gap-5 border-t border-border/30 px-4 py-2.5 text-caption text-muted-foreground max-md:hidden dark:border-border/20"
 	>
 		{@render hint('Close', ['Esc'])}

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 31cc5ffc1..8c4e27c4b 100644
--- a/ui/apps/chat/src/lib/components/app/forms/InputWithSuggestions.svelte
+++ b/ui/apps/chat/src/lib/components/app/forms/InputWithSuggestions.svelte
@@ -41,7 +41,7 @@
 		</span>

 		{#if isLoadingSuggestions}
-			<span class="text-xs text-muted-foreground/50">...</span>
+			<span class="text-caption text-muted-foreground/50">...</span>
 		{/if}
 	</Label>

@@ -64,7 +64,7 @@
 		>
 			{#each suggestions as suggestion, i (suggestion)}
 				<button
-					class="w-full px-3 py-1.5 text-left text-sm hover:bg-accent {i === autocompleteIndex
+					class="w-full px-3 py-1.5 text-left text-body-sm hover:bg-accent {i === autocompleteIndex
 						? 'bg-accent'
 						: ''}"
 					onmousedown={() => onSelectSuggestion(suggestion)}
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 8c6d9072d..3a3571ea6 100644
--- a/ui/apps/chat/src/lib/components/app/forms/KeyValuePairs.svelte
+++ b/ui/apps/chat/src/lib/components/app/forms/KeyValuePairs.svelte
@@ -107,7 +107,7 @@
 <div class={className}>
 	<div class="mb-2 flex items-center justify-between">
 		{#if sectionLabel}
-			<span class="text-xs font-medium select-none">
+			<span class="text-label-sm select-none">
 				{sectionLabel}
 				{#if sectionLabelOptional}
 					<span class="text-muted-foreground">(optional)</span>
@@ -116,7 +116,7 @@
 		{/if}

 		<button
-			class="inline-flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground"
+			class="inline-flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-caption text-muted-foreground hover:bg-muted hover:text-foreground"
 			onclick={addPair}
 			type="button"
 		>
@@ -142,7 +142,7 @@

 					<textarea
 						{@attach autoResizeTextarea}
-						class="flex-1 resize-none rounded-md border border-input bg-transparent px-3 py-2 text-base leading-5 md:text-sm placeholder:text-muted-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
+						class="flex-1 resize-none rounded-md border border-input bg-transparent px-3 py-2 text-body leading-5 md:text-body-sm placeholder:text-muted-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
 						maxlength={KEY_VALUE_PAIR_VALUE_MAX_LENGTH}
 						onblur={(e) => trimPairValue(index, e.currentTarget.value)}
 						oninput={(e) => {
@@ -166,6 +166,6 @@
 			{/each}
 		</div>
 	{:else}
-		<p class="select-none text-xs text-muted-foreground">{emptyMessage}</p>
+		<p class="select-none text-caption text-muted-foreground">{emptyMessage}</p>
 	{/if}
 </div>
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 c61c68a74..fe22ac97f 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpActiveServersAvatars.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpActiveServersAvatars.svelte
@@ -90,7 +90,7 @@
 		</div>

 		{#if extraServersCount > 0}
-			<span class="text-xs text-muted-foreground">+{extraServersCount}</span>
+			<span class="text-caption text-muted-foreground">+{extraServersCount}</span>
 		{/if}
 	</button>
 {/if}
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 d10118a15..36b1a89df 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpCapabilitiesBadges.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpCapabilitiesBadges.svelte
@@ -21,7 +21,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">
+		<Badge class="h-5 gap-1 bg-green-50 px-1.5 text-caption-sm dark:bg-green-950" variant="outline">
 			<Wrench class="size-icon-xs text-green-600 dark:text-green-400" />

 			Tools
@@ -30,7 +30,7 @@

 	{#if capabilities.server.resources}
 		<Badge
-			class="h-5 cursor-pointer gap-1 bg-blue-50 px-1.5 text-[10px] transition-colors hover:bg-blue-100 dark:bg-blue-950 dark:hover:bg-blue-900"
+			class="h-5 cursor-pointer gap-1 bg-blue-50 px-1.5 text-caption-sm transition-colors hover:bg-blue-100 dark:bg-blue-950 dark:hover:bg-blue-900"
 			onclick={onBrowseResources}
 			onkeydown={(e) => {
 				if (e.key === 'Enter' || e.key === ' ') {
@@ -51,7 +51,10 @@
 	{/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">
+		<Badge
+			class="h-5 gap-1 bg-purple-50 px-1.5 text-caption-sm dark:bg-purple-950"
+			variant="outline"
+		>
 			<MessageSquare class="size-icon-xs text-purple-600 dark:text-purple-400" />

 			Prompts
@@ -59,7 +62,10 @@
 	{/if}

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

 			Logging
@@ -67,7 +73,7 @@
 	{/if}

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

 			Completions
@@ -75,7 +81,7 @@
 	{/if}

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

 			Tasks
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 e4a861377..87efebf7a 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpConnectionLogs.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpConnectionLogs.svelte
@@ -32,7 +32,7 @@
 	<Collapsible.Root bind:open={isExpanded} class={className}>
 		<div class="space-y-2">
 			<Collapsible.Trigger
-				class="flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
+				class="flex w-full items-center gap-1 text-caption text-muted-foreground hover:text-foreground"
 			>
 				{#if isExpanded}
 					<ChevronDown class="size-icon-sm" />
@@ -50,7 +50,7 @@

 		<Collapsible.Content class="mt-2">
 			<div
-				class="max-h-64 space-y-0.5 overflow-y-auto rounded bg-muted/50 p-2 font-mono text-[10px]"
+				class="max-h-64 space-y-0.5 overflow-y-auto rounded bg-muted/50 p-2 font-mono text-caption-sm"
 			>
 				{#each logs as log (log.timestamp.getTime() + log.message)}
 					{@const IconComponent = getMcpLogLevelIcon(log.level)}
@@ -67,10 +67,12 @@

 					{#if log.details !== undefined}
 						<details class="ml-11">
-							<summary class="cursor-pointer text-[10px] text-muted-foreground"> details </summary>
+							<summary class="cursor-pointer text-caption-sm text-muted-foreground">
+								details
+							</summary>

 							<pre
-								class="mt-1 overflow-x-auto rounded bg-background/70 p-2 text-[10px] break-all whitespace-pre-wrap text-foreground/80">
+								class="mt-1 overflow-x-auto rounded bg-background/70 p-2 text-caption-sm break-all whitespace-pre-wrap text-foreground/80">
 {formatLogDetails(log.details)}</pre>
 						</details>
 					{/if}
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 6f81d0a29..abea49759 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourcePreview.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourcePreview.svelte
@@ -79,17 +79,17 @@
 		<div class="flex flex-col items-center justify-center gap-2 py-8 text-muted-foreground">
 			<FileText class="size-8 opacity-50" />

-			<span class="text-sm">Select a resource to preview</span>
+			<span class="text-body-sm">Select a resource to preview</span>
 		</div>
 	{:else}
 		<div class="flex items-start justify-between gap-2">
 			<div class="min-w-0 flex-1">
 				<h3 class="truncate font-medium">{resource.title || resource.name}</h3>

-				<p class="truncate text-xs text-muted-foreground">{resource.uri}</p>
+				<p class="truncate text-caption text-muted-foreground">{resource.uri}</p>

 				{#if resource.description}
-					<p class="mt-1 text-sm text-muted-foreground">{resource.description}</p>
+					<p class="mt-1 text-body-sm text-muted-foreground">{resource.description}</p>
 				{/if}
 			</div>

@@ -113,7 +113,7 @@
 			</div>
 		</div>

-		<div class="min-h-[200px] overflow-auto rounded-md border bg-muted/30 p-3 break-all">
+		<div class="min-h-50 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="size-6 animate-spin text-muted-foreground" />
@@ -122,14 +122,14 @@
 				<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>
+					<span class="text-body-sm">{error}</span>
 				</div>
 			{:else if content}
 				{@const textContent = getResourceTextContent(content)}
 				{@const blobContent = getResourceBlobContent(content)}

 				{#if textContent}
-					<pre class="font-mono text-xs break-words whitespace-pre-wrap">{textContent}</pre>
+					<pre class="font-mono text-caption break-words whitespace-pre-wrap">{textContent}</pre>
 				{/if}

 				{#each blobContent as blob (blob.uri)}
@@ -143,7 +143,9 @@
 							)}
 						/>
 					{:else}
-						<div class="flex items-center gap-2 rounded bg-muted p-2 text-sm text-muted-foreground">
+						<div
+							class="flex items-center gap-2 rounded bg-muted p-2 text-body-sm text-muted-foreground"
+						>
 							<FileText class={ICON_CLASS_DEFAULT} />

 							<span>Binary content ({blob.mimeType || 'unknown type'})</span>
@@ -152,13 +154,15 @@
 				{/each}

 				{#if !textContent && blobContent.length === 0}
-					<div class="py-4 text-center text-sm text-muted-foreground">No content available</div>
+					<div class="py-4 text-center text-body-sm text-muted-foreground">
+						No content available
+					</div>
 				{/if}
 			{/if}
 		</div>

 		{#if resource.mimeType || resource.annotations}
-			<div class="flex flex-wrap gap-2 text-xs text-muted-foreground">
+			<div class="flex flex-wrap gap-2 text-caption text-muted-foreground">
 				{#if resource.mimeType}
 					<span class="rounded bg-muted px-1.5 py-0.5">{resource.mimeType}</span>
 				{/if}
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 1fe047660..a6800e442 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourceTemplateForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourceTemplateForm.svelte
@@ -157,9 +157,9 @@

 	{#if isComplete}
 		<div class="rounded-md bg-muted/50 px-3 py-2">
-			<p class="text-xs text-muted-foreground">Resolved URI:</p>
+			<p class="text-caption text-muted-foreground">Resolved URI:</p>

-			<p class="mt-0.5 font-mono text-xs break-all">{expandedUri}</p>
+			<p class="mt-0.5 font-mono text-caption break-all">{expandedUri}</p>
 		</div>
 	{/if}

diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserEmptyState.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserEmptyState.svelte
index 4fb0c1e24..bcf8e43fc 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserEmptyState.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpResourcesBrowser/McpResourcesBrowserEmptyState.svelte
@@ -6,7 +6,7 @@
 	let { isLoading }: Props = $props();
 </script>

-<div class="py-4 text-center text-sm text-muted-foreground">
+<div class="py-4 text-center text-body-sm text-muted-foreground">
 	{#if isLoading}
 		Loading resources...
 	{:else}
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 852fbc0ea..0945f3b47 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
@@ -38,5 +38,5 @@
 		</Button>
 	</div>

-	<h3 class="text-sm font-medium">Available resources</h3>
+	<h3 class="text-label">Available resources</h3>
 </div>
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 48d9d523f..4b924e431 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
@@ -92,7 +92,7 @@
 		{@const folderCount = countTreeResources(node)}
 		<Collapsible.Root onOpenChange={() => onToggleFolder(folderId)} open={isFolderExpanded}>
 			<Collapsible.Trigger
-				class="flex w-full items-center gap-2 rounded px-2 py-1 text-sm hover:bg-muted/50"
+				class="flex w-full items-center gap-2 rounded px-2 py-1 text-body-sm hover:bg-muted/50"
 			>
 				{#if isFolderExpanded}
 					<ChevronDown class="size-icon-xs" />
@@ -104,7 +104,7 @@

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

-				<span class="text-xs text-muted-foreground">({folderCount})</span>
+				<span class="text-caption text-muted-foreground">({folderCount})</span>
 			</Collapsible.Trigger>

 			<Collapsible.Content>
@@ -133,7 +133,7 @@

 			<button
 				class={[
-					'flex flex-1 items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors',
+					'flex flex-1 items-center gap-2 rounded px-2 py-1 text-left text-body-sm transition-colors',
 					'hover:bg-muted/50',
 					isSelected && 'bg-muted'
 				]}
@@ -152,7 +152,7 @@

 <Collapsible.Root onOpenChange={onToggleServer} open={isExpanded}>
 	<Collapsible.Trigger
-		class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50"
+		class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-body-sm hover:bg-muted/50"
 	>
 		{#if isExpanded}
 			<ChevronDown class="size-icon-sm" />
@@ -170,7 +170,7 @@
 				/>
 			</div>

-			<span class="text-xs text-muted-foreground">
+			<span class="text-caption text-muted-foreground">
 				({serverRes.resources.length} resource{serverRes.resources.length !== 1
 					? 's'
 					: ''}{#if hasTemplates}, {serverRes.templates.length} template{serverRes.templates
@@ -188,11 +188,11 @@
 	<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-fg-danger">
+				<div class="py-1 text-caption text-fg-danger">
 					Error: {serverRes.error}
 				</div>
 			{:else if !hasContent}
-				<div class="py-1 text-xs text-muted-foreground">No resources</div>
+				<div class="py-1 text-caption text-muted-foreground">No resources</div>
 			{:else}
 				{#if hasResources}
 					{#each sortTreeChildren( [...resourceTree.children.values()] ) as child (child.resource?.uri || `${serverName}:${child.name}`)}
@@ -205,16 +205,14 @@
 						<div class="my-1 border-t border-border/30"></div>
 					{/if}

-					<div
-						class="py-0.5 text-[11px] font-medium tracking-wide text-muted-foreground/70 uppercase"
-					>
+					<div class="py-0.5 text-label-sm tracking-wide text-muted-foreground/70 uppercase">
 						Templates
 					</div>

 					{#each templateInfos as template (template.uriTemplate)}
 						<button
 							class={[
-								'flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors',
+								'flex w-full items-center gap-2 rounded px-2 py-1 text-left text-body-sm transition-colors',
 								'hover:bg-muted/50',
 								selectedTemplateUri === template.uriTemplate && 'bg-muted'
 							]}
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 efdc06966..5aeb6b3f8 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
@@ -133,11 +133,11 @@
 		/>

 		{#if isError && errorMessage}
-			<p class="text-xs text-destructive">{errorMessage}</p>
+			<p class="text-caption text-destructive">{errorMessage}</p>
 		{/if}

 		{#if isConnected && serverInfo?.description}
-			<p class="line-clamp-2 text-xs text-muted-foreground">
+			<p class="line-clamp-2 text-caption text-muted-foreground">
 				{serverInfo.description}
 			</p>
 		{/if}
@@ -187,7 +187,7 @@
 				<Skeleton class="h-3 w-28" />
 			{:else if protocolVersion}
 				<div class="flex flex-wrap items-center gap-1">
-					<span class="text-[10px] text-muted-foreground">
+					<span class="text-caption-sm text-muted-foreground">
 						Protocol version: {protocolVersion}
 					</span>
 				</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 4abd93ed0..729590368 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
@@ -41,5 +41,5 @@
 		<h4 class="min-w-0 flex-1 truncate font-medium">{server.name}</h4>
 	</div>

-	<p class="text-xs text-muted-foreground">{server.description}</p>
+	<p class="text-caption text-muted-foreground">{server.description}</p>
 </Card.Root>
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 7805e9688..74a09084d 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
@@ -49,7 +49,7 @@
 				<div class="flex flex-wrap items-center gap-1.5">
 					{#if transportType}
 						{@const TransportIcon = MCP_TRANSPORT_ICONS[transportType]}
-						<Badge class="h-5 gap-1 px-1.5 text-[10px]" variant="outline">
+						<Badge class="h-5 gap-1 px-1.5 text-caption-sm" variant="outline">
 							{#if TransportIcon}
 								<TransportIcon class="size-icon-xs" />
 							{/if}
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 d1a0c7ec2..bc3631ddf 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
@@ -20,7 +20,7 @@

 <Collapsible.Root bind:open={isExpanded}>
 	<Collapsible.Trigger
-		class="flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
+		class="flex w-full items-center gap-1 text-caption text-muted-foreground hover:text-foreground"
 	>
 		{#if isExpanded}
 			<ChevronDown class="size-icon-sm" />
@@ -38,7 +38,7 @@
 					<Badge variant="secondary">{tool.name}</Badge>

 					{#if tool.description}
-						<p class="mt-1 text-xs text-muted-foreground">{tool.description}</p>
+						<p class="mt-1 text-caption text-muted-foreground">{tool.description}</p>
 					{/if}
 				</div>
 			{/each}
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 c0dd254e7..97b3db3e8 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte
@@ -140,7 +140,7 @@

 <div class="grid gap-2">
 	<div class="mb-4">
-		<label class="mb-2 block text-xs font-medium select-none" for="server-url-{id}">
+		<label class="mb-2 block text-label-sm select-none" for="server-url-{id}">
 			Server URL <span class="text-destructive">*</span>
 		</label>

@@ -155,12 +155,12 @@
 		/>

 		{#if urlError}
-			<p class="mt-1.5 text-xs text-destructive">{urlError}</p>
+			<p class="mt-1.5 text-caption text-destructive">{urlError}</p>
 		{/if}
 	</div>

 	<div class="mb-4">
-		<label class="mb-2 block text-xs font-medium select-none" for="server-name-{id}">
+		<label class="mb-2 block text-label-sm select-none" for="server-name-{id}">
 			Display name
 		</label>

@@ -181,7 +181,7 @@
 			onCheckedChange={setUseAuthorization}
 		/>

-		<span class="text-xs text-muted-foreground">
+		<span class="text-caption text-muted-foreground">
 			Authorization{#if required}
 				<span class="text-destructive">*</span>{/if}
 		</span>
@@ -201,7 +201,7 @@
 			/>

 			<span
-				class="pointer-events-none absolute inset-y-0 left-3 flex items-center text-sm font-medium text-foreground"
+				class="pointer-events-none absolute inset-y-0 left-3 flex items-center text-label text-foreground"
 			>
 				Bearer
 			</span>
@@ -241,12 +241,12 @@
 			/>

 			<span>
-				<span class="text-xs text-muted-foreground">Use llama-server proxy</span>
+				<span class="text-caption text-muted-foreground">Use llama-server proxy</span>

 				<br />

 				{#if !mcpStore.isProxyAvailable}
-					<span class="inline-flex gap-0.75 text-xs text-muted-foreground/60"
+					<span class="inline-flex gap-0.75 text-caption text-muted-foreground/60"
 						>(Run <pre>llama-server</pre>
 						with
 						<pre>{CLI_FLAGS.MCP_PROXY}</pre>
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 d55235b55..c716652b0 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerIdentity.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerIdentity.svelte
@@ -43,7 +43,7 @@
 	<TruncatedText class={nameClass ?? ''} text={displayName ?? ''} />

 	{#if showVersion && serverInfo?.version}
-		<Badge class="h-4 max-w-24 min-w-0 shrink px-1 text-[10px]" variant="secondary">
+		<Badge class="h-4 max-w-24 min-w-0 shrink px-1 text-caption-sm" variant="secondary">
 			<TruncatedText text={`v${serverInfo.version}`} />
 		</Badge>
 	{/if}
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 7f88764e8..220e6c6d9 100644
--- a/ui/apps/chat/src/lib/components/app/mcp/McpServerInfo.svelte
+++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerInfo.svelte
@@ -15,7 +15,7 @@
 {#if instructions}
 	<Collapsible.Root bind:open={isExpanded} class={className}>
 		<Collapsible.Trigger
-			class="flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
+			class="flex w-full items-center gap-1 text-caption text-muted-foreground hover:text-foreground"
 		>
 			{#if isExpanded}
 				<ChevronDown class="size-icon-sm" />
@@ -27,7 +27,7 @@
 		</Collapsible.Trigger>

 		<Collapsible.Content class="mt-2">
-			<p class="rounded bg-muted/50 p-2 text-xs text-muted-foreground">
+			<p class="rounded bg-muted/50 p-2 text-caption text-muted-foreground">
 				{instructions}
 			</p>
 		</Collapsible.Content>
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 ffa0e2182..86d6cc2c2 100644
--- a/ui/apps/chat/src/lib/components/app/misc/CollapsibleSection.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/CollapsibleSection.svelte
@@ -67,7 +67,7 @@
 		<!-- A menu item (for keyboard nav) wrapping the trigger via `child`;
 		     closeOnSelect keeps the menu open while the section toggles. -->
 		<DropdownMenu.Item
-			class="group w-full min-w-0 cursor-pointer items-center gap-2 rounded-md text-left text-sm"
+			class="group w-full min-w-0 cursor-pointer items-center gap-2 rounded-md text-left text-body-sm"
 			closeOnSelect={false}
 		>
 			{#snippet child({ props })}
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 ca71f59c2..d2671a030 100644
--- a/ui/apps/chat/src/lib/components/app/misc/ConversationSelection.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/ConversationSelection.svelte
@@ -93,7 +93,7 @@
 <div class="space-y-4">
 	<SearchInput bind:value={searchQuery} placeholder="Search conversations..." />

-	<div class="flex items-center justify-between text-sm text-muted-foreground">
+	<div class="flex items-center justify-between text-body-sm text-muted-foreground">
 		<span>
 			{selectedIds.size} of {conversations.length} selected
 			{#if searchQuery}
@@ -115,16 +115,16 @@
 							/>
 						</th>

-						<th class="p-3 text-left text-sm font-medium">Conversation Name</th>
+						<th class="p-3 text-left text-label">Conversation Name</th>

-						<th class="w-32 p-3 text-left text-sm font-medium">Messages</th>
+						<th class="w-32 p-3 text-left text-label">Messages</th>
 					</tr>
 				</thead>

 				<tbody>
 					{#if filteredConversations.length === 0}
 						<tr>
-							<td class="p-8 text-center text-sm text-muted-foreground" colspan="3">
+							<td class="p-8 text-center text-body-sm text-muted-foreground" colspan="3">
 								{#if searchQuery}
 									No conversations found matching "{searchQuery}"
 								{:else}
@@ -154,13 +154,13 @@
 									/>
 								</td>

-								<td class="p-3 text-sm">
+								<td class="p-3 text-body-sm">
 									<div class="max-w-68 truncate" title={conv.name || 'Untitled conversation'}>
 										{conv.name || 'Untitled conversation'}
 									</div>
 								</td>

-								<td class="p-3 text-sm text-muted-foreground">
+								<td class="p-3 text-body-sm text-muted-foreground">
 									{messageCountMap.get(conv.id) ?? 0}
 								</td>
 							</tr>
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 88c4d899d..a521859fa 100644
--- a/ui/apps/chat/src/lib/components/app/misc/TruncatedText.svelte
+++ b/ui/apps/chat/src/lib/components/app/misc/TruncatedText.svelte
@@ -41,7 +41,7 @@
 			</span>
 		</Tooltip.Trigger>

-		<Tooltip.Content class="z-[9999]">
+		<Tooltip.Content class="z-9999">
 			<p>{text}</p>
 		</Tooltip.Content>
 	</Tooltip.Root>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelContext.svelte b/ui/apps/chat/src/lib/components/app/models/ModelContext.svelte
index f7b6326d5..f954d1014 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelContext.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelContext.svelte
@@ -52,7 +52,7 @@

 <span
 	{@attach nearViewport(() => (isNearViewport = true))}
-	class={['text-sm text-muted-foreground', className]}
+	class={['text-body-sm text-muted-foreground', className]}
 >
 	{formatContextLength(values)}
 </span>
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 9d308c0bb..988bdf72d 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelDraftSubline.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelDraftSubline.svelte
@@ -25,13 +25,13 @@
 <!-- the compact draft line lives inside its main item, under the id line; the
      main model's controls pause, resume and cancel its quant-matched drafts, so
      the line only reports its state -->
-<div class="flex items-center gap-2 py-1 pr-2 text-sm">
+<div class="flex items-center gap-2 py-1 pr-2 text-body-sm">
 	<span
 		aria-hidden="true"
 		class="h-2.5 w-3.5 shrink-0 self-center rounded-bl-sm border-b border-l border-border/70 {connectorClass}"
 	></span>

-	<span class="shrink-0 text-xs text-muted-foreground">Draft model</span>
+	<span class="shrink-0 text-caption text-muted-foreground">Draft model</span>

 	<span class={MODEL_VARIANT_BADGE_CLASS}>{kind}</span>

@@ -44,9 +44,9 @@
 	{:else}
 		<span class="ml-auto flex shrink-0 items-center">
 			{#if percent !== null}
-				<span class="font-mono text-xs tabular-nums text-muted-foreground">{percent}%</span>
+				<span class="font-mono text-caption tabular-nums text-muted-foreground">{percent}%</span>
 			{:else if state === ModelRowDownloadState.PAUSED}
-				<span class="text-xs text-muted-foreground">Paused</span>
+				<span class="text-caption text-muted-foreground">Paused</span>
 			{/if}
 		</span>
 	{/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 4c54d751c..0607ddced 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte
@@ -37,7 +37,7 @@
 		{#if showAction && revealOnHover}
 			{#if isFailed}
 				<MODEL_LOAD_ICONS.failed
-					class="size-icon-sm text-status-danger group-hover:hidden [@media(pointer:coarse)]:hidden"
+					class="size-icon-sm text-(--fill-danger) group-hover:hidden [@media(pointer:coarse)]:hidden"
 				/>
 			{:else}
 				<span
@@ -50,7 +50,7 @@
 			{/if}
 		{:else}
 			{#if isFailed}
-				<MODEL_LOAD_ICONS.failed class="size-icon-sm text-status-danger" />
+				<MODEL_LOAD_ICONS.failed class="size-icon-sm text-(--fill-danger)" />
 			{:else}
 				<span
 					class="size-2 rounded-full {isSleeping
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 66bbd0b12..41418b729 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
@@ -28,7 +28,7 @@
      the way the load control does in the other sections -->
 <div class={['flex items-center justify-center', className]}>
 	<span
-		class="text-xs text-muted-foreground tabular-nums group-hover:hidden [@media(pointer:coarse)]:hidden"
+		class="text-caption text-muted-foreground tabular-nums group-hover:hidden [@media(pointer:coarse)]:hidden"
 	>
 		{percent !== null ? `${percent}%` : isPaused ? 'Paused' : ''}
 	</span>
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 4af8e0d24..55f788455 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
@@ -105,12 +105,12 @@
 		{#if isDownload}
 			<!-- nothing is on disk yet, so the pane keeps to the download itself -->
 			<div class="space-y-2 py-1">
-				<div class="flex items-baseline justify-between gap-3 text-sm">
+				<div class="flex items-baseline justify-between gap-3 text-body-sm">
 					<span class="text-muted-foreground">
 						{isDownloadPaused ? 'Paused at' : 'Downloaded'}
 					</span>

-					<span class="font-mono text-xs tabular-nums text-muted-foreground">
+					<span class="font-mono text-caption tabular-nums text-muted-foreground">
 						{#if downloadPercent !== null}
 							{HuggingFaceService.formatFileSize(downloadProgress?.downloadedBytes ?? 0)}
 							/
@@ -151,7 +151,7 @@

 					<!-- a phone has no hover, so the reason sits under the button -->
 					{#if deviceStore.isMobile}
-						<p class="px-3 pt-1 text-xs text-muted-foreground">{removeBlockedReason}</p>
+						<p class="px-3 pt-1 text-caption text-muted-foreground">{removeBlockedReason}</p>
 					{/if}
 				{:else}
 					{@render deleteButton()}
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 fd17d4c0d..92c0c9b33 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
@@ -99,7 +99,7 @@
 					title={option.model}
 				/>

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

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 f26d64db3..13a8e4370 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
@@ -110,10 +110,10 @@

 <div class="space-y-0">
 	<div class="flex items-center gap-3 border-b border-border/30 py-2.5">
-		<span class="text-sm text-muted-foreground">Model</span>
+		<span class="text-body-sm text-muted-foreground">Model</span>

 		<span class="ml-auto flex min-w-0 flex-1 items-center gap-2">
-			<span class="min-w-0 flex-1 overflow-x-auto font-mono text-xs whitespace-nowrap">
+			<span class="min-w-0 flex-1 overflow-x-auto font-mono text-caption whitespace-nowrap">
 				{option.model}
 			</span>

@@ -127,7 +127,7 @@

 	{#each visibleRows as row (row.label)}
 		<div class="flex items-center gap-3 border-b border-border/30 py-2.5 last:border-b-0">
-			<span class="text-sm text-muted-foreground">{row.label}</span>
+			<span class="text-body-sm text-muted-foreground">{row.label}</span>

 			<span class="ml-auto flex min-w-0 items-center gap-2 {row.isCopyable ? 'flex-1' : ''}">
 				{#if row.value === null}
@@ -138,12 +138,12 @@
 							'min-w-0',
 							// a copyable value scrolls instead of clipping, the icon stays put
 							row.isCopyable ? 'flex-1 overflow-x-auto whitespace-nowrap' : 'truncate',
-							row.isBadge ? '' : 'text-sm',
-							row.isMono ? 'font-mono text-xs' : ''
+							row.isBadge ? '' : 'text-body-sm',
+							row.isMono ? 'font-mono text-caption' : ''
 						]}
 					>
 						{#if row.isBadge}
-							<Badge class="h-5 px-1.5 text-[10px]" variant="secondary">{row.value}</Badge>
+							<Badge class="h-5 px-1.5 text-caption-sm" variant="secondary">{row.value}</Badge>
 						{:else}
 							{row.value}
 						{/if}
@@ -162,14 +162,14 @@
 	{/each}

 	{#if visibleRows.length === 0}
-		<p class="py-2.5 text-sm text-muted-foreground">
+		<p class="py-2.5 text-body-sm text-muted-foreground">
 			The model reports its metadata once it is loaded.
 		</p>
 	{/if}

 	{#if modalities.length > 0}
 		<div class="flex items-center gap-3 border-b border-border/30 py-2.5 last:border-b-0">
-			<span class="text-sm text-muted-foreground">Modalities</span>
+			<span class="text-body-sm text-muted-foreground">Modalities</span>

 			<span class="ml-auto flex flex-wrap gap-1"><BadgesModality {modalities} /></span>
 		</div>
@@ -177,7 +177,7 @@
 </div>

 {#if !serverProps}
-	<p class="pt-2 text-xs text-muted-foreground">
+	<p class="pt-2 text-caption text-muted-foreground">
 		/props values - file path, slots, build info - appear once the model is loaded. Reading this
 		page never loads a model.
 	</p>
@@ -186,11 +186,11 @@
 <div class="mt-4">
 	<CollapsibleSection triggerClass={sectionTrigger}>
 		{#snippet trigger()}
-			<span class="text-sm font-medium">Chat Template</span>
+			<span class="text-label">Chat Template</span>
 		{/snippet}

 		<pre
-			class="mt-1 rounded-md bg-muted/50 p-2 text-xs whitespace-pre-wrap">{serverProps?.chat_template ??
+			class="mt-1 rounded-md bg-muted/50 p-2 text-caption whitespace-pre-wrap">{serverProps?.chat_template ??
 				gguf?.chat_template ??
 				'Shown once the model is loaded.'}</pre>
 	</CollapsibleSection>
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 32890eb88..948bdc378 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
@@ -144,7 +144,7 @@
 	shouldScaleBackground={false}
 >
 	<Drawer.Content
-		class="data-[vaul-drawer-direction=bottom]:h-[85dvh] data-[vaul-drawer-direction=bottom]:max-h-[85dvh] data-[vaul-drawer-direction=right]:w-[30rem] data-[vaul-drawer-direction=right]:max-w-[calc(100vw-2rem)] data-[vaul-drawer-direction=right]:sm:max-w-[30rem]"
+		class="data-[vaul-drawer-direction=bottom]:h-[85dvh] data-[vaul-drawer-direction=bottom]:max-h-[85dvh] data-[vaul-drawer-direction=right]:w-120 data-[vaul-drawer-direction=right]:max-w-[calc(100vw-2rem)] data-[vaul-drawer-direction=right]:sm:max-w-120"
 	>
 		<Drawer.Title class="sr-only">Model details</Drawer.Title>

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 1f25c3a55..2c25dddd1 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
@@ -91,7 +91,7 @@
 				<span class="flex min-w-0 items-center gap-1.25">
 					<ModelId
 						aliases={option.aliases}
-						class="min-w-0 flex-1 max-md:text-sm"
+						class="min-w-0 flex-1 max-md:text-body-sm"
 						draftSidecars={option.draftSidecars}
 						hideCapabilities
 						hideModalities
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 e24f4e91b..b29212136 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
@@ -286,9 +286,10 @@
 				size="size-6"
 			/>

-			<span class="truncate text-sm font-medium">{family.label}</span>
+			<span class="truncate text-label">{family.label}</span>

-			<span class="shrink-0 text-sm whitespace-nowrap text-muted-foreground">{countLabel}</span>
+			<span class="shrink-0 text-body-sm whitespace-nowrap text-muted-foreground">{countLabel}</span
+			>
 		</span>

 		<!-- the context and status columns stay empty here: the fold control is this
@@ -326,7 +327,7 @@
 })}
 	<div class="px-2 max-md:px-3">
 		<button
-			class="w-full cursor-pointer rounded-md px-2 py-2 text-left text-xs text-muted-foreground transition hover:bg-muted/40"
+			class="w-full cursor-pointer rounded-md px-2 py-2 text-left text-caption text-muted-foreground transition hover:bg-muted/40"
 			onclick={onMore}
 			type="button"
 		>
@@ -352,7 +353,7 @@
 	/>

 	<div
-		class="{MODEL_ROW_GRID_CLASS} shrink-0 border-b border-border/30 px-2 pb-2 text-xs font-medium text-muted-foreground max-md:px-3 dark:border-border/20"
+		class="{MODEL_ROW_GRID_CLASS} shrink-0 border-b border-border/30 px-2 pb-2 text-label-sm text-muted-foreground max-md:px-3 dark:border-border/20"
 	>
 		<span>{@render sortHeader(ModelsTableSortKey.NAME, 'Model')}</span>

@@ -390,7 +391,7 @@
 					label={group.label}
 					persistKey={group.key}
 					revealChevronOnHover
-					sectionHeaderClass="m-0 rounded-lg px-2 py-2 text-[13px] font-semibold text-foreground/85 select-none transition-colors hover:bg-muted max-md:px-3"
+					sectionHeaderClass="m-0 rounded-lg px-2 py-2 text-body-sm font-semibold text-foreground/85 select-none transition-colors hover:bg-muted max-md:px-3"
 					sticky
 					stickyClass="sticky z-10 bg-muted/70 backdrop-blur-lg"
 				>
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 2099309e5..51b212f5a 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
@@ -59,13 +59,13 @@
 			style="padding-left: {indent}px"
 			type="button"
 		>
-			<Badge class="h-5 shrink-0 px-1.5 text-[10px]" variant="secondary">{quant}</Badge>
+			<Badge class="h-5 shrink-0 px-1.5 text-caption-sm" variant="secondary">{quant}</Badge>

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

-			<span class="truncate text-sm text-muted-foreground">{option.model}</span>
+			<span class="truncate text-body-sm text-muted-foreground">{option.model}</span>
 		</button>

 		<ModelContext
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 eee8d9ebb..df0072010 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
@@ -67,7 +67,7 @@
 				<ModelCapabilities hideModalities={deviceStore.isMobile} option={entry.base} />
 			</span>

-			<span class="block text-xs text-muted-foreground">{groupLabel}</span>
+			<span class="block text-caption text-muted-foreground">{groupLabel}</span>
 		</span>
 	</span>

diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerStatusCell.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerStatusCell.svelte
index 7e0eaf5eb..2190ec932 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerStatusCell.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsManager/ModelsManagerStatusCell.svelte
@@ -35,7 +35,7 @@
 	/>
 {:else}
 	<span
-		class="justify-self-center text-sm text-muted-foreground {className}"
+		class="justify-self-center text-body-sm text-muted-foreground {className}"
 		title="Served by this server"
 	>
 		-
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 de731fc44..64cb5a331 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSection.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSection.svelte
@@ -40,7 +40,7 @@
 		onBack,
 		persistKey,
 		revealChevronOnHover = false,
-		sectionHeaderClass = 'm-0 px-2 py-2 text-[13px] font-semibold text-muted-foreground select-none',
+		sectionHeaderClass = 'm-0 px-2 py-2 text-body-sm font-semibold text-muted-foreground select-none',
 		sticky = false,
 		stickyClass = 'sticky z-10 bg-popover'
 	}: Props = $props();
@@ -89,7 +89,7 @@
 		{/if}

 		{#if count !== undefined}
-			<span class="shrink-0 text-xs text-muted-foreground/70">{count}</span>
+			<span class="shrink-0 text-caption text-muted-foreground/70">{count}</span>
 		{/if}
 	{/snippet}

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 7138a07f9..07885351c 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
@@ -290,7 +290,7 @@
 			<button
 				aria-disabled="true"
 				aria-selected="true"
-				class="flex w-full cursor-not-allowed items-center bg-surface-danger p-2 text-left text-sm text-fg-danger"
+				class="flex w-full cursor-not-allowed items-center bg-surface-danger p-2 text-left text-body-sm text-fg-danger"
 				disabled
 				role="option"
 				type="button"
@@ -302,12 +302,12 @@
 					modelId={displayModel}
 				/>

-				<span class="ml-2 text-xs whitespace-nowrap opacity-70">(not available)</span>
+				<span class="ml-2 text-caption whitespace-nowrap opacity-70">(not available)</span>
 			</button>
 		{/if}

 		{#if ms.isEmpty}
-			<p class="px-4 py-3 text-sm text-muted-foreground">{ms.emptyMessage}</p>
+			<p class="px-4 py-3 text-body-sm text-muted-foreground">{ms.emptyMessage}</p>
 		{/if}

 		<ModelsSelectorList
@@ -318,14 +318,14 @@
 			loaded={ms.loadedItems}
 			onSelect={ms.handleSelect}
 			renderOption={modelOption}
-			sectionHeaderClass="[&:not(:first-child)]:mt-2 mb-1 px-2 py-2.5 text-sm font-semibold text-foreground/80 select-none"
+			sectionHeaderClass="[&:not(:first-child)]:mt-2 mb-1 px-2 py-2.5 text-body-sm font-semibold text-foreground/80 select-none"
 			{showOrgName}
 		/>
 	</div>
 {/snippet}

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

 		Loading models...
@@ -333,18 +333,18 @@
 {:else if ms.options.length === 0 && ms.isMultiModel}
 	{#if displayModel}
 		<span
-			class="inline-flex items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs text-muted-foreground"
+			class="inline-flex items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-caption text-muted-foreground"
 			style="max-width: min(calc(100cqw - 10rem), 48rem)"
 		>
 			<MODEL_ICON class="size-icon-sm shrink-0" />
 		</span>
 	{:else}
-		<span class="text-xs text-muted-foreground">No models yet.</span>
+		<span class="text-caption text-muted-foreground">No models yet.</span>
 	{/if}
 {: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-(--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"
+			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-caption shadow-(--elevation-key) 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-body-sm 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)"
@@ -383,7 +383,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-(--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"
+		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-caption shadow-(--elevation-key) 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-body-sm 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)"
@@ -415,7 +415,7 @@
 				<button
 					{...props}
 					class={[
-						`inline-flex items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-(--chat-form-key-shadow) transition 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 items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-caption shadow-(--elevation-key) transition 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`,
 						uiStore.isModelsManagerShown
 							? 'cursor-pointer hover:bg-muted-foreground/20'
 							: 'cursor-default',
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 012b7e7c9..3a7bf510b 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
@@ -68,7 +68,7 @@
      compact sub-lines instead of rows of their own. -->
 <div class="group relative rounded-sm transition-colors hover:bg-accent/50">
 	<div
-		class="flex items-center gap-2 p-2 text-left text-sm max-md:gap-2.5 max-md:px-2.5 max-md:py-2.5"
+		class="flex items-center gap-2 p-2 text-left text-body-sm max-md:gap-2.5 max-md:px-2.5 max-md:py-2.5"
 	>
 		<button
 			aria-label="Manage model"
@@ -95,11 +95,11 @@
 			/>

 			{#if percent !== null}
-				<span class="ml-auto shrink-0 font-mono text-xs tabular-nums text-muted-foreground">
+				<span class="ml-auto shrink-0 font-mono text-caption tabular-nums text-muted-foreground">
 					{percent}%
 				</span>
 			{:else if entry.isPaused}
-				<span class="ml-auto shrink-0 text-xs text-muted-foreground">Paused</span>
+				<span class="ml-auto shrink-0 text-caption text-muted-foreground">Paused</span>
 			{/if}
 		</button>

@@ -113,15 +113,15 @@
 		>
 			{#if entry.isPaused}
 				<Play
-					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"
+					class="absolute size-icon-md scale-75 opacity-0 transition-[opacity,transform] duration-150 ease-out-quint group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			{:else}
 				<Loader2
-					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"
+					class="absolute size-icon-md animate-spin text-muted-foreground transition-opacity duration-150 ease-out-quint group-hover:opacity-0 [@media(pointer:coarse)]:hidden"
 				/>

 				<Pause
-					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"
+					class="absolute size-icon-md opacity-0 transition-opacity duration-150 ease-out-quint group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			{/if}
 		</button>
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 aef7b0883..41664fa3f 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
@@ -164,7 +164,7 @@
 				<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-(--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`,
+						`relative inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1 rounded-sm bg-background px-1.5 py-1 text-caption shadow-(--elevation-key) transition hover:bg-muted-foreground/20 max-md:h-8 max-md:px-2.25 max-md:py-1.25 max-md:text-body-sm 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
 							? 'border-line-danger-soft bg-surface-danger !text-fg-danger hover:bg-surface-danger/80'
 							: 'text-foreground',
@@ -243,7 +243,7 @@ manager's other entry points -->
 			<button
 				aria-disabled="true"
 				aria-selected="true"
-				class="flex w-full cursor-not-allowed items-center bg-surface-danger p-2 text-left text-sm text-fg-danger"
+				class="flex w-full cursor-not-allowed items-center bg-surface-danger p-2 text-left text-body-sm text-fg-danger"
 				disabled
 				role="option"
 				type="button"
@@ -255,12 +255,12 @@ manager's other entry points -->
 					modelId={currentModel}
 				/>

-				<span class="ml-2 text-xs whitespace-nowrap opacity-70">(not available)</span>
+				<span class="ml-2 text-caption whitespace-nowrap opacity-70">(not available)</span>
 			</button>
 		{/if}

 		{#if ms.isEmpty}
-			<p class="px-4 py-3 text-sm text-muted-foreground">{ms.emptyMessage}</p>
+			<p class="px-4 py-3 text-body-sm text-muted-foreground">{ms.emptyMessage}</p>
 		{/if}

 		<ModelsSelectorList
@@ -271,7 +271,7 @@ manager's other entry points -->
 			loaded={ms.loadedItems}
 			onSelect={ms.handleSelect}
 			renderOption={modelOption}
-			sectionHeaderClass="[&:not(:first-child)]:mt-1 mb-1 px-2 py-2 text-[13px] font-semibold text-foreground/80 select-none"
+			sectionHeaderClass="[&:not(:first-child)]:mt-1 mb-1 px-2 py-2 text-body-sm font-semibold text-foreground/80 select-none"
 			{showOrgName}
 		/>
 	</div>
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 4e0b81d97..2dfe70949 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
@@ -49,7 +49,7 @@
 		loaded = [],
 		onSelect,
 		renderOption,
-		sectionHeaderClass = 'm-0 px-2 py-2 text-[13px] font-semibold text-muted-foreground/70 select-none',
+		sectionHeaderClass = 'm-0 px-2 py-2 text-body-sm font-semibold text-muted-foreground/70 select-none',
 		showOrgName = true
 	}: Props = $props();
 	let render = $derived(renderOption ?? defaultOption);
@@ -117,11 +117,11 @@
 			size="size-6"
 		/>

-		<span class="truncate text-[13px] font-semibold text-muted-foreground/70">
+		<span class="truncate text-body-sm font-semibold text-muted-foreground/70">
 			{family.label}
 		</span>

-		<span class="text-xs text-muted-foreground">
+		<span class="text-caption text-muted-foreground">
 			{family.entries.length} model{family.entries.length === 1 ? '' : 's'}
 		</span>
 	</div>
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorOption.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorOption.svelte
index b3cb31fa4..09ddcf83c 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorOption.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorOption.svelte
@@ -54,7 +54,7 @@
 <div
 	aria-selected={isSelected || isHighlighted}
 	class={[
-		'group relative flex w-full items-center gap-2 rounded-sm p-2 text-left text-sm transition focus:outline-none',
+		'group relative flex w-full items-center gap-2 rounded-sm p-2 text-left text-body-sm transition focus:outline-none',
 		'cursor-pointer',
 		// skip layout and paint for rows scrolled out of the long lists
 		'[content-visibility:auto] [contain-intrinsic-size:auto_2.25rem] max-md:[contain-intrinsic-size:auto_3rem]',
diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorReasoning.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorReasoning.svelte
index b2e829073..c412dc905 100644
--- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorReasoning.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorReasoning.svelte
@@ -31,7 +31,7 @@

 	<span class="flex-1">Reasoning</span>

-	<span class="text-xs text-muted-foreground">{current}</span>
+	<span class="text-caption text-muted-foreground">{current}</span>
 {/snippet}

 {#snippet levelLabel(level: ReasoningEffortLevel)}
@@ -46,7 +46,7 @@
 	<span class="min-w-0 flex-1 truncate">{level.label}</span>

 	{#if tokenLabel}
-		<span class="shrink-0 text-[11px] text-muted-foreground opacity-60">{tokenLabel}</span>
+		<span class="shrink-0 text-caption text-muted-foreground opacity-60">{tokenLabel}</span>
 	{/if}
 {/snippet}

@@ -68,13 +68,13 @@
 		<CollapsibleSection
 			defaultOpen={false}
 			trigger={header}
-			triggerClass="flex min-h-11 w-full cursor-pointer items-center gap-2 rounded-md px-3 text-left text-sm transition-colors hover:bg-accent"
+			triggerClass="flex min-h-11 w-full cursor-pointer items-center gap-2 rounded-md px-3 text-left text-body-sm transition-colors hover:bg-accent"
 		>
 			<div class="flex flex-col">
 				{#each reasoning.levels as level (level.value)}
 					<button
 						aria-pressed={reasoning.isSelected(level)}
-						class="flex min-h-11 w-full cursor-pointer items-center gap-3 rounded-md pr-3 pl-6 text-left text-sm transition-colors hover:bg-accent"
+						class="flex min-h-11 w-full cursor-pointer items-center gap-3 rounded-md pr-3 pl-6 text-left text-body-sm transition-colors hover:bg-accent"
 						onclick={() => reasoning.select(level)}
 						type="button"
 					>
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 46cc9d16a..5cb8bcf54 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
@@ -177,14 +177,14 @@
 	<div>
 		{#if modelsDiscoverStore.error}
 			<div class="flex flex-col items-start gap-2 p-4">
-				<p class="text-sm text-destructive">{modelsDiscoverStore.error}</p>
+				<p class="text-body-sm text-destructive">{modelsDiscoverStore.error}</p>

 				<Button onclick={() => void modelsDiscoverStore.fetch()} size="sm" variant="outline">
 					Retry
 				</Button>
 			</div>
 		{:else if !modelsDiscoverStore.loading && !modelsDiscoverStore.searching && modelsDiscoverStore.models.length === 0}
-			<p class="p-4 text-sm text-muted-foreground">No models found</p>
+			<p class="p-4 text-body-sm text-muted-foreground">No models found</p>
 		{:else}
 			{#if isSearching}
 				{@render catalog()}
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 8cfe3c93e..c76743721 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
@@ -38,11 +38,11 @@
 			class="flex-row items-center gap-2 border-b border-border/40 p-4"
 			showCloseButton={false}
 		>
-			<Dialog.Title class="text-sm font-semibold">Chat template</Dialog.Title>
+			<Dialog.Title class="text-body-sm font-semibold">Chat template</Dialog.Title>

 			<Button
 				aria-label="Copy chat template"
-				class="h-auto gap-1.5 px-2 py-1 text-xs"
+				class="h-auto gap-1.5 px-2 py-1 text-caption"
 				onclick={() => void copy()}
 				size="sm"
 				variant="secondary"
diff --git a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetails.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetails.svelte
index bf6bc7529..8cbaac857 100644
--- a/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetails.svelte
+++ b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetails.svelte
@@ -80,7 +80,7 @@
 	<ModelsDiscoverDetailsSkeleton />
 {:else if error}
 	<div class="flex h-full items-center justify-center py-20">
-		<p class="text-sm text-destructive">{error}</p>
+		<p class="text-body-sm text-destructive">{error}</p>
 	</div>
 {:else if details}
 	<div class="@container space-y-6 p-6 pr-0">
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 ce0e8283a..b06088cf8 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
@@ -211,7 +211,7 @@
 		     readonly. -->
 		{#if draftKinds.length}
 			<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"
+				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-caption text-muted-foreground dark:border-border/35"
 			>
 				<label class="flex cursor-pointer items-center gap-2" for="discover-draft-sidecars">
 					<Checkbox bind:checked={withDraft} id="discover-draft-sidecars" />
@@ -235,9 +235,9 @@
 						{draftKindLabel}
 					</Select.Trigger>

-					<Select.Content class="font-mono text-xs">
+					<Select.Content class="font-mono text-caption">
 						{#each draftKinds as kind (kind)}
-							<Select.Item class="text-xs" label={kind.toUpperCase()} value={kind}>
+							<Select.Item class="text-caption" label={kind.toUpperCase()} value={kind}>
 								{kind.toUpperCase()}
 							</Select.Item>
 						{/each}
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 407f5786c..f7e6dddea 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
@@ -65,7 +65,7 @@
 >
 	<!-- Single line: long commands scroll horizontally instead of wrapping. -->
 	<div
-		class="flex min-w-0 flex-1 items-center gap-x-2 overflow-x-auto py-0.5 font-mono text-xs whitespace-nowrap text-foreground/90"
+		class="flex min-w-0 flex-1 items-center gap-x-2 overflow-x-auto py-0.5 font-mono text-caption whitespace-nowrap text-foreground/90"
 	>
 		<span class="shrink-0">{SERVE_COMMAND.BIN}</span>

@@ -105,9 +105,9 @@
 						{SPEC_TYPE[draftKind]}
 					</Select.Trigger>

-					<Select.Content class="font-mono text-xs">
+					<Select.Content class="font-mono text-caption">
 						{#each draftKinds as kind (kind)}
-							<Select.Item class="text-xs" label={SPEC_TYPE[kind]} value={kind}>
+							<Select.Item class="text-caption" label={SPEC_TYPE[kind]} value={kind}>
 								{SPEC_TYPE[kind]}
 							</Select.Item>
 						{/each}
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 2ba973c2c..aa57f1669 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
@@ -16,7 +16,7 @@

 	// one source, so the chip matches the draft badge of a quant chip
 	const SIDECAR_BADGE_CLASS =
-		'rounded-md bg-primary px-1 py-0.5 text-[10px] font-semibold tracking-wide text-primary-foreground uppercase';
+		'rounded-md bg-primary px-1 py-0.5 text-caption-sm font-semibold tracking-wide text-primary-foreground uppercase';

 	let tooltipText = $derived(`Add the ${companion.kind} draft for ${repoWithTag}`);

@@ -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-(--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"
+				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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint hover:bg-muted-foreground/10 hover:border-border active:scale-97 dark:border-border/40 dark:hover:bg-muted-foreground/15"
 				onclick={addDraft}
 				type="button"
 			>
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 77657058c..9fd3b34db 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
@@ -23,7 +23,7 @@

 	// one source, so the idle, in-flight and downloaded chip states stay identical
 	const SIDECAR_BADGE_CLASS =
-		'rounded-md bg-primary px-1 py-0.5 text-[10px] font-semibold tracking-wide text-primary-foreground uppercase';
+		'rounded-md bg-primary px-1 py-0.5 text-caption-sm font-semibold tracking-wide text-primary-foreground uppercase';

 	/** Queue the download; a failed attempt leaves partial files, drop them first. */
 	async function startDownload() {
@@ -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-(--elevation-control) 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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint active:scale-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"
@@ -133,11 +133,11 @@
 		<!-- 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"
+				class="absolute size-icon-sm text-green-500 transition-[opacity,transform] duration-150 ease-out-quint 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"
+				class="absolute size-icon-sm scale-75 text-destructive opacity-0 transition-[opacity,transform] duration-150 ease-out-quint group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 			/>
 		</span>
 	</button>
@@ -169,11 +169,11 @@
 			     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"
+					class="absolute size-icon-sm animate-spin text-muted-foreground transition-opacity duration-150 ease-out-quint 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"
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-out-quint group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			</span>
 		{:else}
@@ -181,11 +181,11 @@
 			     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"
+					class="absolute size-icon-sm text-muted-foreground transition-opacity duration-150 ease-out-quint 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"
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-out-quint group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			</span>
 		{/if}
@@ -203,7 +203,7 @@
 		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"
+			class="size-icon-sm transition-[opacity,transform,color] duration-150 ease-out-quint 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-(--elevation-control) 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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint active:scale-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-(--badge-danger-background) px-1 py-0.5 text-[10px] font-semibold tracking-wide text-(--badge-danger-text) uppercase"
+				class="rounded-md bg-(--action-danger) px-1 py-0.5 text-caption-sm font-semibold tracking-wide text-(--fg-on-danger) uppercase"
 			>
 				Failed
 			</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-(--elevation-control) 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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint active:scale-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 c50758575..763179cde 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
@@ -75,7 +75,7 @@
 		     the copy matches what the chips download -->
 		<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"
+			class="flex w-fit cursor-pointer flex-col items-start gap-0.5 text-left text-body-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"
 		>
@@ -87,7 +87,7 @@
 				{/if}

 				<ChevronDown
-					class="size-icon-xs 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-out-quint {commandOpen
 						? 'rotate-180'
 						: ''}"
 				/>
@@ -95,7 +95,7 @@

 			{#if totalMemGb}
 				<span
-					class="text-[10px] whitespace-nowrap text-muted-foreground/60 @max-lg:whitespace-normal"
+					class="text-caption-sm whitespace-nowrap text-muted-foreground/60 @max-lg:whitespace-normal"
 				>
 					needs at least {totalMemGb}{GIGABYTE_LABEL} memory
 				</span>
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 136acf32e..64bdbd5f6 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
@@ -54,7 +54,7 @@

 			<div class="min-w-0">
 				<div class="flex items-center gap-2 @max-lg:flex-col @max-lg:items-start">
-					<h1 class="truncate text-lg font-semibold @max-lg:w-full">{details.id ?? modelId}</h1>
+					<h1 class="truncate text-title @max-lg:w-full">{details.id ?? modelId}</h1>

 					<ModelCapabilityIcons
 						gapClass="gap-2"
@@ -67,7 +67,7 @@

 				{#if baseModels.length}
 					<div class="flex items-center gap-1">
-						<span class="truncate text-xs text-muted-foreground">{baseModels.join(', ')}</span>
+						<span class="truncate text-caption text-muted-foreground">{baseModels.join(', ')}</span>

 						<a
 							aria-label="View base model on HuggingFace"
@@ -84,7 +84,7 @@
 		</div>

 		<Button
-			class="h-auto gap-1.5 px-2.5 py-1.5 text-xs"
+			class="h-auto gap-1.5 px-2.5 py-1.5 text-caption"
 			href={HuggingFaceService.getModelUrl(modelId)}
 			rel="noopener noreferrer"
 			size="sm"
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 9fd00e11f..2431b3bdb 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
@@ -10,7 +10,7 @@
 	let { details }: Props = $props();
 </script>

-<div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground">
+<div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-body-sm text-muted-foreground">
 	{#if typeof details.downloads === 'number'}
 		<span class="inline-flex items-center gap-1.5">
 			<Download class="size-icon-sm" />
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 ec651ef68..c222d4ab0 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
@@ -26,7 +26,7 @@
 </script>

 {#if description}
-	<p class="text-sm text-muted-foreground">{description}</p>
+	<p class="text-body-sm text-muted-foreground">{description}</p>
 {/if}

 <!-- Metadata chips: label | value pairs, matching the HF model page style -->
@@ -51,7 +51,7 @@

 	{#if gguf?.chat_template}
 		<Button
-			class="h-auto gap-1.5 px-2.5 py-1 text-xs"
+			class="h-auto gap-1.5 px-2.5 py-1 text-caption"
 			onclick={() => (chatTemplateOpen = true)}
 			size="sm"
 			variant="secondary"
@@ -67,7 +67,7 @@

 	{#if details.gated === true}
 		<span
-			class="rounded bg-yellow-500/10 px-2 py-0.5 text-xs font-medium text-yellow-600 dark:text-yellow-400"
+			class="rounded bg-yellow-500/10 px-2 py-0.5 text-label-sm text-yellow-600 dark:text-yellow-400"
 		>
 			gated
 		</span>
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 bd0d9402d..1d44a5559 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 bg-muted/60 text-xs elevated-control dark:bg-muted/75"
+	class="inline-flex items-center divide-x divide-border rounded-md bg-muted/60 text-caption 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/ModelsDiscoverList/ModelsDiscoverListItem.svelte b/ui/apps/chat/src/lib/components/app/models/discover/ModelsDiscoverList/ModelsDiscoverListItem.svelte
index b33ca55f0..429df305d 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
@@ -202,7 +202,7 @@
 		     its place on hover, the way the table's status column does -->
 			<span class="flex shrink-0 items-center gap-0.5 pr-2.5">
 				<span
-					class="text-xs text-muted-foreground tabular-nums group-hover:hidden [@media(pointer:coarse)]:hidden"
+					class="text-caption text-muted-foreground tabular-nums group-hover:hidden [@media(pointer:coarse)]:hidden"
 				>
 					{percent !== null ? `${percent}%` : state.isPaused ? 'Paused' : 'Downloading'}
 				</span>
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 2f6791807..2d96c5adc 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/ContextMenuActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/ContextMenuActions.svelte
@@ -25,7 +25,7 @@
 		{@render children()}
 	</ContextMenu.Trigger>

-	<ContextMenu.Content class="z-[999999] w-48">
+	<ContextMenu.Content class="z-999999 w-48">
 		<MenuActionsList {actions} kind={MenuKind.CONTEXT} onClose={() => (open = false)} />
 	</ContextMenu.Content>
 </ContextMenu.Root>
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 4ec52452d..878aa540a 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuActions.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuActions.svelte
@@ -45,7 +45,7 @@

 {#if isMobile}
 	<button
-		class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md p-0 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground {triggerClass}"
+		class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md p-0 text-label transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground {triggerClass}"
 		data-slot="dropdown-menu-trigger"
 		data-state={open ? 'open' : 'closed'}
 		onclick={(event) => {
@@ -74,7 +74,7 @@
 					{/if}

 					<button
-						class="flex min-h-11 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left text-sm transition-colors hover:bg-accent disabled:pointer-events-none disabled:opacity-50 {action.variant ===
+						class="flex min-h-11 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left text-body-sm transition-colors hover:bg-accent disabled:pointer-events-none disabled:opacity-50 {action.variant ===
 						'destructive'
 							? 'text-destructive'
 							: ''}"
@@ -89,7 +89,7 @@

 							<!-- a phone has no hover, so the hint sits under the label -->
 							{#if action.tooltip}
-								<span class="text-xs text-muted-foreground">{action.tooltip}</span>
+								<span class="text-caption text-muted-foreground">{action.tooltip}</span>
 							{/if}
 						</span>

@@ -109,7 +109,7 @@
 				{#snippet child({ props })}
 					<DropdownMenu.Trigger
 						{...props}
-						class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md p-0 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground {triggerClass}"
+						class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md p-0 text-label transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground {triggerClass}"
 						onclick={(e) => e.stopPropagation()}
 					>
 						{@render iconComponent(triggerIcon, 'h-3 w-3')}
@@ -128,7 +128,7 @@
 			{/if}
 		</Tooltip.Root>

-		<DropdownMenu.Content {align} class="z-[999999] w-48" customAnchor={anchor}>
+		<DropdownMenu.Content {align} class="z-999999 w-48" customAnchor={anchor}>
 			<MenuActionsList {actions} kind={MenuKind.DROPDOWN} onClose={() => (open = false)} />
 		</DropdownMenu.Content>
 	</DropdownMenu.Root>
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 bc652d811..059af0e54 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte
@@ -71,7 +71,7 @@
 			{@render children()}

 			{#if isEmpty}
-				<div class="px-2 py-3 text-center text-sm text-muted-foreground">{emptyMessage}</div>
+				<div class="px-2 py-3 text-center text-body-sm text-muted-foreground">{emptyMessage}</div>
 			{/if}
 		</div>
 	</div>
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 a7041c21f..a86d74ced 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/MenuActionsList.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/MenuActionsList.svelte
@@ -40,7 +40,7 @@
 				{/snippet}
 			</Tooltip.Trigger>

-			<Tooltip.Content class="z-[999999] max-w-64" side="left">
+			<Tooltip.Content class="z-999999 max-w-64" side="left">
 				<p>{action.tooltip}</p>
 			</Tooltip.Content>
 		</Tooltip.Root>
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 52c9903fb..4ca101874 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-(--sidebar-radius)',
+			'md:rounded-2xl',
 			'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',
@@ -621,7 +621,7 @@
 								: 'Go to start'}
 						class="pointer-events-auto size-10 rounded-full! md:size-9 {isStripHidden
 							? 'bg-transparent! hover:bg-transparent!'
-							: 'matte-key bg-surface-raised! hover:bg-surface-raised! dark:bg-muted-foreground/15! dark:hover:bg-muted-foreground/15!'}"
+							: 'matte-key bg-card! hover:bg-card! 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="matte-key size-10 rounded-full! bg-surface-raised! hover:bg-surface-raised! dark:bg-muted-foreground/15! dark:hover:bg-muted-foreground/15!"
+						class="matte-key size-10 rounded-full! bg-card! hover:bg-card! 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 c9c6c2bc5..820eb29cb 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
@@ -105,7 +105,7 @@
 		{#if showIcons}
 			<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
+					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-body {isActive
 						? 'selected-row-surface text-accent-foreground'
 						: ''}"
 					href={item.route}
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 70202c483..a59aaddb8 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
@@ -328,7 +328,7 @@
 			isSelected && 'bg-primary/10 hover:bg-primary/15',
 			isSelectionMode && 'is-selection-mode',
 			// the row sinks while a finger holds it, and stays lit while its menu is open
-			longPress.isPressing && 'scale-[0.97] bg-foreground/10 duration-(--row-hold-ms) ease-out',
+			longPress.isPressing && 'scale-97 bg-foreground/10 duration-(--row-hold-ms) ease-out',
 			deviceStore.isMobile && dropdownOpen && 'bg-foreground/10'
 		]}
 		{...{ [UI_DATA_ATTRS.CONVERSATION_ROW]: conversation.id }}
@@ -423,7 +423,7 @@
 			{/if}

 			<TruncatedText
-				class="text-sm max-md:text-[17px]"
+				class="text-body-sm max-md:text-body"
 				showTooltip={false}
 				text={conversation.name}
 			/>
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationList.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationList.svelte
index ab7a2dfde..5893c81c9 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationList.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationList.svelte
@@ -212,7 +212,7 @@
 					isDragged && 'sidebar-drag-surface relative z-20 rounded-lg',
 					isDragged &&
 						sidebarDragStore.settling &&
-						'transition-transform duration-200 ease-[cubic-bezier(0.23,1,0.32,1)]'
+						'transition-transform duration-200 ease-out-quint'
 				]}
 				data-sidebar-slot={section.id}
 			>
@@ -368,7 +368,7 @@

 				{#if conversations.length === 0}
 					<li class="px-2 py-4 text-center">
-						<p class="mb-4 p-4 text-sm text-muted-foreground">No conversations yet</p>
+						<p class="mb-4 p-4 text-body-sm text-muted-foreground">No conversations yet</p>
 					</li>
 				{/if}

diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSection.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSection.svelte
index 8a2c58c37..4a9ab73ed 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSection.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationGroupSection.svelte
@@ -143,7 +143,7 @@
 			{:else}
 				<li>
 					<button
-						class="w-full rounded-lg px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground"
+						class="w-full rounded-lg px-2 py-1.5 text-left text-caption text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground"
 						onclick={() => void startChat()}
 						type="button"
 					>
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 59c9d0b8c..b6a37c9f4 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
@@ -74,12 +74,9 @@
 		<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
+	<!-- 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
-		class="z-[999999] w-64 p-1.5"
-		onOpenAutoFocus={(event) => event.preventDefault()}
-	>
+	<Menu.SubContent class="z-999999 w-64 p-1.5" onOpenAutoFocus={(event) => event.preventDefault()}>
 		<SearchInput
 			bind:ref={searchInput}
 			bind:value={query}
@@ -91,7 +88,7 @@
 		<div aria-hidden="true" class="mx-1 my-1.5 h-px bg-border/40"></div>

 		<button
-			class="flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent"
+			class="flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-body-sm hover:bg-accent"
 			onclick={handleNewGroup}
 			type="button"
 		>
@@ -106,7 +103,7 @@
 			<div class="flex max-h-64 flex-col gap-0.5 overflow-y-auto">
 				{#each groups as group (group.id)}
 					<button
-						class="flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent"
+						class="flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-body-sm hover:bg-accent"
 						onclick={() => select(group.id)}
 						type="button"
 					>
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSearchResults.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSearchResults.svelte
index 2f63354f1..1314f04bf 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSearchResults.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSearchResults.svelte
@@ -46,9 +46,7 @@

 <div class="flex min-h-0 flex-1 flex-col gap-2 whitespace-nowrap {className}">
 	{#if showHeader}
-		<div
-			class="text-muted-foreground flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium"
-		>
+		<div class="text-muted-foreground flex h-8 shrink-0 items-center rounded-md px-2 text-label-sm">
 			Search results
 		</div>
 	{/if}
@@ -84,7 +82,7 @@

 			{#if tree.length === 0}
 				<li class="px-2 py-4 text-center">
-					<p class="mb-4 p-4 text-sm text-muted-foreground">
+					<p class="mb-4 p-4 text-body-sm text-muted-foreground">
 						{emptyMessage}
 					</p>
 				</li>
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSectionHeading.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSectionHeading.svelte
index f8cdff0e4..167fe6a99 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSectionHeading.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationSectionHeading.svelte
@@ -36,7 +36,7 @@
      section still reads as one -->
 <!-- dragging the title moves the whole section among the others -->
 <div
-	class="group/heading flex h-8 min-w-0 shrink-0 items-center gap-0.5 pr-1 text-[13px] font-semibold text-foreground max-md:h-9 max-md:text-[15px] max-md:font-medium max-md:text-muted-foreground {highlighted
+	class="group/heading flex h-8 min-w-0 shrink-0 items-center gap-0.5 pr-1 text-body-sm font-semibold text-foreground max-md:h-9 max-md:text-body max-md:font-medium max-md:text-muted-foreground {highlighted
 		? 'text-foreground'
 		: ''} {className}"
 >
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 8bad1e4d4..9325a065b 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
@@ -83,7 +83,7 @@
 			onCheckedChange={onSelectAllToggle}
 		/>

-		<span class="truncate text-xs font-medium text-muted-foreground">
+		<span class="truncate text-label-sm text-muted-foreground">
 			{selectedCount} / {visibleCount} selected
 		</span>
 	</label>
diff --git a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationShowMore.svelte b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationShowMore.svelte
index 473779cf3..8442a55ef 100644
--- a/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationShowMore.svelte
+++ b/ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationShowMore.svelte
@@ -11,7 +11,7 @@
      section's heading: "Show more" opens the
      whole section, "Show less" closes it back to its first rows -->
 <button
-	class="flex min-h-9 w-full cursor-pointer items-center rounded-lg px-2 py-1.5 text-left text-sm font-normal text-muted-foreground max-md:min-h-12 max-md:rounded-2xl max-md:px-3.5 max-md:text-[17px] md:min-h-8 md:py-1 transition-colors hover:bg-foreground/10 hover:text-foreground"
+	class="flex min-h-9 w-full cursor-pointer items-center rounded-lg px-2 py-1.5 text-left text-body-sm font-normal text-muted-foreground max-md:min-h-12 max-md:rounded-2xl max-md:px-3.5 max-md:text-body md:min-h-8 md:py-1 transition-colors hover:bg-foreground/10 hover:text-foreground"
 	onclick={onToggle}
 	type="button"
 >
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 fab3edba4..a527bcd23 100644
--- a/ui/apps/chat/src/lib/components/app/servers/ServerErrorSplash.svelte
+++ b/ui/apps/chat/src/lib/components/app/servers/ServerErrorSplash.svelte
@@ -134,9 +134,9 @@
 				<AlertTriangle class="size-8 text-destructive" />
 			</div>

-			<h2 class="mb-2 text-xl font-semibold">Server Connection Error</h2>
+			<h2 class="mb-2 text-title">Server Connection Error</h2>

-			<p class="mb-4 text-sm text-muted-foreground">
+			<p class="mb-4 text-body-sm text-muted-foreground">
 				{error}
 			</p>
 		</div>
@@ -153,7 +153,7 @@
 		{#if showApiKeyInput}
 			<div in:fly={{ delay: 200, duration: 300, y: 10 }} class="mb-4 space-y-3 text-left">
 				<div class="space-y-2">
-					<Label class="text-sm font-medium" for="api-key-input">API Key</Label>
+					<Label class="text-label" for="api-key-input">API Key</Label>

 					<div class="relative">
 						<Input
@@ -193,13 +193,13 @@
 					</div>

 					{#if apiKeyError}
-						<p in:fly={{ duration: 200, y: -10 }} class="text-sm text-destructive">
+						<p in:fly={{ duration: 200, y: -10 }} class="text-body-sm text-destructive">
 							{apiKeyError}
 						</p>
 					{/if}

 					{#if apiKeyState === 'success'}
-						<p in:fly={{ duration: 200, y: -10 }} class="text-sm text-green-600">
+						<p in:fly={{ duration: 200, y: -10 }} class="text-body-sm text-green-600">
 							✓ API key validated successfully! Connecting...
 						</p>
 					{/if}
@@ -257,22 +257,22 @@

 		{#if showTroubleshooting}
 			<div in:fly={{ delay: 400, duration: 300, y: 10 }} class="mt-4 text-left">
-				<details class="text-sm">
+				<details class="text-body-sm">
 					<summary class="cursor-pointer text-muted-foreground hover:text-foreground">
 						Troubleshooting
 					</summary>

-					<div class="mt-2 space-y-3 text-xs text-muted-foreground">
+					<div class="mt-2 space-y-3 text-caption text-muted-foreground">
 						<div class="space-y-2">
 							<p class="mb-4 font-medium">Start the llama-server:</p>

-							<div class="rounded bg-muted/50 px-2 py-1 font-mono text-xs">
+							<div class="rounded bg-muted/50 px-2 py-1 font-mono text-caption">
 								<p>llama-server -hf ggml-org/gemma-3-4b-it-GGUF</p>
 							</div>

 							<p>or</p>

-							<div class="rounded bg-muted/50 px-2 py-1 font-mono text-xs">
+							<div class="rounded bg-muted/50 px-2 py-1 font-mono text-caption">
 								<p class="mt-1">llama-server -m locally-stored-model.gguf</p>
 							</div>
 						</div>
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 8e687391b..86238e096 100644
--- a/ui/apps/chat/src/lib/components/app/servers/ServerLoadingSplash.svelte
+++ b/ui/apps/chat/src/lib/components/app/servers/ServerLoadingSplash.svelte
@@ -18,9 +18,9 @@
 				<Server class="size-8 animate-pulse text-muted-foreground" />
 			</div>

-			<h2 class="mb-2 text-xl font-semibold">Connecting to Server</h2>
+			<h2 class="mb-2 text-title">Connecting to Server</h2>

-			<p class="text-sm text-muted-foreground">
+			<p class="text-body-sm text-muted-foreground">
 				{message}
 			</p>
 		</div>
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 630079fd9..4077e0649 100644
--- a/ui/apps/chat/src/lib/components/app/servers/ServerStatus.svelte
+++ b/ui/apps/chat/src/lib/components/app/servers/ServerStatus.svelte
@@ -42,18 +42,18 @@
 	<div class="flex items-center space-x-2">
 		<div class="size-2 rounded-full {getStatusColor()}"></div>

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

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

 			{model || 'Unknown Model'}
 		</Badge>

 		{#if serverData?.default_generation_settings?.n_ctx}
-			<Badge class="text-xs" variant="secondary">
+			<Badge class="text-caption" variant="secondary">
 				ctx: {serverData.default_generation_settings.n_ctx.toLocaleString()}
 			</Badge>
 		{/if}
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 38452cbb9..f18c79c6d 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
@@ -209,7 +209,9 @@
 				</div>

 				<div class="mt-8 border-t border-border/30 pt-6 pb-6">
-					<p class="text-xs text-muted-foreground">Settings are saved in browser's localStorage</p>
+					<p class="text-caption text-muted-foreground">
+						Settings are saved in browser's localStorage
+					</p>
 				</div>
 			</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 4dc97756d..2f66bd4fa 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
@@ -82,7 +82,7 @@
 				})()}

 				<div class="flex items-center gap-2">
-					<Label class="flex items-center gap-1.5 text-sm font-medium" for={field.key}>
+					<Label class="flex items-center gap-1.5 text-label" for={field.key}>
 						{field.label}

 						{#if field.isExperimental}
@@ -132,13 +132,13 @@
 				</div>

 				{#if field.help || SETTING_CONFIG_INFO[field.key]}
-					<p class="mt-1 text-xs text-muted-foreground">
+					<p class="mt-1 text-caption text-muted-foreground">
 						{@html field.help || SETTING_CONFIG_INFO[field.key]}
 					</p>
 				{/if}
 			{:else if field.type === SettingsFieldType.TEXTAREA}
 				{#if field.label}
-					<Label class="block flex items-center gap-1.5 text-sm font-medium" for={field.key}>
+					<Label class="block flex items-center gap-1.5 text-label" for={field.key}>
 						{field.label}

 						{#if field.isExperimental}
@@ -148,7 +148,7 @@
 				{/if}

 				<Textarea
-					class="min-h-[10rem] w-full md:max-w-3xl"
+					class="min-h-40 w-full md:max-w-3xl"
 					id={field.key}
 					oninput={(e) => onConfigChange(field.key, e.currentTarget.value)}
 					placeholder=""
@@ -156,7 +156,7 @@
 				/>

 				{#if field.help || SETTING_CONFIG_INFO[field.key]}
-					<p class="mt-1 text-xs text-muted-foreground">
+					<p class="mt-1 text-caption text-muted-foreground">
 						{field.help || SETTING_CONFIG_INFO[field.key]}
 					</p>
 				{/if}
@@ -170,7 +170,7 @@
 								onConfigChange(SETTINGS_KEYS.SHOW_SYSTEM_MESSAGE, Boolean(checked))}
 						/>

-						<Label class="cursor-pointer text-sm font-normal" for="showSystemMessage">
+						<Label class="cursor-pointer text-body-sm font-normal" for="showSystemMessage">
 							Show system message in conversations
 						</Label>
 					</div>
@@ -191,7 +191,7 @@
 				})()}

 				<div class="flex items-center gap-2">
-					<Label class="flex items-center gap-1.5 text-sm font-medium" for={field.key}>
+					<Label class="flex items-center gap-1.5 text-label" for={field.key}>
 						{field.label}

 						{#if field.isExperimental}
@@ -261,7 +261,7 @@
 				</Select.Root>

 				{#if field.help || SETTING_CONFIG_INFO[field.key]}
-					<p class="mt-1 text-xs text-muted-foreground">
+					<p class="mt-1 text-caption text-muted-foreground">
 						{field.help || SETTING_CONFIG_INFO[field.key]}
 					</p>
 				{/if}
@@ -271,7 +271,7 @@
 					radioOptions.find((o: { key: string }) => Boolean(localConfig[o.key]))?.value ??
 					radioOptions[0].value}

-				<Label class="flex items-center gap-1.5 text-sm font-medium mb-4">
+				<Label class="flex items-center gap-1.5 text-label mb-4">
 					{field.label}

 					{#if field.isExperimental}
@@ -294,7 +294,7 @@
 							<RadioGroup.Item id={itemId} value={opt.value} />

 							<Label
-								class="flex cursor-pointer items-center gap-1.5 text-sm font-normal"
+								class="flex cursor-pointer items-center gap-1.5 text-body-sm font-normal"
 								for={itemId}
 							>
 								{opt.label}
@@ -308,7 +308,7 @@
 				</RadioGroup.Root>

 				{#if field.help || SETTING_CONFIG_INFO[field.key]}
-					<p class="text-xs text-muted-foreground">
+					<p class="text-caption text-muted-foreground">
 						{field.help || SETTING_CONFIG_INFO[field.key]}
 					</p>
 				{/if}
@@ -324,7 +324,7 @@

 					<div class="space-y-1">
 						<label
-							class="flex items-center gap-1.5 pt-1 pb-0.5 text-sm leading-none font-medium {isLockedField(
+							class="flex items-center gap-1.5 pt-1 pb-0.5 text-label leading-none {isLockedField(
 								field.key
 							)
 								? 'cursor-default opacity-80'
@@ -339,7 +339,7 @@
 						</label>

 						{#if field.help || SETTING_CONFIG_INFO[field.key]}
-							<p class="text-xs text-muted-foreground">
+							<p class="text-caption text-muted-foreground">
 								{field.help || SETTING_CONFIG_INFO[field.key]}
 							</p>
 						{/if}
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 39c91af65..13d54c61f 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
@@ -32,9 +32,9 @@
 </script>

 <div class="grid gap-1 {wrapperClass ?? ''}">
-	<h4 class="mt-0 mb-2 text-sm font-medium {titleClass ?? ''}">{title}</h4>
+	<h4 class="mt-0 mb-2 text-label {titleClass ?? ''}">{title}</h4>

-	<p class="mb-4 text-sm text-muted-foreground">{description}</p>
+	<p class="mb-4 text-body-sm text-muted-foreground">{description}</p>

 	<Button class={sectionButtonClass} {onclick} variant={sectionButtonVariant}>
 		<IconComponent class="mr-2 {ICON_CLASS_DEFAULT}" />
@@ -44,12 +44,12 @@

 	{#if summary && summary.show && summary.items.length > 0}
 		<div class="mt-4 grid overflow-x-auto rounded-lg border border-border/50 bg-muted/30 p-4">
-			<h5 class="mb-2 text-sm font-medium">
+			<h5 class="mb-2 text-label">
 				{summary.verb}
 				{summary.items.length} conversation{summary.items.length === 1 ? '' : 's'}
 			</h5>

-			<ul class="space-y-1 text-sm text-muted-foreground">
+			<ul class="space-y-1 text-body-sm text-muted-foreground">
 				{#each summary.items.slice(0, 10) as conv (conv.id)}
 					<li class="truncate">• {conv.name || 'Untitled conversation'}</li>
 				{/each}
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 0e1712da8..ee912f9f3 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
@@ -10,7 +10,7 @@
 </script>

 <Badge
-	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}"
+	class="h-5 bg-orange-100 px-1.5 py-0.5 text-caption text-orange-800 dark:bg-orange-900 dark:text-orange-200 {className}"
 	variant="secondary"
 >
 	<Wrench class="mr-1 size-icon-xs" />
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 354fdecd0..15c62cf48 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
@@ -22,10 +22,10 @@
 </script>

 {#if groups.length === 0}
-	<div class="py-8 text-center text-sm text-muted-foreground">No tools available</div>
+	<div class="py-8 text-center text-body-sm text-muted-foreground">No tools available</div>
 {:else}
 	<div class="space-y-2">
-		<p class="text-sm text-muted-foreground">
+		<p class="text-body-sm text-muted-foreground">
 			{#if conversationsStore.activeConversation}
 				Applies to this conversation.
 			{:else}
@@ -37,7 +37,7 @@
 			{@const isExpanded = expandedGroups.has(group.key)}
 			<Collapsible.Root onOpenChange={() => toggleExpanded(group.key)} open={isExpanded}>
 				<Collapsible.Trigger
-					class="flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm hover:bg-muted/50"
+					class="flex w-full items-center gap-2 rounded-lg px-3 py-2 text-body-sm hover:bg-muted/50"
 				>
 					{#if isExpanded}
 						<ChevronDown class="size-icon-sm shrink-0" />
@@ -67,7 +67,7 @@
 						{/if}
 					</span>

-					<span class="ml-auto shrink-0 text-xs text-muted-foreground">
+					<span class="ml-auto shrink-0 text-caption text-muted-foreground">
 						{group.tools.length} tool{group.tools.length !== 1 ? 's' : ''}
 					</span>
 				</Collapsible.Trigger>
@@ -75,7 +75,7 @@
 				<Collapsible.Content>
 					<div class="ml-4 border-l border-border/50 pl-2">
 						<!-- Header row -->
-						<div class="flex items-center gap-2 px-2 py-1 text-xs text-muted-foreground">
+						<div class="flex items-center gap-2 px-2 py-1 text-caption text-muted-foreground">
 							<span class="min-w-0 flex-1">Tool</span>

 							<span class="w-16 shrink-0 text-center">Enabled</span>
@@ -95,7 +95,9 @@
 							{@const permissionKey = entry.key}
 							{@const isAlwaysAllowed = permissionsStore.hasTool(permissionKey)}

-							<div class="flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50">
+							<div
+								class="flex items-center gap-2 rounded px-2 py-1.5 text-body-sm hover:bg-muted/50"
+							>
 								<span class="flex min-w-0 flex-1 items-center gap-1.5">
 									{#if IconComponent}
 										<IconComponent class={ICON_CLASS_DEFAULT} />
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChatDesktopSidebar.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChatDesktopSidebar.svelte
index f0d6d6dc2..0750cc4cb 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChatDesktopSidebar.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChatDesktopSidebar.svelte
@@ -15,7 +15,7 @@
 	<nav class="space-y-1">
 		{#each sections as section (section.title)}
 			<button
-				class="flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors hover:bg-accent {isActive(
+				class="flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left text-body-sm transition-colors hover:bg-accent {isActive(
 					section
 				)
 					? 'bg-accent text-accent-foreground'
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsChatMobileHeader.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsChatMobileHeader.svelte
index 79af808fc..26bca8736 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsChatMobileHeader.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsChatMobileHeader.svelte
@@ -65,7 +65,7 @@
 		<ScrollCarousel alwaysShowArrows {carousel} containerClass="py-2" innerClass="gap-2">
 			{#each sections as section (section.title)}
 				<button
-					class="flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm whitespace-nowrap transition-colors first:ml-4 last:mr-4 hover:bg-accent {isActive(
+					class="flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-body-sm whitespace-nowrap transition-colors first:ml-4 last:mr-4 hover:bg-accent {isActive(
 						section
 					)
 						? 'bg-accent text-accent-foreground'
diff --git a/ui/apps/chat/src/lib/components/app/settings/SettingsGroup.svelte b/ui/apps/chat/src/lib/components/app/settings/SettingsGroup.svelte
index 78dc19a13..7d77a474a 100644
--- a/ui/apps/chat/src/lib/components/app/settings/SettingsGroup.svelte
+++ b/ui/apps/chat/src/lib/components/app/settings/SettingsGroup.svelte
@@ -10,7 +10,7 @@
 </script>

 <div>
-	<h3 class="mb-6 text-base font-semibold">{title}</h3>
+	<h3 class="mb-6 text-body font-semibold">{title}</h3>

 	<div class="space-y-8">
 		{@render children()}
diff --git a/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte b/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte
index 00cde3c6b..7c411dd77 100644
--- a/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte
+++ b/ui/apps/chat/src/lib/components/pwa/PwaRefreshAlert.svelte
@@ -9,11 +9,13 @@
 {#if needRefresh}
 	<Card.Root class="overflow-hidden gap-1 py-5">
 		<Card.Header class="px-5">
-			<Card.Title class="text-sm font-medium">Update available</Card.Title>
+			<Card.Title class="text-label">Update available</Card.Title>
 		</Card.Header>

 		<Card.Content class="gap-6 grid px-5">
-			<p class="text-xs text-muted-foreground">A new version is available. Reload to update.</p>
+			<p class="text-caption text-muted-foreground">
+				A new version is available. Reload to update.
+			</p>

 			<Button
 				class="justify-self-end-safe"
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 4ef04f9a6..12de5176b 100644
--- a/ui/apps/chat/src/lib/constants/css-classes.constants.ts
+++ b/ui/apps/chat/src/lib/constants/css-classes.constants.ts
@@ -19,7 +19,7 @@ export const DIALOG_SUBMENU_CONTENT = 'w-60';

 /** 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';
+	'flex h-8 items-center rounded-lg border text-body-sm whitespace-nowrap backdrop-blur-xl';

 /** Tab surface at rest: invisible until hovered. */
 export const TAB_SURFACE_IDLE_CLASS =
@@ -28,7 +28,7 @@ export const TAB_SURFACE_IDLE_CLASS =
 /** 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';
+	'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-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50';

 /** Tab surface of the open tab. */
 export const TAB_SURFACE_ACTIVE_CLASS =
@@ -44,7 +44,7 @@ export const DROPDOWN_MENU_CONTENT_SEARCH_SELECTOR = '[data-slot="dropdown-menu-
 /**
  * Sticky offset of a model-list group heading under the dropdown's search block:
  * the search header exposes its height as `--dropdown-sticky-height`, and one
- * section-header row (`py-2` over `text-[13px]` line height) minus the header's
+ * section-header row (`py-2` over `text-body-sm` line height) minus the header's
  * bottom border stacks the two sticky rows without a gap or an overlap.
  */
 export const SELECTOR_GROUP_STICKY_OFFSET =
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 63c975a01..e3534d008 100644
--- a/ui/apps/chat/src/lib/constants/mention-badge.constants.ts
+++ b/ui/apps/chat/src/lib/constants/mention-badge.constants.ts
@@ -6,7 +6,7 @@
  * scanner picks it up in both sources.
  */
 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';
+	'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-caption font-mono text-foreground hover:bg-foreground/10 dark:bg-foreground/10 dark:text-secondary-foreground';

 export const MENTION_BADGE_ICON_CLASSNAME = 'size-icon-xs shrink-0';

diff --git a/ui/apps/chat/src/lib/constants/models-manager.constants.ts b/ui/apps/chat/src/lib/constants/models-manager.constants.ts
index a7608d0ef..56a7788bf 100644
--- a/ui/apps/chat/src/lib/constants/models-manager.constants.ts
+++ b/ui/apps/chat/src/lib/constants/models-manager.constants.ts
@@ -12,7 +12,7 @@ export const MODELS_TABLE_GROUP_LABELS: Record<ModelsTableGroupKind, string> = {

 /**
  * Sticky offset of a group heading under its section header: one section-header
- * row (`py-2` over `text-[13px]` line height) minus the header's bottom border,
+ * row (`py-2` over `text-body-sm` line height) minus the header's bottom border,
  * so the two stacked sticky rows do not show a gap or overlap by a pixel.
  */
 export const MODELS_TABLE_GROUP_STICKY_OFFSET = 'top: calc(2.25rem - 1px)';
diff --git a/ui/apps/chat/src/routes/+error.svelte b/ui/apps/chat/src/routes/+error.svelte
index 289d6d45f..af6c5f023 100644
--- a/ui/apps/chat/src/routes/+error.svelte
+++ b/ui/apps/chat/src/routes/+error.svelte
@@ -56,7 +56,7 @@
 					</svg>
 				</div>

-				<h1 class="mb-2 text-2xl font-bold">Error {status}</h1>
+				<h1 class="mb-2 text-heading font-bold">Error {status}</h1>

 				<p class="text-muted-foreground">
 					{error?.message || 'Something went wrong'}
diff --git a/ui/apps/chat/src/routes/+layout.svelte b/ui/apps/chat/src/routes/+layout.svelte
index af29c1f8f..8dfebfe4c 100644
--- a/ui/apps/chat/src/routes/+layout.svelte
+++ b/ui/apps/chat/src/routes/+layout.svelte
@@ -346,7 +346,7 @@
 					(sidebarReveal.isRevealed ? 'min-h-[calc(100dvh+var(--safe-area-top))]' : 'min-h-dvh'),
 				deviceStore.isMobile &&
 					sidebarReveal.dragOffset === null &&
-					'transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]',
+					'transition-transform duration-300 ease-sheet',
 				// slid aside: nothing inside scrolls or takes a tap, which lands on the page itself and
 				// closes the sidebar; forced on every descendant, as the fixed bars opt back into events
 				sidebarReveal.isRevealed && 'touch-none [&_*]:pointer-events-none!'
@@ -376,14 +376,14 @@
 					<!-- under the chat form, which keeps its taps where the two overlap -->
 					<div
 						aria-hidden="true"
-						class="screen-bottom-edge sidebar-reveal-pin-bottom fixed inset-x-0 bottom-0 z-[6]"
+						class="screen-bottom-edge sidebar-reveal-pin-bottom fixed inset-x-0 bottom-0 z-6"
 					></div>
 				{/if}

 				<!-- over the content, under the chat form (see its wrapper in ChatScreen) -->
 				<div
 					aria-hidden="true"
-					class="screen-bottom-fade sidebar-reveal-pin-bottom pointer-events-none fixed inset-x-0 bottom-0 z-[5]"
+					class="screen-bottom-fade sidebar-reveal-pin-bottom pointer-events-none fixed inset-x-0 bottom-0 z-5"
 				></div>
 			{/if}

@@ -413,10 +413,10 @@
 				style:transform={revealTransform}
 				aria-hidden="true"
 				class={[
-					'pointer-events-none fixed inset-0 z-[25] rounded-[2.5rem]',
+					'pointer-events-none fixed inset-0 z-25 rounded-[2.5rem]',
 					'shadow-[-0.5rem_0_2rem_-0.25rem_rgb(0_0_0/0.12)] dark:shadow-[-0.5rem_0_2rem_-0.25rem_rgb(0_0_0/0.45)]',
 					sidebarReveal.dragOffset === null &&
-						'transition-[transform,opacity] duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]',
+						'transition-[transform,opacity] duration-300 ease-sheet',
 					isRevealed
 						? 'opacity-100'
 						: 'opacity-0 [transition-delay:0ms,150ms] [transition-duration:300ms,150ms]'
@@ -429,7 +429,7 @@
 				class={[
 					'pointer-events-none fixed inset-0 z-20 overflow-hidden',
 					sidebarReveal.dragOffset === null &&
-						'transition-[transform,opacity] duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]',
+						'transition-[transform,opacity] duration-300 ease-sheet',
 					// on close the corners hold until the page is nearly home, then fade
 					isRevealed
 						? 'opacity-100'
@@ -458,7 +458,7 @@
 <!-- PWA update prompt + version -->
 <div class="fixed right-4 bottom-4 z-9999 flex flex-col items-end gap-1">
 	{#if showBuildVersion && versionStore.build}
-		<span class="text-[10px] tabular-nums text-muted-foreground">{versionStore.build}</span>
+		<span class="text-caption-sm tabular-nums text-muted-foreground">{versionStore.build}</span>
 	{/if}

 	<PwaRefreshAlert needRefresh={pwa.needRefresh} updateServiceWorker={pwa.updateServiceWorker} />
diff --git a/ui/apps/chat/src/routes/mcp-servers/+page.svelte b/ui/apps/chat/src/routes/mcp-servers/+page.svelte
index 0da72a67f..f2733f621 100644
--- a/ui/apps/chat/src/routes/mcp-servers/+page.svelte
+++ b/ui/apps/chat/src/routes/mcp-servers/+page.svelte
@@ -13,9 +13,9 @@
 	class="mx-auto flex w-full max-w-7xl flex-col gap-6 px-4 pt-(--page-top) pb-16 max-md:pb-safe-24 md:px-8 md:pt-6"
 >
 	<div class="flex min-w-0 flex-col gap-1">
-		<h1 class="text-2xl font-semibold tracking-tight">MCP Servers</h1>
+		<h1 class="text-heading tracking-tight">MCP Servers</h1>

-		<p class="text-sm text-muted-foreground">
+		<p class="text-body-sm text-muted-foreground">
 			Connect the servers whose tools, prompts and resources your chats can use.
 		</p>
 	</div>
diff --git a/ui/apps/chat/src/routes/models/+page.svelte b/ui/apps/chat/src/routes/models/+page.svelte
index e82954308..cfdc62b0a 100644
--- a/ui/apps/chat/src/routes/models/+page.svelte
+++ b/ui/apps/chat/src/routes/models/+page.svelte
@@ -24,13 +24,13 @@
 </svelte:head>

 <div
-	class="mx-auto flex h-[100dvh] w-full max-w-7xl flex-col gap-6 px-4 pt-(--page-top) md:px-8 md:pt-6"
+	class="mx-auto flex h-dvh w-full max-w-7xl flex-col gap-6 px-4 pt-(--page-top) md:px-8 md:pt-6"
 >
 	<div class="flex items-start gap-4">
 		<div class="flex min-w-0 flex-col gap-1">
-			<h1 class="text-2xl font-semibold tracking-tight">Models</h1>
+			<h1 class="text-heading tracking-tight">Models</h1>

-			<p class="text-sm text-muted-foreground">
+			<p class="text-body-sm text-muted-foreground">
 				Load, configure and remove the models this server can run.
 			</p>
 		</div>
diff --git a/ui/apps/chat/src/routes/settings/+page.svelte b/ui/apps/chat/src/routes/settings/+page.svelte
index 3cee0793c..63def3f5d 100644
--- a/ui/apps/chat/src/routes/settings/+page.svelte
+++ b/ui/apps/chat/src/routes/settings/+page.svelte
@@ -16,13 +16,15 @@
 	class="[--settings-tabs-top:calc(var(--corner-control-top)+3rem)] flex w-full flex-col pt-(--page-top) max-md:pb-safe-4 md:pt-6"
 >
 	<div class="flex min-w-0 flex-col gap-1 px-4 pb-2 md:px-8">
-		<h1 class="text-2xl font-semibold tracking-tight">Settings</h1>
+		<h1 class="text-heading tracking-tight">Settings</h1>

-		<p class="text-sm text-muted-foreground">How the app looks, chats and talks to the server.</p>
+		<p class="text-body-sm text-muted-foreground">
+			How the app looks, chats and talks to the server.
+		</p>
 	</div>

 	<SettingsChat
-		mobileHeaderClass="top-(--settings-tabs-top) z-[25] data-stuck:before:absolute data-stuck:before:inset-x-0 data-stuck:before:bottom-full data-stuck:before:h-(--settings-tabs-top) data-stuck:before:bg-background"
+		mobileHeaderClass="top-(--settings-tabs-top) z-25 data-stuck:before:absolute data-stuck:before:inset-x-0 data-stuck:before:bottom-full data-stuck:before:h-(--settings-tabs-top) data-stuck:before:bg-background"
 		onClose={() => toast.success('Settings saved')}
 	/>
 </div>
diff --git a/ui/apps/chat/tests/debug/ViewportProbe.svelte b/ui/apps/chat/tests/debug/ViewportProbe.svelte
index aa3f7f2f2..5318b31e0 100644
--- a/ui/apps/chat/tests/debug/ViewportProbe.svelte
+++ b/ui/apps/chat/tests/debug/ViewportProbe.svelte
@@ -69,6 +69,6 @@

 <pre
 	aria-hidden="true"
-	class="pointer-events-none fixed top-1/3 left-2 z-[99999] rounded bg-black/80 p-2 text-[10px] leading-tight whitespace-pre-wrap text-lime-300">{lines.join(
+	class="pointer-events-none fixed top-1/3 left-2 z-99999 rounded bg-black/80 p-2 text-caption-sm leading-tight whitespace-pre-wrap text-lime-300">{lines.join(
 		'\n'
 	)}</pre>
diff --git a/ui/apps/chat/tests/stories/actions/GlassKey.stories.svelte b/ui/apps/chat/tests/stories/actions/GlassKey.stories.svelte
index b2d2c510a..0287e4923 100644
--- a/ui/apps/chat/tests/stories/actions/GlassKey.stories.svelte
+++ b/ui/apps/chat/tests/stories/actions/GlassKey.stories.svelte
@@ -20,7 +20,7 @@

 <Story asChild name="Over the page">
 	<div class="relative min-h-80 p-6">
-		<div class="flex flex-col gap-2 text-sm">
+		<div class="flex flex-col gap-2 text-body-sm">
 			{#each LINES as line (line)}
 				<p>{line}</p>
 			{/each}
diff --git a/ui/apps/chat/tests/stories/brand/assets/OpticalCentre.svelte b/ui/apps/chat/tests/stories/brand/assets/OpticalCentre.svelte
index d8c148915..6e9c66b27 100644
--- a/ui/apps/chat/tests/stories/brand/assets/OpticalCentre.svelte
+++ b/ui/apps/chat/tests/stories/brand/assets/OpticalCentre.svelte
@@ -221,9 +221,11 @@
 	{#each [shown] as panel (panel.key)}
 		<section class="grid gap-4">
 			<div class="grid gap-1">
-				<h3 class="text-sm font-medium">{panel.label}</h3>
+				<h3 class="text-label">{panel.label}</h3>

-				<p class={['fade-note text-xs text-muted-foreground', measured && 'shown']}>{panel.note}</p>
+				<p class={['fade-note text-caption text-muted-foreground', measured && 'shown']}>
+					{panel.note}
+				</p>
 			</div>

 			<div class="flex flex-wrap items-center gap-8">
@@ -247,7 +249,7 @@

 				<div class="w-full sm:ml-8 sm:w-[calc((100%-3rem)/3)]">
 					<svg
-						class="block aspect-square w-full overflow-hidden rounded-card border border-border/60"
+						class="block aspect-square w-full overflow-hidden rounded-xl border border-border/60"
 						viewBox="0 0 {placement.size} {placement.size}"
 					>
 						<rect fill="#FAFAFA" height={placement.size} width={placement.size} />
@@ -440,7 +442,7 @@
 		{/each}
 	</Figures>

-	<figcaption class="text-xs text-muted-foreground">
+	<figcaption class="text-caption text-muted-foreground">
 		The icon fills {Math.round((side / placement.size) * 100)}% of the side; the numbers are pixels
 		at {placement.size}
 		× {placement.size}. Each circle fills the gap between the circle crop and one of the icon’s
diff --git a/ui/apps/chat/tests/stories/content/CollapsibleTerminalBlock.stories.svelte b/ui/apps/chat/tests/stories/content/CollapsibleTerminalBlock.stories.svelte
index 840eeb12e..00a963fa2 100644
--- a/ui/apps/chat/tests/stories/content/CollapsibleTerminalBlock.stories.svelte
+++ b/ui/apps/chat/tests/stories/content/CollapsibleTerminalBlock.stories.svelte
@@ -15,7 +15,7 @@
 <Story asChild name="Default">
 	<div class="w-[36rem]">
 		<CollapsibleTerminalBlock icon={SquareTerminal} open subtitle="exit 0" title="cargo test">
-			<pre class="p-3 font-mono text-xs">running 3 tests
+			<pre class="p-3 font-mono text-caption">running 3 tests
 test borrow::longest ... ok
 test borrow::shorter ... ok
 test borrow::equal ... ok
diff --git a/ui/apps/chat/tests/stories/foundations/SafeAreas.stories.svelte b/ui/apps/chat/tests/stories/foundations/SafeAreas.stories.svelte
index d4ae8c652..c99ee1260 100644
--- a/ui/apps/chat/tests/stories/foundations/SafeAreas.stories.svelte
+++ b/ui/apps/chat/tests/stories/foundations/SafeAreas.stories.svelte
@@ -25,13 +25,13 @@

 		<!-- the insets, tinted over whatever is drawn under them -->
 		<div
-			class="pointer-events-none absolute inset-x-0 top-0 flex h-(--safe-area-top) items-center justify-center bg-rose-500/20 text-[10px] font-medium text-rose-700 dark:text-rose-300"
+			class="pointer-events-none absolute inset-x-0 top-0 flex h-(--safe-area-top) items-center justify-center bg-rose-500/20 text-caption-sm font-medium text-rose-700 dark:text-rose-300"
 		>
 			status bar · --safe-area-top
 		</div>

 		<div
-			class="pointer-events-none absolute inset-x-0 bottom-0 flex h-(--safe-area-bottom) items-center justify-center bg-rose-500/20 text-[10px] font-medium text-rose-700 dark:text-rose-300"
+			class="pointer-events-none absolute inset-x-0 bottom-0 flex h-(--safe-area-bottom) items-center justify-center bg-rose-500/20 text-caption-sm font-medium text-rose-700 dark:text-rose-300"
 		>
 			home indicator · --safe-area-bottom
 		</div>
@@ -39,7 +39,7 @@
 {/snippet}

 {#snippet unpadded()}
-	<div class="flex h-full flex-col justify-between p-4 text-sm">
+	<div class="flex h-full flex-col justify-between p-4 text-body-sm">
 		<p class="font-medium">Page title under the status bar</p>

 		<p class="text-muted-foreground">Bottom bar over the home indicator</p>
@@ -47,7 +47,7 @@
 {/snippet}

 {#snippet page()}
-	<div class="flex h-full flex-col justify-between px-4 pt-safe-12 pb-safe-2 text-sm">
+	<div class="flex h-full flex-col justify-between px-4 pt-safe-12 pb-safe-2 text-body-sm">
 		<p class="font-medium">Page title, 3rem below the status bar</p>

 		<p class="rounded-full bg-muted px-3 py-2 text-center text-muted-foreground">
@@ -57,12 +57,12 @@
 {/snippet}

 {#snippet sheet()}
-	<div class="relative h-full bg-muted/50 px-4 pt-safe text-sm">
+	<div class="relative h-full bg-muted/50 px-4 pt-safe text-body-sm">
 		<p class="pt-2 text-muted-foreground">Type a message...</p>

 		<!-- absolute positions ignore the sheet's padding: the control takes its own offset -->
 		<span
-			class="absolute top-safe-2.5 right-2.5 flex size-8 items-center justify-center rounded-full bg-background text-xs shadow-sm"
+			class="absolute top-safe-2.5 right-2.5 flex size-8 items-center justify-center rounded-full bg-background text-caption shadow-(--elevation-control)"
 		>
 			⤡
 		</span>
diff --git a/ui/apps/chat/tests/stories/introduction/Principles.svelte b/ui/apps/chat/tests/stories/introduction/Principles.svelte
index 326b03a6e..e3c2630e7 100644
--- a/ui/apps/chat/tests/stories/introduction/Principles.svelte
+++ b/ui/apps/chat/tests/stories/introduction/Principles.svelte
@@ -11,7 +11,7 @@
 </script>

 <div class="principles">
-	<section class="principle wide card-surface rounded-card">
+	<section class="principle wide card-surface rounded-xl">
 		<div class="picture">
 			<div class="devices">
 				<Smartphone aria-hidden="true" size={28} />
@@ -35,9 +35,9 @@
 		<p>Private by default, and open to everyone.</p>
 	</section>

-	<section class="principle card-surface rounded-card">
+	<section class="principle card-surface rounded-xl">
 		<div class="picture">
-			<div class="pick rounded-panel bg-surface-lifted elevated-control">
+			<div class="pick rounded-lg bg-(--surface-lifted) elevated-control">
 				<Badge>Recommended</Badge>

 				<span class="pick-note">Reads, sees and hears</span>
@@ -51,7 +51,7 @@
 		<p>Choices made for you to start; every setting when you want it.</p>
 	</section>

-	<section class="principle card-surface rounded-card">
+	<section class="principle card-surface rounded-xl">
 		<div class="picture character">
 			<svg aria-hidden="true" class="icon" viewBox="0 0 {SIZE} {SIZE}">
 				{#each PATHS as d (d)}<path {d} />{/each}
@@ -67,8 +67,8 @@
 		<p>The icon, the type, one accent. The rest is neutral.</p>
 	</section>

-	<section class="principle card-surface rounded-card">
-		<div class="picture grid-bg rounded-panel">
+	<section class="principle card-surface rounded-xl">
+		<div class="picture grid-bg rounded-lg">
 			<Button size="sm" variant="outline">Run</Button>
 		</div>

@@ -77,7 +77,7 @@
 		<p>Every element has a job and a reason for its size.</p>
 	</section>

-	<section class="principle card-surface rounded-card">
+	<section class="principle card-surface rounded-xl">
 		<div class="picture chain">
 			<code>--neutral-900</code>

@@ -87,7 +87,7 @@

 			<span aria-hidden="true">↓</span>

-			<code>--button-primary-background</code>
+			<code>--button-primary-edge</code>
 		</div>

 		<h3>Design lives in code</h3>
diff --git a/ui/apps/chat/tests/stories/introduction/Products.svelte b/ui/apps/chat/tests/stories/introduction/Products.svelte
index 88827eb2f..0e8c4ed9f 100644
--- a/ui/apps/chat/tests/stories/introduction/Products.svelte
+++ b/ui/apps/chat/tests/stories/introduction/Products.svelte
@@ -10,7 +10,7 @@
 </script>

 <div class="map">
-	<section class="card card-surface rounded-card brand">
+	<section class="card card-surface rounded-xl brand">
 		<header>
 			<span class="repo">&#xE002;ggml-org/llama-brand</span>

@@ -40,7 +40,7 @@
 		<span class="label">The icon and the app icons</span>
 	</div>

-	<section class="card card-surface rounded-card cpp">
+	<section class="card card-surface rounded-xl cpp">
 		<header>
 			<span class="repo">&#xE002;ggml-org/llama.cpp</span>
 		</header>
@@ -48,7 +48,7 @@
 		<h3 class="mono">llama.cpp</h3>

 		<div class="parts">
-			<div class="part rounded-panel bg-surface-lifted elevated-control">
+			<div class="part rounded-lg bg-(--surface-lifted) elevated-control">
 				<span class="part-name">The engine</span>

 				<span class="part-note"
@@ -56,7 +56,7 @@
 				>
 			</div>

-			<div class="part rounded-panel bg-surface-lifted elevated-control">
+			<div class="part rounded-lg bg-(--surface-lifted) elevated-control">
 				<span class="part-name">Llama UI <span class="arrow">→</span> Llama Chat</span>

 				<span class="part-note"
@@ -73,12 +73,12 @@
 		<span class="label">Run <code>llama-server</code> and open Llama Chat</span>
 	</div>

-	<section class="card card-surface rounded-card apps">
+	<section class="card card-surface rounded-xl apps">
 		<header>
 			<span class="repo">&#xE002;The native Llama apps</span>
 		</header>

-		<div class="app rounded-panel bg-surface-lifted elevated-control">
+		<div class="app rounded-lg bg-(--surface-lifted) elevated-control">
 			<h3>Llama for Mac</h3>

 			<span class="repo">&#xE002;ggml-org/Llama-macOS</span>
@@ -86,7 +86,7 @@
 			<span class="part-note">A menu bar app, in Swift</span>
 		</div>

-		<div class="app rounded-panel bg-surface-lifted elevated-control">
+		<div class="app rounded-lg bg-(--surface-lifted) elevated-control">
 			<h3>Llama for Windows</h3>

 			<span class="repo">&#xE002;ggml-org/Llama-Windows</span>
diff --git a/ui/apps/chat/tests/stories/introduction/Sections.svelte b/ui/apps/chat/tests/stories/introduction/Sections.svelte
index baa8b68da..ba2073c50 100644
--- a/ui/apps/chat/tests/stories/introduction/Sections.svelte
+++ b/ui/apps/chat/tests/stories/introduction/Sections.svelte
@@ -25,7 +25,7 @@
 	{#each sections as section (section.name)}
 		<li class="section">
 			<span
-				class={['glyph rounded-control bg-surface-lifted elevated-control', { here: section.here }]}
+				class={['glyph rounded-md bg-(--surface-lifted) elevated-control', { here: section.here }]}
 			>
 				{#if section.icon}
 					<section.icon aria-hidden="true" size={16} />
@@ -36,7 +36,7 @@
 				{/if}
 			</span>

-			<div class="body card-surface rounded-card">
+			<div class="body card-surface rounded-xl">
 				<p class="head">
 					<b>{section.name}</b>

@@ -48,7 +48,7 @@
 				{#if section.pages.length}
 					<ul class="pages">
 						{#each section.pages as page (page)}
-							<li class="page rounded-control">{page}</li>
+							<li class="page rounded-md">{page}</li>
 						{/each}
 					</ul>
 				{/if}
diff --git a/ui/apps/chat/tests/stories/introduction/Stack.svelte b/ui/apps/chat/tests/stories/introduction/Stack.svelte
index dc0564852..375b514f1 100644
--- a/ui/apps/chat/tests/stories/introduction/Stack.svelte
+++ b/ui/apps/chat/tests/stories/introduction/Stack.svelte
@@ -5,7 +5,7 @@
 	dashed, dimmed slot for the other apps anyone can build on Llama UI.
 -->
 <div class="stack">
-	<div class="block chat card-surface rounded-card">
+	<div class="block chat card-surface rounded-xl">
 		<span class="n">03</span>

 		<h3>Llama Chat</h3>
@@ -13,19 +13,19 @@
 		<p>The app, built from Llama UI</p>
 	</div>

-	<div class="block apps rounded-card">
+	<div class="block apps rounded-xl">
 		<h3>Other apps</h3>

 		<p>Yours, built on Llama UI</p>
 	</div>

-	<div class="block comms card-surface rounded-card">
+	<div class="block comms card-surface rounded-xl">
 		<h3>Communications</h3>

 		<p>Posts, store screenshots, link previews and swag, made from the brand and the app</p>
 	</div>

-	<div class="block ui card-surface rounded-card">
+	<div class="block ui card-surface rounded-xl">
 		<span class="n">02</span>

 		<h3>Llama UI</h3>
@@ -33,7 +33,7 @@
 		<p>The components and their tokens</p>
 	</div>

-	<div class="block brand card-surface rounded-card">
+	<div class="block brand card-surface rounded-xl">
 		<span class="n">01</span>

 		<!-- the lockup glyph, U+E002: Llama Sans's capital icon with the gap before the name built in -->
diff --git a/ui/apps/chat/tests/stories/introduction/Uses.svelte b/ui/apps/chat/tests/stories/introduction/Uses.svelte
index 36f5d2686..45f35b94a 100644
--- a/ui/apps/chat/tests/stories/introduction/Uses.svelte
+++ b/ui/apps/chat/tests/stories/introduction/Uses.svelte
@@ -32,8 +32,8 @@

 <div class="uses">
 	{#each uses as use (use.name)}
-		<section class="use card-surface rounded-card">
-			<span class="glyph rounded-control bg-surface-lifted elevated-control">
+		<section class="use card-surface rounded-xl">
+			<span class="glyph rounded-md bg-(--surface-lifted) elevated-control">
 				<use.icon aria-hidden="true" size={18} />
 			</span>

diff --git a/ui/apps/chat/tests/stories/misc/CollapsibleSection.stories.svelte b/ui/apps/chat/tests/stories/misc/CollapsibleSection.stories.svelte
index 578550b49..6acb5b218 100644
--- a/ui/apps/chat/tests/stories/misc/CollapsibleSection.stories.svelte
+++ b/ui/apps/chat/tests/stories/misc/CollapsibleSection.stories.svelte
@@ -23,7 +23,7 @@
 						<span class="text-label">Pinned</span>
 					{/snippet}

-					<ul class="space-y-1 pt-2 text-body-sm text-fg-muted">
+					<ul class="space-y-1 pt-2 text-body-sm text-muted-foreground">
 						<li>Explain quantization</li>

 						<li>Rust borrow checker notes</li>
diff --git a/ui/apps/chat/tests/stories/misc/ScrollCarousel.stories.svelte b/ui/apps/chat/tests/stories/misc/ScrollCarousel.stories.svelte
index 07cd2a030..c3f62d8eb 100644
--- a/ui/apps/chat/tests/stories/misc/ScrollCarousel.stories.svelte
+++ b/ui/apps/chat/tests/stories/misc/ScrollCarousel.stories.svelte
@@ -24,7 +24,7 @@
 				<ScrollCarousel alwaysShowArrows class="w-[min(32rem,calc(100vw-4rem))]" {variant}>
 					{#each items as item (item)}
 						<div
-							class="flex h-16 w-24 shrink-0 items-center justify-center rounded-card border border-line-default bg-surface-muted text-label-sm text-fg-muted"
+							class="flex h-16 w-24 shrink-0 items-center justify-center rounded-xl border border-border bg-muted text-label-sm text-muted-foreground"
 						>
 							{item}
 						</div>
diff --git a/ui/apps/chat/tests/unit/token-roles.test.ts b/ui/apps/chat/tests/unit/token-roles.test.ts
new file mode 100644
index 000000000..5449c6b7d
--- /dev/null
+++ b/ui/apps/chat/tests/unit/token-roles.test.ts
@@ -0,0 +1,56 @@
+import { readdirSync, readFileSync } from 'node:fs';
+import { join, relative } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { describe, expect, it } from 'vitest';
+
+// Type is set through the roles in ui/lib/ui/src/lib/styles/tokens/semantic.css (text-body-sm, text-label,
+// text-caption ...), never Tailwind's own sizes or a size in brackets: see Typography in DESIGN.md.
+const ui = fileURLToPath(new URL('../../../../', import.meta.url));
+const ROOTS = ['apps/chat/src', 'apps/chat/tests/stories', 'lib/ui/src', 'lib/ui/tests/stories'];
+const SOURCE = /\.(svelte|ts|js|css|svx)$/;
+const TAILWIND_SIZE = /(?<![\w-])text-(?:xs|sm|base|lg|xl|[2-9]xl)(?![\w-])/g;
+// a size relative to the text around it (text-[0.875em]) is not one off the scale
+const BRACKET_SIZE = /(?<![\w-])text-\[[\d.]+(?:px|rem)\]/g;
+// Shadows are the elevation tokens (shadow-(--elevation-surface) or a surface utility), which follow the theme;
+// Tailwind's own do not. Corners are Tailwind's rounded-sm ... rounded-4xl, not the roles that used to name them.
+const TAILWIND_SHADOW = /(?<![\w-])shadow-(?:2xs|xs|sm|md|lg|xl|2xl)(?![\w-])/g;
+const CORNER_ROLE =
+	/(?<![\w-])rounded(?:-[a-z]{1,2})?-(?:control|panel|card|container|surface)(?![\w])/g;
+
+function sources(dir: string): string[] {
+	return readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
+		const path = join(dir, entry.name);
+
+		if (entry.isDirectory()) return sources(path);
+
+		return SOURCE.test(entry.name) ? [path] : [];
+	});
+}
+
+function matches(pattern: RegExp): string[] {
+	return ROOTS.flatMap((root) => sources(join(ui, root))).flatMap((path) =>
+		[...readFileSync(path, 'utf8').matchAll(pattern)].map(
+			([match]) => `${relative(ui, path)}: ${match}`
+		)
+	);
+}
+
+describe('type roles', () => {
+	it('uses no Tailwind text size', () => {
+		expect(matches(TAILWIND_SIZE)).toEqual([]);
+	});
+
+	it('uses no text size in brackets', () => {
+		expect(matches(BRACKET_SIZE)).toEqual([]);
+	});
+});
+
+describe('shadows and corners', () => {
+	it('uses no Tailwind shadow size', () => {
+		expect(matches(TAILWIND_SHADOW)).toEqual([]);
+	});
+
+	it('uses no corner role', () => {
+		expect(matches(CORNER_ROLE)).toEqual([]);
+	});
+});
diff --git a/ui/lib/ui/.storybook/docs.css b/ui/lib/ui/.storybook/docs.css
index 4a2f1facc..46145e1ec 100644
--- a/ui/lib/ui/.storybook/docs.css
+++ b/ui/lib/ui/.storybook/docs.css
@@ -9,14 +9,14 @@
 }

 .ds-docs {
-	@apply mx-auto max-w-3xl font-sans text-body text-fg-default;
+	@apply mx-auto max-w-3xl font-sans text-body text-foreground;

 	& :where(h1) {
 		@apply mb-4 text-heading;
 	}

 	& :where(h2) {
-		@apply mt-10 mb-3 border-b border-line-default pb-2 text-title;
+		@apply mt-10 mb-3 border-b border-border pb-2 text-title;
 	}

 	& :where(h3) {
@@ -48,16 +48,16 @@
 	}

 	& :where(a) {
-		@apply underline underline-offset-2 hover:text-fg-muted;
+		@apply underline underline-offset-2 hover:text-muted-foreground;
 	}

 	& :where(blockquote) {
-		@apply border-l-2 border-line-default pl-4 text-fg-muted;
+		@apply border-l-2 border-border pl-4 text-muted-foreground;
 	}

 	/* a note that stands out from the running text: a quiet panel with the accent on its edge */
 	& :where(.callout) {
-		@apply my-6 rounded-panel border-l-2 border-(--art-cinder) bg-surface-muted px-5 py-4;
+		@apply my-6 rounded-lg border-l-2 border-(--art-cinder) bg-muted px-5 py-4;

 		& > :where(p) {
 			@apply my-0;
@@ -65,16 +65,16 @@
 	}

 	& :where(hr) {
-		@apply my-8 border-line-default;
+		@apply my-8 border-border;
 	}

 	/* inline code only, with a selector that outranks the code the Markdown block renders */
 	& :not(pre) > code {
-		@apply rounded-control border-0 bg-surface-code px-1 py-0.5 font-mono text-[0.875em] text-(--fg-code);
+		@apply rounded-md border-0 bg-(--surface-code) px-1 py-0.5 font-mono text-[0.875em] text-(--fg-code);
 	}

 	& :where(pre) {
-		@apply overflow-x-auto rounded-panel bg-surface-code p-4 text-body-sm;
+		@apply overflow-x-auto rounded-lg bg-(--surface-code) p-4 text-body-sm;
 	}

 	& :where(table) {
@@ -82,7 +82,7 @@
 	}

 	& :where(th, td) {
-		@apply border-b border-line-default px-3 py-2 text-left align-top;
+		@apply border-b border-border px-3 py-2 text-left align-top;
 	}

 	& :where(th) {
diff --git a/ui/lib/ui/package-lock.json b/ui/lib/ui/package-lock.json
index 133cb2bd3..1de52e057 100644
--- a/ui/lib/ui/package-lock.json
+++ b/ui/lib/ui/package-lock.json
@@ -1,12 +1,12 @@
 {
 	"name": "@ggml-org/llama-ui",
-	"version": "0.4.0",
+	"version": "0.5.0",
 	"lockfileVersion": 3,
 	"requires": true,
 	"packages": {
 		"": {
 			"name": "@ggml-org/llama-ui",
-			"version": "0.4.0",
+			"version": "0.5.0",
 			"license": "MIT",
 			"dependencies": {
 				"@ggml-org/llama-brand": "0.1.0",
diff --git a/ui/lib/ui/package.json b/ui/lib/ui/package.json
index 6706dbaee..bee001ae5 100644
--- a/ui/lib/ui/package.json
+++ b/ui/lib/ui/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@ggml-org/llama-ui",
-	"version": "0.4.0",
+	"version": "0.5.0",
 	"description": "Shared UI library for llama.cpp frontend apps.",
 	"license": "MIT",
 	"repository": {
diff --git a/ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte b/ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte
index 0facb87b1..ebf33d801 100644
--- a/ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte
+++ b/ui/lib/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte
@@ -129,14 +129,14 @@

 <div
 	bind:this={scrollEl}
-	class="code-preview-wrapper min-w-0 max-w-full overflow-auto rounded-xl border shadow-[0_1px_2px_0_rgb(0_0_0_/_0.05)] {className}"
+	class="code-preview-wrapper min-w-0 max-w-full overflow-auto rounded-xl border shadow-(--elevation-faint) {className}"
 	onscroll={handleScrollEvent}
-	style="border-color: color-mix(in oklch, var(--border) 30%, transparent); background: var(--code-background); max-height: {maxHeight}; {maxWidth
+	style="border-color: color-mix(in oklch, var(--line-default) 30%, transparent); background: var(--surface-code); max-height: {maxHeight}; {maxWidth
 		? `max-width: ${maxWidth};`
 		: ''}"
 >
 	<!-- Single line: hljs injection depends on a contiguous source string. -->
-	<pre class="m-0"><code class="hljs text-sm leading-relaxed">{@html highlightedHtml}</code></pre>
+	<pre class="m-0"><code class="hljs text-body-sm leading-relaxed">{@html highlightedHtml}</code></pre>
 </div>

 <style>
@@ -159,6 +159,6 @@
 	}

 	:global(.dark) .code-preview-wrapper {
-		border-color: color-mix(in oklch, var(--border) 20%, transparent);
+		border-color: color-mix(in oklch, var(--line-default) 20%, transparent);
 	}
 </style>
diff --git a/ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte b/ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte
index 93876fcf8..5840a5cce 100644
--- a/ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelCapabilityIcons.svelte
@@ -58,7 +58,7 @@
 			{#each capabilities as capability (capability)}
 				{@const Icon = CAPABILITY_ICONS[capability]}

-				<Badge class="h-5 gap-1 px-1.5 text-[10px]" variant="outline">
+				<Badge class="h-5 gap-1 px-1.5 text-caption-sm" variant="outline">
 					<Icon class="size-icon-xs text-muted-foreground" />

 					{CAPABILITY_LABELS[capability]}
@@ -70,7 +70,7 @@
 			{#each shownModalities as modality (modality)}
 				{@const Icon = MODALITY_ICONS[modality]}

-				<Badge class="h-5 gap-1 px-1.5 text-[10px]" variant="outline">
+				<Badge class="h-5 gap-1 px-1.5 text-caption-sm" variant="outline">
 					<Icon class="size-icon-xs text-muted-foreground" />

 					{MODALITY_LABELS[modality]}
diff --git a/ui/lib/ui/src/lib/components/models/ModelCard.svelte b/ui/lib/ui/src/lib/components/models/ModelCard.svelte
index f6fc5076f..f59d5c2ed 100644
--- a/ui/lib/ui/src/lib/components/models/ModelCard.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelCard.svelte
@@ -87,7 +87,7 @@
 	{@render children?.()}

 	{#if footer || footerEnd}
-		<div class="mt-auto flex min-h-6 items-center justify-between gap-3 text-xs">
+		<div class="mt-auto flex min-h-6 items-center justify-between gap-3 text-caption">
 			<div class="min-w-0 text-muted-foreground">
 				{@render footer?.()}
 			</div>
diff --git a/ui/lib/ui/src/lib/components/models/ModelId.svelte b/ui/lib/ui/src/lib/components/models/ModelId.svelte
index eb9f8a4fb..f31da4c78 100644
--- a/ui/lib/ui/src/lib/components/models/ModelId.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelId.svelte
@@ -229,7 +229,7 @@
 				<span class="inline-flex items-center gap-1 text-muted-foreground">
 					<ScrollText class="size-icon-xs" />

-					<span class="text-xs">{formatParameters(contextLength)}</span>
+					<span class="text-caption">{formatParameters(contextLength)}</span>
 				</span>
 			{/if}

@@ -237,7 +237,7 @@
 				<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 class="text-caption">{formatSizeRange(sizeRange.min, sizeRange.max)}</span>
 				</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
index b3e9a0c81..ae91db77c 100644
--- a/ui/lib/ui/src/lib/components/models/ModelMetadataItem.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelMetadataItem.svelte
@@ -11,7 +11,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 border border-border/30 bg-muted/60 text-caption shadow-(--elevation-control) dark:border-border/20 dark:bg-muted/75"
 >
 	<span class="px-2.5 py-1 text-muted-foreground">{label}</span>

diff --git a/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte b/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte
index 8a983d457..d5e0d251c 100644
--- a/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelOrgAvatar.svelte
@@ -72,7 +72,7 @@
 	{#if orgAvatarFailed}
 		<span
 			aria-hidden="true"
-			class="flex {size} items-center justify-center rounded-md text-sm font-semibold text-white"
+			class="flex {size} items-center justify-center rounded-md text-body-sm font-semibold text-white"
 			style="background-color: hsl({hue} 60% 45%)"
 		>
 			{org.charAt(0).toUpperCase()}
@@ -103,7 +103,7 @@
 			{#if quantAvatarFailed}
 				<span
 					aria-hidden="true"
-					class="flex size-full items-center justify-center rounded-full text-[8px] font-semibold text-white"
+					class="flex size-full items-center justify-center rounded-full text-caption-sm font-semibold text-white"
 					style="background-color: hsl({quantHue} 60% 45%)"
 				>
 					{quantOrg.charAt(0).toUpperCase()}
diff --git a/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte b/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte
index f8c375964..65334f2f1 100644
--- a/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelQuantChip.svelte
@@ -139,7 +139,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-(--elevation-control) 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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint active:scale-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"
@@ -153,11 +153,11 @@
 		<!-- 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"
+				class="absolute size-icon-sm text-green-500 transition-[opacity,transform] duration-150 ease-out-quint 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"
+				class="absolute size-icon-sm scale-75 text-destructive opacity-0 transition-[opacity,transform] duration-150 ease-out-quint group-hover:scale-100 group-hover:opacity-100 [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 			/>
 		</span>
 	</button>
@@ -186,11 +186,11 @@
 			     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"
+					class="absolute size-icon-sm animate-spin text-muted-foreground transition-opacity duration-150 ease-out-quint 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"
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-out-quint group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			</span>
 		{:else}
@@ -198,11 +198,11 @@
 			     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"
+					class="absolute size-icon-sm text-muted-foreground transition-opacity duration-150 ease-out-quint 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"
+					class="absolute size-icon-sm opacity-0 transition-opacity duration-150 ease-out-quint group-hover:opacity-100 [@media(pointer:coarse)]:opacity-100"
 				/>
 			</span>
 		{/if}
@@ -220,7 +220,7 @@
 		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"
+			class="size-icon-sm transition-[opacity,transform,color] duration-150 ease-out-quint text-destructive [@media(pointer:coarse)]:scale-100 [@media(pointer:coarse)]:opacity-100"
 		/>
 	</button>
 {/snippet}
@@ -228,7 +228,7 @@
 {#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"
+			class="rounded-md bg-(--action-danger) px-1 py-0.5 text-caption-sm font-semibold tracking-wide text-(--fg-on-danger) uppercase"
 		>
 			Failed
 		</span>
@@ -250,7 +250,7 @@
 {/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]
+	{@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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint active:scale-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!' : ''}`}

@@ -279,7 +279,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-(--elevation-control) 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-caption shadow-(--elevation-control) transition-[background-color,border-color,transform] duration-200 ease-out-quint active:scale-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'}"
diff --git a/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte b/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte
index 2fa676a6f..63cbca3e6 100644
--- a/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelQuantOptions.svelte
@@ -18,7 +18,7 @@
 </script>

 <section
-	class="@container rounded-3xl border border-border/30 bg-muted/60 shadow-sm dark:border-border/20 {className}"
+	class="@container rounded-3xl border border-border/30 bg-muted/60 shadow-(--elevation-control) 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()}
@@ -26,7 +26,7 @@

 	{#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"
+			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-caption text-muted-foreground dark:border-border/35"
 		>
 			{@render footer()}
 		</div>
diff --git a/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte b/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte
index 58ab8a9cc..857c43bbd 100644
--- a/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte
+++ b/ui/lib/ui/src/lib/components/models/ModelQuantRow.svelte
@@ -42,7 +42,7 @@

 		{#if command}
 			<ChevronDown
-				class="size-icon-xs 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-out-quint {commandOpen
 					? 'rotate-180'
 					: ''}"
 			/>
@@ -50,7 +50,7 @@
 	</span>

 	{#if memGb}
-		<span class="text-[10px] whitespace-nowrap text-muted-foreground/60 @max-lg:whitespace-normal">
+		<span class="text-caption-sm whitespace-nowrap text-muted-foreground/60 @max-lg:whitespace-normal">
 			needs at least {memGb}{GIGABYTE_LABEL} memory
 		</span>
 	{/if}
@@ -62,7 +62,7 @@
 			<!-- 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"
+				class="flex w-fit cursor-pointer flex-col items-start gap-0.5 text-left text-body-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"
 			>
@@ -70,7 +70,7 @@
 			</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"
+				class="flex w-fit flex-col items-start gap-0.5 text-body-sm tabular-nums text-muted-foreground @max-lg:flex-row @max-lg:items-baseline @max-lg:gap-2"
 			>
 				{@render labelBody()}
 			</span>
diff --git a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
index 0db939fe0..c998c60c7 100644
--- a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte
@@ -19,11 +19,11 @@
 	<AlertDialogPrimitive.Content
 		bind:ref
 		class={cn(
-			'fixed z-[999999] grid gap-4 border matte-float-modal p-6 duration-200',
+			'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
-			'top-[50%] left-[50%] max-h-[calc(100dvh-2rem)] w-[90%] translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-xl sm:w-full sm:max-w-lg',
+			'top-1/2 left-1/2 max-h-[calc(100dvh-2rem)] w-[90%] -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-xl sm:w-full sm:max-w-lg',
 			'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:fill-mode-forwards',
 			'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
 			className
diff --git a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
index 269af2034..cdc99fdcc 100644
--- a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte
@@ -11,7 +11,7 @@

 <AlertDialogPrimitive.Description
 	bind:ref
-	class={cn('text-sm text-muted-foreground', className)}
+	class={cn('text-body-sm text-muted-foreground', className)}
 	data-slot="alert-dialog-description"
 	{...restProps}
 />
diff --git a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
index 1fcd2ce0d..d1b137840 100644
--- a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte
@@ -12,7 +12,7 @@
 <AlertDialogPrimitive.Overlay
 	bind:ref
 	class={cn(
-		'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',
+		'fixed inset-0 z-50 bg-(--surface-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/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
index 0e79cfe01..898a4715c 100644
--- a/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte
@@ -11,7 +11,7 @@

 <AlertDialogPrimitive.Title
 	bind:ref
-	class={cn('text-lg leading-none font-semibold', className)}
+	class={cn('text-title leading-none font-semibold', className)}
 	data-slot="alert-dialog-title"
 	{...restProps}
 />
diff --git a/ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte b/ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte
index b3dee5f69..ccfc7a1b2 100644
--- a/ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert/alert-description.svelte
@@ -13,7 +13,7 @@
 <div
 	bind:this={ref}
 	class={cn(
-		'col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed',
+		'col-start-2 grid justify-items-start gap-1 text-body-sm text-muted-foreground [&_p]:leading-relaxed',
 		className
 	)}
 	data-slot="alert-description"
diff --git a/ui/lib/ui/src/lib/components/ui/alert/alert.svelte b/ui/lib/ui/src/lib/components/ui/alert/alert.svelte
index b5589531d..59833bad2 100644
--- a/ui/lib/ui/src/lib/components/ui/alert/alert.svelte
+++ b/ui/lib/ui/src/lib/components/ui/alert/alert.svelte
@@ -3,7 +3,7 @@
 	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',
+		base: 'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-body-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'
 		},
diff --git a/ui/lib/ui/src/lib/components/ui/badge/badge.svelte b/ui/lib/ui/src/lib/components/ui/badge/badge.svelte
index c56f02b67..bdb1b004a 100644
--- a/ui/lib/ui/src/lib/components/ui/badge/badge.svelte
+++ b/ui/lib/ui/src/lib/components/ui/badge/badge.svelte
@@ -3,7 +3,7 @@
 	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',
+		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-label-sm font-medium transition-[color,box-shadow] focus-visible:ring-3 [&>svg]:pointer-events-none [&>svg]:size-icon-xs',
 		defaultVariants: {
 			variant: 'default'
 		},
@@ -13,15 +13,14 @@
 				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',
+					'matte-sheen-solid bg-(--action-primary) text-(--fg-on-action) [a&]:hover:bg-(--action-primary-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)',
+					'matte-sheen-solid bg-(--action-danger) [a&]:hover:bg-(--badge-danger-background-hover) focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 border-transparent text-(--fg-on-danger)',
 				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)',
+				outline: 'text-(--fg-default) border-(--line-default) [a&]:hover:bg-(--surface-selected)',
 				secondary:
-					'matte-sheen bg-(--badge-secondary-background) text-(--badge-text) [a&]:hover:bg-(--badge-secondary-background-hover) border-transparent',
+					'matte-sheen bg-(--badge-secondary-background) text-(--fg-default) [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:
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
index 24e99606c..f58ddcdca 100644
--- 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
@@ -13,13 +13,13 @@
 <!--
 	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.
+	colour at 25%, 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',
+		'flex w-fit items-center rounded-md 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-variant=default]:not(:first-child)]:border-l [&>[data-variant=default]]:border-l-current/25 [&>[data-variant=destructive]:not(:first-child)]:border-l [&>[data-variant=destructive]]:border-l-current/25',
 		'[&>[data-slot=button-group-separator]:has(+[data-variant=default],+[data-variant=destructive])]:hidden',
 		className
 	)}
diff --git a/ui/lib/ui/src/lib/components/ui/button/button.svelte b/ui/lib/ui/src/lib/components/ui/button/button.svelte
index dc9d04da2..ae5708010 100644
--- a/ui/lib/ui/src/lib/components/ui/button/button.svelte
+++ b/ui/lib/ui/src/lib/components/ui/button/button.svelte
@@ -5,7 +5,7 @@
 	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",
+		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-label font-medium outline-none transition-all focus-visible:ring-3 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'
@@ -16,22 +16,22 @@
 				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'
+				lg: 'h-control-lg rounded-lg px-6 has-[>svg]:px-4',
+				sm: 'h-control-sm gap-1.5 rounded-md 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)',
+					'matte-key-solid [--key-edge:var(--button-primary-edge)] bg-(--action-primary) text-(--fg-on-action) hover:bg-(--action-primary-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)!',
+					'matte-key-solid [--key-edge:var(--button-danger-edge)] [--key-sheen-solid:var(--button-danger-sheen)] bg-(--action-danger) hover:bg-(--action-danger-hover) focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-(--fg-on-danger)!',
 				ghost:
-					'hover:text-(--button-text) hover:bg-(--button-ghost-background-hover) hover:shadow-(--button-shadow) backdrop-blur-sm',
+					'hover:text-(--fg-default) hover:bg-(--action-ghost-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)',
+					'matte-key bg-(--field-background) hover:text-(--fg-default) hover:bg-(--action-ghost-hover) border border-(--line-control)',
 				secondary:
-					'matte-key bg-(--button-secondary-background) border border-(--button-secondary-border) text-(--button-text) hover:bg-(--button-secondary-background-hover)',
+					'matte-key bg-(--button-secondary-background) border border-(--button-secondary-border) text-(--fg-default) 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)'
+					'matte-key bg-(--button-tertiary-background) border border-(--button-tertiary-border) text-(--fg-default) hover:bg-(--button-tertiary-background-hover)'
 			}
 		}
 	});
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
index 44356af26..629d434b0 100644
--- 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
@@ -31,7 +31,7 @@ describe('Button', () => {
 		const el = screen.getByRole('button', { name: 'danger' }).element() as HTMLElement;

 		expect(el.dataset.variant).toBe('destructive');
-		expect(el.className).toContain('bg-(--button-danger-background)');
+		expect(el.className).toContain('bg-(--action-danger)');
 	});

 	it('renders an anchor when href is set', async () => {
diff --git a/ui/lib/ui/src/lib/components/ui/card/card-description.svelte b/ui/lib/ui/src/lib/components/ui/card/card-description.svelte
index 33c8d88ca..1e60913bc 100644
--- a/ui/lib/ui/src/lib/components/ui/card/card-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card-description.svelte
@@ -12,7 +12,7 @@

 <p
 	bind:this={ref}
-	class={cn('text-sm text-muted-foreground', className)}
+	class={cn('text-body-sm text-muted-foreground', className)}
 	data-slot="card-description"
 	{...restProps}
 >
diff --git a/ui/lib/ui/src/lib/components/ui/card/card.svelte b/ui/lib/ui/src/lib/components/ui/card/card.svelte
index 15a56a8ef..f82288a49 100644
--- a/ui/lib/ui/src/lib/components/ui/card/card.svelte
+++ b/ui/lib/ui/src/lib/components/ui/card/card.svelte
@@ -12,7 +12,7 @@

 <div
 	bind:this={ref}
-	class={cn('card-surface flex flex-col gap-6 rounded-(--card-radius) py-6', className)}
+	class={cn('card-surface flex flex-col gap-6 rounded-xl py-6', className)}
 	data-slot="card"
 	{...restProps}
 >
diff --git a/ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte b/ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte
index 15076c6c1..e897360cf 100644
--- a/ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte
+++ b/ui/lib/ui/src/lib/components/ui/checkbox/checkbox.svelte
@@ -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 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',
+		'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-3 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/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte
index a0359b7ad..baee7d587 100644
--- a/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-content.svelte
@@ -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 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',
+			'z-50 max-h-[calc(var(--bits-context-menu-content-available-height)-1rem)] min-w-32 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/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte
index fed7c6bf3..caed839bc 100644
--- a/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-item.svelte
@@ -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-icon-md [&_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-body-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/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte
index fde19cf1e..95b097ab6 100644
--- a/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-label.svelte
@@ -15,7 +15,7 @@

 <div
 	bind:this={ref}
-	class={cn('px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8', className)}
+	class={cn('px-2 py-1.5 text-body-sm font-semibold data-[inset]:pl-8', className)}
 	data-inset={inset}
 	data-slot="context-menu-label"
 	{...restProps}
diff --git a/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
index ca06258a2..8f5700226 100644
--- a/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
+++ b/ui/lib/ui/src/lib/components/ui/context-menu/context-menu-shortcut.svelte
@@ -12,7 +12,7 @@

 <span
 	bind:this={ref}
-	class={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}
+	class={cn('ml-auto text-caption tracking-widest text-muted-foreground', className)}
 	data-slot="context-menu-shortcut"
 	{...restProps}
 >
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
index 201342d17..4f71c5f61 100644
--- 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
@@ -29,7 +29,7 @@
 		{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',
+			'z-50 max-h-[calc(var(--bits-menu-content-available-height)-1rem)] min-w-32 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"
diff --git a/ui/lib/ui/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
index cf5877999..c2a891475 100644
--- a/ui/lib/ui/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
@@ -17,7 +17,7 @@
 <ContextMenuPrimitive.SubTrigger
 	bind:ref
 	class={cn(
-		"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",
+		"flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-body-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}
diff --git a/ui/lib/ui/src/lib/components/ui/dialog/dialog-content.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-content.svelte
index 34256d980..c4dfab18b 100644
--- a/ui/lib/ui/src/lib/components/ui/dialog/dialog-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-content.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 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`,
+			`fixed top-1/2 left-1/2 z-50 grid -translate-x-1/2 -translate-y-1/2 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
diff --git a/ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte
index 2beb3d338..18078451d 100644
--- a/ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-description.svelte
@@ -11,7 +11,7 @@

 <DialogPrimitive.Description
 	bind:ref
-	class={cn('text-sm text-muted-foreground', className)}
+	class={cn('text-body-sm text-muted-foreground', className)}
 	data-slot="dialog-description"
 	{...restProps}
 />
diff --git a/ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte
index ccc598073..bf555686a 100644
--- a/ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-overlay.svelte
@@ -12,7 +12,7 @@
 <DialogPrimitive.Overlay
 	bind:ref
 	class={cn(
-		'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',
+		'fixed inset-0 z-50 bg-(--surface-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/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte b/ui/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte
index c44545769..12d4cedb1 100644
--- a/ui/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dialog/dialog-title.svelte
@@ -11,7 +11,7 @@

 <DialogPrimitive.Title
 	bind:ref
-	class={cn('text-lg leading-none font-semibold', className)}
+	class={cn('text-title leading-none font-semibold', className)}
 	data-slot="dialog-title"
 	{...restProps}
 />
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
index 87e3fbd9e..36de63de3 100644
--- a/ui/lib/ui/src/lib/components/ui/drawer/drawer-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-content.svelte
@@ -25,14 +25,14 @@
 	<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',
+			'matte-float text-popover-foreground flex h-auto flex-col text-body-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"
+			class="bg-muted mx-auto mt-4 hidden h-1 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
 		></div>

 		{@render children?.()}
diff --git a/ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte
index 1fed8a423..9912e9e3b 100644
--- a/ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-description.svelte
@@ -11,7 +11,7 @@

 <DrawerPrimitive.Description
 	bind:ref
-	class={cn('text-muted-foreground text-sm', className)}
+	class={cn('text-muted-foreground text-body-sm', className)}
 	data-slot="drawer-description"
 	{...restProps}
 />
diff --git a/ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte b/ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte
index 00529a134..8ffbbe1e2 100644
--- a/ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/drawer/drawer-title.svelte
@@ -11,7 +11,7 @@

 <DrawerPrimitive.Title
 	bind:ref
-	class={cn('text-foreground text-base font-medium', className)}
+	class={cn('text-foreground text-body font-medium', className)}
 	data-slot="drawer-title"
 	{...restProps}
 />
diff --git a/ui/lib/ui/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
index 86efc27b5..aaa984ed4 100644
--- a/ui/lib/ui/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
@@ -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-icon-md",
+		"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-body-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/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
index c5e9a4b5c..bfa4a2519 100644
--- a/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
@@ -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 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',
+			'z-50 max-h-[calc(var(--bits-dropdown-menu-content-available-height)-1rem)] min-w-32 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/lib/ui/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
index 465fa17ad..275e14920 100644
--- a/ui/lib/ui/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
@@ -15,7 +15,7 @@

 <DropdownMenuPrimitive.GroupHeading
 	bind:ref
-	class={cn('px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8', className)}
+	class={cn('px-2 py-1.5 text-body-sm font-semibold data-[inset]:pl-8', className)}
 	data-inset={inset}
 	data-slot="dropdown-menu-group-heading"
 	{...restProps}
diff --git a/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
index 311cf592a..65727cef8 100644
--- a/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte
@@ -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-icon-md [&_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-body-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/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
index c08b51de7..c36df2b69 100644
--- a/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte
@@ -15,7 +15,7 @@

 <div
 	bind:this={ref}
-	class={cn('px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8', className)}
+	class={cn('px-2 py-1.5 text-body-sm font-semibold data-[inset]:pl-8', className)}
 	data-inset={inset}
 	data-slot="dropdown-menu-label"
 	{...restProps}
diff --git a/ui/lib/ui/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
index 477f01ed7..0de3fb641 100644
--- a/ui/lib/ui/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
@@ -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-icon-md",
+		"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-body-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/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
index 52fba5ae6..0101efcb9 100644
--- a/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
+++ b/ui/lib/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte
@@ -12,7 +12,7 @@

 <span
 	bind:this={ref}
-	class={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}
+	class={cn('ml-auto text-caption tracking-widest text-muted-foreground', className)}
 	data-slot="dropdown-menu-shortcut"
 	{...restProps}
 >
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
index b599c733f..c079ba1fa 100644
--- 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
@@ -29,7 +29,7 @@
 		{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',
+			'z-50 max-h-[calc(var(--bits-menu-content-available-height)-1rem)] min-w-32 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"
diff --git a/ui/lib/ui/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
index 8d1c59249..f54725f11 100644
--- a/ui/lib/ui/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
@@ -17,7 +17,7 @@
 <DropdownMenuPrimitive.SubTrigger
 	bind:ref
 	class={cn(
-		"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",
+		"flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-body-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}
diff --git a/ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte
index 14d082454..569e05b55 100644
--- a/ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-content.svelte
@@ -13,7 +13,7 @@
 <div
 	bind:this={ref}
 	class={cn(
-		'gap-2.5 text-sm flex w-full max-w-sm min-w-0 flex-col items-center text-balance',
+		'gap-2.5 text-body-sm flex w-full max-w-sm min-w-0 flex-col items-center text-balance',
 		className
 	)}
 	data-slot="empty-content"
diff --git a/ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte
index 0cbd35df8..c248e99e1 100644
--- a/ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-description.svelte
@@ -13,7 +13,7 @@
 <div
 	bind:this={ref}
 	class={cn(
-		'text-sm/relaxed text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4',
+		'text-body-sm/relaxed text-muted-foreground [&>a:hover]:text-primary text-body-sm/relaxed [&>a]:underline [&>a]:underline-offset-4',
 		className
 	)}
 	data-slot="empty-description"
diff --git a/ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte b/ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte
index 9c307533d..cbd91c4da 100644
--- a/ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte
+++ b/ui/lib/ui/src/lib/components/ui/empty/empty-title.svelte
@@ -12,7 +12,7 @@

 <div
 	bind:this={ref}
-	class={cn('text-sm font-medium tracking-tight', className)}
+	class={cn('text-body-sm font-medium tracking-tight', className)}
 	data-slot="empty-title"
 	{...restProps}
 >
diff --git a/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte
index d4421376f..d6615ee30 100644
--- a/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/hover-card/hover-card-content.svelte
@@ -21,7 +21,7 @@
 		bind:ref
 		{align}
 		class={cn(
-			'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',
+			'z-50 w-64 origin-(--bits-link-preview-content-transform-origin) rounded-xl border matte-float p-1.5 text-body-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/lib/ui/src/lib/components/ui/input/input.svelte b/ui/lib/ui/src/lib/components/ui/input/input.svelte
index 7ab732538..6733feeb0 100644
--- a/ui/lib/ui/src/lib/components/ui/input/input.svelte
+++ b/ui/lib/ui/src/lib/components/ui/input/input.svelte
@@ -25,9 +25,9 @@
 		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',
+			'flex h-control-md w-full min-w-0 rounded-md border border-(--line-field) 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-(--fg-muted) disabled:cursor-not-allowed disabled:opacity-50 dark:bg-(--field-background)',
+			'focus-visible:border-(--line-focus) focus-visible:ring-3 focus-visible:ring-ring/50',
+			'aria-invalid:border-(--line-danger) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
 			className
 		)}
 		data-slot="input"
@@ -39,9 +39,9 @@
 		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',
+			'flex h-control-md w-full min-w-0 rounded-md border border-(--line-field) bg-(--field-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-(--fg-muted) disabled:cursor-not-allowed disabled:opacity-50 md:text-body-sm',
+			'focus-visible:border-(--line-focus) focus-visible:ring-3 focus-visible:ring-ring/50',
+			'aria-invalid:border-(--line-danger) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
 			className
 		)}
 		data-slot="input"
diff --git a/ui/lib/ui/src/lib/components/ui/label/label.svelte b/ui/lib/ui/src/lib/components/ui/label/label.svelte
index 787948a46..42ed82274 100644
--- a/ui/lib/ui/src/lib/components/ui/label/label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/label/label.svelte
@@ -12,7 +12,7 @@
 <LabelPrimitive.Root
 	bind:ref
 	class={cn(
-		'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
+		'flex items-center gap-2 text-body-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
 		className
 	)}
 	data-slot="label"
diff --git a/ui/lib/ui/src/lib/components/ui/select/select-content.svelte b/ui/lib/ui/src/lib/components/ui/select/select-content.svelte
index 07b7e1113..f48a94b58 100644
--- a/ui/lib/ui/src/lib/components/ui/select/select-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-content.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 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',
+			'relative z-[var(--layer-popover,1000000)] max-h-(--bits-select-content-available-height) min-w-32 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/lib/ui/src/lib/components/ui/select/select-group-heading.svelte b/ui/lib/ui/src/lib/components/ui/select/select-group-heading.svelte
index 11839c357..a8efcd4cd 100644
--- a/ui/lib/ui/src/lib/components/ui/select/select-group-heading.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-group-heading.svelte
@@ -13,7 +13,7 @@

 <SelectPrimitive.GroupHeading
 	bind:ref
-	class={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}
+	class={cn('px-2 py-1.5 text-caption text-muted-foreground', className)}
 	data-slot="select-group-heading"
 	{...restProps}
 >
diff --git a/ui/lib/ui/src/lib/components/ui/select/select-item.svelte b/ui/lib/ui/src/lib/components/ui/select/select-item.svelte
index a4d0b158c..4a188e53f 100644
--- a/ui/lib/ui/src/lib/components/ui/select/select-item.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-item.svelte
@@ -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-icon-md [&_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-body-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/lib/ui/src/lib/components/ui/select/select-label.svelte b/ui/lib/ui/src/lib/components/ui/select/select-label.svelte
index c756c725f..2e6d52ea2 100644
--- a/ui/lib/ui/src/lib/components/ui/select/select-label.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-label.svelte
@@ -12,7 +12,7 @@

 <div
 	bind:this={ref}
-	class={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}
+	class={cn('px-2 py-1.5 text-caption text-muted-foreground', className)}
 	data-slot="select-label"
 	{...restProps}
 >
diff --git a/ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte b/ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte
index fbe100290..78e1c5cc6 100644
--- a/ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte
+++ b/ui/lib/ui/src/lib/components/ui/select/select-trigger.svelte
@@ -17,14 +17,14 @@

 	// Super small trigger: fits its selected value, for dense inline use.
 	const xsClasses =
-		"group flex h-6 w-fit items-center justify-between gap-1 rounded-md border border-border/30 bg-muted/60 px-2 py-0 text-xs whitespace-nowrap outline-none select-none transition-colors hover:bg-muted/80 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground dark:border-border/20 dark:bg-muted/75 dark:hover:bg-muted [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground";
+		"group flex h-6 w-fit items-center justify-between gap-1 rounded-md border border-border/30 bg-muted/60 px-2 py-0 text-caption whitespace-nowrap outline-none select-none transition-colors hover:bg-muted/80 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground dark:border-border/20 dark:bg-muted/75 dark:hover:bg-muted [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground";

 	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-icon-xs [&_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-body-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 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"
+				: "flex w-fit items-center justify-between gap-2 rounded-md border border-border/30 bg-muted/60 px-3 py-2 text-body-sm whitespace-nowrap matte-key transition-colors outline-none select-none hover:bg-muted/80 focus-visible:border-ring focus-visible:ring-3 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/lib/ui/src/lib/components/ui/switch/switch.svelte b/ui/lib/ui/src/lib/components/ui/switch/switch.svelte
index 5029ad263..3f01eaa55 100644
--- a/ui/lib/ui/src/lib/components/ui/switch/switch.svelte
+++ b/ui/lib/ui/src/lib/components/ui/switch/switch.svelte
@@ -14,7 +14,7 @@
 	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)',
+		'peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-(--surface-muted) shadow-(--elevation-inset) transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--action-primary)',
 		className
 	)}
 	data-slot="switch"
@@ -22,7 +22,7 @@
 >
 	<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'
+			'pointer-events-none block size-4 rounded-full bg-(--surface-lifted) shadow-(--elevation-control) 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"
 	/>
diff --git a/ui/lib/ui/src/lib/components/ui/table/table-caption.svelte b/ui/lib/ui/src/lib/components/ui/table/table-caption.svelte
index 3908b2970..335ee6ad7 100644
--- a/ui/lib/ui/src/lib/components/ui/table/table-caption.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table-caption.svelte
@@ -12,7 +12,7 @@

 <caption
 	bind:this={ref}
-	class={cn('mt-4 text-sm text-muted-foreground', className)}
+	class={cn('mt-4 text-body-sm text-muted-foreground', className)}
 	data-slot="table-caption"
 	{...restProps}
 >
diff --git a/ui/lib/ui/src/lib/components/ui/table/table.svelte b/ui/lib/ui/src/lib/components/ui/table/table.svelte
index 21b047ef9..518fcddad 100644
--- a/ui/lib/ui/src/lib/components/ui/table/table.svelte
+++ b/ui/lib/ui/src/lib/components/ui/table/table.svelte
@@ -13,7 +13,7 @@
 <div class="relative w-full overflow-x-auto" data-slot="table-container">
 	<table
 		bind:this={ref}
-		class={cn('w-full caption-bottom text-sm', className)}
+		class={cn('w-full caption-bottom text-body-sm', className)}
 		data-slot="table"
 		{...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
index bc4ec9aec..2529bce2f 100644
--- a/ui/lib/ui/src/lib/components/ui/tabs/tabs-list.svelte
+++ b/ui/lib/ui/src/lib/components/ui/tabs/tabs-list.svelte
@@ -4,13 +4,13 @@

 	// 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',
+		base: 'group/tabs-list relative inline-flex w-fit items-center justify-center text-(--fg-soft) 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)',
+				default: 'gap-0.5 rounded-lg bg-(--surface-muted) p-0.5 shadow-(--elevation-inset)',
 				line: 'gap-1 bg-transparent'
 			}
 		}
@@ -159,8 +159,8 @@
 		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)',
+				? 'rounded-full bg-(--fg-default)'
+				: 'rounded-md bg-(--surface-lifted) shadow-(--elevation-control)',
 			!indicator && 'hidden'
 		)}
 		data-slot="tabs-indicator"
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
index 33e8342a4..a5f39c77a 100644
--- a/ui/lib/ui/src/lib/components/ui/tabs/tabs-trigger.svelte
+++ b/ui/lib/ui/src/lib/components/ui/tabs/tabs-trigger.svelte
@@ -13,8 +13,8 @@
 <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)',
+		"relative inline-flex h-full flex-1 items-center justify-center gap-1.5 rounded-md px-3 text-label font-medium whitespace-nowrap transition-colors duration-250 ease-out-quint outline-none hover:text-(--fg-default) focus-visible:ring-3 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-(--fg-default)',
 		className
 	)}
 	data-slot="tabs-trigger"
diff --git a/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte b/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte
index 20852a788..0c9b04d8f 100644
--- a/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte
+++ b/ui/lib/ui/src/lib/components/ui/textarea/textarea.svelte
@@ -14,7 +14,7 @@
 	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',
+		'flex field-sizing-content min-h-16 w-full rounded-md border border-(--line-field) bg-(--field-background) px-3 py-2 text-body matte-well transition-[color,box-shadow] outline-none placeholder:text-(--fg-muted) focus-visible:border-(--line-focus) focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-(--line-danger) aria-invalid:ring-destructive/20 md:text-body-sm dark:aria-invalid:ring-destructive/40',
 		className
 	)}
 	data-slot="textarea"
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
index 9e252c2fd..db4ddd4dc 100644
--- 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
@@ -23,10 +23,10 @@
 	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',
+		'h-auto shrink-0 rounded-none text-(--fg-default) backdrop-blur-none hover:bg-(--action-ghost-hover) hover:text-(--fg-default) focus:z-10 focus-visible:z-10',
+		'border-(--line-control) 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-(--fg-soft) 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-(--fg-default)',
+		'data-[state=on]:bg-(--surface-pressed) data-[state=on]:text-(--fg-default) data-[state=on]:shadow-(--elevation-pressed) data-[state=on]:hover:bg-(--surface-pressed) data-[state=on]:*:translate-y-px',
 		className
 	)}
 	data-size={ctx.size || size}
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
index 293f1cf5d..09a840790 100644
--- 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
@@ -61,7 +61,7 @@ get along, so we shut typescript up by casting `value` to `never`.
 	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/toggle-group flex w-fit flex-row items-stretch overflow-hidden rounded-md border border-(--button-secondary-border) bg-(--button-secondary-background) shadow-(--elevation-control) matte-key data-vertical:flex-col',
 		GROUP_HEIGHT[size ?? 'sm'],
 		className
 	)}
diff --git a/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte b/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte
index c03007e45..287a9f15b 100644
--- a/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte
+++ b/ui/lib/ui/src/lib/components/ui/toggle/toggle.svelte
@@ -3,7 +3,7 @@
 	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)",
+		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-md text-label font-medium outline-none transition-all focus-visible:ring-3 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-(--fg-default) hover:bg-(--action-ghost-hover) data-[state=on]:bg-(--surface-selected) data-[state=on]:hover:bg-(--surface-selected) data-[state=on]:text-(--fg-default)",
 		defaultVariants: {
 			size: 'default',
 			variant: 'default'
@@ -13,15 +13,14 @@
 			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-lg': 'size-(--height-control-lg) rounded-lg',
 				'icon-sm': 'size-(--height-control-sm)',
-				lg: 'h-control-lg rounded-panel px-6 has-[>svg]:px-4',
+				lg: 'h-control-lg rounded-lg 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)'
+				outline: 'matte-key border border-(--line-control) bg-(--field-background)'
 			}
 		}
 	});
diff --git a/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte b/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte
index ce16318aa..39733de83 100644
--- a/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte
+++ b/ui/lib/ui/src/lib/components/ui/tooltip/tooltip-content.svelte
@@ -18,7 +18,7 @@

 	const contentClass = $derived(
 		cn(
-			'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',
+			'z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-(--action-primary) px-3 py-1.5 shadow-[inset_0_0_0_1px_var(--highlight-inverse),var(--elevation-surface)] text-caption text-balance text-(--fg-on-action) 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
 		)
 	);
@@ -39,7 +39,7 @@
 			{#snippet child({ props })}
 				<div
 					class={cn(
-						'z-50 size-2.5 rotate-45 rounded-[2px] bg-primary',
+						'z-50 size-2.5 rotate-45 rounded-xs bg-primary',
 						'data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]',
 						'data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]',
 						'data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2',
diff --git a/ui/lib/ui/src/lib/components/ui/utils.ts b/ui/lib/ui/src/lib/components/ui/utils.ts
index 16a0f6379..68807fc8a 100644
--- a/ui/lib/ui/src/lib/components/ui/utils.ts
+++ b/ui/lib/ui/src/lib/components/ui/utils.ts
@@ -2,8 +2,8 @@ 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
+// the type, motion, icon and height roles from src/lib/styles/tokens/semantic.css, so text-label is merged as a
+// font size and ease-sheet as an easing rather than dropped or kept twice
 const mergeConfig = {
 	extend: {
 		classGroups: {
@@ -11,8 +11,8 @@ const mergeConfig = {
 			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']
+			ease: ['out-quint', 'sheet'],
+			text: ['body', 'body-sm', 'label', 'label-sm', 'caption', 'caption-sm', 'title', 'heading', 'display']
 		}
 	}
 };
diff --git a/ui/lib/ui/src/lib/constants/css-classes.constants.ts b/ui/lib/ui/src/lib/constants/css-classes.constants.ts
index 05889db8d..cb7316aad 100644
--- a/ui/lib/ui/src/lib/constants/css-classes.constants.ts
+++ b/ui/lib/ui/src/lib/constants/css-classes.constants.ts
@@ -17,7 +17,7 @@ export const FILTER_TRIGGER_CLASS = `
     gap-1.5
     rounded-md
     px-3
-    text-sm
+    text-body-sm
     font-medium
     transition-colors
     hover:bg-muted/80 dark:hover:bg-muted
diff --git a/ui/lib/ui/src/lib/models/constants.ts b/ui/lib/ui/src/lib/models/constants.ts
index 9fff8ca10..b36ac4140 100644
--- a/ui/lib/ui/src/lib/models/constants.ts
+++ b/ui/lib/ui/src/lib/models/constants.ts
@@ -11,19 +11,19 @@ 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';
+	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-caption-sm 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';
+	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-1.5 py-0 text-caption-sm 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';
+	'inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-caption-sm 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';
+	'rounded-md bg-primary px-1 py-0.5 text-caption-sm font-semibold tracking-wide text-primary-foreground uppercase';

 export const MODALITY_ICONS = {
 	[ModelModality.AUDIO]: AudioIcon,
diff --git a/ui/lib/ui/src/lib/styles/surfaces.css b/ui/lib/ui/src/lib/styles/surfaces.css
index 9f38783fd..151bade6c 100644
--- a/ui/lib/ui/src/lib/styles/surfaces.css
+++ b/ui/lib/ui/src/lib/styles/surfaces.css
@@ -1,13 +1,15 @@
 /*
  * 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.
+ * that default to semantic tokens; the *-surface utilities below set every slot a
+ * component uses, so markup needs a single class per component and a surface inside
+ * another one does not inherit its slots.
  */

-/* Frosted panel: flat fill, faint inner rim, hairline border shaded darker at the sides. */
+/* Frosted panel: flat fill, faint inner rim, hairline border shaded darker at the sides: the middle of each edge is
+   the side's shade at two thirds. */
 @utility matte-glass {
-	--edge-side: var(--glass-edge-side, var(--edge-rest-side));
-	--edge-mid: var(--glass-edge-mid, var(--edge-rest-mid));
+	--edge-side: var(--glass-edge, var(--edge-rest));
+	--edge-mid: color-mix(in oklch, var(--edge-side) 67%, transparent);
 	background-color: var(--glass-background, var(--surface-glass));
 	backdrop-filter: blur(var(--blur-surface)) saturate(1.5);
 	box-shadow:
@@ -40,43 +42,37 @@
 	}

 	&:focus-within {
-		--edge-side: var(--glass-edge-side-focus, var(--edge-focus-side));
-		--edge-mid: var(--glass-edge-mid-focus, var(--edge-focus-mid));
+		--edge-side: var(--glass-edge-focus, var(--edge-focus));
 	}
 }

 @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);
+	--glass-background: var(--surface-glass);
+	--glass-edge: var(--edge-rest);
+	--glass-edge-focus: var(--edge-focus);
+	--glass-highlight: var(--highlight-inner);
+	--glass-shadow: var(--elevation-soft);
+	color: var(--fg-default);
 }

 @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);
+	--glass-background: var(--surface-glass);
+	--glass-edge: var(--edge-rest);
+	--glass-highlight: var(--highlight-inner);
+	--glass-shadow: var(--elevation-surface);
+	color: var(--fg-default);
 }

 /* 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);
+	--glass-edge: var(--edge-ambient);
+	--glass-edge-focus: var(--edge-ambient);
+	--glass-highlight: transparent;
+	--glass-shadow: var(--elevation-surface);
 }

 /* Elevated surfaces (cards, floating bars, thumbnails): an elevation token with the hairline ring (--elevation-ring,
@@ -85,19 +81,19 @@
 @utility elevated-control {
 	box-shadow:
 		var(--elevation-control),
-		0 0 0 var(--elevation-ring-width) var(--elevation-ring);
+		0 0 0 1px var(--elevation-ring);
 }

 @utility elevated-surface {
 	box-shadow:
 		var(--elevation-surface),
-		0 0 0 var(--elevation-ring-width) var(--elevation-ring);
+		0 0 0 1px var(--elevation-ring);
 }

 @utility elevated-raised {
 	box-shadow:
 		var(--elevation-raised),
-		0 0 0 var(--elevation-ring-width) var(--elevation-ring);
+		0 0 0 1px var(--elevation-ring);
 }

 /* rows grouped inside a glass panel; the edge stays the same while focus is inside. It sits on
@@ -107,10 +103,8 @@
 	@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-edge: var(--edge-ambient);
+	--glass-edge-focus: var(--edge-ambient);
 	--glass-highlight: transparent;
 	--glass-shadow: var(--inset-group-shadow);
 	border-radius: var(--inset-group-radius);
@@ -122,10 +116,8 @@
 	@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-edge: var(--edge-ambient);
+	--glass-edge-focus: var(--edge-ambient);
 	--glass-highlight: transparent;
 	--glass-shadow: var(--inset-group-shadow);
 }
@@ -135,12 +127,12 @@
    shadow for the rim would sit inside the border instead, and the 1px between the two would draw a double edge. */
 @utility matte-float {
 	background-color: var(--float-background, var(--float-panel-background));
-	border-color: var(--float-panel-highlight);
-	color: var(--float-panel-text);
+	border-color: var(--highlight-inner);
+	color: var(--fg-default);
 	backdrop-filter: blur(var(--blur-surface)) saturate(1.5);
 	box-shadow:
-		var(--float-panel-shadow),
-		0 0 0 var(--elevation-ring-width) var(--float-panel-edge);
+		var(--elevation-raised),
+		0 0 0 1px var(--edge-raised);
 }

 /* Dialogs float over the page colour rather than the raised one. */
@@ -151,7 +143,7 @@

 /* Recessed field (inputs, switch track, checkbox): soft inner shade, keeps Tailwind focus rings. */
 @utility matte-well {
-	--tw-inset-shadow: var(--input-shadow);
+	--tw-inset-shadow: var(--elevation-inset);
 	box-shadow:
 		var(--tw-inset-shadow), var(--tw-ring-offset-shadow, 0 0 #0000),
 		var(--tw-ring-shadow, 0 0 #0000);
@@ -159,7 +151,7 @@

 /* 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));
+	background-image: linear-gradient(to bottom, var(--sheen-start), transparent);
 }

 /* The fainter sheen for a solid fill (solid badges): barely lighter at the top. */
@@ -187,8 +179,11 @@
 }

 /* 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. */
+   lighter, the glyph pressed in a little; no glow. Set the color with orb-danger, orb-warning or orb-success: the rim
+   and the glyph are mixed from it, the rim towards white and the glyph towards black. */
 @utility matte-orb {
+	--orb-rim: color-mix(in oklab, var(--orb), white 30%);
+	--orb-glyph: color-mix(in oklab, var(--orb), black 30%);
 	background-image: linear-gradient(
 		to bottom,
 		color-mix(in oklab, var(--orb), white 6%),
@@ -228,25 +223,19 @@
 		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);
+	box-shadow: inset 0 0 0 0.5px color-mix(in oklab, color-mix(in oklab, var(--orb), black 30%) 50%, transparent);
 }

 @utility orb-danger {
-	--orb: var(--status-danger);
-	--orb-rim: var(--status-danger-rim);
-	--orb-glyph: var(--status-danger-glyph);
+	--orb: var(--fill-danger);
 }

 @utility orb-warning {
-	--orb: var(--status-warning);
-	--orb-rim: var(--status-warning-rim);
-	--orb-glyph: var(--status-warning-glyph);
+	--orb: var(--fill-warning);
 }

 @utility orb-success {
-	--orb: var(--status-success);
-	--orb-rim: var(--status-success-rim);
-	--orb-glyph: var(--status-success-glyph);
+	--orb: var(--fill-success);
 }

 /* Letters pressed into a matte surface. */
diff --git a/ui/lib/ui/src/lib/styles/theme.css b/ui/lib/ui/src/lib/styles/theme.css
index 6b2538302..4f89b2571 100644
--- a/ui/lib/ui/src/lib/styles/theme.css
+++ b/ui/lib/ui/src/lib/styles/theme.css
@@ -54,59 +54,45 @@
 	--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;
+	/* corners: one scale, every step computed from --radius: 6, 8, 10, 14, 16, 24 and 32px. md for controls, fields
+	   and badges, lg for menus and dialogs, xl for cards, 2xl for the sidebar and bubbles, 3xl for the chat form and
+	   4xl for it on a phone */
 	--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);
+	--radius-2xl: calc(var(--radius) + 6px);
+	--radius-3xl: calc(var(--radius) + 14px);
+	--radius-4xl: calc(var(--radius) + 22px);
+	/*
+	 * shadcn's colour names, as Tailwind utilities only (bg-background, text-muted-foreground, border-border ...), so
+	 * the vendored components and their classes keep working. Each is a semantic token; in CSS, read the semantic
+	 * token itself (var(--surface-page), not var(--background)).
+	 */
+	--color-background: var(--surface-page);
+	--color-foreground: var(--fg-default);
+	--color-card: var(--surface-raised);
+	--color-card-foreground: var(--fg-default);
+	--color-popover: var(--surface-raised);
+	--color-popover-foreground: var(--fg-default);
+	--color-primary: var(--action-primary);
+	--color-primary-foreground: var(--fg-on-action);
+	--color-secondary: var(--surface-emphasis);
+	--color-secondary-foreground: var(--fg-default);
+	--color-muted: var(--surface-muted);
+	--color-muted-foreground: var(--fg-muted);
+	--color-accent: var(--surface-selected);
+	--color-accent-foreground: var(--fg-default);
+	--color-destructive: var(--fg-danger);
+	--color-border: var(--line-default);
+	--color-input: var(--line-field);
+	--color-ring: var(--line-focus);
 }

 @layer base {
diff --git a/ui/lib/ui/src/lib/styles/tokens/components.css b/ui/lib/ui/src/lib/styles/tokens/components.css
index 94c1ad699..43e5fc345 100644
--- a/ui/lib/ui/src/lib/styles/tokens/components.css
+++ b/ui/lib/ui/src/lib/styles/tokens/components.css
@@ -1,51 +1,22 @@
 /*
- * 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.
+ * Tier 3: component tokens. A component has a token here only for what it decides itself: a value no
+ * semantic token has, or one that only this component changes between themes. A component that takes a
+ * semantic token as it is reads the semantic token, with no alias here. A value comes from a semantic token
+ * where one fits and from a primitive where none does (the translucent blacks and whites of keys and sheens).
+ * Pattern [component]-[variant]-[property]-[state]. 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);
+	--inset-group-shadow: 0 2px 8px -4px rgb(0 0 0 / calc(0.08 * var(--elevation-strength)));
 	/* 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);
+	--inset-group-radius: 1rem;

 	/* 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 */
@@ -53,30 +24,13 @@

 	/* 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);
+	/* buttons: primary and danger take the action tokens as they are */
 	/* 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 */
@@ -86,88 +40,33 @@
 	--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);
 	/* the line between the two halves of a split button; dark mode makes it stronger than the keys' rim */
 	--button-group-separator: var(--line-control);
 	/* the action card (a tool permission or continue request in the chat) */
 	--action-card-border: var(--line-default);
-	--button-text: var(--fg-default);
+	/* a slot: a button group and the chat form's keys set their own shadow through it */
 	--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-primary-edge: color-mix(in oklab, var(--action-primary), black 30%);
 	--button-danger-sheen: var(--white-a2);
-	--button-danger-edge: color-mix(in oklab, var(--button-danger-background), black 6%);
+	--button-danger-edge: color-mix(in oklab, var(--action-danger), 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: a row of keys like a secondary button; 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: on, the thumb keeps the raised colour in light */
 	--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);
+	/* badges: primary, danger and outline take semantic tokens as they are */
 	--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 */
 }
@@ -182,16 +81,14 @@
 	--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);
+	/* the dark danger badge does not change on hover */
+	--badge-danger-background-hover: var(--action-danger);
 	--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 */
@@ -202,7 +99,7 @@
 	   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-primary-edge: color-mix(in oklab, var(--action-primary), black 10%);
 	--button-danger-sheen: transparent;
 	--button-danger-edge: color-mix(in oklch, var(--line-danger) 40%, transparent);
 	/* the keys' rim is white 12% over a white 9% fill, so a divider of the same shade vanishes between them */
@@ -211,11 +108,13 @@
 	--action-card-border: var(--white-a18);
 }

-/* the user bubble is a card with an even, fainter edge, no inner ring and a barely noticeable shadow */
+/* the user bubble is a card with an even, fainter edge, no inner ring and a barely noticeable shadow. Unlayered, so
+   it overrides what the card's surface utility sets */
 .chat-message-user-bubble {
-	--card-shadow: var(--user-bubble-shadow);
+	--glass-shadow: var(--elevation-faint);
 	/* 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);
+	--glass-highlight: transparent;
+	--glass-edge: var(--edge-ambient);
+	/* even all round: no fade towards the middle */
+	--edge-mid: var(--edge-side);
 }
diff --git a/ui/lib/ui/src/lib/styles/tokens/primitives.css b/ui/lib/ui/src/lib/styles/tokens/primitives.css
index a12f96681..768dab854 100644
--- a/ui/lib/ui/src/lib/styles/tokens/primitives.css
+++ b/ui/lib/ui/src/lib/styles/tokens/primitives.css
@@ -1,55 +1,40 @@
 /*
  * 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.
+ * Only the token tiers reference these: semantic.css, and components.css where no semantic token fits. A component's
+ * classes 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.
+ *
+ * Colours only. Sizes are not primitives: type and control sizes are roles in semantic.css that hold their value,
+ * corners are one scale computed from --radius in theme.css, and spacing is Tailwind's 4px grid.
  */

 :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 and green: each scale keeps one hue */
 	--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);
@@ -60,7 +45,6 @@
 	--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);
@@ -68,41 +52,7 @@
 	--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
index 479a71de7..2301689a0 100644
--- a/ui/lib/ui/src/lib/styles/tokens/semantic.css
+++ b/ui/lib/ui/src/lib/styles/tokens/semantic.css
@@ -1,6 +1,13 @@
 /*
- * 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].
+ * Tier 2: semantic tokens. Named by purpose, they are the only tier that changes between light and
+ * dark. Pattern: [category]-[role]-[state].
+ *
+ * A token here is one of two things: a pick, which names a primitive per theme, or a derivation, which is
+ * mixed from another semantic token by a fixed rule and so follows it through every theme. The rules:
+ * soft text is the text colour at 70%; a hover fill is the fill at 90%; a status surface is its fill mixed
+ * into the page and a status line its fill mixed into the default line; a dark shadow is the light one,
+ * --elevation-strength times as dense. Derivations are declared once, in :root: .dark and .theme-matte sit
+ * on the same element, so they resolve from that theme's picks.
  *
  * 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
@@ -22,6 +29,8 @@

 	/* foreground: text and icons */
 	--fg-default: var(--neutral-950);
+	/* the label of an option that is not the picked one: a tab, a key of a toggle group */
+	--fg-soft: color-mix(in oklch, var(--fg-default) 70%, transparent);
 	--fg-muted: var(--neutral-500);
 	--fg-on-action: var(--neutral-50);
 	--fg-on-danger: var(--neutral-0);
@@ -39,93 +48,89 @@
 	--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) */
+	   line mixed from the fill (in oklab, so the hue holds). The two shares are the only part a theme sets */
 	--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));
+	--status-surface-share: 11%;
+	--status-line-share: 34%;
+	--surface-success: color-mix(in oklab, var(--fill-success) var(--status-surface-share), var(--surface-page));
+	--surface-warning: color-mix(in oklab, var(--fill-warning) var(--status-surface-share), var(--surface-page));
+	--surface-danger: color-mix(in oklab, var(--fill-danger) var(--status-surface-share), var(--surface-page));
+	--surface-info: color-mix(in oklab, var(--fill-info) var(--status-surface-share), var(--surface-page));
+	--line-success-soft: color-mix(in oklab, var(--fill-success) var(--status-line-share), var(--line-default));
+	--line-warning-soft: color-mix(in oklab, var(--fill-warning) var(--status-line-share), var(--line-default));
+	--line-danger-soft: color-mix(in oklab, var(--fill-danger) var(--status-line-share), var(--line-default));
+	--line-info-soft: color-mix(in oklab, var(--fill-info) var(--status-line-share), 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);
+	/* edges: hairlines of matte surfaces. Each names the shade at the sides; matte-glass fades it towards the
+	   middle itself (see surfaces.css) */
+	--edge-rest: var(--cool-gray-200);
+	--edge-focus: var(--cool-gray-400);
+	--edge-ambient: 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);
+	--action-primary-hover: color-mix(in oklch, var(--action-primary) 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-danger-hover: color-mix(in oklch, var(--action-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: the only shadows. Smooth stacks, 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, pulled in with a negative spread,
+	   so the shadow fades out the way light does. A surface reaches about 20px and a raised one about 38px; a control
+	   keeps to three tight layers (nothing past 4px), so buttons sit close to the page. Tailwind's own shadow sizes
+	   are not used: they would not follow the theme. Every layer's density is
+	   multiplied by --elevation-strength, which is all a theme sets: 1 in light, 5 in dark, where a shadow has to be
+	   that much denser to read on the page */
+	--elevation-strength: 1;
 	--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);
+		0 1px 2px rgb(0 0 0 / calc(0.04 * var(--elevation-strength))),
+		0 3px 6px -2px rgb(0 0 0 / calc(0.05 * var(--elevation-strength))),
+		0 8px 16px -4px rgb(0 0 0 / calc(0.06 * var(--elevation-strength)));
 	--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);
+		0 0.5px 1px rgb(0 0 0 / calc(0.05 * var(--elevation-strength))),
+		0 1px 2px rgb(0 0 0 / calc(0.05 * var(--elevation-strength))),
+		0 2px 4px -1px rgb(0 0 0 / calc(0.05 * var(--elevation-strength)));
 	--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);
+		0 2px 4px rgb(0 0 0 / calc(0.04 * var(--elevation-strength))),
+		0 6px 12px -3px rgb(0 0 0 / calc(0.06 * var(--elevation-strength))),
+		0 16px 28px -6px rgb(0 0 0 / calc(0.08 * var(--elevation-strength)));
 	/* 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);
+		0 0.5px 1px rgb(0 0 0 / calc(0.04 * var(--elevation-strength))),
+		0 1px 3px rgb(0 0 0 / calc(0.05 * var(--elevation-strength))),
+		0 2px 6px -2px rgb(0 0 0 / calc(0.05 * var(--elevation-strength))),
+		0 6px 16px -10px rgb(0 0 0 / calc(0.08 * var(--elevation-strength)));
+	--elevation-faint:
+		0 2px 4px rgb(0 0 0 / calc(0.025 * var(--elevation-strength))),
+		0 0.5px 1.5px rgb(0 0 0 / calc(0.03 * var(--elevation-strength)));
+	/* the shade inside a recessed field, and inside a key held down */
+	--elevation-inset: inset 0 1px 2px rgb(0 0 0 / calc(0.06 * var(--elevation-strength)));
+	--elevation-pressed: inset 0 1px 2px rgb(0 0 0 / calc(0.08 * var(--elevation-strength)));
 	/* 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);
+	--blur-surface: 1.5rem;
+	--blur-control: 0.75rem;
 }

 /* Matte, the alternative light theme: grey glass on a white page, fields on the page colour */
@@ -151,46 +156,31 @@
 	--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);
+	/* on a dark page the status fills are bright enough to read as text */
+	--fg-danger: var(--fill-danger);
+	--fg-success: var(--fill-success);
+	--fg-warning: var(--fill-warning);
+	--fg-info: var(--fill-info);

 	--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 */
+	/* the dark status fills, and a larger share of them in the soft surfaces and lines */
 	--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);
+	--status-surface-share: 16%;
+	--status-line-share: 38%;

-	--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-rest: var(--white-a6);
+	--edge-focus: var(--white-a18);
+	--edge-ambient: 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);
@@ -199,105 +189,72 @@
 	--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-strength: 5;
+	/* on a dark surface the hairline of the light key vanishes: the control stack instead */
 	--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);
+	/* type roles: text-body, text-label-sm, ... set size and line height. Labels, the title and the heading set
+	   their weight too; body and caption text takes the weight around it, regular unless a parent says otherwise.
+	   Sizes are 10, 12, 14, 16, 18, 24 and 30px; a line height is written as Tailwind writes its own, the line in rem
+	   over the size, so text nested in a role keeps the same proportion */
+	--text-body: 1rem;
+	--text-body--line-height: calc(1.5 / 1);
+	--text-body-sm: 0.875rem;
+	--text-body-sm--line-height: calc(1.25 / 0.875);
+	--text-label: 0.875rem;
+	--text-label--line-height: calc(1.25 / 0.875);
+	--text-label--font-weight: 500;
+	--text-label-sm: 0.75rem;
+	--text-label-sm--line-height: calc(1 / 0.75);
+	--text-label-sm--font-weight: 500;
+	--text-caption: 0.75rem;
+	--text-caption--line-height: calc(1 / 0.75);
+	/* the smallest text: a tag, a compact badge, a count */
+	--text-caption-sm: 0.625rem;
+	--text-caption-sm--line-height: calc(0.875 / 0.625);
+	--text-title: 1.125rem;
+	--text-title--line-height: calc(1.75 / 1.125);
+	--text-title--font-weight: 600;
+	--text-heading: 1.5rem;
+	--text-heading--line-height: calc(2 / 1.5);
+	--text-heading--font-weight: 600;
+	/* the biggest headline: a greeting, a splash */
+	--text-display: 1.875rem;
+	--text-display--line-height: calc(2.25 / 1.875);
+	--text-display--font-weight: 600;
+
+	/* motion: ease-out-quint for what enters or answers a press, quick off the mark and settling softly; ease-sheet
+	   for a sheet or a page that slides, the curve iOS moves its own with */
+	--ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
+	--ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);

-	/* 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);
+	/* icon sizes: size-icon-xs ... size-icon-lg (12, 14, 16 and 20px) */
+	--size-icon-xs: 0.75rem;
+	--size-icon-sm: 0.875rem;
+	--size-icon-md: 1rem;
+	--size-icon-lg: 1.25rem;

-	/* 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);
+	/* control heights (32, 36 and 40px). Corners are Tailwind's rounded-sm ... rounded-4xl, one scale computed from
+	   --radius in theme.css */
+	--height-control-sm: 2rem;
+	--height-control-md: 2.25rem;
+	--height-control-lg: 2.5rem;

-	/* 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);
+	/* colours. The neutral roles are reached through shadcn's utility names (bg-background, bg-muted,
+	   text-muted-foreground, border-border: see theme.css) or as bg-(--surface-lifted); only the status roles, which
+	   shadcn has no names for, get utilities of their own: bg-surface-danger, bg-fill-danger, text-fg-danger,
+	   border-line-danger-soft and the same for success, warning and info */
 	--background-color-surface-success: var(--surface-success);
 	--background-color-surface-warning: var(--surface-warning);
 	--background-color-surface-danger: var(--surface-danger);
@@ -306,24 +263,12 @@
 	--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/tests/stories/components/display/Card.stories.svelte b/ui/lib/ui/tests/stories/components/display/Card.stories.svelte
index 3119820d4..f6fa9ef14 100644
--- a/ui/lib/ui/tests/stories/components/display/Card.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/display/Card.stories.svelte
@@ -20,7 +20,7 @@
 			<Card.Description>131k context, vision and tool use</Card.Description>
 		</Card.Header>

-		<Card.Content class="text-sm text-muted-foreground">
+		<Card.Content class="text-body-sm text-muted-foreground">
 			Loaded on the server and ready to answer.
 		</Card.Content>

diff --git a/ui/lib/ui/tests/stories/components/display/Collapsible.stories.svelte b/ui/lib/ui/tests/stories/components/display/Collapsible.stories.svelte
index 2546c3c2a..2690a1f80 100644
--- a/ui/lib/ui/tests/stories/components/display/Collapsible.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/display/Collapsible.stories.svelte
@@ -18,7 +18,7 @@
 {#snippet section(open: boolean)}
 	<Collapsible.Root class="w-72 space-y-2" {open}>
 		<div class="flex items-center justify-between">
-			<span class="text-sm font-medium">Advanced sampling</span>
+			<span class="text-label">Advanced sampling</span>

 			<Collapsible.Trigger>
 				{#snippet child({ props })}
@@ -29,12 +29,12 @@
 			</Collapsible.Trigger>
 		</div>

-		<div class="rounded-md border px-4 py-2 font-mono text-sm">temperature 0.8</div>
+		<div class="rounded-md border px-4 py-2 font-mono text-body-sm">temperature 0.8</div>

 		<Collapsible.Content class="space-y-2">
-			<div class="rounded-md border px-4 py-2 font-mono text-sm">top_p 0.95</div>
+			<div class="rounded-md border px-4 py-2 font-mono text-body-sm">top_p 0.95</div>

-			<div class="rounded-md border px-4 py-2 font-mono text-sm">min_p 0.05</div>
+			<div class="rounded-md border px-4 py-2 font-mono text-body-sm">min_p 0.05</div>
 		</Collapsible.Content>
 	</Collapsible.Root>
 {/snippet}
diff --git a/ui/lib/ui/tests/stories/components/display/ScrollArea.stories.svelte b/ui/lib/ui/tests/stories/components/display/ScrollArea.stories.svelte
index 5f352b904..9c20bc0b8 100644
--- a/ui/lib/ui/tests/stories/components/display/ScrollArea.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/display/ScrollArea.stories.svelte
@@ -17,10 +17,10 @@
 <Story asChild name="Default">
 	<ScrollArea class="h-72 w-56 rounded-md border">
 		<div class="p-4">
-			<h4 class="mb-4 text-sm font-medium">Conversations</h4>
+			<h4 class="mb-4 text-label">Conversations</h4>

 			{#each chats as chat (chat)}
-				<div class="text-sm">{chat}</div>
+				<div class="text-body-sm">{chat}</div>

 				<Separator class="my-2" />
 			{/each}
diff --git a/ui/lib/ui/tests/stories/components/display/Separator.stories.svelte b/ui/lib/ui/tests/stories/components/display/Separator.stories.svelte
index 8a659c0d9..55b54dfee 100644
--- a/ui/lib/ui/tests/stories/components/display/Separator.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/display/Separator.stories.svelte
@@ -12,7 +12,7 @@
 </script>

 <Story asChild name="Default">
-	<div class="w-80 text-sm">
+	<div class="w-80 text-body-sm">
 		<p class="font-medium">Qwen3.8-27B</p>

 		<p class="text-muted-foreground">Loaded, 131k context</p>
diff --git a/ui/lib/ui/tests/stories/components/navigation/Tabs.stories.svelte b/ui/lib/ui/tests/stories/components/navigation/Tabs.stories.svelte
index fea7c211d..894fe22c2 100644
--- a/ui/lib/ui/tests/stories/components/navigation/Tabs.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/navigation/Tabs.stories.svelte
@@ -26,11 +26,11 @@
 					<Tabs.Trigger value="tools">Tools</Tabs.Trigger>
 				</Tabs.List>

-				<Tabs.Content class="pt-2 text-fg-muted" value="general">General settings.</Tabs.Content>
+				<Tabs.Content class="pt-2 text-muted-foreground" value="general">General settings.</Tabs.Content>

-				<Tabs.Content class="pt-2 text-fg-muted" value="sampling">Sampling settings.</Tabs.Content>
+				<Tabs.Content class="pt-2 text-muted-foreground" value="sampling">Sampling settings.</Tabs.Content>

-				<Tabs.Content class="pt-2 text-fg-muted" value="tools">Tool settings.</Tabs.Content>
+				<Tabs.Content class="pt-2 text-muted-foreground" value="tools">Tool settings.</Tabs.Content>
 			</Tabs.Root>
 		</StateGalleryItem>

diff --git a/ui/lib/ui/tests/stories/components/overlays/Drawer.stories.svelte b/ui/lib/ui/tests/stories/components/overlays/Drawer.stories.svelte
index cf91454ba..ab82f576f 100644
--- a/ui/lib/ui/tests/stories/components/overlays/Drawer.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/overlays/Drawer.stories.svelte
@@ -29,7 +29,7 @@
 						<Drawer.Description>Used on phones in place of the dropdown.</Drawer.Description>
 					</Drawer.Header>

-					<div class="space-y-1 px-4 text-sm">
+					<div class="space-y-1 px-4 text-body-sm">
 						<div class="rounded-md bg-accent px-3 py-2">Qwen3.8-27B</div>

 						<div class="rounded-md px-3 py-2">Llama-3.2-3B</div>
diff --git a/ui/lib/ui/tests/stories/components/overlays/HoverCard.stories.svelte b/ui/lib/ui/tests/stories/components/overlays/HoverCard.stories.svelte
index 21df9ba57..2b23c0db9 100644
--- a/ui/lib/ui/tests/stories/components/overlays/HoverCard.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/overlays/HoverCard.stories.svelte
@@ -16,7 +16,7 @@
 		<HoverCard.Root open>
 			<HoverCard.Trigger>
 				{#snippet child({ props })}
-					<a {...props} class="text-sm underline-offset-4 hover:underline" href="#hover-card"
+					<a {...props} class="text-body-sm underline-offset-4 hover:underline" href="#hover-card"
 						>ggml-org/Qwen3.8-27B-GGUF</a
 					>
 				{/snippet}
@@ -24,9 +24,9 @@

 			<HoverCard.Content class="w-72">
 				<div class="space-y-1">
-					<p class="text-sm font-medium">Qwen3.8-27B</p>
+					<p class="text-label">Qwen3.8-27B</p>

-					<p class="text-sm text-muted-foreground">
+					<p class="text-body-sm text-muted-foreground">
 						131k context, tool use and vision. Quantized to Q4_K_M, 16.4 GB.
 					</p>
 				</div>
diff --git a/ui/lib/ui/tests/stories/components/overlays/Popover.stories.svelte b/ui/lib/ui/tests/stories/components/overlays/Popover.stories.svelte
index d4ccd0b17..17c0787c6 100644
--- a/ui/lib/ui/tests/stories/components/overlays/Popover.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/overlays/Popover.stories.svelte
@@ -25,7 +25,7 @@

 			<Popover.Content class="w-72">
 				<div class="grid gap-3">
-					<p class="text-sm font-medium">Sampling</p>
+					<p class="text-label">Sampling</p>

 					<div class="grid grid-cols-3 items-center gap-2">
 						<Label for="story-temp">Temperature</Label>
diff --git a/ui/lib/ui/tests/stories/components/overlays/Submenus.stories.svelte b/ui/lib/ui/tests/stories/components/overlays/Submenus.stories.svelte
index fcce8a6b9..ded98c2a6 100644
--- a/ui/lib/ui/tests/stories/components/overlays/Submenus.stories.svelte
+++ b/ui/lib/ui/tests/stories/components/overlays/Submenus.stories.svelte
@@ -112,7 +112,7 @@
 	<div class="h-96 w-[32rem]">
 		<ContextMenu.Root>
 			<ContextMenu.Trigger
-				class="flex h-24 w-52 items-center justify-center rounded-lg border border-dashed text-sm text-muted-foreground"
+				class="flex h-24 w-52 items-center justify-center rounded-lg border border-dashed text-body-sm text-muted-foreground"
 			>
 				Right-click here
 			</ContextMenu.Trigger>
diff --git a/ui/lib/ui/tests/stories/foundations/Colors.stories.svelte b/ui/lib/ui/tests/stories/foundations/Colors.stories.svelte
index f4738de42..4cfa5e896 100644
--- a/ui/lib/ui/tests/stories/foundations/Colors.stories.svelte
+++ b/ui/lib/ui/tests/stories/foundations/Colors.stories.svelte
@@ -15,7 +15,7 @@
 <Story asChild name="Primitives">
 	<TokenTier
 		groups={primitiveGroups}
-		intro="Raw values named by what they are. Only semantic tokens point at these; components never use them directly."
+		intro="Raw colours named by what they are. Only semantic tokens point at these; components never use them directly."
 		showReference={false}
 	/>
 </Story>
@@ -23,7 +23,7 @@
 <Story asChild name="Semantic">
 	<TokenTier
 		groups={semanticGroups}
-		intro="Named by purpose. Each points at a primitive, and this is the only tier that changes between light and dark. Switch the theme to see the dark values."
+		intro="Named by purpose. Each picks a primitive per theme or is mixed from another semantic token by a fixed rule, and this is the only tier that changes between light and dark. Switch the theme to see the dark values."
 		showReference={true}
 	/>
 </Story>
@@ -31,7 +31,7 @@
 <Story asChild name="Components">
 	<TokenTier
 		groups={componentGroups}
-		intro="One group per component. They point at semantic tokens, so both themes follow automatically."
+		intro="Only what a component decides itself: a value no semantic token has, or one that only this component changes between themes."
 		showReference={true}
 	/>
 </Story>
diff --git a/ui/lib/ui/tests/stories/foundations/Elevation.stories.svelte b/ui/lib/ui/tests/stories/foundations/Elevation.stories.svelte
index dfa297416..5cab1ee92 100644
--- a/ui/lib/ui/tests/stories/foundations/Elevation.stories.svelte
+++ b/ui/lib/ui/tests/stories/foundations/Elevation.stories.svelte
@@ -14,9 +14,8 @@
 	const levels = [
 		{ name: 'elevation-inset', note: 'fields, recessed' },
 		{ name: 'elevation-control', note: 'buttons and tabs' },
-		{ name: 'elevation-surface', note: 'chat form, cards, sidebar' },
-		{ name: 'elevation-raised', note: 'menus, popovers, dialogs' },
-		{ name: 'elevation-tooltip', note: 'tooltips' }
+		{ name: 'elevation-surface', note: 'chat form, cards, sidebar, tooltips' },
+		{ name: 'elevation-raised', note: 'menus, popovers, dialogs' }
 	];
 </script>

@@ -27,7 +26,7 @@
 				<div class="p-4">
 					<div
 						style:box-shadow="var(--{level.name})"
-						class="h-20 rounded-card bg-surface-raised"
+						class="h-20 rounded-xl bg-card"
 					></div>
 				</div>
 			</StateGalleryItem>
diff --git a/ui/lib/ui/tests/stories/foundations/Shapes.stories.svelte b/ui/lib/ui/tests/stories/foundations/Shapes.stories.svelte
index 0f56ef937..5078d876b 100644
--- a/ui/lib/ui/tests/stories/foundations/Shapes.stories.svelte
+++ b/ui/lib/ui/tests/stories/foundations/Shapes.stories.svelte
@@ -12,12 +12,13 @@
 	});

 	const radii = [
-		{ name: 'rounded-control', note: '8px, buttons, fields, badges' },
-		{ name: 'rounded-panel', note: '10px, menus and dialogs' },
-		{ name: 'rounded-card', note: '14px, cards' },
-		{ name: 'rounded-container', note: '16px, the sidebar' },
-		{ name: 'rounded-surface', note: '24px, chat form, bubbles' },
-		{ name: 'rounded-surface-lg', note: '32px, chat form on mobile' },
+		{ name: 'rounded-sm', note: '6px, small marks and chips' },
+		{ name: 'rounded-md', note: '8px, buttons, fields, badges' },
+		{ name: 'rounded-lg', note: '10px, menus and dialogs' },
+		{ name: 'rounded-xl', note: '14px, cards' },
+		{ name: 'rounded-2xl', note: '16px, the sidebar, bubbles' },
+		{ name: 'rounded-3xl', note: '24px, chat form' },
+		{ name: 'rounded-4xl', note: '32px, chat form on mobile' },
 		{ name: 'rounded-full', note: 'lamps, avatars, round icon buttons' }
 	];
 </script>
@@ -26,7 +27,7 @@
 	<StateGallery columns={4}>
 		{#each radii as radius (radius.name)}
 			<StateGalleryItem label={radius.name} note={radius.note}>
-				<div class="h-24 border border-line-default bg-surface-muted {radius.name}"></div>
+				<div class="h-24 border border-border bg-muted {radius.name}"></div>
 			</StateGalleryItem>
 		{/each}
 	</StateGallery>
diff --git a/ui/lib/ui/tests/stories/foundations/Sizing.stories.svelte b/ui/lib/ui/tests/stories/foundations/Sizing.stories.svelte
index 53e8477c1..24af04a47 100644
--- a/ui/lib/ui/tests/stories/foundations/Sizing.stories.svelte
+++ b/ui/lib/ui/tests/stories/foundations/Sizing.stories.svelte
@@ -40,12 +40,12 @@
 				{#each heights as height (height.name)}
 					<div class="flex flex-col items-center gap-2">
 						<div
-							class="flex w-20 items-center justify-center rounded-control border border-line-default bg-surface-muted {height.name}"
+							class="flex w-20 items-center justify-center rounded-md border border-border bg-muted {height.name}"
 						></div>

-						<span class="font-mono text-[11px] text-fg-muted">{height.name}</span>
+						<span class="font-mono text-caption text-muted-foreground">{height.name}</span>

-						<span class="text-caption text-fg-muted">{height.note}</span>
+						<span class="text-caption text-muted-foreground">{height.note}</span>
 					</div>
 				{/each}
 			</div>
@@ -57,9 +57,9 @@
 					<div class="flex flex-col items-center gap-2">
 						<Settings class={icon.name} />

-						<span class="font-mono text-[11px] text-fg-muted">{icon.name}</span>
+						<span class="font-mono text-caption text-muted-foreground">{icon.name}</span>

-						<span class="text-caption text-fg-muted">{icon.note}</span>
+						<span class="text-caption text-muted-foreground">{icon.note}</span>
 					</div>
 				{/each}
 			</div>
@@ -69,11 +69,11 @@
 			<div class="flex flex-col gap-2">
 				{#each spacing as step (step.name)}
 					<div class="flex items-center gap-3">
-						<span class="w-8 font-mono text-[11px] text-fg-muted">{step.name}</span>
+						<span class="w-8 font-mono text-caption text-muted-foreground">{step.name}</span>

 						<div style:width="{step.px}px" class="h-3 rounded-sm bg-muted-foreground/40"></div>

-						<span class="text-caption text-fg-muted">{step.px}px</span>
+						<span class="text-caption text-muted-foreground">{step.px}px</span>
 					</div>
 				{/each}
 			</div>
diff --git a/ui/lib/ui/tests/stories/foundations/Surfaces.stories.svelte b/ui/lib/ui/tests/stories/foundations/Surfaces.stories.svelte
index 61fbf156e..9d0e9fb57 100644
--- a/ui/lib/ui/tests/stories/foundations/Surfaces.stories.svelte
+++ b/ui/lib/ui/tests/stories/foundations/Surfaces.stories.svelte
@@ -21,7 +21,7 @@
 		<StateGalleryItem label="matte-glass" note="focus within">
 			<div class="matte-glass flex h-28 items-center rounded-3xl px-4">
 				<input
-					class="w-full bg-transparent text-sm outline-none placeholder:engraved"
+					class="w-full bg-transparent text-body-sm outline-none placeholder:engraved"
 					placeholder="Click to see the focus edge"
 				/>
 			</div>
@@ -29,8 +29,8 @@

 		<StateGalleryItem label="inset-group-surface" note="rows grouped in a glass panel">
 			<!-- shown inside a sidebar-surface, the only place it reads as intended -->
-			<div class="sidebar-surface flex h-28 flex-col justify-end rounded-(--sidebar-radius) p-2">
-				<div class="inset-group-surface flex flex-col gap-1 p-1 text-sm">
+			<div class="sidebar-surface flex h-28 flex-col justify-end rounded-2xl p-2">
+				<div class="inset-group-surface flex flex-col gap-1 p-1 text-body-sm">
 					<span class="rounded-md px-2 py-1">Models</span>

 					<span class="rounded-md px-2 py-1">Settings</span>
@@ -57,13 +57,13 @@
 		</StateGalleryItem>

 		<StateGalleryItem label="matte-sheen" note="user message bubble">
-			<div class="matte-sheen flex h-28 items-center rounded-2xl bg-primary/5 px-4 text-sm">
+			<div class="matte-sheen flex h-28 items-center rounded-2xl bg-primary/5 px-4 text-body-sm">
 				A user message
 			</div>
 		</StateGalleryItem>

 		<StateGalleryItem label="engraved" note="placeholder text">
-			<div class="flex h-28 items-center text-sm text-muted-foreground engraved">
+			<div class="flex h-28 items-center text-body-sm text-muted-foreground engraved">
 				Ask anything...
 			</div>
 		</StateGalleryItem>
diff --git a/ui/lib/ui/tests/stories/foundations/TokenTier.svelte b/ui/lib/ui/tests/stories/foundations/TokenTier.svelte
index b371519d6..2e5a037cd 100644
--- a/ui/lib/ui/tests/stories/foundations/TokenTier.svelte
+++ b/ui/lib/ui/tests/stories/foundations/TokenTier.svelte
@@ -11,35 +11,35 @@
 </script>

 <div class="w-[min(72rem,calc(100vw-2rem))] space-y-8 p-4">
-	<p class="max-w-2xl text-body-sm text-fg-muted">{intro}</p>
+	<p class="max-w-2xl text-body-sm text-muted-foreground">{intro}</p>

 	{#each groups as group (group.title)}
 		<section>
-			<h2 class="mb-3 text-label text-fg-muted first-letter:uppercase">{group.title}</h2>
+			<h2 class="mb-3 text-label text-muted-foreground first-letter:uppercase">{group.title}</h2>

 			<div class="grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-4">
 				{#each group.tokens as token (token.name)}
 					<figure class="m-0 flex flex-col gap-2">
 						<div
 							style:background-color="var(--{token.name})"
-							class="h-14 rounded-control border border-line-default"
+							class="h-14 rounded-md border border-border"
 						></div>

-						<figcaption class="flex flex-col gap-0.5 font-mono text-[11px] leading-4">
-							<span class="text-fg-default">--{token.name}</span>
+						<figcaption class="flex flex-col gap-0.5 font-mono text-caption leading-4">
+							<span class="text-foreground">--{token.name}</span>

 							{#if showReference}
-								<span class="truncate text-fg-muted" title={token.light}
+								<span class="truncate text-muted-foreground" title={token.light}
 									>light: {reference(token.light)}</span
 								>

 								{#if token.dark}
-									<span class="truncate text-fg-muted" title={token.dark}
+									<span class="truncate text-muted-foreground" title={token.dark}
 										>dark: {reference(token.dark)}</span
 									>
 								{/if}
 							{:else}
-								<span class="truncate text-fg-muted" title={token.light}>{token.light}</span>
+								<span class="truncate text-muted-foreground" title={token.light}>{token.light}</span>
 							{/if}
 						</figcaption>
 					</figure>
diff --git a/ui/lib/ui/tests/stories/foundations/Typography.stories.svelte b/ui/lib/ui/tests/stories/foundations/Typography.stories.svelte
index c33aa2368..8301710c2 100644
--- a/ui/lib/ui/tests/stories/foundations/Typography.stories.svelte
+++ b/ui/lib/ui/tests/stories/foundations/Typography.stories.svelte
@@ -1,7 +1,8 @@
 <script lang="ts" module>
 	import { defineMeta } from '@storybook/addon-svelte-csf';

-	// the type roles from ui/lib/ui/src/lib/styles/tokens/semantic.css: each sets size, line height and weight
+	// the type roles from ui/lib/ui/src/lib/styles/tokens/semantic.css: each sets size and line height, and labels,
+	// the title and the heading their weight too
 	const { Story } = defineMeta({
 		parameters: {
 			layout: 'centered'
@@ -10,13 +11,15 @@
 	});

 	const roles = [
+		{ name: 'text-display', spec: '30/36 600', use: 'the biggest headline: a greeting, a splash' },
 		{ name: 'text-heading', spec: '24/32 600', use: 'rare page headings' },
 		{ name: 'text-title', spec: '18/28 600', use: 'dialog and section titles' },
-		{ name: 'text-body', spec: '16/24 400', use: 'chat messages and the chat input' },
-		{ name: 'text-body-sm', spec: '14/20 400', use: 'most text, fields and lists' },
+		{ name: 'text-body', spec: '16/24', use: 'chat messages and the chat input' },
+		{ name: 'text-body-sm', spec: '14/20', use: 'most text, fields and lists' },
 		{ name: 'text-label', spec: '14/20 500', use: 'buttons and field labels' },
 		{ name: 'text-label-sm', spec: '12/16 500', use: 'badges and compact labels' },
-		{ name: 'text-caption', spec: '12/16 400', use: 'tooltips, hints and metadata' }
+		{ name: 'text-caption', spec: '12/16', use: 'tooltips, hints and metadata' },
+		{ name: 'text-caption-sm', spec: '10/14', use: 'tags, compact badges and counts' }
 	];
 </script>

@@ -24,7 +27,7 @@
 	<div class="w-[min(52rem,calc(100vw-2rem))] space-y-6 p-4">
 		{#each roles as role (role.name)}
 			<div class="grid grid-cols-[9rem_1fr] items-baseline gap-6">
-				<div class="flex flex-col gap-0.5 font-mono text-[11px] text-muted-foreground">
+				<div class="flex flex-col gap-0.5 font-mono text-caption text-muted-foreground">
 					<span>{role.name}</span>

 					<span class="opacity-70">{role.spec}</span>
@@ -33,27 +36,27 @@
 				<div class="flex flex-col gap-1">
 					<span class={role.name}>The quick brown llama runs locally</span>

-					<span class="text-caption text-fg-muted">{role.use}</span>
+					<span class="text-caption text-muted-foreground">{role.use}</span>
 				</div>
 			</div>
 		{/each}

 		<div class="grid grid-cols-[9rem_1fr] items-baseline gap-6">
-			<span class="font-mono text-[11px] text-muted-foreground">text-fg-muted</span>
+			<span class="font-mono text-caption text-muted-foreground">text-muted-foreground</span>

-			<span class="text-body-sm text-fg-muted">Secondary text and hints</span>
+			<span class="text-body-sm text-muted-foreground">Secondary text and hints</span>
 		</div>

 		<div class="grid grid-cols-[9rem_1fr] items-baseline gap-6">
-			<span class="font-mono text-[11px] text-muted-foreground">font-mono</span>
+			<span class="font-mono text-caption text-muted-foreground">font-mono</span>

 			<code class="font-mono text-body-sm">llama-server -m model.gguf --port 9931</code>
 		</div>

 		<div class="grid grid-cols-[9rem_1fr] items-baseline gap-6">
-			<span class="font-mono text-[11px] text-muted-foreground">engraved</span>
+			<span class="font-mono text-caption text-muted-foreground">engraved</span>

-			<span class="text-body text-fg-muted engraved">Ask anything...</span>
+			<span class="text-body text-muted-foreground engraved">Ask anything...</span>
 		</div>
 	</div>
 </Story>
diff --git a/ui/lib/ui/tests/stories/helpers/StateGallery.svelte b/ui/lib/ui/tests/stories/helpers/StateGallery.svelte
index 30399e9a0..cee483da8 100644
--- a/ui/lib/ui/tests/stories/helpers/StateGallery.svelte
+++ b/ui/lib/ui/tests/stories/helpers/StateGallery.svelte
@@ -38,7 +38,7 @@

 <section style:width="min({width}, calc(100vw - 2rem))" class="p-4">
 	{#if title}
-		<h2 class="mb-4 text-sm font-medium text-muted-foreground">{title}</h2>
+		<h2 class="mb-4 text-label text-muted-foreground">{title}</h2>
 	{/if}

 	<!-- a query container, so a cell can take the gallery's whole width (StateGalleryItem's `full`) -->
diff --git a/ui/lib/ui/tests/stories/helpers/StateGalleryItem.svelte b/ui/lib/ui/tests/stories/helpers/StateGalleryItem.svelte
index 005bea001..e76de5bbc 100644
--- a/ui/lib/ui/tests/stories/helpers/StateGalleryItem.svelte
+++ b/ui/lib/ui/tests/stories/helpers/StateGalleryItem.svelte
@@ -19,7 +19,7 @@
 	style:width={full ? '100cqw' : undefined}
 	class="m-0 flex min-w-0 flex-col gap-2"
 >
-	<figcaption class="flex items-baseline gap-2 text-[11px] font-medium tracking-wide uppercase">
+	<figcaption class="flex items-baseline gap-2 text-label-sm tracking-wide uppercase">
 		<span class="text-muted-foreground">{label}</span>

 		{#if note}
diff --git a/ui/lib/ui/tests/stories/mockups/AppMockups.stories.svelte b/ui/lib/ui/tests/stories/mockups/AppMockups.stories.svelte
index 030051d5f..1dfe463b5 100644
--- a/ui/lib/ui/tests/stories/mockups/AppMockups.stories.svelte
+++ b/ui/lib/ui/tests/stories/mockups/AppMockups.stories.svelte
@@ -17,7 +17,7 @@

 {#snippet number(part: string)}
 	<span
-		class="flex size-6 items-center justify-center rounded-full bg-foreground text-[13px] font-semibold text-background ring-2 ring-background"
+		class="flex size-6 items-center justify-center rounded-full bg-foreground text-body-sm font-semibold text-background ring-2 ring-background"
 		title={part}>{part[0].toUpperCase()}</span
 	>
 {/snippet}
diff --git a/ui/lib/ui/tests/stories/models/ModelCard.stories.svelte b/ui/lib/ui/tests/stories/models/ModelCard.stories.svelte
index 34285d875..489d1e107 100644
--- a/ui/lib/ui/tests/stories/models/ModelCard.stories.svelte
+++ b/ui/lib/ui/tests/stories/models/ModelCard.stories.svelte
@@ -28,7 +28,7 @@

 		<ModelCapabilityIcons asBadges supportsThinking supportsToolUse />

-		<p class="line-clamp-2 text-xs text-muted-foreground">
+		<p class="line-clamp-2 text-caption text-muted-foreground">
 			OpenAI's open-weight model for local reasoning and agents, with tool use and adjustable reasoning effort.
 		</p>

diff --git a/ui/lib/ui/tests/stories/models/ModelQuantChip.stories.svelte b/ui/lib/ui/tests/stories/models/ModelQuantChip.stories.svelte
index 9ea11a1d5..3027ecdb0 100644
--- a/ui/lib/ui/tests/stories/models/ModelQuantChip.stories.svelte
+++ b/ui/lib/ui/tests/stories/models/ModelQuantChip.stories.svelte
@@ -77,7 +77,7 @@

 			{#snippet command()}
 				<pre
-					class="overflow-x-auto rounded-panel bg-(--surface-code) px-3 py-2 text-xs text-(--fg-code)">llama serve -hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M</pre>
+					class="overflow-x-auto rounded-lg bg-(--surface-code) px-3 py-2 text-caption text-(--fg-code)">llama serve -hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M</pre>
 			{/snippet}
 		</ModelQuantRow>