The best way to control Claude Code, Codex and more from any computer or phone
| 1 | /* Clerk injects its component styles into the clerk layer (clerkAppearance.cssLayerName). */ |
| 2 | @layer theme, base, clerk, components, utilities; |
| 3 | @import "tailwindcss"; |
| 4 | |
| 5 | @custom-variant dark (&:is(.dark, .dark *)); |
| 6 | @custom-variant light (&:not(.dark, .dark *)); |
| 7 | /* Window Controls Overlay: active when Electron exposes native titlebar control geometry. */ |
| 8 | @custom-variant wco (&:is(.wco, .wco *)); |
| 9 | |
| 10 | /* Secondary hovering pointers reveal sidebar actions on touch-primary devices. */ |
| 11 | @custom-variant any-hover { |
| 12 | @media (any-hover: hover) { |
| 13 | &:hover { |
| 14 | @slot; |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | /* On mobile, morph the expanded hero composer into the compact docked |
| 20 | composer while it moves; the rest of the app remains visually stationary. */ |
| 21 | html[data-mobile-composer-route-transition="true"]::view-transition-old(root), |
| 22 | html[data-mobile-composer-route-transition="true"]::view-transition-new(root) { |
| 23 | animation: none; |
| 24 | } |
| 25 | |
| 26 | html[data-mobile-composer-route-transition="true"]::view-transition-group(t3-mobile-composer) { |
| 27 | animation-duration: var(--mobile-composer-transition-duration); |
| 28 | animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| 29 | } |
| 30 | |
| 31 | html[data-mobile-composer-route-transition="true"]::view-transition-image-pair(t3-mobile-composer) { |
| 32 | isolation: isolate; |
| 33 | } |
| 34 | |
| 35 | html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobile-composer) { |
| 36 | animation: t3-mobile-composer-old var(--mobile-composer-transition-duration) linear both; |
| 37 | mix-blend-mode: normal; |
| 38 | } |
| 39 | |
| 40 | html[data-mobile-composer-route-transition="true"]::view-transition-new(t3-mobile-composer) { |
| 41 | animation: t3-mobile-composer-new var(--mobile-composer-transition-duration) linear both; |
| 42 | mix-blend-mode: normal; |
| 43 | } |
| 44 | |
| 45 | /* The expanded and compact composers have different internal layouts. Use a |
| 46 | brief crossfade while their shared wrapper moves so the layout change does |
| 47 | not read as a single-frame cut. */ |
| 48 | @keyframes t3-mobile-composer-old { |
| 49 | 0%, |
| 50 | 35% { |
| 51 | opacity: 1; |
| 52 | } |
| 53 | 65%, |
| 54 | 100% { |
| 55 | opacity: 0; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | @keyframes t3-mobile-composer-new { |
| 60 | 0%, |
| 61 | 35% { |
| 62 | opacity: 0; |
| 63 | } |
| 64 | 65%, |
| 65 | 100% { |
| 66 | opacity: 1; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | html[data-mobile-composer-route-transition="true"]::view-transition-group(t3-mobile-draft-headline) { |
| 71 | animation-duration: var(--mobile-composer-transition-duration); |
| 72 | } |
| 73 | |
| 74 | html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobile-draft-headline) { |
| 75 | animation: t3-mobile-draft-headline-exit var(--mobile-composer-transition-duration) |
| 76 | cubic-bezier(0.4, 0, 1, 1) both; |
| 77 | mix-blend-mode: normal; |
| 78 | } |
| 79 | |
| 80 | @keyframes t3-mobile-draft-headline-exit { |
| 81 | from { |
| 82 | opacity: 1; |
| 83 | transform: translateY(0); |
| 84 | } |
| 85 | to { |
| 86 | opacity: 0; |
| 87 | transform: translateY(-6px); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | :root { |
| 92 | --app-scrollbar-width: 6px; |
| 93 | --appearance-contrast-base: 100%; |
| 94 | --appearance-contrast-boost: 0%; |
| 95 | --appearance-contrast-border-boost: 0%; |
| 96 | --appearance-contrast-target: black; |
| 97 | --app-scrollbar-thumb: rgb(217 217 217); |
| 98 | --app-scrollbar-thumb-hover: rgb(191 191 191); |
| 99 | /* |
| 100 | * Compact UI geometry. Keep these values semantic so sidebar, palette, |
| 101 | * tooltip, and toolbar controls cannot quietly drift apart. |
| 102 | */ |
| 103 | --control-radius: 0.5rem; |
| 104 | --sidebar-content-inset: 0.5rem; |
| 105 | --sidebar-control-gap: 0.5rem; |
| 106 | --sidebar-icon-color: color-mix( |
| 107 | in srgb, |
| 108 | var(--contrast-sidebar-muted-foreground) 85%, |
| 109 | var(--sidebar) |
| 110 | ); |
| 111 | --sidebar-row-content-inset: 0.625rem; |
| 112 | --command-shell-inset: 0.5rem; |
| 113 | --command-content-inset: 1rem; |
| 114 | --floating-content-inset: 0.75rem; |
| 115 | /* App layer order: the bottom terminal drawer (45, above the timeline minimap), |
| 116 | docked sheets, then the floating preview player (47–49, see |
| 117 | previewMiniPlayerLayout.ts), then dialogs and popovers (50 and up). */ |
| 118 | --z-sheet: 46; |
| 119 | --glass-blur: 12px; |
| 120 | --glass-opacity: 80%; |
| 121 | --glass-saturation: 1.14; |
| 122 | --desktop-window-right-resize-inset: 0px; |
| 123 | --workspace-topbar-height: 52px; |
| 124 | --workspace-controls-top: 0px; |
| 125 | --workspace-controls-left: calc(env(safe-area-inset-left) + 0.75rem); |
| 126 | --workspace-controls-right: calc(env(safe-area-inset-right) + 0.75rem); |
| 127 | --workspace-native-controls-inset: 0px; |
| 128 | --workspace-titlebar-control-size: 1.75rem; |
| 129 | --workspace-titlebar-control-gap: 0.75rem; |
| 130 | --workspace-titlebar-scroll-fade-height: 1.5rem; |
| 131 | --chat-content-max-width: 46rem; |
| 132 | --thread-details-panel-width: 17.5rem; |
| 133 | /* The prompt on phones: iOS zooms into any input under 16px on focus. */ |
| 134 | --font-size-prompt-touch: max(var(--font-size-prompt, 1rem), 16px); |
| 135 | /* Horizontal gutter shared by the page header and the chat column, clear of |
| 136 | the device's safe area. */ |
| 137 | --workspace-gutter: 0.75rem; |
| 138 | --workspace-gutter-start: calc(env(safe-area-inset-left) + var(--workspace-gutter)); |
| 139 | --workspace-gutter-end: calc(env(safe-area-inset-right) + var(--workspace-gutter)); |
| 140 | |
| 141 | @variant sm { |
| 142 | --workspace-gutter: 1.25rem; |
| 143 | } |
| 144 | |
| 145 | @variant dark { |
| 146 | --appearance-contrast-target: white; |
| 147 | /* Keeps the idle thumb above 3:1 (WCAG 1.4.11) on #000; 35% renders as gray 89, just under. */ |
| 148 | --app-scrollbar-thumb: rgb(255 255 255 / 36%); |
| 149 | --app-scrollbar-thumb-hover: rgb(255 255 255 / 45%); |
| 150 | --glass-blur: 16px; |
| 151 | --glass-saturation: 1.08; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | .wco { |
| 156 | --native-titlebar-height: env(titlebar-area-height, 0px); |
| 157 | --workspace-topbar-height: max(40px, env(titlebar-area-height, 52px)); |
| 158 | --workspace-controls-top: env(titlebar-area-y, 0px); |
| 159 | --workspace-controls-left: calc(env(titlebar-area-x, 0px) + 0.75rem); |
| 160 | --workspace-controls-right: calc( |
| 161 | 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) + 0.75rem |
| 162 | ); |
| 163 | --workspace-native-controls-inset: calc( |
| 164 | 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) + 0.75rem |
| 165 | ); |
| 166 | } |
| 167 | |
| 168 | /* The font tokens are declared outside the inline theme so utilities reference |
| 169 | the variables and Settings -> Appearance can override them at runtime. The |
| 170 | default stacks are mirrored in `appearanceFonts.ts`. */ |
| 171 | @theme { |
| 172 | --font-sans: |
| 173 | -apple-system, BlinkMacSystemFont, "Inter Variable", "Segoe UI", system-ui, sans-serif; |
| 174 | --font-mono: |
| 175 | ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; |
| 176 | } |
| 177 | |
| 178 | @theme inline { |
| 179 | /* Two steps below Tailwind's text-xs (12px) for dense UI: metadata rows, |
| 180 | badges, counters, keyboard hints and diagnostics tables. 2xs is 11px, |
| 181 | 3xs is 10px. Provider icon overlays use 4xs (8px) and 5xs (7px) to fit |
| 182 | their smaller badges. Registered with tailwind-merge in |
| 183 | lib/utils.ts so cn() treats them as font sizes, not colours. */ |
| 184 | --text-2xs: 0.6875rem; |
| 185 | --text-2xs--line-height: calc(1 / 0.6875); |
| 186 | --text-3xs: 0.625rem; |
| 187 | --text-3xs--line-height: calc(0.875 / 0.625); |
| 188 | --text-4xs: 0.5rem; |
| 189 | --text-4xs--line-height: 1; |
| 190 | --text-5xs: 0.4375rem; |
| 191 | --text-5xs--line-height: 1; |
| 192 | /* Motion. drawer is the decelerating curve for surfaces that slide or pop in |
| 193 | (composer context, pills). */ |
| 194 | --inset-shadow-control-highlight: 0 1px rgb(255 255 255 / 16%); |
| 195 | --inset-shadow-control-pressed: 0 1px rgb(0 0 0 / 8%); |
| 196 | --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); |
| 197 | /* The composer's elevation: a soft drop pulled in under the surface, shared |
| 198 | by the composer, its context strip and attached banners. */ |
| 199 | --shadow-composer: 0 1px 2px rgb(0 0 0 / 5%); |
| 200 | --shadow-composer-dark: 0 14px 32px -18px rgb(0 0 0 / 75%); |
| 201 | /* Overlap the lower toolbar backdrop by one pixel to cover the composer seam. */ |
| 202 | --spacing-composer-seam: calc(var(--spacing) * 4 - 1px); |
| 203 | /* Dark-mode shade where an attached surface meets the composer: 10px of |
| 204 | shadow fading away from the seam. Inline, so the offsets resolve on the |
| 205 | element. below: the context strip under the composer (1rem seam, faint |
| 206 | white fill). above: an attached banner over it (its tint on top). */ |
| 207 | --background-image-composer-seam-below: |
| 208 | linear-gradient( |
| 209 | to bottom, |
| 210 | transparent 0 1rem, |
| 211 | rgb(0 0 0 / 18%) 1rem, |
| 212 | transparent calc(1rem + 10px) |
| 213 | ), |
| 214 | linear-gradient(rgb(255 255 255 / 1%), rgb(255 255 255 / 1%)); |
| 215 | --background-image-composer-seam-above: |
| 216 | linear-gradient(var(--chat-composer-attached-tint), var(--chat-composer-attached-tint)), |
| 217 | linear-gradient( |
| 218 | to top, |
| 219 | transparent 0 var(--chat-composer-attachment-overlap), |
| 220 | var(--chat-composer-attached-seam, rgb(0 0 0 / 18%)) var(--chat-composer-attachment-overlap), |
| 221 | transparent calc(var(--chat-composer-attachment-overlap) + 10px) |
| 222 | ); |
| 223 | --color-zinc-25: oklch(99.2% 0 0); |
| 224 | --animate-skeleton: skeleton 2.4s infinite; |
| 225 | /* Duty-cycled indicator animations: long holds with stepped ramps, so the |
| 226 | compositor updates discrete frames instead of every vsync. */ |
| 227 | --animate-status-pulse: status-pulse 2s infinite; |
| 228 | --animate-status-ping: status-ping 2s infinite; |
| 229 | /* Stash pulses hold a highlight for 1.2s; the row then eases back over 200ms, the count snaps. |
| 230 | The row alternates two identical keyframes so each stash restarts it without a remount. */ |
| 231 | --animate-stash-pulse-row: stash-pulse-row 1400ms; |
| 232 | --animate-stash-pulse-row-alt: stash-pulse-row-alt 1400ms; |
| 233 | --animate-stash-pulse-count: stash-pulse-count 1400ms step-start; |
| 234 | --color-warning-foreground: var(--warning-foreground); |
| 235 | --color-warning: var(--warning); |
| 236 | --color-warning-surface: var(--warning-surface); |
| 237 | --color-error-foreground: var(--error-foreground); |
| 238 | --color-tool-error-icon: var(--tool-error-icon); |
| 239 | --color-error: var(--error); |
| 240 | --color-error-surface: var(--error-surface); |
| 241 | --color-update-foreground: var(--update-foreground); |
| 242 | --color-update: var(--update); |
| 243 | --color-success-foreground: var(--success-foreground); |
| 244 | --color-success: var(--success); |
| 245 | --color-diff-addition: var(--diff-addition); |
| 246 | --color-diff-deletion: var(--diff-deletion); |
| 247 | --color-diff-addition-foreground: var(--diff-addition-foreground); |
| 248 | --color-diff-deletion-foreground: var(--diff-deletion-foreground); |
| 249 | --color-info-foreground: var(--info-foreground); |
| 250 | --color-info: var(--info); |
| 251 | --color-guest: var(--guest); |
| 252 | --color-guest-foreground: var(--guest-foreground); |
| 253 | --color-guest-surface: var(--guest-surface); |
| 254 | --color-destructive-foreground: var(--destructive-foreground); |
| 255 | --color-ring: var(--ring); |
| 256 | --color-input: var(--contrast-input); |
| 257 | --color-border: var(--contrast-border); |
| 258 | --color-destructive: var(--destructive); |
| 259 | --color-accent-foreground: var(--contrast-accent-foreground); |
| 260 | --color-accent: var(--accent); |
| 261 | --color-muted-foreground: var(--contrast-muted-foreground); |
| 262 | --color-muted: var(--muted); |
| 263 | --color-placeholder: var(--contrast-placeholder); |
| 264 | --color-secondary-label: var(--contrast-secondary-label); |
| 265 | --color-icon-muted: var(--contrast-icon-muted); |
| 266 | --color-secondary-foreground: var(--contrast-secondary-foreground); |
| 267 | --color-secondary: var(--secondary); |
| 268 | --color-primary-foreground: var(--primary-foreground); |
| 269 | --color-primary: var(--primary); |
| 270 | --color-popover-foreground: var(--contrast-popover-foreground); |
| 271 | --color-popover: var(--popover); |
| 272 | --color-card-foreground: var(--contrast-card-foreground); |
| 273 | --color-card: var(--card); |
| 274 | --color-code: var(--code-background); |
| 275 | --color-foreground: var(--contrast-foreground); |
| 276 | --color-background: var(--background); |
| 277 | --color-message: var(--message-surface); |
| 278 | --color-message-foreground: var(--contrast-message-foreground); |
| 279 | --color-message-action: var(--message-action); |
| 280 | --color-message-action-foreground: var(--message-action-foreground); |
| 281 | --color-message-action-hover: var(--message-action-hover); |
| 282 | --color-sidebar: var(--sidebar); |
| 283 | --color-sidebar-foreground: var(--contrast-sidebar-foreground); |
| 284 | --color-sidebar-muted-foreground: var(--contrast-sidebar-muted-foreground); |
| 285 | --color-sidebar-control-surface: var(--sidebar-control-surface); |
| 286 | --color-sidebar-row-hover: var(--sidebar-row-hover); |
| 287 | --color-sidebar-row-active: var(--sidebar-row-active); |
| 288 | --color-sidebar-row-selected: var(--sidebar-row-selected); |
| 289 | --color-sidebar-border: var(--contrast-sidebar-border); |
| 290 | --radius-sm: calc(var(--radius) - 4px); |
| 291 | --radius-md: calc(var(--radius) - 2px); |
| 292 | --radius-lg: var(--radius); |
| 293 | --radius-xl: calc(var(--radius) + 4px); |
| 294 | --radius-2xl: calc(var(--radius) + 8px); |
| 295 | --radius-3xl: calc(var(--radius) + 12px); |
| 296 | @keyframes skeleton { |
| 297 | /* The single loading-bar breath used by every skeleton: one opacity pulse |
| 298 | per container, stepped so however many bars sit under it, the compositor |
| 299 | draws a handful of discrete frames per cycle rather than one per vsync — |
| 300 | which on a 120Hz display is the difference between ~14 and ~288 updates. */ |
| 301 | 0%, |
| 302 | 42% { |
| 303 | opacity: 1; |
| 304 | animation-timing-function: steps(4); |
| 305 | } |
| 306 | 50%, |
| 307 | 92% { |
| 308 | opacity: 0.55; |
| 309 | animation-timing-function: steps(4); |
| 310 | } |
| 311 | 100% { |
| 312 | opacity: 1; |
| 313 | } |
| 314 | } |
| 315 | @keyframes stash-pulse-row { |
| 316 | from, |
| 317 | 85.7% { |
| 318 | color: var(--color-foreground); |
| 319 | } |
| 320 | } |
| 321 | @keyframes stash-pulse-row-alt { |
| 322 | from, |
| 323 | 85.7% { |
| 324 | color: var(--color-foreground); |
| 325 | } |
| 326 | } |
| 327 | @keyframes stash-pulse-count { |
| 328 | from, |
| 329 | 85.7% { |
| 330 | color: var(--color-primary); |
| 331 | } |
| 332 | } |
| 333 | @keyframes status-pulse { |
| 334 | 0%, |
| 335 | 40% { |
| 336 | opacity: 1; |
| 337 | animation-timing-function: steps(6); |
| 338 | } |
| 339 | 50%, |
| 340 | 90% { |
| 341 | opacity: 0.5; |
| 342 | animation-timing-function: steps(6); |
| 343 | } |
| 344 | 100% { |
| 345 | opacity: 1; |
| 346 | } |
| 347 | } |
| 348 | @keyframes status-ping { |
| 349 | /* Burst first (immediate feedback for click ripples), then hold |
| 350 | invisible for the rest of the cycle. Mirrors animate-ping's |
| 351 | 75%-scale start. */ |
| 352 | 0% { |
| 353 | opacity: 0.9; |
| 354 | scale: 0.75; |
| 355 | animation-timing-function: steps(8); |
| 356 | } |
| 357 | 40%, |
| 358 | 100% { |
| 359 | opacity: 0; |
| 360 | scale: 2; |
| 361 | } |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | @utility surface-glass { |
| 366 | background: color-mix(in srgb, var(--background) var(--glass-opacity), transparent); |
| 367 | -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 368 | backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 369 | |
| 370 | @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { |
| 371 | background: var(--background) !important; |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | @utility alert-glass { |
| 376 | --alert-glass-tint: transparent; |
| 377 | background: |
| 378 | linear-gradient( |
| 379 | color-mix(in srgb, var(--alert-glass-tint) 4%, transparent), |
| 380 | color-mix(in srgb, var(--alert-glass-tint) 4%, transparent) |
| 381 | ), |
| 382 | color-mix(in srgb, var(--background) var(--glass-opacity), transparent) !important; |
| 383 | -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 384 | backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 385 | |
| 386 | &[data-variant="error"] { |
| 387 | --alert-glass-tint: var(--destructive); |
| 388 | } |
| 389 | |
| 390 | &[data-variant="info"] { |
| 391 | --alert-glass-tint: var(--info); |
| 392 | } |
| 393 | |
| 394 | &[data-variant="success"] { |
| 395 | --alert-glass-tint: var(--success); |
| 396 | } |
| 397 | |
| 398 | &[data-variant="warning"] { |
| 399 | --alert-glass-tint: var(--warning); |
| 400 | } |
| 401 | |
| 402 | @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { |
| 403 | background: var(--background) !important; |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | /* Paint find results without changing rendered markdown or copied text. */ |
| 408 | ::highlight(t3-thread-find) { |
| 409 | color: var(--app-theme-search-match-foreground, oklch(0.216164 0.028283 77.423)); |
| 410 | background-color: var(--app-theme-search-match-background, oklch(0.915 0.11 85)); |
| 411 | |
| 412 | @variant dark { |
| 413 | color: var(--app-theme-search-match-foreground, oklch(0.970151 0 0)); |
| 414 | background-color: var(--app-theme-search-match-background, oklch(0.55 0.1 85)); |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | ::highlight(t3-thread-find-active) { |
| 419 | color: var(--app-theme-search-match-active-foreground, oklch(0.216164 0.028283 77.423)); |
| 420 | background-color: var( |
| 421 | --app-theme-search-match-active-background, |
| 422 | oklch(0.774202 0.151946 74.331) |
| 423 | ); |
| 424 | } |
| 425 | |
| 426 | @utility dialog-glass { |
| 427 | background: color-mix(in srgb, var(--background) var(--glass-opacity), transparent); |
| 428 | -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 429 | backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 430 | border-color: color-mix(in srgb, var(--contrast-foreground) 10%, transparent); |
| 431 | box-shadow: 0 24px 64px -24px rgb(0 0 0 / 65%); |
| 432 | |
| 433 | @variant dark { |
| 434 | border-color: color-mix(in srgb, var(--color-white) 8%, transparent); |
| 435 | box-shadow: |
| 436 | inset 0 1px rgb(255 255 255 / 4%), |
| 437 | 0 24px 72px -20px rgb(0 0 0 / 90%); |
| 438 | } |
| 439 | |
| 440 | @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { |
| 441 | background: var(--popover) !important; |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | @utility dialog-backdrop { |
| 446 | background: color-mix(in srgb, var(--background) 60%, transparent); |
| 447 | -webkit-backdrop-filter: blur(4px); |
| 448 | backdrop-filter: blur(4px); |
| 449 | |
| 450 | @variant dark { |
| 451 | background: color-mix(in srgb, var(--background) 64%, transparent); |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | @utility dropdown-glass { |
| 456 | background: color-mix( |
| 457 | in srgb, |
| 458 | var(--popover) 18%, |
| 459 | color-mix(in srgb, var(--popover) var(--glass-opacity), transparent) |
| 460 | ); |
| 461 | -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 462 | backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); |
| 463 | border: 1px solid color-mix(in srgb, var(--contrast-foreground) 10%, transparent); |
| 464 | |
| 465 | @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { |
| 466 | background: var(--popover) !important; |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | @utility topbar-scroll-fade { |
| 471 | -webkit-mask-image: |
| 472 | linear-gradient( |
| 473 | to bottom, |
| 474 | transparent 0%, |
| 475 | rgb(0 0 0 / 10%) 10%, |
| 476 | rgb(0 0 0 / 30%) 24%, |
| 477 | rgb(0 0 0 / 58%) 42%, |
| 478 | rgb(0 0 0 / 82%) 62%, |
| 479 | rgb(0 0 0 / 96%) 82%, |
| 480 | black 100% |
| 481 | ), |
| 482 | linear-gradient(black, black), linear-gradient(black, black); |
| 483 | -webkit-mask-position: top, bottom, right; |
| 484 | -webkit-mask-repeat: no-repeat; |
| 485 | -webkit-mask-size: |
| 486 | 100% calc(var(--workspace-titlebar-scroll-fade-height) + 1px), |
| 487 | 100% calc(100% - var(--workspace-titlebar-scroll-fade-height)), |
| 488 | var(--app-scrollbar-width) 100%; |
| 489 | mask-image: |
| 490 | linear-gradient( |
| 491 | to bottom, |
| 492 | transparent 0%, |
| 493 | rgb(0 0 0 / 10%) 10%, |
| 494 | rgb(0 0 0 / 30%) 24%, |
| 495 | rgb(0 0 0 / 58%) 42%, |
| 496 | rgb(0 0 0 / 82%) 62%, |
| 497 | rgb(0 0 0 / 96%) 82%, |
| 498 | black 100% |
| 499 | ), |
| 500 | linear-gradient(black, black), linear-gradient(black, black); |
| 501 | mask-position: top, bottom, right; |
| 502 | mask-repeat: no-repeat; |
| 503 | mask-size: |
| 504 | 100% calc(var(--workspace-titlebar-scroll-fade-height) + 1px), |
| 505 | 100% calc(100% - var(--workspace-titlebar-scroll-fade-height)), |
| 506 | var(--app-scrollbar-width) 100%; |
| 507 | } |
| 508 | |
| 509 | /* Virtualizers own their native scroll element, so they cannot use ScrollArea's |
| 510 | viewport fade. Keep the scrollbar lane opaque while sharing the same fade |
| 511 | contract across those lists. */ |
| 512 | @utility virtualized-scroll-fade { |
| 513 | -webkit-mask-image: var(--virtualized-scroll-fade-mask), linear-gradient(black, black); |
| 514 | mask-image: var(--virtualized-scroll-fade-mask), linear-gradient(black, black); |
| 515 | -webkit-mask-position: left, right; |
| 516 | mask-position: left, right; |
| 517 | -webkit-mask-repeat: no-repeat; |
| 518 | mask-repeat: no-repeat; |
| 519 | -webkit-mask-size: |
| 520 | calc(100% - var(--app-scrollbar-width)) 100%, |
| 521 | var(--app-scrollbar-width) 100%; |
| 522 | mask-size: |
| 523 | calc(100% - var(--app-scrollbar-width)) 100%, |
| 524 | var(--app-scrollbar-width) 100%; |
| 525 | } |
| 526 | |
| 527 | /* Stage-channel art needs a mask and pseudo-element gradient, so keep the |
| 528 | behavior composable without tying it to the global components layer. */ |
| 529 | @utility sidebar-stage-backdrop { |
| 530 | --stage-fade: var(--sidebar-stage-fade, var(--app-chrome-background)); |
| 531 | mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 92%); |
| 532 | -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 92%); |
| 533 | |
| 534 | &::after { |
| 535 | content: ""; |
| 536 | position: absolute; |
| 537 | inset: 0; |
| 538 | background: linear-gradient( |
| 539 | to bottom, |
| 540 | transparent 0%, |
| 541 | transparent 28%, |
| 542 | color-mix(in srgb, var(--stage-fade) 10%, transparent) 40%, |
| 543 | color-mix(in srgb, var(--stage-fade) 30%, transparent) 52%, |
| 544 | color-mix(in srgb, var(--stage-fade) 58%, transparent) 64%, |
| 545 | color-mix(in srgb, var(--stage-fade) 82%, transparent) 75%, |
| 546 | color-mix(in srgb, var(--stage-fade) 96%, transparent) 85%, |
| 547 | var(--stage-fade) 93% |
| 548 | ); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | @keyframes live-tool-shine { |
| 553 | from { |
| 554 | background-position: |
| 555 | -4.5rem 0, |
| 556 | 0 0; |
| 557 | } |
| 558 | to { |
| 559 | background-position: |
| 560 | calc(100% + 4.5rem) 0, |
| 561 | 0 0; |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | @utility live-tool-shine { |
| 566 | @media (prefers-reduced-motion: no-preference) and (forced-colors: none) { |
| 567 | color: transparent; |
| 568 | background-image: |
| 569 | linear-gradient(to right, transparent, var(--contrast-foreground), transparent), |
| 570 | linear-gradient(var(--contrast-secondary-label), var(--contrast-secondary-label)); |
| 571 | background-size: |
| 572 | 4.5rem 100%, |
| 573 | 100% 100%; |
| 574 | background-repeat: no-repeat; |
| 575 | background-clip: text; |
| 576 | animation: live-tool-shine 2.2s steps(30) infinite; |
| 577 | animation-play-state: var(--visible-animation-state, paused); |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | @utility visible-animate-spin { |
| 582 | animation: var(--animate-spin); |
| 583 | animation-play-state: var(--visible-animation-state, paused); |
| 584 | will-change: var(--visible-animation-will-change, auto); |
| 585 | } |
| 586 | |
| 587 | @keyframes live-activity-focus { |
| 588 | from { |
| 589 | transform: translateX(0); |
| 590 | } |
| 591 | to { |
| 592 | transform: translateX(100%); |
| 593 | } |
| 594 | } |
| 595 | |
| 596 | @keyframes live-activity-focus-counter { |
| 597 | from { |
| 598 | transform: translateX(0); |
| 599 | } |
| 600 | to { |
| 601 | transform: translateX(-100%); |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | @utility live-activity-focus { |
| 606 | --live-activity-focus-width: 4.5rem; |
| 607 | |
| 608 | right: auto; |
| 609 | left: calc(-1 * var(--live-activity-focus-width)); |
| 610 | width: calc(100% + var(--live-activity-focus-width) + var(--live-activity-focus-width)); |
| 611 | -webkit-mask-image: linear-gradient( |
| 612 | to right, |
| 613 | transparent 0, |
| 614 | rgb(0 0 0 / 12%) 0.675rem, |
| 615 | rgb(0 0 0 / 55%) 1.575rem, |
| 616 | black 2.25rem, |
| 617 | rgb(0 0 0 / 55%) 2.925rem, |
| 618 | rgb(0 0 0 / 12%) 3.825rem, |
| 619 | transparent var(--live-activity-focus-width), |
| 620 | transparent 100% |
| 621 | ); |
| 622 | -webkit-mask-repeat: no-repeat; |
| 623 | mask-image: linear-gradient( |
| 624 | to right, |
| 625 | transparent 0, |
| 626 | rgb(0 0 0 / 12%) 0.675rem, |
| 627 | rgb(0 0 0 / 55%) 1.575rem, |
| 628 | black 2.25rem, |
| 629 | rgb(0 0 0 / 55%) 2.925rem, |
| 630 | rgb(0 0 0 / 12%) 3.825rem, |
| 631 | transparent var(--live-activity-focus-width), |
| 632 | transparent 100% |
| 633 | ); |
| 634 | mask-repeat: no-repeat; |
| 635 | animation: live-activity-focus 2.2s steps(30) infinite; |
| 636 | animation-play-state: var(--visible-animation-state, paused); |
| 637 | will-change: var(--visible-animation-will-change, auto); |
| 638 | |
| 639 | @media (prefers-reduced-motion: reduce), (forced-colors: active) { |
| 640 | animation: none; |
| 641 | opacity: 0; |
| 642 | will-change: auto; |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | @utility live-activity-focus-counter { |
| 647 | width: 100%; |
| 648 | animation: live-activity-focus-counter 2.2s steps(30) infinite; |
| 649 | animation-play-state: var(--visible-animation-state, paused); |
| 650 | will-change: var(--visible-animation-will-change, auto); |
| 651 | |
| 652 | @media (prefers-reduced-motion: reduce), (forced-colors: active) { |
| 653 | animation: none; |
| 654 | will-change: auto; |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | @utility live-activity-focus-aligned { |
| 659 | width: calc(100% - var(--live-activity-focus-width) - var(--live-activity-focus-width)); |
| 660 | margin-inline-start: var(--live-activity-focus-width); |
| 661 | } |
| 662 | |
| 663 | @property --assistant-citation-highlight-opacity { |
| 664 | syntax: "<number>"; |
| 665 | inherits: true; |
| 666 | initial-value: 0; |
| 667 | } |
| 668 | |
| 669 | @layer base { |
| 670 | ::highlight(t3-assistant-citation) { |
| 671 | background-color: color-mix( |
| 672 | in oklab, |
| 673 | var(--primary) calc(var(--assistant-citation-highlight-opacity) * 100%), |
| 674 | transparent |
| 675 | ); |
| 676 | } |
| 677 | ::highlight(t3-assistant-citation-comment) { |
| 678 | background-color: color-mix(in oklab, var(--primary) 45%, transparent); |
| 679 | } |
| 680 | :root { |
| 681 | /* Keep the original T3 Code artwork palettes as the defaults. Built-in |
| 682 | themes override them with their own pigments in the components layer. */ |
| 683 | --stage-art-top: oklch(0.782169 0.123386 240.226); |
| 684 | --stage-art-mid: oklch(0.616111 0.195824 259.735); |
| 685 | --stage-art-bottom: oklch(0.441553 0.232394 265.474); |
| 686 | --stage-art-highlight: oklch(0.951597 0.037289 215.482); |
| 687 | --stage-art-secondary: oklch(0.794668 0.12136 235.46); |
| 688 | --stage-art-tertiary: oklch(0.678991 0.170261 275.365); |
| 689 | --stage-art-line: oklch(0.959666 0.029238 218.179); |
| 690 | --stage-art-celeste-highlight: oklch(0.968763 0.045822 196.42); |
| 691 | --stage-art-celeste-secondary: oklch(0.827395 0.126071 211.26); |
| 692 | --stage-art-violet-highlight: oklch(0.895381 0.053248 286.447); |
| 693 | --stage-art-grid-line: oklch(0.966822 0.01757 239.99); |
| 694 | --stage-night-base-top: oklch(0.283792 0.117327 297.201); |
| 695 | --stage-night-base-mid: oklch(0.227147 0.086086 277.99); |
| 696 | --stage-night-base-bottom: oklch(0.200528 0.055699 261.216); |
| 697 | --stage-night-top: var(--stage-night-base-top); |
| 698 | --stage-night-mid: var(--stage-night-base-mid); |
| 699 | --stage-night-bottom: var(--stage-night-base-bottom); |
| 700 | --stage-night-highlight: oklch(0.707246 0.157418 252.091); |
| 701 | --stage-night-secondary: oklch(0.600473 0.182225 277.296); |
| 702 | --stage-night-tertiary: oklch(0.62583 0.210886 305.994); |
| 703 | --stage-night-line: oklch(0.938794 0.029114 273.103); |
| 704 | --stage-night-glow-highlight: oklch(0.553749 0.176543 271.958); |
| 705 | --stage-night-glow-secondary: oklch(0.345571 0.117466 273.568); |
| 706 | --stage-night-sparkle: oklch(0.880867 0.057747 269.011); |
| 707 | |
| 708 | @variant dark { |
| 709 | --stage-art-top: oklch(0.581473 0.149124 256.9); |
| 710 | --stage-art-mid: oklch(0.456509 0.159377 261.945); |
| 711 | --stage-art-bottom: oklch(0.291327 0.136578 267.649); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | * { |
| 716 | @apply border-border outline-ring/50; |
| 717 | } |
| 718 | /* The app's 2px outlines stay inside controls at clipped and scrollport edges. */ |
| 719 | *, |
| 720 | ::before, |
| 721 | ::after { |
| 722 | outline-offset: -2px; |
| 723 | } |
| 724 | :where([data-slot="menu-popup"], [data-slot="select-popup"], [data-slot="popover-popup"]):focus, |
| 725 | :where( |
| 726 | [data-slot="menu-popup"], |
| 727 | [data-slot="select-popup"], |
| 728 | [data-slot="popover-popup"] |
| 729 | ):focus-visible { |
| 730 | @apply outline-none ring-0; |
| 731 | } |
| 732 | html, |
| 733 | body { |
| 734 | background-color: var(--app-chrome-background); |
| 735 | } |
| 736 | body { |
| 737 | @apply text-foreground relative; |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | @layer components { |
| 742 | /* AnimatedHeight owns resizing for its contents. Nested collapsibles must |
| 743 | expose their final layout immediately, otherwise each animation frame |
| 744 | restarts the parent's transition and the dialog trails behind its content. */ |
| 745 | [data-slot="animated-height"] [data-slot="collapsible-panel"] { |
| 746 | height: auto !important; |
| 747 | transition: none !important; |
| 748 | } |
| 749 | |
| 750 | [data-slot="animated-height"] [data-slot="collapsible-panel"][data-closed] { |
| 751 | display: none; |
| 752 | } |
| 753 | |
| 754 | /* Each maintainer palette gives the same line art its own material: rose |
| 755 | vellum, forest drafting paper, marine cyanotype, copper, and violet ink. |
| 756 | These colors stay deliberately deep at the top edge so the white stage |
| 757 | wordmark and controls retain contrast in both appearance modes. */ |
| 758 | html[data-theme-id="t3-chat"] { |
| 759 | --stage-art-top: oklch(0.760675 0.141361 348.019); |
| 760 | --stage-art-mid: oklch(0.588093 0.188832 353.138); |
| 761 | --stage-art-bottom: oklch(0.383959 0.135096 348.656); |
| 762 | --stage-art-highlight: oklch(0.949689 0.034241 339.171); |
| 763 | --stage-art-secondary: oklch(0.763402 0.163836 352.525); |
| 764 | --stage-art-tertiary: oklch(0.70819 0.180285 311.949); |
| 765 | --stage-art-line: oklch(0.952158 0.034194 336.179); |
| 766 | |
| 767 | @variant dark { |
| 768 | --stage-art-top: oklch(0.540689 0.143665 347.587); |
| 769 | --stage-art-mid: oklch(0.396586 0.126592 347.6); |
| 770 | --stage-art-bottom: oklch(0.249959 0.079694 340.523); |
| 771 | --stage-art-highlight: oklch(0.921297 0.051708 343.229); |
| 772 | --stage-art-secondary: oklch(0.667398 0.165674 352.549); |
| 773 | --stage-art-tertiary: oklch(0.609315 0.163722 306.315); |
| 774 | --stage-art-line: oklch(0.945349 0.036045 341.433); |
| 775 | } |
| 776 | } |
| 777 | |
| 778 | html[data-theme-id="grove"] { |
| 779 | --stage-art-top: oklch(0.751465 0.112731 157.313); |
| 780 | --stage-art-mid: oklch(0.567105 0.11099 158.859); |
| 781 | --stage-art-bottom: oklch(0.367918 0.067635 160.558); |
| 782 | --stage-art-highlight: oklch(0.976387 0.034353 161.456); |
| 783 | --stage-art-secondary: oklch(0.80968 0.117071 158.817); |
| 784 | --stage-art-tertiary: oklch(0.784102 0.108047 88.516); |
| 785 | --stage-art-line: oklch(0.981098 0.027812 158.718); |
| 786 | --stage-night-top: oklch(0.45805 0.079616 160.092); |
| 787 | --stage-night-mid: oklch(0.368483 0.065631 162.719); |
| 788 | --stage-night-bottom: oklch(0.264797 0.044397 168.088); |
| 789 | --stage-night-highlight: oklch(0.912563 0.055173 158.974); |
| 790 | --stage-night-secondary: oklch(0.665652 0.109731 156.599); |
| 791 | --stage-night-tertiary: oklch(0.698651 0.103024 89.828); |
| 792 | --stage-night-line: oklch(0.945336 0.041923 157.222); |
| 793 | |
| 794 | @variant dark { |
| 795 | --stage-art-top: oklch(0.58719 0.09869 157.426); |
| 796 | --stage-art-mid: oklch(0.454979 0.079031 159.756); |
| 797 | --stage-art-bottom: oklch(0.297856 0.050355 161.167); |
| 798 | --stage-art-highlight: oklch(0.952407 0.053872 158.44); |
| 799 | --stage-art-secondary: oklch(0.732591 0.120606 155.853); |
| 800 | --stage-art-tertiary: oklch(0.716282 0.116547 80.563); |
| 801 | --stage-art-line: oklch(0.961577 0.035285 157.03); |
| 802 | --stage-night-top: oklch(0.398632 0.065534 158.601); |
| 803 | --stage-night-mid: oklch(0.290561 0.049694 160.456); |
| 804 | --stage-night-bottom: oklch(0.210147 0.03173 169.818); |
| 805 | --stage-night-highlight: oklch(0.866303 0.057526 156.796); |
| 806 | --stage-night-secondary: oklch(0.586553 0.093722 157.365); |
| 807 | --stage-night-tertiary: oklch(0.6364 0.101769 82.985); |
| 808 | --stage-night-line: oklch(0.913292 0.035718 156.976); |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | html[data-theme-id="ocean"] { |
| 813 | --stage-art-top: oklch(0.792993 0.088072 220.421); |
| 814 | --stage-art-mid: oklch(0.590296 0.116841 243.184); |
| 815 | --stage-art-bottom: oklch(0.409123 0.093718 247.98); |
| 816 | --stage-art-highlight: oklch(0.971217 0.023008 213.615); |
| 817 | --stage-art-secondary: oklch(0.788391 0.090856 215.684); |
| 818 | --stage-art-tertiary: oklch(0.76441 0.099607 187.893); |
| 819 | --stage-art-line: oklch(0.976025 0.019647 212.543); |
| 820 | |
| 821 | @variant dark { |
| 822 | --stage-art-top: oklch(0.59663 0.089167 233.427); |
| 823 | --stage-art-mid: oklch(0.461094 0.084904 243.478); |
| 824 | --stage-art-bottom: oklch(0.294818 0.05947 250.526); |
| 825 | --stage-art-highlight: oklch(0.952907 0.032224 221.27); |
| 826 | --stage-art-secondary: oklch(0.732079 0.09296 224.414); |
| 827 | --stage-art-tertiary: oklch(0.720885 0.095495 190.903); |
| 828 | --stage-art-line: oklch(0.961039 0.027355 219.756); |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | html[data-theme-id="ember"] { |
| 833 | --stage-art-top: oklch(0.782439 0.118806 52.569); |
| 834 | --stage-art-mid: oklch(0.62863 0.15922 39.401); |
| 835 | --stage-art-bottom: oklch(0.404251 0.117664 30.424); |
| 836 | --stage-art-highlight: oklch(0.962469 0.02774 70.95); |
| 837 | --stage-art-secondary: oklch(0.815735 0.11904 53.659); |
| 838 | --stage-art-tertiary: oklch(0.69361 0.159346 24.787); |
| 839 | --stage-art-line: oklch(0.970313 0.02052 67.583); |
| 840 | --stage-night-top: oklch(0.470236 0.102322 39.355); |
| 841 | --stage-night-mid: oklch(0.345367 0.080697 33.217); |
| 842 | --stage-night-bottom: oklch(0.227386 0.056077 27.437); |
| 843 | --stage-night-highlight: oklch(0.903891 0.059281 56.181); |
| 844 | --stage-night-secondary: oklch(0.641705 0.126508 44.376); |
| 845 | --stage-night-tertiary: oklch(0.538694 0.129931 25.865); |
| 846 | --stage-night-line: oklch(0.926348 0.046029 58.73); |
| 847 | |
| 848 | @variant dark { |
| 849 | --stage-art-top: oklch(0.597533 0.120694 43.455); |
| 850 | --stage-art-mid: oklch(0.437763 0.101287 34.86); |
| 851 | --stage-art-bottom: oklch(0.264269 0.055858 26.548); |
| 852 | --stage-art-highlight: oklch(0.929214 0.042638 55.801); |
| 853 | --stage-art-secondary: oklch(0.705592 0.137369 43.176); |
| 854 | --stage-art-tertiary: oklch(0.629583 0.158322 24.088); |
| 855 | --stage-art-line: oklch(0.945058 0.033906 58.824); |
| 856 | --stage-night-top: oklch(0.392352 0.081287 36.444); |
| 857 | --stage-night-mid: oklch(0.271305 0.056352 31.135); |
| 858 | --stage-night-bottom: oklch(0.182126 0.028154 27.774); |
| 859 | --stage-night-highlight: oklch(0.851007 0.061294 53.805); |
| 860 | --stage-night-secondary: oklch(0.560789 0.10645 42.953); |
| 861 | --stage-night-tertiary: oklch(0.476228 0.106656 24.165); |
| 862 | --stage-night-line: oklch(0.884931 0.046607 56.556); |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | html[data-theme-id="iris"] { |
| 867 | --stage-art-top: oklch(0.738305 0.113454 298.926); |
| 868 | --stage-art-mid: oklch(0.551826 0.159189 294.531); |
| 869 | --stage-art-bottom: oklch(0.37147 0.133317 289.999); |
| 870 | --stage-art-highlight: oklch(0.949472 0.029204 303.081); |
| 871 | --stage-art-secondary: oklch(0.745085 0.125892 298.647); |
| 872 | --stage-art-tertiary: oklch(0.73066 0.167815 340.964); |
| 873 | --stage-art-line: oklch(0.960278 0.024064 306.969); |
| 874 | |
| 875 | @variant dark { |
| 876 | --stage-art-top: oklch(0.57297 0.145973 295.185); |
| 877 | --stage-art-mid: oklch(0.419499 0.13752 292.131); |
| 878 | --stage-art-bottom: oklch(0.274235 0.095798 286.608); |
| 879 | --stage-art-highlight: oklch(0.916698 0.047206 300.224); |
| 880 | --stage-art-secondary: oklch(0.670994 0.13095 296.689); |
| 881 | --stage-art-tertiary: oklch(0.679357 0.165376 340.439); |
| 882 | --stage-art-line: oklch(0.940582 0.032921 299.076); |
| 883 | } |
| 884 | } |
| 885 | |
| 886 | :is(html[data-theme-id="t3-chat"], html[data-theme-id="ocean"], html[data-theme-id="iris"]) { |
| 887 | --stage-night-top: color-mix(in oklch, var(--stage-art-top) 38%, var(--stage-night-base-top)); |
| 888 | --stage-night-mid: color-mix(in oklch, var(--stage-art-mid) 38%, var(--stage-night-base-mid)); |
| 889 | --stage-night-bottom: color-mix( |
| 890 | in oklch, |
| 891 | var(--stage-art-bottom) 38%, |
| 892 | var(--stage-night-base-bottom) |
| 893 | ); |
| 894 | --stage-night-highlight: var(--stage-art-highlight); |
| 895 | --stage-night-secondary: color-mix( |
| 896 | in oklch, |
| 897 | var(--stage-art-secondary) 55%, |
| 898 | var(--stage-night-mid) |
| 899 | ); |
| 900 | --stage-night-tertiary: color-mix( |
| 901 | in oklch, |
| 902 | var(--stage-art-tertiary) 60%, |
| 903 | var(--stage-night-top) |
| 904 | ); |
| 905 | --stage-night-line: color-mix(in oklch, var(--stage-art-line) 82%, oklch(1 0 0)); |
| 906 | } |
| 907 | |
| 908 | :is( |
| 909 | html[data-theme-id="t3-chat"], |
| 910 | html[data-theme-id="grove"], |
| 911 | html[data-theme-id="ocean"], |
| 912 | html[data-theme-id="ember"], |
| 913 | html[data-theme-id="iris"] |
| 914 | ) { |
| 915 | --stage-art-celeste-highlight: var(--stage-art-highlight); |
| 916 | --stage-art-celeste-secondary: var(--stage-art-secondary); |
| 917 | --stage-art-violet-highlight: var(--stage-art-highlight); |
| 918 | --stage-art-grid-line: var(--stage-art-line); |
| 919 | --stage-night-glow-highlight: var(--stage-night-highlight); |
| 920 | --stage-night-glow-secondary: var(--stage-night-secondary); |
| 921 | --stage-night-sparkle: var(--stage-night-line); |
| 922 | } |
| 923 | |
| 924 | @keyframes settings-search-target-pulse { |
| 925 | 0%, |
| 926 | 100% { |
| 927 | box-shadow: inset 0 0 0 0 transparent; |
| 928 | } |
| 929 | 50% { |
| 930 | box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--color-primary) 70%, transparent); |
| 931 | } |
| 932 | } |
| 933 | |
| 934 | [data-settings-page-scroll] div.settings-search-target-pulse, |
| 935 | [data-settings-page-scroll] section.settings-search-target-pulse > div:first-child { |
| 936 | animation: settings-search-target-pulse 650ms ease-in-out 2; |
| 937 | border-radius: 0.75rem; |
| 938 | } |
| 939 | |
| 940 | /* The pulse is the destination indicator; without it (reduced motion), the |
| 941 | focus outline takes over, so exactly one indicator shows at a time. */ |
| 942 | [data-settings-page-scroll] .settings-search-target-pulse:focus { |
| 943 | outline: none; |
| 944 | } |
| 945 | |
| 946 | [data-preview-panel-mode="inline"] [data-right-panel-surface-content] [data-surface-subheader] { |
| 947 | height: calc(var(--spacing) * 7); |
| 948 | min-height: calc(var(--spacing) * 7); |
| 949 | margin-bottom: calc(var(--spacing) * 3); |
| 950 | border-bottom-color: transparent; |
| 951 | } |
| 952 | |
| 953 | .chat-content-lane { |
| 954 | margin-inline: auto; |
| 955 | width: 100%; |
| 956 | min-width: 0; |
| 957 | max-width: var(--chat-content-max-width); |
| 958 | } |
| 959 | |
| 960 | .messages-timeline-row-frame { |
| 961 | padding-inline: 0; |
| 962 | } |
| 963 | |
| 964 | .settings-slider { |
| 965 | --settings-slider-progress: 0%; |
| 966 | --settings-slider-fill-offset: 0.5rem; |
| 967 | --settings-slider-fill-position: calc( |
| 968 | var(--settings-slider-progress) + var(--settings-slider-fill-offset) |
| 969 | ); |
| 970 | appearance: none; |
| 971 | height: 1.5rem; |
| 972 | background: transparent; |
| 973 | cursor: pointer; |
| 974 | } |
| 975 | |
| 976 | .settings-slider::-webkit-slider-runnable-track { |
| 977 | height: 0.375rem; |
| 978 | border-radius: 9999px; |
| 979 | background: linear-gradient( |
| 980 | to right, |
| 981 | var(--primary) 0 var(--settings-slider-fill-position), |
| 982 | color-mix(in srgb, var(--contrast-muted-foreground) 22%, transparent) |
| 983 | var(--settings-slider-fill-position) 100% |
| 984 | ); |
| 985 | box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--contrast-border) 55%, transparent); |
| 986 | } |
| 987 | |
| 988 | .settings-slider::-moz-range-track { |
| 989 | height: 0.375rem; |
| 990 | border-radius: 9999px; |
| 991 | background: color-mix(in srgb, var(--contrast-muted-foreground) 22%, transparent); |
| 992 | box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--contrast-border) 55%, transparent); |
| 993 | } |
| 994 | |
| 995 | .settings-slider::-moz-range-progress { |
| 996 | height: 0.375rem; |
| 997 | border-radius: 9999px; |
| 998 | background: var(--primary); |
| 999 | } |
| 1000 | |
| 1001 | .settings-slider::-webkit-slider-thumb { |
| 1002 | appearance: none; |
| 1003 | width: 1rem; |
| 1004 | height: 1rem; |
| 1005 | margin-top: -0.3125rem; |
| 1006 | border: 2px solid var(--primary); |
| 1007 | border-radius: 9999px; |
| 1008 | background: var(--background); |
| 1009 | box-shadow: 0 1px 2px color-mix(in srgb, var(--contrast-foreground) 12%, transparent); |
| 1010 | transition: |
| 1011 | transform 120ms ease, |
| 1012 | box-shadow 120ms ease; |
| 1013 | } |
| 1014 | |
| 1015 | .settings-slider::-moz-range-thumb { |
| 1016 | width: 1rem; |
| 1017 | height: 1rem; |
| 1018 | border: 2px solid var(--primary); |
| 1019 | border-radius: 9999px; |
| 1020 | background: var(--background); |
| 1021 | box-shadow: 0 1px 2px color-mix(in srgb, var(--contrast-foreground) 12%, transparent); |
| 1022 | transition: |
| 1023 | transform 120ms ease, |
| 1024 | box-shadow 120ms ease; |
| 1025 | } |
| 1026 | |
| 1027 | .settings-slider:hover::-webkit-slider-thumb { |
| 1028 | transform: scale(1.08); |
| 1029 | box-shadow: 0 1px 3px color-mix(in srgb, var(--contrast-foreground) 20%, transparent); |
| 1030 | } |
| 1031 | |
| 1032 | .settings-slider:hover::-moz-range-thumb { |
| 1033 | transform: scale(1.08); |
| 1034 | box-shadow: 0 1px 3px color-mix(in srgb, var(--contrast-foreground) 20%, transparent); |
| 1035 | } |
| 1036 | |
| 1037 | .settings-slider:active::-webkit-slider-thumb { |
| 1038 | transform: scale(0.94); |
| 1039 | } |
| 1040 | |
| 1041 | .settings-slider:active::-moz-range-thumb { |
| 1042 | transform: scale(0.94); |
| 1043 | } |
| 1044 | |
| 1045 | .settings-slider:focus-visible { |
| 1046 | outline: none; |
| 1047 | } |
| 1048 | |
| 1049 | .settings-slider:focus-visible::-webkit-slider-thumb { |
| 1050 | box-shadow: |
| 1051 | inset 0 0 0 1px var(--background), |
| 1052 | inset 0 0 0 3px var(--ring); |
| 1053 | } |
| 1054 | |
| 1055 | .settings-slider:focus-visible::-moz-range-thumb { |
| 1056 | box-shadow: |
| 1057 | inset 0 0 0 1px var(--background), |
| 1058 | inset 0 0 0 3px var(--ring); |
| 1059 | } |
| 1060 | |
| 1061 | @media (forced-colors: active) { |
| 1062 | .settings-slider { |
| 1063 | appearance: auto; |
| 1064 | accent-color: Highlight; |
| 1065 | } |
| 1066 | |
| 1067 | .settings-slider::-webkit-slider-runnable-track, |
| 1068 | .settings-slider::-webkit-slider-thumb { |
| 1069 | all: revert; |
| 1070 | } |
| 1071 | |
| 1072 | .settings-slider::-moz-range-track, |
| 1073 | .settings-slider::-moz-range-progress, |
| 1074 | .settings-slider::-moz-range-thumb { |
| 1075 | all: revert; |
| 1076 | } |
| 1077 | } |
| 1078 | } |
| 1079 | |
| 1080 | /* Safe-area inset utilities for surfaces that opt into edge-to-edge rendering. |
| 1081 | Insets resolve to 0 when the browser already constrains the layout viewport |
| 1082 | to the safe area. */ |
| 1083 | @utility pt-safe { |
| 1084 | padding-top: max(env(safe-area-inset-top), 0px); |
| 1085 | } |
| 1086 | @utility pb-safe { |
| 1087 | padding-bottom: max(env(safe-area-inset-bottom), 0px); |
| 1088 | } |
| 1089 | @utility pl-safe { |
| 1090 | padding-left: max(env(safe-area-inset-left), 0px); |
| 1091 | } |
| 1092 | @utility pr-safe { |
| 1093 | padding-right: max(env(safe-area-inset-right), 0px); |
| 1094 | } |
| 1095 | |
| 1096 | /* Grain texture for chrome surfaces that float above the body (see the |
| 1097 | --surface-grain note). Layered over the element's background-color, so it |
| 1098 | composes with bg-* utilities. */ |
| 1099 | @utility surface-grain { |
| 1100 | background-image: var(--surface-grain); |
| 1101 | background-repeat: repeat; |
| 1102 | background-size: var(--surface-grain-size); |
| 1103 | } |
| 1104 | |
| 1105 | /* Suppress all transitions during theme changes */ |
| 1106 | .no-transitions, |
| 1107 | .no-transitions *, |
| 1108 | .no-transitions *::before, |
| 1109 | .no-transitions *::after { |
| 1110 | transition-duration: 0s !important; |
| 1111 | animation-duration: 0s !important; |
| 1112 | } |
| 1113 | |
| 1114 | :root { |
| 1115 | color-scheme: light; |
| 1116 | --radius: 0.5rem; |
| 1117 | --background: var(--color-zinc-25); |
| 1118 | --app-chrome-background: var(--background); |
| 1119 | --toolbar-background: var(--app-chrome-background); |
| 1120 | --toolbar-foreground: var(--foreground); |
| 1121 | --toolbar-border: var(--border); |
| 1122 | --toolbar-control: var(--popover); |
| 1123 | --toolbar-control-foreground: var(--foreground); |
| 1124 | --toolbar-control-hover: var(--accent); |
| 1125 | --surface-raised: color-mix(in srgb, var(--card) 20%, transparent); |
| 1126 | --foreground: var(--color-zinc-900); |
| 1127 | --card: var(--color-white); |
| 1128 | --card-foreground: var(--color-zinc-900); |
| 1129 | --popover: var(--color-white); |
| 1130 | --popover-foreground: var(--color-zinc-900); |
| 1131 | --primary: oklch(0.488 0.217 264); |
| 1132 | --primary-foreground: var(--color-white); |
| 1133 | --secondary: var(--color-zinc-50); |
| 1134 | --secondary-foreground: var(--color-zinc-800); |
| 1135 | --muted: var(--color-zinc-50); |
| 1136 | --muted-foreground: var(--color-zinc-500); |
| 1137 | --placeholder: var(--muted-foreground); |
| 1138 | --secondary-label: var(--muted-foreground); |
| 1139 | --icon-muted: var(--muted-foreground); |
| 1140 | /* One step past the accent, so a user turn stands off the near-white canvas. */ |
| 1141 | --message-surface: color-mix(in srgb, var(--color-zinc-200) 55%, var(--color-zinc-100)); |
| 1142 | --message-foreground: var(--foreground); |
| 1143 | --message-action: var(--primary); |
| 1144 | --message-action-foreground: var(--primary-foreground); |
| 1145 | --message-action-hover: color-mix(in srgb, var(--primary) 90%, var(--background)); |
| 1146 | --accent: var(--color-zinc-100); |
| 1147 | --accent-foreground: var(--color-zinc-900); |
| 1148 | --error: var(--color-red-500); |
| 1149 | --error-foreground: var(--color-red-700); |
| 1150 | --tool-error-icon: var(--error); |
| 1151 | --error-surface: color-mix(in srgb, var(--error) 8%, transparent); |
| 1152 | --destructive: var(--error); |
| 1153 | --border: var(--color-zinc-200); |
| 1154 | --input: var(--color-zinc-300); |
| 1155 | --ring: var(--primary); |
| 1156 | --destructive-foreground: var(--error-foreground); |
| 1157 | --info: var(--color-blue-500); |
| 1158 | --info-foreground: var(--color-blue-700); |
| 1159 | /* Messages from a guest link, and the sidebar Request status. */ |
| 1160 | --guest: var(--color-fuchsia-500); |
| 1161 | --guest-foreground: var(--color-fuchsia-600); |
| 1162 | --guest-surface: color-mix(in srgb, var(--guest) 14%, var(--message-surface)); |
| 1163 | --success: var(--color-emerald-500); |
| 1164 | --success-foreground: var(--color-emerald-700); |
| 1165 | --warning: var(--color-amber-500); |
| 1166 | --warning-foreground: var(--color-amber-700); |
| 1167 | --warning-surface: color-mix(in srgb, var(--warning) 8%, transparent); |
| 1168 | --update: var(--primary); |
| 1169 | --update-foreground: var(--primary); |
| 1170 | /* Keep every sidebar primitive on the same light surface hierarchy, including |
| 1171 | portaled mobile sheets and settings navigation outside the app sidebar. */ |
| 1172 | --sidebar: var(--color-zinc-50); |
| 1173 | --sidebar-foreground: var(--foreground); |
| 1174 | --sidebar-muted-foreground: var(--muted-foreground); |
| 1175 | --sidebar-control-surface: var(--color-zinc-100); |
| 1176 | --sidebar-row-hover: var(--color-zinc-25); |
| 1177 | --sidebar-row-active: var(--color-white); |
| 1178 | --sidebar-row-selected: var(--color-white); |
| 1179 | --sidebar-border: var(--border); |
| 1180 | --sidebar-stage-fade: var(--sidebar); |
| 1181 | --code-background: color-mix(in srgb, var(--card) 90%, var(--background)); |
| 1182 | --code-foreground: var(--foreground); |
| 1183 | --terminal-background: var(--background); |
| 1184 | --terminal-foreground: var(--foreground); |
| 1185 | --terminal-cursor: rgb(38 56 78); |
| 1186 | --terminal-selection-background: rgb(37 63 99 / 20%); |
| 1187 | |
| 1188 | @variant dark { |
| 1189 | color-scheme: dark; |
| 1190 | /* The canvas is true black, matching the sidebar. Raised surfaces keep the tone they had |
| 1191 | over neutral-950, so cards, popovers, and the composer still lift. Borders and hover |
| 1192 | states provide separation without milky gray fills. */ |
| 1193 | --background: #000; |
| 1194 | --surface-raised: color-mix(in srgb, var(--color-neutral-950) 97%, var(--color-white)); |
| 1195 | --foreground: var(--color-neutral-100); |
| 1196 | --card: color-mix(in srgb, var(--color-neutral-950) 97%, var(--color-white)); |
| 1197 | --card-foreground: var(--color-neutral-100); |
| 1198 | --popover: color-mix(in srgb, var(--color-neutral-950) 97%, var(--color-white)); |
| 1199 | --popover-foreground: var(--color-neutral-100); |
| 1200 | --primary: oklch(0.571 0.21 264); |
| 1201 | --secondary: --alpha(var(--color-white) / 3%); |
| 1202 | --secondary-foreground: var(--color-neutral-100); |
| 1203 | --muted: --alpha(var(--color-white) / 3%); |
| 1204 | --muted-foreground: var(--color-neutral-400); |
| 1205 | --accent: --alpha(var(--color-white) / 4%); |
| 1206 | --accent-foreground: var(--color-neutral-100); |
| 1207 | /* A user turn sits above the composer tone, level with the selected sidebar row. */ |
| 1208 | --message-surface: color-mix(in srgb, var(--color-neutral-950) 92%, var(--color-white)); |
| 1209 | --error: color-mix(in srgb, var(--color-red-500) 90%, var(--color-white)); |
| 1210 | --error-foreground: var(--color-red-400); |
| 1211 | --tool-error-icon: #fca5a5; |
| 1212 | --error-surface: color-mix(in srgb, var(--error) 16%, transparent); |
| 1213 | --border: --alpha(var(--color-white) / 8%); |
| 1214 | --input: --alpha(var(--color-white) / 11%); |
| 1215 | --info-foreground: var(--color-blue-400); |
| 1216 | --guest-foreground: var(--color-fuchsia-300); |
| 1217 | --success-foreground: var(--color-emerald-400); |
| 1218 | --warning-foreground: var(--color-amber-400); |
| 1219 | --warning-surface: color-mix(in srgb, var(--warning) 16%, transparent); |
| 1220 | --update-foreground: var(--color-blue-400); |
| 1221 | --sidebar: var(--card); |
| 1222 | --sidebar-control-surface: var(--muted); |
| 1223 | --sidebar-row-hover: var(--accent); |
| 1224 | --sidebar-row-active: var(--accent); |
| 1225 | --sidebar-row-selected: var(--muted); |
| 1226 | --sidebar-stage-fade: var(--card); |
| 1227 | --terminal-cursor: rgb(180 203 255); |
| 1228 | --terminal-selection-background: rgb(180 203 255 / 25%); |
| 1229 | } |
| 1230 | } |
| 1231 | |
| 1232 | /* Keep both sidebar implementations (default and legacy) on the same quiet |
| 1233 | zinc hierarchy: zinc-50 navigation, zinc-25 hover, and white selected/raised |
| 1234 | surfaces. */ |
| 1235 | [data-app-sidebar] { |
| 1236 | --background: var(--color-zinc-25); |
| 1237 | --foreground: var(--color-zinc-900); |
| 1238 | --card: var(--color-white); |
| 1239 | --card-foreground: var(--color-zinc-900); |
| 1240 | --accent: var(--color-zinc-100); |
| 1241 | --accent-foreground: var(--color-zinc-900); |
| 1242 | --muted: var(--color-zinc-50); |
| 1243 | --muted-foreground: var(--color-zinc-500); |
| 1244 | --border: var(--color-zinc-200); |
| 1245 | --input: var(--color-zinc-300); |
| 1246 | --sidebar: var(--color-zinc-50); |
| 1247 | --sidebar-foreground: var(--color-zinc-900); |
| 1248 | --sidebar-muted-foreground: var(--color-zinc-500); |
| 1249 | --sidebar-control-surface: var(--color-zinc-100); |
| 1250 | --sidebar-row-hover: var(--color-zinc-25); |
| 1251 | --sidebar-row-active: var(--color-white); |
| 1252 | --sidebar-row-selected: var(--color-white); |
| 1253 | --sidebar-border: var(--color-zinc-200); |
| 1254 | --sidebar-stage-fade: var(--sidebar); |
| 1255 | |
| 1256 | @variant dark { |
| 1257 | --background: #000; |
| 1258 | --foreground: #f1f3f7; |
| 1259 | --card: #000; |
| 1260 | --card-foreground: var(--foreground); |
| 1261 | --accent: #191a1d; |
| 1262 | --accent-foreground: #f7f9ff; |
| 1263 | --muted: #0a0a0a; |
| 1264 | --muted-foreground: #a3a3a3; |
| 1265 | --border: rgb(255 255 255 / 8%); |
| 1266 | --input: rgb(255 255 255 / 18%); |
| 1267 | --sidebar: var(--card); |
| 1268 | --sidebar-foreground: var(--foreground); |
| 1269 | --sidebar-muted-foreground: var(--muted-foreground); |
| 1270 | --sidebar-control-surface: var(--muted); |
| 1271 | --sidebar-row-hover: color-mix(in srgb, var(--contrast-foreground) 8%, transparent); |
| 1272 | --sidebar-row-active: color-mix(in srgb, var(--contrast-foreground) 11%, transparent); |
| 1273 | --sidebar-row-selected: color-mix(in srgb, var(--contrast-foreground) 7%, transparent); |
| 1274 | --sidebar-border: var(--border); |
| 1275 | --sidebar-stage-fade: var(--card); |
| 1276 | /* Row metadata sits a step below read titles (75% white). */ |
| 1277 | --secondary-label: #8f8f8f; |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | /* Modified files get a muted blue so added and deleted files lead. Built from the info token, |
| 1282 | which themes do not override, so it stays blue in every theme. */ |
| 1283 | :root { |
| 1284 | --diff-modified-icon: color-mix(in srgb, var(--info-foreground) 50%, var(--muted-foreground)); |
| 1285 | |
| 1286 | @variant dark { |
| 1287 | /* On black a gray mix stays as bright as the blue, so dim with transparency instead. */ |
| 1288 | --diff-modified-icon: color-mix(in srgb, var(--info-foreground) 65%, transparent); |
| 1289 | --diff-added-icon: var(--success-foreground); |
| 1290 | } |
| 1291 | } |
| 1292 | |
| 1293 | /* Blue-orange already spends blue on additions. Same specificity as the dark block above and |
| 1294 | later, so it wins there too. */ |
| 1295 | :root[data-diff-color-scheme="blue-orange"] { |
| 1296 | --diff-modified-icon: var(--muted-foreground); |
| 1297 | --diff-added-icon: initial; |
| 1298 | |
| 1299 | @variant dark { |
| 1300 | --diff-modified-icon: color-mix(in srgb, var(--muted-foreground) 65%, transparent); |
| 1301 | } |
| 1302 | } |
| 1303 | |
| 1304 | /* Sections in the provider detail pane sit flat in its card instead of nesting cards inside |
| 1305 | it. Headings and row dividers still separate them. */ |
| 1306 | [data-provider-detail] [data-slot="settings-group"] { |
| 1307 | border-color: transparent; |
| 1308 | background: transparent; |
| 1309 | box-shadow: none; |
| 1310 | } |
| 1311 | |
| 1312 | /* A diff header's copy button shows on file hover or focus. */ |
| 1313 | @media (hover: hover) { |
| 1314 | diffs-container:not(:hover) [data-diff-copy-path]:not(:focus-within) { |
| 1315 | opacity: 0; |
| 1316 | } |
| 1317 | } |
| 1318 | |
| 1319 | /* Theme files are expressed in app color roles and mapped to the existing |
| 1320 | semantic surface tokens here. Keep this block after the sidebar-version |
| 1321 | compatibility overrides so both navigation implementations receive the |
| 1322 | same palette. Success, info, provider, and channel identity colors remain |
| 1323 | independent; error, warning, and update roles are themeable below. */ |
| 1324 | /* The non-empty marker adds enough specificity to outrank the generated root |
| 1325 | dark variant without reintroducing raw `.dark` selectors. */ |
| 1326 | html[data-theme-id]:not([data-theme-id=""]) { |
| 1327 | --background: var(--app-theme-canvas); |
| 1328 | --app-chrome-background: var(--app-theme-chrome); |
| 1329 | --toolbar-background: var(--app-theme-toolbar); |
| 1330 | --toolbar-foreground: var(--app-theme-toolbar-foreground); |
| 1331 | --toolbar-border: var(--app-theme-toolbar-border); |
| 1332 | --toolbar-control: var(--app-theme-toolbar-control); |
| 1333 | --toolbar-control-foreground: var(--app-theme-toolbar-control-foreground); |
| 1334 | --toolbar-control-hover: var(--app-theme-toolbar-control-hover); |
| 1335 | --surface-raised: var(--app-theme-surface-raised); |
| 1336 | --foreground: var(--app-theme-text); |
| 1337 | --card: var(--app-theme-surface); |
| 1338 | --card-foreground: var(--app-theme-text); |
| 1339 | --popover: var(--app-theme-surface-overlay); |
| 1340 | --popover-foreground: var(--app-theme-text); |
| 1341 | /* Solid controls (CTAs, switches, sliders, the send button) all share the |
| 1342 | theme's action color so every "act now" affordance reads consistently; |
| 1343 | the accent keeps driving surfaces, selection, and focus. Palettes without |
| 1344 | a distinct action color make these identical. */ |
| 1345 | --primary: var(--app-theme-message-action); |
| 1346 | --primary-foreground: var(--app-theme-message-action-foreground); |
| 1347 | --secondary: var(--app-theme-secondary); |
| 1348 | --secondary-foreground: var(--app-theme-secondary-foreground); |
| 1349 | --muted: var(--app-theme-muted); |
| 1350 | --muted-foreground: var(--app-theme-muted-foreground); |
| 1351 | --placeholder: var(--app-theme-placeholder); |
| 1352 | --secondary-label: var(--app-theme-secondary-label); |
| 1353 | --icon-muted: var(--app-theme-icon-muted); |
| 1354 | --accent: var(--app-theme-accent-surface); |
| 1355 | --accent-foreground: var(--app-theme-accent-surface-foreground); |
| 1356 | --message-surface: var(--app-theme-message-surface); |
| 1357 | --message-foreground: var(--app-theme-message-foreground); |
| 1358 | --message-action: var(--app-theme-message-action); |
| 1359 | --message-action-foreground: var(--app-theme-message-action-foreground); |
| 1360 | --message-action-hover: var(--app-theme-message-action-hover); |
| 1361 | --error: var(--app-theme-error); |
| 1362 | --error-foreground: var(--app-theme-error-foreground); |
| 1363 | --tool-error-icon: var(--error-foreground); |
| 1364 | --error-surface: var(--app-theme-error-surface); |
| 1365 | --destructive: var(--error); |
| 1366 | --destructive-foreground: var(--error-foreground); |
| 1367 | --warning: var(--app-theme-warning); |
| 1368 | --warning-foreground: var(--app-theme-warning-foreground); |
| 1369 | --warning-surface: var(--app-theme-warning-surface); |
| 1370 | --update: var(--app-theme-update); |
| 1371 | --update-foreground: var(--app-theme-update-foreground); |
| 1372 | --border: var(--app-theme-border); |
| 1373 | --input: var(--app-theme-input); |
| 1374 | --ring: var(--app-theme-focus); |
| 1375 | --sidebar: var(--app-theme-sidebar); |
| 1376 | --sidebar-foreground: var(--app-theme-sidebar-foreground); |
| 1377 | --sidebar-muted-foreground: var(--app-theme-sidebar-muted-foreground); |
| 1378 | --sidebar-control-surface: var(--app-theme-sidebar-control-surface); |
| 1379 | --sidebar-row-hover: var(--app-theme-sidebar-row-hover); |
| 1380 | --sidebar-row-active: var(--app-theme-sidebar-row-active); |
| 1381 | --sidebar-row-selected: var(--app-theme-sidebar-row-selected); |
| 1382 | --sidebar-border: var(--app-theme-sidebar-border); |
| 1383 | --sidebar-stage-fade: var(--app-theme-sidebar); |
| 1384 | --code-background: var(--app-theme-code-background); |
| 1385 | --code-foreground: var(--app-theme-code-foreground); |
| 1386 | --terminal-background: var(--app-theme-terminal-background); |
| 1387 | --terminal-foreground: var(--app-theme-terminal-foreground); |
| 1388 | --terminal-cursor: var(--app-theme-terminal-cursor); |
| 1389 | --terminal-selection-background: var(--app-theme-terminal-selection-background); |
| 1390 | } |
| 1391 | |
| 1392 | /* Theme-token dependency probes are restored synchronously, before paint. Keep |
| 1393 | transitions from observing the temporary sentinel color in between. */ |
| 1394 | html[data-theme-token-probe], |
| 1395 | html[data-theme-token-probe] *, |
| 1396 | html[data-theme-token-probe] *::before, |
| 1397 | html[data-theme-token-probe] *::after { |
| 1398 | transition: none !important; |
| 1399 | } |
| 1400 | |
| 1401 | #theme-inspector-spotlight { |
| 1402 | position: fixed; |
| 1403 | z-index: 100; |
| 1404 | inset: 0; |
| 1405 | width: 100vw; |
| 1406 | height: 100dvh; |
| 1407 | overflow: visible; |
| 1408 | pointer-events: none; |
| 1409 | } |
| 1410 | |
| 1411 | [data-slot="popover-positioner"]:has([data-theme-editor-panel]), |
| 1412 | [data-slot="tooltip-positioner"]:has([data-theme-editor-panel]) { |
| 1413 | z-index: 120; |
| 1414 | } |
| 1415 | |
| 1416 | .theme-inspector-spotlight-dimmer { |
| 1417 | fill: rgb(2 3 8 / 54%); |
| 1418 | } |
| 1419 | |
| 1420 | .theme-inspector-spotlight-glow { |
| 1421 | fill: color-mix(in oklab, var(--ring) 9%, transparent); |
| 1422 | stroke: color-mix(in oklab, var(--ring) 72%, white); |
| 1423 | stroke-width: 2px; |
| 1424 | opacity: 0.92; |
| 1425 | vector-effect: non-scaling-stroke; |
| 1426 | } |
| 1427 | |
| 1428 | #theme-inspector-hover { |
| 1429 | position: fixed; |
| 1430 | z-index: 101; |
| 1431 | pointer-events: none; |
| 1432 | background: color-mix(in oklab, var(--ring) 7%, transparent); |
| 1433 | border: 1px solid color-mix(in oklab, var(--ring) 70%, white); |
| 1434 | box-shadow: |
| 1435 | 0 0 0 3px color-mix(in oklab, var(--ring) 16%, transparent), |
| 1436 | 0 0 18px color-mix(in oklab, var(--ring) 38%, transparent); |
| 1437 | } |
| 1438 | |
| 1439 | #theme-inspector-hover [data-theme-inspector-hover-label] { |
| 1440 | position: absolute; |
| 1441 | left: 0; |
| 1442 | max-width: 12rem; |
| 1443 | overflow: hidden; |
| 1444 | padding: 0.2rem 0.45rem; |
| 1445 | border: 1px solid color-mix(in oklab, var(--ring) 48%, var(--contrast-border)); |
| 1446 | border-radius: 0.4rem; |
| 1447 | background: var(--popover); |
| 1448 | box-shadow: 0 4px 16px rgb(0 0 0 / 24%); |
| 1449 | color: var(--contrast-popover-foreground); |
| 1450 | font-size: 0.6875rem; |
| 1451 | font-weight: 600; |
| 1452 | line-height: 1rem; |
| 1453 | text-overflow: ellipsis; |
| 1454 | white-space: nowrap; |
| 1455 | } |
| 1456 | |
| 1457 | #theme-inspector-hover[data-placement="above"] [data-theme-inspector-hover-label] { |
| 1458 | bottom: calc(100% + 0.35rem); |
| 1459 | } |
| 1460 | |
| 1461 | #theme-inspector-hover[data-placement="below"] [data-theme-inspector-hover-label] { |
| 1462 | top: calc(100% + 0.35rem); |
| 1463 | } |
| 1464 | |
| 1465 | /* Workspace actions use a small, separate chrome hierarchy. Keeping these |
| 1466 | roles explicit prevents the thread toolbar from falling back to the default |
| 1467 | dark-mode whites while preserving the same theme file across clients. */ |
| 1468 | html[data-theme-id] [data-chat-header] { |
| 1469 | background-color: var(--toolbar-background); |
| 1470 | color: var(--contrast-toolbar-foreground); |
| 1471 | } |
| 1472 | |
| 1473 | html[data-theme-id] [data-chat-header] [data-slot="button"], |
| 1474 | html[data-theme-id] [data-chat-header] [data-slot="menu-trigger"], |
| 1475 | html[data-theme-id] [data-chat-header] [data-toolbar-control] { |
| 1476 | --control-icon-color: var(--contrast-toolbar-control-foreground); |
| 1477 | background-color: var(--toolbar-control); |
| 1478 | border-color: var(--contrast-toolbar-border); |
| 1479 | color: var(--contrast-toolbar-control-foreground); |
| 1480 | } |
| 1481 | |
| 1482 | /* The panel layout toggles stay ghost: they render both inside the header and |
| 1483 | in the titlebar strip, so filling them would make them change appearance as |
| 1484 | the panel opens. They only take the themed foreground; hover and pressed |
| 1485 | keep the base ghost accent. The tooltip trigger's data-slot wins over the |
| 1486 | toggle's when the trigger renders the toggle, so match both. */ |
| 1487 | html[data-theme-id] [data-panel-layout-controls] [data-slot="toggle"], |
| 1488 | html[data-theme-id] [data-panel-layout-controls] [data-slot="tooltip-trigger"], |
| 1489 | html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="toggle"], |
| 1490 | html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="tooltip-trigger"] { |
| 1491 | --control-icon-color: var(--contrast-toolbar-foreground); |
| 1492 | color: var(--contrast-toolbar-foreground); |
| 1493 | } |
| 1494 | |
| 1495 | html[data-theme-id] [data-panel-layout-controls] [data-slot="toggle"]:disabled, |
| 1496 | html[data-theme-id] [data-panel-layout-controls] [data-slot="tooltip-trigger"]:disabled, |
| 1497 | html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="toggle"]:disabled, |
| 1498 | html[data-theme-id] [data-workspace-titlebar-controls] [data-slot="tooltip-trigger"]:disabled { |
| 1499 | --control-icon-color: color-mix( |
| 1500 | in oklab, |
| 1501 | var(--contrast-toolbar-foreground) 55%, |
| 1502 | var(--toolbar-background) |
| 1503 | ); |
| 1504 | color: color-mix(in oklab, var(--contrast-toolbar-foreground) 55%, var(--toolbar-background)); |
| 1505 | } |
| 1506 | |
| 1507 | html[data-theme-id] [data-chat-header] [data-slot="button"]:hover, |
| 1508 | html[data-theme-id] [data-chat-header] [data-slot="button"][data-pressed], |
| 1509 | html[data-theme-id] [data-chat-header] [data-slot="menu-trigger"]:hover, |
| 1510 | html[data-theme-id] [data-chat-header] [data-slot="menu-trigger"][data-pressed], |
| 1511 | html[data-theme-id] [data-chat-header] [data-toolbar-control]:hover, |
| 1512 | html[data-theme-id] [data-chat-header] [data-toolbar-control][data-pressed] { |
| 1513 | background-color: var(--toolbar-control-hover); |
| 1514 | } |
| 1515 | |
| 1516 | html[data-theme-id] [data-chat-header] [data-slot="separator"] { |
| 1517 | background-color: var(--contrast-toolbar-border); |
| 1518 | } |
| 1519 | |
| 1520 | /* Chat code blocks join the other code surfaces on the code tokens. The |
| 1521 | default look keeps its secondary/input tints; themed palettes tint those |
| 1522 | surfaces with the accent, which fights syntax highlighting. */ |
| 1523 | html[data-theme-id] :is(.chat-markdown, .composer-tiptap) .chat-markdown-codeblock { |
| 1524 | background-color: var(--code-background); |
| 1525 | border-color: var(--contrast-border); |
| 1526 | color: var(--code-foreground); |
| 1527 | } |
| 1528 | |
| 1529 | html[data-theme-id] .chat-markdown pre { |
| 1530 | background-color: var(--code-background); |
| 1531 | color: var(--code-foreground); |
| 1532 | } |
| 1533 | |
| 1534 | html[data-theme-id] :is(.chat-markdown, .composer-tiptap) .chat-markdown-codeblock pre { |
| 1535 | background-color: transparent; |
| 1536 | } |
| 1537 | |
| 1538 | html[data-theme-id] :is(.chat-markdown, .composer-tiptap) .chat-markdown-codeblock-header { |
| 1539 | color: color-mix(in srgb, var(--code-foreground) 72%, transparent); |
| 1540 | } |
| 1541 | |
| 1542 | /* T3 Chat renders inline code and compact chat artifacts with its translucent |
| 1543 | secondary surface flattened over the light chat canvas. The raw muted and |
| 1544 | secondary tokens are substantially darker than those visible pixels. */ |
| 1545 | html[data-theme-id="t3-chat"] { |
| 1546 | @variant light { |
| 1547 | & .chat-markdown :not(pre) > code, |
| 1548 | & [data-changed-files-state], |
| 1549 | & [data-changed-files-header] { |
| 1550 | background-color: var(--message-surface); |
| 1551 | } |
| 1552 | |
| 1553 | & .chat-markdown :not(pre) > code, |
| 1554 | & [data-changed-files-state] { |
| 1555 | border-color: transparent; |
| 1556 | } |
| 1557 | |
| 1558 | & .chat-markdown :not(pre) > code { |
| 1559 | color: var(--contrast-message-foreground); |
| 1560 | } |
| 1561 | } |
| 1562 | } |
| 1563 | |
| 1564 | html[data-theme-id] [data-app-sidebar] { |
| 1565 | --background: var(--app-theme-canvas); |
| 1566 | --foreground: var(--app-theme-text); |
| 1567 | --card: var(--app-theme-surface); |
| 1568 | --card-foreground: var(--app-theme-text); |
| 1569 | --accent: var(--app-theme-accent-surface); |
| 1570 | --accent-foreground: var(--app-theme-accent-surface-foreground); |
| 1571 | --muted: var(--app-theme-muted); |
| 1572 | --muted-foreground: var(--app-theme-muted-foreground); |
| 1573 | --secondary-label: var(--app-theme-secondary-label); |
| 1574 | --border: var(--app-theme-border); |
| 1575 | --input: var(--app-theme-input); |
| 1576 | --sidebar: var(--app-theme-sidebar); |
| 1577 | --sidebar-foreground: var(--app-theme-sidebar-foreground); |
| 1578 | --sidebar-muted-foreground: var(--app-theme-sidebar-muted-foreground); |
| 1579 | --sidebar-control-surface: var(--app-theme-sidebar-control-surface); |
| 1580 | --sidebar-row-hover: var(--app-theme-sidebar-row-hover); |
| 1581 | --sidebar-row-active: var(--app-theme-sidebar-row-active); |
| 1582 | --sidebar-row-selected: var(--app-theme-sidebar-row-selected); |
| 1583 | --sidebar-border: var(--app-theme-sidebar-border); |
| 1584 | --sidebar-stage-fade: var(--app-theme-sidebar); |
| 1585 | border-color: color-mix(in srgb, var(--contrast-sidebar-foreground) 10%, transparent); |
| 1586 | |
| 1587 | @variant dark { |
| 1588 | border-color: color-mix(in srgb, var(--contrast-sidebar-foreground) 8%, transparent); |
| 1589 | } |
| 1590 | } |
| 1591 | |
| 1592 | /* T3 Chat's panel divider is deliberately pink, and its resize affordance |
| 1593 | keeps that color while hovered. Do not neutralize this branded edge. */ |
| 1594 | html[data-theme-id="t3-chat"] [data-app-sidebar] { |
| 1595 | @variant dark { |
| 1596 | border-color: var(--contrast-sidebar-border); |
| 1597 | } |
| 1598 | } |
| 1599 | |
| 1600 | /* Recompute contrast wherever a subtree owns its own semantic color palette. */ |
| 1601 | :root, |
| 1602 | [data-app-sidebar] { |
| 1603 | --contrast-toolbar-foreground: color-mix( |
| 1604 | in oklab, |
| 1605 | color-mix( |
| 1606 | in oklab, |
| 1607 | var(--toolbar-foreground) var(--appearance-contrast-base), |
| 1608 | var(--toolbar-background) |
| 1609 | ), |
| 1610 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1611 | ); |
| 1612 | --contrast-toolbar-border: color-mix( |
| 1613 | in srgb, |
| 1614 | color-mix(in srgb, var(--toolbar-border) var(--appearance-contrast-base), transparent), |
| 1615 | var(--toolbar-foreground) var(--appearance-contrast-border-boost) |
| 1616 | ); |
| 1617 | --contrast-toolbar-control-foreground: color-mix( |
| 1618 | in oklab, |
| 1619 | color-mix( |
| 1620 | in oklab, |
| 1621 | var(--toolbar-control-foreground) var(--appearance-contrast-base), |
| 1622 | var(--toolbar-control) |
| 1623 | ), |
| 1624 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1625 | ); |
| 1626 | --contrast-input: color-mix( |
| 1627 | in srgb, |
| 1628 | color-mix(in srgb, var(--input) var(--appearance-contrast-base), transparent), |
| 1629 | var(--foreground) var(--appearance-contrast-border-boost) |
| 1630 | ); |
| 1631 | --contrast-border: color-mix( |
| 1632 | in srgb, |
| 1633 | color-mix(in srgb, var(--border) var(--appearance-contrast-base), transparent), |
| 1634 | var(--foreground) var(--appearance-contrast-border-boost) |
| 1635 | ); |
| 1636 | --contrast-foreground: color-mix( |
| 1637 | in oklab, |
| 1638 | color-mix(in oklab, var(--foreground) var(--appearance-contrast-base), var(--background)), |
| 1639 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1640 | ); |
| 1641 | --contrast-muted-foreground: color-mix( |
| 1642 | in oklab, |
| 1643 | color-mix(in oklab, var(--muted-foreground) var(--appearance-contrast-base), var(--background)), |
| 1644 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1645 | ); |
| 1646 | --contrast-placeholder: color-mix( |
| 1647 | in oklab, |
| 1648 | color-mix(in oklab, var(--placeholder) var(--appearance-contrast-base), var(--background)), |
| 1649 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1650 | ); |
| 1651 | --contrast-secondary-label: color-mix( |
| 1652 | in oklab, |
| 1653 | color-mix(in oklab, var(--secondary-label) var(--appearance-contrast-base), var(--background)), |
| 1654 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1655 | ); |
| 1656 | --contrast-icon-muted: color-mix( |
| 1657 | in oklab, |
| 1658 | color-mix(in oklab, var(--icon-muted) var(--appearance-contrast-base), var(--background)), |
| 1659 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1660 | ); |
| 1661 | --contrast-card-foreground: color-mix( |
| 1662 | in oklab, |
| 1663 | color-mix(in oklab, var(--card-foreground) var(--appearance-contrast-base), var(--card)), |
| 1664 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1665 | ); |
| 1666 | --contrast-popover-foreground: color-mix( |
| 1667 | in oklab, |
| 1668 | color-mix(in oklab, var(--popover-foreground) var(--appearance-contrast-base), var(--popover)), |
| 1669 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1670 | ); |
| 1671 | --contrast-accent-foreground: color-mix( |
| 1672 | in oklab, |
| 1673 | color-mix(in oklab, var(--accent-foreground) var(--appearance-contrast-base), var(--accent)), |
| 1674 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1675 | ); |
| 1676 | --contrast-secondary-foreground: color-mix( |
| 1677 | in oklab, |
| 1678 | color-mix( |
| 1679 | in oklab, |
| 1680 | var(--secondary-foreground) var(--appearance-contrast-base), |
| 1681 | var(--secondary) |
| 1682 | ), |
| 1683 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1684 | ); |
| 1685 | --contrast-message-foreground: color-mix( |
| 1686 | in oklab, |
| 1687 | color-mix( |
| 1688 | in oklab, |
| 1689 | var(--message-foreground) var(--appearance-contrast-base), |
| 1690 | var(--message-surface) |
| 1691 | ), |
| 1692 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1693 | ); |
| 1694 | --contrast-sidebar-foreground: color-mix( |
| 1695 | in oklab, |
| 1696 | color-mix(in oklab, var(--sidebar-foreground) var(--appearance-contrast-base), var(--sidebar)), |
| 1697 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1698 | ); |
| 1699 | --contrast-sidebar-muted-foreground: color-mix( |
| 1700 | in oklab, |
| 1701 | color-mix( |
| 1702 | in oklab, |
| 1703 | var(--sidebar-muted-foreground) var(--appearance-contrast-base), |
| 1704 | var(--sidebar) |
| 1705 | ), |
| 1706 | var(--appearance-contrast-target) var(--appearance-contrast-boost) |
| 1707 | ); |
| 1708 | --contrast-sidebar-border: color-mix( |
| 1709 | in srgb, |
| 1710 | color-mix(in srgb, var(--sidebar-border) var(--appearance-contrast-base), transparent), |
| 1711 | var(--sidebar-foreground) var(--appearance-contrast-border-boost) |
| 1712 | ); |
| 1713 | } |
| 1714 | |
| 1715 | body { |
| 1716 | /* Reference the theme token (not a literal stack) so the Settings -> |
| 1717 | Appearance runtime override of --font-sans reaches all interface text. */ |
| 1718 | font-family: var(--font-sans); |
| 1719 | margin: 0; |
| 1720 | padding: 0; |
| 1721 | } |
| 1722 | |
| 1723 | [data-preview-url-input] { |
| 1724 | font-variant-ligatures: none; |
| 1725 | } |
| 1726 | |
| 1727 | /* Lighter default icon stroke. In the base layer so stroke-* utilities still win; any |
| 1728 | CSS beats lucide's stroke-width="2" attribute. */ |
| 1729 | @layer base { |
| 1730 | :where(svg.lucide[stroke-width="2"]) { |
| 1731 | stroke-width: 1.75; |
| 1732 | } |
| 1733 | } |
| 1734 | |
| 1735 | html, |
| 1736 | body { |
| 1737 | min-height: calc(100svh + env(safe-area-inset-top)); |
| 1738 | overscroll-behavior: none; |
| 1739 | } |
| 1740 | |
| 1741 | body { |
| 1742 | height: 100%; |
| 1743 | overflow: hidden; |
| 1744 | } |
| 1745 | |
| 1746 | #root { |
| 1747 | height: 100%; |
| 1748 | width: 100%; |
| 1749 | max-width: 100%; |
| 1750 | overflow-x: hidden; |
| 1751 | overflow-x: clip; |
| 1752 | overflow-y: hidden; |
| 1753 | overscroll-behavior-y: none; |
| 1754 | padding-top: max(env(safe-area-inset-top), 0px); |
| 1755 | padding-right: var(--desktop-window-right-resize-inset); |
| 1756 | } |
| 1757 | |
| 1758 | .electron-windows { |
| 1759 | --desktop-window-right-resize-inset: 6px; |
| 1760 | } |
| 1761 | |
| 1762 | /* App-chrome grain. Baked into each surface's own background (behind |
| 1763 | content) rather than a fixed overlay on top: a full-viewport overlay |
| 1764 | forces the compositor to re-blend every frame any animation produces, |
| 1765 | which multiplied idle GPU cost. The overlay's 0.035 opacity lives in the |
| 1766 | SVG rect instead. Surfaces that float over the body (e.g. the inset main |
| 1767 | card) must opt in via the surface-grain utility, or they lose the |
| 1768 | grain's subtle brightening and stand out against the body. */ |
| 1769 | :root { |
| 1770 | --surface-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"); |
| 1771 | --surface-grain-size: 256px 256px; |
| 1772 | } |
| 1773 | |
| 1774 | /* The live T3 Chat texture is a 128px grayscale tile with a constant 7/255 |
| 1775 | alpha. Keep our procedural texture cheap while matching that scale and |
| 1776 | strength for the branded preset. */ |
| 1777 | html[data-theme-id="t3-chat"] { |
| 1778 | --surface-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02745'/%3E%3C/svg%3E"); |
| 1779 | --surface-grain-size: 128px 128px; |
| 1780 | } |
| 1781 | |
| 1782 | body { |
| 1783 | background-image: var(--surface-grain); |
| 1784 | background-repeat: repeat; |
| 1785 | background-size: var(--surface-grain-size); |
| 1786 | } |
| 1787 | |
| 1788 | pre, |
| 1789 | code { |
| 1790 | font-family: var(--font-mono); |
| 1791 | } |
| 1792 | |
| 1793 | /* Code blocks in chat carry the size preference. Scoped to chat markdown |
| 1794 | rather than every pre: a global rule would beat text-size utilities and |
| 1795 | inherited sizes on unrelated pre surfaces (terminal previews, approvals). |
| 1796 | Inline code stays relative to its sentence so it never towers over prose; |
| 1797 | diffs and file previews take the size through --diffs-font-size. */ |
| 1798 | .chat-markdown .chat-markdown-shiki :is(.shiki, .diffs), |
| 1799 | .chat-markdown .chat-markdown-codeblock pre, |
| 1800 | :is(.chat-markdown, .composer-tiptap) pre code { |
| 1801 | font-size: var(--font-size-code, inherit); |
| 1802 | } |
| 1803 | |
| 1804 | /* @pierre/diffs surfaces (diffs, file previews, annotatable code, search |
| 1805 | lines) render inside shadow roots but consult these hooks with their own |
| 1806 | literal stacks as fallback. Custom properties inherit across the shadow |
| 1807 | boundary, so defining them once here routes every code surface through the |
| 1808 | appearance font tokens. */ |
| 1809 | :root { |
| 1810 | --diffs-font-family: var(--font-mono); |
| 1811 | --diffs-header-font-family: var(--font-sans); |
| 1812 | } |
| 1813 | |
| 1814 | /* Pele diagrams read their colors through these, so a theme change recolors |
| 1815 | them without re-rendering. */ |
| 1816 | .pele { |
| 1817 | --pele-bg: var(--background); |
| 1818 | --pele-fg: var(--foreground); |
| 1819 | --pele-muted: var(--muted-foreground); |
| 1820 | --pele-line: var(--muted-foreground); |
| 1821 | --pele-surface: var(--secondary); |
| 1822 | --pele-surface-alt: var(--accent); |
| 1823 | --pele-border: color-mix(in srgb, var(--foreground) 28%, transparent); |
| 1824 | --pele-accent: var(--primary); |
| 1825 | --pele-critical: var(--destructive); |
| 1826 | } |
| 1827 | |
| 1828 | /* Window drag region (frameless titlebar) */ |
| 1829 | .drag-region { |
| 1830 | -webkit-app-region: drag; |
| 1831 | } |
| 1832 | |
| 1833 | /* Electron 44 inherits app-region. Reset children to the initial value so they |
| 1834 | do not add drag rectangles over fixed controls. Explicit `none` is treated |
| 1835 | as `no-drag` and breaks titlebar dragging; `initial` emits no rectangle. |
| 1836 | The base layer lets explicit drag/no-drag utilities take precedence. */ |
| 1837 | @layer base { |
| 1838 | .drag-region > * { |
| 1839 | -webkit-app-region: initial; |
| 1840 | } |
| 1841 | } |
| 1842 | |
| 1843 | .drag-region button, |
| 1844 | .drag-region input, |
| 1845 | .drag-region textarea, |
| 1846 | .drag-region select, |
| 1847 | .drag-region a { |
| 1848 | -webkit-app-region: no-drag; |
| 1849 | } |
| 1850 | |
| 1851 | /* Keep parent scrollbar styles off iframe owners to avoid WebKit resize loops: https://webkit.org/b/324485 */ |
| 1852 | :where(:not(iframe))::-webkit-scrollbar { |
| 1853 | width: var(--app-scrollbar-width); |
| 1854 | } |
| 1855 | |
| 1856 | :where(:not(iframe))::-webkit-scrollbar-track { |
| 1857 | background: transparent; |
| 1858 | } |
| 1859 | |
| 1860 | :where(:not(iframe))::-webkit-scrollbar-thumb { |
| 1861 | background: var(--app-scrollbar-thumb); |
| 1862 | border-radius: 3px; |
| 1863 | } |
| 1864 | |
| 1865 | :where(:not(iframe))::-webkit-scrollbar-thumb:hover { |
| 1866 | background: var(--app-scrollbar-thumb-hover); |
| 1867 | } |
| 1868 | |
| 1869 | /* Chat markdown rendering */ |
| 1870 | |
| 1871 | .chat-markdown > :first-child { |
| 1872 | margin-top: 0; |
| 1873 | } |
| 1874 | |
| 1875 | .chat-markdown > :last-child { |
| 1876 | margin-bottom: 0; |
| 1877 | } |
| 1878 | |
| 1879 | .chat-markdown p, |
| 1880 | .chat-markdown ul, |
| 1881 | .chat-markdown ol, |
| 1882 | .chat-markdown blockquote, |
| 1883 | .chat-markdown pre, |
| 1884 | .chat-markdown .chat-markdown-table-container, |
| 1885 | .composer-tiptap ul, |
| 1886 | .composer-tiptap ol { |
| 1887 | margin: 0.65rem 0; |
| 1888 | } |
| 1889 | |
| 1890 | .chat-markdown-math-display .katex-display { |
| 1891 | margin: 0; |
| 1892 | } |
| 1893 | |
| 1894 | :is(.chat-markdown, .composer-tiptap) h1, |
| 1895 | :is(.chat-markdown, .composer-tiptap) h2, |
| 1896 | :is(.chat-markdown, .composer-tiptap) h3, |
| 1897 | :is(.chat-markdown, .composer-tiptap) h4, |
| 1898 | :is(.chat-markdown, .composer-tiptap) h5, |
| 1899 | :is(.chat-markdown, .composer-tiptap) h6 { |
| 1900 | margin: 1.25rem 0 0.5rem; |
| 1901 | font-weight: 600; |
| 1902 | line-height: 1.3; |
| 1903 | color: var(--contrast-foreground); |
| 1904 | } |
| 1905 | |
| 1906 | :is(.chat-markdown, .composer-tiptap) h1 { |
| 1907 | font-size: 1.25rem; |
| 1908 | } |
| 1909 | |
| 1910 | :is(.chat-markdown, .composer-tiptap) h2 { |
| 1911 | font-size: 1.125rem; |
| 1912 | } |
| 1913 | |
| 1914 | :is(.chat-markdown, .composer-tiptap) h3 { |
| 1915 | font-size: 1rem; |
| 1916 | } |
| 1917 | |
| 1918 | :is(.chat-markdown, .composer-tiptap) h4, |
| 1919 | :is(.chat-markdown, .composer-tiptap) h5, |
| 1920 | :is(.chat-markdown, .composer-tiptap) h6 { |
| 1921 | font-size: 0.875rem; |
| 1922 | } |
| 1923 | |
| 1924 | :is(.chat-markdown, .composer-tiptap) h6 { |
| 1925 | color: var(--contrast-muted-foreground); |
| 1926 | } |
| 1927 | |
| 1928 | :is(.chat-markdown, .composer-tiptap) ul { |
| 1929 | /* Reset for nested uls under a widened ol. --list-gutter is an inherited |
| 1930 | custom property, so without this a task-list under a multi-digit ordered |
| 1931 | list would inherit the outer gutter instead of its own default. */ |
| 1932 | --list-gutter: 1.25rem; |
| 1933 | padding-inline-start: 1.25rem; |
| 1934 | list-style-type: disc; |
| 1935 | } |
| 1936 | |
| 1937 | /* Outside markers paint past the padding box, so the gutter must fit `0. `, |
| 1938 | measured per font in appearanceFonts. ChatMarkdown widens it inline for |
| 1939 | multi-digit markers; setting it here stops a nested ol inheriting that. */ |
| 1940 | :is(.chat-markdown, .composer-tiptap) ol { |
| 1941 | --list-gutter: max(1.25rem, var(--list-marker-sans, 0px)); |
| 1942 | padding-inline-start: var(--list-gutter, 1.25rem); |
| 1943 | list-style-type: decimal; |
| 1944 | } |
| 1945 | |
| 1946 | :is(.chat-markdown, .composer-tiptap) ol > li::marker { |
| 1947 | font-variant-numeric: tabular-nums; |
| 1948 | } |
| 1949 | |
| 1950 | /* The composer shows the marker the source has, `3)` or a nested `7.`, not the |
| 1951 | browser counter. Browsers without ::marker content fall back to `start`. */ |
| 1952 | .composer-tiptap ol > li[data-marker]::marker { |
| 1953 | content: attr(data-marker) " "; |
| 1954 | } |
| 1955 | |
| 1956 | /* The prompt font and size can differ from the interface, so its gutter must |
| 1957 | also follow the prompt's font metrics. */ |
| 1958 | .composer-tiptap ol { |
| 1959 | --list-gutter: max(1.25rem, 3ch); |
| 1960 | } |
| 1961 | |
| 1962 | .composer-tiptap ol:has(> li[data-marker-width="3"]) { |
| 1963 | --list-gutter: max(1.25rem, 4ch); |
| 1964 | } |
| 1965 | |
| 1966 | .composer-tiptap ol:has(> li[data-marker-width="4"]) { |
| 1967 | --list-gutter: max(1.25rem, 5ch); |
| 1968 | } |
| 1969 | |
| 1970 | .composer-tiptap ol:has(> li[data-marker-width="5"]) { |
| 1971 | --list-gutter: max(1.25rem, 6ch); |
| 1972 | } |
| 1973 | |
| 1974 | .composer-tiptap ol:has(> li[data-marker-width="6"]) { |
| 1975 | --list-gutter: max(1.25rem, 7ch); |
| 1976 | } |
| 1977 | |
| 1978 | .composer-tiptap ol:has(> li[data-marker-width="7"]) { |
| 1979 | --list-gutter: max(1.25rem, 8ch); |
| 1980 | } |
| 1981 | |
| 1982 | .composer-tiptap ol:has(> li[data-marker-width="8"]) { |
| 1983 | --list-gutter: max(1.25rem, 9ch); |
| 1984 | } |
| 1985 | |
| 1986 | .composer-tiptap ol:has(> li[data-marker-width="9"]) { |
| 1987 | --list-gutter: max(1.25rem, 10ch); |
| 1988 | } |
| 1989 | |
| 1990 | .composer-tiptap ol:has(> li[data-marker-width="10"]) { |
| 1991 | --list-gutter: max(1.25rem, 11ch); |
| 1992 | } |
| 1993 | |
| 1994 | .composer-tiptap ul { |
| 1995 | padding-inline-start: max(1.25rem, 2ch); |
| 1996 | } |
| 1997 | |
| 1998 | :is(.chat-markdown, .composer-tiptap) ul ul { |
| 1999 | list-style-type: circle; |
| 2000 | } |
| 2001 | |
| 2002 | :is(.chat-markdown, .composer-tiptap) ul ul ul { |
| 2003 | list-style-type: square; |
| 2004 | } |
| 2005 | |
| 2006 | .chat-markdown ol ol { |
| 2007 | list-style-type: lower-alpha; |
| 2008 | } |
| 2009 | |
| 2010 | .chat-markdown ol ol ol { |
| 2011 | list-style-type: lower-roman; |
| 2012 | } |
| 2013 | |
| 2014 | .chat-markdown.user-message-markdown ol { |
| 2015 | list-style-type: decimal; |
| 2016 | } |
| 2017 | |
| 2018 | /* Spaces a user typed at the start of a line, which Markdown would otherwise drop. pre-wrap, not |
| 2019 | pre, so an indent wider than the bubble wraps instead of pushing the line's text out of view. |
| 2020 | Not selectable, so a selection, a drag or a copy carries the text as it did before. */ |
| 2021 | .chat-markdown.user-message-markdown [data-leading-whitespace] { |
| 2022 | white-space: pre-wrap; |
| 2023 | user-select: none; |
| 2024 | } |
| 2025 | |
| 2026 | .chat-markdown li + li { |
| 2027 | margin-top: 0.25rem; |
| 2028 | } |
| 2029 | |
| 2030 | /* GitHub-style task lists: the checkbox replaces the list marker. */ |
| 2031 | .chat-markdown li.task-list-item { |
| 2032 | list-style-type: none; |
| 2033 | } |
| 2034 | |
| 2035 | .chat-markdown li.task-list-item input[type="checkbox"] { |
| 2036 | margin-block: 0 0.15em; |
| 2037 | margin-inline: calc(-1 * var(--list-gutter, 1.25rem)) 0.35em; |
| 2038 | vertical-align: middle; |
| 2039 | } |
| 2040 | |
| 2041 | /* Markdown assumes inline images — GitHub comments lay button images out in a row — and the |
| 2042 | Tailwind preflight's block-level img would stack them one per line. */ |
| 2043 | .chat-markdown img { |
| 2044 | display: inline-block; |
| 2045 | } |
| 2046 | |
| 2047 | .chat-markdown a { |
| 2048 | text-decoration: none; |
| 2049 | } |
| 2050 | |
| 2051 | /* Triple-click selection stops at block-level boxes, flex items included, so file chips in |
| 2052 | prose stay inline-level down to the icon and label. */ |
| 2053 | .chat-markdown-file-link { |
| 2054 | display: inline-block; |
| 2055 | overflow-x: clip; |
| 2056 | text-overflow: ellipsis; |
| 2057 | white-space: nowrap; |
| 2058 | } |
| 2059 | |
| 2060 | .chat-markdown-file-link > :is(svg, img) { |
| 2061 | display: inline; |
| 2062 | margin-inline-end: 0.2em; |
| 2063 | vertical-align: -0.125em; |
| 2064 | } |
| 2065 | |
| 2066 | .chat-markdown-file-link > [data-slot="context-chip-label"] { |
| 2067 | display: inline; |
| 2068 | } |
| 2069 | |
| 2070 | /* File links and context chips own their color and focus ring. */ |
| 2071 | .chat-markdown a:not(.chat-markdown-file-link, :has([data-slot="context-chip-label"])) { |
| 2072 | color: var(--info-foreground); |
| 2073 | } |
| 2074 | |
| 2075 | .chat-markdown |
| 2076 | a:not( |
| 2077 | .chat-markdown-file-link, |
| 2078 | :has([data-slot="context-chip-label"]), |
| 2079 | [data-markdown-image-link] |
| 2080 | ):hover, |
| 2081 | .chat-markdown |
| 2082 | a:not( |
| 2083 | .chat-markdown-file-link, |
| 2084 | :has([data-slot="context-chip-label"]), |
| 2085 | [data-markdown-image-link] |
| 2086 | ):focus-visible { |
| 2087 | background-image: radial-gradient(circle, currentcolor 0.75px, transparent 1px); |
| 2088 | background-position: left bottom; |
| 2089 | background-repeat: repeat-x; |
| 2090 | background-size: 4px 2px; |
| 2091 | } |
| 2092 | |
| 2093 | :is(.chat-markdown, .composer-tiptap) blockquote { |
| 2094 | border-inline-start: 2px solid color-mix(in srgb, currentcolor 35%, transparent); |
| 2095 | padding-inline-start: 0.8rem; |
| 2096 | color: inherit; |
| 2097 | } |
| 2098 | |
| 2099 | .composer-tiptap blockquote { |
| 2100 | margin: 0.65rem 0; |
| 2101 | } |
| 2102 | |
| 2103 | /* Surface borders can blend into dark message bubbles; rules need a readable color. */ |
| 2104 | :is(.chat-markdown, .composer-tiptap) hr { |
| 2105 | @variant dark { |
| 2106 | border-color: var(--contrast-muted-foreground); |
| 2107 | } |
| 2108 | } |
| 2109 | |
| 2110 | .composer-tiptap hr { |
| 2111 | margin: 0.65rem 0; |
| 2112 | } |
| 2113 | |
| 2114 | /* Block spacing separates blocks, not the draft from the composer edge. A |
| 2115 | leading list or quote would otherwise push the first line down, and the |
| 2116 | one-line resting composer clips it. */ |
| 2117 | .composer-tiptap > :first-child { |
| 2118 | margin-top: 0; |
| 2119 | } |
| 2120 | |
| 2121 | .composer-tiptap > :last-child { |
| 2122 | margin-bottom: 0; |
| 2123 | } |
| 2124 | |
| 2125 | /* A heading at the top of a draft should not push the first line down. */ |
| 2126 | .composer-tiptap :is(h1, h2, h3, h4, h5, h6):first-child { |
| 2127 | margin-top: 0; |
| 2128 | } |
| 2129 | |
| 2130 | .chat-markdown section[data-footnotes] { |
| 2131 | margin-top: 1.25rem; |
| 2132 | border-top: 1px solid var(--contrast-border); |
| 2133 | padding-top: 0.75rem; |
| 2134 | color: var(--contrast-muted-foreground); |
| 2135 | font-size: 0.75rem; |
| 2136 | } |
| 2137 | |
| 2138 | .chat-markdown section[data-footnotes] ol { |
| 2139 | margin: 0; |
| 2140 | } |
| 2141 | |
| 2142 | .chat-markdown section[data-footnotes] li + li { |
| 2143 | margin-top: 0.35rem; |
| 2144 | } |
| 2145 | |
| 2146 | .chat-markdown a[data-footnote-ref], |
| 2147 | .chat-markdown a[data-footnote-backref] { |
| 2148 | display: inline-flex; |
| 2149 | min-width: 1rem; |
| 2150 | align-items: center; |
| 2151 | justify-content: center; |
| 2152 | border-radius: 0.25rem; |
| 2153 | text-decoration: none; |
| 2154 | font-size: 0.6875rem; |
| 2155 | font-weight: 600; |
| 2156 | } |
| 2157 | |
| 2158 | .chat-markdown :not(pre) > code { |
| 2159 | border: 1px solid transparent; |
| 2160 | border-radius: 0.25rem; |
| 2161 | box-decoration-break: clone; |
| 2162 | -webkit-box-decoration-break: clone; |
| 2163 | background: color-mix(in srgb, var(--contrast-foreground) 10%, transparent); |
| 2164 | padding: 0.1em 0.35em; |
| 2165 | color: var(--contrast-foreground); |
| 2166 | font-size: 0.85em; |
| 2167 | } |
| 2168 | |
| 2169 | .chat-markdown.user-message-markdown :not(pre) > code { |
| 2170 | background: color-mix(in srgb, var(--contrast-message-foreground) 10%, transparent); |
| 2171 | color: var(--contrast-message-foreground); |
| 2172 | } |
| 2173 | |
| 2174 | .chat-markdown strong { |
| 2175 | font-weight: 700; |
| 2176 | } |
| 2177 | |
| 2178 | .chat-markdown pre { |
| 2179 | max-width: 100%; |
| 2180 | overflow-x: auto; |
| 2181 | border: 1px solid var(--contrast-border); |
| 2182 | border-radius: 0.5rem; |
| 2183 | background: var(--muted); |
| 2184 | padding: 0.8rem 0.9rem; |
| 2185 | scrollbar-width: thin; |
| 2186 | scrollbar-color: color-mix(in srgb, var(--contrast-border) 78%, transparent) transparent; |
| 2187 | } |
| 2188 | |
| 2189 | .chat-markdown pre code { |
| 2190 | border: none; |
| 2191 | background: transparent; |
| 2192 | padding: 0; |
| 2193 | } |
| 2194 | |
| 2195 | .chat-markdown pre::-webkit-scrollbar { |
| 2196 | height: var(--app-scrollbar-width); |
| 2197 | } |
| 2198 | |
| 2199 | .chat-markdown pre::-webkit-scrollbar-thumb { |
| 2200 | border-radius: 999px; |
| 2201 | background: color-mix(in srgb, var(--contrast-border) 78%, transparent); |
| 2202 | } |
| 2203 | |
| 2204 | :is(.chat-markdown, .composer-tiptap) .chat-markdown-codeblock-header { |
| 2205 | color: color-mix(in srgb, var(--contrast-foreground) 72%, transparent); |
| 2206 | } |
| 2207 | |
| 2208 | :is(.chat-markdown, .composer-tiptap) .chat-markdown-codeblock pre { |
| 2209 | margin: 0; |
| 2210 | border: none; |
| 2211 | border-radius: 0; |
| 2212 | background: transparent; |
| 2213 | } |
| 2214 | |
| 2215 | :is(.chat-markdown, .composer-tiptap) .chat-markdown-codeblock[data-wrap="true"] pre { |
| 2216 | white-space: pre-wrap; |
| 2217 | overflow-wrap: anywhere; |
| 2218 | } |
| 2219 | |
| 2220 | :is(.chat-markdown, .composer-tiptap) .chat-markdown-shiki :is(.shiki, .diffs) { |
| 2221 | background: transparent !important; |
| 2222 | } |
| 2223 | |
| 2224 | /* Plain-text fences override the highlighter's inline foreground colors. */ |
| 2225 | :is(.chat-markdown, .composer-tiptap) |
| 2226 | .chat-markdown-codeblock:is( |
| 2227 | [data-language="text" i], |
| 2228 | [data-language="txt" i], |
| 2229 | [data-language="plain" i], |
| 2230 | [data-language="plaintext" i] |
| 2231 | ) { |
| 2232 | &, |
| 2233 | & :is(pre, pre *) { |
| 2234 | color: inherit !important; |
| 2235 | } |
| 2236 | } |
| 2237 | |
| 2238 | /* Sent messages color prose with the message foreground, which is not chosen |
| 2239 | for the code surface, so their plain-text fences keep the global foreground. */ |
| 2240 | .chat-markdown.user-message-markdown |
| 2241 | .chat-markdown-codeblock:is( |
| 2242 | [data-language="text" i], |
| 2243 | [data-language="txt" i], |
| 2244 | [data-language="plain" i], |
| 2245 | [data-language="plaintext" i] |
| 2246 | ) { |
| 2247 | color: var(--contrast-foreground) !important; |
| 2248 | } |
| 2249 | |
| 2250 | /* Paragraphs and code blocks arrive in chunks while a response streams. Fade |
| 2251 | each new block in so the chunk does not pop. @starting-style only applies |
| 2252 | when an element is first inserted, and the rule is gated on data-streaming, |
| 2253 | so opening a finished thread never replays the fade. Opacity only, one |
| 2254 | shot, no layout change. */ |
| 2255 | @media (prefers-reduced-motion: no-preference) { |
| 2256 | .chat-markdown[data-streaming] > *, |
| 2257 | .chat-markdown[data-streaming] .chat-markdown-shiki, |
| 2258 | .chat-markdown[data-streaming] .chat-markdown-mermaid { |
| 2259 | transition: opacity 600ms ease-out; |
| 2260 | |
| 2261 | @starting-style { |
| 2262 | opacity: 0; |
| 2263 | } |
| 2264 | } |
| 2265 | } |
| 2266 | |
| 2267 | /* Diagnostics-style tables: row separators only, and a scroll-fade container |
| 2268 | for horizontal overflow. Cells wrap and the table fits its lane. The root |
| 2269 | chat-markdown wrapping rules (overflow-wrap: anywhere) would let columns |
| 2270 | shrink to single characters, so restore word-boundary wrapping: the min |
| 2271 | column width is the longest word, and only wider content scrolls. */ |
| 2272 | .chat-markdown table { |
| 2273 | width: 100%; |
| 2274 | border-collapse: collapse; |
| 2275 | overflow-wrap: normal; |
| 2276 | word-break: normal; |
| 2277 | /* One step under 15px prose. */ |
| 2278 | font-size: 0.875rem; |
| 2279 | } |
| 2280 | |
| 2281 | /* Top-aligned so wrapped rows share a first line, and the outer columns sit |
| 2282 | flush with the surrounding prose. */ |
| 2283 | .chat-markdown th, |
| 2284 | .chat-markdown td { |
| 2285 | padding: 0.45rem 0.75rem; |
| 2286 | text-wrap: pretty; |
| 2287 | text-align: start; |
| 2288 | vertical-align: top; |
| 2289 | } |
| 2290 | |
| 2291 | .chat-markdown :is(th, td):first-child { |
| 2292 | padding-inline-start: 0; |
| 2293 | } |
| 2294 | |
| 2295 | .chat-markdown :is(th, td):last-child { |
| 2296 | padding-inline-end: 0; |
| 2297 | } |
| 2298 | |
| 2299 | .chat-markdown thead th { |
| 2300 | border-bottom: 1px solid color-mix(in srgb, var(--contrast-border) 60%, transparent); |
| 2301 | padding-block: 0.55rem; |
| 2302 | font-weight: 600; |
| 2303 | } |
| 2304 | |
| 2305 | .chat-markdown tbody td { |
| 2306 | border-bottom: 1px solid color-mix(in srgb, var(--contrast-border) 60%, transparent); |
| 2307 | } |
| 2308 | |
| 2309 | /* Caps a long path, URL, or chip at 24rem; text past the cap wraps. */ |
| 2310 | .chat-markdown :is(th, td) { |
| 2311 | max-width: 24rem; |
| 2312 | overflow-wrap: break-word; |
| 2313 | } |
| 2314 | |
| 2315 | /* Formula cells keep their natural width and scroll with the table. */ |
| 2316 | .chat-markdown :is(th, td):has([data-markdown-math]) { |
| 2317 | max-width: none; |
| 2318 | } |
| 2319 | |
| 2320 | /* Keep overflow discoverable when the edge fade falls between columns. */ |
| 2321 | .chat-markdown |
| 2322 | .chat-markdown-table-container |
| 2323 | [data-slot="scroll-area-scrollbar"][data-orientation="horizontal"] { |
| 2324 | opacity: 1; |
| 2325 | --app-scrollbar-thumb: color-mix(in srgb, var(--muted-foreground) 60%, transparent); |
| 2326 | --app-scrollbar-thumb-hover: color-mix(in srgb, var(--muted-foreground) 80%, transparent); |
| 2327 | } |
| 2328 | |
| 2329 | :root { |
| 2330 | --diff-addition: var(--success); |
| 2331 | --diff-deletion: var(--destructive); |
| 2332 | --diff-addition-foreground: light-dark(var(--color-emerald-700), var(--color-emerald-400)); |
| 2333 | --diff-deletion-foreground: light-dark(var(--color-red-700), var(--color-red-400)); |
| 2334 | } |
| 2335 | |
| 2336 | /* Chat width setting. Comfortable keeps the default --chat-content-max-width, |
| 2337 | which sizes the timeline lane, the composer, and ChatCanvas's width probe. */ |
| 2338 | :root[data-chat-width="wide"] { |
| 2339 | --chat-content-max-width: 72rem; |
| 2340 | } |
| 2341 | |
| 2342 | :root[data-chat-width="full"] { |
| 2343 | --chat-content-max-width: 100%; |
| 2344 | } |
| 2345 | |
| 2346 | :root[data-diff-color-scheme="blue-orange"] { |
| 2347 | --diff-addition: light-dark(var(--color-blue-600), var(--color-blue-400)); |
| 2348 | --diff-deletion: light-dark(var(--color-orange-600), var(--color-orange-400)); |
| 2349 | --diff-addition-foreground: var(--diff-addition); |
| 2350 | --diff-deletion-foreground: var(--diff-deletion); |
| 2351 | --diffs-addition-color-override: var(--diff-addition); |
| 2352 | --diffs-deletion-color-override: var(--diff-deletion); |
| 2353 | --trees-status-added-override: var(--diff-addition); |
| 2354 | --trees-status-deleted-override: var(--diff-deletion); |
| 2355 | --trees-status-untracked-override: var(--diff-addition); |
| 2356 | --trees-git-added-color-override: var(--diff-addition); |
| 2357 | --trees-git-deleted-color-override: var(--diff-deletion); |
| 2358 | --trees-git-untracked-color-override: var(--diff-addition); |
| 2359 | } |
| 2360 | |
| 2361 | .diff-render-surface diffs-container { |
| 2362 | border: 0; |
| 2363 | border-radius: 0; |
| 2364 | overflow: clip; |
| 2365 | background: var(--code-background); |
| 2366 | color: var(--code-foreground); |
| 2367 | } |
| 2368 | |
| 2369 | /* Pierre's find panel is a sibling of the diff containers, so it misses their theme tokens. |
| 2370 | The top inset clears the 32px sticky file header and its line counts. */ |
| 2371 | .diff-render-surface > [data-search-panel] { |
| 2372 | --diffs-search-panel-bg: var(--popover); |
| 2373 | --diffs-search-panel-fg: var(--popover-foreground); |
| 2374 | --diffs-search-panel-modified: var(--primary); |
| 2375 | --diffs-header-font-fallback: var(--font-sans); |
| 2376 | --diffs-search-panel-inset-top: 40px; |
| 2377 | } |
| 2378 | |
| 2379 | /* Pierre's file renderer owns its own surface tokens. Keep the root of a file |
| 2380 | preview on the same themeable code surface as the diff panel. */ |
| 2381 | .diff-render-surface diffs-container, |
| 2382 | .file-preview-virtualizer diffs-container { |
| 2383 | --diffs-bg: var(--code-background) !important; |
| 2384 | --diffs-light-bg: var(--code-background) !important; |
| 2385 | --diffs-dark-bg: var(--code-background) !important; |
| 2386 | background-color: var(--code-background) !important; |
| 2387 | color: var(--code-foreground) !important; |
| 2388 | } |
| 2389 | |
| 2390 | .ultrathink-frame { |
| 2391 | --ultrathink-spectrum: linear-gradient( |
| 2392 | 120deg, |
| 2393 | #ff6b6b 0%, |
| 2394 | #f59e0b 18%, |
| 2395 | #22c55e 36%, |
| 2396 | #14b8a6 54%, |
| 2397 | #3b82f6 72%, |
| 2398 | #ec4899 90%, |
| 2399 | #ff6b6b 100% |
| 2400 | ); |
| 2401 | position: relative; |
| 2402 | } |
| 2403 | |
| 2404 | .ultrathink-frame::before { |
| 2405 | content: ""; |
| 2406 | position: absolute; |
| 2407 | inset: 0; |
| 2408 | border-radius: inherit; |
| 2409 | padding: 2px; |
| 2410 | background-image: var(--ultrathink-spectrum); |
| 2411 | background-size: 220% 220%; |
| 2412 | background-position: 0% 50%; |
| 2413 | pointer-events: none; |
| 2414 | filter: saturate(0.82) brightness(0.92); |
| 2415 | -webkit-mask: |
| 2416 | linear-gradient(#000 0 0) content-box, |
| 2417 | linear-gradient(#000 0 0); |
| 2418 | -webkit-mask-composite: xor; |
| 2419 | mask: |
| 2420 | linear-gradient(#000 0 0) content-box, |
| 2421 | linear-gradient(#000 0 0); |
| 2422 | mask-composite: exclude; |
| 2423 | } |
| 2424 | |
| 2425 | .ultrathink-frame > * { |
| 2426 | position: relative; |
| 2427 | } |
| 2428 | |
| 2429 | .ultrathink-chroma { |
| 2430 | filter: saturate(1.2); |
| 2431 | } |
| 2432 | |
| 2433 | @keyframes preview-loading-progress { |
| 2434 | from { |
| 2435 | transform: scaleX(0.04); |
| 2436 | } |
| 2437 | |
| 2438 | to { |
| 2439 | transform: scaleX(0.9); |
| 2440 | } |
| 2441 | } |
| 2442 | |
| 2443 | .preview-loading-progress { |
| 2444 | opacity: 0; |
| 2445 | transform: scaleX(1); |
| 2446 | transition: |
| 2447 | transform 150ms ease-out, |
| 2448 | opacity 150ms ease-out 220ms; |
| 2449 | } |
| 2450 | |
| 2451 | .preview-loading-progress[data-loading="true"] { |
| 2452 | opacity: 1; |
| 2453 | animation: preview-loading-progress 5.3s cubic-bezier(0.1, 0.5, 0.2, 1) forwards; |
| 2454 | } |
| 2455 | |
| 2456 | @media (prefers-reduced-motion: reduce) { |
| 2457 | .preview-loading-progress, |
| 2458 | .preview-loading-progress[data-loading="true"] { |
| 2459 | transition: none; |
| 2460 | animation: none; |
| 2461 | } |
| 2462 | |
| 2463 | .preview-loading-progress[data-loading="true"] { |
| 2464 | transform: scaleX(0.9); |
| 2465 | } |
| 2466 | } |
| 2467 | |
| 2468 | /* Let the sortable rows open label clearance before painting the dividers. |
| 2469 | This runs once per pickup; rows retain dnd-kit's normal 200ms transitions. */ |
| 2470 | .sidebar-drag-boundary-label { |
| 2471 | animation: sidebar-drag-label-reveal 200ms step-end; |
| 2472 | } |
| 2473 | |
| 2474 | @keyframes sidebar-drag-label-reveal { |
| 2475 | from { |
| 2476 | visibility: hidden; |
| 2477 | } |
| 2478 | to { |
| 2479 | visibility: visible; |
| 2480 | } |
| 2481 | } |
| 2482 | |
| 2483 | /* Rich text composer (Tiptap). The stored prompt stays markdown; only the |
| 2484 | surface renders styled text. Markers (** * ` ~~) appear as non-editable |
| 2485 | widgets while the caret is on styled text. */ |
| 2486 | .composer-tiptap { |
| 2487 | position: relative; |
| 2488 | } |
| 2489 | |
| 2490 | /* Tiptap's injected base CSS disables ligatures; match sent messages. */ |
| 2491 | .composer-tiptap.ProseMirror { |
| 2492 | font-variant-ligatures: normal; |
| 2493 | font-feature-settings: normal; |
| 2494 | } |
| 2495 | |
| 2496 | .composer-tiptap p { |
| 2497 | margin: 0; |
| 2498 | } |
| 2499 | |
| 2500 | .composer-tiptap:focus, |
| 2501 | .composer-tiptap .ProseMirror:focus { |
| 2502 | outline: none; |
| 2503 | } |
| 2504 | |
| 2505 | .composer-tiptap :not(pre) > code { |
| 2506 | font-family: var(--font-mono); |
| 2507 | font-size: 0.92em; |
| 2508 | background: color-mix(in oklab, var(--muted-foreground) 12%, transparent); |
| 2509 | border-radius: 0.3em; |
| 2510 | padding: 0.05em 0.25em; |
| 2511 | } |
| 2512 | |
| 2513 | /* Markdown delimiters shown, as editable text, around styled text with the caret in it. */ |
| 2514 | .composer-rich-marker { |
| 2515 | color: var(--muted-foreground); |
| 2516 | opacity: 0.75; |
| 2517 | font-weight: 400; |
| 2518 | font-style: normal; |
| 2519 | text-decoration: none; |
| 2520 | } |
| 2521 | |
| 2522 | /* Delimiters of source restored by undo or redo, once the caret leaves it. */ |
| 2523 | .composer-rich-marker-hidden { |
| 2524 | display: none; |
| 2525 | } |
| 2526 | |
| 2527 | /* Selected chips (node selection from arrowing into or clicking a chip). */ |
| 2528 | .composer-tiptap .ProseMirror-selectednode { |
| 2529 | outline: 2px solid var(--ring); |
| 2530 | outline-offset: -2px; |
| 2531 | border-radius: 6px; |
| 2532 | } |
| 2533 | |
| 2534 | .composer-tiptap .composer-chip-range-selected { |
| 2535 | position: relative; |
| 2536 | } |
| 2537 | |
| 2538 | .composer-tiptap.ProseMirror-focused .composer-chip-range-selected::after { |
| 2539 | content: ""; |
| 2540 | position: absolute; |
| 2541 | inset: 0; |
| 2542 | border-radius: 6px; |
| 2543 | background: Highlight; |
| 2544 | opacity: 0.3; |
| 2545 | pointer-events: none; |
| 2546 | } |
| 2547 | |
| 2548 | /* Rich-text task lists render as real checkboxes. Tiptap's TaskItem NodeView |
| 2549 | builds the <li> imperatively with only a data-checked attribute (no |
| 2550 | data-type), so items are targeted that way. Indentation comes from list |
| 2551 | nesting (two spaces per level from Tab), matching the stored Markdown. */ |
| 2552 | .composer-tiptap ul[data-type="taskList"] { |
| 2553 | list-style: none; |
| 2554 | margin: 0; |
| 2555 | padding: 0; |
| 2556 | } |
| 2557 | |
| 2558 | .composer-tiptap ul[data-type="taskList"] ul[data-type="taskList"] { |
| 2559 | padding-inline-start: 1.375rem; |
| 2560 | } |
| 2561 | |
| 2562 | .composer-tiptap li[data-checked] { |
| 2563 | display: flex; |
| 2564 | align-items: flex-start; |
| 2565 | gap: 0.5rem; |
| 2566 | margin: 0; |
| 2567 | padding: 0; |
| 2568 | } |
| 2569 | |
| 2570 | .composer-tiptap li[data-checked] > label { |
| 2571 | display: flex; |
| 2572 | align-items: center; |
| 2573 | flex: none; |
| 2574 | height: 1lh; |
| 2575 | cursor: pointer; |
| 2576 | } |
| 2577 | |
| 2578 | .composer-tiptap li[data-checked] > label input[type="checkbox"] { |
| 2579 | display: block; |
| 2580 | margin: 0; |
| 2581 | width: 0.95rem; |
| 2582 | height: 0.95rem; |
| 2583 | cursor: pointer; |
| 2584 | } |
| 2585 | |
| 2586 | .composer-tiptap li[data-checked] > div { |
| 2587 | flex: 1 1 auto; |
| 2588 | min-width: 0; |
| 2589 | } |
| 2590 | |
| 2591 | .composer-tiptap li[data-checked] > div > p { |
| 2592 | margin: 0; |
| 2593 | } |
| 2594 | |
| 2595 | @layer components { |
| 2596 | .chat-composer-lane { |
| 2597 | padding-inline-start: calc( |
| 2598 | env(safe-area-inset-left) + 0.75rem + var(--chat-lane-inset-start, 0px) |
| 2599 | ); |
| 2600 | padding-inline-end: calc( |
| 2601 | env(safe-area-inset-right) + 0.75rem + var(--chat-lane-inset-end, 0px) |
| 2602 | ); |
| 2603 | } |
| 2604 | [data-chat-canvas] .messages-timeline-scroll { |
| 2605 | padding-inline-start: calc( |
| 2606 | 0.75rem + var(--chat-lane-inset-start, 0px) - var(--chat-timeline-gutter, 0px) |
| 2607 | ); |
| 2608 | padding-inline-end: calc( |
| 2609 | 0.75rem + var(--chat-lane-inset-end, 0px) - var(--chat-timeline-gutter, 0px) |
| 2610 | ); |
| 2611 | } |
| 2612 | .chat-scroll-to-bottom, |
| 2613 | .chat-banner-lane { |
| 2614 | inset-inline-start: var(--chat-lane-inset-start, 0px); |
| 2615 | inset-inline-end: var(--chat-lane-inset-end, 0px); |
| 2616 | } |
| 2617 | @media (min-width: 640px) { |
| 2618 | .chat-composer-lane { |
| 2619 | padding-inline-start: calc( |
| 2620 | env(safe-area-inset-left) + 3rem + var(--chat-lane-inset-start, 0px) |
| 2621 | ); |
| 2622 | padding-inline-end: calc(env(safe-area-inset-right) + 3rem + var(--chat-lane-inset-end, 0px)); |
| 2623 | } |
| 2624 | [data-chat-canvas] .messages-timeline-scroll { |
| 2625 | padding-inline-start: calc( |
| 2626 | 3rem + var(--chat-lane-inset-start, 0px) - var(--chat-timeline-gutter, 0px) |
| 2627 | ); |
| 2628 | padding-inline-end: calc( |
| 2629 | 3rem + var(--chat-lane-inset-end, 0px) - var(--chat-timeline-gutter, 0px) |
| 2630 | ); |
| 2631 | } |
| 2632 | } |
| 2633 | } |
| 2634 | |
| 2635 | /* A workspace area with no control of its own takes F6 focus itself; keep that visible. |
| 2636 | workspaceFocus.ts marks those, since :focus-visible also matches a clicked area after a key press. |
| 2637 | The conversation's timeline takes it instead, and its top fade mask would hide its own ring. */ |
| 2638 | [data-workspace-area]:focus-visible { |
| 2639 | outline: none; |
| 2640 | } |
| 2641 | [data-workspace-keyboard-focus]:focus, |
| 2642 | [data-workspace-area="conversation"]:has( |
| 2643 | .messages-timeline-scroll[data-workspace-keyboard-focus]:focus |
| 2644 | ) { |
| 2645 | outline: 2px solid var(--ring); |
| 2646 | outline-offset: -2px; |
| 2647 | } |
| 2648 | |
| 2649 | .messages-timeline-scroll:focus-visible { |
| 2650 | outline: none; |
| 2651 | } |