@lilydesignsystem/themes 0.3.1 → 0.5.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 (59) hide show
  1. package/dist/abyss.css +58 -0
  2. package/dist/acid.css +58 -0
  3. package/dist/adobe-spectrum.css +58 -0
  4. package/dist/ant-design.css +3632 -0
  5. package/dist/aqua.css +58 -0
  6. package/dist/atlassian.css +3632 -0
  7. package/dist/autumn.css +58 -0
  8. package/dist/black.css +58 -0
  9. package/dist/bumblebee.css +58 -0
  10. package/dist/business.css +58 -0
  11. package/dist/cappuccino.css +3632 -0
  12. package/dist/caramellatte.css +58 -0
  13. package/dist/cmyk.css +58 -0
  14. package/dist/coffee.css +58 -0
  15. package/dist/corporate.css +58 -0
  16. package/dist/cupcake.css +58 -0
  17. package/dist/cyberpunk.css +58 -0
  18. package/dist/dark.css +58 -0
  19. package/dist/dim.css +58 -0
  20. package/dist/dracula.css +58 -0
  21. package/dist/emerald.css +58 -0
  22. package/dist/excel.css +3632 -0
  23. package/dist/fantasy.css +58 -0
  24. package/dist/fluent.css +3632 -0
  25. package/dist/forest.css +58 -0
  26. package/dist/garden.css +58 -0
  27. package/dist/github-primer.css +3632 -0
  28. package/dist/halloween.css +58 -0
  29. package/dist/ibm-carbon.css +3632 -0
  30. package/dist/lemonade.css +58 -0
  31. package/dist/light.css +58 -0
  32. package/dist/linear.css +3632 -0
  33. package/dist/lofi.css +58 -0
  34. package/dist/luxury.css +58 -0
  35. package/dist/mozilla-protocol.css +58 -0
  36. package/dist/night.css +58 -0
  37. package/dist/nord.css +58 -0
  38. package/dist/notion.css +3632 -0
  39. package/dist/pastel.css +58 -0
  40. package/dist/retro.css +58 -0
  41. package/dist/salesforce.css +3632 -0
  42. package/dist/sap-fiori.css +3632 -0
  43. package/dist/silk.css +58 -0
  44. package/dist/sunset.css +58 -0
  45. package/dist/synthwave.css +58 -0
  46. package/dist/united-kingdom-government-digital-service.css +58 -0
  47. package/dist/united-kingdom-national-health-service-england-for-patients.css +58 -0
  48. package/dist/united-kingdom-national-health-service-england-for-practitioners.css +58 -0
  49. package/dist/united-kingdom-national-health-service-scotland-for-patients.css +58 -0
  50. package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +58 -0
  51. package/dist/united-kingdom-national-health-service-wales-for-patients.css +58 -0
  52. package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +58 -0
  53. package/dist/united-states-web-design-system.css +58 -0
  54. package/dist/valentine.css +58 -0
  55. package/dist/vercel.css +3632 -0
  56. package/dist/winter.css +58 -0
  57. package/dist/wireframe.css +58 -0
  58. package/index.md +14 -10
  59. package/package.json +4 -3
@@ -0,0 +1,3632 @@
1
+ /* ============================================================================
2
+ * Lily theme: salesforce
3
+ *
4
+ * Standalone Lily Design System theme — declares the theme tokens and inlines
5
+ * the component CSS for all 492 Lily components, so this single file is the
6
+ * only stylesheet required to render a Lily-styled page.
7
+ *
8
+ * Credit for the theme source: Salesforce (https://www.lightningdesignsystem.com/)
9
+ *
10
+ * Upstream tracked: Salesforce Lightning Design System (2026) global colour tokens: brand, status, neutral backgrounds.
11
+ * ========================================================================= */
12
+
13
+ /* Theme tokens — the colour, radius, border, and depth variables consumed
14
+ * by every Lily component rule below. The theme applies by default (`:root`)
15
+ * and also when explicitly opted into via `<html data-theme="light">`,
16
+ * so multiple themes can coexist in one document and be switched at runtime
17
+ * by updating the `data-theme` attribute. */
18
+
19
+ :where(:root, :root[data-theme="salesforce"]) {
20
+ color-scheme: light;
21
+
22
+ /* Page-level surface (primary canvas). Sits behind body copy
23
+ and primary content areas. Lightest base shade in light
24
+ themes, deepest in dark themes. */
25
+ --color-base-100: #ffffff;
26
+ /* Secondary surface — section panels, card backgrounds,
27
+ sidebars, table-header fills. One step away from the page
28
+ surface. */
29
+ --color-base-200: #f3f3f3;
30
+ /* Tertiary surface — dividers, sunken wells, hover-row
31
+ backgrounds. The most muted of the three base shades. */
32
+ --color-base-300: #c9c9c9;
33
+ /* Primary text colour. High-contrast against base-100 to meet
34
+ WCAG contrast ratios for body copy. */
35
+ --color-base-content: #181818;
36
+ /* Primary brand / action colour. Used on primary buttons,
37
+ active navigation items, selected states, and the focus
38
+ ring. */
39
+ --color-primary: #0176d3;
40
+ /* Foreground colour used over `--color-primary` fills (so
41
+ primary buttons retain a guaranteed contrast ratio). */
42
+ --color-primary-content: #ffffff;
43
+ /* Secondary brand colour. Pressed/hover state for primary
44
+ buttons and visited links; also drives the secondary chrome
45
+ family. */
46
+ --color-secondary: #014486;
47
+ /* Foreground colour used over `--color-secondary` fills. */
48
+ --color-secondary-content: #ffffff;
49
+ /* Accent colour — used sparingly for emphasis, the AI label,
50
+ illustrations, and tertiary call-outs. */
51
+ --color-accent: #06a59a;
52
+ /* Foreground colour used over `--color-accent` fills. */
53
+ --color-accent-content: #181818;
54
+ /* Neutral chrome surface — footer bars, code blocks,
55
+ tooltips, government-banner strips. Typically the theme's
56
+ darkest neutral. */
57
+ --color-neutral: #032d60;
58
+ /* Foreground colour used over `--color-neutral` fills. */
59
+ --color-neutral-content: #ffffff;
60
+ /* Informational status colour — informational banners, links,
61
+ 'did-you-know' callouts. */
62
+ --color-info: #0176d3;
63
+ /* Foreground colour used over `--color-info` fills. */
64
+ --color-info-content: #ffffff;
65
+ /* Success / confirmation colour — used on success panels,
66
+ completed step indicators, validation pass states, and the
67
+ green RAG status. */
68
+ --color-success: #2e844a;
69
+ /* Foreground colour used over `--color-success` fills. */
70
+ --color-success-content: #ffffff;
71
+ /* Warning colour — yellow/amber band; used on phase banners,
72
+ in-progress states, validation warnings, and the amber RAG
73
+ status. */
74
+ --color-warning: #fe9339;
75
+ /* Foreground colour used over `--color-warning` fills. Often
76
+ dark so text remains legible on a bright yellow background. */
77
+ --color-warning-content: #181818;
78
+ /* Error / destructive colour — used on alert dialogs, error
79
+ messages, validation failures, urgent care cards, and the
80
+ red RAG status. */
81
+ --color-error: #ba0517;
82
+ /* Foreground colour used over `--color-error` fills. */
83
+ --color-error-content: #ffffff;
84
+ /* Smallest corner radius. Applied to chips, badges, switches,
85
+ and radio/checkbox containers (mapped to `--lily-radius-
86
+ sm`). */
87
+ --radius-selector: 0.25rem;
88
+ /* Medium corner radius. Applied to inputs, buttons, menu
89
+ items, tooltips, and most everyday form controls (mapped to
90
+ `--lily-radius-md`). */
91
+ --radius-field: 0.25rem;
92
+ /* Largest corner radius. Applied to cards, dialogs, drawers,
93
+ and hero blocks (mapped to `--lily-radius-lg`). */
94
+ --radius-box: 0.5rem;
95
+ /* Base size for selector-style controls (checkbox/radio glyph
96
+ size, switch thumb diameter). Currently unused by Lily's
97
+ baseline component rules but available for theme
98
+ extensions. */
99
+ --size-selector: 0.25rem;
100
+ /* Base size for field-style controls (input height
101
+ multiplier). Currently unused by Lily's baseline component
102
+ rules but available for theme extensions. */
103
+ --size-field: 0.25rem;
104
+ /* Default border width applied to inputs, buttons, dividers,
105
+ table cells, etc. Single source of truth for the system's
106
+ stroke weight. */
107
+ --border: 1px;
108
+ /* Depth flag (0 or 1). Lily's baseline rules read it
109
+ implicitly via the shadow tokens; a depth-0 theme
110
+ effectively renders flat. */
111
+ --depth: 1;
112
+ /* Noise flag (0 or 1). Reserved for theme extensions that
113
+ want to layer a subtle texture; the baseline rules do not
114
+ consume it. */
115
+ --noise: 0;
116
+ }
117
+
118
+ /* ----------------------------------------------------------------------------
119
+ * Lily component styling — applied automatically once this theme stylesheet
120
+ * is loaded. Every Lily class hook (492 components) consumes the theme tokens
121
+ * declared above, so no other stylesheet is required for the theme to render.
122
+ *
123
+ * Rules live in @layer lily with :where() selectors so the specificity stays
124
+ * at 0 — application CSS always wins. To replace a Lily component's default
125
+ * look, declare a higher-specificity rule (or a later @layer) in your own
126
+ * stylesheet.
127
+ * -------------------------------------------------------------------------- */
128
+
129
+ @layer lily {
130
+ /* ==========================================================================
131
+ * Tokens & primitives
132
+ * --------------------------------------------------------------------------
133
+ * Lily exposes a small, stable set of derived tokens (the `--lily-*`
134
+ * family) layered on top of the upstream theme primitives (the
135
+ * `--color-*`, `--radius-*`, `--border`, `--depth`, `--noise` family).
136
+ *
137
+ * Component rules consume only the `--lily-*` tokens. That indirection
138
+ * means a consumer can swap upstream themes (or invent a new one) without
139
+ * touching component CSS — the component rules below remain stable
140
+ * because their inputs do.
141
+ * ====================================================================== */
142
+
143
+ :where(:root) {
144
+ /* --- Surfaces ------------------------------------------------------ */
145
+ /* Default page surface — the canvas behind body copy. */
146
+ --lily-surface: var(--color-base-100);
147
+ /* Secondary surface — section panels, sidebars, table headers,
148
+ muted callouts. One step away from the page background. */
149
+ --lily-surface-alt: var(--color-base-200);
150
+ /* Sunken surface — used behind progress tracks, skeletons, and
151
+ inset wells. Suggests depth without requiring a shadow. */
152
+ --lily-surface-sunken: var(--color-base-300);
153
+
154
+ /* --- Text ---------------------------------------------------------- */
155
+ /* Primary body-copy colour. Maps to the theme's high-contrast
156
+ reading colour. */
157
+ --lily-text: var(--color-base-content);
158
+ /* Error text: the theme's error colour pulled toward the theme's own reading colour (`--color-base-content`, not `--lily-text`, which a host page may override) so it
159
+ keeps WCAG contrast as text on the page and on the error-tinted
160
+ callout surface (`--color-error` itself is a fill colour). */
161
+ --lily-error-text: color-mix(
162
+ in oklch,
163
+ var(--color-error) 22%,
164
+ var(--color-base-content)
165
+ );
166
+ /* Muted / secondary text — mixed 70% with transparent to keep the
167
+ hue but lower contrast for captions, helptext, placeholders. */
168
+ --lily-text-muted: color-mix(
169
+ in oklch,
170
+ var(--color-base-content) 70%,
171
+ transparent
172
+ );
173
+
174
+ /* --- Borders ------------------------------------------------------- */
175
+ /* Default border — 20% blend with body content colour, low-contrast,
176
+ used for subtle dividers between content blocks. */
177
+ --lily-border: color-mix(
178
+ in oklch,
179
+ var(--color-base-content) 20%,
180
+ transparent
181
+ );
182
+ /* Higher-contrast border — 40% blend, used on inputs, buttons, and
183
+ anywhere a clear edge is required (WCAG non-text contrast). */
184
+ --lily-border-strong: color-mix(
185
+ in oklch,
186
+ var(--color-base-content) 40%,
187
+ transparent
188
+ );
189
+
190
+ /* --- Focus ring ---------------------------------------------------- */
191
+ /* Outline colour for `:focus-visible`. Always the primary brand
192
+ colour so focus is visually tied to interactive intent. */
193
+ --lily-focus-ring: var(--color-primary);
194
+
195
+ /* --- Radii --------------------------------------------------------- */
196
+ /* Three tiers of corner rounding. `sm` for chips/badges,
197
+ `md` for inputs/buttons/cards, `lg` for dialogs/heroes. */
198
+ --lily-radius-sm: var(--radius-selector);
199
+ --lily-radius-md: var(--radius-field);
200
+ --lily-radius-lg: var(--radius-box);
201
+
202
+ /* --- Spacing scale ------------------------------------------------- */
203
+ /* Five-step spacing scale used by every gap, padding, and margin.
204
+ Linear progression keeps rhythm consistent at any zoom level. */
205
+ --lily-space-xs: 0.25rem;
206
+ --lily-space-sm: 0.5rem;
207
+ --lily-space-md: 1rem;
208
+ --lily-space-lg: 1.5rem;
209
+ --lily-space-xl: 2rem;
210
+
211
+ /* --- Typography ---------------------------------------------------- */
212
+ /* Body font stack — system fonts first so consumers get a
213
+ native-feeling baseline without shipping a web font. */
214
+ --lily-font-body:
215
+ system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
216
+ Arial, sans-serif;
217
+ /* Monospaced font stack — used by code, kbd, identifiers, and
218
+ anywhere alignment matters more than reading speed. */
219
+ --lily-font-mono:
220
+ ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
221
+ "Liberation Mono", monospace;
222
+
223
+ /* --- Shadows ------------------------------------------------------- */
224
+ /* Three depth tiers. The shadow colour is derived from the body
225
+ content token so it adapts to light/dark themes automatically. */
226
+ --lily-shadow-sm: 0 1px 2px
227
+ color-mix(in oklch, var(--color-base-content) 8%, transparent);
228
+ --lily-shadow-md: 0 4px 12px
229
+ color-mix(in oklch, var(--color-base-content) 12%, transparent);
230
+ --lily-shadow-lg: 0 12px 32px
231
+ color-mix(in oklch, var(--color-base-content) 16%, transparent);
232
+ }
233
+
234
+ /* Focus ring — every interactive Lily class hook gets the same visible
235
+ focus indicator. Centralising the selector means a consumer can
236
+ restyle every focus state at once by overriding `--lily-focus-ring`
237
+ (or this rule) rather than chasing 100+ component selectors. */
238
+ :where(
239
+ [class$="-input"],
240
+ [class$="-button"],
241
+ [class$="-link"],
242
+ [class$="-list-item"],
243
+ [class$="-option"],
244
+ [class$="-picker-button"],
245
+ .button,
246
+ .input,
247
+ .select,
248
+ .option,
249
+ .menu-item,
250
+ .tab-bar-button,
251
+ .switch-button,
252
+ .toggle-button,
253
+ .checkbox-input,
254
+ .radio-input,
255
+ .file-upload,
256
+ .signature-pad,
257
+ .editable
258
+ ):focus-visible {
259
+ outline: 2px solid var(--lily-focus-ring);
260
+ outline-offset: 2px;
261
+ }
262
+
263
+ /* ==========================================================================
264
+ * Inputs
265
+ * --------------------------------------------------------------------------
266
+ * Every Lily class ending in `-input` (textual, date, picker, range, file,
267
+ * national-identifier, etc.) shares the same baseline styling. The
268
+ * `[class$="-input"]` attribute selector catches single-class usage
269
+ * (`class="email-input"`); consumers needing multi-class composition can
270
+ * override with higher-specificity rules in their own stylesheet.
271
+ *
272
+ * The `:not([class$="-with-mask-input"])` exclusion exists because the
273
+ * masked-input variant carries its own typography (monospaced + letter
274
+ * spacing) and we don't want the generic baseline overriding it.
275
+ * Hidden inputs (`type="hidden"`) are also excluded — they must not be
276
+ * laid out as visible inputs.
277
+ * ====================================================================== */
278
+
279
+ /* Baseline visual treatment for every textual input. */
280
+ :where(
281
+ [class$="-input"]:not([class$="-with-mask-input"]):not([type="hidden"]),
282
+ .input
283
+ ) {
284
+ appearance: none; /* drop UA native chrome (Safari especially) */
285
+ display: inline-block;
286
+ width: 100%; /* fill parent by default; consumer caps via container */
287
+ max-width: 100%;
288
+ min-height: 2.5rem; /* WCAG 2.5.5 target-size guidance (~44px) */
289
+ padding: 0.5rem 0.75rem;
290
+ font: inherit;
291
+ font-family: var(--lily-font-body);
292
+ color: var(--lily-text);
293
+ background-color: var(--lily-surface);
294
+ border: var(--border) solid var(--lily-border-strong);
295
+ border-radius: var(--lily-radius-md);
296
+ box-sizing: border-box;
297
+ /* Smooth focus/hover edge transitions — short enough to feel
298
+ responsive, long enough to read as intentional. */
299
+ transition:
300
+ border-color 120ms ease,
301
+ box-shadow 120ms ease;
302
+ }
303
+
304
+ /* Hover affordance — switches the border to the primary brand colour so
305
+ users get a visual cue that the field is interactive. The `:not(:disabled)`
306
+ guard prevents the cue from appearing on locked-out controls. */
307
+ :where([class$="-input"], .input):hover:not(:disabled) {
308
+ border-color: var(--color-primary);
309
+ }
310
+
311
+ /* Disabled / aria-disabled — desaturate and shift to the muted surface so
312
+ the control reads as inactive without losing its layout footprint. */
313
+ :where([class$="-input"], .input):disabled,
314
+ :where([class$="-input"], .input)[aria-disabled="true"] {
315
+ color: var(--lily-text-muted);
316
+ background-color: var(--lily-surface-alt);
317
+ cursor: not-allowed;
318
+ }
319
+
320
+ /* Invalid input — red border. The `aria-invalid="true"` attribute is the
321
+ ARIA contract; pairing it with a colour change keeps WCAG 1.4.1
322
+ (no colour-only meaning) honest because the ARIA state is also there. */
323
+ :where([class$="-input"], .input)[aria-invalid="true"] {
324
+ border-color: var(--color-error);
325
+ }
326
+
327
+ /* Placeholder — match the muted text token. `opacity: 1` overrides Firefox's
328
+ legacy default placeholder opacity, which would otherwise compound on
329
+ our already-muted colour. */
330
+ :where([class$="-input"], .input)::placeholder {
331
+ color: var(--lily-text-muted);
332
+ opacity: 1;
333
+ }
334
+
335
+ /* --- Input type-specific tweaks ----------------------------------------- */
336
+
337
+ /* Hidden inputs must never render. */
338
+ :where(.hidden-input) {
339
+ display: none;
340
+ }
341
+
342
+ /* Submit / reset / image / generic button inputs render as buttons. */
343
+ :where(.button-input, .submit-input, .reset-input, .image-input) {
344
+ width: auto;
345
+ min-width: 2.5rem;
346
+ background-color: var(--color-primary);
347
+ color: var(--color-primary-content);
348
+ border-color: transparent;
349
+ cursor: pointer;
350
+ font-weight: 600;
351
+ }
352
+
353
+ /* Reset input is the secondary-action variant — muted surface, not the
354
+ primary brand colour, because "reset" is a destructive op. */
355
+ :where(.reset-input) {
356
+ background-color: var(--lily-surface-alt);
357
+ color: var(--lily-text);
358
+ border-color: var(--lily-border-strong);
359
+ }
360
+
361
+ /* Color input — narrow swatch with internal padding so the colour chip
362
+ reads cleanly inside the input frame. */
363
+ :where(.color-input) {
364
+ min-height: 2.5rem;
365
+ padding: 0.25rem;
366
+ width: 3rem;
367
+ cursor: pointer;
368
+ }
369
+
370
+ /* Range / angle slider — strip the input chrome so the consumer can
371
+ restyle the track. `accent-color` provides a minimal styled fallback. */
372
+ :where(.range-input, .angle-slider-range-input) {
373
+ appearance: none;
374
+ background: transparent;
375
+ border: 0;
376
+ padding: 0;
377
+ height: 1.5rem;
378
+ accent-color: var(--color-primary);
379
+ }
380
+
381
+ /* File inputs — slightly tighter padding because the UA-rendered
382
+ "Choose file" button consumes most of the visual space. */
383
+ :where(.file-input, .image-file-input) {
384
+ padding: 0.375rem 0.5rem;
385
+ cursor: pointer;
386
+ }
387
+
388
+ /* Checkbox / radio — small square/round controls with the brand accent. */
389
+ :where(.checkbox-input, .radio-input) {
390
+ width: 1.125rem;
391
+ height: 1.125rem;
392
+ min-height: 0; /* override the 2.5rem input baseline */
393
+ padding: 0;
394
+ accent-color: var(--color-primary);
395
+ cursor: pointer;
396
+ }
397
+ :where(.radio-input) {
398
+ border-radius: 50%;
399
+ }
400
+ :where(.checkbox-input) {
401
+ border-radius: var(--lily-radius-sm);
402
+ }
403
+
404
+ /* Textarea variants — taller minimum, line-height tuned for reading,
405
+ vertical-only resize so layout columns aren't disturbed. */
406
+ :where(.text-area-input, .text-area-input-with-character-counter) {
407
+ min-height: 6rem;
408
+ line-height: 1.5;
409
+ resize: vertical;
410
+ }
411
+ /* Character-counter variant stacks the textarea and the counter span. */
412
+ :where(.text-area-input-with-character-counter) {
413
+ display: flex;
414
+ flex-direction: column;
415
+ }
416
+
417
+ /* --- Composite inputs with built-in DOM structure ----------------------- */
418
+
419
+ /* PIN input — N small slots side-by-side. The wrapper is invisible;
420
+ the children carry the styling. */
421
+ :where(.pin-input-div) {
422
+ display: inline-flex;
423
+ gap: 0.5rem;
424
+ padding: 0;
425
+ background: transparent;
426
+ border: 0;
427
+ width: auto;
428
+ min-height: 0;
429
+ }
430
+ :where(.pin-input-div > input) {
431
+ width: 2.5rem;
432
+ height: 3rem;
433
+ padding: 0;
434
+ text-align: center;
435
+ font-size: 1.125rem;
436
+ font-weight: 600;
437
+ background-color: var(--lily-surface);
438
+ border: var(--border) solid var(--lily-border-strong);
439
+ border-radius: var(--lily-radius-md);
440
+ color: var(--lily-text);
441
+ }
442
+
443
+ /* Password-toggle composite — text input + reveal button, sharing
444
+ a single visual frame via flush radii. */
445
+ :where(.password-input-or-text-input-div) {
446
+ display: inline-flex;
447
+ align-items: stretch;
448
+ width: 100%;
449
+ background: transparent;
450
+ border: 0;
451
+ padding: 0;
452
+ min-height: 0;
453
+ }
454
+ :where(.password-input-or-text-input-div > input) {
455
+ flex: 1;
456
+ min-height: 2.5rem;
457
+ padding: 0.5rem 0.75rem;
458
+ background-color: var(--lily-surface);
459
+ color: var(--lily-text);
460
+ border: var(--border) solid var(--lily-border-strong);
461
+ border-right: 0; /* drop the seam where input meets button */
462
+ border-radius: var(--lily-radius-md) 0 0 var(--lily-radius-md);
463
+ }
464
+ :where(.password-input-or-text-input-div > button) {
465
+ padding: 0 0.75rem;
466
+ background-color: var(--lily-surface-alt);
467
+ color: var(--lily-text);
468
+ border: var(--border) solid var(--lily-border-strong);
469
+ border-radius: 0 var(--lily-radius-md) var(--lily-radius-md) 0;
470
+ cursor: pointer;
471
+ }
472
+
473
+ /* --- Input compositions ------------------------------------------------- */
474
+
475
+ /* Input group — flush-joined controls (input + button, etc.). The negative
476
+ margin collapses overlapping borders into a single shared edge. */
477
+ :where(.input-group) {
478
+ display: inline-flex;
479
+ align-items: stretch;
480
+ width: 100%;
481
+ }
482
+ :where(.input-group > *) {
483
+ border-radius: 0;
484
+ margin-left: calc(-1 * var(--border));
485
+ }
486
+ :where(.input-group > *:first-child) {
487
+ border-top-left-radius: var(--lily-radius-md);
488
+ border-bottom-left-radius: var(--lily-radius-md);
489
+ margin-left: 0;
490
+ }
491
+ :where(.input-group > *:last-child) {
492
+ border-top-right-radius: var(--lily-radius-md);
493
+ border-bottom-right-radius: var(--lily-radius-md);
494
+ }
495
+
496
+ /* Masked input — monospaced font + slight letter-spacing so the mask
497
+ template (phone, SSN, etc.) aligns over the typed characters. */
498
+ :where(.input-with-mask) {
499
+ font-family: var(--lily-font-mono);
500
+ letter-spacing: 0.05em;
501
+ }
502
+
503
+ /* Search input — reserve space on the inline-start for the magnifier
504
+ glyph. The `linear-gradient(transparent, transparent)` is a no-op
505
+ background-image; it ensures the property exists so consumers can
506
+ layer an SVG icon over it by overriding `background-image`. */
507
+ :where(.text-input-with-search, .search-input) {
508
+ background-image: linear-gradient(transparent, transparent);
509
+ padding-inline-start: 2.25rem;
510
+ }
511
+
512
+ /* ==========================================================================
513
+ * Views
514
+ * --------------------------------------------------------------------------
515
+ * Read-only display chips for identifiers, dates, ratings, and other
516
+ * pre-formatted data. Every Lily class ending in `-view` is a span/div
517
+ * that renders a value the user shouldn't edit.
518
+ *
519
+ * The exclusions (`theme-view`, `split-view`)
520
+ * are larger containers that don't fit the chip pattern — they're
521
+ * styled separately further down.
522
+ * ====================================================================== */
523
+
524
+ :where(
525
+ [class$="-view"]:not(.theme-view):not(
526
+ .split-view
527
+ )
528
+ ) {
529
+ display: inline-block;
530
+ padding: 0.125rem 0.5rem;
531
+ font-family: var(--lily-font-mono); /* fixed-width for alignment */
532
+ color: var(--lily-text);
533
+ background-color: var(--lily-surface-alt);
534
+ border: var(--border) solid var(--lily-border);
535
+ border-radius: var(--lily-radius-md);
536
+ line-height: 1.4;
537
+ }
538
+
539
+ /* Dates / ranges are human-readable, not codes — switch back to body font. */
540
+ :where(.date-time-view, .date-range, .review-date) {
541
+ font-family: var(--lily-font-body);
542
+ }
543
+
544
+ /* Theme-view — small label + colour swatch composition. */
545
+ :where(.theme-view) {
546
+ display: inline-flex;
547
+ align-items: center;
548
+ gap: 0.5rem;
549
+ padding: 0.25rem 0.5rem;
550
+ color: var(--lily-text);
551
+ }
552
+
553
+ /* ==========================================================================
554
+ * Buttons
555
+ * --------------------------------------------------------------------------
556
+ * Every class ending in `-button` and the bare `.button` share one
557
+ * baseline. Hamburger-menu is excluded because it's an icon-only square
558
+ * with its own minimal frame styling (further down).
559
+ * ====================================================================== */
560
+
561
+ /* Baseline button — primary-coloured pill. Variants override colour or
562
+ shape below. */
563
+ :where(.button, [class$="-button"]:not(.hamburger-menu-button)) {
564
+ appearance: none;
565
+ display: inline-flex;
566
+ align-items: center;
567
+ justify-content: center;
568
+ gap: 0.5rem; /* leave room for an icon + label */
569
+ min-height: 2.5rem; /* WCAG target-size guidance */
570
+ padding: 0.5rem 1rem;
571
+ font: inherit;
572
+ font-family: var(--lily-font-body);
573
+ font-weight: 600;
574
+ line-height: 1.2;
575
+ color: var(--color-primary-content);
576
+ background-color: var(--color-primary);
577
+ border: var(--border) solid transparent;
578
+ border-radius: var(--lily-radius-md);
579
+ cursor: pointer;
580
+ user-select: none; /* prevent text drag-select on double-click */
581
+ text-decoration: none;
582
+ transition:
583
+ background-color 120ms ease,
584
+ color 120ms ease,
585
+ border-color 120ms ease;
586
+ }
587
+
588
+ /* Hover — shift to the secondary token for a subtle change of state. */
589
+ :where(.button, [class$="-button"]):hover:not(:disabled):not(
590
+ [aria-disabled="true"]
591
+ ) {
592
+ background-color: var(--color-secondary);
593
+ color: var(--color-secondary-content);
594
+ }
595
+
596
+ /* Disabled — half opacity, not-allowed cursor. */
597
+ :where(.button, [class$="-button"]):disabled,
598
+ :where(.button, [class$="-button"])[aria-disabled="true"] {
599
+ opacity: 0.5;
600
+ cursor: not-allowed;
601
+ }
602
+
603
+ /* Pressed (toggle/switch active state) — re-use the secondary colour. */
604
+ :where(.button, [class$="-button"])[aria-pressed="true"] {
605
+ background-color: var(--color-secondary);
606
+ color: var(--color-secondary-content);
607
+ }
608
+
609
+ /* --- Button variants ---------------------------------------------------- */
610
+
611
+ /* Icon button — square; aspect-ratio keeps it from squashing when the
612
+ icon font changes size. */
613
+ :where(.icon-button) {
614
+ padding: 0.5rem;
615
+ min-width: 2.5rem;
616
+ aspect-ratio: 1;
617
+ }
618
+
619
+ /* Floating action button — pinned to the bottom-right of the viewport.
620
+ Uses logical inset properties so it flips correctly under RTL. */
621
+ :where(.float-button) {
622
+ position: fixed;
623
+ inset-block-end: 1rem;
624
+ inset-inline-end: 1rem;
625
+ box-shadow: var(--lily-shadow-lg);
626
+ border-radius: 999px;
627
+ width: 3.5rem;
628
+ height: 3.5rem;
629
+ padding: 0;
630
+ }
631
+
632
+ /* Split button — extra padding-end for the dropdown caret. */
633
+ :where(.split-button) {
634
+ padding-inline-end: 0.5rem;
635
+ }
636
+
637
+ /* Download button — stacks the action label over a hint (filesize, etc.). */
638
+ :where(.download-button) {
639
+ flex-direction: column;
640
+ align-items: flex-start;
641
+ text-align: start;
642
+ }
643
+
644
+ /* Clipboard-copy — muted style because it's auxiliary, not primary. */
645
+ :where(.clipboard-copy-button) {
646
+ background-color: var(--lily-surface-alt);
647
+ color: var(--lily-text);
648
+ border-color: var(--lily-border-strong);
649
+ }
650
+
651
+ /* Switch button — iOS-style toggle pill. The track is the sunken
652
+ surface; the thumb is drawn by the consumer (or via ::before in
653
+ higher-specificity overrides). */
654
+ :where(.switch-button) {
655
+ position: relative;
656
+ width: 2.75rem;
657
+ min-width: 2.75rem;
658
+ height: 1.5rem;
659
+ min-height: 1.5rem;
660
+ padding: 0;
661
+ background-color: var(--lily-surface-sunken);
662
+ border-radius: 999px;
663
+ }
664
+ :where(
665
+ .switch-button[aria-pressed="true"],
666
+ .switch-button[aria-checked="true"]
667
+ ) {
668
+ background-color: var(--color-primary);
669
+ }
670
+
671
+ /* Toggle button — when un-pressed, render as a muted secondary chip. */
672
+ :where(.toggle-button[aria-pressed="false"]) {
673
+ background-color: var(--lily-surface-alt);
674
+ color: var(--lily-text);
675
+ border-color: var(--lily-border-strong);
676
+ }
677
+
678
+ /* Link-style "button" — for back/skip/go-to controls that look like
679
+ text links but use the button machinery for keyboard semantics. */
680
+ :where(
681
+ .back-link,
682
+ .skip-link,
683
+ .go-to-top,
684
+ .go-to-next-section,
685
+ .go-to-previous-section
686
+ ) {
687
+ background-color: transparent;
688
+ color: var(--color-primary);
689
+ border-color: transparent;
690
+ text-decoration: underline;
691
+ text-underline-offset: 0.2em;
692
+ }
693
+
694
+ /* Skip-link — visually hidden off-screen until focused, then snaps to the
695
+ top-left of the page. Required pattern for keyboard accessibility
696
+ (WCAG 2.4.1 bypass blocks). */
697
+ :where(.skip-link) {
698
+ position: absolute;
699
+ top: -3rem;
700
+ left: 0.5rem;
701
+ padding: 0.5rem 1rem;
702
+ background-color: var(--color-primary);
703
+ color: var(--color-primary-content);
704
+ text-decoration: none;
705
+ border-radius: var(--lily-radius-md);
706
+ z-index: 9999;
707
+ }
708
+ :where(.skip-link:focus) {
709
+ top: 0.5rem;
710
+ }
711
+
712
+ /* Button group — horizontal cluster of related actions. */
713
+ :where(.button-group) {
714
+ display: inline-flex;
715
+ gap: 0.25rem;
716
+ }
717
+
718
+ /* --- Bars of buttons (action / menu / tab / task / tool) ---------------- */
719
+
720
+ :where(.action-bar, .menu-bar, .tab-bar, .task-bar, .tool-bar) {
721
+ display: flex;
722
+ align-items: center;
723
+ gap: 0.25rem;
724
+ padding: 0.5rem;
725
+ background-color: var(--lily-surface-alt);
726
+ border: var(--border) solid var(--lily-border);
727
+ border-radius: var(--lily-radius-md);
728
+ }
729
+ /* Children of bars render flush with the bar — transparent background,
730
+ no border, so the bar's surface acts as the visual frame. */
731
+ :where(
732
+ .action-bar-button,
733
+ .menu-bar-button,
734
+ .tab-bar-button,
735
+ .task-bar-button,
736
+ .tool-bar-button
737
+ ) {
738
+ background-color: transparent;
739
+ color: var(--lily-text);
740
+ border-color: transparent;
741
+ }
742
+ /* Selected tab — explicit primary colour. */
743
+ :where(.tab-bar-button[aria-selected="true"]) {
744
+ background-color: var(--color-primary);
745
+ color: var(--color-primary-content);
746
+ }
747
+ /* Panel revealed by the active tab. */
748
+ :where(.tab-panel) {
749
+ padding: 1rem;
750
+ background-color: var(--lily-surface);
751
+ border: var(--border) solid var(--lily-border);
752
+ border-radius: var(--lily-radius-md);
753
+ }
754
+
755
+ /* ==========================================================================
756
+ * Links, anchors, link-like
757
+ * --------------------------------------------------------------------------
758
+ * Generic `-link` styling — primary-coloured underlined text. The
759
+ * exclusions (`skip-link`, `back-link`) are styled as buttons above.
760
+ * ====================================================================== */
761
+
762
+ :where([class$="-link"]:not(.skip-link):not(.back-link)) {
763
+ color: var(--color-primary);
764
+ text-decoration: underline;
765
+ text-underline-offset: 0.15em;
766
+ }
767
+ /* Hover — thicker underline for a subtle affordance cue. */
768
+ :where([class$="-link"]):hover {
769
+ text-decoration-thickness: 2px;
770
+ }
771
+ /* Visited — secondary token. */
772
+ :where([class$="-link"]):visited {
773
+ color: var(--color-secondary);
774
+ }
775
+
776
+ /* ==========================================================================
777
+ * Lists & list items
778
+ * --------------------------------------------------------------------------
779
+ * Lily wraps `<ol>` / `<ul>` in role-specific classes (CheckList, DoList,
780
+ * etc.). The baseline kills the default browser bullet styling and zeroes
781
+ * margins so consumers can compose lists inside other components.
782
+ * ====================================================================== */
783
+
784
+ /* Baseline — kill bullets and the indent gutter on every list class. */
785
+ :where(
786
+ .accordion-list,
787
+ .breadcrumb-list,
788
+ .chat-list,
789
+ .check-list,
790
+ .collection-list,
791
+ .contents-list,
792
+ .description-list,
793
+ .document-list,
794
+ .do-list,
795
+ .dont-list,
796
+ .icon-list,
797
+ .pagination-list,
798
+ .section-list,
799
+ .step-list,
800
+ .summary-list,
801
+ .task-list,
802
+ .timeline-list,
803
+ .tour-list,
804
+ .tree-list,
805
+ .validation-list
806
+ ) {
807
+ list-style: none;
808
+ margin: 0;
809
+ padding: 0;
810
+ }
811
+
812
+ /* Baseline — every list-item gets a thin hairline rule between rows. */
813
+ :where(
814
+ .accordion-list-item,
815
+ .breadcrumb-list-item,
816
+ .chat-list-item,
817
+ .check-list-item,
818
+ .collection-list-item,
819
+ .contents-list-item,
820
+ .description-list-item,
821
+ .document-list-item,
822
+ .do-list-item,
823
+ .dont-list-item,
824
+ .icon-list-item,
825
+ .pagination-list-item,
826
+ .section-list-item,
827
+ .step-list-item,
828
+ .summary-list-item,
829
+ .task-list-item,
830
+ .timeline-list-item,
831
+ .tour-list-item,
832
+ .tree-list-item,
833
+ .validation-list-item
834
+ ) {
835
+ padding: 0.5rem 0;
836
+ border-bottom: var(--border) solid var(--lily-border);
837
+ }
838
+
839
+ /* --- Breadcrumb --------------------------------------------------------- */
840
+ /* Horizontal list separated by a "/" pseudo-element between items. */
841
+ :where(.breadcrumb-list) {
842
+ display: flex;
843
+ flex-wrap: wrap;
844
+ gap: 0.5rem;
845
+ align-items: center;
846
+ }
847
+ :where(.breadcrumb-list-item) {
848
+ border: 0; /* override the generic list-item bottom-border */
849
+ padding: 0;
850
+ display: inline-flex;
851
+ align-items: center;
852
+ }
853
+ /* Slash separator generated between adjacent items, not before the first. */
854
+ :where(.breadcrumb-list-item + .breadcrumb-list-item)::before {
855
+ content: "/";
856
+ margin-inline-end: 0.5rem;
857
+ color: var(--lily-text-muted);
858
+ }
859
+ /* Final crumb (the current page) — muted because it isn't a link. */
860
+ :where(.breadcrumb-list-item[aria-current="page"]) {
861
+ color: var(--lily-text-muted);
862
+ }
863
+
864
+ /* --- Pagination --------------------------------------------------------- */
865
+ :where(.pagination-list) {
866
+ display: flex;
867
+ flex-wrap: wrap;
868
+ gap: 0.25rem;
869
+ align-items: center;
870
+ }
871
+ :where(.pagination-list-item) {
872
+ border: 0;
873
+ padding: 0;
874
+ }
875
+ /* Pagination link — square-ish chip with a generous tap target. */
876
+ :where(.pagination-link) {
877
+ display: inline-flex;
878
+ align-items: center;
879
+ justify-content: center;
880
+ min-width: 2.5rem;
881
+ padding: 0.5rem 0.75rem;
882
+ border-radius: var(--lily-radius-md);
883
+ text-decoration: none;
884
+ }
885
+ /* Current page — filled with the primary brand colour. */
886
+ :where(.pagination-link[aria-current="page"]) {
887
+ background-color: var(--color-primary);
888
+ color: var(--color-primary-content);
889
+ }
890
+
891
+ /* --- Marker glyphs ------------------------------------------------------ */
892
+ /* Check / do — green ✓; dont — red ✗. The `::marker` pseudo-element
893
+ only works on list-items with the default list-style display, so the
894
+ generic baseline above intentionally kept that. */
895
+ :where(.check-list-item)::marker {
896
+ content: "✓ ";
897
+ color: var(--color-success);
898
+ }
899
+ :where(.do-list-item)::marker {
900
+ content: "✓ ";
901
+ color: var(--color-success);
902
+ }
903
+ :where(.dont-list-item)::marker {
904
+ content: "✗ ";
905
+ color: var(--lily-error-text);
906
+ }
907
+
908
+ /* --- Tree --------------------------------------------------------------- */
909
+ /* Nested tree lists indent their children. */
910
+ :where(.tree-list .tree-list) {
911
+ padding-inline-start: 1.25rem;
912
+ }
913
+ :where(.tree-list-item) {
914
+ border: 0;
915
+ }
916
+
917
+ /* --- Step list ---------------------------------------------------------- */
918
+ /* CSS counter draws the step number in a circular badge. */
919
+ :where(.step-list) {
920
+ counter-reset: lily-step;
921
+ }
922
+ :where(.step-list-item) {
923
+ counter-increment: lily-step;
924
+ display: flex;
925
+ align-items: flex-start;
926
+ gap: 0.75rem;
927
+ }
928
+ :where(.step-list-item)::before {
929
+ content: counter(lily-step);
930
+ flex: 0 0 auto;
931
+ display: inline-flex;
932
+ align-items: center;
933
+ justify-content: center;
934
+ width: 1.75rem;
935
+ height: 1.75rem;
936
+ border-radius: 50%;
937
+ background-color: var(--lily-surface-sunken);
938
+ color: var(--lily-text);
939
+ font-weight: 600;
940
+ }
941
+ /* Step status variants — colour-coded badge fill. */
942
+ :where(.step-list-item[data-status="finished"])::before {
943
+ background-color: var(--color-success);
944
+ color: var(--color-success-content);
945
+ }
946
+ :where(.step-list-item[data-status="in-progress"])::before {
947
+ background-color: var(--color-primary);
948
+ color: var(--color-primary-content);
949
+ }
950
+ :where(.step-list-item[data-status="error"])::before {
951
+ background-color: var(--color-error);
952
+ color: var(--color-error-content);
953
+ }
954
+
955
+ /* --- Task list ---------------------------------------------------------- */
956
+ /* Flex row so the checkbox aligns with its label. */
957
+ :where(.task-list-item) {
958
+ display: flex;
959
+ align-items: center;
960
+ gap: 0.5rem;
961
+ }
962
+
963
+ /* --- Timeline ----------------------------------------------------------- */
964
+ /* Vertical rule down the left, with a dot per event. */
965
+ :where(.timeline-list-item) {
966
+ position: relative;
967
+ padding-inline-start: 1.5rem;
968
+ border-left: var(--border) solid var(--lily-border-strong);
969
+ margin-inline-start: 0.5rem;
970
+ }
971
+ :where(.timeline-list-item)::before {
972
+ content: "";
973
+ position: absolute;
974
+ inset-inline-start: -0.4rem;
975
+ inset-block-start: 0.65rem;
976
+ width: 0.7rem;
977
+ height: 0.7rem;
978
+ border-radius: 50%;
979
+ background-color: var(--color-primary);
980
+ }
981
+
982
+ /* --- Validation list — pass / fail / pending status colours ------------ */
983
+ :where(.validation-list-item[data-status="passed"]) {
984
+ color: var(--color-success);
985
+ }
986
+ :where(.validation-list-item[data-status="failed"]) {
987
+ color: var(--lily-error-text);
988
+ }
989
+ :where(.validation-list-item[data-status="pending"]) {
990
+ color: var(--lily-text-muted);
991
+ }
992
+
993
+ /* --- Description list (semantic <dl>) ----------------------------------- */
994
+ /* Two-column grid: term in the left column, description in the right. */
995
+ :where(.description-list) {
996
+ display: grid;
997
+ grid-template-columns: minmax(min-content, max-content) 1fr;
998
+ column-gap: 1rem;
999
+ row-gap: 0.5rem;
1000
+ }
1001
+ /* `display: contents` lets the dt/dd children participate directly in
1002
+ the parent grid without an intermediate row wrapper. */
1003
+ :where(.description-list-item) {
1004
+ display: contents;
1005
+ border: 0;
1006
+ }
1007
+ :where(.description-list dt) {
1008
+ font-weight: 600;
1009
+ }
1010
+
1011
+ /* --- Summary list (three-column key/value/action grid) ------------------ */
1012
+ :where(.summary-list) {
1013
+ display: grid;
1014
+ grid-template-columns: minmax(0, max-content) 1fr auto;
1015
+ column-gap: 1rem;
1016
+ row-gap: 0.5rem;
1017
+ }
1018
+ :where(.summary-list-item) {
1019
+ display: contents;
1020
+ border: 0;
1021
+ }
1022
+
1023
+ /* --- Icon / collection / document lists — flex rows with leading icon -- */
1024
+ :where(.icon-list-item, .collection-list-item, .document-list-item) {
1025
+ display: flex;
1026
+ align-items: flex-start;
1027
+ gap: 0.75rem;
1028
+ }
1029
+
1030
+ /* --- Navs --------------------------------------------------------------- */
1031
+ /* Nav wrappers are layout-neutral by default — the inner list handles
1032
+ layout, the nav just provides the landmark semantics. */
1033
+ :where(
1034
+ .accordion-nav,
1035
+ .breadcrumb-nav,
1036
+ .chat-nav,
1037
+ .contents-nav,
1038
+ .pagination-nav,
1039
+ .section-nav,
1040
+ .tree-nav,
1041
+ .navigation-menu
1042
+ ) {
1043
+ display: block;
1044
+ padding: 0;
1045
+ }
1046
+
1047
+ /* ==========================================================================
1048
+ * Tables (plain, data, calendar, kanban, gantt)
1049
+ * --------------------------------------------------------------------------
1050
+ * Every Lily table variant shares the same baseline: full-width, collapsed
1051
+ * borders, body font. Variants override below for specialised behaviour
1052
+ * (kanban columns, gantt bars, calendar selection).
1053
+ * ====================================================================== */
1054
+
1055
+ :where(.table, .data-table, .calendar-table, .kanban-table, .gantt-table) {
1056
+ width: 100%;
1057
+ border-collapse: collapse; /* shared edges between cells */
1058
+ background-color: var(--lily-surface);
1059
+ color: var(--lily-text);
1060
+ font-family: var(--lily-font-body);
1061
+ }
1062
+
1063
+ /* Thead gets the alt surface so it visually anchors above the body. */
1064
+ :where(
1065
+ .table-head,
1066
+ .data-table-head,
1067
+ .calendar-table-head,
1068
+ .kanban-table-head,
1069
+ .gantt-table-thead
1070
+ ) {
1071
+ background-color: var(--lily-surface-alt);
1072
+ }
1073
+
1074
+ /* Header cells — bold, slightly tighter padding, with a 2px under-rule. */
1075
+ :where(
1076
+ .table-th,
1077
+ .data-table-th,
1078
+ .calendar-table-th,
1079
+ .kanban-table-th,
1080
+ .gantt-table-th
1081
+ ) {
1082
+ padding: 0.625rem 0.75rem;
1083
+ text-align: start;
1084
+ font-weight: 600;
1085
+ border-bottom: 2px solid var(--lily-border-strong);
1086
+ }
1087
+
1088
+ /* Body cells — top-aligned (multi-line content reads better when the
1089
+ baseline is at the top, not centred). */
1090
+ :where(
1091
+ .table-td,
1092
+ .data-table-td,
1093
+ .calendar-table-td,
1094
+ .kanban-table-td,
1095
+ .gantt-table-td
1096
+ ) {
1097
+ padding: 0.625rem 0.75rem;
1098
+ border-bottom: var(--border) solid var(--lily-border);
1099
+ vertical-align: top;
1100
+ }
1101
+
1102
+ /* Row hover — subtle highlight for scanning long tables. */
1103
+ :where(
1104
+ .table-row,
1105
+ .data-table-row,
1106
+ .calendar-table-row,
1107
+ .kanban-table-row,
1108
+ .gantt-table-tr
1109
+ ):hover {
1110
+ background-color: var(--lily-surface-alt);
1111
+ }
1112
+
1113
+ /* Data-table filter form — chips that sit above the table. */
1114
+ :where(.data-filter-form) {
1115
+ display: flex;
1116
+ flex-wrap: wrap;
1117
+ gap: 0.75rem;
1118
+ padding: 1rem;
1119
+ background-color: var(--lily-surface-alt);
1120
+ border-radius: var(--lily-radius-md);
1121
+ }
1122
+
1123
+ /* --- Calendar specifics ------------------------------------------------- */
1124
+ /* Selected date — filled with the primary brand colour. */
1125
+ :where(.calendar-table-td[aria-selected="true"]) {
1126
+ background-color: var(--color-primary);
1127
+ color: var(--color-primary-content);
1128
+ }
1129
+ /* Today — outlined rather than filled, so a selected non-today date
1130
+ still reads as the "selected" one. */
1131
+ :where(.calendar-table-td[aria-current="date"]) {
1132
+ outline: 2px solid var(--color-primary);
1133
+ outline-offset: -2px;
1134
+ }
1135
+
1136
+ /* --- Kanban specifics --------------------------------------------------- */
1137
+ /* Each column renders as a `<td>`; widen the cells so cards have room. */
1138
+ :where(.kanban-table) {
1139
+ display: table;
1140
+ }
1141
+ :where(.kanban-table-td) {
1142
+ vertical-align: top;
1143
+ background-color: var(--lily-surface);
1144
+ min-width: 14rem;
1145
+ }
1146
+
1147
+ /* --- Gantt specifics ---------------------------------------------------- */
1148
+ /* Cells marked as bars are filled with the primary colour to render the
1149
+ schedule bar inline within the grid. */
1150
+ :where(.gantt-table-td[data-state="bar"]) {
1151
+ background-color: var(--color-primary);
1152
+ }
1153
+
1154
+ /* ==========================================================================
1155
+ * Cards, panels, surfaces
1156
+ * --------------------------------------------------------------------------
1157
+ * Family of generic content containers. Differ mostly in elevation
1158
+ * (shadow depth) and accent colour.
1159
+ * ====================================================================== */
1160
+
1161
+ :where(
1162
+ .card,
1163
+ .feature-card,
1164
+ .product-card,
1165
+ .care-card,
1166
+ .hover-card,
1167
+ .panel,
1168
+ .floating-panel,
1169
+ .success-panel
1170
+ ) {
1171
+ display: block;
1172
+ padding: 1rem;
1173
+ background-color: var(--lily-surface);
1174
+ color: var(--lily-text);
1175
+ border: var(--border) solid var(--lily-border);
1176
+ border-radius: var(--lily-radius-lg);
1177
+ box-shadow: var(--lily-shadow-sm);
1178
+ }
1179
+ /* Feature card — generous padding because it leads the page. */
1180
+ :where(.feature-card) {
1181
+ padding: 1.5rem;
1182
+ }
1183
+ /* Hover card — popover-like; lift it with the medium shadow. */
1184
+ :where(.hover-card) {
1185
+ box-shadow: var(--lily-shadow-md);
1186
+ }
1187
+ /* Floating panel — pinned overlay; largest shadow. */
1188
+ :where(.floating-panel) {
1189
+ box-shadow: var(--lily-shadow-lg);
1190
+ }
1191
+ /* Success panel — green border + faint green tint. */
1192
+ :where(.success-panel) {
1193
+ border-color: var(--color-success);
1194
+ background-color: color-mix(
1195
+ in oklch,
1196
+ var(--color-success) 8%,
1197
+ var(--lily-surface)
1198
+ );
1199
+ }
1200
+ /* Care card urgency variants — coloured left rail (urgent/non-urgent/
1201
+ primary). Pattern adapted from the NHS care-card guidance. */
1202
+ :where(.care-card[data-urgency="urgent"]) {
1203
+ border-color: var(--color-error);
1204
+ border-left-width: 0.375rem;
1205
+ }
1206
+ :where(.care-card[data-urgency="non-urgent"]) {
1207
+ border-color: var(--color-info);
1208
+ border-left-width: 0.375rem;
1209
+ }
1210
+ :where(.care-card[data-urgency="primary"]) {
1211
+ border-color: var(--color-primary);
1212
+ border-left-width: 0.375rem;
1213
+ }
1214
+
1215
+ /* ==========================================================================
1216
+ * Banners, alerts, callouts, notifications
1217
+ * --------------------------------------------------------------------------
1218
+ * Family of messages with a coloured left rail. The rail colour is set
1219
+ * per severity so the message reads at a glance.
1220
+ * ====================================================================== */
1221
+
1222
+ /* Baseline — alert/banner/callout/notification all share the same frame. */
1223
+ :where(
1224
+ .alert,
1225
+ .banner,
1226
+ .announcement-banner,
1227
+ .phase-banner,
1228
+ .government-banner,
1229
+ .medical-banner,
1230
+ .super-banner,
1231
+ .information-callout,
1232
+ .warning-callout,
1233
+ .summary-box,
1234
+ .notification,
1235
+ .toast,
1236
+ .sonner
1237
+ ) {
1238
+ display: flex;
1239
+ align-items: flex-start;
1240
+ gap: 0.75rem;
1241
+ padding: 1rem;
1242
+ background-color: var(--lily-surface-alt);
1243
+ color: var(--lily-text);
1244
+ border: var(--border) solid var(--lily-border);
1245
+ border-inline-start-width: 0.375rem; /* the coloured rail */
1246
+ border-radius: var(--lily-radius-md);
1247
+ }
1248
+
1249
+ /* Severity variants — rail + faint background tint. */
1250
+ :where(
1251
+ .alert[data-severity="info"],
1252
+ .information-callout,
1253
+ .announcement-banner
1254
+ ) {
1255
+ border-inline-start-color: var(--color-info);
1256
+ background-color: color-mix(
1257
+ in oklch,
1258
+ var(--color-info) 8%,
1259
+ var(--lily-surface)
1260
+ );
1261
+ }
1262
+ :where(.alert[data-severity="success"]) {
1263
+ border-inline-start-color: var(--color-success);
1264
+ background-color: color-mix(
1265
+ in oklch,
1266
+ var(--color-success) 8%,
1267
+ var(--lily-surface)
1268
+ );
1269
+ }
1270
+ :where(.alert[data-severity="warning"], .warning-callout, .phase-banner) {
1271
+ border-inline-start-color: var(--color-warning);
1272
+ background-color: color-mix(
1273
+ in oklch,
1274
+ var(--color-warning) 12%,
1275
+ var(--lily-surface)
1276
+ );
1277
+ }
1278
+ :where(
1279
+ .alert[data-severity="error"],
1280
+ .error-message,
1281
+ .error-summary,
1282
+ .super-banner
1283
+ ) {
1284
+ border-inline-start-color: var(--color-error);
1285
+ background-color: color-mix(
1286
+ in oklch,
1287
+ var(--color-error) 8%,
1288
+ var(--lily-surface)
1289
+ );
1290
+ }
1291
+ /* Medical banner — primary brand colour. */
1292
+ :where(.medical-banner) {
1293
+ border-inline-start-color: var(--color-primary);
1294
+ }
1295
+ /* Medical banner inner boxes — danger / advice variants. */
1296
+ :where(.medical-banner-box-for-danger) {
1297
+ border-color: var(--color-error);
1298
+ background-color: color-mix(
1299
+ in oklch,
1300
+ var(--color-error) 8%,
1301
+ var(--lily-surface)
1302
+ );
1303
+ }
1304
+ :where(.medical-banner-box-for-advice) {
1305
+ border-color: var(--color-info);
1306
+ background-color: color-mix(
1307
+ in oklch,
1308
+ var(--color-info) 8%,
1309
+ var(--lily-surface)
1310
+ );
1311
+ }
1312
+ /* Government banner — solid neutral surface (US-government / GOV.UK
1313
+ style: a chrome bar at the top of the page identifying the site
1314
+ as an official property). No coloured rail. */
1315
+ :where(.government-banner) {
1316
+ background-color: var(--color-neutral);
1317
+ color: var(--color-neutral-content);
1318
+ border-color: transparent;
1319
+ border-inline-start-color: transparent;
1320
+ }
1321
+ /* Summary box — primary-coloured rail; used for "answer at a glance"
1322
+ callouts on long forms (e.g. cost summary). */
1323
+ :where(.summary-box) {
1324
+ border-color: var(--color-primary);
1325
+ border-inline-start-width: 0.375rem;
1326
+ }
1327
+
1328
+ /* Banner boxes — chrome strip variants used inside header areas. */
1329
+ :where(.banner-box, .medical-banner-box) {
1330
+ display: flex;
1331
+ align-items: center;
1332
+ gap: 0.75rem;
1333
+ padding: 0.75rem 1rem;
1334
+ }
1335
+
1336
+ /* Sticky promo — sits at the very top of the viewport on scroll. */
1337
+ :where(.sticky-promo-banner) {
1338
+ position: sticky;
1339
+ inset-block-start: 0;
1340
+ z-index: 10;
1341
+ }
1342
+
1343
+ /* Error message — inline form-validation message. */
1344
+ :where(.error-message) {
1345
+ color: var(--lily-error-text);
1346
+ font-weight: 600;
1347
+ }
1348
+ /* Error summary — heavyweight 4px border (GOV.UK pattern) so users
1349
+ scrolling back to the top of a form see it immediately. */
1350
+ :where(.error-summary) {
1351
+ padding: 1rem;
1352
+ border: 0.25rem solid var(--color-error);
1353
+ }
1354
+
1355
+ /* Toast / Sonner — floating notifications; medium elevation. */
1356
+ :where(.toast, .sonner) {
1357
+ box-shadow: var(--lily-shadow-md);
1358
+ }
1359
+ /* In-page notification — small elevation. */
1360
+ :where(.notification) {
1361
+ box-shadow: var(--lily-shadow-sm);
1362
+ }
1363
+
1364
+ /* ==========================================================================
1365
+ * Forms
1366
+ * --------------------------------------------------------------------------
1367
+ * Form / field / fieldset layout primitives. Stack vertically with a
1368
+ * consistent gap so consumer markup stays brief.
1369
+ * ====================================================================== */
1370
+
1371
+ :where(.form, .editable-form) {
1372
+ display: flex;
1373
+ flex-direction: column;
1374
+ gap: 1rem;
1375
+ }
1376
+ /* Field — wraps a single label + input + hint/error trio. */
1377
+ :where(.field) {
1378
+ display: flex;
1379
+ flex-direction: column;
1380
+ gap: 0.375rem;
1381
+ }
1382
+ /* Fieldset — semantic <fieldset>; border + padded inset, legend bold. */
1383
+ :where(.fieldset) {
1384
+ border: var(--border) solid var(--lily-border);
1385
+ border-radius: var(--lily-radius-md);
1386
+ padding: 1rem;
1387
+ }
1388
+ :where(.fieldset > legend) {
1389
+ padding-inline: 0.5rem;
1390
+ font-weight: 600;
1391
+ }
1392
+ /* Label — bold and dark; consumers can override per-form. */
1393
+ :where(.label) {
1394
+ font-weight: 600;
1395
+ color: var(--lily-text);
1396
+ }
1397
+ /* Hint — small muted helptext under the input. */
1398
+ :where(.hint) {
1399
+ color: var(--lily-text-muted);
1400
+ font-size: 0.875rem;
1401
+ }
1402
+ /* Character counter — same colour/size as hint but right-aligned. */
1403
+ :where(.character-counter) {
1404
+ color: var(--lily-text-muted);
1405
+ font-size: 0.875rem;
1406
+ text-align: end;
1407
+ }
1408
+
1409
+ /* ==========================================================================
1410
+ * Layout & containers
1411
+ * ====================================================================== */
1412
+
1413
+ /* Page-width containers. */
1414
+ :where(
1415
+ .container,
1416
+ .container-with-fixed-width,
1417
+ .container-with-fluid-width
1418
+ ) {
1419
+ display: block;
1420
+ width: 100%;
1421
+ margin-inline: auto;
1422
+ padding-inline: 1rem;
1423
+ box-sizing: border-box;
1424
+ }
1425
+ /* Fixed-width — caps at a comfortable reading width (~1152px). */
1426
+ :where(.container-with-fixed-width) {
1427
+ max-width: 72rem;
1428
+ }
1429
+ /* Fluid-width — fills the viewport edge-to-edge. */
1430
+ :where(.container-with-fluid-width) {
1431
+ max-width: none;
1432
+ }
1433
+ /* Reset the inline padding when a container should butt against the edge. */
1434
+ :where(.padding-reset) {
1435
+ padding-inline: 0;
1436
+ }
1437
+
1438
+ /* Flex / grid / masonry primitives. */
1439
+ :where(.flex-stack) {
1440
+ display: flex;
1441
+ flex-direction: column;
1442
+ gap: 1rem;
1443
+ }
1444
+ :where(.grid) {
1445
+ display: grid;
1446
+ gap: 1rem;
1447
+ }
1448
+ :where(.masonry) {
1449
+ column-count: 3;
1450
+ column-gap: 1rem;
1451
+ }
1452
+ /* Horizontal-rule replacement that respects theme borders. */
1453
+ :where(.separator) {
1454
+ border: 0;
1455
+ border-top: var(--border) solid var(--lily-border);
1456
+ margin: 1rem 0;
1457
+ }
1458
+ /* Generic content tile. */
1459
+ :where(.tile) {
1460
+ display: block;
1461
+ padding: 1rem;
1462
+ background-color: var(--lily-surface);
1463
+ border: var(--border) solid var(--lily-border);
1464
+ border-radius: var(--lily-radius-md);
1465
+ }
1466
+ /* Sidebar — secondary-surface panel; sits beside main content. */
1467
+ :where(.sidebar) {
1468
+ display: block;
1469
+ background-color: var(--lily-surface-alt);
1470
+ padding: 1rem;
1471
+ border-radius: var(--lily-radius-md);
1472
+ }
1473
+ /* Aspect-ratio box — 16:9 default; consumers override `aspect-ratio`. */
1474
+ :where(.aspect-ratio-container) {
1475
+ position: relative;
1476
+ display: block;
1477
+ aspect-ratio: 16 / 9;
1478
+ overflow: hidden;
1479
+ border-radius: var(--lily-radius-md);
1480
+ }
1481
+ /* Framer — bordered box for embeds / illustrations. */
1482
+ :where(.framer) {
1483
+ padding: 1rem;
1484
+ border: var(--border) solid var(--lily-border);
1485
+ border-radius: var(--lily-radius-md);
1486
+ }
1487
+ /* Article-layout — declares column-width tokens that content-block reads.
1488
+ Pattern lifted from the Reuters Graphics components system. */
1489
+ :where(.article-layout) {
1490
+ --content-width-narrower: 20.625rem; /* 330px */
1491
+ --content-width-narrow: 31.875rem; /* 510px */
1492
+ --content-width-normal: 41.25rem; /* 660px (default reading width) */
1493
+ --content-width-wide: 58.125rem; /* 930px (chart escape) */
1494
+ --content-width-wider: 75rem; /* 1200px (full-bleed escape) */
1495
+ display: block;
1496
+ }
1497
+ /* Content-block — reads the column-width tokens; switch via data-width. */
1498
+ :where(.content-block) {
1499
+ max-width: var(--content-width-normal);
1500
+ margin-inline: auto;
1501
+ padding-inline: 1rem;
1502
+ box-sizing: border-box;
1503
+ }
1504
+ :where(.content-block[data-width="narrower"]) {
1505
+ max-width: var(--content-width-narrower);
1506
+ }
1507
+ :where(.content-block[data-width="narrow"]) {
1508
+ max-width: var(--content-width-narrow);
1509
+ }
1510
+ :where(.content-block[data-width="wide"]) {
1511
+ max-width: var(--content-width-wide);
1512
+ }
1513
+ :where(.content-block[data-width="wider"]) {
1514
+ max-width: var(--content-width-wider);
1515
+ }
1516
+
1517
+ /* --- Grail layout (5-region responsive page shell) --------------------- */
1518
+ /* Header spans the top; left-aside / main / right-aside fill the middle;
1519
+ footer spans the bottom. At ≤768px the asides drop below the main. */
1520
+ :where(.grail-layout) {
1521
+ display: grid;
1522
+ min-height: 100vh;
1523
+ grid-template-areas:
1524
+ "header header header"
1525
+ "left main right"
1526
+ "footer footer footer";
1527
+ grid-template-rows: auto 1fr auto;
1528
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
1529
+ background-color: var(--lily-surface);
1530
+ color: var(--lily-text);
1531
+ }
1532
+ :where(.grail-layout-top-header) {
1533
+ grid-area: header;
1534
+ }
1535
+ :where(.grail-layout-left-aside) {
1536
+ grid-area: left;
1537
+ }
1538
+ :where(.grail-layout-center-main) {
1539
+ grid-area: main;
1540
+ }
1541
+ :where(.grail-layout-right-aside) {
1542
+ grid-area: right;
1543
+ }
1544
+ :where(.grail-layout-bottom-footer) {
1545
+ grid-area: footer;
1546
+ }
1547
+ /* Header / footer chrome — secondary surface, padded. */
1548
+ :where(.grail-layout-top-header, .grail-layout-bottom-footer) {
1549
+ background-color: var(--lily-surface-alt);
1550
+ padding: 1rem;
1551
+ }
1552
+ /* Asides — secondary surface, padded. */
1553
+ :where(.grail-layout-left-aside, .grail-layout-right-aside) {
1554
+ padding: 1rem;
1555
+ background-color: var(--lily-surface-alt);
1556
+ }
1557
+ /* Main content area — primary surface, more generous padding. */
1558
+ :where(.grail-layout-center-main) {
1559
+ padding: 1.5rem;
1560
+ }
1561
+ /* Mobile breakpoint — collapse to a single column, stacking the regions. */
1562
+ @media (max-width: 48rem) {
1563
+ :where(.grail-layout) {
1564
+ grid-template-areas: "header" "main" "left" "right" "footer";
1565
+ grid-template-columns: 1fr;
1566
+ grid-template-rows: auto auto auto auto auto;
1567
+ }
1568
+ }
1569
+
1570
+ /* Standalone semantic header / footer landmarks. */
1571
+ :where(.header) {
1572
+ display: block;
1573
+ padding: 1rem;
1574
+ background-color: var(--lily-surface);
1575
+ border-bottom: var(--border) solid var(--lily-border);
1576
+ }
1577
+ :where(.footer) {
1578
+ display: block;
1579
+ padding: 1rem;
1580
+ background-color: var(--lily-surface-alt);
1581
+ border-top: var(--border) solid var(--lily-border);
1582
+ }
1583
+
1584
+ /* ==========================================================================
1585
+ * Dialogs, popovers, overlays
1586
+ * --------------------------------------------------------------------------
1587
+ * Modal and floating UI. Backdrop is a blur + 50% black overlay; dialog
1588
+ * frames are rounded with the largest shadow.
1589
+ * ====================================================================== */
1590
+
1591
+ /* Native <dialog> + variant types. */
1592
+ :where(
1593
+ .dialog,
1594
+ .alert-dialog,
1595
+ .timeout-dialog,
1596
+ .popconfirm-dialog,
1597
+ .file-dialog
1598
+ ) {
1599
+ background-color: var(--lily-surface);
1600
+ color: var(--lily-text);
1601
+ border: var(--border) solid var(--lily-border);
1602
+ border-radius: var(--lily-radius-lg);
1603
+ padding: 1.5rem;
1604
+ box-shadow: var(--lily-shadow-lg);
1605
+ max-width: min(40rem, 90vw); /* cap on big screens, fit on small */
1606
+ }
1607
+ /* Backdrop — dim the page and blur slightly so focus stays on the dialog. */
1608
+ :where(
1609
+ .dialog::backdrop,
1610
+ .alert-dialog::backdrop,
1611
+ .timeout-dialog::backdrop,
1612
+ .popconfirm-dialog::backdrop,
1613
+ .file-dialog::backdrop
1614
+ ) {
1615
+ background-color: color-mix(in oklch, black 50%, transparent);
1616
+ backdrop-filter: blur(2px);
1617
+ }
1618
+ /* Alert dialog — red rail so the user knows it's destructive. */
1619
+ :where(.alert-dialog) {
1620
+ border-color: var(--color-error);
1621
+ border-inline-start-width: 0.375rem;
1622
+ }
1623
+
1624
+ /* Popover / tooltip family — small floating labels. */
1625
+ :where(.popover, .popup, .tooltip, .coachmark, .contextual-help) {
1626
+ display: block;
1627
+ padding: 0.5rem 0.75rem;
1628
+ background-color: var(--color-neutral);
1629
+ color: var(--color-neutral-content);
1630
+ border-radius: var(--lily-radius-md);
1631
+ box-shadow: var(--lily-shadow-md);
1632
+ font-size: 0.875rem;
1633
+ max-width: 20rem;
1634
+ }
1635
+ /* Popover / popup — surface-coloured (more substantial than a tooltip). */
1636
+ :where(.popover, .popup) {
1637
+ background-color: var(--lily-surface);
1638
+ color: var(--lily-text);
1639
+ border: var(--border) solid var(--lily-border);
1640
+ max-width: 24rem;
1641
+ }
1642
+ /* Coachmark — primary-coloured border so it reads as a tutorial hint. */
1643
+ :where(.coachmark) {
1644
+ border: 2px solid var(--color-primary);
1645
+ }
1646
+
1647
+ /* Full-page overlay container — dims everything beneath a high-z child. */
1648
+ :where(.overlay-container) {
1649
+ position: fixed;
1650
+ inset: 0;
1651
+ background-color: color-mix(in oklch, black 50%, transparent);
1652
+ z-index: 100;
1653
+ }
1654
+
1655
+ /* Drawers — side panels (right edge by default; RTL-aware via logical
1656
+ properties). Sit above the overlay container (z-index 101). */
1657
+ :where(.drawer, .slide-out-drawer, .sheet) {
1658
+ position: fixed;
1659
+ inset-block: 0;
1660
+ inset-inline-end: 0;
1661
+ width: min(28rem, 90vw);
1662
+ background-color: var(--lily-surface);
1663
+ color: var(--lily-text);
1664
+ border-inline-start: var(--border) solid var(--lily-border);
1665
+ box-shadow: var(--lily-shadow-lg);
1666
+ padding: 1rem;
1667
+ z-index: 101;
1668
+ }
1669
+
1670
+ /* ==========================================================================
1671
+ * Menus
1672
+ * ====================================================================== */
1673
+
1674
+ /* Menu containers — surface-coloured popover with thin border + sm shadow. */
1675
+ :where(.menu, .context-menu, .dropdown-menu, .tree-menu, .command) {
1676
+ display: block;
1677
+ background-color: var(--lily-surface);
1678
+ color: var(--lily-text);
1679
+ border: var(--border) solid var(--lily-border);
1680
+ border-radius: var(--lily-radius-md);
1681
+ padding: 0.25rem;
1682
+ box-shadow: var(--lily-shadow-sm);
1683
+ list-style: none;
1684
+ margin: 0;
1685
+ }
1686
+ /* Menu items — flex row with icon + label slot. */
1687
+ :where(.menu-item, .context-menu-item) {
1688
+ display: flex;
1689
+ align-items: center;
1690
+ gap: 0.5rem;
1691
+ padding: 0.5rem 0.75rem;
1692
+ border-radius: var(--lily-radius-md);
1693
+ cursor: pointer;
1694
+ }
1695
+ /* Highlight on hover / aria-selected — alt surface. */
1696
+ :where(
1697
+ .menu-item:hover,
1698
+ .context-menu-item:hover,
1699
+ .menu-item[aria-selected="true"]
1700
+ ) {
1701
+ background-color: var(--lily-surface-alt);
1702
+ }
1703
+ /* Menu group — section within a menu. The aria-label becomes a header. */
1704
+ :where(.menu-group) {
1705
+ padding: 0.25rem 0;
1706
+ }
1707
+ :where(.menu-group::before) {
1708
+ content: attr(aria-label);
1709
+ display: block;
1710
+ padding: 0.25rem 0.75rem;
1711
+ color: var(--lily-text-muted);
1712
+ font-size: 0.75rem;
1713
+ text-transform: uppercase;
1714
+ letter-spacing: 0.05em;
1715
+ }
1716
+ /* Cascader / navigation-menu — horizontal flex row of menu columns. */
1717
+ :where(.cascader, .navigation-menu) {
1718
+ display: flex;
1719
+ gap: 0.25rem;
1720
+ }
1721
+ /* Hamburger — bordered icon-button. */
1722
+ :where(.hamburger-menu) {
1723
+ display: inline-flex;
1724
+ align-items: center;
1725
+ justify-content: center;
1726
+ padding: 0.5rem;
1727
+ background: transparent;
1728
+ border: var(--border) solid var(--lily-border-strong);
1729
+ border-radius: var(--lily-radius-md);
1730
+ color: var(--lily-text);
1731
+ cursor: pointer;
1732
+ }
1733
+
1734
+ /* ==========================================================================
1735
+ * Segments, toggles, groups
1736
+ * ====================================================================== */
1737
+
1738
+ /* Generic group containers — inline-flex, wrap, small gap. */
1739
+ :where(
1740
+ .segment-group,
1741
+ .toggle-group,
1742
+ .checkbox-group,
1743
+ .radio-group,
1744
+ .dial-group,
1745
+ .tag-group,
1746
+ .avatar-group,
1747
+ .mutually-exclusive
1748
+ ) {
1749
+ display: inline-flex;
1750
+ gap: 0.25rem;
1751
+ flex-wrap: wrap;
1752
+ }
1753
+ /* Segment group / toggle group get an inset background (iOS-segmented
1754
+ control aesthetic). */
1755
+ :where(.segment-group, .toggle-group) {
1756
+ padding: 0.25rem;
1757
+ background-color: var(--lily-surface-alt);
1758
+ border-radius: var(--lily-radius-md);
1759
+ }
1760
+ /* Segment items — transparent until pressed; then primary fill. */
1761
+ :where(.segment-group-item) {
1762
+ padding: 0.375rem 0.75rem;
1763
+ background: transparent;
1764
+ border: 0;
1765
+ border-radius: var(--lily-radius-md);
1766
+ color: var(--lily-text);
1767
+ cursor: pointer;
1768
+ }
1769
+ :where(
1770
+ .segment-group-item[aria-pressed="true"],
1771
+ .segment-group-item[aria-selected="true"]
1772
+ ) {
1773
+ background-color: var(--color-primary);
1774
+ color: var(--color-primary-content);
1775
+ }
1776
+ /* Avatar group — overlap each subsequent avatar by 0.5rem, with a
1777
+ contrast ring for separation. */
1778
+ :where(.avatar-group > *) {
1779
+ margin-inline-start: -0.5rem;
1780
+ border: 2px solid var(--lily-surface);
1781
+ }
1782
+
1783
+ /* ==========================================================================
1784
+ * Progress, loading
1785
+ * ====================================================================== */
1786
+
1787
+ /* Native <progress> / <meter> / bar variant — short, pill-shaped track. */
1788
+ :where(.progress, .progress-bar, .meter) {
1789
+ display: block;
1790
+ width: 100%;
1791
+ height: 0.5rem;
1792
+ appearance: none;
1793
+ background-color: var(--lily-surface-sunken);
1794
+ border: 0;
1795
+ border-radius: 999px;
1796
+ overflow: hidden;
1797
+ }
1798
+ /* Vendor pseudo-elements: track + value. */
1799
+ :where(.progress::-webkit-progress-bar, .meter::-webkit-meter-bar) {
1800
+ background-color: var(--lily-surface-sunken);
1801
+ }
1802
+ :where(
1803
+ .progress::-webkit-progress-value,
1804
+ .meter::-webkit-meter-optimum-value
1805
+ ) {
1806
+ background-color: var(--color-primary);
1807
+ }
1808
+ :where(.progress::-moz-progress-bar) {
1809
+ background-color: var(--color-primary);
1810
+ }
1811
+
1812
+ /* Progress circle — conic-gradient renders the sweep based on the
1813
+ --progress custom property (0–100). */
1814
+ :where(.progress-circle) {
1815
+ display: inline-block;
1816
+ width: 2rem;
1817
+ height: 2rem;
1818
+ border-radius: 50%;
1819
+ background: conic-gradient(
1820
+ var(--color-primary) calc(var(--progress, 0) * 1%),
1821
+ var(--lily-surface-sunken) 0
1822
+ );
1823
+ }
1824
+ /* Spinner / loading — classic CSS rotating partial-ring. */
1825
+ :where(.progress-spinner, .loading) {
1826
+ display: inline-block;
1827
+ width: 1.5rem;
1828
+ height: 1.5rem;
1829
+ border: 3px solid var(--lily-surface-sunken);
1830
+ border-top-color: var(--color-primary);
1831
+ border-radius: 50%;
1832
+ animation: lily-spin 0.8s linear infinite;
1833
+ }
1834
+ @keyframes lily-spin {
1835
+ to {
1836
+ transform: rotate(360deg);
1837
+ }
1838
+ }
1839
+ /* Skeleton — shimmering placeholder while content is loading. */
1840
+ :where(.skeleton) {
1841
+ display: block;
1842
+ background: linear-gradient(
1843
+ 90deg,
1844
+ var(--lily-surface-alt) 0%,
1845
+ var(--lily-surface-sunken) 50%,
1846
+ var(--lily-surface-alt) 100%
1847
+ );
1848
+ background-size: 200% 100%;
1849
+ animation: lily-skeleton 1.4s ease-in-out infinite;
1850
+ border-radius: var(--lily-radius-md);
1851
+ min-height: 1rem;
1852
+ }
1853
+ @keyframes lily-skeleton {
1854
+ 0% {
1855
+ background-position: 200% 0;
1856
+ }
1857
+ 100% {
1858
+ background-position: -200% 0;
1859
+ }
1860
+ }
1861
+ /* Respect prefers-reduced-motion — kill the perpetual animations.
1862
+ (WCAG 2.3.3 Animation from interactions.) */
1863
+ @media (prefers-reduced-motion: reduce) {
1864
+ :where(.progress-spinner, .loading, .skeleton, .beach-ball) {
1865
+ animation: none;
1866
+ }
1867
+ }
1868
+
1869
+ /* ==========================================================================
1870
+ * Avatars, badges, tags, status
1871
+ * ====================================================================== */
1872
+
1873
+ /* Avatar — circular tile (2.5rem) with sunken background as the
1874
+ fallback colour when no image is provided. */
1875
+ :where(.avatar) {
1876
+ display: inline-flex;
1877
+ align-items: center;
1878
+ justify-content: center;
1879
+ width: 2.5rem;
1880
+ height: 2.5rem;
1881
+ border-radius: 50%;
1882
+ background-color: var(--lily-surface-sunken);
1883
+ color: var(--lily-text);
1884
+ overflow: hidden;
1885
+ font-weight: 600;
1886
+ }
1887
+ :where(.avatar-image) {
1888
+ width: 100%;
1889
+ height: 100%;
1890
+ object-fit: cover;
1891
+ display: block;
1892
+ }
1893
+ /* Avatar fallback text — uppercase initials. */
1894
+ :where(.avatar-text) {
1895
+ text-transform: uppercase;
1896
+ }
1897
+
1898
+ /* Badge / flair / tag family — small pill-shaped labels. */
1899
+ :where(.badge, .flair, .status-tag, .tag, .ai-label) {
1900
+ display: inline-flex;
1901
+ align-items: center;
1902
+ gap: 0.25rem;
1903
+ padding: 0.125rem 0.5rem;
1904
+ font-size: 0.75rem;
1905
+ font-weight: 600;
1906
+ line-height: 1.5;
1907
+ background-color: var(--color-neutral);
1908
+ color: var(--color-neutral-content);
1909
+ border-radius: 999px;
1910
+ }
1911
+ /* Tag — neutral chip with a visible border (so it's not confused with
1912
+ a status badge). */
1913
+ :where(.tag) {
1914
+ background-color: var(--lily-surface-alt);
1915
+ color: var(--lily-text);
1916
+ border: var(--border) solid var(--lily-border);
1917
+ }
1918
+ /* AI label — accent colour so AI-generated content is visually marked. */
1919
+ :where(.ai-label) {
1920
+ background-color: var(--color-accent);
1921
+ color: var(--color-accent-content);
1922
+ }
1923
+ /* Status tags — pre-baked colour for each status. */
1924
+ :where(.status-tag[data-status="success"]) {
1925
+ background-color: var(--color-success);
1926
+ color: var(--color-success-content);
1927
+ }
1928
+ :where(.status-tag[data-status="warning"]) {
1929
+ background-color: var(--color-warning);
1930
+ color: var(--color-warning-content);
1931
+ }
1932
+ :where(.status-tag[data-status="error"]) {
1933
+ background-color: var(--color-error);
1934
+ color: var(--color-error-content);
1935
+ }
1936
+ :where(.status-tag[data-status="info"]) {
1937
+ background-color: var(--color-info);
1938
+ color: var(--color-info-content);
1939
+ }
1940
+
1941
+ /* Status light — a coloured dot followed by a label. */
1942
+ :where(.status-light) {
1943
+ display: inline-flex;
1944
+ align-items: center;
1945
+ gap: 0.375rem;
1946
+ }
1947
+ :where(.status-light)::before {
1948
+ content: "";
1949
+ display: inline-block;
1950
+ width: 0.625rem;
1951
+ height: 0.625rem;
1952
+ border-radius: 50%;
1953
+ background-color: var(--color-neutral);
1954
+ }
1955
+ :where(.status-light[data-status="success"])::before {
1956
+ background-color: var(--color-success);
1957
+ }
1958
+ :where(.status-light[data-status="warning"])::before {
1959
+ background-color: var(--color-warning);
1960
+ }
1961
+ :where(.status-light[data-status="error"])::before {
1962
+ background-color: var(--color-error);
1963
+ }
1964
+ :where(.status-light[data-status="info"])::before {
1965
+ background-color: var(--color-info);
1966
+ }
1967
+
1968
+ /* ==========================================================================
1969
+ * Pickers, ratings, theme
1970
+ * ====================================================================== */
1971
+
1972
+ /* Picker baseline — inline row of selectable chips/buttons. */
1973
+ :where(
1974
+ .color-picker,
1975
+ .five-face-rating-picker,
1976
+ .five-star-rating-picker,
1977
+ .net-promoter-score-picker,
1978
+ .red-amber-green-picker,
1979
+ .red-orange-yellow-green-blue-picker,
1980
+ .emoji-character-picker,
1981
+ .calendar-range-picker
1982
+ ) {
1983
+ display: inline-flex;
1984
+ align-items: center;
1985
+ gap: 0.25rem;
1986
+ padding: 0.25rem;
1987
+ background-color: var(--lily-surface);
1988
+ border: var(--border) solid var(--lily-border);
1989
+ border-radius: var(--lily-radius-md);
1990
+ }
1991
+ /* Picker buttons — small alt-surface chips. */
1992
+ :where(
1993
+ .color-picker-button,
1994
+ .five-face-rating-picker-button,
1995
+ .five-star-rating-picker-button,
1996
+ .net-promoter-score-picker-button,
1997
+ .red-amber-green-picker-button,
1998
+ .red-orange-yellow-green-blue-picker-button
1999
+ ) {
2000
+ background-color: var(--lily-surface-alt);
2001
+ color: var(--lily-text);
2002
+ border: var(--border) solid var(--lily-border);
2003
+ min-width: 2rem;
2004
+ min-height: 2rem;
2005
+ padding: 0.25rem 0.5rem;
2006
+ }
2007
+ /* Color picker — circular swatch. */
2008
+ :where(.color-picker-button) {
2009
+ width: 1.75rem;
2010
+ height: 1.75rem;
2011
+ padding: 0;
2012
+ border-radius: 50%;
2013
+ }
2014
+ /* Filled stars — warning (gold) colour for both viewer and pressed state. */
2015
+ :where(
2016
+ .five-star-rating-view,
2017
+ .five-star-rating-picker-button[aria-pressed="true"]
2018
+ ) {
2019
+ color: var(--color-warning);
2020
+ }
2021
+ /* RAG (red/amber/green) — semantic colour per status. */
2022
+ :where(
2023
+ .red-amber-green-view[data-status="red"],
2024
+ .red-amber-green-picker-button[data-status="red"]
2025
+ ) {
2026
+ background-color: var(--color-error);
2027
+ color: var(--color-error-content);
2028
+ }
2029
+ :where(
2030
+ .red-amber-green-view[data-status="amber"],
2031
+ .red-amber-green-picker-button[data-status="amber"]
2032
+ ) {
2033
+ background-color: var(--color-warning);
2034
+ color: var(--color-warning-content);
2035
+ }
2036
+ :where(
2037
+ .red-amber-green-view[data-status="green"],
2038
+ .red-amber-green-picker-button[data-status="green"]
2039
+ ) {
2040
+ background-color: var(--color-success);
2041
+ color: var(--color-success-content);
2042
+ }
2043
+
2044
+ /* Native <select> styling — drop the UA chrome and draw our own caret
2045
+ via two stacked linear-gradients. */
2046
+ :where(select.theme-select, .select, .select-with-extras, .tree-select) {
2047
+ width: 100%;
2048
+ min-height: 2.5rem;
2049
+ padding: 0.5rem 2rem 0.5rem 0.75rem; /* extra right padding for caret */
2050
+ font: inherit;
2051
+ background-color: var(--lily-surface);
2052
+ color: var(--lily-text);
2053
+ border: var(--border) solid var(--lily-border-strong);
2054
+ border-radius: var(--lily-radius-md);
2055
+ appearance: none;
2056
+ background-image:
2057
+ linear-gradient(45deg, transparent 50%, var(--lily-text) 50%),
2058
+ linear-gradient(135deg, var(--lily-text) 50%, transparent 50%);
2059
+ background-position:
2060
+ calc(100% - 1.1rem) 1.1rem,
2061
+ calc(100% - 0.7rem) 1.1rem;
2062
+ background-size: 0.4rem 0.4rem;
2063
+ background-repeat: no-repeat;
2064
+ }
2065
+ /* Options inherit the select colours so the dropdown matches the input. */
2066
+ :where(.option, .theme-select-option) {
2067
+ background-color: var(--lily-surface);
2068
+ color: var(--lily-text);
2069
+ }
2070
+
2071
+ /* The four *-picker helpers are an icon button that opens a popup,
2072
+ so they are styled as a popup rather than a form field. No :has()
2073
+ guard is needed any more: before the July 2026 rename these shared
2074
+ the `.theme-select` hook with the catalog theme-select component
2075
+ and had to be told apart. Distinct names, no collision. */
2076
+ :where(
2077
+ .theme-picker,
2078
+ .locale-picker,
2079
+ .text-size-picker,
2080
+ .search-picker,
2081
+ .link-picker,
2082
+ .menu-picker,
2083
+ .settings-picker,
2084
+ .share-picker,
2085
+ .date-time-picker
2086
+ ) {
2087
+ position: relative;
2088
+ display: inline-block;
2089
+ }
2090
+
2091
+ :where(
2092
+ .theme-picker-button,
2093
+ .locale-picker-button,
2094
+ .text-size-picker-button,
2095
+ .search-picker-button,
2096
+ .link-picker-button,
2097
+ .menu-picker-button,
2098
+ .settings-picker-button,
2099
+ .share-picker-button,
2100
+ .date-time-picker-button
2101
+ ) {
2102
+ display: inline-flex;
2103
+ align-items: center;
2104
+ justify-content: center;
2105
+ min-width: 2.5rem;
2106
+ min-height: 2.5rem;
2107
+ padding: var(--lily-space-xs);
2108
+ font: inherit;
2109
+ line-height: 1;
2110
+ color: var(--lily-text);
2111
+ background-color: var(--lily-surface);
2112
+ border: var(--border) solid var(--lily-border-strong);
2113
+ border-radius: var(--lily-radius-md);
2114
+ cursor: pointer;
2115
+ }
2116
+
2117
+ /* The icon is decorative (aria-hidden); the button's aria-label
2118
+ carries the accessible name. Reversed 2026-09-16: five of the
2119
+ six picker icons (theme, locale, text-size, motion, share) are
2120
+ now bundled SVGs, not Unicode glyphs. Each ships its own
2121
+ explicit width="1.05rem" height="1.05rem" on the <svg> element,
2122
+ so unlike a font-dependent character glyph -- where different
2123
+ glyphs ink different fractions of their em box, needing a
2124
+ per-glyph optical correction -- every icon in this family
2125
+ already inks the same visual size by construction (the icon's
2126
+ own author controls its viewBox). This rule only supplies flex
2127
+ centering; override the icon's own width/height if you need a
2128
+ different size. */
2129
+ :where(
2130
+ .theme-picker-icon,
2131
+ .locale-picker-icon,
2132
+ .text-size-picker-icon,
2133
+ .motion-picker-icon,
2134
+ .link-picker-icon,
2135
+ .menu-picker-icon,
2136
+ .settings-picker-icon,
2137
+ .share-picker-icon,
2138
+ .search-picker-icon
2139
+ ) {
2140
+ display: inline-flex;
2141
+ align-items: center;
2142
+ justify-content: center;
2143
+ }
2144
+
2145
+ /* date-time-picker's calendar icon is still a Unicode glyph
2146
+ (U+1F4C5 + U+FE0E) -- out of scope for the 2026-09-16 SVG-icon
2147
+ reversal, since date-time-picker was not part of that change
2148
+ (see AGENTS/helpers.md) -- so it keeps the font-size-based
2149
+ sizing the other five used to share.
2150
+
2151
+ U+1F4C5 calendar inks 1.000 of its em box (max extent) against
2152
+ U+25D1 half-circle's reference 0.850 (the pre-reversal
2153
+ baseline, still valid here since this is the same glyph
2154
+ measurement, unchanged): 0.850/1.000 ≈ 0.85, shipped as 0.845.
2155
+ A colour-emoji font paints every one of its glyphs into one
2156
+ identical em square, so globe, calendar, rocket and heart all
2157
+ measure the same ink box -- any future emoji helper icon can
2158
+ reuse this factor without re-measuring.
2159
+
2160
+ (Measuring also confirms the U+FE0E text-presentation selector is
2161
+ ignored here: the bare and VS-15 forms are metrically identical. It
2162
+ stays in the source as a hint to the platforms that do honour it.) */
2163
+ :where(.date-time-picker-icon) {
2164
+ display: inline-flex;
2165
+ align-items: center;
2166
+ justify-content: center;
2167
+ font-size: calc(1.25em * var(--lily-picker-icon-scale, 1));
2168
+ line-height: 1;
2169
+ --lily-picker-icon-scale: 0.845;
2170
+ }
2171
+
2172
+ /* The share list holds real links and a button rather than options,
2173
+ so its items get the same padding without the option selectors. */
2174
+ :where(.share-picker-list) > :where(.share-picker-list-item) {
2175
+ list-style: none;
2176
+ }
2177
+
2178
+ :where(.share-picker-target, .share-picker-copy) {
2179
+ display: block;
2180
+ width: 100%;
2181
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2182
+ font: inherit;
2183
+ text-align: start;
2184
+ color: var(--lily-text);
2185
+ background: none;
2186
+ border: 0;
2187
+ border-radius: var(--lily-radius-sm);
2188
+ cursor: pointer;
2189
+ }
2190
+
2191
+ :where(.share-picker-target:hover, .share-picker-copy:hover) {
2192
+ background-color: var(--lily-surface-alt);
2193
+ }
2194
+
2195
+ /* link-picker's list holds real page links (a disclosure, not a menu),
2196
+ so its items get the share list's treatment; the current page is
2197
+ marked by aria-current and shown in bold. */
2198
+ :where(.link-picker-list) > :where(.link-picker-list-item) {
2199
+ list-style: none;
2200
+ }
2201
+
2202
+ :where(.link-picker-link) {
2203
+ display: block;
2204
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2205
+ color: var(--lily-text);
2206
+ text-decoration: none;
2207
+ border-radius: var(--lily-radius-sm);
2208
+ cursor: pointer;
2209
+ }
2210
+
2211
+ :where(.link-picker-link:hover) {
2212
+ background-color: var(--lily-surface-alt);
2213
+ }
2214
+
2215
+ :where(.link-picker-link[aria-current="page"]) {
2216
+ font-weight: 600;
2217
+ background-color: var(--lily-surface-sunken);
2218
+ }
2219
+
2220
+ /* Copy feedback. Never display:none this — that silences the live
2221
+ region for screen-reader users. */
2222
+ :where(.share-picker-status) {
2223
+ margin: var(--lily-space-xs) 0 0;
2224
+ font-size: 0.875em;
2225
+ color: var(--lily-text-muted);
2226
+ }
2227
+
2228
+ /* The status paragraph is always rendered so the aria-live region
2229
+ exists before the first announcement (see above); empty, it still
2230
+ generates a line box and carries the margin-top set above, both of
2231
+ which push the button row out of alignment in a flex layout like
2232
+ picker-bar (found independently by two downstream consumers, each
2233
+ patching around it locally). :empty here matches a Svelte-rendered
2234
+ {status} of "" (a zero-length text node doesn't count as a child
2235
+ per the CSS spec), so this only applies while there is nothing to
2236
+ announce, and normal spacing returns the moment status has text. */
2237
+ :where(.share-picker-status:empty) {
2238
+ margin: 0;
2239
+ line-height: 0;
2240
+ }
2241
+
2242
+ /* Components added 2026-10-05: kbd-shortcut, show-more, thinking,
2243
+ empty-state, file-tree, one-time-password-input, multi-select, and
2244
+ the four calendar views. The calendar views reuse the
2245
+ calendar-table-* sub-element hooks, so they only need the table
2246
+ root rule. show-more's clamp is keyed on data-expanded (the
2247
+ component never sets an inline style); file-tree hides a closed
2248
+ folder's group via aria-expanded. */
2249
+ :where(.calendar-year-table, .calendar-month-table, .calendar-week-table, .calendar-day-table) {
2250
+ width: 100%;
2251
+ border-collapse: collapse;
2252
+ }
2253
+
2254
+ :where(.kbd-shortcut) {
2255
+ display: inline-flex;
2256
+ align-items: center;
2257
+ gap: var(--lily-space-xs);
2258
+ }
2259
+
2260
+ :where(.kbd-shortcut-key) {
2261
+ display: inline-block;
2262
+ padding: 0.125rem 0.4rem;
2263
+ font-family: var(--lily-font-mono);
2264
+ font-size: 0.85em;
2265
+ background-color: var(--lily-surface-alt);
2266
+ border: var(--border) solid var(--lily-border-strong);
2267
+ border-bottom-width: 2px;
2268
+ border-radius: var(--lily-radius-sm);
2269
+ }
2270
+
2271
+ :where(.show-more-content[data-expanded="false"]) {
2272
+ max-height: 6em;
2273
+ overflow: hidden;
2274
+ }
2275
+
2276
+ :where(.show-more-button) {
2277
+ margin-block-start: var(--lily-space-xs);
2278
+ padding: var(--lily-space-xs);
2279
+ font: inherit;
2280
+ color: inherit;
2281
+ text-decoration: underline;
2282
+ background: none;
2283
+ border: 0;
2284
+ cursor: pointer;
2285
+ }
2286
+
2287
+ :where(.thinking) {
2288
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2289
+ color: var(--lily-text-muted);
2290
+ border: var(--border) solid var(--lily-border-strong);
2291
+ border-radius: var(--lily-radius-md);
2292
+ }
2293
+
2294
+ :where(.thinking-summary) {
2295
+ cursor: pointer;
2296
+ }
2297
+
2298
+ :where(.thinking[data-streaming] .thinking-summary) {
2299
+ font-style: italic;
2300
+ }
2301
+
2302
+ :where(.empty-state) {
2303
+ padding: var(--lily-space-lg);
2304
+ text-align: center;
2305
+ color: var(--lily-text-muted);
2306
+ }
2307
+
2308
+ :where(.file-tree, .file-tree [role="group"]) {
2309
+ margin: 0;
2310
+ padding-inline-start: 0;
2311
+ list-style: none;
2312
+ }
2313
+
2314
+ :where(.file-tree [role="group"]) {
2315
+ padding-inline-start: var(--lily-space-md);
2316
+ }
2317
+
2318
+ :where(.file-tree [role="treeitem"]) {
2319
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2320
+ cursor: pointer;
2321
+ }
2322
+
2323
+ :where(.file-tree [role="treeitem"][aria-expanded="false"] > [role="group"]) {
2324
+ display: none;
2325
+ }
2326
+
2327
+ :where(.file-tree [role="treeitem"]:focus-visible) {
2328
+ outline: var(--lily-focus-ring);
2329
+ outline-offset: -2px;
2330
+ }
2331
+
2332
+ :where(.one-time-password-input, .multi-select, .multi-select-with-extras select) {
2333
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2334
+ font: inherit;
2335
+ color: var(--lily-text);
2336
+ background-color: var(--lily-surface);
2337
+ border: var(--border) solid var(--lily-border-strong);
2338
+ border-radius: var(--lily-radius-sm);
2339
+ }
2340
+
2341
+ :where(.one-time-password-input) {
2342
+ font-family: var(--lily-font-mono);
2343
+ letter-spacing: 0.25em;
2344
+ }
2345
+
2346
+ /* Chart containers added 2026-10-05 (gauge, heatmap, radar, sankey, pie,
2347
+ ring, funnel, candlestick, composed, choropleth, sunburst) join the
2348
+ existing five as block figures. Every chart's optional data-table
2349
+ wrapper sits below the graphic; the table itself inherits the
2350
+ catalog's table styling. */
2351
+ :where(
2352
+ .gauge-chart,
2353
+ .heatmap-chart,
2354
+ .radar-chart,
2355
+ .sankey-chart,
2356
+ .pie-chart,
2357
+ .ring-chart,
2358
+ .funnel-chart,
2359
+ .candlestick-chart,
2360
+ .composed-chart,
2361
+ .choropleth-chart,
2362
+ .sunburst-chart
2363
+ ) {
2364
+ display: block;
2365
+ margin: 0;
2366
+ }
2367
+
2368
+ :where(
2369
+ .area-chart-data-table,
2370
+ .bar-chart-data-table,
2371
+ .column-chart-data-table,
2372
+ .line-chart-data-table,
2373
+ .scatter-chart-data-table,
2374
+ .gauge-chart-data-table,
2375
+ .heatmap-chart-data-table,
2376
+ .radar-chart-data-table,
2377
+ .sankey-chart-data-table,
2378
+ .pie-chart-data-table,
2379
+ .ring-chart-data-table,
2380
+ .funnel-chart-data-table,
2381
+ .candlestick-chart-data-table,
2382
+ .composed-chart-data-table,
2383
+ .choropleth-chart-data-table,
2384
+ .sunburst-chart-data-table
2385
+ ) {
2386
+ margin-block-start: var(--lily-space-sm);
2387
+ overflow-x: auto;
2388
+ }
2389
+
2390
+ /* tool-call (2026-10-05): a bordered disclosure; the status word sits next
2391
+ to the name in the summary and is never the only cue. [data-status] is
2392
+ the consumer hook for a spinner or icon. */
2393
+ :where(.tool-call) {
2394
+ border: var(--border) solid var(--lily-border-strong);
2395
+ border-radius: var(--lily-radius-md);
2396
+ background-color: var(--lily-surface);
2397
+ color: var(--lily-text);
2398
+ }
2399
+
2400
+ :where(.tool-call-summary) {
2401
+ display: flex;
2402
+ align-items: center;
2403
+ gap: var(--lily-space-sm);
2404
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2405
+ cursor: pointer;
2406
+ }
2407
+
2408
+ :where(.tool-call-content) {
2409
+ display: grid;
2410
+ gap: var(--lily-space-xs);
2411
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2412
+ border-block-start: var(--border) solid var(--lily-border-strong);
2413
+ }
2414
+
2415
+ :where(.tool-call-name) {
2416
+ font-family: var(--lily-font-mono);
2417
+ }
2418
+
2419
+ :where(.tool-call-status) {
2420
+ color: var(--lily-text-muted);
2421
+ }
2422
+
2423
+ :where(.tool-call-input pre, .tool-call-output pre) {
2424
+ margin: 0;
2425
+ overflow-x: auto;
2426
+ font-family: var(--lily-font-mono);
2427
+ }
2428
+
2429
+ :where(.tool-call-error) {
2430
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2431
+ border: var(--border) solid var(--lily-border-strong);
2432
+ border-radius: var(--lily-radius-sm);
2433
+ font-weight: 600;
2434
+ }
2435
+
2436
+ /* mark (2026-10-05): the native <mark> highlight. The UA default is a
2437
+ fixed yellow; this uses the theme's own surface and text tokens so the
2438
+ pair keeps its contrast in every theme (including dark ones). */
2439
+ :where(.mark) {
2440
+ padding-inline: 0.15em;
2441
+ color: var(--lily-text);
2442
+ background-color: var(--lily-surface-alt);
2443
+ border-radius: var(--lily-radius-sm);
2444
+ box-shadow: 0 0 0 1px var(--lily-border-strong);
2445
+ }
2446
+
2447
+ /* chat-composer (2026-10-05): one row, textarea growing, one button. The
2448
+ button's visible word is its accessible name — hide it visually, never
2449
+ with display:none, if you replace it with an icon. */
2450
+ :where(.chat-composer) {
2451
+ display: flex;
2452
+ align-items: flex-end;
2453
+ gap: var(--lily-space-xs);
2454
+ }
2455
+
2456
+ :where(.chat-composer-input) {
2457
+ flex: 1;
2458
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2459
+ font: inherit;
2460
+ color: var(--lily-text);
2461
+ background-color: var(--lily-surface);
2462
+ border: var(--border) solid var(--lily-border-strong);
2463
+ border-radius: var(--lily-radius-md);
2464
+ resize: none;
2465
+ }
2466
+
2467
+ :where(.chat-composer-button) {
2468
+ min-width: 2.5rem;
2469
+ min-height: 2.5rem;
2470
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2471
+ font: inherit;
2472
+ color: var(--lily-text);
2473
+ background-color: var(--lily-surface);
2474
+ border: var(--border) solid var(--lily-border-strong);
2475
+ border-radius: var(--lily-radius-md);
2476
+ cursor: pointer;
2477
+ }
2478
+
2479
+ :where(.chat-composer-button:disabled) {
2480
+ cursor: not-allowed;
2481
+ opacity: 0.6;
2482
+ }
2483
+
2484
+ /* Picker tooltips (added 2026-10-04): a visual-only role="tooltip"
2485
+ element beside each picker's icon button, holding the same text as
2486
+ its aria-label. The component toggles [hidden]; position and look
2487
+ are here. It sits just below the button, in the inverse of the
2488
+ page colours so it never disappears into the surface. A ::before
2489
+ strip bridges the gap to the button so the pointer can travel onto
2490
+ the tooltip without it closing (WCAG 1.4.13, hoverable). */
2491
+ :where(.motion-picker) {
2492
+ position: relative;
2493
+ display: inline-block;
2494
+ }
2495
+
2496
+ :where(
2497
+ .theme-picker-tooltip,
2498
+ .locale-picker-tooltip,
2499
+ .text-size-picker-tooltip,
2500
+ .motion-picker-tooltip,
2501
+ .link-picker-tooltip,
2502
+ .menu-picker-tooltip,
2503
+ .settings-picker-tooltip,
2504
+ .share-picker-tooltip,
2505
+ .search-picker-tooltip,
2506
+ .date-time-picker-tooltip
2507
+ ) {
2508
+ position: absolute;
2509
+ z-index: 11;
2510
+ inset-inline-start: 0;
2511
+ inset-block-start: 100%;
2512
+ margin-block-start: var(--lily-space-xs);
2513
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2514
+ font-size: 0.875em;
2515
+ line-height: 1.3;
2516
+ white-space: nowrap;
2517
+ color: var(--lily-surface);
2518
+ background-color: var(--lily-text);
2519
+ border-radius: var(--lily-radius-sm);
2520
+ box-shadow: var(--lily-shadow-md);
2521
+ }
2522
+
2523
+ :where(
2524
+ .theme-picker-tooltip,
2525
+ .locale-picker-tooltip,
2526
+ .text-size-picker-tooltip,
2527
+ .motion-picker-tooltip,
2528
+ .link-picker-tooltip,
2529
+ .menu-picker-tooltip,
2530
+ .settings-picker-tooltip,
2531
+ .share-picker-tooltip,
2532
+ .search-picker-tooltip,
2533
+ .date-time-picker-tooltip
2534
+ )::before {
2535
+ content: "";
2536
+ position: absolute;
2537
+ inset-inline: 0;
2538
+ inset-block-end: 100%;
2539
+ height: var(--lily-space-xs);
2540
+ }
2541
+
2542
+ :where(
2543
+ .theme-picker-tooltip,
2544
+ .locale-picker-tooltip,
2545
+ .text-size-picker-tooltip,
2546
+ .motion-picker-tooltip,
2547
+ .link-picker-tooltip,
2548
+ .menu-picker-tooltip,
2549
+ .settings-picker-tooltip,
2550
+ .share-picker-tooltip,
2551
+ .search-picker-tooltip,
2552
+ .date-time-picker-tooltip
2553
+ )[hidden] {
2554
+ display: none;
2555
+ }
2556
+
2557
+ /* search-picker's panel holds a search form rather than a list: the
2558
+ field and the ⏎ submit button sit in one row, the button at the
2559
+ field's inline end (right in LTR, left under dir="rtl"). The ⏎
2560
+ button matches the picker trigger buttons' size and border. */
2561
+ :where(.search-picker-form) {
2562
+ display: flex;
2563
+ align-items: stretch;
2564
+ gap: var(--lily-space-xs);
2565
+ margin: 0;
2566
+ }
2567
+
2568
+ :where(.search-picker-input) {
2569
+ min-width: 14rem;
2570
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2571
+ font: inherit;
2572
+ color: var(--lily-text);
2573
+ background-color: var(--lily-surface);
2574
+ border: var(--border) solid var(--lily-border-strong);
2575
+ border-radius: var(--lily-radius-sm);
2576
+ }
2577
+
2578
+ :where(.search-picker-submit) {
2579
+ display: inline-flex;
2580
+ align-items: center;
2581
+ justify-content: center;
2582
+ min-width: 2.5rem;
2583
+ min-height: 2.5rem;
2584
+ padding: var(--lily-space-xs);
2585
+ font: inherit;
2586
+ line-height: 1;
2587
+ color: var(--lily-text);
2588
+ background-color: var(--lily-surface);
2589
+ border: var(--border) solid var(--lily-border-strong);
2590
+ border-radius: var(--lily-radius-md);
2591
+ cursor: pointer;
2592
+ }
2593
+
2594
+ :where(.search-picker-submit:hover) {
2595
+ background-color: var(--lily-surface-alt);
2596
+ }
2597
+
2598
+ :where(
2599
+ .theme-picker-list,
2600
+ .locale-picker-list,
2601
+ .text-size-picker-list,
2602
+ .motion-picker-list,
2603
+ .link-picker-list,
2604
+ .menu-picker-panel,
2605
+ .settings-picker-panel,
2606
+ .share-picker-list,
2607
+ .search-picker-panel
2608
+ ) {
2609
+ position: absolute;
2610
+ z-index: 10;
2611
+ inset-inline-start: 0;
2612
+ min-width: max-content;
2613
+ max-height: 60vh;
2614
+ margin-block-start: var(--lily-space-xs);
2615
+ padding: var(--lily-space-xs);
2616
+ overflow-y: auto;
2617
+ list-style: none;
2618
+ color: var(--lily-text);
2619
+ background-color: var(--lily-surface);
2620
+ border: var(--border) solid var(--lily-border-strong);
2621
+ border-radius: var(--lily-radius-md);
2622
+ box-shadow: var(--lily-shadow-md);
2623
+ }
2624
+
2625
+ /* Explicit, because the rules above would otherwise beat the UA
2626
+ stylesheet's [hidden] { display: none }. */
2627
+ :where(
2628
+ .theme-picker-list,
2629
+ .locale-picker-list,
2630
+ .text-size-picker-list,
2631
+ .motion-picker-list,
2632
+ .link-picker-list,
2633
+ .menu-picker-panel,
2634
+ .settings-picker-panel,
2635
+ .share-picker-list,
2636
+ .search-picker-panel
2637
+ )[hidden] {
2638
+ display: none;
2639
+ }
2640
+
2641
+ /* Popups open under their button, aligned to its start edge, and flip to
2642
+ its end edge (or above it) when they would run off the viewport. A header
2643
+ picker near the right edge otherwise overflows, and focusing the popup
2644
+ scrolls the whole page sideways. `position: fixed` makes the viewport the
2645
+ containing block that the flip fallbacks are checked against; browsers
2646
+ without anchor positioning keep the absolute placement above. */
2647
+ @supports (position-area: block-end) {
2648
+ :where(.theme-picker) { anchor-name: --lily-theme-picker; }
2649
+ :where(.locale-picker) { anchor-name: --lily-locale-picker; }
2650
+ :where(.text-size-picker) { anchor-name: --lily-text-size-picker; }
2651
+ :where(.motion-picker) { anchor-name: --lily-motion-picker; }
2652
+ :where(.link-picker) { anchor-name: --lily-link-picker; }
2653
+ :where(.menu-picker) { anchor-name: --lily-menu-picker; }
2654
+ :where(.settings-picker) { anchor-name: --lily-settings-picker; }
2655
+ :where(.share-picker) { anchor-name: --lily-share-picker; }
2656
+ :where(.search-picker) { anchor-name: --lily-search-picker; }
2657
+ :where(.theme-picker-list) { position-anchor: --lily-theme-picker; }
2658
+ :where(.locale-picker-list) { position-anchor: --lily-locale-picker; }
2659
+ :where(.text-size-picker-list) { position-anchor: --lily-text-size-picker; }
2660
+ :where(.motion-picker-list) { position-anchor: --lily-motion-picker; }
2661
+ :where(.link-picker-list) { position-anchor: --lily-link-picker; }
2662
+ :where(.menu-picker-panel) { position-anchor: --lily-menu-picker; }
2663
+ :where(.settings-picker-panel) { position-anchor: --lily-settings-picker; }
2664
+ :where(.share-picker-list) { position-anchor: --lily-share-picker; }
2665
+ :where(.search-picker-panel) { position-anchor: --lily-search-picker; }
2666
+ :where(
2667
+ .theme-picker-list,
2668
+ .locale-picker-list,
2669
+ .text-size-picker-list,
2670
+ .motion-picker-list,
2671
+ .link-picker-list,
2672
+ .menu-picker-panel,
2673
+ .settings-picker-panel,
2674
+ .share-picker-list,
2675
+ .search-picker-panel
2676
+ ) {
2677
+ position: fixed;
2678
+ inset: auto;
2679
+ position-area: block-end span-inline-end;
2680
+ position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
2681
+ min-width: 0;
2682
+ width: max-content;
2683
+ max-width: calc(100vw - 1rem);
2684
+ }
2685
+ }
2686
+
2687
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .motion-picker-list)
2688
+ > :where(
2689
+ .theme-picker-option,
2690
+ .locale-picker-option,
2691
+ .text-size-picker-option,
2692
+ .motion-picker-option
2693
+ ) {
2694
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2695
+ border-radius: var(--lily-radius-sm);
2696
+ cursor: pointer;
2697
+ }
2698
+
2699
+ /* data-active is the keyboard cursor (aria-activedescendant); focus
2700
+ stays on the listbox, so this is the only visible cue for it. */
2701
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .motion-picker-list)
2702
+ > :where([data-active]) {
2703
+ background-color: var(--lily-surface-alt);
2704
+ outline: var(--lily-focus-ring);
2705
+ outline-offset: -2px;
2706
+ }
2707
+
2708
+ /* aria-selected marks the applied theme/locale, which is not the
2709
+ same thing as the keyboard cursor. Both can be visible at once. */
2710
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .motion-picker-list)
2711
+ > :where([aria-selected="true"]) {
2712
+ font-weight: 600;
2713
+ background-color: var(--lily-surface-sunken);
2714
+ }
2715
+
2716
+ /* Locale options inherit the select colours, same as theme options. */
2717
+ :where(.locale-picker-option) {
2718
+ background-color: var(--lily-surface);
2719
+ color: var(--lily-text);
2720
+ }
2721
+
2722
+ /* ----------------------------------------------------------------------
2723
+ * date-time-picker
2724
+ *
2725
+ * The one helper that is a form control rather than a page-header
2726
+ * control, so it is the only one with a text field beside its trigger
2727
+ * and a dialog rather than a listbox. The field itself needs no rules
2728
+ * here: `.date-time-picker-input` already matches the generic
2729
+ * [class$="-input"] baseline further up.
2730
+ * -------------------------------------------------------------------- */
2731
+
2732
+ :where(.date-time-picker-field) {
2733
+ display: flex;
2734
+ align-items: center;
2735
+ gap: var(--lily-space-xs);
2736
+ }
2737
+
2738
+ :where(.date-time-picker-dialog) {
2739
+ position: absolute;
2740
+ z-index: 10;
2741
+ inset-inline-start: 0;
2742
+ margin-block-start: var(--lily-space-xs);
2743
+ padding: var(--lily-space-sm);
2744
+ color: var(--lily-text);
2745
+ background-color: var(--lily-surface);
2746
+ border: var(--border) solid var(--lily-border-strong);
2747
+ border-radius: var(--lily-radius-md);
2748
+ box-shadow: var(--lily-shadow-md);
2749
+ }
2750
+
2751
+ /* Explicit, because the rule above would otherwise beat the UA
2752
+ stylesheet's [hidden] { display: none } — the same trap the
2753
+ listbox popups have to step around. */
2754
+ :where(.date-time-picker-dialog)[hidden] {
2755
+ display: none;
2756
+ }
2757
+
2758
+ :where(.date-time-picker-header) {
2759
+ display: flex;
2760
+ align-items: center;
2761
+ justify-content: space-between;
2762
+ gap: var(--lily-space-xs);
2763
+ margin-block-end: var(--lily-space-xs);
2764
+ }
2765
+
2766
+ /* The month/year heading is a live region, so it must keep its box
2767
+ even while empty — never display:none it. */
2768
+ :where(.date-time-picker-period) {
2769
+ flex: 1;
2770
+ font-weight: 600;
2771
+ text-align: center;
2772
+ }
2773
+
2774
+ /* The four navigation buttons and the footer/shortcut buttons do not
2775
+ end in `-button`, so the generic button family never reaches them. */
2776
+ :where(
2777
+ .date-time-picker-previous-year,
2778
+ .date-time-picker-previous-month,
2779
+ .date-time-picker-previous-week,
2780
+ .date-time-picker-previous-day,
2781
+ .date-time-picker-next-day,
2782
+ .date-time-picker-next-week,
2783
+ .date-time-picker-next-month,
2784
+ .date-time-picker-next-year,
2785
+ .date-time-picker-shortcut,
2786
+ .date-time-picker-clear,
2787
+ .date-time-picker-cancel,
2788
+ .date-time-picker-confirm
2789
+ ) {
2790
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2791
+ font: inherit;
2792
+ color: var(--lily-text);
2793
+ background-color: var(--lily-surface);
2794
+ border: var(--border) solid var(--lily-border-strong);
2795
+ border-radius: var(--lily-radius-sm);
2796
+ cursor: pointer;
2797
+ }
2798
+
2799
+ :where(
2800
+ .date-time-picker-previous-year:hover,
2801
+ .date-time-picker-previous-month:hover,
2802
+ .date-time-picker-previous-week:hover,
2803
+ .date-time-picker-previous-day:hover,
2804
+ .date-time-picker-next-day:hover,
2805
+ .date-time-picker-next-week:hover,
2806
+ .date-time-picker-next-month:hover,
2807
+ .date-time-picker-next-year:hover,
2808
+ .date-time-picker-shortcut:hover,
2809
+ .date-time-picker-clear:hover,
2810
+ .date-time-picker-cancel:hover,
2811
+ .date-time-picker-confirm:hover
2812
+ ) {
2813
+ background-color: var(--lily-surface-alt);
2814
+ }
2815
+
2816
+ /* The commit action is the primary one on the dialog. */
2817
+ :where(.date-time-picker-confirm) {
2818
+ color: var(--color-primary-content);
2819
+ background-color: var(--color-primary);
2820
+ border-color: var(--color-primary);
2821
+ }
2822
+
2823
+ :where(.date-time-picker-calendar) {
2824
+ border-collapse: collapse;
2825
+ table-layout: fixed;
2826
+ }
2827
+
2828
+ :where(.date-time-picker-weekday, .date-time-picker-week-heading) {
2829
+ padding: var(--lily-space-xs);
2830
+ font-size: 0.8125em;
2831
+ font-weight: 600;
2832
+ color: var(--lily-text-muted);
2833
+ }
2834
+
2835
+ /* Week numbers are reference data, not navigation: muted, and set in
2836
+ tabular figures so the column does not shimmer as months change. */
2837
+ :where(.date-time-picker-week) {
2838
+ padding-inline-end: var(--lily-space-xs);
2839
+ font-size: 0.8125em;
2840
+ font-weight: 400;
2841
+ font-variant-numeric: tabular-nums;
2842
+ color: var(--lily-text-muted);
2843
+ text-align: end;
2844
+ }
2845
+
2846
+ :where(.date-time-picker-day) {
2847
+ display: flex;
2848
+ align-items: center;
2849
+ justify-content: center;
2850
+ /* 2rem is a compromise: WCAG 2.5.8 (AA) wants 24px, 2.5.5 (AAA)
2851
+ wants 44px, and seven 44px columns do not fit a 320px viewport
2852
+ alongside dialog chrome. Consumers targeting AAA should enlarge
2853
+ these and let the dialog go full-width on small screens. */
2854
+ min-width: 2rem;
2855
+ min-height: 2rem;
2856
+ padding: 0;
2857
+ font: inherit;
2858
+ font-variant-numeric: tabular-nums;
2859
+ color: var(--lily-text);
2860
+ background: none;
2861
+ border: var(--border) solid transparent;
2862
+ border-radius: var(--lily-radius-sm);
2863
+ cursor: pointer;
2864
+ }
2865
+
2866
+ :where(.date-time-picker-day:hover:not([data-disabled])) {
2867
+ background-color: var(--lily-surface-alt);
2868
+ }
2869
+
2870
+ /* Adjacent-month days stay legible rather than being hidden: they are
2871
+ real, selectable dates, and blanking them makes the grid harder to
2872
+ scan across a month boundary. */
2873
+ :where(.date-time-picker-day[data-outside]) {
2874
+ color: var(--lily-text-muted);
2875
+ }
2876
+
2877
+ /* Today is marked with a border, the selection with a fill. Two
2878
+ different channels, so a day that is both still reads as both. */
2879
+ :where(.date-time-picker-day[data-today]) {
2880
+ border-color: var(--lily-border-strong);
2881
+ font-weight: 600;
2882
+ }
2883
+
2884
+ :where(.date-time-picker-day[data-selected]) {
2885
+ color: var(--color-primary-content);
2886
+ background-color: var(--color-primary);
2887
+ border-color: var(--color-primary);
2888
+ }
2889
+
2890
+ :where(.date-time-picker-day[data-disabled]) {
2891
+ color: var(--lily-text-muted);
2892
+ cursor: not-allowed;
2893
+ /* Struck through as well as dimmed: "unavailable" must not rest on
2894
+ contrast alone (WCAG 1.4.1). */
2895
+ text-decoration: line-through;
2896
+ }
2897
+
2898
+ :where(.date-time-picker-time) {
2899
+ display: flex;
2900
+ flex-wrap: wrap;
2901
+ align-items: center;
2902
+ gap: var(--lily-space-xs);
2903
+ margin-block-start: var(--lily-space-sm);
2904
+ }
2905
+
2906
+ :where(.date-time-picker-time-label) {
2907
+ font-size: 0.8125em;
2908
+ color: var(--lily-text-muted);
2909
+ }
2910
+
2911
+ :where(.date-time-picker-time-zone) {
2912
+ display: flex;
2913
+ flex-wrap: wrap;
2914
+ align-items: center;
2915
+ gap: var(--lily-space-xs);
2916
+ margin-block-end: var(--lily-space-sm);
2917
+ }
2918
+
2919
+ :where(.date-time-picker-time-zone-label) {
2920
+ font-size: 0.8125em;
2921
+ color: var(--lily-text-muted);
2922
+ }
2923
+
2924
+ :where(
2925
+ .date-time-picker-hour,
2926
+ .date-time-picker-minute,
2927
+ .date-time-picker-meridiem,
2928
+ .date-time-picker-time-zone-select
2929
+ ) {
2930
+ padding: var(--lily-space-xs);
2931
+ font: inherit;
2932
+ color: var(--lily-text);
2933
+ background-color: var(--lily-surface);
2934
+ border: var(--border) solid var(--lily-border-strong);
2935
+ border-radius: var(--lily-radius-sm);
2936
+ }
2937
+
2938
+ :where(.date-time-picker-shortcuts) {
2939
+ display: flex;
2940
+ flex-wrap: wrap;
2941
+ gap: var(--lily-space-xs);
2942
+ margin-block-start: var(--lily-space-sm);
2943
+ }
2944
+
2945
+ :where(.date-time-picker-footer) {
2946
+ display: flex;
2947
+ justify-content: flex-end;
2948
+ gap: var(--lily-space-xs);
2949
+ margin-block-start: var(--lily-space-sm);
2950
+ }
2951
+
2952
+ /* Combobox / listbox / autosuggest — non-native variant of <select>. */
2953
+ :where(.combobox, .listbox, .autosuggest) {
2954
+ background-color: var(--lily-surface);
2955
+ border: var(--border) solid var(--lily-border-strong);
2956
+ border-radius: var(--lily-radius-md);
2957
+ }
2958
+
2959
+ /* ==========================================================================
2960
+ * Editorial typography
2961
+ * --------------------------------------------------------------------------
2962
+ * Headlines, body text, byline, blockquote, code — the long-form reading
2963
+ * primitives. Headlines use clamp() so they shrink on narrow viewports
2964
+ * without media queries.
2965
+ * ====================================================================== */
2966
+
2967
+ :where(.headline, .hero-headline, .section-heading) {
2968
+ color: var(--lily-text);
2969
+ font-family: var(--lily-font-body);
2970
+ font-weight: 700;
2971
+ line-height: 1.15;
2972
+ margin: 0 0 0.5rem 0;
2973
+ }
2974
+ :where(.headline) {
2975
+ font-size: clamp(1.5rem, 3vw, 2.25rem);
2976
+ }
2977
+ :where(.hero-headline) {
2978
+ font-size: clamp(2rem, 5vw, 3.5rem);
2979
+ }
2980
+ :where(.section-heading) {
2981
+ font-size: clamp(1.25rem, 2vw, 1.75rem);
2982
+ }
2983
+ /* Body text — 1.6 line-height (sweet spot for reading). */
2984
+ :where(.body-text) {
2985
+ line-height: 1.6;
2986
+ color: var(--lily-text);
2987
+ }
2988
+ /* Byline — author / date line under a headline. */
2989
+ :where(.byline) {
2990
+ color: var(--lily-text-muted);
2991
+ font-size: 0.875rem;
2992
+ }
2993
+ /* Blockquote — primary-coloured rail + italic body. */
2994
+ :where(.blockquote) {
2995
+ margin: 1rem 0;
2996
+ padding: 0.5rem 1rem;
2997
+ border-inline-start: 0.25rem solid var(--color-primary);
2998
+ color: var(--lily-text);
2999
+ font-style: italic;
3000
+ }
3001
+ /* End-notes / related content — top-bordered section at the foot. */
3002
+ :where(.end-notes, .related-content) {
3003
+ margin-top: 2rem;
3004
+ padding-top: 1rem;
3005
+ border-top: var(--border) solid var(--lily-border);
3006
+ }
3007
+ /* Caption / footnote / citation — small muted text. */
3008
+ :where(.caption, .footnote, .citation) {
3009
+ font-size: 0.875rem;
3010
+ color: var(--lily-text-muted);
3011
+ }
3012
+ /* KBD — keyboard key glyph; thicker bottom border simulates the keytop. */
3013
+ :where(.kbd) {
3014
+ display: inline-block;
3015
+ padding: 0.125rem 0.4rem;
3016
+ font-family: var(--lily-font-mono);
3017
+ font-size: 0.85em;
3018
+ background-color: var(--lily-surface-alt);
3019
+ border: var(--border) solid var(--lily-border-strong);
3020
+ border-bottom-width: 2px;
3021
+ border-radius: var(--lily-radius-sm);
3022
+ }
3023
+ /* Inline code — slight background tint + monospaced font. */
3024
+ :where(.code) {
3025
+ font-family: var(--lily-font-mono);
3026
+ padding: 0.1em 0.3em;
3027
+ background-color: var(--lily-surface-alt);
3028
+ border-radius: var(--lily-radius-sm);
3029
+ font-size: 0.9em;
3030
+ }
3031
+ /* Code block — full-width block with horizontal scroll. */
3032
+ :where(.code-block) {
3033
+ display: block;
3034
+ padding: 1rem;
3035
+ background-color: var(--color-neutral);
3036
+ color: var(--color-neutral-content);
3037
+ font-family: var(--lily-font-mono);
3038
+ border-radius: var(--lily-radius-md);
3039
+ overflow-x: auto;
3040
+ white-space: pre;
3041
+ }
3042
+ /* Inset text — left-railed callout for "Important" content
3043
+ (GOV.UK / NHS pattern). */
3044
+ :where(.inset-text) {
3045
+ padding: 0.75rem 1rem;
3046
+ border-inline-start: 0.25rem solid var(--color-primary);
3047
+ background-color: var(--lily-surface-alt);
3048
+ }
3049
+ /* Generic character — monospaced single-glyph display. */
3050
+ :where(.character) {
3051
+ font-family: var(--lily-font-mono);
3052
+ }
3053
+ /* Clamp-text — truncate to N lines (controlled by --lily-clamp-lines). */
3054
+ :where(.clamp-text) {
3055
+ display: -webkit-box;
3056
+ -webkit-line-clamp: var(--lily-clamp-lines, 3);
3057
+ line-clamp: var(--lily-clamp-lines, 3);
3058
+ -webkit-box-orient: vertical;
3059
+ overflow: hidden;
3060
+ }
3061
+ /* Screen-reader-only — visually hidden but available to AT. The
3062
+ classic clip-rect pattern (works in every screen reader). */
3063
+ :where(.screen-reader-span) {
3064
+ position: absolute;
3065
+ width: 1px;
3066
+ height: 1px;
3067
+ padding: 0;
3068
+ margin: -1px;
3069
+ overflow: hidden;
3070
+ clip: rect(0, 0, 0, 0);
3071
+ white-space: nowrap;
3072
+ border: 0;
3073
+ }
3074
+
3075
+ /* ==========================================================================
3076
+ * Hero, figure, photo, media
3077
+ * ====================================================================== */
3078
+
3079
+ /* Hero block — primary-filled banner with centred content. clamp() pad
3080
+ scales vertically across viewport sizes. */
3081
+ :where(.hero) {
3082
+ display: block;
3083
+ padding: clamp(2rem, 5vw, 4rem) 1rem;
3084
+ background-color: var(--color-primary);
3085
+ color: var(--color-primary-content);
3086
+ border-radius: var(--lily-radius-lg);
3087
+ text-align: center;
3088
+ }
3089
+ /* Figure — centred block with vertical margin. */
3090
+ :where(.figure) {
3091
+ margin: 1rem 0;
3092
+ text-align: center;
3093
+ }
3094
+ /* Feature photo — responsive lead image. */
3095
+ :where(.feature-photo) {
3096
+ display: block;
3097
+ width: 100%;
3098
+ height: auto;
3099
+ border-radius: var(--lily-radius-md);
3100
+ }
3101
+ /* Photo pack — responsive grid of thumbnails. */
3102
+ :where(.photo-pack) {
3103
+ display: grid;
3104
+ grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
3105
+ gap: 0.5rem;
3106
+ }
3107
+ /* Generic image — responsive block image. */
3108
+ :where(.image) {
3109
+ max-width: 100%;
3110
+ height: auto;
3111
+ display: block;
3112
+ }
3113
+ /* QR / barcode / signature — frame them as a labelled tile. */
3114
+ :where(.qr-code-image, .barcode-image, .signature-pad) {
3115
+ display: inline-block;
3116
+ background-color: var(--lily-surface);
3117
+ border: var(--border) solid var(--lily-border);
3118
+ border-radius: var(--lily-radius-md);
3119
+ padding: 0.5rem;
3120
+ }
3121
+ /* Signature pad — drawable surface; crosshair cursor signals input. */
3122
+ :where(.signature-pad) {
3123
+ min-height: 8rem;
3124
+ cursor: crosshair;
3125
+ }
3126
+ /* Video player — responsive black-letterboxed frame. */
3127
+ :where(.video-player) {
3128
+ display: block;
3129
+ width: 100%;
3130
+ max-width: 100%;
3131
+ border-radius: var(--lily-radius-md);
3132
+ /* Video chrome is black in every theme; pair the text colour with
3133
+ it here rather than inheriting the theme's (possibly dark)
3134
+ content colour onto a black surface. */
3135
+ background-color: black;
3136
+ color: white;
3137
+ }
3138
+
3139
+ /* ==========================================================================
3140
+ * Mockups & pictograms
3141
+ * --------------------------------------------------------------------------
3142
+ * Device frames for screenshots / illustrations — browser, phone, tablet,
3143
+ * laptop, watch, shell window. All share the same rounded-outline frame
3144
+ * baseline; specific frames override the radius / border-width.
3145
+ * ====================================================================== */
3146
+
3147
+ :where(
3148
+ .mockup-browser,
3149
+ .mockup-window,
3150
+ .mockup-shell,
3151
+ .mockup-phone-portrait,
3152
+ .mockup-phone-landscape,
3153
+ .mockup-tablet-portrait,
3154
+ .mockup-tablet-landscape,
3155
+ .mockup-laptop,
3156
+ .mockup-watch
3157
+ ) {
3158
+ display: block;
3159
+ background-color: var(--lily-surface);
3160
+ border: 2px solid var(--color-neutral);
3161
+ border-radius: var(--lily-radius-lg);
3162
+ overflow: hidden;
3163
+ box-shadow: var(--lily-shadow-md);
3164
+ }
3165
+ /* Mockup shell — terminal window; dark neutral fill + mono font. */
3166
+ :where(.mockup-shell) {
3167
+ background-color: var(--color-neutral);
3168
+ color: var(--color-neutral-content);
3169
+ font-family: var(--lily-font-mono);
3170
+ padding: 1rem;
3171
+ }
3172
+ /* Phones — heavier bezel (6px) and more rounded corners. */
3173
+ :where(.mockup-phone-portrait, .mockup-phone-landscape) {
3174
+ border-radius: 1.5rem;
3175
+ border-width: 6px;
3176
+ }
3177
+ /* Smartwatch — chunky bezel (4px) and pill radius. */
3178
+ :where(.mockup-watch) {
3179
+ border-radius: 1rem;
3180
+ border-width: 4px;
3181
+ }
3182
+ /* Pictogram — stacked icon + caption, centred. */
3183
+ :where(.pictogram) {
3184
+ display: inline-flex;
3185
+ flex-direction: column;
3186
+ align-items: center;
3187
+ gap: 0.5rem;
3188
+ padding: 1rem;
3189
+ text-align: center;
3190
+ }
3191
+
3192
+ /* ==========================================================================
3193
+ * Charts (containers only — content supplied by consumer)
3194
+ * --------------------------------------------------------------------------
3195
+ * Headless: Lily provides the frame + a 6-colour palette as custom
3196
+ * properties. The consumer's chart library (D3, Chart.js, ECharts, etc.)
3197
+ * reads `var(--lily-chart-color-1..6)` for its series colours.
3198
+ * ====================================================================== */
3199
+
3200
+ :where(
3201
+ .area-chart,
3202
+ .bar-chart,
3203
+ .column-chart,
3204
+ .line-chart,
3205
+ .scatter-chart,
3206
+ .sparkline,
3207
+ .tile-map,
3208
+ .graphic-block
3209
+ ) {
3210
+ display: block;
3211
+ background-color: var(--lily-surface);
3212
+ border-radius: var(--lily-radius-md);
3213
+ padding: 1rem;
3214
+ color: var(--lily-text);
3215
+ /* Six-colour palette — the consumer's chart library picks these up. */
3216
+ --lily-chart-color-1: var(--color-primary);
3217
+ --lily-chart-color-2: var(--color-secondary);
3218
+ --lily-chart-color-3: var(--color-accent);
3219
+ --lily-chart-color-4: var(--color-info);
3220
+ --lily-chart-color-5: var(--color-success);
3221
+ --lily-chart-color-6: var(--color-warning);
3222
+ }
3223
+ /* Sparkline — small inline chart; no padding. */
3224
+ :where(.sparkline) {
3225
+ padding: 0;
3226
+ height: 1.5rem;
3227
+ width: 6rem;
3228
+ display: inline-block;
3229
+ }
3230
+ /* Graphic block — bordered chart container. */
3231
+ :where(.graphic-block) {
3232
+ border: var(--border) solid var(--lily-border);
3233
+ }
3234
+
3235
+ /* ==========================================================================
3236
+ * Scrolling, splits, resize
3237
+ * ====================================================================== */
3238
+
3239
+ /* Scroll area — capped at 20rem, auto-overflow. */
3240
+ :where(.scroll-area) {
3241
+ overflow: auto;
3242
+ max-height: 20rem;
3243
+ }
3244
+ /* Horizontal scroller — flex row that overflows on x. */
3245
+ :where(.horizontal-scroller) {
3246
+ overflow-x: auto;
3247
+ display: flex;
3248
+ gap: 0.5rem;
3249
+ }
3250
+ /* Scroller (Reuters-pattern scrollytelling) — positioning anchor. */
3251
+ :where(.scroller, .scroller-base, .scroller-video) {
3252
+ position: relative;
3253
+ display: block;
3254
+ }
3255
+ /* Custom scrollbar track. */
3256
+ :where(.scroll-bar) {
3257
+ background-color: var(--lily-surface-sunken);
3258
+ border-radius: 999px;
3259
+ height: 0.5rem;
3260
+ }
3261
+ /* Affix — stick to the top of the viewport on scroll. */
3262
+ :where(.affix) {
3263
+ position: sticky;
3264
+ inset-block-start: 0;
3265
+ }
3266
+ /* Visible — IntersectionObserver target; baseline is a visible block. */
3267
+ :where(.visible) {
3268
+ display: block;
3269
+ }
3270
+ /* Resizable — native CSS resize handle (corner). */
3271
+ :where(.resizable) {
3272
+ resize: both;
3273
+ overflow: auto;
3274
+ }
3275
+ /* Split-view + splitter — two-pane horizontal layout. */
3276
+ :where(.split-view) {
3277
+ display: flex;
3278
+ align-items: stretch;
3279
+ gap: 0;
3280
+ }
3281
+ :where(.splitter) {
3282
+ flex: 0 0 0.375rem;
3283
+ background-color: var(--lily-border);
3284
+ cursor: col-resize;
3285
+ }
3286
+
3287
+ /* ==========================================================================
3288
+ * Misc unique components
3289
+ * ====================================================================== */
3290
+
3291
+ /* Statistic — stacked label + value; value is large and primary-coloured. */
3292
+ :where(.statistic) {
3293
+ display: inline-flex;
3294
+ flex-direction: column;
3295
+ gap: 0.25rem;
3296
+ }
3297
+ :where(.statistic > [data-part="value"]) {
3298
+ font-size: 1.5rem;
3299
+ font-weight: 700;
3300
+ color: var(--color-primary);
3301
+ }
3302
+ /* Watermark — diagonal repeating-line pattern at 8% opacity behind content. */
3303
+ :where(.watermark) {
3304
+ position: absolute;
3305
+ inset: 0;
3306
+ pointer-events: none;
3307
+ opacity: 0.08;
3308
+ background: repeating-linear-gradient(
3309
+ -45deg,
3310
+ var(--lily-text) 0 1px,
3311
+ transparent 1px 8rem
3312
+ );
3313
+ }
3314
+ /* Beach ball (macOS "waiting" indicator) — six-colour conic wheel. */
3315
+ :where(.beach-ball) {
3316
+ display: inline-block;
3317
+ width: 2rem;
3318
+ height: 2rem;
3319
+ border-radius: 50%;
3320
+ background: conic-gradient(
3321
+ var(--color-error),
3322
+ var(--color-warning),
3323
+ var(--color-success),
3324
+ var(--color-info),
3325
+ var(--color-primary),
3326
+ var(--color-error)
3327
+ );
3328
+ animation: lily-spin 2s linear infinite;
3329
+ }
3330
+ /* Diff — side-by-side two-column comparison. */
3331
+ :where(.diff) {
3332
+ display: grid;
3333
+ grid-template-columns: 1fr 1fr;
3334
+ gap: 0.5rem;
3335
+ }
3336
+ /* Addressograph box — paper-form ID label (NHS / hospital pattern). */
3337
+ :where(.addressograph-box) {
3338
+ display: block;
3339
+ padding: 0.75rem 1rem;
3340
+ background-color: var(--lily-surface-alt);
3341
+ border: 2px solid var(--lily-text);
3342
+ font-family: var(--lily-font-mono);
3343
+ line-height: 1.4;
3344
+ }
3345
+ /* Government identifier — dark chrome bar containing an ID number. */
3346
+ :where(.government-identifier) {
3347
+ display: flex;
3348
+ align-items: center;
3349
+ gap: 0.75rem;
3350
+ padding: 0.75rem 1rem;
3351
+ background-color: var(--color-neutral);
3352
+ color: var(--color-neutral-content);
3353
+ }
3354
+ /* Share / signup / CTA panels — alt-surface promo blocks. */
3355
+ :where(.share-page, .newsletter-signup, .call-to-action) {
3356
+ padding: 1rem;
3357
+ background-color: var(--lily-surface-alt);
3358
+ border-radius: var(--lily-radius-md);
3359
+ }
3360
+ /* CTA — override with primary fill so it reads as the page action. */
3361
+ :where(.call-to-action) {
3362
+ background-color: var(--color-primary);
3363
+ color: var(--color-primary-content);
3364
+ }
3365
+ /* Links inside the call-to-action inherit its content colour —
3366
+ otherwise the UA default link blue lands on the primary fill. */
3367
+ :where(.call-to-action) :where(a) {
3368
+ color: inherit;
3369
+ }
3370
+ /* Expander / collapsible / details — boxed disclosure controls. */
3371
+ :where(.expander, .collapsible, .details) {
3372
+ display: block;
3373
+ border: var(--border) solid var(--lily-border);
3374
+ border-radius: var(--lily-radius-md);
3375
+ padding: 0.5rem 1rem;
3376
+ }
3377
+ :where(.details > summary, .expander > summary, .collapsible > summary) {
3378
+ cursor: pointer;
3379
+ font-weight: 600;
3380
+ padding: 0.25rem 0;
3381
+ }
3382
+ /* Carousel — horizontal scroller with snap-points so each slide locks
3383
+ into view as the user swipes. */
3384
+ :where(.carousel) {
3385
+ display: flex;
3386
+ overflow-x: auto;
3387
+ scroll-snap-type: x mandatory;
3388
+ gap: 0.5rem;
3389
+ }
3390
+ :where(.carousel > *) {
3391
+ scroll-snap-align: start;
3392
+ flex: 0 0 auto;
3393
+ }
3394
+
3395
+ /* --- Semantic entities — neutral display blocks. ----------------------- */
3396
+ :where(
3397
+ .person,
3398
+ .organization,
3399
+ .place,
3400
+ .event,
3401
+ .comment,
3402
+ .question,
3403
+ .answer
3404
+ ) {
3405
+ display: block;
3406
+ padding: 0.75rem 0;
3407
+ }
3408
+ /* Draft wrapper — dashed border + optional "Draft" pill prefix. */
3409
+ :where(.draft) {
3410
+ border: 1px dashed var(--lily-border-strong);
3411
+ background-color: var(--lily-surface-alt);
3412
+ padding: 1rem;
3413
+ border-radius: var(--lily-radius-md);
3414
+ }
3415
+ :where(.draft[data-status="draft"])::before {
3416
+ content: "Draft";
3417
+ display: inline-block;
3418
+ margin-inline-end: 0.5rem;
3419
+ padding: 0.125rem 0.5rem;
3420
+ background-color: var(--color-warning);
3421
+ color: var(--color-warning-content);
3422
+ border-radius: 999px;
3423
+ font-size: 0.75rem;
3424
+ font-weight: 600;
3425
+ }
3426
+
3427
+ /* Dial — circular gauge driven by --dial-value (0–100). */
3428
+ :where(.dial) {
3429
+ display: inline-block;
3430
+ width: 4rem;
3431
+ height: 4rem;
3432
+ border-radius: 50%;
3433
+ background: conic-gradient(
3434
+ var(--color-primary) calc(var(--dial-value, 0) * 1%),
3435
+ var(--lily-surface-sunken) 0
3436
+ );
3437
+ }
3438
+
3439
+ /* File upload — drop-zone aesthetic: dashed border, alt surface. */
3440
+ :where(.file-upload) {
3441
+ display: block;
3442
+ padding: 1.5rem;
3443
+ background-color: var(--lily-surface-alt);
3444
+ border: 2px dashed var(--lily-border-strong);
3445
+ border-radius: var(--lily-radius-md);
3446
+ text-align: center;
3447
+ cursor: pointer;
3448
+ }
3449
+ /* File manager — surface-coloured frame holding a file list. */
3450
+ :where(.file-manager) {
3451
+ display: block;
3452
+ background-color: var(--lily-surface);
3453
+ border: var(--border) solid var(--lily-border);
3454
+ border-radius: var(--lily-radius-md);
3455
+ padding: 0.5rem;
3456
+ }
3457
+ /* Transfer list — two columns + central button stack. */
3458
+ :where(.transfer-list) {
3459
+ display: grid;
3460
+ grid-template-columns: 1fr auto 1fr;
3461
+ gap: 0.5rem;
3462
+ align-items: center;
3463
+ }
3464
+
3465
+ /* Tour — onboarding card with medium elevation. */
3466
+ :where(.tour) {
3467
+ display: block;
3468
+ background-color: var(--lily-surface);
3469
+ border: var(--border) solid var(--lily-border);
3470
+ border-radius: var(--lily-radius-lg);
3471
+ padding: 1rem;
3472
+ box-shadow: var(--lily-shadow-md);
3473
+ }
3474
+
3475
+ /* Editable text — dashed underline indicates click-to-edit. */
3476
+ :where(.editable) {
3477
+ display: inline-block;
3478
+ padding: 0.125rem 0.25rem;
3479
+ border-bottom: 1px dashed var(--lily-border-strong);
3480
+ cursor: text;
3481
+ }
3482
+ /* Editing state — alt surface + primary underline. */
3483
+ :where(.editable[aria-expanded="true"]) {
3484
+ background-color: var(--lily-surface-alt);
3485
+ border-bottom-color: var(--color-primary);
3486
+ }
3487
+
3488
+ /* Accordion-checkbox — a checkbox that toggles a panel via sibling
3489
+ combinator (no JS needed). */
3490
+ :where(.accordion-checkbox) {
3491
+ display: block;
3492
+ border: var(--border) solid var(--lily-border);
3493
+ border-radius: var(--lily-radius-md);
3494
+ padding: 0.5rem 0.75rem;
3495
+ }
3496
+ :where(.accordion-checkbox-input) {
3497
+ margin-inline-end: 0.5rem;
3498
+ }
3499
+ :where(.accordion-checkbox-panel) {
3500
+ display: none;
3501
+ padding-block-start: 0.5rem;
3502
+ }
3503
+ /* Reveal the panel when the input is checked. */
3504
+ :where(.accordion-checkbox-input:checked ~ .accordion-checkbox-panel) {
3505
+ display: block;
3506
+ }
3507
+
3508
+ /* Icon — 1em square container; sizes with surrounding text. */
3509
+ :where(.icon) {
3510
+ display: inline-flex;
3511
+ align-items: center;
3512
+ justify-content: center;
3513
+ width: 1em;
3514
+ height: 1em;
3515
+ flex: 0 0 auto;
3516
+ }
3517
+
3518
+ /* Emoji — inline glyph; not italicised. */
3519
+ :where(.emoji) {
3520
+ display: inline-block;
3521
+ font-style: normal;
3522
+ }
3523
+
3524
+ /* Slider — primary-filled track based on --slider-value (0–100). */
3525
+ :where(.slider) {
3526
+ display: block;
3527
+ width: 100%;
3528
+ height: 1.5rem;
3529
+ background: linear-gradient(
3530
+ to right,
3531
+ var(--color-primary) calc(var(--slider-value, 50) * 1%),
3532
+ var(--lily-surface-sunken) 0
3533
+ );
3534
+ border-radius: 999px;
3535
+ }
3536
+
3537
+ /* Timer — fixed-width digits so the display doesn't jiggle as it ticks. */
3538
+ :where(.timer) {
3539
+ display: inline-block;
3540
+ font-family: var(--lily-font-mono);
3541
+ font-variant-numeric: tabular-nums;
3542
+ font-weight: 600;
3543
+ }
3544
+
3545
+ /* Medical banner inner boxes — spacing-only override. */
3546
+ :where(.medical-banner-box-for-advice, .medical-banner-box-for-danger) {
3547
+ padding: 0.75rem 1rem;
3548
+ border-radius: var(--lily-radius-md);
3549
+ margin: 0.25rem 0;
3550
+ }
3551
+
3552
+ /* ==========================================================================
3553
+ * Print
3554
+ * --------------------------------------------------------------------------
3555
+ * On paper, transient/floating chrome (skip-link, FAB, toast, tooltip)
3556
+ * is meaningless — hide it. Card-like surfaces drop their drop-shadow
3557
+ * and shift to a high-contrast outline so they're readable in monochrome.
3558
+ * ====================================================================== */
3559
+ @media print {
3560
+ :where(
3561
+ .skip-link,
3562
+ .float-button,
3563
+ .toast,
3564
+ .sonner,
3565
+ .tooltip,
3566
+ .coachmark
3567
+ ) {
3568
+ display: none !important;
3569
+ }
3570
+ :where(.card, .panel, .dialog, .alert) {
3571
+ box-shadow: none;
3572
+ border-color: var(--lily-text);
3573
+ }
3574
+ }
3575
+ }
3576
+
3577
+ /* ============================================================================
3578
+ * WCAG 2.2 target-size (minimum) floor — 2.5.8
3579
+ *
3580
+ * Every interactive Lily hook offers a >=24x24 CSS-pixel target. Links
3581
+ * that render as short inline text (a pagination "1", a breadcrumb crumb)
3582
+ * fail the 24px floor under typographic sizing alone, so the link-shaped
3583
+ * hooks become inline-block with a minimum box. :where() keeps specificity
3584
+ * at zero, so any consumer rule still wins. Shared verbatim by all themes.
3585
+ * ========================================================================= */
3586
+
3587
+ :where(.action-link,
3588
+ .back-link,
3589
+ .breadcrumb-list-item > a,
3590
+ .pagination-list-item > a,
3591
+ .contents-list-item > a,
3592
+ .section-list-item > a) {
3593
+ display: inline-block;
3594
+ min-inline-size: 24px;
3595
+ min-block-size: 24px;
3596
+ }
3597
+
3598
+ :where(.pagination-list-item > a) {
3599
+ text-align: center;
3600
+ }
3601
+
3602
+ :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
3603
+ min-block-size: 24px;
3604
+ }
3605
+
3606
+ /* ============================================================================
3607
+ * Overflow guards — narrow-viewport safety, shared verbatim by all themes.
3608
+ *
3609
+ * Content that is intrinsically wider than the viewport scrolls or wraps
3610
+ * within its own box instead of pushing the page wider. Deliberately NOT
3611
+ * `display: block` on <table> — that strips implicit table semantics for
3612
+ * assistive technology; capping width and letting cell content wrap keeps
3613
+ * both the layout and the roles. Proven in the example apps' own
3614
+ * stylesheets before the theme layer took over component styling.
3615
+ * ========================================================================= */
3616
+
3617
+ :where(pre) {
3618
+ max-width: 100%;
3619
+ overflow-x: auto;
3620
+ }
3621
+
3622
+ :where(table) {
3623
+ max-width: 100%;
3624
+ }
3625
+
3626
+ :where(th, td) {
3627
+ overflow-wrap: anywhere;
3628
+ }
3629
+
3630
+ :where(a, code) {
3631
+ overflow-wrap: anywhere;
3632
+ }