@lilydesignsystem/themes 0.4.0 → 0.6.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 +360 -9
  2. package/dist/acid.css +360 -9
  3. package/dist/adobe-spectrum.css +360 -9
  4. package/dist/ant-design.css +3961 -0
  5. package/dist/aqua.css +360 -9
  6. package/dist/atlassian.css +3961 -0
  7. package/dist/autumn.css +360 -9
  8. package/dist/black.css +360 -9
  9. package/dist/bumblebee.css +360 -9
  10. package/dist/business.css +360 -9
  11. package/dist/cappuccino.css +3961 -0
  12. package/dist/caramellatte.css +360 -9
  13. package/dist/cmyk.css +360 -9
  14. package/dist/coffee.css +360 -9
  15. package/dist/corporate.css +360 -9
  16. package/dist/cupcake.css +360 -9
  17. package/dist/cyberpunk.css +360 -9
  18. package/dist/dark.css +360 -9
  19. package/dist/dim.css +360 -9
  20. package/dist/dracula.css +360 -9
  21. package/dist/emerald.css +360 -9
  22. package/dist/excel.css +3961 -0
  23. package/dist/fantasy.css +360 -9
  24. package/dist/fluent.css +3961 -0
  25. package/dist/forest.css +360 -9
  26. package/dist/garden.css +360 -9
  27. package/dist/github-primer.css +3961 -0
  28. package/dist/halloween.css +360 -9
  29. package/dist/ibm-carbon.css +3961 -0
  30. package/dist/lemonade.css +360 -9
  31. package/dist/light.css +360 -9
  32. package/dist/linear.css +3961 -0
  33. package/dist/lofi.css +360 -9
  34. package/dist/luxury.css +360 -9
  35. package/dist/mozilla-protocol.css +360 -9
  36. package/dist/night.css +360 -9
  37. package/dist/nord.css +360 -9
  38. package/dist/notion.css +3961 -0
  39. package/dist/pastel.css +360 -9
  40. package/dist/retro.css +360 -9
  41. package/dist/salesforce.css +3961 -0
  42. package/dist/sap-fiori.css +3961 -0
  43. package/dist/silk.css +360 -9
  44. package/dist/sunset.css +360 -9
  45. package/dist/synthwave.css +360 -9
  46. package/dist/united-kingdom-government-digital-service.css +360 -9
  47. package/dist/united-kingdom-national-health-service-england-for-patients.css +360 -9
  48. package/dist/united-kingdom-national-health-service-england-for-practitioners.css +360 -9
  49. package/dist/united-kingdom-national-health-service-scotland-for-patients.css +360 -9
  50. package/dist/united-kingdom-national-health-service-scotland-for-practitioners.css +360 -9
  51. package/dist/united-kingdom-national-health-service-wales-for-patients.css +362 -11
  52. package/dist/united-kingdom-national-health-service-wales-for-practitioners.css +362 -11
  53. package/dist/united-states-web-design-system.css +360 -9
  54. package/dist/valentine.css +360 -9
  55. package/dist/vercel.css +3961 -0
  56. package/dist/winter.css +360 -9
  57. package/dist/wireframe.css +360 -9
  58. package/index.md +14 -10
  59. package/package.json +5 -4
@@ -0,0 +1,3961 @@
1
+ /* ============================================================================
2
+ * Lily theme: linear
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: Linear (https://linear.app/)
9
+ *
10
+ * Upstream tracked: Linear web app (2026) dark theme: near-black surfaces, indigo brand, quiet borders.
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="linear"]) {
20
+ color-scheme: dark;
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: #0f1011;
26
+ /* Secondary surface — section panels, card backgrounds,
27
+ sidebars, table-header fills. One step away from the page
28
+ surface. */
29
+ --color-base-200: #1a1b1e;
30
+ /* Tertiary surface — dividers, sunken wells, hover-row
31
+ backgrounds. The most muted of the three base shades. */
32
+ --color-base-300: #2a2b30;
33
+ /* Primary text colour. High-contrast against base-100 to meet
34
+ WCAG contrast ratios for body copy. */
35
+ --color-base-content: #f7f8f8;
36
+ /* Primary brand / action colour. Used on primary buttons,
37
+ active navigation items, selected states, and the focus
38
+ ring. */
39
+ --color-primary: #5d68d0;
40
+ /* Foreground colour used over `--color-primary` fills (so
41
+ primary buttons retain a guaranteed contrast ratio). */
42
+ --color-primary-content: #f7f8f8;
43
+ /* Secondary brand colour. Pressed/hover state for primary
44
+ buttons and visited links; also drives the secondary chrome
45
+ family. */
46
+ --color-secondary: #828fff;
47
+ /* Foreground colour used over `--color-secondary` fills. */
48
+ --color-secondary-content: #0f1011;
49
+ /* Accent colour — used sparingly for emphasis, the AI label,
50
+ illustrations, and tertiary call-outs. */
51
+ --color-accent: #26b5ce;
52
+ /* Foreground colour used over `--color-accent` fills. */
53
+ --color-accent-content: #0f1011;
54
+ /* Neutral chrome surface — footer bars, code blocks,
55
+ tooltips, government-banner strips. Typically the theme's
56
+ darkest neutral. */
57
+ --color-neutral: #08090a;
58
+ /* Foreground colour used over `--color-neutral` fills. */
59
+ --color-neutral-content: #f7f8f8;
60
+ /* Informational status colour — informational banners, links,
61
+ 'did-you-know' callouts. */
62
+ --color-info: #4ea7fc;
63
+ /* Foreground colour used over `--color-info` fills. */
64
+ --color-info-content: #0f1011;
65
+ /* Success / confirmation colour — used on success panels,
66
+ completed step indicators, validation pass states, and the
67
+ green RAG status. */
68
+ --color-success: #4cb782;
69
+ /* Foreground colour used over `--color-success` fills. */
70
+ --color-success-content: #0f1011;
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: #f2994a;
75
+ /* Foreground colour used over `--color-warning` fills. Often
76
+ dark so text remains legible on a bright yellow background. */
77
+ --color-warning-content: #0f1011;
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: #eb5757;
82
+ /* Foreground colour used over `--color-error` fills. */
83
+ --color-error-content: #0f1011;
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.375rem;
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: 0;
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[data-current], .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 and bold, never filled, so a selected non-today date still
1130
+ reads as "selected". The ring takes the cell's own text colour (currentColor),
1131
+ so it holds its contrast on a light page, a dark page and a selected cell
1132
+ alike, and the bold number says it without colour. */
1133
+ :where(.calendar-table-td[aria-current="date"]) {
1134
+ outline: 2px solid currentColor;
1135
+ outline-offset: -3px;
1136
+ font-weight: 700;
1137
+ }
1138
+ /* Fit a phone: day cells shrink and wrap instead of forcing the grid wider. */
1139
+ :where(.calendar-table) {
1140
+ table-layout: fixed;
1141
+ }
1142
+ :where(.calendar-table-td, .calendar-table-th) {
1143
+ min-width: 0;
1144
+ overflow-wrap: anywhere;
1145
+ }
1146
+
1147
+ /* --- Data grid: toolbar, sorting, pagination, column visibility, pinned columns ----- */
1148
+ :where(.data-grid-toolbar) {
1149
+ display: flex;
1150
+ flex-wrap: wrap;
1151
+ gap: var(--lily-space-sm);
1152
+ align-items: center;
1153
+ margin-block-end: var(--lily-space-sm);
1154
+ }
1155
+ :where(.data-grid-search, .data-grid-search-field) {
1156
+ padding: var(--lily-space-xs) var(--lily-space-sm);
1157
+ border: var(--border) solid var(--lily-border);
1158
+ border-radius: var(--lily-radius-sm);
1159
+ background-color: var(--lily-surface);
1160
+ color: var(--lily-text);
1161
+ font: inherit;
1162
+ }
1163
+ /* A sortable header is a button that looks like its text; the arrow follows aria-sort,
1164
+ so the state is in the markup for assistive technology and on screen for everyone. */
1165
+ :where(.data-grid-sort-button) {
1166
+ padding: 0;
1167
+ border: 0;
1168
+ background: none;
1169
+ color: inherit;
1170
+ font: inherit;
1171
+ text-align: start;
1172
+ cursor: pointer;
1173
+ }
1174
+ :where(.data-grid-sort-button:focus-visible) {
1175
+ outline: 2px solid var(--color-accent);
1176
+ outline-offset: 2px;
1177
+ }
1178
+ :where([aria-sort="none"] .data-grid-sort-button)::after {
1179
+ content: " \21C5";
1180
+ opacity: 0.5;
1181
+ }
1182
+ :where([aria-sort="ascending"] .data-grid-sort-button)::after {
1183
+ content: " \25B2";
1184
+ }
1185
+ :where([aria-sort="descending"] .data-grid-sort-button)::after {
1186
+ content: " \25BC";
1187
+ }
1188
+ :where(.data-grid-pagination) {
1189
+ display: flex;
1190
+ flex-wrap: wrap;
1191
+ gap: var(--lily-space-sm);
1192
+ align-items: center;
1193
+ justify-content: flex-end;
1194
+ margin-block-start: var(--lily-space-sm);
1195
+ }
1196
+ :where(.data-grid-page-previous, .data-grid-page-next, .data-grid-export-button) {
1197
+ padding: var(--lily-space-xs) var(--lily-space-md);
1198
+ border: var(--border) solid var(--lily-border);
1199
+ border-radius: var(--lily-radius-sm);
1200
+ background-color: var(--lily-surface);
1201
+ color: var(--lily-text);
1202
+ font: inherit;
1203
+ cursor: pointer;
1204
+ }
1205
+ :where(.data-grid-page-previous:disabled, .data-grid-page-next:disabled, .data-grid-export-button:disabled) {
1206
+ opacity: 0.5;
1207
+ cursor: not-allowed;
1208
+ }
1209
+ :where(.data-grid-column-visibility) {
1210
+ display: flex;
1211
+ flex-wrap: wrap;
1212
+ gap: var(--lily-space-sm);
1213
+ margin: 0;
1214
+ padding: var(--lily-space-xs) var(--lily-space-sm);
1215
+ border: var(--border) solid var(--lily-border);
1216
+ border-radius: var(--lily-radius-sm);
1217
+ }
1218
+ /* Pinned columns stay put while the rest scroll; the offset is logical, so it flips in right-to-left. */
1219
+ :where([data-pinned="start"]) {
1220
+ position: sticky;
1221
+ inset-inline-start: 0;
1222
+ z-index: 1;
1223
+ background-color: var(--lily-surface);
1224
+ }
1225
+ :where([data-pinned="end"]) {
1226
+ position: sticky;
1227
+ inset-inline-end: 0;
1228
+ z-index: 1;
1229
+ background-color: var(--lily-surface);
1230
+ }
1231
+ :where(th[data-pinned]) {
1232
+ z-index: 2;
1233
+ }
1234
+ /* A missing value: dimmed, and the grid's emptyValue text (for example a dash) reads as absence. */
1235
+ :where(.data-table-td[data-empty]) {
1236
+ opacity: 0.7;
1237
+ }
1238
+
1239
+ /* --- Kanban specifics --------------------------------------------------- */
1240
+ /* Each column renders as a `<td>`; widen the cells so cards have room. */
1241
+ :where(.kanban-table) {
1242
+ display: table;
1243
+ }
1244
+ :where(.kanban-table-td) {
1245
+ vertical-align: top;
1246
+ background-color: var(--lily-surface);
1247
+ min-width: 14rem;
1248
+ }
1249
+
1250
+ /* Dragging a card: the column it would land in is outlined; one that refuses it
1251
+ (canMove, allowedColumns, a full strict WIP limit) is striped and shows the
1252
+ not-allowed cursor, so "you can't drop here" is visible before the drop. */
1253
+ :where(.kanban-table-td[data-drop-target]) {
1254
+ outline: 2px dashed var(--color-accent);
1255
+ outline-offset: -3px;
1256
+ }
1257
+ :where(.kanban-table-td[data-drop-blocked]) {
1258
+ outline: 2px solid var(--color-error);
1259
+ outline-offset: -3px;
1260
+ cursor: not-allowed;
1261
+ background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--color-error) 18%, transparent) 6px 8px);
1262
+ }
1263
+
1264
+ /* --- Gantt specifics ---------------------------------------------------- */
1265
+ /* Cells marked as bars are filled with the primary colour to render the
1266
+ schedule bar inline within the grid. */
1267
+ :where(.gantt-table-td[data-state="bar"]) {
1268
+ background-color: var(--color-primary);
1269
+ }
1270
+
1271
+ /* Weekend, holiday and time-off shading (Gantt chart and calendar). A weekend
1272
+ is tinted; a day marked as a holiday or time off (data-unavailable /
1273
+ data-range) is striped as well, so no day is told apart by colour alone;
1274
+ a column only partly unavailable gets a bar under its header. */
1275
+ :where(.gantt-table-th[data-weekend], .gantt-table-td[data-weekend], .calendar-table-th[data-weekend], .calendar-table-td[data-weekend]) {
1276
+ background-color: color-mix(in srgb, var(--lily-surface) 92%, var(--lily-text));
1277
+ }
1278
+ :where(.gantt-table-th[data-unavailable], .gantt-table-td[data-unavailable], .calendar-table-td[data-range]) {
1279
+ background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--lily-text) 14%, transparent) 4px 5px);
1280
+ }
1281
+ :where(.gantt-table-th[data-partly-unavailable]) {
1282
+ box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--lily-text) 45%, transparent);
1283
+ }
1284
+
1285
+ /* ==========================================================================
1286
+ * Cards, panels, surfaces
1287
+ * --------------------------------------------------------------------------
1288
+ * Family of generic content containers. Differ mostly in elevation
1289
+ * (shadow depth) and accent colour.
1290
+ * ====================================================================== */
1291
+
1292
+ :where(
1293
+ .card,
1294
+ .feature-card,
1295
+ .product-card,
1296
+ .care-card,
1297
+ .hover-card,
1298
+ .panel,
1299
+ .floating-panel,
1300
+ .success-panel
1301
+ ) {
1302
+ display: block;
1303
+ padding: 1rem;
1304
+ background-color: var(--lily-surface);
1305
+ color: var(--lily-text);
1306
+ border: var(--border) solid var(--lily-border);
1307
+ border-radius: var(--lily-radius-lg);
1308
+ box-shadow: var(--lily-shadow-sm);
1309
+ }
1310
+ /* Feature card — generous padding because it leads the page. */
1311
+ :where(.feature-card) {
1312
+ padding: 1.5rem;
1313
+ }
1314
+ /* Hover card — popover-like; lift it with the medium shadow. */
1315
+ :where(.hover-card) {
1316
+ box-shadow: var(--lily-shadow-md);
1317
+ }
1318
+ /* Floating panel — pinned overlay; largest shadow. */
1319
+ :where(.floating-panel) {
1320
+ box-shadow: var(--lily-shadow-lg);
1321
+ }
1322
+ /* Success panel — green border + faint green tint. */
1323
+ :where(.success-panel) {
1324
+ border-color: var(--color-success);
1325
+ background-color: color-mix(
1326
+ in oklch,
1327
+ var(--color-success) 8%,
1328
+ var(--lily-surface)
1329
+ );
1330
+ }
1331
+ /* Care card urgency variants — coloured left rail (urgent/non-urgent/
1332
+ primary). Pattern adapted from the NHS care-card guidance. */
1333
+ :where(.care-card[data-urgency="urgent"]) {
1334
+ border-color: var(--color-error);
1335
+ border-left-width: 0.375rem;
1336
+ }
1337
+ :where(.care-card[data-urgency="non-urgent"]) {
1338
+ border-color: var(--color-info);
1339
+ border-left-width: 0.375rem;
1340
+ }
1341
+ :where(.care-card[data-urgency="primary"]) {
1342
+ border-color: var(--color-primary);
1343
+ border-left-width: 0.375rem;
1344
+ }
1345
+
1346
+ /* ==========================================================================
1347
+ * Banners, alerts, callouts, notifications
1348
+ * --------------------------------------------------------------------------
1349
+ * Family of messages with a coloured left rail. The rail colour is set
1350
+ * per severity so the message reads at a glance.
1351
+ * ====================================================================== */
1352
+
1353
+ /* Baseline — alert/banner/callout/notification all share the same frame. */
1354
+ :where(
1355
+ .alert,
1356
+ .banner,
1357
+ .announcement-banner,
1358
+ .phase-banner,
1359
+ .government-banner,
1360
+ .medical-banner,
1361
+ .super-banner,
1362
+ .information-callout,
1363
+ .warning-callout,
1364
+ .summary-box,
1365
+ .notification,
1366
+ .toast,
1367
+ .sonner
1368
+ ) {
1369
+ display: flex;
1370
+ align-items: flex-start;
1371
+ gap: 0.75rem;
1372
+ padding: 1rem;
1373
+ background-color: var(--lily-surface-alt);
1374
+ color: var(--lily-text);
1375
+ border: var(--border) solid var(--lily-border);
1376
+ border-inline-start-width: 0.375rem; /* the coloured rail */
1377
+ border-radius: var(--lily-radius-md);
1378
+ }
1379
+
1380
+ /* Severity variants — rail + faint background tint. */
1381
+ :where(
1382
+ .alert[data-severity="info"],
1383
+ .information-callout,
1384
+ .announcement-banner
1385
+ ) {
1386
+ border-inline-start-color: var(--color-info);
1387
+ background-color: color-mix(
1388
+ in oklch,
1389
+ var(--color-info) 8%,
1390
+ var(--lily-surface)
1391
+ );
1392
+ }
1393
+ :where(.alert[data-severity="success"]) {
1394
+ border-inline-start-color: var(--color-success);
1395
+ background-color: color-mix(
1396
+ in oklch,
1397
+ var(--color-success) 8%,
1398
+ var(--lily-surface)
1399
+ );
1400
+ }
1401
+ :where(.alert[data-severity="warning"], .warning-callout, .phase-banner) {
1402
+ border-inline-start-color: var(--color-warning);
1403
+ background-color: color-mix(
1404
+ in oklch,
1405
+ var(--color-warning) 12%,
1406
+ var(--lily-surface)
1407
+ );
1408
+ }
1409
+ :where(
1410
+ .alert[data-severity="error"],
1411
+ .error-message,
1412
+ .error-summary,
1413
+ .super-banner
1414
+ ) {
1415
+ border-inline-start-color: var(--color-error);
1416
+ background-color: color-mix(
1417
+ in oklch,
1418
+ var(--color-error) 8%,
1419
+ var(--lily-surface)
1420
+ );
1421
+ }
1422
+ /* Medical banner — primary brand colour. */
1423
+ :where(.medical-banner) {
1424
+ border-inline-start-color: var(--color-primary);
1425
+ }
1426
+ /* Medical banner inner boxes — danger / advice variants. */
1427
+ :where(.medical-banner-box-for-danger) {
1428
+ border-color: var(--color-error);
1429
+ background-color: color-mix(
1430
+ in oklch,
1431
+ var(--color-error) 8%,
1432
+ var(--lily-surface)
1433
+ );
1434
+ }
1435
+ :where(.medical-banner-box-for-advice) {
1436
+ border-color: var(--color-info);
1437
+ background-color: color-mix(
1438
+ in oklch,
1439
+ var(--color-info) 8%,
1440
+ var(--lily-surface)
1441
+ );
1442
+ }
1443
+ /* Government banner — solid neutral surface (US-government / GOV.UK
1444
+ style: a chrome bar at the top of the page identifying the site
1445
+ as an official property). No coloured rail. */
1446
+ :where(.government-banner) {
1447
+ background-color: var(--color-neutral);
1448
+ color: var(--color-neutral-content);
1449
+ border-color: transparent;
1450
+ border-inline-start-color: transparent;
1451
+ }
1452
+ /* Summary box — primary-coloured rail; used for "answer at a glance"
1453
+ callouts on long forms (e.g. cost summary). */
1454
+ :where(.summary-box) {
1455
+ border-color: var(--color-primary);
1456
+ border-inline-start-width: 0.375rem;
1457
+ }
1458
+
1459
+ /* Banner boxes — chrome strip variants used inside header areas. */
1460
+ :where(.banner-box, .medical-banner-box) {
1461
+ display: flex;
1462
+ align-items: center;
1463
+ gap: 0.75rem;
1464
+ padding: 0.75rem 1rem;
1465
+ }
1466
+
1467
+ /* Sticky promo — sits at the very top of the viewport on scroll. */
1468
+ :where(.sticky-promo-banner) {
1469
+ position: sticky;
1470
+ inset-block-start: 0;
1471
+ z-index: 10;
1472
+ }
1473
+
1474
+ /* Error message — inline form-validation message. */
1475
+ :where(.error-message) {
1476
+ color: var(--lily-error-text);
1477
+ font-weight: 600;
1478
+ }
1479
+ /* Error summary — heavyweight 4px border (GOV.UK pattern) so users
1480
+ scrolling back to the top of a form see it immediately. */
1481
+ :where(.error-summary) {
1482
+ padding: 1rem;
1483
+ border: 0.25rem solid var(--color-error);
1484
+ }
1485
+
1486
+ /* Toast / Sonner — floating notifications; medium elevation. */
1487
+ :where(.toast, .sonner) {
1488
+ box-shadow: var(--lily-shadow-md);
1489
+ }
1490
+ /* In-page notification — small elevation. */
1491
+ :where(.notification) {
1492
+ box-shadow: var(--lily-shadow-sm);
1493
+ }
1494
+
1495
+ /* ==========================================================================
1496
+ * Forms
1497
+ * --------------------------------------------------------------------------
1498
+ * Form / field / fieldset layout primitives. Stack vertically with a
1499
+ * consistent gap so consumer markup stays brief.
1500
+ * ====================================================================== */
1501
+
1502
+ :where(.form, .editable-form) {
1503
+ display: flex;
1504
+ flex-direction: column;
1505
+ gap: 1rem;
1506
+ }
1507
+ /* Field — wraps a single label + input + hint/error trio. */
1508
+ :where(.field) {
1509
+ display: flex;
1510
+ flex-direction: column;
1511
+ gap: 0.375rem;
1512
+ }
1513
+ /* Fieldset — semantic <fieldset>; border + padded inset, legend bold. */
1514
+ :where(.fieldset) {
1515
+ border: var(--border) solid var(--lily-border);
1516
+ border-radius: var(--lily-radius-md);
1517
+ padding: 1rem;
1518
+ }
1519
+ :where(.fieldset > legend) {
1520
+ padding-inline: 0.5rem;
1521
+ font-weight: 600;
1522
+ }
1523
+ /* Label — bold and dark; consumers can override per-form. */
1524
+ :where(.label) {
1525
+ font-weight: 600;
1526
+ color: var(--lily-text);
1527
+ }
1528
+ /* Hint — small muted helptext under the input. */
1529
+ :where(.hint) {
1530
+ color: var(--lily-text-muted);
1531
+ font-size: 0.875rem;
1532
+ }
1533
+ /* Character counter — same colour/size as hint but right-aligned. */
1534
+ :where(.character-counter) {
1535
+ color: var(--lily-text-muted);
1536
+ font-size: 0.875rem;
1537
+ text-align: end;
1538
+ }
1539
+
1540
+ /* ==========================================================================
1541
+ * Layout & containers
1542
+ * ====================================================================== */
1543
+
1544
+ /* Page-width containers. */
1545
+ :where(
1546
+ .container,
1547
+ .container-with-fixed-width,
1548
+ .container-with-fluid-width
1549
+ ) {
1550
+ display: block;
1551
+ width: 100%;
1552
+ margin-inline: auto;
1553
+ padding-inline: 1rem;
1554
+ box-sizing: border-box;
1555
+ }
1556
+ /* Fixed-width — caps at a comfortable reading width (~1152px). */
1557
+ :where(.container-with-fixed-width) {
1558
+ max-width: 72rem;
1559
+ }
1560
+ /* Fluid-width — fills the viewport edge-to-edge. */
1561
+ :where(.container-with-fluid-width) {
1562
+ max-width: none;
1563
+ }
1564
+ /* Reset the inline padding when a container should butt against the edge. */
1565
+ :where(.padding-reset) {
1566
+ padding-inline: 0;
1567
+ }
1568
+
1569
+ /* Flex / grid / masonry primitives. */
1570
+ :where(.flex-stack) {
1571
+ display: flex;
1572
+ flex-direction: column;
1573
+ gap: 1rem;
1574
+ }
1575
+ :where(.grid) {
1576
+ display: grid;
1577
+ gap: 1rem;
1578
+ }
1579
+ :where(.masonry) {
1580
+ column-count: 3;
1581
+ column-gap: 1rem;
1582
+ }
1583
+ /* Horizontal-rule replacement that respects theme borders. */
1584
+ :where(.separator) {
1585
+ border: 0;
1586
+ border-top: var(--border) solid var(--lily-border);
1587
+ margin: 1rem 0;
1588
+ }
1589
+ /* Generic content tile. */
1590
+ :where(.tile) {
1591
+ display: block;
1592
+ padding: 1rem;
1593
+ background-color: var(--lily-surface);
1594
+ border: var(--border) solid var(--lily-border);
1595
+ border-radius: var(--lily-radius-md);
1596
+ }
1597
+ /* Sidebar — secondary-surface panel; sits beside main content. */
1598
+ :where(.sidebar) {
1599
+ display: block;
1600
+ background-color: var(--lily-surface-alt);
1601
+ padding: 1rem;
1602
+ border-radius: var(--lily-radius-md);
1603
+ }
1604
+ /* Aspect-ratio box — 16:9 default; consumers override `aspect-ratio`. */
1605
+ :where(.aspect-ratio-container) {
1606
+ position: relative;
1607
+ display: block;
1608
+ aspect-ratio: 16 / 9;
1609
+ overflow: hidden;
1610
+ border-radius: var(--lily-radius-md);
1611
+ }
1612
+ /* Framer — bordered box for embeds / illustrations. */
1613
+ :where(.framer) {
1614
+ padding: 1rem;
1615
+ border: var(--border) solid var(--lily-border);
1616
+ border-radius: var(--lily-radius-md);
1617
+ }
1618
+ /* Article-layout — declares column-width tokens that content-block reads.
1619
+ Pattern lifted from the Reuters Graphics components system. */
1620
+ :where(.article-layout) {
1621
+ --content-width-narrower: 20.625rem; /* 330px */
1622
+ --content-width-narrow: 31.875rem; /* 510px */
1623
+ --content-width-normal: 41.25rem; /* 660px (default reading width) */
1624
+ --content-width-wide: 58.125rem; /* 930px (chart escape) */
1625
+ --content-width-wider: 75rem; /* 1200px (full-bleed escape) */
1626
+ display: block;
1627
+ }
1628
+ /* Content-block — reads the column-width tokens; switch via data-width. */
1629
+ :where(.content-block) {
1630
+ max-width: var(--content-width-normal);
1631
+ margin-inline: auto;
1632
+ padding-inline: 1rem;
1633
+ box-sizing: border-box;
1634
+ }
1635
+ :where(.content-block[data-width="narrower"]) {
1636
+ max-width: var(--content-width-narrower);
1637
+ }
1638
+ :where(.content-block[data-width="narrow"]) {
1639
+ max-width: var(--content-width-narrow);
1640
+ }
1641
+ :where(.content-block[data-width="wide"]) {
1642
+ max-width: var(--content-width-wide);
1643
+ }
1644
+ :where(.content-block[data-width="wider"]) {
1645
+ max-width: var(--content-width-wider);
1646
+ }
1647
+
1648
+ /* --- Grail layout (5-region responsive page shell) --------------------- */
1649
+ /* Header spans the top; left-aside / main / right-aside fill the middle;
1650
+ footer spans the bottom. At ≤768px the asides drop below the main. */
1651
+ :where(.grail-layout) {
1652
+ display: grid;
1653
+ min-height: 100vh;
1654
+ grid-template-areas:
1655
+ "header header header"
1656
+ "left main right"
1657
+ "footer footer footer";
1658
+ grid-template-rows: auto 1fr auto;
1659
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
1660
+ background-color: var(--lily-surface);
1661
+ color: var(--lily-text);
1662
+ }
1663
+ :where(.grail-layout-top-header) {
1664
+ grid-area: header;
1665
+ }
1666
+ :where(.grail-layout-left-aside) {
1667
+ grid-area: left;
1668
+ }
1669
+ :where(.grail-layout-center-main) {
1670
+ grid-area: main;
1671
+ }
1672
+ :where(.grail-layout-right-aside) {
1673
+ grid-area: right;
1674
+ }
1675
+ :where(.grail-layout-bottom-footer) {
1676
+ grid-area: footer;
1677
+ }
1678
+ /* Header / footer chrome — secondary surface, padded. */
1679
+ :where(.grail-layout-top-header, .grail-layout-bottom-footer) {
1680
+ background-color: var(--lily-surface-alt);
1681
+ padding: 1rem;
1682
+ }
1683
+ /* Asides — secondary surface, padded. */
1684
+ :where(.grail-layout-left-aside, .grail-layout-right-aside) {
1685
+ padding: 1rem;
1686
+ background-color: var(--lily-surface-alt);
1687
+ }
1688
+ /* Main content area — primary surface, more generous padding. */
1689
+ :where(.grail-layout-center-main) {
1690
+ padding: 1.5rem;
1691
+ }
1692
+ /* Mobile breakpoint — collapse to a single column, stacking the regions. */
1693
+ @media (max-width: 48rem) {
1694
+ :where(.grail-layout) {
1695
+ grid-template-areas: "header" "main" "left" "right" "footer";
1696
+ grid-template-columns: 1fr;
1697
+ grid-template-rows: auto auto auto auto auto;
1698
+ }
1699
+ }
1700
+
1701
+ /* Standalone semantic header / footer landmarks. */
1702
+ :where(.header) {
1703
+ display: block;
1704
+ padding: 1rem;
1705
+ background-color: var(--lily-surface);
1706
+ border-bottom: var(--border) solid var(--lily-border);
1707
+ }
1708
+ :where(.footer) {
1709
+ display: block;
1710
+ padding: 1rem;
1711
+ background-color: var(--lily-surface-alt);
1712
+ border-top: var(--border) solid var(--lily-border);
1713
+ }
1714
+
1715
+ /* ==========================================================================
1716
+ * Dialogs, popovers, overlays
1717
+ * --------------------------------------------------------------------------
1718
+ * Modal and floating UI. Backdrop is a blur + 50% black overlay; dialog
1719
+ * frames are rounded with the largest shadow.
1720
+ * ====================================================================== */
1721
+
1722
+ /* Native <dialog> + variant types. */
1723
+ :where(
1724
+ .dialog,
1725
+ .alert-dialog,
1726
+ .timeout-dialog,
1727
+ .popconfirm-dialog,
1728
+ .file-dialog
1729
+ ) {
1730
+ background-color: var(--lily-surface);
1731
+ color: var(--lily-text);
1732
+ border: var(--border) solid var(--lily-border);
1733
+ border-radius: var(--lily-radius-lg);
1734
+ padding: 1.5rem;
1735
+ box-shadow: var(--lily-shadow-lg);
1736
+ max-width: min(40rem, 90vw); /* cap on big screens, fit on small */
1737
+ }
1738
+ /* Backdrop — dim the page and blur slightly so focus stays on the dialog. */
1739
+ :where(
1740
+ .dialog::backdrop,
1741
+ .alert-dialog::backdrop,
1742
+ .timeout-dialog::backdrop,
1743
+ .popconfirm-dialog::backdrop,
1744
+ .file-dialog::backdrop
1745
+ ) {
1746
+ background-color: color-mix(in oklch, black 50%, transparent);
1747
+ backdrop-filter: blur(2px);
1748
+ }
1749
+ /* Alert dialog — red rail so the user knows it's destructive. */
1750
+ :where(.alert-dialog) {
1751
+ border-color: var(--color-error);
1752
+ border-inline-start-width: 0.375rem;
1753
+ }
1754
+
1755
+ /* Popover / tooltip family — small floating labels. */
1756
+ :where(.popover, .popup, .tooltip, .coachmark, .contextual-help) {
1757
+ display: block;
1758
+ padding: 0.5rem 0.75rem;
1759
+ background-color: var(--color-neutral);
1760
+ color: var(--color-neutral-content);
1761
+ border-radius: var(--lily-radius-md);
1762
+ box-shadow: var(--lily-shadow-md);
1763
+ font-size: 0.875rem;
1764
+ max-width: 20rem;
1765
+ }
1766
+ /* Popover / popup — surface-coloured (more substantial than a tooltip). */
1767
+ :where(.popover, .popup) {
1768
+ background-color: var(--lily-surface);
1769
+ color: var(--lily-text);
1770
+ border: var(--border) solid var(--lily-border);
1771
+ max-width: 24rem;
1772
+ }
1773
+ /* Coachmark — primary-coloured border so it reads as a tutorial hint. */
1774
+ :where(.coachmark) {
1775
+ border: 2px solid var(--color-primary);
1776
+ }
1777
+
1778
+ /* Full-page overlay container — dims everything beneath a high-z child. */
1779
+ :where(.overlay-container) {
1780
+ position: fixed;
1781
+ inset: 0;
1782
+ background-color: color-mix(in oklch, black 50%, transparent);
1783
+ z-index: 100;
1784
+ }
1785
+
1786
+ /* Drawers — side panels (right edge by default; RTL-aware via logical
1787
+ properties). Sit above the overlay container (z-index 101). */
1788
+ :where(.drawer, .slide-out-drawer, .sheet) {
1789
+ position: fixed;
1790
+ inset-block: 0;
1791
+ inset-inline-end: 0;
1792
+ width: min(28rem, 90vw);
1793
+ background-color: var(--lily-surface);
1794
+ color: var(--lily-text);
1795
+ border-inline-start: var(--border) solid var(--lily-border);
1796
+ box-shadow: var(--lily-shadow-lg);
1797
+ padding: 1rem;
1798
+ z-index: 101;
1799
+ }
1800
+
1801
+ /* ==========================================================================
1802
+ * Menus
1803
+ * ====================================================================== */
1804
+
1805
+ /* Menu containers — surface-coloured popover with thin border + sm shadow. */
1806
+ :where(.menu, .context-menu, .dropdown-menu, .tree-menu, .command) {
1807
+ display: block;
1808
+ background-color: var(--lily-surface);
1809
+ color: var(--lily-text);
1810
+ border: var(--border) solid var(--lily-border);
1811
+ border-radius: var(--lily-radius-md);
1812
+ padding: 0.25rem;
1813
+ box-shadow: var(--lily-shadow-sm);
1814
+ list-style: none;
1815
+ margin: 0;
1816
+ }
1817
+ /* Menu items — flex row with icon + label slot. */
1818
+ :where(.menu-item, .context-menu-item) {
1819
+ display: flex;
1820
+ align-items: center;
1821
+ gap: 0.5rem;
1822
+ padding: 0.5rem 0.75rem;
1823
+ border-radius: var(--lily-radius-md);
1824
+ cursor: pointer;
1825
+ }
1826
+ /* Highlight on hover / aria-selected — alt surface. */
1827
+ :where(
1828
+ .menu-item:hover,
1829
+ .context-menu-item:hover,
1830
+ .menu-item[aria-selected="true"]
1831
+ ) {
1832
+ background-color: var(--lily-surface-alt);
1833
+ }
1834
+ /* Menu group — section within a menu. The aria-label becomes a header. */
1835
+ :where(.menu-group) {
1836
+ padding: 0.25rem 0;
1837
+ }
1838
+ :where(.menu-group::before) {
1839
+ content: attr(aria-label);
1840
+ display: block;
1841
+ padding: 0.25rem 0.75rem;
1842
+ color: var(--lily-text-muted);
1843
+ font-size: 0.75rem;
1844
+ text-transform: uppercase;
1845
+ letter-spacing: 0.05em;
1846
+ }
1847
+ /* Cascader / navigation-menu — horizontal flex row of menu columns. */
1848
+ :where(.cascader, .navigation-menu) {
1849
+ display: flex;
1850
+ gap: 0.25rem;
1851
+ }
1852
+ /* Hamburger — bordered icon-button. */
1853
+ :where(.hamburger-menu) {
1854
+ display: inline-flex;
1855
+ align-items: center;
1856
+ justify-content: center;
1857
+ padding: 0.5rem;
1858
+ background: transparent;
1859
+ border: var(--border) solid var(--lily-border-strong);
1860
+ border-radius: var(--lily-radius-md);
1861
+ color: var(--lily-text);
1862
+ cursor: pointer;
1863
+ }
1864
+
1865
+ /* ==========================================================================
1866
+ * Segments, toggles, groups
1867
+ * ====================================================================== */
1868
+
1869
+ /* Generic group containers — inline-flex, wrap, small gap. */
1870
+ :where(
1871
+ .segment-group,
1872
+ .toggle-group,
1873
+ .checkbox-group,
1874
+ .radio-group,
1875
+ .dial-group,
1876
+ .tag-group,
1877
+ .avatar-group,
1878
+ .mutually-exclusive
1879
+ ) {
1880
+ display: inline-flex;
1881
+ gap: 0.25rem;
1882
+ flex-wrap: wrap;
1883
+ }
1884
+ /* Segment group / toggle group get an inset background (iOS-segmented
1885
+ control aesthetic). */
1886
+ :where(.segment-group, .toggle-group) {
1887
+ padding: 0.25rem;
1888
+ background-color: var(--lily-surface-alt);
1889
+ border-radius: var(--lily-radius-md);
1890
+ }
1891
+ /* Segment items — transparent until pressed; then primary fill. */
1892
+ :where(.segment-group-item) {
1893
+ padding: 0.375rem 0.75rem;
1894
+ background: transparent;
1895
+ border: 0;
1896
+ border-radius: var(--lily-radius-md);
1897
+ color: var(--lily-text);
1898
+ cursor: pointer;
1899
+ }
1900
+ :where(
1901
+ .segment-group-item[aria-pressed="true"],
1902
+ .segment-group-item[aria-selected="true"]
1903
+ ) {
1904
+ background-color: var(--color-primary);
1905
+ color: var(--color-primary-content);
1906
+ }
1907
+ /* Avatar group — overlap each subsequent avatar by 0.5rem, with a
1908
+ contrast ring for separation. */
1909
+ :where(.avatar-group > *) {
1910
+ margin-inline-start: -0.5rem;
1911
+ border: 2px solid var(--lily-surface);
1912
+ }
1913
+
1914
+ /* ==========================================================================
1915
+ * Progress, loading
1916
+ * ====================================================================== */
1917
+
1918
+ /* Native <progress> / <meter> / bar variant — short, pill-shaped track. */
1919
+ :where(.progress, .progress-bar, .meter) {
1920
+ display: block;
1921
+ width: 100%;
1922
+ height: 0.5rem;
1923
+ appearance: none;
1924
+ background-color: var(--lily-surface-sunken);
1925
+ border: 0;
1926
+ border-radius: 999px;
1927
+ overflow: hidden;
1928
+ }
1929
+ /* Vendor pseudo-elements: track + value. */
1930
+ :where(.progress::-webkit-progress-bar, .meter::-webkit-meter-bar) {
1931
+ background-color: var(--lily-surface-sunken);
1932
+ }
1933
+ :where(
1934
+ .progress::-webkit-progress-value,
1935
+ .meter::-webkit-meter-optimum-value
1936
+ ) {
1937
+ background-color: var(--color-primary);
1938
+ }
1939
+ :where(.progress::-moz-progress-bar) {
1940
+ background-color: var(--color-primary);
1941
+ }
1942
+
1943
+ /* Progress circle — conic-gradient renders the sweep based on the
1944
+ --progress custom property (0–100). */
1945
+ :where(.progress-circle) {
1946
+ display: inline-block;
1947
+ width: 2rem;
1948
+ height: 2rem;
1949
+ border-radius: 50%;
1950
+ background: conic-gradient(
1951
+ var(--color-primary) calc(var(--progress, 0) * 1%),
1952
+ var(--lily-surface-sunken) 0
1953
+ );
1954
+ }
1955
+ /* Spinner / loading — classic CSS rotating partial-ring. */
1956
+ :where(.progress-spinner, .loading) {
1957
+ display: inline-block;
1958
+ width: 1.5rem;
1959
+ height: 1.5rem;
1960
+ border: 3px solid var(--lily-surface-sunken);
1961
+ border-top-color: var(--color-primary);
1962
+ border-radius: 50%;
1963
+ animation: lily-spin 0.8s linear infinite;
1964
+ }
1965
+ @keyframes lily-spin {
1966
+ to {
1967
+ transform: rotate(360deg);
1968
+ }
1969
+ }
1970
+ /* Skeleton — shimmering placeholder while content is loading. */
1971
+ :where(.skeleton) {
1972
+ display: block;
1973
+ background: linear-gradient(
1974
+ 90deg,
1975
+ var(--lily-surface-alt) 0%,
1976
+ var(--lily-surface-sunken) 50%,
1977
+ var(--lily-surface-alt) 100%
1978
+ );
1979
+ background-size: 200% 100%;
1980
+ animation: lily-skeleton 1.4s ease-in-out infinite;
1981
+ border-radius: var(--lily-radius-md);
1982
+ min-height: 1rem;
1983
+ }
1984
+ @keyframes lily-skeleton {
1985
+ 0% {
1986
+ background-position: 200% 0;
1987
+ }
1988
+ 100% {
1989
+ background-position: -200% 0;
1990
+ }
1991
+ }
1992
+ /* Respect prefers-reduced-motion — kill the perpetual animations.
1993
+ (WCAG 2.3.3 Animation from interactions.) */
1994
+ @media (prefers-reduced-motion: reduce) {
1995
+ :where(.progress-spinner, .loading, .skeleton, .beach-ball) {
1996
+ animation: none;
1997
+ }
1998
+ }
1999
+
2000
+ /* ==========================================================================
2001
+ * Avatars, badges, tags, status
2002
+ * ====================================================================== */
2003
+
2004
+ /* Avatar — circular tile (2.5rem) with sunken background as the
2005
+ fallback colour when no image is provided. */
2006
+ :where(.avatar) {
2007
+ display: inline-flex;
2008
+ align-items: center;
2009
+ justify-content: center;
2010
+ width: 2.5rem;
2011
+ height: 2.5rem;
2012
+ border-radius: 50%;
2013
+ background-color: var(--lily-surface-sunken);
2014
+ color: var(--lily-text);
2015
+ overflow: hidden;
2016
+ font-weight: 600;
2017
+ }
2018
+ :where(.avatar-image) {
2019
+ width: 100%;
2020
+ height: 100%;
2021
+ object-fit: cover;
2022
+ display: block;
2023
+ }
2024
+ /* Avatar fallback text — uppercase initials. */
2025
+ :where(.avatar-text) {
2026
+ text-transform: uppercase;
2027
+ }
2028
+
2029
+ /* Badge / flair / tag family — small pill-shaped labels. */
2030
+ :where(.badge, .flair, .status-tag, .tag, .ai-label) {
2031
+ display: inline-flex;
2032
+ align-items: center;
2033
+ gap: 0.25rem;
2034
+ padding: 0.125rem 0.5rem;
2035
+ font-size: 0.75rem;
2036
+ font-weight: 600;
2037
+ line-height: 1.5;
2038
+ background-color: var(--color-neutral);
2039
+ color: var(--color-neutral-content);
2040
+ border-radius: 999px;
2041
+ }
2042
+ /* Tag — neutral chip with a visible border (so it's not confused with
2043
+ a status badge). */
2044
+ :where(.tag) {
2045
+ background-color: var(--lily-surface-alt);
2046
+ color: var(--lily-text);
2047
+ border: var(--border) solid var(--lily-border);
2048
+ }
2049
+ /* AI label — accent colour so AI-generated content is visually marked. */
2050
+ :where(.ai-label) {
2051
+ background-color: var(--color-accent);
2052
+ color: var(--color-accent-content);
2053
+ }
2054
+ /* Status tags — pre-baked colour for each status. */
2055
+ :where(.status-tag[data-status="success"]) {
2056
+ background-color: var(--color-success);
2057
+ color: var(--color-success-content);
2058
+ }
2059
+ :where(.status-tag[data-status="warning"]) {
2060
+ background-color: var(--color-warning);
2061
+ color: var(--color-warning-content);
2062
+ }
2063
+ :where(.status-tag[data-status="error"]) {
2064
+ background-color: var(--color-error);
2065
+ color: var(--color-error-content);
2066
+ }
2067
+ :where(.status-tag[data-status="info"]) {
2068
+ background-color: var(--color-info);
2069
+ color: var(--color-info-content);
2070
+ }
2071
+
2072
+ /* Status light — a coloured dot followed by a label. */
2073
+ :where(.status-light) {
2074
+ display: inline-flex;
2075
+ align-items: center;
2076
+ gap: 0.375rem;
2077
+ }
2078
+ :where(.status-light)::before {
2079
+ content: "";
2080
+ display: inline-block;
2081
+ width: 0.625rem;
2082
+ height: 0.625rem;
2083
+ border-radius: 50%;
2084
+ background-color: var(--color-neutral);
2085
+ }
2086
+ :where(.status-light[data-status="success"])::before {
2087
+ background-color: var(--color-success);
2088
+ }
2089
+ :where(.status-light[data-status="warning"])::before {
2090
+ background-color: var(--color-warning);
2091
+ }
2092
+ :where(.status-light[data-status="error"])::before {
2093
+ background-color: var(--color-error);
2094
+ }
2095
+ :where(.status-light[data-status="info"])::before {
2096
+ background-color: var(--color-info);
2097
+ }
2098
+
2099
+ /* ==========================================================================
2100
+ * Pickers, ratings, theme
2101
+ * ====================================================================== */
2102
+
2103
+ /* Picker baseline — inline row of selectable chips/buttons. */
2104
+ :where(
2105
+ .color-picker,
2106
+ .five-face-rating-picker,
2107
+ .five-star-rating-picker,
2108
+ .net-promoter-score-picker,
2109
+ .red-amber-green-picker,
2110
+ .red-orange-yellow-green-blue-picker,
2111
+ .emoji-character-picker,
2112
+ .calendar-range-picker
2113
+ ) {
2114
+ display: inline-flex;
2115
+ align-items: center;
2116
+ gap: 0.25rem;
2117
+ padding: 0.25rem;
2118
+ background-color: var(--lily-surface);
2119
+ border: var(--border) solid var(--lily-border);
2120
+ border-radius: var(--lily-radius-md);
2121
+ }
2122
+ /* Picker buttons — small alt-surface chips. */
2123
+ :where(
2124
+ .color-picker-button,
2125
+ .five-face-rating-picker-button,
2126
+ .five-star-rating-picker-button,
2127
+ .net-promoter-score-picker-button,
2128
+ .red-amber-green-picker-button,
2129
+ .red-orange-yellow-green-blue-picker-button
2130
+ ) {
2131
+ background-color: var(--lily-surface-alt);
2132
+ color: var(--lily-text);
2133
+ border: var(--border) solid var(--lily-border);
2134
+ min-width: 2rem;
2135
+ min-height: 2rem;
2136
+ padding: 0.25rem 0.5rem;
2137
+ }
2138
+ /* Color picker — circular swatch. */
2139
+ :where(.color-picker-button) {
2140
+ width: 1.75rem;
2141
+ height: 1.75rem;
2142
+ padding: 0;
2143
+ border-radius: 50%;
2144
+ }
2145
+ /* Filled stars — warning (gold) colour for both viewer and pressed state. */
2146
+ :where(
2147
+ .five-star-rating-view,
2148
+ .five-star-rating-picker-button[aria-pressed="true"]
2149
+ ) {
2150
+ color: var(--color-warning);
2151
+ }
2152
+ /* RAG (red/amber/green) — semantic colour per status. */
2153
+ :where(
2154
+ .red-amber-green-view[data-status="red"],
2155
+ .red-amber-green-picker-button[data-status="red"]
2156
+ ) {
2157
+ background-color: var(--color-error);
2158
+ color: var(--color-error-content);
2159
+ }
2160
+ :where(
2161
+ .red-amber-green-view[data-status="amber"],
2162
+ .red-amber-green-picker-button[data-status="amber"]
2163
+ ) {
2164
+ background-color: var(--color-warning);
2165
+ color: var(--color-warning-content);
2166
+ }
2167
+ :where(
2168
+ .red-amber-green-view[data-status="green"],
2169
+ .red-amber-green-picker-button[data-status="green"]
2170
+ ) {
2171
+ background-color: var(--color-success);
2172
+ color: var(--color-success-content);
2173
+ }
2174
+
2175
+ /* Native <select> styling — drop the UA chrome and draw our own caret
2176
+ via two stacked linear-gradients. */
2177
+ :where(select.theme-select, .select, .select-with-extras, .tree-select) {
2178
+ width: 100%;
2179
+ min-height: 2.5rem;
2180
+ padding: 0.5rem 2rem 0.5rem 0.75rem; /* extra right padding for caret */
2181
+ font: inherit;
2182
+ background-color: var(--lily-surface);
2183
+ color: var(--lily-text);
2184
+ border: var(--border) solid var(--lily-border-strong);
2185
+ border-radius: var(--lily-radius-md);
2186
+ appearance: none;
2187
+ background-image:
2188
+ linear-gradient(45deg, transparent 50%, var(--lily-text) 50%),
2189
+ linear-gradient(135deg, var(--lily-text) 50%, transparent 50%);
2190
+ background-position:
2191
+ calc(100% - 1.1rem) 1.1rem,
2192
+ calc(100% - 0.7rem) 1.1rem;
2193
+ background-size: 0.4rem 0.4rem;
2194
+ background-repeat: no-repeat;
2195
+ }
2196
+ /* Options inherit the select colours so the dropdown matches the input. */
2197
+ :where(.option, .theme-select-option) {
2198
+ background-color: var(--lily-surface);
2199
+ color: var(--lily-text);
2200
+ }
2201
+
2202
+ /* The four *-picker helpers are an icon button that opens a popup,
2203
+ so they are styled as a popup rather than a form field. No :has()
2204
+ guard is needed any more: before the July 2026 rename these shared
2205
+ the `.theme-select` hook with the catalog theme-select component
2206
+ and had to be told apart. Distinct names, no collision. */
2207
+ :where(
2208
+ .theme-picker,
2209
+ .locale-picker,
2210
+ .text-size-picker,
2211
+ .time-zone-picker,
2212
+ .search-picker,
2213
+ .link-picker,
2214
+ .menu-picker,
2215
+ .settings-picker,
2216
+ .share-picker,
2217
+ .date-time-picker
2218
+ ) {
2219
+ position: relative;
2220
+ display: inline-block;
2221
+ }
2222
+
2223
+ :where(
2224
+ .theme-picker-button,
2225
+ .locale-picker-button,
2226
+ .text-size-picker-button,
2227
+ .time-zone-picker-button,
2228
+ .search-picker-button,
2229
+ .link-picker-button,
2230
+ .menu-picker-button,
2231
+ .settings-picker-button,
2232
+ .share-picker-button,
2233
+ .date-time-picker-button
2234
+ ) {
2235
+ display: inline-flex;
2236
+ align-items: center;
2237
+ justify-content: center;
2238
+ min-width: 2.5rem;
2239
+ min-height: 2.5rem;
2240
+ padding: var(--lily-space-xs);
2241
+ font: inherit;
2242
+ line-height: 1;
2243
+ color: var(--lily-text);
2244
+ background-color: var(--lily-surface);
2245
+ border: var(--border) solid var(--lily-border-strong);
2246
+ border-radius: var(--lily-radius-md);
2247
+ cursor: pointer;
2248
+ }
2249
+
2250
+ /* The icon is decorative (aria-hidden); the button's aria-label
2251
+ carries the accessible name. Reversed 2026-09-16: five of the
2252
+ six picker icons (theme, locale, text-size, motion, share) are
2253
+ now bundled SVGs, not Unicode glyphs. Each ships its own
2254
+ explicit width="1.05rem" height="1.05rem" on the <svg> element,
2255
+ so unlike a font-dependent character glyph -- where different
2256
+ glyphs ink different fractions of their em box, needing a
2257
+ per-glyph optical correction -- every icon in this family
2258
+ already inks the same visual size by construction (the icon's
2259
+ own author controls its viewBox). This rule only supplies flex
2260
+ centering; override the icon's own width/height if you need a
2261
+ different size. */
2262
+ :where(
2263
+ .theme-picker-icon,
2264
+ .locale-picker-icon,
2265
+ .text-size-picker-icon,
2266
+ .time-zone-picker-icon,
2267
+ .motion-picker-icon,
2268
+ .link-picker-icon,
2269
+ .menu-picker-icon,
2270
+ .settings-picker-icon,
2271
+ .share-picker-icon,
2272
+ .search-picker-icon
2273
+ ) {
2274
+ display: inline-flex;
2275
+ align-items: center;
2276
+ justify-content: center;
2277
+ }
2278
+
2279
+ /* date-time-picker's calendar icon is still a Unicode glyph
2280
+ (U+1F4C5 + U+FE0E) -- out of scope for the 2026-09-16 SVG-icon
2281
+ reversal, since date-time-picker was not part of that change
2282
+ (see AGENTS/helpers.md) -- so it keeps the font-size-based
2283
+ sizing the other five used to share.
2284
+
2285
+ U+1F4C5 calendar inks 1.000 of its em box (max extent) against
2286
+ U+25D1 half-circle's reference 0.850 (the pre-reversal
2287
+ baseline, still valid here since this is the same glyph
2288
+ measurement, unchanged): 0.850/1.000 ≈ 0.85, shipped as 0.845.
2289
+ A colour-emoji font paints every one of its glyphs into one
2290
+ identical em square, so globe, calendar, rocket and heart all
2291
+ measure the same ink box -- any future emoji helper icon can
2292
+ reuse this factor without re-measuring.
2293
+
2294
+ (Measuring also confirms the U+FE0E text-presentation selector is
2295
+ ignored here: the bare and VS-15 forms are metrically identical. It
2296
+ stays in the source as a hint to the platforms that do honour it.) */
2297
+ :where(.date-time-picker-icon) {
2298
+ display: inline-flex;
2299
+ align-items: center;
2300
+ justify-content: center;
2301
+ font-size: calc(1.25em * var(--lily-picker-icon-scale, 1));
2302
+ line-height: 1;
2303
+ --lily-picker-icon-scale: 0.845;
2304
+ }
2305
+
2306
+ /* The share list holds real links and a button rather than options,
2307
+ so its items get the same padding without the option selectors. */
2308
+ :where(.share-picker-list) > :where(.share-picker-list-item) {
2309
+ list-style: none;
2310
+ }
2311
+
2312
+ :where(.share-picker-target, .share-picker-copy) {
2313
+ display: block;
2314
+ width: 100%;
2315
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2316
+ font: inherit;
2317
+ text-align: start;
2318
+ color: var(--lily-text);
2319
+ background: none;
2320
+ border: 0;
2321
+ border-radius: var(--lily-radius-sm);
2322
+ cursor: pointer;
2323
+ }
2324
+
2325
+ :where(.share-picker-target:hover, .share-picker-copy:hover) {
2326
+ background-color: var(--lily-surface-alt);
2327
+ }
2328
+
2329
+ /* link-picker's list holds real page links (a disclosure, not a menu),
2330
+ so its items get the share list's treatment; the current page is
2331
+ marked by aria-current and shown in bold. */
2332
+ :where(.link-picker-list) > :where(.link-picker-list-item) {
2333
+ list-style: none;
2334
+ }
2335
+
2336
+ :where(.link-picker-link) {
2337
+ display: block;
2338
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2339
+ color: var(--lily-text);
2340
+ text-decoration: none;
2341
+ border-radius: var(--lily-radius-sm);
2342
+ cursor: pointer;
2343
+ }
2344
+
2345
+ :where(.link-picker-link:hover) {
2346
+ background-color: var(--lily-surface-alt);
2347
+ }
2348
+
2349
+ :where(.link-picker-link[aria-current="page"]) {
2350
+ font-weight: 600;
2351
+ background-color: var(--lily-surface-sunken);
2352
+ }
2353
+
2354
+ /* Copy feedback. Never display:none this — that silences the live
2355
+ region for screen-reader users. */
2356
+ :where(.share-picker-status) {
2357
+ margin: var(--lily-space-xs) 0 0;
2358
+ font-size: 0.875em;
2359
+ color: var(--lily-text-muted);
2360
+ }
2361
+
2362
+ /* The status paragraph is always rendered so the aria-live region
2363
+ exists before the first announcement (see above); empty, it still
2364
+ generates a line box and carries the margin-top set above, both of
2365
+ which push the button row out of alignment in a flex layout like
2366
+ picker-bar (found independently by two downstream consumers, each
2367
+ patching around it locally). :empty here matches a Svelte-rendered
2368
+ {status} of "" (a zero-length text node doesn't count as a child
2369
+ per the CSS spec), so this only applies while there is nothing to
2370
+ announce, and normal spacing returns the moment status has text. */
2371
+ :where(.share-picker-status:empty) {
2372
+ margin: 0;
2373
+ line-height: 0;
2374
+ }
2375
+
2376
+ /* Components added 2026-10-05: kbd-shortcut, show-more, thinking,
2377
+ empty-state, file-tree, one-time-password-input, multi-select, and
2378
+ the four calendar views. The calendar views reuse the
2379
+ calendar-table-* sub-element hooks, so they only need the table
2380
+ root rule. show-more's clamp is keyed on data-expanded (the
2381
+ component never sets an inline style); file-tree hides a closed
2382
+ folder's group via aria-expanded. */
2383
+ :where(.calendar-year-table, .calendar-month-table, .calendar-week-table, .calendar-day-table) {
2384
+ width: 100%;
2385
+ border-collapse: collapse;
2386
+ }
2387
+
2388
+ :where(.kbd-shortcut) {
2389
+ display: inline-flex;
2390
+ align-items: center;
2391
+ gap: var(--lily-space-xs);
2392
+ }
2393
+
2394
+ :where(.kbd-shortcut-key) {
2395
+ display: inline-block;
2396
+ padding: 0.125rem 0.4rem;
2397
+ font-family: var(--lily-font-mono);
2398
+ font-size: 0.85em;
2399
+ background-color: var(--lily-surface-alt);
2400
+ border: var(--border) solid var(--lily-border-strong);
2401
+ border-bottom-width: 2px;
2402
+ border-radius: var(--lily-radius-sm);
2403
+ }
2404
+
2405
+ :where(.show-more-content[data-expanded="false"]) {
2406
+ max-height: 6em;
2407
+ overflow: hidden;
2408
+ }
2409
+
2410
+ :where(.show-more-button) {
2411
+ margin-block-start: var(--lily-space-xs);
2412
+ padding: var(--lily-space-xs);
2413
+ font: inherit;
2414
+ color: inherit;
2415
+ text-decoration: underline;
2416
+ background: none;
2417
+ border: 0;
2418
+ cursor: pointer;
2419
+ }
2420
+
2421
+ :where(.thinking) {
2422
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2423
+ color: var(--lily-text-muted);
2424
+ border: var(--border) solid var(--lily-border-strong);
2425
+ border-radius: var(--lily-radius-md);
2426
+ }
2427
+
2428
+ :where(.thinking-summary) {
2429
+ cursor: pointer;
2430
+ }
2431
+
2432
+ :where(.thinking[data-streaming] .thinking-summary) {
2433
+ font-style: italic;
2434
+ }
2435
+
2436
+ :where(.empty-state) {
2437
+ padding: var(--lily-space-lg);
2438
+ text-align: center;
2439
+ color: var(--lily-text-muted);
2440
+ }
2441
+
2442
+ :where(.file-tree, .file-tree [role="group"]) {
2443
+ margin: 0;
2444
+ padding-inline-start: 0;
2445
+ list-style: none;
2446
+ }
2447
+
2448
+ :where(.file-tree [role="group"]) {
2449
+ padding-inline-start: var(--lily-space-md);
2450
+ }
2451
+
2452
+ :where(.file-tree [role="treeitem"]) {
2453
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2454
+ cursor: pointer;
2455
+ }
2456
+
2457
+ :where(.file-tree [role="treeitem"][aria-expanded="false"] > [role="group"]) {
2458
+ display: none;
2459
+ }
2460
+
2461
+ :where(.file-tree [role="treeitem"]:focus-visible) {
2462
+ outline: var(--lily-focus-ring);
2463
+ outline-offset: -2px;
2464
+ }
2465
+
2466
+ :where(.one-time-password-input, .multi-select, .multi-select-with-extras select) {
2467
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2468
+ font: inherit;
2469
+ color: var(--lily-text);
2470
+ background-color: var(--lily-surface);
2471
+ border: var(--border) solid var(--lily-border-strong);
2472
+ border-radius: var(--lily-radius-sm);
2473
+ }
2474
+
2475
+ :where(.one-time-password-input) {
2476
+ font-family: var(--lily-font-mono);
2477
+ letter-spacing: 0.25em;
2478
+ }
2479
+
2480
+ /* Chart containers added 2026-10-05 (gauge, heatmap, radar, sankey, pie,
2481
+ ring, funnel, candlestick, composed, choropleth, sunburst) join the
2482
+ existing five as block figures. Every chart's optional data-table
2483
+ wrapper sits below the graphic; the table itself inherits the
2484
+ catalog's table styling. */
2485
+ :where(
2486
+ .gauge-chart,
2487
+ .heatmap-chart,
2488
+ .radar-chart,
2489
+ .sankey-chart,
2490
+ .pie-chart,
2491
+ .ring-chart,
2492
+ .funnel-chart,
2493
+ .candlestick-chart,
2494
+ .composed-chart,
2495
+ .choropleth-chart,
2496
+ .sunburst-chart
2497
+ ) {
2498
+ display: block;
2499
+ margin: 0;
2500
+ }
2501
+
2502
+ :where(
2503
+ .area-chart-data-table,
2504
+ .bar-chart-data-table,
2505
+ .column-chart-data-table,
2506
+ .line-chart-data-table,
2507
+ .scatter-chart-data-table,
2508
+ .gauge-chart-data-table,
2509
+ .heatmap-chart-data-table,
2510
+ .radar-chart-data-table,
2511
+ .sankey-chart-data-table,
2512
+ .pie-chart-data-table,
2513
+ .ring-chart-data-table,
2514
+ .funnel-chart-data-table,
2515
+ .candlestick-chart-data-table,
2516
+ .composed-chart-data-table,
2517
+ .choropleth-chart-data-table,
2518
+ .sunburst-chart-data-table
2519
+ ) {
2520
+ margin-block-start: var(--lily-space-sm);
2521
+ overflow-x: auto;
2522
+ }
2523
+
2524
+ /* tool-call (2026-10-05): a bordered disclosure; the status word sits next
2525
+ to the name in the summary and is never the only cue. [data-status] is
2526
+ the consumer hook for a spinner or icon. */
2527
+ :where(.tool-call) {
2528
+ border: var(--border) solid var(--lily-border-strong);
2529
+ border-radius: var(--lily-radius-md);
2530
+ background-color: var(--lily-surface);
2531
+ color: var(--lily-text);
2532
+ }
2533
+
2534
+ :where(.tool-call-summary) {
2535
+ display: flex;
2536
+ align-items: center;
2537
+ gap: var(--lily-space-sm);
2538
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2539
+ cursor: pointer;
2540
+ }
2541
+
2542
+ :where(.tool-call-content) {
2543
+ display: grid;
2544
+ gap: var(--lily-space-xs);
2545
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2546
+ border-block-start: var(--border) solid var(--lily-border-strong);
2547
+ }
2548
+
2549
+ :where(.tool-call-name) {
2550
+ font-family: var(--lily-font-mono);
2551
+ }
2552
+
2553
+ :where(.tool-call-status) {
2554
+ color: var(--lily-text-muted);
2555
+ }
2556
+
2557
+ :where(.tool-call-input pre, .tool-call-output pre) {
2558
+ margin: 0;
2559
+ overflow-x: auto;
2560
+ font-family: var(--lily-font-mono);
2561
+ }
2562
+
2563
+ :where(.tool-call-error) {
2564
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2565
+ border: var(--border) solid var(--lily-border-strong);
2566
+ border-radius: var(--lily-radius-sm);
2567
+ font-weight: 600;
2568
+ }
2569
+
2570
+ /* mark (2026-10-05): the native <mark> highlight. The UA default is a
2571
+ fixed yellow; this uses the theme's own surface and text tokens so the
2572
+ pair keeps its contrast in every theme (including dark ones). */
2573
+ :where(.mark) {
2574
+ padding-inline: 0.15em;
2575
+ color: var(--lily-text);
2576
+ background-color: var(--lily-surface-alt);
2577
+ border-radius: var(--lily-radius-sm);
2578
+ box-shadow: 0 0 0 1px var(--lily-border-strong);
2579
+ }
2580
+
2581
+ /* chat-composer (2026-10-05): one row, textarea growing, one button. The
2582
+ button's visible word is its accessible name — hide it visually, never
2583
+ with display:none, if you replace it with an icon. */
2584
+ :where(.chat-composer) {
2585
+ display: flex;
2586
+ align-items: flex-end;
2587
+ gap: var(--lily-space-xs);
2588
+ }
2589
+
2590
+ :where(.chat-composer-input) {
2591
+ flex: 1;
2592
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2593
+ font: inherit;
2594
+ color: var(--lily-text);
2595
+ background-color: var(--lily-surface);
2596
+ border: var(--border) solid var(--lily-border-strong);
2597
+ border-radius: var(--lily-radius-md);
2598
+ resize: none;
2599
+ }
2600
+
2601
+ :where(.chat-composer-button) {
2602
+ min-width: 2.5rem;
2603
+ min-height: 2.5rem;
2604
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2605
+ font: inherit;
2606
+ color: var(--lily-text);
2607
+ background-color: var(--lily-surface);
2608
+ border: var(--border) solid var(--lily-border-strong);
2609
+ border-radius: var(--lily-radius-md);
2610
+ cursor: pointer;
2611
+ }
2612
+
2613
+ :where(.chat-composer-button:disabled) {
2614
+ cursor: not-allowed;
2615
+ opacity: 0.6;
2616
+ }
2617
+
2618
+ /* Picker tooltips (added 2026-10-04): a visual-only role="tooltip"
2619
+ element beside each picker's icon button, holding the same text as
2620
+ its aria-label. The component toggles [hidden]; position and look
2621
+ are here. It sits just below the button, in the inverse of the
2622
+ page colours so it never disappears into the surface. A ::before
2623
+ strip bridges the gap to the button so the pointer can travel onto
2624
+ the tooltip without it closing (WCAG 1.4.13, hoverable). */
2625
+ :where(.motion-picker) {
2626
+ position: relative;
2627
+ display: inline-block;
2628
+ }
2629
+
2630
+ :where(
2631
+ .theme-picker-tooltip,
2632
+ .locale-picker-tooltip,
2633
+ .text-size-picker-tooltip,
2634
+ .time-zone-picker-tooltip,
2635
+ .motion-picker-tooltip,
2636
+ .link-picker-tooltip,
2637
+ .menu-picker-tooltip,
2638
+ .settings-picker-tooltip,
2639
+ .share-picker-tooltip,
2640
+ .search-picker-tooltip,
2641
+ .date-time-picker-tooltip
2642
+ ) {
2643
+ position: absolute;
2644
+ z-index: 11;
2645
+ inset-inline-start: 0;
2646
+ inset-block-start: 100%;
2647
+ margin-block-start: var(--lily-space-xs);
2648
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2649
+ font-size: 0.875em;
2650
+ line-height: 1.3;
2651
+ white-space: nowrap;
2652
+ color: var(--lily-surface);
2653
+ background-color: var(--lily-text);
2654
+ border-radius: var(--lily-radius-sm);
2655
+ box-shadow: var(--lily-shadow-md);
2656
+ }
2657
+
2658
+ :where(
2659
+ .theme-picker-tooltip,
2660
+ .locale-picker-tooltip,
2661
+ .text-size-picker-tooltip,
2662
+ .time-zone-picker-tooltip,
2663
+ .motion-picker-tooltip,
2664
+ .link-picker-tooltip,
2665
+ .menu-picker-tooltip,
2666
+ .settings-picker-tooltip,
2667
+ .share-picker-tooltip,
2668
+ .search-picker-tooltip,
2669
+ .date-time-picker-tooltip
2670
+ )::before {
2671
+ content: "";
2672
+ position: absolute;
2673
+ inset-inline: 0;
2674
+ inset-block-end: 100%;
2675
+ height: var(--lily-space-xs);
2676
+ }
2677
+
2678
+ :where(
2679
+ .theme-picker-tooltip,
2680
+ .locale-picker-tooltip,
2681
+ .text-size-picker-tooltip,
2682
+ .time-zone-picker-tooltip,
2683
+ .motion-picker-tooltip,
2684
+ .link-picker-tooltip,
2685
+ .menu-picker-tooltip,
2686
+ .settings-picker-tooltip,
2687
+ .share-picker-tooltip,
2688
+ .search-picker-tooltip,
2689
+ .date-time-picker-tooltip
2690
+ )[hidden] {
2691
+ display: none;
2692
+ }
2693
+
2694
+ /* search-picker's panel holds a search form rather than a list: the
2695
+ field and the ⏎ submit button sit in one row, the button at the
2696
+ field's inline end (right in LTR, left under dir="rtl"). The ⏎
2697
+ button matches the picker trigger buttons' size and border. */
2698
+ :where(.search-picker-form) {
2699
+ display: flex;
2700
+ align-items: stretch;
2701
+ gap: var(--lily-space-xs);
2702
+ margin: 0;
2703
+ }
2704
+
2705
+ :where(.search-picker-input) {
2706
+ min-width: 14rem;
2707
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2708
+ font: inherit;
2709
+ color: var(--lily-text);
2710
+ background-color: var(--lily-surface);
2711
+ border: var(--border) solid var(--lily-border-strong);
2712
+ border-radius: var(--lily-radius-sm);
2713
+ }
2714
+
2715
+ :where(.search-picker-submit) {
2716
+ display: inline-flex;
2717
+ align-items: center;
2718
+ justify-content: center;
2719
+ min-width: 2.5rem;
2720
+ min-height: 2.5rem;
2721
+ padding: var(--lily-space-xs);
2722
+ font: inherit;
2723
+ line-height: 1;
2724
+ color: var(--lily-text);
2725
+ background-color: var(--lily-surface);
2726
+ border: var(--border) solid var(--lily-border-strong);
2727
+ border-radius: var(--lily-radius-md);
2728
+ cursor: pointer;
2729
+ }
2730
+
2731
+ :where(.search-picker-submit:hover) {
2732
+ background-color: var(--lily-surface-alt);
2733
+ }
2734
+
2735
+ :where(
2736
+ .theme-picker-list,
2737
+ .locale-picker-list,
2738
+ .text-size-picker-list,
2739
+ .time-zone-picker-list,
2740
+ .motion-picker-list,
2741
+ .link-picker-list,
2742
+ .menu-picker-panel,
2743
+ .settings-picker-panel,
2744
+ .share-picker-list,
2745
+ .search-picker-panel
2746
+ ) {
2747
+ position: absolute;
2748
+ z-index: 10;
2749
+ inset-inline-start: 0;
2750
+ min-width: max-content;
2751
+ max-height: 60vh;
2752
+ margin-block-start: var(--lily-space-xs);
2753
+ padding: var(--lily-space-xs);
2754
+ overflow-y: auto;
2755
+ list-style: none;
2756
+ color: var(--lily-text);
2757
+ background-color: var(--lily-surface);
2758
+ border: var(--border) solid var(--lily-border-strong);
2759
+ border-radius: var(--lily-radius-md);
2760
+ box-shadow: var(--lily-shadow-md);
2761
+ }
2762
+
2763
+ /* Explicit, because the rules above would otherwise beat the UA
2764
+ stylesheet's [hidden] { display: none }. */
2765
+ :where(
2766
+ .theme-picker-list,
2767
+ .locale-picker-list,
2768
+ .text-size-picker-list,
2769
+ .time-zone-picker-list,
2770
+ .motion-picker-list,
2771
+ .link-picker-list,
2772
+ .menu-picker-panel,
2773
+ .settings-picker-panel,
2774
+ .share-picker-list,
2775
+ .search-picker-panel
2776
+ )[hidden] {
2777
+ display: none;
2778
+ }
2779
+
2780
+ /* Popups open under their button, aligned to its start edge, and flip to
2781
+ its end edge (or above it) when they would run off the viewport. A header
2782
+ picker near the right edge otherwise overflows, and focusing the popup
2783
+ scrolls the whole page sideways. `position: fixed` makes the viewport the
2784
+ containing block that the flip fallbacks are checked against; browsers
2785
+ without anchor positioning keep the absolute placement above. */
2786
+ @supports (position-area: block-end) {
2787
+ :where(.theme-picker) { anchor-name: --lily-theme-picker; }
2788
+ :where(.locale-picker) { anchor-name: --lily-locale-picker; }
2789
+ :where(.text-size-picker) { anchor-name: --lily-text-size-picker; }
2790
+ :where(.time-zone-picker) { anchor-name: --lily-time-zone-picker; }
2791
+ :where(.motion-picker) { anchor-name: --lily-motion-picker; }
2792
+ :where(.link-picker) { anchor-name: --lily-link-picker; }
2793
+ :where(.menu-picker) { anchor-name: --lily-menu-picker; }
2794
+ :where(.settings-picker) { anchor-name: --lily-settings-picker; }
2795
+ :where(.share-picker) { anchor-name: --lily-share-picker; }
2796
+ :where(.search-picker) { anchor-name: --lily-search-picker; }
2797
+ :where(.theme-picker-list) { position-anchor: --lily-theme-picker; }
2798
+ :where(.locale-picker-list) { position-anchor: --lily-locale-picker; }
2799
+ :where(.text-size-picker-list) { position-anchor: --lily-text-size-picker; }
2800
+ :where(.time-zone-picker-list) { position-anchor: --lily-time-zone-picker; }
2801
+ :where(.motion-picker-list) { position-anchor: --lily-motion-picker; }
2802
+ :where(.link-picker-list) { position-anchor: --lily-link-picker; }
2803
+ :where(.menu-picker-panel) { position-anchor: --lily-menu-picker; }
2804
+ :where(.settings-picker-panel) { position-anchor: --lily-settings-picker; }
2805
+ :where(.share-picker-list) { position-anchor: --lily-share-picker; }
2806
+ :where(.search-picker-panel) { position-anchor: --lily-search-picker; }
2807
+ :where(
2808
+ .theme-picker-list,
2809
+ .locale-picker-list,
2810
+ .text-size-picker-list,
2811
+ .time-zone-picker-list,
2812
+ .motion-picker-list,
2813
+ .link-picker-list,
2814
+ .menu-picker-panel,
2815
+ .settings-picker-panel,
2816
+ .share-picker-list,
2817
+ .search-picker-panel
2818
+ ) {
2819
+ position: fixed;
2820
+ inset: auto;
2821
+ position-area: block-end span-inline-end;
2822
+ position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
2823
+ min-width: 0;
2824
+ width: max-content;
2825
+ max-width: calc(100vw - 1rem);
2826
+ }
2827
+ }
2828
+
2829
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
2830
+ > :where(
2831
+ .theme-picker-option,
2832
+ .locale-picker-option,
2833
+ .text-size-picker-option,
2834
+ .time-zone-picker-option,
2835
+ .motion-picker-option
2836
+ ) {
2837
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2838
+ border-radius: var(--lily-radius-sm);
2839
+ cursor: pointer;
2840
+ }
2841
+
2842
+ /* data-active is the keyboard cursor (aria-activedescendant); focus
2843
+ stays on the listbox, so this is the only visible cue for it. */
2844
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
2845
+ > :where([data-active]) {
2846
+ background-color: var(--lily-surface-alt);
2847
+ outline: var(--lily-focus-ring);
2848
+ outline-offset: -2px;
2849
+ }
2850
+
2851
+ /* aria-selected marks the applied theme/locale, which is not the
2852
+ same thing as the keyboard cursor. Both can be visible at once. */
2853
+ :where(.theme-picker-list, .locale-picker-list, .text-size-picker-list, .time-zone-picker-list, .motion-picker-list)
2854
+ > :where([aria-selected="true"]) {
2855
+ font-weight: 600;
2856
+ background-color: var(--lily-surface-sunken);
2857
+ }
2858
+
2859
+ /* Locale options inherit the select colours, same as theme options. */
2860
+ :where(.locale-picker-option) {
2861
+ background-color: var(--lily-surface);
2862
+ color: var(--lily-text);
2863
+ }
2864
+
2865
+ /* ----------------------------------------------------------------------
2866
+ * date-time-picker
2867
+ *
2868
+ * The one helper that is a form control rather than a page-header
2869
+ * control, so it is the only one with a text field beside its trigger
2870
+ * and a dialog rather than a listbox. The field itself needs no rules
2871
+ * here: `.date-time-picker-input` already matches the generic
2872
+ * [class$="-input"] baseline further up.
2873
+ * -------------------------------------------------------------------- */
2874
+
2875
+ :where(.date-time-picker-field) {
2876
+ display: flex;
2877
+ align-items: center;
2878
+ gap: var(--lily-space-xs);
2879
+ }
2880
+
2881
+ :where(.date-time-picker-dialog) {
2882
+ position: absolute;
2883
+ z-index: 10;
2884
+ inset-inline-start: 0;
2885
+ margin-block-start: var(--lily-space-xs);
2886
+ padding: var(--lily-space-sm);
2887
+ color: var(--lily-text);
2888
+ background-color: var(--lily-surface);
2889
+ border: var(--border) solid var(--lily-border-strong);
2890
+ border-radius: var(--lily-radius-md);
2891
+ box-shadow: var(--lily-shadow-md);
2892
+ }
2893
+
2894
+ /* Explicit, because the rule above would otherwise beat the UA
2895
+ stylesheet's [hidden] { display: none } — the same trap the
2896
+ listbox popups have to step around. */
2897
+ :where(.date-time-picker-dialog)[hidden] {
2898
+ display: none;
2899
+ }
2900
+
2901
+ :where(.date-time-picker-header) {
2902
+ display: flex;
2903
+ align-items: center;
2904
+ justify-content: space-between;
2905
+ gap: var(--lily-space-xs);
2906
+ margin-block-end: var(--lily-space-xs);
2907
+ }
2908
+
2909
+ /* The month/year heading is a live region, so it must keep its box
2910
+ even while empty — never display:none it. */
2911
+ :where(.date-time-picker-period) {
2912
+ flex: 1;
2913
+ font-weight: 600;
2914
+ text-align: center;
2915
+ }
2916
+
2917
+ /* The four navigation buttons and the footer/shortcut buttons do not
2918
+ end in `-button`, so the generic button family never reaches them. */
2919
+ :where(
2920
+ .date-time-picker-previous-year,
2921
+ .date-time-picker-previous-month,
2922
+ .date-time-picker-previous-week,
2923
+ .date-time-picker-previous-day,
2924
+ .date-time-picker-next-day,
2925
+ .date-time-picker-next-week,
2926
+ .date-time-picker-next-month,
2927
+ .date-time-picker-next-year,
2928
+ .date-time-picker-shortcut,
2929
+ .date-time-picker-clear,
2930
+ .date-time-picker-cancel,
2931
+ .date-time-picker-confirm
2932
+ ) {
2933
+ padding: var(--lily-space-xs) var(--lily-space-sm);
2934
+ font: inherit;
2935
+ color: var(--lily-text);
2936
+ background-color: var(--lily-surface);
2937
+ border: var(--border) solid var(--lily-border-strong);
2938
+ border-radius: var(--lily-radius-sm);
2939
+ cursor: pointer;
2940
+ }
2941
+
2942
+ :where(
2943
+ .date-time-picker-previous-year:hover,
2944
+ .date-time-picker-previous-month:hover,
2945
+ .date-time-picker-previous-week:hover,
2946
+ .date-time-picker-previous-day:hover,
2947
+ .date-time-picker-next-day:hover,
2948
+ .date-time-picker-next-week:hover,
2949
+ .date-time-picker-next-month:hover,
2950
+ .date-time-picker-next-year:hover,
2951
+ .date-time-picker-shortcut:hover,
2952
+ .date-time-picker-clear:hover,
2953
+ .date-time-picker-cancel:hover,
2954
+ .date-time-picker-confirm:hover
2955
+ ) {
2956
+ background-color: var(--lily-surface-alt);
2957
+ }
2958
+
2959
+ /* The commit action is the primary one on the dialog. */
2960
+ :where(.date-time-picker-confirm) {
2961
+ color: var(--color-primary-content);
2962
+ background-color: var(--color-primary);
2963
+ border-color: var(--color-primary);
2964
+ }
2965
+
2966
+ :where(.date-time-picker-calendar) {
2967
+ border-collapse: collapse;
2968
+ table-layout: fixed;
2969
+ }
2970
+
2971
+ :where(.date-time-picker-weekday, .date-time-picker-week-heading) {
2972
+ padding: var(--lily-space-xs);
2973
+ font-size: 0.8125em;
2974
+ font-weight: 600;
2975
+ color: var(--lily-text-muted);
2976
+ }
2977
+
2978
+ /* Week numbers are reference data, not navigation: muted, and set in
2979
+ tabular figures so the column does not shimmer as months change. */
2980
+ :where(.date-time-picker-week) {
2981
+ padding-inline-end: var(--lily-space-xs);
2982
+ font-size: 0.8125em;
2983
+ font-weight: 400;
2984
+ font-variant-numeric: tabular-nums;
2985
+ color: var(--lily-text-muted);
2986
+ text-align: end;
2987
+ }
2988
+
2989
+ :where(.date-time-picker-day) {
2990
+ display: flex;
2991
+ align-items: center;
2992
+ justify-content: center;
2993
+ /* 2rem is a compromise: WCAG 2.5.8 (AA) wants 24px, 2.5.5 (AAA)
2994
+ wants 44px, and seven 44px columns do not fit a 320px viewport
2995
+ alongside dialog chrome. Consumers targeting AAA should enlarge
2996
+ these and let the dialog go full-width on small screens. */
2997
+ min-width: 2rem;
2998
+ min-height: 2rem;
2999
+ padding: 0;
3000
+ font: inherit;
3001
+ font-variant-numeric: tabular-nums;
3002
+ color: var(--lily-text);
3003
+ background: none;
3004
+ border: var(--border) solid transparent;
3005
+ border-radius: var(--lily-radius-sm);
3006
+ cursor: pointer;
3007
+ }
3008
+
3009
+ :where(.date-time-picker-day:hover:not([data-disabled])) {
3010
+ background-color: var(--lily-surface-alt);
3011
+ }
3012
+
3013
+ /* Adjacent-month days stay legible rather than being hidden: they are
3014
+ real, selectable dates, and blanking them makes the grid harder to
3015
+ scan across a month boundary. */
3016
+ :where(.date-time-picker-day[data-outside]) {
3017
+ color: var(--lily-text-muted);
3018
+ }
3019
+
3020
+ /* Today is marked with a border, the selection with a fill. Two
3021
+ different channels, so a day that is both still reads as both. */
3022
+ :where(.date-time-picker-day[data-today]) {
3023
+ border-color: var(--lily-border-strong);
3024
+ font-weight: 600;
3025
+ }
3026
+
3027
+ :where(.date-time-picker-day[data-selected]) {
3028
+ color: var(--color-primary-content);
3029
+ background-color: var(--color-primary);
3030
+ border-color: var(--color-primary);
3031
+ }
3032
+
3033
+ :where(.date-time-picker-day[data-disabled]) {
3034
+ color: var(--lily-text-muted);
3035
+ cursor: not-allowed;
3036
+ /* Struck through as well as dimmed: "unavailable" must not rest on
3037
+ contrast alone (WCAG 1.4.1). */
3038
+ text-decoration: line-through;
3039
+ }
3040
+
3041
+ :where(.date-time-picker-time) {
3042
+ display: flex;
3043
+ flex-wrap: wrap;
3044
+ align-items: center;
3045
+ gap: var(--lily-space-xs);
3046
+ margin-block-start: var(--lily-space-sm);
3047
+ }
3048
+
3049
+ :where(.date-time-picker-time-label) {
3050
+ font-size: 0.8125em;
3051
+ color: var(--lily-text-muted);
3052
+ }
3053
+
3054
+ :where(.date-time-picker-time-zone) {
3055
+ display: flex;
3056
+ flex-wrap: wrap;
3057
+ align-items: center;
3058
+ gap: var(--lily-space-xs);
3059
+ margin-block-end: var(--lily-space-sm);
3060
+ }
3061
+
3062
+ :where(.date-time-picker-time-zone-label) {
3063
+ font-size: 0.8125em;
3064
+ color: var(--lily-text-muted);
3065
+ }
3066
+
3067
+ :where(
3068
+ .date-time-picker-hour,
3069
+ .date-time-picker-minute,
3070
+ .date-time-picker-meridiem,
3071
+ .date-time-picker-time-zone-select
3072
+ ) {
3073
+ padding: var(--lily-space-xs);
3074
+ font: inherit;
3075
+ color: var(--lily-text);
3076
+ background-color: var(--lily-surface);
3077
+ border: var(--border) solid var(--lily-border-strong);
3078
+ border-radius: var(--lily-radius-sm);
3079
+ }
3080
+
3081
+ :where(.date-time-picker-shortcuts) {
3082
+ display: flex;
3083
+ flex-wrap: wrap;
3084
+ gap: var(--lily-space-xs);
3085
+ margin-block-start: var(--lily-space-sm);
3086
+ }
3087
+
3088
+ :where(.date-time-picker-footer) {
3089
+ display: flex;
3090
+ justify-content: flex-end;
3091
+ gap: var(--lily-space-xs);
3092
+ margin-block-start: var(--lily-space-sm);
3093
+ }
3094
+
3095
+ /* Combobox / listbox / autosuggest — non-native variant of <select>. */
3096
+ :where(.combobox, .listbox, .autosuggest) {
3097
+ background-color: var(--lily-surface);
3098
+ border: var(--border) solid var(--lily-border-strong);
3099
+ border-radius: var(--lily-radius-md);
3100
+ }
3101
+
3102
+ /* ==========================================================================
3103
+ * Editorial typography
3104
+ * --------------------------------------------------------------------------
3105
+ * Headlines, body text, byline, blockquote, code — the long-form reading
3106
+ * primitives. Headlines use clamp() so they shrink on narrow viewports
3107
+ * without media queries.
3108
+ * ====================================================================== */
3109
+
3110
+ :where(.headline, .hero-headline, .section-heading) {
3111
+ color: var(--lily-text);
3112
+ font-family: var(--lily-font-body);
3113
+ font-weight: 700;
3114
+ line-height: 1.15;
3115
+ margin: 0 0 0.5rem 0;
3116
+ }
3117
+ :where(.headline) {
3118
+ font-size: clamp(1.5rem, 3vw, 2.25rem);
3119
+ }
3120
+ :where(.hero-headline) {
3121
+ font-size: clamp(2rem, 5vw, 3.5rem);
3122
+ }
3123
+ :where(.section-heading) {
3124
+ font-size: clamp(1.25rem, 2vw, 1.75rem);
3125
+ }
3126
+ /* Body text — 1.6 line-height (sweet spot for reading). */
3127
+ :where(.body-text) {
3128
+ line-height: 1.6;
3129
+ color: var(--lily-text);
3130
+ }
3131
+ /* Byline — author / date line under a headline. */
3132
+ :where(.byline) {
3133
+ color: var(--lily-text-muted);
3134
+ font-size: 0.875rem;
3135
+ }
3136
+ /* Blockquote — primary-coloured rail + italic body. */
3137
+ :where(.blockquote) {
3138
+ margin: 1rem 0;
3139
+ padding: 0.5rem 1rem;
3140
+ border-inline-start: 0.25rem solid var(--color-primary);
3141
+ color: var(--lily-text);
3142
+ font-style: italic;
3143
+ }
3144
+ /* End-notes / related content — top-bordered section at the foot. */
3145
+ :where(.end-notes, .related-content) {
3146
+ margin-top: 2rem;
3147
+ padding-top: 1rem;
3148
+ border-top: var(--border) solid var(--lily-border);
3149
+ }
3150
+ /* Caption / footnote / citation — small muted text. */
3151
+ :where(.caption, .footnote, .citation) {
3152
+ font-size: 0.875rem;
3153
+ color: var(--lily-text-muted);
3154
+ }
3155
+ /* KBD — keyboard key glyph; thicker bottom border simulates the keytop. */
3156
+ :where(.kbd) {
3157
+ display: inline-block;
3158
+ padding: 0.125rem 0.4rem;
3159
+ font-family: var(--lily-font-mono);
3160
+ font-size: 0.85em;
3161
+ background-color: var(--lily-surface-alt);
3162
+ border: var(--border) solid var(--lily-border-strong);
3163
+ border-bottom-width: 2px;
3164
+ border-radius: var(--lily-radius-sm);
3165
+ }
3166
+ /* Inline code — slight background tint + monospaced font. */
3167
+ :where(.code) {
3168
+ font-family: var(--lily-font-mono);
3169
+ padding: 0.1em 0.3em;
3170
+ background-color: var(--lily-surface-alt);
3171
+ border-radius: var(--lily-radius-sm);
3172
+ font-size: 0.9em;
3173
+ }
3174
+ /* Code block — full-width block with horizontal scroll. */
3175
+ :where(.code-block) {
3176
+ display: block;
3177
+ padding: 1rem;
3178
+ background-color: var(--color-neutral);
3179
+ color: var(--color-neutral-content);
3180
+ font-family: var(--lily-font-mono);
3181
+ border-radius: var(--lily-radius-md);
3182
+ overflow-x: auto;
3183
+ white-space: pre;
3184
+ }
3185
+ /* Inset text — left-railed callout for "Important" content
3186
+ (GOV.UK / NHS pattern). */
3187
+ :where(.inset-text) {
3188
+ padding: 0.75rem 1rem;
3189
+ border-inline-start: 0.25rem solid var(--color-primary);
3190
+ background-color: var(--lily-surface-alt);
3191
+ }
3192
+ /* Generic character — monospaced single-glyph display. */
3193
+ :where(.character) {
3194
+ font-family: var(--lily-font-mono);
3195
+ }
3196
+ /* Clamp-text — truncate to N lines (controlled by --lily-clamp-lines). */
3197
+ :where(.clamp-text) {
3198
+ display: -webkit-box;
3199
+ -webkit-line-clamp: var(--lily-clamp-lines, 3);
3200
+ line-clamp: var(--lily-clamp-lines, 3);
3201
+ -webkit-box-orient: vertical;
3202
+ overflow: hidden;
3203
+ }
3204
+ /* Screen-reader-only — visually hidden but available to AT. The
3205
+ classic clip-rect pattern (works in every screen reader). */
3206
+ :where(.screen-reader-span, .middle-truncation-full) {
3207
+ position: absolute;
3208
+ width: 1px;
3209
+ height: 1px;
3210
+ padding: 0;
3211
+ margin: -1px;
3212
+ overflow: hidden;
3213
+ clip: rect(0, 0, 0, 0);
3214
+ white-space: nowrap;
3215
+ border: 0;
3216
+ }
3217
+ /* Middle truncation — a bounded one-line block; the shortened string is aria-hidden and the full
3218
+ text (hidden above) stays in the accessibility tree. */
3219
+ :where(.middle-truncation) {
3220
+ display: block;
3221
+ position: relative;
3222
+ overflow: hidden;
3223
+ white-space: nowrap;
3224
+ }
3225
+ /* Wheel picker — a scrolling listbox that snaps the chosen option to the centre. The selected option is filled with the
3226
+ primary colour (aria-selected, not colour alone: it is also the activedescendant and gets a bold weight). */
3227
+ :where(.wheel-picker-list) {
3228
+ max-block-size: 10em;
3229
+ overflow-y: auto;
3230
+ overscroll-behavior: contain;
3231
+ scroll-snap-type: y mandatory;
3232
+ border: 1px solid var(--color-base-300);
3233
+ border-radius: var(--lily-radius-md);
3234
+ }
3235
+ :where(.wheel-picker-list:focus-visible) {
3236
+ outline: 2px solid var(--lily-focus-ring);
3237
+ outline-offset: 2px;
3238
+ }
3239
+ :where(.wheel-picker-option) {
3240
+ padding: 0.5rem 1rem;
3241
+ scroll-snap-align: center;
3242
+ cursor: pointer;
3243
+ }
3244
+ :where(.wheel-picker-option[aria-selected="true"]) {
3245
+ background-color: var(--color-primary);
3246
+ color: var(--color-primary-content);
3247
+ font-weight: 600;
3248
+ }
3249
+ :where(.wheel-picker-option[aria-disabled="true"]) {
3250
+ opacity: 0.5;
3251
+ cursor: not-allowed;
3252
+ }
3253
+
3254
+ /* ==========================================================================
3255
+ * Hero, figure, photo, media
3256
+ * ====================================================================== */
3257
+
3258
+ /* Hero block — primary-filled banner with centred content. clamp() pad
3259
+ scales vertically across viewport sizes. */
3260
+ :where(.hero) {
3261
+ display: block;
3262
+ padding: clamp(2rem, 5vw, 4rem) 1rem;
3263
+ background-color: var(--color-primary);
3264
+ color: var(--color-primary-content);
3265
+ border-radius: var(--lily-radius-lg);
3266
+ text-align: center;
3267
+ }
3268
+ /* Figure — centred block with vertical margin. */
3269
+ :where(.figure) {
3270
+ margin: 1rem 0;
3271
+ text-align: center;
3272
+ }
3273
+ /* Feature photo — responsive lead image. */
3274
+ :where(.feature-photo) {
3275
+ display: block;
3276
+ width: 100%;
3277
+ height: auto;
3278
+ border-radius: var(--lily-radius-md);
3279
+ }
3280
+ /* Photo pack — responsive grid of thumbnails. */
3281
+ :where(.photo-pack) {
3282
+ display: grid;
3283
+ grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
3284
+ gap: 0.5rem;
3285
+ }
3286
+ /* Generic image — responsive block image. */
3287
+ :where(.image) {
3288
+ max-width: 100%;
3289
+ height: auto;
3290
+ display: block;
3291
+ }
3292
+ /* QR / barcode / signature — frame them as a labelled tile. */
3293
+ :where(.qr-code-image, .barcode-image, .signature-pad) {
3294
+ display: inline-block;
3295
+ background-color: var(--lily-surface);
3296
+ border: var(--border) solid var(--lily-border);
3297
+ border-radius: var(--lily-radius-md);
3298
+ padding: 0.5rem;
3299
+ }
3300
+ /* Signature pad — drawable surface; crosshair cursor signals input. */
3301
+ :where(.signature-pad) {
3302
+ min-height: 8rem;
3303
+ cursor: crosshair;
3304
+ }
3305
+ /* Video player — responsive black-letterboxed frame. */
3306
+ :where(.video-player) {
3307
+ display: block;
3308
+ width: 100%;
3309
+ max-width: 100%;
3310
+ border-radius: var(--lily-radius-md);
3311
+ /* Video chrome is black in every theme; pair the text colour with
3312
+ it here rather than inheriting the theme's (possibly dark)
3313
+ content colour onto a black surface. */
3314
+ background-color: black;
3315
+ color: white;
3316
+ }
3317
+
3318
+ /* ==========================================================================
3319
+ * Mockups & pictograms
3320
+ * --------------------------------------------------------------------------
3321
+ * Device frames for screenshots / illustrations — browser, phone, tablet,
3322
+ * laptop, watch, shell window. All share the same rounded-outline frame
3323
+ * baseline; specific frames override the radius / border-width.
3324
+ * ====================================================================== */
3325
+
3326
+ :where(
3327
+ .mockup-browser,
3328
+ .mockup-window,
3329
+ .mockup-shell,
3330
+ .mockup-phone-portrait,
3331
+ .mockup-phone-landscape,
3332
+ .mockup-tablet-portrait,
3333
+ .mockup-tablet-landscape,
3334
+ .mockup-laptop,
3335
+ .mockup-watch
3336
+ ) {
3337
+ display: block;
3338
+ background-color: var(--lily-surface);
3339
+ border: 2px solid var(--color-neutral);
3340
+ border-radius: var(--lily-radius-lg);
3341
+ overflow: hidden;
3342
+ box-shadow: var(--lily-shadow-md);
3343
+ }
3344
+ /* Mockup shell — terminal window; dark neutral fill + mono font. */
3345
+ :where(.mockup-shell) {
3346
+ background-color: var(--color-neutral);
3347
+ color: var(--color-neutral-content);
3348
+ font-family: var(--lily-font-mono);
3349
+ padding: 1rem;
3350
+ }
3351
+ /* Phones — heavier bezel (6px) and more rounded corners. */
3352
+ :where(.mockup-phone-portrait, .mockup-phone-landscape) {
3353
+ border-radius: 1.5rem;
3354
+ border-width: 6px;
3355
+ }
3356
+ /* Smartwatch — chunky bezel (4px) and pill radius. */
3357
+ :where(.mockup-watch) {
3358
+ border-radius: 1rem;
3359
+ border-width: 4px;
3360
+ }
3361
+ /* Pictogram — stacked icon + caption, centred. */
3362
+ :where(.pictogram) {
3363
+ display: inline-flex;
3364
+ flex-direction: column;
3365
+ align-items: center;
3366
+ gap: 0.5rem;
3367
+ padding: 1rem;
3368
+ text-align: center;
3369
+ }
3370
+
3371
+ /* ==========================================================================
3372
+ * Charts (containers only — content supplied by consumer)
3373
+ * --------------------------------------------------------------------------
3374
+ * Headless: Lily provides the frame + a 6-colour palette as custom
3375
+ * properties. The consumer's chart library (D3, Chart.js, ECharts, etc.)
3376
+ * reads `var(--lily-chart-color-1..6)` for its series colours.
3377
+ * ====================================================================== */
3378
+
3379
+ :where(
3380
+ .area-chart,
3381
+ .bar-chart,
3382
+ .column-chart,
3383
+ .line-chart,
3384
+ .scatter-chart,
3385
+ .sparkline,
3386
+ .tile-map,
3387
+ .graphic-block
3388
+ ) {
3389
+ display: block;
3390
+ background-color: var(--lily-surface);
3391
+ border-radius: var(--lily-radius-md);
3392
+ padding: 1rem;
3393
+ color: var(--lily-text);
3394
+ /* Six-colour palette — the consumer's chart library picks these up. */
3395
+ --lily-chart-color-1: var(--color-primary);
3396
+ --lily-chart-color-2: var(--color-secondary);
3397
+ --lily-chart-color-3: var(--color-accent);
3398
+ --lily-chart-color-4: var(--color-info);
3399
+ --lily-chart-color-5: var(--color-success);
3400
+ --lily-chart-color-6: var(--color-warning);
3401
+ }
3402
+ /* Sparkline — small inline chart; no padding. */
3403
+ :where(.sparkline) {
3404
+ padding: 0;
3405
+ height: 1.5rem;
3406
+ width: 6rem;
3407
+ display: inline-block;
3408
+ }
3409
+ /* Graphic block — bordered chart container. */
3410
+ :where(.graphic-block) {
3411
+ border: var(--border) solid var(--lily-border);
3412
+ }
3413
+
3414
+ /* ==========================================================================
3415
+ * Scrolling, splits, resize
3416
+ * ====================================================================== */
3417
+
3418
+ /* Scroll area — capped at 20rem, auto-overflow. */
3419
+ :where(.scroll-area) {
3420
+ overflow: auto;
3421
+ max-height: 20rem;
3422
+ }
3423
+ /* Horizontal scroller — flex row that overflows on x. */
3424
+ :where(.horizontal-scroller) {
3425
+ overflow-x: auto;
3426
+ display: flex;
3427
+ gap: 0.5rem;
3428
+ }
3429
+ /* Scroller (Reuters-pattern scrollytelling) — positioning anchor. */
3430
+ :where(.scroller, .scroller-base, .scroller-video) {
3431
+ position: relative;
3432
+ display: block;
3433
+ }
3434
+ /* Custom scrollbar track. */
3435
+ :where(.scroll-bar) {
3436
+ background-color: var(--lily-surface-sunken);
3437
+ border-radius: 999px;
3438
+ height: 0.5rem;
3439
+ }
3440
+ /* Affix — stick to the top of the viewport on scroll. */
3441
+ :where(.affix) {
3442
+ position: sticky;
3443
+ inset-block-start: 0;
3444
+ }
3445
+ /* Visible — IntersectionObserver target; baseline is a visible block. */
3446
+ :where(.visible) {
3447
+ display: block;
3448
+ }
3449
+ /* Resizable — native CSS resize handle (corner). */
3450
+ :where(.resizable) {
3451
+ resize: both;
3452
+ overflow: auto;
3453
+ }
3454
+ /* Split-view + splitter — two-pane horizontal layout. */
3455
+ :where(.split-view) {
3456
+ display: flex;
3457
+ align-items: stretch;
3458
+ gap: 0;
3459
+ }
3460
+ :where(.splitter) {
3461
+ flex: 0 0 0.375rem;
3462
+ background-color: var(--lily-border);
3463
+ cursor: col-resize;
3464
+ }
3465
+
3466
+ /* ==========================================================================
3467
+ * Misc unique components
3468
+ * ====================================================================== */
3469
+
3470
+ /* Statistic — stacked label + value; value is large and primary-coloured. */
3471
+ :where(.statistic) {
3472
+ display: inline-flex;
3473
+ flex-direction: column;
3474
+ gap: 0.25rem;
3475
+ }
3476
+ :where(.statistic > [data-part="value"]) {
3477
+ font-size: 1.5rem;
3478
+ font-weight: 700;
3479
+ color: var(--color-primary);
3480
+ }
3481
+ /* Watermark — diagonal repeating-line pattern at 8% opacity behind content. */
3482
+ :where(.watermark) {
3483
+ position: absolute;
3484
+ inset: 0;
3485
+ pointer-events: none;
3486
+ opacity: 0.08;
3487
+ background: repeating-linear-gradient(
3488
+ -45deg,
3489
+ var(--lily-text) 0 1px,
3490
+ transparent 1px 8rem
3491
+ );
3492
+ }
3493
+ /* Beach ball (macOS "waiting" indicator) — six-colour conic wheel. */
3494
+ :where(.beach-ball) {
3495
+ display: inline-block;
3496
+ width: 2rem;
3497
+ height: 2rem;
3498
+ border-radius: 50%;
3499
+ background: conic-gradient(
3500
+ var(--color-error),
3501
+ var(--color-warning),
3502
+ var(--color-success),
3503
+ var(--color-info),
3504
+ var(--color-primary),
3505
+ var(--color-error)
3506
+ );
3507
+ animation: lily-spin 2s linear infinite;
3508
+ }
3509
+ /* Diff — side-by-side two-column comparison. */
3510
+ :where(.diff) {
3511
+ display: grid;
3512
+ grid-template-columns: 1fr 1fr;
3513
+ gap: 0.5rem;
3514
+ }
3515
+ /* Addressograph box — paper-form ID label (NHS / hospital pattern). */
3516
+ :where(.addressograph-box) {
3517
+ display: block;
3518
+ padding: 0.75rem 1rem;
3519
+ background-color: var(--lily-surface-alt);
3520
+ border: 2px solid var(--lily-text);
3521
+ font-family: var(--lily-font-mono);
3522
+ line-height: 1.4;
3523
+ }
3524
+ /* Government identifier — dark chrome bar containing an ID number. */
3525
+ :where(.government-identifier) {
3526
+ display: flex;
3527
+ align-items: center;
3528
+ gap: 0.75rem;
3529
+ padding: 0.75rem 1rem;
3530
+ background-color: var(--color-neutral);
3531
+ color: var(--color-neutral-content);
3532
+ }
3533
+ /* Share / signup / CTA panels — alt-surface promo blocks. */
3534
+ :where(.share-page, .newsletter-signup, .call-to-action) {
3535
+ padding: 1rem;
3536
+ background-color: var(--lily-surface-alt);
3537
+ border-radius: var(--lily-radius-md);
3538
+ }
3539
+ /* CTA — override with primary fill so it reads as the page action. */
3540
+ :where(.call-to-action) {
3541
+ background-color: var(--color-primary);
3542
+ color: var(--color-primary-content);
3543
+ }
3544
+ /* Links inside the call-to-action inherit its content colour —
3545
+ otherwise the UA default link blue lands on the primary fill. */
3546
+ :where(.call-to-action) :where(a) {
3547
+ color: inherit;
3548
+ }
3549
+ /* Expander / collapsible / details — boxed disclosure controls. */
3550
+ :where(.expander, .collapsible, .details) {
3551
+ display: block;
3552
+ border: var(--border) solid var(--lily-border);
3553
+ border-radius: var(--lily-radius-md);
3554
+ padding: 0.5rem 1rem;
3555
+ }
3556
+ :where(.details > summary, .expander > summary, .collapsible > summary) {
3557
+ cursor: pointer;
3558
+ font-weight: 600;
3559
+ padding: 0.25rem 0;
3560
+ }
3561
+ /* Carousel — horizontal scroller with snap-points so each slide locks
3562
+ into view as the user swipes. */
3563
+ :where(.carousel) {
3564
+ display: flex;
3565
+ overflow-x: auto;
3566
+ scroll-snap-type: x mandatory;
3567
+ gap: 0.5rem;
3568
+ }
3569
+ :where(.carousel > *) {
3570
+ scroll-snap-align: start;
3571
+ flex: 0 0 auto;
3572
+ }
3573
+
3574
+ /* --- Semantic entities — neutral display blocks. ----------------------- */
3575
+ :where(
3576
+ .person,
3577
+ .organization,
3578
+ .place,
3579
+ .event,
3580
+ .comment,
3581
+ .question,
3582
+ .answer
3583
+ ) {
3584
+ display: block;
3585
+ padding: 0.75rem 0;
3586
+ }
3587
+ /* Draft wrapper — dashed border + optional "Draft" pill prefix. */
3588
+ :where(.draft) {
3589
+ border: 1px dashed var(--lily-border-strong);
3590
+ background-color: var(--lily-surface-alt);
3591
+ padding: 1rem;
3592
+ border-radius: var(--lily-radius-md);
3593
+ }
3594
+ :where(.draft[data-status="draft"])::before {
3595
+ content: "Draft";
3596
+ display: inline-block;
3597
+ margin-inline-end: 0.5rem;
3598
+ padding: 0.125rem 0.5rem;
3599
+ background-color: var(--color-warning);
3600
+ color: var(--color-warning-content);
3601
+ border-radius: 999px;
3602
+ font-size: 0.75rem;
3603
+ font-weight: 600;
3604
+ }
3605
+
3606
+ /* Dial — circular gauge driven by --dial-value (0–100). */
3607
+ :where(.dial) {
3608
+ display: inline-block;
3609
+ width: 4rem;
3610
+ height: 4rem;
3611
+ border-radius: 50%;
3612
+ background: conic-gradient(
3613
+ var(--color-primary) calc(var(--dial-value, 0) * 1%),
3614
+ var(--lily-surface-sunken) 0
3615
+ );
3616
+ }
3617
+
3618
+ /* File upload — drop-zone aesthetic: dashed border, alt surface. */
3619
+ :where(.file-upload) {
3620
+ display: block;
3621
+ padding: 1.5rem;
3622
+ background-color: var(--lily-surface-alt);
3623
+ border: 2px dashed var(--lily-border-strong);
3624
+ border-radius: var(--lily-radius-md);
3625
+ text-align: center;
3626
+ cursor: pointer;
3627
+ }
3628
+ /* File manager — surface-coloured frame holding a file list. */
3629
+ :where(.file-manager) {
3630
+ display: block;
3631
+ background-color: var(--lily-surface);
3632
+ border: var(--border) solid var(--lily-border);
3633
+ border-radius: var(--lily-radius-md);
3634
+ padding: 0.5rem;
3635
+ }
3636
+ /* Transfer list — two columns + central button stack. */
3637
+ :where(.transfer-list) {
3638
+ display: grid;
3639
+ grid-template-columns: 1fr auto 1fr;
3640
+ gap: 0.5rem;
3641
+ align-items: center;
3642
+ }
3643
+
3644
+ /* Tour — onboarding card with medium elevation. */
3645
+ :where(.tour) {
3646
+ display: block;
3647
+ background-color: var(--lily-surface);
3648
+ border: var(--border) solid var(--lily-border);
3649
+ border-radius: var(--lily-radius-lg);
3650
+ padding: 1rem;
3651
+ box-shadow: var(--lily-shadow-md);
3652
+ }
3653
+
3654
+ /* Editable text — dashed underline indicates click-to-edit. */
3655
+ :where(.editable) {
3656
+ display: inline-block;
3657
+ padding: 0.125rem 0.25rem;
3658
+ border-bottom: 1px dashed var(--lily-border-strong);
3659
+ cursor: text;
3660
+ }
3661
+ /* Editing state — alt surface + primary underline. */
3662
+ :where(.editable[aria-expanded="true"]) {
3663
+ background-color: var(--lily-surface-alt);
3664
+ border-bottom-color: var(--color-primary);
3665
+ }
3666
+
3667
+ /* Accordion-checkbox — a checkbox that toggles a panel via sibling
3668
+ combinator (no JS needed). */
3669
+ :where(.accordion-checkbox) {
3670
+ display: block;
3671
+ border: var(--border) solid var(--lily-border);
3672
+ border-radius: var(--lily-radius-md);
3673
+ padding: 0.5rem 0.75rem;
3674
+ }
3675
+ :where(.accordion-checkbox-input) {
3676
+ margin-inline-end: 0.5rem;
3677
+ }
3678
+ :where(.accordion-checkbox-panel) {
3679
+ display: none;
3680
+ padding-block-start: 0.5rem;
3681
+ }
3682
+ /* Reveal the panel when the input is checked. */
3683
+ :where(.accordion-checkbox-input:checked ~ .accordion-checkbox-panel) {
3684
+ display: block;
3685
+ }
3686
+
3687
+ /* Icon — 1em square container; sizes with surrounding text. */
3688
+ :where(.icon) {
3689
+ display: inline-flex;
3690
+ align-items: center;
3691
+ justify-content: center;
3692
+ width: 1em;
3693
+ height: 1em;
3694
+ flex: 0 0 auto;
3695
+ }
3696
+
3697
+ /* Emoji — inline glyph; not italicised. */
3698
+ :where(.emoji) {
3699
+ display: inline-block;
3700
+ font-style: normal;
3701
+ }
3702
+
3703
+ /* Slider — primary-filled track based on --slider-value (0–100). */
3704
+ :where(.slider) {
3705
+ display: block;
3706
+ width: 100%;
3707
+ height: 1.5rem;
3708
+ background: linear-gradient(
3709
+ to right,
3710
+ var(--color-primary) calc(var(--slider-value, 50) * 1%),
3711
+ var(--lily-surface-sunken) 0
3712
+ );
3713
+ border-radius: 999px;
3714
+ }
3715
+
3716
+ /* Timer — fixed-width digits so the display doesn't jiggle as it ticks. */
3717
+ :where(.timer) {
3718
+ display: inline-block;
3719
+ font-family: var(--lily-font-mono);
3720
+ font-variant-numeric: tabular-nums;
3721
+ font-weight: 600;
3722
+ }
3723
+
3724
+ /* Medical banner inner boxes — spacing-only override. */
3725
+ :where(.medical-banner-box-for-advice, .medical-banner-box-for-danger) {
3726
+ padding: 0.75rem 1rem;
3727
+ border-radius: var(--lily-radius-md);
3728
+ margin: 0.25rem 0;
3729
+ }
3730
+
3731
+ /* ==========================================================================
3732
+ * Print
3733
+ * --------------------------------------------------------------------------
3734
+ * On paper, transient/floating chrome (skip-link, FAB, toast, tooltip)
3735
+ * is meaningless — hide it. Card-like surfaces drop their drop-shadow
3736
+ * and shift to a high-contrast outline so they're readable in monochrome.
3737
+ * ====================================================================== */
3738
+ @media print {
3739
+ :where(
3740
+ .skip-link,
3741
+ .float-button,
3742
+ .toast,
3743
+ .sonner,
3744
+ .tooltip,
3745
+ .coachmark
3746
+ ) {
3747
+ display: none !important;
3748
+ }
3749
+ :where(.card, .panel, .dialog, .alert) {
3750
+ box-shadow: none;
3751
+ border-color: var(--lily-text);
3752
+ }
3753
+ }
3754
+ }
3755
+
3756
+ /* ============================================================================
3757
+ * WCAG 2.2 target-size (minimum) floor — 2.5.8
3758
+ *
3759
+ * Every interactive Lily hook offers a >=24x24 CSS-pixel target. Links
3760
+ * that render as short inline text (a pagination "1", a breadcrumb crumb)
3761
+ * fail the 24px floor under typographic sizing alone, so the link-shaped
3762
+ * hooks become inline-block with a minimum box. :where() keeps specificity
3763
+ * at zero, so any consumer rule still wins. Shared verbatim by all themes.
3764
+ * ========================================================================= */
3765
+
3766
+ :where(.action-link,
3767
+ .back-link,
3768
+ .breadcrumb-list-item > a,
3769
+ .pagination-list-item > a,
3770
+ .contents-list-item > a,
3771
+ .section-list-item > a) {
3772
+ display: inline-block;
3773
+ min-inline-size: 24px;
3774
+ min-block-size: 24px;
3775
+ }
3776
+
3777
+ :where(.pagination-list-item > a) {
3778
+ text-align: center;
3779
+ }
3780
+
3781
+ :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
3782
+ min-block-size: 24px;
3783
+ }
3784
+
3785
+ /* ============================================================================
3786
+ * Overflow guards — narrow-viewport safety, shared verbatim by all themes.
3787
+ *
3788
+ * Content that is intrinsically wider than the viewport scrolls or wraps
3789
+ * within its own box instead of pushing the page wider. Deliberately NOT
3790
+ * `display: block` on <table> — that strips implicit table semantics for
3791
+ * assistive technology; capping width and letting cell content wrap keeps
3792
+ * both the layout and the roles. Proven in the example apps' own
3793
+ * stylesheets before the theme layer took over component styling.
3794
+ * ========================================================================= */
3795
+
3796
+ :where(pre) {
3797
+ max-width: 100%;
3798
+ overflow-x: auto;
3799
+ }
3800
+
3801
+ :where(table) {
3802
+ max-width: 100%;
3803
+ }
3804
+
3805
+ :where(th, td) {
3806
+ overflow-wrap: anywhere;
3807
+ }
3808
+
3809
+ :where(a, code) {
3810
+ overflow-wrap: anywhere;
3811
+ }
3812
+
3813
+ /* ============================================================================
3814
+ * Helper packages — layout and look, shared verbatim by all themes.
3815
+ *
3816
+ * The data grid, kanban board, Gantt chart and calendar view are wide by nature.
3817
+ * Each root scrolls sideways inside its own box and its table sizes to its content,
3818
+ * so a narrow screen scrolls the table instead of wrapping every cell to a letter
3819
+ * (the overflow guard above lets cells break anywhere, which is right for prose and
3820
+ * wrong for a table that has a scroller). The toolbar controls of all four helpers
3821
+ * share the data grid's look, every button has a >=24px target (WCAG 2.2 2.5.8), and
3822
+ * the Gantt chart draws its bars from `data-in-range`, a milestone as a diamond and
3823
+ * today as a rule. :where() keeps specificity at zero, so any consumer rule wins.
3824
+ * ========================================================================= */
3825
+
3826
+ :where(.data-grid, .kanban-board, .gantt-chart, .calendar-view) {
3827
+ max-inline-size: 100%;
3828
+ overflow-x: auto;
3829
+ }
3830
+
3831
+ :where(.data-grid table, .kanban-board table, .gantt-chart table, .calendar-view table) {
3832
+ inline-size: max-content;
3833
+ min-inline-size: 100%;
3834
+ }
3835
+
3836
+ :where(.kanban-board-export, .gantt-chart-export, .gantt-chart-zoom, .calendar-view-export,
3837
+ .calendar-view-toolbar, .calendar-view-nav, .calendar-view-switcher) {
3838
+ display: flex;
3839
+ flex-wrap: wrap;
3840
+ gap: var(--lily-space-sm);
3841
+ align-items: center;
3842
+ margin-block-end: var(--lily-space-sm);
3843
+ }
3844
+
3845
+ :where(.kanban-board-search, .gantt-chart-search, .calendar-view-search) {
3846
+ padding: var(--lily-space-xs) var(--lily-space-sm);
3847
+ border: var(--border) solid var(--lily-border);
3848
+ border-radius: var(--lily-radius-sm);
3849
+ background-color: var(--lily-surface);
3850
+ color: var(--lily-text);
3851
+ font: inherit;
3852
+ min-block-size: 24px;
3853
+ }
3854
+
3855
+ :where(.kanban-board-export-button,
3856
+ .kanban-board-add-button,
3857
+ .kanban-board-undo-button,
3858
+ .kanban-board-collapse-button,
3859
+ .kanban-board-lane-toggle,
3860
+ .kanban-board-move-button,
3861
+ .gantt-chart-export-button,
3862
+ .gantt-chart-zoom-in-button,
3863
+ .gantt-chart-zoom-out-button,
3864
+ .gantt-chart-collapse-button,
3865
+ .gantt-chart-collapse-all-button,
3866
+ .gantt-chart-expand-all-button,
3867
+ .gantt-chart-save-button,
3868
+ .gantt-chart-cancel-button,
3869
+ .calendar-view-export-button,
3870
+ .calendar-view-previous-button,
3871
+ .calendar-view-next-button,
3872
+ .calendar-view-today-button,
3873
+ .calendar-view-switcher-button) {
3874
+ padding: var(--lily-space-xs) var(--lily-space-md);
3875
+ border: var(--border) solid var(--lily-border);
3876
+ border-radius: var(--lily-radius-sm);
3877
+ background-color: var(--lily-surface);
3878
+ color: var(--lily-text);
3879
+ font: inherit;
3880
+ cursor: pointer;
3881
+ min-inline-size: 24px;
3882
+ min-block-size: 24px;
3883
+ }
3884
+
3885
+ :where(.kanban-board-export-button:disabled,
3886
+ .kanban-board-add-button:disabled,
3887
+ .kanban-board-undo-button:disabled,
3888
+ .gantt-chart-export-button:disabled,
3889
+ .gantt-chart-zoom-in-button:disabled,
3890
+ .gantt-chart-zoom-out-button:disabled,
3891
+ .calendar-view-export-button:disabled,
3892
+ .calendar-view-previous-button[aria-disabled="true"],
3893
+ .calendar-view-next-button[aria-disabled="true"]) {
3894
+ opacity: 0.5;
3895
+ cursor: not-allowed;
3896
+ }
3897
+
3898
+ :where(.calendar-view-switcher-button[aria-pressed="true"]) {
3899
+ background-color: var(--color-base-300);
3900
+ font-weight: 600;
3901
+ }
3902
+
3903
+ :where(.kanban-board-status, .gantt-chart-status, .calendar-view-status) {
3904
+ margin-block-start: var(--lily-space-sm);
3905
+ font-size: 0.875em;
3906
+ opacity: 0.8;
3907
+ }
3908
+
3909
+ :where(.calendar-view-event) {
3910
+ display: block;
3911
+ padding: 0 var(--lily-space-xs);
3912
+ border-radius: var(--lily-radius-sm);
3913
+ background-color: color-mix(in srgb, var(--color-primary) 18%, transparent);
3914
+ font-size: 0.75rem;
3915
+ }
3916
+
3917
+ :where(.gantt-table-th) {
3918
+ min-inline-size: 2rem;
3919
+ padding-inline: 0.25rem;
3920
+ font-size: 0.75rem;
3921
+ text-align: center;
3922
+ white-space: nowrap;
3923
+ }
3924
+
3925
+ :where(.gantt-table-th[scope="row"], .gantt-table-th:first-child) {
3926
+ min-inline-size: 10rem;
3927
+ padding-inline: var(--lily-space-sm);
3928
+ font-size: inherit;
3929
+ text-align: start;
3930
+ white-space: normal;
3931
+ }
3932
+
3933
+ :where(.gantt-table-td) {
3934
+ min-block-size: 1.7rem;
3935
+ padding: 0;
3936
+ }
3937
+
3938
+ :where(.gantt-table-td[data-in-range]) {
3939
+ background-color: var(--color-primary);
3940
+ }
3941
+
3942
+ :where(.gantt-table-td[data-in-range][data-milestone]) {
3943
+ clip-path: polygon(50% 8%, 92% 50%, 50% 92%, 8% 50%);
3944
+ }
3945
+
3946
+ :where(.gantt-table-td[data-today]) {
3947
+ border-inline-start: 2px solid var(--color-accent);
3948
+ }
3949
+
3950
+ /* The time zone picker's options are long ("UTC+10:30 – Lord Howe Daylight Time"): size the list to its widest
3951
+ option up to a cap, then wrap, rather than clipping the name or running off a phone. */
3952
+ :where(.time-zone-picker-list) {
3953
+ inline-size: max-content;
3954
+ max-inline-size: min(26rem, 90vw);
3955
+ max-block-size: min(24rem, 70vh);
3956
+ overflow-y: auto;
3957
+ }
3958
+
3959
+ :where(.time-zone-picker-option) {
3960
+ overflow-wrap: anywhere;
3961
+ }