@wippy-fe/theme 0.0.37 → 0.0.38

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.
package/THEMING.md CHANGED
@@ -323,7 +323,7 @@ The canonical place for per-page overrides is the `meta.config_overrides` block
323
323
 
324
324
  > **Why YAML over package.json.** YAML is registry-native — operators can patch `config_overrides` from a customer-specific overlay or a Wippy admin tool without rebuilding the FE bundle. Lua tools and other modules can also `registry:get` the entry and read the same block. package.json `wippy.configOverrides` (below) is a duplicate for the host-less rendering path, not the source of truth.
325
325
 
326
- > **Dual-mode `@dark` / `@light` keys.** `cssVariables` accepts two special keys — `@dark` and `@light`. Their values are flat string maps that compile to `@media (prefers-color-scheme: dark) { :root { ... } }` and the matching light-mode media query. **They are NOT triggered by a `[data-theme="dark"]` attribute** — only by the OS preference. Use `@dark`/`@light` for the bulk of mode-specific theming (palette swaps, component-token overrides); the top level of `cssVariables` holds defaults that don't depend on mode.
326
+ > **Dual-mode `@dark` / `@light` keys.** `cssVariables` accepts two special keys — `@dark` and `@light`. Their values are flat string maps that compile to the same three-state model as the core tokens: an OS media query gated against the opposite forced scope (`@media (prefers-color-scheme: dark) { :root:not(.w-theme-light) { ... } }`) **plus** a forced-class rule (`:root.w-theme-dark, .w-theme-dark { ... }`). So they follow the OS by default **and** respond to a forced `themeMode` (`w-theme-dark`/`w-theme-light` class) — same as `theme-config.css`. Use `@dark`/`@light` for the bulk of mode-specific theming (palette swaps, component-token overrides); the top level of `cssVariables` holds defaults that don't depend on mode.
327
327
 
328
328
  ### Mechanism A2 — package.json mirror (host-less mode)
329
329
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wippy-fe/theme",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "description": "Theme variables, shared Tailwind config, and PrimeVue styling for Wippy web components.",
5
5
  "type": "module",
6
6
  "main": "theme-config.css",
@@ -14,6 +14,15 @@ function severityScale(prefix: string) {
14
14
  }
15
15
 
16
16
  export default {
17
+ /*
18
+ * Three-state dark mode — keep in sync with theme-config.css.
19
+ * `dark:` applies when: (OS dark AND not at/under .w-theme-light) OR (at/under .w-theme-dark).
20
+ * Requires Tailwind >= 3.4.1 (variant strategy with multiple selectors).
21
+ */
22
+ darkMode: ['variant', [
23
+ '@media (prefers-color-scheme: dark) { &:not(.w-theme-light *):not(.w-theme-light) }',
24
+ '&:is(.w-theme-dark, .w-theme-dark *)',
25
+ ]] as ['variant', string[]],
17
26
  theme: {
18
27
  extend: {
19
28
  colors: {
package/theme-config.css CHANGED
@@ -1,209 +1,318 @@
1
- /* Primary and Surface Palettes */
2
- :root {
3
- --p-primary: rgb(0, 95, 178);
4
-
5
- /* Using color-mix to create a numbered variable system */
6
- --p-primary-50: color-mix(in srgb, var(--p-primary) 5%, white); /* #f2f5fa */
7
- --p-primary-100: color-mix(in srgb, var(--p-primary) 10%, white); /* #e6ebf5 */
8
- --p-primary-200: color-mix(in srgb, var(--p-primary) 20%, white); /* #ccd6eb */
9
- --p-primary-300: color-mix(in srgb, var(--p-primary) 30%, white); /* #b3c2e0 */
10
- --p-primary-400: color-mix(in srgb, var(--p-primary) 40%, white); /* #99add6 */
11
- --p-primary-500: var(--p-primary); /* #005fb2 */
12
- --p-primary-600: color-mix(in srgb, var(--p-primary) 80%, black); /* #004c8e */
13
- --p-primary-700: color-mix(in srgb, var(--p-primary) 70%, black); /* #00427c */
14
- --p-primary-800: color-mix(in srgb, var(--p-primary) 60%, black); /* #00386a */
15
- --p-primary-900: color-mix(in srgb, var(--p-primary) 50%, black); /* #002f59 */
16
- --p-primary-950: color-mix(in srgb, var(--p-primary) 40%, black); /* #002647 */
17
-
18
- /* Define secondary base color */
19
- --p-secondary: #6f7385;
20
-
21
- /* Create secondary color scale using color-mix */
22
- --p-secondary-50: color-mix(in srgb, var(--p-secondary) 5%, white); /* #f7f7f8 */
23
- --p-secondary-100: color-mix(in srgb, var(--p-secondary) 10%, white); /* #ededf1 */
24
- --p-secondary-200: color-mix(in srgb, var(--p-secondary) 20%, white); /* #d8d9df */
25
- --p-secondary-300: color-mix(in srgb, var(--p-secondary) 35%, white); /* #b6b8c3 */
26
- --p-secondary-400: color-mix(in srgb, var(--p-secondary) 65%, white); /* #8e92a2 */
27
- --p-secondary-500: var(--p-secondary); /* #6f7385 */
28
- --p-secondary-600: color-mix(in srgb, var(--p-secondary) 80%, black); /* #5a5d6f */
29
- --p-secondary-700: color-mix(in srgb, var(--p-secondary) 65%, black); /* #4a4c5a */
30
- --p-secondary-800: color-mix(in srgb, var(--p-secondary) 55%, black); /* #40424c */
31
- --p-secondary-900: color-mix(in srgb, var(--p-secondary) 50%, black); /* #383942 */
32
- --p-secondary-950: color-mix(in srgb, var(--p-secondary) 30%, black); /* #25252c */
33
-
34
- /* Severity palettes */
35
- --p-danger: rgb(239, 68, 68);
36
- --p-danger-50: color-mix(in srgb, var(--p-danger) 5%, white);
37
- --p-danger-100: color-mix(in srgb, var(--p-danger) 10%, white);
38
- --p-danger-200: color-mix(in srgb, var(--p-danger) 20%, white);
39
- --p-danger-300: color-mix(in srgb, var(--p-danger) 30%, white);
40
- --p-danger-400: color-mix(in srgb, var(--p-danger) 40%, white);
41
- --p-danger-500: var(--p-danger);
42
- --p-danger-600: color-mix(in srgb, var(--p-danger) 80%, black);
43
- --p-danger-700: color-mix(in srgb, var(--p-danger) 70%, black);
44
- --p-danger-800: color-mix(in srgb, var(--p-danger) 60%, black);
45
- --p-danger-900: color-mix(in srgb, var(--p-danger) 50%, black);
46
- --p-danger-950: color-mix(in srgb, var(--p-danger) 40%, black);
47
-
48
- --p-success: rgb(34, 197, 94);
49
- --p-success-50: color-mix(in srgb, var(--p-success) 5%, white);
50
- --p-success-100: color-mix(in srgb, var(--p-success) 10%, white);
51
- --p-success-200: color-mix(in srgb, var(--p-success) 20%, white);
52
- --p-success-300: color-mix(in srgb, var(--p-success) 30%, white);
53
- --p-success-400: color-mix(in srgb, var(--p-success) 40%, white);
54
- --p-success-500: var(--p-success);
55
- --p-success-600: color-mix(in srgb, var(--p-success) 80%, black);
56
- --p-success-700: color-mix(in srgb, var(--p-success) 70%, black);
57
- --p-success-800: color-mix(in srgb, var(--p-success) 60%, black);
58
- --p-success-900: color-mix(in srgb, var(--p-success) 50%, black);
59
- --p-success-950: color-mix(in srgb, var(--p-success) 40%, black);
60
-
61
- --p-warn: rgb(249, 115, 22);
62
- --p-warn-50: color-mix(in srgb, var(--p-warn) 5%, white);
63
- --p-warn-100: color-mix(in srgb, var(--p-warn) 10%, white);
64
- --p-warn-200: color-mix(in srgb, var(--p-warn) 20%, white);
65
- --p-warn-300: color-mix(in srgb, var(--p-warn) 30%, white);
66
- --p-warn-400: color-mix(in srgb, var(--p-warn) 40%, white);
67
- --p-warn-500: var(--p-warn);
68
- --p-warn-600: color-mix(in srgb, var(--p-warn) 80%, black);
69
- --p-warn-700: color-mix(in srgb, var(--p-warn) 70%, black);
70
- --p-warn-800: color-mix(in srgb, var(--p-warn) 60%, black);
71
- --p-warn-900: color-mix(in srgb, var(--p-warn) 50%, black);
72
- --p-warn-950: color-mix(in srgb, var(--p-warn) 40%, black);
73
-
74
- --p-info: rgb(14, 165, 233);
75
- --p-info-50: color-mix(in srgb, var(--p-info) 5%, white);
76
- --p-info-100: color-mix(in srgb, var(--p-info) 10%, white);
77
- --p-info-200: color-mix(in srgb, var(--p-info) 20%, white);
78
- --p-info-300: color-mix(in srgb, var(--p-info) 30%, white);
79
- --p-info-400: color-mix(in srgb, var(--p-info) 40%, white);
80
- --p-info-500: var(--p-info);
81
- --p-info-600: color-mix(in srgb, var(--p-info) 80%, black);
82
- --p-info-700: color-mix(in srgb, var(--p-info) 70%, black);
83
- --p-info-800: color-mix(in srgb, var(--p-info) 60%, black);
84
- --p-info-900: color-mix(in srgb, var(--p-info) 50%, black);
85
- --p-info-950: color-mix(in srgb, var(--p-info) 40%, black);
86
-
87
- --p-help: rgb(168, 85, 247);
88
- --p-help-50: color-mix(in srgb, var(--p-help) 5%, white);
89
- --p-help-100: color-mix(in srgb, var(--p-help) 10%, white);
90
- --p-help-200: color-mix(in srgb, var(--p-help) 20%, white);
91
- --p-help-300: color-mix(in srgb, var(--p-help) 30%, white);
92
- --p-help-400: color-mix(in srgb, var(--p-help) 40%, white);
93
- --p-help-500: var(--p-help);
94
- --p-help-600: color-mix(in srgb, var(--p-help) 80%, black);
95
- --p-help-700: color-mix(in srgb, var(--p-help) 70%, black);
96
- --p-help-800: color-mix(in srgb, var(--p-help) 60%, black);
97
- --p-help-900: color-mix(in srgb, var(--p-help) 50%, black);
98
- --p-help-950: color-mix(in srgb, var(--p-help) 40%, black);
99
-
100
- --p-accent: rgb(20, 184, 166);
101
- --p-accent-50: color-mix(in srgb, var(--p-accent) 5%, white);
102
- --p-accent-100: color-mix(in srgb, var(--p-accent) 10%, white);
103
- --p-accent-200: color-mix(in srgb, var(--p-accent) 20%, white);
104
- --p-accent-300: color-mix(in srgb, var(--p-accent) 30%, white);
105
- --p-accent-400: color-mix(in srgb, var(--p-accent) 40%, white);
106
- --p-accent-500: var(--p-accent);
107
- --p-accent-600: color-mix(in srgb, var(--p-accent) 80%, black);
108
- --p-accent-700: color-mix(in srgb, var(--p-accent) 70%, black);
109
- --p-accent-800: color-mix(in srgb, var(--p-accent) 60%, black);
110
- --p-accent-900: color-mix(in srgb, var(--p-accent) 50%, black);
111
- --p-accent-950: color-mix(in srgb, var(--p-accent) 40%, black);
112
-
113
- /* Neutral gray — no warm/cool color cast (Tailwind "Neutral" palette) */
114
- --p-surface-0: #ffffff;
115
- --p-surface-50: #fafafa;
116
- --p-surface-100: #f5f5f5;
117
- --p-surface-200: #e5e5e5;
118
- --p-surface-300: #d4d4d4;
119
- --p-surface-400: #a3a3a3;
120
- --p-surface-500: #737373;
121
- --p-surface-600: #525252;
122
- --p-surface-700: #404040;
123
- --p-surface-800: #262626;
124
- --p-surface-850: color-mix(in srgb, var(--p-surface-800) 50%, var(--p-surface-900));
125
- --p-surface-900: #171717;
126
- --p-surface-950: #0a0a0a;
127
- --p-content-border-radius: 6px;
128
- }
129
-
130
- /* Light */
131
- :root {
132
- --p-primary-color: var(--p-primary-500);
133
- --p-primary-contrast-color: var(--p-surface-0);
134
- --p-primary-hover-color: var(--p-primary-600);
135
- --p-primary-active-color: var(--p-primary-700);
136
- --p-content-border-color: var(--p-surface-200);
137
- --p-content-hover-background: var(--p-surface-100);
138
- --p-content-hover-color: var(--p-surface-800);
139
- --p-highlight-background: var(--p-primary-50);
140
- --p-highlight-color: var(--p-primary-700);
141
- --p-highlight-focus-background: var(--p-primary-100);
142
- --p-highlight-focus-color: var(--p-primary-800);
143
- --p-content-background: var(--p-surface-0);
144
- --p-text-color: var(--p-surface-700);
145
- --p-text-hover-color: var(--p-surface-800);
146
- --p-text-muted-color: var(--p-surface-500);
147
- --p-text-hover-muted-color: var(--p-surface-600);
148
- }
149
-
150
- /*
151
- * Dark Mode
152
- * Defaults to system, change the selector to match the darkMode in tailwind.config.
153
- * For example;
154
- * darkMode: ['selector', '[class*="app-dark"]']
155
- * should be;
156
- * :root[class="app-dark"] {
157
- */
158
- @media (prefers-color-scheme: dark) {
159
- :root {
160
-
161
- --p-surface-D: #fff;
162
- --p-surface-0: #fff;
163
- --p-surface-50: #fafafa;
164
- --p-surface-100: #f4f4f5;
165
- --p-surface-200: #e4e4e7;
166
- --p-surface-300: #d4d4d8;
167
- --p-surface-400: #a1a1aa;
168
- --p-surface-500: #71717a;
169
- --p-surface-600: #545250; /* Less colorful warm tone */
170
- --p-surface-700: #403e3c; /* Less colorful warm tone */
171
- --p-surface-800: #2b2927; /* Less colorful warm tone */
172
- --p-surface-850: color-mix(in srgb, var(--p-surface-800) 50%, var(--p-surface-900));
173
- --p-surface-900: #1c1a19; /* Less colorful warm tone */
174
- --p-surface-950: #0f0e0d; /* Less colorful warm tone */
175
-
176
- --p-primary: rgb(0, 125, 178);
177
-
178
- /* Using color-mix to create a numbered variable system */
179
- --p-primary-50: color-mix(in srgb, var(--p-primary) 5%, white); /* #f2f5fa */
180
- --p-primary-100: color-mix(in srgb, var(--p-primary) 10%, white); /* #e6ebf5 */
181
- --p-primary-200: color-mix(in srgb, var(--p-primary) 20%, white); /* #ccd6eb */
182
- --p-primary-300: color-mix(in srgb, var(--p-primary) 30%, white); /* #b3c2e0 */
183
- --p-primary-400: color-mix(in srgb, var(--p-primary) 40%, white); /* #99add6 */
184
- --p-primary-500: var(--p-primary); /* #005fb2 */
185
- --p-primary-600: color-mix(in srgb, var(--p-primary) 80%, black); /* #004c8e */
186
- --p-primary-700: color-mix(in srgb, var(--p-primary) 70%, black); /* #00427c */
187
- --p-primary-800: color-mix(in srgb, var(--p-primary) 60%, black); /* #00386a */
188
- --p-primary-900: color-mix(in srgb, var(--p-primary) 50%, black); /* #002f59 */
189
- --p-primary-950: color-mix(in srgb, var(--p-primary) 40%, black); /* #002647 */
190
-
191
-
192
- --p-primary-color: var(--p-primary-400);
193
- --p-primary-contrast-color: var(--p-surface-900);
194
- --p-primary-hover-color: var(--p-primary-300);
195
- --p-primary-active-color: var(--p-primary-200);
196
- --p-content-border-color: var(--p-surface-700);
197
- --p-content-hover-background: var(--p-surface-800);
198
- --p-content-hover-color: var(--p-surface-0);
199
- --p-highlight-background: color-mix(in srgb, var(--p-primary-400), transparent 84%);
200
- --p-highlight-color: rgba(255, 255, 255, 87%);
201
- --p-highlight-focus-background: color-mix(in srgb, var(--p-primary-400), transparent 76%);
202
- --p-highlight-focus-color: rgba(255, 255, 255, 87%);
203
- --p-content-background: var(--p-surface-900);
204
- --p-text-color: var(--p-surface-0);
205
- --p-text-hover-color: var(--p-surface-0);
206
- --p-text-muted-color: var(--p-surface-400);
207
- --p-text-hover-muted-color: var(--p-surface-300);
208
- }
209
- }
1
+ /* Primary and Surface Palettes */
2
+ :root {
3
+ /* color-scheme drives native UI (form controls, scrollbars) and any light-dark().
4
+ `light dark` = follow OS by default; forced scopes below override it. */
5
+ color-scheme: light dark;
6
+
7
+ --p-primary: rgb(0, 95, 178);
8
+
9
+ /* Using color-mix to create a numbered variable system */
10
+ --p-primary-50: color-mix(in srgb, var(--p-primary) 5%, white); /* #f2f5fa */
11
+ --p-primary-100: color-mix(in srgb, var(--p-primary) 10%, white); /* #e6ebf5 */
12
+ --p-primary-200: color-mix(in srgb, var(--p-primary) 20%, white); /* #ccd6eb */
13
+ --p-primary-300: color-mix(in srgb, var(--p-primary) 30%, white); /* #b3c2e0 */
14
+ --p-primary-400: color-mix(in srgb, var(--p-primary) 40%, white); /* #99add6 */
15
+ --p-primary-500: var(--p-primary); /* #005fb2 */
16
+ --p-primary-600: color-mix(in srgb, var(--p-primary) 80%, black); /* #004c8e */
17
+ --p-primary-700: color-mix(in srgb, var(--p-primary) 70%, black); /* #00427c */
18
+ --p-primary-800: color-mix(in srgb, var(--p-primary) 60%, black); /* #00386a */
19
+ --p-primary-900: color-mix(in srgb, var(--p-primary) 50%, black); /* #002f59 */
20
+ --p-primary-950: color-mix(in srgb, var(--p-primary) 40%, black); /* #002647 */
21
+
22
+ /* Define secondary base color */
23
+ --p-secondary: #6f7385;
24
+
25
+ /* Create secondary color scale using color-mix */
26
+ --p-secondary-50: color-mix(in srgb, var(--p-secondary) 5%, white); /* #f7f7f8 */
27
+ --p-secondary-100: color-mix(in srgb, var(--p-secondary) 10%, white); /* #ededf1 */
28
+ --p-secondary-200: color-mix(in srgb, var(--p-secondary) 20%, white); /* #d8d9df */
29
+ --p-secondary-300: color-mix(in srgb, var(--p-secondary) 35%, white); /* #b6b8c3 */
30
+ --p-secondary-400: color-mix(in srgb, var(--p-secondary) 65%, white); /* #8e92a2 */
31
+ --p-secondary-500: var(--p-secondary); /* #6f7385 */
32
+ --p-secondary-600: color-mix(in srgb, var(--p-secondary) 80%, black); /* #5a5d6f */
33
+ --p-secondary-700: color-mix(in srgb, var(--p-secondary) 65%, black); /* #4a4c5a */
34
+ --p-secondary-800: color-mix(in srgb, var(--p-secondary) 55%, black); /* #40424c */
35
+ --p-secondary-900: color-mix(in srgb, var(--p-secondary) 50%, black); /* #383942 */
36
+ --p-secondary-950: color-mix(in srgb, var(--p-secondary) 30%, black); /* #25252c */
37
+
38
+ /* Severity palettes */
39
+ --p-danger: rgb(239, 68, 68);
40
+ --p-danger-50: color-mix(in srgb, var(--p-danger) 5%, white);
41
+ --p-danger-100: color-mix(in srgb, var(--p-danger) 10%, white);
42
+ --p-danger-200: color-mix(in srgb, var(--p-danger) 20%, white);
43
+ --p-danger-300: color-mix(in srgb, var(--p-danger) 30%, white);
44
+ --p-danger-400: color-mix(in srgb, var(--p-danger) 40%, white);
45
+ --p-danger-500: var(--p-danger);
46
+ --p-danger-600: color-mix(in srgb, var(--p-danger) 80%, black);
47
+ --p-danger-700: color-mix(in srgb, var(--p-danger) 70%, black);
48
+ --p-danger-800: color-mix(in srgb, var(--p-danger) 60%, black);
49
+ --p-danger-900: color-mix(in srgb, var(--p-danger) 50%, black);
50
+ --p-danger-950: color-mix(in srgb, var(--p-danger) 40%, black);
51
+
52
+ --p-success: rgb(34, 197, 94);
53
+ --p-success-50: color-mix(in srgb, var(--p-success) 5%, white);
54
+ --p-success-100: color-mix(in srgb, var(--p-success) 10%, white);
55
+ --p-success-200: color-mix(in srgb, var(--p-success) 20%, white);
56
+ --p-success-300: color-mix(in srgb, var(--p-success) 30%, white);
57
+ --p-success-400: color-mix(in srgb, var(--p-success) 40%, white);
58
+ --p-success-500: var(--p-success);
59
+ --p-success-600: color-mix(in srgb, var(--p-success) 80%, black);
60
+ --p-success-700: color-mix(in srgb, var(--p-success) 70%, black);
61
+ --p-success-800: color-mix(in srgb, var(--p-success) 60%, black);
62
+ --p-success-900: color-mix(in srgb, var(--p-success) 50%, black);
63
+ --p-success-950: color-mix(in srgb, var(--p-success) 40%, black);
64
+
65
+ --p-warn: rgb(249, 115, 22);
66
+ --p-warn-50: color-mix(in srgb, var(--p-warn) 5%, white);
67
+ --p-warn-100: color-mix(in srgb, var(--p-warn) 10%, white);
68
+ --p-warn-200: color-mix(in srgb, var(--p-warn) 20%, white);
69
+ --p-warn-300: color-mix(in srgb, var(--p-warn) 30%, white);
70
+ --p-warn-400: color-mix(in srgb, var(--p-warn) 40%, white);
71
+ --p-warn-500: var(--p-warn);
72
+ --p-warn-600: color-mix(in srgb, var(--p-warn) 80%, black);
73
+ --p-warn-700: color-mix(in srgb, var(--p-warn) 70%, black);
74
+ --p-warn-800: color-mix(in srgb, var(--p-warn) 60%, black);
75
+ --p-warn-900: color-mix(in srgb, var(--p-warn) 50%, black);
76
+ --p-warn-950: color-mix(in srgb, var(--p-warn) 40%, black);
77
+
78
+ --p-info: rgb(14, 165, 233);
79
+ --p-info-50: color-mix(in srgb, var(--p-info) 5%, white);
80
+ --p-info-100: color-mix(in srgb, var(--p-info) 10%, white);
81
+ --p-info-200: color-mix(in srgb, var(--p-info) 20%, white);
82
+ --p-info-300: color-mix(in srgb, var(--p-info) 30%, white);
83
+ --p-info-400: color-mix(in srgb, var(--p-info) 40%, white);
84
+ --p-info-500: var(--p-info);
85
+ --p-info-600: color-mix(in srgb, var(--p-info) 80%, black);
86
+ --p-info-700: color-mix(in srgb, var(--p-info) 70%, black);
87
+ --p-info-800: color-mix(in srgb, var(--p-info) 60%, black);
88
+ --p-info-900: color-mix(in srgb, var(--p-info) 50%, black);
89
+ --p-info-950: color-mix(in srgb, var(--p-info) 40%, black);
90
+
91
+ --p-help: rgb(168, 85, 247);
92
+ --p-help-50: color-mix(in srgb, var(--p-help) 5%, white);
93
+ --p-help-100: color-mix(in srgb, var(--p-help) 10%, white);
94
+ --p-help-200: color-mix(in srgb, var(--p-help) 20%, white);
95
+ --p-help-300: color-mix(in srgb, var(--p-help) 30%, white);
96
+ --p-help-400: color-mix(in srgb, var(--p-help) 40%, white);
97
+ --p-help-500: var(--p-help);
98
+ --p-help-600: color-mix(in srgb, var(--p-help) 80%, black);
99
+ --p-help-700: color-mix(in srgb, var(--p-help) 70%, black);
100
+ --p-help-800: color-mix(in srgb, var(--p-help) 60%, black);
101
+ --p-help-900: color-mix(in srgb, var(--p-help) 50%, black);
102
+ --p-help-950: color-mix(in srgb, var(--p-help) 40%, black);
103
+
104
+ --p-accent: rgb(20, 184, 166);
105
+ --p-accent-50: color-mix(in srgb, var(--p-accent) 5%, white);
106
+ --p-accent-100: color-mix(in srgb, var(--p-accent) 10%, white);
107
+ --p-accent-200: color-mix(in srgb, var(--p-accent) 20%, white);
108
+ --p-accent-300: color-mix(in srgb, var(--p-accent) 30%, white);
109
+ --p-accent-400: color-mix(in srgb, var(--p-accent) 40%, white);
110
+ --p-accent-500: var(--p-accent);
111
+ --p-accent-600: color-mix(in srgb, var(--p-accent) 80%, black);
112
+ --p-accent-700: color-mix(in srgb, var(--p-accent) 70%, black);
113
+ --p-accent-800: color-mix(in srgb, var(--p-accent) 60%, black);
114
+ --p-accent-900: color-mix(in srgb, var(--p-accent) 50%, black);
115
+ --p-accent-950: color-mix(in srgb, var(--p-accent) 40%, black);
116
+
117
+ /* Neutral gray — no warm/cool color cast (Tailwind "Neutral" palette) */
118
+ --p-surface-0: #ffffff;
119
+ --p-surface-50: #fafafa;
120
+ --p-surface-100: #f5f5f5;
121
+ --p-surface-200: #e5e5e5;
122
+ --p-surface-300: #d4d4d4;
123
+ --p-surface-400: #a3a3a3;
124
+ --p-surface-500: #737373;
125
+ --p-surface-600: #525252;
126
+ --p-surface-700: #404040;
127
+ --p-surface-800: #262626;
128
+ --p-surface-850: color-mix(in srgb, var(--p-surface-800) 50%, var(--p-surface-900));
129
+ --p-surface-900: #171717;
130
+ --p-surface-950: #0a0a0a;
131
+ --p-content-border-radius: 6px;
132
+ }
133
+
134
+ /* Light (default semantic mapping) */
135
+ :root {
136
+ --p-primary-color: var(--p-primary-500);
137
+ --p-primary-contrast-color: var(--p-surface-0);
138
+ --p-primary-hover-color: var(--p-primary-600);
139
+ --p-primary-active-color: var(--p-primary-700);
140
+ --p-content-border-color: var(--p-surface-200);
141
+ --p-content-hover-background: var(--p-surface-100);
142
+ --p-content-hover-color: var(--p-surface-800);
143
+ --p-highlight-background: var(--p-primary-50);
144
+ --p-highlight-color: var(--p-primary-700);
145
+ --p-highlight-focus-background: var(--p-primary-100);
146
+ --p-highlight-focus-color: var(--p-primary-800);
147
+ --p-content-background: var(--p-surface-0);
148
+ --p-text-color: var(--p-surface-700);
149
+ --p-text-hover-color: var(--p-surface-800);
150
+ --p-text-muted-color: var(--p-surface-500);
151
+ --p-text-hover-muted-color: var(--p-surface-600);
152
+ }
153
+
154
+ /*
155
+ * Dark Mode — three-state forcing model
156
+ * ─────────────────────────────────────
157
+ * Tokens follow the OS by default (the @media block), but a `w-theme-dark` /
158
+ * `w-theme-light` class on <html> (or ANY element, for subtree theming) forces a
159
+ * specific mode. This MUST stay in sync with the `darkMode` variant in
160
+ * tailwind.config.ts so `dark:` utilities and `--p-*` tokens flip together.
161
+ *
162
+ * auto : no class → @media (prefers-color-scheme: dark)
163
+ * forced : .w-theme-dark / .w-theme-light (anywhere in the tree)
164
+ *
165
+ * The dark declarations are intentionally duplicated between the @media (auto)
166
+ * and .w-theme-dark (forced) rules — plain CSS cannot share one declaration list
167
+ * across a media-query rule and a normal rule. Keep the two dark blocks identical.
168
+ */
169
+
170
+ /* (auto) OS dark — unless a forced-light scope opts out via :not(.w-theme-light) */
171
+ @media (prefers-color-scheme: dark) {
172
+ :root:not(.w-theme-light) {
173
+ --p-surface-D: #fff;
174
+ --p-surface-0: #fff;
175
+ --p-surface-50: #fafafa;
176
+ --p-surface-100: #f4f4f5;
177
+ --p-surface-200: #e4e4e7;
178
+ --p-surface-300: #d4d4d8;
179
+ --p-surface-400: #a1a1aa;
180
+ --p-surface-500: #71717a;
181
+ --p-surface-600: #545250; /* Less colorful warm tone */
182
+ --p-surface-700: #403e3c; /* Less colorful warm tone */
183
+ --p-surface-800: #2b2927; /* Less colorful warm tone */
184
+ --p-surface-850: color-mix(in srgb, var(--p-surface-800) 50%, var(--p-surface-900));
185
+ --p-surface-900: #1c1a19; /* Less colorful warm tone */
186
+ --p-surface-950: #0f0e0d; /* Less colorful warm tone */
187
+
188
+ --p-primary: rgb(0, 125, 178);
189
+ --p-primary-50: color-mix(in srgb, var(--p-primary) 5%, white);
190
+ --p-primary-100: color-mix(in srgb, var(--p-primary) 10%, white);
191
+ --p-primary-200: color-mix(in srgb, var(--p-primary) 20%, white);
192
+ --p-primary-300: color-mix(in srgb, var(--p-primary) 30%, white);
193
+ --p-primary-400: color-mix(in srgb, var(--p-primary) 40%, white);
194
+ --p-primary-500: var(--p-primary);
195
+ --p-primary-600: color-mix(in srgb, var(--p-primary) 80%, black);
196
+ --p-primary-700: color-mix(in srgb, var(--p-primary) 70%, black);
197
+ --p-primary-800: color-mix(in srgb, var(--p-primary) 60%, black);
198
+ --p-primary-900: color-mix(in srgb, var(--p-primary) 50%, black);
199
+ --p-primary-950: color-mix(in srgb, var(--p-primary) 40%, black);
200
+
201
+ --p-primary-color: var(--p-primary-400);
202
+ --p-primary-contrast-color: var(--p-surface-900);
203
+ --p-primary-hover-color: var(--p-primary-300);
204
+ --p-primary-active-color: var(--p-primary-200);
205
+ --p-content-border-color: var(--p-surface-700);
206
+ --p-content-hover-background: var(--p-surface-800);
207
+ --p-content-hover-color: var(--p-surface-0);
208
+ --p-highlight-background: color-mix(in srgb, var(--p-primary-400), transparent 84%);
209
+ --p-highlight-color: rgba(255, 255, 255, 87%);
210
+ --p-highlight-focus-background: color-mix(in srgb, var(--p-primary-400), transparent 76%);
211
+ --p-highlight-focus-color: rgba(255, 255, 255, 87%);
212
+ --p-content-background: var(--p-surface-900);
213
+ --p-text-color: var(--p-surface-0);
214
+ --p-text-hover-color: var(--p-surface-0);
215
+ --p-text-muted-color: var(--p-surface-400);
216
+ --p-text-hover-muted-color: var(--p-surface-300);
217
+ }
218
+ }
219
+
220
+ /* (forced dark) — root or subtree. Keep declarations identical to the @media block above. */
221
+ :root.w-theme-dark, .w-theme-dark {
222
+ color-scheme: dark;
223
+
224
+ --p-surface-D: #fff;
225
+ --p-surface-0: #fff;
226
+ --p-surface-50: #fafafa;
227
+ --p-surface-100: #f4f4f5;
228
+ --p-surface-200: #e4e4e7;
229
+ --p-surface-300: #d4d4d8;
230
+ --p-surface-400: #a1a1aa;
231
+ --p-surface-500: #71717a;
232
+ --p-surface-600: #545250; /* Less colorful warm tone */
233
+ --p-surface-700: #403e3c; /* Less colorful warm tone */
234
+ --p-surface-800: #2b2927; /* Less colorful warm tone */
235
+ --p-surface-850: color-mix(in srgb, var(--p-surface-800) 50%, var(--p-surface-900));
236
+ --p-surface-900: #1c1a19; /* Less colorful warm tone */
237
+ --p-surface-950: #0f0e0d; /* Less colorful warm tone */
238
+
239
+ --p-primary: rgb(0, 125, 178);
240
+ --p-primary-50: color-mix(in srgb, var(--p-primary) 5%, white);
241
+ --p-primary-100: color-mix(in srgb, var(--p-primary) 10%, white);
242
+ --p-primary-200: color-mix(in srgb, var(--p-primary) 20%, white);
243
+ --p-primary-300: color-mix(in srgb, var(--p-primary) 30%, white);
244
+ --p-primary-400: color-mix(in srgb, var(--p-primary) 40%, white);
245
+ --p-primary-500: var(--p-primary);
246
+ --p-primary-600: color-mix(in srgb, var(--p-primary) 80%, black);
247
+ --p-primary-700: color-mix(in srgb, var(--p-primary) 70%, black);
248
+ --p-primary-800: color-mix(in srgb, var(--p-primary) 60%, black);
249
+ --p-primary-900: color-mix(in srgb, var(--p-primary) 50%, black);
250
+ --p-primary-950: color-mix(in srgb, var(--p-primary) 40%, black);
251
+
252
+ --p-primary-color: var(--p-primary-400);
253
+ --p-primary-contrast-color: var(--p-surface-900);
254
+ --p-primary-hover-color: var(--p-primary-300);
255
+ --p-primary-active-color: var(--p-primary-200);
256
+ --p-content-border-color: var(--p-surface-700);
257
+ --p-content-hover-background: var(--p-surface-800);
258
+ --p-content-hover-color: var(--p-surface-0);
259
+ --p-highlight-background: color-mix(in srgb, var(--p-primary-400), transparent 84%);
260
+ --p-highlight-color: rgba(255, 255, 255, 87%);
261
+ --p-highlight-focus-background: color-mix(in srgb, var(--p-primary-400), transparent 76%);
262
+ --p-highlight-focus-color: rgba(255, 255, 255, 87%);
263
+ --p-content-background: var(--p-surface-900);
264
+ --p-text-color: var(--p-surface-0);
265
+ --p-text-hover-color: var(--p-surface-0);
266
+ --p-text-muted-color: var(--p-surface-400);
267
+ --p-text-hover-muted-color: var(--p-surface-300);
268
+ }
269
+
270
+ /* (forced light) — root or subtree. Re-asserts the light tokens so a forced-light
271
+ scope overrides an inherited dark scope (and an OS-dark default). */
272
+ :root.w-theme-light, .w-theme-light {
273
+ color-scheme: light;
274
+
275
+ --p-surface-0: #ffffff;
276
+ --p-surface-50: #fafafa;
277
+ --p-surface-100: #f5f5f5;
278
+ --p-surface-200: #e5e5e5;
279
+ --p-surface-300: #d4d4d4;
280
+ --p-surface-400: #a3a3a3;
281
+ --p-surface-500: #737373;
282
+ --p-surface-600: #525252;
283
+ --p-surface-700: #404040;
284
+ --p-surface-800: #262626;
285
+ --p-surface-850: color-mix(in srgb, var(--p-surface-800) 50%, var(--p-surface-900));
286
+ --p-surface-900: #171717;
287
+ --p-surface-950: #0a0a0a;
288
+
289
+ --p-primary: rgb(0, 95, 178);
290
+ --p-primary-50: color-mix(in srgb, var(--p-primary) 5%, white);
291
+ --p-primary-100: color-mix(in srgb, var(--p-primary) 10%, white);
292
+ --p-primary-200: color-mix(in srgb, var(--p-primary) 20%, white);
293
+ --p-primary-300: color-mix(in srgb, var(--p-primary) 30%, white);
294
+ --p-primary-400: color-mix(in srgb, var(--p-primary) 40%, white);
295
+ --p-primary-500: var(--p-primary);
296
+ --p-primary-600: color-mix(in srgb, var(--p-primary) 80%, black);
297
+ --p-primary-700: color-mix(in srgb, var(--p-primary) 70%, black);
298
+ --p-primary-800: color-mix(in srgb, var(--p-primary) 60%, black);
299
+ --p-primary-900: color-mix(in srgb, var(--p-primary) 50%, black);
300
+ --p-primary-950: color-mix(in srgb, var(--p-primary) 40%, black);
301
+
302
+ --p-primary-color: var(--p-primary-500);
303
+ --p-primary-contrast-color: var(--p-surface-0);
304
+ --p-primary-hover-color: var(--p-primary-600);
305
+ --p-primary-active-color: var(--p-primary-700);
306
+ --p-content-border-color: var(--p-surface-200);
307
+ --p-content-hover-background: var(--p-surface-100);
308
+ --p-content-hover-color: var(--p-surface-800);
309
+ --p-highlight-background: var(--p-primary-50);
310
+ --p-highlight-color: var(--p-primary-700);
311
+ --p-highlight-focus-background: var(--p-primary-100);
312
+ --p-highlight-focus-color: var(--p-primary-800);
313
+ --p-content-background: var(--p-surface-0);
314
+ --p-text-color: var(--p-surface-700);
315
+ --p-text-hover-color: var(--p-surface-800);
316
+ --p-text-muted-color: var(--p-surface-500);
317
+ --p-text-hover-muted-color: var(--p-surface-600);
318
+ }