@prismora/css 0.0.0-stage → 0.1.1

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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -2
  3. package/dist/components/accordion.css +57 -0
  4. package/dist/components/alert.css +31 -0
  5. package/dist/components/avatar.css +34 -0
  6. package/dist/components/badge.css +25 -0
  7. package/dist/components/banner.css +25 -0
  8. package/dist/components/breadcrumb.css +37 -0
  9. package/dist/components/button.css +162 -0
  10. package/dist/components/calendar.css +60 -0
  11. package/dist/components/card.css +34 -0
  12. package/dist/components/carousel.css +70 -0
  13. package/dist/components/chart.css +63 -0
  14. package/dist/components/chat.css +66 -0
  15. package/dist/components/checkbox.css +67 -0
  16. package/dist/components/color-picker.css +78 -0
  17. package/dist/components/combobox.css +42 -0
  18. package/dist/components/command.css +58 -0
  19. package/dist/components/data-table.css +295 -0
  20. package/dist/components/description-list.css +24 -0
  21. package/dist/components/dialog.css +58 -0
  22. package/dist/components/drawer.css +60 -0
  23. package/dist/components/editor.css +46 -0
  24. package/dist/components/empty-state.css +30 -0
  25. package/dist/components/extras.css +99 -0
  26. package/dist/components/field.css +38 -0
  27. package/dist/components/file-upload.css +48 -0
  28. package/dist/components/helpers.css +128 -0
  29. package/dist/components/icon.css +21 -0
  30. package/dist/components/image.css +28 -0
  31. package/dist/components/indicator.css +56 -0
  32. package/dist/components/input.css +109 -0
  33. package/dist/components/kbd.css +26 -0
  34. package/dist/components/list.css +77 -0
  35. package/dist/components/listbox.css +56 -0
  36. package/dist/components/meter.css +34 -0
  37. package/dist/components/nav.css +116 -0
  38. package/dist/components/number-input.css +33 -0
  39. package/dist/components/overlay.css +34 -0
  40. package/dist/components/pagination.css +47 -0
  41. package/dist/components/pickers.css +68 -0
  42. package/dist/components/pin-input.css +21 -0
  43. package/dist/components/popover.css +110 -0
  44. package/dist/components/progress.css +40 -0
  45. package/dist/components/pull-refresh.css +39 -0
  46. package/dist/components/range-slider.css +76 -0
  47. package/dist/components/rating.css +34 -0
  48. package/dist/components/scheduler.css +65 -0
  49. package/dist/components/segmented.css +41 -0
  50. package/dist/components/select.css +69 -0
  51. package/dist/components/separator.css +22 -0
  52. package/dist/components/sheet.css +47 -0
  53. package/dist/components/skeleton.css +25 -0
  54. package/dist/components/slider.css +57 -0
  55. package/dist/components/sortable.css +31 -0
  56. package/dist/components/spinner.css +21 -0
  57. package/dist/components/splitter.css +40 -0
  58. package/dist/components/stat.css +32 -0
  59. package/dist/components/steps.css +74 -0
  60. package/dist/components/surface.css +24 -0
  61. package/dist/components/switch.css +56 -0
  62. package/dist/components/table.css +95 -0
  63. package/dist/components/tabs.css +124 -0
  64. package/dist/components/tag.css +59 -0
  65. package/dist/components/time-picker.css +24 -0
  66. package/dist/components/timeline.css +43 -0
  67. package/dist/components/toast.css +84 -0
  68. package/dist/components/toggle.css +45 -0
  69. package/dist/components/toolbar.css +20 -0
  70. package/dist/components/tooltip.css +26 -0
  71. package/dist/components/tree.css +60 -0
  72. package/dist/core.css +4275 -0
  73. package/dist/foundation.css +898 -0
  74. package/dist/prismora.css +4682 -0
  75. package/dist/theme.css +409 -0
  76. package/dist/tone.css +11 -0
  77. package/dist/typography.css +157 -0
  78. package/package.json +42 -4
  79. package/src/base.css +66 -0
  80. package/src/components/accordion.css +54 -0
  81. package/src/components/alert.css +28 -0
  82. package/src/components/avatar.css +31 -0
  83. package/src/components/badge.css +22 -0
  84. package/src/components/banner.css +22 -0
  85. package/src/components/breadcrumb.css +34 -0
  86. package/src/components/button.css +159 -0
  87. package/src/components/calendar.css +57 -0
  88. package/src/components/card.css +31 -0
  89. package/src/components/carousel.css +67 -0
  90. package/src/components/chart.css +60 -0
  91. package/src/components/chat.css +63 -0
  92. package/src/components/checkbox.css +64 -0
  93. package/src/components/color-picker.css +75 -0
  94. package/src/components/combobox.css +39 -0
  95. package/src/components/command.css +55 -0
  96. package/src/components/data-table.css +292 -0
  97. package/src/components/description-list.css +21 -0
  98. package/src/components/dialog.css +55 -0
  99. package/src/components/drawer.css +57 -0
  100. package/src/components/editor.css +43 -0
  101. package/src/components/empty-state.css +27 -0
  102. package/src/components/extras.css +96 -0
  103. package/src/components/field.css +35 -0
  104. package/src/components/file-upload.css +45 -0
  105. package/src/components/helpers.css +125 -0
  106. package/src/components/icon.css +18 -0
  107. package/src/components/image.css +25 -0
  108. package/src/components/indicator.css +53 -0
  109. package/src/components/input.css +106 -0
  110. package/src/components/kbd.css +23 -0
  111. package/src/components/list.css +74 -0
  112. package/src/components/listbox.css +53 -0
  113. package/src/components/meter.css +31 -0
  114. package/src/components/nav.css +113 -0
  115. package/src/components/number-input.css +30 -0
  116. package/src/components/overlay.css +31 -0
  117. package/src/components/pagination.css +44 -0
  118. package/src/components/pickers.css +65 -0
  119. package/src/components/pin-input.css +18 -0
  120. package/src/components/popover.css +107 -0
  121. package/src/components/progress.css +37 -0
  122. package/src/components/pull-refresh.css +36 -0
  123. package/src/components/range-slider.css +73 -0
  124. package/src/components/rating.css +31 -0
  125. package/src/components/scheduler.css +62 -0
  126. package/src/components/segmented.css +38 -0
  127. package/src/components/select.css +66 -0
  128. package/src/components/separator.css +19 -0
  129. package/src/components/sheet.css +44 -0
  130. package/src/components/skeleton.css +22 -0
  131. package/src/components/slider.css +54 -0
  132. package/src/components/sortable.css +28 -0
  133. package/src/components/spinner.css +18 -0
  134. package/src/components/splitter.css +37 -0
  135. package/src/components/stat.css +29 -0
  136. package/src/components/steps.css +71 -0
  137. package/src/components/surface.css +21 -0
  138. package/src/components/switch.css +53 -0
  139. package/src/components/table.css +92 -0
  140. package/src/components/tabs.css +121 -0
  141. package/src/components/tag.css +56 -0
  142. package/src/components/time-picker.css +21 -0
  143. package/src/components/timeline.css +40 -0
  144. package/src/components/toast.css +81 -0
  145. package/src/components/toggle.css +42 -0
  146. package/src/components/toolbar.css +17 -0
  147. package/src/components/tooltip.css +23 -0
  148. package/src/components/tree.css +57 -0
  149. package/src/layers.css +2 -0
  150. package/src/layout.css +113 -0
  151. package/src/reset.css +18 -0
  152. package/src/typography.css +154 -0
  153. package/src/utilities.css +99 -0
@@ -0,0 +1,4682 @@
1
+ /* Prismora cascade layers. Your own unlayered CSS always wins over every layer below. */
2
+ @layer pm.reset, pm.base, pm.themes, pm.components, pm.utilities;
3
+
4
+ /* Targeted reset: no `*` selectors, so web components and lower layers stay overridable. */
5
+ @layer pm.reset {
6
+ :where(html) {
7
+ -webkit-text-size-adjust: none;
8
+ text-size-adjust: none;
9
+ interpolate-size: allow-keywords;
10
+ }
11
+ :where(body) { margin: 0; min-block-size: 100dvh; }
12
+ :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) { margin-block: 0; }
13
+ :where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }
14
+ :where(img, picture, video, canvas, svg) { display: block; max-inline-size: 100%; block-size: auto; }
15
+ :where(input, button, textarea, select) { font: inherit; letter-spacing: inherit; }
16
+ :where(button) { color: inherit; }
17
+ :where(textarea:not([rows])) { min-block-size: 6em; }
18
+ :where([class^="pm-"], [class*=" pm-"]),
19
+ :where([class^="pm-"], [class*=" pm-"])::before,
20
+ :where([class^="pm-"], [class*=" pm-"])::after { box-sizing: border-box; }
21
+ }
22
+
23
+ @layer pm.base {
24
+ :where(html) {
25
+ color: var(--pm-color-fg);
26
+ background: var(--pm-color-bg-canvas);
27
+ font-family: var(--pm-font-sans);
28
+ font-size: 100%;
29
+ line-height: var(--pm-line-height-normal);
30
+ accent-color: var(--pm-color-accent-solid);
31
+ scrollbar-color: var(--pm-color-border-strong) transparent;
32
+ -webkit-font-smoothing: antialiased;
33
+ text-rendering: optimizeLegibility;
34
+ }
35
+ /* User text size: every rem-based token (type, space, controls) scales with the root size. */
36
+ :where(html[data-text-size="sm"]) { font-size: 93.75%; }
37
+ :where(html[data-text-size="lg"]) { font-size: 112.5%; }
38
+ :where(html[data-text-size="xl"]) { font-size: 125%; }
39
+ :where(h1, h2, h3, h4) {
40
+ font-family: var(--pm-font-display);
41
+ line-height: var(--pm-line-height-tight);
42
+ letter-spacing: -0.015em;
43
+ text-wrap: balance;
44
+ }
45
+ :where(h1) { font-size: var(--pm-font-size-4xl); font-weight: var(--pm-font-weight-bold); }
46
+ :where(h2) { font-size: var(--pm-font-size-3xl); font-weight: var(--pm-font-weight-bold); }
47
+ :where(h3) { font-size: var(--pm-font-size-2xl); font-weight: var(--pm-font-weight-semibold); }
48
+ :where(h4) { font-size: var(--pm-font-size-xl); font-weight: var(--pm-font-weight-semibold); }
49
+ :where(p, li) { text-wrap: pretty; }
50
+ :where(a) { color: var(--pm-color-accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
51
+ :where(a:hover) { text-decoration-thickness: 0.14em; }
52
+ :where(code, kbd, samp, pre) { font-family: var(--pm-font-mono); font-size: 0.92em; }
53
+ :where(hr) { border: 0; border-block-start: 1px solid var(--pm-color-border); margin-block: var(--pm-space-6); }
54
+ ::selection { background: var(--pm-color-selection); }
55
+
56
+ /* One consistent, high-contrast focus ring (≥ 3:1) for every interactive element. */
57
+ :where(:focus-visible) {
58
+ outline: 2px solid var(--pm-color-ring);
59
+ outline-offset: 2px;
60
+ }
61
+
62
+ /* ---------- Touch & mobile ---------- */
63
+ /* Native-size hit targets on touch screens (44 px, Apple HIG / Material 48 dp ≈ 44 CSS px). */
64
+ @media (pointer: coarse) {
65
+ :where(:root) { --pm-touch-min: 2.75rem; --pm-touch-min-sm: 2.25rem; }
66
+ /* iOS zooms into fields with text under 16 px; keep form text at 16 px on touch screens. */
67
+ :where(input:not([type=checkbox], [type=radio], [type=range]), select, textarea) { font-size: max(1rem, 1em); }
68
+ }
69
+ /* No 300 ms double-tap delay and no grey tap flash on controls; content still pinch-zooms. */
70
+ :where(a, button, input, select, textarea, label, summary, [role="button"], [tabindex]) {
71
+ touch-action: manipulation;
72
+ -webkit-tap-highlight-color: transparent;
73
+ }
74
+ /* Notch / home-indicator safe areas (needs <meta name="viewport" content="…, viewport-fit=cover">). */
75
+ :where(:root) {
76
+ --pm-safe-top: env(safe-area-inset-top, 0px);
77
+ --pm-safe-bottom: env(safe-area-inset-bottom, 0px);
78
+ --pm-safe-left: env(safe-area-inset-left, 0px);
79
+ --pm-safe-right: env(safe-area-inset-right, 0px);
80
+ }
81
+ /* Scroll chaining stops at overlays, so the page behind a sheet does not move. */
82
+ :where(dialog, [popover]) { overscroll-behavior: contain; }
83
+
84
+ /* Hidden popovers before any polyfill loads. */
85
+ @supports not selector(:popover-open) {
86
+ [popover]:not(.\:popover-open) { display: none; }
87
+ }
88
+ }
89
+
90
+ /* Prismora theme: prismora — generated by @prismora/theme. Do not edit by hand. */
91
+ @layer pm.themes {
92
+ :root {
93
+ color-scheme: light dark;
94
+ --pm-space-0: 0;
95
+ --pm-space-1: 0.25rem;
96
+ --pm-space-2: 0.5rem;
97
+ --pm-space-3: 0.75rem;
98
+ --pm-space-4: 1rem;
99
+ --pm-space-5: 1.25rem;
100
+ --pm-space-6: 1.5rem;
101
+ --pm-space-8: 2rem;
102
+ --pm-space-10: 2.5rem;
103
+ --pm-space-12: 3rem;
104
+ --pm-space-16: 4rem;
105
+ --pm-space-20: 5rem;
106
+ --pm-space-24: 6rem;
107
+ --pm-space-px: 1px;
108
+ --pm-space-0-5: 0.125rem;
109
+ --pm-space-1-5: 0.375rem;
110
+ --pm-radius-xs: calc(2px * var(--pm-radius-factor, 1));
111
+ --pm-radius-sm: calc(4px * var(--pm-radius-factor, 1));
112
+ --pm-radius-md: calc(8px * var(--pm-radius-factor, 1));
113
+ --pm-radius-lg: calc(12px * var(--pm-radius-factor, 1));
114
+ --pm-radius-xl: calc(16px * var(--pm-radius-factor, 1));
115
+ --pm-radius-2xl: calc(24px * var(--pm-radius-factor, 1));
116
+ --pm-radius-full: 9999px;
117
+ --pm-font-size-xs: 0.694rem;
118
+ --pm-font-size-sm: 0.833rem;
119
+ --pm-font-size-md: 1rem;
120
+ --pm-font-size-lg: clamp(1.128rem, 1.1rem + 0.125vw, 1.2rem);
121
+ --pm-font-size-xl: clamp(1.267rem, 1.2rem + 0.301vw, 1.44rem);
122
+ --pm-font-size-2xl: clamp(1.417rem, 1.295rem + 0.541vw, 1.728rem);
123
+ --pm-font-size-3xl: clamp(1.576rem, 1.381rem + 0.866vw, 2.074rem);
124
+ --pm-font-size-4xl: clamp(1.742rem, 1.45rem + 1.298vw, 2.488rem);
125
+ --pm-font-size-5xl: clamp(2.09rem, 1.74rem + 1.558vw, 2.986rem);
126
+ --pm-font-weight-regular: 400;
127
+ --pm-font-weight-medium: 500;
128
+ --pm-font-weight-semibold: 600;
129
+ --pm-font-weight-bold: 700;
130
+ --pm-line-height-tight: 1.15;
131
+ --pm-line-height-snug: 1.3;
132
+ --pm-line-height-normal: 1.5;
133
+ --pm-line-height-relaxed: 1.65;
134
+ --pm-font-sans: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
135
+ --pm-font-display: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
136
+ --pm-font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace;
137
+ --pm-font-serif: 'Source Serif 4 Variable', 'Source Serif 4', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif;
138
+ --pm-font-body: var(--pm-font-sans);
139
+ --pm-tracking-tighter: -0.03em;
140
+ --pm-tracking-tight: -0.015em;
141
+ --pm-tracking-normal: 0;
142
+ --pm-tracking-wide: 0.025em;
143
+ --pm-tracking-wider: 0.06em;
144
+ --pm-tracking-widest: 0.12em;
145
+ --pm-measure-narrow: 45ch;
146
+ --pm-measure-normal: 65ch;
147
+ --pm-measure-wide: 80ch;
148
+ --pm-elevation-0: none;
149
+ --pm-elevation-1: 0 1px 2px var(--pm-shadow-color-soft), 0 1px 1px var(--pm-shadow-color-soft);
150
+ --pm-elevation-2: 0 1px 2px var(--pm-shadow-color-soft), 0 4px 8px -2px var(--pm-shadow-color-soft), 0 2px 4px var(--pm-shadow-color-soft);
151
+ --pm-elevation-3: 0 2px 4px var(--pm-shadow-color-soft), 0 8px 16px -4px var(--pm-shadow-color), 0 4px 8px var(--pm-shadow-color-soft);
152
+ --pm-elevation-4: 0 4px 8px var(--pm-shadow-color-soft), 0 16px 32px -8px var(--pm-shadow-color), 0 8px 16px var(--pm-shadow-color-soft);
153
+ --pm-elevation-5: 0 8px 16px var(--pm-shadow-color-soft), 0 32px 64px -12px var(--pm-shadow-color-strong), 0 16px 32px var(--pm-shadow-color-soft);
154
+ --pm-z-base: 0;
155
+ --pm-z-raised: 1;
156
+ --pm-z-sticky: 100;
157
+ --pm-z-overlay: 1000;
158
+ --pm-z-toast: 1100;
159
+ --pm-blur-sm: 6px;
160
+ --pm-blur-md: 12px;
161
+ --pm-blur-lg: 20px;
162
+ --pm-blur-xl: 32px;
163
+ --pm-control-height-xs: max(calc(1.5rem * var(--pm-density, 1)), var(--pm-touch-min-sm, 0px));
164
+ --pm-control-height-sm: max(calc(2rem * var(--pm-density, 1)), var(--pm-touch-min-sm, 0px));
165
+ --pm-control-height-md: max(calc(2.5rem * var(--pm-density, 1)), var(--pm-touch-min, 0px));
166
+ --pm-control-height-lg: max(calc(3rem * var(--pm-density, 1)), var(--pm-touch-min, 0px));
167
+ --pm-control-height-xl: max(calc(3.5rem * var(--pm-density, 1)), var(--pm-touch-min, 0px));
168
+ --pm-duration-instant: calc(50ms * var(--pm-motion-scale, 1));
169
+ --pm-duration-fast: calc(120ms * var(--pm-motion-scale, 1));
170
+ --pm-duration-normal: calc(200ms * var(--pm-motion-scale, 1));
171
+ --pm-duration-moderate: calc(280ms * var(--pm-motion-scale, 1));
172
+ --pm-duration-slow: calc(400ms * var(--pm-motion-scale, 1));
173
+ --pm-duration-slower: calc(600ms * var(--pm-motion-scale, 1));
174
+ --pm-ease-standard: cubic-bezier(0.2, 0, 0, 1);
175
+ --pm-ease-decelerate: cubic-bezier(0, 0, 0, 1);
176
+ --pm-ease-accelerate: cubic-bezier(0.3, 0, 1, 1);
177
+ --pm-ease-emphasized: cubic-bezier(0.3, 0, 0, 1.0);
178
+ --pm-ease-spring: linear(0, 0.049, 0.161, 0.291, 0.428, 0.573, 0.691, 0.792, 0.874, 0.942, 0.987, 1.018, 1.039, 1.048, 1.051, 1.048, 1.043, 1.037, 1.029, 1.023, 1.017, 1.011, 1.007, 1.003, 1.001, 0.999, 0.998, 0.998, 0.997, 0.998, 0.998, 0.998, 0.998, 0.999, 0.999, 0.999, 1, 1, 1, 1);
179
+ --pm-ease-bounce: linear(0, 0.137, 0.425, 0.753, 1.037, 1.226, 1.307, 1.294, 1.22, 1.119, 1.018, 0.947, 0.91, 0.904, 0.922, 0.951, 0.983, 1.009, 1.025, 1.03, 1.027, 1.019, 1.009, 1, 0.994, 0.991, 0.991, 0.993, 0.996, 0.999, 1.001, 1.003, 1.003, 1.003, 1.002, 1.001, 1, 0.999, 0.999, 1);
180
+ --pm-ease-gentle: linear(0, 0.031, 0.103, 0.191, 0.296, 0.394, 0.489, 0.584, 0.662, 0.735, 0.794, 0.846, 0.885, 0.917, 0.945, 0.964, 0.98, 0.99, 0.998, 1.004, 1.007, 1.009, 1.01, 1.01, 1.009, 1.008, 1.008, 1.007, 1.006, 1.005, 1.004, 1.003, 1.002, 1.002, 1.001, 1.001, 1.001, 1, 1, 1);
181
+ --pm-radius-factor: 1;
182
+ --pm-density: 1;
183
+ --pm-motion-scale: 1;
184
+ --pm-surface: flat;
185
+ --pm-sf-bg: var(--pm-color-bg-surface);
186
+ --pm-sf-image: none;
187
+ --pm-sf-border: var(--pm-color-border);
188
+ --pm-sf-shadow: var(--pm-elevation-1);
189
+ --pm-sf-backdrop: none;
190
+ --pm-sf-control-bg: var(--pm-color-bg-surface);
191
+ --pm-sf-control-border: var(--pm-color-border-strong);
192
+ --pm-sf-control-shadow: none;
193
+ --pm-sf-raise: var(--pm-elevation-1);
194
+ --pm-sf-press: none;
195
+ --pm-sf-solid-image: none;
196
+ --pm-sf-soft-mix: 100%;
197
+ --pm-accent-1: light-dark(oklch(99.1% 0.0044 286.5), oklch(16.5% 0.0276 286.2));
198
+ --pm-accent-2: light-dark(oklch(97.55% 0.0121 286.91), oklch(19.5% 0.0391 286.2));
199
+ --pm-accent-3: light-dark(oklch(94.94% 0.0253 287.12), oklch(24.5% 0.0736 286.2));
200
+ --pm-accent-4: light-dark(oklch(92.52% 0.0378 287.11), oklch(28.3% 0.0966 286.2));
201
+ --pm-accent-5: light-dark(oklch(90% 0.051 287.12), oklch(31.8% 0.115 286.2));
202
+ --pm-accent-6: light-dark(oklch(86.67% 0.069 287.15), oklch(36.2% 0.1288 286.2));
203
+ --pm-accent-7: light-dark(oklch(81.91% 0.0955 287.22), oklch(42.5% 0.1472 286.2));
204
+ --pm-accent-8: light-dark(oklch(66.52% 0.1794 286.2), oklch(53% 0.1794 286.2));
205
+ --pm-accent-9: oklch(59.9% 0.2299 286.2);
206
+ --pm-accent-10: light-dark(oklch(55.4% 0.2299 286.2), oklch(63.45% 0.2086 287.67));
207
+ --pm-accent-11: light-dark(oklch(50% 0.2069 286.2), oklch(79.38% 0.11 287.27));
208
+ --pm-accent-12: light-dark(oklch(29% 0.0966 286.2), oklch(93.53% 0.0325 287.11));
209
+ --pm-secondary-1: light-dark(oklch(99.02% 0.0085 325.64), oklch(16.5% 0.0276 321.2));
210
+ --pm-secondary-2: light-dark(oklch(97.59% 0.0212 325.74), oklch(19.5% 0.0391 321.2));
211
+ --pm-secondary-3: light-dark(oklch(94.84% 0.0462 325.93), oklch(24.5% 0.0736 321.2));
212
+ --pm-secondary-4: light-dark(oklch(92.55% 0.0677 326.11), oklch(28.3% 0.0966 321.2));
213
+ --pm-secondary-5: light-dark(oklch(90.15% 0.091 326.3), oklch(31.8% 0.115 321.2));
214
+ --pm-secondary-6: light-dark(oklch(86.99% 0.1136 323.7), oklch(36.2% 0.1288 321.2));
215
+ --pm-secondary-7: light-dark(oklch(82.5% 0.1426 321.2), oklch(42.5% 0.1472 321.2));
216
+ --pm-secondary-8: light-dark(oklch(67.15% 0.1794 321.2), oklch(53% 0.1794 321.2));
217
+ --pm-secondary-9: oklch(59.9% 0.2299 321.2);
218
+ --pm-secondary-10: light-dark(oklch(55.4% 0.2299 321.2), oklch(64.4% 0.2299 321.2));
219
+ --pm-secondary-11: light-dark(oklch(50% 0.2069 321.2), oklch(79.95% 0.1713 321.54));
220
+ --pm-secondary-12: light-dark(oklch(29% 0.0966 321.2), oklch(93.53% 0.0584 326.03));
221
+ --pm-neutral-1: light-dark(oklch(99.15% 0.0041 286.34), oklch(16.5% 0.014 286.2));
222
+ --pm-neutral-2: light-dark(oklch(97.89% 0.0104 286.22), oklch(19.5% 0.014 286.2));
223
+ --pm-neutral-3: light-dark(oklch(95.4% 0.011 286.2), oklch(24.5% 0.014 286.2));
224
+ --pm-neutral-4: light-dark(oklch(93% 0.011 286.2), oklch(28.3% 0.014 286.2));
225
+ --pm-neutral-5: light-dark(oklch(90.5% 0.011 286.2), oklch(31.8% 0.014 286.2));
226
+ --pm-neutral-6: light-dark(oklch(87.2% 0.011 286.2), oklch(36.2% 0.014 286.2));
227
+ --pm-neutral-7: light-dark(oklch(82.5% 0.011 286.2), oklch(42.5% 0.014 286.2));
228
+ --pm-neutral-8: light-dark(oklch(65.39% 0.011 286.2), oklch(53% 0.014 286.2));
229
+ --pm-neutral-9: light-dark(oklch(56% 0.0137 286.2), oklch(62% 0.0175 286.2));
230
+ --pm-neutral-10: light-dark(oklch(51.5% 0.0137 286.2), oklch(66.5% 0.0175 286.2));
231
+ --pm-neutral-11: light-dark(oklch(50% 0.0137 286.2), oklch(80% 0.0175 286.2));
232
+ --pm-neutral-12: light-dark(oklch(29% 0.0137 286.2), oklch(94% 0.0175 286.2));
233
+ --pm-success-1: light-dark(oklch(99.3% 0.0096 162), oklch(16.5% 0.0192 162));
234
+ --pm-success-2: light-dark(oklch(97.9% 0.0192 162), oklch(19.5% 0.0272 162));
235
+ --pm-success-3: light-dark(oklch(95.4% 0.04 162), oklch(24.5% 0.0512 162));
236
+ --pm-success-4: light-dark(oklch(93% 0.0544 162), oklch(28.49% 0.064 160.47));
237
+ --pm-success-5: light-dark(oklch(90.5% 0.0704 162), oklch(32.18% 0.0736 159.34));
238
+ --pm-success-6: light-dark(oklch(87.2% 0.0832 162), oklch(36.58% 0.0832 159.66));
239
+ --pm-success-7: light-dark(oklch(82.5% 0.0992 162), oklch(42.84% 0.0966 160.18));
240
+ --pm-success-8: light-dark(oklch(64.04% 0.1248 162), oklch(53.32% 0.1194 160.62));
241
+ --pm-success-9: oklch(60.91% 0.1409 158.63);
242
+ --pm-success-10: light-dark(oklch(56.41% 0.1311 158.38), oklch(65.18% 0.1484 159.61));
243
+ --pm-success-11: light-dark(oklch(50.91% 0.119 158.02), oklch(80% 0.12 162));
244
+ --pm-success-12: light-dark(oklch(29.13% 0.0649 160.95), oklch(94% 0.048 162));
245
+ --pm-warning-1: light-dark(oklch(99.09% 0.0078 78.33), oklch(16.5% 0.0192 63));
246
+ --pm-warning-2: light-dark(oklch(97.66% 0.017 70.74), oklch(19.5% 0.0272 63));
247
+ --pm-warning-3: light-dark(oklch(94.98% 0.0363 69.29), oklch(24.5% 0.0512 63));
248
+ --pm-warning-4: light-dark(oklch(92.65% 0.0514 66.53), oklch(28.32% 0.0655 61.39));
249
+ --pm-warning-5: light-dark(oklch(90.22% 0.068 65.09), oklch(31.87% 0.0755 58.98));
250
+ --pm-warning-6: light-dark(oklch(87.2% 0.0832 63), oklch(36.26% 0.0853 59.66));
251
+ --pm-warning-7: light-dark(oklch(82.5% 0.0992 63), oklch(42.55% 0.0991 60.76));
252
+ --pm-warning-8: light-dark(oklch(65.96% 0.1248 63), oklch(53.04% 0.1224 61.71));
253
+ --pm-warning-9: oklch(78% 0.16 63);
254
+ --pm-warning-10: light-dark(oklch(74.5% 0.16 63), oklch(81.1% 0.1452 67.23));
255
+ --pm-warning-11: light-dark(oklch(50.18% 0.1229 55.97), oklch(80% 0.12 63));
256
+ --pm-warning-12: light-dark(oklch(29.01% 0.0665 62.4), oklch(93.64% 0.0448 67.3));
257
+ --pm-danger-1: light-dark(oklch(98.81% 0.0059 8.22), oklch(16.5% 0.0252 13.14));
258
+ --pm-danger-2: light-dark(oklch(97.1% 0.0145 9.65), oklch(19.5% 0.0357 13.14));
259
+ --pm-danger-3: light-dark(oklch(94.18% 0.0298 10.25), oklch(24.5% 0.0672 13.14));
260
+ --pm-danger-4: light-dark(oklch(91.75% 0.043 10.95), oklch(28.3% 0.0882 13.14));
261
+ --pm-danger-5: light-dark(oklch(89.22% 0.0575 11.33), oklch(31.8% 0.105 13.14));
262
+ --pm-danger-6: light-dark(oklch(85.88% 0.0777 11.62), oklch(36.2% 0.1176 13.14));
263
+ --pm-danger-7: light-dark(oklch(81.11% 0.109 11.82), oklch(42.5% 0.1344 13.14));
264
+ --pm-danger-8: light-dark(oklch(66.7% 0.1638 13.14), oklch(53% 0.1638 13.14));
265
+ --pm-danger-9: oklch(58% 0.21 13.14);
266
+ --pm-danger-10: light-dark(oklch(53.5% 0.21 13.14), oklch(62.5% 0.21 13.14));
267
+ --pm-danger-11: light-dark(oklch(50% 0.189 13.14), oklch(78.56% 0.1271 11.88));
268
+ --pm-danger-12: light-dark(oklch(29% 0.0882 13.14), oklch(92.76% 0.0375 10.71));
269
+ --pm-info-1: light-dark(oklch(99.2% 0.0062 215.1), oklch(16.5% 0.018 245.54));
270
+ --pm-info-2: light-dark(oklch(97.76% 0.0137 227.7), oklch(19.5% 0.0255 245.54));
271
+ --pm-info-3: light-dark(oklch(95.12% 0.0292 229.89), oklch(24.5% 0.048 245.54));
272
+ --pm-info-4: light-dark(oklch(92.69% 0.0418 234.13), oklch(28.3% 0.063 245.54));
273
+ --pm-info-5: light-dark(oklch(90.14% 0.0556 236.16), oklch(31.8% 0.075 245.54));
274
+ --pm-info-6: light-dark(oklch(86.95% 0.0711 240.93), oklch(36.2% 0.084 245.54));
275
+ --pm-info-7: light-dark(oklch(82.5% 0.093 245.54), oklch(42.5% 0.096 245.54));
276
+ --pm-info-8: light-dark(oklch(65.09% 0.117 245.54), oklch(53% 0.117 245.54));
277
+ --pm-info-9: oklch(60% 0.15 245.54);
278
+ --pm-info-10: light-dark(oklch(55.74% 0.1469 247.09), oklch(64.5% 0.15 245.54));
279
+ --pm-info-11: light-dark(oklch(50.22% 0.1322 247.06), oklch(79.88% 0.1095 244.34));
280
+ --pm-info-12: light-dark(oklch(29% 0.063 245.54), oklch(93.71% 0.0363 232.96));
281
+ --pm-color-bg-canvas: light-dark(oklch(97.89% 0.0104 286.22), oklch(16.5% 0.014 286.2));
282
+ --pm-color-bg-surface: light-dark(oklch(100% 0 0), oklch(19.5% 0.014 286.2));
283
+ --pm-color-bg-raised: light-dark(oklch(100% 0 0), oklch(24.5% 0.014 286.2));
284
+ --pm-color-bg-subtle: light-dark(oklch(99.15% 0.0041 286.34), oklch(19.5% 0.014 286.2));
285
+ --pm-color-bg-muted: light-dark(oklch(95.4% 0.011 286.2), oklch(24.5% 0.014 286.2));
286
+ --pm-color-bg-hover: light-dark(oklch(93% 0.011 286.2), oklch(28.3% 0.014 286.2));
287
+ --pm-color-bg-active: light-dark(oklch(90.5% 0.011 286.2), oklch(31.8% 0.014 286.2));
288
+ --pm-color-bg-inverse: light-dark(oklch(29% 0.0137 286.2), oklch(94% 0.0175 286.2));
289
+ --pm-color-fg: light-dark(oklch(29% 0.0137 286.2), oklch(94% 0.0175 286.2));
290
+ --pm-color-fg-muted: light-dark(oklch(50% 0.0137 286.2), oklch(80% 0.0175 286.2));
291
+ --pm-color-fg-inverse: light-dark(oklch(99.15% 0.0041 286.34), oklch(16.5% 0.014 286.2));
292
+ --pm-color-fg-disabled: light-dark(oklch(65.39% 0.011 286.2), oklch(53% 0.014 286.2));
293
+ --pm-color-border: light-dark(oklch(87.2% 0.011 286.2), oklch(36.2% 0.014 286.2));
294
+ --pm-color-border-subtle: light-dark(oklch(90.5% 0.011 286.2), oklch(31.8% 0.014 286.2));
295
+ --pm-color-border-strong: light-dark(oklch(65.39% 0.011 286.2), oklch(53% 0.014 286.2));
296
+ --pm-color-overlay: light-dark(oklch(12% 0.02 286.2 / 0.45), oklch(12% 0.02 286.2 / 0.7));
297
+ --pm-color-accent-solid: oklch(58.82% 0.2299 286.2);
298
+ --pm-color-accent-solid-hover: oklch(53.82% 0.2299 286.2);
299
+ --pm-color-accent-on-solid: oklch(100% 0 0);
300
+ --pm-color-accent-soft: light-dark(oklch(94.94% 0.0253 287.12), oklch(24.5% 0.0736 286.2));
301
+ --pm-color-accent-soft-hover: light-dark(oklch(92.52% 0.0378 287.11), oklch(28.3% 0.0966 286.2));
302
+ --pm-color-accent-soft-active: light-dark(oklch(90% 0.051 287.12), oklch(31.8% 0.115 286.2));
303
+ --pm-color-accent-border: light-dark(oklch(81.91% 0.0955 287.22), oklch(42.5% 0.1472 286.2));
304
+ --pm-color-accent-border-strong: light-dark(oklch(66.52% 0.1794 286.2), oklch(53% 0.1794 286.2));
305
+ --pm-color-accent-text: light-dark(oklch(50% 0.2069 286.2), oklch(79.38% 0.11 287.27));
306
+ --pm-color-accent-text-strong: light-dark(oklch(29% 0.0966 286.2), oklch(93.53% 0.0325 287.11));
307
+ --pm-color-secondary-solid: oklch(59.53% 0.2299 321.2);
308
+ --pm-color-secondary-solid-hover: oklch(54.53% 0.2299 321.2);
309
+ --pm-color-secondary-on-solid: oklch(100% 0 0);
310
+ --pm-color-secondary-soft: light-dark(oklch(94.84% 0.0462 325.93), oklch(24.5% 0.0736 321.2));
311
+ --pm-color-secondary-soft-hover: light-dark(oklch(92.55% 0.0677 326.11), oklch(28.3% 0.0966 321.2));
312
+ --pm-color-secondary-soft-active: light-dark(oklch(90.15% 0.091 326.3), oklch(31.8% 0.115 321.2));
313
+ --pm-color-secondary-border: light-dark(oklch(82.5% 0.1426 321.2), oklch(42.5% 0.1472 321.2));
314
+ --pm-color-secondary-border-strong: light-dark(oklch(67.15% 0.1794 321.2), oklch(53% 0.1794 321.2));
315
+ --pm-color-secondary-text: light-dark(oklch(50% 0.2069 321.2), oklch(79.95% 0.1713 321.54));
316
+ --pm-color-secondary-text-strong: light-dark(oklch(29% 0.0966 321.2), oklch(93.53% 0.0584 326.03));
317
+ --pm-color-neutral-solid: light-dark(oklch(56% 0.0137 286.2), oklch(62% 0.0175 286.2));
318
+ --pm-color-neutral-solid-hover: light-dark(oklch(51% 0.0137 286.2), oklch(67% 0.0175 286.2));
319
+ --pm-color-neutral-on-solid: light-dark(oklch(100% 0 0), oklch(20% 0.0175 286.2));
320
+ --pm-color-neutral-soft: light-dark(oklch(95.4% 0.011 286.2), oklch(24.5% 0.014 286.2));
321
+ --pm-color-neutral-soft-hover: light-dark(oklch(93% 0.011 286.2), oklch(28.3% 0.014 286.2));
322
+ --pm-color-neutral-soft-active: light-dark(oklch(90.5% 0.011 286.2), oklch(31.8% 0.014 286.2));
323
+ --pm-color-neutral-border: light-dark(oklch(82.5% 0.011 286.2), oklch(42.5% 0.014 286.2));
324
+ --pm-color-neutral-border-strong: light-dark(oklch(65.39% 0.011 286.2), oklch(53% 0.014 286.2));
325
+ --pm-color-neutral-text: light-dark(oklch(50% 0.0137 286.2), oklch(80% 0.0175 286.2));
326
+ --pm-color-neutral-text-strong: light-dark(oklch(29% 0.0137 286.2), oklch(94% 0.0175 286.2));
327
+ --pm-color-success-solid: oklch(60.91% 0.1409 158.63);
328
+ --pm-color-success-solid-hover: oklch(65.91% 0.1409 158.63);
329
+ --pm-color-success-on-solid: oklch(20.47% 0.0521 153.51);
330
+ --pm-color-success-soft: light-dark(oklch(95.4% 0.04 162), oklch(24.5% 0.0512 162));
331
+ --pm-color-success-soft-hover: light-dark(oklch(93% 0.0544 162), oklch(28.49% 0.064 160.47));
332
+ --pm-color-success-soft-active: light-dark(oklch(90.5% 0.0704 162), oklch(32.18% 0.0736 159.34));
333
+ --pm-color-success-border: light-dark(oklch(82.5% 0.0992 162), oklch(42.84% 0.0966 160.18));
334
+ --pm-color-success-border-strong: light-dark(oklch(64.04% 0.1248 162), oklch(53.32% 0.1194 160.62));
335
+ --pm-color-success-text: light-dark(oklch(50.91% 0.119 158.02), oklch(80% 0.12 162));
336
+ --pm-color-success-text-strong: light-dark(oklch(29.13% 0.0649 160.95), oklch(94% 0.048 162));
337
+ --pm-color-warning-solid: oklch(78% 0.16 63);
338
+ --pm-color-warning-solid-hover: oklch(81.61% 0.1411 67.36);
339
+ --pm-color-warning-on-solid: oklch(20.12% 0.0521 51.5);
340
+ --pm-color-warning-soft: light-dark(oklch(94.98% 0.0363 69.29), oklch(24.5% 0.0512 63));
341
+ --pm-color-warning-soft-hover: light-dark(oklch(92.65% 0.0514 66.53), oklch(28.32% 0.0655 61.39));
342
+ --pm-color-warning-soft-active: light-dark(oklch(90.22% 0.068 65.09), oklch(31.87% 0.0755 58.98));
343
+ --pm-color-warning-border: light-dark(oklch(82.5% 0.0992 63), oklch(42.55% 0.0991 60.76));
344
+ --pm-color-warning-border-strong: light-dark(oklch(65.96% 0.1248 63), oklch(53.04% 0.1224 61.71));
345
+ --pm-color-warning-text: light-dark(oklch(50.18% 0.1229 55.97), oklch(80% 0.12 63));
346
+ --pm-color-warning-text-strong: light-dark(oklch(29.01% 0.0665 62.4), oklch(93.64% 0.0448 67.3));
347
+ --pm-color-danger-solid: oklch(58% 0.21 13.14);
348
+ --pm-color-danger-solid-hover: oklch(53% 0.21 13.14);
349
+ --pm-color-danger-on-solid: oklch(100% 0 0);
350
+ --pm-color-danger-soft: light-dark(oklch(94.18% 0.0298 10.25), oklch(24.5% 0.0672 13.14));
351
+ --pm-color-danger-soft-hover: light-dark(oklch(91.75% 0.043 10.95), oklch(28.3% 0.0882 13.14));
352
+ --pm-color-danger-soft-active: light-dark(oklch(89.22% 0.0575 11.33), oklch(31.8% 0.105 13.14));
353
+ --pm-color-danger-border: light-dark(oklch(81.11% 0.109 11.82), oklch(42.5% 0.1344 13.14));
354
+ --pm-color-danger-border-strong: light-dark(oklch(66.7% 0.1638 13.14), oklch(53% 0.1638 13.14));
355
+ --pm-color-danger-text: light-dark(oklch(50% 0.189 13.14), oklch(78.56% 0.1271 11.88));
356
+ --pm-color-danger-text-strong: light-dark(oklch(29% 0.0882 13.14), oklch(92.76% 0.0375 10.71));
357
+ --pm-color-info-solid: oklch(60% 0.15 245.54);
358
+ --pm-color-info-solid-hover: oklch(65% 0.15 245.54);
359
+ --pm-color-info-on-solid: oklch(20.25% 0.0569 249.7);
360
+ --pm-color-info-soft: light-dark(oklch(95.12% 0.0292 229.89), oklch(24.5% 0.048 245.54));
361
+ --pm-color-info-soft-hover: light-dark(oklch(92.69% 0.0418 234.13), oklch(28.3% 0.063 245.54));
362
+ --pm-color-info-soft-active: light-dark(oklch(90.14% 0.0556 236.16), oklch(31.8% 0.075 245.54));
363
+ --pm-color-info-border: light-dark(oklch(82.5% 0.093 245.54), oklch(42.5% 0.096 245.54));
364
+ --pm-color-info-border-strong: light-dark(oklch(65.09% 0.117 245.54), oklch(53% 0.117 245.54));
365
+ --pm-color-info-text: light-dark(oklch(50.22% 0.1322 247.06), oklch(79.88% 0.1095 244.34));
366
+ --pm-color-info-text-strong: light-dark(oklch(29% 0.063 245.54), oklch(93.71% 0.0363 232.96));
367
+ --pm-color-ring: oklch(58.82% 0.2299 286.2);
368
+ --pm-color-selection: light-dark(oklch(90% 0.051 287.12 / 0.6), oklch(31.8% 0.115 286.2 / 0.6));
369
+ --pm-neutral-hue: 286;
370
+ --pm-shadow-color-soft: light-dark(oklch(30% 0.03 286 / 0.08), oklch(0% 0 0 / 0.3));
371
+ --pm-shadow-color: light-dark(oklch(30% 0.04 286 / 0.14), oklch(0% 0 0 / 0.45));
372
+ --pm-shadow-color-strong: light-dark(oklch(25% 0.05 286 / 0.24), oklch(0% 0 0 / 0.6));
373
+ }
374
+
375
+ :root[data-mode="light"], [data-mode="light"] { color-scheme: light; }
376
+
377
+ :root[data-mode="dark"], [data-mode="dark"] { color-scheme: dark; }
378
+
379
+ :root[data-surface="flat"], [data-surface="flat"] {
380
+ --pm-surface: flat;
381
+ --pm-sf-bg: var(--pm-color-bg-surface);
382
+ --pm-sf-image: none;
383
+ --pm-sf-border: var(--pm-color-border);
384
+ --pm-sf-shadow: var(--pm-elevation-1);
385
+ --pm-sf-backdrop: none;
386
+ --pm-sf-control-bg: var(--pm-color-bg-surface);
387
+ --pm-sf-control-border: var(--pm-color-border-strong);
388
+ --pm-sf-control-shadow: none;
389
+ --pm-sf-raise: var(--pm-elevation-1);
390
+ --pm-sf-press: none;
391
+ --pm-sf-solid-image: none;
392
+ --pm-sf-soft-mix: 100%;
393
+ }
394
+ :root[data-surface="outline"], [data-surface="outline"] {
395
+ --pm-surface: outline;
396
+ --pm-sf-bg: transparent;
397
+ --pm-sf-image: none;
398
+ --pm-sf-border: var(--pm-color-border-strong);
399
+ --pm-sf-shadow: none;
400
+ --pm-sf-backdrop: none;
401
+ --pm-sf-control-bg: transparent;
402
+ --pm-sf-control-border: var(--pm-color-border-strong);
403
+ --pm-sf-control-shadow: none;
404
+ --pm-sf-raise: none;
405
+ --pm-sf-press: none;
406
+ --pm-sf-solid-image: none;
407
+ --pm-sf-soft-mix: 100%;
408
+ }
409
+ :root[data-surface="gradient"], [data-surface="gradient"] {
410
+ --pm-surface: gradient;
411
+ --pm-sf-bg: var(--pm-color-bg-surface);
412
+ --pm-sf-image: linear-gradient(150deg in oklab, color-mix(in oklab, var(--pm-color-accent-soft) 75%, transparent), transparent 55%, color-mix(in oklab, var(--pm-color-secondary-soft) 70%, transparent));
413
+ --pm-sf-border: color-mix(in oklab, var(--pm-color-accent-border) 70%, var(--pm-color-border));
414
+ --pm-sf-shadow: var(--pm-elevation-2);
415
+ --pm-sf-backdrop: none;
416
+ --pm-sf-control-bg: var(--pm-color-bg-surface);
417
+ --pm-sf-control-border: var(--pm-color-border-strong);
418
+ --pm-sf-control-shadow: none;
419
+ --pm-sf-raise: var(--pm-elevation-2);
420
+ --pm-sf-press: var(--pm-elevation-1);
421
+ --pm-sf-solid-image: linear-gradient(160deg in oklab, oklch(100% 0 0 / 0.22), oklch(100% 0 0 / 0) 50%, oklch(0% 0 0 / 0.12));
422
+ --pm-sf-soft-mix: 100%;
423
+ }
424
+ :root[data-surface="glass"], [data-surface="glass"] {
425
+ --pm-surface: glass;
426
+ --pm-sf-bg: color-mix(in oklab, var(--pm-color-bg-surface) var(--pm-glass-opacity, 58%), transparent);
427
+ --pm-sf-image: linear-gradient(160deg in oklab, light-dark(oklch(100% 0 0 / 0.5), oklch(100% 0 0 / 0.08)), oklch(100% 0 0 / 0) 40%);
428
+ --pm-sf-border: light-dark(oklch(100% 0 0 / 0.6), oklch(100% 0 0 / 0.14));
429
+ --pm-sf-shadow: inset 0 1px 0 light-dark(oklch(100% 0 0 / 0.7), oklch(100% 0 0 / 0.1)), var(--pm-elevation-3);
430
+ --pm-sf-backdrop: blur(var(--pm-glass-blur, 18px)) saturate(170%);
431
+ --pm-sf-control-bg: color-mix(in oklab, var(--pm-color-bg-surface) 70%, transparent);
432
+ --pm-sf-control-border: var(--pm-color-border-strong);
433
+ --pm-sf-control-shadow: inset 0 1px 0 light-dark(oklch(100% 0 0 / 0.5), oklch(100% 0 0 / 0.06));
434
+ --pm-sf-raise: inset 0 1px 0 oklch(100% 0 0 / 0.25), var(--pm-elevation-1);
435
+ --pm-sf-press: none;
436
+ --pm-sf-solid-image: linear-gradient(180deg, oklch(100% 0 0 / 0.2), oklch(100% 0 0 / 0) 60%);
437
+ --pm-sf-soft-mix: 72%;
438
+ }
439
+ :root[data-surface="neumorphic"], [data-surface="neumorphic"] {
440
+ --pm-surface: neumorphic;
441
+ --pm-sf-bg: var(--pm-color-bg-canvas);
442
+ --pm-sf-image: none;
443
+ --pm-sf-border: color-mix(in oklab, var(--pm-color-border) 70%, transparent);
444
+ --pm-sf-shadow: -6px -6px 14px light-dark(oklch(100% 0 0 / 0.85), oklch(100% 0 0 / 0.06)), 6px 6px 16px light-dark(oklch(35% 0.03 var(--pm-neutral-hue) / 0.22), oklch(0% 0 0 / 0.55));
445
+ --pm-sf-backdrop: none;
446
+ --pm-sf-control-bg: var(--pm-color-bg-canvas);
447
+ --pm-sf-control-border: var(--pm-color-border-strong);
448
+ --pm-sf-control-shadow: inset 3px 3px 6px light-dark(oklch(35% 0.03 var(--pm-neutral-hue) / 0.22), oklch(0% 0 0 / 0.55)), inset -3px -3px 6px light-dark(oklch(100% 0 0 / 0.85), oklch(100% 0 0 / 0.06));
449
+ --pm-sf-raise: -3px -3px 8px light-dark(oklch(100% 0 0 / 0.85), oklch(100% 0 0 / 0.06)), 3px 3px 8px light-dark(oklch(35% 0.03 var(--pm-neutral-hue) / 0.22), oklch(0% 0 0 / 0.55));
450
+ --pm-sf-press: inset 2px 2px 5px light-dark(oklch(35% 0.03 var(--pm-neutral-hue) / 0.22), oklch(0% 0 0 / 0.55)), inset -2px -2px 5px light-dark(oklch(100% 0 0 / 0.85), oklch(100% 0 0 / 0.06));
451
+ --pm-sf-solid-image: none;
452
+ --pm-sf-soft-mix: 100%;
453
+ }
454
+ /* Glass fallbacks: opaque when blur is unsupported or the user prefers less transparency. */
455
+ @supports not (backdrop-filter: blur(1px)) {
456
+ [data-surface="glass"], :root { --pm-glass-opacity: 96%; }
457
+ }
458
+ @media (prefers-reduced-transparency: reduce) {
459
+ :root, [data-surface] { --pm-glass-opacity: 96%; --pm-sf-backdrop: none; }
460
+ }
461
+ @media (prefers-contrast: more) {
462
+ :root, [data-surface] { --pm-glass-opacity: 92%; --pm-sf-border: var(--pm-color-border-strong); }
463
+ }
464
+
465
+ :root[data-radius="none"], [data-radius="none"] { --pm-radius-factor: 0; }
466
+ :root[data-radius="sharp"], [data-radius="sharp"] { --pm-radius-factor: 0.5; }
467
+ :root[data-radius="rounded"], [data-radius="rounded"] { --pm-radius-factor: 1; }
468
+ :root[data-radius="soft"], [data-radius="soft"] { --pm-radius-factor: 1.5; }
469
+ :root[data-radius="pill"], [data-radius="pill"] { --pm-radius-factor: 1; --pm-radius-control: 9999px; }
470
+ :root[data-density="compact"], [data-density="compact"] { --pm-density: 0.85; }
471
+ :root[data-density="comfortable"], [data-density="comfortable"] { --pm-density: 1; }
472
+ :root[data-density="spacious"], [data-density="spacious"] { --pm-density: 1.18; }
473
+ :root[data-motion="none"], [data-motion="none"] { --pm-motion-scale: 0; }
474
+ :root[data-motion="reduced"], [data-motion="reduced"] { --pm-motion-scale: 0.5; }
475
+ :root[data-motion="full"], [data-motion="full"] { --pm-motion-scale: 1; }
476
+ :root[data-font="system"], [data-font="system"] { --pm-font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
477
+ :root[data-font="inter"], [data-font="inter"] { --pm-font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Source Serif 4 Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
478
+ :root[data-font="figtree"], [data-font="figtree"] { --pm-font-sans: 'Figtree Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Figtree Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Lora Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
479
+ :root[data-font="jakarta"], [data-font="jakarta"] { --pm-font-sans: 'Plus Jakarta Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Plus Jakarta Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Source Serif 4 Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'Fira Code Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
480
+ :root[data-font="manrope"], [data-font="manrope"] { --pm-font-sans: 'Manrope Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Manrope Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Source Serif 4 Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
481
+ :root[data-font="grotesk"], [data-font="grotesk"] { --pm-font-sans: 'DM Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Space Grotesk Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Lora Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'Fira Code Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
482
+ :root[data-font="friendly"], [data-font="friendly"] { --pm-font-sans: 'Nunito Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Nunito Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Lora Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'Fira Code Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-sans); }
483
+ :root[data-font="editorial"], [data-font="editorial"] { --pm-font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-display: 'Fraunces Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --pm-font-serif: 'Source Serif 4 Variable', ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif; --pm-font-mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace; --pm-font-body: var(--pm-font-serif); }
484
+ :root[data-font], [data-font] { font-family: var(--pm-font-sans); }
485
+ @media (prefers-reduced-motion: reduce) { :root:not([data-motion]) { --pm-motion-scale: 0.5; } }
486
+
487
+ @media (forced-colors: active) {
488
+ :root, [data-theme] {
489
+ --pm-color-bg-canvas: Canvas; --pm-color-bg-surface: Canvas; --pm-color-fg: CanvasText;
490
+ --pm-color-fg-muted: CanvasText; --pm-color-border: CanvasText; --pm-color-border-strong: CanvasText;
491
+ --pm-color-ring: Highlight;
492
+ --pm-sf-border: CanvasText; --pm-sf-control-border: FieldText;
493
+ }
494
+ }
495
+ }
496
+
497
+ /* Tone context (generated) */
498
+ @layer pm.components {
499
+ :where(:root, [data-theme]) { --pm-tone-solid: var(--pm-color-accent-solid); --pm-tone-solid-hover: var(--pm-color-accent-solid-hover); --pm-tone-on-solid: var(--pm-color-accent-on-solid); --pm-tone-soft: var(--pm-color-accent-soft); --pm-tone-soft-hover: var(--pm-color-accent-soft-hover); --pm-tone-soft-active: var(--pm-color-accent-soft-active); --pm-tone-border: var(--pm-color-accent-border); --pm-tone-border-strong: var(--pm-color-accent-border-strong); --pm-tone-text: var(--pm-color-accent-text); --pm-tone-text-strong: var(--pm-color-accent-text-strong); }
500
+ :where([data-tone="accent"]) { --pm-tone-solid: var(--pm-color-accent-solid); --pm-tone-solid-hover: var(--pm-color-accent-solid-hover); --pm-tone-on-solid: var(--pm-color-accent-on-solid); --pm-tone-soft: var(--pm-color-accent-soft); --pm-tone-soft-hover: var(--pm-color-accent-soft-hover); --pm-tone-soft-active: var(--pm-color-accent-soft-active); --pm-tone-border: var(--pm-color-accent-border); --pm-tone-border-strong: var(--pm-color-accent-border-strong); --pm-tone-text: var(--pm-color-accent-text); --pm-tone-text-strong: var(--pm-color-accent-text-strong); }
501
+ :where([data-tone="secondary"]) { --pm-tone-solid: var(--pm-color-secondary-solid); --pm-tone-solid-hover: var(--pm-color-secondary-solid-hover); --pm-tone-on-solid: var(--pm-color-secondary-on-solid); --pm-tone-soft: var(--pm-color-secondary-soft); --pm-tone-soft-hover: var(--pm-color-secondary-soft-hover); --pm-tone-soft-active: var(--pm-color-secondary-soft-active); --pm-tone-border: var(--pm-color-secondary-border); --pm-tone-border-strong: var(--pm-color-secondary-border-strong); --pm-tone-text: var(--pm-color-secondary-text); --pm-tone-text-strong: var(--pm-color-secondary-text-strong); }
502
+ :where([data-tone="neutral"]) { --pm-tone-solid: var(--pm-color-neutral-solid); --pm-tone-solid-hover: var(--pm-color-neutral-solid-hover); --pm-tone-on-solid: var(--pm-color-neutral-on-solid); --pm-tone-soft: var(--pm-color-neutral-soft); --pm-tone-soft-hover: var(--pm-color-neutral-soft-hover); --pm-tone-soft-active: var(--pm-color-neutral-soft-active); --pm-tone-border: var(--pm-color-neutral-border); --pm-tone-border-strong: var(--pm-color-neutral-border-strong); --pm-tone-text: var(--pm-color-neutral-text); --pm-tone-text-strong: var(--pm-color-neutral-text-strong); }
503
+ :where([data-tone="success"]) { --pm-tone-solid: var(--pm-color-success-solid); --pm-tone-solid-hover: var(--pm-color-success-solid-hover); --pm-tone-on-solid: var(--pm-color-success-on-solid); --pm-tone-soft: var(--pm-color-success-soft); --pm-tone-soft-hover: var(--pm-color-success-soft-hover); --pm-tone-soft-active: var(--pm-color-success-soft-active); --pm-tone-border: var(--pm-color-success-border); --pm-tone-border-strong: var(--pm-color-success-border-strong); --pm-tone-text: var(--pm-color-success-text); --pm-tone-text-strong: var(--pm-color-success-text-strong); }
504
+ :where([data-tone="warning"]) { --pm-tone-solid: var(--pm-color-warning-solid); --pm-tone-solid-hover: var(--pm-color-warning-solid-hover); --pm-tone-on-solid: var(--pm-color-warning-on-solid); --pm-tone-soft: var(--pm-color-warning-soft); --pm-tone-soft-hover: var(--pm-color-warning-soft-hover); --pm-tone-soft-active: var(--pm-color-warning-soft-active); --pm-tone-border: var(--pm-color-warning-border); --pm-tone-border-strong: var(--pm-color-warning-border-strong); --pm-tone-text: var(--pm-color-warning-text); --pm-tone-text-strong: var(--pm-color-warning-text-strong); }
505
+ :where([data-tone="danger"]) { --pm-tone-solid: var(--pm-color-danger-solid); --pm-tone-solid-hover: var(--pm-color-danger-solid-hover); --pm-tone-on-solid: var(--pm-color-danger-on-solid); --pm-tone-soft: var(--pm-color-danger-soft); --pm-tone-soft-hover: var(--pm-color-danger-soft-hover); --pm-tone-soft-active: var(--pm-color-danger-soft-active); --pm-tone-border: var(--pm-color-danger-border); --pm-tone-border-strong: var(--pm-color-danger-border-strong); --pm-tone-text: var(--pm-color-danger-text); --pm-tone-text-strong: var(--pm-color-danger-text-strong); }
506
+ :where([data-tone="info"]) { --pm-tone-solid: var(--pm-color-info-solid); --pm-tone-solid-hover: var(--pm-color-info-solid-hover); --pm-tone-on-solid: var(--pm-color-info-on-solid); --pm-tone-soft: var(--pm-color-info-soft); --pm-tone-soft-hover: var(--pm-color-info-soft-hover); --pm-tone-soft-active: var(--pm-color-info-soft-active); --pm-tone-border: var(--pm-color-info-border); --pm-tone-border-strong: var(--pm-color-info-border-strong); --pm-tone-text: var(--pm-color-info-text); --pm-tone-text-strong: var(--pm-color-info-text-strong); }
507
+ }
508
+
509
+ /* Button — <button class="pm-button" data-variant="solid|soft|outline|ghost|link" data-tone data-size> */
510
+ @layer pm.components {
511
+ :where(.pm-button) {
512
+ --_h: var(--pm-control-height-md);
513
+ --_px: calc(var(--pm-space-4) * var(--pm-density, 1));
514
+ --_fs: var(--pm-font-size-sm);
515
+ --_bg: var(--pm-tone-solid);
516
+ --_bg-hover: var(--pm-tone-solid-hover);
517
+ --_fg: var(--pm-tone-on-solid);
518
+ --_border: transparent;
519
+ --_image: var(--pm-sf-solid-image, none);
520
+ --_shadow: var(--pm-sf-raise, none);
521
+ --_shadow-active: var(--pm-sf-press, none);
522
+
523
+ display: inline-flex;
524
+ align-items: center;
525
+ justify-content: center;
526
+ gap: 0.5em;
527
+ min-block-size: var(--_h);
528
+ min-inline-size: var(--_h);
529
+ padding-inline: var(--_px);
530
+ border: 1px solid var(--_border);
531
+ border-radius: var(--pm-radius-control, var(--pm-radius-md));
532
+ background: var(--_image), var(--_bg);
533
+ color: var(--_fg);
534
+ box-shadow: var(--_shadow);
535
+ font: inherit;
536
+ font-size: var(--_fs);
537
+ font-weight: var(--pm-font-weight-semibold);
538
+ line-height: 1;
539
+ white-space: nowrap;
540
+ text-decoration: none;
541
+ cursor: pointer;
542
+ user-select: none;
543
+ -webkit-tap-highlight-color: transparent;
544
+ corner-shape: squircle;
545
+ transition:
546
+ background-color var(--pm-duration-fast) var(--pm-ease-standard),
547
+ border-color var(--pm-duration-fast) var(--pm-ease-standard),
548
+ color var(--pm-duration-fast) var(--pm-ease-standard),
549
+ box-shadow var(--pm-duration-normal) var(--pm-ease-standard);
550
+
551
+ @media (prefers-reduced-motion: no-preference) {
552
+ transition:
553
+ background-color var(--pm-duration-fast) var(--pm-ease-standard),
554
+ border-color var(--pm-duration-fast) var(--pm-ease-standard),
555
+ color var(--pm-duration-fast) var(--pm-ease-standard),
556
+ box-shadow var(--pm-duration-normal) var(--pm-ease-standard),
557
+ scale var(--pm-duration-normal) var(--pm-ease-spring);
558
+ }
559
+
560
+ &:hover:not(:disabled, [aria-disabled="true"]) { --_bg: var(--_bg-hover); }
561
+ &:active:not(:disabled, [aria-disabled="true"]) {
562
+ --_shadow: var(--_shadow-active);
563
+ @media (prefers-reduced-motion: no-preference) { scale: 0.97; }
564
+ }
565
+ &:is(:disabled, [aria-disabled="true"]) {
566
+ cursor: not-allowed;
567
+ opacity: 0.55;
568
+ box-shadow: none;
569
+ }
570
+ & > svg { inline-size: 1.15em; block-size: 1.15em; flex: none; }
571
+ }
572
+
573
+ /* Variants */
574
+ :where(.pm-button[data-variant="soft"]) {
575
+ --_bg: color-mix(in oklab, var(--pm-tone-soft) var(--pm-sf-soft-mix, 100%), transparent);
576
+ --_bg-hover: color-mix(in oklab, var(--pm-tone-soft-hover) var(--pm-sf-soft-mix, 100%), transparent);
577
+ --_fg: var(--pm-tone-text);
578
+ --_image: none;
579
+ }
580
+ :where(.pm-button[data-variant="outline"]) {
581
+ --_bg: transparent;
582
+ --_bg-hover: var(--pm-tone-soft);
583
+ --_fg: var(--pm-tone-text);
584
+ --_border: var(--pm-tone-border-strong);
585
+ --_image: none;
586
+ --_shadow: none;
587
+ }
588
+ :where(.pm-button[data-variant="ghost"]) {
589
+ --_bg: transparent;
590
+ --_bg-hover: var(--pm-tone-soft);
591
+ --_fg: var(--pm-tone-text);
592
+ --_image: none;
593
+ --_shadow: none;
594
+ --_shadow-active: none;
595
+ }
596
+ :where(.pm-button[data-variant="link"]) {
597
+ --_bg: transparent;
598
+ --_bg-hover: transparent;
599
+ --_fg: var(--pm-tone-text);
600
+ --_image: none;
601
+ --_shadow: none;
602
+ --_shadow-active: none;
603
+ --_px: 0;
604
+ min-inline-size: 0;
605
+ text-decoration: underline;
606
+ text-underline-offset: 0.2em;
607
+ }
608
+
609
+ /* Sizes */
610
+ :where(.pm-button[data-size="xs"]) { --_h: var(--pm-control-height-xs); --_px: calc(var(--pm-space-2) * var(--pm-density, 1)); --_fs: var(--pm-font-size-xs); }
611
+ :where(.pm-button[data-size="sm"]) { --_h: var(--pm-control-height-sm); --_px: calc(var(--pm-space-3) * var(--pm-density, 1)); --_fs: var(--pm-font-size-sm); }
612
+ :where(.pm-button[data-size="lg"]) { --_h: var(--pm-control-height-lg); --_px: calc(var(--pm-space-5) * var(--pm-density, 1)); --_fs: var(--pm-font-size-md); }
613
+ :where(.pm-button[data-size="xl"]) { --_h: var(--pm-control-height-xl); --_px: calc(var(--pm-space-6) * var(--pm-density, 1)); --_fs: var(--pm-font-size-lg); }
614
+
615
+ /* Icon-only button: square, needs aria-label */
616
+ :where(.pm-button[data-icon]) {
617
+ --_px: 0;
618
+ inline-size: var(--_h);
619
+ /* The glyph is the whole label: a little larger than in a text button. */
620
+ --pm-icon-size: 1.3em;
621
+ & > svg { inline-size: 1.3em; block-size: 1.3em; }
622
+ }
623
+
624
+ /* Loading: keep width, show spinner, block interaction */
625
+ :where(.pm-button[data-loading]) {
626
+ position: relative;
627
+ color: transparent;
628
+ pointer-events: none;
629
+ &::after {
630
+ content: "";
631
+ position: absolute;
632
+ inset: 0;
633
+ margin: auto;
634
+ inline-size: 1.1em;
635
+ block-size: 1.1em;
636
+ border: 2px solid var(--_fg);
637
+ border-inline-end-color: transparent;
638
+ border-radius: 50%;
639
+ @media (prefers-reduced-motion: no-preference) {
640
+ animation: pm-spin 0.7s linear infinite;
641
+ }
642
+ }
643
+ }
644
+
645
+ /* Button group: joined edges */
646
+ :where(.pm-button-group) {
647
+ display: inline-flex;
648
+ isolation: isolate;
649
+ & > :where(.pm-button) { border-radius: 0; }
650
+ & > :where(.pm-button:first-child) {
651
+ border-start-start-radius: var(--pm-radius-control, var(--pm-radius-md));
652
+ border-end-start-radius: var(--pm-radius-control, var(--pm-radius-md));
653
+ }
654
+ & > :where(.pm-button:last-child) {
655
+ border-start-end-radius: var(--pm-radius-control, var(--pm-radius-md));
656
+ border-end-end-radius: var(--pm-radius-control, var(--pm-radius-md));
657
+ }
658
+ & > :where(.pm-button:not(:first-child)) { margin-inline-start: -1px; }
659
+ & > :where(.pm-button:focus-visible) { z-index: 1; }
660
+ }
661
+
662
+ @keyframes pm-spin { to { rotate: 1turn; } }
663
+
664
+ @media (forced-colors: active) {
665
+ :where(.pm-button) { border-color: ButtonText; }
666
+ }
667
+ }
668
+
669
+ /* Surface */
670
+ @layer pm.components {
671
+ /* ---------- Surface container (applies the active surface style) ---------- */
672
+ :where(.pm-surface, .pm-card) {
673
+ border: 1px solid var(--pm-sf-border);
674
+ border-radius: var(--pm-radius-xl);
675
+ background: var(--pm-sf-image), var(--pm-sf-bg);
676
+ box-shadow: var(--pm-sf-shadow);
677
+ backdrop-filter: var(--pm-sf-backdrop);
678
+ -webkit-backdrop-filter: var(--pm-sf-backdrop);
679
+ color: var(--pm-color-fg);
680
+ corner-shape: squircle;
681
+ }
682
+ /* Elevation override */
683
+ :where([data-elevation="0"]) { --pm-sf-shadow: none; }
684
+ :where([data-elevation="1"]) { --pm-sf-shadow: var(--pm-elevation-1); }
685
+ :where([data-elevation="2"]) { --pm-sf-shadow: var(--pm-elevation-2); }
686
+ :where([data-elevation="3"]) { --pm-sf-shadow: var(--pm-elevation-3); }
687
+ :where([data-elevation="4"]) { --pm-sf-shadow: var(--pm-elevation-4); }
688
+ :where([data-elevation="5"]) { --pm-sf-shadow: var(--pm-elevation-5); }
689
+ }
690
+
691
+ /* Card */
692
+ @layer pm.components {
693
+ /* ---------- Card ---------- */
694
+ :where(.pm-card) {
695
+ --_pad: calc(var(--pm-space-6) * var(--pm-density, 1));
696
+ display: flex;
697
+ flex-direction: column;
698
+ gap: var(--pm-space-4);
699
+ padding: var(--_pad);
700
+ & > :where(header) { display: grid; gap: var(--pm-space-1); }
701
+ & :where(.pm-card-title) { font-size: var(--pm-font-size-lg); font-weight: var(--pm-font-weight-semibold); line-height: var(--pm-line-height-snug); }
702
+ & :where(.pm-card-description) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
703
+ & > :where(footer) { display: flex; gap: var(--pm-space-2); justify-content: flex-end; flex-wrap: wrap; }
704
+ & > :where(.pm-card-media) {
705
+ margin: calc(var(--_pad) * -1) calc(var(--_pad) * -1) 0;
706
+ border-start-start-radius: inherit;
707
+ border-start-end-radius: inherit;
708
+ overflow: hidden;
709
+ & > :where(img, video) { inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
710
+ }
711
+ }
712
+ :where(.pm-card[data-size="sm"]) { --_pad: calc(var(--pm-space-4) * var(--pm-density, 1)); border-radius: var(--pm-radius-lg); }
713
+ :where(.pm-card[data-interactive]) {
714
+ cursor: pointer;
715
+ @media (prefers-reduced-motion: no-preference) {
716
+ transition: translate var(--pm-duration-moderate) var(--pm-ease-spring), box-shadow var(--pm-duration-moderate);
717
+ &:hover { translate: 0 -2px; }
718
+ }
719
+ &:hover { box-shadow: var(--pm-sf-shadow), var(--pm-elevation-3); }
720
+ }
721
+ }
722
+
723
+ /* Badge */
724
+ @layer pm.components {
725
+ /* ---------- Badge ---------- */
726
+ :where(.pm-badge) {
727
+ display: inline-flex;
728
+ align-items: center;
729
+ gap: 0.35em;
730
+ padding: 0.2em 0.6em;
731
+ border: 1px solid transparent;
732
+ border-radius: var(--pm-radius-full);
733
+ background: var(--pm-tone-soft);
734
+ color: var(--pm-tone-text);
735
+ font-size: var(--pm-font-size-xs);
736
+ font-weight: var(--pm-font-weight-semibold);
737
+ line-height: 1.3;
738
+ white-space: nowrap;
739
+ & > :where(.pm-badge-dot) { inline-size: 0.5em; block-size: 0.5em; border-radius: 50%; background: currentColor; }
740
+ }
741
+ :where(.pm-badge[data-variant="solid"]) { background: var(--pm-sf-solid-image, none), var(--pm-tone-solid); color: var(--pm-tone-on-solid); }
742
+ :where(.pm-badge[data-variant="outline"]) { background: transparent; border-color: var(--pm-tone-border-strong); }
743
+ :where(.pm-badge[data-size="lg"]) { font-size: var(--pm-font-size-sm); }
744
+ }
745
+
746
+ /* Avatar */
747
+ @layer pm.components {
748
+ /* ---------- Avatar ---------- */
749
+ :where(.pm-avatar) {
750
+ --_size: 2.5rem;
751
+ position: relative;
752
+ display: inline-grid;
753
+ place-items: center;
754
+ flex: none;
755
+ inline-size: var(--_size);
756
+ block-size: var(--_size);
757
+ border-radius: 50%;
758
+ background: var(--pm-tone-soft);
759
+ color: var(--pm-tone-text);
760
+ font-size: calc(var(--_size) * 0.4);
761
+ font-weight: var(--pm-font-weight-semibold);
762
+ overflow: hidden;
763
+ user-select: none;
764
+ & > :where(img) { inline-size: 100%; block-size: 100%; object-fit: cover; }
765
+ }
766
+ :where(.pm-avatar[data-size="xs"]) { --_size: 1.5rem; }
767
+ :where(.pm-avatar[data-size="sm"]) { --_size: 2rem; }
768
+ :where(.pm-avatar[data-size="lg"]) { --_size: 3rem; }
769
+ :where(.pm-avatar[data-size="xl"]) { --_size: 4rem; }
770
+ :where(.pm-avatar[data-shape="square"]) { border-radius: var(--pm-radius-md); }
771
+ :where(.pm-avatar-group) {
772
+ display: inline-flex;
773
+ & > :where(.pm-avatar) { box-shadow: 0 0 0 2px var(--pm-color-bg-surface); }
774
+ & > :where(.pm-avatar:not(:first-child)) { margin-inline-start: calc(var(--_size, 2.5rem) * -0.2); }
775
+ }
776
+ }
777
+
778
+ /* Alert */
779
+ @layer pm.components {
780
+ /* ---------- Alert / callout ---------- */
781
+ :where(.pm-alert) {
782
+ display: grid;
783
+ grid-template-columns: auto 1fr auto;
784
+ gap: var(--pm-space-1) var(--pm-space-3);
785
+ align-items: start;
786
+ padding: calc(var(--pm-space-4) * var(--pm-density, 1));
787
+ border: 1px solid var(--pm-tone-border);
788
+ border-radius: var(--pm-radius-lg);
789
+ background: color-mix(in oklab, var(--pm-tone-soft) var(--pm-sf-soft-mix, 100%), transparent);
790
+ backdrop-filter: var(--pm-sf-backdrop);
791
+ color: var(--pm-color-fg);
792
+ font-size: var(--pm-font-size-sm);
793
+ & > :where(.pm-alert-icon) { color: var(--pm-tone-text); grid-row: span 2; display: grid; place-items: center; block-size: 1.5em; }
794
+ & > :where(.pm-alert-title) { font-weight: var(--pm-font-weight-semibold); color: var(--pm-tone-text-strong); }
795
+ & > :where(.pm-alert-body) { grid-column: 2; color: var(--pm-color-fg); }
796
+ & > :where(.pm-alert-actions) { grid-column: 3; grid-row: 1 / span 2; }
797
+ }
798
+ :where(.pm-alert[data-variant="solid"]) {
799
+ background: var(--pm-tone-solid);
800
+ border-color: transparent;
801
+ color: var(--pm-tone-on-solid);
802
+ & > :where(.pm-alert-icon, .pm-alert-title, .pm-alert-body) { color: inherit; }
803
+ }
804
+ :where(.pm-alert[data-variant="outline"]) { background: transparent; border-color: var(--pm-tone-border-strong); }
805
+ }
806
+
807
+ /* Progress */
808
+ @layer pm.components {
809
+ /* ---------- Progress ---------- */
810
+ :where(.pm-progress) {
811
+ --_h: 0.5rem;
812
+ appearance: none;
813
+ inline-size: 100%;
814
+ block-size: var(--_h);
815
+ border: 0;
816
+ border-radius: 999px;
817
+ background: var(--pm-color-bg-active);
818
+ color: var(--pm-tone-solid);
819
+ overflow: hidden;
820
+ box-shadow: var(--pm-sf-control-shadow, none);
821
+ &::-webkit-progress-bar { background: transparent; }
822
+ &::-webkit-progress-value {
823
+ background: var(--pm-sf-solid-image, none), var(--pm-tone-solid);
824
+ border-radius: 999px;
825
+ @media (prefers-reduced-motion: no-preference) { transition: inline-size var(--pm-duration-slow) var(--pm-ease-standard); }
826
+ }
827
+ &::-moz-progress-bar { background: var(--pm-tone-solid); border-radius: 999px; }
828
+ /* Indeterminate: a sliding bar; slowed (not removed) for reduced motion */
829
+ &:indeterminate {
830
+ background: linear-gradient(90deg, transparent, var(--pm-tone-solid), transparent) 0 0 / 40% 100% no-repeat, var(--pm-color-bg-active);
831
+ animation: pm-progress-slide 1.2s var(--pm-ease-standard) infinite;
832
+ @media (prefers-reduced-motion: reduce) { animation-duration: 6s; }
833
+ &::-webkit-progress-value { background: transparent; }
834
+ &::-moz-progress-bar { background: transparent; }
835
+ }
836
+ }
837
+ :where(.pm-progress[data-size="sm"]) { --_h: 0.25rem; }
838
+ :where(.pm-progress[data-size="lg"]) { --_h: 0.75rem; }
839
+ @keyframes pm-progress-slide {
840
+ from { background-position: -40% 0, 0 0; }
841
+ to { background-position: 140% 0, 0 0; }
842
+ }
843
+ }
844
+
845
+ /* Spinner */
846
+ @layer pm.components {
847
+ /* ---------- Spinner: <span class="pm-spinner" role="status" aria-label="Loading"> ---------- */
848
+ :where(.pm-spinner) {
849
+ --_size: 1.25em;
850
+ display: inline-block;
851
+ inline-size: var(--_size);
852
+ block-size: var(--_size);
853
+ border-radius: 50%;
854
+ border: 2.5px solid color-mix(in oklab, var(--pm-tone-solid) 25%, transparent);
855
+ border-block-start-color: var(--pm-tone-solid);
856
+ animation: pm-spin 0.75s linear infinite;
857
+ /* Reduced motion: keep a slow rotation so busy state is still communicated */
858
+ @media (prefers-reduced-motion: reduce) { animation-duration: 2.4s; }
859
+ }
860
+ :where(.pm-spinner[data-size="sm"]) { --_size: 1em; }
861
+ :where(.pm-spinner[data-size="lg"]) { --_size: 2em; }
862
+ }
863
+
864
+ /* Skeleton */
865
+ @layer pm.components {
866
+ /* ---------- Skeleton ---------- */
867
+ :where(.pm-skeleton) {
868
+ display: block;
869
+ min-block-size: 1em;
870
+ border-radius: var(--pm-radius-sm);
871
+ background: var(--pm-color-bg-muted);
872
+ @media (prefers-reduced-motion: no-preference) {
873
+ background:
874
+ linear-gradient(90deg in oklab, transparent, color-mix(in oklab, var(--pm-color-bg-surface) 70%, transparent), transparent) 0 0 / 50% 100% no-repeat,
875
+ var(--pm-color-bg-muted);
876
+ animation: pm-shimmer 1.6s var(--pm-ease-standard) infinite;
877
+ }
878
+ }
879
+ :where(.pm-skeleton[data-shape="circle"]) { border-radius: 50%; aspect-ratio: 1; }
880
+ :where(.pm-skeleton[data-shape="text"]) { block-size: 0.8em; margin-block: 0.25em; }
881
+ @keyframes pm-shimmer {
882
+ from { background-position: -50% 0, 0 0; }
883
+ to { background-position: 150% 0, 0 0; }
884
+ }
885
+ }
886
+
887
+ /* Table — plain <table class="pm-table"> (zero JS), plus the frame shared by <pm-table> and <pm-data-table> */
888
+ @layer pm.components {
889
+ /* ---------- Table ---------- */
890
+ :where(.pm-table) {
891
+ inline-size: 100%;
892
+ border-collapse: separate;
893
+ border-spacing: 0;
894
+ font-size: var(--pm-font-size-sm);
895
+ font-variant-numeric: tabular-nums;
896
+ & :where(th, td) {
897
+ padding: calc(var(--pm-space-2) * var(--pm-density, 1)) var(--pm-space-3);
898
+ border-block-end: 1px solid var(--pm-color-border);
899
+ text-align: start;
900
+ vertical-align: middle;
901
+ }
902
+ & :where(th) { color: var(--pm-color-fg-muted); font-weight: var(--pm-font-weight-semibold); font-size: var(--pm-font-size-xs); }
903
+ & :where(th[data-align="end"], td[data-align="end"]) { text-align: end; }
904
+ & :where(th[data-align="center"], td[data-align="center"]) { text-align: center; }
905
+ & :where(td[data-nowrap]) { white-space: nowrap; }
906
+ & :where(td[data-align="end"]) { font-variant-numeric: tabular-nums; }
907
+ & :where(tbody tr:last-child) :where(td) { border-block-end: 0; }
908
+ & :where(tbody tr) { --_row: transparent; background: var(--_row); }
909
+ &:where([data-striped]) :where(tbody tr:nth-child(even)) { --_row: var(--pm-color-bg-subtle); }
910
+ &:where([data-hover]) :where(tbody tr:hover) { --_row: var(--pm-color-bg-hover); }
911
+ & :where(tbody tr[aria-selected="true"]) { --_row: var(--pm-tone-soft); }
912
+ & :where(.pm-table-empty) { padding: var(--pm-space-10) var(--pm-space-4); text-align: center; color: var(--pm-color-fg-muted); }
913
+ }
914
+
915
+ /* ---------- Frame: border, scroll area, sticky header ---------- */
916
+ :where(.pm-table-wrap) {
917
+ position: relative;
918
+ border: 1px solid var(--pm-color-border);
919
+ border-radius: var(--pm-radius-lg);
920
+ background: var(--pm-color-bg-surface);
921
+ overflow: hidden;
922
+ }
923
+ :where(.pm-table-scroll) {
924
+ overflow: auto;
925
+ max-block-size: var(--pm-table-max-height, var(--pm-data-table-max-height, none));
926
+ overscroll-behavior-inline: contain;
927
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
928
+ }
929
+ :where(.pm-table-wrap) :where(.pm-table) {
930
+ & :where(thead) { position: sticky; inset-block-start: 0; z-index: 3; }
931
+ & :where(thead th) { background: var(--pm-color-bg-subtle); white-space: nowrap; }
932
+ }
933
+ :where(.pm-sort) {
934
+ min-block-size: 1.5rem; /* WCAG 2.5.8 target size */
935
+ display: inline-flex;
936
+ align-items: center;
937
+ gap: var(--pm-space-1);
938
+ margin-inline: calc(var(--pm-space-1) * -1);
939
+ padding: 2px var(--pm-space-1);
940
+ border: 0;
941
+ border-radius: var(--pm-radius-sm);
942
+ background: none;
943
+ color: inherit;
944
+ font: inherit;
945
+ cursor: pointer;
946
+ &:hover { color: var(--pm-color-fg); background: var(--pm-color-bg-hover); }
947
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); }
948
+ & :where(svg) { opacity: 0.35; }
949
+ &[data-dir] :where(svg) { opacity: 1; color: var(--pm-tone-text); }
950
+ }
951
+
952
+ /* ---------- Narrow containers (phones, side panels): rows become labelled cards ---------- */
953
+ :where(.pm-table-wrap[data-stack="auto"]) { container: pm-table / inline-size; }
954
+ @container pm-table (width < 36rem) {
955
+ :where(.pm-table-wrap) :where(.pm-table) {
956
+ display: block;
957
+ & :where(caption) { display: block; }
958
+ & :where(thead) { display: block; position: static; border-block-end: 1px solid var(--pm-color-border); }
959
+ & :where(thead tr) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-1) var(--pm-space-3); padding: var(--pm-space-2) var(--pm-space-3); }
960
+ & :where(thead th) { position: static; padding: 0; border: 0; background: none; inline-size: auto !important; }
961
+ & :where(tbody, tfoot) { display: grid; }
962
+ & :where(tbody tr, tfoot tr) { display: grid; gap: var(--pm-space-1); padding: var(--pm-space-3); border-block-end: 1px solid var(--pm-color-border); position: relative; background: var(--_row); }
963
+ & :where(tbody tr:last-child) { border-block-end: 0; }
964
+ & :where(tbody td, tfoot td) {
965
+ display: grid;
966
+ grid-template-columns: minmax(6rem, 40%) 1fr;
967
+ gap: var(--pm-space-3);
968
+ padding: 0;
969
+ border: 0;
970
+ text-align: start;
971
+ position: static;
972
+ background: none;
973
+ }
974
+ & :where(td[data-label])::before { content: attr(data-label); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); align-self: center; }
975
+ & :where(tbody td.pm-table-empty) { display: block; }
976
+ }
977
+ }
978
+ }
979
+
980
+ /* Field */
981
+ @layer pm.components {
982
+ :where(:root, :host) { --pm-icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4.5m0 3.5h.01'/%3E%3C/svg%3E"); }
983
+ /* ---------- Field wrapper: label, hint, error ---------- */
984
+ :where(.pm-field) {
985
+ display: grid;
986
+ gap: var(--pm-space-1-5);
987
+ & > :where(label, .pm-label) {
988
+ font-size: var(--pm-font-size-sm);
989
+ font-weight: var(--pm-font-weight-medium);
990
+ }
991
+ & :where(.pm-hint) { font-size: var(--pm-font-size-xs); color: var(--pm-color-fg-muted); }
992
+ & :where(.pm-error) {
993
+ display: flex;
994
+ gap: 0.4em;
995
+ align-items: center;
996
+ font-size: var(--pm-font-size-xs);
997
+ color: var(--pm-color-danger-text);
998
+ /* Not colour alone: an icon marks the error (WCAG 1.4.1). */
999
+ &::before {
1000
+ content: "";
1001
+ flex: none;
1002
+ inline-size: 1.15em;
1003
+ block-size: 1.15em;
1004
+ background: currentColor;
1005
+ mask: var(--pm-icon-alert) center / contain no-repeat;
1006
+ @media (forced-colors: active) { forced-color-adjust: none; background: CanvasText; }
1007
+ }
1008
+ &:is([hidden], :empty) { display: none; }
1009
+ }
1010
+ &:not(:has(:user-invalid, [aria-invalid="true"])) :where(.pm-error[data-auto]) { display: none; }
1011
+ }
1012
+ :where(.pm-label[data-required])::after,
1013
+ :where(.pm-field:has(:required) > label)::after { content: " *"; content: " *" / ""; color: var(--pm-color-danger-text); }
1014
+ }
1015
+
1016
+ /* Input */
1017
+ @layer pm.components {
1018
+ /* ---------- Text inputs & textarea ---------- */
1019
+ :where(.pm-input, .pm-select) {
1020
+ --_h: var(--pm-control-height-md);
1021
+ --_px: calc(var(--pm-space-3) * var(--pm-density, 1));
1022
+ --_border: var(--pm-sf-control-border, var(--pm-color-border-strong));
1023
+
1024
+ inline-size: 100%;
1025
+ min-block-size: var(--_h);
1026
+ padding: 0 var(--_px);
1027
+ border: 1px solid var(--_border);
1028
+ border-radius: var(--pm-radius-control, var(--pm-radius-md));
1029
+ background: var(--pm-sf-control-bg, var(--pm-color-bg-surface));
1030
+ box-shadow: var(--pm-sf-control-shadow, none);
1031
+ color: var(--pm-color-fg);
1032
+ font: inherit;
1033
+ font-size: var(--pm-font-size-sm);
1034
+ corner-shape: squircle;
1035
+ transition:
1036
+ border-color var(--pm-duration-fast) var(--pm-ease-standard),
1037
+ box-shadow var(--pm-duration-fast) var(--pm-ease-standard);
1038
+
1039
+ &::placeholder { color: var(--pm-color-fg-muted); opacity: 1; }
1040
+ &:hover:not(:disabled, :focus-visible) { --_border: var(--pm-color-accent-border-strong); }
1041
+ &:focus-visible {
1042
+ outline: 2px solid var(--pm-color-ring);
1043
+ outline-offset: 0;
1044
+ --_border: var(--pm-color-ring);
1045
+ }
1046
+ &:is(:user-invalid, [aria-invalid="true"]) { --_border: var(--pm-color-danger-border-strong); }
1047
+ &:is(:user-invalid, [aria-invalid="true"]):focus-visible { outline-color: var(--pm-color-danger-solid); }
1048
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
1049
+ &[readonly] { background: var(--pm-color-bg-muted); }
1050
+ }
1051
+ :where(textarea.pm-input) {
1052
+ padding-block: calc(var(--pm-space-2) * var(--pm-density, 1));
1053
+ line-height: var(--pm-line-height-normal);
1054
+ resize: vertical;
1055
+ field-sizing: content;
1056
+ min-block-size: 5lh;
1057
+ }
1058
+ :where(.pm-input, .pm-select)[data-size="sm"] { --_h: var(--pm-control-height-sm); --_px: var(--pm-space-2); }
1059
+ :where(.pm-input, .pm-select)[data-size="lg"] { --_h: var(--pm-control-height-lg); --_px: var(--pm-space-4); font-size: var(--pm-font-size-md); }
1060
+
1061
+ /* Input group with leading/trailing adornments */
1062
+ :where(.pm-input-group) {
1063
+ position: relative;
1064
+ display: flex;
1065
+ align-items: center;
1066
+ & > :where(.pm-input) { flex: 1; }
1067
+ & > :where([data-slot="start"], [data-slot="end"]) {
1068
+ position: absolute;
1069
+ display: grid;
1070
+ place-items: center;
1071
+ color: var(--pm-color-fg-muted);
1072
+ pointer-events: none;
1073
+ min-inline-size: var(--pm-control-height-md);
1074
+ padding-inline: var(--pm-space-2-5, 0.625rem);
1075
+ font-size: var(--pm-font-size-sm);
1076
+ white-space: nowrap;
1077
+ }
1078
+ & > :where([data-slot="start"]) { inset-inline-start: 0; }
1079
+ & > :where([data-slot="end"]) { inset-inline-end: 0; }
1080
+ /* Adornment widths are measured into --_start / --_end (falls back to one control height). */
1081
+ &:has([data-slot="start"]) > .pm-input { padding-inline-start: var(--_start, var(--pm-control-height-md)); }
1082
+ &:has([data-slot="end"], .pm-input-actions) > .pm-input { padding-inline-end: var(--_end, var(--pm-control-height-md)); }
1083
+ & > :where(.pm-input-actions) {
1084
+ position: absolute;
1085
+ inset-inline-end: var(--_end-slot, 0px);
1086
+ display: flex;
1087
+ align-items: center;
1088
+ gap: 2px;
1089
+ padding-inline-end: var(--pm-space-1);
1090
+ }
1091
+ }
1092
+ :where(.pm-input-action) {
1093
+ display: inline-grid;
1094
+ place-items: center;
1095
+ inline-size: 1.75rem;
1096
+ block-size: 1.75rem;
1097
+ padding: 0;
1098
+ border: 0;
1099
+ border-radius: var(--pm-radius-sm);
1100
+ background: transparent;
1101
+ color: var(--pm-color-fg-muted);
1102
+ font: inherit;
1103
+ cursor: pointer;
1104
+ &:hover { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
1105
+ }
1106
+ :where(.pm-input-counter) {
1107
+ justify-self: end;
1108
+ margin-block-start: calc(var(--pm-space-1) * -0.5);
1109
+ color: var(--pm-color-fg-muted);
1110
+ font-size: var(--pm-font-size-xs);
1111
+ font-variant-numeric: tabular-nums;
1112
+ &[data-over] { color: var(--pm-color-danger-text); font-weight: var(--pm-font-weight-semibold); }
1113
+ }
1114
+ /* Touch screens: 16 px text stops iOS from zooming into the field. */
1115
+ @media (pointer: coarse) { :where(.pm-input, .pm-select) { font-size: max(1rem, var(--pm-font-size-sm)); } }
1116
+ /* Hide native number spinners and search clear (Prismora renders its own) */
1117
+ :where(.pm-input[data-custom-controls])::-webkit-inner-spin-button,
1118
+ :where(.pm-input[data-custom-controls])::-webkit-outer-spin-button,
1119
+ :where(.pm-input[data-custom-controls])::-webkit-search-cancel-button { -webkit-appearance: none; margin: 0; }
1120
+ :where(.pm-input[data-custom-controls]) { -moz-appearance: textfield; appearance: textfield; }
1121
+ }
1122
+
1123
+ /* Select */
1124
+ @layer pm.components {
1125
+ /* ---------- Select (customizable select as progressive enhancement) ---------- */
1126
+ :where(.pm-select) {
1127
+ padding-inline-end: calc(var(--_px) + 1.5em);
1128
+ cursor: pointer;
1129
+ appearance: none;
1130
+ background-image: var(--pm-chevron);
1131
+ background-repeat: no-repeat;
1132
+ background-position: right var(--_px) center;
1133
+ background-size: 1em;
1134
+ &:dir(rtl) { background-position: left var(--_px) center; }
1135
+ }
1136
+ :where(:root, :host) { --pm-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
1137
+
1138
+ @supports (appearance: base-select) {
1139
+ :where(.pm-select),
1140
+ :where(.pm-select)::picker(select) { appearance: base-select; }
1141
+ :where(.pm-select) {
1142
+ background-image: none;
1143
+ padding-inline-end: var(--_px);
1144
+ display: flex;
1145
+ align-items: center;
1146
+ /* The system chevron, not the browser's "▼" glyph: drawn as a mask so it takes the text colour. */
1147
+ &::picker-icon {
1148
+ content: "";
1149
+ flex: none;
1150
+ inline-size: 1em;
1151
+ block-size: 1em;
1152
+ margin-inline-start: auto;
1153
+ background: var(--pm-color-fg-muted);
1154
+ mask: var(--pm-chevron) center / contain no-repeat;
1155
+ @media (forced-colors: active) { forced-color-adjust: none; background: CanvasText; }
1156
+ @media (prefers-reduced-motion: no-preference) {
1157
+ transition: rotate var(--pm-duration-normal) var(--pm-ease-standard);
1158
+ }
1159
+ }
1160
+ &:open::picker-icon { rotate: 180deg; }
1161
+ }
1162
+ :where(.pm-select)::picker(select) {
1163
+ margin-block: var(--pm-space-1);
1164
+ padding: var(--pm-space-1);
1165
+ border: 1px solid var(--pm-sf-border, var(--pm-color-border));
1166
+ border-radius: var(--pm-radius-lg);
1167
+ background: var(--pm-sf-image, none), var(--pm-sf-bg, var(--pm-color-bg-surface));
1168
+ backdrop-filter: var(--pm-sf-backdrop, none);
1169
+ box-shadow: var(--pm-elevation-4);
1170
+ color: var(--pm-color-fg);
1171
+ opacity: 1;
1172
+ transition: opacity var(--pm-duration-normal), display var(--pm-duration-normal), overlay var(--pm-duration-normal);
1173
+ transition-behavior: allow-discrete;
1174
+ @starting-style { opacity: 0; }
1175
+ }
1176
+ :where(.pm-select) option {
1177
+ display: flex;
1178
+ gap: var(--pm-space-2);
1179
+ align-items: center;
1180
+ padding: var(--pm-space-2) var(--pm-space-3);
1181
+ border-radius: var(--pm-radius-sm);
1182
+ cursor: pointer;
1183
+ &:is(:hover, :focus-visible) { background: var(--pm-color-bg-hover); outline: none; }
1184
+ &:checked { font-weight: var(--pm-font-weight-semibold); }
1185
+ &::checkmark { color: var(--pm-color-accent-text); }
1186
+ }
1187
+ }
1188
+ }
1189
+
1190
+ /* Checkbox */
1191
+ @layer pm.components {
1192
+ /* ---------- Checkbox & radio (native inputs, custom-drawn for every surface) ---------- */
1193
+ :where(.pm-checkbox, .pm-radio) {
1194
+ --_size: calc(1.125rem * var(--pm-density, 1));
1195
+ appearance: none;
1196
+ flex: none;
1197
+ display: inline-grid;
1198
+ place-content: center;
1199
+ inline-size: var(--_size);
1200
+ block-size: var(--_size);
1201
+ margin: 0;
1202
+ border: 1.5px solid var(--pm-sf-control-border, var(--pm-color-border-strong));
1203
+ border-radius: var(--pm-radius-xs);
1204
+ background: var(--pm-sf-control-bg, var(--pm-color-bg-surface));
1205
+ box-shadow: var(--pm-sf-control-shadow, none);
1206
+ color: var(--pm-tone-on-solid);
1207
+ cursor: pointer;
1208
+ vertical-align: middle;
1209
+ transition: background-color var(--pm-duration-fast), border-color var(--pm-duration-fast);
1210
+
1211
+ &::before {
1212
+ content: "";
1213
+ inline-size: 0.7em;
1214
+ block-size: 0.7em;
1215
+ background: currentColor;
1216
+ scale: 0;
1217
+ mask: var(--pm-check-mask) center / contain no-repeat;
1218
+ @media (prefers-reduced-motion: no-preference) {
1219
+ transition: scale var(--pm-duration-normal) var(--pm-ease-spring);
1220
+ }
1221
+ }
1222
+ /* Radios with nothing chosen also match :indeterminate, so that state is limited to checkboxes. */
1223
+ &:is(:checked, [type="checkbox"]:indeterminate) {
1224
+ background: var(--pm-tone-solid);
1225
+ border-color: var(--pm-tone-solid);
1226
+ &::before { scale: 1; }
1227
+ }
1228
+ &:where([type="checkbox"]):indeterminate::before { mask-image: var(--pm-dash-mask); }
1229
+ &:hover:not(:disabled, :checked) { border-color: var(--pm-tone-border-strong); }
1230
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
1231
+ &:is(:user-invalid, [aria-invalid="true"]) { border-color: var(--pm-color-danger-border-strong); }
1232
+ }
1233
+ :where(.pm-radio) {
1234
+ border-radius: 50%;
1235
+ &::before { mask: none; border-radius: 50%; inline-size: 0.45em; block-size: 0.45em; }
1236
+ }
1237
+ :where(:root, :host) {
1238
+ --pm-check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6'/%3E%3C/svg%3E");
1239
+ --pm-dash-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
1240
+ }
1241
+ /* Label + control row */
1242
+ :where(.pm-check-label) {
1243
+ display: inline-flex;
1244
+ align-items: center;
1245
+ gap: var(--pm-space-2);
1246
+ font-size: var(--pm-font-size-sm);
1247
+ cursor: pointer;
1248
+ &:has(:disabled) { cursor: not-allowed; color: var(--pm-color-fg-muted); }
1249
+ }
1250
+ @media (forced-colors: active) {
1251
+ :where(.pm-checkbox, .pm-radio):checked { background: Highlight; border-color: Highlight; }
1252
+ }
1253
+ }
1254
+
1255
+ /* Switch */
1256
+ @layer pm.components {
1257
+ /* ---------- Switch: <input type="checkbox" switch role="switch" class="pm-switch"> ---------- */
1258
+ :where(.pm-switch) {
1259
+ --_w: calc(2.5rem * var(--pm-density, 1));
1260
+ --_h: calc(1.4rem * var(--pm-density, 1));
1261
+ --_pad: 3px;
1262
+ --_thumb: calc(var(--_h) - var(--_pad) * 2 - 2px);
1263
+ appearance: none;
1264
+ flex: none;
1265
+ position: relative;
1266
+ inline-size: var(--_w);
1267
+ block-size: var(--_h);
1268
+ margin: 0;
1269
+ border: 1px solid var(--pm-sf-control-border, var(--pm-color-border-strong));
1270
+ border-radius: 999px;
1271
+ background: var(--pm-color-bg-active);
1272
+ box-shadow: var(--pm-sf-control-shadow, none);
1273
+ cursor: pointer;
1274
+ transition: background-color var(--pm-duration-normal) var(--pm-ease-standard), border-color var(--pm-duration-normal);
1275
+
1276
+ &::before {
1277
+ content: "";
1278
+ position: absolute;
1279
+ inset-block-start: var(--_pad);
1280
+ inset-inline-start: var(--_pad);
1281
+ inline-size: var(--_thumb);
1282
+ block-size: var(--_thumb);
1283
+ border-radius: 50%;
1284
+ background: var(--pm-color-bg-surface);
1285
+ /* Thumb outline keeps ≥ 3:1 against the off track */
1286
+ box-shadow: 0 0 0 1px var(--pm-color-border-strong), var(--pm-sf-raise, var(--pm-elevation-1));
1287
+ @media (prefers-reduced-motion: no-preference) {
1288
+ transition: translate var(--pm-duration-moderate) var(--pm-ease-spring);
1289
+ }
1290
+ }
1291
+ &:checked {
1292
+ background: var(--pm-sf-solid-image, none), var(--pm-tone-solid);
1293
+ border-color: var(--pm-tone-solid);
1294
+ &::before {
1295
+ translate: calc(var(--_w) - var(--_thumb) - var(--_pad) * 2 - 2px) 0;
1296
+ background: var(--pm-tone-on-solid);
1297
+ box-shadow: var(--pm-elevation-1);
1298
+ }
1299
+ &:dir(rtl)::before { translate: calc((var(--_w) - var(--_thumb) - var(--_pad) * 2 - 2px) * -1) 0; }
1300
+ }
1301
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
1302
+ }
1303
+ @media (forced-colors: active) {
1304
+ :where(.pm-switch):checked { background: Highlight; border-color: Highlight; }
1305
+ :where(.pm-switch)::before { background: CanvasText; }
1306
+ }
1307
+ }
1308
+
1309
+ /* Slider */
1310
+ @layer pm.components {
1311
+ /* ---------- Slider: <input type="range" class="pm-slider"> ---------- */
1312
+ :where(.pm-slider) {
1313
+ --_track: 6px;
1314
+ --_thumb: 1.1rem;
1315
+ --_fill: var(--pm-value, 50%);
1316
+ &[data-size="xs"], &[data-size="sm"] { --_track: 4px; --_thumb: 0.9rem; }
1317
+ &[data-size="lg"], &[data-size="xl"] { --_track: 8px; --_thumb: 1.4rem; }
1318
+ appearance: none;
1319
+ inline-size: 100%;
1320
+ block-size: var(--_thumb);
1321
+ margin: 0;
1322
+ background: transparent;
1323
+ cursor: pointer;
1324
+ accent-color: var(--pm-tone-solid);
1325
+
1326
+ &::-webkit-slider-runnable-track {
1327
+ block-size: var(--_track);
1328
+ border-radius: 999px;
1329
+ background: linear-gradient(to right, var(--pm-tone-solid) var(--_fill), var(--pm-color-bg-active) var(--_fill));
1330
+ box-shadow: var(--pm-sf-control-shadow, none);
1331
+ }
1332
+ &::-moz-range-track {
1333
+ block-size: var(--_track);
1334
+ border-radius: 999px;
1335
+ background: var(--pm-color-bg-active);
1336
+ }
1337
+ &::-moz-range-progress { block-size: var(--_track); border-radius: 999px; background: var(--pm-tone-solid); }
1338
+ &::-webkit-slider-thumb {
1339
+ appearance: none;
1340
+ inline-size: var(--_thumb);
1341
+ block-size: var(--_thumb);
1342
+ margin-block-start: calc((var(--_track) - var(--_thumb)) / 2);
1343
+ border: 2px solid var(--pm-tone-solid);
1344
+ border-radius: 50%;
1345
+ background: var(--pm-color-bg-surface);
1346
+ box-shadow: var(--pm-sf-raise, var(--pm-elevation-1));
1347
+ @media (prefers-reduced-motion: no-preference) {
1348
+ transition: scale var(--pm-duration-normal) var(--pm-ease-spring);
1349
+ }
1350
+ }
1351
+ &::-moz-range-thumb {
1352
+ inline-size: var(--_thumb);
1353
+ block-size: var(--_thumb);
1354
+ border: 2px solid var(--pm-tone-solid);
1355
+ border-radius: 50%;
1356
+ background: var(--pm-color-bg-surface);
1357
+ }
1358
+ &:active::-webkit-slider-thumb { scale: 1.15; }
1359
+ &:focus-visible { outline-offset: 4px; }
1360
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
1361
+ }
1362
+ }
1363
+
1364
+ /* Tabs */
1365
+ @layer pm.components {
1366
+ /* ---------- Tabs ---------- */
1367
+ :where(.pm-tabs) { display: grid; gap: var(--pm-space-4); }
1368
+ :where(.pm-tablist) {
1369
+ position: relative;
1370
+ display: flex;
1371
+ gap: var(--pm-space-1);
1372
+ overflow-x: auto;
1373
+ scrollbar-width: none;
1374
+ border-block-end: 1px solid var(--pm-color-border);
1375
+ anchor-name: --pm-tablist;
1376
+ }
1377
+ :where(.pm-tablist [role="tab"], .pm-tab) {
1378
+ position: relative;
1379
+ flex: none;
1380
+ display: inline-flex;
1381
+ align-items: center;
1382
+ gap: var(--pm-space-2);
1383
+ min-block-size: var(--pm-control-height-md);
1384
+ padding: 0 var(--pm-space-3);
1385
+ border: 0;
1386
+ background: transparent;
1387
+ color: var(--pm-color-fg-muted);
1388
+ font: inherit;
1389
+ font-size: var(--pm-font-size-sm);
1390
+ font-weight: var(--pm-font-weight-medium);
1391
+ cursor: pointer;
1392
+ transition: color var(--pm-duration-fast);
1393
+ &:hover { color: var(--pm-color-fg); }
1394
+ &:focus-visible { outline-offset: -2px; border-radius: var(--pm-radius-sm); }
1395
+ /* Selected: colour + a border-drawn underline (survives forced colours). */
1396
+ &[aria-selected="true"] {
1397
+ color: var(--pm-tone-text);
1398
+ &::after {
1399
+ content: "";
1400
+ position: absolute;
1401
+ inset: auto 0 -1px;
1402
+ border-block-end: 2px solid var(--pm-tone-solid);
1403
+ }
1404
+ }
1405
+ }
1406
+ /* Animated indicator: tether one underline to the selected tab where anchor positioning exists. */
1407
+ @supports (anchor-name: --a) {
1408
+ :where(.pm-tablist[data-animated]) {
1409
+ & [aria-selected="true"] { anchor-name: --pm-selected-tab; &::after { display: none; } }
1410
+ &::after {
1411
+ content: "";
1412
+ position: absolute;
1413
+ position-anchor: --pm-selected-tab;
1414
+ inset-inline-start: anchor(start);
1415
+ inset-inline-end: anchor(end);
1416
+ inset-block-end: 0;
1417
+ border-block-end: 2px solid var(--pm-tone-solid);
1418
+ @media (prefers-reduced-motion: no-preference) {
1419
+ transition: inset-inline-start var(--pm-duration-moderate) var(--pm-ease-spring), inset-inline-end var(--pm-duration-moderate) var(--pm-ease-spring);
1420
+ }
1421
+ }
1422
+ }
1423
+ }
1424
+ /* Pill-style tabs (segmented control look) */
1425
+ :where(.pm-tablist[data-variant="pills"]) {
1426
+ border: 0;
1427
+ padding: var(--pm-space-1);
1428
+ border-radius: var(--pm-radius-lg);
1429
+ background: var(--pm-color-bg-muted);
1430
+ box-shadow: var(--pm-sf-control-shadow, none);
1431
+ inline-size: fit-content;
1432
+ & [role="tab"] { border-radius: var(--pm-radius-md); min-block-size: var(--pm-control-height-sm); }
1433
+ & [role="tab"][aria-selected="true"] {
1434
+ background: var(--pm-color-bg-surface);
1435
+ color: var(--pm-color-fg);
1436
+ box-shadow: var(--pm-sf-raise, var(--pm-elevation-1));
1437
+ outline: 1px solid var(--pm-color-border);
1438
+ &::after { display: none; }
1439
+ }
1440
+ }
1441
+ /* Web-component tabs in pills mode: no underline */
1442
+ :where(pm-tabs[variant="pills"] > pm-tab[aria-selected="true"])::after { display: none; }
1443
+ :where(.pm-tabpanel):focus-visible { outline-offset: 4px; border-radius: var(--pm-radius-sm); }
1444
+ }
1445
+ /* Vertical tabs, closable and disabled tabs */
1446
+ @layer pm.components {
1447
+ :where(.pm-tablist[aria-orientation="vertical"]) {
1448
+ flex-direction: column;
1449
+ border-block-end: 0;
1450
+ border-inline-end: 1px solid var(--pm-color-border);
1451
+ & :where([role="tab"]) { justify-content: flex-start; }
1452
+ & :where([role="tab"][aria-selected="true"])::after { inset: 0 -1px 0 auto; border-block-end: 0; border-inline-end: 2px solid var(--pm-tone-solid); }
1453
+ }
1454
+ :where(pm-tabs[orientation="vertical"] > pm-tab) { justify-content: flex-start; }
1455
+ :where(pm-tabs[orientation="vertical"] > pm-tab[aria-selected="true"])::after { inset: 0 -1px 0 auto; border-block-end: 0; border-inline-end: 2px solid var(--pm-tone-solid); }
1456
+ :where(.pm-tab[aria-disabled="true"], [role="tab"][aria-disabled="true"]) { opacity: 0.45; cursor: not-allowed; }
1457
+ /* Count after a tab label: <span class="pm-tab-count">3</span> (pm-tab count="3" adds it). */
1458
+ :where(.pm-tab-count) {
1459
+ display: inline-grid;
1460
+ place-items: center;
1461
+ min-inline-size: 1.25rem;
1462
+ block-size: 1.25rem;
1463
+ padding-inline: 0.35em;
1464
+ border-radius: var(--pm-radius-full);
1465
+ background: var(--pm-color-bg-muted);
1466
+ color: var(--pm-color-fg-muted);
1467
+ font-size: var(--pm-font-size-xs);
1468
+ font-weight: var(--pm-font-weight-semibold);
1469
+ font-variant-numeric: tabular-nums;
1470
+ line-height: 1;
1471
+ }
1472
+ :where([aria-selected="true"]) > :where(.pm-tab-count) { background: var(--pm-color-accent-soft); color: var(--pm-color-accent-text); }
1473
+ :where(.pm-tab-close) {
1474
+ display: inline-grid;
1475
+ place-items: center;
1476
+ inline-size: 1.25rem;
1477
+ block-size: 1.25rem;
1478
+ margin-inline-end: calc(var(--pm-space-1) * -1);
1479
+ border-radius: var(--pm-radius-sm);
1480
+ color: var(--pm-color-fg-muted);
1481
+ &:hover { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
1482
+ @media (pointer: coarse) { inline-size: 1.75rem; block-size: 1.75rem; }
1483
+ }
1484
+ }
1485
+
1486
+ /* Accordion */
1487
+ @layer pm.components {
1488
+ /* ---------- Accordion: <details name="group" class="pm-accordion-item"> ---------- */
1489
+ :where(.pm-accordion) {
1490
+ display: grid;
1491
+ border: 1px solid var(--pm-sf-border, var(--pm-color-border));
1492
+ border-radius: var(--pm-radius-lg);
1493
+ background: var(--pm-sf-image, none), var(--pm-sf-bg, var(--pm-color-bg-surface));
1494
+ backdrop-filter: var(--pm-sf-backdrop, none);
1495
+ overflow: clip;
1496
+ }
1497
+ :where(.pm-accordion-item) {
1498
+ &:not(:last-child) { border-block-end: 1px solid var(--pm-color-border); }
1499
+ & > summary {
1500
+ display: flex;
1501
+ align-items: center;
1502
+ justify-content: space-between;
1503
+ gap: var(--pm-space-3);
1504
+ padding: calc(var(--pm-space-4) * var(--pm-density, 1));
1505
+ font-weight: var(--pm-font-weight-medium);
1506
+ cursor: pointer;
1507
+ list-style: none;
1508
+ &::-webkit-details-marker { display: none; }
1509
+ &::after {
1510
+ content: "";
1511
+ flex: none;
1512
+ inline-size: 1em;
1513
+ block-size: 1em;
1514
+ background: currentColor;
1515
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
1516
+ color: var(--pm-color-fg-muted);
1517
+ @media (prefers-reduced-motion: no-preference) { transition: rotate var(--pm-duration-moderate) var(--pm-ease-standard); }
1518
+ }
1519
+ &:hover { background: var(--pm-color-bg-hover); }
1520
+ &:focus-visible { outline-offset: -2px; }
1521
+ }
1522
+ &[open] > summary::after { rotate: 180deg; }
1523
+ & > summary[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
1524
+ /* Smooth open/close with ::details-content + interpolate-size (progressive). */
1525
+ &::details-content {
1526
+ block-size: 0;
1527
+ overflow: clip;
1528
+ @media (prefers-reduced-motion: no-preference) {
1529
+ transition: block-size var(--pm-duration-moderate) var(--pm-ease-standard), content-visibility var(--pm-duration-moderate);
1530
+ transition-behavior: allow-discrete;
1531
+ }
1532
+ }
1533
+ &[open]::details-content { block-size: auto; }
1534
+ & > :where(:not(summary)) {
1535
+ padding: 0 calc(var(--pm-space-4) * var(--pm-density, 1)) calc(var(--pm-space-4) * var(--pm-density, 1));
1536
+ color: var(--pm-color-fg-muted);
1537
+ }
1538
+ }
1539
+ }
1540
+
1541
+ /* Shared top-layer surface and enter/exit (dialog, drawer, popover, menu, tooltip, toast) */
1542
+ @layer pm.components {
1543
+ /* Shared top-layer surface */
1544
+ :where(.pm-dialog, .pm-drawer, .pm-popover, .pm-menu, .pm-toast) {
1545
+ border: 1px solid var(--pm-sf-border);
1546
+ background: var(--pm-sf-image), var(--pm-sf-bg);
1547
+ backdrop-filter: var(--pm-sf-backdrop);
1548
+ -webkit-backdrop-filter: var(--pm-sf-backdrop);
1549
+ color: var(--pm-color-fg);
1550
+ box-shadow: var(--pm-sf-shadow), var(--pm-elevation-4);
1551
+ }
1552
+ /* Overlays always need an opaque-enough fill even when the page surface is "outline". */
1553
+ :where(.pm-dialog, .pm-drawer, .pm-popover, .pm-menu, .pm-toast)[data-surface="outline"],
1554
+ :where([data-surface="outline"]) :where(.pm-dialog, .pm-drawer, .pm-popover, .pm-menu, .pm-toast) {
1555
+ background: var(--pm-color-bg-surface);
1556
+ }
1557
+
1558
+ /* Shared enter/exit for top-layer elements (guide: animate-to-from-top-layer) */
1559
+ :where(.pm-dialog, .pm-drawer, .pm-popover, .pm-menu, .pm-tooltip, .pm-toast) {
1560
+ opacity: 0;
1561
+ transition-property: opacity, translate, scale, display, overlay;
1562
+ transition-duration: var(--pm-duration-moderate);
1563
+ transition-timing-function: var(--pm-ease-standard);
1564
+ transition-behavior: allow-discrete;
1565
+ @media (prefers-reduced-motion: reduce) { transition-duration: var(--pm-duration-fast); }
1566
+ }
1567
+ :is(.pm-dialog[open], .pm-drawer[open], :is(.pm-popover, .pm-menu, .pm-tooltip, .pm-toast):is(:popover-open, .\:popover-open)):where(:not([data-closing])) {
1568
+ opacity: 1;
1569
+ @starting-style { opacity: 0; }
1570
+ }
1571
+ }
1572
+
1573
+ /* Dialog */
1574
+ @layer pm.components {
1575
+ /* ---------- Dialog ---------- */
1576
+ :where(.pm-dialog) {
1577
+ inline-size: min(100% - 2rem, var(--pm-dialog-width, 32rem));
1578
+ max-block-size: min(100dvh - 2rem, 48rem);
1579
+ padding: calc(var(--pm-space-6) * var(--pm-density, 1));
1580
+ border-radius: var(--pm-radius-2xl);
1581
+ corner-shape: squircle;
1582
+ @media (prefers-reduced-motion: no-preference) {
1583
+ scale: 0.96;
1584
+ translate: 0 8px;
1585
+ transition-timing-function: var(--pm-ease-spring);
1586
+ }
1587
+ & > :where(header) { display: grid; gap: var(--pm-space-1); margin-block-end: var(--pm-space-4); }
1588
+ & :where(h1, h2, .pm-dialog-title) { font-size: var(--pm-font-size-xl); font-weight: var(--pm-font-weight-semibold); }
1589
+ & :where(.pm-dialog-description) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
1590
+ & > :where(footer, form[method="dialog"]:last-child) {
1591
+ display: flex;
1592
+ gap: var(--pm-space-2);
1593
+ justify-content: flex-end;
1594
+ flex-wrap: wrap;
1595
+ margin-block-start: var(--pm-space-6);
1596
+ }
1597
+ }
1598
+ :where(.pm-dialog[data-size="sm"]) { --pm-dialog-width: 24rem; }
1599
+ :where(.pm-dialog[data-size="lg"]) { --pm-dialog-width: 48rem; }
1600
+ :where(.pm-dialog[data-size="full"]) { --pm-dialog-width: 100vw; max-block-size: 100dvh; border-radius: 0; }
1601
+ :is(.pm-dialog[open]):where(:not([data-closing])) {
1602
+ @media (prefers-reduced-motion: no-preference) {
1603
+ scale: 1;
1604
+ translate: 0 0;
1605
+ @starting-style { scale: 0.96; translate: 0 8px; }
1606
+ }
1607
+ }
1608
+ /* Phones: bottom sheet (default) or full screen; same markup. */
1609
+ :is(.pm-dialog[open][data-sheet]):where(:not([data-closing])) {
1610
+ @media (prefers-reduced-motion: no-preference) { scale: 1; @starting-style { scale: 1; translate: 0 100%; } }
1611
+ }
1612
+ :where(.pm-dialog[data-sheet][data-closing]) { @media (prefers-reduced-motion: no-preference) { scale: 1; translate: 0 100%; } }
1613
+ :where(.pm-dialog[data-fullscreen]) { inline-size: 100vw; max-inline-size: none; block-size: 100dvh; max-block-size: none; border-radius: 0; padding-block-start: max(var(--pm-space-6), var(--pm-safe-top, 0px)); }
1614
+ :where(.pm-dialog, .pm-drawer):modal { overscroll-behavior: contain; }
1615
+ :where(.pm-dialog, .pm-drawer)::backdrop {
1616
+ background: transparent;
1617
+ overflow: hidden;
1618
+ overscroll-behavior: contain;
1619
+ transition: background-color var(--pm-duration-moderate), backdrop-filter var(--pm-duration-moderate), display var(--pm-duration-moderate), overlay var(--pm-duration-moderate);
1620
+ transition-behavior: allow-discrete;
1621
+ }
1622
+ :is(.pm-dialog[open], .pm-drawer[open]):where(:not([data-closing]))::backdrop {
1623
+ background: var(--pm-color-overlay);
1624
+ backdrop-filter: blur(var(--pm-blur-sm));
1625
+ @starting-style { background: transparent; backdrop-filter: blur(0); }
1626
+ }
1627
+ }
1628
+
1629
+ /* Drawer */
1630
+ @layer pm.components {
1631
+ /* ---------- Drawer / sheet (dialog anchored to an edge) ---------- */
1632
+ :where(.pm-drawer) {
1633
+ --_size: min(100vw, var(--pm-drawer-size, 24rem));
1634
+ margin: 0;
1635
+ padding: calc(var(--pm-space-6) * var(--pm-density, 1));
1636
+ max-inline-size: none;
1637
+ max-block-size: none;
1638
+ inline-size: var(--_size);
1639
+ block-size: 100dvh;
1640
+ inset-block: 0;
1641
+ inset-inline: auto 0;
1642
+ border-radius: 0;
1643
+ border-block: 0;
1644
+ border-inline-end: 0;
1645
+ @media (prefers-reduced-motion: no-preference) { translate: 100% 0; }
1646
+ }
1647
+ :where(.pm-drawer[data-side="start"]) {
1648
+ inset-inline: 0 auto;
1649
+ border-inline-start: 0;
1650
+ border-inline-end: 1px solid var(--pm-sf-border);
1651
+ @media (prefers-reduced-motion: no-preference) { translate: -100% 0; }
1652
+ }
1653
+ :where(.pm-drawer[data-side="bottom"]) {
1654
+ inline-size: 100vw;
1655
+ block-size: auto;
1656
+ max-block-size: 85dvh;
1657
+ inset: auto 0 0 0;
1658
+ border-inline: 0;
1659
+ border-block-start: 1px solid var(--pm-sf-border);
1660
+ border-start-start-radius: var(--pm-radius-2xl);
1661
+ border-start-end-radius: var(--pm-radius-2xl);
1662
+ @media (prefers-reduced-motion: no-preference) { translate: 0 100%; }
1663
+ }
1664
+ :where(.pm-drawer[data-side="top"]) {
1665
+ inline-size: 100vw;
1666
+ block-size: auto;
1667
+ max-block-size: 85dvh;
1668
+ inset: 0 0 auto 0;
1669
+ border-inline: 0;
1670
+ border-block-end: 1px solid var(--pm-sf-border);
1671
+ border-end-start-radius: var(--pm-radius-2xl);
1672
+ border-end-end-radius: var(--pm-radius-2xl);
1673
+ @media (prefers-reduced-motion: no-preference) { translate: 0 -100%; }
1674
+ }
1675
+ :is(.pm-drawer[open]):where(:not([data-closing])) {
1676
+ @media (prefers-reduced-motion: no-preference) {
1677
+ translate: 0 0;
1678
+ @starting-style { translate: var(--_from, 100% 0); }
1679
+ }
1680
+ }
1681
+ :where(.pm-drawer[data-side="start"]) { --_from: -100% 0; }
1682
+ :where(.pm-drawer):dir(rtl) { --_from: -100% 0; }
1683
+ :where(.pm-drawer[data-side="bottom"]) { --_from: 0 100%; }
1684
+ :where(.pm-drawer[data-side="top"]) { --_from: 0 -100%; }
1685
+ }
1686
+
1687
+ /* Popover */
1688
+ @layer pm.components {
1689
+ /* ---------- Popover & menu ---------- */
1690
+ :where(.pm-popover, .pm-menu) {
1691
+ padding: var(--pm-space-3);
1692
+ border-radius: var(--pm-radius-lg);
1693
+ max-inline-size: min(22rem, 100vw - 1rem);
1694
+ @media (prefers-reduced-motion: no-preference) { scale: 0.96; }
1695
+ }
1696
+ :is(.pm-popover, .pm-menu):is(:popover-open, .\:popover-open):where(:not([data-closing])) {
1697
+ @media (prefers-reduced-motion: no-preference) {
1698
+ scale: 1;
1699
+ @starting-style { scale: 0.96; }
1700
+ }
1701
+ }
1702
+ /* Anchor-position next to the invoker where supported; otherwise keep UA centring. */
1703
+ @supports (position-area: block-end) {
1704
+ :where(.pm-popover, .pm-menu, .pm-tooltip) {
1705
+ inset: auto;
1706
+ margin: var(--pm-space-1-5);
1707
+ position-area: block-end span-inline-end;
1708
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
1709
+ }
1710
+ /* Placement for popovers; submenus open beside their item. */
1711
+ :where(.pm-popover[data-placement="top"]) { position-area: block-start span-inline-end; }
1712
+ :where(.pm-popover[data-placement="start"]) { position-area: inline-start span-block-end; position-try-fallbacks: flip-inline, flip-block; }
1713
+ :where(.pm-popover[data-placement="end"], .pm-menu[data-submenu]) { position-area: inline-end span-block-end; position-try-fallbacks: flip-inline, flip-block, flip-inline flip-block; }
1714
+ :where(.pm-menu[data-submenu]) { margin: 0 var(--pm-space-1); }
1715
+ :where(.pm-tooltip) { position-area: block-start; position-try-fallbacks: flip-block; }
1716
+ :where(.pm-tooltip[data-side="bottom"]) { position-area: block-end; }
1717
+ :where(.pm-tooltip[data-side="start"]) { position-area: inline-start; position-try-fallbacks: flip-inline; }
1718
+ :where(.pm-tooltip[data-side="end"]) { position-area: inline-end; position-try-fallbacks: flip-inline; }
1719
+ }
1720
+
1721
+ :where(.pm-menu) {
1722
+ min-inline-size: 12rem;
1723
+ padding: var(--pm-space-1);
1724
+ display: none;
1725
+ &:is(:popover-open, .\:popover-open) { display: grid; }
1726
+ & :where([role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], .pm-menu-item) {
1727
+ display: flex;
1728
+ align-items: center;
1729
+ gap: var(--pm-space-2);
1730
+ inline-size: 100%;
1731
+ min-block-size: calc(var(--pm-control-height-sm) + 2px);
1732
+ padding: 0 var(--pm-space-2-5, 0.625rem);
1733
+ border: 0;
1734
+ border-radius: var(--pm-radius-sm);
1735
+ background: transparent;
1736
+ color: inherit;
1737
+ font: inherit;
1738
+ font-size: var(--pm-font-size-sm);
1739
+ text-align: start;
1740
+ text-decoration: none;
1741
+ cursor: pointer;
1742
+ &:is(:hover, :focus-visible) { background: var(--pm-color-bg-hover); outline: none; }
1743
+ &:focus-visible { box-shadow: inset 0 0 0 2px var(--pm-color-ring); }
1744
+ &[data-tone="danger"] { color: var(--pm-color-danger-text); }
1745
+ &:is(:disabled, [aria-disabled="true"]) { opacity: 0.55; cursor: not-allowed; }
1746
+ & > :where(kbd, .pm-shortcut) { margin-inline-start: auto; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
1747
+ }
1748
+ /* Checkbox and radio items: a tick column, filled from aria-checked. */
1749
+ & :where([role="menuitemcheckbox"], [role="menuitemradio"])::before {
1750
+ content: ""; flex: none; inline-size: 1em; block-size: 1em; background: currentColor; mask: var(--pm-check-mask) center / contain no-repeat; opacity: 0;
1751
+ }
1752
+ & :where([role="menuitemradio"])::before { mask: none; border-radius: 50%; scale: 0.45; }
1753
+ & :where([aria-checked="true"])::before { opacity: 1; }
1754
+ /* Items that open a submenu point to it. */
1755
+ & :where([role="menuitem"][popovertarget])::after {
1756
+ content: ""; flex: none; margin-inline-start: auto; inline-size: 0.45em; block-size: 0.45em;
1757
+ border-block-start: 1.5px solid currentColor; border-inline-end: 1.5px solid currentColor; rotate: 45deg; opacity: 0.7;
1758
+ }
1759
+ & :where([role="menuitem"][popovertarget]):dir(rtl)::after { rotate: -135deg; }
1760
+ & :where([role="menuitem"][aria-expanded="true"]) { background: var(--pm-color-bg-hover); }
1761
+ & :where([role="group"]) { display: grid; }
1762
+
1763
+ /* ---------- Menubar: a row of buttons that each open a menu ---------- */
1764
+ }
1765
+ :where(.pm-menubar) {
1766
+ display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-0-5, 0.125rem);
1767
+ padding: var(--pm-space-1); border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-surface);
1768
+ & > :where(button) {
1769
+ min-block-size: var(--pm-control-height-sm); padding: 0 var(--pm-space-3); border: 0; border-radius: var(--pm-radius-sm);
1770
+ background: transparent; color: inherit; font: inherit; font-size: var(--pm-font-size-sm); font-weight: var(--pm-font-weight-medium); cursor: pointer;
1771
+ &:is(:hover, [aria-expanded="true"]) { background: var(--pm-color-bg-hover); }
1772
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
1773
+ }
1774
+ }
1775
+ /* ---------- Mega menu: a wide popover of link groups — <pm-popover class="pm-mega"> ---------- */
1776
+ :where(.pm-popover.pm-mega) {
1777
+ max-inline-size: min(52rem, 100vw - 1rem); inline-size: max-content; padding: var(--pm-space-5);
1778
+ &:is(:popover-open, .\:popover-open) { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--pm-space-5) var(--pm-space-6); }
1779
+ & :where(.pm-mega-group) { display: grid; align-content: start; gap: var(--pm-space-1); min-inline-size: 0; }
1780
+ & :where(.pm-mega-title) { margin: 0 0 var(--pm-space-1); padding-inline: var(--pm-space-2); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); letter-spacing: 0.06em; text-transform: uppercase; }
1781
+ & :where(.pm-mega-group a) {
1782
+ display: grid; gap: 2px; padding: var(--pm-space-2); border-radius: var(--pm-radius-md); color: inherit; text-decoration: none; font-size: var(--pm-font-size-sm); font-weight: var(--pm-font-weight-medium);
1783
+ &:is(:hover, :focus-visible) { background: var(--pm-color-bg-hover); outline: none; }
1784
+ &:focus-visible { box-shadow: inset 0 0 0 2px var(--pm-color-ring); }
1785
+ & > :where(small) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-regular, 400); }
1786
+ }
1787
+ @media (width < 40rem) { inline-size: calc(100vw - 1rem); }
1788
+ }
1789
+ :where(.pm-menu) {
1790
+ & :where([role="separator"], hr) { margin: var(--pm-space-1) calc(var(--pm-space-1) * -1); border: 0; border-block-start: 1px solid var(--pm-color-border); }
1791
+ & :where(.pm-menu-label) { padding: var(--pm-space-1-5) var(--pm-space-2-5, 0.625rem); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); }
1792
+ }
1793
+ }
1794
+
1795
+ /* Tooltip */
1796
+ @layer pm.components {
1797
+ /* ---------- Tooltip: popover="hint" + interestfor ---------- */
1798
+ :where(.pm-tooltip) {
1799
+ max-inline-size: 18rem;
1800
+ padding: var(--pm-space-1-5) var(--pm-space-2-5, 0.625rem);
1801
+ border: 0;
1802
+ border-radius: var(--pm-radius-sm);
1803
+ background: var(--pm-color-bg-inverse);
1804
+ color: var(--pm-color-fg-inverse);
1805
+ font-size: var(--pm-font-size-xs);
1806
+ line-height: var(--pm-line-height-snug);
1807
+ box-shadow: var(--pm-elevation-2);
1808
+ pointer-events: auto; /* hoverable (WCAG 1.4.13) */
1809
+ transition-duration: var(--pm-duration-fast);
1810
+ }
1811
+ :where([interestfor]) {
1812
+ --interest-delay-start: 0.35s;
1813
+ interest-delay-start: var(--interest-delay-start);
1814
+ --interest-delay-end: 0.15s;
1815
+ interest-delay-end: var(--interest-delay-end);
1816
+ }
1817
+ }
1818
+
1819
+ /* Toast */
1820
+ @layer pm.components {
1821
+ /* ---------- Toast: popover="manual" inside a labelled region ---------- */
1822
+ :where(.pm-toaster) {
1823
+ position: fixed;
1824
+ z-index: var(--pm-z-toast);
1825
+ inset-block-end: var(--pm-space-4);
1826
+ inset-inline-end: var(--pm-space-4);
1827
+ display: grid;
1828
+ gap: var(--pm-space-2);
1829
+ inline-size: min(24rem, 100vw - 2rem);
1830
+ pointer-events: none;
1831
+ & > * { pointer-events: auto; }
1832
+ }
1833
+ :where(.pm-toast) {
1834
+ position: static;
1835
+ inset: auto;
1836
+ margin: 0;
1837
+ display: none;
1838
+ grid-template-columns: auto 1fr auto;
1839
+ gap: var(--pm-space-1) var(--pm-space-3);
1840
+ align-items: start;
1841
+ inline-size: 100%;
1842
+ padding: var(--pm-space-4);
1843
+ border-radius: var(--pm-radius-lg);
1844
+ font-size: var(--pm-font-size-sm);
1845
+ &:is(:popover-open, .\:popover-open) { display: grid; }
1846
+ @media (prefers-reduced-motion: no-preference) {
1847
+ translate: 0 12px;
1848
+ transition-timing-function: var(--pm-ease-spring);
1849
+ }
1850
+ & > :where(.pm-toast-icon) { color: var(--pm-tone-text); }
1851
+ & > :where(.pm-toast-title) { font-weight: var(--pm-font-weight-semibold); }
1852
+ & > :where(.pm-toast-body) { grid-column: 2; color: var(--pm-color-fg-muted); }
1853
+ & > :where(.pm-toast-close) { grid-column: 3; grid-row: 1; }
1854
+ }
1855
+ :is(.pm-toast):is(:popover-open, .\:popover-open):where(:not([data-closing])) {
1856
+ @media (prefers-reduced-motion: no-preference) {
1857
+ translate: 0 0;
1858
+ @starting-style { translate: 0 12px; }
1859
+ }
1860
+ }
1861
+ /* Toast placed in the top layer: stacked by JS offsets (--pm-toast-offset) at the toaster's position. */
1862
+ :where(.pm-toast[popover]) {
1863
+ --_gap: var(--pm-space-4);
1864
+ position: fixed;
1865
+ inset: auto var(--_gap) calc(var(--_gap) + max(var(--pm-safe-bottom, 0px), var(--pm-bottom-inset, 0px)) + var(--pm-toast-offset, 0px)) auto;
1866
+ inline-size: min(24rem, 100vw - 2rem);
1867
+ touch-action: pan-y;
1868
+ user-select: none;
1869
+ @media (prefers-reduced-motion: no-preference) { transition-property: translate, opacity, inset, display, overlay; }
1870
+ }
1871
+ :where(.pm-toast[data-position^="top"]) {
1872
+ inset-block: calc(var(--_gap) + var(--pm-safe-top, 0px) + var(--pm-toast-offset, 0px)) auto;
1873
+ @media (prefers-reduced-motion: no-preference) { translate: 0 -12px; }
1874
+ }
1875
+ :where(.pm-toast[data-position$="start"]) { inset-inline: var(--_gap) auto; }
1876
+ :where(.pm-toast[data-position$="center"]) { inset-inline: 0; margin-inline: auto; }
1877
+ :is(.pm-toast[data-position^="top"]):is(:popover-open, .\:popover-open):where(:not([data-closing])) {
1878
+ @media (prefers-reduced-motion: no-preference) { @starting-style { translate: 0 -12px; } }
1879
+ }
1880
+ :where(.pm-toast[data-swiping]) { transition: none; cursor: grabbing; }
1881
+ :where(.pm-toast) > :where(.pm-toast-action) { grid-column: 2; justify-self: start; }
1882
+ :where(.pm-toast) > :where(.pm-toast-body[hidden]) { display: none; }
1883
+ :where(.pm-toast-spinner) {
1884
+ display: inline-block;
1885
+ inline-size: 1.05em;
1886
+ block-size: 1.05em;
1887
+ border: 2px solid color-mix(in oklab, currentColor 25%, transparent);
1888
+ border-block-start-color: currentColor;
1889
+ border-radius: 50%;
1890
+ vertical-align: -0.15em;
1891
+ @media (prefers-reduced-motion: no-preference) { animation: pm-toast-spin 0.8s linear infinite; }
1892
+ @media (prefers-reduced-motion: reduce) { animation: pm-toast-spin 2.4s linear infinite; }
1893
+ }
1894
+ @keyframes pm-toast-spin { to { rotate: 1turn; } }
1895
+ /* Phones: full width with a small gutter (centred by restack()). */
1896
+ @media (width < 40rem) {
1897
+ :where(.pm-toast[popover][data-position$="center"]) { --_gap: var(--pm-space-2); inline-size: calc(100vw - 2 * var(--pm-space-2)); }
1898
+ }
1899
+ }
1900
+
1901
+ /* Icon — <span class="pm-icon"><svg …></svg></span>; 24×24 stroke icons sized by font-size */
1902
+ @layer pm.components {
1903
+ :where(.pm-icon) {
1904
+ display: inline-grid;
1905
+ place-items: center;
1906
+ inline-size: var(--pm-icon-size, 1em);
1907
+ block-size: var(--pm-icon-size, 1em);
1908
+ flex: none;
1909
+ color: inherit;
1910
+ vertical-align: -0.125em;
1911
+ & > svg { inline-size: 100%; block-size: 100%; }
1912
+ }
1913
+ :where(.pm-icon[data-size="xs"]) { --pm-icon-size: 0.75rem; }
1914
+ :where(.pm-icon[data-size="sm"]) { --pm-icon-size: 1rem; }
1915
+ :where(.pm-icon[data-size="md"]) { --pm-icon-size: 1.25rem; }
1916
+ :where(.pm-icon[data-size="lg"]) { --pm-icon-size: 1.5rem; }
1917
+ :where(.pm-icon[data-size="xl"]) { --pm-icon-size: 2rem; }
1918
+ }
1919
+
1920
+ /* Keyboard key — <kbd class="pm-kbd">⌘</kbd> */
1921
+ @layer pm.components {
1922
+ :where(.pm-kbd) {
1923
+ display: inline-flex;
1924
+ align-items: center;
1925
+ justify-content: center;
1926
+ min-inline-size: 1.6em;
1927
+ block-size: 1.6em;
1928
+ padding: 0 0.4em;
1929
+ border: 1px solid var(--pm-color-border);
1930
+ border-block-end-width: 2px;
1931
+ border-radius: var(--pm-radius-sm);
1932
+ background: var(--pm-color-bg-subtle);
1933
+ color: var(--pm-color-fg-muted);
1934
+ font-family: var(--pm-font-sans);
1935
+ font-size: var(--pm-font-size-xs);
1936
+ font-weight: var(--pm-font-weight-medium);
1937
+ line-height: 1;
1938
+ white-space: nowrap;
1939
+ }
1940
+ :where(.pm-kbd[data-size="sm"]) { font-size: 0.6875rem; }
1941
+ :where(.pm-kbd[data-size="lg"]) { font-size: var(--pm-font-size-sm); }
1942
+ }
1943
+
1944
+ /* Separator — <div class="pm-separator" role="separator">optional label</div> */
1945
+ @layer pm.components {
1946
+ :where(.pm-separator) {
1947
+ display: flex;
1948
+ align-items: center;
1949
+ gap: var(--pm-space-3);
1950
+ color: var(--pm-color-fg-muted);
1951
+ font-size: var(--pm-font-size-xs);
1952
+ &::before, &::after { content: ""; flex: 1; border-block-start: 1px solid var(--pm-color-border); }
1953
+ &:is(:empty, [data-empty]) { gap: 0; }
1954
+ &:is(:empty, [data-empty])::after { display: none; }
1955
+ }
1956
+ :where(.pm-separator[aria-orientation="vertical"]) {
1957
+ flex-direction: column;
1958
+ align-self: stretch;
1959
+ min-block-size: 1em;
1960
+ &::before, &::after { border-block-start: 0; border-inline-start: 1px solid var(--pm-color-border); }
1961
+ }
1962
+ }
1963
+
1964
+ /* Tag / chip — <span class="pm-tag" data-tone data-variant="soft|solid|outline">Label</span>; filter chips use aria-pressed */
1965
+ @layer pm.components {
1966
+ :where(.pm-tag) {
1967
+ --_h: 1.75rem;
1968
+ display: inline-flex;
1969
+ align-items: center;
1970
+ gap: 0.35em;
1971
+ block-size: var(--_h);
1972
+ padding-inline: 0.65em;
1973
+ border: 1px solid var(--pm-tone-border);
1974
+ border-radius: var(--pm-radius-control, var(--pm-radius-md));
1975
+ background: var(--pm-tone-soft);
1976
+ color: var(--pm-tone-text);
1977
+ font: inherit;
1978
+ font-size: var(--pm-font-size-sm);
1979
+ font-weight: var(--pm-font-weight-medium);
1980
+ line-height: 1;
1981
+ white-space: nowrap;
1982
+ text-decoration: none;
1983
+ max-inline-size: 100%;
1984
+ & > :where(.pm-tag-label) { overflow: hidden; text-overflow: ellipsis; }
1985
+ }
1986
+ :where(.pm-tag[data-size="sm"]) { --_h: 1.375rem; font-size: var(--pm-font-size-xs); }
1987
+ :where(.pm-tag[data-size="lg"]) { --_h: 2.125rem; }
1988
+ :where(.pm-tag[data-variant="solid"]) { background: var(--pm-tone-solid); border-color: transparent; color: var(--pm-tone-on-solid); }
1989
+ :where(.pm-tag[data-variant="outline"]) { background: transparent; border-color: var(--pm-tone-border-strong); }
1990
+ :where(button.pm-tag) {
1991
+ cursor: pointer;
1992
+ transition: background-color var(--pm-duration-fast) var(--pm-ease-standard);
1993
+ &:hover { background: var(--pm-tone-soft-hover); }
1994
+ &[aria-pressed="true"] { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); border-color: transparent; }
1995
+ &[aria-pressed="true"]::before { content: "✓"; content: "✓" / ""; }
1996
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
1997
+ }
1998
+ :where(.pm-tag-remove) {
1999
+ display: inline-grid;
2000
+ place-items: center;
2001
+ inline-size: 1.25em;
2002
+ block-size: 1.25em;
2003
+ margin-inline-end: -0.3em;
2004
+ padding: 0;
2005
+ border: 0;
2006
+ border-radius: 50%;
2007
+ background: transparent;
2008
+ color: inherit;
2009
+ font: inherit;
2010
+ line-height: 1;
2011
+ cursor: pointer;
2012
+ opacity: 0.75;
2013
+ /* 24px minimum target (WCAG 2.5.8) without growing the chip. */
2014
+ position: relative;
2015
+ &::after { content: ""; position: absolute; inset: -0.3rem; }
2016
+ &:hover { opacity: 1; background: color-mix(in oklab, currentColor 14%, transparent); }
2017
+ }
2018
+ @media (forced-colors: active) { :where(button.pm-tag[aria-pressed="true"]) { border-color: Highlight; } }
2019
+ }
2020
+
2021
+ /* Empty state — <div class="pm-empty-state"><span class="pm-empty-state-icon">…</span><h3>…</h3><p>…</p>actions</div> */
2022
+ @layer pm.components {
2023
+ :where(.pm-empty-state) {
2024
+ display: grid;
2025
+ justify-items: center;
2026
+ gap: var(--pm-space-2);
2027
+ padding: var(--pm-space-10) var(--pm-space-6);
2028
+ text-align: center;
2029
+ color: var(--pm-color-fg);
2030
+ & :where(.pm-empty-state-icon) {
2031
+ display: grid;
2032
+ place-items: center;
2033
+ inline-size: 3rem;
2034
+ block-size: 3rem;
2035
+ margin-block-end: var(--pm-space-2);
2036
+ border-radius: var(--pm-radius-lg);
2037
+ background: var(--pm-tone-soft);
2038
+ color: var(--pm-tone-text);
2039
+ font-size: 1.5rem;
2040
+ }
2041
+ & :where(.pm-empty-state-title) { font-size: var(--pm-font-size-lg); font-weight: var(--pm-font-weight-semibold); }
2042
+ & :where(.pm-empty-state-description) { max-inline-size: 36ch; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
2043
+ & :where(.pm-empty-state-actions) { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--pm-space-2); margin-block-start: var(--pm-space-3); }
2044
+ & :where(.pm-empty-state-actions:empty) { display: none; }
2045
+ }
2046
+ :where(.pm-empty-state[data-bordered]) { border: 1px dashed var(--pm-color-border-strong); border-radius: var(--pm-radius-xl); }
2047
+ }
2048
+
2049
+ /* Stat / KPI — <div class="pm-stat"><span class="pm-stat-label">…</span><span class="pm-stat-value">…</span><span class="pm-stat-delta" data-trend="up">…</span></div> */
2050
+ @layer pm.components {
2051
+ :where(.pm-stat) {
2052
+ display: grid;
2053
+ gap: var(--pm-space-1);
2054
+ min-inline-size: 0;
2055
+ & :where(.pm-stat-label) { display: flex; align-items: center; gap: var(--pm-space-2); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
2056
+ & :where(.pm-stat-value) { font-family: var(--pm-font-display); font-size: var(--pm-font-size-3xl); font-weight: var(--pm-font-weight-bold); line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
2057
+ & :where(.pm-stat-footer) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-2); font-size: var(--pm-font-size-sm); color: var(--pm-color-fg-muted); }
2058
+ & :where(.pm-stat-delta) {
2059
+ display: inline-flex;
2060
+ align-items: center;
2061
+ gap: 0.2em;
2062
+ padding: 0.1em 0.45em;
2063
+ border-radius: var(--pm-radius-sm);
2064
+ font-weight: var(--pm-font-weight-semibold);
2065
+ font-variant-numeric: tabular-nums;
2066
+ background: var(--pm-color-neutral-soft);
2067
+ color: var(--pm-color-fg);
2068
+ }
2069
+ /* The arrow follows the direction; colour says good or bad. `data-inverse` (costs, churn, latency) makes down good. */
2070
+ & :where(.pm-stat-delta:is([data-trend="up"]:not([data-inverse]), [data-trend="down"][data-inverse])) { background: var(--pm-color-success-soft); color: var(--pm-color-success-text); }
2071
+ & :where(.pm-stat-delta:is([data-trend="down"]:not([data-inverse]), [data-trend="up"][data-inverse])) { background: var(--pm-color-danger-soft); color: var(--pm-color-danger-text); }
2072
+ & :where(.pm-stat-delta[data-trend="up"])::before { content: "↑"; content: "↑" / ""; }
2073
+ & :where(.pm-stat-delta[data-trend="down"])::before { content: "↓"; content: "↓" / ""; }
2074
+ }
2075
+ :where(.pm-stat[data-size="sm"]) :where(.pm-stat-value) { font-size: var(--pm-font-size-2xl); }
2076
+ :where(.pm-stat[data-size="lg"]) :where(.pm-stat-value) { font-size: var(--pm-font-size-4xl); }
2077
+ }
2078
+
2079
+ /* Timeline — <ol class="pm-timeline"><li class="pm-timeline-item" data-tone>…</li></ol> */
2080
+ @layer pm.components {
2081
+ :where(.pm-timeline) { display: grid; margin: 0; padding: 0; list-style: none; }
2082
+ :where(.pm-timeline-item) {
2083
+ --_dot: 1.75rem;
2084
+ position: relative;
2085
+ display: grid;
2086
+ grid-template-columns: var(--_dot) 1fr;
2087
+ column-gap: var(--pm-space-3);
2088
+ padding-block-end: var(--pm-space-5);
2089
+ &::before {
2090
+ content: "";
2091
+ position: absolute;
2092
+ inset-block: calc(var(--_dot) + 0.25rem) 0.25rem;
2093
+ inset-inline-start: calc(var(--_dot) / 2 - 1px);
2094
+ inline-size: 2px;
2095
+ border-radius: 1px;
2096
+ background: var(--pm-color-border);
2097
+ }
2098
+ &:last-child { padding-block-end: 0; }
2099
+ &:last-child::before { display: none; }
2100
+ & :where(.pm-timeline-dot) {
2101
+ display: grid;
2102
+ place-items: center;
2103
+ inline-size: var(--_dot);
2104
+ block-size: var(--_dot);
2105
+ border-radius: 50%;
2106
+ background: var(--pm-tone-soft);
2107
+ color: var(--pm-tone-text);
2108
+ border: 2px solid var(--pm-color-bg-surface);
2109
+ box-shadow: 0 0 0 1px var(--pm-tone-border);
2110
+ font-size: 0.85rem;
2111
+ }
2112
+ & :where(.pm-timeline-dot:empty, .pm-timeline-dot[data-empty])::after { content: ""; inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--pm-tone-solid); }
2113
+ & :where(.pm-timeline-body) { display: grid; gap: var(--pm-space-1); padding-block-start: 0.2rem; min-inline-size: 0; }
2114
+ & :where(.pm-timeline-head) { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--pm-space-2); font-weight: var(--pm-font-weight-semibold); }
2115
+ & :where(time, .pm-timeline-time) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-regular, 400); }
2116
+ & :where(.pm-timeline-content) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
2117
+ }
2118
+ }
2119
+
2120
+ /* Breadcrumb — <nav aria-label="Breadcrumb"><ol class="pm-breadcrumb"><li><a href>…</a></li><li><a aria-current="page">…</a></li></ol></nav> */
2121
+ @layer pm.components {
2122
+ :where(.pm-breadcrumb) {
2123
+ display: flex;
2124
+ flex-wrap: wrap;
2125
+ align-items: center;
2126
+ gap: var(--pm-space-1-5);
2127
+ margin: 0;
2128
+ padding: 0;
2129
+ list-style: none;
2130
+ font-size: var(--pm-font-size-sm);
2131
+ color: var(--pm-color-fg-muted);
2132
+ & > :where(li) { display: inline-flex; align-items: center; gap: var(--pm-space-1-5); }
2133
+ & > :where(li + li)::before { content: var(--pm-breadcrumb-separator, "/"); content: var(--pm-breadcrumb-separator, "/") / ""; color: var(--pm-color-border-strong); }
2134
+ }
2135
+ :where(.pm-breadcrumb-link) {
2136
+ color: var(--pm-color-fg-muted);
2137
+ text-decoration: none;
2138
+ border-radius: var(--pm-radius-xs);
2139
+ &:is(a):hover { color: var(--pm-color-fg); text-decoration: underline; }
2140
+ &[aria-current="page"] { color: var(--pm-color-fg); font-weight: var(--pm-font-weight-medium); }
2141
+ }
2142
+ :where(.pm-breadcrumb-more) {
2143
+ padding: 0.1em 0.4em;
2144
+ min-block-size: 1.5rem;
2145
+ border: 0;
2146
+ border-radius: var(--pm-radius-sm);
2147
+ background: transparent;
2148
+ color: inherit;
2149
+ font: inherit;
2150
+ cursor: pointer;
2151
+ &:hover { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
2152
+ }
2153
+ }
2154
+
2155
+ /* Pagination — <nav class="pm-pagination"><a class="pm-page" aria-current="page">1</a>…</nav> */
2156
+ @layer pm.components {
2157
+ :where(.pm-pagination) {
2158
+ display: flex;
2159
+ flex-wrap: wrap;
2160
+ align-items: center;
2161
+ gap: var(--pm-space-1);
2162
+ font-size: var(--pm-font-size-sm);
2163
+ font-variant-numeric: tabular-nums;
2164
+ }
2165
+ :where(.pm-page) {
2166
+ display: inline-flex;
2167
+ align-items: center;
2168
+ justify-content: center;
2169
+ gap: 0.3em;
2170
+ min-inline-size: var(--pm-control-height-sm);
2171
+ block-size: var(--pm-control-height-sm);
2172
+ padding-inline: var(--pm-space-2);
2173
+ border: 1px solid transparent;
2174
+ border-radius: var(--pm-radius-md);
2175
+ background: transparent;
2176
+ color: var(--pm-color-fg);
2177
+ font: inherit;
2178
+ text-decoration: none;
2179
+ cursor: pointer;
2180
+ &:hover:not(:disabled, [aria-current="page"]) { background: var(--pm-color-bg-hover); }
2181
+ &[aria-current="page"] { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); font-weight: var(--pm-font-weight-semibold); cursor: default; }
2182
+ &:disabled { opacity: 0.45; cursor: not-allowed; }
2183
+ }
2184
+ :where(.pm-pagination[data-size="sm"]) { font-size: var(--pm-font-size-xs); & :where(.pm-page) { min-inline-size: var(--pm-control-height-xs); block-size: var(--pm-control-height-xs); padding-inline: var(--pm-space-1); } }
2185
+ :where(.pm-pagination[data-size="lg"]) { font-size: var(--pm-font-size-md); & :where(.pm-page) { min-inline-size: var(--pm-control-height-md); block-size: var(--pm-control-height-md); } }
2186
+ :where(.pm-page-gap) { min-inline-size: 1.5rem; text-align: center; color: var(--pm-color-fg-muted); }
2187
+ :where(.pm-page-status) { padding-inline: var(--pm-space-2); color: var(--pm-color-fg-muted); }
2188
+ @media (forced-colors: active) { :where(.pm-page[aria-current="page"]) { border-color: Highlight; } }
2189
+ :where(.pm-page-compact) { display: none; }
2190
+ @media (width < 40rem) {
2191
+ :where(.pm-pagination:has(.pm-page-compact)) {
2192
+ flex-wrap: nowrap;
2193
+ & > :where(.pm-page:not(:first-child, :last-child), .pm-page-gap) { display: none; }
2194
+ & > :where(.pm-page-compact) { display: inline; }
2195
+ & > :where(.pm-page:is(:first-child, :last-child)) > :where(span) { display: none; }
2196
+ }
2197
+ }
2198
+ }
2199
+
2200
+ /* Steps / stepper — <ol class="pm-steps"><li class="pm-step" data-status="complete|current|upcoming|error">…</li></ol> */
2201
+ @layer pm.components {
2202
+ :where(.pm-steps) { display: flex; margin: 0; padding: 0; list-style: none; counter-reset: pm-step; }
2203
+ :where(.pm-step) {
2204
+ --_dot: 2rem;
2205
+ position: relative;
2206
+ flex: 1;
2207
+ display: grid;
2208
+ grid-template-rows: var(--_dot) auto;
2209
+ row-gap: var(--pm-space-2);
2210
+ justify-items: start;
2211
+ min-inline-size: 0;
2212
+ counter-increment: pm-step;
2213
+ color: var(--pm-color-fg-muted);
2214
+ /* connector: from this marker to the next one */
2215
+ &::after {
2216
+ content: "";
2217
+ position: absolute;
2218
+ inset-block-start: calc(var(--_dot) / 2 - 1px);
2219
+ inset-inline: calc(var(--_dot) + var(--pm-space-2)) var(--pm-space-2);
2220
+ block-size: 2px;
2221
+ border-radius: 1px;
2222
+ background: var(--pm-color-border);
2223
+ }
2224
+ &:last-child { flex: none; }
2225
+ &:last-child::after { display: none; }
2226
+ & :where(.pm-step-marker) {
2227
+ display: grid;
2228
+ place-items: center;
2229
+ inline-size: var(--_dot);
2230
+ block-size: var(--_dot);
2231
+ border: 2px solid var(--pm-color-border-strong);
2232
+ border-radius: 50%;
2233
+ background: var(--pm-color-bg-surface);
2234
+ font-size: var(--pm-font-size-sm);
2235
+ font-weight: var(--pm-font-weight-semibold);
2236
+ font-variant-numeric: tabular-nums;
2237
+ &:empty::before { content: counter(pm-step); }
2238
+ }
2239
+ & :where(.pm-step-text) { display: grid; gap: 0.1rem; padding-inline-end: var(--pm-space-3); }
2240
+ & :where(.pm-step-label) { color: var(--pm-color-fg); font-size: var(--pm-font-size-sm); font-weight: var(--pm-font-weight-medium); }
2241
+ & :where(.pm-step-description) { font-size: var(--pm-font-size-xs); }
2242
+ & :where(button.pm-step-hit) { all: unset; position: absolute; inset: -0.25rem; cursor: pointer; border-radius: var(--pm-radius-md); }
2243
+ & :where(button.pm-step-hit:hover) ~ :where(.pm-step-text) :where(.pm-step-label) { text-decoration: underline; }
2244
+ & :where(button.pm-step-hit:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
2245
+ }
2246
+ :where(.pm-step[data-status="complete"]) {
2247
+ & :where(.pm-step-marker) { border-color: var(--pm-tone-solid); background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); }
2248
+ & :where(.pm-step-marker:empty)::before { content: "✓"; }
2249
+ &::after { background: var(--pm-tone-solid); }
2250
+ }
2251
+ :where(.pm-step[data-status="current"]) {
2252
+ & :where(.pm-step-marker) { border-color: var(--pm-tone-solid); color: var(--pm-tone-text); box-shadow: 0 0 0 4px var(--pm-tone-soft); }
2253
+ & :where(.pm-step-label) { color: var(--pm-tone-text); }
2254
+ }
2255
+ :where(.pm-step[data-status="error"]) {
2256
+ & :where(.pm-step-marker) { border-color: var(--pm-color-danger-solid); color: var(--pm-color-danger-text); }
2257
+ & :where(.pm-step-marker:empty)::before { content: "!"; }
2258
+ & :where(.pm-step-label) { color: var(--pm-color-danger-text); }
2259
+ }
2260
+ :where(.pm-steps[data-orientation="vertical"]) { flex-direction: column; }
2261
+ :where(.pm-steps[data-orientation="vertical"]) :where(.pm-step), :where(.pm-step[data-vertical]) {
2262
+ grid-template-rows: none;
2263
+ grid-template-columns: var(--_dot) 1fr;
2264
+ column-gap: var(--pm-space-3);
2265
+ padding-block-end: var(--pm-space-6);
2266
+ &::after { inset-block: calc(var(--_dot) + var(--pm-space-1)) var(--pm-space-1); inset-inline: calc(var(--_dot) / 2 - 1px) auto; inline-size: 2px; block-size: auto; }
2267
+ &:last-child { padding-block-end: 0; }
2268
+ & :where(.pm-step-text) { padding-block-start: 0.3rem; }
2269
+ }
2270
+ }
2271
+
2272
+ /* Segmented control — <div class="pm-segmented" role="radiogroup"><button role="radio" aria-checked="true">…</button>…</div> */
2273
+ @layer pm.components {
2274
+ :where(.pm-segmented) {
2275
+ --_h: var(--pm-control-height-md);
2276
+ position: relative;
2277
+ display: inline-flex;
2278
+ gap: 2px;
2279
+ padding: 3px;
2280
+ border-radius: calc(var(--pm-radius-control, var(--pm-radius-md)) + 3px);
2281
+ background: var(--pm-color-bg-muted);
2282
+ isolation: isolate;
2283
+ }
2284
+ :where(.pm-segmented[data-size="sm"]) { --_h: var(--pm-control-height-sm); font-size: var(--pm-font-size-sm); }
2285
+ :where(.pm-segmented[data-size="lg"]) { --_h: var(--pm-control-height-lg); }
2286
+ :where(.pm-segmented[data-full]) { display: flex; & > * { flex: 1; } }
2287
+ :where(.pm-segment) {
2288
+ display: inline-flex;
2289
+ align-items: center;
2290
+ justify-content: center;
2291
+ gap: 0.4em;
2292
+ min-block-size: calc(var(--_h) - 6px);
2293
+ padding-inline: var(--pm-space-3);
2294
+ border: 0;
2295
+ border-radius: var(--pm-radius-control, var(--pm-radius-md));
2296
+ background: transparent;
2297
+ color: var(--pm-color-fg-muted);
2298
+ font: inherit;
2299
+ font-weight: var(--pm-font-weight-medium);
2300
+ white-space: nowrap;
2301
+ cursor: pointer;
2302
+ transition: color var(--pm-duration-fast) var(--pm-ease-standard), background-color var(--pm-duration-fast) var(--pm-ease-standard);
2303
+ &:hover:not([aria-checked="true"], [data-checked], :disabled, [data-disabled]) { color: var(--pm-color-fg); }
2304
+ &:is([aria-checked="true"], [data-checked]) { background: var(--pm-color-bg-surface); color: var(--pm-color-fg); box-shadow: var(--pm-elevation-1), 0 0 0 1px var(--pm-color-border); }
2305
+ &:is(:disabled, [data-disabled]) { opacity: 0.5; cursor: not-allowed; }
2306
+ }
2307
+ :where([data-surface="neumorphic"]) :where(.pm-segmented) { background: var(--pm-sf-bg); box-shadow: var(--pm-sf-inset, inset 2px 2px 4px var(--pm-shadow-color-soft)); }
2308
+ @media (forced-colors: active) { :where(.pm-segment:is([aria-checked="true"], [data-checked])) { outline: 2px solid Highlight; } }
2309
+ }
2310
+
2311
+ /* Tree view — <ul class="pm-tree" role="tree"><li role="treeitem" aria-expanded>…</li></ul> */
2312
+ @layer pm.components {
2313
+ :where(.pm-tree) { margin: 0; padding: 0; list-style: none; font-size: var(--pm-font-size-sm); }
2314
+ :where(.pm-tree-row) {
2315
+ display: flex;
2316
+ align-items: center;
2317
+ gap: var(--pm-space-1-5);
2318
+ min-block-size: calc(var(--pm-control-height-sm) - 2px);
2319
+ padding-inline: calc(var(--pm-space-2) + var(--_depth, 0) * var(--pm-tree-indent, 1.25rem)) var(--pm-space-2);
2320
+ border-radius: var(--pm-radius-sm);
2321
+ color: var(--pm-color-fg);
2322
+ cursor: pointer;
2323
+ user-select: none;
2324
+ &:hover { background: var(--pm-color-bg-hover); }
2325
+ &[aria-selected="true"], &[data-selected] { background: var(--pm-tone-soft); color: var(--pm-tone-text); font-weight: var(--pm-font-weight-medium); }
2326
+ }
2327
+ :where(.pm-tree-toggle) {
2328
+ display: inline-grid;
2329
+ place-items: center;
2330
+ inline-size: 1rem;
2331
+ block-size: 1rem;
2332
+ flex: none;
2333
+ color: var(--pm-color-fg-muted);
2334
+ transition: rotate var(--pm-duration-fast) var(--pm-ease-standard);
2335
+ &[data-open] { rotate: 90deg; }
2336
+ &[data-leaf] { visibility: hidden; }
2337
+ }
2338
+ :where(.pm-tree-group) { margin: 0; padding: 0; list-style: none; }
2339
+ }
2340
+ /* Checkbox trees, lazy loading, filter highlight */
2341
+ @layer pm.components {
2342
+ :where(.pm-tree-check) {
2343
+ flex: none;
2344
+ display: inline-grid;
2345
+ place-items: center;
2346
+ inline-size: 1rem;
2347
+ block-size: 1rem;
2348
+ border: 1.5px solid var(--pm-color-border-strong);
2349
+ border-radius: var(--pm-radius-xs, 3px);
2350
+ background: var(--pm-color-bg-surface);
2351
+ color: var(--pm-color-accent-on-solid, white);
2352
+ &:is([data-state="checked"], [data-state="mixed"]) { background: var(--pm-color-accent-solid); border-color: var(--pm-color-accent-solid); }
2353
+ @media (forced-colors: active) { &:is([data-state="checked"], [data-state="mixed"]) { background: Highlight; color: HighlightText; } }
2354
+ }
2355
+ :where(.pm-tree-spinner) {
2356
+ display: block;
2357
+ inline-size: 0.8em;
2358
+ block-size: 0.8em;
2359
+ border: 2px solid color-mix(in oklab, currentColor 25%, transparent);
2360
+ border-block-start-color: currentColor;
2361
+ border-radius: 50%;
2362
+ animation: pm-tree-spin 0.8s linear infinite;
2363
+ @media (prefers-reduced-motion: reduce) { animation-duration: 2.4s; }
2364
+ }
2365
+ @keyframes pm-tree-spin { to { rotate: 1turn; } }
2366
+ :where(.pm-tree-mark) { background: var(--pm-color-warning-soft, #ff06); color: inherit; border-radius: 2px; }
2367
+ }
2368
+
2369
+ /* Carousel — scroll-snap track with previous/next buttons and slide pickers */
2370
+ @layer pm.components {
2371
+ :where(.pm-carousel) { position: relative; display: grid; gap: var(--pm-space-3); }
2372
+ /* Centre the arrows on the slides, not on slides + dots. */
2373
+ :where(.pm-carousel:has(.pm-carousel-dots)) { --_dots: calc(24px + var(--pm-space-3)); }
2374
+ :where(.pm-carousel-track) {
2375
+ display: grid;
2376
+ grid-auto-flow: column;
2377
+ grid-auto-columns: calc((100% - (var(--pm-carousel-per-view, 1) - 1) * var(--pm-carousel-gap, var(--pm-space-4))) / var(--pm-carousel-per-view, 1));
2378
+ gap: var(--pm-carousel-gap, var(--pm-space-4));
2379
+ overflow-x: auto;
2380
+ overscroll-behavior-x: contain;
2381
+ scroll-snap-type: x mandatory;
2382
+ scrollbar-width: none;
2383
+ border-radius: var(--pm-radius-lg);
2384
+ &::-webkit-scrollbar { display: none; }
2385
+ @media (prefers-reduced-motion: no-preference) { scroll-behavior: smooth; }
2386
+ & > :where(*) { scroll-snap-align: start; min-inline-size: 0; }
2387
+ }
2388
+ :where(.pm-carousel-nav) {
2389
+ position: absolute;
2390
+ inset-block-start: calc(50% - 1.25rem - var(--_dots, 0px) / 2);
2391
+ z-index: 1;
2392
+ display: grid;
2393
+ place-items: center;
2394
+ inline-size: 2.5rem;
2395
+ block-size: 2.5rem;
2396
+ border: 1px solid var(--pm-color-border);
2397
+ border-radius: 50%;
2398
+ background: color-mix(in oklab, var(--pm-color-bg-surface) 88%, transparent);
2399
+ backdrop-filter: blur(8px);
2400
+ color: var(--pm-color-fg);
2401
+ box-shadow: var(--pm-elevation-2);
2402
+ cursor: pointer;
2403
+ &:disabled { opacity: 0; pointer-events: none; }
2404
+ &[data-dir="prev"] { inset-inline-start: var(--pm-space-2); }
2405
+ &[data-dir="next"] { inset-inline-end: var(--pm-space-2); }
2406
+ &:dir(rtl) { scale: -1 1; }
2407
+ }
2408
+ :where(.pm-carousel-dots) { display: flex; justify-content: center; }
2409
+ /* 24×24 hit area (WCAG 2.5.8); the visible pill is drawn by ::before */
2410
+ :where(.pm-carousel-dot) {
2411
+ display: grid;
2412
+ place-items: center;
2413
+ min-inline-size: 24px;
2414
+ block-size: 24px;
2415
+ padding: 0 2px;
2416
+ border: 0;
2417
+ border-radius: var(--pm-radius-sm);
2418
+ background: none;
2419
+ cursor: pointer;
2420
+ &::before {
2421
+ content: "";
2422
+ inline-size: 0.5rem;
2423
+ block-size: 0.5rem;
2424
+ border-radius: 99px;
2425
+ background: var(--pm-color-border-strong);
2426
+ transition: inline-size var(--pm-duration-moderate) var(--pm-ease-standard), background-color var(--pm-duration-fast);
2427
+ }
2428
+ &[aria-current="true"]::before { inline-size: 1.5rem; background: var(--pm-tone-solid); }
2429
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); }
2430
+ }
2431
+ @media (forced-colors: active) {
2432
+ :where(.pm-carousel-dot)::before { background: ButtonText; }
2433
+ :where(.pm-carousel-dot[aria-current="true"])::before { background: Highlight; }
2434
+ }
2435
+ }
2436
+
2437
+ /* Number input — .pm-input with stepper buttons */
2438
+ @layer pm.components {
2439
+ :where(.pm-number) {
2440
+ position: relative;
2441
+ display: flex;
2442
+ align-items: stretch;
2443
+ & > :where(.pm-input) { flex: 1; text-align: center; font-variant-numeric: tabular-nums; padding-inline: calc(var(--_h, var(--pm-control-height-md)) + var(--pm-space-1)); }
2444
+ }
2445
+ :where(.pm-number-step) {
2446
+ position: absolute;
2447
+ inset-block: 1px;
2448
+ z-index: 1;
2449
+ display: grid;
2450
+ place-items: center;
2451
+ inline-size: var(--pm-control-height-md);
2452
+ padding: 0;
2453
+ border: 0;
2454
+ background: transparent;
2455
+ color: var(--pm-color-fg-muted);
2456
+ font: inherit;
2457
+ font-size: 1.1em;
2458
+ cursor: pointer;
2459
+ &[data-dir="down"] { inset-inline-start: 1px; border-start-start-radius: inherit; border-end-start-radius: inherit; border-inline-end: 1px solid var(--pm-color-border); }
2460
+ &[data-dir="up"] { inset-inline-end: 1px; border-inline-start: 1px solid var(--pm-color-border); }
2461
+ &:hover:not(:disabled) { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
2462
+ &:disabled { opacity: 0.4; cursor: not-allowed; }
2463
+ }
2464
+ :where(.pm-number[data-size="sm"]) :where(.pm-number-step) { inline-size: var(--pm-control-height-sm); }
2465
+ :where(.pm-number[data-size="lg"]) :where(.pm-number-step) { inline-size: var(--pm-control-height-lg); }
2466
+ }
2467
+
2468
+ /* PIN / one-time code — one box per character */
2469
+ @layer pm.components {
2470
+ :where(.pm-pin) { display: flex; gap: var(--pm-space-2); max-inline-size: 100%; }
2471
+ /* Cells shrink on narrow screens (never below a comfortable 2rem touch target) instead of overflowing. */
2472
+ :where(.pm-pin-cell) {
2473
+ flex: 0 1 var(--pm-control-height-lg);
2474
+ min-inline-size: 2rem;
2475
+ block-size: calc(var(--pm-control-height-lg) * 1.15);
2476
+ padding: 0;
2477
+ text-align: center;
2478
+ font-size: var(--pm-font-size-xl);
2479
+ font-weight: var(--pm-font-weight-semibold);
2480
+ font-variant-numeric: tabular-nums;
2481
+ caret-color: var(--pm-tone-solid);
2482
+ }
2483
+ :where(.pm-pin[data-size="sm"]) :where(.pm-pin-cell) { flex-basis: var(--pm-control-height-md); block-size: var(--pm-control-height-md); font-size: var(--pm-font-size-md); }
2484
+ :where(.pm-pin-sep) { align-self: center; color: var(--pm-color-fg-muted); }
2485
+ }
2486
+
2487
+ /* Rating — stars as a radio group */
2488
+ @layer pm.components {
2489
+ :where(.pm-rating) {
2490
+ --_size: 1.5rem;
2491
+ display: inline-flex;
2492
+ gap: 2px;
2493
+ color: var(--pm-color-border-strong);
2494
+ }
2495
+ :where(.pm-rating[data-size="sm"]) { --_size: 1.125rem; }
2496
+ :where(.pm-rating[data-size="lg"]) { --_size: 2rem; }
2497
+ :where(.pm-rating-star) {
2498
+ display: grid;
2499
+ place-items: center;
2500
+ inline-size: calc(var(--_size) + 0.25rem);
2501
+ block-size: calc(var(--_size) + 0.25rem);
2502
+ min-inline-size: 24px;
2503
+ min-block-size: 24px;
2504
+ padding: 0;
2505
+ border: 0;
2506
+ border-radius: var(--pm-radius-sm);
2507
+ background: transparent;
2508
+ color: inherit;
2509
+ cursor: pointer;
2510
+ & svg { inline-size: var(--_size); block-size: var(--_size); }
2511
+ &[data-on] { color: var(--pm-rating-color, var(--pm-color-warning-solid)); }
2512
+ &[data-on] svg { fill: currentColor; }
2513
+ @media (prefers-reduced-motion: no-preference) { transition: scale var(--pm-duration-fast) var(--pm-ease-standard), color var(--pm-duration-fast); &:hover { scale: 1.12; } }
2514
+ }
2515
+ :where(.pm-rating[data-readonly]) :where(.pm-rating-star) { cursor: default; scale: 1; }
2516
+ @media (forced-colors: active) { :where(.pm-rating-star[data-on]) { color: Highlight; } }
2517
+ }
2518
+
2519
+ /* File upload — drop zone + file list */
2520
+ @layer pm.components {
2521
+ :where(.pm-dropzone) {
2522
+ display: grid;
2523
+ justify-items: center;
2524
+ gap: var(--pm-space-2);
2525
+ padding: var(--pm-space-8) var(--pm-space-6);
2526
+ border: 2px dashed var(--pm-color-border-strong);
2527
+ border-radius: var(--pm-radius-xl);
2528
+ background: var(--pm-color-bg-subtle);
2529
+ color: var(--pm-color-fg-muted);
2530
+ text-align: center;
2531
+ font-size: var(--pm-font-size-sm);
2532
+ cursor: pointer;
2533
+ transition: border-color var(--pm-duration-fast), background-color var(--pm-duration-fast);
2534
+ &:hover, &[data-dragging] { border-color: var(--pm-tone-solid); background: var(--pm-tone-soft); color: var(--pm-color-fg); }
2535
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
2536
+ &[data-disabled] { opacity: 0.55; cursor: not-allowed; }
2537
+ & :where(.pm-dropzone-icon) { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; border-radius: 50%; background: var(--pm-tone-soft); color: var(--pm-tone-text); font-size: 1.3rem; }
2538
+ & :where(strong) { color: var(--pm-tone-text); }
2539
+ }
2540
+ :where(.pm-file-list) { display: grid; gap: var(--pm-space-2); margin: var(--pm-space-3) 0 0; padding: 0; list-style: none; }
2541
+ :where(.pm-file) {
2542
+ display: grid;
2543
+ grid-template-columns: auto 1fr auto;
2544
+ align-items: center;
2545
+ gap: var(--pm-space-3);
2546
+ padding: var(--pm-space-2) var(--pm-space-3);
2547
+ border: 1px solid var(--pm-color-border);
2548
+ border-radius: var(--pm-radius-md);
2549
+ background: var(--pm-color-bg-surface);
2550
+ font-size: var(--pm-font-size-sm);
2551
+ & :where(.pm-file-name) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--pm-font-weight-medium); }
2552
+ & :where(.pm-file-meta) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
2553
+ & :where(.pm-file-thumb) { inline-size: 2.25rem; block-size: 2.25rem; border-radius: var(--pm-radius-sm); object-fit: cover; background: var(--pm-color-bg-muted); display: grid; place-items: center; color: var(--pm-color-fg-muted); }
2554
+ }
2555
+ }
2556
+ /* Upload progress and status */
2557
+ @layer pm.components {
2558
+ :where(.pm-file-progress) { display: block; block-size: 4px; border-radius: 999px; background: var(--pm-color-bg-active); overflow: hidden; }
2559
+ :where(.pm-file-progress) > :where(span) { display: block; block-size: 100%; border-radius: inherit; background: var(--pm-color-accent-solid); @media (prefers-reduced-motion: no-preference) { transition: inline-size var(--pm-duration-moderate) var(--pm-ease-standard); } }
2560
+ :where(.pm-file[data-status="done"]) :where(.pm-file-meta) { color: var(--pm-color-success-text); }
2561
+ :where(.pm-file-error) { color: var(--pm-color-danger-text); }
2562
+ :where(.pm-file[data-status="error"]) { border-color: var(--pm-color-danger-border, var(--pm-color-danger-solid)); }
2563
+ }
2564
+
2565
+ /* Listbox popup — options for combobox, command palette and select-like controls */
2566
+ @layer pm.components {
2567
+ :where(.pm-listbox) {
2568
+ margin: 0;
2569
+ padding: var(--pm-space-1);
2570
+ max-block-size: min(var(--pm-listbox-max, 18rem), 60vh);
2571
+ overflow-y: auto;
2572
+ overscroll-behavior: contain;
2573
+ list-style: none;
2574
+ }
2575
+ :where(.pm-listbox-popup) {
2576
+ position: fixed;
2577
+ inset: auto;
2578
+ margin: 0;
2579
+ padding: 0;
2580
+ border: 1px solid var(--pm-color-border);
2581
+ border-radius: var(--pm-radius-lg);
2582
+ background: var(--pm-color-bg-surface);
2583
+ color: var(--pm-color-fg);
2584
+ box-shadow: var(--pm-elevation-4);
2585
+ overflow: hidden;
2586
+ }
2587
+ :where(.pm-option) {
2588
+ display: flex;
2589
+ align-items: center;
2590
+ gap: var(--pm-space-2);
2591
+ min-block-size: calc(var(--pm-control-height-sm) + 2px);
2592
+ padding: 0 var(--pm-space-2-5, 0.625rem);
2593
+ border-radius: var(--pm-radius-sm);
2594
+ color: var(--pm-color-fg);
2595
+ font-size: var(--pm-font-size-sm);
2596
+ cursor: pointer;
2597
+ user-select: none;
2598
+ & :where(.pm-option-check) { inline-size: 1rem; flex: none; color: var(--pm-tone-text); visibility: hidden; }
2599
+ & :where(.pm-option-label) { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2600
+ & :where(.pm-option-hint) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
2601
+ & :where(mark) { background: none; color: var(--pm-tone-text); font-weight: var(--pm-font-weight-semibold); }
2602
+ &[data-active] { background: var(--pm-color-bg-hover); }
2603
+ &[aria-selected="true"] :where(.pm-option-check) { visibility: visible; }
2604
+ &[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
2605
+ }
2606
+ :where(.pm-listbox-group) { padding: var(--pm-space-2) var(--pm-space-2-5, 0.625rem) var(--pm-space-1); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); }
2607
+ :where(.pm-listbox-empty) { padding: var(--pm-space-6) var(--pm-space-3); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); text-align: center; }
2608
+ :where(.pm-listbox-empty[data-error]) { color: var(--pm-color-danger-text); }
2609
+ :where(.pm-listbox-retry) {
2610
+ margin-inline-start: var(--pm-space-1); min-block-size: 1.5rem; padding: 0 var(--pm-space-2);
2611
+ border: 1px solid var(--pm-color-border-strong); border-radius: var(--pm-radius-sm); background: none; color: var(--pm-color-fg);
2612
+ font: inherit; cursor: pointer;
2613
+ &:hover { background: var(--pm-color-bg-hover); }
2614
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
2615
+ }
2616
+ @media (forced-colors: active) { :where(.pm-option[data-active]) { outline: 2px solid Highlight; outline-offset: -2px; } }
2617
+ }
2618
+
2619
+ /* Combobox — input + listbox; multiple selections render as tags inside the field */
2620
+ @layer pm.components {
2621
+ :where(.pm-combobox) {
2622
+ position: relative;
2623
+ display: flex;
2624
+ flex-wrap: wrap;
2625
+ align-items: center;
2626
+ gap: var(--pm-space-1);
2627
+ min-block-size: var(--_h, var(--pm-control-height-md));
2628
+ padding: 3px calc(var(--pm-control-height-md) - 4px) 3px var(--pm-space-1-5);
2629
+ cursor: text;
2630
+ & > :where(input) {
2631
+ flex: 1;
2632
+ min-inline-size: 6ch;
2633
+ block-size: calc(var(--_h, var(--pm-control-height-md)) - 8px);
2634
+ padding: 0 var(--pm-space-1-5);
2635
+ border: 0;
2636
+ background: transparent;
2637
+ color: inherit;
2638
+ font: inherit;
2639
+ outline: none;
2640
+ }
2641
+ & > :where(.pm-tag) { --_h: 1.5rem; }
2642
+ &:focus-within { outline: 2px solid var(--pm-color-ring); outline-offset: 0; --_border: var(--pm-color-ring); }
2643
+ &[data-invalid] { --_border: var(--pm-color-danger-border-strong); }
2644
+ &[data-disabled] { opacity: 0.55; cursor: not-allowed; }
2645
+ }
2646
+ :where(.pm-combobox-icon) {
2647
+ position: absolute;
2648
+ inset-block: 0;
2649
+ inset-inline-end: 0;
2650
+ display: grid;
2651
+ place-items: center;
2652
+ inline-size: var(--pm-control-height-md);
2653
+ color: var(--pm-color-fg-muted);
2654
+ pointer-events: none;
2655
+ }
2656
+ :where(.pm-combobox-clear) { pointer-events: auto; }
2657
+ }
2658
+
2659
+ /* Calendar — month grid (ARIA grid) */
2660
+ @layer pm.components {
2661
+ :where(.pm-calendar) { display: inline-grid; gap: var(--pm-space-2); font-size: var(--pm-font-size-sm); user-select: none; }
2662
+ :where(.pm-calendar-head) { display: flex; align-items: center; justify-content: space-between; gap: var(--pm-space-2); }
2663
+ :where(.pm-calendar-title) { font-weight: var(--pm-font-weight-semibold); text-transform: capitalize; }
2664
+ :where(.pm-calendar-grid) { border-collapse: collapse; font-variant-numeric: tabular-nums; }
2665
+ :where(.pm-calendar-grid th) { block-size: 2rem; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-medium); }
2666
+ :where(.pm-calendar-grid td) { padding: 1px 0; }
2667
+ :where(.pm-day) {
2668
+ position: relative;
2669
+ display: grid;
2670
+ place-items: center;
2671
+ inline-size: 2.25rem;
2672
+ block-size: 2.25rem;
2673
+ padding: 0;
2674
+ border: 0;
2675
+ border-radius: var(--pm-radius-md);
2676
+ background: transparent;
2677
+ color: var(--pm-color-fg);
2678
+ font: inherit;
2679
+ cursor: pointer;
2680
+ &:hover:not([aria-disabled="true"], [aria-selected="true"]) { background: var(--pm-color-bg-hover); }
2681
+ &[data-outside] { color: var(--pm-color-fg-muted); }
2682
+ &[data-today]::after { content: ""; position: absolute; inset-block-end: 4px; inline-size: 4px; block-size: 4px; border-radius: 50%; background: currentColor; }
2683
+ &[data-in-range] { border-radius: 0; background: var(--pm-tone-soft); color: var(--pm-tone-text); }
2684
+ &[aria-selected="true"] { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); font-weight: var(--pm-font-weight-semibold); }
2685
+ &[data-range-start] { border-start-end-radius: 0; border-end-end-radius: 0; }
2686
+ &[data-range-end] { border-start-start-radius: 0; border-end-start-radius: 0; }
2687
+ &[data-range-start][data-range-end] { border-radius: var(--pm-radius-md); }
2688
+ &[aria-disabled="true"] { color: var(--pm-color-fg-muted); text-decoration: line-through; cursor: not-allowed; }
2689
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; z-index: 1; }
2690
+ }
2691
+ @media (forced-colors: active) { :where(.pm-day[aria-selected="true"]) { outline: 2px solid Highlight; } }
2692
+ }
2693
+ /* Month / year picker views */
2694
+ @layer pm.components {
2695
+ :where(.pm-calendar-picker) { display: grid; gap: var(--pm-space-1); inline-size: calc(7 * 2.25rem); }
2696
+ :where(.pm-calendar-picker > [role="row"]) { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pm-space-1); }
2697
+ :where(.pm-calendar-cell) {
2698
+ position: relative;
2699
+ display: grid;
2700
+ place-items: center;
2701
+ block-size: 3rem;
2702
+ border-radius: var(--pm-radius-md);
2703
+ color: var(--pm-color-fg);
2704
+ cursor: pointer;
2705
+ text-transform: capitalize;
2706
+ font-variant-numeric: tabular-nums;
2707
+ &:hover:not([aria-disabled="true"], [aria-selected="true"]) { background: var(--pm-color-bg-hover); }
2708
+ &[data-today] { box-shadow: inset 0 0 0 1px var(--pm-color-border-strong); }
2709
+ &[aria-selected="true"] { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); font-weight: var(--pm-font-weight-semibold); }
2710
+ &[aria-disabled="true"] { color: var(--pm-color-fg-muted); text-decoration: line-through; cursor: not-allowed; }
2711
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
2712
+ }
2713
+ :where(.pm-day[data-blank]) { visibility: hidden; }
2714
+ @media (forced-colors: active) { :where(.pm-calendar-cell[aria-selected="true"]) { outline: 2px solid Highlight; } }
2715
+ }
2716
+
2717
+ /* Command palette — search box + grouped actions in a modal */
2718
+ @layer pm.components {
2719
+ :where(.pm-command) {
2720
+ --pm-dialog-width: 36rem;
2721
+ padding: 0;
2722
+ overflow: hidden;
2723
+ align-self: start;
2724
+ margin-block-start: min(15vh, 8rem);
2725
+ }
2726
+ :where(.pm-command-search) {
2727
+ display: flex;
2728
+ align-items: center;
2729
+ gap: var(--pm-space-2);
2730
+ padding-inline: var(--pm-space-4);
2731
+ border-block-end: 1px solid var(--pm-color-border);
2732
+ color: var(--pm-color-fg-muted);
2733
+ & > :where(input) {
2734
+ flex: 1;
2735
+ min-inline-size: 0;
2736
+ block-size: 3.25rem;
2737
+ border: 0;
2738
+ background: transparent;
2739
+ color: var(--pm-color-fg);
2740
+ font: inherit;
2741
+ font-size: var(--pm-font-size-md);
2742
+ outline: none;
2743
+ &::placeholder { color: var(--pm-color-fg-muted); }
2744
+ }
2745
+ }
2746
+ :where(.pm-command) :where(.pm-listbox) { --pm-listbox-max: 22rem; padding: var(--pm-space-2); }
2747
+ :where(.pm-command) :where(.pm-option) { min-block-size: 2.5rem; gap: var(--pm-space-3); }
2748
+ :where(.pm-command-foot) {
2749
+ display: flex;
2750
+ gap: var(--pm-space-4);
2751
+ padding: var(--pm-space-2) var(--pm-space-4);
2752
+ border-block-start: 1px solid var(--pm-color-border);
2753
+ background: var(--pm-color-bg-subtle);
2754
+ color: var(--pm-color-fg-muted);
2755
+ font-size: var(--pm-font-size-xs);
2756
+ }
2757
+ /* Phones: a top sheet, so the on-screen keyboard never covers results. */
2758
+ @media (width < 40rem) {
2759
+ :where(.pm-command) {
2760
+ inline-size: 100%;
2761
+ max-inline-size: none;
2762
+ margin: 0;
2763
+ margin-block-start: 0;
2764
+ padding-block-start: var(--pm-safe-top, 0px);
2765
+ border-radius: 0 0 var(--pm-radius-2xl) var(--pm-radius-2xl);
2766
+ max-block-size: 85dvh;
2767
+ }
2768
+ :where(.pm-command) :where(.pm-listbox) { --pm-listbox-max: 60dvh; }
2769
+ :where(.pm-command) :where([role="option"]) { min-block-size: 2.75rem; }
2770
+ }
2771
+ }
2772
+
2773
+ /* Data table — advanced layer on top of table.css: toolbar, frozen columns, pinned rows, resize, menus, filters,
2774
+ groups, detail rows, merged cells, editing, footer aggregates. */
2775
+ @layer pm.components {
2776
+ :where(.pm-data-table) :where(.pm-table) {
2777
+ & :where(th, td) { background-clip: padding-box; }
2778
+ /* Utility columns keep a fixed, comfortable width whether or not they are frozen. */
2779
+ & :where(.pm-select-cell, .pm-dt-expand-cell) {
2780
+ inline-size: 2.75rem;
2781
+ min-inline-size: 2.75rem;
2782
+ max-inline-size: 2.75rem;
2783
+ padding-inline: 0;
2784
+ text-align: center;
2785
+ }
2786
+ & :where(.pm-select-cell, .pm-dt-expand-cell) > :where(*) { margin-inline: auto; }
2787
+ & :where(td[data-merged]) { display: none; }
2788
+ /* A merged cell spans several rows: it keeps the plain surface instead of the first row's hover/stripe colour. */
2789
+ & :where(td[rowspan]) { vertical-align: top; --_row: transparent; background-color: var(--pm-color-bg-surface); }
2790
+ & :where(tbody td:focus-visible, tbody td:focus) { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
2791
+ & :where(tbody td) { scroll-margin-inline: 3rem; }
2792
+ }
2793
+ :where(.pm-data-table) :where(.pm-table[data-fixed]) :where(td:not(.pm-select-cell, .pm-dt-expand-cell, [colspan]), th) {
2794
+ overflow: hidden;
2795
+ text-overflow: ellipsis;
2796
+ white-space: nowrap;
2797
+ }
2798
+
2799
+ /* Header cell: label, pin mark, actions; resize handle on the edge */
2800
+ :where(.pm-dt-th) { display: flex; align-items: center; gap: var(--pm-space-1); min-inline-size: 0; }
2801
+ :where(.pm-dt-th) > :where(.pm-sort, .pm-dt-label) { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
2802
+ :where(.pm-data-table) :where(thead th) { position: relative; }
2803
+ :where(.pm-data-table) :where(thead th[data-align="end"]) :where(.pm-dt-th) { justify-content: flex-end; }
2804
+ :where(.pm-data-table) :where(thead th[data-align="center"]) :where(.pm-dt-th) { justify-content: center; }
2805
+ :where(.pm-dt-level) { font-size: 0.625rem; color: var(--pm-tone-text); font-weight: var(--pm-font-weight-bold); }
2806
+ :where(.pm-dt-pinmark) { display: inline-flex; color: var(--pm-color-fg-subtle, var(--pm-color-fg-muted)); }
2807
+ :where(.pm-dt-icon) {
2808
+ display: inline-grid;
2809
+ place-items: center;
2810
+ flex: none;
2811
+ inline-size: 1.5rem;
2812
+ block-size: 1.5rem;
2813
+ padding: 0;
2814
+ border: 0;
2815
+ border-radius: var(--pm-radius-sm);
2816
+ background: none;
2817
+ color: var(--pm-color-fg-muted);
2818
+ cursor: pointer;
2819
+ &:hover { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
2820
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); }
2821
+ }
2822
+ :where(.pm-dt-colmenu) { margin-inline-start: auto; opacity: 0; }
2823
+ :where(th:hover, th:focus-within) :where(.pm-dt-colmenu), :where(.pm-dt-colmenu[aria-expanded="true"]) { opacity: 1; }
2824
+ @media (hover: none) { :where(.pm-dt-colmenu) { opacity: 1; } }
2825
+ :where(.pm-dt-expand) {
2826
+ & :where(svg) { @media (prefers-reduced-motion: no-preference) { transition: rotate var(--pm-duration-fast) var(--pm-ease-standard); } }
2827
+ &[aria-expanded="true"] :where(svg) { rotate: 90deg; }
2828
+ }
2829
+ :where(.pm-dt-resizer) {
2830
+ position: absolute;
2831
+ inset-block: 0;
2832
+ inset-inline-end: -4px;
2833
+ z-index: 2;
2834
+ inline-size: 8px;
2835
+ cursor: col-resize;
2836
+ touch-action: none;
2837
+ &::after { content: ""; position: absolute; inset-block: 25%; inset-inline-start: 3px; inline-size: 2px; border-radius: 1px; background: transparent; }
2838
+ &:hover::after, &:focus-visible::after { background: var(--pm-color-accent-solid); }
2839
+ &:focus-visible { outline: none; }
2840
+ }
2841
+ :where(th[data-drop="before"]) { box-shadow: inset 2px 0 0 var(--pm-color-accent-solid); }
2842
+ :where(th[data-drop="after"]) { box-shadow: inset -2px 0 0 var(--pm-color-accent-solid); }
2843
+ :where(.pm-dt-group-head) { text-align: center; }
2844
+
2845
+ /* Frozen columns (sticky with measured offsets) and pinned rows */
2846
+ :where(.pm-data-table) :where(.pm-table) {
2847
+ & :where([data-pin]) {
2848
+ position: sticky;
2849
+ z-index: 1;
2850
+ background-color: var(--pm-color-bg-surface);
2851
+ background-image: linear-gradient(var(--_row, transparent), var(--_row, transparent));
2852
+ }
2853
+ & :where(thead [data-pin]) { z-index: 2; background-color: var(--pm-color-bg-subtle); background-image: none; }
2854
+ & :where([data-pin="start"][data-pin-edge]) { box-shadow: inset -1px 0 0 var(--pm-color-border), 6px 0 8px -6px rgb(0 0 0 / 0.18); }
2855
+ & :where([data-pin="end"][data-pin-edge]) { box-shadow: inset 1px 0 0 var(--pm-color-border), -6px 0 8px -6px rgb(0 0 0 / 0.18); }
2856
+ & :where(tbody.pm-dt-pinned td) {
2857
+ position: sticky;
2858
+ inset-block-start: var(--_top, 0px);
2859
+ z-index: 2;
2860
+ background-color: var(--pm-color-bg-surface);
2861
+ background-image: linear-gradient(var(--_row, transparent), var(--_row, transparent));
2862
+ }
2863
+ & :where(tbody.pm-dt-pinned td[data-pin]) { z-index: 3; }
2864
+ & :where(tbody.pm-dt-pinned tr:last-child td) { border-block-end: 2px solid var(--pm-color-border-strong); }
2865
+ & :where(tfoot td) {
2866
+ position: sticky;
2867
+ inset-block-end: 0;
2868
+ z-index: 2;
2869
+ border-block-start: 2px solid var(--pm-color-border-strong);
2870
+ border-block-end: 0;
2871
+ background: var(--pm-color-bg-subtle);
2872
+ font-weight: var(--pm-font-weight-semibold);
2873
+ }
2874
+ & :where(tfoot td[data-pin]) { z-index: 3; }
2875
+ }
2876
+
2877
+ /* Filter row */
2878
+ :where(.pm-dt-filters) :where(td) { padding-block: var(--pm-space-1-5, 0.375rem); background: var(--pm-color-bg-subtle); }
2879
+ :where(.pm-dt-input) {
2880
+ inline-size: 100%;
2881
+ min-inline-size: 4rem;
2882
+ block-size: max(1.875rem, var(--pm-touch-min-sm, 0px));
2883
+ padding: 0 var(--pm-space-2);
2884
+ border: 1px solid var(--pm-color-border-strong);
2885
+ border-radius: var(--pm-radius-sm);
2886
+ background: var(--pm-color-bg-surface);
2887
+ color: var(--pm-color-fg);
2888
+ font: inherit;
2889
+ font-size: var(--pm-font-size-sm);
2890
+ font-weight: var(--pm-font-weight-normal);
2891
+ &::placeholder { color: var(--pm-color-fg-muted); }
2892
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -1px; border-color: var(--pm-color-ring); }
2893
+ @media (pointer: coarse) { font-size: max(1rem, var(--pm-font-size-sm)); }
2894
+ }
2895
+ :where(.pm-dt-editor) { margin-block: calc(var(--pm-space-1) * -1); }
2896
+ :where(td[data-editable]) { cursor: text; }
2897
+ :where(td[data-editable]:hover) { box-shadow: inset 0 0 0 1px var(--pm-color-border-strong); }
2898
+
2899
+ /* Group and detail rows */
2900
+ :where(.pm-dt-group) > :where(td) { padding-block: var(--pm-space-1-5, 0.375rem); background: var(--pm-color-bg-muted, var(--pm-color-bg-subtle)); }
2901
+ :where(.pm-dt-group-inner) { position: sticky; inset-inline-start: var(--pm-space-3); display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-1) var(--pm-space-4); }
2902
+ :where(.pm-dt-group-toggle) {
2903
+ display: inline-flex;
2904
+ align-items: center;
2905
+ gap: var(--pm-space-1-5, 0.375rem);
2906
+ padding: 2px var(--pm-space-1);
2907
+ border: 0;
2908
+ border-radius: var(--pm-radius-sm);
2909
+ background: none;
2910
+ color: var(--pm-color-fg);
2911
+ font: inherit;
2912
+ cursor: pointer;
2913
+ & :where(svg) { @media (prefers-reduced-motion: no-preference) { transition: rotate var(--pm-duration-fast) var(--pm-ease-standard); } }
2914
+ &[aria-expanded="true"] :where(svg) { rotate: 90deg; }
2915
+ &:hover { background: var(--pm-color-bg-hover); }
2916
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); }
2917
+ }
2918
+ :where(.pm-dt-group-label) { color: var(--pm-color-fg-muted); }
2919
+ :where(.pm-dt-group-count) { padding: 0 0.45em; border-radius: 999px; background: var(--pm-color-bg-surface); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-variant-numeric: tabular-nums; }
2920
+ :where(.pm-dt-group-agg) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
2921
+ :where(.pm-dt-detail) > :where(td) { padding: 0; background: var(--pm-color-bg-subtle); }
2922
+ :where(.pm-dt-detail-body) { position: sticky; inset-inline-start: 0; max-inline-size: var(--pm-dt-detail-width, 100cqi); padding: var(--pm-space-4); }
2923
+
2924
+ /* Toolbar and footer */
2925
+ :where(.pm-data-table-bar) {
2926
+ display: flex;
2927
+ flex-wrap: wrap;
2928
+ align-items: center;
2929
+ justify-content: space-between;
2930
+ gap: var(--pm-space-2) var(--pm-space-3);
2931
+ padding: var(--pm-space-2) var(--pm-space-3);
2932
+ border-block-start: 1px solid var(--pm-color-border);
2933
+ color: var(--pm-color-fg-muted);
2934
+ font-size: var(--pm-font-size-sm);
2935
+ &:first-child { border-block-start: 0; border-block-end: 1px solid var(--pm-color-border); }
2936
+ }
2937
+ :where(.pm-dt-bar-start, .pm-dt-bar-end) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-2); }
2938
+ :where(.pm-dt-bar-start) { flex: 1 1 14rem; }
2939
+ :where(.pm-dt-search) {
2940
+ position: relative;
2941
+ display: flex;
2942
+ align-items: center;
2943
+ flex: 1 1 12rem;
2944
+ max-inline-size: 20rem;
2945
+ & > :where(svg) { position: absolute; inset-inline-start: var(--pm-space-2); color: var(--pm-color-fg-muted); pointer-events: none; }
2946
+ & > :where(.pm-dt-input) { padding-inline-start: 1.85rem; block-size: max(2rem, var(--pm-touch-min-sm, 0px)); }
2947
+ }
2948
+ :where(.pm-dt-pagesize) { inline-size: auto; }
2949
+ :where(.pm-dt-btn) {
2950
+ display: inline-flex;
2951
+ align-items: center;
2952
+ gap: var(--pm-space-1-5, 0.375rem);
2953
+ min-block-size: max(2rem, var(--pm-touch-min-sm, 0px));
2954
+ padding: 0 var(--pm-space-2-5, 0.625rem);
2955
+ border: 1px solid var(--pm-color-border-strong);
2956
+ border-radius: var(--pm-radius-md);
2957
+ background: var(--pm-color-bg-surface);
2958
+ color: var(--pm-color-fg);
2959
+ font: inherit;
2960
+ font-size: var(--pm-font-size-sm);
2961
+ cursor: pointer;
2962
+ &:hover { background: var(--pm-color-bg-hover); }
2963
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
2964
+ &[data-variant="link"] { min-block-size: 0; padding: 0 var(--pm-space-1); border: 0; background: none; color: var(--pm-color-accent-text); text-decoration: underline; text-underline-offset: 2px; }
2965
+ }
2966
+ :where(.pm-dt-alert) {
2967
+ display: flex; align-items: center; justify-content: space-between; gap: var(--pm-space-3);
2968
+ margin-block-end: var(--pm-space-2); padding: var(--pm-space-2) var(--pm-space-3);
2969
+ border: 1px solid var(--pm-color-danger-border, var(--pm-color-border)); border-radius: var(--pm-radius-md);
2970
+ background: var(--pm-color-danger-soft); color: var(--pm-color-danger-text); font-size: var(--pm-font-size-sm);
2971
+ }
2972
+ :where(.pm-dt-progress) {
2973
+ position: absolute;
2974
+ z-index: 5;
2975
+ inset-inline: 0;
2976
+ block-size: 2px;
2977
+ overflow: hidden;
2978
+ background: var(--pm-color-accent-soft);
2979
+ &::after {
2980
+ content: "";
2981
+ position: absolute;
2982
+ inset-block: 0;
2983
+ inline-size: 35%;
2984
+ background: var(--pm-color-accent-solid);
2985
+ animation: pm-dt-progress 1.1s ease-in-out infinite;
2986
+ @media (prefers-reduced-motion: reduce) { animation-duration: 3s; }
2987
+ }
2988
+ }
2989
+ @keyframes pm-dt-progress { from { translate: -100% 0; } to { translate: 300% 0; } }
2990
+
2991
+ /* Popovers: column actions and column picker */
2992
+ :where(.pm-dt-pop) {
2993
+ position: fixed;
2994
+ inset: auto;
2995
+ margin: 0;
2996
+ min-inline-size: 12rem;
2997
+ max-block-size: min(24rem, 80dvh);
2998
+ overflow: auto;
2999
+ padding: var(--pm-space-1);
3000
+ border: 1px solid var(--pm-color-border);
3001
+ border-radius: var(--pm-radius-lg);
3002
+ background: var(--pm-color-bg-surface);
3003
+ color: var(--pm-color-fg);
3004
+ box-shadow: var(--pm-elevation-3, 0 8px 24px rgb(0 0 0 / 0.16));
3005
+ font-size: var(--pm-font-size-sm);
3006
+ & :where(hr) { margin: var(--pm-space-1) 0; border: 0; border-block-start: 1px solid var(--pm-color-border); }
3007
+ & > :where(.pm-dt-btn) { inline-size: 100%; justify-content: center; margin-block-start: var(--pm-space-1); }
3008
+ }
3009
+ :where(.pm-dt-menuitem) {
3010
+ display: flex;
3011
+ align-items: center;
3012
+ inline-size: 100%;
3013
+ min-block-size: max(2rem, var(--pm-touch-min-sm, 0px));
3014
+ padding: 0 var(--pm-space-2-5, 0.625rem);
3015
+ border: 0;
3016
+ border-radius: var(--pm-radius-sm);
3017
+ background: none;
3018
+ color: inherit;
3019
+ font: inherit;
3020
+ text-align: start;
3021
+ cursor: pointer;
3022
+ &:hover:not(:disabled), &:focus-visible { background: var(--pm-color-bg-hover); outline: none; }
3023
+ &:disabled { opacity: 0.45; cursor: default; }
3024
+ &[aria-current="true"] { color: var(--pm-color-accent-text); font-weight: var(--pm-font-weight-semibold); }
3025
+ }
3026
+ :where(.pm-dt-picker) { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; }
3027
+ :where(.pm-dt-check) {
3028
+ display: flex;
3029
+ align-items: center;
3030
+ gap: var(--pm-space-2);
3031
+ min-block-size: max(2rem, var(--pm-touch-min-sm, 0px));
3032
+ padding: 0 var(--pm-space-2);
3033
+ border-radius: var(--pm-radius-sm);
3034
+ cursor: pointer;
3035
+ &:hover { background: var(--pm-color-bg-hover); }
3036
+ }
3037
+
3038
+ @media (forced-colors: active) {
3039
+ :where(.pm-data-table) :where([data-pin], tfoot td, tbody.pm-dt-pinned td) { background: Canvas; }
3040
+ :where(.pm-dt-resizer:focus-visible)::after, :where(.pm-dt-progress)::after { background: Highlight; }
3041
+ }
3042
+ }
3043
+
3044
+ /* Narrow containers: cards (see table.css) — tidy the advanced parts */
3045
+ @layer pm.components {
3046
+ @container pm-table (width < 36rem) {
3047
+ :where(.pm-data-table) :where(.pm-table) {
3048
+ & :where(.pm-dt-group-head) { display: none; }
3049
+ & :where([data-pin], tbody.pm-dt-pinned td, tfoot td) { position: static; box-shadow: none; background: none; }
3050
+ & :where(thead th) { box-shadow: none; }
3051
+ & :where(.pm-dt-filters) { padding-block: 0; }
3052
+ & :where(.pm-dt-filters) { display: grid; grid-template-columns: 1fr; }
3053
+ & :where(.pm-dt-filters td:empty) { display: none; }
3054
+ & :where(.pm-dt-resizer, .pm-dt-pinmark) { display: none; }
3055
+ & :where(td[data-merged]) { display: grid; }
3056
+ & :where(tbody td.pm-select-cell) { position: absolute; inset-block-start: var(--pm-space-3); inset-inline-start: auto !important; inset-inline-end: var(--pm-space-3); display: block; inline-size: auto; }
3057
+ & :where(tbody td.pm-dt-expand-cell) { position: absolute; inset-block-start: var(--pm-space-3); inset-inline-start: auto !important; inset-inline-end: calc(var(--pm-space-3) + 2.25rem); display: block; inline-size: auto; }
3058
+ & :where(tbody tr:has(> .pm-select-cell, > .pm-dt-expand-cell)) { padding-inline-end: 5.5rem; }
3059
+ & :where(.pm-dt-group, .pm-dt-detail) { display: block; padding: 0; }
3060
+ & :where(.pm-dt-group > td, .pm-dt-detail > td) { display: block; position: static; padding: var(--pm-space-2) var(--pm-space-3); }
3061
+ & :where(tfoot td:empty) { display: none; }
3062
+ }
3063
+ }
3064
+ }
3065
+
3066
+ /* Colour picker — saturation/brightness area, hue and alpha tracks, swatches */
3067
+ @layer pm.components {
3068
+ :where(.pm-color-panel) { display: grid; gap: var(--pm-space-3); inline-size: min(100%, 16.5rem); }
3069
+ :where(.pm-color-area) {
3070
+ --_hue: 0;
3071
+ position: relative;
3072
+ aspect-ratio: 4 / 3;
3073
+ border-radius: var(--pm-radius-md);
3074
+ background:
3075
+ linear-gradient(to top, #000, transparent),
3076
+ linear-gradient(to right, #fff, hsl(calc(var(--_hue) * 1deg) 100% 50%));
3077
+ box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pm-color-fg) 15%, transparent);
3078
+ touch-action: none;
3079
+ cursor: crosshair;
3080
+ }
3081
+ :where(.pm-color-area-thumb) {
3082
+ position: absolute;
3083
+ inline-size: 1.125rem;
3084
+ block-size: 1.125rem;
3085
+ border: 2px solid #fff;
3086
+ border-radius: 50%;
3087
+ box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45), 0 1px 3px rgb(0 0 0 / 0.4);
3088
+ translate: -50% -50%;
3089
+ outline: none;
3090
+ &:focus-visible { box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45), 0 0 0 4px var(--pm-color-ring); }
3091
+ }
3092
+ :where(.pm-color-sliders) { display: flex; align-items: center; gap: var(--pm-space-2); }
3093
+ :where(.pm-color-tracks) { flex: 1; display: grid; gap: var(--pm-space-2); }
3094
+ :where(.pm-color-hue, .pm-color-alpha) {
3095
+ appearance: none;
3096
+ inline-size: 100%;
3097
+ block-size: 0.875rem;
3098
+ margin: 0;
3099
+ border-radius: 999px;
3100
+ box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pm-color-fg) 15%, transparent);
3101
+ cursor: pointer;
3102
+ &::-webkit-slider-thumb { appearance: none; inline-size: 1.125rem; block-size: 1.125rem; border: 2px solid #fff; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45), 0 1px 3px rgb(0 0 0 / 0.35); }
3103
+ &::-moz-range-thumb { inline-size: 0.875rem; block-size: 0.875rem; border: 2px solid #fff; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45); }
3104
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3105
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
3106
+ }
3107
+ :where(.pm-color-hue) { background: linear-gradient(to right in hsl longer hue, hsl(0 100% 50%), hsl(0 100% 50%)); }
3108
+ @supports not (background: linear-gradient(in hsl longer hue, red, red)) {
3109
+ :where(.pm-color-hue) { background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
3110
+ }
3111
+ :where(.pm-color-alpha) {
3112
+ --_checker: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 8px 8px;
3113
+ background: linear-gradient(to right, transparent, var(--_solid, #000)), var(--_checker);
3114
+ }
3115
+ :where(.pm-color-preview, .pm-color-swatch) {
3116
+ --_c: transparent;
3117
+ flex: none;
3118
+ background: linear-gradient(var(--_c), var(--_c)), repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 8px 8px;
3119
+ box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pm-color-fg) 20%, transparent);
3120
+ }
3121
+ :where(.pm-color-preview) { inline-size: 2.25rem; block-size: 2.25rem; border-radius: var(--pm-radius-md); }
3122
+ :where(.pm-color-swatches) { display: grid; grid-template-columns: repeat(auto-fill, minmax(1.75rem, 1fr)); gap: var(--pm-space-1-5, 0.375rem); }
3123
+ :where(.pm-color-swatch) {
3124
+ display: inline-block;
3125
+ inline-size: 1.75rem;
3126
+ block-size: 1.75rem;
3127
+ padding: 0;
3128
+ border: 0;
3129
+ border-radius: var(--pm-radius-sm);
3130
+ cursor: pointer;
3131
+ &:hover:not(:disabled) { scale: 1.08; }
3132
+ &[aria-pressed="true"] { outline: 2px solid var(--pm-color-fg); outline-offset: 2px; }
3133
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3134
+ &:disabled { cursor: not-allowed; opacity: 0.55; }
3135
+ @media (prefers-reduced-motion: no-preference) { transition: scale var(--pm-duration-fast) var(--pm-ease-standard); }
3136
+ }
3137
+ @media (forced-colors: active) {
3138
+ :where(.pm-color-swatch, .pm-color-preview, .pm-color-area) { forced-color-adjust: none; border: 1px solid CanvasText; }
3139
+ }
3140
+ }
3141
+
3142
+ /* Time picker — hour / minute / period columns */
3143
+ @layer pm.components {
3144
+ :where(.pm-time-cols) { display: flex; gap: var(--pm-space-1); }
3145
+ :where(.pm-time-col) {
3146
+ display: grid;
3147
+ align-content: start;
3148
+ gap: 2px;
3149
+ inline-size: 3.5rem;
3150
+ max-block-size: 14rem;
3151
+ overflow-y: auto;
3152
+ overscroll-behavior: contain;
3153
+ scrollbar-width: thin;
3154
+ padding: 2px;
3155
+ &:not(:last-child) { border-inline-end: 1px solid var(--pm-color-border); padding-inline-end: var(--pm-space-1); }
3156
+ & :where([role="option"]) { justify-content: center; min-block-size: 2rem; font-variant-numeric: tabular-nums; }
3157
+ & :where([role="option"]):hover:not([aria-selected="true"], [aria-disabled="true"]) { background: var(--pm-color-bg-hover); }
3158
+ & :where([role="option"][aria-selected="true"]) { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); font-weight: var(--pm-font-weight-semibold); }
3159
+ & :where([role="option"]):focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
3160
+ }
3161
+ @media (forced-colors: active) { :where(.pm-time-col [aria-selected="true"]) { outline: 2px solid Highlight; outline-offset: -2px; } }
3162
+ }
3163
+
3164
+ /* Toggle & toggle group — <div class="pm-toggle-group" role="group"><button class="pm-toggle" aria-pressed="true">…</button>…</div> */
3165
+ @layer pm.components {
3166
+ /* Wraps onto more lines rather than overflowing narrow screens. */
3167
+ :where(.pm-toggle-group) { display: inline-flex; flex-wrap: wrap; gap: 2px; max-inline-size: 100%; }
3168
+ :where(.pm-toggle-group[data-orientation="vertical"]) { flex-direction: column; }
3169
+ :where(.pm-toggle) {
3170
+ --_h: var(--pm-control-height-md);
3171
+ display: inline-flex;
3172
+ align-items: center;
3173
+ justify-content: center;
3174
+ gap: 0.4em;
3175
+ min-inline-size: var(--_h);
3176
+ min-block-size: var(--_h);
3177
+ padding-inline: var(--pm-space-2-5, 0.625rem);
3178
+ border: 1px solid var(--pm-color-border-strong);
3179
+ border-radius: var(--pm-radius-control, var(--pm-radius-md));
3180
+ background: var(--pm-sf-control-bg, var(--pm-color-bg-surface));
3181
+ color: var(--pm-color-fg-muted);
3182
+ font: inherit;
3183
+ font-size: var(--pm-font-size-sm);
3184
+ font-weight: var(--pm-font-weight-medium);
3185
+ white-space: nowrap;
3186
+ cursor: pointer;
3187
+ user-select: none;
3188
+ &[data-size="sm"] { --_h: var(--pm-control-height-sm); padding-inline: var(--pm-space-2); }
3189
+ &[data-size="lg"] { --_h: var(--pm-control-height-lg); padding-inline: var(--pm-space-3); font-size: var(--pm-font-size-md); }
3190
+ &[data-variant="ghost"] { border-color: transparent; background: transparent; }
3191
+ &[data-variant="soft"] { border-color: transparent; background: var(--pm-color-bg-muted); }
3192
+ &:hover:not([data-pressed], [aria-pressed="true"], [data-disabled], :disabled) { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
3193
+ &:is([data-pressed], [aria-pressed="true"]) {
3194
+ border-color: var(--pm-tone-border-strong, var(--pm-tone-border));
3195
+ background: var(--pm-tone-soft);
3196
+ color: var(--pm-tone-text);
3197
+ }
3198
+ &:is([data-disabled], :disabled) { opacity: 0.5; cursor: not-allowed; }
3199
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3200
+ @media (prefers-reduced-motion: no-preference) {
3201
+ transition: background-color var(--pm-duration-fast) var(--pm-ease-standard), color var(--pm-duration-fast) var(--pm-ease-standard);
3202
+ }
3203
+ }
3204
+ @media (forced-colors: active) { :where(.pm-toggle:is([data-pressed], [aria-pressed="true"])) { outline: 2px solid Highlight; outline-offset: -3px; } }
3205
+ }
3206
+
3207
+ /* Splitter — two panes and a draggable separator */
3208
+ @layer pm.components {
3209
+ :where(.pm-splitter) {
3210
+ --_pos: 50%;
3211
+ --_bar: 0.75rem;
3212
+ display: grid;
3213
+ grid-template-columns: minmax(0, var(--_pos)) var(--_bar) minmax(0, 1fr);
3214
+ min-block-size: 0;
3215
+ border: 1px solid var(--pm-color-border);
3216
+ border-radius: var(--pm-radius-lg);
3217
+ background: var(--pm-sf-bg, var(--pm-color-bg-surface));
3218
+ overflow: hidden;
3219
+ }
3220
+ :where(.pm-splitter[data-orientation="vertical"]) { grid-template-columns: none; grid-template-rows: minmax(0, var(--_pos)) var(--_bar) minmax(0, 1fr); }
3221
+ :where(.pm-splitter-pane) { min-inline-size: 0; min-block-size: 0; overflow: auto; }
3222
+ :where(.pm-splitter-bar) {
3223
+ position: relative;
3224
+ display: grid;
3225
+ place-items: center;
3226
+ cursor: col-resize;
3227
+ touch-action: none;
3228
+ outline: none;
3229
+ &::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 50%; inline-size: 1px; background: var(--pm-color-border); }
3230
+ &::after { content: ""; position: relative; inline-size: 4px; block-size: 2rem; border-radius: 2px; background: var(--pm-color-border-strong); }
3231
+ &:hover::before, &:focus-visible::before { inline-size: 2px; translate: -0.5px; background: var(--pm-color-accent-solid); }
3232
+ &:focus-visible::after { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3233
+ &[aria-disabled="true"] { cursor: default; }
3234
+ }
3235
+ :where(.pm-splitter[data-orientation="vertical"] > .pm-splitter-bar) {
3236
+ cursor: row-resize;
3237
+ &::before { inset-inline: 0; inset-block-start: 50%; inset-block-end: auto; inline-size: auto; block-size: 1px; }
3238
+ &::after { inline-size: 2rem; block-size: 4px; }
3239
+ &:hover::before, &:focus-visible::before { inline-size: auto; block-size: 2px; translate: 0 -0.5px; }
3240
+ }
3241
+ :where(.pm-splitter[data-dragging]) { user-select: none; }
3242
+ @media (forced-colors: active) { :where(.pm-splitter-bar)::after { background: ButtonText; } }
3243
+ }
3244
+
3245
+ /* Toolbar — <div class="pm-toolbar" role="toolbar">…</div> */
3246
+ @layer pm.components {
3247
+ :where(.pm-toolbar) {
3248
+ display: flex;
3249
+ flex-wrap: wrap;
3250
+ align-items: center;
3251
+ gap: var(--pm-space-1);
3252
+ padding: var(--pm-space-1);
3253
+ border: 1px solid var(--pm-color-border);
3254
+ border-radius: calc(var(--pm-radius-control, var(--pm-radius-md)) + 4px);
3255
+ background: var(--pm-sf-bg, var(--pm-color-bg-surface));
3256
+ box-shadow: var(--pm-sf-shadow, none);
3257
+ }
3258
+ :where(.pm-toolbar[orientation="vertical"]) { flex-direction: column; align-items: stretch; inline-size: fit-content; }
3259
+ :where(.pm-toolbar[data-plain]) { padding: 0; border: 0; background: none; box-shadow: none; }
3260
+ :where(.pm-toolbar > .pm-toolbar-spacer) { flex: 1; }
3261
+ }
3262
+
3263
+ /* List — rows with leading media, text and trailing meta/actions */
3264
+ @layer pm.components {
3265
+ :where(.pm-list) { display: grid; }
3266
+ :where(.pm-list[data-bordered]) { border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-lg); background: var(--pm-sf-bg, var(--pm-color-bg-surface)); overflow: hidden; padding: var(--pm-space-1); }
3267
+ :where(.pm-list-item) {
3268
+ display: flex;
3269
+ align-items: center;
3270
+ gap: var(--pm-space-3);
3271
+ padding-inline-end: var(--pm-space-3);
3272
+ border-radius: var(--pm-radius-md);
3273
+ color: var(--pm-color-fg);
3274
+ &[data-divided] { border-radius: 0; }
3275
+ &[data-interactive]:hover:not([data-disabled]) { background: var(--pm-color-bg-hover); }
3276
+ &[data-selected] { background: var(--pm-color-accent-soft); }
3277
+ &[data-selected] :where(.pm-list-heading) { color: var(--pm-color-accent-text); }
3278
+ &[data-disabled] { opacity: 0.55; }
3279
+ }
3280
+ :where(.pm-list-main) {
3281
+ flex: 1;
3282
+ min-inline-size: 0;
3283
+ display: flex;
3284
+ align-items: center;
3285
+ gap: var(--pm-space-3);
3286
+ padding: calc(var(--pm-space-2-5, 0.625rem) * var(--pm-density, 1)) var(--pm-space-3);
3287
+ padding-inline-end: 0;
3288
+ border: 0;
3289
+ border-radius: inherit;
3290
+ background: none;
3291
+ color: inherit;
3292
+ font: inherit;
3293
+ text-align: start;
3294
+ text-decoration: none;
3295
+ &:is(a, button) { cursor: pointer; }
3296
+ &:is(a, button):focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
3297
+ &:disabled { cursor: not-allowed; }
3298
+ }
3299
+ :where(.pm-list-start, .pm-list-end) { display: flex; align-items: center; gap: var(--pm-space-2); flex: none; color: var(--pm-color-fg-muted); }
3300
+ :where(.pm-list-start[hidden]) { display: none; }
3301
+ :where(.pm-list-end) { font-size: var(--pm-font-size-sm); }
3302
+ :where(.pm-list-body) { display: grid; gap: 2px; min-inline-size: 0; flex: 1; }
3303
+ :where(.pm-list-heading) { font-weight: var(--pm-font-weight-medium); overflow-wrap: anywhere; }
3304
+ :where(.pm-list-desc) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3305
+ /* Swipe actions: the row slides over action buttons on touch screens. */
3306
+ :where(.pm-list[data-bordered]) { --pm-list-bg: var(--pm-sf-bg, var(--pm-color-bg-surface)); }
3307
+ :where(.pm-list-swipe) {
3308
+ position: relative;
3309
+ display: grid;
3310
+ overflow: hidden;
3311
+ border-radius: var(--pm-radius-md);
3312
+ touch-action: pan-y;
3313
+ &[data-divided] { border-radius: 0; }
3314
+ & > :where(.pm-list-item) {
3315
+ position: relative;
3316
+ z-index: 1;
3317
+ background: var(--pm-list-bg, var(--pm-color-bg-canvas));
3318
+ translate: var(--_x, 0px) 0;
3319
+ transition: translate var(--pm-duration-normal, 200ms) var(--pm-ease-out, ease-out);
3320
+ }
3321
+ &[data-dragging] > :where(.pm-list-item) { transition: none; }
3322
+ &:dir(rtl) > :where(.pm-list-item) { translate: calc(var(--_x, 0px) * -1) 0; }
3323
+ @media (prefers-reduced-motion: reduce) { & > :where(.pm-list-item) { transition: none; } }
3324
+ }
3325
+ :where(.pm-list-actions) {
3326
+ position: absolute;
3327
+ inset-block: 0;
3328
+ display: flex;
3329
+ align-items: center;
3330
+ gap: var(--pm-space-1);
3331
+ padding-inline: var(--pm-space-2);
3332
+ &[data-side="start"] { inset-inline-start: 0; }
3333
+ &[data-side="end"] { inset-inline-end: 0; }
3334
+ }
3335
+ @media (forced-colors: active) { :where(.pm-list-item[data-selected]) { outline: 2px solid Highlight; outline-offset: -2px; } }
3336
+ }
3337
+
3338
+ /* Sidebar navigation — groups, items, collapsible parents, icon rail */
3339
+ @layer pm.components {
3340
+ :where(.pm-nav) { display: grid; gap: var(--pm-space-3); font-size: var(--pm-font-size-sm); }
3341
+ :where(.pm-nav-group) { display: grid; gap: 2px; }
3342
+ :where(.pm-nav-heading) {
3343
+ padding: var(--pm-space-1) var(--pm-space-3);
3344
+ color: var(--pm-color-fg-muted);
3345
+ font-size: var(--pm-font-size-xs);
3346
+ font-weight: var(--pm-font-weight-semibold);
3347
+ letter-spacing: 0.06em;
3348
+ text-transform: uppercase;
3349
+ &[data-collapsed] { block-size: 1px; padding: 0; margin-block: var(--pm-space-2); overflow: hidden; color: transparent; background: var(--pm-color-border); }
3350
+ }
3351
+ :where(.pm-nav-item) { display: grid; }
3352
+ :where(.pm-nav-link) {
3353
+ --_depth: 0;
3354
+ display: flex;
3355
+ align-items: center;
3356
+ gap: var(--pm-space-2-5, 0.625rem);
3357
+ inline-size: 100%;
3358
+ min-block-size: 2.25rem;
3359
+ padding-block: var(--pm-space-1);
3360
+ padding-inline: calc(var(--pm-space-3) + var(--_depth) * 1.75rem) var(--pm-space-2-5, 0.625rem);
3361
+ border: 0;
3362
+ border-radius: var(--pm-radius-md);
3363
+ background: none;
3364
+ color: var(--pm-color-fg-muted);
3365
+ font: inherit;
3366
+ font-weight: var(--pm-font-weight-medium);
3367
+ text-align: start;
3368
+ text-decoration: none;
3369
+ cursor: pointer;
3370
+ position: relative;
3371
+ &:hover:not([aria-disabled="true"], :disabled) { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
3372
+ &[aria-current="page"] { background: var(--pm-color-accent-soft); color: var(--pm-color-accent-text); font-weight: var(--pm-font-weight-semibold); }
3373
+ &[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: 0; inset-block: 0.5rem; inline-size: 3px; border-radius: 2px; background: var(--pm-color-accent-solid); }
3374
+ &[data-has-current] { color: var(--pm-color-fg); }
3375
+ &:is([aria-disabled="true"], :disabled) { opacity: 0.5; cursor: not-allowed; }
3376
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
3377
+ }
3378
+ :where(.pm-nav-icon) { display: inline-grid; place-items: center; flex: none; font-size: 1.1em; }
3379
+ :where(.pm-nav-icon[hidden]) { display: none; }
3380
+ :where(.pm-nav-label) { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3381
+ :where(.pm-nav-end) { display: inline-flex; align-items: center; flex: none; }
3382
+ /* Count on a nav item (pm-nav-item count="3"): a pill at the end; on the phone tab bar it sits on the icon. */
3383
+ :where(.pm-nav-count) {
3384
+ display: inline-grid;
3385
+ place-items: center;
3386
+ min-inline-size: 1.25rem;
3387
+ block-size: 1.25rem;
3388
+ padding-inline: 0.35em;
3389
+ border-radius: var(--pm-radius-full);
3390
+ background: var(--pm-tone-solid, var(--pm-color-accent-solid));
3391
+ color: var(--pm-tone-on-solid, var(--pm-color-accent-on-solid));
3392
+ font-size: var(--pm-font-size-xs);
3393
+ font-weight: var(--pm-font-weight-semibold);
3394
+ font-variant-numeric: tabular-nums;
3395
+ line-height: 1;
3396
+ &[data-dot] { min-inline-size: 0.5rem; block-size: 0.5rem; padding: 0; }
3397
+ }
3398
+ /* Collapsed rail: the count becomes a dot on the icon. */
3399
+ :where(.pm-nav-item[data-collapsed]) :where(.pm-nav-icon) { position: relative; }
3400
+ :where(.pm-nav-item[data-collapsed]) :where(.pm-nav-count) {
3401
+ position: absolute; inset-block-start: -0.2rem; inset-inline-end: -0.3rem; min-inline-size: 0.5rem; block-size: 0.5rem; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--pm-color-bg-canvas);
3402
+ }
3403
+ :where(.pm-nav-chevron) { flex: none; transition: rotate var(--pm-duration-fast) var(--pm-ease-standard); }
3404
+ :where(.pm-nav-link[aria-expanded="true"]) :where(.pm-nav-chevron) { rotate: 90deg; }
3405
+ @media (prefers-reduced-motion: reduce) { :where(.pm-nav-chevron) { transition: none; } }
3406
+ :where(.pm-nav-children) { display: grid; gap: 2px; margin-block-start: 2px; }
3407
+ :where(.pm-nav-children[hidden]) { display: none; }
3408
+ /* Icon rail */
3409
+ :where(.pm-nav-item[data-collapsed]) :where(.pm-nav-link) { justify-content: center; padding-inline: 0; inline-size: 2.5rem; min-block-size: 2.5rem; }
3410
+ :where(.pm-nav-item[data-collapsed]) :where(.pm-nav-label, .pm-nav-end, .pm-nav-chevron) { display: none; }
3411
+ :where([dir="rtl"]) :where(.pm-nav-chevron) { scale: -1 1; }
3412
+ @media (forced-colors: active) { :where(.pm-nav-link[aria-current="page"])::before { background: Highlight; } }
3413
+ }
3414
+ /* Bottom tab bar (pm-nav mobile="bar" on phones) */
3415
+ @layer pm.components {
3416
+ :where(.pm-nav[data-bar]) {
3417
+ display: flex;
3418
+ align-items: stretch;
3419
+ gap: 0;
3420
+ padding: var(--pm-space-1) var(--pm-space-1) max(var(--pm-space-1), var(--pm-safe-bottom, 0px));
3421
+ border-block-start: 1px solid var(--pm-color-border);
3422
+ background: color-mix(in oklab, var(--pm-color-bg-surface) 88%, transparent);
3423
+ backdrop-filter: blur(var(--pm-blur-md, 12px)) saturate(1.4);
3424
+ }
3425
+ @supports not (backdrop-filter: blur(1px)) { :where(.pm-nav[data-bar]) { background: var(--pm-color-bg-surface); } }
3426
+ :where(.pm-nav-link[data-bar]) {
3427
+ flex-direction: column;
3428
+ justify-content: center;
3429
+ gap: 2px;
3430
+ min-block-size: 3.25rem;
3431
+ padding: var(--pm-space-1);
3432
+ font-size: 0.6875rem;
3433
+ font-weight: var(--pm-font-weight-medium);
3434
+ text-align: center;
3435
+ &::before { display: none; }
3436
+ &[aria-current] { background: none; color: var(--pm-color-accent-text); }
3437
+ & :where(.pm-nav-icon) {
3438
+ position: relative;
3439
+ inline-size: 3.5rem;
3440
+ block-size: 1.75rem;
3441
+ border-radius: 999px;
3442
+ font-size: 1.35rem;
3443
+ @media (prefers-reduced-motion: no-preference) { transition: background-color var(--pm-duration-fast) var(--pm-ease-standard); }
3444
+ }
3445
+ &[aria-current] :where(.pm-nav-icon) { background: var(--pm-color-accent-soft); }
3446
+ & :where(.pm-nav-label) { inline-size: 100%; }
3447
+ & :where(.pm-nav-end) { position: absolute; inset-block-start: 0.125rem; inset-inline-start: calc(50% + 0.5rem); font-size: 0.625rem; }
3448
+ & :where(.pm-nav-chevron) { display: none; }
3449
+ }
3450
+ }
3451
+
3452
+ /* Range slider — two native range inputs over one track */
3453
+ @layer pm.components {
3454
+ :where(.pm-range-head) { display: flex; justify-content: space-between; align-items: baseline; gap: var(--pm-space-2); }
3455
+ :where(.pm-range-label) { font-size: var(--pm-font-size-sm); font-weight: var(--pm-font-weight-medium); }
3456
+ :where(.pm-range-value) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); font-variant-numeric: tabular-nums; }
3457
+ :where(.pm-range) {
3458
+ --_track: 6px;
3459
+ --_thumb: 1.25rem;
3460
+ position: relative;
3461
+ display: grid;
3462
+ align-items: center;
3463
+ --_box: 1.5rem;
3464
+ block-size: var(--_box);
3465
+ &[data-disabled] { opacity: 0.55; }
3466
+ &[data-size="sm"] { --_track: 4px; --_thumb: 1rem; --_box: 1.5rem; /* 24px: the WCAG 2.5.8 minimum target, even at the small size */ }
3467
+ &[data-size="lg"] { --_track: 8px; --_thumb: 1.5rem; --_box: 1.75rem; }
3468
+ }
3469
+ :where(.pm-range-track) {
3470
+ position: absolute;
3471
+ inset-inline: calc(var(--_thumb) / 2);
3472
+ block-size: var(--_track);
3473
+ border-radius: 999px;
3474
+ background: var(--pm-color-bg-active);
3475
+ box-shadow: var(--pm-sf-control-shadow, none);
3476
+ }
3477
+ :where(.pm-range-fill) {
3478
+ position: absolute;
3479
+ inset-block: 0;
3480
+ inset-inline-start: var(--_lo);
3481
+ inline-size: calc(var(--_hi) - var(--_lo));
3482
+ border-radius: inherit;
3483
+ background: var(--pm-tone-solid);
3484
+ }
3485
+ :where(.pm-range-input) {
3486
+ position: absolute;
3487
+ inset: 0;
3488
+ inline-size: 100%;
3489
+ block-size: 100%;
3490
+ margin: 0;
3491
+ appearance: none;
3492
+ background: none;
3493
+ pointer-events: none;
3494
+ outline: none;
3495
+ &::-webkit-slider-runnable-track { background: none; block-size: 100%; }
3496
+ &::-moz-range-track { background: none; }
3497
+ &::-webkit-slider-thumb {
3498
+ appearance: none;
3499
+ pointer-events: auto;
3500
+ inline-size: var(--_thumb);
3501
+ block-size: var(--_thumb);
3502
+ margin-block-start: calc((var(--_box) - var(--_thumb)) / 2);
3503
+ border: 2px solid var(--pm-tone-solid);
3504
+ border-radius: 50%;
3505
+ background: var(--pm-color-bg-surface);
3506
+ box-shadow: var(--pm-sf-raise, var(--pm-elevation-1));
3507
+ cursor: grab;
3508
+ }
3509
+ &::-moz-range-thumb {
3510
+ pointer-events: auto;
3511
+ inline-size: calc(var(--_thumb) - 4px);
3512
+ block-size: calc(var(--_thumb) - 4px);
3513
+ border: 2px solid var(--pm-tone-solid);
3514
+ border-radius: 50%;
3515
+ background: var(--pm-color-bg-surface);
3516
+ cursor: grab;
3517
+ }
3518
+ &:active::-webkit-slider-thumb { cursor: grabbing; }
3519
+ &:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3520
+ &:focus-visible::-moz-range-thumb { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3521
+ &:disabled::-webkit-slider-thumb { cursor: not-allowed; }
3522
+ }
3523
+ @media (forced-colors: active) { :where(.pm-range-fill) { background: Highlight; } }
3524
+ }
3525
+
3526
+ /* Sortable — reorderable rows */
3527
+ @layer pm.components {
3528
+ :where(.pm-sortable) { display: grid; gap: var(--pm-space-2); }
3529
+ :where(.pm-sortable-item) {
3530
+ position: relative;
3531
+ display: flex;
3532
+ align-items: center;
3533
+ gap: var(--pm-space-3);
3534
+ padding: var(--pm-space-2-5, 0.625rem) var(--pm-space-3);
3535
+ border: 1px solid var(--pm-color-border);
3536
+ border-radius: var(--pm-radius-md);
3537
+ background: var(--pm-sf-bg, var(--pm-color-bg-surface));
3538
+ box-shadow: var(--pm-sf-shadow, none);
3539
+ cursor: grab;
3540
+ user-select: none;
3541
+ touch-action: none;
3542
+ &:has([data-handle]) { cursor: default; touch-action: auto; }
3543
+ & :where([data-handle]) { cursor: grab; touch-action: none; color: var(--pm-color-fg-muted); }
3544
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3545
+ &:is([data-grabbed], [data-dragging]) { z-index: 1; border-color: var(--pm-color-accent-border-strong, var(--pm-color-ring)); box-shadow: var(--pm-elevation-3); cursor: grabbing; }
3546
+ &[data-grabbed] { background: var(--pm-color-accent-soft); }
3547
+ @media (prefers-reduced-motion: no-preference) {
3548
+ &:is([data-grabbed], [data-dragging]) { scale: 1.015; }
3549
+ transition: scale var(--pm-duration-fast) var(--pm-ease-standard), box-shadow var(--pm-duration-fast) var(--pm-ease-standard);
3550
+ }
3551
+ }
3552
+ @media (forced-colors: active) { :where(.pm-sortable-item[data-grabbed]) { outline: 2px solid Highlight; } }
3553
+ }
3554
+
3555
+ /* Sheet — Bottom sheets (shared by dialogs, drawers, menus and picker popups on phones) */
3556
+ @layer pm.components {
3557
+ :where([data-sheet]) {
3558
+ position: fixed;
3559
+ inset: auto 0 0 0;
3560
+ inline-size: 100%;
3561
+ max-inline-size: none;
3562
+ max-block-size: min(88dvh, 100dvh - var(--pm-safe-top, 0px) - 1rem);
3563
+ margin: 0;
3564
+ padding-block-start: 1.75rem;
3565
+ padding-block-end: max(var(--pm-space-4), var(--pm-safe-bottom, 0px));
3566
+ border-radius: var(--pm-radius-2xl) var(--pm-radius-2xl) 0 0;
3567
+ border-block-end: 0;
3568
+ border-inline: 0;
3569
+ overflow-y: auto;
3570
+ overscroll-behavior: contain;
3571
+ touch-action: pan-y;
3572
+ /* Grab handle */
3573
+ &::before {
3574
+ content: "";
3575
+ position: absolute;
3576
+ inset-block-start: 0.625rem;
3577
+ inset-inline-start: 50%;
3578
+ translate: -50% 0;
3579
+ inline-size: 2.5rem;
3580
+ block-size: 0.3125rem;
3581
+ border-radius: 999px;
3582
+ background: var(--pm-color-border-strong);
3583
+ }
3584
+ @media (prefers-reduced-motion: no-preference) {
3585
+ transition: translate var(--pm-duration-moderate) var(--pm-ease-emphasized, var(--pm-ease-standard)), overlay var(--pm-duration-moderate) allow-discrete, display var(--pm-duration-moderate) allow-discrete;
3586
+ @starting-style { translate: 0 100%; }
3587
+ }
3588
+ }
3589
+ /* Anchored popovers (menus) drop their anchor placement when shown as a sheet. */
3590
+ :where([popover][data-sheet]) { position-area: none; position-try-fallbacks: none; }
3591
+ :where(.pm-menu[data-sheet]) {
3592
+ padding-inline: var(--pm-space-2);
3593
+ & :where([role^="menuitem"], .pm-menu-item) { min-block-size: 3rem; font-size: var(--pm-font-size-md); }
3594
+ }
3595
+ :where([data-sheet][data-dragging]) { transition: none; user-select: none; }
3596
+ :where([data-sheet])::backdrop { background: var(--pm-color-overlay); }
3597
+ @media (forced-colors: active) { :where([data-sheet])::before { background: CanvasText; } }
3598
+ }
3599
+
3600
+ /* Indicator — a count or dot on the corner of an icon, button or avatar.
3601
+ <span class="pm-indicator"><button …>…</button><span class="pm-indicator-badge" aria-hidden="true">3</span></span> */
3602
+ @layer pm.components {
3603
+ :where(.pm-indicator) { position: relative; display: inline-flex; vertical-align: middle; }
3604
+ :where(.pm-indicator-badge) {
3605
+ --_s: 1.15rem;
3606
+ --_x: 35%;
3607
+ --_y: -35%;
3608
+ position: absolute;
3609
+ inset-block-start: 0;
3610
+ inset-inline-end: 0;
3611
+ z-index: 1;
3612
+ display: inline-grid;
3613
+ place-items: center;
3614
+ min-inline-size: var(--_s);
3615
+ block-size: var(--_s);
3616
+ padding-inline: 0.3em;
3617
+ border-radius: var(--pm-radius-full);
3618
+ background: var(--pm-tone-solid);
3619
+ color: var(--pm-tone-on-solid);
3620
+ /* A ring in the page colour separates the badge from what it sits on. */
3621
+ box-shadow: 0 0 0 2px var(--pm-color-bg-canvas);
3622
+ font-size: calc(var(--_s) * 0.62);
3623
+ font-weight: var(--pm-font-weight-semibold);
3624
+ font-variant-numeric: tabular-nums;
3625
+ line-height: 1;
3626
+ white-space: nowrap;
3627
+ pointer-events: none;
3628
+ translate: var(--_x) var(--_y);
3629
+ &:dir(rtl) { --_x: -35%; }
3630
+ &[hidden] { display: none; }
3631
+ &[data-dot] { --_s: 0.6rem; padding: 0; min-inline-size: var(--_s); }
3632
+ &[data-size="sm"] { --_s: 1rem; }
3633
+ &[data-size="lg"] { --_s: 1.35rem; }
3634
+ &[data-dot][data-size="sm"] { --_s: 0.5rem; }
3635
+ &[data-dot][data-size="lg"] { --_s: 0.75rem; }
3636
+ &[data-pulse]::after {
3637
+ content: "";
3638
+ position: absolute;
3639
+ inset: 0;
3640
+ border-radius: inherit;
3641
+ background: var(--pm-tone-solid);
3642
+ animation: pm-indicator-pulse 1.6s var(--pm-ease-out, ease-out) infinite;
3643
+ z-index: -1;
3644
+ }
3645
+ @media (prefers-reduced-motion: reduce) { &[data-pulse]::after { animation: none; } }
3646
+ @media (forced-colors: active) { border: 1px solid CanvasText; }
3647
+ }
3648
+ :where(.pm-indicator[data-placement="top-start"]) > :where(.pm-indicator-badge) { inset-inline: 0 auto; --_x: -35%; &:dir(rtl) { --_x: 35%; } }
3649
+ :where(.pm-indicator[data-placement="bottom-end"]) > :where(.pm-indicator-badge) { inset-block: auto 0; --_y: 35%; }
3650
+ :where(.pm-indicator[data-placement="bottom-start"]) > :where(.pm-indicator-badge) { inset-block: auto 0; inset-inline: 0 auto; --_y: 35%; --_x: -35%; &:dir(rtl) { --_x: 35%; } }
3651
+ @keyframes pm-indicator-pulse { from { opacity: 0.6; scale: 1; } to { opacity: 0; scale: 2.2; } }
3652
+ }
3653
+
3654
+ /* Pull to refresh — the content slides down and a circle with an arrow (then a spinner) appears above it. */
3655
+ @layer pm.components {
3656
+ :where(.pm-pull) { position: relative; }
3657
+ :where(.pm-pull-content) {
3658
+ translate: 0 var(--_pull, 0px);
3659
+ transition: translate var(--pm-duration-normal, 200ms) var(--pm-ease-out, ease-out);
3660
+ }
3661
+ :where(.pm-pull[data-pulling]) > :where(.pm-pull-content) { transition: none; }
3662
+ :where(.pm-pull-indicator) {
3663
+ position: absolute;
3664
+ inset-block-start: calc(var(--_pull, 0px) - 2.75rem);
3665
+ inset-inline-start: 50%;
3666
+ z-index: 1;
3667
+ display: grid;
3668
+ place-items: center;
3669
+ inline-size: 2.25rem;
3670
+ block-size: 2.25rem;
3671
+ margin-inline-start: -1.125rem;
3672
+ border: 1px solid var(--pm-color-border);
3673
+ border-radius: 50%;
3674
+ background: var(--pm-color-bg-surface);
3675
+ color: var(--pm-color-accent-text);
3676
+ box-shadow: var(--pm-shadow-md, 0 2px 8px rgb(0 0 0 / 0.15));
3677
+ opacity: var(--_progress, 0);
3678
+ transition: inset-block-start var(--pm-duration-normal, 200ms) var(--pm-ease-out, ease-out), opacity var(--pm-duration-fast, 120ms);
3679
+ }
3680
+ :where(.pm-pull[data-pulling]) > :where(.pm-pull-indicator) { transition: none; }
3681
+ :where(.pm-pull[data-refreshing]) > :where(.pm-pull-indicator) { opacity: 1; }
3682
+ :where(.pm-pull-arrow) { rotate: calc(var(--_progress, 0) * 180deg); transition: rotate var(--pm-duration-fast, 120ms); }
3683
+ :where(.pm-pull-spin) { animation: pm-pull-spin 0.8s linear infinite; }
3684
+ @keyframes pm-pull-spin { to { rotate: 360deg; } }
3685
+ @media (prefers-reduced-motion: reduce) {
3686
+ :where(.pm-pull-content, .pm-pull-indicator) { transition: none; }
3687
+ :where(.pm-pull-spin) { animation-duration: 2.4s; }
3688
+ }
3689
+ }
3690
+
3691
+ /* Chart and sparkline: dependency-free SVG. Colours come from the theme's roles, so every theme and mode works. */
3692
+ @layer pm.components {
3693
+ :where(.pm-chart) {
3694
+ --pm-chart-grid: var(--pm-color-border);
3695
+ --pm-chart-text: var(--pm-color-fg-muted);
3696
+ position: relative;
3697
+ display: grid;
3698
+ gap: var(--pm-space-3);
3699
+ min-inline-size: 0;
3700
+ color: var(--pm-color-fg);
3701
+ font-size: var(--pm-font-size-sm);
3702
+ & :where(.pm-chart-plot) { position: relative; min-inline-size: 0; border-radius: var(--pm-radius-md); touch-action: pan-y; outline: none; }
3703
+ & :where(.pm-chart-plot:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3704
+ & :where(svg) { display: block; inline-size: 100%; direction: ltr; overflow: visible; }
3705
+ & :where(text) { fill: var(--pm-chart-text); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
3706
+ & :where(.pm-chart-grid) { stroke: var(--pm-chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
3707
+ & :where(.pm-chart-zero) { stroke: var(--pm-color-border-strong); }
3708
+ & :where(.pm-chart-guide) { stroke: var(--pm-color-border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
3709
+ & :where(.pm-chart-line) { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
3710
+ & :where(.pm-chart-area) { opacity: 0.16; stroke: none; }
3711
+ & :where(.pm-chart-dot) { stroke: var(--pm-color-bg-surface); stroke-width: 2; }
3712
+ & :where(.pm-chart-mark) { transition: opacity var(--pm-duration-fast); cursor: pointer; }
3713
+ & :where(.pm-chart-mark[data-dim]) { opacity: 0.45; }
3714
+ & :where(.pm-chart-slice) { stroke: var(--pm-color-bg-surface); stroke-width: 2; }
3715
+ & :where(.pm-chart-total) { fill: var(--pm-color-fg); font-family: var(--pm-font-display); font-size: 1.5rem; font-weight: var(--pm-font-weight-bold); }
3716
+ & :where(.pm-chart-empty) { display: grid; place-items: center; color: var(--pm-color-fg-muted); border: 1px dashed var(--pm-color-border); border-radius: var(--pm-radius-md); }
3717
+ & :where(.pm-chart-loading) { border-radius: var(--pm-radius-md); background: var(--pm-color-bg-muted); @media (prefers-reduced-motion: no-preference) { animation: pm-chart-pulse 1.4s ease-in-out infinite; } }
3718
+ @media (forced-colors: active) {
3719
+ & :where(.pm-chart-grid, .pm-chart-guide) { stroke: CanvasText; }
3720
+ & :where(.pm-chart-slice, .pm-chart-dot) { stroke: Canvas; }
3721
+ }
3722
+ }
3723
+ :where(.pm-chart-legend) {
3724
+ display: flex; flex-wrap: wrap; gap: var(--pm-space-1) var(--pm-space-4); margin: 0; padding: 0; list-style: none;
3725
+ color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs);
3726
+ & :where(li) { display: inline-flex; align-items: center; gap: var(--pm-space-2); }
3727
+ & :where(.pm-chart-swatch) { flex: none; inline-size: 0.65rem; block-size: 0.65rem; border-radius: 2px; background: var(--_c); forced-color-adjust: none; }
3728
+ & :where(strong) { color: var(--pm-color-fg); font-weight: var(--pm-font-weight-semibold); font-variant-numeric: tabular-nums; }
3729
+ }
3730
+ :where(.pm-chart-tip) {
3731
+ position: absolute; z-index: 1; inset-block-start: 0; inset-inline-start: 0; pointer-events: none;
3732
+ display: grid; gap: 2px; min-inline-size: 7rem; max-inline-size: 16rem; padding: var(--pm-space-2) var(--pm-space-3);
3733
+ border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-md);
3734
+ background: var(--pm-color-bg-overlay, var(--pm-color-bg-surface)); color: var(--pm-color-fg);
3735
+ box-shadow: var(--pm-elevation-3); font-size: var(--pm-font-size-xs); white-space: nowrap;
3736
+ & :where(.pm-chart-tip-title) { font-weight: var(--pm-font-weight-semibold); }
3737
+ & :where(.pm-chart-tip-row) { display: flex; align-items: center; gap: var(--pm-space-2); color: var(--pm-color-fg-muted); }
3738
+ & :where(.pm-chart-tip-row strong) { margin-inline-start: auto; padding-inline-start: var(--pm-space-3); color: var(--pm-color-fg); font-variant-numeric: tabular-nums; }
3739
+ }
3740
+ @keyframes pm-chart-pulse { 50% { opacity: 0.5; } }
3741
+
3742
+ /* ---------- Sparkline: <pm-sparkline values="3,5,4,8"> ---------- */
3743
+ :where(.pm-sparkline) {
3744
+ display: block; inline-size: var(--pm-sparkline-width, 6rem); block-size: var(--pm-sparkline-height, 1.75rem); overflow: visible; color: var(--pm-tone-solid);
3745
+ & :where(.pm-sparkline-line) { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
3746
+ & :where(.pm-sparkline-area) { fill: currentColor; opacity: 0.16; }
3747
+ & :where(.pm-sparkline-bar) { fill: currentColor; }
3748
+ @media (forced-colors: active) { color: CanvasText; }
3749
+ }
3750
+ }
3751
+
3752
+ /* Banner: a page-wide announcement bar — <div class="pm-banner" data-tone="info">…</div> */
3753
+ @layer pm.components {
3754
+ :where(.pm-banner) {
3755
+ display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--pm-space-2) var(--pm-space-3);
3756
+ min-block-size: 2.75rem; padding: var(--pm-space-2) var(--pm-space-4);
3757
+ border-block-end: 1px solid var(--pm-tone-border);
3758
+ background: var(--pm-tone-soft); color: var(--pm-color-fg);
3759
+ font-size: var(--pm-font-size-sm); text-align: center;
3760
+ & :where(.pm-banner-icon) { display: inline-grid; place-items: center; color: var(--pm-tone-text); }
3761
+ & :where(.pm-banner-icon:empty) { display: none; }
3762
+ & :where(.pm-banner-body) { min-inline-size: 0; text-wrap: balance; }
3763
+ & :where(.pm-banner-body a) { color: var(--pm-tone-text-strong); font-weight: var(--pm-font-weight-semibold); text-underline-offset: 0.2em; }
3764
+ & :where(.pm-banner-actions) { display: inline-flex; align-items: center; gap: var(--pm-space-2); }
3765
+ & :where(.pm-banner-close) { margin-inline-start: auto; }
3766
+ }
3767
+ :where(.pm-banner[data-variant="solid"]) {
3768
+ background: var(--pm-tone-solid); border-color: transparent; color: var(--pm-tone-on-solid);
3769
+ & :where(.pm-banner-icon, .pm-banner-body a, .pm-banner-close) { color: inherit; }
3770
+ }
3771
+ /* Phones: text starts at the edge so two lines read naturally, close stays reachable. */
3772
+ @media (width < 40rem) { :where(.pm-banner) { justify-content: flex-start; text-align: start; } }
3773
+ }
3774
+
3775
+ /* Description list: label/value pairs — <dl class="pm-dl"><div><dt>Plan</dt><dd>Pro</dd></div></dl> */
3776
+ @layer pm.components {
3777
+ :where(.pm-dl) {
3778
+ --pm-dl-label: 11rem;
3779
+ display: grid; grid-template-columns: repeat(var(--pm-dl-columns, 1), minmax(0, 1fr)); gap: 0 var(--pm-space-8);
3780
+ margin: 0; min-inline-size: 0; font-size: var(--pm-font-size-sm); container-type: inline-size;
3781
+ }
3782
+ :where(.pm-dl > div, .pm-dl-item) {
3783
+ display: grid; grid-template-columns: min(var(--pm-dl-label), 42%) minmax(0, 1fr); gap: var(--pm-space-1) var(--pm-space-4); align-items: baseline;
3784
+ padding-block: calc(var(--pm-space-3) * var(--pm-density, 1)); min-inline-size: 0;
3785
+ }
3786
+ :where(.pm-dl dt, .pm-dl-label) { color: var(--pm-color-fg-muted); }
3787
+ :where(.pm-dl dd, .pm-dl-value) { margin: 0; min-inline-size: 0; color: var(--pm-color-fg); overflow-wrap: break-word; }
3788
+ :where(.pm-dl[data-divided] > div + div, .pm-dl-item[data-divided]) { border-block-start: 1px solid var(--pm-color-border); }
3789
+ :where(.pm-dl[data-layout="vertical"] > div, .pm-dl-item[data-layout="vertical"]) { grid-template-columns: minmax(0, 1fr); }
3790
+ :where(.pm-dl[data-layout="vertical"] dt, .pm-dl-item[data-layout="vertical"] .pm-dl-label) { font-size: var(--pm-font-size-xs); }
3791
+ /* Narrow containers (a small card, a phone): labels stack above values. */
3792
+ @container (width < 15rem) {
3793
+ :where(.pm-dl > div, .pm-dl-item) { grid-template-columns: minmax(0, 1fr); }
3794
+ }
3795
+ }
3796
+
3797
+ /* Image: fixed ratio, loading placeholder, fallback and optional zoom. `.pm-aspect` sets a ratio on any box. */
3798
+ @layer pm.components {
3799
+ :where(.pm-aspect) { aspect-ratio: var(--pm-ratio, 16 / 9); overflow: hidden; }
3800
+ :where(.pm-aspect > :is(img, video, iframe, picture)) { inline-size: 100%; block-size: 100%; object-fit: cover; }
3801
+ :where(.pm-image) {
3802
+ position: relative; display: block; overflow: hidden; inline-size: 100%;
3803
+ aspect-ratio: var(--pm-ratio, auto);
3804
+ border-radius: var(--pm-radius-md); background: var(--pm-color-bg-muted); color: var(--pm-color-fg-muted);
3805
+ & :where(img) { display: block; inline-size: 100%; block-size: 100%; object-fit: var(--pm-image-fit, cover); transition: opacity var(--pm-duration-normal, 0.2s); }
3806
+ &:where([data-state="loading"]) :where(img) { opacity: 0; }
3807
+ &:where([data-state="loading"]) { @media (prefers-reduced-motion: no-preference) { animation: pm-image-pulse 1.4s ease-in-out infinite; } }
3808
+ & :where(.pm-image-fallback) { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: var(--pm-space-1); padding: var(--pm-space-3); text-align: center; font-size: var(--pm-font-size-xs); }
3809
+ & :where(.pm-image-zoom) { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: inherit; }
3810
+ & :where(.pm-image-zoom:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
3811
+ }
3812
+ :where(.pm-lightbox) {
3813
+ inline-size: 100vw; block-size: 100dvh; max-inline-size: none; max-block-size: none; margin: 0; padding: var(--pm-space-4); border: 0;
3814
+ background: transparent; cursor: zoom-out;
3815
+ &:where([open]) { display: grid; place-items: center; }
3816
+ &::backdrop { background: rgb(0 0 0 / 0.85); }
3817
+ & :where(img) { max-inline-size: 100%; max-block-size: calc(100dvh - var(--pm-space-8)); object-fit: contain; border-radius: var(--pm-radius-md); }
3818
+ & :where(.pm-lightbox-close) { position: fixed; inset-block-start: var(--pm-space-3); inset-inline-end: var(--pm-space-3); color: #fff; }
3819
+ }
3820
+ @keyframes pm-image-pulse { 50% { opacity: 0.55; } }
3821
+ }
3822
+
3823
+ /* Meter: a measurement within a known range (disk use, password strength, score). Not for task progress. */
3824
+ @layer pm.components {
3825
+ :where(.pm-meter) {
3826
+ --_h: 0.5rem;
3827
+ display: grid; gap: var(--pm-space-2); min-inline-size: 0; font-size: var(--pm-font-size-sm);
3828
+ &:where([data-size="sm"]) { --_h: 0.25rem; }
3829
+ &:where([data-size="lg"]) { --_h: 0.75rem; }
3830
+ & :where(.pm-meter-head) { display: flex; justify-content: space-between; gap: var(--pm-space-3); color: var(--pm-color-fg); }
3831
+ & :where(.pm-meter-value) { color: var(--pm-color-fg-muted); font-variant-numeric: tabular-nums; }
3832
+ & :where(.pm-meter-track) { position: relative; block-size: var(--_h); border-radius: 999px; background: var(--pm-color-bg-muted); overflow: hidden; }
3833
+ & :where(.pm-meter-fill) {
3834
+ block-size: 100%; inline-size: var(--_pct, 0%); border-radius: inherit; background: var(--_fill, var(--pm-tone-solid));
3835
+ transition: inline-size var(--pm-duration-normal, 0.2s) var(--pm-ease-standard, ease);
3836
+ @media (prefers-reduced-motion: reduce) { transition: none; }
3837
+ }
3838
+ &:where([data-level="good"]) { --_fill: var(--pm-color-success-solid); }
3839
+ &:where([data-level="ok"]) { --_fill: var(--pm-color-warning-solid); }
3840
+ &:where([data-level="bad"]) { --_fill: var(--pm-color-danger-solid); }
3841
+ /* Segments: equal steps with gaps (password strength, ratings out of n). */
3842
+ &:where([data-segments]) :where(.pm-meter-track) {
3843
+ background: none; border-radius: 0;
3844
+ mask: repeating-linear-gradient(to right, #000 0 calc((100% - (var(--_n) - 1) * 3px) / var(--_n)), transparent 0 calc((100% - (var(--_n) - 1) * 3px) / var(--_n) + 3px));
3845
+ }
3846
+ &:where([data-segments]) :where(.pm-meter-track)::before { content: ""; position: absolute; inset: 0; background: var(--pm-color-bg-muted); }
3847
+ &:where([data-segments]) :where(.pm-meter-fill) { position: relative; border-radius: 0; }
3848
+ @media (forced-colors: active) {
3849
+ & :where(.pm-meter-track) { border: 1px solid CanvasText; }
3850
+ & :where(.pm-meter-fill) { background: Highlight; }
3851
+ }
3852
+ }
3853
+ }
3854
+
3855
+ /* Code block, QR code, virtual list, signature pad and tour. */
3856
+ @layer pm.components {
3857
+ /* ---------- Code block ---------- */
3858
+ :where(.pm-code) {
3859
+ --_bg: light-dark(var(--pm-neutral-12), var(--pm-neutral-2));
3860
+ --_fg: light-dark(var(--pm-neutral-1), var(--pm-neutral-12));
3861
+ --_dim: light-dark(var(--pm-neutral-7), var(--pm-neutral-11));
3862
+ position: relative; display: grid; min-inline-size: 0;
3863
+ border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-lg); overflow: hidden;
3864
+ background: var(--_bg); color: var(--_fg);
3865
+ & :where(.pm-code-bar) {
3866
+ display: flex; align-items: center; gap: var(--pm-space-1); min-block-size: 2.25rem; padding-inline: var(--pm-space-4) var(--pm-space-2);
3867
+ border-block-end: 1px solid color-mix(in oklab, var(--_fg) 14%, transparent);
3868
+ }
3869
+ & :where(.pm-code-label) { margin-inline-end: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--_dim); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); letter-spacing: 0.04em; }
3870
+ & :where(.pm-code-btn) {
3871
+ min-block-size: 1.75rem; padding-inline: var(--pm-space-2); border: 0; border-radius: var(--pm-radius-sm); background: none; color: var(--_dim);
3872
+ font: inherit; font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); cursor: pointer;
3873
+ &:is(:hover, [aria-pressed="true"]) { color: var(--_fg); background: color-mix(in oklab, var(--_fg) 12%, transparent); }
3874
+ &:focus-visible { outline: 2px solid var(--_fg); outline-offset: -2px; }
3875
+ }
3876
+ & :where(pre) {
3877
+ margin: 0; padding: var(--pm-space-4); overflow: auto; background: none; color: inherit; tab-size: 2;
3878
+ font-family: var(--pm-font-mono); font-size: var(--pm-font-size-sm); line-height: 1.6;
3879
+ &:focus-visible { outline: 2px solid var(--_fg); outline-offset: -2px; }
3880
+ }
3881
+ & :where(code) { font: inherit; background: none; padding: 0; color: inherit; }
3882
+ &:where([data-wrap]) :where(pre) { white-space: pre-wrap; overflow-wrap: anywhere; }
3883
+ &:where([data-collapsed]) :where(pre) { max-block-size: var(--_max, 20rem); overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); }
3884
+ & :where(.pm-code-more) { display: block; inline-size: 100%; min-block-size: 2.25rem; border-radius: 0; border-block-start: 1px solid color-mix(in oklab, var(--_fg) 14%, transparent); }
3885
+ /* Line numbers: one counter per line, kept out of selection and copying. */
3886
+ &:where([data-lines]) :where(.pm-code-line) { counter-increment: pm-line; }
3887
+ &:where([data-lines]) :where(code) { counter-reset: pm-line; }
3888
+ &:where([data-lines]) :where(.pm-code-line)::before {
3889
+ content: counter(pm-line); display: inline-block; inline-size: 2.5ch; margin-inline-end: var(--pm-space-4); color: var(--_dim); text-align: end; user-select: none; opacity: 0.7;
3890
+ }
3891
+ & :where(.t-c) { color: var(--_dim); font-style: italic; }
3892
+ & :where(.t-k) { color: light-dark(var(--pm-accent-7), var(--pm-accent-11)); }
3893
+ & :where(.t-s) { color: light-dark(var(--pm-success-7), var(--pm-success-11)); }
3894
+ & :where(.t-n, .t-f) { color: light-dark(var(--pm-warning-7), var(--pm-warning-11)); }
3895
+ & :where(.t-x) { color: light-dark(var(--pm-info-7), var(--pm-info-11)); }
3896
+ & :where(.t-a) { color: light-dark(var(--pm-secondary-7), var(--pm-secondary-11)); }
3897
+ & :where(.t-p) { color: var(--_dim); }
3898
+ @media (forced-colors: active) { & :where([class^="t-"]) { color: inherit; } }
3899
+ }
3900
+
3901
+ /* ---------- QR code: always dark on light, so scanners can read it in every theme ---------- */
3902
+ :where(.pm-qr) {
3903
+ display: inline-grid; justify-items: center; gap: var(--pm-space-2); margin: 0;
3904
+ & :where(svg) { display: block; inline-size: var(--_size, 10rem); block-size: auto; border-radius: var(--pm-radius-md); background: var(--pm-qr-bg, #fff); color: var(--pm-qr-fg, #000); }
3905
+ & :where(figcaption) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); text-align: center; max-inline-size: var(--_size, 10rem); overflow-wrap: anywhere; }
3906
+ & :where(.pm-qr-error) { display: grid; place-items: center; inline-size: var(--_size, 10rem); aspect-ratio: 1; padding: var(--pm-space-3); border: 1px dashed var(--pm-color-border-strong); border-radius: var(--pm-radius-md); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); text-align: center; }
3907
+ }
3908
+
3909
+ /* ---------- Virtual list: only the visible rows are in the page ---------- */
3910
+ :where(.pm-vlist) {
3911
+ position: relative; overflow: auto; block-size: var(--_height, 20rem); overscroll-behavior: contain;
3912
+ border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-surface);
3913
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3914
+ & :where(.pm-vlist-space) { position: relative; }
3915
+ & :where(.pm-vlist-row) {
3916
+ position: absolute; inset-inline: 0; display: flex; align-items: center; gap: var(--pm-space-3); padding-inline: var(--pm-space-4);
3917
+ border-block-end: 1px solid var(--pm-color-border); font-size: var(--pm-font-size-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
3918
+ }
3919
+ & :where(.pm-vlist-empty) { display: grid; place-items: center; block-size: 100%; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
3920
+ }
3921
+
3922
+ /* ---------- Signature pad ---------- */
3923
+ :where(.pm-signature) {
3924
+ position: relative; display: grid; border: 1px solid var(--pm-color-border-strong); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-surface); overflow: hidden;
3925
+ &:where([data-invalid]) { border-color: var(--pm-color-danger-border-strong); }
3926
+ &:has(canvas:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
3927
+ & :where(canvas) { display: block; inline-size: 100%; block-size: var(--_height, 10rem); touch-action: none; cursor: crosshair; outline: none; }
3928
+ & :where(.pm-signature-line) { position: absolute; inset-inline: var(--pm-space-5); inset-block-end: 2.25rem; border-block-end: 1px dashed var(--pm-color-border-strong); pointer-events: none; }
3929
+ & :where(.pm-signature-hint) { position: absolute; inset-inline-start: var(--pm-space-5); inset-block-end: var(--pm-space-2); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); pointer-events: none; }
3930
+ & :where(.pm-signature-clear) { position: absolute; inset-inline-end: var(--pm-space-1); inset-block-start: var(--pm-space-1); }
3931
+ &:where([data-disabled]) { opacity: 0.6; & :where(canvas) { cursor: not-allowed; } }
3932
+ }
3933
+
3934
+ /* ---------- Tour: a card that points at one part of the page at a time ---------- */
3935
+ :where(.pm-tour-ring) {
3936
+ position: fixed; z-index: 2147483000; pointer-events: none; border-radius: var(--pm-radius-md);
3937
+ box-shadow: 0 0 0 3px var(--pm-color-accent-solid), 0 0 0 100vmax color-mix(in oklch, var(--pm-color-bg-inverse) 45%, transparent);
3938
+ @media (prefers-reduced-motion: no-preference) { transition: inset var(--pm-duration-normal) var(--pm-ease-out), inline-size var(--pm-duration-normal) var(--pm-ease-out), block-size var(--pm-duration-normal) var(--pm-ease-out); }
3939
+ }
3940
+ :where(.pm-tour-card) {
3941
+ position: fixed; inset: auto; margin: 0; inline-size: min(22rem, 100vw - 1.5rem); padding: var(--pm-space-4);
3942
+ border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-lg); background: var(--pm-color-bg-surface); color: var(--pm-color-fg); box-shadow: var(--pm-shadow-xl);
3943
+ &:is(:popover-open) { display: grid; gap: var(--pm-space-2); }
3944
+ & :where(.pm-tour-title) { margin: 0; font-size: var(--pm-font-size-md); font-weight: var(--pm-font-weight-semibold); }
3945
+ & :where(.pm-tour-text) { margin: 0; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); }
3946
+ & :where(.pm-tour-foot) { display: flex; align-items: center; gap: var(--pm-space-2); margin-block-start: var(--pm-space-2); }
3947
+ & :where(.pm-tour-count) { margin-inline-end: auto; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-variant-numeric: tabular-nums; }
3948
+ &::backdrop { background: transparent; }
3949
+ }
3950
+ }
3951
+
3952
+ /* Transfer list, cascader and tree select. */
3953
+ @layer pm.components {
3954
+ /* ---------- Shared: a button that looks like a field and opens a panel ---------- */
3955
+ :where(.pm-picker-trigger) {
3956
+ display: flex; align-items: center; gap: var(--pm-space-2); text-align: start; cursor: pointer;
3957
+ & > :where(.pm-picker-value) { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3958
+ & > :where(.pm-picker-value[data-placeholder]) { color: var(--pm-color-fg-muted); }
3959
+ &::after { content: ""; flex: none; inline-size: 0.45em; block-size: 0.45em; margin-block-start: -0.25em; border-block-end: 1.5px solid currentColor; border-inline-end: 1.5px solid currentColor; rotate: 45deg; opacity: 0.7; }
3960
+ &:where([aria-invalid="true"]) { --_border: var(--pm-color-danger-border-strong); }
3961
+ &:disabled { opacity: 0.55; cursor: not-allowed; }
3962
+ }
3963
+ :where(.pm-picker-count) { flex: none; padding: 0 var(--pm-space-1-5, 0.375rem); border-radius: var(--pm-radius-full); background: var(--pm-color-accent-soft); color: var(--pm-color-accent-text); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); }
3964
+
3965
+ /* ---------- Cascader: one column per level ---------- */
3966
+ :where(.pm-cascader-panel) {
3967
+ display: flex; max-inline-size: min(40rem, 100vw - 1rem); overflow-x: auto; overscroll-behavior: contain;
3968
+ & > :where(.pm-listbox) { flex: none; inline-size: 11rem; --pm-listbox-max: 16rem; }
3969
+ & > :where(.pm-listbox + .pm-listbox) { border-inline-start: 1px solid var(--pm-color-border); }
3970
+ & :where(.pm-option[data-branch])::after { content: ""; flex: none; inline-size: 0.4em; block-size: 0.4em; border-block-start: 1.5px solid currentColor; border-inline-end: 1.5px solid currentColor; rotate: 45deg; opacity: 0.6; }
3971
+ & :where(.pm-option[data-branch]):dir(rtl)::after { rotate: -135deg; }
3972
+ & :where(.pm-option[data-open]) { background: var(--pm-color-bg-muted); }
3973
+ & :where(.pm-option[aria-selected="true"]) { color: var(--pm-color-accent-text); font-weight: var(--pm-font-weight-semibold); }
3974
+ }
3975
+
3976
+ /* ---------- Tree select ---------- */
3977
+ :where(.pm-tree-panel) {
3978
+ inline-size: max(100%, 16rem); max-inline-size: min(26rem, 100vw - 1rem);
3979
+ & :where(.pm-tree-search) { padding: var(--pm-space-2); border-block-end: 1px solid var(--pm-color-border); }
3980
+ & :where(.pm-option) { padding-inline-start: calc(var(--pm-space-2) + var(--_depth, 0) * 1.25rem); }
3981
+ & :where(.pm-tree-twist) {
3982
+ flex: none; display: grid; place-items: center; inline-size: 1.25rem; block-size: 1.25rem; border: 0; padding: 0; background: none; color: var(--pm-color-fg-muted); cursor: pointer; border-radius: var(--pm-radius-sm);
3983
+ &::before { content: ""; inline-size: 0.4em; block-size: 0.4em; border-block-end: 1.5px solid currentColor; border-inline-end: 1.5px solid currentColor; rotate: -45deg; transition: rotate var(--pm-duration-fast) var(--pm-ease-standard); }
3984
+ &:where([data-open])::before { rotate: 45deg; }
3985
+ &:where([data-leaf]) { visibility: hidden; }
3986
+ }
3987
+ & :where(.pm-tree-twist):dir(rtl)::before { rotate: 135deg; }
3988
+ & :where(.pm-tree-twist[data-open]):dir(rtl)::before { rotate: 45deg; }
3989
+ & :where(.pm-tree-box) {
3990
+ flex: none; display: grid; place-items: center; inline-size: 1rem; block-size: 1rem; border: 1.5px solid var(--pm-color-border-strong); border-radius: var(--pm-radius-xs);
3991
+ &::before { content: ""; inline-size: 0.7rem; block-size: 0.7rem; background: var(--pm-color-accent-on-solid); mask: var(--pm-check-mask) center / contain no-repeat; opacity: 0; }
3992
+ }
3993
+ & :where(.pm-option[aria-checked="true"], .pm-option[aria-checked="mixed"]) :where(.pm-tree-box) { background: var(--pm-color-accent-solid); border-color: var(--pm-color-accent-solid); &::before { opacity: 1; } }
3994
+ & :where(.pm-option[aria-checked="mixed"]) :where(.pm-tree-box)::before { mask-image: var(--pm-dash-mask); }
3995
+ & :where(.pm-option[aria-selected="true"]) { color: var(--pm-color-accent-text); font-weight: var(--pm-font-weight-semibold); }
3996
+ }
3997
+
3998
+ /* ---------- Transfer list ---------- */
3999
+ :where(.pm-transfer) {
4000
+ display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--pm-space-3); align-items: stretch;
4001
+ & :where(.pm-transfer-pane) { display: grid; grid-template-rows: auto auto 1fr; min-inline-size: 0; border: 1px solid var(--pm-color-border-strong); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-surface); overflow: hidden; }
4002
+ &:where([data-invalid]) :where(.pm-transfer-pane:last-child) { border-color: var(--pm-color-danger-border-strong); }
4003
+ & :where(.pm-transfer-head) { display: flex; align-items: center; gap: var(--pm-space-2); padding: var(--pm-space-2) var(--pm-space-3); border-block-end: 1px solid var(--pm-color-border); background: var(--pm-color-bg-subtle); font-size: var(--pm-font-size-sm); font-weight: var(--pm-font-weight-semibold); }
4004
+ & :where(.pm-transfer-count) { margin-inline-start: auto; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-regular, 400); font-variant-numeric: tabular-nums; }
4005
+ & :where(.pm-transfer-search) { padding: var(--pm-space-2); border-block-end: 1px solid var(--pm-color-border); }
4006
+ & :where(.pm-listbox) { --pm-listbox-max: var(--_height, 14rem); block-size: min(var(--_height, 14rem), 60vh); }
4007
+ & :where(.pm-listbox):focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
4008
+ & :where(.pm-transfer-actions) { display: grid; align-content: center; gap: var(--pm-space-2); }
4009
+ @container (width < 30rem) {
4010
+ grid-template-columns: minmax(0, 1fr);
4011
+ & :where(.pm-transfer-actions) { grid-auto-flow: column; justify-content: center; }
4012
+ & :where(.pm-transfer-actions .pm-button) { rotate: 90deg; }
4013
+ }
4014
+ }
4015
+ :where(.pm-transfer-wrap) { container-type: inline-size; }
4016
+ }
4017
+
4018
+ /* Scheduler: week and day calendar with timed events. */
4019
+ @layer pm.components {
4020
+ :where(.pm-scheduler) {
4021
+ --_hour: 3rem; --_gutter: 3.5rem;
4022
+ display: grid; grid-template-rows: auto 1fr; min-inline-size: 0; container-type: inline-size;
4023
+ border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-lg); background: var(--pm-color-bg-surface); overflow: hidden;
4024
+ & :where(.pm-scheduler-bar) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-2); padding: var(--pm-space-3); border-block-end: 1px solid var(--pm-color-border); }
4025
+ & :where(.pm-scheduler-title) { margin: 0 auto 0 var(--pm-space-2); font-size: var(--pm-font-size-md); font-weight: var(--pm-font-weight-semibold); }
4026
+ & :where(.pm-scheduler-views) { display: inline-flex; padding: 2px; border-radius: var(--pm-radius-md); background: var(--pm-color-bg-muted); }
4027
+ & :where(.pm-scheduler-views button) {
4028
+ min-block-size: 1.75rem; padding-inline: var(--pm-space-3); border: 0; border-radius: var(--pm-radius-sm); background: none; color: var(--pm-color-fg-muted); font: inherit; font-size: var(--pm-font-size-sm); cursor: pointer;
4029
+ &:where([aria-pressed="true"]) { background: var(--pm-color-bg-surface); color: var(--pm-color-fg); box-shadow: var(--pm-shadow-xs); }
4030
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
4031
+ }
4032
+ & :where(.pm-scheduler-scroll) { overflow: auto; max-block-size: var(--_height, 32rem); overscroll-behavior: contain; }
4033
+ & :where(.pm-scheduler-scroll):focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
4034
+ & :where(.pm-scheduler-grid) { display: grid; grid-template-columns: var(--_gutter) repeat(var(--_days, 7), minmax(6.5rem, 1fr)); min-inline-size: max-content; inline-size: 100%; }
4035
+ & :where(.pm-scheduler-corner) { position: sticky; inset-block-start: 0; inset-inline-start: 0; z-index: 3; background: var(--pm-color-bg-surface); border-block-end: 1px solid var(--pm-color-border); }
4036
+ & :where(.pm-scheduler-day-head) {
4037
+ position: sticky; inset-block-start: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px var(--pm-space-1);
4038
+ padding: var(--pm-space-2); text-align: start;
4039
+ border-block-end: 1px solid var(--pm-color-border); border-inline-start: 1px solid var(--pm-color-border); background: var(--pm-color-bg-surface);
4040
+ & > :where(h3) { margin: 0; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-medium); }
4041
+ & > :where(h3 b) { display: block; color: var(--pm-color-fg); font-size: var(--pm-font-size-lg); font-weight: var(--pm-font-weight-semibold); }
4042
+ &:where([data-today]) :where(h3 b) { color: var(--pm-color-accent-text); }
4043
+ }
4044
+ & :where(.pm-scheduler-allday) { grid-column: 1 / -1; }
4045
+ & :where(.pm-scheduler-add) {
4046
+ display: inline-grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; padding: 0; border: 0; border-radius: var(--pm-radius-sm);
4047
+ background: none; color: var(--pm-color-fg-muted); cursor: pointer;
4048
+ &:hover { background: var(--pm-color-bg-hover); color: var(--pm-color-fg); }
4049
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
4050
+ @media (pointer: coarse) { inline-size: 2.25rem; block-size: 2.25rem; }
4051
+ }
4052
+ & :where(.pm-scheduler-allday) { display: grid; gap: 2px; min-block-size: 0.25rem; }
4053
+ & :where(.pm-scheduler-times) { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--pm-color-bg-surface); }
4054
+ & :where(.pm-scheduler-times > span) { display: block; block-size: var(--_hour); padding-inline-end: var(--pm-space-2); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); text-align: end; translate: 0 -0.6em; font-variant-numeric: tabular-nums; }
4055
+ & :where(.pm-scheduler-times > span:first-child) { visibility: hidden; }
4056
+ & :where(.pm-scheduler-day) {
4057
+ position: relative; border-inline-start: 1px solid var(--pm-color-border); cursor: cell;
4058
+ background-image: linear-gradient(to bottom, var(--pm-color-border) 1px, transparent 1px); background-size: 100% var(--_hour);
4059
+ &:where([data-today]) { background-color: color-mix(in oklch, var(--pm-color-accent-soft) 35%, transparent); }
4060
+ }
4061
+ & :where(.pm-scheduler-day > ul) { margin: 0; padding: 0; list-style: none; }
4062
+ & :where(.pm-scheduler-now) { position: absolute; inset-inline: 0; z-index: 1; block-size: 0; border-block-start: 2px solid var(--pm-color-danger-solid); pointer-events: none; }
4063
+ & :where(.pm-scheduler-now)::before { content: ""; position: absolute; inset-inline-start: -4px; inset-block-start: -5px; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--pm-color-danger-solid); }
4064
+ & :where(.pm-scheduler-event) {
4065
+ display: block; inline-size: 100%; min-block-size: 1.25rem; padding: 2px var(--pm-space-1-5, 0.375rem); overflow: hidden; text-align: start; cursor: pointer;
4066
+ border: 0; border-inline-start: 3px solid var(--pm-tone-solid); border-radius: var(--pm-radius-sm); background: var(--pm-tone-soft); color: var(--pm-tone-text-strong);
4067
+ font: inherit; font-size: var(--pm-font-size-xs); line-height: 1.3;
4068
+ &:hover { background: var(--pm-tone-soft-hover); }
4069
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 1px; z-index: 2; }
4070
+ & > :where(b) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--pm-font-weight-semibold); }
4071
+ & > :where(span) { display: block; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; white-space: nowrap; }
4072
+ }
4073
+ & :where(.pm-scheduler-day .pm-scheduler-event) { position: absolute; box-shadow: 0 0 0 1px var(--pm-color-bg-surface); }
4074
+ & :where(.pm-scheduler-empty) { padding: var(--pm-space-2) var(--pm-space-3); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); border-block-start: 1px solid var(--pm-color-border); }
4075
+ @container (width < 34rem) {
4076
+ & :where(.pm-scheduler-title) { flex-basis: 100%; order: -1; margin: 0; }
4077
+ }
4078
+ }
4079
+ }
4080
+
4081
+ /* Rich-text editor: toolbar + editable area. */
4082
+ @layer pm.components {
4083
+ :where(.pm-editor) { display: block; }
4084
+ :where(.pm-editor-box) {
4085
+ display: grid; border: 1px solid var(--pm-sf-control-border, var(--pm-color-border-strong)); border-radius: var(--pm-radius-md); background: var(--pm-sf-control-bg, var(--pm-color-bg-surface)); overflow: hidden;
4086
+ &:focus-within { outline: 2px solid var(--pm-color-ring); outline-offset: 0; border-color: var(--pm-color-ring); }
4087
+ &:where([data-invalid]) { border-color: var(--pm-color-danger-border-strong); }
4088
+ &:where([data-disabled]) { opacity: 0.6; }
4089
+ }
4090
+ :where(.pm-editor-toolbar) {
4091
+ display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: var(--pm-space-1); border-block-end: 1px solid var(--pm-color-border); background: var(--pm-color-bg-subtle);
4092
+ & > :where(button) {
4093
+ display: inline-grid; place-items: center; min-inline-size: 2rem; min-block-size: 2rem; padding: 0 var(--pm-space-1-5, 0.375rem);
4094
+ border: 0; border-radius: var(--pm-radius-sm); background: none; color: var(--pm-color-fg); font: inherit; font-size: var(--pm-font-size-sm); font-weight: var(--pm-font-weight-semibold); cursor: pointer;
4095
+ &::before { content: attr(data-glyph); }
4096
+ &:hover:not(:disabled) { background: var(--pm-color-bg-hover); }
4097
+ &:where([aria-pressed="true"]) { background: var(--pm-color-accent-soft); color: var(--pm-color-accent-text); }
4098
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
4099
+ &:disabled { opacity: 0.45; cursor: not-allowed; }
4100
+ }
4101
+ & > :where(.pm-editor-sep) { inline-size: 1px; align-self: stretch; margin: var(--pm-space-1) var(--pm-space-1); background: var(--pm-color-border); }
4102
+ @media (pointer: coarse) { & > :where(button) { min-inline-size: 2.5rem; min-block-size: 2.5rem; } }
4103
+ }
4104
+ :where(.pm-editor-link) {
4105
+ display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-space-2); padding: var(--pm-space-2); border-block-end: 1px solid var(--pm-color-border); background: var(--pm-color-bg-subtle);
4106
+ & > :where(input) { flex: 1 1 12rem; }
4107
+ &:where([hidden]) { display: none; }
4108
+ }
4109
+ :where(.pm-editor-area) {
4110
+ min-block-size: var(--pm-editor-min, 8rem); max-block-size: var(--pm-editor-max, 24rem); overflow: auto; padding: var(--pm-space-3) var(--pm-space-4); outline: none;
4111
+ color: var(--pm-color-fg); font-size: var(--pm-font-size-sm); line-height: var(--pm-line-height-relaxed, 1.65); overflow-wrap: anywhere;
4112
+ &:where([data-empty])::before { content: attr(data-placeholder); color: var(--pm-color-fg-muted); pointer-events: none; float: inline-start; block-size: 0; }
4113
+ & :where(p, ul, ol, blockquote, pre, h2, h3) { margin: 0 0 var(--pm-space-2); }
4114
+ & :where(h2) { font-size: var(--pm-font-size-xl); line-height: 1.25; }
4115
+ & :where(h3) { font-size: var(--pm-font-size-lg); line-height: 1.3; }
4116
+ & :where(ul, ol) { padding-inline-start: 1.5em; }
4117
+ & :where(blockquote) { padding-inline-start: var(--pm-space-3); border-inline-start: 3px solid var(--pm-color-border-strong); color: var(--pm-color-fg-muted); }
4118
+ & :where(code) { padding: 0.1em 0.35em; border-radius: var(--pm-radius-xs); background: var(--pm-color-bg-muted); font-family: var(--pm-font-mono); font-size: 0.92em; }
4119
+ & :where(pre) { padding: var(--pm-space-3); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-muted); font-family: var(--pm-font-mono); font-size: 0.92em; white-space: pre-wrap; }
4120
+ & :where(a) { color: var(--pm-color-accent-text); text-decoration: underline; text-underline-offset: 0.2em; }
4121
+ & > :where(:last-child) { margin-block-end: 0; }
4122
+ }
4123
+ }
4124
+
4125
+ /* Chat: message list, bubbles and composer, for support chat, team messaging and AI assistants. */
4126
+ @layer pm.components {
4127
+ :where(.pm-chat) {
4128
+ position: relative; display: flex; flex-direction: column; gap: var(--pm-space-3);
4129
+ min-block-size: 0; block-size: 100%; overflow-y: auto; overscroll-behavior: contain; padding: var(--pm-space-4);
4130
+ scrollbar-width: thin;
4131
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
4132
+ }
4133
+ :where(.pm-chat-latest) { position: sticky; inset-block-end: 0; align-self: center; margin-block-start: auto; box-shadow: var(--pm-elevation-2); }
4134
+ :where(.pm-chat-day) { align-self: center; padding: 2px var(--pm-space-3); border-radius: 999px; background: var(--pm-color-bg-muted); color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
4135
+
4136
+ :where(.pm-message) {
4137
+ display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--pm-space-2); align-items: end;
4138
+ max-inline-size: min(100%, 42rem); font-size: var(--pm-font-size-sm);
4139
+ & :where(.pm-message-avatar) { grid-row: 1 / span 3; align-self: end; display: grid; }
4140
+ & :where(.pm-message-avatar:empty) { display: none; }
4141
+ & :where(.pm-message-meta) { grid-column: 2; display: flex; gap: var(--pm-space-2); align-items: baseline; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
4142
+ & :where(.pm-message-meta strong) { color: var(--pm-color-fg); font-weight: var(--pm-font-weight-semibold); }
4143
+ & :where(.pm-message-bubble) {
4144
+ grid-column: 2; justify-self: start; min-inline-size: 0; max-inline-size: 100%;
4145
+ padding: var(--pm-space-2) var(--pm-space-3);
4146
+ border-radius: var(--pm-radius-lg); border-end-start-radius: var(--pm-radius-xs, 4px);
4147
+ background: var(--pm-color-bg-muted); color: var(--pm-color-fg);
4148
+ line-height: var(--pm-line-height-normal); overflow-wrap: anywhere;
4149
+ }
4150
+ & :where(.pm-message-status) { grid-column: 2; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); }
4151
+ & :where(.pm-message-status[data-status="failed"]) { color: var(--pm-color-danger-text); }
4152
+ & :where(.pm-message-actions) { grid-column: 2; display: flex; gap: var(--pm-space-1); }
4153
+ }
4154
+ /* Own messages: on the end side, in the tone colour. */
4155
+ :where(.pm-message[data-from="me"]) {
4156
+ align-self: flex-end; grid-template-columns: minmax(0, 1fr) auto;
4157
+ & :where(.pm-message-avatar) { grid-column: 2; }
4158
+ & :where(.pm-message-meta, .pm-message-bubble, .pm-message-status, .pm-message-actions) { grid-column: 1; justify-self: end; }
4159
+ & :where(.pm-message-bubble) { background: var(--pm-tone-solid); color: var(--pm-tone-on-solid); border-end-start-radius: var(--pm-radius-lg); border-end-end-radius: var(--pm-radius-xs, 4px); }
4160
+ }
4161
+ /* Plain variant: no bubble, full width (AI answers, long text). */
4162
+ :where(.pm-message[data-variant="plain"]) { max-inline-size: 100%; }
4163
+ :where(.pm-message[data-variant="plain"]) :where(.pm-message-bubble) { padding: 0; background: none; color: var(--pm-color-fg); border-radius: 0; }
4164
+ :where(.pm-message-caret) { display: inline-block; inline-size: 0.5em; block-size: 1em; margin-inline-start: 2px; vertical-align: text-bottom; background: currentColor; border-radius: 1px; @media (prefers-reduced-motion: no-preference) { animation: pm-caret 1s steps(2) infinite; } }
4165
+ :where(.pm-message-typing) { display: inline-flex; gap: 4px; padding-block: 0.35em; }
4166
+ :where(.pm-message-typing > span) { inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; opacity: 0.45; @media (prefers-reduced-motion: no-preference) { animation: pm-typing 1.2s ease-in-out infinite; } }
4167
+ :where(.pm-message-typing > span:nth-child(2)) { animation-delay: 0.15s; }
4168
+ :where(.pm-message-typing > span:nth-child(3)) { animation-delay: 0.3s; }
4169
+ @keyframes pm-caret { 50% { opacity: 0; } }
4170
+ @keyframes pm-typing { 30% { opacity: 1; translate: 0 -3px; } 60% { translate: 0 0; } }
4171
+
4172
+ :where(.pm-composer) {
4173
+ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: var(--pm-space-2);
4174
+ padding: var(--pm-space-2); border: 1px solid var(--pm-color-border-strong); border-radius: var(--pm-radius-lg);
4175
+ background: var(--pm-color-bg-surface); font-size: var(--pm-font-size-sm);
4176
+ &:focus-within { border-color: var(--pm-tone-solid); outline: 2px solid var(--pm-color-ring); outline-offset: 1px; }
4177
+ &:where([data-disabled]) { opacity: 0.6; }
4178
+ & :where(textarea) {
4179
+ grid-column: 2; inline-size: 100%; min-block-size: 2.25rem; max-block-size: 12rem; padding: 0.4rem var(--pm-space-1); border: 0; outline: 0; resize: none;
4180
+ background: none; color: inherit; font: inherit; line-height: var(--pm-line-height-normal); field-sizing: content;
4181
+ }
4182
+ & :where(textarea)::placeholder { color: var(--pm-color-fg-muted); }
4183
+ & :where(.pm-composer-start, .pm-composer-end) { display: flex; align-items: center; gap: var(--pm-space-1); }
4184
+ & :where(.pm-composer-top) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--pm-space-2); }
4185
+ & :where(.pm-composer-top:empty) { display: none; }
4186
+ }
4187
+ }
4188
+
4189
+ /* Small page helpers: back to top, floating action button, countdown, animated number, scroll area, marquee,
4190
+ disclosure, choice cards and the form error summary. */
4191
+ @layer pm.components {
4192
+ /* ---------- Floating action button: <button class="pm-button pm-fab" data-icon aria-label="New"> ---------- */
4193
+ :where(.pm-fab) {
4194
+ position: fixed; z-index: 30;
4195
+ inset-block-end: calc(var(--pm-fab-offset, var(--pm-space-6)) + env(safe-area-inset-bottom, 0px)); inset-inline-end: var(--pm-fab-offset, var(--pm-space-6));
4196
+ min-inline-size: 3.5rem; min-block-size: 3.5rem; border-radius: 999px; box-shadow: var(--pm-elevation-4);
4197
+ }
4198
+ :where(.pm-fab[data-position="start"]) { inset-inline: var(--pm-fab-offset, var(--pm-space-6)) auto; }
4199
+ :where(.pm-fab[data-position="center"]) { inset-inline: 50% auto; translate: -50% 0; }
4200
+ :where(.pm-fab[data-position="center"]:dir(rtl)) { translate: 50% 0; }
4201
+ /* Sits above a native tab bar. */
4202
+ @media (width < 40rem) { :where([mobile]:not([mobile="false"], [mobile="off"], [mobile="web"])) :where(.pm-fab) { --pm-fab-offset: var(--pm-space-4); inset-block-end: calc(4.5rem + env(safe-area-inset-bottom, 0px)); } }
4203
+
4204
+ :where(.pm-back-to-top) {
4205
+ transition: opacity var(--pm-duration-fast), translate var(--pm-duration-fast), visibility 0s;
4206
+ &:where([data-hidden]) { opacity: 0; translate: 0 0.5rem; visibility: hidden; pointer-events: none; transition: opacity var(--pm-duration-fast), translate var(--pm-duration-fast), visibility 0s var(--pm-duration-fast); }
4207
+ @media (prefers-reduced-motion: reduce) { transition: none; }
4208
+ /* Inside a scrolling panel: floats in the panel's bottom corner, over the last lines. */
4209
+ &:where([data-contained]) {
4210
+ position: sticky; display: flex; inline-size: 3rem; min-inline-size: 3rem; min-block-size: 3rem; inset: auto;
4211
+ inset-block-end: var(--pm-space-3); margin-block-start: -3rem; margin-inline: auto 0;
4212
+ }
4213
+ &:where([data-contained][data-position="start"]) { margin-inline: 0 auto; }
4214
+ &:where([data-contained][data-position="center"]) { margin-inline: auto; translate: none; }
4215
+ }
4216
+
4217
+ /* ---------- Sticky: stays in view while its section scrolls. <header class="pm-sticky"> ----------
4218
+ --pm-sticky-offset sets the gap from the top (e.g. below a fixed app bar). Where the browser supports scroll-state
4219
+ queries, a shadow appears only once it is actually stuck. */
4220
+ :where(.pm-sticky) {
4221
+ position: sticky; inset-block-start: var(--pm-sticky-offset, 0); z-index: 10; container-type: scroll-state;
4222
+ background: var(--pm-sticky-bg, var(--pm-color-bg-surface));
4223
+ &:where([data-edge="bottom"]) { inset-block: auto var(--pm-sticky-offset, 0); }
4224
+ }
4225
+ @container scroll-state(stuck: top) { :where(.pm-sticky-inner) { box-shadow: var(--pm-elevation-2); } }
4226
+ @container scroll-state(stuck: bottom) { :where(.pm-sticky-inner) { box-shadow: var(--pm-elevation-2); } }
4227
+
4228
+ /* ---------- Countdown ---------- */
4229
+ :where(.pm-countdown) {
4230
+ display: inline-flex; gap: var(--pm-space-3); font-variant-numeric: tabular-nums;
4231
+ & :where(.pm-countdown-unit) { display: grid; justify-items: center; gap: 2px; min-inline-size: 3ch; }
4232
+ & :where(.pm-countdown-value) { font-family: var(--pm-font-display); font-size: var(--pm-font-size-3xl); font-weight: var(--pm-font-weight-bold); line-height: 1; }
4233
+ & :where(.pm-countdown-label) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); text-transform: uppercase; letter-spacing: var(--pm-tracking-wide); }
4234
+ &:where([data-size="sm"]) :where(.pm-countdown-value) { font-size: var(--pm-font-size-xl); }
4235
+ &:where([data-variant="inline"]) { gap: 0.35em; }
4236
+ &:where([data-variant="inline"]) :where(.pm-countdown-unit) { display: inline-flex; align-items: baseline; gap: 1px; min-inline-size: 0; }
4237
+ &:where([data-variant="inline"]) :where(.pm-countdown-value) { font: inherit; font-weight: var(--pm-font-weight-semibold); }
4238
+ &:where([data-variant="inline"]) :where(.pm-countdown-label) { text-transform: none; letter-spacing: 0; font-size: inherit; }
4239
+ }
4240
+ :where(.pm-format-number) { font-variant-numeric: tabular-nums; }
4241
+
4242
+ /* ---------- Scroll area: thin themed scrollbars and edge fades. <div class="pm-scroll-area" tabindex="0"> ---------- */
4243
+ :where(.pm-scroll-area) {
4244
+ overflow: auto; overscroll-behavior: contain; max-block-size: var(--pm-scroll-height, 20rem);
4245
+ scrollbar-width: thin; scrollbar-color: var(--pm-color-border-strong) transparent;
4246
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
4247
+ }
4248
+ :where(.pm-scroll-area[data-fade]) {
4249
+ @supports (animation-timeline: scroll()) {
4250
+ mask-image: linear-gradient(to bottom, transparent, #000 var(--_top, 0px), #000 calc(100% - var(--_bottom, 1.5rem)), transparent);
4251
+ animation: pm-scroll-fade linear both; animation-timeline: scroll(self);
4252
+ }
4253
+ }
4254
+ @property --_top { syntax: "<length>"; inherits: false; initial-value: 0px; }
4255
+ @property --_bottom { syntax: "<length>"; inherits: false; initial-value: 1.5rem; }
4256
+ @keyframes pm-scroll-fade { 0% { --_top: 0px; --_bottom: 1.5rem; } 8%, 92% { --_top: 1.5rem; --_bottom: 1.5rem; } 100% { --_top: 1.5rem; --_bottom: 0px; } }
4257
+
4258
+ /* ---------- Marquee: <div class="pm-marquee" tabindex="0" role="group" aria-label="…"><div class="pm-marquee-track">items… items again…</div></div>
4259
+ tabindex lets keyboard users scroll the row when reduced motion turns it into a scroll area. ---------- */
4260
+ :where(.pm-marquee) {
4261
+ overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
4262
+ & > :where(.pm-marquee-track) {
4263
+ display: flex; inline-size: max-content; gap: var(--pm-marquee-gap, var(--pm-space-8)); padding-inline-end: var(--pm-marquee-gap, var(--pm-space-8));
4264
+ @media (prefers-reduced-motion: no-preference) { animation: pm-marquee var(--pm-marquee-duration, 30s) linear infinite; }
4265
+ }
4266
+ &:where(:hover, :focus-within) > :where(.pm-marquee-track) { animation-play-state: paused; }
4267
+ /* Reduced motion: a row the user scrolls themselves. */
4268
+ @media (prefers-reduced-motion: reduce) { overflow-x: auto; mask-image: none; }
4269
+ }
4270
+ @keyframes pm-marquee { to { translate: -50% 0; } }
4271
+
4272
+ /* ---------- Disclosure: native <details class="pm-details"> ---------- */
4273
+ :where(.pm-details) {
4274
+ border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-surface);
4275
+ & > :where(summary) {
4276
+ display: flex; align-items: center; justify-content: space-between; gap: var(--pm-space-3); min-block-size: 2.75rem; padding: var(--pm-space-2) var(--pm-space-4);
4277
+ cursor: pointer; list-style: none; font-weight: var(--pm-font-weight-medium); border-radius: inherit;
4278
+ }
4279
+ & > :where(summary)::-webkit-details-marker { display: none; }
4280
+ & > :where(summary)::after { content: ""; flex: none; inline-size: 1em; block-size: 1em; background: currentColor; mask: var(--pm-chevron) center / contain no-repeat; transition: rotate var(--pm-duration-fast); }
4281
+ &:where([open]) > :where(summary)::after { rotate: 180deg; }
4282
+ & > :where(summary:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: -2px; }
4283
+ & > :where(:not(summary)) { padding: 0 var(--pm-space-4) var(--pm-space-4); }
4284
+ &::details-content { @media (prefers-reduced-motion: no-preference) { transition: block-size var(--pm-duration-normal, 0.2s), content-visibility var(--pm-duration-normal, 0.2s) allow-discrete; block-size: 0; overflow: clip; } }
4285
+ &:where([open])::details-content { block-size: auto; }
4286
+ }
4287
+
4288
+ /* ---------- Choice cards: radios and checkboxes as selectable cards ---------- */
4289
+ :where(.pm-check-label[data-card]) {
4290
+ display: flex; align-items: flex-start; gap: var(--pm-space-3); padding: var(--pm-space-3) var(--pm-space-4);
4291
+ border: 1px solid var(--pm-color-border-strong); border-radius: var(--pm-radius-md); background: var(--pm-color-bg-surface);
4292
+ transition: border-color var(--pm-duration-fast), background-color var(--pm-duration-fast);
4293
+ &:hover { background: var(--pm-color-bg-hover); }
4294
+ &:has(:checked) { border-color: var(--pm-tone-solid); background: var(--pm-tone-soft); box-shadow: inset 0 0 0 1px var(--pm-tone-solid); }
4295
+ &:has(:focus-visible) { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
4296
+ &:has(:disabled) { opacity: 0.6; }
4297
+ & > :where(input) { margin-block-start: 0.15em; }
4298
+ & :where(.pm-check-text) { display: grid; gap: 2px; min-inline-size: 0; }
4299
+ & :where(.pm-check-desc) { color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-regular); }
4300
+ @media (forced-colors: active) { &:has(:checked) { border-color: Highlight; box-shadow: inset 0 0 0 1px Highlight; } }
4301
+ }
4302
+ :where(.pm-choice-grid) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--pm-space-2); }
4303
+
4304
+ /* ---------- Form error summary ---------- */
4305
+ :where(.pm-form-summary) {
4306
+ padding: var(--pm-space-3) var(--pm-space-4); border: 1px solid var(--pm-color-danger-border); border-radius: var(--pm-radius-md);
4307
+ background: var(--pm-color-danger-soft); color: var(--pm-color-fg); font-size: var(--pm-font-size-sm);
4308
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
4309
+ & :where(strong) { color: var(--pm-color-danger-text-strong, var(--pm-color-danger-text)); }
4310
+ & :where(ul) { margin: var(--pm-space-1) 0 0; padding-inline-start: 1.2em; display: grid; gap: 2px; }
4311
+ & :where(a) { color: var(--pm-color-danger-text); }
4312
+ }
4313
+ }
4314
+
4315
+ /* Typography: long-form prose and text utilities. Families, sizes, weights, leading, tracking and measure are
4316
+ tokens (--pm-font-*, --pm-font-size-*, --pm-font-weight-*, --pm-line-height-*, --pm-tracking-*, --pm-measure-*);
4317
+ switch every family at once with data-font="<pairing>" on any element. */
4318
+ @layer pm.components {
4319
+ /* ---------- Prose: <article class="pm-prose"> for Markdown/CMS output ---------- */
4320
+ :where(.pm-prose) {
4321
+ max-inline-size: var(--pm-prose-measure, var(--pm-measure-normal));
4322
+ font-family: var(--pm-font-body);
4323
+ font-size: var(--pm-prose-size, var(--pm-font-size-md));
4324
+ line-height: var(--pm-line-height-relaxed);
4325
+ color: var(--pm-color-fg);
4326
+ overflow-wrap: break-word;
4327
+ hyphens: auto;
4328
+
4329
+ & > :where(* + *) { margin-block-start: 1.1em; }
4330
+ & :where(h1, h2, h3, h4, h5, h6) {
4331
+ font-family: var(--pm-font-display);
4332
+ line-height: var(--pm-line-height-tight);
4333
+ letter-spacing: var(--pm-tracking-tight);
4334
+ text-wrap: balance;
4335
+ scroll-margin-block-start: 5rem;
4336
+ }
4337
+ & :where(h1) { font-size: var(--pm-font-size-4xl); font-weight: var(--pm-font-weight-bold); }
4338
+ & :where(h2) { font-size: var(--pm-font-size-2xl); font-weight: var(--pm-font-weight-bold); margin-block-start: 2em; }
4339
+ & :where(h3) { font-size: var(--pm-font-size-xl); font-weight: var(--pm-font-weight-semibold); margin-block-start: 1.6em; }
4340
+ & :where(h4, h5, h6) { font-size: var(--pm-font-size-lg); font-weight: var(--pm-font-weight-semibold); margin-block-start: 1.4em; }
4341
+ & :where(h1, h2, h3, h4, h5, h6) + :where(*) { margin-block-start: 0.6em; }
4342
+ & :where(p, li) { text-wrap: pretty; }
4343
+ & :where(.pm-lead, p.lead) { font-size: var(--pm-font-size-lg); color: var(--pm-color-fg-muted); }
4344
+ & :where(strong, b) { font-weight: var(--pm-font-weight-semibold); color: var(--pm-color-fg); }
4345
+ & :where(a) { color: var(--pm-color-accent-text); text-decoration-line: underline; text-underline-offset: 0.2em; }
4346
+ & :where(ul, ol) { padding-inline-start: 1.4em; }
4347
+ & :where(li + li, li > ul, li > ol) { margin-block-start: 0.4em; }
4348
+ & :where(li::marker) { color: var(--pm-color-fg-muted); }
4349
+ & :where(ol > li::marker) { font-variant-numeric: tabular-nums; }
4350
+ & :where(blockquote) {
4351
+ margin-inline: 0;
4352
+ padding-inline-start: 1em;
4353
+ border-inline-start: 3px solid var(--pm-color-accent-border);
4354
+ color: var(--pm-color-fg-muted);
4355
+ font-style: italic;
4356
+ }
4357
+ & :where(hr) { border: 0; border-block-start: 1px solid var(--pm-color-border); margin-block: 2.5em; }
4358
+ & :where(code):not(:where(pre *)) {
4359
+ padding: 0.12em 0.36em;
4360
+ border-radius: var(--pm-radius-xs, 4px);
4361
+ background: var(--pm-color-bg-muted);
4362
+ font-family: var(--pm-font-mono);
4363
+ font-size: 0.88em;
4364
+ }
4365
+ & :where(pre) {
4366
+ padding: 1em 1.2em;
4367
+ border: 1px solid var(--pm-color-border);
4368
+ border-radius: var(--pm-radius-lg);
4369
+ background: var(--pm-color-bg-subtle);
4370
+ font-family: var(--pm-font-mono);
4371
+ font-size: 0.85em;
4372
+ line-height: var(--pm-line-height-normal);
4373
+ overflow-x: auto;
4374
+ tab-size: 2;
4375
+ }
4376
+ & :where(kbd) {
4377
+ padding: 0.1em 0.4em;
4378
+ border: 1px solid var(--pm-color-border-strong);
4379
+ border-block-end-width: 2px;
4380
+ border-radius: var(--pm-radius-sm);
4381
+ font-family: var(--pm-font-sans);
4382
+ font-size: 0.85em;
4383
+ }
4384
+ & :where(mark) { background: var(--pm-color-warning-soft); color: inherit; padding-inline: 0.15em; border-radius: 2px; }
4385
+ & :where(abbr[title]) { text-decoration: underline dotted; cursor: help; }
4386
+ & :where(img, video, svg, canvas, iframe) { max-inline-size: 100%; block-size: auto; border-radius: var(--pm-radius-md); }
4387
+ & :where(figure) { margin-inline: 0; }
4388
+ & :where(figcaption) { margin-block-start: 0.6em; color: var(--pm-color-fg-muted); font-size: var(--pm-font-size-sm); text-align: center; }
4389
+ & :where(table) { inline-size: 100%; border-collapse: collapse; font-size: 0.92em; font-variant-numeric: tabular-nums; }
4390
+ & :where(th, td) { padding: 0.55em 0.7em; border-block-end: 1px solid var(--pm-color-border); text-align: start; vertical-align: top; }
4391
+ & :where(th) { color: var(--pm-color-fg-muted); font-weight: var(--pm-font-weight-semibold); }
4392
+ & :where(dt) { font-weight: var(--pm-font-weight-semibold); }
4393
+ & :where(dd) { margin-inline-start: 1.2em; color: var(--pm-color-fg-muted); }
4394
+ & :where(details) { padding: 0.6em 0.9em; border: 1px solid var(--pm-color-border); border-radius: var(--pm-radius-md); }
4395
+ & :where(summary) { cursor: pointer; font-weight: var(--pm-font-weight-semibold); }
4396
+
4397
+ &:where([data-size="sm"]) { --pm-prose-size: var(--pm-font-size-sm); }
4398
+ &:where([data-size="lg"]) { --pm-prose-size: var(--pm-font-size-lg); }
4399
+ &:where([data-measure="narrow"]) { --pm-prose-measure: var(--pm-measure-narrow); }
4400
+ &:where([data-measure="wide"]) { --pm-prose-measure: var(--pm-measure-wide); }
4401
+ &:where([data-measure="none"]) { --pm-prose-measure: none; }
4402
+ /* Narrow screens: tables scroll inside the text column instead of widening the page. */
4403
+ @media (width < 40rem) { & :where(table) { display: block; overflow-x: auto; } }
4404
+ }
4405
+ }
4406
+
4407
+ @layer pm.utilities {
4408
+ /* ---------- Families ---------- */
4409
+ .pm-font-sans { font-family: var(--pm-font-sans); }
4410
+ .pm-font-serif { font-family: var(--pm-font-serif); }
4411
+ .pm-font-display { font-family: var(--pm-font-display); }
4412
+ .pm-font-mono { font-family: var(--pm-font-mono); }
4413
+ .pm-font-body { font-family: var(--pm-font-body); }
4414
+
4415
+ /* ---------- Sizes (fluid: larger steps shrink slightly on small screens) ---------- */
4416
+ .pm-text-2xs { font-size: calc(var(--pm-font-size-xs) * 0.9); }
4417
+ .pm-text-md { font-size: var(--pm-font-size-md); }
4418
+ .pm-text-lg { font-size: var(--pm-font-size-lg); }
4419
+ .pm-text-xl { font-size: var(--pm-font-size-xl); }
4420
+ .pm-text-2xl { font-size: var(--pm-font-size-2xl); line-height: var(--pm-line-height-snug); }
4421
+ .pm-text-3xl { font-size: var(--pm-font-size-3xl); line-height: var(--pm-line-height-tight); }
4422
+ .pm-text-4xl { font-size: var(--pm-font-size-4xl); line-height: var(--pm-line-height-tight); }
4423
+ .pm-text-5xl { font-size: var(--pm-font-size-5xl); line-height: var(--pm-line-height-tight); letter-spacing: var(--pm-tracking-tighter); }
4424
+ /* Headings by look, independent of the element (keep h1–h6 for document structure). */
4425
+ .pm-display { font-family: var(--pm-font-display); font-size: var(--pm-font-size-5xl); font-weight: var(--pm-font-weight-bold); line-height: 1.05; letter-spacing: var(--pm-tracking-tighter); text-wrap: balance; }
4426
+ .pm-heading { font-family: var(--pm-font-display); font-weight: var(--pm-font-weight-semibold); line-height: var(--pm-line-height-tight); letter-spacing: var(--pm-tracking-tight); text-wrap: balance; }
4427
+ .pm-lead { font-size: var(--pm-font-size-lg); line-height: var(--pm-line-height-relaxed); color: var(--pm-color-fg-muted); text-wrap: pretty; }
4428
+ .pm-eyebrow { font-size: var(--pm-font-size-xs); font-weight: var(--pm-font-weight-semibold); letter-spacing: var(--pm-tracking-widest); text-transform: uppercase; color: var(--pm-color-accent-text); }
4429
+ .pm-caption { font-size: var(--pm-font-size-xs); color: var(--pm-color-fg-muted); }
4430
+
4431
+ /* ---------- Weight, style, leading, tracking ---------- */
4432
+ .pm-weight-regular { font-weight: var(--pm-font-weight-regular); }
4433
+ .pm-weight-medium { font-weight: var(--pm-font-weight-medium); }
4434
+ .pm-weight-semibold { font-weight: var(--pm-font-weight-semibold); }
4435
+ .pm-weight-bold { font-weight: var(--pm-font-weight-bold); }
4436
+ .pm-italic { font-style: italic; }
4437
+ .pm-leading-tight { line-height: var(--pm-line-height-tight); }
4438
+ .pm-leading-snug { line-height: var(--pm-line-height-snug); }
4439
+ .pm-leading-normal { line-height: var(--pm-line-height-normal); }
4440
+ .pm-leading-relaxed { line-height: var(--pm-line-height-relaxed); }
4441
+ .pm-tracking-tight { letter-spacing: var(--pm-tracking-tight); }
4442
+ .pm-tracking-wide { letter-spacing: var(--pm-tracking-wide); }
4443
+ .pm-uppercase { text-transform: uppercase; letter-spacing: var(--pm-tracking-wider); }
4444
+
4445
+ /* ---------- Colour, alignment, wrapping ---------- */
4446
+ .pm-text-fg { color: var(--pm-color-fg); }
4447
+ .pm-text-accent { color: var(--pm-color-accent-text); }
4448
+ .pm-text-success { color: var(--pm-color-success-text); }
4449
+ .pm-text-warning { color: var(--pm-color-warning-text); }
4450
+ .pm-text-danger { color: var(--pm-color-danger-text); }
4451
+ .pm-text-start { text-align: start; }
4452
+ .pm-text-center { text-align: center; }
4453
+ .pm-text-end { text-align: end; }
4454
+ .pm-balance { text-wrap: balance; }
4455
+ .pm-pretty { text-wrap: pretty; }
4456
+ .pm-nowrap { white-space: nowrap; }
4457
+ .pm-measure { max-inline-size: var(--pm-measure-normal); }
4458
+ .pm-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-inline-size: 0; }
4459
+ .pm-line-clamp {
4460
+ display: -webkit-box;
4461
+ -webkit-box-orient: vertical;
4462
+ -webkit-line-clamp: var(--pm-lines, 2);
4463
+ line-clamp: var(--pm-lines, 2);
4464
+ overflow: hidden;
4465
+ }
4466
+ .pm-tabular { font-variant-numeric: tabular-nums; }
4467
+ .pm-slashed-zero { font-variant-numeric: slashed-zero; }
4468
+ }
4469
+
4470
+ /* Utilities: layout primitives, a11y helpers, motion presets, scroll-driven reveals. */
4471
+
4472
+ @layer pm.utilities {
4473
+ /* ---------- Layout primitives ---------- */
4474
+ .pm-stack { display: flex; flex-direction: column; gap: var(--pm-gap, var(--pm-space-4)); }
4475
+ .pm-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pm-gap, var(--pm-space-2)); }
4476
+ .pm-grid {
4477
+ display: grid;
4478
+ gap: var(--pm-gap, var(--pm-space-4));
4479
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--pm-grid-min, 16rem)), 1fr));
4480
+ }
4481
+ .pm-container { inline-size: min(100% - 2 * var(--pm-space-4), var(--pm-container, 72rem)); margin-inline: auto; }
4482
+ .pm-center { display: grid; place-items: center; }
4483
+ .pm-spacer { flex: 1; }
4484
+ .pm-divider { border: 0; border-block-start: 1px solid var(--pm-color-border); margin: 0; }
4485
+ .pm-muted { color: var(--pm-color-fg-muted); }
4486
+ .pm-text-sm { font-size: var(--pm-font-size-sm); }
4487
+ .pm-text-xs { font-size: var(--pm-font-size-xs); }
4488
+ .pm-gradient-text {
4489
+ background: linear-gradient(110deg in oklch, var(--pm-color-accent-text), var(--pm-color-secondary-text));
4490
+ background-clip: text;
4491
+ color: transparent;
4492
+ @media (forced-colors: active) { background: none; color: CanvasText; }
4493
+ }
4494
+
4495
+ /* ---------- Accessibility ---------- */
4496
+ .pm-visually-hidden:not(:focus, :active) {
4497
+ position: absolute;
4498
+ /* Explicit offsets: without them the box keeps its static position, which inside a horizontal scroller can lie
4499
+ outside the viewport and widen the page. */
4500
+ inset-block-start: 0;
4501
+ inset-inline-start: 0;
4502
+ inline-size: 1px;
4503
+ block-size: 1px;
4504
+ margin: -1px;
4505
+ padding: 0;
4506
+ border: 0;
4507
+ overflow: hidden;
4508
+ clip-path: inset(50%);
4509
+ white-space: nowrap;
4510
+ }
4511
+
4512
+ /* ---------- Motion presets: data-animate="fade|scale|slide-up|slide-down|blur|pop" ----------
4513
+ Entry animations play on insertion via @starting-style; spatial movement only without reduced motion. */
4514
+ [data-animate] {
4515
+ transition: opacity var(--pm-duration-slow) var(--pm-ease-standard);
4516
+ @starting-style { opacity: 0; }
4517
+ @media (prefers-reduced-motion: no-preference) {
4518
+ transition:
4519
+ opacity var(--pm-duration-slow) var(--pm-ease-standard),
4520
+ translate var(--pm-duration-slow) var(--pm-ease-spring),
4521
+ scale var(--pm-duration-slow) var(--pm-ease-spring),
4522
+ filter var(--pm-duration-slow) var(--pm-ease-standard);
4523
+ }
4524
+ }
4525
+ @media (prefers-reduced-motion: no-preference) {
4526
+ [data-animate="scale"] { @starting-style { scale: 0.95; } }
4527
+ [data-animate="pop"] { @starting-style { scale: 0.8; } }
4528
+ [data-animate="slide-up"] { @starting-style { translate: 0 1rem; } }
4529
+ [data-animate="slide-down"] { @starting-style { translate: 0 -1rem; } }
4530
+ [data-animate="blur"] { @starting-style { filter: blur(8px); } }
4531
+ /* Stagger children: uses sibling-index() where available, else a fixed nth-child ladder. */
4532
+ [data-stagger] > * { transition-delay: calc(var(--pm-stagger-i, 0) * 45ms); }
4533
+ [data-stagger] > :nth-child(2) { --pm-stagger-i: 1; }
4534
+ [data-stagger] > :nth-child(3) { --pm-stagger-i: 2; }
4535
+ [data-stagger] > :nth-child(4) { --pm-stagger-i: 3; }
4536
+ [data-stagger] > :nth-child(5) { --pm-stagger-i: 4; }
4537
+ [data-stagger] > :nth-child(6) { --pm-stagger-i: 5; }
4538
+ [data-stagger] > :nth-child(n + 7) { --pm-stagger-i: 6; }
4539
+ @supports (order: sibling-index()) {
4540
+ [data-stagger] > * { --pm-stagger-i: calc(sibling-index() - 1); }
4541
+ }
4542
+ }
4543
+
4544
+ /* ---------- Scroll-driven reveal (progressive; content is fully visible without support) ---------- */
4545
+ @supports (animation-timeline: view()) {
4546
+ @media (prefers-reduced-motion: no-preference) {
4547
+ [data-reveal] {
4548
+ animation: pm-reveal linear both;
4549
+ animation-timeline: view();
4550
+ animation-range: entry 0% entry 60%;
4551
+ }
4552
+ [data-parallax] {
4553
+ animation: pm-parallax linear both;
4554
+ animation-timeline: view();
4555
+ }
4556
+ }
4557
+ }
4558
+ @keyframes pm-reveal {
4559
+ from { opacity: 0; translate: 0 2rem; scale: 0.98; }
4560
+ }
4561
+ @keyframes pm-parallax {
4562
+ from { translate: 0 calc(var(--pm-parallax, 40px) * -1); }
4563
+ to { translate: 0 var(--pm-parallax, 40px); }
4564
+ }
4565
+
4566
+ /* View transitions: the theme switcher uses ::view-transition-new(root); keep its blend normal. */
4567
+ ::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
4568
+ }
4569
+
4570
+ /* Page layout: split, switcher, scroll lanes and the app shell. Page-level only (never adopted by component
4571
+ shadow roots), so single-element bundles stay small. */
4572
+ /* Layout variables apply only where they are set: a gap or column size on an outer stack must not leak into the
4573
+ stacks, clusters and grids nested inside it. (Browsers without @property inherit them, as before.) */
4574
+ @property --pm-gap { syntax: "*"; inherits: false; }
4575
+ @property --pm-grid-min { syntax: "*"; inherits: false; }
4576
+ @property --pm-side { syntax: "*"; inherits: false; }
4577
+ @property --pm-split-min { syntax: "*"; inherits: false; }
4578
+ @property --pm-split-align { syntax: "*"; inherits: false; }
4579
+ @property --pm-switch-at { syntax: "*"; inherits: false; }
4580
+ @property --pm-col { syntax: "*"; inherits: false; }
4581
+ @layer pm.utilities {
4582
+ /* Two parts side by side that stack when there is no room (no media query): the first is a sidebar of
4583
+ --pm-side width, the rest takes the remaining space and wraps below once it would be narrower than --pm-split-min.
4584
+ data-side="end" puts the sidebar second (summaries, order totals). */
4585
+ .pm-split { display: flex; flex-wrap: wrap; align-items: var(--pm-split-align, flex-start); gap: var(--pm-gap, var(--pm-space-6)); }
4586
+ .pm-split > * { min-inline-size: 0; }
4587
+ .pm-split > :first-child { flex: 1 1 var(--pm-side, 18rem); }
4588
+ .pm-split > :last-child { flex: 999 1 0; min-inline-size: min(100%, var(--pm-split-min, 55%)); }
4589
+ .pm-split[data-side="end"] > :first-child { flex: 999 1 0; min-inline-size: min(100%, var(--pm-split-min, 55%)); }
4590
+ .pm-split[data-side="end"] > :last-child { flex: 1 1 var(--pm-side, 18rem); min-inline-size: 0; }
4591
+ /* Equal columns that become a single column below --pm-switch-at (container width, not viewport). */
4592
+ .pm-switcher { display: flex; flex-wrap: wrap; gap: var(--pm-gap, var(--pm-space-4)); }
4593
+ .pm-switcher > * { flex-grow: 1; flex-basis: calc((var(--pm-switch-at, 40rem) - 100%) * 999); min-inline-size: 0; }
4594
+ /* Horizontal lane of fixed-width columns or cards (boards, carousels of cards); give it tabindex="0" and a label. */
4595
+ .pm-scroll-x {
4596
+ display: grid;
4597
+ grid-auto-flow: column;
4598
+ grid-auto-columns: var(--pm-col, min(85%, 18rem));
4599
+ gap: var(--pm-gap, var(--pm-space-4));
4600
+ min-inline-size: 0;
4601
+ max-inline-size: 100%;
4602
+ overflow-x: auto;
4603
+ overscroll-behavior-x: contain;
4604
+ scroll-snap-type: x proximity;
4605
+ scroll-padding-inline: var(--pm-space-1);
4606
+ padding-block-end: var(--pm-space-2);
4607
+ & > * { scroll-snap-align: start; }
4608
+ &:focus-visible { outline: 2px solid var(--pm-color-ring); outline-offset: 2px; }
4609
+ }
4610
+
4611
+ /* ---------- App shell: <div class="pm-app" mobile> <aside class="pm-app-side">…<pm-nav></aside>
4612
+ <div class="pm-app-main"><header class="pm-app-bar">…</header><main class="pm-app-content">…</main></div></div>
4613
+ Sidebar on wide screens; on phones only the nav stays and pm-nav (with mobile) becomes the bottom tab bar. ---------- */
4614
+ .pm-app {
4615
+ display: grid;
4616
+ grid-template-columns: auto minmax(0, 1fr);
4617
+ min-block-size: 100dvh;
4618
+ background: var(--pm-color-bg-canvas);
4619
+ color: var(--pm-color-fg);
4620
+ }
4621
+ .pm-app-side {
4622
+ position: sticky;
4623
+ inset-block-start: 0;
4624
+ display: flex;
4625
+ flex-direction: column;
4626
+ gap: var(--pm-space-4);
4627
+ inline-size: var(--pm-app-side, 16rem);
4628
+ block-size: 100dvh;
4629
+ padding: var(--pm-space-4) var(--pm-space-3);
4630
+ overflow-y: auto;
4631
+ border-inline-end: 1px solid var(--pm-color-border);
4632
+ background: var(--pm-color-bg-subtle);
4633
+ }
4634
+ .pm-app-main { display: flex; flex-direction: column; min-inline-size: 0; }
4635
+ .pm-app-bar {
4636
+ position: sticky;
4637
+ inset-block-start: 0;
4638
+ z-index: var(--pm-z-sticky);
4639
+ display: flex;
4640
+ align-items: center;
4641
+ gap: var(--pm-space-2);
4642
+ min-block-size: 3.5rem;
4643
+ padding-inline: var(--pm-space-4);
4644
+ border-block-end: 1px solid var(--pm-color-border);
4645
+ background: color-mix(in oklab, var(--pm-color-bg-canvas) 88%, transparent);
4646
+ backdrop-filter: blur(12px);
4647
+ @supports not (backdrop-filter: blur(1px)) { background: var(--pm-color-bg-canvas); }
4648
+ }
4649
+ .pm-app-content { flex: 1; display: flex; flex-direction: column; gap: var(--pm-gap, var(--pm-space-6)); padding: var(--pm-space-6) var(--pm-space-4); inline-size: min(100%, var(--pm-container, 72rem)); margin-inline: auto; }
4650
+ .pm-app-content > * { min-inline-size: 0; }
4651
+ /* The sidebar may carry `popover` (so phones can open it as a drawer): on wide screens it stays in the page. */
4652
+ .pm-app-side:where([popover]) { inset: auto; inset-block-start: 0; margin: 0; border-width: 0; border-inline-end-width: 1px; color: inherit; }
4653
+ /* Menu button for the drawer: <pm-button class="pm-app-menu" popovertarget="app-side">; phones without a tab bar only. */
4654
+ .pm-app-menu { display: none; }
4655
+ @media (width < 40rem) {
4656
+ .pm-app { grid-template-columns: minmax(0, 1fr); }
4657
+ .pm-app-content { padding-block: var(--pm-space-4); }
4658
+ /* Native mobile (pm-nav became the bottom tab bar): only the nav stays. */
4659
+ .pm-app:has(pm-nav[data-bar]) .pm-app-side { display: contents; }
4660
+ .pm-app:has(pm-nav[data-bar]) .pm-app-side > :not(pm-nav) { display: none; }
4661
+ .pm-app:has(pm-nav[data-bar]) .pm-app-main { padding-block-end: calc(4.5rem + env(safe-area-inset-bottom)); }
4662
+ /* Responsive web: the sidebar is an off-canvas drawer, opened by .pm-app-menu. */
4663
+ .pm-app:not(:has(pm-nav[data-bar])) {
4664
+ & .pm-app-menu { display: inline-flex; }
4665
+ & .pm-app-side:not(:popover-open) { display: none; }
4666
+ & .pm-app-side:popover-open {
4667
+ position: fixed;
4668
+ inset-inline: 0 auto;
4669
+ inline-size: min(100% - 3rem, 20rem);
4670
+ max-block-size: none;
4671
+ background: var(--pm-color-bg-surface);
4672
+ box-shadow: var(--pm-elevation-4);
4673
+ &::backdrop { background: var(--pm-color-overlay); }
4674
+ @media (prefers-reduced-motion: no-preference) {
4675
+ transition: translate var(--pm-duration-moderate) var(--pm-ease-emphasized), display var(--pm-duration-moderate) allow-discrete, overlay var(--pm-duration-moderate) allow-discrete;
4676
+ @starting-style { translate: -100% 0; }
4677
+ &:dir(rtl) { @starting-style { translate: 100% 0; } }
4678
+ }
4679
+ }
4680
+ }
4681
+ }
4682
+ }