@brignano/design 0.12.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/DESIGN.md +179 -23
  2. package/README.md +51 -3
  3. package/components.css +249 -249
  4. package/controls.css +2251 -0
  5. package/decisions/0001-cobalt.md +1 -1
  6. package/decisions/0008-cobalt-hue-256.md +1 -1
  7. package/decisions/0014-identity.md +1 -1
  8. package/decisions/0015-white-label-on-cobalt.md +1 -1
  9. package/decisions/0017-product-identity.md +1 -1
  10. package/decisions/0019-house-theme-shell.md +51 -0
  11. package/decisions/0020-kits-opt-in.md +56 -0
  12. package/decisions/README.md +2 -0
  13. package/kits/larch.css +125 -0
  14. package/kits/ledger.css +121 -0
  15. package/kits/split.css +123 -0
  16. package/package.json +13 -2
  17. package/product-page.css +82 -82
  18. package/scripts/colour.mjs +42 -0
  19. package/scripts/theme.mjs +190 -0
  20. package/tailwind.css +13 -20
  21. package/templates/app-shell.css +15 -15
  22. package/templates/article.css +26 -26
  23. package/templates/changelog.css +9 -9
  24. package/templates/email.html +3 -3
  25. package/templates/error.css +7 -7
  26. package/templates/legal.css +11 -11
  27. package/templates/settings.css +9 -9
  28. package/themes/driftwood.css +109 -0
  29. package/themes/driftwood.theme +5 -0
  30. package/themes/guidebook.css +104 -0
  31. package/themes/guidebook.theme +5 -0
  32. package/themes/homelab.css +101 -0
  33. package/themes/homelab.theme +2 -0
  34. package/themes/receipts.css +101 -0
  35. package/themes/receipts.theme +2 -0
  36. package/themes/sites.css +106 -0
  37. package/themes/sites.theme +7 -0
  38. package/tokens/base.css +37 -0
  39. package/tokens/chart.json +145 -0
  40. package/tokens/color.json +840 -0
  41. package/tokens/component.json +75 -0
  42. package/tokens/head.css +84 -0
  43. package/tokens/kits/larch.json +255 -0
  44. package/tokens/kits/ledger.json +247 -0
  45. package/tokens/kits/split.json +247 -0
  46. package/tokens/motion.json +38 -0
  47. package/tokens/names.d.ts +246 -0
  48. package/tokens/shape.json +56 -0
  49. package/tokens/space.json +99 -0
  50. package/tokens/tailwind.json +343 -0
  51. package/tokens/type.json +206 -0
  52. package/tokens.chart.css +23 -23
  53. package/tokens.css +278 -136
package/tokens.css CHANGED
@@ -1,3 +1,6 @@
1
+ /* GENERATED by scripts/build.mjs from tokens/*.json (and tokens/head.css, tokens/base.css). Edit that, then `npm run build`. */
2
+
3
+
1
4
  /* ─────────────────────────────────────────────────────────────────────────
2
5
  tokens.css — the shared foundation for every brignano surface.
3
6
 
@@ -11,7 +14,7 @@
11
14
  on every surface. That is the whole design of this file.
12
15
 
13
16
  NEUTRAL the page. Most of every screen.
14
- --i-* "you can act on this" cobalt
17
+ --action-* "you can act on this" cobalt
15
18
  --success "settled, confirmed, done" forest
16
19
  --attention "this wants you" larch amber
17
20
  --danger "this has gone wrong" rust
@@ -70,12 +73,15 @@
70
73
  a higher mix — 12% over #0d0d0f is invisible where it reads on white.
71
74
 
72
75
  Ratios are given light / dark. */
76
+
73
77
  :root {
74
78
  color-scheme: light dark;
75
79
  }
80
+
76
81
  [data-theme='light'] {
77
82
  color-scheme: light;
78
83
  }
84
+
79
85
  [data-theme='dark'] {
80
86
  color-scheme: dark;
81
87
  }
@@ -91,57 +97,60 @@
91
97
 
92
98
  ONE TEMPERATURE, top to bottom, both themes: every tinted step sits at
93
99
  OKLCH hue 286° (±3°, `npm run check` holds it). Chroma is a whisper at
94
- the ends (~0.0015 at n-25) and peaks in the mid-tones (~0.015 at
95
- n-700), where a grey reads most neutral-flat without it. Only pure
96
- white (light n-0) is untinted. An earlier ramp mixed warm hairlines
100
+ the ends (~0.0015 at neutral-25) and peaks in the mid-tones (~0.015 at
101
+ neutral-700), where a grey reads most neutral-flat without it. Only pure
102
+ white (light neutral-0) is untinted. An earlier ramp mixed warm hairlines
97
103
  (106°) with cool text, so a border and the label beside it disagreed.
98
104
 
99
105
  Changing a step: keep its OKLCH lightness, keep the hue, re-run the
100
106
  check. */
101
- --n-0: light-dark(#ffffff, #0d0d0f);
102
- --n-25: light-dark(#fafafb, #131316);
103
- --n-50: light-dark(#f3f3f4, #17171a);
104
- --n-100: light-dark(#ececee, #202024); /* hairline */
105
- --n-200: light-dark(#e1e1e4, #2a2a2f); /* hover surface */
106
- --n-300: light-dark(#cbcbce, #3a3a41); /* strong border, pressed surface */
107
- --n-400: light-dark(#a9a9ae, #55555e);
108
- --n-500: light-dark(#8a8a8f, #8b8b93); /* 3.44:1 — UI marks only, never text / 5.29:1 */
109
- --n-600: light-dark(#6b6b73, #9c9ca4); /* muted label 5.28:1 */
110
- --n-700: light-dark(#52525b, #a8a8b0); /* secondary 7.73:1 / 7.58:1 */
111
- --n-800: light-dark(#33333a, #d0d0d5);
112
- --n-900: light-dark(#111114, #f2f2f4); /* primary 18.85:1 / 16.00:1 */
107
+ --neutral-0: light-dark(#ffffff, #0d0d0f);
108
+ --neutral-25: light-dark(#fafafb, #131316);
109
+ --neutral-50: light-dark(#f3f3f4, #17171a);
110
+ --neutral-100: light-dark(#ececee, #202024); /* hairline */
111
+ --neutral-200: light-dark(#e1e1e4, #2a2a2f); /* hover surface */
112
+ --neutral-300: light-dark(#cbcbce, #3a3a41); /* strong border, pressed surface */
113
+ --neutral-400: light-dark(#a9a9ae, #55555e);
114
+ --neutral-500: light-dark(#8a8a8f, #8b8b93); /* 3.44:1 — UI marks only, never text / 5.29:1 */
115
+ --neutral-600: light-dark(#6b6b73, #9c9ca4); /* muted label 5.28:1 */
116
+ --neutral-700: light-dark(#52525b, #a8a8b0); /* secondary 7.73:1 / 7.58:1 */
117
+ --neutral-800: light-dark(#33333a, #d0d0d5);
118
+ --neutral-900: light-dark(#111114, #f2f2f4); /* primary 18.85:1 / 16.00:1 */
113
119
 
114
120
  /* Semantic aliases. Components use THESE, not the raw steps.
115
121
  Where a role sits on a different step in each theme, the step's two
116
122
  hexes are written out (rule 2) and named in the comment; the check
117
123
  holds them to the ramp. */
118
- --bg: light-dark(#fafafb, #0d0d0f); /* n-25 / n-0 */
119
- --card: light-dark(#ffffff, #17171a); /* n-0 / n-50 */
120
- --surface-hover: var(--n-100);
121
- --surface-active: var(--n-200);
124
+ --bg: light-dark(#fafafb, #0d0d0f); /* neutral-25 / neutral-0 */
125
+ --card: light-dark(#ffffff, #17171a); /* neutral-0 / neutral-50 */
126
+ --surface-hover: var(--neutral-100);
127
+ --surface-active: var(--neutral-200);
128
+
122
129
  /* Sticky chrome — a header or toolbar that content scrolls under, usually
123
130
  with `backdrop-filter: blur()`. 92% of the surface it sits on: the card
124
131
  in light, the page ground in dark, where cards are lighter than the
125
132
  page. A token so consumers never color-mix() one (DESIGN.md §11). */
126
133
  --surface-sticky: light-dark(color-mix(in srgb, #ffffff 92%, transparent), color-mix(in srgb, #0d0d0f 92%, transparent)); /* card / bg */
127
- --ink: var(--n-900);
128
- --ink-soft: var(--n-700);
129
- --slate: light-dark(#6b6b73, #8b8b93); /* n-600 / n-500 — text-safe: eyebrows, axis labels, captions */
130
- --line: var(--n-100);
131
- --line-soft: var(--n-50);
132
- --line-strong: var(--n-300); /* 1.62:1 — decoration, not a boundary */
134
+ --ink: var(--neutral-900);
135
+ --ink-soft: var(--neutral-700);
136
+ --slate: light-dark(#6b6b73, #8b8b93); /* neutral-600 / neutral-500 — text-safe: eyebrows, axis labels, captions */
137
+ --line: var(--neutral-100);
138
+ --line-soft: var(--neutral-50);
139
+ --line-strong: var(--neutral-300); /* 1.62:1 — decoration, not a boundary */
140
+
133
141
  /* The edge that tells you a control is there: inputs, secondary buttons.
134
142
  WCAG 1.4.11 asks 3:1 of a boundary you need to find the control, which
135
- --line-strong is nowhere near. Light is n-500 (3.44:1 on card, 3.29:1
136
- on bg); dark sits between n-400 and n-500, which the ramp has no step
143
+ --line-strong is nowhere near. Light is neutral-500 (3.44:1 on card, 3.29:1
144
+ on bg); dark sits between neutral-400 and neutral-500, which the ramp has no step
137
145
  for (3.39:1 on card, 3.68:1 on bg). */
138
146
  --line-control: light-dark(#8a8a8f, #6b6b73);
139
- --on-dark: light-dark(#fafafb, #0d0d0f); /* n-25 / n-0 */
147
+ --on-dark: light-dark(#fafafb, #0d0d0f); /* neutral-25 / neutral-0 */
148
+
140
149
  /* A phone's bezel (.pp-device). A phone is a dark object in either theme,
141
150
  so this stays dark rather than flipping with --ink, which would draw a
142
- near-white bezel in dark mode. Dark lifts it to n-300 so the frame still
151
+ near-white bezel in dark mode. Dark lifts it to neutral-300 so the frame still
143
152
  has an edge against the near-black page. Decoration, not a boundary. */
144
- --device: light-dark(#111114, #3a3a41); /* n-900 / n-300 */
153
+ --device: light-dark(#111114, #3a3a41); /* neutral-900 / neutral-300 */
145
154
 
146
155
  /* ── Interactive — cobalt ─────────────────────────────────────────────
147
156
  Everything you can act on: links, buttons, focus, selection. Chosen to
@@ -154,34 +163,36 @@
154
163
  chroma. It is deliberately NOT Tailwind's blue-600 (263°, a touch
155
164
  violet and electric): same affordance, our own colour (ADR-0008).
156
165
 
157
- --i fill 5.18:1 / 3.78:1 (label 5.18 / 4.73)
158
- --i-ink link/icon/focus 6.78:1 / 7.07:1
159
- --i-hover hover fill label 8.65:1 / 5.88:1
160
- --i-ink-hover hovered link 8.65:1 / 9.95:1 on --card
161
- --i-pressed pressed fill label 10.44:1 / 7.52:1
166
+ --action fill 5.18:1 / 3.78:1 (label 5.18 / 4.73)
167
+ --action-ink link/icon/focus 6.78:1 / 7.07:1
168
+ --action-hover hover fill label 8.65:1 / 5.88:1
169
+ --action-ink-hover hovered link 8.65:1 / 9.95:1 on --card
170
+ --action-pressed pressed fill label 10.44:1 / 7.52:1
162
171
 
163
172
  The fill is a saturated mid-cobalt with a WHITE label in both themes,
164
173
  and hover and pressed step darker in both. Dark used to lift the fill
165
174
  to the ink's pale blue with a dark label, which read as washed out on
166
175
  the most important control on the screen. So in dark the fill and the
167
- ink are now different steps: --i fills, --i-ink is what you read
176
+ ink are now different steps: --action fills, --action-ink is what you read
168
177
  (links, icons, the focus ring). The dark fill is as light as a white
169
178
  label allows (4.5:1), which is what keeps it 3:1 as a mark on --card,
170
179
  --bg and its own wash.
171
180
 
172
181
  DISABLED IS NEUTRAL, NEVER HUED — a greyed-out control must stop
173
182
  signalling "click me". */
174
- --i: light-dark(#076bd3, #0371e0);
175
- --i-ink: light-dark(#0159b5, #6ba5f3);
176
- --i-hover: light-dark(#014a97, #0062c7);
183
+ --action: light-dark(#076bd3, #0371e0);
184
+ --action-ink: light-dark(#0159b5, #6ba5f3);
185
+ --action-hover: light-dark(#014a97, #0062c7);
186
+
177
187
  /* A hovered link is TEXT, so it follows the ink, not the fill: in dark the
178
188
  fill's hover is too deep to read on a dark page (about 3.3:1). */
179
- --i-ink-hover: light-dark(#014a97, #98c4ff);
180
- --i-pressed: light-dark(#003e82, #0553a6);
181
- --i-surface: light-dark(color-mix(in srgb, #076bd3 12%, transparent), color-mix(in srgb, #0371e0 20%, transparent));
182
- --i-line: light-dark(color-mix(in srgb, #076bd3 32%, transparent), color-mix(in srgb, #0371e0 44%, transparent));
183
- --i-selection: light-dark(color-mix(in srgb, #076bd3 26%, transparent), color-mix(in srgb, #0371e0 30%, transparent));
184
- --on-i: light-dark(#ffffff, #ffffff);
189
+ --action-ink-hover: light-dark(#014a97, #98c4ff);
190
+ --action-pressed: light-dark(#003e82, #0553a6);
191
+ --action-surface: light-dark(color-mix(in srgb, #076bd3 12%, transparent), color-mix(in srgb, #0371e0 20%, transparent));
192
+ --action-line: light-dark(color-mix(in srgb, #076bd3 32%, transparent), color-mix(in srgb, #0371e0 44%, transparent));
193
+ --action-selection: light-dark(color-mix(in srgb, #076bd3 26%, transparent), color-mix(in srgb, #0371e0 30%, transparent));
194
+ --on-action: light-dark(#ffffff, #ffffff);
195
+
185
196
  /* A button filled with danger (.btn-danger), and its label. Its own
186
197
  tokens so the state hue --danger can stay a pale, readable rust in dark
187
198
  (messages, pills, field errors) while the button is as deep as the
@@ -196,8 +207,8 @@
196
207
  --danger-fill-hover: light-dark(#8a3722, #ad472e);
197
208
  --danger-fill-pressed: light-dark(#8a3722, #9d381e);
198
209
  --on-danger: light-dark(#ffffff, #ffffff);
199
- --i-disabled-bg: var(--n-200);
200
- --i-disabled-ink: var(--n-400);
210
+ --disabled: var(--neutral-200);
211
+ --disabled-ink: var(--neutral-400);
201
212
 
202
213
  /* ── State ────────────────────────────────────────────────────────────
203
214
  Three hues, one meaning each, identical on every surface and both
@@ -220,17 +231,16 @@
220
231
  --attention-ink: light-dark(#8a5714, #e0a44f); /* 6.08:1 / 8.17:1 — mark and label converge in dark */
221
232
  --danger: light-dark(#a4442c, #e07a5f);
222
233
  --danger-ink: light-dark(#8a3722, #ec9880);
223
- --info: var(--i);
224
- --info-ink: var(--i-ink);
225
-
234
+ --info: var(--action);
235
+ --info-ink: var(--action-ink);
226
236
  --success-surface: light-dark(color-mix(in srgb, #2f6b4f 12%, transparent), color-mix(in srgb, #6fbf95 20%, transparent));
227
237
  --attention-surface: light-dark(color-mix(in srgb, #b4741f 12%, transparent), color-mix(in srgb, #e0a44f 20%, transparent));
228
238
  --danger-surface: light-dark(color-mix(in srgb, #a4442c 12%, transparent), color-mix(in srgb, #e07a5f 20%, transparent));
229
- --info-surface: var(--i-surface);
239
+ --info-surface: var(--action-surface);
230
240
  --success-line: light-dark(color-mix(in srgb, #2f6b4f 32%, transparent), color-mix(in srgb, #6fbf95 44%, transparent));
231
241
  --attention-line: light-dark(color-mix(in srgb, #b4741f 32%, transparent), color-mix(in srgb, #e0a44f 44%, transparent));
232
242
  --danger-line: light-dark(color-mix(in srgb, #a4442c 32%, transparent), color-mix(in srgb, #e07a5f 44%, transparent));
233
- --info-line: var(--i-line);
243
+ --info-line: var(--action-line);
234
244
 
235
245
  /* ── Diff ─────────────────────────────────────────────────────────────
236
246
  What a change did to a thing: a deploy, a plan, a pull request. Aliases
@@ -244,9 +254,9 @@
244
254
  --diff-added: var(--success);
245
255
  --diff-added-ink: var(--success-ink);
246
256
  --diff-added-surface: var(--success-surface);
247
- --diff-changed: var(--i);
248
- --diff-changed-ink: var(--i-ink);
249
- --diff-changed-surface: var(--i-surface);
257
+ --diff-changed: var(--action);
258
+ --diff-changed-ink: var(--action-ink);
259
+ --diff-changed-surface: var(--action-surface);
250
260
  --diff-removed: var(--danger);
251
261
  --diff-removed-ink: var(--danger-ink);
252
262
  --diff-removed-surface: var(--danger-surface);
@@ -263,10 +273,10 @@
263
273
  --code-highlight a highlighted line — the cobalt wash */
264
274
  --code-surface: var(--bg);
265
275
  --code-ink: var(--ink);
266
- --code-keyword: var(--i-ink);
276
+ --code-keyword: var(--action-ink);
267
277
  --code-string: var(--ink-soft);
268
278
  --code-comment: var(--slate);
269
- --code-highlight: var(--i-surface);
279
+ --code-highlight: var(--action-surface);
270
280
 
271
281
  /* ── Mark — identity ──────────────────────────────────────────────────
272
282
  Inks a GRAPHIC: a product's glyph, the A|B monogram, a hero rule. That is
@@ -297,11 +307,12 @@
297
307
  --mark-teal: light-dark(#0e7c86, #4cc0cb);
298
308
  --mark-violet: light-dark(#7148c9, #a990f2);
299
309
  --mark-magenta: light-dark(#b1366f, #ea7fb0);
310
+
300
311
  /* ── A mark as a fill and a ground — product pages only (ADR-0017) ────
301
312
  On a product's marketing page, and nowhere else, the mark may fill the
302
313
  one primary button and wash the page ground. Never in an app, never a
303
- link, text or a state. The mark tokens above don't move: like --i beside
304
- --i-ink and --danger-fill beside --danger, the fill is its own step.
314
+ link, text or a state. The mark tokens above don't move: like --action beside
315
+ --action-ink and --danger-fill beside --danger, the fill is its own step.
305
316
 
306
317
  -fill the button, under a white --on-mark label in both themes.
307
318
  In light it IS the mark (amber is deepened to carry the
@@ -310,7 +321,7 @@
310
321
  for cobalt.
311
322
  -fill-hover, -fill-pressed step darker in both themes.
312
323
  -surface the page ground: a faint, opaque tint at the mark's hue
313
- that --ink, --ink-soft and --i-ink all read on.
324
+ that --ink, --ink-soft and --action-ink all read on.
314
325
 
315
326
  Labels, light / dark: fill hover pressed
316
327
  amber (the family) 4.60 / 4.61 6.09 / 5.65 7.63 / 6.92
@@ -337,6 +348,7 @@
337
348
  --mark-magenta-fill-pressed: light-dark(#88024d, #a1296a);
338
349
  --mark-magenta-surface: light-dark(#ffe3ec, #27141c);
339
350
  --on-mark: light-dark(#ffffff, #ffffff);
351
+
340
352
  /* The mark in force here (ADR-0014): the family amber until `data-mark`
341
353
  on an ancestor, usually <html>, names a product's. A brand glyph and
342
354
  .rule draw in this, so a product's colour follows it from its marketing
@@ -360,6 +372,48 @@
360
372
  --rust-deep: var(--danger-ink);
361
373
  --gold: var(--slate);
362
374
 
375
+ /* ── Tokens the kits set (ADR-0019) ──
376
+ Each is an alias here, so today's look is unchanged; a kit in kits/*.css
377
+ gives it a value of its own.
378
+
379
+ The primary button's border. The fill carries itself, except in a kit
380
+ whose fill can't be found on its page (Split in light). */
381
+ --action-edge: var(--action);
382
+
383
+ /* The one highlight a screen may carry, and its label. */
384
+ --accent: var(--mark-fill);
385
+ --on-accent: var(--on-mark);
386
+ }
387
+
388
+ /* ── A product's mark, wherever the product is ──────────────────────────
389
+ One attribute per product: <html data-mark="teal">. Works on any element,
390
+ so a page that shows two products can mark each one's section. It also
391
+ points the product-page fill and ground (ADR-0017) at the product's. */
392
+ [data-mark='teal'] {
393
+ --mark-current: var(--mark-teal);
394
+ --mark-fill: var(--mark-teal-fill);
395
+ --mark-fill-hover: var(--mark-teal-fill-hover);
396
+ --mark-fill-pressed: var(--mark-teal-fill-pressed);
397
+ --mark-surface: var(--mark-teal-surface);
398
+ }
399
+
400
+ [data-mark='violet'] {
401
+ --mark-current: var(--mark-violet);
402
+ --mark-fill: var(--mark-violet-fill);
403
+ --mark-fill-hover: var(--mark-violet-fill-hover);
404
+ --mark-fill-pressed: var(--mark-violet-fill-pressed);
405
+ --mark-surface: var(--mark-violet-surface);
406
+ }
407
+
408
+ [data-mark='magenta'] {
409
+ --mark-current: var(--mark-magenta);
410
+ --mark-fill: var(--mark-magenta-fill);
411
+ --mark-fill-hover: var(--mark-magenta-fill-hover);
412
+ --mark-fill-pressed: var(--mark-magenta-fill-pressed);
413
+ --mark-surface: var(--mark-magenta-surface);
414
+ }
415
+
416
+ :root {
363
417
  /* ── Type ─────────────────────────────────────────────────────────────
364
418
  --sans Geist — body and headings, both tiers
365
419
  --mono IBM Plex Mono — data that must read precise
@@ -396,55 +450,31 @@
396
450
  --tracking-display: -0.025em;
397
451
  --tracking-caps: 0.08em;
398
452
 
399
- /* ── Stacking ─────────────────────────────────────────────────────────
400
- Named by what sits above what. Dialogs, popovers and sheets use the
401
- browser's top layer and need none of these.
402
-
403
- --z-raised a control above its card's stretched link, a sticky th
404
- --z-sticky a header content scrolls under
405
- --z-float a label floating over the page (the rail's tooltip)
406
- --z-skip the skip link, above the header it skips
407
- --z-toast toasts, above everything not in the top layer */
408
- --z-raised: 1;
409
- --z-sticky: 10;
410
- --z-float: 20;
411
- --z-skip: 30;
412
- --z-toast: 40;
413
-
414
- /* ── Space ── 4px base. Tiers differ by which steps they reach for. */
415
- --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
416
- --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
417
-
418
- /* ── Shape & elevation ────────────────────────────────────────────────
419
- In LIGHT these are shadows; in DARK the surface lightens instead, and
420
- the shadow only has to separate it from a near-black ground.
421
-
422
- light-dark() switches colours, not geometry, and the two themes' blur
423
- differs. So shadows 2 and 3 carry one layer per theme, with the other
424
- theme's layer transparent — it draws nothing. */
425
- --radius-sm: 6px;
426
- --radius-control: 8px; /* buttons, inputs, selects, the segmented control, menu items */
427
- --radius: 12px;
428
- --radius-lg: 18px;
429
- --shadow-1: 0 1px 2px light-dark(rgba(17, 17, 17, 0.04), rgba(0, 0, 0, 0.45));
430
- --shadow-2:
431
- 0 2px 8px light-dark(rgba(17, 17, 17, 0.07), transparent),
432
- 0 2px 10px light-dark(transparent, rgba(0, 0, 0, 0.55));
433
- --shadow-3:
434
- 0 8px 24px light-dark(rgba(17, 17, 17, 0.10), transparent),
435
- 0 10px 28px light-dark(transparent, rgba(0, 0, 0, 0.65));
436
- --scrim: light-dark(rgba(17, 17, 17, 0.55), rgba(0, 0, 0, 0.68));
437
- --shadow: var(--shadow-1); /* legacy alias */
438
-
439
- /* ── Motion ───────────────────────────────────────────────────────────
440
- Content is ALWAYS visible by default; motion is enhancement layered on
441
- top, never the thing that makes content appear. brignano.io shipped a
442
- homepage whose contact CTA was invisible on 100% of loads because an
443
- animation library owned the visible state. See DESIGN.md §7. */
444
- --ease: cubic-bezier(0.22, 1, 0.36, 1);
445
- --dur-fast: 150ms;
446
- --dur: 250ms;
447
- --dur-slow: 600ms;
453
+ /* How the display treatment is set: a kit may ask for capitals and a wider
454
+ cut of its face (Split). `text-transform` and `font-stretch` read these. */
455
+ --display-case: none;
456
+ --display-stretch: normal;
457
+
458
+ /* ── One line height and one tracking per size ──
459
+ A step of the scale is three tokens: --text-N, --leading-N, --tracking-N.
460
+ Each starts as the role token it used already, so nothing moves; a kit
461
+ retunes a step without touching the others. */
462
+ --leading-xs: var(--leading-ui);
463
+ --tracking-xs: 0;
464
+ --leading-sm: var(--leading-ui);
465
+ --tracking-sm: 0;
466
+ --leading-base: var(--leading-body);
467
+ --tracking-base: 0;
468
+ --leading-lg: var(--leading-body);
469
+ --tracking-lg: 0;
470
+ --leading-xl: var(--leading-title);
471
+ --tracking-xl: var(--tracking-title);
472
+ --leading-2xl: var(--leading-title);
473
+ --tracking-2xl: var(--tracking-title);
474
+ --leading-3xl: var(--leading-display);
475
+ --tracking-3xl: var(--tracking-display);
476
+ --leading-4xl: var(--leading-display);
477
+ --tracking-4xl: var(--tracking-display);
448
478
  }
449
479
 
450
480
  :root {
@@ -460,7 +490,7 @@
460
490
  --text-2xl: 1.5rem;
461
491
  --text-3xl: 1.875rem;
462
492
  --text-4xl: 2.25rem;
463
- --section-gap: var(--s6);
493
+ --section-gap: var(--space-6);
464
494
  --measure: 780px;
465
495
  }
466
496
 
@@ -487,44 +517,156 @@
487
517
  --text-2xl: 2rem;
488
518
  --text-3xl: 2.75rem;
489
519
  --text-4xl: clamp(2.75rem, 1rem + 4.5vw, 4rem); /* rem term keeps it zoomable (WCAG 1.4.4) */
490
- --section-gap: var(--s9);
520
+ --section-gap: var(--space-9);
491
521
  --measure: 68ch;
492
522
  }
493
523
 
494
- /* ── A product's mark, wherever the product is ──────────────────────────
495
- One attribute per product: <html data-mark="teal">. Works on any element,
496
- so a page that shows two products can mark each one's section. It also
497
- points the product-page fill and ground (ADR-0017) at the product's. */
498
- [data-mark='teal'] {
499
- --mark-current: var(--mark-teal);
500
- --mark-fill: var(--mark-teal-fill);
501
- --mark-fill-hover: var(--mark-teal-fill-hover);
502
- --mark-fill-pressed: var(--mark-teal-fill-pressed);
503
- --mark-surface: var(--mark-teal-surface);
524
+ :root {
525
+ /* ── Stacking ─────────────────────────────────────────────────────────
526
+ Named by what sits above what. Dialogs, popovers and sheets use the
527
+ browser's top layer and need none of these.
528
+
529
+ --z-raised a control above its card's stretched link, a sticky th
530
+ --z-sticky a header content scrolls under
531
+ --z-float a label floating over the page (the rail's tooltip)
532
+ --z-skip the skip link, above the header it skips
533
+ --z-toast toasts, above everything not in the top layer */
534
+ --z-raised: 1;
535
+ --z-sticky: 10;
536
+ --z-float: 20;
537
+ --z-skip: 30;
538
+ --z-toast: 40;
539
+
540
+ /* ── Space ── 4px base. Tiers differ by which steps they reach for. */
541
+ --space-1: 4px;
542
+ --space-2: 8px;
543
+ --space-3: 12px;
544
+ --space-4: 16px;
545
+ --space-5: 24px;
546
+ --space-6: 32px;
547
+ --space-7: 48px;
548
+ --space-8: 64px;
549
+ --space-9: 96px;
504
550
  }
505
- [data-mark='violet'] {
506
- --mark-current: var(--mark-violet);
507
- --mark-fill: var(--mark-violet-fill);
508
- --mark-fill-hover: var(--mark-violet-fill-hover);
509
- --mark-fill-pressed: var(--mark-violet-fill-pressed);
510
- --mark-surface: var(--mark-violet-surface);
551
+
552
+ :root {
553
+ /* ── Shape & elevation ────────────────────────────────────────────────
554
+ In LIGHT these are shadows; in DARK the surface lightens instead, and
555
+ the shadow only has to separate it from a near-black ground.
556
+
557
+ light-dark() switches colours, not geometry, and the two themes' blur
558
+ differs. So shadows 2 and 3 carry one layer per theme, with the other
559
+ theme's layer transparent — it draws nothing. */
560
+ --radius-sm: 6px;
561
+ --radius-control: 8px; /* buttons, inputs, selects, the segmented control, menu items */
562
+ --radius-card: 12px;
563
+ --radius-lg: 18px;
564
+ --shadow-1: 0 1px 2px light-dark(rgba(17, 17, 17, 0.04), rgba(0, 0, 0, 0.45));
565
+ --shadow-2: 0 2px 8px light-dark(rgba(17, 17, 17, 0.07), transparent),
566
+ 0 2px 10px light-dark(transparent, rgba(0, 0, 0, 0.55));
567
+ --shadow-3: 0 8px 24px light-dark(rgba(17, 17, 17, 0.10), transparent),
568
+ 0 10px 28px light-dark(transparent, rgba(0, 0, 0, 0.65));
569
+ --scrim: light-dark(rgba(17, 17, 17, 0.55), rgba(0, 0, 0, 0.68));
570
+ --shadow: var(--shadow-1); /* legacy alias */
511
571
  }
512
- [data-mark='magenta'] {
513
- --mark-current: var(--mark-magenta);
514
- --mark-fill: var(--mark-magenta-fill);
515
- --mark-fill-hover: var(--mark-magenta-fill-hover);
516
- --mark-fill-pressed: var(--mark-magenta-fill-pressed);
517
- --mark-surface: var(--mark-magenta-surface);
572
+
573
+ :root {
574
+ /* ── Motion ───────────────────────────────────────────────────────────
575
+ Content is ALWAYS visible by default; motion is enhancement layered on
576
+ top, never the thing that makes content appear. brignano.io shipped a
577
+ homepage whose contact CTA was invisible on 100% of loads because an
578
+ animation library owned the visible state. See DESIGN.md §7. */
579
+ --ease: cubic-bezier(0.22, 1, 0.36, 1);
580
+ --duration-fast: 150ms;
581
+ --duration: 250ms;
582
+ --duration-slow: 600ms;
583
+ }
584
+
585
+ :root {
586
+ --button-radius: var(--radius-control);
587
+ --field-radius: var(--radius-control);
588
+ --field-line: var(--line-control);
589
+ --card-radius: var(--radius-card);
590
+
591
+ /* A card's edge. --line all but vanishes between a white card and the light
592
+ page (1.06:1), so a grid of cards read as one sheet of paper. Light takes
593
+ the next step up; dark keeps the hairline, since there a card is lighter
594
+ than the page and its fill does the work (§6). Decoration, not a boundary. */
595
+ --card-line: light-dark(#e1e1e4, #202024); /* neutral-200 / neutral-100 */
596
+
597
+ /* Lifts a card off the page in light; dark has no light shadow layer. */
598
+ --card-shadow: var(--shadow-2);
599
+ --pill-radius: var(--radius-sm);
600
+ --dialog-radius: var(--radius-lg);
601
+ --focus-ring: var(--action-ink);
602
+
603
+ /* ── Density ──
604
+ The height of a button, input or select at each size. `data-density="compact"`
605
+ on <html> or any element tightens them for a dense tool screen. Touch
606
+ screens keep their 44px targets either way (DESIGN.md §10). */
607
+ --control-height: 40px;
608
+ --control-height-sm: 32px;
609
+ --control-height-lg: 48px;
610
+ }
611
+
612
+ /* A dense tool screen: one step tighter. */
613
+ [data-density='compact'] {
614
+ --control-height: 32px;
615
+ --control-height-sm: 28px;
616
+ --control-height-lg: 40px;
617
+ }
618
+
619
+ /* ── Deprecated names ───────────────────────────────────────────────────
620
+ Renamed in 0.14; removed in 1.0. Each points at its new name, so reading
621
+ an old name still works. SETTING an old name no longer reaches the
622
+ components, which read the new ones: set the new name instead. */
623
+ :root {
624
+ --n-0: var(--neutral-0);
625
+ --n-25: var(--neutral-25);
626
+ --n-50: var(--neutral-50);
627
+ --n-100: var(--neutral-100);
628
+ --n-200: var(--neutral-200);
629
+ --n-300: var(--neutral-300);
630
+ --n-400: var(--neutral-400);
631
+ --n-500: var(--neutral-500);
632
+ --n-600: var(--neutral-600);
633
+ --n-700: var(--neutral-700);
634
+ --n-800: var(--neutral-800);
635
+ --n-900: var(--neutral-900);
636
+ --i: var(--action);
637
+ --i-ink: var(--action-ink);
638
+ --i-hover: var(--action-hover);
639
+ --i-ink-hover: var(--action-ink-hover);
640
+ --i-pressed: var(--action-pressed);
641
+ --i-surface: var(--action-surface);
642
+ --i-line: var(--action-line);
643
+ --i-selection: var(--action-selection);
644
+ --on-i: var(--on-action);
645
+ --i-disabled-bg: var(--disabled);
646
+ --i-disabled-ink: var(--disabled-ink);
647
+ --s1: var(--space-1);
648
+ --s2: var(--space-2);
649
+ --s3: var(--space-3);
650
+ --s4: var(--space-4);
651
+ --s5: var(--space-5);
652
+ --s6: var(--space-6);
653
+ --s7: var(--space-7);
654
+ --s8: var(--space-8);
655
+ --s9: var(--space-9);
656
+ --radius: var(--radius-card);
657
+ --dur-fast: var(--duration-fast);
658
+ --dur: var(--duration);
659
+ --dur-slow: var(--duration-slow);
518
660
  }
519
661
 
520
662
  ::selection {
521
- background: var(--i-selection);
663
+ background: var(--action-selection);
522
664
  }
523
665
 
524
666
  /* Native checkboxes, radios, range and progress take the control hue
525
667
  instead of the browser's own blue. */
526
668
  :root {
527
- accent-color: var(--i);
669
+ accent-color: var(--action);
528
670
  }
529
671
 
530
672
  /* Paper is light. Printing a dark page spends ink on the background and