@answerdotai/answerui 0.0.0-stage → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,853 @@
1
+ /* Generated by nbdev-export. Edit the source notebooks. */
2
+
3
+ @layer reset, tokens, base, layout, components, app, utilities;
4
+
5
+ @layer reset {
6
+ @scope (:root, [ui]) to ([unstyle]) {
7
+ :where(:scope, *), ::before, ::after { box-sizing: border-box; }
8
+ :where(body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, blockquote, pre, figure, figcaption, hr) { margin: 0; }
9
+ :where(button, input, textarea, select) { font: inherit; }
10
+ :where(img, picture, video, canvas, svg) { max-inline-size: 100%; }
11
+ :where(img:not([height]), img[width], picture, video, canvas, svg) { block-size: auto; }
12
+ :where(img[height]:not([width])) { inline-size: auto; object-fit: contain; object-position: left top; }
13
+ }
14
+ }
15
+
16
+ @layer tokens {
17
+ @scope (:root, [ui]) to ([unstyle]) {
18
+ :where(:scope):root {
19
+ color-scheme: light dark;
20
+ --hue: 260; --neutral-hue: 260;
21
+ --hue-danger: 25; --hue-warning: 75; --hue-success: 145; --hue-info: 230;
22
+ }
23
+ :where(:scope, *) {
24
+ &[ui-theme=system] { color-scheme: light dark; }
25
+ &[ui-theme=light] { color-scheme: light; }
26
+ &[ui-theme=dark] { color-scheme: dark; }
27
+ &[ui-tone=danger] { --hue: var(--hue-danger); }
28
+ &[ui-tone=warning] { --hue: var(--hue-warning); }
29
+ &[ui-tone=success] { --hue: var(--hue-success); }
30
+ &[ui-tone=info] { --hue: var(--hue-info); }
31
+ }
32
+ [prose] mark { --hue: var(--hue-warning); }
33
+
34
+ :where(:scope):is(:root, [ui]), :where(:scope, *)[ui-tone], [prose] mark {
35
+ --n-3: light-dark(oklch(0.9914 clamp(0, 0.00801 + 0.00551*cos((1*var(--neutral-hue) - 136.63)*1deg) + 0.00329*cos((2*var(--neutral-hue) - 268.97)*1deg) + 0.00139*cos((3*var(--neutral-hue) - 327.76)*1deg) + 0.00123*cos((4*var(--neutral-hue) - 93.61)*1deg) + 0.00125*cos((5*var(--neutral-hue) - 211.17)*1deg) + 0.00034*cos((6*var(--neutral-hue) - 339.8)*1deg) + 0.00023*cos((7*var(--neutral-hue) - 56.25)*1deg) + 0.00038*cos((8*var(--neutral-hue) - 125.04)*1deg) + 0.00015*cos((9*var(--neutral-hue) - 283.35)*1deg) + 7e-05*cos((10*var(--neutral-hue) - 349.22)*1deg) + 0.00021*cos((11*var(--neutral-hue) - 12.11)*1deg) + 0.00015*cos((12*var(--neutral-hue) - 161.94)*1deg), 0.02) var(--neutral-hue)), oklch(0.1026 clamp(0, 0.01959 + 0.00041*cos((1*var(--neutral-hue) - 19.99)*1deg), 0.02) var(--neutral-hue))); /* base: the lightness extreme (the default page) */
36
+ --n-2: light-dark(oklch(0.9506 0.02 var(--neutral-hue)), oklch(0.1434 0.02 var(--neutral-hue))); /* raised surface: cards, inputs */
37
+ --n-1: light-dark(oklch(0.7903 0.02 var(--neutral-hue)), oklch(0.3385 0.02 var(--neutral-hue))); /* hairline borders, separators */
38
+ --n: light-dark(oklch(0.6503 0.02 var(--neutral-hue)), oklch(0.4611 0.02 var(--neutral-hue))); /* disabled text and controls */
39
+ --n1: light-dark(oklch(0.5247 0.02 var(--neutral-hue)), oklch(0.5812 0.02 var(--neutral-hue))); /* muted and placeholder text */
40
+ --n2: light-dark(oklch(0.4217 0.02 var(--neutral-hue)), oklch(0.7918 0.02 var(--neutral-hue))); /* body text; body text on surface */
41
+ --v-3: light-dark(oklch(0.913 0.03581 var(--hue)), oklch(0.1825 clamp(0, 0.05701 + 0.02563*cos((1*var(--hue) - 325.45)*1deg) + 0.01252*cos((2*var(--hue) - 263.8)*1deg) + 0.00819*cos((3*var(--hue) - 96.1)*1deg) + 0.00256*cos((4*var(--hue) - 85.33)*1deg) + 0.0017*cos((5*var(--hue) - 319.1)*1deg) + 0.0034*cos((6*var(--hue) - 157.26)*1deg) + 0.00073*cos((7*var(--hue) - 138.05)*1deg) + 0.00112*cos((8*var(--hue) - 2.43)*1deg) + 0.00177*cos((9*var(--hue) - 237.19)*1deg) + 0.00037*cos((10*var(--hue) - 228.33)*1deg) + 0.00064*cos((11*var(--hue) - 69.15)*1deg), 0.09221) var(--hue))); /* subtle background wash; distinct from raised surface */
42
+ --v-2: light-dark(oklch(0.7453 clamp(0, 0.12952 + 0.00279*cos((1*var(--hue) - 18.52)*1deg), 0.13231) var(--hue)), oklch(0.3792 clamp(0, 0.11554 + 0.05156*cos((1*var(--hue) - 327.56)*1deg) + 0.02507*cos((2*var(--hue) - 264.93)*1deg) + 0.01578*cos((3*var(--hue) - 92.55)*1deg) + 0.00467*cos((4*var(--hue) - 86.48)*1deg) + 0.00337*cos((5*var(--hue) - 312.62)*1deg) + 0.00706*cos((6*var(--hue) - 156.72)*1deg) + 0.00165*cos((7*var(--hue) - 144.83)*1deg) + 0.00212*cos((8*var(--hue) - 5.61)*1deg) + 0.00327*cos((9*var(--hue) - 233.15)*1deg), 0.18274) var(--hue))); /* wash hover, selected */
43
+ --v-1: light-dark(oklch(0.6068 clamp(0, 0.15177 + 0.03348*cos((1*var(--hue) - 339.18)*1deg) + 0.01411*cos((2*var(--hue) - 265.25)*1deg) + 0.02027*cos((3*var(--hue) - 71.84)*1deg) + 0.00504*cos((4*var(--hue) - 202.5)*1deg) + 0.00284*cos((5*var(--hue) - 280.18)*1deg) + 0.00522*cos((6*var(--hue) - 138.11)*1deg), 0.18647) var(--hue)), oklch(0.5094 clamp(0, 0.14536 + 0.05279*cos((1*var(--hue) - 334.05)*1deg) + 0.02127*cos((2*var(--hue) - 276.04)*1deg) + 0.02169*cos((3*var(--hue) - 73.93)*1deg) + 0.00271*cos((4*var(--hue) - 80.86)*1deg) + 0.00309*cos((5*var(--hue) - 307.8)*1deg) + 0.00789*cos((6*var(--hue) - 145.12)*1deg) + 0.00091*cos((7*var(--hue) - 251.54)*1deg) + 0.00153*cos((8*var(--hue) - 336.58)*1deg) + 0.00362*cos((9*var(--hue) - 213.73)*1deg), 0.19989) var(--hue))); /* border, focus ring; large accent text */
44
+ --v: light-dark(oklch(0.5109 clamp(0, 0.14555 + 0.0526*cos((1*var(--hue) - 334.09)*1deg) + 0.02117*cos((2*var(--hue) - 275.99)*1deg) + 0.02172*cos((3*var(--hue) - 73.84)*1deg) + 0.00264*cos((4*var(--hue) - 81.88)*1deg) + 0.00308*cos((5*var(--hue) - 307.72)*1deg) + 0.00788*cos((6*var(--hue) - 144.99)*1deg) + 0.00097*cos((7*var(--hue) - 254.36)*1deg) + 0.00156*cos((8*var(--hue) - 336.36)*1deg) + 0.00359*cos((9*var(--hue) - 214.08)*1deg), 0.19985) var(--hue)), oklch(0.71 clamp(0, 0.13825 + 0.01049*cos((1*var(--hue) - 10.64)*1deg) + 0.00723*cos((2*var(--hue) - 226.95)*1deg), 0.14949) var(--hue))); /* solid fill with base-coloured label; accent text on surface */
45
+ --v1: light-dark(oklch(0.4609 clamp(0, 0.13622 + 0.05574*cos((1*var(--hue) - 331.36)*1deg) + 0.02464*cos((2*var(--hue) - 272.89)*1deg) + 0.0188*cos((3*var(--hue) - 78.49)*1deg) + 0.00313*cos((4*var(--hue) - 73.47)*1deg) + 0.00393*cos((5*var(--hue) - 301.46)*1deg) + 0.00794*cos((6*var(--hue) - 154.72)*1deg) + 0.00129*cos((7*var(--hue) - 189.47)*1deg) + 0.00145*cos((8*var(--hue) - 338.99)*1deg) + 0.00411*cos((9*var(--hue) - 219.84)*1deg), 0.19816) var(--hue)), oklch(0.7553 clamp(0, 0.12589 + 0.00123*cos((1*var(--hue) - 87.5)*1deg), 0.12713) var(--hue))); /* solid hover */
46
+ --v2: light-dark(oklch(0.4111 clamp(0, 0.12402 + 0.05381*cos((1*var(--hue) - 328.74)*1deg) + 0.02534*cos((2*var(--hue) - 267.43)*1deg) + 0.01666*cos((3*var(--hue) - 87.73)*1deg) + 0.00394*cos((4*var(--hue) - 85.73)*1deg) + 0.00349*cos((5*var(--hue) - 305.12)*1deg) + 0.00764*cos((6*var(--hue) - 156.18)*1deg) + 0.00167*cos((7*var(--hue) - 153.78)*1deg) + 0.00191*cos((8*var(--hue) - 7.44)*1deg) + 0.00338*cos((9*var(--hue) - 227.69)*1deg), 0.19058) var(--hue)), oklch(0.8024 clamp(0, 0.0999 + 0.00111*cos((1*var(--hue) - 86.68)*1deg), 0.10104) var(--hue))); /* strong accent text on surface; alert text on wash */
47
+ --color-text: var(--n2); --color-muted: var(--n1);
48
+ --color-background: var(--n-3); --color-surface: var(--n-2); --color-border: var(--n-1);
49
+ --color-accent: var(--v); --color-on-accent: var(--n-3);
50
+ --ring: 2px solid var(--v-1);
51
+ }
52
+ :where(:scope, *)[ui-tone=neutral] {
53
+ --v-3: var(--n-2); --v-2: var(--n-1); --v-1: var(--n); --v: var(--n1); --v1: var(--n2); --v2: var(--n2);
54
+ }
55
+
56
+ :where(:scope):root {
57
+ --font: system-ui, sans-serif;
58
+ --font-mono: ui-monospace, Menlo, Consolas, monospace;
59
+ --text: 1rem;
60
+ --weight: 400; --weight1: 600;
61
+ --leading: 1.5; --leading-1: 1.25;
62
+ --prose-scale: .75;
63
+ --prose-font-scale: 1;
64
+ --prose-leading: 1.45;
65
+ --prose-measure: 65ch;
66
+ --space: 1rem;
67
+ --radius: .5rem; --radius-full: 9999px;
68
+ --relief: 1;
69
+ --motion: 150ms;
70
+ --ease: cubic-bezier(.2, 0, 0, 1);
71
+ @media (prefers-reduced-motion: reduce) { --motion: 0ms; }
72
+ }
73
+
74
+ :where(:scope, *), ::before, ::after {
75
+ --text-1: calc(var(--text) * .875);
76
+ --text1: calc(var(--text) * 1.25);
77
+ --text2: calc(var(--text) * 1.5);
78
+ --text3: calc(var(--text) * 2);
79
+ --space-3: calc(var(--space) * .25);
80
+ --space-2: calc(var(--space) * .5);
81
+ --space-1: calc(var(--space) * .75);
82
+ --space1: calc(var(--space) * 1.5);
83
+ --space2: calc(var(--space) * 2);
84
+ --space3: calc(var(--space) * 3);
85
+ --radius-1: calc(var(--radius) * .5);
86
+ --radius1: calc(var(--radius) * 2);
87
+ }
88
+
89
+ @keyframes ui-spin { to { rotate: 1turn; } }
90
+
91
+ :where(:scope, *)[ui], :where(:scope):root { --face: var(--color-surface); }
92
+ :where(:scope, *), ::before, ::after {
93
+ --tint: oklch(from currentColor l c h / .08);
94
+ --hi: oklch(from var(--face) calc(l + .16) c h / var(--relief));
95
+ --lo: oklch(from var(--face) calc(l - .16) c h / var(--relief));
96
+ --shadow-color: light-dark(rgb(0 0 0 / calc(.12 * var(--relief))), rgb(0 0 0 / calc(.5 * var(--relief))));
97
+ --floating-shadow: light-dark(rgb(0 0 0 / .12), rgb(0 0 0 / .5));
98
+ --bevel: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
99
+ --bevel-in: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
100
+ --raised: 0 2px 4px var(--shadow-color);
101
+ --sunken: inset 0 2px 4px var(--shadow-color);
102
+ --floating: 0 4px 12px var(--floating-shadow), 0 12px 32px var(--floating-shadow);
103
+ }
104
+ }
105
+ }
106
+
107
+ @layer base {
108
+ @scope (:root, [ui]) to ([unstyle]) {
109
+ :where(:scope):is([ui], :root) { background: var(--color-background); color: var(--color-text); accent-color: var(--color-accent); }
110
+ :where(:scope, *):is([ui], body) { font: var(--weight) var(--text)/var(--leading) var(--font); }
111
+ :where(:scope, *):focus-visible { outline: var(--ring); outline-offset: 2px; }
112
+ :where(h1, h2, h3, h4, h5, h6) { font-family: var(--font-heading, inherit); font-weight: var(--weight1); line-height: var(--leading-1); text-wrap: balance; }
113
+ :where(h1) { font-size: var(--text3); }
114
+ :where(h2) { font-size: var(--text2); }
115
+ :where(h3) { font-size: var(--text1); }
116
+ :where(h4, h5, h6) { font-size: var(--text); }
117
+ :where(a) { color: var(--color-accent); text-underline-offset: .15em; }
118
+ :where(code, kbd, pre, samp) { font-family: var(--font-mono); }
119
+ :where(small) { font-size: var(--text-1); }
120
+ :where(svg.ui-icon, svg[icon], svg:has(> use)) { inline-size: 1.25em; block-size: 1.25em; flex: none; vertical-align: -.25em; }
121
+ .ui-divider { border: 0; border-block-start: 1px solid var(--color-border); }
122
+
123
+ /* Typography folded in from typrose, based on Tailwind Labs' typography styles.
124
+ * MIT License
125
+ * Copyright (c) 2026 Answer.AI
126
+ *
127
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
128
+ * of this software and associated documentation files (the "Software"), to deal
129
+ * in the Software without restriction, including without limitation the rights
130
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
131
+ * copies of the Software, and to permit persons to whom the Software is
132
+ * furnished to do so, subject to the following conditions:
133
+ *
134
+ * The above copyright notice and this permission notice shall be included in all
135
+ * copies or substantial portions of the Software.
136
+ *
137
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
138
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
139
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
140
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
141
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
142
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
143
+ * SOFTWARE.
144
+ */
145
+
146
+ :where(:scope, *)[prose] {
147
+ --sp: calc(var(--prose-scale) * 1em);
148
+ max-inline-size: var(--prose-measure); overflow-wrap: anywhere;
149
+ font-size: calc(var(--text) * var(--prose-font-scale)); line-height: var(--prose-leading); color: var(--color-text);
150
+
151
+ /* Use block-start margins for vertical spacing; outer edges are cleared at the container boundary. */
152
+ :where(p, ol, ul, dl) { margin-block-start: var(--sp); }
153
+ :where(dt) { margin-block-start: var(--sp); font-weight: var(--weight1); }
154
+ :where(dd) { margin-block-start: calc(var(--sp) * .25); padding-inline-start: 1.375em; }
155
+ :where(li) { margin-block-start: calc(var(--sp) * .25); }
156
+ :where(ol, ul) {
157
+ padding-inline-start: 1.7em;
158
+ > :where(li) { padding-inline-start: .375em; }
159
+ > :where(li)::marker { color: var(--color-muted); }
160
+ :where(ol, ul) { margin: 0; }
161
+ }
162
+ :where(ol) {
163
+ list-style-type: decimal;
164
+ > :where(li)::marker { font-weight: var(--weight); }
165
+ &:where([type="A"], [type="A" s]) { list-style-type: upper-alpha; }
166
+ &:where([type="a"], [type="a" s]) { list-style-type: lower-alpha; }
167
+ &:where([type="I"], [type="I" s]) { list-style-type: upper-roman; }
168
+ &:where([type="i"], [type="i" s]) { list-style-type: lower-roman; }
169
+ &:where([type="1"]) { list-style-type: decimal; }
170
+ }
171
+ :where(ul) { list-style-type: disc; }
172
+ > :where(ol, ul) > li {
173
+ :where(p) { margin-block-start: calc(var(--sp) * .5); }
174
+ > :where(p:first-child) { margin-block-start: calc(var(--sp) * .75); }
175
+ }
176
+ :where(p + :is(ol, ul)) { margin-block-start: calc(var(--sp) * .25); }
177
+
178
+ :where(h1) { font-size: 2.25em; font-weight: 800; line-height: 1.1; margin-block-start: calc(var(--sp) * 1.4); :where(strong) { font-weight: 900; } }
179
+ :where(h2) { font-size: 1.5em; font-weight: 700; line-height: 1.3; margin-block-start: calc(var(--sp) * 1.4); :where(strong) { font-weight: 800; } }
180
+ :where(h3) { font-size: 1.25em; font-weight: var(--weight1); line-height: 1.4; margin-block-start: calc(var(--sp) * 1.2); }
181
+ :where(h4, h5, h6) { font-size: 1em; font-weight: var(--weight1); line-height: 1.4; margin-block-start: calc(var(--sp) * 1.25); }
182
+ :where(:is(h3, h4, h5, h6) strong) { font-weight: 700; }
183
+ :where(.lead) { font-size: 1.25em; line-height: 1.6; color: var(--color-muted); margin-block-start: var(--sp); }
184
+
185
+ :where(a:not([btn])) { color: var(--color-accent); text-decoration: underline; text-underline-offset: .15em; font-weight: 500; }
186
+ :where(strong) { font-weight: var(--weight1); }
187
+
188
+ :where(img, picture, video, figure) { margin-block-start: calc(var(--sp) * 1.5); }
189
+ :where(picture) { display: block; }
190
+ :where(img, video) { display: block; border-radius: var(--radius); }
191
+ :where(figcaption) { font-size: .875em; line-height: 1.4; color: var(--color-muted); margin-block-start: calc(var(--sp) * .5); }
192
+ :where(small) { font-size: .875em; color: var(--color-muted); }
193
+
194
+ :where(blockquote) {
195
+ font-style: italic; font-weight: 500; margin-block-start: calc(var(--sp) * 1.5); padding-inline-start: 1em;
196
+ border-inline-start: .25rem solid var(--color-border); quotes: "\201C" "\201D" "\2018" "\2019";
197
+ }
198
+
199
+ :where(*:not(pre) > code) {
200
+ font-size: .875em; font-weight: var(--weight1); background: var(--color-surface);
201
+ padding: .1em .3rem; border-radius: var(--radius-1); line-height: 1.2rem;
202
+ }
203
+ :where(pre) {
204
+ font-size: inherit; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto;
205
+ padding: .25rem .3rem; border-radius: var(--radius-1); background: var(--color-surface); margin-block-start: var(--sp);
206
+ :where(code) { padding: 0; background: none; font: inherit; }
207
+ }
208
+ :where(kbd) {
209
+ font-size: .875em; font-weight: 500; font-family: inherit; padding: .125em .3125em; border-radius: var(--radius-1);
210
+ box-shadow: 0 0 0 1px var(--color-border), 0 3px 0 var(--color-border);
211
+ }
212
+ :where(mark) { background: var(--v-3); color: var(--v2); padding: .1em .2em; border-radius: var(--radius-1); }
213
+
214
+ /* Prose tables wrap and scroll, independently of the application [table] skin. */
215
+ :where(table) {
216
+ display: block; inline-size: fit-content; max-inline-size: calc(100% + 1em); overflow-x: auto; border-collapse: collapse;
217
+ font-size: .875em; line-height: 1.5; margin-block: calc(var(--sp) * 2) 0; margin-inline: -.5em;
218
+ :where(caption) { inline-size: max-content; max-inline-size: 100%; padding-inline: .5em; }
219
+ :where(th, td) { text-align: start; overflow-wrap: break-word; }
220
+ :where(thead) {
221
+ border-block-end: 1px solid var(--color-border);
222
+ :where(th) { font-weight: var(--weight1); vertical-align: bottom; padding-block: 0 calc(var(--sp) * .5); padding-inline: .5em; }
223
+ }
224
+ :where(tbody) {
225
+ :where(tr:not(:last-child)) { border-block-end: 1px solid var(--color-border); }
226
+ :where(th, td) { vertical-align: baseline; padding-block: calc(var(--sp) * .5); padding-inline: .5em; }
227
+ }
228
+ :where(tfoot) {
229
+ border-block-start: 1px solid var(--color-border);
230
+ :where(th, td) { vertical-align: top; padding-block: calc(var(--sp) * .5); padding-inline: .5em; }
231
+ }
232
+ }
233
+
234
+ :where(hr) {
235
+ border: 0; margin-block-start: var(--sp); position: relative; block-size: 1.25rem;
236
+ background: radial-gradient(circle, transparent 6px, var(--color-border) 6px 8px, transparent 8px) center / 20px 20px no-repeat;
237
+ &::before, &::after { content: ''; position: absolute; inset-block-start: 50%; inline-size: calc(50% - .75rem); border-block-end: 1px solid var(--color-border); }
238
+ &::before { inset-inline-start: 0; }
239
+ &::after { inset-inline-end: 0; }
240
+ }
241
+
242
+ :where(h1 + *) { margin-block-start: calc(var(--sp) * 1.5); }
243
+ :where(h2 + *) { margin-block-start: var(--sp); }
244
+ :where(:is(h3, h4, h5, h6) + *) { margin-block-start: calc(var(--sp) * .5); }
245
+ :where(picture > img, figure > :not(figcaption)) { margin-block: 0; }
246
+ > :first-child { margin-block-start: 0; }
247
+ > :last-child { margin-block-end: 0; }
248
+ }
249
+
250
+ [prose-size=sm] { --prose-scale: .7; --prose-font-scale: .875; }
251
+ [prose-size=lg] { --prose-scale: .8; --prose-font-scale: 1.125; }
252
+ [prose-size=xl] { --prose-scale: .9; --prose-font-scale: 1.25; }
253
+ [prose-size="2xl"] { --prose-scale: 1.1; --prose-font-scale: 1.5; }
254
+ }
255
+ }
256
+
257
+ @layer layout {
258
+ @scope (:root, [ui]) to ([unstyle]) {
259
+ :where(:scope, *):is([stack], [cluster], [grid]) {
260
+ --gap: var(--space); gap: var(--gap);
261
+ &:is(ul, ol) { padding: 0; list-style: none; }
262
+ }
263
+ :where(:scope, *)[stack] { display: flex; flex-direction: column; }
264
+ :where(:scope, *)[cluster] { display: flex; flex-wrap: wrap; align-items: center; justify-content: start; }
265
+ :where(:scope, *)[grid] {
266
+ --grid-min: 16rem; display: grid;
267
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min)), 1fr));
268
+ > * { min-inline-size: 0; }
269
+ }
270
+ :where(:scope, *):is([stack], [cluster]) > [grow] { flex: 1; min-inline-size: 0; min-block-size: 0; }
271
+ :where(:scope, *)[toolbar] { display: flex; align-items: center; gap: var(--space-2); min-inline-size: 0; }
272
+
273
+ :where(:scope, *)[flow] {
274
+ --flow-space: .5em; display: grid; align-content: start; row-gap: var(--flow-space);
275
+ > :is(h1, h2, h3, h4, h5, h6):not(:first-child) { margin-block-start: .5em; }
276
+ }
277
+ }
278
+ }
279
+
280
+ @layer components {
281
+ @scope (:root, [ui]) to ([unstyle]) {
282
+ :where(:scope, *)[btn] {
283
+ --face: var(--color-accent);
284
+ --ui-held-face: var(--v2);
285
+ --ui-held-shadow: var(--bevel-in), var(--sunken);
286
+ --ui-pad-block: var(--space-2);
287
+ --ui-pad-inline: var(--space);
288
+ --ui-press: 0px;
289
+ --busy-delay: 200ms;
290
+ position: relative;
291
+ display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
292
+ padding: calc(var(--ui-pad-block) + var(--ui-press)) calc(var(--ui-pad-inline) - var(--ui-press))
293
+ calc(var(--ui-pad-block) - var(--ui-press)) calc(var(--ui-pad-inline) + var(--ui-press));
294
+ border: 1px solid transparent; border-radius: var(--radius);
295
+ background: var(--face); color: var(--color-on-accent); box-shadow: var(--bevel), var(--raised);
296
+ font: inherit; font-weight: var(--weight1); line-height: var(--leading-1);
297
+ text-align: center; text-decoration: none; cursor: pointer;
298
+ transition: background var(--motion) var(--ease), box-shadow var(--motion) var(--ease), padding calc(var(--motion) / 2) var(--ease), opacity var(--motion) var(--ease);
299
+
300
+ & > :where(span) { display: inline-flex; align-items: center; justify-content: inherit; gap: var(--space-2); }
301
+ &:where(:hover:not(:disabled)) { --face: var(--v1); }
302
+ &:where(:active:not(:disabled)) { --ui-press: calc(1px * var(--relief)); }
303
+ &:where([btn-size=sm]) { --ui-pad-block: var(--space-3); --ui-pad-inline: var(--space-2); font-size: var(--text-1); }
304
+ &:where([btn-size=lg]) { --ui-pad-block: var(--space-1); --ui-pad-inline: var(--space1); font-size: var(--text1); }
305
+ &:where([btn-variant=secondary]) {
306
+ --face: var(--color-surface); --ui-held-face: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
307
+ &:where(:hover:not(:disabled)) { --face: var(--v-3); }
308
+ &:where([aria-pressed=true], [aria-expanded=true], [aria-busy=true]) { --ui-held-face: var(--v-3); color: var(--v2); }
309
+ &:where(.htmx-request) { --ui-held-face: var(--v-3); &::after { color: var(--v2); } }
310
+ }
311
+ &:where([btn-variant=quiet], [btn-variant=editable]) {
312
+ --face: transparent; --ui-held-face: color-mix(in oklch, currentColor 12%, transparent); --ui-held-shadow: none;
313
+ --ui-press: 0px; color: inherit; box-shadow: none;
314
+ &:where(:hover:not(:disabled)) { --face: var(--tint); }
315
+ }
316
+ &:where([btn-variant=editable]) {
317
+ --ui-pad-inline: var(--space-1); inline-size: 100%; justify-content: start; border-color: var(--n); border-style: dashed;
318
+ font-weight: inherit; text-align: start; cursor: text;
319
+ }
320
+ &:where(:is(:active, [aria-busy=true], [aria-pressed=true], [aria-expanded=true]):not(:disabled)) {
321
+ --face: var(--ui-held-face); box-shadow: var(--ui-held-shadow);
322
+ }
323
+ &:where(:disabled) { opacity: .5; box-shadow: none; cursor: default; }
324
+ &:where([aria-busy=true]) { -webkit-text-fill-color: transparent; }
325
+ &:where([aria-busy=true], .htmx-request) {
326
+ & > :where(span, svg) { opacity: 0; }
327
+ &::after {
328
+ content: ''; position: absolute; inset: 0; margin: auto; inline-size: 1.25em; block-size: 1.25em;
329
+ border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: var(--radius-full);
330
+ animation: ui-spin calc(var(--motion) * 5) linear infinite;
331
+ }
332
+ }
333
+ &:where(.htmx-request:not([aria-busy=true])) {
334
+ animation: ui-busy-held 0s linear var(--busy-delay) both;
335
+ & > :where(span, svg) { transition: opacity var(--motion) var(--ease) var(--busy-delay); }
336
+ &::after { animation: ui-spin calc(var(--motion) * 5) linear infinite, ui-busy-in var(--motion) var(--ease) var(--busy-delay) both; }
337
+ }
338
+ &:where([btn-icon]) {
339
+ --ui-pad-inline: var(--ui-pad-block);
340
+ & > :where(span) { inline-size: 1.25em; block-size: 1.25em; }
341
+ }
342
+ &:is([copyfor], [copy]) {
343
+ & > svg > use:last-child { display: none; }
344
+ &[copied] > svg > use:first-child { display: none; }
345
+ &[copied] > svg > use:last-child { display: inline; }
346
+ }
347
+ @media (prefers-reduced-motion: reduce) {
348
+ transition: none;
349
+ &:where([aria-busy=true], .htmx-request)::after { animation-duration: 2s, 0s; }
350
+ }
351
+ }
352
+ @keyframes ui-busy-held { to { --face: var(--ui-held-face); box-shadow: var(--ui-held-shadow); -webkit-text-fill-color: transparent; } }
353
+ @keyframes ui-busy-in { from { opacity: 0; } }
354
+
355
+ :where(:scope, *):where([input], [textarea], [select]) {
356
+ --face: var(--color-background);
357
+ inline-size: 100%; min-inline-size: 0; padding: var(--space-2) var(--space-1);
358
+ border: 1px solid var(--color-border); border-radius: var(--radius);
359
+ background: var(--face); color: var(--color-text); box-shadow: var(--bevel-in), var(--sunken);
360
+ font: inherit;
361
+ transition: border-color var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
362
+ &::placeholder { color: var(--color-muted); }
363
+ &:disabled { --face: var(--n-2); color: var(--n); box-shadow: var(--bevel-in); }
364
+ }
365
+ :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch]):is(:user-invalid, [aria-invalid=true]) {
366
+ border-color: light-dark(oklch(52% .18 var(--hue-danger)), oklch(75% .14 var(--hue-danger)));
367
+ }
368
+ :where(:scope, *):where([input][type=number]) {
369
+ appearance: textfield;
370
+ &::-webkit-inner-spin-button, &::-webkit-outer-spin-button { appearance: none; margin: 0; }
371
+ }
372
+ :where(:scope, *):where([textarea]) { min-block-size: 5rem; resize: vertical; field-sizing: content; }
373
+ :where(:scope, *):where([checkbox], [radio]) {
374
+ --face: var(--color-background);
375
+ appearance: none; display: inline-grid; place-content: center; flex: none;
376
+ inline-size: 1.15em; block-size: 1.15em; margin: 0; padding: 0;
377
+ border: 1px solid var(--color-border); border-radius: var(--radius-1);
378
+ background: var(--face); color: var(--color-accent); box-shadow: var(--sunken); vertical-align: middle;
379
+ transition: background var(--motion) var(--ease), border-color var(--motion) var(--ease);
380
+ &::before {
381
+ content: ''; inline-size: .6em; block-size: .6em; background: var(--color-on-accent); scale: 0; transition: scale var(--motion) var(--ease);
382
+ }
383
+ &:disabled { --face: var(--n-2); border-color: var(--n-1); }
384
+ }
385
+ :where(:scope, *):where([checkbox]) {
386
+ &::before { clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
387
+ &:is(:checked, :indeterminate) {
388
+ --face: var(--color-accent); border-color: var(--color-accent);
389
+ &::before { scale: 1; }
390
+ &:disabled { --face: var(--n-1); border-color: var(--n-1); }
391
+ }
392
+ &:indeterminate::before { clip-path: none; block-size: .15em; }
393
+ }
394
+ :where(:scope, *):where([radio]) {
395
+ &, &::before { border-radius: var(--radius-full); }
396
+ &::before { background: var(--color-accent); }
397
+ &:checked {
398
+ border-color: var(--color-accent);
399
+ &::before { scale: 1; }
400
+ &:disabled::before { background: var(--n); }
401
+ }
402
+ }
403
+ :where(:scope, *):where([switch]) {
404
+ --face: var(--color-background);
405
+ appearance: none; display: inline-grid; align-items: center; flex: none;
406
+ inline-size: 2.75em; block-size: 1.5em; margin: 0; padding: 2px;
407
+ border: 1px solid var(--color-border); border-radius: var(--radius-full);
408
+ background: var(--face); box-shadow: var(--bevel-in), var(--sunken); vertical-align: middle;
409
+ transition: background var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
410
+ &::before {
411
+ --face: var(--n-2);
412
+ content: ''; inline-size: calc(1.5em - 6px); block-size: calc(1.5em - 6px); border-radius: var(--radius-full);
413
+ background: var(--face); box-shadow: var(--bevel), var(--raised);
414
+ transition: translate var(--motion) var(--ease), background var(--motion) var(--ease);
415
+ }
416
+ &:checked {
417
+ --face: var(--color-accent);
418
+ &::before { translate: 1.25em 0; --face: var(--color-on-accent); }
419
+ &:dir(rtl)::before { translate: -1.25em 0; }
420
+ }
421
+ &:disabled {
422
+ --face: var(--n-2); box-shadow: var(--bevel-in);
423
+ &::before { --face: var(--n-1); box-shadow: var(--bevel); }
424
+ }
425
+ }
426
+ :where(:scope, *):where([range]) {
427
+ --ui-track: .6em; --ui-thumb: 1.25em; --ui-range-direction: to right;
428
+ appearance: none; inline-size: 100%; block-size: 1.5em; margin: 0; padding: 0; background: transparent;
429
+ &::-webkit-slider-runnable-track {
430
+ --face: var(--color-background);
431
+ block-size: var(--ui-track); border: 1px solid var(--color-border); border-radius: var(--radius-full);
432
+ background: linear-gradient(var(--ui-range-direction), var(--color-accent) var(--ui-range-fill, 0%), var(--face) 0); box-shadow: var(--bevel-in), var(--sunken);
433
+ }
434
+ &::-moz-range-track {
435
+ --face: var(--color-background);
436
+ block-size: var(--ui-track); border: 1px solid var(--color-border); border-radius: var(--radius-full);
437
+ background: linear-gradient(var(--ui-range-direction), var(--color-accent) var(--ui-range-fill, 0%), var(--face) 0); box-shadow: var(--bevel-in), var(--sunken);
438
+ }
439
+ &::-webkit-slider-thumb {
440
+ --face: var(--color-accent);
441
+ appearance: none; inline-size: var(--ui-thumb); block-size: var(--ui-thumb); border: 0; border-radius: var(--radius-full);
442
+ margin-block-start: calc((var(--ui-track) - var(--ui-thumb)) / 2 - 1px);
443
+ background: var(--face); box-shadow: var(--bevel), var(--raised);
444
+ }
445
+ &::-moz-range-thumb {
446
+ --face: var(--color-accent);
447
+ inline-size: var(--ui-thumb); block-size: var(--ui-thumb); border: 0; border-radius: var(--radius-full);
448
+ background: var(--face); box-shadow: var(--bevel), var(--raised);
449
+ }
450
+ &:active {
451
+ &::-webkit-slider-thumb { box-shadow: var(--bevel-in), var(--sunken); }
452
+ &::-moz-range-thumb { box-shadow: var(--bevel-in), var(--sunken); }
453
+ }
454
+ &:disabled {
455
+ opacity: .5;
456
+ &::-webkit-slider-runnable-track { background: linear-gradient(var(--ui-range-direction), var(--n) var(--ui-range-fill, 0%), var(--n-2) 0); }
457
+ &::-moz-range-track { background: linear-gradient(var(--ui-range-direction), var(--n) var(--ui-range-fill, 0%), var(--n-2) 0); }
458
+ &::-webkit-slider-thumb { --face: var(--n-1); box-shadow: var(--bevel); }
459
+ &::-moz-range-thumb { --face: var(--n-1); box-shadow: var(--bevel); }
460
+ }
461
+ &:dir(rtl) { --ui-range-direction: to left; }
462
+ }
463
+ :where(:scope, *)[group] {
464
+ display: inline-flex; align-items: stretch; gap: 0; min-inline-size: 0; border-radius: var(--radius);
465
+ & > :where([btn], [input], [textarea], [select]) {
466
+ border-radius: 0;
467
+ &:first-child { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
468
+ &:last-child { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
469
+ & + :where([btn], [input], [textarea], [select]) { margin-inline-start: -1px; }
470
+ }
471
+ &:where(:has(> :is([input], [textarea], [select]))) { inline-size: 100%; }
472
+ & > :where([btn]) { flex: none; }
473
+ & > :where([input], [textarea], [select]) {
474
+ flex: 1; min-inline-size: 0;
475
+ &:focus-visible { outline: none; }
476
+ }
477
+ &:where(:has(> :is([input], [textarea], [select]):focus-visible)) { outline: var(--ring); outline-offset: 2px; }
478
+ &[group-variant=inset] {
479
+ --face: var(--color-background);
480
+ align-items: center; padding-inline-end: var(--space-3); border: 1px solid var(--color-border);
481
+ background: var(--face); box-shadow: var(--bevel-in), var(--sunken);
482
+ & > :where([btn], [input], [textarea], [select]) { margin: 0; border-radius: var(--radius-1); }
483
+ & > :where([input], [textarea], [select]) { border: 0; background: transparent; box-shadow: none; }
484
+ & > :where([btn]) { --ui-pad-block: var(--space-3); --ui-pad-inline: var(--space-2); }
485
+ }
486
+ }
487
+ :where(:scope, *)[field] {
488
+ display: grid; gap: var(--space-3); min-inline-size: 0; font-size: var(--text-1);
489
+ & > :where(label) { justify-self: start; font-weight: var(--weight1); }
490
+ & > :where([field-control]) { min-inline-size: 0; }
491
+ & > :where(small) { color: var(--color-muted); font-size: inherit; }
492
+ &[field-inline] {
493
+ grid-template-columns: auto 1fr; align-items: center; column-gap: var(--space-2);
494
+ & > :where(label) { grid-column: 2; grid-row: 1; font-weight: var(--weight); }
495
+ & > :where([field-control]) { grid-column: 1; grid-row: 1; display: flex; }
496
+ & > :where(small) { grid-column: 1 / -1; }
497
+ }
498
+ &:where(:has(:disabled)) > :where(label) { color: var(--n); }
499
+ }
500
+ :where(:scope, *):where(small, p)[ui-tone]:not([ui-tone=neutral]) { color: var(--v2); }
501
+ :where(:scope, *):where([fieldset]) {
502
+ min-inline-size: 0; margin: 0; padding: var(--space); border: 1px solid var(--color-border); border-radius: var(--radius);
503
+ & > :where(legend) { padding-inline: var(--space-2); font-weight: var(--weight1); }
504
+ }
505
+ @media (prefers-reduced-motion: reduce) {
506
+ :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch]), :where([checkbox], [radio], [switch])::before { transition: none; }
507
+ }
508
+ @media (forced-colors: active) {
509
+ :where(:scope, *):where([checkbox], [radio], [switch]) {
510
+ appearance: auto;
511
+ &::before { display: none; }
512
+ }
513
+ :where(:scope, *):where([range]) {
514
+ appearance: auto;
515
+ &::-webkit-slider-thumb { appearance: auto; }
516
+ }
517
+ }
518
+
519
+ :where(:scope, *)[card] { --face: var(--color-surface); padding: var(--space); background: var(--face); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--raised); }
520
+ :where(:scope, *)[badge] {
521
+ display: inline-block; padding: .125em .5em; border-radius: var(--radius-1);
522
+ background: var(--v-3); color: var(--v2); font-size: var(--text-1); font-weight: var(--weight1); line-height: var(--leading-1);
523
+ &[badge-variant=secondary] { background: var(--color-surface); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border); }
524
+ }
525
+ :where(:scope, *)[avatar] {
526
+ display: inline-grid; place-items: center; vertical-align: middle; flex: none;
527
+ inline-size: var(--avatar-size, 2.5rem); block-size: var(--avatar-size, 2.5rem); border-radius: var(--radius-full);
528
+ object-fit: cover; background: var(--v-3); color: var(--v2); font-size: calc(var(--avatar-size, 2.5rem) * .4);
529
+ font-weight: var(--weight1); line-height: 1;
530
+ }
531
+ :where(:scope, *)[btn]:has(> [avatar]:only-child) {
532
+ --ui-pad-block: 1px; --ui-pad-inline: 1px; border-radius: var(--radius-full);
533
+ --face: var(--color-surface); border-color: var(--color-border);
534
+ }
535
+
536
+ :where(:scope, *)[alert] {
537
+ display: flex; align-items: flex-start; gap: var(--space); padding: var(--space); border: 1px solid var(--v-2);
538
+ border-radius: var(--radius); background: var(--v-3); color: var(--v2);
539
+ > [stack] { --gap: var(--space-2); flex: 1; min-inline-size: 0; }
540
+ }
541
+ :where(:scope, *)[progress] { inline-size: 100%; block-size: var(--space-2); accent-color: var(--color-accent); }
542
+ :where(:scope, *)[spinner] {
543
+ display: inline-flex; align-items: center; gap: var(--space-2);
544
+ &::before {
545
+ content: ""; inline-size: 1em; block-size: 1em; flex: none; border: 2px solid currentColor;
546
+ border-inline-end-color: transparent; border-radius: var(--radius-full); animation: ui-spin calc(var(--motion) * 5) linear infinite;
547
+ }
548
+ @media (prefers-reduced-motion: reduce) { &::before { animation: none; } }
549
+ }
550
+ :where(:scope, *)[skeleton] { display: block; inline-size: 100%; block-size: 1em; background: var(--n-1); border-radius: var(--radius-1); }
551
+
552
+ :where(:scope, *)[table-frame] {
553
+ overflow-x: auto; contain: inline-size; background: var(--color-background); border: 1px solid var(--color-border);
554
+ border-radius: var(--radius); box-shadow: var(--raised);
555
+ table[table] {
556
+ :where(th, td) { white-space: nowrap; }
557
+ :where(thead th) { background: var(--color-surface); }
558
+ }
559
+ }
560
+ table[table]:where(:scope, *) {
561
+ inline-size: 100%; border-collapse: separate; border-spacing: 0;
562
+ :where(th, td) { padding: var(--space-2) var(--space); text-align: start; }
563
+ :where(thead th) { color: var(--color-text); font-weight: var(--weight1); border-block-end: 1px solid var(--color-border); }
564
+ :where(tbody tr + tr > *, tfoot tr > *) { border-block-start: 1px solid var(--color-border); }
565
+ :where(tfoot th) { font-weight: var(--weight1); }
566
+ :where(caption) { caption-side: bottom; padding: var(--space-2) var(--space); color: var(--color-muted); font-size: var(--text-1); text-align: start; }
567
+ :is(th, td)[num] { text-align: end; font-variant-numeric: tabular-nums; }
568
+ }
569
+
570
+ :where(:scope):root:has([navbar][navbar-sticky]) { scroll-padding-block-start: calc(var(--navbar-size, 0px) + var(--space)); }
571
+ :where(:scope, *)[navbar] {
572
+ padding: var(--space-2) var(--space); border-block-end: 1px solid var(--color-border);
573
+ background: var(--color-background); color: var(--color-text);
574
+ &[navbar-sticky] { position: sticky; inset-block-start: 0; z-index: 10; }
575
+ &[navbar-vivid] {
576
+ --face: var(--color-accent); background: var(--face); color: var(--color-on-accent);
577
+ > [navbar-row] > nav > a[aria-current=page] { background: var(--tint); color: inherit; }
578
+ }
579
+ &[navbar-align=center] > [navbar-row] > nav { margin-inline: auto; }
580
+ &[navbar-align=end] > [navbar-row] > nav { margin-inline-start: auto; }
581
+ &:is([navbar-align=center], [navbar-align=end]) > [navbar-row] > [navbar-end] { margin-inline-start: 0; }
582
+ &[data-compact]:not([data-fitting]) {
583
+ > [navbar-row] {
584
+ > [navbar-toggle] { display: inline-flex; }
585
+ > [navbar-end] { margin-inline-start: auto; }
586
+ > nav { display: none; order: 1; flex-basis: 100%; margin: 0; }
587
+ }
588
+ &[data-open] > [navbar-row] > nav { display: grid; gap: var(--space-2); }
589
+ }
590
+ &[data-fitting] {
591
+ > [navbar-row] {
592
+ inline-size: max-content; max-inline-size: none; flex-wrap: nowrap;
593
+ > nav { flex: none; flex-wrap: nowrap; }
594
+ }
595
+ &[data-compact] > [navbar-row] > [navbar-toggle] { display: inline-flex; position: absolute; }
596
+ }
597
+ }
598
+ [navbar-row] {
599
+ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space); min-inline-size: 0;
600
+ > [navbar-brand] {
601
+ display: inline-flex; align-items: center; gap: var(--space-3); flex: none; color: inherit;
602
+ font-size: var(--text1); font-weight: var(--weight1); text-decoration: none; white-space: nowrap;
603
+ }
604
+ > nav {
605
+ display: flex; flex-wrap: wrap; gap: var(--space-3);
606
+ > a {
607
+ display: inline-block; padding: var(--space-3) var(--space-2); border-radius: var(--radius-1);
608
+ color: inherit; text-decoration: none;
609
+ &:is(:hover, :focus-visible) { background: var(--tint); }
610
+ &[aria-current=page] { background: var(--v-3); color: var(--v2); }
611
+ }
612
+ }
613
+ > [navbar-end] { display: flex; align-items: center; gap: var(--space-2); flex: none; margin-inline-start: auto; }
614
+ > [navbar-toggle] { display: none; flex: none; }
615
+ }
616
+
617
+ :where(:scope, *)[responsive-toolbar] {
618
+ flex: 1; min-inline-size: 0;
619
+ &[data-compact] {
620
+ &:not([data-fitting]) > [toolbar-actions] { display: none; }
621
+ > [toolbar-menu] { display: flex; align-items: center; gap: var(--space-3); }
622
+ }
623
+ &[data-fitting] {
624
+ > [toolbar-actions] { inline-size: max-content; max-inline-size: none; flex: none; }
625
+ > [toolbar-menu] { position: absolute; }
626
+ }
627
+ }
628
+ [toolbar-actions], [toolbar-group] { display: flex; align-items: center; gap: var(--space-3); }
629
+ [toolbar-group] + [toolbar-group] { border-inline-start: 1px solid var(--color-border); padding-inline-start: var(--space-2); margin-inline-start: var(--space-3); }
630
+ [toolbar-menu] { display: none; }
631
+ [toolbar-divider] { block-size: 1.25em; border-inline-start: 1px solid var(--color-border); margin-inline: var(--space-3); }
632
+ [toolbar-shortcut] { margin-inline-start: auto; padding-inline-start: var(--space); color: var(--color-muted); font: inherit; font-size: var(--text-1); }
633
+
634
+ :where(:scope, *)[breadcrumb] {
635
+ min-inline-size: 0;
636
+ &[data-compact] {
637
+ &:not([data-fitting]) [breadcrumb-parents] { display: none; }
638
+ [breadcrumb-collapse] { display: block; }
639
+ }
640
+ &[data-fitting] {
641
+ [breadcrumb-collapse] { position: absolute; }
642
+ > [breadcrumb-row] { inline-size: max-content; max-inline-size: none; }
643
+ }
644
+ }
645
+ [breadcrumb-row] {
646
+ display: flex; align-items: center; gap: var(--breadcrumb-gap, var(--space-3)); min-inline-size: 0;
647
+ > :not([breadcrumb-current]) { flex: none; }
648
+ }
649
+ [breadcrumb-parents] {
650
+ display: contents;
651
+ > a { flex: none; white-space: nowrap; }
652
+ }
653
+ [breadcrumb-collapse] { display: none; }
654
+ [breadcrumb-ancestor] { min-inline-size: 0; overflow-wrap: anywhere; }
655
+ [breadcrumb-current] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
656
+
657
+ :where(:scope, *):is([dialog], [popup], [dropdown], [toast]) {
658
+ --face: var(--color-surface);
659
+ background: var(--face); color: var(--color-text);
660
+ border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--floating);
661
+ }
662
+ :where(:scope, *)[dialog] {
663
+ flex-direction: column; gap: var(--space); border-radius: var(--radius1);
664
+ inline-size: min(32rem, calc(100vw - 2 * var(--space))); max-inline-size: none; max-block-size: calc(100dvh - 2 * var(--space));
665
+ overflow: auto; padding: var(--space1);
666
+ > header {
667
+ min-block-size: calc(1.25em + var(--space) + 2px); padding-inline-end: calc(1.25em + var(--space) * 2 + 2px);
668
+ > div { min-inline-size: 0; }
669
+ h2 { margin: 0; font-size: var(--text1); font-weight: var(--weight1); }
670
+ p { margin: var(--space-3) 0 0; color: var(--color-muted); }
671
+ }
672
+ > [dialog-close] { position: absolute; inset-block-start: var(--space1); inset-inline-end: var(--space1); }
673
+ > footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
674
+ > div { min-block-size: 0; }
675
+ &:is([dialog-side='start'], [dialog-side='end']) {
676
+ inset: 0; inset-inline-start: auto; translate: none; block-size: 100dvh; max-block-size: none;
677
+ inline-size: min(var(--drawer-size, 24rem), 100vw); border-radius: 0; border-block: 0; border-inline-end: 0;
678
+ --dialog-entry: ui-drawer-enter; --slide: 100%;
679
+ }
680
+ &[dialog-side='start'] {
681
+ inset-inline: 0 auto; border-inline: 0; border-inline-end: 1px solid var(--color-border); --slide: -100%;
682
+ &:dir(rtl) { --slide: 100%; }
683
+ }
684
+ &[dialog-side='end']:dir(rtl) { --slide: -100%; }
685
+ @media (width < 40rem) {
686
+ &:is([dialog-side='start'], [dialog-side='end']) { inline-size: 100vw; border: 0; }
687
+ }
688
+ }
689
+ dialog:where(:scope, *)[dialog] {
690
+ &[open] { display: flex; animation: var(--dialog-entry, ui-dialog-enter) var(--motion) var(--ease); }
691
+ &::backdrop { background: oklch(from var(--n2) l c h / .4); }
692
+ }
693
+
694
+ :where(:scope, *):is([popup], [dropdown]) {
695
+ z-index: 60; overflow: auto;
696
+ position: fixed; inset: auto; margin: 0; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
697
+ position-try-order: most-block-size; max-block-size: calc(100% - 16px);
698
+ &:popover-open { animation: ui-floating-enter var(--motion) var(--ease); }
699
+ @supports not (position-area: center) { max-block-size: var(--floating-available-height, calc(100dvh - 16px)); }
700
+ }
701
+ :where(:scope, *)[popup] { inline-size: max-content; max-inline-size: min(24rem, calc(100vw - 2 * var(--space))); padding: var(--space); }
702
+ :where(:scope, *)[dropdown] {
703
+ min-inline-size: min(12rem, calc(100vw - 2 * var(--space))); padding: var(--space-3);
704
+ &:popover-open { display: grid; }
705
+ hr { inline-size: 100%; margin-block: var(--space-3); border: 0; border-block-start: 1px solid var(--color-border); }
706
+ > :not([menu-item], hr, [option-group]) { padding: var(--space-2) var(--space-1); }
707
+ }
708
+ [menu-item] {
709
+ display: flex; align-items: center; gap: var(--space-2); inline-size: 100%; padding: var(--space-2) var(--space-1);
710
+ border: 0; background: none; box-shadow: none; font: inherit; text-align: start;
711
+ border-radius: var(--radius-1); color: inherit; text-decoration: none; cursor: pointer; user-select: none;
712
+ &:not(:disabled, [aria-disabled=true]):is(:hover, :focus-visible), &[aria-pressed=true] { background: var(--v-3); color: var(--v2); }
713
+ &[ui-tone='danger'] { color: var(--color-accent); }
714
+ &:is(:disabled, [aria-disabled=true]) { color: var(--n1); cursor: default; opacity: .55; }
715
+ }
716
+ [menu-label] { font-size: var(--text-1); font-weight: var(--weight1); color: var(--color-muted); padding-block: var(--space-3); }
717
+ [option-group] {
718
+ > summary {
719
+ padding: var(--space-2) var(--space-1); cursor: pointer;
720
+ > svg { vertical-align: middle; margin-inline-end: var(--space-2); }
721
+ }
722
+ > [menu-item] { padding-inline-start: var(--space1); }
723
+ }
724
+
725
+ :where(:scope, *)[tooltip] {
726
+ display: inline-block; position: relative;
727
+ > [role=tooltip] {
728
+ z-index: 70; inline-size: max-content; max-inline-size: min(20rem, calc(100vw - 2 * var(--space))); overflow-wrap: anywhere;
729
+ background: var(--n2); color: var(--n-3); border-radius: var(--radius-1); padding: var(--space-3) var(--space-2);
730
+ font-size: var(--text-1); line-height: var(--leading); box-shadow: var(--floating); border: 0;
731
+ position: fixed; inset: auto; position-area: top; position-try-fallbacks: flip-block; margin-block-end: var(--tooltip-gap, 6px);
732
+ visibility: hidden; opacity: 0; transition: opacity var(--motion) var(--ease) 150ms, visibility 0s linear calc(var(--motion) + 150ms);
733
+ @supports not (position-area: center) { position: absolute; inset: auto auto 100% 0; }
734
+ }
735
+ &:is(:hover, :has(:focus-visible)) > [role=tooltip] { visibility: visible; opacity: 1; transition: none; }
736
+ }
737
+ :root:has([tooltip]:is(:hover, :has(:focus-visible))) [tooltip]:not(:hover, :has(:focus-visible)) > [role=tooltip] { transition: none; }
738
+
739
+ @keyframes ui-dialog-enter { from { opacity: 0; transform: translateY(var(--space-2)); } }
740
+ @keyframes ui-drawer-enter { from { transform: translateX(var(--slide)); } }
741
+ @keyframes ui-floating-enter { from { opacity: 0; transform: translateY(-2px); } }
742
+
743
+ :where(:scope, *)[tabs] {
744
+ display: grid; gap: var(--space);
745
+ &[tabs-orientation='vertical'] {
746
+ grid-template-columns: auto minmax(0, 1fr);
747
+ [tablist] { flex-direction: column; border: 0; border-inline-end: 1px solid var(--color-border); }
748
+ [tab] {
749
+ text-align: start; border-block-end: 0; border-inline-end: 2px solid transparent;
750
+ &[aria-selected='true'] { border-inline-end-color: var(--color-accent); }
751
+ }
752
+ }
753
+ }
754
+ [tablist] { display: flex; gap: var(--space-3); border-block-end: 1px solid var(--color-border); overflow-x: auto; }
755
+ [tab] {
756
+ flex-shrink: 0; border: 0; border-block-end: 2px solid transparent; padding: var(--space-2) var(--space);
757
+ background: none; color: var(--color-muted); font: inherit; font-weight: var(--weight1); cursor: pointer;
758
+ &[aria-selected='true'] { border-color: var(--color-accent); color: var(--v2); }
759
+ &:hover:not(:disabled) { background: var(--v-3); color: var(--v2); }
760
+ &:disabled { opacity: .5; cursor: default; }
761
+ }
762
+ [tabpanel] {
763
+ min-inline-size: 0;
764
+ &[hidden] { display: none; }
765
+ }
766
+ :where(:scope, *)[accordion] { display: grid; gap: var(--space-2); }
767
+ :where(:scope, *)[disclosure] {
768
+ border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface);
769
+ > summary {
770
+ padding: var(--space-2) var(--space); cursor: pointer; font-weight: var(--weight1);
771
+ &::marker { color: var(--color-muted); }
772
+ &:hover { color: var(--v2); }
773
+ }
774
+ > :not(summary) { padding: var(--space-2) var(--space) var(--space); }
775
+ }
776
+
777
+ :where(:scope, *)[toast] {
778
+ display: flex; align-items: flex-start; gap: var(--space); pointer-events: auto;
779
+ padding: var(--space-2) var(--space);
780
+ animation: ui-toast-lifetime var(--toast-duration) linear forwards;
781
+ &:is(:hover, :focus-within) { animation-play-state: paused; }
782
+ > div { display: grid; gap: var(--space-3); flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
783
+ &[ui-tone]:not([ui-tone='neutral']) { --face: var(--v-3); color: var(--v2); border-color: var(--v-2); }
784
+ }
785
+ :where(:scope, *)[toaster] {
786
+ position: fixed; z-index: 45; inset-block-start: var(--space); inset-inline-end: var(--space);
787
+ display: grid; gap: var(--space-2); inline-size: min(22rem, calc(100vw - 2 * var(--space))); pointer-events: none;
788
+ &[popover] {
789
+ inset: auto; inset-block-start: var(--space); inset-inline-end: var(--space); margin: 0;
790
+ padding: var(--space-3); border: 0; background: none; overflow: visible; color: inherit;
791
+ &:not(:popover-open) { display: none; }
792
+ }
793
+ &:is([toaster-position='bottom-end'], [toaster-position='bottom-start']) { inset-block: auto var(--space); }
794
+ &:is([toaster-position='top-start'], [toaster-position='bottom-start']) { inset-inline: var(--space) auto; }
795
+ }
796
+
797
+ @keyframes ui-toast-lifetime { from { opacity: 1; } to { opacity: 1; } }
798
+ }
799
+ }
800
+
801
+ @layer utilities {
802
+ @scope (:root, [ui]) to ([unstyle]) {
803
+ .ui-visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
804
+ .ui-hidden, :where(:scope, *)[hidden]:not([hidden=until-found]) { display: none !important; }
805
+
806
+ .p-0 { padding: 0; }
807
+ .p-1 { padding: var(--space-3); }
808
+ .p-2 { padding: var(--space-2); }
809
+ .p-3 { padding: var(--space-1); }
810
+ .p-4 { padding: var(--space); }
811
+ .p-6 { padding: var(--space1); }
812
+ .px-0 { padding-inline: 0; }
813
+ .px-1 { padding-inline: var(--space-3); }
814
+ .px-2 { padding-inline: var(--space-2); }
815
+ .px-3 { padding-inline: var(--space-1); }
816
+ .px-4 { padding-inline: var(--space); }
817
+ .px-6 { padding-inline: var(--space1); }
818
+ .py-0 { padding-block: 0; }
819
+ .py-1 { padding-block: var(--space-3); }
820
+ .py-2 { padding-block: var(--space-2); }
821
+ .py-3 { padding-block: var(--space-1); }
822
+ .py-4 { padding-block: var(--space); }
823
+ .py-6 { padding-block: var(--space1); }
824
+ .gap-0 { gap: 0; }
825
+ .gap-1 { gap: var(--space-3); }
826
+ .gap-2 { gap: var(--space-2); }
827
+ .gap-3 { gap: var(--space-1); }
828
+ .gap-4 { gap: var(--space); }
829
+ .gap-6 { gap: var(--space1); }
830
+ .gap-8 { gap: var(--space2); }
831
+ .gap-12 { gap: var(--space3); }
832
+ .mx-auto { margin-inline: auto; }
833
+ .flex { display: flex; }
834
+ .flex-col { flex-direction: column; }
835
+ .flex-wrap { flex-wrap: wrap; }
836
+ .flex-nowrap { flex-wrap: nowrap; }
837
+ .items-start { align-items: start; }
838
+ .items-center { align-items: center; }
839
+ .justify-center { justify-content: center; }
840
+ .justify-between { justify-content: space-between; }
841
+ .justify-end { justify-content: end; }
842
+ .flex-1 { flex: 1; }
843
+ .flex-none { flex: none; }
844
+ .min-w-0 { min-inline-size: 0; }
845
+ .text-center { text-align: center; }
846
+ .text-muted { color: var(--color-muted); }
847
+ .truncate { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
848
+ .tabular-nums { font-variant-numeric: tabular-nums; }
849
+ [responsive-layout] { container: ui-layout / inline-size; }
850
+ @container ui-layout (width < 48rem) { .ui-wide-only { display: none !important; } }
851
+ @container ui-layout (width >= 48rem) { .ui-compact-only { display: none !important; } }
852
+ }
853
+ }