answerstyle 0.1.2__py3-none-any.whl

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,760 @@
1
+ /* Generated by nbdev-export. Edit the source notebooks. */
2
+
3
+ @layer answerstyle.reset, answerstyle.tokens, answerstyle.base, answerstyle.layout, answerstyle.components, answerstyle.utilities;
4
+
5
+ @layer answerstyle.tokens {
6
+ @scope (:root, [ui]) to ([unstyle]) {
7
+ :where(:scope):root {
8
+ color-scheme: light dark;
9
+ --hue: 260; --neutral-hue: 260;
10
+ --hue-danger: 25; --hue-warning: 75; --hue-success: 145; --hue-info: 230;
11
+ }
12
+ :where(:scope, *)[ui-theme=system] { color-scheme: light dark; }
13
+ :where(:scope, *)[ui-theme=light] { color-scheme: light; }
14
+ :where(:scope, *)[ui-theme=dark] { color-scheme: dark; }
15
+ :where(:scope, *)[ui-tone=danger] { --hue: var(--hue-danger); }
16
+ :where(:scope, *)[ui-tone=warning], [prose] mark { --hue: var(--hue-warning); }
17
+ :where(:scope, *)[ui-tone=success] { --hue: var(--hue-success); }
18
+ :where(:scope, *)[ui-tone=info] { --hue: var(--hue-info); }
19
+
20
+ :where(:scope):is(:root, [ui]), :where(:scope, *)[ui-tone], [prose] mark {
21
+ --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) */
22
+ --n-2: light-dark(oklch(0.9506 0.02 var(--neutral-hue)), oklch(0.1434 0.02 var(--neutral-hue))); /* raised surface: cards, inputs */
23
+ --n-1: light-dark(oklch(0.7903 0.02 var(--neutral-hue)), oklch(0.3385 0.02 var(--neutral-hue))); /* hairline borders, separators */
24
+ --n: light-dark(oklch(0.6503 0.02 var(--neutral-hue)), oklch(0.4611 0.02 var(--neutral-hue))); /* disabled text and controls */
25
+ --n1: light-dark(oklch(0.5247 0.02 var(--neutral-hue)), oklch(0.5812 0.02 var(--neutral-hue))); /* muted and placeholder text */
26
+ --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 */
27
+ --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 */
28
+ --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 */
29
+ --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 */
30
+ --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 */
31
+ --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 */
32
+ --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 */
33
+ --color-text: var(--n2); --color-muted: var(--n1);
34
+ --color-background: var(--n-3); --color-surface: var(--n-2); --color-border: var(--n-1);
35
+ --color-accent: var(--v); --color-on-accent: var(--n-3);
36
+ --ring: 2px solid var(--v-1);
37
+ }
38
+ :where(:scope, *)[ui-tone=neutral] {
39
+ --v-3: var(--n-2); --v-2: var(--n-1); --v-1: var(--n); --v: var(--n1); --v1: var(--n2); --v2: var(--n2);
40
+ }
41
+ }
42
+ }
43
+
44
+ @layer answerstyle.tokens {
45
+ @scope (:root, [ui]) to ([unstyle]) {
46
+ :where(:scope):root {
47
+ --font: system-ui, sans-serif;
48
+ --font-mono: ui-monospace, Menlo, Consolas, monospace;
49
+ --text: 1rem;
50
+ --weight: 400; --weight1: 600;
51
+ --leading: 1.5; --leading-1: 1.25;
52
+ --prose-scale: .75;
53
+ --prose-font-scale: 1;
54
+ --prose-leading: 1.45;
55
+ --prose-measure: 65ch;
56
+ --space: 1rem;
57
+ --radius: .5rem; --radius-full: 9999px;
58
+ --relief: 1;
59
+ --motion: 150ms;
60
+ --ease: cubic-bezier(.2, 0, 0, 1);
61
+ }
62
+
63
+ :where(:scope, *), ::before, ::after {
64
+ --text-1: calc(var(--text) * .875);
65
+ --text1: calc(var(--text) * 1.25);
66
+ --text2: calc(var(--text) * 1.5);
67
+ --text3: calc(var(--text) * 2);
68
+ --space-3: calc(var(--space) * .25);
69
+ --space-2: calc(var(--space) * .5);
70
+ --space-1: calc(var(--space) * .75);
71
+ --space1: calc(var(--space) * 1.5);
72
+ --space2: calc(var(--space) * 2);
73
+ --space3: calc(var(--space) * 3);
74
+ --radius-1: calc(var(--radius) * .5);
75
+ --radius1: calc(var(--radius) * 2);
76
+ }
77
+
78
+ @media (prefers-reduced-motion: reduce) { :where(:scope):root { --motion: 0ms; } }
79
+ @keyframes ui-spin { to { rotate: 1turn; } }
80
+ }
81
+ }
82
+
83
+ @layer answerstyle.reset {
84
+ @scope (:root, [ui]) to ([unstyle]) {
85
+ :where(:scope, *), ::before, ::after { box-sizing: border-box; }
86
+ :where(body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, blockquote, pre, figure, figcaption, hr) { margin: 0; }
87
+ :where(button, input, textarea, select) { font: inherit; }
88
+ :where(img, picture, video, canvas, svg) { max-inline-size: 100%; block-size: auto; }
89
+ }
90
+ }
91
+ @layer answerstyle.base {
92
+ @scope (:root, [ui]) to ([unstyle]) {
93
+ :where(:scope):is([ui], :root) { background: var(--color-background); color: var(--color-text); accent-color: var(--color-accent); }
94
+ :where(:scope, *):is([ui], body) { font: var(--weight) var(--text)/var(--leading) var(--font); }
95
+ :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; }
96
+ :where(h1) { font-size: var(--text3); }
97
+ :where(h2) { font-size: var(--text2); }
98
+ :where(h3) { font-size: var(--text1); }
99
+ :where(h4, h5, h6) { font-size: var(--text); }
100
+ :where(a) { color: var(--color-accent); text-underline-offset: .15em; }
101
+ :where(code, kbd, pre, samp) { font-family: var(--font-mono); }
102
+ :where(small) { font-size: var(--text-1); }
103
+ :where(svg.ui-icon, svg[icon], svg:has(> use)) { inline-size: 1.25em; block-size: 1.25em; flex: none; vertical-align: -.25em; }
104
+ .ui-divider { border: 0; border-block-start: 1px solid var(--color-border); }
105
+ }
106
+ }
107
+
108
+ @layer answerstyle.tokens {
109
+ @scope (:root, [ui]) to ([unstyle]) {
110
+ :where(:scope, *)[ui], :where(:scope):root { --face: var(--color-surface); }
111
+ :where(:scope, *), ::before, ::after {
112
+ --tint: oklch(from currentColor l c h / .08);
113
+ --hi: oklch(from var(--face) calc(l + .16) c h / var(--relief));
114
+ --lo: oklch(from var(--face) calc(l - .16) c h / var(--relief));
115
+ --shadow-color: light-dark(rgb(0 0 0 / calc(.12 * var(--relief))), rgb(0 0 0 / calc(.5 * var(--relief))));
116
+ --floating-shadow: light-dark(rgb(0 0 0 / .12), rgb(0 0 0 / .5));
117
+ --bevel: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
118
+ --bevel-in: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
119
+ --raised: 0 2px 4px var(--shadow-color);
120
+ --sunken: inset 0 2px 4px var(--shadow-color);
121
+ --floating: 0 4px 12px var(--floating-shadow), 0 12px 32px var(--floating-shadow);
122
+ }
123
+ }
124
+ }
125
+
126
+ @layer answerstyle.base {
127
+ /* Typography folded in from typrose, based on Tailwind Labs' typography styles.
128
+ * MIT License
129
+ * Copyright (c) 2026 Answer.AI
130
+ *
131
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
132
+ * of this software and associated documentation files (the "Software"), to deal
133
+ * in the Software without restriction, including without limitation the rights
134
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
135
+ * copies of the Software, and to permit persons to whom the Software is
136
+ * furnished to do so, subject to the following conditions:
137
+ *
138
+ * The above copyright notice and this permission notice shall be included in all
139
+ * copies or substantial portions of the Software.
140
+ *
141
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
142
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
143
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
144
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
145
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
146
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
147
+ * SOFTWARE.
148
+ */
149
+
150
+ @scope (:root, [ui]) to ([unstyle]) {
151
+ :where(:scope, *)[prose] {
152
+ --sp: calc(var(--prose-scale) * 1em);
153
+ max-inline-size: var(--prose-measure); overflow-wrap: anywhere;
154
+ font-size: calc(var(--text) * var(--prose-font-scale)); line-height: var(--prose-leading); color: var(--color-text);
155
+
156
+ /* Top margins establish the rhythm; the container owns outer spacing. */
157
+ :where(p, ol, ul, dl) { margin: var(--sp) 0 0; }
158
+ :where(dt) { margin-top: var(--sp); font-weight: 600; }
159
+ :where(dd) { margin-top: calc(var(--sp) * .25); padding-inline-start: 1.375em; }
160
+ :where(li) { margin: calc(var(--sp) * .25) 0 0; }
161
+ :where(ol > li, ul > li) { padding-inline-start: .375em; }
162
+ :where(ol, ul) { padding-inline-start: 1.7em; }
163
+ :where(ol) { list-style-type: decimal; }
164
+ :where(ul) { list-style-type: disc; }
165
+ :where(ol[type="A"], ol[type="A" s]) { list-style-type: upper-alpha; }
166
+ :where(ol[type="a"], ol[type="a" s]) { list-style-type: lower-alpha; }
167
+ :where(ol[type="I"], ol[type="I" s]) { list-style-type: upper-roman; }
168
+ :where(ol[type="i"], ol[type="i" s]) { list-style-type: lower-roman; }
169
+ :where(ol[type="1"]) { list-style-type: decimal; }
170
+ :where(ul ul, ul ol, ol ul, ol ol) { margin: 0; }
171
+ > :where(ul, ol) > li :where(p) { margin: calc(var(--sp) * .5) 0 0; }
172
+ > :where(ul, ol) > li > :where(p:first-child) { margin-top: calc(var(--sp) * .75); }
173
+ :where(ol > li)::marker { font-weight: 400; color: var(--color-muted); }
174
+ :where(ul > li)::marker { color: var(--color-muted); }
175
+ :where(p + ul, p + ol) { margin-top: calc(var(--sp) * .25); }
176
+
177
+ :where(h1) { font-size: 2.25em; font-weight: 800; line-height: 1.1; margin: calc(var(--sp) * 1.4) 0 0; }
178
+ :where(h2) { font-size: 1.5em; font-weight: 700; line-height: 1.3; margin: calc(var(--sp) * 1.4) 0 0; }
179
+ :where(h3) { font-size: 1.25em; font-weight: 600; line-height: 1.4; margin: calc(var(--sp) * 1.2) 0 0; }
180
+ :where(h4, h5, h6) { font-size: 1em; font-weight: 600; line-height: 1.4; margin: calc(var(--sp) * 1.25) 0 0; }
181
+ :where(h1 strong) { font-weight: 900; color: inherit; }
182
+ :where(h2 strong) { font-weight: 800; color: inherit; }
183
+ :where(h3 strong, h4 strong, h5 strong, h6 strong) { font-weight: 700; color: inherit; }
184
+ :where(.lead) { font-size: 1.25em; line-height: 1.6; color: var(--color-muted); margin: var(--sp) 0 0; }
185
+
186
+ :where(a:not([btn])) { color: var(--color-accent); text-decoration: underline; text-underline-offset: .15em; font-weight: 500; }
187
+ :where(a:not([btn]):focus-visible) { outline: var(--ring); outline-offset: 2px; }
188
+ :where(a strong, a code) { color: inherit; }
189
+ :where(strong) { font-weight: 600; }
190
+
191
+ :where(img, picture, video, figure) { margin: calc(var(--sp) * 1.5) 0 0; }
192
+ :where(picture) { display: block; }
193
+ :where(img, video) { display: block; max-inline-size: 100%; block-size: auto; border-radius: var(--radius); }
194
+ :where(figcaption) { font-size: .875em; line-height: 1.4; color: var(--color-muted); margin-top: calc(var(--sp) * .5); }
195
+ :where(small) { font-size: .875em; color: var(--color-muted); }
196
+
197
+ :where(blockquote) {
198
+ font-style: italic; font-weight: 500; margin: calc(var(--sp) * 1.5) 0 0; padding-inline-start: 1em;
199
+ border-inline-start: .25rem solid var(--color-border); quotes: "\201C" "\201D" "\2018" "\2019";
200
+ }
201
+ :where(blockquote strong, blockquote code) { color: inherit; }
202
+
203
+ :where(code, pre, samp) { font-family: var(--font-mono); }
204
+ :where(*:not(pre) > code) {
205
+ font-size: .875em; font-weight: 600; background: var(--color-surface);
206
+ padding: .1em .3rem; border-radius: .25rem; line-height: 1.2rem;
207
+ }
208
+ :where(h1 code, h2 code, h3 code, h4 code, h5 code, h6 code, blockquote code, thead th code) { color: inherit; }
209
+ :where(pre) {
210
+ font-size: inherit; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto;
211
+ padding: .25rem .3rem; border-radius: 5px; background: var(--color-surface); margin: var(--sp) 0 0;
212
+ }
213
+ :where(pre code) { padding: 0; background: none; font: inherit; }
214
+ :where(kbd) {
215
+ font-size: .875em; font-weight: 500; font-family: inherit; padding: .125em .3125em; border-radius: .3125rem;
216
+ box-shadow: 0 0 0 1px var(--color-border), 0 3px 0 var(--color-border);
217
+ }
218
+ :where(mark) { background: var(--v-3); color: var(--v2); padding: .1em .2em; border-radius: var(--radius-1); }
219
+
220
+ /* Prose tables wrap and scroll, independently of the application [table] skin. */
221
+ :where(table) {
222
+ display: block; width: fit-content; max-width: calc(100% + 1em); overflow-x: auto; border-collapse: collapse;
223
+ font-size: .875em; line-height: 1.5; margin: calc(var(--sp) * 2) -.5em 0;
224
+ }
225
+ :where(caption) { width: max-content; max-width: 100%; padding: 0 .5em; }
226
+ :where(th, td) { text-align: start; overflow-wrap: break-word; }
227
+ :where(thead) { border-bottom: 1px solid var(--color-border); }
228
+ :where(thead th) { font-weight: 600; vertical-align: bottom; padding: 0 .5em calc(var(--sp) * .5); }
229
+ :where(thead th strong, thead th code) { color: inherit; }
230
+ :where(tbody tr) { border-bottom: 1px solid var(--color-border); }
231
+ :where(tbody tr:last-child) { border-bottom: 0; }
232
+ :where(tbody td) { vertical-align: baseline; padding: calc(var(--sp) * .5) .5em; }
233
+ :where(tfoot) { border-top: 1px solid var(--color-border); }
234
+ :where(tfoot td) { vertical-align: top; padding: calc(var(--sp) * .5) .5em; }
235
+
236
+ :where(hr) {
237
+ border: 0; margin-top: var(--sp); position: relative; height: 1.25rem;
238
+ background: radial-gradient(circle, transparent 6px, var(--color-border) 6px 8px, transparent 8px) center / 20px 20px no-repeat;
239
+ }
240
+ :where(hr)::before, :where(hr)::after {
241
+ content: ''; position: absolute; top: 50%; width: calc(50% - .75rem); border-bottom: 1px solid var(--color-border);
242
+ }
243
+ :where(hr)::before { inset-inline-start: 0; }
244
+ :where(hr)::after { inset-inline-end: 0; }
245
+
246
+ :where(h1 + *) { margin-top: calc(var(--sp) * 1.5); }
247
+ :where(h2 + *) { margin-top: var(--sp); }
248
+ :where(h3 + *, h4 + *, h5 + *, h6 + *) { margin-top: calc(var(--sp) * .5); }
249
+ :where(picture > img, figure > :not(figcaption)) { margin-top: 0; margin-bottom: 0; }
250
+ > :first-child { margin-top: 0; }
251
+ > :last-child { margin-bottom: 0; }
252
+ }
253
+
254
+ [prose-size=sm] { --prose-scale: .7; --prose-font-scale: .875; }
255
+ [prose-size=lg] { --prose-scale: .8; --prose-font-scale: 1.125; }
256
+ [prose-size=xl] { --prose-scale: .9; --prose-font-scale: 1.25; }
257
+ [prose-size="2xl"] { --prose-scale: 1.1; --prose-font-scale: 1.5; }
258
+ }
259
+ }
260
+
261
+ @layer answerstyle.layout {
262
+ @scope (:root, [ui]) to ([unstyle]) {
263
+ :where(:scope, *):is([stack], [cluster], [grid]) { --gap: var(--space); }
264
+ :where(:scope, *)[stack] { display: flex; flex-direction: column; gap: var(--gap); }
265
+ :where(:scope, *)[cluster] {
266
+ --cluster-wrap: wrap; --cluster-align: center; --cluster-justify: start;
267
+ display: flex; flex-wrap: var(--cluster-wrap); align-items: var(--cluster-align); justify-content: var(--cluster-justify); gap: var(--gap);
268
+ }
269
+ :where(:scope, *)[grid] {
270
+ --grid-min: 16rem; display: grid; gap: var(--gap);
271
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min)), 1fr));
272
+ }
273
+ :where(:scope, *)[grid] > * { min-inline-size: 0; }
274
+ :where(:scope, *):is([stack], [cluster]) > [grow] { flex: 1; min-inline-size: 0; min-block-size: 0; }
275
+ :where(:scope, *):is(ul, ol):is([stack], [cluster], [grid]) { padding: 0; list-style: none; }
276
+ :where(:scope, *)[toolbar] { display: flex; align-items: center; gap: var(--space-2); min-inline-size: 0; }
277
+ }
278
+ }
279
+
280
+ @layer answerstyle.layout {
281
+ @scope (:root, [ui]) to ([unstyle]) {
282
+ :where(:scope, *)[flow] { --flow-space: .5em; display: grid; align-content: start; row-gap: var(--flow-space); }
283
+ :where(:scope, *)[flow] > :is(h1, h2, h3, h4, h5, h6):not(:first-child) { margin-block-start: .5em; }
284
+ }
285
+ }
286
+
287
+ @layer answerstyle.utilities {
288
+ @scope (:root, [ui]) to ([unstyle]) {
289
+ .ui-visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
290
+ .ui-hidden, :where(:scope, *)[hidden]:not([hidden=until-found]) { display: none !important; }
291
+
292
+ .p-1 { padding: var(--space-3); }
293
+ .p-2 { padding: var(--space-2); }
294
+ .p-3 { padding: var(--space-1); }
295
+ .p-4 { padding: var(--space); }
296
+ .px-1 { padding-inline: var(--space-3); }
297
+ .px-2 { padding-inline: var(--space-2); }
298
+ .px-3 { padding-inline: var(--space-1); }
299
+ .px-4 { padding-inline: var(--space); }
300
+ .py-1 { padding-block: var(--space-3); }
301
+ .py-2 { padding-block: var(--space-2); }
302
+ .py-3 { padding-block: var(--space-1); }
303
+ .py-4 { padding-block: var(--space); }
304
+ .gap-1 { gap: var(--space-3); }
305
+ .gap-2 { gap: var(--space-2); }
306
+ .gap-3 { gap: var(--space-1); }
307
+ .gap-4 { gap: var(--space); }
308
+ .flex { display: flex; }
309
+ .flex-col { flex-direction: column; }
310
+ .flex-wrap { flex-wrap: wrap; }
311
+ .items-center { align-items: center; }
312
+ .justify-between { justify-content: space-between; }
313
+ .justify-end { justify-content: end; }
314
+ .flex-1 { flex: 1; }
315
+ .flex-none { flex: none; }
316
+ .min-w-0 { min-width: 0; }
317
+ [responsive-layout] { container: ui-layout / inline-size; }
318
+ @container ui-layout (width < 48rem) { .ui-wide-only { display: none !important; } }
319
+ @container ui-layout (width >= 48rem) { .ui-compact-only { display: none !important; } }
320
+ }
321
+ }
322
+
323
+ @layer answerstyle.components {
324
+ @scope (:root, [ui]) to ([unstyle]) {
325
+ :where(:scope, *)[btn] {
326
+ --face: var(--color-accent);
327
+ --ui-held-face: var(--v2);
328
+ --ui-held-shadow: var(--bevel-in), var(--sunken);
329
+ --ui-pad-block: var(--space-2);
330
+ --ui-pad-inline: var(--space);
331
+ --ui-press: 0px;
332
+ position: relative;
333
+ display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
334
+ padding: calc(var(--ui-pad-block) + var(--ui-press)) calc(var(--ui-pad-inline) - var(--ui-press))
335
+ calc(var(--ui-pad-block) - var(--ui-press)) calc(var(--ui-pad-inline) + var(--ui-press));
336
+ border: 1px solid transparent; border-radius: var(--radius);
337
+ background: var(--face); color: var(--color-on-accent); box-shadow: var(--bevel), var(--raised);
338
+ font: inherit; font-weight: var(--weight1); line-height: var(--leading-1);
339
+ text-align: center; text-decoration: none; cursor: pointer;
340
+ transition: background var(--motion) var(--ease), box-shadow var(--motion) var(--ease), padding calc(var(--motion) / 2) var(--ease), opacity var(--motion) var(--ease);
341
+
342
+ & > :where(span) { display: inline-flex; align-items: center; justify-content: inherit; gap: var(--space-2); }
343
+ &:where(:hover:not(:disabled)) { --face: var(--v1); }
344
+ &:where(:active:not(:disabled)) { --ui-press: calc(1px * var(--relief)); }
345
+ &:where(:focus-visible) { outline: var(--ring); outline-offset: 2px; }
346
+ &:where([btn-size=sm]) { --ui-pad-block: var(--space-3); --ui-pad-inline: var(--space-2); font-size: var(--text-1); }
347
+ &:where([btn-size=lg]) { --ui-pad-block: var(--space-1); --ui-pad-inline: var(--space1); font-size: var(--text1); }
348
+ &:where([btn-variant=secondary]) {
349
+ --face: var(--color-surface); --ui-held-face: var(--color-surface); color: var(--color-text); border-color: var(--color-border);
350
+ &:where(:hover:not(:disabled)) { --face: var(--v-3); }
351
+ &:where([aria-pressed=true], [aria-expanded=true]) { --ui-held-face: var(--v-3); color: var(--v2); }
352
+ }
353
+ &:where([btn-variant=quiet], [btn-variant=editable]) {
354
+ --face: transparent; --ui-held-face: color-mix(in oklch, currentColor 12%, transparent); --ui-held-shadow: none;
355
+ --ui-press: 0px; color: inherit; box-shadow: none;
356
+ &:where(:hover:not(:disabled)) { --face: var(--tint); }
357
+ }
358
+ &:where([btn-variant=editable]) {
359
+ --ui-pad-inline: var(--space-1); inline-size: 100%; justify-content: start; border-color: var(--n); border-style: dashed;
360
+ font-weight: inherit; text-align: start; cursor: text;
361
+ }
362
+ &:where(:is(:active, [aria-busy=true], [aria-pressed=true], [aria-expanded=true]):not(:disabled)) {
363
+ --face: var(--ui-held-face); box-shadow: var(--ui-held-shadow);
364
+ }
365
+ &:where(:disabled) { opacity: .5; box-shadow: none; cursor: default; }
366
+ &:where([aria-busy=true]) {
367
+ -webkit-text-fill-color: transparent;
368
+ & > :where(span, svg) { opacity: 0; }
369
+ &::after {
370
+ content: ''; position: absolute; inset: 0; margin: auto; inline-size: 1.25em; block-size: 1.25em;
371
+ border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: var(--radius-full);
372
+ animation: ui-spin calc(var(--motion) * 5) linear infinite;
373
+ }
374
+ }
375
+ &:where([btn-icon]) { --ui-pad-inline: var(--ui-pad-block); }
376
+ &:where([btn-icon]) > :where(span) { inline-size: 1.25em; block-size: 1.25em; }
377
+ @media (prefers-reduced-motion: reduce) {
378
+ transition: none;
379
+ &:where([aria-busy=true])::after { animation-duration: 2s; }
380
+ }
381
+ }
382
+ }
383
+ }
384
+
385
+ @layer answerstyle.components {
386
+ @scope (:root, [ui]) to ([unstyle]) {
387
+ :where(:scope, *):where([input], [textarea], [select]) {
388
+ --face: var(--color-background);
389
+ inline-size: 100%; min-inline-size: 0; padding: var(--space-2) var(--space-1);
390
+ border: 1px solid var(--color-border); border-radius: var(--radius);
391
+ background: var(--face); color: var(--color-text); box-shadow: var(--bevel-in), var(--sunken);
392
+ font: inherit;
393
+ transition: border-color var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
394
+ &::placeholder { color: var(--color-muted); }
395
+ &:disabled { --face: var(--n-2); color: var(--n); box-shadow: var(--bevel-in); }
396
+ [group] > & { flex: 1; min-inline-size: 0; }
397
+ [group] > &:focus-visible { outline: none; }
398
+ [group][group-variant=inset] > & { border: 0; background: transparent; box-shadow: none; }
399
+ }
400
+ :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch]):is(:user-invalid, [aria-invalid=true]) {
401
+ border-color: light-dark(oklch(52% .18 var(--hue-danger)), oklch(75% .14 var(--hue-danger)));
402
+ }
403
+ :where(:scope, *):where([input][type=number]) {
404
+ appearance: textfield;
405
+ &::-webkit-inner-spin-button, &::-webkit-outer-spin-button { appearance: none; margin: 0; }
406
+ }
407
+ :where(:scope, *):where([textarea]) { min-block-size: 5rem; resize: vertical; field-sizing: content; }
408
+ :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch], [range]):focus-visible { outline: var(--ring); outline-offset: 2px; }
409
+ :where(:scope, *):where([checkbox], [radio]) {
410
+ --face: var(--color-background);
411
+ appearance: none; display: inline-grid; place-content: center; flex: none;
412
+ inline-size: 1.15em; block-size: 1.15em; margin: 0; padding: 0;
413
+ border: 1px solid var(--color-border); border-radius: var(--radius-1);
414
+ background: var(--face); color: var(--color-accent); box-shadow: var(--sunken); vertical-align: middle;
415
+ transition: background var(--motion) var(--ease), border-color var(--motion) var(--ease);
416
+ &::before {
417
+ content: ''; inline-size: .6em; block-size: .6em; background: var(--color-on-accent); scale: 0; transition: scale var(--motion) var(--ease);
418
+ }
419
+ &:disabled { --face: var(--n-2); border-color: var(--n-1); }
420
+ }
421
+ :where(:scope, *):where([checkbox]) {
422
+ &::before { clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
423
+ &:is(:checked, :indeterminate) {
424
+ --face: var(--color-accent); border-color: var(--color-accent);
425
+ &::before { scale: 1; }
426
+ &:disabled { --face: var(--n-1); border-color: var(--n-1); }
427
+ }
428
+ &:indeterminate::before { clip-path: none; block-size: .15em; }
429
+ }
430
+ :where(:scope, *):where([radio]) {
431
+ &, &::before { border-radius: var(--radius-full); }
432
+ &::before { background: var(--color-accent); }
433
+ &:checked {
434
+ border-color: var(--color-accent);
435
+ &::before { scale: 1; }
436
+ &:disabled::before { background: var(--n); }
437
+ }
438
+ }
439
+ :where(:scope, *):where([switch]) {
440
+ --face: var(--color-background);
441
+ appearance: none; display: inline-grid; align-items: center; flex: none;
442
+ inline-size: 2.75em; block-size: 1.5em; margin: 0; padding: 2px;
443
+ border: 1px solid var(--color-border); border-radius: var(--radius-full);
444
+ background: var(--face); box-shadow: var(--bevel-in), var(--sunken); vertical-align: middle;
445
+ transition: background var(--motion) var(--ease), box-shadow var(--motion) var(--ease);
446
+ &::before {
447
+ --face: var(--n-2);
448
+ content: ''; inline-size: calc(1.5em - 6px); block-size: calc(1.5em - 6px); border-radius: var(--radius-full);
449
+ background: var(--face); box-shadow: var(--bevel), var(--raised);
450
+ transition: translate var(--motion) var(--ease), background var(--motion) var(--ease);
451
+ }
452
+ &:checked { --face: var(--color-accent); }
453
+ &:checked::before { translate: 1.25em 0; --face: var(--color-on-accent); }
454
+ &:dir(rtl):checked::before { translate: -1.25em 0; }
455
+ &:disabled { --face: var(--n-2); box-shadow: var(--bevel-in); }
456
+ &:disabled::before { --face: var(--n-1); box-shadow: var(--bevel); }
457
+ }
458
+ :where(:scope, *):where([range]) {
459
+ --ui-track: .6em; --ui-thumb: 1.25em; --ui-range-direction: to right;
460
+ appearance: none; inline-size: 100%; block-size: 1.5em; margin: 0; padding: 0; background: transparent;
461
+ &::-webkit-slider-runnable-track {
462
+ --face: var(--color-background);
463
+ block-size: var(--ui-track); border: 1px solid var(--color-border); border-radius: var(--radius-full);
464
+ 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);
465
+ }
466
+ &::-moz-range-track {
467
+ --face: var(--color-background);
468
+ block-size: var(--ui-track); border: 1px solid var(--color-border); border-radius: var(--radius-full);
469
+ 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);
470
+ }
471
+ &::-webkit-slider-thumb {
472
+ --face: var(--color-accent);
473
+ appearance: none; inline-size: var(--ui-thumb); block-size: var(--ui-thumb); border: 0; border-radius: var(--radius-full);
474
+ margin-block-start: calc((var(--ui-track) - var(--ui-thumb)) / 2 - 1px);
475
+ background: var(--face); box-shadow: var(--bevel), var(--raised);
476
+ }
477
+ &::-moz-range-thumb {
478
+ --face: var(--color-accent);
479
+ inline-size: var(--ui-thumb); block-size: var(--ui-thumb); border: 0; border-radius: var(--radius-full);
480
+ background: var(--face); box-shadow: var(--bevel), var(--raised);
481
+ }
482
+ &:active::-webkit-slider-thumb { box-shadow: var(--bevel-in), var(--sunken); }
483
+ &:active::-moz-range-thumb { box-shadow: var(--bevel-in), var(--sunken); }
484
+ &:disabled { opacity: .5; }
485
+ &:disabled::-webkit-slider-runnable-track { background: linear-gradient(var(--ui-range-direction), var(--n) var(--ui-range-fill, 0%), var(--n-2) 0); }
486
+ &:disabled::-moz-range-track { background: linear-gradient(var(--ui-range-direction), var(--n) var(--ui-range-fill, 0%), var(--n-2) 0); }
487
+ &:disabled::-webkit-slider-thumb { --face: var(--n-1); box-shadow: var(--bevel); }
488
+ &:disabled::-moz-range-thumb { --face: var(--n-1); box-shadow: var(--bevel); }
489
+ &:dir(rtl) { --ui-range-direction: to left; }
490
+ }
491
+ :where(:scope, *)[group] {
492
+ display: inline-flex; align-items: stretch; min-inline-size: 0; border-radius: var(--radius);
493
+ & > :where([btn], [input], [textarea], [select]) {
494
+ border-radius: 0;
495
+ &:first-child { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
496
+ &:last-child { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
497
+ & + :where([btn], [input], [textarea], [select]) { margin-inline-start: -1px; }
498
+ }
499
+ &:where(:has(> :is([input], [textarea], [select]))) { inline-size: 100%; }
500
+ & > :where([btn]) { flex: none; }
501
+ &:where(:has(> :is([input], [textarea], [select]):focus-visible)) { outline: var(--ring); outline-offset: 2px; }
502
+ &[group-variant=inset] {
503
+ --face: var(--color-background);
504
+ align-items: center; padding-inline-end: var(--space-3); border: 1px solid var(--color-border);
505
+ background: var(--face); box-shadow: var(--bevel-in), var(--sunken);
506
+ & > :where([btn], [input], [textarea], [select]) { margin: 0; border-radius: var(--radius-1); }
507
+ & > :where([btn]) { --ui-pad-block: var(--space-3); --ui-pad-inline: var(--space-2); }
508
+ }
509
+ }
510
+ :where(:scope, *)[field] {
511
+ display: grid; gap: var(--space-3); min-inline-size: 0; font-size: var(--text-1);
512
+ & > :where(label) { justify-self: start; font-weight: var(--weight1); }
513
+ & > :where([field-control]) { min-inline-size: 0; }
514
+ & > :where(small) { color: var(--color-muted); font-size: inherit; }
515
+ & > :where(small[ui-tone=danger]) { color: var(--v2); }
516
+ &[field-inline] {
517
+ grid-template-columns: auto 1fr; align-items: center; column-gap: var(--space-2);
518
+ & > :where(label) { grid-column: 2; grid-row: 1; font-weight: var(--weight); }
519
+ & > :where([field-control]) { grid-column: 1; grid-row: 1; display: flex; }
520
+ & > :where(small) { grid-column: 1 / -1; }
521
+ }
522
+ &:where(:has(:disabled)) > :where(label) { color: var(--n); }
523
+ }
524
+ :where(:scope, *):where([fieldset]) {
525
+ min-inline-size: 0; margin: 0; padding: var(--space); border: 1px solid var(--color-border); border-radius: var(--radius);
526
+ & > :where(legend) { padding-inline: var(--space-2); font-weight: var(--weight1); }
527
+ }
528
+ @media (prefers-reduced-motion: reduce) {
529
+ :where(:scope, *):where([input], [textarea], [select], [checkbox], [radio], [switch]), :where([checkbox], [radio], [switch])::before { transition: none; }
530
+ }
531
+ @media (forced-colors: active) {
532
+ :where(:scope, *):where([checkbox], [radio], [switch]) {
533
+ appearance: auto;
534
+ &::before { display: none; }
535
+ }
536
+ :where(:scope, *):where([range]) {
537
+ appearance: auto;
538
+ &::-webkit-slider-thumb { appearance: auto; }
539
+ }
540
+ }
541
+ }
542
+ }
543
+
544
+ @layer answerstyle.components {
545
+ @scope (:root, [ui]) to ([unstyle]) {
546
+ :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); }
547
+ :where(:scope, *)[badge] { display: inline-block; padding: .125em .5em; border-radius: var(--radius-1); background: var(--v-3); color: var(--v2); font-size: var(--text-1); font-weight: var(--weight1); line-height: var(--leading-1); }
548
+ :where(:scope, *)[badge][badge-variant=secondary] { background: var(--color-surface); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border); }
549
+ :where(:scope, *)[avatar] { display: inline-grid; place-items: center; vertical-align: middle; flex: none;
550
+ inline-size: var(--avatar-size, 2.5rem); block-size: var(--avatar-size, 2.5rem); border-radius: var(--radius-full);
551
+ object-fit: cover; background: var(--v-3); color: var(--v2); font-size: calc(var(--avatar-size, 2.5rem) * .4);
552
+ font-weight: var(--weight1); line-height: 1; }
553
+
554
+ [alert] { display: flex; align-items: flex-start; gap: var(--space); padding: var(--space); border: 1px solid var(--v-2);
555
+ border-radius: var(--radius); background: var(--v-3); color: var(--v2); }
556
+ [alert] > [stack] { --gap: var(--space-2); flex: 1; min-inline-size: 0; }
557
+ [progress] { inline-size: 100%; block-size: var(--space-2); accent-color: var(--color-accent); }
558
+ [spinner] { display: inline-flex; align-items: center; gap: var(--space-2); }
559
+ [spinner]::before { content: ""; inline-size: 1em; block-size: 1em; flex: none; border: 2px solid currentColor;
560
+ border-inline-end-color: transparent; border-radius: var(--radius-full); animation: ui-spin calc(var(--motion) * 5) linear infinite; }
561
+ [skeleton] { display: block; inline-size: 100%; block-size: 1em; background: var(--n-1); border-radius: var(--radius-1); }
562
+ @media (prefers-reduced-motion: reduce) { [spinner]::before { animation: none; } }
563
+
564
+ :where(:scope, *)[table-frame] {
565
+ overflow-x: auto; contain: inline-size; background: var(--color-background); border: 1px solid var(--color-border);
566
+ border-radius: var(--radius); box-shadow: var(--raised);
567
+ }
568
+ :where(:scope, *)[table-frame]:focus-visible { outline: var(--ring); outline-offset: 2px; }
569
+ table[table]:where(:scope, *) { inline-size: 100%; border-collapse: separate; border-spacing: 0; }
570
+ table[table] :where(th, td) { padding: var(--space-2) var(--space); text-align: start; }
571
+ table[table] :where(thead th) { color: var(--color-text); font-weight: var(--weight1); border-block-end: 1px solid var(--color-border); }
572
+ table[table] :where(tbody tr + tr > *, tfoot tr > *) { border-block-start: 1px solid var(--color-border); }
573
+ table[table] :where(tfoot th) { font-weight: var(--weight1); }
574
+ table[table] :where(caption) { caption-side: bottom; padding: var(--space-2) var(--space); color: var(--color-muted); font-size: var(--text-1); text-align: start; }
575
+ table[table] :is(th, td)[num] { text-align: end; font-variant-numeric: tabular-nums; }
576
+ [table-frame] table[table] :where(th, td) { white-space: nowrap; }
577
+ [table-frame] table[table] :where(thead th) { background: var(--color-surface); }
578
+ }
579
+ }
580
+
581
+ @layer answerstyle.components {
582
+ @scope (:root, [ui]) to ([unstyle]) {
583
+ :where(:scope, *)[navbar] {
584
+ padding: var(--space-2) var(--space); border-block-end: 1px solid var(--color-border);
585
+ background: var(--color-background); color: var(--color-text);
586
+ }
587
+ [navbar-row] { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space); min-inline-size: 0; }
588
+ [navbar-row] > [navbar-brand] { display: inline-flex; align-items: center; gap: var(--space-3); flex: none; color: inherit;
589
+ font-size: var(--text1); font-weight: var(--weight1); text-decoration: none; white-space: nowrap; }
590
+ [navbar-row] > nav { display: flex; flex-wrap: wrap; gap: var(--space-3); }
591
+ [navbar-row] > nav > a { display: inline-block; padding: var(--space-3) var(--space-2); border-radius: var(--radius-1);
592
+ color: inherit; text-decoration: none; }
593
+ [navbar-row] > nav > a:is(:hover, :focus-visible) { background: var(--tint); }
594
+ [navbar-row] > nav > a[aria-current=page] { background: var(--v-3); color: var(--v2); }
595
+ [navbar-row] > [navbar-end] { display: flex; align-items: center; gap: var(--space-2); flex: none; margin-inline-start: auto; }
596
+ [navbar-row] > [navbar-toggle] { display: none; flex: none; }
597
+ :where(:scope, *)[navbar][navbar-align=center] > [navbar-row] > nav { margin-inline: auto; }
598
+ :where(:scope, *)[navbar][navbar-align=end] > [navbar-row] > nav { margin-inline-start: auto; }
599
+ :where(:scope, *)[navbar]:is([navbar-align=center], [navbar-align=end]) > [navbar-row] > [navbar-end] { margin-inline-start: 0; }
600
+ :where(:scope, *)[navbar][navbar-sticky] { position: sticky; inset-block-start: 0; z-index: 10; }
601
+ :where(:scope, *)[navbar][navbar-vivid] { --face: var(--color-accent); background: var(--face); color: var(--color-on-accent); }
602
+ :where(:scope, *)[navbar][navbar-vivid] > [navbar-row] > nav > a[aria-current=page] { background: var(--tint); color: inherit; }
603
+ :where(:scope, *)[navbar][data-compact]:not([data-fitting]) > [navbar-row] > [navbar-toggle] { display: inline-flex; }
604
+ :where(:scope, *)[navbar][data-compact]:not([data-fitting]) > [navbar-row] > [navbar-end] { margin-inline-start: auto; }
605
+ :where(:scope, *)[navbar][data-compact]:not([data-fitting]) > [navbar-row] > nav { display: none; order: 1; flex-basis: 100%; margin: 0; }
606
+ :where(:scope, *)[navbar][data-compact][data-open]:not([data-fitting]) > [navbar-row] > nav { display: grid; gap: var(--space-2); }
607
+ :where(:scope, *)[navbar][data-fitting] > [navbar-row] { inline-size: max-content; max-inline-size: none; flex-wrap: nowrap; }
608
+ :where(:scope, *)[navbar][data-fitting] > [navbar-row] > nav { flex: none; flex-wrap: nowrap; }
609
+ :where(:scope, *)[navbar][data-fitting][data-compact] > [navbar-row] > [navbar-toggle] { display: inline-flex; position: absolute; }
610
+
611
+ [responsive-toolbar] { flex: 1; min-inline-size: 0; }
612
+ [toolbar-actions], [toolbar-group] { display: flex; align-items: center; gap: var(--space-3); }
613
+ [toolbar-group] + [toolbar-group] { border-inline-start: 1px solid var(--color-border); padding-inline-start: var(--space-2); margin-inline-start: var(--space-3); }
614
+ [toolbar-menu] { display: none; }
615
+ [toolbar-divider] { block-size: 1.25em; border-inline-start: 1px solid var(--color-border); margin-inline: var(--space-3); }
616
+ [toolbar-shortcut] { margin-inline-start: auto; padding-inline-start: var(--space); color: var(--color-muted); font: inherit; font-size: var(--text-1); }
617
+ [responsive-toolbar][data-compact]:not([data-fitting]) > [toolbar-actions] { display: none; }
618
+ [responsive-toolbar][data-compact] > [toolbar-menu] { display: flex; align-items: center; gap: var(--space-3); }
619
+ [responsive-toolbar][data-fitting] > [toolbar-actions] { inline-size: max-content; max-inline-size: none; flex: none; }
620
+ [responsive-toolbar][data-fitting] > [toolbar-menu] { position: absolute; }
621
+
622
+ [breadcrumb] { min-inline-size: 0; }
623
+ [breadcrumb-row] { display: flex; align-items: center; gap: var(--breadcrumb-gap, var(--space-3)); min-inline-size: 0; }
624
+ [breadcrumb-row] > :not([breadcrumb-current]) { flex: none; }
625
+ [breadcrumb-parents] { display: contents; }
626
+ [breadcrumb-parents] > a { flex: none; white-space: nowrap; }
627
+ [breadcrumb-collapse] { display: none; }
628
+ [breadcrumb][data-compact]:not([data-fitting]) [breadcrumb-parents] { display: none; }
629
+ [breadcrumb][data-compact] [breadcrumb-collapse] { display: block; }
630
+ [breadcrumb][data-fitting] [breadcrumb-collapse] { position: absolute; }
631
+ [breadcrumb][data-fitting] > [breadcrumb-row] { inline-size: max-content; max-inline-size: none; }
632
+ [breadcrumb-ancestor] { min-inline-size: 0; overflow-wrap: anywhere; }
633
+ [breadcrumb-current] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
634
+ }
635
+ }
636
+
637
+ @layer answerstyle.components {
638
+ @scope (:root, [ui]) to ([unstyle]) {
639
+ [dialog] {
640
+ --face: var(--color-surface); flex-direction: column; gap: var(--space);
641
+ width: min(32rem, calc(100vw - 2 * var(--space))); max-inline-size: none; max-height: calc(100dvh - 2 * var(--space));
642
+ overflow: auto; padding: var(--space1); background: var(--face); color: var(--color-text);
643
+ border: 1px solid var(--color-border); border-radius: var(--radius1); box-shadow: var(--floating);
644
+ }
645
+ dialog[dialog][open] { display: flex; animation: var(--dialog-entry, ui-dialog-enter) var(--motion) var(--ease); }
646
+ dialog[dialog]::backdrop { background: oklch(from var(--n2) l c h / .4); }
647
+ [dialog] > header { min-block-size: calc(1.25em + var(--space) + 2px); padding-inline-end: calc(1.25em + var(--space) * 2 + 2px); }
648
+ [dialog] > [dialog-close] { position: absolute; inset-block-start: var(--space1); inset-inline-end: var(--space1); }
649
+ [dialog] > header > div { min-width: 0; }
650
+ [dialog] > header h2 { margin: 0; font-size: var(--text1); font-weight: var(--weight1); }
651
+ [dialog] > header p { margin: var(--space-3) 0 0; color: var(--color-muted); }
652
+ [dialog] > footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
653
+ [dialog] > div { min-height: 0; }
654
+ [dialog]:is([dialog-side='start'], [dialog-side='end']) {
655
+ inset: 0; inset-inline-start: auto; translate: none; height: 100dvh; max-height: none;
656
+ width: min(var(--drawer-size, 24rem), 100vw); border-radius: 0; border-block: 0; border-inline-end: 0;
657
+ --dialog-entry: ui-drawer-enter; --slide: 100%;
658
+ }
659
+ [dialog][dialog-side='start'] { inset-inline: 0 auto; border-inline: 0; border-inline-end: 1px solid var(--color-border); --slide: -100%; }
660
+ [dialog][dialog-side='end']:dir(rtl) { --slide: -100%; }
661
+ [dialog][dialog-side='start']:dir(rtl) { --slide: 100%; }
662
+ @media (width < 40rem) {
663
+ [dialog]:is([dialog-side='start'], [dialog-side='end']) { width: 100vw; border: 0; }
664
+ }
665
+
666
+ :is([popup], [dropdown]) {
667
+ --face: var(--color-surface); z-index: 60; overflow: auto; background: var(--face); color: var(--color-text);
668
+ border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--floating);
669
+ position: fixed; inset: auto; margin: 0; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
670
+ position-try-order: most-block-size; max-block-size: calc(100% - 16px);
671
+ }
672
+ [popup] { width: max-content; max-width: min(24rem, calc(100vw - 2 * var(--space))); padding: var(--space); }
673
+ :is([popup], [dropdown]):popover-open { animation: ui-floating-enter var(--motion) var(--ease); }
674
+ [dropdown]:popover-open { display: grid; }
675
+ [dropdown] { min-width: min(12rem, calc(100vw - 2 * var(--space))); padding: var(--space-3); }
676
+ [dropdown] hr { width: 100%; margin-block: var(--space-3); border: 0; border-top: 1px solid var(--color-border); }
677
+ [dropdown] > :not([menu-item], hr, [option-group]) { padding: var(--space-2) var(--space-1); }
678
+ [menu-item] {
679
+ display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: var(--space-2) var(--space-1);
680
+ border: 0; background: none; box-shadow: none; font: inherit; text-align: start;
681
+ border-radius: var(--radius-1); color: inherit; text-decoration: none; cursor: pointer; user-select: none;
682
+ }
683
+ [menu-item]:not(:disabled, [aria-disabled=true]):is(:hover, :focus-visible), [menu-item][aria-pressed=true] { background: var(--v-3); color: var(--v2); }
684
+ [menu-item][ui-tone='danger'] { color: var(--color-accent); }
685
+ [menu-item]:is(:disabled, [aria-disabled=true]) { color: var(--n1); cursor: default; opacity: .55; }
686
+ [menu-label] { font-size: var(--text-1); font-weight: var(--weight1); color: var(--color-muted); padding-block: var(--space-3); }
687
+ [option-group] > summary { padding: var(--space-2) var(--space-1); cursor: pointer; }
688
+ [option-group] > summary > svg { vertical-align: middle; margin-inline-end: var(--space-2); }
689
+ [option-group] > [menu-item] { padding-inline-start: var(--space1); }
690
+ @supports not (position-area: center) {
691
+ :is([popup], [dropdown]) { max-block-size: var(--floating-available-height, calc(100dvh - 16px)); }
692
+ }
693
+
694
+ [tooltip] { display: inline-block; position: relative; }
695
+ [tooltip] > [role=tooltip] {
696
+ z-index: 70; width: max-content; max-width: min(20rem, calc(100vw - 2 * var(--space))); overflow-wrap: anywhere;
697
+ background: var(--n2); color: var(--n-3); border-radius: var(--radius-1); padding: var(--space-3) var(--space-2);
698
+ font-size: var(--text-1); line-height: var(--leading); box-shadow: var(--floating); border: 0;
699
+ position: fixed; inset: auto; position-area: top; position-try-fallbacks: flip-block; margin-bottom: var(--tooltip-gap, 6px);
700
+ visibility: hidden; opacity: 0; transition: opacity var(--motion) var(--ease) 150ms, visibility 0s linear calc(var(--motion) + 150ms);
701
+ }
702
+ [tooltip]:is(:hover, :has(:focus-visible)) > [role=tooltip] { visibility: visible; opacity: 1; transition: none; }
703
+ :root:has([tooltip]:is(:hover, :has(:focus-visible))) [tooltip]:not(:hover, :has(:focus-visible)) > [role=tooltip] { transition: none; }
704
+ @supports not (position-area: center) {
705
+ [tooltip] > [role=tooltip] { position: absolute; inset: auto auto 100% 0; }
706
+ }
707
+
708
+ :is([dialog], [popup], [dropdown], [menu-item], [tab], [tabpanel], [disclosure] > summary):focus-visible {
709
+ outline: var(--ring); outline-offset: 2px;
710
+ }
711
+
712
+ @keyframes ui-dialog-enter { from { opacity: 0; transform: translateY(var(--space-2)); } }
713
+ @keyframes ui-drawer-enter { from { transform: translateX(var(--slide)); } }
714
+ @keyframes ui-floating-enter { from { opacity: 0; transform: translateY(-2px); } }
715
+ }
716
+ }
717
+
718
+ @layer answerstyle.components {
719
+ @scope (:root, [ui]) to ([unstyle]) {
720
+ [tabs] { display: grid; gap: var(--space); }
721
+ [tablist] { display: flex; gap: var(--space-3); border-bottom: 1px solid var(--color-border); overflow-x: auto; }
722
+ [tab] {
723
+ flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; padding: var(--space-2) var(--space);
724
+ background: none; color: var(--color-muted); font: inherit; font-weight: var(--weight1); cursor: pointer;
725
+ }
726
+ [tab][aria-selected='true'] { border-color: var(--color-accent); color: var(--v2); }
727
+ [tab]:hover:not(:disabled) { background: var(--v-3); color: var(--v2); }
728
+ [tab]:disabled { opacity: .5; cursor: default; }
729
+ [tabpanel] { min-width: 0; }
730
+ [tabpanel][hidden] { display: none; }
731
+ [tabs][tabs-orientation='vertical'] { grid-template-columns: auto minmax(0, 1fr); }
732
+ [tabs][tabs-orientation='vertical'] [tablist] { flex-direction: column; border: 0; border-inline-end: 1px solid var(--color-border); }
733
+ [tabs][tabs-orientation='vertical'] [tab] { text-align: start; border-bottom: 0; border-inline-end: 2px solid transparent; }
734
+ [tabs][tabs-orientation='vertical'] [tab][aria-selected='true'] { border-inline-end-color: var(--color-accent); }
735
+ [accordion] { display: grid; gap: var(--space-2); }
736
+ [disclosure] { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
737
+ [disclosure] > summary { padding: var(--space-2) var(--space); cursor: pointer; font-weight: var(--weight1); }
738
+ [disclosure] > summary::marker { color: var(--color-muted); }
739
+ [disclosure] > summary:hover { color: var(--v2); }
740
+ [disclosure] > :not(summary) { padding: var(--space-2) var(--space) var(--space); }
741
+
742
+ [toast] {
743
+ --face: var(--color-surface); display: flex; align-items: flex-start; gap: var(--space); pointer-events: auto;
744
+ padding: var(--space-2) var(--space); border: 1px solid var(--color-border); border-radius: var(--radius);
745
+ background: var(--face); color: var(--color-text); box-shadow: var(--floating);
746
+ animation: ui-toast-lifetime var(--toast-duration) linear forwards;
747
+ }
748
+ [toast]:is(:hover, :focus-within) { animation-play-state: paused; }
749
+ [toast] > div { display: grid; gap: var(--space-3); flex: 1; min-width: 0; overflow-wrap: anywhere; }
750
+ [toast][ui-tone]:not([ui-tone='neutral']) { --face: var(--v-3); color: var(--v2); border-color: var(--v-2); }
751
+ [toaster] {
752
+ position: fixed; z-index: 45; inset-block-start: var(--space); inset-inline-end: var(--space);
753
+ display: grid; gap: var(--space-2); width: min(22rem, calc(100vw - 2 * var(--space))); pointer-events: none;
754
+ }
755
+ [toaster]:is([toaster-position='bottom-end'], [toaster-position='bottom-start']) { inset-block: auto var(--space); }
756
+ [toaster]:is([toaster-position='top-start'], [toaster-position='bottom-start']) { inset-inline: var(--space) auto; }
757
+
758
+ @keyframes ui-toast-lifetime { from { opacity: 1; } to { opacity: 1; } }
759
+ }
760
+ }