@profullstack/css 0.2.0 → 0.3.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.
@@ -0,0 +1,1399 @@
1
+ /*
2
+ * Profullstack CSS: widgets layer.
3
+ *
4
+ * Composed interface pieces built from the same tokens: scrollers with
5
+ * previous/next arrows, a TV (10-foot) input mode, icon buttons with counts,
6
+ * menus, media rows, avatars, calendars, date and color pickers, switches,
7
+ * segmented controls, tabs, toasts, breadcrumbs, pagination, steps, stats,
8
+ * progress rings, ratings, drop zones, timelines and an inbox layout.
9
+ *
10
+ * Plain CSS. Anything that needs behaviour (paging a scroller, switching
11
+ * tabs, choosing a date) is the app's job; the examples show a few lines of
12
+ * script for each. Everything lives in the pf.widgets cascade layer, after
13
+ * pf.components and before pf.platform, so app rules still win.
14
+ */
15
+
16
+ /* Registered so the scroller edge fades can animate (scroll-driven). */
17
+ @property --pf-fade-start {
18
+ syntax: "<length>";
19
+ inherits: false;
20
+ initial-value: 0px;
21
+ }
22
+
23
+ @property --pf-fade-end {
24
+ syntax: "<length>";
25
+ inherits: false;
26
+ initial-value: 0px;
27
+ }
28
+
29
+ @layer pf.widgets {
30
+ /* ------------------------------------------------------------------
31
+ * Layout helper: justify a .cluster.
32
+ * ------------------------------------------------------------------ */
33
+
34
+ .cluster[data-justify="between"] { justify-content: space-between; }
35
+ .cluster[data-justify="end"] { justify-content: flex-end; }
36
+ .cluster[data-justify="center"] { justify-content: center; }
37
+
38
+ /* ------------------------------------------------------------------
39
+ * Scroller: any overflowing row (or column, data-axis="block").
40
+ * Put focusable items inside and keyboard, D-pad and touch all work:
41
+ * moving focus scrolls the item into view with room to spare.
42
+ * Wrap it in .scroller-frame with two <button data-scroll="prev|next">
43
+ * for visible arrows; the app pages the scroller when they are pressed.
44
+ * ------------------------------------------------------------------ */
45
+
46
+ .stack > :is(.segmented, .avatar-group, .rating, .ring, .swatches) { align-self: flex-start; }
47
+
48
+ .scroller {
49
+ display: flex;
50
+ gap: var(--pf-space-4);
51
+ list-style: none;
52
+ margin: 0;
53
+ overflow-x: auto;
54
+ overflow-y: hidden;
55
+ overscroll-behavior-x: contain;
56
+ padding: var(--pf-space-3) var(--pf-space-1) var(--pf-space-4);
57
+ scroll-padding-inline: var(--pf-scroller-inset, var(--pf-space-6));
58
+ scroll-snap-type: x proximity;
59
+ scrollbar-color: var(--pf-color-border) transparent;
60
+ scrollbar-width: thin;
61
+ }
62
+
63
+ .scroller > * {
64
+ flex: 0 0 var(--pf-scroller-item, 14rem);
65
+ min-inline-size: 0;
66
+ scroll-margin-inline: var(--pf-scroller-inset, var(--pf-space-6));
67
+ scroll-snap-align: start;
68
+ }
69
+
70
+ .scroller[data-axis="block"] {
71
+ flex-direction: column;
72
+ max-block-size: var(--pf-scroller-height, 24rem);
73
+ overflow-x: hidden;
74
+ overflow-y: auto;
75
+ overscroll-behavior-y: contain;
76
+ padding: var(--pf-space-1) var(--pf-space-3);
77
+ scroll-padding-block: var(--pf-space-4);
78
+ scroll-snap-type: y proximity;
79
+ }
80
+
81
+ .scroller[data-axis="block"] > * {
82
+ flex: 0 0 auto;
83
+ scroll-margin-block: var(--pf-space-4);
84
+ }
85
+
86
+ .scroller:focus-visible { outline-offset: -3px; }
87
+
88
+ /* Soft edges that show there is more to scroll, where scroll timelines exist. */
89
+ @supports (animation-timeline: scroll()) {
90
+ .scroller {
91
+ animation: pf-scroller-fade linear both;
92
+ animation-timeline: scroll(self inline);
93
+ mask-image: linear-gradient(to right, transparent, #000 var(--pf-fade-start), #000 calc(100% - var(--pf-fade-end)), transparent);
94
+ }
95
+
96
+ .scroller[data-axis="block"] {
97
+ animation-timeline: scroll(self block);
98
+ mask-image: linear-gradient(to bottom, transparent, #000 var(--pf-fade-start), #000 calc(100% - var(--pf-fade-end)), transparent);
99
+ }
100
+
101
+ .scroller:dir(rtl):not([data-axis="block"]) {
102
+ mask-image: linear-gradient(to left, transparent, #000 var(--pf-fade-start), #000 calc(100% - var(--pf-fade-end)), transparent);
103
+ }
104
+ }
105
+
106
+ @keyframes pf-scroller-fade {
107
+ 0% { --pf-fade-start: 0px; --pf-fade-end: 3rem; }
108
+ 8%, 92% { --pf-fade-start: 3rem; --pf-fade-end: 3rem; }
109
+ 100% { --pf-fade-start: 3rem; --pf-fade-end: 0px; }
110
+ }
111
+
112
+ .scroller-frame {
113
+ position: relative;
114
+ }
115
+
116
+ .scroller-frame > [data-scroll] {
117
+ align-items: center;
118
+ background: var(--pf-color-surface);
119
+ block-size: 3rem;
120
+ border: 1px solid var(--pf-color-border);
121
+ border-radius: var(--pf-radius-pill);
122
+ box-shadow: var(--pf-shadow-md);
123
+ color: var(--pf-color-ink);
124
+ display: inline-flex;
125
+ font-size: 1.25rem;
126
+ inline-size: 3rem;
127
+ inset-block-start: 50%;
128
+ justify-content: center;
129
+ min-height: 0;
130
+ padding: 0;
131
+ position: absolute;
132
+ transition: opacity var(--pf-transition-fast), border-color var(--pf-transition-fast), color var(--pf-transition-fast);
133
+ translate: 0 -50%;
134
+ z-index: 2;
135
+ }
136
+
137
+ .scroller-frame > [data-scroll]:hover {
138
+ background: var(--pf-color-surface);
139
+ border-color: var(--pf-color-primary);
140
+ color: var(--pf-color-primary);
141
+ }
142
+
143
+ .scroller-frame > [data-scroll="prev"] { inset-inline-start: var(--pf-space-2); }
144
+ .scroller-frame > [data-scroll="next"] { inset-inline-end: var(--pf-space-2); }
145
+
146
+ .scroller-frame > [data-scroll]:disabled {
147
+ opacity: 0;
148
+ pointer-events: none;
149
+ }
150
+
151
+ .scroller-frame:has(> .scroller[data-axis="block"]) > [data-scroll] {
152
+ inset-block-start: auto;
153
+ inset-inline: 50% auto;
154
+ translate: -50% 0;
155
+ }
156
+
157
+ .scroller-frame:has(> .scroller[data-axis="block"]) > [data-scroll="prev"] { inset-block-start: var(--pf-space-1); }
158
+ .scroller-frame:has(> .scroller[data-axis="block"]) > [data-scroll="next"] { inset-block-end: var(--pf-space-1); }
159
+
160
+ /* On mouse devices the arrows appear when the row is hovered or focused. */
161
+ @media (hover: hover) and (pointer: fine) {
162
+ .scroller-frame > [data-scroll]:not(:disabled) { opacity: 0; }
163
+
164
+ .scroller-frame:is(:hover, :focus-within) > [data-scroll]:not(:disabled) { opacity: 1; }
165
+ }
166
+
167
+ /* ------------------------------------------------------------------
168
+ * Tile: a focusable media card (poster, thumbnail, channel) for shelves
169
+ * and grids. The first child is the art; it zooms and rings on focus.
170
+ * data-shape="poster|square" (default landscape 16:9).
171
+ * ------------------------------------------------------------------ */
172
+
173
+ .tile {
174
+ border-radius: var(--pf-radius-md);
175
+ color: inherit;
176
+ display: grid;
177
+ gap: var(--pf-space-2);
178
+ outline: none;
179
+ text-decoration: none;
180
+ }
181
+
182
+ .tile > :first-child {
183
+ aspect-ratio: 16 / 9;
184
+ background: var(--pf-color-surface-raised);
185
+ block-size: auto;
186
+ border-radius: var(--pf-radius-md);
187
+ box-shadow: var(--pf-shadow-sm);
188
+ display: grid;
189
+ inline-size: 100%;
190
+ object-fit: cover;
191
+ outline: 3px solid transparent;
192
+ outline-offset: 3px;
193
+ overflow: hidden;
194
+ place-items: center;
195
+ transition: scale var(--pf-transition-normal), box-shadow var(--pf-transition-normal), outline-color var(--pf-transition-fast);
196
+ }
197
+
198
+ .tile[data-shape="poster"] > :first-child { aspect-ratio: 2 / 3; }
199
+ .tile[data-shape="square"] > :first-child { aspect-ratio: 1; }
200
+
201
+ .tile > :not(:first-child) {
202
+ overflow: hidden;
203
+ text-overflow: ellipsis;
204
+ white-space: nowrap;
205
+ }
206
+
207
+ .tile:hover > :first-child {
208
+ box-shadow: var(--pf-shadow-md);
209
+ scale: 1.03;
210
+ }
211
+
212
+ .tile:focus-visible > :first-child {
213
+ box-shadow: var(--pf-shadow-md);
214
+ outline-color: var(--pf-color-focus);
215
+ scale: 1.06;
216
+ }
217
+
218
+ .tile:focus-visible > :nth-child(2) { color: var(--pf-color-primary); }
219
+
220
+ .tile progress {
221
+ block-size: 0.3rem;
222
+ border-radius: var(--pf-radius-pill);
223
+ overflow: hidden;
224
+ }
225
+
226
+ /* ------------------------------------------------------------------
227
+ * TV / 10-foot mode: <html data-input="tv">. Bigger type and targets,
228
+ * an overscan-safe page inset, loud focus that also shows on older TV
229
+ * browsers without :focus-visible, and always-visible scroller arrows.
230
+ * TV browsers move focus with the remote's D-pad on their own.
231
+ * ------------------------------------------------------------------ */
232
+
233
+ :root[data-input="tv"] {
234
+ --pf-control-height: 3.5rem;
235
+ --pf-scroller-item: clamp(14rem, 18vw, 22rem);
236
+ --pf-scroller-inset: 5vw;
237
+ cursor: none;
238
+ }
239
+
240
+ :root[data-input="tv"] body {
241
+ font-size: clamp(1.1rem, 1.25vw, 1.75rem);
242
+ padding: max(3vh, env(safe-area-inset-top)) max(5vw, env(safe-area-inset-right)) max(3vh, env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-left));
243
+ }
244
+
245
+ :root[data-input="tv"] :focus {
246
+ outline: 4px solid var(--pf-color-focus);
247
+ outline-offset: 4px;
248
+ }
249
+
250
+ :root[data-input="tv"] .tile:focus { outline: none; }
251
+
252
+ :root[data-input="tv"] .tile:focus > :first-child {
253
+ box-shadow: 0 0 0 4px var(--pf-color-focus), 0 24px 60px rgb(0 0 0 / 45%);
254
+ outline-color: transparent;
255
+ scale: 1.08;
256
+ }
257
+
258
+ :root[data-input="tv"] .tile:focus > :nth-child(2) { color: var(--pf-color-primary); }
259
+
260
+ :root[data-input="tv"] .scroller {
261
+ padding-block: var(--pf-space-5) var(--pf-space-6);
262
+ scroll-behavior: smooth;
263
+ scrollbar-width: none;
264
+ }
265
+
266
+ :root[data-input="tv"] .scroller-frame > [data-scroll]:not(:disabled) { opacity: 1; }
267
+
268
+ /* The shelf whose row has focus is the one being read. */
269
+ :root[data-input="tv"] section:has(.scroller :focus) > :is(h2, h3) {
270
+ color: var(--pf-color-primary);
271
+ }
272
+
273
+ :root[data-input="tv"] section:has(.scroller):not(:has(:focus)) .tile > :first-child {
274
+ opacity: 0.82;
275
+ }
276
+
277
+ /* ------------------------------------------------------------------
278
+ * Icon button: a square <button> or link holding an SVG, with an
279
+ * aria-label. data-count draws a count bubble (cart, inbox, bell);
280
+ * keep the count in the label too ("Cart, 3 items").
281
+ * ------------------------------------------------------------------ */
282
+
283
+ .icon-button {
284
+ background: transparent;
285
+ block-size: var(--pf-control-height);
286
+ border: 1px solid transparent;
287
+ border-radius: var(--pf-radius-sm);
288
+ color: var(--pf-color-ink);
289
+ flex: none;
290
+ inline-size: var(--pf-control-height);
291
+ padding: 0;
292
+ position: relative;
293
+ }
294
+
295
+ .icon-button:hover {
296
+ background: color-mix(in srgb, var(--pf-color-ink) 8%, transparent);
297
+ color: var(--pf-color-ink);
298
+ }
299
+
300
+ .icon-button[aria-expanded="true"],
301
+ .icon-button:has(+ [popover]:popover-open) {
302
+ background: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
303
+ color: var(--pf-color-primary);
304
+ }
305
+
306
+ .icon-button > svg {
307
+ block-size: 1.35rem;
308
+ inline-size: 1.35rem;
309
+ }
310
+
311
+ .icon-button[data-count]::after {
312
+ align-items: center;
313
+ background: var(--pf-color-danger);
314
+ block-size: 1.25rem;
315
+ border: 2px solid var(--pf-color-canvas);
316
+ border-radius: var(--pf-radius-pill);
317
+ box-sizing: content-box;
318
+ color: #fff;
319
+ content: attr(data-count);
320
+ display: inline-flex;
321
+ font-size: 0.7rem;
322
+ font-variant-numeric: tabular-nums;
323
+ font-weight: 760;
324
+ inset-block-start: -0.2rem;
325
+ inset-inline-end: -0.2rem;
326
+ justify-content: center;
327
+ line-height: 1;
328
+ min-inline-size: 0.85rem;
329
+ padding-inline: 0.2rem;
330
+ position: absolute;
331
+ }
332
+
333
+ .icon-button[data-count="0"]::after,
334
+ .icon-button[data-count=""]::after { display: none; }
335
+
336
+ /* ------------------------------------------------------------------
337
+ * Menu: a list of actions or links, usually inside a [popover] or
338
+ * <dialog>. <hr> separates groups; <kbd> pushes to the end of a row.
339
+ * ------------------------------------------------------------------ */
340
+
341
+ .menu {
342
+ display: grid;
343
+ gap: 2px;
344
+ list-style: none;
345
+ margin: 0;
346
+ min-inline-size: 13rem;
347
+ padding: 0;
348
+ }
349
+
350
+ .menu > li > :is(a, button),
351
+ .menu > li > label {
352
+ align-items: center;
353
+ background: transparent;
354
+ border: 0;
355
+ border-radius: var(--pf-radius-sm);
356
+ color: var(--pf-color-ink);
357
+ display: flex;
358
+ font-weight: 520;
359
+ gap: var(--pf-space-3);
360
+ inline-size: 100%;
361
+ justify-content: flex-start;
362
+ margin: 0;
363
+ min-height: 2.5rem;
364
+ padding: 0.5rem 0.75rem;
365
+ text-align: start;
366
+ text-decoration: none;
367
+ }
368
+
369
+ .menu > li > :is(a, button):is(:hover, :focus-visible),
370
+ .menu > li > label:hover {
371
+ background: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
372
+ color: var(--pf-color-ink);
373
+ }
374
+
375
+ .menu > li > [aria-current]:not([aria-current="false"]) {
376
+ background: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
377
+ color: var(--pf-color-primary);
378
+ font-weight: 650;
379
+ }
380
+
381
+ .menu > li > [data-variant="danger"] { color: var(--pf-color-danger); }
382
+
383
+ .menu > li > [data-variant="danger"]:hover {
384
+ background: color-mix(in srgb, var(--pf-color-danger) 12%, transparent);
385
+ color: var(--pf-color-danger);
386
+ }
387
+
388
+ .menu svg {
389
+ block-size: 1.1rem;
390
+ flex: none;
391
+ inline-size: 1.1rem;
392
+ opacity: 0.8;
393
+ }
394
+
395
+ .menu :is(kbd, .badge) {
396
+ font-size: var(--pf-text-xs);
397
+ margin-inline-start: auto;
398
+ }
399
+
400
+ .menu > hr,
401
+ .menu > li[role="separator"] {
402
+ border: 0;
403
+ border-top: 1px solid var(--pf-color-border);
404
+ margin: var(--pf-space-1) 0;
405
+ }
406
+
407
+ .menu > li > :is(h2, h3, h4, small) {
408
+ color: var(--pf-color-ink-muted);
409
+ display: block;
410
+ font-size: var(--pf-text-xs);
411
+ font-weight: 700;
412
+ letter-spacing: 0.08em;
413
+ padding: var(--pf-space-2) 0.75rem var(--pf-space-1);
414
+ text-transform: uppercase;
415
+ }
416
+
417
+ :where([popover]:has(> .menu)) { padding: var(--pf-space-1); }
418
+
419
+ /* ------------------------------------------------------------------
420
+ * Media row: art + body + aside, the shape of cart lines, messages,
421
+ * notifications and search results. data-truncate keeps body lines to
422
+ * one line each.
423
+ * ------------------------------------------------------------------ */
424
+
425
+ .media {
426
+ align-items: center;
427
+ color: inherit;
428
+ display: grid;
429
+ gap: var(--pf-space-3);
430
+ grid-template-columns: auto minmax(0, 1fr) auto;
431
+ text-decoration: none;
432
+ }
433
+
434
+ .media > :nth-child(2) {
435
+ display: grid;
436
+ gap: 0.1rem;
437
+ min-inline-size: 0;
438
+ }
439
+
440
+ .media > :nth-child(3) {
441
+ color: var(--pf-color-ink-muted);
442
+ font-size: var(--pf-text-sm);
443
+ text-align: end;
444
+ white-space: nowrap;
445
+ }
446
+
447
+ .media[data-truncate] > :nth-child(2) > * {
448
+ overflow: hidden;
449
+ text-overflow: ellipsis;
450
+ white-space: nowrap;
451
+ }
452
+
453
+ .thumb {
454
+ aspect-ratio: 1;
455
+ background: var(--pf-color-surface-raised);
456
+ border: 1px solid var(--pf-color-border);
457
+ border-radius: var(--pf-radius-sm);
458
+ display: grid;
459
+ font-size: 1.5rem;
460
+ inline-size: 3.25rem;
461
+ object-fit: cover;
462
+ overflow: hidden;
463
+ place-items: center;
464
+ }
465
+
466
+ /* ------------------------------------------------------------------
467
+ * Avatar: an <img> or initials in a <span>. data-size="sm|lg".
468
+ * .avatar-group overlaps a row of them.
469
+ * ------------------------------------------------------------------ */
470
+
471
+ .avatar {
472
+ --pf-avatar: 2.5rem;
473
+ align-items: center;
474
+ background: color-mix(in srgb, var(--pf-color-primary) 18%, var(--pf-color-surface));
475
+ block-size: var(--pf-avatar);
476
+ border-radius: 50%;
477
+ color: var(--pf-color-primary);
478
+ display: inline-flex;
479
+ flex: none;
480
+ font-size: calc(var(--pf-avatar) * 0.38);
481
+ font-weight: 720;
482
+ inline-size: var(--pf-avatar);
483
+ justify-content: center;
484
+ letter-spacing: 0;
485
+ object-fit: cover;
486
+ overflow: hidden;
487
+ user-select: none;
488
+ }
489
+
490
+ .avatar[data-size="sm"] { --pf-avatar: 1.75rem; }
491
+ .avatar[data-size="lg"] { --pf-avatar: 3.75rem; }
492
+
493
+ .avatar-group { display: flex; }
494
+
495
+ .avatar-group > .avatar {
496
+ border: 2px solid var(--pf-color-surface);
497
+ box-sizing: content-box;
498
+ }
499
+
500
+ .avatar-group > .avatar + .avatar { margin-inline-start: calc(var(--pf-avatar) * -0.3); }
501
+
502
+ /* ------------------------------------------------------------------
503
+ * Calendar: a <table class="calendar"> month grid.
504
+ * Picker cells hold a <button>; aria-current="date" marks today,
505
+ * aria-pressed="true" the chosen day(s), data-in-range the days
506
+ * between, data-outside the neighbouring months.
507
+ * data-view="month" makes a full calendar display whose cells hold a
508
+ * <time> and .event chips.
509
+ * ------------------------------------------------------------------ */
510
+
511
+ .calendar {
512
+ border-collapse: separate;
513
+ border-spacing: 0 2px;
514
+ font-variant-numeric: tabular-nums;
515
+ min-inline-size: 16rem;
516
+ table-layout: fixed;
517
+ }
518
+
519
+ .calendar caption {
520
+ color: var(--pf-color-ink);
521
+ font-size: var(--pf-text-md);
522
+ font-weight: 680;
523
+ padding: 0 0 var(--pf-space-2);
524
+ }
525
+
526
+ .calendar abbr { text-decoration: none; }
527
+
528
+ .calendar th {
529
+ background: none;
530
+ border: 0;
531
+ color: var(--pf-color-ink-muted);
532
+ font-size: var(--pf-text-xs);
533
+ font-weight: 700;
534
+ letter-spacing: 0.06em;
535
+ padding: var(--pf-space-1) 0;
536
+ text-align: center;
537
+ text-transform: uppercase;
538
+ }
539
+
540
+ .calendar td {
541
+ border: 0;
542
+ padding: 0;
543
+ text-align: center;
544
+ vertical-align: top;
545
+ }
546
+
547
+ .calendar td > :is(button, a):not(.event) {
548
+ aspect-ratio: 1;
549
+ background: transparent;
550
+ border: 0;
551
+ border-radius: var(--pf-radius-sm);
552
+ color: var(--pf-color-ink);
553
+ font-weight: 520;
554
+ inline-size: 100%;
555
+ max-block-size: 2.75rem;
556
+ min-height: 0;
557
+ padding: 0;
558
+ text-decoration: none;
559
+ }
560
+
561
+ .calendar td > :is(button, a):not(.event):hover {
562
+ background: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
563
+ color: var(--pf-color-ink);
564
+ }
565
+
566
+ .calendar td[data-outside] > * { color: var(--pf-color-ink-muted); opacity: 0.55; }
567
+
568
+ .calendar :is(button, a, time)[aria-current="date"] {
569
+ box-shadow: inset 0 0 0 2px var(--pf-color-primary);
570
+ color: var(--pf-color-primary);
571
+ font-weight: 760;
572
+ }
573
+
574
+ .calendar td[data-in-range] > :is(button, a) {
575
+ background: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
576
+ border-radius: 0;
577
+ }
578
+
579
+ .calendar td > :is(button, a):not(.event)[aria-pressed="true"],
580
+ .calendar td > :is(button, a):not(.event)[aria-selected="true"] {
581
+ background: var(--pf-color-primary);
582
+ box-shadow: none;
583
+ color: var(--pf-color-on-primary);
584
+ font-weight: 700;
585
+ }
586
+
587
+ .calendar td > :is(button, a):not(.event):disabled,
588
+ .calendar td > :not(.event)[aria-disabled="true"] {
589
+ background: transparent;
590
+ opacity: 0.35;
591
+ text-decoration: line-through;
592
+ }
593
+
594
+ .calendar[data-view="month"] {
595
+ border-collapse: collapse;
596
+ border-spacing: 0;
597
+ min-inline-size: 0;
598
+ }
599
+
600
+ .calendar[data-view="month"] td {
601
+ block-size: clamp(5rem, 11vw, 7.5rem);
602
+ border: 1px solid var(--pf-color-border);
603
+ padding: var(--pf-space-1);
604
+ text-align: start;
605
+ }
606
+
607
+ .calendar[data-view="month"] td > time {
608
+ block-size: 1.9rem;
609
+ border-radius: var(--pf-radius-pill);
610
+ display: inline-grid;
611
+ font-size: var(--pf-text-sm);
612
+ font-weight: 620;
613
+ inline-size: 1.9rem;
614
+ margin-block-end: 0.15rem;
615
+ place-items: center;
616
+ }
617
+
618
+ .calendar[data-view="month"] td > time[aria-current="date"] {
619
+ background: var(--pf-color-primary);
620
+ box-shadow: none;
621
+ color: var(--pf-color-on-primary);
622
+ }
623
+
624
+ .calendar[data-view="month"] td:is(:first-child, :last-child) {
625
+ background: color-mix(in srgb, var(--pf-color-ink) 3%, transparent);
626
+ }
627
+
628
+ .event {
629
+ --pf-tone: var(--pf-color-primary);
630
+ background: color-mix(in srgb, var(--pf-tone) 15%, transparent);
631
+ border-inline-start: 3px solid var(--pf-tone);
632
+ border-radius: 0.3rem;
633
+ color: var(--pf-color-ink);
634
+ display: block;
635
+ font-size: var(--pf-text-xs);
636
+ font-weight: 600;
637
+ line-height: 1.35;
638
+ margin-block-start: 2px;
639
+ overflow: hidden;
640
+ padding: 0.12rem 0.4rem;
641
+ text-decoration: none;
642
+ text-overflow: ellipsis;
643
+ white-space: nowrap;
644
+ }
645
+
646
+ a.event:hover {
647
+ background: color-mix(in srgb, var(--pf-tone) 26%, transparent);
648
+ color: var(--pf-color-ink);
649
+ }
650
+
651
+ :is(.event, .timeline > li)[data-tone="success"] { --pf-tone: var(--pf-color-success); }
652
+ :is(.event, .timeline > li)[data-tone="warning"] { --pf-tone: var(--pf-color-warning); }
653
+ :is(.event, .timeline > li)[data-tone="danger"] { --pf-tone: var(--pf-color-danger); }
654
+ :is(.event, .timeline > li)[data-tone="info"] { --pf-tone: var(--pf-color-info); }
655
+ :is(.event, .timeline > li)[data-tone="accent"] { --pf-tone: var(--pf-color-accent); }
656
+
657
+ /* Small screens: events collapse to coloured dots, still named for screen readers. */
658
+ @media (max-width: 40rem) {
659
+ .calendar[data-view="month"] .event {
660
+ background: var(--pf-tone);
661
+ block-size: 0.5rem;
662
+ border: 0;
663
+ border-radius: 50%;
664
+ display: inline-block;
665
+ font-size: 0;
666
+ inline-size: 0.5rem;
667
+ margin-inline-end: 2px;
668
+ padding: 0;
669
+ }
670
+ }
671
+
672
+ /* ------------------------------------------------------------------
673
+ * Date and time inputs, field groups (joined controls, ranges, add-ons,
674
+ * quantity steppers).
675
+ * ------------------------------------------------------------------ */
676
+
677
+ :where(input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"])) {
678
+ font-variant-numeric: tabular-nums;
679
+ }
680
+
681
+ :where(input)::-webkit-calendar-picker-indicator {
682
+ border-radius: 0.3rem;
683
+ cursor: pointer;
684
+ opacity: 0.7;
685
+ padding: 0.2rem;
686
+ }
687
+
688
+ :where(input)::-webkit-calendar-picker-indicator:hover {
689
+ background-color: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
690
+ opacity: 1;
691
+ }
692
+
693
+ .field-group {
694
+ align-items: stretch;
695
+ display: flex;
696
+ }
697
+
698
+ .field-group > * {
699
+ border-radius: 0;
700
+ margin: 0;
701
+ }
702
+
703
+ .field-group > :first-child {
704
+ border-end-start-radius: var(--pf-radius-sm);
705
+ border-start-start-radius: var(--pf-radius-sm);
706
+ }
707
+
708
+ .field-group > :last-child {
709
+ border-end-end-radius: var(--pf-radius-sm);
710
+ border-start-end-radius: var(--pf-radius-sm);
711
+ }
712
+
713
+ .field-group > :not(:first-child) { margin-inline-start: -1px; }
714
+
715
+ .field-group > :is(input, select) {
716
+ flex: 1 1 0;
717
+ min-inline-size: 0;
718
+ }
719
+
720
+ .field-group > input[type="number"] {
721
+ flex: 0 0 4.5rem;
722
+ text-align: center;
723
+ }
724
+
725
+ .field-group > :focus-visible {
726
+ position: relative;
727
+ z-index: 1;
728
+ }
729
+
730
+ .field-group > :is(span, output) {
731
+ align-items: center;
732
+ background: var(--pf-color-surface-raised);
733
+ border: 1px solid var(--pf-color-border);
734
+ color: var(--pf-color-ink-muted);
735
+ display: inline-flex;
736
+ font-size: var(--pf-text-sm);
737
+ padding-inline: 0.8rem;
738
+ white-space: nowrap;
739
+ }
740
+
741
+ .field-group > button:not([data-variant]) {
742
+ background: var(--pf-color-surface);
743
+ border-color: var(--pf-color-border);
744
+ color: var(--pf-color-ink);
745
+ min-inline-size: var(--pf-control-height);
746
+ padding-inline: 0.75rem;
747
+ }
748
+
749
+ .field-group > button:not([data-variant]):hover {
750
+ background: var(--pf-color-surface-raised);
751
+ color: var(--pf-color-primary);
752
+ }
753
+
754
+ /* ------------------------------------------------------------------
755
+ * Color: a native <input type="color"> as a swatch button, and
756
+ * .swatches: a radio group of preset colours, each radio carrying
757
+ * style="--swatch: #hex" and an aria-label. Selection is native.
758
+ * ------------------------------------------------------------------ */
759
+
760
+ :where(input[type="color"]) {
761
+ appearance: none;
762
+ background: var(--pf-color-surface);
763
+ block-size: var(--pf-control-height);
764
+ border: 1px solid var(--pf-color-border);
765
+ border-radius: var(--pf-radius-sm);
766
+ cursor: pointer;
767
+ inline-size: calc(var(--pf-control-height) * 1.4);
768
+ padding: 0.3rem;
769
+ }
770
+
771
+ :where(input[type="color"])::-webkit-color-swatch-wrapper { padding: 0; }
772
+
773
+ :where(input[type="color"])::-webkit-color-swatch {
774
+ border: 0;
775
+ border-radius: calc(var(--pf-radius-sm) - 0.2rem);
776
+ }
777
+
778
+ :where(input[type="color"])::-moz-color-swatch {
779
+ border: 0;
780
+ border-radius: calc(var(--pf-radius-sm) - 0.2rem);
781
+ }
782
+
783
+ .swatches {
784
+ border: 0;
785
+ display: flex;
786
+ flex-wrap: wrap;
787
+ gap: var(--pf-space-2);
788
+ margin: 0;
789
+ padding: 0;
790
+ }
791
+
792
+ .swatches input[type="radio"] {
793
+ appearance: none;
794
+ background: var(--swatch, currentColor);
795
+ block-size: 2.25rem;
796
+ border: 2px solid color-mix(in srgb, var(--pf-color-ink) 14%, transparent);
797
+ border-radius: 50%;
798
+ cursor: pointer;
799
+ inline-size: 2.25rem;
800
+ margin: 0;
801
+ outline: 3px solid transparent;
802
+ outline-offset: 3px;
803
+ transition: scale var(--pf-transition-fast), outline-color var(--pf-transition-fast);
804
+ }
805
+
806
+ .swatches input[type="radio"]:hover { scale: 1.1; }
807
+
808
+ .swatches input[type="radio"]:checked {
809
+ border-color: var(--pf-color-surface);
810
+ outline-color: var(--swatch, var(--pf-color-primary));
811
+ }
812
+
813
+ .swatches input[type="radio"]:focus-visible { outline-color: var(--pf-color-focus); }
814
+
815
+ /* ------------------------------------------------------------------
816
+ * Switch: <input type="checkbox" role="switch">.
817
+ * ------------------------------------------------------------------ */
818
+
819
+ :where(input[type="checkbox"][role="switch"]) {
820
+ appearance: none;
821
+ background: color-mix(in srgb, var(--pf-color-ink) 22%, transparent);
822
+ block-size: 1.6rem;
823
+ border-radius: var(--pf-radius-pill);
824
+ cursor: pointer;
825
+ flex: none;
826
+ inline-size: 2.8rem;
827
+ margin: 0 0.55rem 0 0;
828
+ position: relative;
829
+ transition: background-color var(--pf-transition-fast);
830
+ vertical-align: middle;
831
+ }
832
+
833
+ :where(input[type="checkbox"][role="switch"])::before {
834
+ background: #fff;
835
+ block-size: 1.2rem;
836
+ border-radius: 50%;
837
+ box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
838
+ content: "";
839
+ inline-size: 1.2rem;
840
+ inset-block-start: 0.2rem;
841
+ inset-inline-start: 0.2rem;
842
+ position: absolute;
843
+ transition: translate var(--pf-transition-fast);
844
+ }
845
+
846
+ :where(input[type="checkbox"][role="switch"]:checked) { background: var(--pf-color-primary); }
847
+ :where(input[type="checkbox"][role="switch"]:checked)::before { translate: 1.2rem 0; }
848
+ :where(input[type="checkbox"][role="switch"]:checked:dir(rtl))::before { translate: -1.2rem 0; }
849
+ :where(input[type="checkbox"][role="switch"]:disabled) { opacity: 0.5; }
850
+
851
+ :where(label:has(> input[role="switch"])) {
852
+ align-items: center;
853
+ display: flex;
854
+ font-weight: 520;
855
+ margin: 0;
856
+ }
857
+
858
+ /* ------------------------------------------------------------------
859
+ * Segmented control: a radio group whose labels wrap their radios.
860
+ * <div class="segmented" role="radiogroup" aria-label="View">.
861
+ * ------------------------------------------------------------------ */
862
+
863
+ .segmented {
864
+ background: var(--pf-color-surface-raised);
865
+ border: 1px solid var(--pf-color-border);
866
+ border-radius: var(--pf-radius-md);
867
+ display: inline-flex;
868
+ gap: 0.2rem;
869
+ margin: 0;
870
+ max-inline-size: 100%;
871
+ overflow-x: auto;
872
+ padding: 0.2rem;
873
+ scrollbar-width: none;
874
+ }
875
+
876
+ .segmented > label {
877
+ align-items: center;
878
+ border-radius: var(--pf-radius-sm);
879
+ color: var(--pf-color-ink-muted);
880
+ cursor: pointer;
881
+ display: inline-flex;
882
+ font-size: var(--pf-text-sm);
883
+ font-weight: 620;
884
+ gap: var(--pf-space-2);
885
+ margin: 0;
886
+ padding: 0.45rem 0.9rem;
887
+ position: relative;
888
+ transition: background-color var(--pf-transition-fast), color var(--pf-transition-fast);
889
+ white-space: nowrap;
890
+ }
891
+
892
+ .segmented > label:hover { color: var(--pf-color-ink); }
893
+
894
+ .segmented > label > input {
895
+ appearance: none;
896
+ block-size: 100%;
897
+ cursor: pointer;
898
+ inline-size: 100%;
899
+ inset: 0;
900
+ margin: 0;
901
+ position: absolute;
902
+ }
903
+
904
+ .segmented > label:has(> input:checked) {
905
+ background: var(--pf-color-surface);
906
+ box-shadow: var(--pf-shadow-sm);
907
+ color: var(--pf-color-ink);
908
+ }
909
+
910
+ .segmented > label:has(> input:focus-visible) {
911
+ outline: 3px solid var(--pf-color-focus);
912
+ outline-offset: 1px;
913
+ }
914
+
915
+ .segmented > label > input:focus-visible { outline: none; }
916
+
917
+ /* ------------------------------------------------------------------
918
+ * Tabs: role="tablist" > button role="tab" aria-selected aria-controls,
919
+ * panels role="tabpanel". The app switches aria-selected and hidden.
920
+ * ------------------------------------------------------------------ */
921
+
922
+ [role="tablist"] {
923
+ border-bottom: 1px solid var(--pf-color-border);
924
+ display: flex;
925
+ gap: var(--pf-space-1);
926
+ overflow-x: auto;
927
+ scrollbar-width: none;
928
+ }
929
+
930
+ [role="tab"] {
931
+ background: transparent;
932
+ border: 0;
933
+ border-bottom: 3px solid transparent;
934
+ border-radius: var(--pf-radius-sm) var(--pf-radius-sm) 0 0;
935
+ color: var(--pf-color-ink-muted);
936
+ font-weight: 620;
937
+ margin-bottom: -1px;
938
+ padding: 0.6rem 1rem;
939
+ white-space: nowrap;
940
+ }
941
+
942
+ [role="tab"]:hover {
943
+ background: color-mix(in srgb, var(--pf-color-ink) 5%, transparent);
944
+ color: var(--pf-color-ink);
945
+ }
946
+
947
+ [role="tab"][aria-selected="true"] {
948
+ border-bottom-color: var(--pf-color-primary);
949
+ color: var(--pf-color-primary);
950
+ }
951
+
952
+ [role="tabpanel"] { padding-block: var(--pf-space-4); }
953
+
954
+ /* ------------------------------------------------------------------
955
+ * Toasts: a fixed live region (role="status") of .alert children.
956
+ * ------------------------------------------------------------------ */
957
+
958
+ .toasts {
959
+ display: grid;
960
+ gap: var(--pf-space-2);
961
+ inline-size: min(24rem, calc(100vw - 2rem));
962
+ inset-block-end: var(--pf-space-4);
963
+ inset-inline-end: var(--pf-space-4);
964
+ list-style: none;
965
+ margin: 0;
966
+ padding: 0;
967
+ pointer-events: none;
968
+ position: fixed;
969
+ z-index: 50;
970
+ }
971
+
972
+ .toasts > * {
973
+ animation: pf-toast-in 260ms ease both;
974
+ box-shadow: var(--pf-shadow-md);
975
+ pointer-events: auto;
976
+ }
977
+
978
+ @keyframes pf-toast-in {
979
+ from { opacity: 0; translate: 0 0.75rem; }
980
+ }
981
+
982
+ /* ------------------------------------------------------------------
983
+ * Breadcrumbs, pagination, steps.
984
+ * ------------------------------------------------------------------ */
985
+
986
+ .breadcrumbs :is(ol, ul) {
987
+ display: flex;
988
+ flex-wrap: wrap;
989
+ font-size: var(--pf-text-sm);
990
+ gap: var(--pf-space-2);
991
+ list-style: none;
992
+ margin: 0;
993
+ padding: 0;
994
+ }
995
+
996
+ .breadcrumbs li + li::before {
997
+ color: var(--pf-color-ink-muted);
998
+ content: "/" / "";
999
+ margin-inline-end: var(--pf-space-2);
1000
+ }
1001
+
1002
+ .breadcrumbs [aria-current="page"] {
1003
+ color: var(--pf-color-ink);
1004
+ font-weight: 620;
1005
+ text-decoration: none;
1006
+ }
1007
+
1008
+ .pagination :is(ol, ul) {
1009
+ display: flex;
1010
+ flex-wrap: wrap;
1011
+ gap: 0.35rem;
1012
+ list-style: none;
1013
+ margin: 0;
1014
+ padding: 0;
1015
+ }
1016
+
1017
+ .pagination li > :is(a, span) {
1018
+ align-items: center;
1019
+ background: var(--pf-color-surface);
1020
+ block-size: 2.5rem;
1021
+ border: 1px solid var(--pf-color-border);
1022
+ border-radius: var(--pf-radius-sm);
1023
+ color: var(--pf-color-ink);
1024
+ display: inline-flex;
1025
+ font-variant-numeric: tabular-nums;
1026
+ justify-content: center;
1027
+ min-inline-size: 2.5rem;
1028
+ padding: 0 0.65rem;
1029
+ text-decoration: none;
1030
+ }
1031
+
1032
+ .pagination li > span {
1033
+ background: transparent;
1034
+ border-color: transparent;
1035
+ color: var(--pf-color-ink-muted);
1036
+ }
1037
+
1038
+ .pagination li > a:hover {
1039
+ border-color: var(--pf-color-primary);
1040
+ color: var(--pf-color-primary);
1041
+ }
1042
+
1043
+ .pagination li > a[aria-current="page"] {
1044
+ background: var(--pf-color-primary);
1045
+ border-color: var(--pf-color-primary);
1046
+ color: var(--pf-color-on-primary);
1047
+ font-weight: 700;
1048
+ }
1049
+
1050
+ .pagination li > a[aria-disabled="true"] {
1051
+ opacity: 0.45;
1052
+ pointer-events: none;
1053
+ }
1054
+
1055
+ .steps {
1056
+ counter-reset: pf-step;
1057
+ display: flex;
1058
+ gap: var(--pf-space-3);
1059
+ list-style: none;
1060
+ margin: 0;
1061
+ padding: 0;
1062
+ }
1063
+
1064
+ .steps > li {
1065
+ border-top: 4px solid var(--pf-color-border);
1066
+ color: var(--pf-color-ink-muted);
1067
+ counter-increment: pf-step;
1068
+ display: grid;
1069
+ flex: 1;
1070
+ font-size: var(--pf-text-sm);
1071
+ font-weight: 620;
1072
+ gap: 0.15rem;
1073
+ padding-top: var(--pf-space-2);
1074
+ }
1075
+
1076
+ .steps > li::before {
1077
+ content: "Step " counter(pf-step);
1078
+ font-size: var(--pf-text-xs);
1079
+ font-weight: 700;
1080
+ letter-spacing: 0.08em;
1081
+ text-transform: uppercase;
1082
+ }
1083
+
1084
+ .steps > li[data-state="done"] {
1085
+ border-top-color: color-mix(in srgb, var(--pf-color-primary) 55%, transparent);
1086
+ color: var(--pf-color-ink);
1087
+ }
1088
+
1089
+ .steps > li[aria-current="step"] {
1090
+ border-top-color: var(--pf-color-primary);
1091
+ color: var(--pf-color-primary);
1092
+ }
1093
+
1094
+ /* ------------------------------------------------------------------
1095
+ * Skeleton, stat, progress ring, rating, drop zone, timeline.
1096
+ * ------------------------------------------------------------------ */
1097
+
1098
+ .skeleton {
1099
+ animation: pf-shimmer 1.4s linear infinite;
1100
+ background: linear-gradient(90deg,
1101
+ color-mix(in srgb, var(--pf-color-ink) 7%, transparent) 0%,
1102
+ color-mix(in srgb, var(--pf-color-ink) 14%, transparent) 50%,
1103
+ color-mix(in srgb, var(--pf-color-ink) 7%, transparent) 100%) 0 0 / 200% 100%;
1104
+ border-radius: var(--pf-radius-sm);
1105
+ color: transparent;
1106
+ display: block;
1107
+ min-block-size: 1em;
1108
+ user-select: none;
1109
+ }
1110
+
1111
+ @keyframes pf-shimmer {
1112
+ to { background-position: -200% 0; }
1113
+ }
1114
+
1115
+ .stat {
1116
+ display: grid;
1117
+ gap: 0.2rem;
1118
+ }
1119
+
1120
+ .stat > :first-child {
1121
+ color: var(--pf-color-ink-muted);
1122
+ font-size: var(--pf-text-sm);
1123
+ font-weight: 620;
1124
+ }
1125
+
1126
+ .stat > strong {
1127
+ font-size: clamp(1.8rem, 3vw, 2.6rem);
1128
+ font-variant-numeric: tabular-nums;
1129
+ font-weight: 720;
1130
+ letter-spacing: -0.035em;
1131
+ line-height: 1.05;
1132
+ }
1133
+
1134
+ [data-trend] { font-size: var(--pf-text-sm); font-weight: 650; }
1135
+ [data-trend="up"] { color: var(--pf-color-success); }
1136
+ [data-trend="down"] { color: var(--pf-color-danger); }
1137
+ [data-trend="up"]::before { content: "▲ " / ""; }
1138
+ [data-trend="down"]::before { content: "▼ " / ""; }
1139
+
1140
+ .ring {
1141
+ --pf-tone: var(--pf-color-primary);
1142
+ --pf-ring: 5rem;
1143
+ --value: 0;
1144
+ align-items: center;
1145
+ background:
1146
+ radial-gradient(closest-side, var(--pf-color-surface) 79%, transparent 80% 100%),
1147
+ conic-gradient(var(--pf-tone) calc(var(--value) * 1%), color-mix(in srgb, var(--pf-color-ink) 10%, transparent) 0);
1148
+ block-size: var(--pf-ring);
1149
+ border-radius: 50%;
1150
+ display: inline-flex;
1151
+ flex: none;
1152
+ font-size: calc(var(--pf-ring) * 0.24);
1153
+ font-variant-numeric: tabular-nums;
1154
+ font-weight: 720;
1155
+ inline-size: var(--pf-ring);
1156
+ justify-content: center;
1157
+ }
1158
+
1159
+ .ring[data-size="sm"] { --pf-ring: 3rem; }
1160
+ .ring[data-size="lg"] { --pf-ring: 8rem; }
1161
+ .ring[data-tone="success"] { --pf-tone: var(--pf-color-success); }
1162
+ .ring[data-tone="warning"] { --pf-tone: var(--pf-color-warning); }
1163
+ .ring[data-tone="danger"] { --pf-tone: var(--pf-color-danger); }
1164
+
1165
+ /* Stars: radios in reverse order (5 down to 1) inside .rating; native selection. */
1166
+ .rating {
1167
+ border: 0;
1168
+ display: inline-flex;
1169
+ flex-direction: row-reverse;
1170
+ gap: 0.15rem;
1171
+ justify-content: flex-end;
1172
+ margin: 0;
1173
+ padding: 0;
1174
+ }
1175
+
1176
+ .rating input {
1177
+ appearance: none;
1178
+ background: color-mix(in srgb, var(--pf-color-ink) 22%, transparent);
1179
+ block-size: 1.9rem;
1180
+ cursor: pointer;
1181
+ inline-size: 1.9rem;
1182
+ margin: 0;
1183
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
1184
+ transition: background-color var(--pf-transition-fast), scale var(--pf-transition-fast);
1185
+ }
1186
+
1187
+ .rating input:checked,
1188
+ .rating input:checked ~ input { background: var(--pf-color-accent); }
1189
+
1190
+ @media (hover: hover) {
1191
+ .rating:hover input:not(:hover):not(:hover ~ input) { background: color-mix(in srgb, var(--pf-color-ink) 22%, transparent); }
1192
+
1193
+ .rating input:hover,
1194
+ .rating input:hover ~ input { background: var(--pf-color-accent); }
1195
+
1196
+ .rating input:hover { scale: 1.12; }
1197
+ }
1198
+
1199
+ .rating input:focus-visible {
1200
+ background: var(--pf-color-focus);
1201
+ outline: none;
1202
+ }
1203
+
1204
+ /* A <label class="dropzone"> around <input type="file">: click or drop. */
1205
+ .dropzone {
1206
+ align-content: center;
1207
+ background: var(--pf-color-surface);
1208
+ border: 2px dashed var(--pf-color-border);
1209
+ border-radius: var(--pf-radius-md);
1210
+ color: var(--pf-color-ink-muted);
1211
+ cursor: pointer;
1212
+ display: grid;
1213
+ font-weight: 520;
1214
+ gap: var(--pf-space-2);
1215
+ justify-items: center;
1216
+ margin: 0;
1217
+ min-block-size: 10rem;
1218
+ padding: var(--pf-space-6);
1219
+ position: relative;
1220
+ text-align: center;
1221
+ transition: border-color var(--pf-transition-fast), background-color var(--pf-transition-fast);
1222
+ }
1223
+
1224
+ .dropzone:hover,
1225
+ .dropzone:focus-within {
1226
+ background: color-mix(in srgb, var(--pf-color-primary) 6%, var(--pf-color-surface));
1227
+ border-color: var(--pf-color-primary);
1228
+ color: var(--pf-color-ink);
1229
+ }
1230
+
1231
+ .dropzone:has(input:focus-visible) {
1232
+ outline: 3px solid var(--pf-color-focus);
1233
+ outline-offset: 3px;
1234
+ }
1235
+
1236
+ .dropzone > input[type="file"] {
1237
+ cursor: pointer;
1238
+ inset: 0;
1239
+ opacity: 0;
1240
+ position: absolute;
1241
+ }
1242
+
1243
+ .dropzone svg {
1244
+ block-size: 2rem;
1245
+ color: var(--pf-color-primary);
1246
+ inline-size: 2rem;
1247
+ }
1248
+
1249
+ .timeline {
1250
+ border-inline-start: 2px solid var(--pf-color-border);
1251
+ display: grid;
1252
+ gap: var(--pf-space-4);
1253
+ list-style: none;
1254
+ margin: 0 0 0 0.5rem;
1255
+ padding: 0;
1256
+ }
1257
+
1258
+ .timeline > li {
1259
+ --pf-tone: var(--pf-color-primary);
1260
+ display: grid;
1261
+ gap: 0.1rem;
1262
+ padding-inline-start: var(--pf-space-5);
1263
+ position: relative;
1264
+ }
1265
+
1266
+ .timeline > li::before {
1267
+ background: var(--pf-color-surface);
1268
+ block-size: 1rem;
1269
+ border: 3px solid var(--pf-tone);
1270
+ border-radius: 50%;
1271
+ content: "";
1272
+ inline-size: 1rem;
1273
+ inset-block-start: 0.3rem;
1274
+ inset-inline-start: calc(-0.5rem - 1px);
1275
+ position: absolute;
1276
+ }
1277
+
1278
+ .timeline time {
1279
+ color: var(--pf-color-ink-muted);
1280
+ font-size: var(--pf-text-xs);
1281
+ font-weight: 650;
1282
+ }
1283
+
1284
+ /* ------------------------------------------------------------------
1285
+ * Inbox: three panes, nav, message list, reading pane. Each pane
1286
+ * scrolls on its own; narrow screens stack them.
1287
+ * <div class="inbox"><nav>…</nav><section>…</section><article>…</article></div>
1288
+ * ------------------------------------------------------------------ */
1289
+
1290
+ .inbox {
1291
+ background: var(--pf-color-surface);
1292
+ block-size: var(--pf-inbox-height, min(80vh, 46rem));
1293
+ border: 1px solid var(--pf-color-border);
1294
+ border-radius: var(--pf-radius-lg);
1295
+ display: grid;
1296
+ grid-template-columns: minmax(11rem, 14rem) minmax(16rem, 24rem) minmax(0, 1fr);
1297
+ overflow: hidden;
1298
+ }
1299
+
1300
+ .inbox > * {
1301
+ min-block-size: 0;
1302
+ min-inline-size: 0;
1303
+ overflow: auto;
1304
+ overscroll-behavior: contain;
1305
+ }
1306
+
1307
+ .inbox > * + * { border-inline-start: 1px solid var(--pf-color-border); }
1308
+
1309
+ .inbox > nav {
1310
+ background: color-mix(in srgb, var(--pf-color-ink) 2.5%, var(--pf-color-surface));
1311
+ padding: var(--pf-space-3);
1312
+ }
1313
+
1314
+ .inbox > :is(section, article) > header {
1315
+ background: var(--pf-color-surface);
1316
+ border-bottom: 1px solid var(--pf-color-border);
1317
+ inset-block-start: 0;
1318
+ padding: var(--pf-space-3) var(--pf-space-4);
1319
+ position: sticky;
1320
+ z-index: 1;
1321
+ }
1322
+
1323
+ .inbox > section > :is(ul, ol) {
1324
+ list-style: none;
1325
+ margin: 0;
1326
+ padding: 0;
1327
+ }
1328
+
1329
+ .inbox > section .media {
1330
+ align-items: start;
1331
+ border-bottom: 1px solid var(--pf-color-border);
1332
+ padding: var(--pf-space-3) var(--pf-space-4) var(--pf-space-3) var(--pf-space-5);
1333
+ transition: background-color var(--pf-transition-fast);
1334
+ }
1335
+
1336
+ .inbox > section .media:hover { background-color: color-mix(in srgb, var(--pf-color-ink) 4%, transparent); }
1337
+
1338
+ .inbox > section .media:focus-visible { outline-offset: -3px; }
1339
+
1340
+ .inbox > section .media[aria-current="true"] {
1341
+ background-color: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
1342
+ box-shadow: inset 3px 0 0 var(--pf-color-primary);
1343
+ }
1344
+
1345
+ .inbox > section .media[data-unread] {
1346
+ background-image: radial-gradient(circle at 0.7rem 1.35rem, var(--pf-color-primary) 0.24rem, transparent 0.27rem);
1347
+ }
1348
+
1349
+ .inbox > section .media[data-unread] > :nth-child(2) > :first-child { font-weight: 760; }
1350
+
1351
+ .inbox > section .media[data-unread] > :nth-child(3) {
1352
+ color: var(--pf-color-primary);
1353
+ font-weight: 650;
1354
+ }
1355
+
1356
+ .inbox > article {
1357
+ display: flex;
1358
+ flex-direction: column;
1359
+ gap: var(--pf-space-5);
1360
+ }
1361
+
1362
+ .inbox > article > :not(header) { padding-inline: clamp(1rem, 3vw, 2rem); }
1363
+ .inbox > article > :last-child { padding-block-end: var(--pf-space-6); }
1364
+
1365
+ @media (max-width: 64rem) {
1366
+ .inbox {
1367
+ grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
1368
+ grid-template-rows: auto minmax(0, 1fr);
1369
+ }
1370
+
1371
+ .inbox > nav {
1372
+ border-bottom: 1px solid var(--pf-color-border);
1373
+ grid-column: 1 / -1;
1374
+ overflow-x: auto;
1375
+ padding: var(--pf-space-2);
1376
+ }
1377
+
1378
+ .inbox > nav .menu { display: flex; min-inline-size: 0; }
1379
+ .inbox > nav .menu > li > * { white-space: nowrap; }
1380
+ .inbox > nav .menu > li > :is(h2, h3, h4, small),
1381
+ .inbox > nav .menu > hr { display: none; }
1382
+ .inbox > nav + * { border-inline-start: 0; }
1383
+ }
1384
+
1385
+ @media (max-width: 44rem) {
1386
+ .inbox {
1387
+ block-size: auto;
1388
+ grid-template-columns: minmax(0, 1fr);
1389
+ grid-template-rows: none;
1390
+ }
1391
+
1392
+ .inbox > * + * {
1393
+ border-inline-start: 0;
1394
+ border-top: 1px solid var(--pf-color-border);
1395
+ }
1396
+
1397
+ .inbox > section { max-block-size: 60vh; }
1398
+ }
1399
+ }