@brignano/design 0.7.0 → 0.9.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 (65) hide show
  1. package/DECISIONS.md +199 -0
  2. package/DESIGN.md +337 -13
  3. package/README.md +5 -1
  4. package/components.css +2248 -0
  5. package/icons/LICENSE +43 -0
  6. package/icons/arrow-down.svg +15 -0
  7. package/icons/arrow-left.svg +15 -0
  8. package/icons/arrow-right.svg +15 -0
  9. package/icons/arrow-up-down.svg +17 -0
  10. package/icons/arrow-up.svg +15 -0
  11. package/icons/bell.svg +15 -0
  12. package/icons/calendar.svg +17 -0
  13. package/icons/check.svg +14 -0
  14. package/icons/chevron-down.svg +14 -0
  15. package/icons/chevron-left.svg +14 -0
  16. package/icons/chevron-right.svg +14 -0
  17. package/icons/chevron-up.svg +14 -0
  18. package/icons/circle-check.svg +15 -0
  19. package/icons/circle-help.svg +16 -0
  20. package/icons/circle-x.svg +16 -0
  21. package/icons/clock.svg +15 -0
  22. package/icons/copy.svg +15 -0
  23. package/icons/download.svg +16 -0
  24. package/icons/ellipsis-vertical.svg +16 -0
  25. package/icons/ellipsis.svg +16 -0
  26. package/icons/external-link.svg +16 -0
  27. package/icons/eye-off.svg +17 -0
  28. package/icons/eye.svg +15 -0
  29. package/icons/funnel.svg +14 -0
  30. package/icons/house.svg +15 -0
  31. package/icons/info.svg +16 -0
  32. package/icons/link.svg +15 -0
  33. package/icons/lock.svg +15 -0
  34. package/icons/log-out.svg +16 -0
  35. package/icons/map-pin.svg +15 -0
  36. package/icons/menu.svg +16 -0
  37. package/icons/minus.svg +14 -0
  38. package/icons/monitor.svg +16 -0
  39. package/icons/moon.svg +14 -0
  40. package/icons/pencil.svg +15 -0
  41. package/icons/plus.svg +15 -0
  42. package/icons/refresh-cw.svg +17 -0
  43. package/icons/search.svg +15 -0
  44. package/icons/settings.svg +15 -0
  45. package/icons/sun.svg +22 -0
  46. package/icons/trash-2.svg +18 -0
  47. package/icons/triangle-alert.svg +16 -0
  48. package/icons/undo-2.svg +15 -0
  49. package/icons/upload.svg +16 -0
  50. package/icons/user.svg +15 -0
  51. package/icons/x.svg +15 -0
  52. package/package.json +11 -2
  53. package/product-page.css +31 -28
  54. package/scripts/colour.mjs +41 -0
  55. package/scripts/email-tokens.mjs +58 -0
  56. package/tailwind.css +28 -0
  57. package/templates/app-shell.css +346 -0
  58. package/templates/article.css +167 -0
  59. package/templates/changelog.css +53 -0
  60. package/templates/email.html +61 -0
  61. package/templates/email.txt +10 -0
  62. package/templates/error.css +81 -0
  63. package/templates/legal.css +65 -0
  64. package/templates/settings.css +95 -0
  65. package/tokens.css +140 -14
@@ -0,0 +1,81 @@
1
+ /* @brignano/design — error page template (#71)
2
+ 404, 500 and offline: the product mark, the code in mono, one line of what
3
+ happened and one way forward. Calm, no jokes or illustrations (DESIGN.md §1);
4
+ the wording follows DESIGN.md §15 and belongs to each product.
5
+ Needs tokens.css and components.css (for .btn).
6
+
7
+ <main class="error-page">
8
+ <div class="error-page-block">
9
+ <a class="error-page-mark" href="/"><svg aria-hidden="true" …></svg>Product</a>
10
+ <p class="error-page-code">404</p>
11
+ <h1 class="error-page-title">This page doesn't exist</h1>
12
+ <p class="error-page-body">It may have moved, or the link has a typo.</p>
13
+ <a class="btn btn-primary" href="/">Go to the home page</a>
14
+ </div>
15
+ </main>
16
+
17
+ The code above the title is the page's label (404, 500, Offline), not a
18
+ message code. A request ID that support will ask for goes after the words,
19
+ as DESIGN.md §15 says: <p class="error-page-ref">Request ID req_…</p>.
20
+
21
+ The page fills the screen and centres the block; the body's margin goes
22
+ so it doesn't scroll. Wiring it into a host's 404 handling is each site's
23
+ job. */
24
+ @layer brignano.components {
25
+ body:has(> .error-page) { margin: 0; }
26
+ .error-page {
27
+ display: grid;
28
+ place-items: center;
29
+ box-sizing: border-box;
30
+ min-height: 100svh;
31
+ padding: var(--s7) var(--s5);
32
+ background: var(--bg);
33
+ color: var(--ink);
34
+ }
35
+ .error-page-block {
36
+ display: flex;
37
+ flex-direction: column;
38
+ align-items: center;
39
+ gap: var(--s3);
40
+ min-width: 0;
41
+ max-width: min(28rem, 100%);
42
+ text-align: center;
43
+ }
44
+ .error-page-mark {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ gap: var(--s2);
48
+ margin-bottom: var(--s5);
49
+ font-weight: var(--weight-semibold);
50
+ color: var(--ink);
51
+ text-decoration: none;
52
+ }
53
+ .error-page-mark:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; border-radius: var(--radius); }
54
+ .error-page-mark > svg { width: 1.5em; height: 1.5em; flex: none; color: var(--mark-current); }
55
+ .error-page-code {
56
+ margin: 0;
57
+ font-family: var(--mono);
58
+ font-size: var(--text-sm);
59
+ letter-spacing: var(--tracking-caps);
60
+ color: var(--slate);
61
+ overflow-wrap: anywhere;
62
+ }
63
+ .error-page-title {
64
+ margin: 0;
65
+ font-size: var(--text-2xl);
66
+ font-weight: var(--weight-semibold);
67
+ letter-spacing: -0.02em;
68
+ line-height: 1.2;
69
+ text-wrap: balance;
70
+ overflow-wrap: anywhere;
71
+ }
72
+ .error-page-body { margin: 0 0 var(--s3); color: var(--ink-soft); text-wrap: pretty; overflow-wrap: anywhere; }
73
+ .error-page-ref {
74
+ margin: var(--s3) 0 0;
75
+ font-family: var(--mono);
76
+ font-size: var(--text-xs);
77
+ color: var(--slate);
78
+ overflow-wrap: anywhere;
79
+ }
80
+ @media (pointer: coarse) { .error-page-mark { min-height: 44px; } }
81
+ }
@@ -0,0 +1,65 @@
1
+ /* @brignano/design — legal page template (#70)
2
+ Privacy policy, terms and the like. Layout only: the wording belongs to
3
+ each product. Needs tokens.css and components.css (for .prose).
4
+
5
+ <main class="legal">
6
+ <header class="legal-header">
7
+ <h1>Privacy policy</h1>
8
+ <p class="legal-updated">Last updated <time datetime="2026-11-07">7 Nov 2026</time></p>
9
+ </header>
10
+ <div class="legal-body">
11
+ <nav class="legal-toc" aria-labelledby="toc-title">
12
+ <h2 class="legal-toc-title" id="toc-title">On this page</h2>
13
+ <ol><li><a href="#what-we-collect">What we collect</a></li>…</ol>
14
+ </nav>
15
+ <div class="prose"><h2 id="what-we-collect">What we collect</h2>…</div>
16
+ </div>
17
+ </main>
18
+
19
+ The contents list sits above the text until the page itself is 52rem wide,
20
+ then becomes a sticky left column (container query, so it follows the
21
+ column, not the screen). Leave the nav out on short pages. */
22
+ @layer brignano.components {
23
+ .legal {
24
+ container: legal / inline-size;
25
+ width: 100%;
26
+ max-width: calc(var(--measure) + 16rem);
27
+ margin-inline: auto;
28
+ }
29
+ .legal-header { margin-bottom: var(--s6); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
30
+ .legal-header > h1 { margin: 0; font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; line-height: var(--leading-display); text-wrap: balance; }
31
+ .legal-updated { margin: var(--s2) 0 0; font-family: var(--mono); font-size: var(--text-sm); color: var(--slate); }
32
+
33
+ .legal-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
34
+ .legal-body > .prose :is(h2, h3) { scroll-margin-top: var(--s5); }
35
+
36
+ .legal-toc {
37
+ padding: var(--s4) var(--s5);
38
+ background: var(--card);
39
+ border: 1px solid var(--line);
40
+ border-radius: var(--radius);
41
+ }
42
+ .legal-toc-title { margin: 0 0 var(--s2); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--ink); }
43
+ .legal-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s1); }
44
+ .legal-toc a { color: var(--ink-soft); font-size: var(--text-sm); text-decoration: none; border-radius: var(--radius-sm); }
45
+ .legal-toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
46
+ .legal-toc a[aria-current] { color: var(--ink); font-weight: var(--weight-semibold); }
47
+ .legal-toc a:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
48
+
49
+ @container legal (min-width: 52rem) {
50
+ .legal-body { grid-template-columns: 13rem minmax(0, 1fr); gap: var(--s7); }
51
+ .legal-toc {
52
+ align-self: start;
53
+ position: sticky;
54
+ top: var(--s5);
55
+ padding: 0;
56
+ background: none;
57
+ border: 0;
58
+ border-radius: 0;
59
+ }
60
+ }
61
+ @media (pointer: coarse) {
62
+ .legal-toc ol { gap: 0; }
63
+ .legal-toc a { display: flex; align-items: center; min-height: 44px; }
64
+ }
65
+ }
@@ -0,0 +1,95 @@
1
+ /* @brignano/design — settings page template (#69)
2
+ A tool app's settings: one section per topic, each with its heading and a
3
+ line of description on the left and its controls on the right. Needs
4
+ tokens.css and components.css (.field, .choice, .switch, .btn, .dialog).
5
+
6
+ <main class="settings">
7
+ <h1 class="settings-title">Settings</h1>
8
+ <form class="settings-section" aria-labelledby="profile-h">
9
+ <div class="settings-intro">
10
+ <h2 id="profile-h">Profile</h2>
11
+ <p>How other people see you.</p>
12
+ </div>
13
+ <div class="settings-fields">
14
+ <div class="field">…</div>
15
+ </div>
16
+ <div class="settings-save">
17
+ <p class="settings-save-note" role="status"></p>
18
+ <div class="settings-save-actions" hidden>
19
+ <button type="reset" class="btn">Discard</button>
20
+ <button class="btn btn-primary">Save profile</button>
21
+ </div>
22
+ </div>
23
+ </form>
24
+ <section class="settings-section settings-danger" aria-labelledby="danger-h">…</section>
25
+ </main>
26
+
27
+ - Save per section. A section of fields is a <form> with its own save
28
+ bar. Its buttons are `hidden` until something in the form changes, and
29
+ its note is an always-rendered, empty role="status". Your script (design
30
+ ships no JS) does the rest, as previews/settings.html shows: on the
31
+ first `input`, write "Unsaved changes" and unhide the buttons; after a
32
+ save, copy each value into its default (defaultValue, defaultChecked,
33
+ defaultSelected) so Discard can't undo the save; before hiding the
34
+ buttons again, move focus to the section's heading (tabindex="-1").
35
+ - Settings that apply the moment they change are switches, in a
36
+ <section> with no save bar (DESIGN.md §14, "Switch or checkbox").
37
+ - .settings-danger holds what can't be undone. Each action is a
38
+ .btn-danger that opens a .dialog-confirm.
39
+ - The two columns need the page itself to be 48rem wide (a container
40
+ query), so the layout follows its column, not the screen. Give its
41
+ wrapper a definite width: inside a box that sizes to its content, a
42
+ container collapses. */
43
+ @layer brignano.components {
44
+ .settings {
45
+ container: settings / inline-size;
46
+ width: 100%;
47
+ max-width: 64rem;
48
+ margin-inline: auto;
49
+ }
50
+ .settings-title { margin: 0 0 var(--s6); font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; line-height: var(--leading-display); text-wrap: balance; }
51
+
52
+ .settings-section {
53
+ display: grid;
54
+ grid-template-columns: minmax(0, 1fr);
55
+ gap: var(--s4) var(--s7);
56
+ margin: 0;
57
+ padding: var(--s6) 0;
58
+ border-top: 1px solid var(--line);
59
+ }
60
+ .settings-intro { min-width: 0; overflow-wrap: anywhere; }
61
+ .settings-intro > h2 { margin: 0; text-wrap: balance; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-title); }
62
+ .settings-intro > p { margin: var(--s1) 0 0; font-size: var(--text-sm); color: var(--ink-soft); max-width: 40ch; }
63
+ .settings-fields { display: grid; gap: var(--s5); min-width: 0; max-width: 32rem; }
64
+
65
+ .settings-save {
66
+ display: flex;
67
+ flex-wrap: wrap;
68
+ align-items: center;
69
+ justify-content: flex-end;
70
+ gap: var(--s3);
71
+ max-width: 32rem;
72
+ padding: var(--s3) 0 0;
73
+ border-top: 1px solid var(--line);
74
+ }
75
+ .settings-save:has(> .settings-save-actions[hidden]) { padding-top: 0; border-top: 0; }
76
+ .settings-save-note { margin: 0 auto 0 0; font-size: var(--text-sm); color: var(--ink-soft); }
77
+ .settings-save-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
78
+ .settings-save-actions[hidden] { display: none; }
79
+
80
+ .settings-danger .settings-intro > h2 { color: var(--danger-ink); }
81
+ .settings-danger-row {
82
+ display: flex;
83
+ flex-wrap: wrap;
84
+ align-items: center;
85
+ justify-content: space-between;
86
+ gap: var(--s3) var(--s5);
87
+ }
88
+ .settings-danger-row > p { margin: 0; font-size: var(--text-sm); color: var(--ink-soft); max-width: 40ch; }
89
+
90
+ @container settings (min-width: 48rem) {
91
+ .settings-section { grid-template-columns: 16rem minmax(0, 1fr); }
92
+ .settings-intro { grid-row: 1 / span 2; }
93
+ .settings-fields, .settings-save { grid-column: 2; }
94
+ }
95
+ }
package/tokens.css CHANGED
@@ -28,7 +28,7 @@
28
28
  2. IDENTITY IS NOT A FILL. Amber used to be the brand colour AND the
29
29
  warning colour, managed by a rule about scale. Rules enforced by
30
30
  remembering get forgotten. So identity moved to the thing that was
31
- always carrying it — the trail, the monogram, the type — and --mark
31
+ always carrying it — the monogram, the type, restraint — and --mark
32
32
  exists only to ink a graphic. It is never a button, chip, wash, or
33
33
  border. The naming is the enforcement.
34
34
 
@@ -154,23 +154,48 @@
154
154
  chroma. It is deliberately NOT Tailwind's blue-600 (263°, a touch
155
155
  violet and electric): same affordance, our own colour (ADR-0008).
156
156
 
157
- --i fill 5.18:1 / 7.07:1 (label 5.18 / 7.46)
157
+ --i fill 5.18:1 / 3.78:1 (label 5.18 / 4.73)
158
158
  --i-ink link/icon/focus 6.78:1 / 7.07:1
159
- --i-hover hover fill 8.65:1 / 10.50:1 (label)
160
- --i-pressed pressed fill 10.44:1 / 13.32:1 (label)
161
-
162
- In dark, fill and ink converge, and hover/pressed get LIGHTER.
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
162
+
163
+ The fill is a saturated mid-cobalt with a WHITE label in both themes,
164
+ and hover and pressed step darker in both. Dark used to lift the fill
165
+ to the ink's pale blue with a dark label, which read as washed out on
166
+ 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
168
+ (links, icons, the focus ring). The dark fill is as light as a white
169
+ label allows (4.5:1), which is what keeps it 3:1 as a mark on --card,
170
+ --bg and its own wash.
163
171
 
164
172
  DISABLED IS NEUTRAL, NEVER HUED — a greyed-out control must stop
165
173
  signalling "click me". */
166
- --i: light-dark(#076bd3, #6ba5f3);
174
+ --i: light-dark(#076bd3, #0371e0);
167
175
  --i-ink: light-dark(#0159b5, #6ba5f3);
168
- --i-hover: light-dark(#014a97, #98c4ff);
169
- --i-pressed: light-dark(#003e82, #c0dbff);
170
- --i-surface: light-dark(color-mix(in srgb, #076bd3 12%, transparent), color-mix(in srgb, #6ba5f3 20%, transparent));
171
- --i-line: light-dark(color-mix(in srgb, #076bd3 32%, transparent), color-mix(in srgb, #6ba5f3 44%, transparent));
172
- --i-selection: light-dark(color-mix(in srgb, #076bd3 26%, transparent), color-mix(in srgb, #6ba5f3 30%, transparent));
173
- --on-i: light-dark(#ffffff, #111111);
176
+ --i-hover: light-dark(#014a97, #0062c7);
177
+ /* A hovered link is TEXT, so it follows the ink, not the fill: in dark the
178
+ 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);
185
+ /* A button filled with danger (.btn-danger), and its label. Its own
186
+ tokens so the state hue --danger can stay a pale, readable rust in dark
187
+ (messages, pills, field errors) while the button is as deep as the
188
+ primary beside it: as light as a white label allows, stepping darker on
189
+ hover and press (ADR-0015). In light the fills ARE --danger and
190
+ --danger-ink; `npm run check` holds them to those.
191
+
192
+ --danger-fill label 6.10:1 / 4.58:1 on --card 3.91:1 in dark
193
+ --danger-fill-hover label 7.92:1 / 5.65:1
194
+ --danger-fill-pressed label 7.92:1 / 6.96:1 */
195
+ --danger-fill: light-dark(#a4442c, #be563c);
196
+ --danger-fill-hover: light-dark(#8a3722, #ad472e);
197
+ --danger-fill-pressed: light-dark(#8a3722, #9d381e);
198
+ --on-danger: light-dark(#ffffff, #ffffff);
174
199
  --i-disabled-bg: var(--n-200);
175
200
  --i-disabled-ink: var(--n-400);
176
201
 
@@ -226,8 +251,25 @@
226
251
  --diff-removed-ink: var(--danger-ink);
227
252
  --diff-removed-surface: var(--danger-surface);
228
253
 
254
+ /* ── Code ─────────────────────────────────────────────────────────────
255
+ Syntax colour without a rainbow (DESIGN.md §3): keywords take the
256
+ interactive cobalt ink, everything else is a step of the neutral ramp,
257
+ and weight and italics do the rest. All aliases, so code adds no hue.
258
+
259
+ --code-surface the block, inset one step below the card
260
+ --code-keyword if, return, const — cobalt ink
261
+ --code-string literals — secondary ink
262
+ --code-comment comments — slate, set in italics
263
+ --code-highlight a highlighted line — the cobalt wash */
264
+ --code-surface: var(--bg);
265
+ --code-ink: var(--ink);
266
+ --code-keyword: var(--i-ink);
267
+ --code-string: var(--ink-soft);
268
+ --code-comment: var(--slate);
269
+ --code-highlight: var(--i-surface);
270
+
229
271
  /* ── Mark — identity ──────────────────────────────────────────────────
230
- Inks a GRAPHIC: the trail line, the A|B monogram, a hero rule. That is
272
+ Inks a GRAPHIC: a product's glyph, the A|B monogram, a hero rule. That is
231
273
  the entire permitted use.
232
274
 
233
275
  It is NOT a button, chip, badge, wash, border, or link. If you are
@@ -253,6 +295,12 @@
253
295
  --mark-teal: light-dark(#0e7c86, #4cc0cb);
254
296
  --mark-violet: light-dark(#7148c9, #a990f2);
255
297
  --mark-magenta: light-dark(#b1366f, #ea7fb0);
298
+ /* The mark in force here (ADR-0014): the family amber until `data-mark`
299
+ on an ancestor, usually <html>, names a product's. A brand glyph and
300
+ .rule draw in this, so a product's colour follows it from its marketing
301
+ page into its app and onto its error pages. The [data-mark] rules below
302
+ only point it at a token above; they declare no colour of their own. */
303
+ --mark-current: var(--mark);
256
304
 
257
305
  /* ── Legacy aliases ───────────────────────────────────────────────────
258
306
  Kept so existing `life` components keep compiling. Do not use in new
@@ -282,6 +330,45 @@
282
330
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
283
331
  --display: var(--sans);
284
332
 
333
+ /* Weight, leading and tracking. Sizes are per tier (below); these are
334
+ not. Three weights, and nothing lighter or bolder.
335
+ (--weight-heavy is the one exception: the display treatment, .display
336
+ and .stamp, ADR-0014.) Leading is unitless
337
+ so it scales with the text: display for large headings, title for
338
+ titles, ui for interface text, body for paragraphs. Tracking
339
+ only ever tightens a heading or opens an uppercase mono eyebrow
340
+ (and the .stamp monogram, whose bar closes up otherwise).
341
+
342
+ Named by role, not tight/snug/normal: Tailwind owns those names
343
+ (--leading-tight, --tracking-tight) and an unlayered token here would
344
+ silently change what its utilities do in every consumer. */
345
+ --weight-regular: 400;
346
+ --weight-medium: 500;
347
+ --weight-semibold: 600;
348
+ --weight-heavy: 800;
349
+ --leading-display: 1.15;
350
+ --leading-title: 1.3;
351
+ --leading-ui: 1.4;
352
+ --leading-body: 1.6;
353
+ --tracking-title: -0.01em;
354
+ --tracking-display: -0.025em;
355
+ --tracking-caps: 0.08em;
356
+
357
+ /* ── Stacking ─────────────────────────────────────────────────────────
358
+ Named by what sits above what. Dialogs, popovers and sheets use the
359
+ browser's top layer and need none of these.
360
+
361
+ --z-raised a control above its card's stretched link, a sticky th
362
+ --z-sticky a header content scrolls under
363
+ --z-float a label floating over the page (the rail's tooltip)
364
+ --z-skip the skip link, above the header it skips
365
+ --z-toast toasts, above everything not in the top layer */
366
+ --z-raised: 1;
367
+ --z-sticky: 10;
368
+ --z-float: 20;
369
+ --z-skip: 30;
370
+ --z-toast: 40;
371
+
285
372
  /* ── Space ── 4px base. Tiers differ by which steps they reach for. */
286
373
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
287
374
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
@@ -294,6 +381,7 @@
294
381
  differs. So shadows 2 and 3 carry one layer per theme, with the other
295
382
  theme's layer transparent — it draws nothing. */
296
383
  --radius-sm: 6px;
384
+ --radius-control: 8px; /* buttons, inputs, selects, the segmented control, menu items */
297
385
  --radius: 12px;
298
386
  --radius-lg: 18px;
299
387
  --shadow-1: 0 1px 2px light-dark(rgba(17, 17, 17, 0.04), rgba(0, 0, 0, 0.45));
@@ -334,6 +422,15 @@
334
422
  --measure: 780px;
335
423
  }
336
424
 
425
+ /* On a phone the tool tier's smallest step rises from 11px to 12px: fine
426
+ beside a mouse, too small at arm's length. The marketing tier's is
427
+ already 12px. */
428
+ @media (pointer: coarse) {
429
+ :root:not(.tier-marketing) {
430
+ --text-xs: 0.75rem;
431
+ }
432
+ }
433
+
337
434
  /* ── Marketing tier ─────────────────────────────────────────────────────
338
435
  `class="tier-marketing"` on <html> (brignano.io). Unlocks the display
339
436
  face and opens the type scale. COLOUR IS IDENTICAL ACROSS TIERS — that
@@ -352,6 +449,19 @@
352
449
  --measure: 68ch;
353
450
  }
354
451
 
452
+ /* ── A product's mark, wherever the product is ──────────────────────────
453
+ One attribute per product: <html data-mark="teal">. Works on any element,
454
+ so a page that shows two products can mark each one's section. */
455
+ [data-mark='teal'] {
456
+ --mark-current: var(--mark-teal);
457
+ }
458
+ [data-mark='violet'] {
459
+ --mark-current: var(--mark-violet);
460
+ }
461
+ [data-mark='magenta'] {
462
+ --mark-current: var(--mark-magenta);
463
+ }
464
+
355
465
  ::selection {
356
466
  background: var(--i-selection);
357
467
  }
@@ -362,6 +472,16 @@
362
472
  accent-color: var(--i);
363
473
  }
364
474
 
475
+ /* Paper is light. Printing a dark page spends ink on the background and
476
+ most browsers drop backgrounds anyway, leaving pale text on white. After
477
+ the [data-theme] rules above so it wins over an in-app dark choice. */
478
+ @media print {
479
+ :root,
480
+ [data-theme] {
481
+ color-scheme: light;
482
+ }
483
+ }
484
+
365
485
  /* Ships here so no surface can forget it. */
366
486
  @media (prefers-reduced-motion: reduce) {
367
487
  *,
@@ -372,4 +492,10 @@
372
492
  transition-duration: 0.01ms !important;
373
493
  scroll-behavior: auto !important;
374
494
  }
495
+ /* View transitions live on pseudo-elements the rule above can't reach. */
496
+ ::view-transition-group(*),
497
+ ::view-transition-old(*),
498
+ ::view-transition-new(*) {
499
+ animation: none !important;
500
+ }
375
501
  }