Repository navigation
Expand file tree
/
Copy pathindex.css
More file actions
2702 lines (2433 loc) · 89.7 KB
/
Copy pathindex.css
File metadata and controls
2702 lines (2433 loc) · 89.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@layer theme, base, components, utilities;
@import "tailwindcss";
@custom-variant dark (&:is(.dark, .dark *));
@custom-variant light (&:not(.dark, .dark *));
/* Window Controls Overlay: active when Electron exposes native titlebar control geometry. */
@custom-variant wco (&:is(.wco, .wco *));
/* Secondary hovering pointers reveal sidebar actions on touch-primary devices. */
@custom-variant any-hover {
@media (any-hover: hover) {
&:hover {
@slot;
}
}
}
/* On mobile, morph the expanded hero composer into the compact docked
composer while it moves; the rest of the app remains visually stationary. */
html[data-mobile-composer-route-transition="true"]::view-transition-old(root),
html[data-mobile-composer-route-transition="true"]::view-transition-new(root) {
animation: none;
}
html[data-mobile-composer-route-transition="true"]::view-transition-group(oni-mobile-composer) {
animation-duration: var(--mobile-composer-transition-duration);
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-mobile-composer-route-transition="true"]::view-transition-image-pair(oni-mobile-composer) {
isolation: isolate;
}
html[data-mobile-composer-route-transition="true"]::view-transition-old(oni-mobile-composer) {
animation: oni-mobile-composer-old var(--mobile-composer-transition-duration) linear both;
mix-blend-mode: normal;
}
html[data-mobile-composer-route-transition="true"]::view-transition-new(oni-mobile-composer) {
animation: oni-mobile-composer-new var(--mobile-composer-transition-duration) linear both;
mix-blend-mode: normal;
}
/* The expanded and compact composers have different internal layouts. Use a
brief crossfade while their shared wrapper moves so the layout change does
not read as a single-frame cut. */
@keyframes oni-mobile-composer-old {
0%,
35% {
opacity: 1;
}
65%,
100% {
opacity: 0;
}
}
@keyframes oni-mobile-composer-new {
0%,
35% {
opacity: 0;
}
65%,
100% {
opacity: 1;
}
}
html[data-mobile-composer-route-transition="true"]::view-transition-group(oni-mobile-draft-headline) {
animation-duration: var(--mobile-composer-transition-duration);
}
html[data-mobile-composer-route-transition="true"]::view-transition-old(oni-mobile-draft-headline) {
animation: oni-mobile-draft-headline-exit var(--mobile-composer-transition-duration)
cubic-bezier(0.4, 0, 1, 1) both;
mix-blend-mode: normal;
}
@keyframes oni-mobile-draft-headline-exit {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0;
transform: translateY(-6px);
}
}
:root {
--app-scrollbar-width: 6px;
/* The strip a scroll fade leaves unmasked so the scrollbar stays solid. */
--app-scrollbar-lane: var(--app-scrollbar-width);
--appearance-contrast-base: 100%;
--appearance-contrast-boost: 0%;
--appearance-contrast-border-boost: 0%;
--appearance-contrast-target: black;
--app-scrollbar-thumb: rgb(217 217 217);
--app-scrollbar-thumb-hover: rgb(191 191 191);
/*
* Compact UI geometry. Keep these values semantic so sidebar, palette,
* tooltip, and toolbar controls cannot quietly drift apart.
*/
--control-radius: 0.375rem;
--sidebar-content-inset: 0.5rem;
--sidebar-control-gap: 0.5rem;
--sidebar-icon-color: color-mix(
in srgb,
var(--contrast-sidebar-muted-foreground) 85%,
var(--sidebar)
);
--sidebar-row-content-inset: 0.625rem;
--command-shell-inset: 0.5rem;
--command-content-inset: 1rem;
--floating-content-inset: 0.75rem;
/* App layer order: the bottom terminal drawer (45, above the timeline minimap),
docked sheets, then the floating preview player (47–49, see
previewMiniPlayerLayout.ts), then dialogs and popovers (50 and up). */
--z-sheet: 46;
--glass-blur: 12px;
--glass-opacity: 80%;
--glass-saturation: 1.14;
--desktop-window-right-resize-inset: 0px;
--workspace-topbar-height: 52px;
--workspace-controls-top: 0px;
--workspace-controls-left: calc(env(safe-area-inset-left) + 0.75rem);
--workspace-controls-right: calc(env(safe-area-inset-right) + 0.75rem);
--workspace-native-controls-inset: 0px;
--workspace-titlebar-control-size: 1.75rem;
--workspace-titlebar-control-gap: 0.75rem;
--workspace-titlebar-scroll-fade-height: 1.5rem;
--chat-content-max-width: 46rem;
--html-preview-max-width: var(--chat-content-max-width);
/* In pixels, as the details card is laid out: a rem width drifts from it with the interface font size. */
--thread-details-panel-width: 280px;
/* The prompt on phones: iOS zooms into any input under 16px on focus. */
--font-size-prompt-touch: max(var(--font-size-prompt, 1rem), 16px);
/* Horizontal gutter shared by the page header and the chat column, clear of
the device's safe area. */
--workspace-gutter: 0.75rem;
--workspace-gutter-start: calc(env(safe-area-inset-left) + var(--workspace-gutter));
--workspace-gutter-end: calc(env(safe-area-inset-right) + var(--workspace-gutter));
@variant sm {
--workspace-gutter: 1.25rem;
}
@variant dark {
--appearance-contrast-target: white;
/* Keeps the idle thumb above 3:1 (WCAG 1.4.11) on the sidebar and the canvas; 35% falls just under. */
--app-scrollbar-thumb: rgb(255 255 255 / 36%);
--app-scrollbar-thumb-hover: rgb(255 255 255 / 45%);
--glass-blur: 16px;
--glass-saturation: 1.08;
}
}
.wco {
--native-titlebar-height: env(titlebar-area-height, 0px);
--workspace-topbar-height: max(40px, env(titlebar-area-height, 52px));
--workspace-controls-top: env(titlebar-area-y, 0px);
--workspace-controls-left: calc(env(titlebar-area-x, 0px) + 0.75rem);
--workspace-controls-right: calc(
100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) + 0.75rem
);
--workspace-native-controls-inset: calc(
100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) + 0.75rem
);
}
/* The font tokens are declared outside the inline theme so utilities reference
the variables and Settings -> Appearance can override them at runtime. The
default stacks are mirrored in `appearanceFonts.ts`. */
@theme {
--font-sans:
"Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
--font-mono:
ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
/* Interface text sits a little above regular, and semibold a little under 600. */
--font-weight-normal: 450;
--font-weight-semibold: 560;
/* Every bare border and divide is a hairline: one device pixel on a 2x display. */
--default-border-width: 0.5px;
/* The size of controls, menu rows and settings rows, between xs (12px) and sm (14px). */
--text-ui: 0.8125rem;
--text-ui--line-height: 1.25;
--text-ui--letter-spacing: -0.01em;
--ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
}
@theme inline {
/* Two steps below Tailwind's text-xs (12px) for dense UI: metadata rows,
badges, counters, keyboard hints and diagnostics tables. 2xs is 11px,
3xs is 10px. Provider icon overlays use 4xs (8px) and 5xs (7px) to fit
their smaller badges. Registered with tailwind-merge in
lib/utils.ts so cn() treats them as font sizes, not colours. */
--text-2xs: 0.6875rem;
--text-2xs--line-height: calc(1 / 0.6875);
--text-3xs: 0.625rem;
--text-3xs--line-height: calc(0.875 / 0.625);
--text-4xs: 0.5rem;
--text-4xs--line-height: 1;
--text-5xs: 0.4375rem;
--text-5xs--line-height: 1;
/* Motion. drawer is the decelerating curve for surfaces that slide or pop in
(composer context, pills). */
--inset-shadow-control-highlight: 0 1px rgb(255 255 255 / 16%);
--inset-shadow-control-pressed: 0 1px rgb(0 0 0 / 8%);
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
/* The composer's elevation: a soft drop pulled in under the surface, shared
by the composer, its context strip and attached banners. */
--shadow-composer: 0 1px 2px rgb(0 0 0 / 5%);
--shadow-composer-dark: 0 14px 32px -18px rgb(0 0 0 / 75%);
/* Menus, popovers and pickers: three short layers, so a popup sits on the page rather than floats. */
--shadow-popup: 0 6px 18px rgb(0 0 0 / 3%), 0 3px 9px rgb(0 0 0 / 4%), 0 1px 1px rgb(0 0 0 / 5%);
--shadow-popup-dark:
0 3px 8px rgb(0 0 0 / 13%), 0 2px 5px rgb(0 0 0 / 13%), 0 1px 1px rgb(0 0 0 / 13%);
/* plate: the lift under a raised control or a switch thumb. card: the ring that outlines a
card, drawn outside its box. raised: both, for a plate that sits on a tinted surface.
All change with the colour scheme, so they are variables. */
--shadow-plate: var(--plate-shadow);
--shadow-card: var(--card-shadow);
--shadow-raised: var(--raised-shadow);
/* Overlap the lower toolbar backdrop by one pixel to cover the composer seam. */
--spacing-composer-seam: calc(var(--spacing) * 4 - 1px);
/* Dark-mode shade where an attached surface meets the composer: 10px of
shadow fading away from the seam. Inline, so the offsets resolve on the
element. below: the context strip under the composer (1rem seam, faint
white fill). above: an attached banner over it (its tint on top). */
--background-image-composer-seam-below:
linear-gradient(
to bottom,
transparent 0 1rem,
rgb(0 0 0 / 18%) 1rem,
transparent calc(1rem + 10px)
),
linear-gradient(rgb(255 255 255 / 1%), rgb(255 255 255 / 1%));
--background-image-composer-seam-above:
linear-gradient(var(--chat-composer-attached-tint), var(--chat-composer-attached-tint)),
linear-gradient(
to top,
transparent 0 var(--chat-composer-attachment-overlap),
var(--chat-composer-attached-seam, rgb(0 0 0 / 18%)) var(--chat-composer-attachment-overlap),
transparent calc(var(--chat-composer-attachment-overlap) + 10px)
);
--color-zinc-25: oklch(99.2% 0 0);
--animate-skeleton: skeleton 2.4s infinite;
/* Duty-cycled indicator animations: long holds with stepped ramps, so the
compositor updates discrete frames instead of every vsync. */
--animate-status-pulse: status-pulse 2s infinite;
--animate-status-ping: status-ping 2s infinite;
/* Stash pulses hold a highlight for 1.2s; the row then eases back over 200ms, the count snaps.
The row alternates two identical keyframes so each stash restarts it without a remount. */
--animate-stash-pulse-row: stash-pulse-row 1400ms;
--animate-stash-pulse-row-alt: stash-pulse-row-alt 1400ms;
--animate-stash-pulse-count: stash-pulse-count 1400ms step-start;
--animate-effort-level-roll: effort-level-roll 180ms var(--ease-out-quint);
/* One-off arrivals in a workflow run's timeline; nothing here loops. */
--animate-step-in: step-in 180ms ease-out;
--animate-step-ping: step-ping 520ms ease-out;
--animate-check-draw: check-draw 200ms ease-out;
--color-warning-foreground: var(--warning-foreground);
--color-warning: var(--warning);
--color-warning-surface: var(--warning-surface);
--color-error-foreground: var(--error-foreground);
--color-tool-error-icon: var(--tool-error-icon);
--color-error: var(--error);
--color-error-surface: var(--error-surface);
--color-update-foreground: var(--update-foreground);
--color-update: var(--update);
--color-success-foreground: var(--success-foreground);
--color-success: var(--success);
--color-diff-addition: var(--diff-addition);
--color-diff-deletion: var(--diff-deletion);
--color-diff-addition-foreground: var(--diff-addition-foreground);
--color-diff-deletion-foreground: var(--diff-deletion-foreground);
--color-info-foreground: var(--info-foreground);
--color-info: var(--info);
--color-destructive-foreground: var(--destructive-foreground);
--color-ring: var(--ring);
--color-input: var(--contrast-input);
--color-border: var(--contrast-border);
--color-border-2: var(--contrast-border-2);
--color-border-3: var(--contrast-border-3);
--color-destructive: var(--destructive);
--color-destructive-solid: var(--destructive-solid);
--color-accent-foreground: var(--contrast-accent-foreground);
--color-accent: var(--accent);
--color-accent-hover: var(--accent-hover);
--color-muted-foreground: var(--contrast-muted-foreground);
--color-subtle-foreground: var(--contrast-subtle-foreground);
--color-muted: var(--muted);
--color-placeholder: var(--contrast-placeholder);
--color-secondary-label: var(--contrast-secondary-label);
--color-icon-muted: var(--contrast-icon-muted);
--color-secondary-foreground: var(--contrast-secondary-foreground);
--color-secondary: var(--secondary);
--color-secondary-hover: var(--secondary-hover);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--contrast-popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--contrast-card-foreground);
--color-card: var(--card);
--color-card-hover: var(--card-hover);
--color-code: var(--code-background);
--color-foreground: var(--contrast-foreground);
--color-background: var(--background);
--color-message: var(--message-surface);
--color-message-foreground: var(--contrast-message-foreground);
--color-message-action: var(--message-action);
--color-message-action-foreground: var(--message-action-foreground);
--color-message-action-hover: var(--message-action-hover);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--contrast-sidebar-foreground);
--color-sidebar-muted-foreground: var(--contrast-sidebar-muted-foreground);
--color-sidebar-control-surface: var(--sidebar-control-surface);
--color-row-highlight: var(--row-highlight);
--color-row-selected: var(--row-selected);
--color-sidebar-row-hover: var(--sidebar-row-hover);
--color-sidebar-row-active: var(--sidebar-row-active);
--color-sidebar-row-selected: var(--sidebar-row-selected);
--color-sidebar-border: var(--contrast-sidebar-border);
--radius-sm: calc(var(--radius) - 5px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--radius-2xl: calc(var(--radius) + 8px);
--radius-3xl: calc(var(--radius) + 12px);
@keyframes skeleton {
/* The single loading-bar breath used by every skeleton: one opacity pulse
per container, stepped so however many bars sit under it, the compositor
draws a handful of discrete frames per cycle rather than one per vsync —
which on a 120Hz display is the difference between ~14 and ~288 updates. */
0%,
42% {
opacity: 1;
animation-timing-function: steps(4);
}
50%,
92% {
opacity: 0.55;
animation-timing-function: steps(4);
}
100% {
opacity: 1;
}
}
@keyframes stash-pulse-row {
from,
85.7% {
color: var(--color-foreground);
}
}
@keyframes stash-pulse-row-alt {
from,
85.7% {
color: var(--color-foreground);
}
}
@keyframes stash-pulse-count {
from,
85.7% {
color: var(--color-primary);
}
}
@keyframes status-pulse {
0%,
40% {
opacity: 1;
animation-timing-function: steps(6);
}
50%,
90% {
opacity: 0.5;
animation-timing-function: steps(6);
}
100% {
opacity: 1;
}
}
@keyframes step-in {
from {
opacity: 0;
translate: 0 4px;
}
}
@keyframes step-ping {
from {
opacity: 0.55;
scale: 0.7;
}
to {
opacity: 0;
scale: 1.45;
}
}
@keyframes check-draw {
from {
stroke-dashoffset: 12;
}
}
@keyframes status-ping {
/* Burst first (immediate feedback for click ripples), then hold
invisible for the rest of the cycle. Mirrors animate-ping's
75%-scale start. */
0% {
opacity: 0.9;
scale: 0.75;
animation-timing-function: steps(8);
}
40%,
100% {
opacity: 0;
scale: 2;
}
}
}
/* The effort slider's track, the fill from its left edge to the thumb, and the handle. */
@utility effort-slider-track {
background: color-mix(in srgb, var(--foreground) 7%, transparent);
@variant dark {
background: color-mix(in srgb, var(--foreground) 9%, transparent);
}
}
/* The fill takes the level's hue, as the level's name does. */
@utility effort-slider-fill {
background: var(--primary);
background: oklch(
from var(--primary) clamp(0.46, l, 0.56) max(c, 0.16) calc(h + var(--effort-level-hue, 0))
);
@variant dark {
background: oklch(from var(--primary) 0.6 max(c, 0.15) calc(h + var(--effort-level-hue, 0)));
}
}
/* A white handle in both appearances, like the knob on a system switch. */
@utility effort-slider-thumb {
background: white;
box-shadow:
0 0 0 0.5px rgb(0 0 0 / 12%),
0 1px 2px rgb(0 0 0 / 22%);
}
/* The level's name takes the hue the field has at that level: the accent's own at the default
level, and --effort-level-hue degrees away from it at the others. */
@utility effort-level-ink {
color: var(--foreground);
color: oklch(
from var(--primary) clamp(0.42, l, 0.56) max(c, 0.14) calc(h + var(--effort-level-hue, 0))
);
@variant dark {
color: oklch(from var(--primary) 0.8 max(c, 0.12) calc(h + var(--effort-level-hue, 0)));
}
}
/* Keyboard focus: two pixels inside the control's edge, so an `overflow-hidden` parent never
clips it. A filled control sets --focus-ring to its own text colour, where the accent would
not show, and --focus-ring-offset to -3px so a line of fill still frames the ring on a ground
of that colour. A small filled control (checkbox, radio, switch) has no room inside and
draws it outside, a pixel or two off its edge. */
@utility outline-ring-inset {
outline: 2px solid var(--focus-ring, var(--ring));
outline-offset: var(--focus-ring-offset, -2px);
}
/* The label of a tab that holds a PanelTabCloseButton: its end fades under the button while the
button shows, so the two never overlap as solid ink. */
@utility panel-tab-label {
.group\/tab:is(:hover, :has(:focus-visible)) & {
mask-image: linear-gradient(
to right,
black calc(100% - 1.375rem),
transparent calc(100% - 0.625rem)
);
}
@media (any-pointer: coarse) {
mask-image: linear-gradient(
to right,
black calc(100% - 1.375rem),
transparent calc(100% - 0.625rem)
);
}
}
@utility surface-glass {
background: color-mix(in srgb, var(--background) var(--glass-opacity), transparent);
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
background: var(--background) !important;
}
}
@utility alert-glass {
--alert-glass-tint: transparent;
background:
linear-gradient(
color-mix(in srgb, var(--alert-glass-tint) 4%, transparent),
color-mix(in srgb, var(--alert-glass-tint) 4%, transparent)
),
color-mix(in srgb, var(--background) var(--glass-opacity), transparent) !important;
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
&[data-variant="error"] {
--alert-glass-tint: var(--destructive);
}
&[data-variant="info"] {
--alert-glass-tint: var(--info);
}
&[data-variant="success"] {
--alert-glass-tint: var(--success);
}
&[data-variant="warning"] {
--alert-glass-tint: var(--warning);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
background: var(--background) !important;
}
}
/* Paint find results without changing rendered markdown or copied text. */
::highlight(oni-thread-find) {
color: var(--app-theme-search-match-foreground, oklch(0.216164 0.028283 77.423));
background-color: var(--app-theme-search-match-background, oklch(0.915 0.11 85));
@variant dark {
color: var(--app-theme-search-match-foreground, oklch(0.970151 0 0));
background-color: var(--app-theme-search-match-background, oklch(0.55 0.1 85));
}
}
::highlight(oni-thread-find-active) {
color: var(--app-theme-search-match-active-foreground, oklch(0.216164 0.028283 77.423));
background-color: var(
--app-theme-search-match-active-background,
oklch(0.774202 0.151946 74.331)
);
}
@utility dialog-glass {
/* A dialog floats, so it takes the card tone, one step above the canvas it covers. */
background: color-mix(in srgb, var(--card) var(--glass-opacity), transparent);
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
border-color: var(--contrast-border-2);
box-shadow: var(--shadow-popup);
@variant dark {
box-shadow:
inset 0 1px rgb(255 255 255 / 4%),
var(--shadow-popup-dark);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
background: var(--popover) !important;
}
}
@utility dialog-backdrop {
background: color-mix(in srgb, var(--background) 60%, transparent);
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
@variant dark {
background: color-mix(in srgb, var(--background) 64%, transparent);
}
}
@utility dropdown-glass {
background: color-mix(
in srgb,
var(--popover) 18%,
color-mix(in srgb, var(--popover) var(--glass-opacity), transparent)
);
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
border: 0.5px solid var(--contrast-border-2);
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
background: var(--popover) !important;
}
}
@utility topbar-scroll-fade {
-webkit-mask-image:
linear-gradient(
to bottom,
transparent 0%,
rgb(0 0 0 / 10%) 10%,
rgb(0 0 0 / 30%) 24%,
rgb(0 0 0 / 58%) 42%,
rgb(0 0 0 / 82%) 62%,
rgb(0 0 0 / 96%) 82%,
black 100%
),
linear-gradient(black, black), linear-gradient(black, black);
-webkit-mask-position: top, bottom, right;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size:
100% calc(var(--workspace-titlebar-scroll-fade-height) + 1px),
100% calc(100% - var(--workspace-titlebar-scroll-fade-height)),
var(--app-scrollbar-lane) 100%;
mask-image:
linear-gradient(
to bottom,
transparent 0%,
rgb(0 0 0 / 10%) 10%,
rgb(0 0 0 / 30%) 24%,
rgb(0 0 0 / 58%) 42%,
rgb(0 0 0 / 82%) 62%,
rgb(0 0 0 / 96%) 82%,
black 100%
),
linear-gradient(black, black), linear-gradient(black, black);
mask-position: top, bottom, right;
mask-repeat: no-repeat;
mask-size:
100% calc(var(--workspace-titlebar-scroll-fade-height) + 1px),
100% calc(100% - var(--workspace-titlebar-scroll-fade-height)),
var(--app-scrollbar-lane) 100%;
}
/* Virtualizers own their native scroll element, so they cannot use ScrollArea's
viewport fade. Keep the scrollbar lane opaque while sharing the same fade
contract across those lists. */
@utility virtualized-scroll-fade {
-webkit-mask-image: var(--virtualized-scroll-fade-mask), linear-gradient(black, black);
mask-image: var(--virtualized-scroll-fade-mask), linear-gradient(black, black);
-webkit-mask-position: left, right;
mask-position: left, right;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size:
calc(100% - var(--app-scrollbar-lane)) 100%,
var(--app-scrollbar-lane) 100%;
mask-size:
calc(100% - var(--app-scrollbar-lane)) 100%,
var(--app-scrollbar-lane) 100%;
}
@keyframes live-tool-shine {
from {
background-position:
-4.5rem 0,
0 0;
}
to {
background-position:
calc(100% + 4.5rem) 0,
0 0;
}
}
@utility live-tool-shine {
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
color: transparent;
background-image:
linear-gradient(to right, transparent, var(--contrast-foreground), transparent),
linear-gradient(var(--contrast-secondary-label), var(--contrast-secondary-label));
background-size:
4.5rem 100%,
100% 100%;
background-repeat: no-repeat;
background-clip: text;
animation: live-tool-shine 2.2s steps(30) infinite;
animation-play-state: var(--visible-animation-state, paused);
}
}
@utility visible-animate-spin {
animation: var(--animate-spin);
animation-play-state: var(--visible-animation-state, paused);
will-change: var(--visible-animation-will-change, auto);
}
@keyframes live-activity-focus {
from {
transform: translateX(0);
}
to {
transform: translateX(100%);
}
}
@keyframes live-activity-focus-counter {
from {
transform: translateX(0);
}
to {
transform: translateX(-100%);
}
}
@utility live-activity-focus {
--live-activity-focus-width: 4.5rem;
right: auto;
left: calc(-1 * var(--live-activity-focus-width));
width: calc(100% + var(--live-activity-focus-width) + var(--live-activity-focus-width));
-webkit-mask-image: linear-gradient(
to right,
transparent 0,
rgb(0 0 0 / 12%) 0.675rem,
rgb(0 0 0 / 55%) 1.575rem,
black 2.25rem,
rgb(0 0 0 / 55%) 2.925rem,
rgb(0 0 0 / 12%) 3.825rem,
transparent var(--live-activity-focus-width),
transparent 100%
);
-webkit-mask-repeat: no-repeat;
mask-image: linear-gradient(
to right,
transparent 0,
rgb(0 0 0 / 12%) 0.675rem,
rgb(0 0 0 / 55%) 1.575rem,
black 2.25rem,
rgb(0 0 0 / 55%) 2.925rem,
rgb(0 0 0 / 12%) 3.825rem,
transparent var(--live-activity-focus-width),
transparent 100%
);
mask-repeat: no-repeat;
animation: live-activity-focus 2.2s steps(30) infinite;
animation-play-state: var(--visible-animation-state, paused);
will-change: var(--visible-animation-will-change, auto);
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
animation: none;
opacity: 0;
will-change: auto;
}
}
@utility live-activity-focus-counter {
width: 100%;
animation: live-activity-focus-counter 2.2s steps(30) infinite;
animation-play-state: var(--visible-animation-state, paused);
will-change: var(--visible-animation-will-change, auto);
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
animation: none;
will-change: auto;
}
}
@utility live-activity-focus-aligned {
width: calc(100% - var(--live-activity-focus-width) - var(--live-activity-focus-width));
margin-inline-start: var(--live-activity-focus-width);
}
@property --assistant-citation-highlight-opacity {
syntax: "<number>";
inherits: true;
initial-value: 0;
}
@layer base {
::highlight(oni-assistant-citation) {
background-color: color-mix(
in oklab,
var(--primary) calc(var(--assistant-citation-highlight-opacity) * 100%),
transparent
);
}
::highlight(oni-assistant-citation-comment) {
background-color: color-mix(in oklab, var(--primary) 45%, transparent);
}
* {
@apply border-border outline-ring/50;
}
/* The app's 2px outlines stay inside controls at clipped and scrollport edges. */
*,
::before,
::after {
outline-offset: -2px;
}
:where([data-slot="menu-popup"], [data-slot="select-popup"], [data-slot="popover-popup"]):focus,
:where(
[data-slot="menu-popup"],
[data-slot="select-popup"],
[data-slot="popover-popup"]
):focus-visible {
@apply outline-none ring-0;
}
html,
body {
background-color: var(--app-chrome-background);
}
body {
@apply text-foreground relative;
}
}
@layer components {
/* AnimatedHeight owns resizing for its contents. Nested collapsibles must
expose their final layout immediately, otherwise each animation frame
restarts the parent's transition and the dialog trails behind its content. */
[data-slot="animated-height"] [data-slot="collapsible-panel"] {
height: auto !important;
transition: none !important;
}
[data-slot="animated-height"] [data-slot="collapsible-panel"][data-closed] {
display: none;
}
@keyframes settings-search-target-pulse {
0%,
100% {
box-shadow: inset 0 0 0 0 transparent;
}
50% {
box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--color-primary) 70%, transparent);
}
}
[data-settings-page-scroll] div.settings-search-target-pulse,
[data-settings-page-scroll] section.settings-search-target-pulse > div:first-child {
animation: settings-search-target-pulse 650ms ease-in-out 2;
border-radius: 0.75rem;
}
/* The pulse is the destination indicator; without it (reduced motion), the
focus outline takes over, so exactly one indicator shows at a time. */
[data-settings-page-scroll] .settings-search-target-pulse:focus {
outline: none;
}
[data-preview-panel-mode="inline"] [data-right-panel-surface-content] [data-surface-subheader] {
height: calc(var(--spacing) * 7);
min-height: calc(var(--spacing) * 7);
margin-bottom: calc(var(--spacing) * 3);
border-bottom-color: transparent;
}
.chat-content-lane {
margin-inline: auto;
width: 100%;
min-width: 0;
max-width: var(--chat-content-max-width);
}
/* ChatCanvas sets these only while HTML previews run wider than the chat column. */
.html-preview-lane {
width: var(--html-preview-lane-width, auto);
margin-inline-start: var(--html-preview-lane-offset, 0px);
}
.messages-timeline-row-frame {
padding-inline: 0;
}
.settings-slider {
--settings-slider-progress: 0%;
--settings-slider-fill-offset: 0.5rem;
--settings-slider-fill-position: calc(
var(--settings-slider-progress) + var(--settings-slider-fill-offset)
);
appearance: none;
height: 1.5rem;
background: transparent;
cursor: pointer;
}
.settings-slider::-webkit-slider-runnable-track {
height: 0.375rem;
border-radius: 9999px;
background: linear-gradient(
to right,
var(--primary) 0 var(--settings-slider-fill-position),
color-mix(in srgb, var(--contrast-muted-foreground) 22%, transparent)
var(--settings-slider-fill-position) 100%
);
box-shadow: inset 0 0 0 1px var(--contrast-border);
}
.settings-slider::-moz-range-track {
height: 0.375rem;
border-radius: 9999px;
background: color-mix(in srgb, var(--contrast-muted-foreground) 22%, transparent);
box-shadow: inset 0 0 0 1px var(--contrast-border);
}
.settings-slider::-moz-range-progress {
height: 0.375rem;
border-radius: 9999px;
background: var(--primary);
}
.settings-slider::-webkit-slider-thumb {
appearance: none;
width: 1rem;
height: 1rem;
margin-top: -0.3125rem;
border: 2px solid var(--primary);
border-radius: 9999px;
background: var(--background);
box-shadow: 0 1px 2px color-mix(in srgb, var(--contrast-foreground) 12%, transparent);
transition:
transform 120ms ease,
box-shadow 120ms ease;
}
.settings-slider::-moz-range-thumb {
width: 1rem;
height: 1rem;
border: 2px solid var(--primary);
border-radius: 9999px;
background: var(--background);
box-shadow: 0 1px 2px color-mix(in srgb, var(--contrast-foreground) 12%, transparent);
transition:
transform 120ms ease,
box-shadow 120ms ease;
}
.settings-slider:hover::-webkit-slider-thumb {
transform: scale(1.05);
box-shadow: 0 1px 3px color-mix(in srgb, var(--contrast-foreground) 20%, transparent);
}
.settings-slider:hover::-moz-range-thumb {
transform: scale(1.05);
box-shadow: 0 1px 3px color-mix(in srgb, var(--contrast-foreground) 20%, transparent);
}
.settings-slider:active::-webkit-slider-thumb {
transform: scale(0.94);
}
.settings-slider:active::-moz-range-thumb {
transform: scale(0.94);
}
.settings-slider:focus-visible {
outline: none;
}
.settings-slider:focus-visible::-webkit-slider-thumb {
box-shadow:
inset 0 0 0 1px var(--background),
inset 0 0 0 3px var(--ring);
}
.settings-slider:focus-visible::-moz-range-thumb {
box-shadow:
inset 0 0 0 1px var(--background),
inset 0 0 0 3px var(--ring);
}
@media (forced-colors: active) {
.settings-slider {
appearance: auto;
accent-color: Highlight;
}
.settings-slider::-webkit-slider-runnable-track,
.settings-slider::-webkit-slider-thumb {
all: revert;
}
.settings-slider::-moz-range-track,
.settings-slider::-moz-range-progress,
.settings-slider::-moz-range-thumb {
all: revert;
}
}
}
/* Safe-area inset utilities for surfaces that opt into edge-to-edge rendering.
Insets resolve to 0 when the browser already constrains the layout viewport
to the safe area. */
@utility pt-safe {
padding-top: max(env(safe-area-inset-top), 0px);
}
@utility pb-safe {
padding-bottom: max(env(safe-area-inset-bottom), 0px);
}
@utility pl-safe {
padding-left: max(env(safe-area-inset-left), 0px);
}
@utility pr-safe {
padding-right: max(env(safe-area-inset-right), 0px);
}
/* Grain texture for chrome surfaces that float above the body (see the
--surface-grain note). Layered over the element's background-color, so it