hydrateless 0.8.0 → 0.10.0

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.
Files changed (45) hide show
  1. package/README.md +120 -0
  2. package/dist/accordion.css +20 -8
  3. package/dist/alert.css +69 -8
  4. package/dist/avatar.css +8 -14
  5. package/dist/badge.css +9 -1
  6. package/dist/breadcrumb.css +7 -3
  7. package/dist/button.css +48 -28
  8. package/dist/card.css +8 -5
  9. package/dist/checkbox.css +36 -22
  10. package/dist/combobox.css +43 -15
  11. package/dist/command-palette.css +123 -0
  12. package/dist/components.css +1351 -571
  13. package/dist/disclosure.css +27 -29
  14. package/dist/drawer.css +76 -48
  15. package/dist/dropdown.css +138 -22
  16. package/dist/field.css +5 -4
  17. package/dist/hydrateless.css +1581 -1330
  18. package/dist/hydrateless.min.css +1 -1
  19. package/dist/input.css +20 -17
  20. package/dist/kbd.css +4 -3
  21. package/dist/menu.css +106 -45
  22. package/dist/modal.css +63 -14
  23. package/dist/pagination.css +20 -11
  24. package/dist/popover.css +34 -12
  25. package/dist/progress.css +23 -12
  26. package/dist/{radio.css → radio-group.css} +23 -16
  27. package/dist/reset.css +7 -2
  28. package/dist/{segmented.css → segmented-control.css} +24 -12
  29. package/dist/select.css +28 -22
  30. package/dist/separator.css +9 -9
  31. package/dist/skeleton.css +18 -10
  32. package/dist/skip-link.css +13 -8
  33. package/dist/slider.css +66 -25
  34. package/dist/spinner.css +17 -14
  35. package/dist/switch.css +55 -18
  36. package/dist/table.css +100 -15
  37. package/dist/tabs.css +35 -11
  38. package/dist/textarea.css +26 -12
  39. package/dist/theme.css +5 -24
  40. package/dist/toast.css +40 -36
  41. package/dist/toc.css +17 -4
  42. package/dist/tokens.css +208 -183
  43. package/dist/tooltip.css +74 -17
  44. package/package.json +4 -4
  45. package/dist/command.css +0 -102
@@ -1,5 +1,11 @@
1
1
  @layer reset, tokens, theme, components;
2
2
 
3
+ /**
4
+ * Reset: a minimal, opinion-light baseline (border-box sizing, no default
5
+ * margins, inherited form typography). Lives in the lowest layer so any
6
+ * component or author rule wins without specificity games.
7
+ */
8
+
3
9
  @layer reset {
4
10
  *,
5
11
  *::before,
@@ -23,7 +29,7 @@
23
29
 
24
30
  html,
25
31
  body {
26
- height: 100%;
32
+ block-size: 100%;
27
33
  }
28
34
 
29
35
  body {
@@ -37,7 +43,7 @@
37
43
  canvas,
38
44
  svg {
39
45
  display: block;
40
- max-width: 100%;
46
+ max-inline-size: 100%;
41
47
  }
42
48
 
43
49
  input,
@@ -61,88 +67,90 @@
61
67
  @layer tokens {
62
68
  :root {
63
69
  /* Neutral / gray */
64
- --hl-gray-50: hsl(210, 40%, 98%);
65
- --hl-gray-100: hsl(210, 40%, 96%);
66
- --hl-gray-200: hsl(214, 32%, 91%);
67
- --hl-gray-300: hsl(213, 27%, 84%);
68
- --hl-gray-400: hsl(215, 20%, 65%);
69
- --hl-gray-500: hsl(215, 16%, 47%);
70
- --hl-gray-600: hsl(215, 19%, 35%);
71
- --hl-gray-700: hsl(215, 25%, 27%);
72
- --hl-gray-800: hsl(217, 33%, 17%);
73
- --hl-gray-900: hsl(222, 47%, 11%);
74
- --hl-gray-950: hsl(229, 41%, 8%);
70
+ --hl-gray-50: hsl(210deg 40% 98%);
71
+ --hl-gray-100: hsl(210deg 40% 96%);
72
+ --hl-gray-200: hsl(214deg 32% 91%);
73
+ --hl-gray-300: hsl(213deg 27% 84%);
74
+ --hl-gray-400: hsl(215deg 20% 65%);
75
+ --hl-gray-500: hsl(215deg 16% 47%);
76
+ --hl-gray-600: hsl(215deg 19% 35%);
77
+ --hl-gray-700: hsl(215deg 25% 27%);
78
+ --hl-gray-800: hsl(217deg 33% 17%);
79
+ --hl-gray-900: hsl(222deg 47% 11%);
80
+ --hl-gray-950: hsl(229deg 41% 8%);
75
81
 
76
82
  /* Brand / primary (blue) */
77
- --hl-brand-50: hsl(214, 100%, 97%);
78
- --hl-brand-100: hsl(214, 95%, 93%);
79
- --hl-brand-200: hsl(213, 97%, 87%);
80
- --hl-brand-300: hsl(212, 96%, 78%);
81
- --hl-brand-400: hsl(213, 94%, 68%);
82
- --hl-brand-500: hsl(217, 91%, 60%);
83
- --hl-brand-600: hsl(221, 83%, 53%);
84
- --hl-brand-700: hsl(224, 76%, 48%);
85
- --hl-brand-800: hsl(226, 71%, 40%);
86
- --hl-brand-900: hsl(224, 64%, 33%);
87
- --hl-brand-950: hsl(226, 57%, 21%);
83
+ --hl-brand-50: hsl(214deg 100% 97%);
84
+ --hl-brand-100: hsl(214deg 95% 93%);
85
+ --hl-brand-200: hsl(213deg 97% 87%);
86
+ --hl-brand-300: hsl(212deg 96% 78%);
87
+ --hl-brand-400: hsl(213deg 94% 68%);
88
+ --hl-brand-500: hsl(217deg 91% 60%);
89
+ --hl-brand-600: hsl(221deg 83% 53%);
90
+ --hl-brand-700: hsl(224deg 76% 48%);
91
+ --hl-brand-800: hsl(226deg 71% 40%);
92
+ --hl-brand-900: hsl(224deg 64% 33%);
93
+ --hl-brand-950: hsl(226deg 57% 21%);
88
94
 
89
95
  /* Danger (red) */
90
- --hl-red-50: hsl(0, 86%, 97%);
91
- --hl-red-100: hsl(0, 93%, 94%);
92
- --hl-red-200: hsl(0, 96%, 89%);
93
- --hl-red-300: hsl(0, 94%, 82%);
94
- --hl-red-400: hsl(0, 91%, 71%);
95
- --hl-red-500: hsl(0, 84%, 60%);
96
- --hl-red-600: hsl(0, 72%, 51%);
97
- --hl-red-700: hsl(0, 74%, 42%);
98
- --hl-red-800: hsl(0, 70%, 35%);
99
- --hl-red-900: hsl(0, 63%, 31%);
100
- --hl-red-950: hsl(0, 75%, 15%);
96
+ --hl-red-50: hsl(0deg 86% 97%);
97
+ --hl-red-100: hsl(0deg 93% 94%);
98
+ --hl-red-200: hsl(0deg 96% 89%);
99
+ --hl-red-300: hsl(0deg 94% 82%);
100
+ --hl-red-400: hsl(0deg 91% 71%);
101
+ --hl-red-500: hsl(0deg 84% 60%);
102
+ --hl-red-600: hsl(0deg 72% 51%);
103
+ --hl-red-700: hsl(0deg 74% 42%);
104
+ --hl-red-800: hsl(0deg 70% 35%);
105
+ --hl-red-900: hsl(0deg 63% 31%);
106
+ --hl-red-950: hsl(0deg 75% 15%);
101
107
 
102
108
  /* Warning (amber) */
103
- --hl-amber-50: hsl(48, 100%, 96%);
104
- --hl-amber-100: hsl(48, 96%, 89%);
105
- --hl-amber-200: hsl(48, 97%, 77%);
106
- --hl-amber-300: hsl(46, 97%, 65%);
107
- --hl-amber-400: hsl(43, 96%, 56%);
108
- --hl-amber-500: hsl(38, 92%, 50%);
109
- --hl-amber-600: hsl(32, 95%, 44%);
110
- --hl-amber-700: hsl(26, 90%, 37%);
111
- --hl-amber-800: hsl(23, 83%, 31%);
112
- --hl-amber-900: hsl(22, 78%, 26%);
113
- --hl-amber-950: hsl(21, 92%, 14%);
109
+ --hl-amber-50: hsl(48deg 100% 96%);
110
+ --hl-amber-100: hsl(48deg 96% 89%);
111
+ --hl-amber-200: hsl(48deg 97% 77%);
112
+ --hl-amber-300: hsl(46deg 97% 65%);
113
+ --hl-amber-400: hsl(43deg 96% 56%);
114
+ --hl-amber-500: hsl(38deg 92% 50%);
115
+ --hl-amber-600: hsl(32deg 95% 44%);
116
+ --hl-amber-700: hsl(26deg 90% 37%);
117
+ --hl-amber-800: hsl(23deg 83% 31%);
118
+ --hl-amber-900: hsl(22deg 78% 26%);
119
+ --hl-amber-950: hsl(21deg 92% 14%);
114
120
 
115
121
  /* Success (green) */
116
- --hl-green-50: hsl(138, 76%, 97%);
117
- --hl-green-100: hsl(141, 84%, 93%);
118
- --hl-green-200: hsl(141, 79%, 85%);
119
- --hl-green-300: hsl(142, 77%, 73%);
120
- --hl-green-400: hsl(142, 69%, 58%);
121
- --hl-green-500: hsl(142, 71%, 45%);
122
- --hl-green-600: hsl(142, 76%, 36%);
123
- --hl-green-700: hsl(142, 72%, 29%);
124
- --hl-green-800: hsl(143, 64%, 24%);
125
- --hl-green-900: hsl(144, 61%, 20%);
126
- --hl-green-950: hsl(145, 80%, 10%);
122
+ --hl-green-50: hsl(138deg 76% 97%);
123
+ --hl-green-100: hsl(141deg 84% 93%);
124
+ --hl-green-200: hsl(141deg 79% 85%);
125
+ --hl-green-300: hsl(142deg 77% 73%);
126
+ --hl-green-400: hsl(142deg 69% 58%);
127
+ --hl-green-500: hsl(142deg 71% 45%);
128
+ --hl-green-600: hsl(142deg 76% 36%);
129
+ --hl-green-700: hsl(142deg 72% 29%);
130
+ --hl-green-800: hsl(143deg 64% 24%);
131
+ --hl-green-900: hsl(144deg 61% 20%);
132
+ --hl-green-950: hsl(145deg 80% 10%);
127
133
 
128
134
  /* Info (sky) */
129
- --hl-sky-50: hsl(204, 100%, 97%);
130
- --hl-sky-100: hsl(204, 94%, 94%);
131
- --hl-sky-200: hsl(201, 94%, 86%);
132
- --hl-sky-300: hsl(199, 95%, 74%);
133
- --hl-sky-400: hsl(198, 93%, 60%);
134
- --hl-sky-500: hsl(199, 89%, 48%);
135
- --hl-sky-600: hsl(200, 98%, 39%);
136
- --hl-sky-700: hsl(201, 96%, 32%);
137
- --hl-sky-800: hsl(201, 90%, 27%);
138
- --hl-sky-900: hsl(202, 80%, 24%);
139
- --hl-sky-950: hsl(202, 80%, 16%);
135
+ --hl-sky-50: hsl(204deg 100% 97%);
136
+ --hl-sky-100: hsl(204deg 94% 94%);
137
+ --hl-sky-200: hsl(201deg 94% 86%);
138
+ --hl-sky-300: hsl(199deg 95% 74%);
139
+ --hl-sky-400: hsl(198deg 93% 60%);
140
+ --hl-sky-500: hsl(199deg 89% 48%);
141
+ --hl-sky-600: hsl(200deg 98% 39%);
142
+ --hl-sky-700: hsl(201deg 96% 32%);
143
+ --hl-sky-800: hsl(201deg 90% 27%);
144
+ --hl-sky-900: hsl(202deg 80% 24%);
145
+ --hl-sky-950: hsl(202deg 80% 16%);
140
146
  }
141
147
  }
142
148
 
143
149
  /**
144
- * Non-color design scales: spacing, radii, typography, elevation, z-index, and
145
- * motion. These are theme-independent and rarely overridden per component.
150
+ * Non-color design scales: spacing, radii, typography, control sizing, z-index,
151
+ * and motion. These are theme-independent and rarely overridden per component.
152
+ * Elevation (shadows) lives in semantic.css because it changes with the color
153
+ * scheme.
146
154
  */
147
155
 
148
156
  @layer tokens {
@@ -180,7 +188,7 @@
180
188
 
181
189
  /* Typography */
182
190
  --hl-font-sans:
183
- ui-sans-serif,system-ui,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans, -apple-system, 'Segoe UI', roboto, helvetica, arial, sans-serif,
191
+ ui-sans-serif, system-ui, -apple-system, 'Segoe UI', roboto, helvetica, arial, sans-serif,
184
192
  'Apple Color Emoji', 'Segoe UI Emoji';
185
193
  --hl-font-mono:
186
194
  ui-monospace, sfmono-regular, 'SF Mono', menlo, consolas, 'Liberation Mono', monospace;
@@ -200,27 +208,32 @@
200
208
  --hl-font-semibold: 600;
201
209
  --hl-font-bold: 700;
202
210
 
203
- /* Elevation (shadows), tuned for light surfaces */
204
- --hl-shadow-xs: 0 1px 2px 0 hsla(222, 47%, 11%, 0.05);
205
- --hl-shadow-sm: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
206
- --hl-shadow-md:
207
- 0 4px 6px -1px hsla(222, 47%, 11%, 0.1), 0 2px 4px -2px hsla(222, 47%, 11%, 0.1);
208
- --hl-shadow-lg:
209
- 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
210
- --hl-shadow-xl:
211
- 0 20px 25px -5px hsla(222, 47%, 11%, 0.1), 0 8px 10px -6px hsla(222, 47%, 11%, 0.1);
212
-
213
211
  /* Control sizing */
212
+
213
+ /* Shared block size of a default (md) control: buttons, inputs, selects, pagination items. */
214
+ --hl-control-block-size: 2.5rem;
214
215
  --hl-control-height-sm: 2rem;
215
- --hl-control-height-md: 2.5rem;
216
+ --hl-control-height-md: var(--hl-control-block-size);
216
217
  --hl-control-height-lg: 3rem;
217
218
 
219
+ /* Overlay sizing */
220
+
221
+ /* Inline size of side surfaces such as the drawer (capped to the viewport in the component). */
222
+ --hl-overlay-inline-size: 28rem;
223
+
224
+ /* Maximum inline size of a centered modal dialog. */
225
+ --hl-modal-inline-size: 32rem;
226
+
227
+ /* Interaction states */
228
+
229
+ /* Opacity applied to disabled controls, options, and items. */
230
+ --hl-disabled-opacity: 0.5;
231
+
232
+ /* Gap between a control and its focus-visible outline. */
233
+ --hl-focus-offset: 2px;
234
+
218
235
  /* Z-index scale */
219
- --hl-z-base: 0;
220
236
  --hl-z-dropdown: 1000;
221
- --hl-z-sticky: 1100;
222
- --hl-z-drawer: 1200;
223
- --hl-z-modal: 1300;
224
237
  --hl-z-popover: 1400;
225
238
  --hl-z-toast: 1500;
226
239
  --hl-z-tooltip: 1600;
@@ -244,270 +257,244 @@
244
257
 
245
258
  /**
246
259
  * Semantic tokens map the raw palette to roles (surface, text, border, intent
247
- * colors). Components reference only these, so theming and dark mode are a
248
- * matter of remapping a couple dozen variables, never touching component CSS.
260
+ * colors, elevation). Components reference only these, so theming and dark
261
+ * mode are a matter of remapping a couple dozen variables, never touching
262
+ * component CSS.
249
263
  *
250
- * Light is the default in `:root`. Dark applies automatically via
251
- * `prefers-color-scheme` (unless `[data-theme="light"]` opts out) and always
252
- * via `[data-theme="dark"]`.
264
+ * Every color is a `light-dark()` pair resolved by `color-scheme`. The root
265
+ * follows the system preference; `[data-theme="light"]` and
266
+ * `[data-theme="dark"]` pin a scheme on any subtree. This is the single place
267
+ * `color-scheme` is declared, so `theme.css` and components must not repeat it.
253
268
  */
254
269
 
255
270
  @layer tokens {
256
271
  :root {
257
- --hl-bg: var(--hl-gray-50);
258
- --hl-surface: hsl(0, 0%, 100%);
259
- --hl-surface-2: var(--hl-gray-100);
260
- --hl-surface-3: var(--hl-gray-200);
261
- --hl-fg: var(--hl-gray-900);
262
- --hl-fg-muted: var(--hl-gray-600);
272
+ color-scheme: light dark;
273
+
274
+ /* Page and surfaces */
275
+
276
+ /* Document background. */
277
+ --hl-bg: light-dark(var(--hl-gray-50), var(--hl-gray-950));
278
+
279
+ /* Default component surface (cards, inputs, dialogs). */
280
+ --hl-surface: light-dark(hsl(0deg 0% 100%), var(--hl-gray-900));
281
+
282
+ /* One step raised or inset surface (hover, secondary buttons, striped rows). */
283
+ --hl-surface-2: light-dark(var(--hl-gray-100), var(--hl-gray-800));
284
+
285
+ /* Two steps raised or inset surface (tracks, skeletons, active states). */
286
+ --hl-surface-3: light-dark(var(--hl-gray-200), var(--hl-gray-700));
287
+
288
+ /* Text */
289
+
290
+ /* Primary text color. */
291
+ --hl-fg: light-dark(var(--hl-gray-900), var(--hl-gray-50));
292
+
293
+ /* Secondary text (descriptions, captions). */
294
+ --hl-fg-muted: light-dark(var(--hl-gray-600), var(--hl-gray-400));
295
+
296
+ /* Tertiary text (placeholders, separators, disabled hints). */
263
297
  --hl-fg-subtle: var(--hl-gray-500);
264
- --hl-border: var(--hl-gray-200);
265
- --hl-border-strong: var(--hl-gray-300);
266
- --hl-ring: var(--hl-brand-500);
298
+
299
+ /* Borders and focus */
300
+
301
+ /* Default hairline border. */
302
+ --hl-border: light-dark(var(--hl-gray-200), var(--hl-gray-800));
303
+
304
+ /* Border for form controls and emphasized dividers. */
305
+ --hl-border-strong: light-dark(var(--hl-gray-300), var(--hl-gray-700));
306
+
307
+ /* Focus ring color. */
308
+ --hl-ring: light-dark(var(--hl-brand-500), var(--hl-brand-400));
309
+
310
+ /* Complete outline value for `:focus-visible`. */
267
311
  --hl-focus-ring: var(--hl-border-width-2) solid var(--hl-ring);
268
- --hl-primary: var(--hl-brand-600);
269
- --hl-primary-hover: var(--hl-brand-700);
270
- --hl-primary-active: var(--hl-brand-800);
271
- --hl-primary-fg: hsl(0, 0%, 100%);
272
- --hl-primary-subtle: var(--hl-brand-50);
273
- --hl-primary-subtle-fg: var(--hl-brand-700);
312
+
313
+ /* Soft halo used instead of an outline on borderless-focus controls (inputs, sliders). */
314
+ --hl-focus-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
315
+
316
+ /* Intent: primary */
317
+ --hl-primary: light-dark(var(--hl-brand-600), var(--hl-brand-500));
318
+ --hl-primary-hover: light-dark(var(--hl-brand-700), var(--hl-brand-400));
319
+ --hl-primary-active: light-dark(var(--hl-brand-800), var(--hl-brand-300));
320
+ --hl-primary-fg: light-dark(hsl(0deg 0% 100%), var(--hl-gray-950));
321
+ --hl-primary-subtle: light-dark(var(--hl-brand-50), hsl(226deg 57% 21% / 0.5));
322
+ --hl-primary-subtle-fg: light-dark(var(--hl-brand-700), var(--hl-brand-200));
323
+
324
+ /* Intent: danger */
274
325
  --hl-danger: var(--hl-red-600);
275
326
  --hl-danger-hover: var(--hl-red-700);
276
- --hl-danger-fg: hsl(0, 0%, 100%);
277
- --hl-danger-subtle: var(--hl-red-50);
278
- --hl-danger-subtle-fg: var(--hl-red-700);
327
+ --hl-danger-fg: hsl(0deg 0% 100%);
328
+ --hl-danger-subtle: light-dark(var(--hl-red-50), hsl(0deg 63% 31% / 0.35));
329
+ --hl-danger-subtle-fg: light-dark(var(--hl-red-700), var(--hl-red-200));
330
+
331
+ /* Intent: success */
279
332
  --hl-success: var(--hl-green-600);
280
333
  --hl-success-hover: var(--hl-green-700);
281
- --hl-success-fg: hsl(0, 0%, 100%);
282
- --hl-success-subtle: var(--hl-green-50);
283
- --hl-success-subtle-fg: var(--hl-green-700);
334
+ --hl-success-fg: hsl(0deg 0% 100%);
335
+ --hl-success-subtle: light-dark(var(--hl-green-50), hsl(144deg 61% 20% / 0.35));
336
+ --hl-success-subtle-fg: light-dark(var(--hl-green-700), var(--hl-green-200));
337
+
338
+ /* Intent: warning */
284
339
  --hl-warning: var(--hl-amber-500);
285
340
  --hl-warning-hover: var(--hl-amber-600);
286
341
  --hl-warning-fg: var(--hl-gray-950);
287
- --hl-warning-subtle: var(--hl-amber-50);
288
- --hl-warning-subtle-fg: var(--hl-amber-800);
342
+ --hl-warning-subtle: light-dark(var(--hl-amber-50), hsl(22deg 78% 26% / 0.35));
343
+ --hl-warning-subtle-fg: light-dark(var(--hl-amber-800), var(--hl-amber-200));
344
+
345
+ /* Intent: info */
289
346
  --hl-info: var(--hl-sky-600);
290
347
  --hl-info-hover: var(--hl-sky-700);
291
- --hl-info-fg: hsl(0, 0%, 100%);
292
- --hl-info-subtle: var(--hl-sky-50);
293
- --hl-info-subtle-fg: var(--hl-sky-700);
294
- --hl-scrim: hsla(222, 47%, 11%, 0.5);
348
+ --hl-info-fg: hsl(0deg 0% 100%);
349
+ --hl-info-subtle: light-dark(var(--hl-sky-50), hsl(202deg 80% 24% / 0.35));
350
+ --hl-info-subtle-fg: light-dark(var(--hl-sky-700), var(--hl-sky-200));
351
+
352
+ /* Overlays */
353
+
354
+ /* Backdrop behind modal dialogs and drawers. */
355
+ --hl-scrim: light-dark(hsl(222deg 47% 11% / 0.5), hsl(0deg 0% 0% / 0.65));
356
+
357
+ /* Surface of floating layers (menus, popovers, listboxes). */
295
358
  --hl-overlay: var(--hl-surface);
359
+
360
+ /* Shadow of floating layers. */
296
361
  --hl-overlay-shadow: var(--hl-shadow-lg);
362
+
363
+ /* Elevation. `light-dark()` only takes colors, so the scheme-dependent part
364
+ is the shadow color; dark surfaces need denser shadows to read as raised. */
365
+
366
+ /* Shadow color for the faintest elevation step. */
367
+ --hl-shadow-color-faint: light-dark(hsl(222deg 47% 11% / 0.05), hsl(0deg 0% 0% / 0.3));
368
+
369
+ /* Shadow color for every other elevation step. */
370
+ --hl-shadow-color: light-dark(hsl(222deg 47% 11% / 0.1), hsl(0deg 0% 0% / 0.45));
371
+ --hl-shadow-xs: 0 1px 2px 0 var(--hl-shadow-color-faint);
372
+ --hl-shadow-sm: 0 1px 3px 0 var(--hl-shadow-color), 0 1px 2px -1px var(--hl-shadow-color);
373
+ --hl-shadow-md: 0 4px 6px -1px var(--hl-shadow-color), 0 2px 4px -2px var(--hl-shadow-color);
374
+ --hl-shadow-lg: 0 10px 15px -3px var(--hl-shadow-color), 0 4px 6px -4px var(--hl-shadow-color);
375
+ --hl-shadow-xl: 0 20px 25px -5px var(--hl-shadow-color), 0 8px 10px -6px var(--hl-shadow-color);
297
376
  }
298
377
 
299
- /* Dark theme values, shared by auto + manual dark. */
300
- @media (prefers-color-scheme: dark) {
301
- :root:not([data-theme='light']) {
302
- --hl-bg: var(--hl-gray-950);
303
- --hl-surface: var(--hl-gray-900);
304
- --hl-surface-2: var(--hl-gray-800);
305
- --hl-surface-3: var(--hl-gray-700);
306
- --hl-fg: var(--hl-gray-50);
307
- --hl-fg-muted: var(--hl-gray-400);
308
- --hl-fg-subtle: var(--hl-gray-500);
309
- --hl-border: var(--hl-gray-800);
310
- --hl-border-strong: var(--hl-gray-700);
311
- --hl-ring: var(--hl-brand-400);
312
- --hl-primary: var(--hl-brand-500);
313
- --hl-primary-hover: var(--hl-brand-400);
314
- --hl-primary-active: var(--hl-brand-300);
315
- --hl-primary-fg: var(--hl-gray-950);
316
- --hl-primary-subtle: hsla(226, 57%, 21%, 0.5);
317
- --hl-primary-subtle-fg: var(--hl-brand-200);
318
- --hl-danger-subtle: hsla(0, 63%, 31%, 0.35);
319
- --hl-danger-subtle-fg: var(--hl-red-200);
320
- --hl-success-subtle: hsla(144, 61%, 20%, 0.35);
321
- --hl-success-subtle-fg: var(--hl-green-200);
322
- --hl-warning-subtle: hsla(22, 78%, 26%, 0.35);
323
- --hl-warning-subtle-fg: var(--hl-amber-200);
324
- --hl-info-subtle: hsla(202, 80%, 24%, 0.35);
325
- --hl-info-subtle-fg: var(--hl-sky-200);
326
- --hl-scrim: hsla(0, 0%, 0%, 0.65);
327
- --hl-shadow-xs: 0 1px 2px 0 hsla(0, 0%, 0%, 0.3);
328
- --hl-shadow-sm: 0 1px 3px 0 hsla(0, 0%, 0%, 0.4), 0 1px 2px -1px hsla(0, 0%, 0%, 0.4);
329
- --hl-shadow-md: 0 4px 6px -1px hsla(0, 0%, 0%, 0.45), 0 2px 4px -2px hsla(0, 0%, 0%, 0.45);
330
- --hl-shadow-lg: 0 10px 15px -3px hsla(0, 0%, 0%, 0.5), 0 4px 6px -4px hsla(0, 0%, 0%, 0.5);
331
- --hl-shadow-xl:
332
- 0 20px 25px -5px hsla(0, 0%, 0%, 0.55), 0 8px 10px -6px hsla(0, 0%, 0%, 0.55);
333
- }
378
+ /* Pin a scheme for a subtree; `light-dark()` picks the matching side. */
379
+ [data-theme='light'] {
380
+ color-scheme: light;
334
381
  }
335
382
 
336
383
  [data-theme='dark'] {
337
- --hl-bg: var(--hl-gray-950);
338
- --hl-surface: var(--hl-gray-900);
339
- --hl-surface-2: var(--hl-gray-800);
340
- --hl-surface-3: var(--hl-gray-700);
341
- --hl-fg: var(--hl-gray-50);
342
- --hl-fg-muted: var(--hl-gray-400);
343
- --hl-fg-subtle: var(--hl-gray-500);
344
- --hl-border: var(--hl-gray-800);
345
- --hl-border-strong: var(--hl-gray-700);
346
- --hl-ring: var(--hl-brand-400);
347
- --hl-primary: var(--hl-brand-500);
348
- --hl-primary-hover: var(--hl-brand-400);
349
- --hl-primary-active: var(--hl-brand-300);
350
- --hl-primary-fg: var(--hl-gray-950);
351
- --hl-primary-subtle: hsla(226, 57%, 21%, 0.5);
352
- --hl-primary-subtle-fg: var(--hl-brand-200);
353
- --hl-danger-subtle: hsla(0, 63%, 31%, 0.35);
354
- --hl-danger-subtle-fg: var(--hl-red-200);
355
- --hl-success-subtle: hsla(144, 61%, 20%, 0.35);
356
- --hl-success-subtle-fg: var(--hl-green-200);
357
- --hl-warning-subtle: hsla(22, 78%, 26%, 0.35);
358
- --hl-warning-subtle-fg: var(--hl-amber-200);
359
- --hl-info-subtle: hsla(202, 80%, 24%, 0.35);
360
- --hl-info-subtle-fg: var(--hl-sky-200);
361
- --hl-scrim: hsla(0, 0%, 0%, 0.65);
362
- --hl-shadow-xs: 0 1px 2px 0 hsla(0, 0%, 0%, 0.3);
363
- --hl-shadow-sm: 0 1px 3px 0 hsla(0, 0%, 0%, 0.4), 0 1px 2px -1px hsla(0, 0%, 0%, 0.4);
364
- --hl-shadow-md: 0 4px 6px -1px hsla(0, 0%, 0%, 0.45), 0 2px 4px -2px hsla(0, 0%, 0%, 0.45);
365
- --hl-shadow-lg: 0 10px 15px -3px hsla(0, 0%, 0%, 0.5), 0 4px 6px -4px hsla(0, 0%, 0%, 0.5);
366
- --hl-shadow-xl: 0 20px 25px -5px hsla(0, 0%, 0%, 0.55), 0 8px 10px -6px hsla(0, 0%, 0%, 0.55);
367
- }
368
-
369
- /* Windows High Contrast / forced-colors: defer to system colors. */
384
+ color-scheme: dark;
385
+ }
386
+
387
+ /* Windows High Contrast / forced-colors: defer to system colors so every
388
+ role stays legible against the user's palette. Components add borders
389
+ where they normally rely on fills alone. */
370
390
  @media (forced-colors: active) {
371
391
  :root {
392
+ --hl-bg: Canvas;
393
+ --hl-surface: Canvas;
394
+ --hl-surface-2: Canvas;
395
+ --hl-surface-3: Canvas;
396
+ --hl-fg: CanvasText;
397
+ --hl-fg-muted: CanvasText;
398
+ --hl-fg-subtle: GrayText;
372
399
  --hl-border: CanvasText;
373
400
  --hl-border-strong: CanvasText;
374
401
  --hl-ring: Highlight;
402
+ --hl-focus-shadow: 0 0 0 3px Highlight;
375
403
  --hl-primary: Highlight;
376
- --hl-primary-fg: Canvas;
404
+ --hl-primary-fg: HighlightText;
405
+ --hl-primary-subtle: Highlight;
406
+ --hl-primary-subtle-fg: HighlightText;
407
+ --hl-scrim: Canvas;
377
408
  }
378
409
  }
379
410
  }
380
411
 
381
- @layer theme {
382
- :root {
383
- --csstools-color-scheme--light: initial;
384
- color-scheme: light dark;
385
- }
386
- @media (prefers-color-scheme: dark){
387
- :root {
388
- --csstools-color-scheme--light: ;
389
- }
390
- }
391
-
392
- [data-theme='light'] {
393
- --csstools-color-scheme--light: initial;
394
- color-scheme: light;
395
- }
396
-
397
- [data-theme='dark'] {
398
- --csstools-color-scheme--light: ;
399
- color-scheme: dark;
400
- }
412
+ /**
413
+ * Theme: document-level defaults built on the semantic tokens. `color-scheme`
414
+ * and the `[data-theme]` switches live in tokens/semantic.css so this file
415
+ * only has to apply the resolved colors and type to the page.
416
+ */
401
417
 
418
+ @layer theme {
402
419
  body {
403
- background-color: hsl(210, 40%, 98%);
404
420
  background-color: var(--hl-bg);
405
- color: hsl(222, 47%, 11%);
406
421
  color: var(--hl-fg);
407
- font-family: ui-sans-serif,system-ui,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans, -apple-system, 'Segoe UI', roboto, helvetica, arial, sans-serif,
408
- 'Apple Color Emoji', 'Segoe UI Emoji';
409
422
  font-family: var(--hl-font-sans);
410
- font-size: 1rem;
411
423
  font-size: var(--hl-text-base);
412
- line-height: 1.5;
413
424
  line-height: var(--hl-leading-normal);
414
425
  -webkit-font-smoothing: antialiased;
415
426
  }
416
427
 
417
- ::-moz-selection {
418
- background-color: rgba(36, 99, 235, 0.3);
419
- }
420
-
421
428
  ::selection {
422
- background-color: rgba(36, 99, 235, 0.3);
423
- }
424
-
425
- @supports (color: color-mix(in lch, red, blue)){
426
- ::-moz-selection {
427
- background-color: color-mix(in oklab, var(--hl-primary) 30%, transparent);
428
- }
429
- ::selection {
430
429
  background-color: color-mix(in oklab, var(--hl-primary) 30%, transparent);
431
430
  }
432
431
  }
433
- }
434
432
 
435
433
  /* Disclosure & layout */
436
434
 
437
435
  /**
438
436
  * Disclosure: a styled native `<details>`. The class and the `data-hl-disclosure`
439
437
  * attribute (which also opts into the state enhancer) are interchangeable, so
440
- * plain HTML needs only one of them. Exclusive groups need no JavaScript:
441
- * give related disclosures the same `name` attribute.
438
+ * plain HTML needs only one of them.
439
+ *
440
+ * No-JS baseline: fully functional; exclusive groups need only a shared `name`
441
+ * attribute. The enhancer mirrors open state into its API and reads no other
442
+ * attributes.
442
443
  */
443
444
 
444
445
  @layer components {
445
- details.hl-disclosure, details[data-hl-disclosure] {
446
- border: 1px solid hsl(214, 32%, 91%);
447
- border: 1px solid var(--hl-border);
448
- border-radius: 0.5rem;
446
+ details:is(.hl-disclosure, [data-hl-disclosure]) {
447
+ border: var(--hl-border-width) solid var(--hl-border);
449
448
  border-radius: var(--hl-radius-lg);
450
- background: hsl(0, 0%, 100%);
451
449
  background: var(--hl-surface);
452
450
  }
453
451
 
454
- details.hl-disclosure > summary, details[data-hl-disclosure] > summary {
452
+ details:is(.hl-disclosure, [data-hl-disclosure]) > summary {
453
+ display: flex;
454
+ align-items: center;
455
+ gap: var(--hl-space-2);
455
456
  list-style: none;
456
457
  cursor: pointer;
457
- padding: 0.75rem 1rem;
458
458
  padding: var(--hl-space-3) var(--hl-space-4);
459
459
  }
460
460
 
461
- details.hl-disclosure > summary::-webkit-details-marker {
462
- display: none;
463
- }
464
-
465
- details[data-hl-disclosure] > summary::-webkit-details-marker {
461
+ details:is(.hl-disclosure, [data-hl-disclosure]) > summary::-webkit-details-marker {
466
462
  display: none;
467
463
  }
468
464
 
469
- details.hl-disclosure > summary:focus-visible {
470
- outline: 2px solid hsl(217, 91%, 60%);
471
- outline: var(--hl-focus-ring);
472
- outline-offset: 2px;
473
- }
474
-
475
- details[data-hl-disclosure] > summary:focus-visible {
476
- outline: 2px solid hsl(217, 91%, 60%);
465
+ details:is(.hl-disclosure, [data-hl-disclosure]) > summary:focus-visible {
477
466
  outline: var(--hl-focus-ring);
478
- outline-offset: 2px;
467
+ outline-offset: var(--hl-focus-offset);
479
468
  }
480
469
 
481
- details.hl-disclosure > summary::after {
470
+ /* The marker sits at the inline end so it lands on the left under RTL. */
471
+ details:is(.hl-disclosure, [data-hl-disclosure]) > summary::after {
482
472
  content: '\25B8';
483
- float: right;
484
- transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
485
- transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
473
+ margin-inline-start: auto;
474
+ transition: rotate var(--hl-duration-fast) var(--hl-ease-standard);
486
475
  }
487
476
 
488
- details[data-hl-disclosure] > summary::after {
489
- content: '\25B8';
490
- float: right;
491
- transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
492
- transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
477
+ details:is(.hl-disclosure, [data-hl-disclosure])[open] > summary::after {
478
+ rotate: 90deg;
493
479
  }
494
480
 
495
- details.hl-disclosure[open] > summary::after {
496
- transform: rotate(90deg);
481
+ /* Mirror the marker under RTL so it points into the reading direction, and
482
+ rotate the other way so the open state still points down. */
483
+ details:is(.hl-disclosure, [data-hl-disclosure]):dir(rtl) > summary::after {
484
+ scale: -1 1;
497
485
  }
498
486
 
499
- details[data-hl-disclosure][open] > summary::after {
500
- transform: rotate(90deg);
487
+ details:is(.hl-disclosure, [data-hl-disclosure])[open]:dir(rtl) > summary::after {
488
+ rotate: -90deg;
501
489
  }
502
490
 
503
- details.hl-disclosure > .hl-disclosure-panel, details[data-hl-disclosure] > .hl-disclosure-panel {
504
- padding: 0.75rem 1rem 1rem;
491
+ details:is(.hl-disclosure, [data-hl-disclosure]) > .hl-disclosure-panel {
505
492
  padding: var(--hl-space-3) var(--hl-space-4) var(--hl-space-4);
506
493
  }
507
494
  }
508
495
 
509
496
  /**
510
- * Tabs. Two markups are supported and styled together:
497
+ * Tabs: `<div data-hl-tabs>`. Two markups are supported and styled together:
511
498
  *
512
499
  * - CSS-only baseline: `.hl-tablist` of `<label class="hl-tab">` wrapping a
513
500
  * radio, then a `.hl-tabpanels` of `.hl-tabpanel`s. `:has(input:checked)`
@@ -515,40 +502,45 @@
515
502
  * - Enhanced: the enhancer adds `role="tab"`/`tabpanel`, roving focus, and
516
503
  * `aria-selected`, toggles `[hidden]` on panels, and marks the root
517
504
  * `data-hl-ready`, at which point the no-JS rules below stand down.
505
+ * data-hl-tabs: root
506
+ * data-hl-ready: set by the enhancer
507
+ * `aria-orientation="vertical"` on the tablist stacks the tabs at the
508
+ * inline start of the panels.
518
509
  */
519
510
 
520
511
  @layer components {
521
512
  [data-hl-tabs] {
522
- border: 1px solid hsl(214, 32%, 91%);
523
513
  border: var(--hl-border-width) solid var(--hl-border);
524
- border-radius: 0.5rem;
525
514
  border-radius: var(--hl-radius-lg);
526
515
  }
527
516
 
528
517
  .hl-tablist,
529
518
  [data-hl-tabs] [role='tablist'] {
530
519
  display: flex;
531
- gap: 0.5rem;
532
520
  gap: var(--hl-space-2);
533
- padding: 0.5rem;
534
521
  padding: var(--hl-space-2);
535
- border-bottom: 1px solid hsl(214, 32%, 91%);
536
- border-bottom: var(--hl-border-width) solid var(--hl-border);
522
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
523
+ }
524
+
525
+ [data-hl-tabs]:has(> [role='tablist'][aria-orientation='vertical']) {
526
+ display: flex;
527
+ }
528
+
529
+ [data-hl-tabs] [role='tablist'][aria-orientation='vertical'] {
530
+ flex-direction: column;
531
+ border-block-end: 0;
532
+ border-inline-end: var(--hl-border-width) solid var(--hl-border);
537
533
  }
538
534
 
539
535
  .hl-tab,
540
536
  [data-hl-tabs] [role='tab'] {
541
537
  position: relative;
542
- -webkit-appearance: none;
543
- -moz-appearance: none;
544
- appearance: none;
538
+ appearance: none;
545
539
  display: inline-flex;
546
540
  align-items: center;
547
541
  background: transparent;
548
542
  border: 0;
549
- border-radius: 0.25rem;
550
543
  border-radius: var(--hl-radius-sm);
551
- padding: 0.5rem 0.75rem;
552
544
  padding: var(--hl-space-2) var(--hl-space-3);
553
545
  color: inherit;
554
546
  font: inherit;
@@ -558,10 +550,7 @@
558
550
  /* The baseline keeps selection in a visually hidden radio per tab label. */
559
551
  .hl-tab > input[type='radio'] {
560
552
  position: absolute;
561
- top: 0;
562
- right: 0;
563
- bottom: 0;
564
- left: 0;
553
+ inset: 0;
565
554
  margin: 0;
566
555
  opacity: 0;
567
556
  cursor: pointer;
@@ -569,27 +558,24 @@
569
558
 
570
559
  .hl-tab:has(input:checked),
571
560
  [data-hl-tabs] [role='tab'][aria-selected='true'] {
572
- background: hsl(210, 40%, 96%);
573
561
  background: var(--hl-surface-2);
574
562
  }
575
563
 
576
564
  .hl-tab:has(input:focus-visible),
577
565
  [data-hl-tabs] [role='tab']:focus-visible {
578
- outline: 2px solid hsl(217, 91%, 60%);
579
566
  outline: var(--hl-focus-ring);
580
- outline-offset: 2px;
567
+ outline-offset: var(--hl-focus-offset);
581
568
  }
582
569
 
583
570
  .hl-tab:has(input:disabled),
584
571
  [data-hl-tabs] [role='tab'][disabled],
585
572
  [data-hl-tabs] [role='tab'][aria-disabled='true'] {
586
- opacity: 0.5;
573
+ opacity: var(--hl-disabled-opacity);
587
574
  cursor: not-allowed;
588
575
  }
589
576
 
590
577
  .hl-tabpanel,
591
578
  [data-hl-tabs] [role='tabpanel'] {
592
- padding: 1rem;
593
579
  padding: var(--hl-space-4);
594
580
  }
595
581
 
@@ -643,29 +629,53 @@
643
629
  [data-hl-tabs]:not([data-hl-ready]) [role='tabpanel'] ~ [role='tabpanel'] {
644
630
  display: none;
645
631
  }
632
+
633
+ /* Selection is a fill, which forced colors flatten; use the system highlight
634
+ and give every tab an edge. */
635
+ @media (forced-colors: active) {
636
+ .hl-tab,
637
+ [data-hl-tabs] [role='tab'] {
638
+ border: var(--hl-border-width) solid ButtonBorder;
639
+ }
640
+
641
+ .hl-tab:has(input:checked),
642
+ [data-hl-tabs] [role='tab'][aria-selected='true'] {
643
+ background: Highlight;
644
+ color: HighlightText;
645
+ }
646
+ }
646
647
  }
647
648
 
649
+ /**
650
+ * Accordion: `<div data-hl-accordion>` of native `<details>` items, each with a
651
+ * `<summary>` header and an `.hl-accordion-panel` body.
652
+ *
653
+ * No-JS baseline: `<details>` opens and closes on its own; exclusive groups
654
+ * need only a shared `name` attribute. The enhancer adds arrow-key movement
655
+ * between headers and the value API, and reads nothing else from the markup.
656
+ * data-hl-accordion: root (opts into the enhancer)
657
+ */
658
+
648
659
  @layer components {
649
660
  [data-hl-accordion] {
650
- border: 1px solid hsl(214, 32%, 91%);
651
- border: 1px solid var(--hl-border);
652
- border-radius: 0.5rem;
661
+ border: var(--hl-border-width) solid var(--hl-border);
653
662
  border-radius: var(--hl-radius-lg);
654
663
  }
655
664
 
656
665
  [data-hl-accordion] > details {
657
- border-top: 1px solid hsl(214, 32%, 91%);
658
- border-top: 1px solid var(--hl-border);
666
+ border-block-start: var(--hl-border-width) solid var(--hl-border);
659
667
  }
660
668
 
661
669
  [data-hl-accordion] > details:first-child {
662
- border-top: 0;
670
+ border-block-start: 0;
663
671
  }
664
672
 
665
673
  [data-hl-accordion] > details > summary {
674
+ display: flex;
675
+ align-items: center;
676
+ gap: var(--hl-space-2);
666
677
  list-style: none;
667
678
  cursor: pointer;
668
- padding: 0.75rem 1rem;
669
679
  padding: var(--hl-space-3) var(--hl-space-4);
670
680
  }
671
681
 
@@ -674,36 +684,38 @@
674
684
  }
675
685
 
676
686
  [data-hl-accordion] > details > summary:focus-visible {
677
- outline: 2px solid hsl(217, 91%, 60%);
678
687
  outline: var(--hl-focus-ring);
679
- outline-offset: 2px;
688
+ outline-offset: var(--hl-focus-offset);
680
689
  }
681
690
 
691
+ /* The chevron sits at the inline end so it lands on the left under RTL. */
682
692
  [data-hl-accordion] > details > summary::after {
683
693
  content: '\25BE';
684
- float: right;
685
- transform: rotate(0deg);
686
- transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
687
- transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
694
+ margin-inline-start: auto;
695
+ transition: rotate var(--hl-duration-fast) var(--hl-ease-standard);
688
696
  }
689
697
 
690
698
  [data-hl-accordion] > details[open] > summary::after {
691
- transform: rotate(180deg);
699
+ rotate: 180deg;
692
700
  }
693
701
 
694
702
  [data-hl-accordion] > details > .hl-accordion-panel {
695
- padding: 0.75rem 1rem 1rem;
696
703
  padding: var(--hl-space-3) var(--hl-space-4) var(--hl-space-4);
697
704
  }
698
705
  }
699
706
 
707
+ /**
708
+ * Table of contents: `<nav data-hl-toc>` with nested `<ul>` lists of anchor
709
+ * links. With no JavaScript it is a plain link list; the enhancer marks the
710
+ * link for the heading in view with `aria-current="true"`.
711
+ * data-hl-toc: the nav
712
+ * data-hl-content-selector: optional element whose headings are observed
713
+ */
714
+
700
715
  @layer components {
701
716
  nav[data-hl-toc] {
702
- border: 1px solid hsl(214, 32%, 91%);
703
- border: 1px solid var(--hl-border);
704
- border-radius: 0.5rem;
717
+ border: var(--hl-border-width) solid var(--hl-border);
705
718
  border-radius: var(--hl-radius-lg);
706
- padding: 0.75rem;
707
719
  padding: var(--hl-space-3);
708
720
  }
709
721
 
@@ -720,32 +732,40 @@
720
732
 
721
733
  nav[data-hl-toc] a {
722
734
  display: block;
723
- padding: 0.25rem 0.5rem;
724
735
  padding: var(--hl-space-1) var(--hl-space-2);
725
- border-radius: 0.25rem;
726
736
  border-radius: var(--hl-radius-sm);
727
737
  color: inherit;
728
- -webkit-text-decoration: none;
729
738
  text-decoration: none;
730
739
  }
731
740
 
732
741
  nav[data-hl-toc] a:focus-visible {
733
- outline: 2px solid hsl(217, 91%, 60%);
734
742
  outline: var(--hl-focus-ring);
735
- outline-offset: -2px;
743
+ outline-offset: calc(var(--hl-focus-offset) * -1);
736
744
  }
737
745
 
738
746
  nav[data-hl-toc] a[aria-current='true'] {
739
- background: hsl(210, 40%, 96%);
740
747
  background: var(--hl-surface-2);
741
748
  }
742
749
 
743
750
  nav[data-hl-toc] ul ul {
744
- padding-left: 0.75rem;
745
- padding-left: var(--hl-space-3);
751
+ padding-inline-start: var(--hl-space-3);
752
+ }
753
+
754
+ @media (forced-colors: active) {
755
+ nav[data-hl-toc] a[aria-current='true'] {
756
+ background: Highlight;
757
+ color: HighlightText;
758
+ }
746
759
  }
747
760
  }
748
761
 
762
+ /**
763
+ * Breadcrumb: `<nav data-hl-breadcrumb aria-label="Breadcrumb">` wrapping an
764
+ * `<ol>` of links; the current page carries `aria-current="page"`. Pure CSS;
765
+ * there is no enhancer. Order follows the writing direction, so the trail
766
+ * reads right to left under RTL.
767
+ */
768
+
749
769
  @layer components {
750
770
  nav[data-hl-breadcrumb] ol {
751
771
  display: flex;
@@ -754,45 +774,36 @@
754
774
  list-style: none;
755
775
  margin: 0;
756
776
  padding: 0;
757
- gap: 0.25rem;
758
777
  gap: var(--hl-space-1);
759
778
  }
760
779
 
761
780
  nav[data-hl-breadcrumb] li {
762
781
  display: flex;
763
782
  align-items: center;
764
- gap: 0.25rem;
765
783
  gap: var(--hl-space-1);
766
784
  }
767
785
 
768
786
  nav[data-hl-breadcrumb] li + li::before {
769
787
  content: '/';
770
- color: hsl(215, 16%, 47%);
771
788
  color: var(--hl-fg-subtle);
772
789
  }
773
790
 
774
791
  nav[data-hl-breadcrumb] a {
775
- color: hsl(221, 83%, 53%);
776
792
  color: var(--hl-primary);
777
- -webkit-text-decoration: none;
778
793
  text-decoration: none;
779
- border-radius: 0.25rem;
780
794
  border-radius: var(--hl-radius-sm);
781
795
  }
782
796
 
783
797
  nav[data-hl-breadcrumb] a:hover {
784
- -webkit-text-decoration: underline;
785
798
  text-decoration: underline;
786
799
  }
787
800
 
788
801
  nav[data-hl-breadcrumb] a:focus-visible {
789
- outline: 2px solid hsl(217, 91%, 60%);
790
802
  outline: var(--hl-focus-ring);
791
- outline-offset: 2px;
803
+ outline-offset: var(--hl-focus-offset);
792
804
  }
793
805
 
794
806
  nav[data-hl-breadcrumb] [aria-current='page'] {
795
- color: hsl(222, 47%, 11%);
796
807
  color: var(--hl-fg);
797
808
  }
798
809
  }
@@ -800,7 +811,8 @@
800
811
  /**
801
812
  * Pagination: `<nav class="hl-pagination" aria-label="Pagination">` wrapping a
802
813
  * list of `.hl-pagination-item` links/buttons; mark the active page with
803
- * `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps.
814
+ * `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps. Pure CSS;
815
+ * there is no enhancer. Item order follows the writing direction.
804
816
  */
805
817
 
806
818
  @layer components {
@@ -808,7 +820,6 @@
808
820
  display: flex;
809
821
  flex-wrap: wrap;
810
822
  align-items: center;
811
- gap: 0.25rem;
812
823
  gap: var(--hl-space-1);
813
824
  margin: 0;
814
825
  padding: 0;
@@ -819,54 +830,39 @@
819
830
  display: inline-flex;
820
831
  align-items: center;
821
832
  justify-content: center;
822
- gap: 0.25rem;
823
833
  gap: var(--hl-space-1);
824
- min-width: 2.25rem;
825
- height: 2.25rem;
826
- padding-left: 0.5rem;
827
- padding-right: 0.5rem;
828
- padding-left: var(--hl-space-2);
829
- padding-right: var(--hl-space-2);
830
- border: 1px solid transparent;
834
+ min-inline-size: var(--hl-control-block-size);
835
+ block-size: var(--hl-control-block-size);
836
+ padding-inline: var(--hl-space-2);
831
837
  border: var(--hl-border-width) solid transparent;
832
- border-radius: 0.375rem;
833
838
  border-radius: var(--hl-radius-md);
834
839
  background: transparent;
835
- color: hsl(222, 47%, 11%);
836
840
  color: var(--hl-fg);
837
841
  font: inherit;
838
- font-size: 0.875rem;
839
842
  font-size: var(--hl-text-sm);
840
- -webkit-text-decoration: none;
841
843
  text-decoration: none;
842
844
  cursor: pointer;
843
- transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1);
844
845
  transition: background-color var(--hl-duration-fast) var(--hl-ease-standard);
845
846
  }
846
847
 
847
848
  .hl-pagination-item:hover {
848
- background: hsl(210, 40%, 96%);
849
849
  background: var(--hl-surface-2);
850
850
  }
851
851
 
852
852
  .hl-pagination-item:focus-visible {
853
- outline: 2px solid hsl(217, 91%, 60%);
854
853
  outline: var(--hl-focus-ring);
855
- outline-offset: 2px;
854
+ outline-offset: var(--hl-focus-offset);
856
855
  }
857
856
 
858
857
  .hl-pagination-item[aria-current='page'] {
859
- background: hsl(221, 83%, 53%);
860
858
  background: var(--hl-primary);
861
- color: hsl(0, 0%, 100%);
862
859
  color: var(--hl-primary-fg);
863
- font-weight: 500;
864
860
  font-weight: var(--hl-font-medium);
865
861
  }
866
862
 
867
863
  .hl-pagination-item[aria-disabled='true'],
868
864
  .hl-pagination-item:disabled {
869
- opacity: 0.45;
865
+ opacity: var(--hl-disabled-opacity);
870
866
  pointer-events: none;
871
867
  }
872
868
 
@@ -874,214 +870,279 @@
874
870
  display: inline-flex;
875
871
  align-items: center;
876
872
  justify-content: center;
877
- min-width: 2.25rem;
878
- height: 2.25rem;
879
- color: hsl(215, 16%, 47%);
873
+ min-inline-size: var(--hl-control-block-size);
874
+ block-size: var(--hl-control-block-size);
880
875
  color: var(--hl-fg-subtle);
881
876
  -webkit-user-select: none;
882
- -moz-user-select: none;
883
877
  user-select: none;
884
878
  }
879
+
880
+ @media (forced-colors: active) {
881
+ .hl-pagination-item[aria-current='page'] {
882
+ border-color: Highlight;
883
+ }
884
+
885
+ .hl-pagination-item[aria-disabled='true'],
886
+ .hl-pagination-item:disabled {
887
+ color: GrayText;
888
+ }
889
+ }
885
890
  }
886
891
 
887
892
  /**
888
893
  * Separator: `<hr class="hl-separator">` or
889
894
  * `<div class="hl-separator" role="separator" aria-orientation="vertical">`.
895
+ * Pure CSS; there is no enhancer.
896
+ * data-hl-orientation: vertical (alternative to aria-orientation)
890
897
  */
891
898
 
892
899
  @layer components {
893
900
  .hl-separator {
894
901
  flex: none;
895
902
  border: 0;
896
- background: hsl(214, 32%, 91%);
897
903
  background: var(--hl-border);
898
904
  }
899
905
 
900
- .hl-separator:not([aria-orientation='vertical']):not([data-hl-orientation='vertical']) {
901
- width: 100%;
902
- height: 1px;
903
- height: var(--hl-border-width);
904
- margin-top: 1rem;
905
- margin-bottom: 1rem;
906
- margin-top: var(--hl-space-4);
907
- margin-bottom: var(--hl-space-4);
906
+ .hl-separator:not([aria-orientation='vertical'], [data-hl-orientation='vertical']) {
907
+ inline-size: 100%;
908
+ block-size: var(--hl-border-width);
909
+ margin-block: var(--hl-space-4);
908
910
  }
909
911
 
910
912
  .hl-separator[aria-orientation='vertical'],
911
913
  .hl-separator[data-hl-orientation='vertical'] {
912
914
  align-self: stretch;
913
- width: 1px;
914
- width: var(--hl-border-width);
915
- min-height: 1rem;
916
- margin-left: 1rem;
917
- margin-right: 1rem;
918
- margin-left: var(--hl-space-4);
919
- margin-right: var(--hl-space-4);
915
+ inline-size: var(--hl-border-width);
916
+ min-block-size: 1rem;
917
+ margin-inline: var(--hl-space-4);
920
918
  }
921
919
  }
922
920
 
923
921
  /* Overlays */
924
922
 
923
+ /**
924
+ * Modal: a native `<dialog class="hl-modal">` (or `<dialog data-hl-modal>`)
925
+ * with optional `.hl-modal-header`, `.hl-modal-body`, and `.hl-modal-footer`.
926
+ *
927
+ * No-JS baseline: `<button command="show-modal" commandfor="id">` opens it and
928
+ * `command="close"` closes it; Escape and the backdrop are native. The
929
+ * enhancer only adds focus return, backdrop dismiss, and the open API, and
930
+ * reads nothing beyond `data-hl-modal`.
931
+ */
932
+
925
933
  @layer components {
926
- .hl-modal {
934
+ :is(.hl-modal, dialog[data-hl-modal]) {
935
+ inline-size: min(90vi, var(--hl-modal-inline-size));
936
+ max-inline-size: none;
937
+ padding: 0;
927
938
  border: none;
928
- border-radius: 0.5rem;
929
939
  border-radius: var(--hl-radius-lg);
930
- padding: 0;
931
- max-width: min(90vw, 640px);
932
- width: 100%;
933
- background: hsl(0, 0%, 100%);
934
940
  background: var(--hl-surface);
935
- color: hsl(222, 47%, 11%);
936
941
  color: var(--hl-fg);
937
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
938
942
  box-shadow: var(--hl-overlay-shadow);
943
+ transition:
944
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
945
+ translate var(--hl-duration-base) var(--hl-ease-standard),
946
+ display var(--hl-duration-base) allow-discrete,
947
+ overlay var(--hl-duration-base) allow-discrete;
948
+ }
949
+
950
+ /* Closed state doubles as the exit target of the transition. */
951
+ :is(.hl-modal, dialog[data-hl-modal]):not([open]) {
952
+ opacity: 0;
953
+ translate: 0 var(--hl-space-2);
939
954
  }
940
955
 
941
- .hl-modal::backdrop {
942
- background: hsla(222, 47%, 11%, 0.5);
956
+ @starting-style {
957
+ :is(.hl-modal, dialog[data-hl-modal])[open] {
958
+ opacity: 0;
959
+ translate: 0 var(--hl-space-2);
960
+ }
961
+ }
962
+
963
+ :is(.hl-modal, dialog[data-hl-modal])::backdrop {
943
964
  background: var(--hl-scrim);
965
+ opacity: 0;
966
+ transition:
967
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
968
+ display var(--hl-duration-base) allow-discrete,
969
+ overlay var(--hl-duration-base) allow-discrete;
970
+ }
971
+
972
+ :is(.hl-modal, dialog[data-hl-modal])[open]::backdrop {
973
+ opacity: 1;
974
+ }
975
+
976
+ @starting-style {
977
+ :is(.hl-modal, dialog[data-hl-modal])[open]::backdrop {
978
+ opacity: 0;
979
+ }
944
980
  }
945
981
 
946
- .hl-modal .hl-modal-header,
947
- .hl-modal .hl-modal-body,
948
- .hl-modal .hl-modal-footer {
949
- padding: 1rem;
982
+ :is(.hl-modal, dialog[data-hl-modal]) :is(.hl-modal-header, .hl-modal-body, .hl-modal-footer) {
950
983
  padding: var(--hl-space-4);
951
984
  }
952
985
 
953
- .hl-modal .hl-modal-header {
954
- border-bottom: 1px solid hsl(214, 32%, 91%);
955
- border-bottom: 1px solid var(--hl-border);
986
+ :is(.hl-modal, dialog[data-hl-modal]) .hl-modal-header {
987
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
956
988
  }
957
989
 
958
- .hl-modal .hl-modal-footer {
959
- border-top: 1px solid hsl(214, 32%, 91%);
960
- border-top: 1px solid var(--hl-border);
990
+ :is(.hl-modal, dialog[data-hl-modal]) .hl-modal-footer {
991
+ border-block-start: var(--hl-border-width) solid var(--hl-border);
961
992
  }
962
993
 
963
- .hl-modal [command='close']:focus-visible {
964
- outline: 2px solid hsl(217, 91%, 60%);
994
+ /* Interactive children inside the dialog get the standard ring. */
995
+ :is(.hl-modal, dialog[data-hl-modal])
996
+ :is(a, button, input, select, textarea, [tabindex]):focus-visible {
965
997
  outline: var(--hl-focus-ring);
966
- outline-offset: 2px;
998
+ outline-offset: var(--hl-focus-offset);
999
+ }
1000
+
1001
+ /* The dialog loses its shadow in forced colors; a border keeps its edge. */
1002
+ @media (forced-colors: active) {
1003
+ :is(.hl-modal, dialog[data-hl-modal]) {
1004
+ border: var(--hl-border-width) solid CanvasText;
1005
+ }
967
1006
  }
968
1007
  }
969
1008
 
1009
+ /**
1010
+ * Drawer: a native `<dialog class="hl-drawer">` (or `<dialog data-hl-drawer>`)
1011
+ * pinned to one inline edge of the viewport, with optional `.hl-drawer-header`,
1012
+ * `.hl-drawer-body`, and `.hl-drawer-footer`.
1013
+ *
1014
+ * No-JS baseline: `<button command="show-modal" commandfor="id">` opens it and
1015
+ * `command="close"` closes it; Escape is native. The enhancer only adds focus
1016
+ * return, backdrop dismiss, and the open API.
1017
+ * data-hl-side: start | end (default). Logical edges, so they flip under RTL.
1018
+ */
1019
+
970
1020
  @layer components {
971
- dialog.hl-drawer {
972
- border: none;
973
- padding: 0;
974
- width: min(90vw, 360px);
975
- max-height: 100dvh;
1021
+ :is(.hl-drawer, dialog[data-hl-drawer]) {
1022
+ --_slide: 100%;
1023
+
1024
+ inset-block: 0;
1025
+ inset-inline: auto 0;
1026
+ inline-size: min(90vi, var(--hl-overlay-inline-size));
1027
+ block-size: 100dvb;
1028
+ max-block-size: 100dvb;
1029
+ max-inline-size: none;
976
1030
  margin: 0;
977
- background: hsl(0, 0%, 100%);
1031
+ padding: 0;
1032
+ border: none;
978
1033
  background: var(--hl-surface);
979
- color: hsl(222, 47%, 11%);
980
1034
  color: var(--hl-fg);
981
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
982
1035
  box-shadow: var(--hl-overlay-shadow);
1036
+ transition:
1037
+ translate var(--hl-duration-slow) var(--hl-ease-emphasized),
1038
+ display var(--hl-duration-slow) allow-discrete,
1039
+ overlay var(--hl-duration-slow) allow-discrete;
983
1040
  }
984
1041
 
985
- dialog.hl-drawer::backdrop {
986
- background: hsla(222, 47%, 11%, 0.5);
987
- background: var(--hl-scrim);
988
- }
1042
+ :is(.hl-drawer, dialog[data-hl-drawer])[data-hl-side='start'] {
1043
+ --_slide: -100%;
989
1044
 
990
- .hl-drawer[open] {
991
- animation: hl-drawer-in-right 180ms cubic-bezier(0.2, 0, 0, 1);
992
- animation: hl-drawer-in-right var(--hl-duration-base) var(--hl-ease-standard);
1045
+ inset-inline: 0 auto;
993
1046
  }
994
1047
 
995
- @keyframes hl-drawer-in-right {
996
- from {
997
- transform: translateX(100%);
998
- }
1048
+ /* `translate` is physical, so the slide direction mirrors under RTL. */
1049
+ :is(.hl-drawer, dialog[data-hl-drawer]):dir(rtl) {
1050
+ --_slide: -100%;
1051
+ }
999
1052
 
1000
- to {
1001
- transform: translateX(0%);
1002
- }
1053
+ :is(.hl-drawer, dialog[data-hl-drawer])[data-hl-side='start']:dir(rtl) {
1054
+ --_slide: 100%;
1003
1055
  }
1004
1056
 
1005
- @keyframes hl-drawer-in-left {
1006
- from {
1007
- transform: translateX(-100%);
1008
- }
1057
+ /* Closed state doubles as the exit target of the slide. */
1058
+ :is(.hl-drawer, dialog[data-hl-drawer]):not([open]) {
1059
+ translate: var(--_slide) 0;
1060
+ }
1009
1061
 
1010
- to {
1011
- transform: translateX(0%);
1012
- }
1062
+ /* A column so the body scrolls between a fixed header and footer. */
1063
+ :is(.hl-drawer, dialog[data-hl-drawer])[open] {
1064
+ display: flex;
1065
+ flex-direction: column;
1013
1066
  }
1014
1067
 
1015
- @media (prefers-reduced-motion: reduce) {
1016
- .hl-drawer[open] {
1017
- animation: none;
1068
+ @starting-style {
1069
+ :is(.hl-drawer, dialog[data-hl-drawer])[open] {
1070
+ translate: var(--_slide) 0;
1018
1071
  }
1019
1072
  }
1020
1073
 
1021
- .hl-drawer[data-side='left'] {
1022
- width: auto;
1023
- top: 0;
1024
- right: auto;
1025
- bottom: 0;
1026
- left: 0;
1074
+ :is(.hl-drawer, dialog[data-hl-drawer])::backdrop {
1075
+ background: var(--hl-scrim);
1076
+ opacity: 0;
1077
+ transition:
1078
+ opacity var(--hl-duration-slow) var(--hl-ease-standard),
1079
+ display var(--hl-duration-slow) allow-discrete,
1080
+ overlay var(--hl-duration-slow) allow-discrete;
1027
1081
  }
1028
1082
 
1029
- .hl-drawer[data-side='left'][open] {
1030
- animation-name: hl-drawer-in-left;
1083
+ :is(.hl-drawer, dialog[data-hl-drawer])[open]::backdrop {
1084
+ opacity: 1;
1031
1085
  }
1032
1086
 
1033
- .hl-drawer[data-side='right'] {
1034
- width: auto;
1035
- top: 0;
1036
- right: 0;
1037
- bottom: 0;
1038
- left: auto;
1087
+ @starting-style {
1088
+ :is(.hl-drawer, dialog[data-hl-drawer])[open]::backdrop {
1089
+ opacity: 0;
1090
+ }
1039
1091
  }
1040
1092
 
1041
- .hl-drawer .hl-drawer-header,
1042
- .hl-drawer .hl-drawer-body,
1043
- .hl-drawer .hl-drawer-footer {
1044
- padding: 1rem;
1093
+ :is(.hl-drawer, dialog[data-hl-drawer])
1094
+ :is(.hl-drawer-header, .hl-drawer-body, .hl-drawer-footer) {
1045
1095
  padding: var(--hl-space-4);
1046
1096
  }
1047
1097
 
1048
- .hl-drawer .hl-drawer-header {
1049
- border-bottom: 1px solid hsl(214, 32%, 91%);
1050
- border-bottom: 1px solid var(--hl-border);
1098
+ :is(.hl-drawer, dialog[data-hl-drawer]) .hl-drawer-body {
1099
+ flex: 1 1 auto;
1100
+ overflow-y: auto;
1101
+ }
1102
+
1103
+ :is(.hl-drawer, dialog[data-hl-drawer]) .hl-drawer-header {
1104
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
1051
1105
  }
1052
1106
 
1053
- .hl-drawer .hl-drawer-footer {
1054
- border-top: 1px solid hsl(214, 32%, 91%);
1055
- border-top: 1px solid var(--hl-border);
1107
+ :is(.hl-drawer, dialog[data-hl-drawer]) .hl-drawer-footer {
1108
+ border-block-start: var(--hl-border-width) solid var(--hl-border);
1109
+ }
1110
+
1111
+ /* Interactive children inside the drawer get the standard ring. */
1112
+ :is(.hl-drawer, dialog[data-hl-drawer])
1113
+ :is(a, button, input, select, textarea, [tabindex]):focus-visible {
1114
+ outline: var(--hl-focus-ring);
1115
+ outline-offset: var(--hl-focus-offset);
1056
1116
  }
1057
1117
  }
1058
1118
 
1059
1119
  /**
1060
1120
  * Popover: a `[popover] [data-hl-popover]` surface opened by a
1061
- * `<button popovertarget="…">` (or `command="toggle-popover"`). The browser
1062
- * owns the top layer, light-dismiss, and Escape with no JavaScript; the
1063
- * enhancer only mirrors `aria-expanded`, adds optional hover, and runs the JS
1064
- * positioning fallback on engines without CSS anchor positioning.
1121
+ * `<button popovertarget="...">` (or `command="toggle-popover"`).
1122
+ *
1123
+ * No-JS baseline: the browser owns the top layer, light dismiss, and Escape,
1124
+ * so the popover is fully usable with `popover` and `popovertarget` in the
1125
+ * markup. The enhancer only mirrors `aria-expanded`, adds optional hover, and
1126
+ * runs the JS positioning fallback on engines without CSS anchor positioning.
1127
+ * data-hl-popover: the surface (opts into the enhancer)
1065
1128
  */
1066
1129
 
1067
1130
  @layer components {
1068
1131
  [data-hl-popover] {
1069
1132
  margin: 0;
1070
- width: -moz-max-content;
1071
- width: max-content;
1072
- max-width: min(92vw, 22rem);
1073
- border: 1px solid hsl(214, 32%, 91%);
1133
+ inline-size: max-content;
1134
+ max-inline-size: min(92vi, 22rem);
1074
1135
  border: var(--hl-border-width) solid var(--hl-border);
1075
- border-radius: 0.5rem;
1076
1136
  border-radius: var(--hl-radius-lg);
1077
- padding: 0.75rem;
1078
1137
  padding: var(--hl-space-3);
1079
- background: hsl(0, 0%, 100%);
1080
1138
  background: var(--hl-surface);
1081
- color: hsl(222, 47%, 11%);
1082
1139
  color: var(--hl-fg);
1083
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
1084
1140
  box-shadow: var(--hl-overlay-shadow);
1141
+ transition:
1142
+ opacity var(--hl-duration-fast) var(--hl-ease-standard),
1143
+ translate var(--hl-duration-fast) var(--hl-ease-standard),
1144
+ display var(--hl-duration-fast) allow-discrete,
1145
+ overlay var(--hl-duration-fast) allow-discrete;
1085
1146
  }
1086
1147
 
1087
1148
  /* Until the `popover` attribute is present (author omitted it and JS hasn't
@@ -1090,11 +1151,21 @@
1090
1151
  display: none;
1091
1152
  }
1092
1153
 
1093
- /* Engines without the Popover API can't promote it to the top layer, so the
1094
- JS fallback positions it; give it a stacking context to land above content. */
1154
+ /* Closed state and exit target. Engines without the Popover API can't
1155
+ promote it to the top layer, so the JS fallback positions it; the z-index
1156
+ lands it above content. Those engines drop this rule, so nothing is
1157
+ hidden by accident. */
1095
1158
  [data-hl-popover]:not(:popover-open) {
1096
- z-index: 1400;
1097
1159
  z-index: var(--hl-z-popover);
1160
+ opacity: 0;
1161
+ translate: 0 -0.25rem;
1162
+ }
1163
+
1164
+ @starting-style {
1165
+ [data-hl-popover]:popover-open {
1166
+ opacity: 0;
1167
+ translate: 0 -0.25rem;
1168
+ }
1098
1169
  }
1099
1170
 
1100
1171
  /* Modern placement: anchor to the invoking control (the popover's implicit
@@ -1103,24 +1174,34 @@
1103
1174
  @supports (position-area: block-end) {
1104
1175
  [data-hl-popover] {
1105
1176
  position: fixed;
1106
- inset-area: block-end;
1107
1177
  position-area: block-end;
1108
1178
  position-try-fallbacks: flip-block, flip-inline;
1109
- margin-top: 0.25rem;
1110
- margin-bottom: 0.25rem;
1111
- margin-top: var(--hl-space-1);
1112
- margin-bottom: var(--hl-space-1);
1179
+ margin-block: var(--hl-space-1);
1113
1180
  }
1114
1181
  }
1182
+
1183
+ /* Interactive children inside the surface get the standard ring. */
1184
+ [data-hl-popover] :is(a, button, input, select, textarea, [tabindex]):focus-visible {
1185
+ outline: var(--hl-focus-ring);
1186
+ outline-offset: var(--hl-focus-offset);
1187
+ }
1115
1188
  }
1116
1189
 
1117
1190
  /**
1118
1191
  * Tooltip: a `[role="tooltip"]` element described by a `[data-hl-tooltip]`
1119
- * trigger. With no JavaScript it shows on the trigger's `:hover`/`:focus-visible`
1120
- * (the tip must be the trigger's next sibling). When the enhancer runs it marks
1121
- * the trigger `data-hl-tooltip-managed` and drives visibility through
1122
- * `data-hl-tooltip-open` instead, adding show/hide delays, a grace period, and
1123
- * Escape-to-dismiss.
1192
+ * trigger.
1193
+ *
1194
+ * No-JS baseline: the tip (the trigger's next sibling, carrying `hidden`)
1195
+ * shows on the trigger's `:hover`/`:focus-visible`. When the enhancer runs it
1196
+ * marks the trigger `data-hl-tooltip-managed`, promotes the tip to a
1197
+ * `popover="manual"` in the top layer where available (otherwise toggles
1198
+ * `hidden`), and drives visibility through `data-hl-tooltip-open` with show
1199
+ * and hide delays, a grace period, and Escape to dismiss.
1200
+ * data-hl-tooltip: the trigger
1201
+ * data-hl-placement: top (default) | bottom | start | end, on the trigger
1202
+ * data-hl-side: the resolved side, set on the tip by the enhancer
1203
+ * data-hl-tooltip-managed: set on the trigger by the enhancer
1204
+ * data-hl-tooltip-open: set on the tip while shown
1124
1205
  */
1125
1206
 
1126
1207
  @layer components {
@@ -1128,57 +1209,108 @@
1128
1209
  /* Fallback placement: the JS positioner writes inline position/inset on
1129
1210
  engines without CSS anchor positioning. */
1130
1211
  position: absolute;
1131
- z-index: 1600;
1132
1212
  z-index: var(--hl-z-tooltip);
1133
- width: -moz-max-content;
1134
- width: max-content;
1135
- max-width: 32ch;
1213
+ inline-size: max-content;
1214
+ max-inline-size: 32ch;
1136
1215
  margin: 0;
1137
- padding: 0.25rem 0.5rem;
1138
1216
  padding: var(--hl-space-1) var(--hl-space-2);
1139
- border-radius: 0.25rem;
1217
+ border: 0;
1140
1218
  border-radius: var(--hl-radius-sm);
1141
- background: hsl(222, 47%, 11%);
1142
1219
  background: var(--hl-fg);
1143
- color: hsl(0, 0%, 100%);
1144
1220
  color: var(--hl-surface);
1145
- font-size: 0.875rem;
1146
1221
  font-size: var(--hl-text-sm);
1222
+ opacity: 0;
1223
+ translate: 0 0.25rem;
1224
+ transition:
1225
+ opacity var(--hl-duration-fast) var(--hl-ease-standard),
1226
+ translate var(--hl-duration-fast) var(--hl-ease-standard),
1227
+ display var(--hl-duration-fast) allow-discrete,
1228
+ overlay var(--hl-duration-fast) allow-discrete;
1147
1229
  }
1148
1230
 
1149
1231
  [role='tooltip'][hidden] {
1150
1232
  display: none;
1151
1233
  }
1152
1234
 
1153
- /* No-JS baseline: reveal while the adjacent trigger is hovered or focused.
1154
- Suppressed once the enhancer takes over (trigger gains -managed). */
1155
- [data-hl-tooltip]:not([data-hl-tooltip-managed]):hover + [role='tooltip'],
1156
- [data-hl-tooltip]:not([data-hl-tooltip-managed]):focus-visible + [role='tooltip'] {
1235
+ /* Shown states: the enhanced popover, the enhanced `hidden` fallback, and
1236
+ the no-JS hover/focus baseline (suppressed once the trigger is managed). */
1237
+ [role='tooltip']:is(:popover-open, [data-hl-tooltip-open]),
1238
+ [data-hl-tooltip]:not([data-hl-tooltip-managed]):is(:hover, :focus-visible) + [role='tooltip'] {
1157
1239
  display: block;
1240
+ opacity: 1;
1241
+ translate: 0 0;
1158
1242
  }
1159
1243
 
1160
- /* Modern placement: pin above the trigger via the anchor-name the enhancer
1161
- sets, flipping below when there's no room. */
1244
+ @starting-style {
1245
+ [role='tooltip']:is(:popover-open, [data-hl-tooltip-open]),
1246
+ [data-hl-tooltip]:not([data-hl-tooltip-managed]):is(:hover, :focus-visible) + [role='tooltip'] {
1247
+ opacity: 0;
1248
+ translate: 0 0.25rem;
1249
+ }
1250
+ }
1251
+
1252
+ /* Modern placement: pin to the requested side of the trigger via the
1253
+ anchor-name the enhancer sets, flipping when there's no room. The side
1254
+ comes from `data-hl-side` on the tip (enhanced) or `data-hl-placement` on
1255
+ the preceding trigger (no-JS baseline). */
1162
1256
  @supports (anchor-name: --x) {
1163
1257
  [role='tooltip'] {
1164
1258
  position: fixed;
1165
- inset-area: block-start;
1259
+ inset: auto;
1166
1260
  position-area: block-start;
1167
1261
  position-try-fallbacks: flip-block;
1168
- margin-top: 0.25rem;
1169
- margin-bottom: 0.25rem;
1170
- margin-top: var(--hl-space-1);
1171
- margin-bottom: var(--hl-space-1);
1262
+ margin-block: var(--hl-space-1);
1263
+ }
1264
+
1265
+ [role='tooltip'][data-hl-side='bottom'],
1266
+ [data-hl-tooltip][data-hl-placement^='bottom'] + [role='tooltip'] {
1267
+ position-area: block-end;
1268
+ }
1269
+
1270
+ [role='tooltip']:is([data-hl-side='start'], [data-hl-side='end']),
1271
+ [data-hl-tooltip]:is([data-hl-placement^='start'], [data-hl-placement^='end'])
1272
+ + [role='tooltip'] {
1273
+ position-try-fallbacks: flip-inline;
1274
+ margin-block: 0;
1275
+ margin-inline: var(--hl-space-1);
1276
+ translate: 0 0;
1277
+ }
1278
+
1279
+ [role='tooltip'][data-hl-side='start'],
1280
+ [data-hl-tooltip][data-hl-placement^='start'] + [role='tooltip'] {
1281
+ position-area: inline-start;
1282
+ }
1283
+
1284
+ [role='tooltip'][data-hl-side='end'],
1285
+ [data-hl-tooltip][data-hl-placement^='end'] + [role='tooltip'] {
1286
+ position-area: inline-end;
1287
+ }
1288
+ }
1289
+
1290
+ /* Inverted colors flatten away; keep a visible edge on the system canvas. */
1291
+ @media (forced-colors: active) {
1292
+ [role='tooltip'] {
1293
+ border: var(--hl-border-width) solid CanvasText;
1172
1294
  }
1173
1295
  }
1174
1296
  }
1175
1297
 
1176
1298
  /**
1177
1299
  * Dropdown menu button: `<div data-hl-dropdown>` wrapping a
1178
- * `[data-hl-dropdown-trigger]` button and a `[data-hl-dropdown-menu]` list. The
1179
- * enhancer turns the menu into a native `popover` the trigger controls through
1180
- * `popovertarget`, so opening, Escape, and light-dismiss need no JavaScript;
1181
- * the menu lives in the top layer and is placed with CSS anchor positioning.
1300
+ * `[data-hl-dropdown-trigger]` button and a `[data-hl-dropdown-menu]` list.
1301
+ *
1302
+ * No-JS baseline: the menu is a native `popover` and the trigger points at it
1303
+ * with `popovertarget`, so opening, Escape, and light dismiss work before any
1304
+ * script runs; both attributes must be in the markup. The enhancer adds arrow
1305
+ * keys, typeahead, checkable items, and focus return, and reads:
1306
+ * data-hl-dropdown: root
1307
+ * data-hl-dropdown-trigger: the button
1308
+ * data-hl-dropdown-menu: the `<ul>` (or any list) of items
1309
+ * data-hl-value: an item's value for `hl:select`
1310
+ * Items are `role="menuitem"`, `menuitemcheckbox`, or `menuitemradio`, either
1311
+ * directly in the list, inside `<li>`, or inside `<li><ul role="group">`. An
1312
+ * item followed by a sibling `<ul role="menu">` (or `[data-hl-submenu]`) opens
1313
+ * it as a nested submenu to the inline-end side.
1182
1314
  */
1183
1315
 
1184
1316
  @layer components {
@@ -1188,87 +1320,189 @@
1188
1320
 
1189
1321
  [data-hl-dropdown-menu] {
1190
1322
  margin: 0;
1191
- min-width: 10rem;
1192
- border: 1px solid hsl(214, 32%, 91%);
1323
+ min-inline-size: 10rem;
1193
1324
  border: var(--hl-border-width) solid var(--hl-border);
1194
- border-radius: 0.5rem;
1195
1325
  border-radius: var(--hl-radius-lg);
1196
- background: hsl(0, 0%, 100%);
1197
1326
  background: var(--hl-surface);
1198
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
1199
1327
  box-shadow: var(--hl-overlay-shadow);
1200
- padding: 0.25rem;
1201
1328
  padding: var(--hl-space-1);
1202
1329
  list-style: none;
1330
+ transition:
1331
+ opacity var(--hl-duration-fast) var(--hl-ease-standard),
1332
+ translate var(--hl-duration-fast) var(--hl-ease-standard),
1333
+ display var(--hl-duration-fast) allow-discrete,
1334
+ overlay var(--hl-duration-fast) allow-discrete;
1203
1335
  }
1204
1336
 
1205
- /* Before the menu is promoted to a popover (JS not yet loaded), hide it. */
1206
- [data-hl-dropdown-menu]:not([popover]) {
1207
- display: none;
1208
- }
1209
-
1337
+ /* Closed state doubles as the exit target. Engines without the Popover API
1338
+ drop this rule, so nothing is hidden by accident. */
1210
1339
  [data-hl-dropdown-menu]:not(:popover-open) {
1211
- z-index: 1000;
1212
1340
  z-index: var(--hl-z-dropdown);
1341
+ opacity: 0;
1342
+ translate: 0 -0.25rem;
1343
+ }
1344
+
1345
+ @starting-style {
1346
+ [data-hl-dropdown-menu]:popover-open {
1347
+ opacity: 0;
1348
+ translate: 0 -0.25rem;
1349
+ }
1213
1350
  }
1214
1351
 
1215
1352
  /* Open below the trigger, start-aligned, flipping when cramped. */
1216
1353
  @supports (position-area: block-end) {
1217
1354
  [data-hl-dropdown-menu] {
1218
1355
  position: fixed;
1219
- inset-area: block-end span-inline-end;
1220
1356
  position-area: block-end span-inline-end;
1221
1357
  position-try-fallbacks: flip-block, flip-inline;
1222
- margin-top: 0.25rem;
1223
- margin-bottom: 0.25rem;
1224
- margin-top: var(--hl-space-1);
1225
- margin-bottom: var(--hl-space-1);
1358
+ margin-block: var(--hl-space-1);
1226
1359
  }
1227
1360
  }
1228
1361
 
1229
- [data-hl-dropdown-menu] [role='menuitem'] {
1230
- display: block;
1231
- width: 100%;
1232
- padding: 0.5rem 0.75rem;
1362
+ [data-hl-dropdown-menu] [role='group'] {
1363
+ margin: 0;
1364
+ padding: 0;
1365
+ list-style: none;
1366
+ }
1367
+
1368
+ /* Nested submenus share the panel styling and sit beside their trigger. */
1369
+ [data-hl-dropdown-menu] li {
1370
+ position: relative;
1371
+ }
1372
+
1373
+ [data-hl-dropdown-menu] :is([role='menu'], [data-hl-submenu]) {
1374
+ position: absolute;
1375
+ inset-block-start: 0;
1376
+ inset-inline-start: calc(100% + var(--hl-space-1));
1377
+ z-index: var(--hl-z-dropdown);
1378
+ min-inline-size: 10rem;
1379
+ margin: 0;
1380
+ padding: var(--hl-space-1);
1381
+ list-style: none;
1382
+ border: var(--hl-border-width) solid var(--hl-border);
1383
+ border-radius: var(--hl-radius-lg);
1384
+ background: var(--hl-surface);
1385
+ box-shadow: var(--hl-overlay-shadow);
1386
+ }
1387
+
1388
+ [data-hl-dropdown-menu]
1389
+ :is([role='menu'], [data-hl-submenu]):is([hidden], [popover]:not(:popover-open)) {
1390
+ display: none;
1391
+ }
1392
+
1393
+ [data-hl-dropdown-menu] :is([role='menu'], [data-hl-submenu])[popover] {
1394
+ position: fixed;
1395
+ inset: auto;
1396
+ }
1397
+
1398
+ @supports (position-area: block-end) {
1399
+ [data-hl-dropdown-menu] :is([role='menu'], [data-hl-submenu])[popover] {
1400
+ position-area: inline-end span-block-end;
1401
+ position-try-fallbacks: flip-inline, flip-block;
1402
+ margin-inline: var(--hl-space-1);
1403
+ }
1404
+ }
1405
+
1406
+ /* Submenu chevron: a rotated square corner at the inline end. */
1407
+ [data-hl-dropdown-menu] [role^='menuitem'][aria-haspopup='menu']::after {
1408
+ content: '';
1409
+ inline-size: 0.4rem;
1410
+ block-size: 0.4rem;
1411
+ margin-inline-start: auto;
1412
+ border-inline-end: 1.5px solid currentcolor;
1413
+ border-block-end: 1.5px solid currentcolor;
1414
+ rotate: -45deg;
1415
+ opacity: 0.6;
1416
+ }
1417
+
1418
+ [data-hl-dropdown-menu] [role^='menuitem'][aria-expanded='true'] {
1419
+ background: var(--hl-surface-2);
1420
+ }
1421
+
1422
+ [data-hl-dropdown-menu] [role^='menuitem'] {
1423
+ display: flex;
1424
+ align-items: center;
1425
+ gap: var(--hl-space-2);
1426
+ inline-size: 100%;
1233
1427
  padding: var(--hl-space-2) var(--hl-space-3);
1234
1428
  border: none;
1235
- border-radius: 0.25rem;
1236
1429
  border-radius: var(--hl-radius-sm);
1237
1430
  background: transparent;
1238
- text-align: left;
1431
+ text-align: start;
1239
1432
  cursor: pointer;
1240
1433
  color: inherit;
1241
1434
  font: inherit;
1242
1435
  }
1243
1436
 
1244
- [data-hl-dropdown-menu] [role='menuitem']:hover,
1245
- [data-hl-dropdown-menu] [role='menuitem'][data-hl-active] {
1246
- background: hsl(210, 40%, 96%);
1437
+ [data-hl-dropdown-menu] [role^='menuitem']:hover {
1247
1438
  background: var(--hl-surface-2);
1248
1439
  }
1249
1440
 
1250
- [data-hl-dropdown-menu] [role='menuitem']:focus-visible {
1251
- outline: 2px solid hsl(217, 91%, 60%);
1441
+ [data-hl-dropdown-menu] [role^='menuitem']:focus-visible {
1252
1442
  outline: var(--hl-focus-ring);
1253
- outline-offset: -2px;
1443
+ outline-offset: calc(var(--hl-focus-offset) * -1);
1444
+ }
1445
+
1446
+ /* Checkable items reserve room for a mark so labels line up. */
1447
+ [data-hl-dropdown-menu] :is([role='menuitemcheckbox'], [role='menuitemradio'])::before {
1448
+ content: '';
1449
+ flex: none;
1450
+ inline-size: 1em;
1451
+ block-size: 1em;
1452
+ line-height: 1;
1453
+ text-align: center;
1454
+ color: var(--hl-primary);
1455
+ }
1456
+
1457
+ [data-hl-dropdown-menu] [role='menuitemcheckbox'][aria-checked='true']::before {
1458
+ content: '\2713';
1459
+ }
1460
+
1461
+ [data-hl-dropdown-menu] [role='menuitemradio'][aria-checked='true']::before {
1462
+ background: currentcolor;
1463
+ border-radius: var(--hl-radius-full);
1464
+ scale: 0.5;
1465
+ }
1466
+
1467
+ [data-hl-dropdown-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
1468
+ opacity: var(--hl-disabled-opacity);
1469
+ cursor: not-allowed;
1254
1470
  }
1255
1471
 
1256
1472
  [data-hl-dropdown-menu] [role='separator'] {
1257
- height: 1px;
1258
- margin: 0.25rem 0;
1473
+ block-size: var(--hl-border-width);
1259
1474
  margin: var(--hl-space-1) 0;
1260
- background: hsl(214, 32%, 91%);
1261
1475
  background: var(--hl-border);
1262
1476
  border: none;
1263
1477
  }
1478
+
1479
+ @media (forced-colors: active) {
1480
+ [data-hl-dropdown-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
1481
+ color: GrayText;
1482
+ }
1483
+
1484
+ [data-hl-dropdown-menu] [role='separator'] {
1485
+ background: CanvasText;
1486
+ }
1487
+ }
1264
1488
  }
1265
1489
 
1266
1490
  /**
1267
- * Menubar / navigation menu: `<ul data-hl-menu role="menubar">` with optional
1268
- * single-level submenus (`<ul role="menu" data-hl-menu-submenu>`). The enhancer
1269
- * handles roving focus, arrow navigation, and open/close, promoting each
1270
- * submenu to a native popover so it renders in the top layer, anchored to its
1271
- * trigger with CSS anchor positioning.
1491
+ * Menubar / navigation menu: `<ul data-hl-menu role="menubar">` of `<li>`
1492
+ * items, each optionally holding a trigger and a submenu (`<ul role="menu">`
1493
+ * or `[data-hl-submenu]`) as siblings inside the `<li>`. Submenus nest: an
1494
+ * item inside a submenu may itself be followed by a submenu, which opens to
1495
+ * its inline-end side.
1496
+ *
1497
+ * No-JS baseline: a submenu shows while its `<li>` is hovered or has focus
1498
+ * within it, so every link stays reachable by mouse and keyboard. The enhancer
1499
+ * marks the root `data-hl-ready`, after which it owns visibility (`hidden`
1500
+ * plus a top-layer `popover`) and adds roving focus, arrow keys, typeahead,
1501
+ * and checkable items. It reads:
1502
+ * data-hl-menu: root; `aria-orientation="vertical"` stacks it
1503
+ * data-hl-submenu: a submenu without `role="menu"`
1504
+ * data-hl-value: a top-level trigger's value for `hl:change`
1505
+ * data-hl-ready: set by the enhancer
1272
1506
  */
1273
1507
 
1274
1508
  @layer components {
@@ -1276,10 +1510,8 @@
1276
1510
  display: flex;
1277
1511
  flex-wrap: wrap;
1278
1512
  align-items: center;
1279
- gap: 0.25rem;
1280
1513
  gap: var(--hl-space-1);
1281
1514
  margin: 0;
1282
- padding: 0.25rem;
1283
1515
  padding: var(--hl-space-1);
1284
1516
  list-style: none;
1285
1517
  }
@@ -1293,303 +1525,307 @@
1293
1525
  position: relative;
1294
1526
  }
1295
1527
 
1296
- [data-hl-menu] [role='menuitem'] {
1528
+ [data-hl-menu] [role^='menuitem'] {
1297
1529
  display: flex;
1298
1530
  align-items: center;
1299
- gap: 0.5rem;
1300
1531
  gap: var(--hl-space-2);
1301
- width: 100%;
1302
- padding: 0.5rem 0.75rem;
1532
+ inline-size: 100%;
1303
1533
  padding: var(--hl-space-2) var(--hl-space-3);
1304
1534
  border: 0;
1305
- border-radius: 0.375rem;
1306
1535
  border-radius: var(--hl-radius-md);
1307
1536
  background: transparent;
1308
- color: hsl(222, 47%, 11%);
1309
1537
  color: var(--hl-fg);
1310
1538
  font: inherit;
1311
- font-size: 0.875rem;
1312
1539
  font-size: var(--hl-text-sm);
1313
- text-align: left;
1314
- -webkit-text-decoration: none;
1540
+ text-align: start;
1315
1541
  text-decoration: none;
1316
1542
  white-space: nowrap;
1317
1543
  cursor: pointer;
1318
1544
  }
1319
1545
 
1320
- [data-hl-menu] [role='menuitem']:hover {
1321
- background: hsl(210, 40%, 96%);
1546
+ [data-hl-menu] [role^='menuitem']:hover,
1547
+ [data-hl-menu] [role^='menuitem'][aria-expanded='true'] {
1322
1548
  background: var(--hl-surface-2);
1323
1549
  }
1324
1550
 
1325
- [data-hl-menu] [role='menuitem']:focus-visible {
1326
- outline: 2px solid hsl(217, 91%, 60%);
1551
+ [data-hl-menu] [role^='menuitem']:focus-visible {
1327
1552
  outline: var(--hl-focus-ring);
1328
- outline-offset: -2px;
1553
+ outline-offset: calc(var(--hl-focus-offset) * -1);
1329
1554
  }
1330
1555
 
1331
- [data-hl-menu] [role='menuitem'][aria-expanded='true'] {
1332
- background: hsl(210, 40%, 96%);
1333
- background: var(--hl-surface-2);
1556
+ [data-hl-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
1557
+ opacity: var(--hl-disabled-opacity);
1558
+ cursor: not-allowed;
1334
1559
  }
1335
1560
 
1336
- [data-hl-menu] [role='menuitem'][aria-haspopup]::after {
1561
+ /* Submenu chevron: a rotated square corner at the inline end. */
1562
+ [data-hl-menu] [role^='menuitem'][aria-haspopup]::after {
1337
1563
  content: '';
1338
- width: 0.4rem;
1339
- height: 0.4rem;
1340
- margin-left: auto;
1341
- border-right: 1.5px solid currentcolor;
1342
- border-bottom: 1.5px solid currentcolor;
1343
- transform: rotate(45deg);
1564
+ inline-size: 0.4rem;
1565
+ block-size: 0.4rem;
1566
+ margin-inline-start: auto;
1567
+ border-inline-end: 1.5px solid currentcolor;
1568
+ border-block-end: 1.5px solid currentcolor;
1569
+ rotate: 45deg;
1344
1570
  opacity: 0.6;
1345
1571
  }
1346
1572
 
1347
- [data-hl-menu] [role='menu'] {
1573
+ /* Submenus that open to the side point their chevron that way. */
1574
+ [data-hl-menu][aria-orientation='vertical'] [role^='menuitem'][aria-haspopup]::after,
1575
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu]) [role^='menuitem'][aria-haspopup]::after {
1576
+ rotate: -45deg;
1577
+ }
1578
+
1579
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu]) {
1348
1580
  position: absolute;
1349
- top: calc(100% + 0.25rem);
1350
- top: calc(100% + var(--hl-space-1));
1351
- left: 0;
1352
- z-index: 1000;
1581
+ inset-block-start: calc(100% + var(--hl-space-1));
1582
+ inset-inline-start: 0;
1353
1583
  z-index: var(--hl-z-dropdown);
1354
- min-width: 12rem;
1584
+ min-inline-size: 12rem;
1355
1585
  margin: 0;
1356
- padding: 0.25rem;
1357
1586
  padding: var(--hl-space-1);
1358
1587
  list-style: none;
1359
- background: hsl(0, 0%, 100%);
1360
1588
  background: var(--hl-overlay);
1361
- border: 1px solid hsl(214, 32%, 91%);
1362
1589
  border: var(--hl-border-width) solid var(--hl-border);
1363
- border-radius: 0.5rem;
1364
1590
  border-radius: var(--hl-radius-lg);
1365
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
1366
1591
  box-shadow: var(--hl-overlay-shadow);
1592
+ transition:
1593
+ opacity var(--hl-duration-fast) var(--hl-ease-standard),
1594
+ translate var(--hl-duration-fast) var(--hl-ease-standard),
1595
+ display var(--hl-duration-fast) allow-discrete,
1596
+ overlay var(--hl-duration-fast) allow-discrete;
1367
1597
  }
1368
1598
 
1369
- [data-hl-menu][aria-orientation='vertical'] [role='menu'] {
1370
- top: 0;
1371
- left: calc(100% + 0.25rem);
1372
- left: calc(100% + var(--hl-space-1));
1599
+ /* Vertical menubars and every nested level open to the inline-end side. */
1600
+ [data-hl-menu][aria-orientation='vertical'] :is([role='menu'], [data-hl-submenu]),
1601
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu]) :is([role='menu'], [data-hl-submenu]) {
1602
+ inset-block-start: 0;
1603
+ inset-inline-start: calc(100% + var(--hl-space-1));
1373
1604
  }
1374
1605
 
1375
- [data-hl-menu] [role='menu'][hidden] {
1606
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu]) li {
1607
+ position: relative;
1608
+ }
1609
+
1610
+ /* Closed states: `hidden` (enhancer without Popover API), a closed popover
1611
+ (enhancer with it), and the no-JS baseline below. Each is also the exit
1612
+ target of the transition. */
1613
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu]):is([hidden], [popover]:not(:popover-open)),
1614
+ [data-hl-menu]:not([data-hl-ready]) :is([role='menu'], [data-hl-submenu]) {
1376
1615
  display: none;
1616
+ opacity: 0;
1617
+ translate: 0 -0.25rem;
1618
+ }
1619
+
1620
+ /* No-JS baseline: reveal on hover or focus within the parent item. */
1621
+ [data-hl-menu]:not([data-hl-ready])
1622
+ li:is(:hover, :focus-within)
1623
+ > :is([role='menu'], [data-hl-submenu]) {
1624
+ display: block;
1625
+ opacity: 1;
1626
+ translate: 0 0;
1627
+ }
1628
+
1629
+ @starting-style {
1630
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu]) {
1631
+ opacity: 0;
1632
+ translate: 0 -0.25rem;
1633
+ }
1377
1634
  }
1378
1635
 
1379
1636
  /* Enhanced path: the submenu is a native popover in the top layer, anchored
1380
1637
  to its trigger. The absolute-position rules above stay as the fallback for
1381
1638
  engines without the Popover API. */
1382
- [data-hl-menu] [role='menu'][popover] {
1639
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu])[popover] {
1383
1640
  position: fixed;
1384
- top: auto;
1385
- right: auto;
1386
- bottom: auto;
1387
- left: auto;
1641
+ inset: auto;
1388
1642
  }
1389
1643
 
1390
1644
  @supports (position-area: block-end) {
1391
- [data-hl-menu] [role='menu'][popover] {
1392
- inset-area: block-end span-inline-end;
1645
+ [data-hl-menu] :is([role='menu'], [data-hl-submenu])[popover] {
1393
1646
  position-area: block-end span-inline-end;
1394
1647
  position-try-fallbacks: flip-block, flip-inline;
1395
- margin-top: 0.25rem;
1396
- margin-bottom: 0.25rem;
1397
- margin-top: var(--hl-space-1);
1398
- margin-bottom: var(--hl-space-1);
1648
+ margin-block: var(--hl-space-1);
1399
1649
  }
1400
1650
 
1401
- [data-hl-menu][aria-orientation='vertical'] [role='menu'][popover] {
1402
- inset-area: inline-end span-block-end;
1651
+ [data-hl-menu][aria-orientation='vertical'] :is([role='menu'], [data-hl-submenu])[popover],
1652
+ [data-hl-menu]
1653
+ :is([role='menu'], [data-hl-submenu])
1654
+ :is([role='menu'], [data-hl-submenu])[popover] {
1403
1655
  position-area: inline-end span-block-end;
1404
1656
  position-try-fallbacks: flip-inline, flip-block;
1405
- margin-top: 0;
1406
- margin-bottom: 0;
1407
- margin-left: 0.25rem;
1408
- margin-right: 0.25rem;
1409
- margin-left: var(--hl-space-1);
1410
- margin-right: var(--hl-space-1);
1657
+ margin-block: 0;
1658
+ margin-inline: var(--hl-space-1);
1411
1659
  }
1412
1660
  }
1413
1661
 
1414
1662
  [data-hl-menu] [role='separator'] {
1415
- height: 1px;
1416
- height: var(--hl-border-width);
1417
- margin: 0.25rem 0;
1663
+ block-size: var(--hl-border-width);
1418
1664
  margin: var(--hl-space-1) 0;
1419
- background: hsl(214, 32%, 91%);
1420
1665
  background: var(--hl-border);
1421
1666
  }
1667
+
1668
+ @media (forced-colors: active) {
1669
+ [data-hl-menu] [role^='menuitem'][aria-expanded='true'] {
1670
+ background: Highlight;
1671
+ color: HighlightText;
1672
+ }
1673
+
1674
+ [data-hl-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
1675
+ color: GrayText;
1676
+ }
1677
+
1678
+ [data-hl-menu] [role='separator'] {
1679
+ background: CanvasText;
1680
+ }
1681
+ }
1422
1682
  }
1423
1683
 
1684
+ /**
1685
+ * Toast: a `[data-hl-toast-region]` live region fixed to the end corner of the
1686
+ * viewport, holding `[data-hl-toast]` notifications with an optional
1687
+ * `[data-hl-toast-close]` button.
1688
+ *
1689
+ * Toasts are inherently script-driven; with no JavaScript the region is simply
1690
+ * empty. The enhancer creates the toasts and reads:
1691
+ * data-hl-toast-region: the container
1692
+ * data-hl-toast: one notification (created by the enhancer)
1693
+ * data-hl-intent: info (default) | success | warning | danger, on a toast
1694
+ * data-hl-toast-close: dismiss button inside a toast
1695
+ * data-hl-toast-trigger, data-hl-toast-intent, data-hl-toast-duration:
1696
+ * declarative trigger buttons anywhere in the page
1697
+ */
1698
+
1424
1699
  @layer components {
1425
1700
  [data-hl-toast-region] {
1426
1701
  position: fixed;
1427
- z-index: 1500;
1428
1702
  z-index: var(--hl-z-toast);
1429
- bottom: 1rem;
1430
- bottom: var(--hl-space-4);
1431
- right: 1rem;
1432
- right: var(--hl-space-4);
1703
+ inset-block-end: var(--hl-space-4);
1704
+ inset-inline-end: var(--hl-space-4);
1433
1705
  display: flex;
1434
1706
  flex-direction: column-reverse;
1435
- gap: 0.5rem;
1436
1707
  gap: var(--hl-space-2);
1437
1708
  pointer-events: none;
1438
- max-width: min(90vw, 24rem);
1709
+ max-inline-size: min(90vi, 24rem);
1439
1710
  }
1440
1711
 
1441
1712
  [data-hl-toast] {
1442
1713
  pointer-events: auto;
1443
1714
  display: flex;
1444
1715
  align-items: flex-start;
1445
- gap: 0.75rem;
1446
1716
  gap: var(--hl-space-3);
1447
- border: 1px solid hsl(214, 32%, 91%);
1448
- border: 1px solid var(--hl-border);
1449
- border-radius: 0.5rem;
1717
+ border: var(--hl-border-width) solid var(--hl-border);
1450
1718
  border-radius: var(--hl-radius-lg);
1451
- padding: 0.75rem 1rem;
1452
1719
  padding: var(--hl-space-3) var(--hl-space-4);
1453
- background: hsl(0, 0%, 100%);
1454
1720
  background: var(--hl-surface);
1455
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
1456
1721
  box-shadow: var(--hl-overlay-shadow);
1457
- animation: hl-toast-in 180ms cubic-bezier(0.2, 0, 0, 1);
1458
- animation: hl-toast-in var(--hl-duration-base) var(--hl-ease-standard);
1722
+ transition:
1723
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
1724
+ translate var(--hl-duration-base) var(--hl-ease-standard);
1725
+ }
1726
+
1727
+ /* Toasts are inserted by script, so the entry runs from @starting-style. */
1728
+ @starting-style {
1729
+ [data-hl-toast] {
1730
+ opacity: 0;
1731
+ translate: 0 var(--hl-space-2);
1732
+ }
1459
1733
  }
1460
1734
 
1461
- [data-hl-toast][data-hl-variant='success'] {
1462
- border-left: 3px solid hsl(142, 76%, 36%);
1463
- border-left: 3px solid hsl(142deg 76% 36%);
1464
- border-left: 3px solid var(--hl-success);
1735
+ [data-hl-toast][data-hl-intent='success'] {
1736
+ border-inline-start: 3px solid var(--hl-success);
1465
1737
  }
1466
1738
 
1467
- [data-hl-toast][data-hl-variant='warning'] {
1468
- border-left: 3px solid hsl(38, 92%, 50%);
1469
- border-left: 3px solid hsl(38deg 92% 50%);
1470
- border-left: 3px solid var(--hl-warning);
1739
+ [data-hl-toast][data-hl-intent='warning'] {
1740
+ border-inline-start: 3px solid var(--hl-warning);
1471
1741
  }
1472
1742
 
1473
- [data-hl-toast][data-hl-variant='danger'] {
1474
- border-left: 3px solid hsl(0, 72%, 51%);
1475
- border-left: 3px solid hsl(0deg 72% 51%);
1476
- border-left: 3px solid var(--hl-danger);
1743
+ [data-hl-toast][data-hl-intent='danger'] {
1744
+ border-inline-start: 3px solid var(--hl-danger);
1477
1745
  }
1478
1746
 
1479
- [data-hl-toast][data-hl-variant='info'] {
1480
- border-left: 3px solid hsl(200, 98%, 39%);
1481
- border-left: 3px solid hsl(200deg 98% 39%);
1482
- border-left: 3px solid var(--hl-info);
1747
+ [data-hl-toast][data-hl-intent='info'] {
1748
+ border-inline-start: 3px solid var(--hl-info);
1483
1749
  }
1484
1750
 
1485
1751
  [data-hl-toast-close] {
1486
- -webkit-appearance: none;
1487
- -moz-appearance: none;
1488
- appearance: none;
1752
+ appearance: none;
1489
1753
  border: none;
1490
1754
  background: transparent;
1491
1755
  cursor: pointer;
1492
- padding: 0.25rem;
1493
1756
  padding: var(--hl-space-1);
1494
- color: hsl(215, 19%, 35%);
1495
1757
  color: var(--hl-fg-muted);
1496
- margin-left: auto;
1758
+ margin-inline-start: auto;
1497
1759
  flex-shrink: 0;
1498
1760
  font: inherit;
1499
1761
  }
1500
1762
 
1501
1763
  [data-hl-toast-close]:hover {
1502
- color: hsl(222, 47%, 11%);
1503
1764
  color: var(--hl-fg);
1504
1765
  }
1505
1766
 
1506
1767
  [data-hl-toast-close]:focus-visible {
1507
- outline: 2px solid hsl(217, 91%, 60%);
1508
1768
  outline: var(--hl-focus-ring);
1509
- outline-offset: 2px;
1510
- border-radius: 0.25rem;
1769
+ outline-offset: var(--hl-focus-offset);
1511
1770
  border-radius: var(--hl-radius-sm);
1512
1771
  }
1513
-
1514
- @keyframes hl-toast-in {
1515
- from {
1516
- opacity: 0;
1517
- transform: translateY(0.5rem);
1518
- }
1519
-
1520
- to {
1521
- opacity: 1;
1522
- transform: translateY(0);
1523
- }
1524
- }
1525
-
1526
- @media (prefers-reduced-motion: reduce) {
1527
- [data-hl-toast] {
1528
- animation: none;
1529
- }
1530
- }
1531
1772
  }
1532
1773
 
1533
1774
  /**
1534
1775
  * Command palette: `<div data-hl-command>` containing a search input
1535
- * (`[data-hl-command-input]`), an empty state (`[data-hl-command-empty]`), and a
1536
- * `[data-hl-command-list] role="listbox"` of grouped `[role="option"]` items.
1537
- * Often placed inside a `<dialog class="hl-modal">`.
1776
+ * (`.hl-command-input` or `[data-hl-command-input]`), an empty state
1777
+ * (`[data-hl-command-empty]`), and a `[data-hl-command-list] role="listbox"` of
1778
+ * grouped `[role="option"]` items. Often placed inside a `<dialog class="hl-modal">`.
1779
+ *
1780
+ * No-JS baseline: every item is listed and the empty state stays hidden,
1781
+ * since nothing can filter yet. The enhancer marks the root `data-hl-ready`
1782
+ * and then toggles `hidden` on items, groups, and the empty state.
1783
+ * data-hl-command: root
1784
+ * data-hl-command-input: filter field
1785
+ * data-hl-command-list: listbox
1786
+ * data-hl-command-group: a group wrapper (hidden when all its items are)
1787
+ * data-hl-command-empty: "no results" message
1788
+ * data-hl-ready: set by the enhancer
1538
1789
  */
1539
1790
 
1540
1791
  @layer components {
1541
1792
  [data-hl-command] {
1542
1793
  display: flex;
1543
1794
  flex-direction: column;
1544
- min-height: 0;
1795
+ min-block-size: 0;
1545
1796
  overflow: hidden;
1546
- background: hsl(0, 0%, 100%);
1547
1797
  background: var(--hl-overlay);
1548
- border-radius: 0.5rem;
1549
1798
  border-radius: var(--hl-radius-lg);
1550
1799
  }
1551
1800
 
1552
- [data-hl-command-input] {
1801
+ :is(.hl-command-input, [data-hl-command-input]) {
1553
1802
  flex: none;
1554
- width: 100%;
1555
- height: 3rem;
1556
- height: var(--hl-control-height-lg);
1557
- padding-left: 1rem;
1558
- padding-right: 1rem;
1559
- padding-left: var(--hl-space-4);
1560
- padding-right: var(--hl-space-4);
1803
+ inline-size: 100%;
1804
+ block-size: var(--hl-control-height-lg);
1805
+ padding-inline: var(--hl-space-4);
1561
1806
  border: 0;
1562
- border-bottom: 1px solid hsl(214, 32%, 91%);
1563
- border-bottom: 1px solid hsl(214deg 32% 91%);
1564
- border-bottom: var(--hl-border-width) solid var(--hl-border);
1807
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
1565
1808
  border-radius: 0;
1566
1809
  background: transparent;
1567
- color: hsl(222, 47%, 11%);
1568
1810
  color: var(--hl-fg);
1569
1811
  font: inherit;
1570
- font-size: 1rem;
1571
1812
  font-size: var(--hl-text-base);
1572
1813
  }
1573
1814
 
1574
- [data-hl-command-input]:focus-visible {
1575
- outline: none;
1576
- }
1577
-
1578
- [data-hl-command-input]::-moz-placeholder {
1579
- color: hsl(215, 16%, 47%);
1580
- color: var(--hl-fg-subtle);
1815
+ /* The field is flush with the palette edge, so the ring is drawn inward. */
1816
+ :is(.hl-command-input, [data-hl-command-input]):focus-visible {
1817
+ outline: var(--hl-focus-ring);
1818
+ outline-offset: calc(var(--hl-focus-offset) * -1);
1581
1819
  }
1582
1820
 
1583
- [data-hl-command-input]::placeholder {
1584
- color: hsl(215, 16%, 47%);
1821
+ :is(.hl-command-input, [data-hl-command-input])::placeholder {
1585
1822
  color: var(--hl-fg-subtle);
1586
1823
  }
1587
1824
 
1588
1825
  [data-hl-command-list] {
1589
1826
  flex: 1 1 auto;
1590
- max-height: 24rem;
1827
+ max-block-size: 24rem;
1591
1828
  overflow-y: auto;
1592
- padding: 0.5rem;
1593
1829
  padding: var(--hl-space-2);
1594
1830
  }
1595
1831
 
@@ -1598,30 +1834,21 @@
1598
1834
  }
1599
1835
 
1600
1836
  .hl-command-group-label {
1601
- padding: 0.5rem 0.5rem 0.25rem;
1602
1837
  padding: var(--hl-space-2) var(--hl-space-2) var(--hl-space-1);
1603
- font-size: 0.75rem;
1604
1838
  font-size: var(--hl-text-xs);
1605
- font-weight: 600;
1606
1839
  font-weight: var(--hl-font-semibold);
1607
1840
  text-transform: uppercase;
1608
1841
  letter-spacing: 0.04em;
1609
- color: hsl(215, 16%, 47%);
1610
1842
  color: var(--hl-fg-subtle);
1611
1843
  }
1612
1844
 
1613
1845
  [data-hl-command] [role='option'] {
1614
1846
  display: flex;
1615
1847
  align-items: center;
1616
- gap: 0.75rem;
1617
1848
  gap: var(--hl-space-3);
1618
- padding: 0.5rem 0.75rem;
1619
1849
  padding: var(--hl-space-2) var(--hl-space-3);
1620
- border-radius: 0.375rem;
1621
1850
  border-radius: var(--hl-radius-md);
1622
- font-size: 0.875rem;
1623
1851
  font-size: var(--hl-text-sm);
1624
- color: hsl(222, 47%, 11%);
1625
1852
  color: var(--hl-fg);
1626
1853
  cursor: pointer;
1627
1854
  }
@@ -1632,48 +1859,59 @@
1632
1859
 
1633
1860
  [data-hl-command] [role='option']:hover,
1634
1861
  [data-hl-command] [role='option'][aria-selected='true'] {
1635
- background: hsl(214, 100%, 97%);
1636
1862
  background: var(--hl-primary-subtle);
1637
- color: hsl(224, 76%, 48%);
1638
1863
  color: var(--hl-primary-subtle-fg);
1639
1864
  }
1640
1865
 
1866
+ [data-hl-command] [role='option'][aria-disabled='true'] {
1867
+ opacity: var(--hl-disabled-opacity);
1868
+ pointer-events: none;
1869
+ }
1870
+
1641
1871
  [data-hl-command] [role='option'] svg {
1642
- width: 1.1em;
1643
- height: 1.1em;
1872
+ inline-size: 1.1em;
1873
+ block-size: 1.1em;
1644
1874
  flex: none;
1645
1875
  opacity: 0.7;
1646
1876
  }
1647
1877
 
1648
1878
  [data-hl-command-empty] {
1649
- padding: 2rem 1rem;
1650
1879
  padding: var(--hl-space-8) var(--hl-space-4);
1651
1880
  text-align: center;
1652
- font-size: 0.875rem;
1653
1881
  font-size: var(--hl-text-sm);
1654
- color: hsl(215, 19%, 35%);
1655
1882
  color: var(--hl-fg-muted);
1656
1883
  }
1657
1884
 
1658
- [data-hl-command-empty][hidden] {
1885
+ /* No-JS baseline: there is no filtering, so there are never "no results". */
1886
+ [data-hl-command-empty][hidden],
1887
+ [data-hl-command]:not([data-hl-ready]) [data-hl-command-empty] {
1659
1888
  display: none;
1660
1889
  }
1890
+
1891
+ @media (forced-colors: active) {
1892
+ [data-hl-command] [role='option'][aria-selected='true'] {
1893
+ background: Highlight;
1894
+ color: HighlightText;
1895
+ }
1896
+ }
1661
1897
  }
1662
1898
 
1663
1899
  /* Forms */
1664
1900
 
1665
1901
  /**
1666
- * Button: `<button class="hl-button">` (works on `<a>`/`<input>` too).
1902
+ * Button: `<button class="hl-button">` (works on `<a>`/`<input>` too). Pure
1903
+ * CSS; there is no enhancer.
1667
1904
  *
1668
1905
  * Color is driven by a small set of local custom properties so the
1669
- * intent × variant matrix stays DRY: `data-hl-intent` swaps the accent set,
1906
+ * intent by variant matrix stays DRY: `data-hl-intent` swaps the accent set,
1670
1907
  * `data-hl-variant` decides how those values are applied.
1671
1908
  *
1672
1909
  * data-hl-variant: solid (default) | soft | outline | ghost | link
1673
1910
  * data-hl-intent: neutral (default) | primary | danger | success | warning | info
1674
1911
  * data-hl-size: sm | md (default) | lg
1675
- * data-hl-block: stretch to container width
1912
+ * data-hl-block: stretch to the container's inline size
1676
1913
  * data-hl-icon: square, icon-only
1914
+ * data-hl-loading: shows a spinner and blocks interaction
1677
1915
  */
1678
1916
 
1679
1917
  @layer components {
@@ -1693,39 +1931,27 @@
1693
1931
  display: inline-flex;
1694
1932
  align-items: center;
1695
1933
  justify-content: center;
1696
- gap: 0.5rem;
1697
1934
  gap: var(--_gap);
1698
- height: 2.5rem;
1699
- height: var(--_height);
1700
- padding-left: 1rem;
1701
- padding-right: 1rem;
1702
- padding-left: var(--_pad-x);
1703
- padding-right: var(--_pad-x);
1704
- border: 1px solid transparent;
1935
+ block-size: var(--_height);
1936
+ padding-inline: var(--_pad-x);
1705
1937
  border: var(--hl-border-width) solid transparent;
1706
- border-radius: 0.375rem;
1707
1938
  border-radius: var(--hl-radius-md);
1708
1939
  font-family: inherit;
1709
- font-size: 0.875rem;
1710
1940
  font-size: var(--_font);
1711
- font-weight: 500;
1712
1941
  font-weight: var(--hl-font-medium);
1713
1942
  line-height: 1;
1714
1943
  white-space: nowrap;
1715
- -webkit-text-decoration: none;
1716
1944
  text-decoration: none;
1717
1945
  cursor: pointer;
1718
1946
  -webkit-user-select: none;
1719
- -moz-user-select: none;
1720
1947
  user-select: none;
1721
- background: hsl(210, 40%, 96%);
1722
1948
  background: var(--_solid-bg);
1723
- color: hsl(222, 47%, 11%);
1724
1949
  color: var(--_solid-fg);
1725
1950
  transition:
1726
- background-color 120ms cubic-bezier(0.2, 0, 0, 1), border-color 120ms cubic-bezier(0.2, 0, 0, 1), color 120ms cubic-bezier(0.2, 0, 0, 1), box-shadow 120ms cubic-bezier(0.2, 0, 0, 1);
1727
- transition:
1728
- background-color var(--hl-duration-fast) var(--hl-ease-standard), border-color var(--hl-duration-fast) var(--hl-ease-standard), color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
1951
+ background-color var(--hl-duration-fast) var(--hl-ease-standard),
1952
+ border-color var(--hl-duration-fast) var(--hl-ease-standard),
1953
+ color var(--hl-duration-fast) var(--hl-ease-standard),
1954
+ box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
1729
1955
  }
1730
1956
 
1731
1957
  .hl-button:hover {
@@ -1737,16 +1963,15 @@
1737
1963
  }
1738
1964
 
1739
1965
  .hl-button:focus-visible {
1740
- outline: 2px solid hsl(217, 91%, 60%);
1741
1966
  outline: var(--hl-focus-ring);
1742
- outline-offset: 2px;
1967
+ outline-offset: var(--hl-focus-offset);
1743
1968
  }
1744
1969
 
1745
1970
  .hl-button:disabled,
1746
1971
  .hl-button[aria-disabled='true'],
1747
1972
  .hl-button[data-hl-loading] {
1748
1973
  cursor: not-allowed;
1749
- opacity: 0.55;
1974
+ opacity: var(--hl-disabled-opacity);
1750
1975
  }
1751
1976
 
1752
1977
  .hl-button[data-hl-loading] {
@@ -1815,7 +2040,6 @@
1815
2040
  .hl-button[data-hl-variant='outline'] {
1816
2041
  background: transparent;
1817
2042
  color: var(--_accent);
1818
- border-color: hsl(213, 27%, 84%);
1819
2043
  border-color: var(--hl-border-strong);
1820
2044
  }
1821
2045
 
@@ -1834,12 +2058,11 @@
1834
2058
  }
1835
2059
 
1836
2060
  .hl-button[data-hl-variant='link'] {
1837
- height: auto;
2061
+ block-size: auto;
1838
2062
  padding: 0;
1839
2063
  background: transparent;
1840
2064
  color: var(--_accent);
1841
2065
  border-color: transparent;
1842
- -webkit-text-decoration: underline;
1843
2066
  text-decoration: underline;
1844
2067
  text-underline-offset: 0.2em;
1845
2068
  }
@@ -1855,8 +2078,6 @@
1855
2078
  --_font: var(--hl-text-xs);
1856
2079
  --_gap: var(--hl-space-1);
1857
2080
 
1858
- border-radius: 0.25rem;
1859
-
1860
2081
  border-radius: var(--hl-radius-sm);
1861
2082
  }
1862
2083
 
@@ -1865,42 +2086,39 @@
1865
2086
  --_pad-x: var(--hl-space-5);
1866
2087
  --_font: var(--hl-text-base);
1867
2088
 
1868
- border-radius: 0.5rem;
1869
-
1870
2089
  border-radius: var(--hl-radius-lg);
1871
2090
  }
1872
2091
 
1873
2092
  .hl-button[data-hl-block] {
1874
2093
  display: flex;
1875
- width: 100%;
2094
+ inline-size: 100%;
1876
2095
  }
1877
2096
 
1878
2097
  .hl-button[data-hl-icon] {
1879
- width: var(--_height);
1880
- padding-left: 0;
1881
- padding-right: 0;
2098
+ inline-size: var(--_height);
2099
+ padding-inline: 0;
1882
2100
  }
1883
2101
 
1884
2102
  .hl-button > svg {
1885
- width: 1.1em;
1886
- height: 1.1em;
2103
+ inline-size: 1.1em;
2104
+ block-size: 1.1em;
1887
2105
  flex: none;
1888
2106
  }
1889
2107
 
1890
2108
  .hl-button[data-hl-loading]::before {
1891
2109
  content: '';
1892
- width: 1em;
1893
- height: 1em;
2110
+ inline-size: 1em;
2111
+ block-size: 1em;
1894
2112
  border: 2px solid currentcolor;
1895
- border-top-color: transparent;
1896
- border-radius: 9999px;
2113
+ border-block-start-color: transparent;
1897
2114
  border-radius: var(--hl-radius-full);
1898
2115
  animation: hl-button-spin 0.6s linear infinite;
1899
2116
  }
1900
2117
 
2118
+ /* A static arc still reads as "busy" without continuous motion. */
1901
2119
  @media (prefers-reduced-motion: reduce) {
1902
2120
  .hl-button[data-hl-loading]::before {
1903
- animation-duration: 1.4s;
2121
+ animation: none;
1904
2122
  }
1905
2123
  }
1906
2124
 
@@ -1919,32 +2137,46 @@
1919
2137
  }
1920
2138
 
1921
2139
  .hl-button-group > .hl-button:not(:first-child) {
1922
- margin-left: calc(1px * -1);
1923
- margin-left: calc(var(--hl-border-width) * -1);
2140
+ margin-inline-start: calc(var(--hl-border-width) * -1);
1924
2141
  }
1925
2142
 
1926
2143
  .hl-button-group > .hl-button:first-child {
1927
- border-top-left-radius: 0.375rem;
1928
- border-top-left-radius: var(--hl-radius-md);
1929
- border-bottom-left-radius: 0.375rem;
1930
- border-bottom-left-radius: var(--hl-radius-md);
2144
+ border-start-start-radius: var(--hl-radius-md);
2145
+ border-end-start-radius: var(--hl-radius-md);
1931
2146
  }
1932
2147
 
1933
2148
  .hl-button-group > .hl-button:last-child {
1934
- border-top-right-radius: 0.375rem;
1935
- border-top-right-radius: var(--hl-radius-md);
1936
- border-bottom-right-radius: 0.375rem;
1937
- border-bottom-right-radius: var(--hl-radius-md);
2149
+ border-start-end-radius: var(--hl-radius-md);
2150
+ border-end-end-radius: var(--hl-radius-md);
1938
2151
  }
1939
2152
 
1940
2153
  .hl-button-group > .hl-button:hover,
1941
2154
  .hl-button-group > .hl-button:focus-visible {
1942
2155
  z-index: 1;
1943
2156
  }
2157
+
2158
+ /* Forced colors flatten every fill to Canvas, so the border alone tells a
2159
+ button apart from text; the link variant keeps reading as a link. */
2160
+ @media (forced-colors: active) {
2161
+ .hl-button {
2162
+ border-color: ButtonBorder;
2163
+ }
2164
+
2165
+ .hl-button[data-hl-variant='link'] {
2166
+ border-color: transparent;
2167
+ color: LinkText;
2168
+ }
2169
+
2170
+ .hl-button:disabled,
2171
+ .hl-button[aria-disabled='true'] {
2172
+ color: GrayText;
2173
+ border-color: GrayText;
2174
+ }
2175
+ }
1944
2176
  }
1945
2177
 
1946
2178
  /**
1947
- * Text input: `<input class="hl-input">`.
2179
+ * Text input: `<input class="hl-input">`. Pure CSS; there is no enhancer.
1948
2180
  * data-hl-size: sm | md (default) | lg
1949
2181
  * data-hl-invalid: error styling (pair with aria-invalid)
1950
2182
  */
@@ -1956,93 +2188,56 @@
1956
2188
  --_font: var(--hl-text-sm);
1957
2189
 
1958
2190
  display: block;
1959
- width: 100%;
1960
- height: 2.5rem;
1961
- height: var(--_height);
1962
- padding-left: 0.75rem;
1963
- padding-right: 0.75rem;
1964
- padding-left: var(--_pad-x);
1965
- padding-right: var(--_pad-x);
1966
- border: 1px solid hsl(213, 27%, 84%);
2191
+ inline-size: 100%;
2192
+ block-size: var(--_height);
2193
+ padding-inline: var(--_pad-x);
1967
2194
  border: var(--hl-border-width) solid var(--hl-border-strong);
1968
- border-radius: 0.375rem;
1969
2195
  border-radius: var(--hl-radius-md);
1970
- background: hsl(0, 0%, 100%);
1971
2196
  background: var(--hl-surface);
1972
- color: hsl(222, 47%, 11%);
1973
2197
  color: var(--hl-fg);
1974
2198
  font-family: inherit;
1975
- font-size: 0.875rem;
1976
2199
  font-size: var(--_font);
1977
- line-height: 1.5;
1978
2200
  line-height: var(--hl-leading-normal);
1979
2201
  transition:
1980
- border-color 120ms cubic-bezier(0.2, 0, 0, 1), box-shadow 120ms cubic-bezier(0.2, 0, 0, 1);
1981
- transition:
1982
- border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
1983
- }
1984
-
1985
- .hl-input::-moz-placeholder {
1986
- color: hsl(215, 16%, 47%);
1987
- color: var(--hl-fg-subtle);
2202
+ border-color var(--hl-duration-fast) var(--hl-ease-standard),
2203
+ box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
1988
2204
  }
1989
2205
 
1990
2206
  .hl-input::placeholder {
1991
- color: hsl(215, 16%, 47%);
1992
2207
  color: var(--hl-fg-subtle);
1993
2208
  }
1994
2209
 
1995
- .hl-input:hover:not(:disabled):not(:focus) {
1996
- border-color: hsl(215, 16%, 47%);
2210
+ .hl-input:hover:not(:disabled, :focus) {
1997
2211
  border-color: var(--hl-fg-subtle);
1998
2212
  }
1999
2213
 
2000
2214
  .hl-input:focus-visible {
2001
2215
  outline: none;
2002
- border-color: hsl(217, 91%, 60%);
2003
2216
  border-color: var(--hl-ring);
2004
- box-shadow: 0 0 0 3px rgba(60, 131, 246, 0.3);
2217
+ box-shadow: var(--hl-focus-shadow);
2005
2218
  }
2006
2219
 
2007
- @supports (color: color-mix(in lch, red, blue)){
2008
- .hl-input:focus-visible {
2009
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
2010
- }
2011
- }
2012
-
2013
2220
  .hl-input:disabled {
2014
2221
  cursor: not-allowed;
2015
- opacity: 0.6;
2016
- background: hsl(210, 40%, 96%);
2222
+ opacity: var(--hl-disabled-opacity);
2017
2223
  background: var(--hl-surface-2);
2018
2224
  }
2019
2225
 
2020
2226
  .hl-input[data-hl-invalid],
2021
2227
  .hl-input[aria-invalid='true'] {
2022
- border-color: hsl(0, 72%, 51%);
2023
2228
  border-color: var(--hl-danger);
2024
2229
  }
2025
2230
 
2026
2231
  .hl-input[data-hl-invalid]:focus-visible,
2027
2232
  .hl-input[aria-invalid='true']:focus-visible {
2028
- border-color: hsl(0, 72%, 51%);
2029
2233
  border-color: var(--hl-danger);
2030
- box-shadow: 0 0 0 3px rgba(220, 40, 40, 0.3);
2031
- }
2032
-
2033
- @supports (color: color-mix(in lch, red, blue)){
2034
- .hl-input[data-hl-invalid]:focus-visible,
2035
- .hl-input[aria-invalid='true']:focus-visible {
2036
2234
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-danger) 30%, transparent);
2037
2235
  }
2038
- }
2039
2236
 
2040
2237
  .hl-input[data-hl-size='sm'] {
2041
2238
  --_height: var(--hl-control-height-sm);
2042
2239
  --_font: var(--hl-text-xs);
2043
2240
 
2044
- border-radius: 0.25rem;
2045
-
2046
2241
  border-radius: var(--hl-radius-sm);
2047
2242
  }
2048
2243
 
@@ -2053,113 +2248,101 @@
2053
2248
  }
2054
2249
 
2055
2250
  .hl-input[type='file'] {
2056
- height: auto;
2057
- padding-top: 0.5rem;
2058
- padding-bottom: 0.5rem;
2059
- padding-top: var(--hl-space-2);
2060
- padding-bottom: var(--hl-space-2);
2251
+ block-size: auto;
2252
+ padding-block: var(--hl-space-2);
2061
2253
  }
2062
2254
 
2063
2255
  .hl-input[type='color'] {
2064
- width: var(--_height);
2065
- padding: 0.25rem;
2256
+ inline-size: var(--_height);
2066
2257
  padding: var(--hl-space-1);
2067
2258
  }
2259
+
2260
+ /* Box shadows are dropped in forced colors, so focus falls back to an outline. */
2261
+ @media (forced-colors: active) {
2262
+ .hl-input:focus-visible {
2263
+ outline: var(--hl-focus-ring);
2264
+ outline-offset: var(--hl-focus-offset);
2265
+ }
2266
+ }
2068
2267
  }
2069
2268
 
2070
2269
  /**
2071
- * Multi-line text input: `<textarea class="hl-textarea">`.
2072
- * data-hl-invalid: error styling (pair with aria-invalid)
2270
+ * Multi-line text input: `<textarea class="hl-textarea">`. Pure CSS; there is
2271
+ * no enhancer.
2272
+ * data-hl-invalid: error styling (pair with aria-invalid)
2273
+ * data-hl-autosize: grows with its content where `field-sizing` is supported
2073
2274
  */
2074
2275
 
2075
2276
  @layer components {
2076
2277
  .hl-textarea {
2077
2278
  display: block;
2078
- width: 100%;
2079
- min-height: calc(2.5rem * 2);
2080
- min-height: calc(var(--hl-control-height-md) * 2);
2081
- padding: 0.5rem 0.75rem;
2279
+ inline-size: 100%;
2280
+ min-block-size: calc(var(--hl-control-height-md) * 2);
2082
2281
  padding: var(--hl-space-2) var(--hl-space-3);
2083
- border: 1px solid hsl(213, 27%, 84%);
2084
2282
  border: var(--hl-border-width) solid var(--hl-border-strong);
2085
- border-radius: 0.375rem;
2086
2283
  border-radius: var(--hl-radius-md);
2087
- background: hsl(0, 0%, 100%);
2088
2284
  background: var(--hl-surface);
2089
- color: hsl(222, 47%, 11%);
2090
2285
  color: var(--hl-fg);
2091
2286
  font-family: inherit;
2092
- font-size: 0.875rem;
2093
2287
  font-size: var(--hl-text-sm);
2094
- line-height: 1.5;
2095
2288
  line-height: var(--hl-leading-normal);
2096
2289
  resize: vertical;
2097
2290
  transition:
2098
- border-color 120ms cubic-bezier(0.2, 0, 0, 1), box-shadow 120ms cubic-bezier(0.2, 0, 0, 1);
2099
- transition:
2100
- border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
2101
- }
2102
-
2103
- .hl-textarea::-moz-placeholder {
2104
- color: hsl(215, 16%, 47%);
2105
- color: var(--hl-fg-subtle);
2291
+ border-color var(--hl-duration-fast) var(--hl-ease-standard),
2292
+ box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
2106
2293
  }
2107
2294
 
2108
2295
  .hl-textarea::placeholder {
2109
- color: hsl(215, 16%, 47%);
2110
2296
  color: var(--hl-fg-subtle);
2111
2297
  }
2112
2298
 
2113
- .hl-textarea:hover:not(:disabled):not(:focus) {
2114
- border-color: hsl(215, 16%, 47%);
2299
+ .hl-textarea:hover:not(:disabled, :focus) {
2115
2300
  border-color: var(--hl-fg-subtle);
2116
2301
  }
2117
2302
 
2118
2303
  .hl-textarea:focus-visible {
2119
2304
  outline: none;
2120
- border-color: hsl(217, 91%, 60%);
2121
2305
  border-color: var(--hl-ring);
2122
- box-shadow: 0 0 0 3px rgba(60, 131, 246, 0.3);
2123
- }
2124
-
2125
- @supports (color: color-mix(in lch, red, blue)){
2126
- .hl-textarea:focus-visible {
2127
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
2306
+ box-shadow: var(--hl-focus-shadow);
2128
2307
  }
2129
- }
2130
2308
 
2131
2309
  .hl-textarea:disabled {
2132
2310
  cursor: not-allowed;
2133
- opacity: 0.6;
2134
- background: hsl(210, 40%, 96%);
2311
+ opacity: var(--hl-disabled-opacity);
2135
2312
  background: var(--hl-surface-2);
2136
2313
  }
2137
2314
 
2138
2315
  .hl-textarea[data-hl-invalid],
2139
2316
  .hl-textarea[aria-invalid='true'] {
2140
- border-color: hsl(0, 72%, 51%);
2141
2317
  border-color: var(--hl-danger);
2142
2318
  }
2143
2319
 
2144
2320
  .hl-textarea[data-hl-invalid]:focus-visible,
2145
2321
  .hl-textarea[aria-invalid='true']:focus-visible {
2146
- border-color: hsl(0, 72%, 51%);
2147
2322
  border-color: var(--hl-danger);
2148
- box-shadow: 0 0 0 3px rgba(220, 40, 40, 0.3);
2323
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-danger) 30%, transparent);
2149
2324
  }
2150
2325
 
2151
- @supports (color: color-mix(in lch, red, blue)){
2152
- .hl-textarea[data-hl-invalid]:focus-visible,
2153
- .hl-textarea[aria-invalid='true']:focus-visible {
2154
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-danger) 30%, transparent);
2326
+ /* Native autosize; engines without it keep the fixed minimum and a resizer. */
2327
+ @supports (field-sizing: content) {
2328
+ .hl-textarea[data-hl-autosize] {
2329
+ field-sizing: content;
2330
+ max-block-size: 60vb;
2331
+ }
2332
+ }
2333
+
2334
+ @media (forced-colors: active) {
2335
+ .hl-textarea:focus-visible {
2336
+ outline: var(--hl-focus-ring);
2337
+ outline-offset: var(--hl-focus-offset);
2338
+ }
2155
2339
  }
2156
- }
2157
2340
  }
2158
2341
 
2159
2342
  /**
2160
2343
  * Native select: `<span class="hl-select-wrapper"><select class="hl-select">`.
2161
2344
  * The wrapper draws a custom caret while the native control keeps full
2162
- * keyboard/mobile behavior.
2345
+ * keyboard and mobile behavior. Pure CSS; there is no enhancer.
2163
2346
  * data-hl-size: sm | md (default) | lg
2164
2347
  * data-hl-invalid: error styling (pair with aria-invalid)
2165
2348
  */
@@ -2168,24 +2351,22 @@
2168
2351
  .hl-select-wrapper {
2169
2352
  position: relative;
2170
2353
  display: inline-flex;
2171
- width: 100%;
2354
+ inline-size: 100%;
2172
2355
  }
2173
2356
 
2357
+ /* The caret is a rotated square corner; it sits at the inline end so it
2358
+ moves to the left under RTL along with the select's end padding. */
2174
2359
  .hl-select-wrapper::after {
2175
2360
  content: '';
2176
2361
  position: absolute;
2177
- top: 50%;
2178
- right: 0.75rem;
2179
- right: var(--hl-space-3);
2180
- width: 0.5rem;
2181
- height: 0.5rem;
2182
- border-right: 2px solid hsl(215, 19%, 35%);
2183
- border-right: 2px solid hsl(215deg 19% 35%);
2184
- border-right: 2px solid var(--hl-fg-muted);
2185
- border-bottom: 2px solid hsl(215, 19%, 35%);
2186
- border-bottom: 2px solid hsl(215deg 19% 35%);
2187
- border-bottom: 2px solid var(--hl-fg-muted);
2188
- transform: translateY(-65%) rotate(45deg);
2362
+ inset-block-start: 50%;
2363
+ inset-inline-end: var(--hl-space-3);
2364
+ inline-size: 0.5rem;
2365
+ block-size: 0.5rem;
2366
+ border-inline-end: 2px solid var(--hl-fg-muted);
2367
+ border-block-end: 2px solid var(--hl-fg-muted);
2368
+ translate: 0 -65%;
2369
+ rotate: 45deg;
2189
2370
  pointer-events: none;
2190
2371
  }
2191
2372
 
@@ -2193,66 +2374,41 @@
2193
2374
  --_height: var(--hl-control-height-md);
2194
2375
  --_font: var(--hl-text-sm);
2195
2376
 
2196
- -webkit-appearance: none;
2197
-
2198
- -moz-appearance: none;
2199
-
2200
- appearance: none;
2201
- width: 100%;
2202
- height: 2.5rem;
2203
- height: var(--_height);
2204
- padding-left: 0.75rem;
2205
- padding-right: 2rem;
2206
- padding-left: var(--hl-space-3);
2207
- padding-right: var(--hl-space-8);
2208
- border: 1px solid hsl(213, 27%, 84%);
2377
+ appearance: none;
2378
+ inline-size: 100%;
2379
+ block-size: var(--_height);
2380
+ padding-inline: var(--hl-space-3) var(--hl-space-8);
2209
2381
  border: var(--hl-border-width) solid var(--hl-border-strong);
2210
- border-radius: 0.375rem;
2211
2382
  border-radius: var(--hl-radius-md);
2212
- background: hsl(0, 0%, 100%);
2213
2383
  background: var(--hl-surface);
2214
- color: hsl(222, 47%, 11%);
2215
2384
  color: var(--hl-fg);
2216
2385
  font-family: inherit;
2217
- font-size: 0.875rem;
2218
2386
  font-size: var(--_font);
2219
- line-height: 1.5;
2220
2387
  line-height: var(--hl-leading-normal);
2221
2388
  cursor: pointer;
2222
2389
  transition:
2223
- border-color 120ms cubic-bezier(0.2, 0, 0, 1), box-shadow 120ms cubic-bezier(0.2, 0, 0, 1);
2224
- transition:
2225
- border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
2390
+ border-color var(--hl-duration-fast) var(--hl-ease-standard),
2391
+ box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
2226
2392
  }
2227
2393
 
2228
- .hl-select:hover:not(:disabled):not(:focus) {
2229
- border-color: hsl(215, 16%, 47%);
2394
+ .hl-select:hover:not(:disabled, :focus) {
2230
2395
  border-color: var(--hl-fg-subtle);
2231
2396
  }
2232
2397
 
2233
2398
  .hl-select:focus-visible {
2234
2399
  outline: none;
2235
- border-color: hsl(217, 91%, 60%);
2236
2400
  border-color: var(--hl-ring);
2237
- box-shadow: 0 0 0 3px rgba(60, 131, 246, 0.3);
2401
+ box-shadow: var(--hl-focus-shadow);
2238
2402
  }
2239
2403
 
2240
- @supports (color: color-mix(in lch, red, blue)){
2241
- .hl-select:focus-visible {
2242
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
2243
- }
2244
- }
2245
-
2246
2404
  .hl-select:disabled {
2247
2405
  cursor: not-allowed;
2248
- opacity: 0.6;
2249
- background: hsl(210, 40%, 96%);
2406
+ opacity: var(--hl-disabled-opacity);
2250
2407
  background: var(--hl-surface-2);
2251
2408
  }
2252
2409
 
2253
2410
  .hl-select[data-hl-invalid],
2254
2411
  .hl-select[aria-invalid='true'] {
2255
- border-color: hsl(0, 72%, 51%);
2256
2412
  border-color: var(--hl-danger);
2257
2413
  }
2258
2414
 
@@ -2260,8 +2416,6 @@
2260
2416
  --_height: var(--hl-control-height-sm);
2261
2417
  --_font: var(--hl-text-xs);
2262
2418
 
2263
- border-radius: 0.25rem;
2264
-
2265
2419
  border-radius: var(--hl-radius-sm);
2266
2420
  }
2267
2421
 
@@ -2269,253 +2423,261 @@
2269
2423
  --_height: var(--hl-control-height-lg);
2270
2424
  --_font: var(--hl-text-base);
2271
2425
  }
2426
+
2427
+ @media (forced-colors: active) {
2428
+ .hl-select:focus-visible {
2429
+ outline: var(--hl-focus-ring);
2430
+ outline-offset: var(--hl-focus-offset);
2431
+ }
2432
+ }
2272
2433
  }
2273
2434
 
2274
2435
  /**
2275
- * Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>…</span></label>`.
2276
- * The native input is restyled (appearance:none) with a CSS checkmark, keeping
2277
- * full keyboard + form semantics.
2436
+ * Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>...</span></label>`.
2437
+ * The native input is restyled (appearance: none) with a CSS checkmark, keeping
2438
+ * full keyboard and form semantics. A single checkbox needs no JavaScript; the
2439
+ * `data-hl-checkbox-group` enhancer adds a `data-hl-checkbox-all` master box
2440
+ * (checked/indeterminate follows the group) and `data-hl-indeterminate` for an
2441
+ * initial mixed state, both styled here through `:indeterminate`.
2442
+ * data-hl-checkbox-group: wrapper around related boxes for the enhancer
2443
+ * data-hl-checkbox-all: the master "select all" box inside the group
2278
2444
  */
2279
2445
 
2280
2446
  @layer components {
2281
2447
  .hl-checkbox {
2282
2448
  display: inline-flex;
2283
2449
  align-items: center;
2284
- gap: 0.5rem;
2285
2450
  gap: var(--hl-space-2);
2286
- font-size: 0.875rem;
2287
2451
  font-size: var(--hl-text-sm);
2288
- line-height: 1.5;
2289
2452
  line-height: var(--hl-leading-normal);
2290
2453
  cursor: pointer;
2291
2454
  }
2292
2455
 
2293
2456
  .hl-checkbox > input[type='checkbox'] {
2294
- -webkit-appearance: none;
2295
- -moz-appearance: none;
2296
- appearance: none;
2457
+ appearance: none;
2297
2458
  flex: none;
2298
- width: 1.15rem;
2299
- height: 1.15rem;
2459
+ inline-size: 1.15rem;
2460
+ block-size: 1.15rem;
2300
2461
  margin: 0;
2301
- border: 2px solid hsl(213, 27%, 84%);
2302
2462
  border: var(--hl-border-width-2) solid var(--hl-border-strong);
2303
- border-radius: 0.25rem;
2304
2463
  border-radius: var(--hl-radius-sm);
2305
- background: hsl(0, 0%, 100%);
2306
2464
  background: var(--hl-surface);
2307
2465
  display: grid;
2308
- align-content: center;
2309
- justify-content: center;
2310
2466
  place-content: center;
2311
2467
  cursor: pointer;
2312
2468
  transition:
2313
- background-color 120ms cubic-bezier(0.2, 0, 0, 1), border-color 120ms cubic-bezier(0.2, 0, 0, 1);
2314
- transition:
2315
- background-color var(--hl-duration-fast) var(--hl-ease-standard), border-color var(--hl-duration-fast) var(--hl-ease-standard);
2469
+ background-color var(--hl-duration-fast) var(--hl-ease-standard),
2470
+ border-color var(--hl-duration-fast) var(--hl-ease-standard);
2316
2471
  }
2317
2472
 
2473
+ /* The mark is a rotated L drawn with two borders; direction-neutral. */
2318
2474
  .hl-checkbox > input[type='checkbox']::after {
2319
2475
  content: '';
2320
- width: 0.34rem;
2321
- height: 0.62rem;
2322
- border: solid hsl(0, 0%, 100%);
2476
+ inline-size: 0.34rem;
2477
+ block-size: 0.62rem;
2323
2478
  border: solid var(--hl-primary-fg);
2324
2479
  border-width: 0 2px 2px 0;
2325
- margin-top: -2px;
2326
- transform: rotate(45deg) scale(0);
2327
- transition: transform 120ms cubic-bezier(0.3, 0, 0, 1);
2328
- transition: transform var(--hl-duration-fast) var(--hl-ease-emphasized);
2480
+ margin-block-start: -2px;
2481
+ rotate: 45deg;
2482
+ scale: 0;
2483
+ transition: scale var(--hl-duration-fast) var(--hl-ease-emphasized);
2329
2484
  }
2330
2485
 
2331
2486
  .hl-checkbox > input[type='checkbox']:checked,
2332
2487
  .hl-checkbox > input[type='checkbox']:indeterminate {
2333
- background: hsl(221, 83%, 53%);
2334
2488
  background: var(--hl-primary);
2335
- border-color: hsl(221, 83%, 53%);
2336
2489
  border-color: var(--hl-primary);
2337
2490
  }
2338
2491
 
2339
2492
  .hl-checkbox > input[type='checkbox']:checked::after {
2340
- transform: rotate(45deg) scale(1);
2493
+ scale: 1;
2341
2494
  }
2342
2495
 
2343
2496
  .hl-checkbox > input[type='checkbox']:indeterminate::after {
2344
- width: 0.6rem;
2345
- height: 0;
2497
+ inline-size: 0.6rem;
2498
+ block-size: 0;
2346
2499
  margin: 0;
2347
2500
  border-width: 0 0 2px;
2348
- transform: none;
2501
+ rotate: none;
2502
+ scale: 1;
2349
2503
  }
2350
2504
 
2351
2505
  .hl-checkbox > input[type='checkbox']:focus-visible {
2352
- outline: 2px solid hsl(217, 91%, 60%);
2353
2506
  outline: var(--hl-focus-ring);
2354
- outline-offset: 2px;
2507
+ outline-offset: var(--hl-focus-offset);
2355
2508
  }
2356
2509
 
2357
2510
  .hl-checkbox > input[type='checkbox']:disabled {
2358
2511
  cursor: not-allowed;
2359
- opacity: 0.55;
2512
+ opacity: var(--hl-disabled-opacity);
2360
2513
  }
2361
2514
 
2362
2515
  .hl-checkbox:has(> input:disabled) {
2363
2516
  cursor: not-allowed;
2364
- color: hsl(215, 16%, 47%);
2365
2517
  color: var(--hl-fg-subtle);
2366
2518
  }
2519
+
2520
+ /* The custom-drawn mark must keep its own colors to stay visible on the
2521
+ Highlight fill; everything else follows the system palette. */
2522
+ @media (forced-colors: active) {
2523
+ .hl-checkbox > input[type='checkbox']::after {
2524
+ forced-color-adjust: none;
2525
+ border-color: HighlightText;
2526
+ }
2527
+ }
2367
2528
  }
2368
2529
 
2369
2530
  /**
2370
- * Radio: `<label class="hl-radio"><input type="radio"><span>…</span></label>`,
2371
- * grouped in `<div class="hl-radio-group" role="radiogroup">`.
2531
+ * Radio group: `<label class="hl-radio"><input type="radio"><span>...</span></label>`
2532
+ * items grouped in `<div class="hl-radio-group" role="radiogroup">`. Native
2533
+ * radios provide selection and arrow-key movement; pure CSS, there is no
2534
+ * enhancer.
2535
+ * data-hl-orientation: vertical (default) | horizontal (on the group)
2372
2536
  */
2373
2537
 
2374
2538
  @layer components {
2375
2539
  .hl-radio-group {
2376
2540
  display: flex;
2377
2541
  flex-direction: column;
2378
- gap: 0.5rem;
2379
2542
  gap: var(--hl-space-2);
2380
2543
  }
2381
2544
 
2382
2545
  .hl-radio-group[data-hl-orientation='horizontal'] {
2383
2546
  flex-direction: row;
2384
2547
  flex-wrap: wrap;
2385
- gap: 1rem;
2386
2548
  gap: var(--hl-space-4);
2387
2549
  }
2388
2550
 
2389
2551
  .hl-radio {
2390
2552
  display: inline-flex;
2391
2553
  align-items: center;
2392
- gap: 0.5rem;
2393
2554
  gap: var(--hl-space-2);
2394
- font-size: 0.875rem;
2395
2555
  font-size: var(--hl-text-sm);
2396
- line-height: 1.5;
2397
2556
  line-height: var(--hl-leading-normal);
2398
2557
  cursor: pointer;
2399
2558
  }
2400
2559
 
2401
2560
  .hl-radio > input[type='radio'] {
2402
- -webkit-appearance: none;
2403
- -moz-appearance: none;
2404
- appearance: none;
2561
+ appearance: none;
2405
2562
  flex: none;
2406
- width: 1.15rem;
2407
- height: 1.15rem;
2563
+ inline-size: 1.15rem;
2564
+ block-size: 1.15rem;
2408
2565
  margin: 0;
2409
- border: 2px solid hsl(213, 27%, 84%);
2410
2566
  border: var(--hl-border-width-2) solid var(--hl-border-strong);
2411
- border-radius: 9999px;
2412
2567
  border-radius: var(--hl-radius-full);
2413
- background: hsl(0, 0%, 100%);
2414
2568
  background: var(--hl-surface);
2415
2569
  display: grid;
2416
- align-content: center;
2417
- justify-content: center;
2418
2570
  place-content: center;
2419
2571
  cursor: pointer;
2420
- transition: border-color 120ms cubic-bezier(0.2, 0, 0, 1);
2421
2572
  transition: border-color var(--hl-duration-fast) var(--hl-ease-standard);
2422
2573
  }
2423
2574
 
2424
2575
  .hl-radio > input[type='radio']::after {
2425
2576
  content: '';
2426
- width: 0.6rem;
2427
- height: 0.6rem;
2428
- border-radius: 9999px;
2577
+ inline-size: 0.6rem;
2578
+ block-size: 0.6rem;
2429
2579
  border-radius: var(--hl-radius-full);
2430
- background: hsl(221, 83%, 53%);
2431
2580
  background: var(--hl-primary);
2432
- transform: scale(0);
2433
- transition: transform 120ms cubic-bezier(0.3, 0, 0, 1);
2434
- transition: transform var(--hl-duration-fast) var(--hl-ease-emphasized);
2581
+ scale: 0;
2582
+ transition: scale var(--hl-duration-fast) var(--hl-ease-emphasized);
2435
2583
  }
2436
2584
 
2437
2585
  .hl-radio > input[type='radio']:checked {
2438
- border-color: hsl(221, 83%, 53%);
2439
2586
  border-color: var(--hl-primary);
2440
2587
  }
2441
2588
 
2442
2589
  .hl-radio > input[type='radio']:checked::after {
2443
- transform: scale(1);
2590
+ scale: 1;
2444
2591
  }
2445
2592
 
2446
2593
  .hl-radio > input[type='radio']:focus-visible {
2447
- outline: 2px solid hsl(217, 91%, 60%);
2448
2594
  outline: var(--hl-focus-ring);
2449
- outline-offset: 2px;
2595
+ outline-offset: var(--hl-focus-offset);
2450
2596
  }
2451
2597
 
2452
2598
  .hl-radio > input[type='radio']:disabled {
2453
2599
  cursor: not-allowed;
2454
- opacity: 0.55;
2600
+ opacity: var(--hl-disabled-opacity);
2455
2601
  }
2456
2602
 
2457
2603
  .hl-radio:has(> input:disabled) {
2458
2604
  cursor: not-allowed;
2459
- color: hsl(215, 16%, 47%);
2460
2605
  color: var(--hl-fg-subtle);
2461
2606
  }
2607
+
2608
+ /* The dot is custom-drawn, so it opts out of forced-color flattening. */
2609
+ @media (forced-colors: active) {
2610
+ .hl-radio > input[type='radio']::after {
2611
+ forced-color-adjust: none;
2612
+ background: Highlight;
2613
+ }
2614
+ }
2462
2615
  }
2463
2616
 
2617
+ /**
2618
+ * Switch: `<label data-hl-switch><input type="checkbox" role="switch"> Label</label>`.
2619
+ * The native checkbox is restyled as a track and thumb, so state, keyboard,
2620
+ * and form submission stay native. Pure CSS; there is no enhancer.
2621
+ * data-hl-switch: the label wrapper
2622
+ */
2623
+
2464
2624
  @layer components {
2465
2625
  [data-hl-switch] {
2626
+ --_track-inline: 2.25rem;
2627
+ --_track-block: 1.25rem;
2628
+ --_gap: 2px;
2629
+ --_thumb: calc(var(--_track-block) - var(--_gap) * 2);
2630
+ --_travel: calc(var(--_track-inline) - var(--_track-block));
2631
+
2466
2632
  display: inline-flex;
2467
2633
  align-items: center;
2468
- gap: 0.5rem;
2469
2634
  gap: var(--hl-space-2);
2470
2635
  }
2471
2636
 
2472
2637
  [data-hl-switch] input[type='checkbox'] {
2473
- -webkit-appearance: none;
2474
- -moz-appearance: none;
2475
- appearance: none;
2476
- width: 2.25rem;
2477
- height: 1.25rem;
2478
- border-radius: 1.25rem;
2479
- background: hsl(213, 27%, 84%);
2480
- background: var(--hl-border-strong);
2638
+ appearance: none;
2481
2639
  position: relative;
2482
- outline-offset: 2px;
2483
- transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1);
2640
+ inline-size: var(--_track-inline);
2641
+ block-size: var(--_track-block);
2642
+ margin: 0;
2643
+ border-radius: var(--hl-radius-full);
2644
+ background: var(--hl-border-strong);
2484
2645
  transition: background-color var(--hl-duration-fast) var(--hl-ease-standard);
2485
2646
  }
2486
2647
 
2648
+ /* The thumb rests at the inline start and travels toward the inline end,
2649
+ so it is placed logically and slides left under RTL. */
2487
2650
  [data-hl-switch] input[type='checkbox']::after {
2488
2651
  content: '';
2489
2652
  position: absolute;
2490
- top: 2px;
2491
- right: auto;
2492
- bottom: auto;
2493
- left: 2px;
2494
- width: calc(1.25rem - 4px);
2495
- height: calc(1.25rem - 4px);
2496
- border-radius: 50%;
2497
- background: hsl(0, 0%, 100%);
2653
+ inset-block-start: var(--_gap);
2654
+ inset-inline-start: var(--_gap);
2655
+ inline-size: var(--_thumb);
2656
+ block-size: var(--_thumb);
2657
+ border-radius: var(--hl-radius-full);
2498
2658
  background: var(--hl-surface);
2499
- transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
2500
- transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
2659
+ transition: translate var(--hl-duration-fast) var(--hl-ease-standard);
2501
2660
  }
2502
2661
 
2503
2662
  [data-hl-switch] input[type='checkbox']:checked::after {
2504
- transform: translateX(1rem);
2663
+ translate: var(--_travel) 0;
2664
+ }
2665
+
2666
+ [data-hl-switch] input[type='checkbox']:checked:dir(rtl)::after {
2667
+ translate: calc(var(--_travel) * -1) 0;
2505
2668
  }
2506
2669
 
2507
2670
  [data-hl-switch] input[type='checkbox']:checked {
2508
- background: hsl(221, 83%, 53%);
2509
2671
  background: var(--hl-primary);
2510
2672
  }
2511
2673
 
2512
2674
  [data-hl-switch] input[type='checkbox']:focus-visible {
2513
- outline: 2px solid hsl(217, 91%, 60%);
2514
2675
  outline: var(--hl-focus-ring);
2676
+ outline-offset: var(--hl-focus-offset);
2515
2677
  }
2516
2678
 
2517
2679
  [data-hl-switch] input[type='checkbox']:disabled {
2518
- opacity: 0.5;
2680
+ opacity: var(--hl-disabled-opacity);
2519
2681
  cursor: not-allowed;
2520
2682
  }
2521
2683
 
@@ -2523,94 +2685,102 @@
2523
2685
  opacity: 0.7;
2524
2686
  cursor: not-allowed;
2525
2687
  }
2688
+
2689
+ /* The track needs an edge once its fill is flattened, and the custom-drawn
2690
+ thumb keeps its own colors so it stays visible on both states. */
2691
+ @media (forced-colors: active) {
2692
+ [data-hl-switch] input[type='checkbox'] {
2693
+ border: var(--hl-border-width) solid ButtonBorder;
2694
+ }
2695
+
2696
+ [data-hl-switch] input[type='checkbox']:checked {
2697
+ background: Highlight;
2698
+ border-color: Highlight;
2699
+ }
2700
+
2701
+ [data-hl-switch] input[type='checkbox']::after {
2702
+ forced-color-adjust: none;
2703
+ background: ButtonText;
2704
+ }
2705
+
2706
+ [data-hl-switch] input[type='checkbox']:checked::after {
2707
+ background: HighlightText;
2708
+ }
2709
+ }
2526
2710
  }
2527
2711
 
2528
2712
  /**
2529
2713
  * Field, accessible form-control layout: `.hl-field` stacks a `.hl-label`,
2530
2714
  * the control, `.hl-help`, and `.hl-error`. `.hl-fieldset` + `.hl-legend`
2531
- * group related fields.
2715
+ * group related fields. Pure CSS; there is no enhancer.
2716
+ * data-hl-required: on `.hl-label`, appends an asterisk
2717
+ * data-hl-invalid: on `.hl-field`, colors the label as an error
2532
2718
  */
2533
2719
 
2534
2720
  @layer components {
2535
2721
  .hl-field {
2536
2722
  display: flex;
2537
2723
  flex-direction: column;
2538
- gap: 0.375rem;
2539
2724
  gap: var(--hl-space-1-5);
2540
2725
  }
2541
2726
 
2542
2727
  .hl-label {
2543
- font-size: 0.875rem;
2544
2728
  font-size: var(--hl-text-sm);
2545
- font-weight: 500;
2546
2729
  font-weight: var(--hl-font-medium);
2547
- color: hsl(222, 47%, 11%);
2548
2730
  color: var(--hl-fg);
2549
2731
  }
2550
2732
 
2551
2733
  .hl-label[data-hl-required]::after {
2552
2734
  content: '*';
2553
- margin-left: 0.25rem;
2554
- margin-left: var(--hl-space-1);
2555
- color: hsl(0, 72%, 51%);
2735
+ margin-inline-start: var(--hl-space-1);
2556
2736
  color: var(--hl-danger);
2557
2737
  }
2558
2738
 
2559
2739
  .hl-help {
2560
2740
  margin: 0;
2561
- font-size: 0.75rem;
2562
2741
  font-size: var(--hl-text-xs);
2563
- color: hsl(215, 19%, 35%);
2564
2742
  color: var(--hl-fg-muted);
2565
2743
  }
2566
2744
 
2567
2745
  .hl-error {
2568
2746
  margin: 0;
2569
- font-size: 0.75rem;
2570
2747
  font-size: var(--hl-text-xs);
2571
- font-weight: 500;
2572
2748
  font-weight: var(--hl-font-medium);
2573
- color: hsl(0, 72%, 51%);
2574
2749
  color: var(--hl-danger);
2575
2750
  }
2576
2751
 
2577
2752
  .hl-field[data-hl-invalid] .hl-label {
2578
- color: hsl(0, 72%, 51%);
2579
2753
  color: var(--hl-danger);
2580
2754
  }
2581
2755
 
2582
2756
  .hl-fieldset {
2583
2757
  margin: 0;
2584
- padding: 1rem;
2585
2758
  padding: var(--hl-space-4);
2586
- border: 1px solid hsl(214, 32%, 91%);
2587
2759
  border: var(--hl-border-width) solid var(--hl-border);
2588
- border-radius: 0.5rem;
2589
2760
  border-radius: var(--hl-radius-lg);
2590
2761
  display: flex;
2591
2762
  flex-direction: column;
2592
- gap: 1rem;
2593
2763
  gap: var(--hl-space-4);
2594
2764
  }
2595
2765
 
2596
2766
  .hl-legend {
2597
- padding-left: 0.5rem;
2598
- padding-right: 0.5rem;
2599
- padding-left: var(--hl-space-2);
2600
- padding-right: var(--hl-space-2);
2601
- font-size: 0.875rem;
2767
+ padding-inline: var(--hl-space-2);
2602
2768
  font-size: var(--hl-text-sm);
2603
- font-weight: 600;
2604
2769
  font-weight: var(--hl-font-semibold);
2605
- color: hsl(222, 47%, 11%);
2606
2770
  color: var(--hl-fg);
2607
2771
  }
2608
2772
  }
2609
2773
 
2610
2774
  /**
2611
2775
  * Combobox: `<div data-hl-combobox>` wrapping an `<input>` and a
2612
- * `<ul role="listbox">` of `<li role="option">`. The enhancer toggles the
2613
- * listbox and manages `aria-activedescendant`.
2776
+ * `<ul role="listbox">` of `<li role="option">`.
2777
+ *
2778
+ * No-JS baseline: the listbox is hidden until the root has focus within it,
2779
+ * so the options are at least reachable and readable. The enhancer marks the
2780
+ * root `data-hl-ready` and then owns visibility through `hidden`, filtering,
2781
+ * and `aria-activedescendant`.
2782
+ * data-hl-combobox: root
2783
+ * data-hl-ready: set by the enhancer; the baseline rules stand down
2614
2784
  */
2615
2785
 
2616
2786
  @layer components {
@@ -2621,25 +2791,17 @@
2621
2791
 
2622
2792
  [data-hl-combobox] [role='listbox'] {
2623
2793
  position: absolute;
2624
- top: calc(100% + 0.25rem);
2625
- top: calc(100% + var(--hl-space-1));
2626
- left: 0;
2627
- right: 0;
2628
- z-index: 1000;
2794
+ inset-block-start: calc(100% + var(--hl-space-1));
2795
+ inset-inline: 0;
2629
2796
  z-index: var(--hl-z-dropdown);
2630
- max-height: 16rem;
2797
+ max-block-size: 16rem;
2631
2798
  margin: 0;
2632
- padding: 0.25rem;
2633
2799
  padding: var(--hl-space-1);
2634
2800
  overflow-y: auto;
2635
2801
  list-style: none;
2636
- background: hsl(0, 0%, 100%);
2637
2802
  background: var(--hl-overlay);
2638
- border: 1px solid hsl(214, 32%, 91%);
2639
2803
  border: var(--hl-border-width) solid var(--hl-border);
2640
- border-radius: 0.5rem;
2641
2804
  border-radius: var(--hl-radius-lg);
2642
- box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
2643
2805
  box-shadow: var(--hl-overlay-shadow);
2644
2806
  }
2645
2807
 
@@ -2648,18 +2810,11 @@
2648
2810
  @supports (anchor-name: --x) {
2649
2811
  [data-hl-combobox] [role='listbox'] {
2650
2812
  position: fixed;
2651
- top: auto;
2652
- right: auto;
2653
- bottom: auto;
2654
- left: auto;
2655
- width: anchor-size(width);
2656
- inset-area: block-end;
2813
+ inset: auto;
2814
+ inline-size: anchor-size(width);
2657
2815
  position-area: block-end;
2658
2816
  position-try-fallbacks: flip-block;
2659
- margin-top: 0.25rem;
2660
- margin-bottom: 0.25rem;
2661
- margin-top: var(--hl-space-1);
2662
- margin-bottom: var(--hl-space-1);
2817
+ margin-block: var(--hl-space-1);
2663
2818
  }
2664
2819
  }
2665
2820
 
@@ -2667,27 +2822,37 @@
2667
2822
  display: none;
2668
2823
  }
2669
2824
 
2825
+ /* No-JS baseline: reveal the list while the field has focus. */
2826
+ [data-hl-combobox]:not([data-hl-ready]) [role='listbox'] {
2827
+ display: none;
2828
+ }
2829
+
2830
+ [data-hl-combobox]:not([data-hl-ready]):focus-within [role='listbox'] {
2831
+ display: block;
2832
+ }
2833
+
2834
+ /* The input may be a plain `<input>` rather than `.hl-input`; make sure it
2835
+ still shows a focus ring. */
2836
+ [data-hl-combobox] > input:focus-visible {
2837
+ outline: none;
2838
+ border-color: var(--hl-ring);
2839
+ box-shadow: var(--hl-focus-shadow);
2840
+ }
2841
+
2670
2842
  [data-hl-combobox] [role='option'] {
2671
2843
  display: flex;
2672
2844
  align-items: center;
2673
- gap: 0.5rem;
2674
2845
  gap: var(--hl-space-2);
2675
- padding: 0.5rem 0.75rem;
2676
2846
  padding: var(--hl-space-2) var(--hl-space-3);
2677
- border-radius: 0.375rem;
2678
2847
  border-radius: var(--hl-radius-md);
2679
- font-size: 0.875rem;
2680
2848
  font-size: var(--hl-text-sm);
2681
- color: hsl(222, 47%, 11%);
2682
2849
  color: var(--hl-fg);
2683
2850
  cursor: pointer;
2684
2851
  }
2685
2852
 
2686
2853
  [data-hl-combobox] [role='option']:hover,
2687
2854
  [data-hl-combobox] [role='option'][aria-selected='true'] {
2688
- background: hsl(214, 100%, 97%);
2689
2855
  background: var(--hl-primary-subtle);
2690
- color: hsl(224, 76%, 48%);
2691
2856
  color: var(--hl-primary-subtle-fg);
2692
2857
  }
2693
2858
 
@@ -2696,16 +2861,29 @@
2696
2861
  }
2697
2862
 
2698
2863
  [data-hl-combobox] [role='option'][aria-disabled='true'] {
2699
- opacity: 0.5;
2864
+ opacity: var(--hl-disabled-opacity);
2700
2865
  pointer-events: none;
2701
2866
  }
2867
+
2868
+ @media (forced-colors: active) {
2869
+ [data-hl-combobox] [role='option'][aria-selected='true'] {
2870
+ background: Highlight;
2871
+ color: HighlightText;
2872
+ }
2873
+
2874
+ [data-hl-combobox] [role='option'][aria-disabled='true'] {
2875
+ color: GrayText;
2876
+ }
2877
+ }
2702
2878
  }
2703
2879
 
2704
2880
  /**
2705
2881
  * Segmented control: `<div class="hl-segmented" role="radiogroup">` of
2706
- * `<label class="hl-segmented-item"><input type="radio">…</label>` segments.
2882
+ * `<label class="hl-segmented-item"><input type="radio">...</label>` segments.
2707
2883
  * Radio inputs give free keyboard navigation; the checked segment is raised.
2708
- * A button variant using `aria-pressed="true"` is also supported.
2884
+ * A button variant is also supported: with the enhancer (`data-hl-segmented`)
2885
+ * buttons become a `role="radio"` group with `aria-checked` and arrow keys;
2886
+ * without it, mark the active button `aria-pressed="true"`.
2709
2887
  * data-hl-size: sm | md (default) | lg
2710
2888
  */
2711
2889
 
@@ -2713,15 +2891,10 @@
2713
2891
  .hl-segmented {
2714
2892
  display: inline-flex;
2715
2893
  align-items: stretch;
2716
- gap: 0.25rem;
2717
2894
  gap: var(--hl-space-1);
2718
- padding: 0.25rem;
2719
2895
  padding: var(--hl-space-1);
2720
- background: hsl(210, 40%, 96%);
2721
2896
  background: var(--hl-surface-2);
2722
- border: 1px solid hsl(214, 32%, 91%);
2723
2897
  border: var(--hl-border-width) solid var(--hl-border);
2724
- border-radius: 0.5rem;
2725
2898
  border-radius: var(--hl-radius-lg);
2726
2899
  }
2727
2900
 
@@ -2730,89 +2903,87 @@
2730
2903
  display: inline-flex;
2731
2904
  align-items: center;
2732
2905
  justify-content: center;
2733
- gap: 0.5rem;
2734
2906
  gap: var(--hl-space-2);
2735
- padding: 0.25rem 0.75rem;
2736
2907
  padding: var(--hl-space-1) var(--hl-space-3);
2737
2908
  border: 0;
2738
- border-radius: 0.375rem;
2739
2909
  border-radius: var(--hl-radius-md);
2740
2910
  background: transparent;
2741
- color: hsl(215, 19%, 35%);
2742
2911
  color: var(--hl-fg-muted);
2743
2912
  font: inherit;
2744
- font-size: 0.875rem;
2745
2913
  font-size: var(--hl-text-sm);
2746
- font-weight: 500;
2747
2914
  font-weight: var(--hl-font-medium);
2748
2915
  white-space: nowrap;
2749
2916
  cursor: pointer;
2750
2917
  -webkit-user-select: none;
2751
- -moz-user-select: none;
2752
2918
  user-select: none;
2753
2919
  transition:
2754
- background-color 120ms cubic-bezier(0.2, 0, 0, 1), color 120ms cubic-bezier(0.2, 0, 0, 1);
2755
- transition:
2756
- background-color var(--hl-duration-fast) var(--hl-ease-standard), color var(--hl-duration-fast) var(--hl-ease-standard);
2920
+ background-color var(--hl-duration-fast) var(--hl-ease-standard),
2921
+ color var(--hl-duration-fast) var(--hl-ease-standard);
2757
2922
  }
2758
2923
 
2759
2924
  .hl-segmented-item > input {
2760
2925
  position: absolute;
2761
- top: 0;
2762
- right: 0;
2763
- bottom: 0;
2764
- left: 0;
2926
+ inset: 0;
2765
2927
  margin: 0;
2766
2928
  opacity: 0;
2767
2929
  cursor: pointer;
2768
2930
  }
2769
2931
 
2770
2932
  .hl-segmented-item:hover {
2771
- color: hsl(222, 47%, 11%);
2772
2933
  color: var(--hl-fg);
2773
2934
  }
2774
2935
 
2775
2936
  .hl-segmented-item:has(input:checked),
2776
- .hl-segmented-item[aria-pressed='true'] {
2777
- background: hsl(0, 0%, 100%);
2937
+ .hl-segmented-item:is([aria-pressed='true'], [aria-checked='true']) {
2778
2938
  background: var(--hl-surface);
2779
- color: hsl(222, 47%, 11%);
2780
2939
  color: var(--hl-fg);
2781
- box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
2782
2940
  box-shadow: var(--hl-shadow-sm);
2783
2941
  }
2784
2942
 
2785
2943
  .hl-segmented-item:has(input:focus-visible),
2786
- .hl-segmented-item[aria-pressed]:focus-visible {
2787
- outline: 2px solid hsl(217, 91%, 60%);
2944
+ .hl-segmented-item:is([aria-pressed], [aria-checked]):focus-visible {
2788
2945
  outline: var(--hl-focus-ring);
2789
- outline-offset: 2px;
2946
+ outline-offset: var(--hl-focus-offset);
2790
2947
  }
2791
2948
 
2792
2949
  .hl-segmented-item:has(input:disabled),
2793
2950
  .hl-segmented-item:disabled {
2794
- opacity: 0.5;
2951
+ opacity: var(--hl-disabled-opacity);
2795
2952
  cursor: not-allowed;
2796
2953
  }
2797
2954
 
2798
2955
  .hl-segmented[data-hl-size='sm'] .hl-segmented-item {
2799
- padding: 0.125rem 0.5rem;
2800
2956
  padding: 0.125rem var(--hl-space-2);
2801
- font-size: 0.75rem;
2802
2957
  font-size: var(--hl-text-xs);
2803
2958
  }
2804
2959
 
2805
2960
  .hl-segmented[data-hl-size='lg'] .hl-segmented-item {
2806
- padding: 0.5rem 1rem;
2807
2961
  padding: var(--hl-space-2) var(--hl-space-4);
2808
- font-size: 1rem;
2809
2962
  font-size: var(--hl-text-base);
2810
2963
  }
2964
+
2965
+ /* The raised segment relies on a shadow, which forced colors remove. */
2966
+ @media (forced-colors: active) {
2967
+ .hl-segmented-item {
2968
+ border: var(--hl-border-width) solid ButtonBorder;
2969
+ }
2970
+
2971
+ .hl-segmented-item:has(input:checked),
2972
+ .hl-segmented-item:is([aria-pressed='true'], [aria-checked='true']) {
2973
+ background: Highlight;
2974
+ color: HighlightText;
2975
+ }
2976
+ }
2811
2977
  }
2812
2978
 
2813
2979
  /**
2814
2980
  * Slider: native `<input type="range" class="hl-slider">`. Restyled track and
2815
- * thumb across WebKit/Blink and Firefox while keeping native keyboard support.
2981
+ * thumb across WebKit/Blink and Firefox while keeping native keyboard support
2982
+ * and RTL direction. Firefox paints the filled part of the track natively
2983
+ * (`::-moz-range-progress`); other engines get it from the
2984
+ * `--hl-slider-progress` custom property the enhancer keeps in sync when the
2985
+ * input sits inside a `[data-hl-slider]` wrapper (with an optional `<output>`).
2986
+ * data-hl-slider: wrapper around the input (and output) for the enhancer
2816
2987
  */
2817
2988
 
2818
2989
  @layer components {
@@ -2820,78 +2991,90 @@
2820
2991
  --_track: 0.375rem;
2821
2992
  --_thumb: 1.15rem;
2822
2993
 
2823
- -webkit-appearance: none;
2824
-
2825
- -moz-appearance: none;
2826
-
2827
- appearance: none;
2828
- width: 100%;
2829
- height: 1.15rem;
2830
- height: var(--_thumb);
2994
+ appearance: none;
2995
+ inline-size: 100%;
2996
+ block-size: var(--_thumb);
2831
2997
  margin: 0;
2832
2998
  background: transparent;
2833
2999
  cursor: pointer;
2834
3000
  }
2835
3001
 
2836
3002
  .hl-slider::-webkit-slider-runnable-track {
2837
- height: var(--_track);
2838
- border-radius: 9999px;
3003
+ block-size: var(--_track);
2839
3004
  border-radius: var(--hl-radius-full);
2840
- background: hsl(214, 32%, 91%);
2841
3005
  background: var(--hl-surface-3);
2842
3006
  }
2843
3007
 
3008
+ /* Fill up to the thumb once the enhancer publishes the progress. */
3009
+ .hl-slider[style*='--hl-slider-progress']::-webkit-slider-runnable-track {
3010
+ background: linear-gradient(
3011
+ to right,
3012
+ var(--hl-primary) var(--hl-slider-progress),
3013
+ var(--hl-surface-3) var(--hl-slider-progress)
3014
+ );
3015
+ }
3016
+
3017
+ :is(
3018
+ [dir='rtl'] .hl-slider,
3019
+ .hl-slider:dir(rtl)
3020
+ )[style*='--hl-slider-progress']::-webkit-slider-runnable-track {
3021
+ background: linear-gradient(
3022
+ to left,
3023
+ var(--hl-primary) var(--hl-slider-progress),
3024
+ var(--hl-surface-3) var(--hl-slider-progress)
3025
+ );
3026
+ }
3027
+
3028
+ [data-hl-slider] {
3029
+ display: flex;
3030
+ align-items: center;
3031
+ gap: var(--hl-space-3);
3032
+ }
3033
+
3034
+ [data-hl-slider] > output {
3035
+ min-inline-size: 3ch;
3036
+ font-size: var(--hl-text-sm);
3037
+ font-variant-numeric: tabular-nums;
3038
+ color: var(--hl-fg-muted);
3039
+ text-align: end;
3040
+ }
3041
+
2844
3042
  .hl-slider::-moz-range-track {
2845
- height: var(--_track);
2846
- border-radius: 9999px;
3043
+ block-size: var(--_track);
2847
3044
  border-radius: var(--hl-radius-full);
2848
- background: hsl(214, 32%, 91%);
2849
3045
  background: var(--hl-surface-3);
2850
3046
  }
2851
3047
 
2852
3048
  .hl-slider::-moz-range-progress {
2853
- height: var(--_track);
2854
- border-radius: 9999px;
3049
+ block-size: var(--_track);
2855
3050
  border-radius: var(--hl-radius-full);
2856
- background: hsl(221, 83%, 53%);
2857
3051
  background: var(--hl-primary);
2858
3052
  }
2859
3053
 
2860
3054
  .hl-slider::-webkit-slider-thumb {
2861
- -webkit-appearance: none;
2862
- appearance: none;
2863
- width: var(--_thumb);
2864
- height: var(--_thumb);
2865
- margin-top: calc((var(--_track) - var(--_thumb)) / 2);
2866
- border: 2px solid hsl(0, 0%, 100%);
3055
+ appearance: none;
3056
+ inline-size: var(--_thumb);
3057
+ block-size: var(--_thumb);
3058
+ margin-block-start: calc((var(--_track) - var(--_thumb)) / 2);
2867
3059
  border: 2px solid var(--hl-surface);
2868
- border-radius: 9999px;
2869
3060
  border-radius: var(--hl-radius-full);
2870
- background: hsl(221, 83%, 53%);
2871
3061
  background: var(--hl-primary);
2872
- box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
2873
3062
  box-shadow: var(--hl-shadow-sm);
2874
- -webkit-transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
2875
- transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
2876
- -webkit-transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
2877
- transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
3063
+ -webkit-transition: scale var(--hl-duration-fast) var(--hl-ease-standard);
3064
+ transition: scale var(--hl-duration-fast) var(--hl-ease-standard);
2878
3065
  }
2879
3066
 
2880
3067
  .hl-slider::-moz-range-thumb {
2881
- width: var(--_thumb);
2882
- height: var(--_thumb);
2883
- border: 2px solid hsl(0, 0%, 100%);
3068
+ inline-size: var(--_thumb);
3069
+ block-size: var(--_thumb);
2884
3070
  border: 2px solid var(--hl-surface);
2885
- border-radius: 9999px;
2886
3071
  border-radius: var(--hl-radius-full);
2887
- background: hsl(221, 83%, 53%);
2888
3072
  background: var(--hl-primary);
2889
- box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
2890
3073
  box-shadow: var(--hl-shadow-sm);
2891
3074
  }
2892
3075
 
2893
3076
  .hl-slider:active::-webkit-slider-thumb {
2894
- transform: scale(1.1);
3077
+ scale: 1.1;
2895
3078
  }
2896
3079
 
2897
3080
  .hl-slider:focus-visible {
@@ -2899,37 +3082,38 @@
2899
3082
  }
2900
3083
 
2901
3084
  .hl-slider:focus-visible::-webkit-slider-thumb {
2902
- box-shadow: 0 0 0 4px rgba(60, 131, 246, 0.35);
2903
- }
2904
-
2905
- @supports (color: color-mix(in lch, red, blue)){
2906
- .hl-slider:focus-visible::-webkit-slider-thumb {
2907
- box-shadow: 0 0 0 4px color-mix(in oklab, var(--hl-ring) 35%, transparent);
3085
+ box-shadow: var(--hl-focus-shadow);
2908
3086
  }
2909
- }
2910
3087
 
2911
3088
  .hl-slider:focus-visible::-moz-range-thumb {
2912
- box-shadow: 0 0 0 4px rgba(60, 131, 246, 0.35);
2913
- }
2914
-
2915
- @supports (color: color-mix(in lch, red, blue)){
2916
- .hl-slider:focus-visible::-moz-range-thumb {
2917
- box-shadow: 0 0 0 4px color-mix(in oklab, var(--hl-ring) 35%, transparent);
3089
+ box-shadow: var(--hl-focus-shadow);
2918
3090
  }
2919
- }
2920
3091
 
2921
3092
  .hl-slider:disabled {
2922
3093
  cursor: not-allowed;
2923
- opacity: 0.6;
3094
+ opacity: var(--hl-disabled-opacity);
3095
+ }
3096
+
3097
+ /* Shadows vanish in forced colors, so focus falls back to an outline. */
3098
+ @media (forced-colors: active) {
3099
+ .hl-slider:focus-visible {
3100
+ outline: var(--hl-focus-ring);
3101
+ outline-offset: var(--hl-focus-offset);
3102
+ }
2924
3103
  }
2925
3104
  }
2926
3105
 
2927
3106
  /* Feedback & data display */
2928
3107
 
2929
3108
  /**
2930
- * Alert: `<div class="hl-alert" role="alert" data-hl-intent="…">` with an
2931
- * optional icon, `.hl-alert-title`, and body content.
2932
- * data-hl-intent: info (default) | success | warning | danger | neutral
3109
+ * Alert: `<div class="hl-alert" role="alert" data-hl-intent="...">` with an
3110
+ * optional icon, `.hl-alert-title`, and body content. Add `data-hl-alert` and
3111
+ * a `[data-hl-dismiss]` button for the dismiss enhancer, which fades the alert
3112
+ * out (`data-hl-alert-closing`) before hiding it.
3113
+ * data-hl-intent: info (default) | success | warning | danger | neutral
3114
+ * data-hl-alert: opt in to the dismiss enhancer
3115
+ * data-hl-dismiss: the dismiss button inside the alert
3116
+ * data-hl-alert-closing: set by the enhancer during the exit transition
2933
3117
  */
2934
3118
 
2935
3119
  @layer components {
@@ -2939,25 +3123,64 @@
2939
3123
  --_fg: var(--hl-info-subtle-fg);
2940
3124
 
2941
3125
  display: flex;
2942
- gap: 0.75rem;
2943
3126
  gap: var(--hl-space-3);
2944
- padding: 0.75rem 1rem;
2945
3127
  padding: var(--hl-space-3) var(--hl-space-4);
2946
- border: 1px solid transparent;
2947
3128
  border: var(--hl-border-width) solid transparent;
2948
- border-left: 3px solid hsl(200, 98%, 39%);
2949
- border-left: 3px solid hsl(200deg 98% 39%);
2950
- border-left: 3px solid var(--_accent);
2951
- border-radius: 0.375rem;
3129
+ border-inline-start: 3px solid var(--_accent);
2952
3130
  border-radius: var(--hl-radius-md);
2953
- background: hsl(204, 100%, 97%);
2954
3131
  background: var(--_bg);
2955
- color: hsl(201, 96%, 32%);
2956
3132
  color: var(--_fg);
2957
- font-size: 0.875rem;
2958
3133
  font-size: var(--hl-text-sm);
2959
- line-height: 1.5;
2960
3134
  line-height: var(--hl-leading-normal);
3135
+ transition:
3136
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
3137
+ translate var(--hl-duration-base) var(--hl-ease-standard);
3138
+ }
3139
+
3140
+ .hl-alert[data-hl-alert-closing] {
3141
+ opacity: 0;
3142
+ translate: 0 -0.25rem;
3143
+ }
3144
+
3145
+ /* `display: flex` above would otherwise beat the user agent's `[hidden]`. */
3146
+ .hl-alert[hidden] {
3147
+ display: none;
3148
+ }
3149
+
3150
+ .hl-alert [data-hl-dismiss] {
3151
+ display: inline-flex;
3152
+ align-items: center;
3153
+ justify-content: center;
3154
+ flex: none;
3155
+ inline-size: 1.5rem;
3156
+ block-size: 1.5rem;
3157
+ margin-inline-start: auto;
3158
+ margin-block-start: -0.125rem;
3159
+ padding: 0;
3160
+ border: 0;
3161
+ border-radius: var(--hl-radius-sm);
3162
+ background: transparent;
3163
+ color: inherit;
3164
+ font: inherit;
3165
+ line-height: 1;
3166
+ cursor: pointer;
3167
+ opacity: 0.7;
3168
+ }
3169
+
3170
+ .hl-alert [data-hl-dismiss]:hover {
3171
+ opacity: 1;
3172
+ background: color-mix(in oklab, currentcolor 10%, transparent);
3173
+ }
3174
+
3175
+ .hl-alert [data-hl-dismiss]:focus-visible {
3176
+ outline: var(--hl-focus-ring);
3177
+ outline-offset: var(--hl-focus-offset);
3178
+ opacity: 1;
3179
+ }
3180
+
3181
+ .hl-alert [data-hl-dismiss]:empty::before {
3182
+ content: '\00D7';
3183
+ font-size: var(--hl-text-lg);
2961
3184
  }
2962
3185
 
2963
3186
  .hl-alert[data-hl-intent='success'] {
@@ -2986,35 +3209,40 @@
2986
3209
 
2987
3210
  .hl-alert > svg:first-child {
2988
3211
  flex: none;
2989
- width: 1.25rem;
2990
- height: 1.25rem;
2991
- margin-top: 0.1rem;
3212
+ inline-size: 1.25rem;
3213
+ block-size: 1.25rem;
3214
+ margin-block-start: 0.1rem;
2992
3215
  color: var(--_accent);
2993
3216
  }
2994
3217
 
2995
3218
  .hl-alert-body {
2996
3219
  display: flex;
2997
3220
  flex-direction: column;
2998
- gap: 0.25rem;
2999
3221
  gap: var(--hl-space-1);
3000
- min-width: 0;
3222
+ min-inline-size: 0;
3001
3223
  }
3002
3224
 
3003
3225
  .hl-alert-title {
3004
3226
  margin: 0;
3005
- font-size: 0.875rem;
3006
3227
  font-size: var(--hl-text-sm);
3007
- font-weight: 600;
3008
3228
  font-weight: var(--hl-font-semibold);
3009
3229
  }
3010
3230
 
3011
3231
  .hl-alert p {
3012
3232
  margin: 0;
3013
3233
  }
3234
+
3235
+ /* Fills are flattened in forced colors, so the outline carries the shape. */
3236
+ @media (forced-colors: active) {
3237
+ .hl-alert {
3238
+ border-color: CanvasText;
3239
+ }
3240
+ }
3014
3241
  }
3015
3242
 
3016
3243
  /**
3017
- * Badge: `<span class="hl-badge" data-hl-intent="…" data-hl-variant="…">`.
3244
+ * Badge: `<span class="hl-badge" data-hl-intent="..." data-hl-variant="...">`.
3245
+ * Pure CSS; there is no enhancer.
3018
3246
  * data-hl-intent: neutral (default) | primary | danger | success | warning | info
3019
3247
  * data-hl-variant: soft (default) | solid | outline
3020
3248
  * data-hl-size: sm | md (default)
@@ -3030,23 +3258,14 @@
3030
3258
 
3031
3259
  display: inline-flex;
3032
3260
  align-items: center;
3033
- gap: 0.25rem;
3034
3261
  gap: var(--hl-space-1);
3035
- padding: 0.125rem 0.5rem;
3036
3262
  padding: 0.125rem var(--hl-space-2);
3037
- border: 1px solid transparent;
3038
3263
  border: var(--hl-border-width) solid transparent;
3039
- border-radius: 9999px;
3040
3264
  border-radius: var(--hl-radius-full);
3041
- background: hsl(210, 40%, 96%);
3042
3265
  background: var(--_soft-bg);
3043
- color: hsl(222, 47%, 11%);
3044
3266
  color: var(--_soft-fg);
3045
- font-size: 0.75rem;
3046
3267
  font-size: var(--hl-text-xs);
3047
- font-weight: 500;
3048
3268
  font-weight: var(--hl-font-medium);
3049
- line-height: 1.25;
3050
3269
  line-height: var(--hl-leading-tight);
3051
3270
  white-space: nowrap;
3052
3271
  }
@@ -3103,15 +3322,22 @@
3103
3322
  }
3104
3323
 
3105
3324
  .hl-badge[data-hl-size='sm'] {
3106
- padding: 0 0.375rem;
3107
3325
  padding: 0 var(--hl-space-1-5);
3108
3326
  font-size: 0.6875rem;
3109
3327
  }
3328
+
3329
+ /* Soft and solid fills disappear in forced colors; keep the pill outline. */
3330
+ @media (forced-colors: active) {
3331
+ .hl-badge {
3332
+ border-color: CanvasText;
3333
+ }
3334
+ }
3110
3335
  }
3111
3336
 
3112
3337
  /**
3113
3338
  * Card: `<div class="hl-card">` with optional `.hl-card-header`,
3114
3339
  * `.hl-card-body`, `.hl-card-footer`, `.hl-card-title`, `.hl-card-description`.
3340
+ * Pure CSS; there is no enhancer.
3115
3341
  * data-hl-interactive: hover/active elevation for clickable cards
3116
3342
  */
3117
3343
 
@@ -3119,13 +3345,9 @@
3119
3345
  .hl-card {
3120
3346
  display: flex;
3121
3347
  flex-direction: column;
3122
- background: hsl(0, 0%, 100%);
3123
3348
  background: var(--hl-surface);
3124
- border: 1px solid hsl(214, 32%, 91%);
3125
3349
  border: var(--hl-border-width) solid var(--hl-border);
3126
- border-radius: 0.75rem;
3127
3350
  border-radius: var(--hl-radius-xl);
3128
- box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
3129
3351
  box-shadow: var(--hl-shadow-sm);
3130
3352
  overflow: hidden;
3131
3353
  }
@@ -3133,82 +3355,65 @@
3133
3355
  .hl-card-header {
3134
3356
  display: flex;
3135
3357
  flex-direction: column;
3136
- gap: 0.25rem;
3137
3358
  gap: var(--hl-space-1);
3138
- padding: 1rem 1.25rem;
3139
3359
  padding: var(--hl-space-4) var(--hl-space-5);
3140
- border-bottom: 1px solid hsl(214, 32%, 91%);
3141
- border-bottom: 1px solid hsl(214deg 32% 91%);
3142
- border-bottom: var(--hl-border-width) solid var(--hl-border);
3360
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
3143
3361
  }
3144
3362
 
3145
3363
  .hl-card-body {
3146
3364
  flex: 1 1 auto;
3147
- padding: 1.25rem;
3148
3365
  padding: var(--hl-space-5);
3149
3366
  }
3150
3367
 
3151
3368
  .hl-card-footer {
3152
3369
  display: flex;
3153
3370
  align-items: center;
3154
- gap: 0.5rem;
3155
3371
  gap: var(--hl-space-2);
3156
- padding: 1rem 1.25rem;
3157
3372
  padding: var(--hl-space-4) var(--hl-space-5);
3158
- border-top: 1px solid hsl(214, 32%, 91%);
3159
- border-top: 1px solid hsl(214deg 32% 91%);
3160
- border-top: var(--hl-border-width) solid var(--hl-border);
3161
- background: hsl(210, 40%, 96%);
3373
+ border-block-start: var(--hl-border-width) solid var(--hl-border);
3162
3374
  background: var(--hl-surface-2);
3163
3375
  }
3164
3376
 
3165
3377
  .hl-card-title {
3166
3378
  margin: 0;
3167
- font-size: 1.125rem;
3168
3379
  font-size: var(--hl-text-lg);
3169
- font-weight: 600;
3170
3380
  font-weight: var(--hl-font-semibold);
3171
- line-height: 1.25;
3172
3381
  line-height: var(--hl-leading-tight);
3173
3382
  }
3174
3383
 
3175
3384
  .hl-card-description {
3176
3385
  margin: 0;
3177
- font-size: 0.875rem;
3178
3386
  font-size: var(--hl-text-sm);
3179
- color: hsl(215, 19%, 35%);
3180
3387
  color: var(--hl-fg-muted);
3181
3388
  }
3182
3389
 
3183
3390
  .hl-card[data-hl-interactive] {
3184
3391
  cursor: pointer;
3185
3392
  transition:
3186
- border-color 120ms cubic-bezier(0.2, 0, 0, 1), box-shadow 180ms cubic-bezier(0.2, 0, 0, 1), transform 180ms cubic-bezier(0.2, 0, 0, 1);
3187
- transition:
3188
- border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-base) var(--hl-ease-standard), transform var(--hl-duration-base) var(--hl-ease-standard);
3393
+ border-color var(--hl-duration-fast) var(--hl-ease-standard),
3394
+ box-shadow var(--hl-duration-base) var(--hl-ease-standard),
3395
+ translate var(--hl-duration-base) var(--hl-ease-standard);
3189
3396
  }
3190
3397
 
3191
3398
  .hl-card[data-hl-interactive]:hover {
3192
- border-color: hsl(213, 27%, 84%);
3193
3399
  border-color: var(--hl-border-strong);
3194
- box-shadow: 0 4px 6px -1px hsla(222, 47%, 11%, 0.1), 0 2px 4px -2px hsla(222, 47%, 11%, 0.1);
3195
3400
  box-shadow: var(--hl-shadow-md);
3196
3401
  }
3197
3402
 
3198
3403
  .hl-card[data-hl-interactive]:focus-within {
3199
- outline: 2px solid hsl(217, 91%, 60%);
3200
3404
  outline: var(--hl-focus-ring);
3201
- outline-offset: 2px;
3405
+ outline-offset: var(--hl-focus-offset);
3202
3406
  }
3203
3407
 
3204
3408
  .hl-card[data-hl-interactive]:active {
3205
- transform: translateY(1px);
3409
+ translate: 0 1px;
3206
3410
  }
3207
3411
  }
3208
3412
 
3209
3413
  /**
3210
3414
  * Avatar: `<span class="hl-avatar">` containing an `<img>` or fallback
3211
- * initials/icon. Stack with `<div class="hl-avatar-group">`.
3415
+ * initials/icon. Stack with `<div class="hl-avatar-group">`. Pure CSS; there
3416
+ * is no enhancer.
3212
3417
  * data-hl-size: xs | sm | md (default) | lg | xl
3213
3418
  * data-hl-shape: square
3214
3419
  */
@@ -3219,42 +3424,30 @@
3219
3424
 
3220
3425
  position: relative;
3221
3426
  display: inline-grid;
3222
- align-items: center;
3223
- justify-items: center;
3224
3427
  place-items: center;
3225
3428
  flex: none;
3226
- width: 2.5rem;
3227
- width: var(--_size);
3228
- height: 2.5rem;
3229
- height: var(--_size);
3230
- border-radius: 9999px;
3429
+ inline-size: var(--_size);
3430
+ block-size: var(--_size);
3231
3431
  border-radius: var(--hl-radius-full);
3232
3432
  overflow: hidden;
3233
- background: hsl(214, 32%, 91%);
3234
3433
  background: var(--hl-surface-3);
3235
- color: hsl(215, 19%, 35%);
3236
3434
  color: var(--hl-fg-muted);
3237
- font-size: calc(2.5rem * 0.4);
3238
3435
  font-size: calc(var(--_size) * 0.4);
3239
- font-weight: 500;
3240
3436
  font-weight: var(--hl-font-medium);
3241
3437
  line-height: 1;
3242
3438
  text-transform: uppercase;
3243
3439
  -webkit-user-select: none;
3244
- -moz-user-select: none;
3245
3440
  user-select: none;
3246
3441
  }
3247
3442
 
3248
3443
  .hl-avatar[data-hl-shape='square'] {
3249
- border-radius: 0.5rem;
3250
3444
  border-radius: var(--hl-radius-lg);
3251
3445
  }
3252
3446
 
3253
3447
  .hl-avatar > img {
3254
- width: 100%;
3255
- height: 100%;
3256
- -o-object-fit: cover;
3257
- object-fit: cover;
3448
+ inline-size: 100%;
3449
+ block-size: 100%;
3450
+ object-fit: cover;
3258
3451
  }
3259
3452
 
3260
3453
  .hl-avatar[data-hl-size='xs'] {
@@ -3279,18 +3472,17 @@
3279
3472
  }
3280
3473
 
3281
3474
  .hl-avatar-group > .hl-avatar {
3282
- box-shadow: 0 0 0 2px hsl(0, 0%, 100%);
3283
3475
  box-shadow: 0 0 0 2px var(--hl-surface);
3284
3476
  }
3285
3477
 
3286
3478
  .hl-avatar-group > .hl-avatar:not(:first-child) {
3287
- margin-left: -0.6rem;
3479
+ margin-inline-start: -0.6rem;
3288
3480
  }
3289
3481
  }
3290
3482
 
3291
3483
  /**
3292
3484
  * Progress: native `<progress class="hl-progress" value max>`. Omit `value`
3293
- * for an indeterminate bar.
3485
+ * for an indeterminate bar. Pure CSS; there is no enhancer.
3294
3486
  * data-hl-intent: primary (default) | success | warning | danger | info
3295
3487
  * data-hl-size: sm | md (default) | lg
3296
3488
  */
@@ -3300,21 +3492,13 @@
3300
3492
  --_color: var(--hl-primary);
3301
3493
  --_height: 0.5rem;
3302
3494
 
3303
- -webkit-appearance: none;
3304
-
3305
- -moz-appearance: none;
3306
-
3307
- appearance: none;
3308
- width: 100%;
3309
- height: 0.5rem;
3310
- height: var(--_height);
3495
+ appearance: none;
3496
+ inline-size: 100%;
3497
+ block-size: var(--_height);
3311
3498
  border: 0;
3312
- border-radius: 9999px;
3313
3499
  border-radius: var(--hl-radius-full);
3314
3500
  overflow: hidden;
3315
- background: hsl(214, 32%, 91%);
3316
3501
  background: var(--hl-surface-3);
3317
- color: hsl(221, 83%, 53%);
3318
3502
  color: var(--_color);
3319
3503
  }
3320
3504
 
@@ -3348,28 +3532,21 @@
3348
3532
 
3349
3533
  .hl-progress::-webkit-progress-value {
3350
3534
  background: var(--_color);
3351
- border-radius: 9999px;
3352
3535
  border-radius: var(--hl-radius-full);
3353
- -webkit-transition: width 180ms cubic-bezier(0.2, 0, 0, 1);
3354
- transition: width 180ms cubic-bezier(0.2, 0, 0, 1);
3355
- -webkit-transition: width var(--hl-duration-base) var(--hl-ease-standard);
3356
- transition: width var(--hl-duration-base) var(--hl-ease-standard);
3536
+ -webkit-transition: inline-size var(--hl-duration-base) var(--hl-ease-standard);
3537
+ transition: inline-size var(--hl-duration-base) var(--hl-ease-standard);
3357
3538
  }
3358
3539
 
3359
3540
  .hl-progress::-moz-progress-bar {
3360
3541
  background: var(--_color);
3361
- border-radius: 9999px;
3362
3542
  border-radius: var(--hl-radius-full);
3363
3543
  }
3364
3544
 
3365
3545
  .hl-progress:indeterminate {
3366
- background: linear-gradient(90deg, transparent 0%, var(--_color) 50%, transparent 100%)
3367
- hsl(214, 32%, 91%);
3368
3546
  background: linear-gradient(90deg, transparent 0%, var(--_color) 50%, transparent 100%)
3369
3547
  var(--hl-surface-3);
3370
3548
  background-size: 40% 100%;
3371
3549
  background-repeat: no-repeat;
3372
- animation: hl-progress-indeterminate 1.2s cubic-bezier(0.2, 0, 0, 1) infinite;
3373
3550
  animation: hl-progress-indeterminate 1.2s var(--hl-ease-standard) infinite;
3374
3551
  }
3375
3552
 
@@ -3387,16 +3564,33 @@
3387
3564
  }
3388
3565
  }
3389
3566
 
3567
+ /* A static partial bar still signals "in progress" without motion. */
3390
3568
  @media (prefers-reduced-motion: reduce) {
3391
3569
  .hl-progress:indeterminate {
3392
- animation-duration: 3s;
3570
+ animation: none;
3571
+ background-position: 30% 0;
3572
+ }
3573
+ }
3574
+
3575
+ @media (forced-colors: active) {
3576
+ .hl-progress {
3577
+ border: var(--hl-border-width) solid CanvasText;
3578
+ }
3579
+
3580
+ .hl-progress::-webkit-progress-value {
3581
+ background: Highlight;
3582
+ }
3583
+
3584
+ .hl-progress::-moz-progress-bar {
3585
+ background: Highlight;
3393
3586
  }
3394
3587
  }
3395
3588
  }
3396
3589
 
3397
3590
  /**
3398
3591
  * Spinner: `<span class="hl-spinner" role="status" aria-label="Loading">`.
3399
- * Inherits `currentColor`, so set `color` to theme it.
3592
+ * Inherits `currentColor`, so set `color` to theme it. Pure CSS; there is no
3593
+ * enhancer.
3400
3594
  * data-hl-size: sm | md (default) | lg | xl
3401
3595
  */
3402
3596
 
@@ -3407,23 +3601,14 @@
3407
3601
 
3408
3602
  display: inline-block;
3409
3603
  flex: none;
3410
- width: 1.25rem;
3411
- width: var(--_size);
3412
- height: 1.25rem;
3413
- height: var(--_size);
3414
- border: 2px solid color-mix(in oklab, currentcolor 25%, transparent);
3415
- border-top-color: currentcolor;
3416
- border-radius: 9999px;
3604
+ inline-size: var(--_size);
3605
+ block-size: var(--_size);
3606
+ border: var(--_width) solid color-mix(in oklab, currentcolor 25%, transparent);
3607
+ border-block-start-color: currentcolor;
3417
3608
  border-radius: var(--hl-radius-full);
3418
3609
  animation: hl-spinner-rotate 0.6s linear infinite;
3419
3610
  }
3420
3611
 
3421
- @supports (color: color-mix(in lch, red, blue)){
3422
- .hl-spinner {
3423
- border: var(--_width) solid color-mix(in oklab, currentcolor 25%, transparent);
3424
- }
3425
- }
3426
-
3427
3612
  .hl-spinner[data-hl-size='sm'] {
3428
3613
  --_size: 1rem;
3429
3614
  }
@@ -3444,32 +3629,36 @@
3444
3629
  }
3445
3630
  }
3446
3631
 
3632
+ /* A static arc still reads as "loading" without continuous motion. */
3447
3633
  @media (prefers-reduced-motion: reduce) {
3448
3634
  .hl-spinner {
3449
- animation-duration: 1.4s;
3635
+ animation: none;
3636
+ }
3637
+ }
3638
+
3639
+ /* The faded ring is color-mixed, which forced colors flatten; keep the arc
3640
+ visible by drawing the rest of the ring in GrayText. */
3641
+ @media (forced-colors: active) {
3642
+ .hl-spinner {
3643
+ border-color: GrayText;
3644
+ border-block-start-color: CanvasText;
3450
3645
  }
3451
3646
  }
3452
3647
  }
3453
3648
 
3454
3649
  /**
3455
- * Skeleton: `<span class="hl-skeleton" data-hl-variant="…" aria-hidden="true">`
3456
- * placeholder shown while content loads.
3457
- * data-hl-variant: rect (default) | text | circle
3650
+ * Skeleton: `<span class="hl-skeleton" data-hl-shape="..." aria-hidden="true">`
3651
+ * placeholder shown while content loads. Pure CSS; there is no enhancer.
3652
+ * Size it with inline `inline-size`/`block-size`.
3653
+ * data-hl-shape: rect (default) | text | circle
3458
3654
  */
3459
3655
 
3460
3656
  @layer components {
3461
3657
  .hl-skeleton {
3462
3658
  display: block;
3463
- width: 100%;
3464
- height: 1rem;
3465
- border-radius: 0.375rem;
3659
+ inline-size: 100%;
3660
+ block-size: 1rem;
3466
3661
  border-radius: var(--hl-radius-md);
3467
- background: linear-gradient(
3468
- 90deg,
3469
- hsl(214, 32%, 91%) 25%,
3470
- hsl(210, 40%, 96%) 37%,
3471
- hsl(214, 32%, 91%) 63%
3472
- );
3473
3662
  background: linear-gradient(
3474
3663
  90deg,
3475
3664
  var(--hl-surface-3) 25%,
@@ -3477,20 +3666,17 @@
3477
3666
  var(--hl-surface-3) 63%
3478
3667
  );
3479
3668
  background-size: 400% 100%;
3480
- animation: hl-skeleton-shimmer 1.4s cubic-bezier(0.2, 0, 0, 1) infinite;
3481
3669
  animation: hl-skeleton-shimmer 1.4s var(--hl-ease-standard) infinite;
3482
3670
  }
3483
3671
 
3484
- .hl-skeleton[data-hl-variant='text'] {
3485
- height: 0.7em;
3486
- border-radius: 0.25rem;
3672
+ .hl-skeleton[data-hl-shape='text'] {
3673
+ block-size: 0.7em;
3487
3674
  border-radius: var(--hl-radius-sm);
3488
3675
  }
3489
3676
 
3490
- .hl-skeleton[data-hl-variant='circle'] {
3491
- width: 2.5rem;
3492
- height: 2.5rem;
3493
- border-radius: 9999px;
3677
+ .hl-skeleton[data-hl-shape='circle'] {
3678
+ inline-size: 2.5rem;
3679
+ block-size: 2.5rem;
3494
3680
  border-radius: var(--hl-radius-full);
3495
3681
  }
3496
3682
 
@@ -3507,15 +3693,22 @@
3507
3693
  @media (prefers-reduced-motion: reduce) {
3508
3694
  .hl-skeleton {
3509
3695
  animation: none;
3510
- background: hsl(214, 32%, 91%);
3511
3696
  background: var(--hl-surface-3);
3512
3697
  }
3513
3698
  }
3699
+
3700
+ /* Fills flatten to Canvas in forced colors; outline the placeholder instead. */
3701
+ @media (forced-colors: active) {
3702
+ .hl-skeleton {
3703
+ border: var(--hl-border-width) solid GrayText;
3704
+ }
3705
+ }
3514
3706
  }
3515
3707
 
3516
3708
  /**
3517
3709
  * Keyboard key: `<kbd class="hl-kbd">⌘</kbd>`. Combine inline, e.g.
3518
- * `<kbd class="hl-kbd">⌘</kbd><kbd class="hl-kbd">K</kbd>`.
3710
+ * `<kbd class="hl-kbd">⌘</kbd><kbd class="hl-kbd">K</kbd>`. Pure CSS; there
3711
+ * is no enhancer.
3519
3712
  */
3520
3713
 
3521
3714
  @layer components {
@@ -3523,19 +3716,13 @@
3523
3716
  display: inline-flex;
3524
3717
  align-items: center;
3525
3718
  justify-content: center;
3526
- min-width: 1.5rem;
3719
+ min-inline-size: 1.5rem;
3527
3720
  padding: 0.125rem 0.4rem;
3528
- border: 1px solid hsl(213, 27%, 84%);
3529
3721
  border: var(--hl-border-width) solid var(--hl-border-strong);
3530
- border-bottom-width: 2px;
3531
- border-bottom-width: var(--hl-border-width-2);
3532
- border-radius: 0.25rem;
3722
+ border-block-end-width: var(--hl-border-width-2);
3533
3723
  border-radius: var(--hl-radius-sm);
3534
- background: hsl(210, 40%, 96%);
3535
3724
  background: var(--hl-surface-2);
3536
- color: hsl(222, 47%, 11%);
3537
3725
  color: var(--hl-fg);
3538
- font-family: ui-monospace, sfmono-regular, 'SF Mono', menlo, consolas, 'Liberation Mono', monospace;
3539
3726
  font-family: var(--hl-font-mono);
3540
3727
  font-size: 0.8125em;
3541
3728
  line-height: 1;
@@ -3544,117 +3731,181 @@
3544
3731
  }
3545
3732
 
3546
3733
  /**
3547
- * Table: `<table class="hl-table">`. Semantic table styling with optional
3548
- * zebra striping and hover.
3734
+ * Table: `<table class="hl-table">`, optionally inside
3735
+ * `<div class="hl-table-wrapper">` so wide tables scroll instead of breaking
3736
+ * the layout. Add `data-hl-table` and mark headers `data-hl-sort` for the
3737
+ * sorting enhancer; it sets `aria-sort` on the active column.
3549
3738
  * data-hl-striped: zebra rows
3550
3739
  * data-hl-hover: highlight row on hover
3740
+ * data-hl-align: start (default) | center | end, on the table or a cell
3741
+ * data-hl-size: sm | md (default) | lg, cell padding density
3742
+ * data-hl-table: opt in to the sorting enhancer
3743
+ * data-hl-sort: a sortable header (value: the column key)
3551
3744
  */
3552
3745
 
3553
3746
  @layer components {
3747
+ .hl-table-wrapper {
3748
+ inline-size: 100%;
3749
+ overflow-x: auto;
3750
+ overscroll-behavior-x: contain;
3751
+ }
3752
+
3554
3753
  .hl-table {
3555
- width: 100%;
3754
+ --_pad-y: var(--hl-space-2);
3755
+ --_pad-x: var(--hl-space-3);
3756
+
3757
+ inline-size: 100%;
3556
3758
  border-collapse: collapse;
3557
- font-size: 0.875rem;
3558
3759
  font-size: var(--hl-text-sm);
3559
- color: hsl(222, 47%, 11%);
3560
3760
  color: var(--hl-fg);
3561
3761
  }
3562
3762
 
3563
3763
  .hl-table caption {
3564
- padding-top: 0.5rem;
3565
- padding-bottom: 0.5rem;
3566
- padding-top: var(--hl-space-2);
3567
- padding-bottom: var(--hl-space-2);
3568
- color: hsl(215, 19%, 35%);
3764
+ padding-block: var(--hl-space-2);
3569
3765
  color: var(--hl-fg-muted);
3570
- text-align: left;
3766
+ text-align: start;
3571
3767
  caption-side: bottom;
3572
3768
  }
3573
3769
 
3574
3770
  .hl-table th,
3575
3771
  .hl-table td {
3576
- padding: 0.5rem 0.75rem;
3577
- padding: var(--hl-space-2) var(--hl-space-3);
3578
- text-align: left;
3772
+ padding: var(--_pad-y) var(--_pad-x);
3773
+ text-align: start;
3579
3774
  vertical-align: middle;
3580
- border-bottom: 1px solid hsl(214, 32%, 91%);
3581
- border-bottom: 1px solid hsl(214deg 32% 91%);
3582
- border-bottom: var(--hl-border-width) solid var(--hl-border);
3775
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
3583
3776
  }
3584
3777
 
3585
3778
  .hl-table thead th {
3586
- font-size: 0.75rem;
3587
3779
  font-size: var(--hl-text-xs);
3588
- font-weight: 600;
3589
3780
  font-weight: var(--hl-font-semibold);
3590
3781
  text-transform: uppercase;
3591
3782
  letter-spacing: 0.03em;
3592
- color: hsl(215, 19%, 35%);
3593
3783
  color: var(--hl-fg-muted);
3594
- border-bottom-color: hsl(213, 27%, 84%);
3595
- border-bottom-color: hsl(213deg 27% 84%);
3596
- border-bottom-color: var(--hl-border-strong);
3784
+ border-block-end-color: var(--hl-border-strong);
3785
+ }
3786
+
3787
+ /* Sortable headers: a pointer cursor, a focus ring, and a direction glyph. */
3788
+ .hl-table th[data-hl-sort] {
3789
+ cursor: pointer;
3790
+ -webkit-user-select: none;
3791
+ user-select: none;
3792
+ }
3793
+
3794
+ .hl-table th[data-hl-sort]:hover {
3795
+ color: var(--hl-fg);
3796
+ }
3797
+
3798
+ .hl-table th[data-hl-sort]:focus-visible {
3799
+ outline: var(--hl-focus-ring);
3800
+ outline-offset: calc(var(--hl-focus-offset) * -1);
3801
+ }
3802
+
3803
+ .hl-table th[data-hl-sort]::after {
3804
+ content: '';
3805
+ display: inline-block;
3806
+ inline-size: 0.35em;
3807
+ block-size: 0.35em;
3808
+ margin-inline-start: var(--hl-space-1);
3809
+ border-inline-end: 1.5px solid currentcolor;
3810
+ border-block-end: 1.5px solid currentcolor;
3811
+ opacity: 0;
3812
+ translate: 0 -0.15em;
3813
+ rotate: 45deg;
3814
+ transition: opacity var(--hl-duration-fast) var(--hl-ease-standard);
3815
+ }
3816
+
3817
+ .hl-table th[data-hl-sort]:hover::after {
3818
+ opacity: 0.4;
3819
+ }
3820
+
3821
+ .hl-table th[aria-sort='ascending']::after,
3822
+ .hl-table th[aria-sort='descending']::after {
3823
+ opacity: 1;
3824
+ color: var(--hl-primary);
3825
+ }
3826
+
3827
+ .hl-table th[aria-sort='ascending']::after {
3828
+ rotate: 225deg;
3829
+ translate: 0 0.1em;
3597
3830
  }
3598
3831
 
3599
3832
  .hl-table tfoot td {
3600
- font-weight: 500;
3601
3833
  font-weight: var(--hl-font-medium);
3602
- color: hsl(215, 19%, 35%);
3603
3834
  color: var(--hl-fg-muted);
3604
3835
  }
3605
3836
 
3606
3837
  .hl-table[data-hl-striped] tbody tr:nth-child(even) {
3607
- background: hsl(210, 40%, 96%);
3608
3838
  background: var(--hl-surface-2);
3609
3839
  }
3610
3840
 
3611
3841
  .hl-table[data-hl-hover] tbody tr:hover {
3612
- background: rgba(36, 99, 235, 0.08);
3842
+ background: color-mix(in oklab, var(--hl-primary) 8%, transparent);
3613
3843
  }
3614
3844
 
3615
- @supports (color: color-mix(in lch, red, blue)){
3616
- .hl-table[data-hl-hover] tbody tr:hover {
3617
- background: color-mix(in oklab, var(--hl-primary) 8%, transparent);
3845
+ .hl-table[data-hl-size='sm'] {
3846
+ --_pad-y: var(--hl-space-1);
3847
+ --_pad-x: var(--hl-space-2);
3848
+
3849
+ font-size: var(--hl-text-xs);
3618
3850
  }
3619
- }
3620
3851
 
3621
- .hl-table td[data-hl-align='end'],
3622
- .hl-table th[data-hl-align='end'] {
3623
- text-align: right;
3852
+ .hl-table[data-hl-size='lg'] {
3853
+ --_pad-y: var(--hl-space-3);
3854
+ --_pad-x: var(--hl-space-4);
3855
+
3856
+ font-size: var(--hl-text-base);
3857
+ }
3858
+
3859
+ .hl-table[data-hl-align='start'] :is(th, td),
3860
+ .hl-table :is(th, td)[data-hl-align='start'] {
3861
+ text-align: start;
3624
3862
  }
3625
3863
 
3626
- .hl-table td[data-hl-align='center'],
3627
- .hl-table th[data-hl-align='center'] {
3864
+ .hl-table[data-hl-align='center'] :is(th, td),
3865
+ .hl-table :is(th, td)[data-hl-align='center'] {
3628
3866
  text-align: center;
3629
3867
  }
3868
+
3869
+ .hl-table[data-hl-align='end'] :is(th, td),
3870
+ .hl-table :is(th, td)[data-hl-align='end'] {
3871
+ text-align: end;
3872
+ }
3873
+
3874
+ @media (forced-colors: active) {
3875
+ .hl-table[data-hl-hover] tbody tr:hover {
3876
+ background: Highlight;
3877
+ color: HighlightText;
3878
+ }
3879
+ }
3630
3880
  }
3631
3881
 
3632
3882
  /* Navigation utilities */
3633
3883
 
3884
+ /**
3885
+ * Skip link: `<a class="hl-skip-link" href="#main">Skip to content</a>` placed
3886
+ * first in the body. Visually hidden until it receives keyboard focus, then
3887
+ * pinned to the start corner of the viewport. Pure CSS; there is no enhancer.
3888
+ */
3889
+
3634
3890
  @layer components {
3635
3891
  .hl-skip-link {
3636
3892
  position: absolute;
3637
- left: -9999px;
3638
- top: auto;
3639
- width: 1px;
3640
- height: 1px;
3893
+ inset-inline-start: -9999px;
3894
+ inset-block-start: auto;
3895
+ inline-size: 1px;
3896
+ block-size: 1px;
3641
3897
  overflow: hidden;
3642
3898
  }
3643
3899
 
3644
3900
  .hl-skip-link:focus-visible {
3645
- left: 0;
3646
- top: 0;
3647
- width: auto;
3648
- height: auto;
3649
- padding: 0.5rem 0.75rem;
3901
+ inset-inline-start: 0;
3902
+ inset-block-start: 0;
3903
+ inline-size: auto;
3904
+ block-size: auto;
3650
3905
  padding: var(--hl-space-2) var(--hl-space-3);
3651
- background: hsl(222, 47%, 11%);
3652
3906
  background: var(--hl-fg);
3653
- color: hsl(0, 0%, 100%);
3654
3907
  color: var(--hl-surface);
3655
- border-radius: 0.25rem;
3656
3908
  border-radius: var(--hl-radius-sm);
3657
- outline: 2px solid hsl(217, 91%, 60%);
3658
3909
  outline: var(--hl-focus-ring);
3659
3910
  }
3660
3911
  }