-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsettings.css
More file actions
2509 lines (2475 loc) · 69.9 KB
/
Copy pathsettings.css
File metadata and controls
2509 lines (2475 loc) · 69.9 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
.settings-overlay {
position: fixed;
inset: 0;
z-index: 200;
background: var(--bg-base);
}
/* Settings and onboarding are native <dialog>s opened with showModal()
(dialog-shell.ts). Neutralise the UA dialog box defaults (centered,
fit-content, bordered, CanvasText) so they fill the window like the previous
div overlays did. */
dialog.settings-overlay {
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
margin: 0;
padding: 0;
border: none;
color: inherit;
overflow: hidden;
}
dialog.settings-overlay::backdrop {
background: var(--bg-base);
}
.settings-overlay h2 {
margin-bottom: 0;
}
.settings-shell {
display: flex;
flex-direction: column;
height: 100%;
background: var(--bg-base);
}
.settings-header {
display: flex;
align-items: center;
justify-content: space-between;
/* The separator is extra to the row, not carved out of it. Everything is
`border-box` (base.css), so declaring the plain titlebar height here would
spend a pixel of the content box on the border and centre the title half a
pixel above the panel title it is supposed to match. In the main window the
titlebar is a full row and the separator belongs to `#thread-tabs` beneath
it; Settings collapses both into one element, so it needs the row plus the
line. */
height: calc(var(--titlebar-height) + 1px);
padding: 0 var(--spacing-lg) 0 var(--traffic-light-inset);
background: var(--bg-elevated);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
-webkit-app-region: drag;
}
.settings-header h2 {
font-size: var(--font-size-sm);
/* Match the regular panel title rather than introducing a heavier heading
treatment when Settings takes over the same titlebar position. The panel
title (`.workspace-name`) is not a heading, so it takes the interface face
from the body; this is an `h2`, so the brand layer's `h1, h2, h3` rule
(brand.css) hands it the display serif and the serif's tighter tracking.
Neither belongs on chrome, and both have to be named here to be undone —
matching weight and colour alone leaves the face mismatched. */
font-family: var(--font-family);
letter-spacing: normal;
font-weight: 400;
color: var(--text-secondary);
line-height: var(--titlebar-height);
}
.settings-close-btn {
-webkit-app-region: no-drag;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 4px 8px;
border-radius: var(--radius);
color: var(--text-secondary);
line-height: 1;
}
.settings-close-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.settings-body {
display: flex;
flex: 1;
min-height: 0;
overflow: hidden;
}
.settings-nav {
width: calc(240px * var(--ui-scale));
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 2px;
padding: var(--spacing-md);
border-right: 1px solid var(--border);
background: var(--bg-elevated);
min-height: 0;
overflow-y: auto;
}
/* Section rows are the dialog's primary navigation, so they get a full row of
target rather than a line of text: the whole 36px band is clickable, the way
a chat row or a file-tree row is. */
.settings-nav-btn {
display: flex;
align-items: center;
text-align: left;
min-height: var(--action-min-height);
padding: var(--spacing-sm) var(--spacing-md);
border-radius: 0;
color: var(--text-secondary);
font-size: var(--font-size-base);
}
.settings-nav-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.settings-nav-btn.active {
background: var(--bg-selected);
color: var(--text-primary);
font-weight: 600;
}
/* The open section's own groups, listed under its row. A long section (General,
Appearance) is several screens tall, so the sidebar doubles as its table of
contents: what is on this page, and a way to jump straight to it. Only the
open section expands — the nav stays a list of sections, not a tree. */
.settings-nav-subheadings {
display: flex;
flex-direction: column;
gap: 2px;
padding: var(--spacing-xs) 0;
}
.settings-nav-subheading {
display: flex;
align-items: center;
gap: var(--spacing-sm);
text-align: left;
min-height: calc(30px * var(--ui-scale));
padding: var(--spacing-xs) var(--spacing-md) var(--spacing-xs)
calc(var(--spacing-xl) + var(--spacing-xs));
color: var(--text-secondary);
font-size: var(--font-size-sm);
font-weight: 600;
}
/* The turned arrow marks these as belonging to the row above rather than being
sections in their own right. Decorative: the label carries the meaning. */
.settings-nav-subheading::before {
content: '↳';
color: var(--text-muted);
font-weight: 400;
}
.settings-nav-subheading:hover {
color: var(--text-primary);
}
.settings-nav-subheading:hover::before {
color: var(--text-secondary);
}
/* Cross-section search box, pinned above the section list in the sidebar. */
.settings-search {
margin-bottom: var(--spacing-md);
}
.settings-search-input {
width: 100%;
min-height: var(--action-min-height);
padding: var(--spacing-sm) var(--spacing-md);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--bg-base);
color: var(--text-primary);
font-size: var(--font-size-base);
}
.settings-search-input:focus {
outline: none;
border-color: var(--accent);
box-shadow: inset 0 0 0 1px var(--accent);
}
.settings-search-input::placeholder {
color: var(--text-muted);
}
/* Search results mode: the matching blocks are lifted out of their sections
into #settings-search-results (ranked, legend hits first). Hide the section
list and show only that results list; cleared search restores the sections. */
.settings-search-results {
display: none;
}
.settings-content.settings-searching .settings-section {
display: none;
}
.settings-content.settings-searching .settings-search-results {
display: block;
}
.settings-search-empty {
color: var(--text-secondary);
font-size: var(--font-size-sm);
padding: var(--spacing-md) 0;
}
.settings-content {
flex: 1;
min-width: 0;
overflow-y: auto;
/* Keep controls clear of the sticky action bar when the browser scrolls them
into view for focus, keyboard navigation, or an accessibility click. The
footer stays translucent and keeps hit-testing its own box; its occupied
depth simply is not usable viewport space for an interaction target.
The reserve rounds *up* past the bar's own box. `--action-min-height` is a
floor, not the button's height — the real box is its line-height plus
`--spacing-md` twice, a few px taller — so the token sum alone lands a
scrolled target a hair inside the bar. One more `--spacing-md` clears it
with margin to spare; over-reserving only leaves breathing room. Pinned by
`tests/demo/settings-footer.demo.ts`. */
scroll-padding-bottom: calc(
var(--action-min-height) + var(--spacing-lg) + var(--spacing-xl) + var(--spacing-lg) +
var(--spacing-md)
);
/* No bottom padding: a sticky footer cannot extend past its containing
block's content box, so bottom padding here would leave a gap below the
sticky .settings-buttons bar that scrolled content shows through. The
footer carries its own bottom padding instead.
Scroll surface is full width of the pane (beside the nav); the form
column self-limits via --settings-content-max, matching chat's
.messages-list / .msg split. */
padding: calc(var(--spacing-xl) * 2) var(--spacing-xl) 0;
}
.settings-section,
.settings-search-results,
.settings-search-empty,
.settings-buttons {
width: min(100%, var(--settings-content-max));
margin-inline: auto;
}
.settings-section {
display: none;
}
.settings-section.active {
display: block;
}
/* Settings is a destination surface, not chrome: its section titles and group
headings carry the display face, sized so the page has a clear masthead and
an obvious second tier under it. Everything below that tier — field labels,
nested card titles, hints — stays in the interface family, so the serif
reads as structure rather than decoration. */
.settings-section h3 {
font-family: var(--font-display);
font-size: calc(28px * var(--ui-scale));
/* Averia ships a single 400 weight; asking for 600 only invites Chromium's
synthetic bold, which smears the serifs at this size. */
font-weight: 400;
line-height: var(--line-height-base);
margin-bottom: var(--spacing-md);
}
.settings-section-desc,
.settings-fieldset-desc {
color: var(--text-secondary);
font-size: var(--font-size-base);
margin-bottom: var(--spacing-lg);
line-height: var(--line-height-base);
}
/* The section blurb answers "what is this page", so it sits a step above the
per-group blurbs and takes a full group-sized gap to the first heading. */
.settings-section-desc {
font-size: var(--font-size-md);
max-width: 62ch;
margin-bottom: calc(var(--spacing-xl) + var(--spacing-sm));
}
/* A blurb under a group heading introduces the whole group, so it stays tight to
the heading (which now carries that gap itself — hence no negative pull here
any more) and keeps a clear gap to the first control. Some groups write theirs
as a .field-hint, so give that the same rhythm rather than leaving it jammed
against the control below. */
.settings-content legend + .field-hint {
margin-bottom: var(--spacing-lg);
}
.settings-field-label {
display: block;
margin: calc(var(--spacing-lg) + var(--spacing-xs)) 0 var(--spacing-md);
color: var(--text-primary);
font-size: var(--font-size-base);
font-weight: 600;
}
.field-hint {
font-size: var(--font-size-sm);
color: var(--text-muted);
line-height: var(--line-height-base);
}
/* Live advisor-pair assessment under the advisor model picker: colour tracks
how much lift the model annotations expect from the pairing. */
.advisor-pair-hint[data-level='good'] {
color: var(--success);
}
.advisor-pair-hint[data-level='warn'] {
color: var(--warning, #d29922);
}
/* Inline preview of the external-link glyph shown in the links hint copy. */
.external-link-hint-icon {
display: inline-block;
width: 0.9em;
height: 0.9em;
vertical-align: -0.1em;
background-color: currentColor;
-webkit-mask: var(--external-link-mask);
mask: var(--external-link-mask);
}
/* A range slider paired with a live numeric readout. */
.slider-row {
display: flex;
align-items: center;
gap: var(--spacing-sm);
}
.slider-row input[type='range'] {
flex: 1;
}
.slider-value {
min-width: 2.75em;
text-align: right;
font-variant-numeric: tabular-nums;
color: var(--text-muted);
}
/* Actions that act on a whole section (reload, add) rather than on one field.
They sit between the section blurb and the first group, so they carry a
group-sized gap below and stay clear of the heading that follows. */
.settings-action-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--spacing-sm);
margin-bottom: calc(var(--spacing-xl) + var(--spacing-md));
}
/* A row that closes out a group has nothing left to separate from — the group's
own bottom margin is already the gap to whatever follows. */
.settings-action-row:last-child {
margin-bottom: 0;
}
.settings-buttons {
display: flex;
gap: var(--spacing-md);
justify-content: flex-end;
margin-top: var(--spacing-xl);
padding-top: var(--spacing-lg);
/* Lift the buttons off the window's bottom edge. This padding lives inside
the sticky footer box, so the bar still reaches the scrollport bottom and
keeps covering scrolled content — only the buttons move up. */
padding-bottom: calc(var(--spacing-xl) + var(--spacing-lg));
position: sticky;
bottom: 0;
/* Frosted, not opaque: the bar is tall enough to hide a whole row of content,
and an opaque slab makes a long section look like it has stopped when it
has only scrolled under the footer. Letting content read through says
"there is more below" while the blur keeps Save and Cancel legible over
whatever passes beneath them.
The wash and the blur live on a masked pseudo-element rather than on the
bar itself: masking the layer that carries `backdrop-filter` ramps the blur
with it, so content dissolves into the bar instead of hitting a hard line
where a full-strength filter starts. Buttons are children of the bar, not
of the pseudo, so they stay perfectly sharp.
No `border-top`: a hairline across a see-through bar reads as the cut the
fade exists to avoid. */
background: none;
}
.settings-buttons::before {
content: '';
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(
to bottom,
transparent 0%,
color-mix(in srgb, var(--bg-base) 55%, transparent) 40%,
color-mix(in srgb, var(--bg-base) 88%, transparent) 100%
);
backdrop-filter: blur(10px);
-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}
.settings-buttons button {
-webkit-app-region: no-drag;
/* Lift the buttons over the frosted ::before. Without this the absolutely
positioned pseudo paints above them — in-flow content sits below the
positioned layer — and Save comes out blurred along with the backdrop. */
position: relative;
z-index: 1;
}
.settings-buttons button[type='submit'] {
background: var(--accent);
color: var(--text-on-accent);
border-radius: var(--radius);
padding: var(--spacing-md) var(--spacing-xl);
}
.settings-buttons button[type='button'] {
border-radius: var(--radius);
padding: var(--spacing-md) var(--spacing-xl);
color: var(--text-secondary);
}
.settings-buttons button[type='button']:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
/* A card — elevated surface, roomier internal padding — marks a discrete
sub-object inside a group: one provider's credentials, one widget. No border:
the surface alone reads as a panel, and a border would force the legend to
notch a hole through it.
Top-level groups opt out of this entirely (below) — see the Usage section for
the target: a heading and space do the grouping, so the only boxes on screen
are the things that really are boxes. */
.settings-content fieldset {
border: 0;
background: var(--bg-elevated);
border-radius: var(--radius-lg);
padding: var(--spacing-lg);
}
/* Uniform gap between a section's top-level panels. Scoped to direct fieldsets,
fieldsets injected into a `.settings-mount` host, and the same blocks once
search lifts them into the results list — so an inline panel, a JS-mounted one
and a search hit share the exact same rhythm.
Deliberately NOT `.settings-content fieldset { margin-bottom } +
fieldset:last-child { 0 }`: the JS mount points wrap each injected panel in a
host <div>, which made that panel the *last child of its wrapper*. So the
`:last-child` reset matched — and zeroed — the gap after every mounted panel
(Providers, model routing, GitHub CLI, ACP agents, …) while inline panels kept
the full gap. That parent-relative reset was the inconsistent-spacing bug.
Nested fieldsets (e.g. the auth cards inside "Remote agents") are intentionally
excluded — they are not top-level panels and space themselves. No last-panel
reset is needed: the sticky `.settings-buttons` footer carries its own top
margin, which collapses with the final panel's bottom margin to the same gap. */
.settings-section > fieldset,
.settings-section > .settings-mount > fieldset,
.settings-search-results > fieldset {
/* Flat, not a card: the group's own heading and the gap to the next group are
what separate it, so its controls share the section's left edge instead of
sitting inset in a frame. Gap matches .usage-section-root's. */
background: none;
padding: 0;
margin-bottom: calc(var(--spacing-xl) * 2);
}
/* The group's title is a heading, one step below the section's <h3> and on the
same left edge — not a faint caption stamped into a border. Matches the
Usage section's headings (.usage-plan-heading and friends). */
.settings-content legend {
padding: 0;
color: var(--text-primary);
font-size: var(--font-size-md);
font-weight: 600;
}
/* Only a flat group needs this: a card's own top padding already sits between
its title and its first control (a legend is laid out above the padding box),
and adding a margin there too would leave the title floating. */
.settings-section > fieldset > legend,
.settings-section > .settings-mount > fieldset > legend,
.settings-search-results > fieldset > legend {
/* A top-level group is the section's second tier, so it takes the display
face too — one clear step down from the <h3>. Nested card titles (provider
auth, hook cards) stay in the interface family via the base rule above. */
font-family: var(--font-display);
font-size: calc(20px * var(--ui-scale));
font-weight: 400;
line-height: var(--line-height-base);
margin-bottom: var(--spacing-md);
}
/* A field and its own controls stay tight; the gap belongs *between* fields. */
.settings-content fieldset label {
margin-bottom: calc(var(--spacing-lg) + var(--spacing-sm));
}
.settings-content fieldset label:last-child {
margin-bottom: 0;
}
/* Chat, lightweight prompts, and task-role routing are one decision surface.
Keep the roles visibly nested inside the Models card without introducing a
second card / nested fieldset. */
#settings-model-routing-host {
margin-top: var(--spacing-xl);
padding-top: var(--spacing-lg);
border-top: 1px solid var(--border);
}
/* Generation parameters belong to the chat model picked above them, so they get
the same nested-inside-the-Models-card treatment as the task roles below —
one card, three stacked decisions, no second border box. */
#settings-model-parameters-host {
margin-top: var(--spacing-xl);
padding-top: var(--spacing-lg);
border-top: 1px solid var(--border);
}
.model-parameter-note {
margin-bottom: var(--spacing-lg);
}
.model-parameter-fields {
display: flex;
flex-direction: column;
gap: var(--spacing-lg);
}
/* Temperature and top-p hold two characters. A full-width box would read as a
text field and invite prose. */
.model-parameter-fields input[type='number'] {
max-width: 10rem;
}
/* The recipe offer introduces the fields it fills, so the action, provenance,
and resulting reasoning/output budget remain together near the top. */
.model-parameter-recommend {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--spacing-sm);
margin-bottom: var(--spacing-lg);
}
.model-parameter-recommend-note {
margin: 0;
}
.model-role-heading {
margin: 0 0 var(--spacing-xs);
color: var(--text-primary);
font-size: var(--font-size-base);
font-weight: 600;
}
.model-role-fields > .settings-fieldset-desc {
margin-bottom: var(--spacing-lg);
}
/* A hint explains the field *above* it, so it has to sit nearer that field than
the next one. The between-fields gap normally lives on the label's bottom
margin — which would land between a control and its own hint — so a label
that owns a following hint hands that margin over to the hint. Skip this and
every hint reads as a preamble to the field below it. */
.settings-content label:has(+ .field-hint),
.settings-content label:has(+ .settings-fieldset-desc) {
margin-bottom: var(--spacing-xs);
}
/* A hint straight off the fieldset (trailing a list or a status row rather than
one field) is the same story, so it carries the gap too. `:not(:last-child)`
throughout: a hint that ends its group has nothing to separate from, and the
group's own bottom margin already handles the next group. */
.settings-content label + .field-hint:not(:last-child),
.settings-content label + .settings-fieldset-desc:not(:last-child),
.settings-content fieldset > .field-hint:not(:last-child) {
margin-bottom: calc(var(--spacing-lg) + var(--spacing-sm));
}
/* A hint continued over a second paragraph is still one hint: keep the pair
tight, and let the last paragraph carry the gap to the next field. Tightened
from above rather than pulled up from below, because some of these hints sit
in flex containers where a negative margin would eat the row gap. */
.settings-content .field-hint:not(:last-child):has(+ .field-hint) {
margin-bottom: var(--spacing-xs);
}
/* A checkbox hint also indents under the label text it belongs to. */
.settings-content .checkbox-label + .field-hint,
.settings-content .checkbox-label + .settings-fieldset-desc {
padding-left: calc(var(--spacing-lg) + var(--spacing-xs));
}
/* Consecutive checkboxes are one cluster — keep them snug, not double-spaced.
Pulls back the between-fields gap the label above already spent, leaving the
same `--spacing-sm` between rows now that gap has grown. */
.settings-content .checkbox-label + .checkbox-label {
margin-top: calc(-1 * var(--spacing-lg));
}
.app-icon-picker {
/* Fixed 4 columns so the 16 variants land as a clean 4×4 grid with no
orphaned last row. Capped width keeps the tiles grouped rather than
spread thin across the settings column. */
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: var(--spacing-xl) var(--spacing-lg);
max-width: 560px;
}
.app-icon-option {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--spacing-sm);
cursor: pointer;
color: var(--text-secondary);
font-size: var(--font-size-sm);
}
.app-icon-option input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.app-icon-preview {
display: block;
padding: var(--spacing-xs);
border: 2px solid var(--border-subtle);
border-radius: 16px;
background: var(--bg-base);
transition:
border-color 0.15s ease,
box-shadow 0.15s ease;
}
.app-icon-preview img {
display: block;
/* The tile is the choice here, so it is drawn at a size you can actually
judge rather than at list-icon scale. The assets are 512px square, so this
stays a downscale on every display density. */
width: 88px;
height: 88px;
border-radius: 14px;
}
.app-icon-option:hover .app-icon-preview {
border-color: var(--border-strong);
}
.app-icon-option:has(input:checked) .app-icon-preview {
border-color: var(--accent);
box-shadow: 0 0 0 1px var(--accent);
}
.app-icon-option:has(input:checked) .app-icon-label {
color: var(--text-primary);
}
.app-icon-label {
font-size: 12px;
}
.settings-content label select,
.settings-content label input[type='text'],
.settings-content label input[type='password'],
.settings-content label input[type='number'] {
width: 100%;
max-width: 480px;
/* Fields are the section's other main target. `forms.css` sizes them from
`--spacing-sm` alone, which lands a ~30px control; match the nav rows and
the action buttons so nothing in the form is fiddlier than the chrome
around it. */
min-height: var(--action-min-height);
padding-inline: var(--spacing-md);
}
/* The whole checkbox line — box and its wording — is one target. Padding does
that without moving the row's text, and the negative inline start keeps the
box on the section's left edge. */
.settings-content .checkbox-label {
min-height: calc(28px * var(--ui-scale));
padding: var(--spacing-xs) var(--spacing-sm);
margin-inline-start: calc(-1 * var(--spacing-sm));
border-radius: var(--radius);
font-size: var(--font-size-base);
}
.settings-content .checkbox-label:hover {
background: var(--bg-hover);
}
/* Accent and tint sit as a pair. The labels keep the between-fields gap for the
control that follows the row, but between themselves they only need enough
room to stay two distinct choices. */
.settings-swatch-row {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-lg);
}
/* Colour swatch (accent, interface tint): a well rather than a full-width row,
sized so the colour itself is legible and the target matches the other
controls in the section. */
.settings-content input[type='color'] {
width: calc(88px * var(--ui-scale));
height: var(--action-min-height);
padding: 2px;
cursor: pointer;
}
.settings-content input[type='color']::-webkit-color-swatch {
border: none;
border-radius: var(--radius);
}
.settings-content input[type='color']::-webkit-color-swatch-wrapper {
padding: 0;
}
/* The onboarding half of this list is gone: `.onboarding-overlay` now opts the
whole overlay out in one rect (onboarding.css), which covers the containers
an enumeration of leaves always missed. These are the settings panel's own,
and are themselves redundant now that the shared `dialog` rule (forms.css)
opts out `dialog.settings-overlay` — kept for now because removing them is a
separate change from the drag-region fix. */
.settings-nav,
.settings-content,
.settings-content button,
.settings-content input,
.settings-content select {
-webkit-app-region: no-drag;
}
.key-status {
font-size: 11px;
color: var(--text-muted);
}
.key-status.ok {
color: var(--success);
}
.key-status.err {
color: var(--error);
}
/* Opt-in environment key detection: action row + masked results list. */
.env-key-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--spacing-sm);
margin-top: var(--spacing-sm);
}
.env-key-results {
display: flex;
flex-direction: column;
gap: var(--spacing-xs, 4px);
margin-top: var(--spacing-sm);
}
.env-key-results:empty {
display: none;
}
.env-key-row {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: var(--spacing-sm);
font-size: 12px;
}
.env-key-provider {
font-weight: 600;
min-width: 7em;
}
.env-key-source {
color: var(--text-muted);
font-family: var(--font-mono, monospace);
font-size: 11px;
}
.env-key-masked {
color: var(--text-muted);
font-family: var(--font-mono, monospace);
margin-left: auto;
}
/* Providers panel: chip row selects one provider; its form shows below. */
.provider-chips {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-sm);
margin-bottom: var(--spacing-lg);
}
/* Picking a provider is the first thing General asks of you, so the chips are
sized as controls — the section's standard target height and body type —
rather than as tags. */
.provider-chip {
display: inline-flex;
align-items: center;
gap: var(--spacing-sm);
min-height: var(--action-min-height);
padding: var(--spacing-xs) var(--spacing-md);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--bg-base);
color: var(--text-secondary);
font-size: var(--font-size-base);
}
.provider-chip:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
/* The chosen provider is the one whose panel is showing below, so it takes the
same accent wash every other selected row in the app uses. */
.provider-chip.active {
border-color: var(--accent);
background: var(--bg-selected);
color: var(--text-primary);
box-shadow: inset 0 0 0 1px var(--accent);
}
.provider-chip-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--success);
}
/* One provider can offer several things at once (an API key, a cloud agent, a
copy installed on this machine). Each is a titled block, stacked. */
.provider-vendor {
display: flex;
flex-direction: column;
gap: var(--spacing-lg);
}
.provider-capability {
display: flex;
flex-direction: column;
gap: var(--spacing-md);
padding-top: var(--spacing-md);
border-top: 1px solid var(--border);
}
.provider-vendor > .provider-capability:first-child {
padding-top: 0;
border-top: none;
}
.provider-capability-title {
margin: 0;
font-size: var(--font-size-sm);
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-muted);
}
.provider-panel-embedded {
display: flex;
flex-direction: column;
gap: var(--spacing-md);
}
.provider-form {
display: flex;
flex-direction: column;
gap: var(--spacing-md);
}
.provider-form > label {
margin-bottom: 0;
}
.provider-form-title {
display: flex;
align-items: center;
gap: var(--spacing-sm);
margin: 0;
font-size: var(--font-size-base);
color: var(--text-primary);
}
.provider-form-tag {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-muted);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1px var(--spacing-xs);
}
/* Data-policy badge in the provider form title: where prompts go by default.
Kinds mirror privacyBadge() in @copse/llm/data-policies.ts. */
.provider-privacy-badge {
font-size: 10px;
letter-spacing: 0.02em;
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1px var(--spacing-xs);
color: var(--text-muted);
white-space: nowrap;
}
.provider-privacy-badge.zdr,
.provider-privacy-badge.local {
color: var(--success);
border-color: var(--success);
}
.provider-privacy-badge.trains {
color: var(--warning);
border-color: var(--warning);
}
.provider-privacy-badge.unknown {
color: var(--warning);
border-color: var(--border);
}
.provider-privacy-hint code {
overflow-wrap: anywhere;
}
.provider-field-group {
display: flex;
flex-direction: column;
gap: var(--spacing-xs);
}
.provider-field-group > label {
margin-bottom: 0;
}
/* Evenly spaced action row: button(s) then an inline status. */
.provider-actions {
display: flex;
align-items: center;
gap: var(--spacing-md);
}
.provider-form-footer {
margin-top: var(--spacing-xs);
padding-top: var(--spacing-md);
border-top: 1px solid var(--border);
}
.provider-delete {
margin-left: auto;
color: var(--error);
}
/* Structured model list: id / context / label rows with add + remove. */
.provider-models {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
}
.provider-model-rows {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
}
.provider-model-row {
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr auto;
gap: var(--spacing-sm);
align-items: center;
}
.provider-model-row input {
width: 100%;
}
.provider-model-head {
font-size: 11px;
color: var(--text-muted);
}
.provider-model-remove {
display: inline-flex;
align-items: center;
justify-content: center;
padding: var(--spacing-xs) var(--spacing-sm);
color: var(--text-muted);
}
.provider-model-remove:hover {
color: var(--error);
}
/* The base `button` rule strips every border and background, so an action with
no recipe of its own reads as a run of text. Everything you can press in a
provider form gets real button chrome. */
.provider-save,
.provider-secondary,
.provider-delete,
.provider-add-model {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--spacing-xs);
padding: var(--spacing-sm) var(--spacing-lg);
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-base);
color: var(--text-primary);
font-size: var(--font-size-sm);
line-height: var(--line-height-base);
}
.provider-save:hover:not(:disabled),
.provider-secondary:hover:not(:disabled),
.provider-delete:hover:not(:disabled),
.provider-add-model:hover:not(:disabled) {
opacity: 1;
background: var(--bg-hover);
}
.provider-save:disabled,
.provider-secondary:disabled,
.provider-delete:disabled,
.provider-add-model:disabled {
opacity: 0.5;
cursor: default;
}
/* Saving or adding is the form's confirming action, so it carries the accent. */
.provider-save {
border-color: var(--accent);
background: var(--accent-fill);
color: var(--text-on-accent);
}
.provider-save:hover:not(:disabled) {
background: var(--accent-fill-hover);
color: var(--text-on-accent);
}
.provider-delete {
border-color: color-mix(in srgb, var(--error) 45%, transparent);
color: var(--error);
}
.provider-add-model {
align-self: flex-start;
}
.provider-advanced summary {
cursor: pointer;
color: var(--text-secondary);
font-size: var(--font-size-sm);
}
.provider-advanced[open] summary {
margin-bottom: var(--spacing-sm);
}
.routing-advanced {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
}
.routing-advanced summary {
cursor: pointer;
color: var(--text-secondary);
font-size: var(--font-size-sm);
}
.routing-advanced[open] summary {
margin-bottom: var(--spacing-sm);
}
.usage-section-root {
display: flex;
flex-direction: column;
/* Separate plan limits from local ledger as distinct sections. */
gap: calc(var(--spacing-xl) + var(--spacing-md));
}
.usage-plan-section,
.usage-worth-section,
.usage-ledger-section {
display: flex;
flex-direction: column;
gap: var(--spacing-md);
}
.usage-plan-heading,
.usage-worth-heading,
.usage-ledger-heading {
margin: 0;
font-size: var(--font-size-md);
font-weight: 600;
color: var(--text-primary);