@brignano/design 0.11.0 → 0.12.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.
package/DECISIONS.md DELETED
@@ -1,799 +0,0 @@
1
- # Design decisions
2
-
3
- Why the values in `tokens.css` are what they are. Each entry supersedes whatever
4
- came before it; nothing here is re-litigated without a new entry.
5
-
6
- ---
7
-
8
- ## ADR-0001 — The interactive hue is cobalt
9
-
10
- **Status:** accepted · 2026-08-23
11
- **Supersedes:** `brignano.io/docs/tsd-site-modernization.md` §10.3
12
-
13
- ### Context
14
-
15
- `brignano.io` shipped electric indigo/violet (`#6d28d9` / `#a78bfa`). `life`
16
- shipped a warm functional ramp. Neither was chosen as an interactive colour —
17
- §10.3 records violet as resolving a *negative* constraint:
18
-
19
- > **Accent color:** ✅ **Shift the hue** away from emerald. Candidate: an
20
- > **electric indigo/violet** … **amber as fallback**.
21
-
22
- That decision answered "not green." A long argument followed about whether amber
23
- or violet should replace it, which was the wrong argument — see ADR-0004. Once
24
- identity, affordance and state were separated, the only question left was what
25
- colour a *control* should be.
26
-
27
- ### Decision
28
-
29
- Cobalt (`#2563eb` / `#60a5fa`), with a full hover / pressed / focus / disabled ramp.
30
-
31
- ### Rationale
32
-
33
- Cobalt, indigo and violet were all measured against both grounds. **All three
34
- cleared every gate**, so contrast did not decide it:
35
-
36
- | Candidate | Text (light) | Fill (light) | Text (dark) | Pressed (dark) |
37
- |---|---|---|---|---|
38
- | cobalt | 6.70 | 5.17 | 7.64 | 10.77 |
39
- | indigo | 7.90 | 6.29 | 6.51 | 9.74 |
40
- | violet | 7.10 | 5.70 | 7.13 | 10.52 |
41
-
42
- It was decided on the two things contrast can't measure:
43
-
44
- 1. **Semantically inert.** Amber means caution, green means success, red means
45
- error — all of them arrive with meaning already attached. Blue arrives with
46
- none, which is exactly why product UIs converged on it. That is a functional
47
- property, not a fashion.
48
- 2. **Complementary to the mark hue.** Cobalt sits opposite larch on the wheel, so
49
- identity and affordance never compete for the same attention.
50
-
51
- Cobalt over indigo/violet specifically: it has the most dark-mode headroom of the
52
- three, and blue is the most conventional link colour in existence — the lowest
53
- cognitive cost and the highest affordance. **Distinctiveness belongs in the brand
54
- layer; conventionality belongs in the control layer.** That is how you get both.
55
-
56
- ### Consequences
57
-
58
- - `brignano.io` migration surface: 4 literal hexes in `app/globals.css` plus ~15
59
- `violet-*` utilities. Map **by job**, not find-and-replace: `.text-primary-color`
60
- → `--i-ink`, filled buttons → `--i`, focus rings → `--i-ink`.
61
- - The trail's summit zone (`tsd-signature-experience.md` §5.2, "summit
62
- indigo/violet") is re-inked with `--mark`.
63
- - `life` is unaffected — it has no interactive colour today.
64
-
65
- ---
66
-
67
- ## ADR-0002 — Charts keep a full categorical palette, re-derived and validated
68
-
69
- **Status:** accepted · 2026-08-23
70
-
71
- ### Context
72
-
73
- An earlier draft suggested the `/coding` chart palette was "undercutting the
74
- identity" and should derive from the brand accent. **That was wrong**, and it is
75
- worth recording why.
76
-
77
- Series colour answers *"which of these eight things am I looking at?"*, which needs
78
- eight hues a human can separate at a glance. Deriving eight series colours from one
79
- hue produces eight of that hue nobody can tell apart. **Charts genuinely need the
80
- range.** The constraint is *separability*, not restraint.
81
-
82
- ### The actual problem
83
-
84
- `components/stats/chart-colors.ts` is not too colourful — it is insufficiently
85
- separable. Validated (light, 10 slots):
86
-
87
- ```
88
- [FAIL] Lightness band outside band: #ef9aa3, #34d399
89
- [WARN] CVD separation worst adjacent #a78bfa <-> #06b6d4 dE 6.6 (deutan)
90
- [FAIL] Normal-vision floor worst adjacent #ef9aa3 <-> #f97316 dE 13.7
91
- [WARN] Contrast vs surface 8 of 10 below 3:1
92
- ```
93
-
94
- ΔE 13.7 means those two are hard to separate **with full colour vision**, before
95
- colourblindness is considered.
96
-
97
- ### Decision
98
-
99
- Keep a full 8-hue categorical palette, capped at 8 + "Other". Replace the values
100
- with a set that passes every hard gate in both modes (adjacent CVD ΔE 9.1 light /
101
- 8.4 dark; normal-vision ΔE 19.6 / 19.3). Values in `tokens.chart.css`.
102
-
103
- ### Consequences
104
-
105
- - **Slot order is load-bearing** — the gates measure *adjacent* pairs, so
106
- re-ordering silently breaks colourblind safety. Fixed order, never cycled.
107
- - Three light-mode slots sit below 3:1; that is legal only with relief (visible
108
- labels or a table view). The donut's centre readout and legend already satisfy it.
109
- - `stats-pie.tsx` already takes the top 8 and aggregates the rest — now the
110
- documented rule rather than an implementation detail.
111
- - Colour must follow the **entity**, not its rank. The current code indexes by
112
- sorted position, so a data shift repaints every series. Map name → slot once.
113
- - `chart-colors.ts` should read the CSS custom properties rather than literal hex,
114
- or the two will drift the way everything else did.
115
-
116
- ---
117
-
118
- ## ADR-0003 — The system lives in one public repo, consumed as a package
119
-
120
- **Status:** accepted · 2026-08-23
121
-
122
- ### Decision
123
-
124
- A standalone repo — `brignano/design` — installed as `@brignano/design`.
125
-
126
- ### Rationale
127
-
128
- **It cannot live in `life`.** `life` is private and holds confirmation codes and
129
- booking details. `brignano.io` is public. A public site cannot install tokens from
130
- a private repo without handing out credentials to the repo storing your boarding
131
- passes. Hard blocker, not preference.
132
-
133
- **It should not live in `brignano.io`.** That makes the site the owner and every
134
- tool a downstream guest, pinning tools to the site's release cycle.
135
-
136
- **Copy-paste is what already failed** — two repos, two stylesheets, two accents,
137
- two chart palettes, and a documented decision only one of them followed.
138
-
139
- ### Distribution
140
-
141
- Three channels, because there are three kinds of consumer:
142
-
143
- | Consumer | Channel |
144
- |---|---|
145
- | npm projects with a build (`brignano.io`, `life`) | git dependency pinned to a tag |
146
- | no-build surfaces (`homelab`, a static page) | jsDelivr against the public repo |
147
- | **projects that don't exist yet** | a Claude skill generated from this repo |
148
-
149
- The third is the one that matters for "as I create new things" — a skill follows
150
- the account, so a new project gets the system without anyone wiring it up.
151
-
152
- npm publishing is deferred until `brignano.io` actually consumes it, so the first
153
- published version isn't one that's immediately superseded. The scope `@brignano` is
154
- already owned (it is the npm username), so no org setup is needed.
155
-
156
- ### Consequences
157
-
158
- - The repo must be **public**: private npm needs a paid plan, jsDelivr only serves
159
- public repos, and a public `brignano.io` that can't `npm install` is broken.
160
- - Nothing here is secret — hex values and spacing rules aren't a moat — and the
161
- documented reasoning is itself a portfolio asset.
162
- - Consumers pin the **same tag** and bump together. If one tracks `main` and another
163
- a tag, the drift this repo exists to prevent comes straight back.
164
- - A token rename is a breaking change.
165
-
166
- ---
167
-
168
- ## ADR-0004 — One hue, one meaning
169
-
170
- **Status:** accepted · 2026-08-23
171
- **Supersedes:** the "single accent" model in the first draft of this system
172
-
173
- ### Context
174
-
175
- The first draft had one accent carrying identity, affordance *and* warning. That is
176
- what produced a long amber-versus-violet argument, and the argument was unwinnable
177
- because the question was wrong: no hue can be all three without one meaning bleeding
178
- into the others.
179
-
180
- Worse, the founding rule of this system — *colour carries meaning, never
181
- decoration* — was being violated by the system itself. A hue with two meanings is
182
- exactly the thing the rule forbids, just relocated.
183
-
184
- ### Decision
185
-
186
- Every hue answers exactly one question, on every surface, in both tiers. Two
187
- specific consequences:
188
-
189
- **1. Attention is one meaning.** A warning toast, the `NEXT UP` strip, and a
190
- deposit closing in six days are the same message at different volumes, so they are
191
- the same colour. There is no separate "warning" hue and no separate "now/next" hue.
192
- This is what lets a marketing site and an operational tool share one palette
193
- honestly rather than by coincidence.
194
-
195
- **2. Identity is not a fill.** `--mark` inks a graphic — the trail, the monogram, a
196
- hero rule — and nothing else.
197
-
198
- The intermediate proposal was to keep a `--brand-*` family and manage the overlap
199
- with amber's warning meaning by convention: brand only at large decorative scale,
200
- warning always with an icon. That works, and warm-brand companies do it. It was
201
- rejected because it is enforced by remembering, every time, forever — and rules
202
- enforced by remembering get forgotten by a version of you in a hurry. Naming is
203
- cheaper and more reliable enforcement: `--brand` invites someone to tint a button
204
- with it; `--mark` does not.
205
-
206
- ### Consequences
207
-
208
- - `brignano.io` gives up a brand fill for tinting eyebrows and section rules. Those
209
- go to ink and neutrals — arguably better, since tinted eyebrow rules are the
210
- portfolio-template tell the modernization TSD set out to escape.
211
- - Identity now rests on the trail, the monogram, the type, and restraint. If that
212
- feels thin in place, the fix is a stronger *mark*, not a tinted interface.
213
- - Feedback state (success/attention/danger) and domain status (booked/active/
214
- overdue) share hue families deliberately. Context plus the mandatory icon-and-word
215
- separates them; a form error is not "rust means overdue", but they are the same
216
- register of message.
217
- - Nothing amber is clickable anywhere in the system.
218
-
219
- ---
220
-
221
- ## ADR-0005 — Diagrams are not charts: neutral nodes, colour for state only
222
-
223
- **Status:** accepted · 2026-10-13
224
-
225
- ### Context
226
-
227
- `driftwood` draws architecture diagrams and was the first consumer to need them.
228
- Its first pass on these tokens took the chart exception (§8, ADR-0002) and tinted
229
- each node by family (edge, compute, data, messaging…) with `--chart-1…6`. On a
230
- real 46-resource platform that put six hues on screen before anything was wrong,
231
- and the database that was down was one more tinted box among them.
232
-
233
- ### Decision
234
-
235
- A diagram follows the restraint rule. The chart exception exists because a chart
236
- has nothing *but* colour to tell series apart; a diagram node has an icon, a name
237
- and a kind label, so family is already carried three times. Nodes are neutral.
238
- Colour is reserved for state: health (`--danger`, `--attention`) and what a change
239
- did, via three new aliases — `--diff-added`, `--diff-changed`, `--diff-removed` —
240
- over the existing state hues. No new hue enters the system.
241
-
242
- ### Consequences
243
-
244
- - On a healthy, unchanged system the diagram is grey, and that is correct:
245
- nothing is asking for you.
246
- - `--diff-changed` shares cobalt with links. Context separates them (a node edge
247
- with a `~ changed` tag is not underlined text), the same way feedback and domain
248
- status share hues in ADR-0004.
249
- - Standalone exports (SVG files, Mermaid in a pull request) take the light theme's
250
- values, resolved from `tokens.css` by the consumer at build time.
251
-
252
- ---
253
-
254
- ## ADR-0006 — One declaration per colour, via `light-dark()`
255
-
256
- **Status:** accepted · 2026-10-25
257
-
258
- ### Context
259
-
260
- Dark mode lived in three lists: a `prefers-color-scheme` block (the OS default),
261
- a `[data-theme='dark']` block (the toggle, which has to win), and a copy in
262
- `previews/_preview.css` so a preview could show both themes at once. CSS can't
263
- share one declaration block between a media query and a selector, so the
264
- duplication was structural, and the file's own rule — "edit one, edit the other"
265
- — was enforced by remembering. The preview copy had already fallen behind
266
- (`--i-selection`, `--scrim` and `--on-dark` were missing).
267
-
268
- ### Decision
269
-
270
- Every colour is declared once, on `:root`, as `light-dark(<light>, <dark>)`. The
271
- theme is `color-scheme`: `light dark` by default, pinned by `[data-theme]`.
272
-
273
- Arguments are always concrete colours, never a `var()` to another
274
- theme-dependent token. Nested `light-dark()` — directly, or inside
275
- `color-mix()` — is valid CSS, but support across engines couldn't be verified
276
- when this was written, and getting it wrong would blank colours in one browser.
277
- Where that forces a repeat (a wash repeats its hue, `--bg` repeats a ramp step),
278
- `npm run check` holds the copy to its source.
279
-
280
- Shadows differ in blur as well as colour, and `light-dark()` only switches
281
- colour, so the two themes' shadows are separate layers, each transparent in the
282
- other theme.
283
-
284
- ### Rationale
285
-
286
- - **Drift becomes impossible rather than checked.** There's no second list.
287
- - **Theming becomes scoped for free.** The value is picked where a colour is
288
- used, so `data-theme="dark"` on a `<section>` themes that section. The preview's
289
- forced-dark panel is now `color-scheme: dark` and nothing else.
290
- - **No change in output.** Verified in Chromium against the previous file: all
291
- 119 tokens are identical in five setups (OS light, OS dark, a toggle forcing
292
- each way, and both agreeing). The shadows and every preview page are
293
- identical pixel for pixel.
294
-
295
- ### Consequences
296
-
297
- - Browser floor: Chrome/Edge 123, Firefox 120, Safari 17.5.
298
- - `getPropertyValue('--x')` returns the `light-dark(…)` text. JavaScript that
299
- needs a colour resolves it through `getComputedStyle` on an element
300
- (DESIGN.md §11). ADR-0002's advice that `chart-colors.ts` read the custom
301
- properties still stands, but by that route.
302
- - Consumers shouldn't wrap tokens in `color-mix()`; washes are tokens. The
303
- first consumer that needed one (`life`'s sticky bars) got `--surface-sticky`
304
- in 0.3.1 rather than a local mix.
305
- - A build that lowers `light-dark()` for older browsers (Lightning CSS, inside
306
- Next.js and Vite) fixes the theme at `:root`, losing scoped theming. Found in
307
- `brignano.io`; consumers set `browserslist` to the floor (DESIGN.md §11).
308
- - Not a token rename and not a visual change, so a patch release.
309
-
310
-
311
- ---
312
-
313
- ## ADR-0007 — The neutral ramp is one temperature: OKLCH hue 286°
314
-
315
- **Status:** accepted · 2026-10-25
316
-
317
- ### Context
318
-
319
- `tokens.css` called the ramp "cool-leaning", and most of it was: light 300–800
320
- and dark 0–800 sit at OKLCH hue 286°. But light 50, 100 and 200 — the hairline,
321
- `--line-soft`, the hover and pressed surfaces — sat at 106°, a faint yellow, and
322
- dark 900, the primary ink, did too. A border and the label beside it disagreed
323
- on temperature. It was too slight to notice as a colour, but enough to make a
324
- surface read slightly dirty next to a cool one.
325
-
326
- ### Decision
327
-
328
- Every tinted step sits at hue 286°. The off-hue steps (light 25, 50, 100, 200,
329
- 900; dark 800, 900) are regenerated at **their existing OKLCH lightness**, so
330
- contrast stays within 0.04 of its old value. Their chroma fits the curve
331
- already set by their neighbours: near zero at the ends, peaking in the
332
- mid-tones. Steps already at 286° are untouched. Pure white stays pure white.
333
- `npm run check` fails any step that leaves 286° ±3°.
334
-
335
- ### Consequences
336
-
337
- - A visible change, if a quiet one, so the release that carries it is a minor.
338
- - The cool ground does the job the original comment gave it: the warm mark
339
- and the amber attention state are the only warm things on a page.
340
-
341
- ---
342
-
343
- ## ADR-0008 — Cobalt is our own: OKLCH hue 256°, not Tailwind's blue
344
-
345
- **Status:** accepted · 2026-10-25
346
- **Amends:** ADR-0001 (the hue stays cobalt; the values change)
347
-
348
- ### Context
349
-
350
- ADR-0001 chose cobalt for two reasons: it's semantically inert, and it's
351
- complementary to larch, so identity and affordance don't compete. The values
352
- it shipped, `#2563eb` / `#1d4ed8` / `#1e40af` / `#1e3a8a` and `#60a5fa` /
353
- `#93c5fd` / `#bfdbfe`, are exactly Tailwind's `blue-600…900` and `blue-300…400`,
354
- and the sequential chart ramp was Tailwind's blues too. That undercut both the
355
- second reason and DESIGN.md §1's "nothing here should read as a template":
356
-
357
- - Tailwind's blue is at OKLCH 263–266°, leaning violet. Larch is ≈68°, so its
358
- opposite is ≈248°. The stock values were 15° further from that than they
359
- needed to be.
360
- - It isn't even one hue. Across the ramp the stock steps wander from 251.8°
361
- to 265.6°, so hover and pressed shift colour as well as depth.
362
- - It is the single most recognisable colour in the Tailwind default theme.
363
-
364
- ### Decision
365
-
366
- Every cobalt step, interactive and sequential, sits at **OKLCH hue 256°**, and
367
- `npm run check` holds it there ±3°. 256° is as near to larch's opposite as sRGB
368
- allows while keeping cobalt's chroma (≈0.18 at the fill). At 248–252° the gamut
369
- caps chroma near 0.14–0.16, which reads as steel or ocean blue, and links lose
370
- some of the "you can act on this" that ADR-0001 chose blue for.
371
-
372
- Each step's lightness was **solved for the contrast its predecessor met**, so
373
- every ratio is within 0.07 of before: fill 5.18:1 under a white label, link
374
- 6.78:1 on white, dark fill 7.07:1 on card. The sequential ramp keeps each
375
- step's OKLCH lightness and stays monotonic.
376
-
377
- ### Consequences
378
-
379
- - The blue is deeper and calmer than Tailwind's electric violet-blue, and it is
380
- one colour from fill to pressed. It still reads unmistakably as a link.
381
- - A visible change, so the release that carries it is a minor.
382
- - `--chart-1` is a separately validated categorical slot (ADR-0002) and is
383
- unchanged.
384
-
385
- ---
386
-
387
- ## ADR-0009 — Motion the reader asks for is allowed in the tool tier
388
-
389
- **Status:** accepted · 2026-10-31
390
-
391
- ### Context
392
-
393
- The tool tier has no motion (§2). driftwood's request flow view answers the
394
- first question on an incident call, "where does traffic come in and what does
395
- it pass through", and its *Trace a request* control walks a request through the
396
- diagram one hop at a time. Shown all at once, the order is only in the numbers;
397
- walked, it is obvious.
398
-
399
- ### Decision
400
-
401
- Motion is allowed in the tool tier when the reader starts it and it shows an
402
- order: it runs only on a click, can be stopped, every step it shows is also
403
- listed as text, and `prefers-reduced-motion` gets the final state at once (the
404
- whole path lit). It uses the selection treatment from §9, so it adds no hue.
405
- Decorative motion stays out.
406
-
407
- ### Consequences
408
-
409
- - The §7 contract still holds: nothing is hidden until an animation runs, and
410
- the page reads the same with the script off.
411
- - Any later animation in a tool has to meet the same four conditions or it is
412
- decorative.
413
-
414
- ---
415
-
416
- ## ADR-0010 — Product pages show, then tell
417
-
418
- **Status:** accepted · 2026-11-01
419
-
420
- ### Context
421
-
422
- The first product page built on §13 (driftwood.brignano.io) was shown on a
423
- phone to a technical reader outside its field. They scrolled once and handed
424
- the phone back. Rendered at iPhone size, the first screen was a 10-word thesis
425
- over four lines and a 47-word subhead, with no picture; the proof started a
426
- screen and a half down and was cropped; the page ran to almost nine screens,
427
- most of it four prose chapters (problem, how it works, who it's for, why now).
428
- The template asked for exactly that: copy before proof on a phone, and a story
429
- of chapters, which reads as a case study.
430
-
431
- ### Decision
432
-
433
- A product page shows, then tells. The hero splits into head (status, a thesis
434
- of 8 words or fewer naming the outcome), proof, and body (one sentence, the
435
- actions), and stacks in that order on a phone, so the proof is on the first
436
- screen. The story chapters give way to two short bands: three "what you get"
437
- cards that each lead with a picture, and three one-line steps. At most one
438
- chapter stays; the longer argument moves to the docs. `scripts/fold.mjs`
439
- checks the first phone screen and the page length in CI.
440
-
441
- ### Consequences
442
-
443
- - The older hero markup still lays out, so existing sites keep working until
444
- they move to the split; `fold.mjs` fails them until they do.
445
- - The pictures carry the colour (state hues with their words, §3); the page
446
- around them stays restrained.
447
- - driftwood, guidebook and sites each rewrite their copy to the new limits in
448
- their own repos.
449
- - A cold read of the first example still left a stranger asking who it was
450
- for, whether they could try it, and what "Request access" leads to. So the
451
- hero also carries an audience line (checked), the secondary action is a
452
- live demo when one exists, the note says what happens next, and unbacked
453
- claims are cut. Forced scroll animation was considered and rejected: it
454
- slows phones and loses skimmers; a hero clip carries the motion instead.
455
-
456
- ---
457
-
458
- ## ADR-0011 — Product pages start from a brief, and each looks like itself
459
-
460
- **Status:** accepted · 2026-11-02
461
- **Superseded in part by:** ADR-0017 (the three identity choices, and cobalt actions on a product page)
462
-
463
- ### Context
464
-
465
- ADR-0010 fixed the layout, and every product page still needed several rounds
466
- of "explain it to a stranger" review. Driftwood, Guidebook and Sites were
467
- each rebuilt on §13, then reworked again in their own repos: pain-first
468
- subheads, captions inside the clip, plain words in the mock, the person
469
- behind it, a plain price. Three causes:
470
-
471
- - Nothing fixed the **message** before the page. The words came from the
472
- repo, README and spec, so they described how the product works; each
473
- review was a positioning debate held through page edits.
474
- - Each review **added a required element** (an audience line, a "what happens
475
- next" note, the status in two places), so the first screen grew to ~100
476
- words while passing every check. `fold.mjs` counted the thesis and subhead
477
- but not the page.
478
- - The only clarity test, "hand it to someone outside the field", was a
479
- manual checkbox, so it didn't run.
480
-
481
- Put side by side, the three pages were also the same page: one grey ground,
482
- one cobalt audience line, one black thesis, one status pill twice, one proof
483
- on the right, one band order. Only the picture changed, so nobody looking
484
- across the projects could tell them apart.
485
-
486
- ### Decision
487
-
488
- - **Brief first.** Five lines (Who, Pain, Promise, Moment, Ask) in
489
- `BRIEF.md`, approved before any page; the page is built from it.
490
- - **Budgets, checked.** 40 words of copy on the first phone screen, 180 on the
491
- page, the status once. `fold.mjs` fails a page over them.
492
- - **The stranger test is a step, not a checkbox.** The first-screen shot goes
493
- to a person or a context-free agent with a fixed prompt; the answers go in
494
- the PR and must match the brief.
495
- - **Each product looks like itself.** A product mark (`--mark-teal`,
496
- `--mark-violet`, `--mark-magenta`) chosen with `data-mark`, a hero layout
497
- (`split`, `mirror`, `stage`) and a proof frame (bare, phone, browser). No two
498
- products share all three. Each page also picks its own signature band
499
- (cards, a comparison, or something of its own) instead of always having
500
- three cards.
501
- - Learned in the product repos and now in the template: the subhead is the Pain
502
- then the fix; clips carry captions; the mock speaks plain words; the
503
- audience line is ink, not cobalt.
504
-
505
- ### Consequences
506
-
507
- - A product mark is the one place a hue appears as a wash: the stage behind
508
- the hero proof, at 8%. That is a scoped exception to "identity is not a
509
- fill" (§3). It is safe because the product hues mean nothing else in the
510
- system, and the stage never sits behind a control or a state.
511
- - Actions stay cobalt on every product, so "you can click this" still means
512
- one thing everywhere.
513
- - §13 is shorter: the rules that drive clarity stay, and the ones that only
514
- added words are gone.
515
- - Driftwood, Guidebook and Sites each add a `BRIEF.md`, pick their identity
516
- and cut to the budgets in their own repos.
517
-
518
- ---
519
-
520
- ## ADR-0012 — Shared components ship as plain CSS in a cascade layer
521
-
522
- **Status:** accepted · 2026-11-07 · proposal `proposals/component-layer.md` (#45, #85)
523
-
524
- ### Context
525
-
526
- The package shipped tokens and the product-page template. Buttons, fields,
527
- messages and pills existed only on the preview pages, so every consumer rebuilt
528
- them, and they drifted (brignano.io: about five button styles, an `opacity-40`
529
- disabled state that §4 forbids).
530
-
531
- ### Decision
532
-
533
- - Components ship as **plain CSS classes**: `components.css` for controls and
534
- patterns, `templates/<name>.css` per page template. No React wrappers, no JS.
535
- - Short unprefixed names (`.btn`, `.field`) inside `@layer brignano.components`,
536
- so a consumer's own CSS and utilities win without `!important`. States come
537
- from real attributes (`disabled`, `aria-invalid`, `[open]`), never classes.
538
- - **Native first:** `<dialog>`, `popover`, `<details>`, anchor positioning.
539
- Where behaviour needs JS, design documents the ARIA contract and the consumer
540
- owns the script.
541
- - `.pp-button` / `.pp-field` become aliases of the shared classes until 1.0.
542
- - The full catalog is decided now in three waves; wave 3 is built only when a
543
- product needs it.
544
-
545
- ### Consequences
546
-
547
- - One import gives any surface, React or not, the same controls.
548
- - Every class must appear on a docs page, and contrast is checked in both
549
- themes (`npm run check`).
550
- - Behaviour bugs live in consumers' JS, not here; the docs pages carry the
551
- contract so they are written the same way.
552
-
553
- ---
554
-
555
- ## ADR-0013 — Overlays may move as they open and close
556
-
557
- **Status:** accepted · 2026-11-09 · #116, from #55
558
-
559
- ### Context
560
-
561
- The tool tier has no motion (§2), and §7 rules out entrance animation.
562
- ADR-0009 allowed one exception: motion the reader starts that shows an order.
563
- The component catalog (#55 dialog, #56 popover and menu, #58 toast) asked for
564
- open and close motion on overlays, which meets none of ADR-0009's conditions.
565
- Dialogs and sheets first shipped still (#115). A sheet that appears from
566
- nowhere doesn't say which edge it belongs to, and a dialog that blinks in
567
- reads as a page jump. Anthony chose to allow the motion with its own entry.
568
-
569
- ### Decision
570
-
571
- An overlay (dialog, sheet, popover or menu, toast) may animate as it opens
572
- and closes, in both tiers, when:
573
-
574
- - the person opened it, or it answers something they just did;
575
- - only `opacity` and `transform` move, for `--dur-fast` on `--ease`: a fade
576
- plus a slide of a few pixels, or a sheet sliding from its own edge;
577
- - the open state is fully shown without the animation (it comes from
578
- `@starting-style`), so a browser that lacks it shows the overlay at once;
579
- - `prefers-reduced-motion` makes it instant, `::backdrop` included.
580
-
581
- ### Consequences
582
-
583
- - §2's motion row and §7 name this as the one exception beside ADR-0009.
584
- Content on the page itself still never animates in.
585
- - `.dialog` and `.sheet` get the motion now. Popover, menu and toast use the
586
- same timing when they are built. The site header's phone menu (#54) can
587
- adopt it in a later change.
588
- - Anything else that wants to move still has to meet ADR-0009 or it is
589
- decorative.
590
-
591
- ---
592
-
593
- ## ADR-0014 — Identity is a mono voice, a product's mark inside its app, and heavy Geist
594
-
595
- **Status:** accepted · 2026-11-12 · #137, [`proposals/identity.md`](proposals/identity.md)
596
- **Supersedes:** the identity elements named in ADR-0004 (the trail, Silkscreen)
597
-
598
- ### Context
599
-
600
- ADR-0004 moved identity off amber fills and onto "the things that were always
601
- carrying it": the trail, the `A|B` monogram and the Silkscreen display face.
602
- The trail was later removed from brignano.io because it didn't help the
603
- experience, and neither of the other two ever shipped in the package. An app
604
- built from the system had no identity at all, and the product marks
605
- (ADR-0011) stopped at the product page. Anthony chose a direction from a
606
- wireframe (`previews/wireframes/identity.html`) and accepted the proposal.
607
-
608
- ### Decision
609
-
610
- - **A mono voice.** Every screen opens with one small uppercase mono label,
611
- and numbers, dates and codes are set in mono. A written rule, not a check.
612
- - **A product's mark follows it into its app.** `data-mark` on `<html>` sets
613
- the mark for everything below it: the brand glyph in the header and on
614
- error pages, and the rule above a hero heading. With no attribute the mark
615
- is the family amber (`--mark`), so personal tools share it. A product gets
616
- its own hue when it gets a product page.
617
- - **Heavy, tight Geist is the display treatment**, in both tiers, for an
618
- error code or the `A|B` stamp. Silkscreen is removed in the next minor
619
- release, after brignano.io has swapped it out.
620
- - A mark is still never a button, link, text or state (ADR-0004, ADR-0011).
621
- Cobalt stays the only colour that means "you can act on this".
622
-
623
- ### Consequences
624
-
625
- - The trail is no longer part of the identity; DESIGN.md §1, §3 and §5 and
626
- the comments in `tokens.css` drop it when the build lands.
627
- - `components.css` gains `.eyebrow`, `.num`, `.display`, `.stamp` and
628
- `.rule`; `tokens.css` gains the `data-mark` rules. `product-page.css`
629
- reads the same variable, so `.pp[data-mark]` keeps working.
630
- - `--display` stays as a token name, so nothing breaks by name when the
631
- Silkscreen override and font file go.
632
- - brignano.io, driftwood, guidebook and sites each get an issue: the first to
633
- swap Silkscreen, the others to set `data-mark`.
634
-
635
- ---
636
-
637
- ## ADR-0015 — A white label on cobalt in both themes; controls answer a press and a switch
638
-
639
- **Status:** accepted · 2026-11-12 · #136
640
- **Amends:** ADR-0001 (the dark steps of cobalt), ADR-0013 (what may move)
641
-
642
- ### Context
643
-
644
- A review of the whole system found three things that made the components
645
- read as a default kit. In dark the primary button was a pale blue with a dark
646
- label, and its hover and pressed steps were paler still, so the most
647
- important control on a screen looked washed out. Buttons, inputs, cards and
648
- dialogs shared corners that didn't say which was nested in which (a 12px
649
- button in a 12px card, beside a 6px input). And a control gave no feedback
650
- beyond a colour step, while switching a tab was an instant swap.
651
-
652
- ### Decision
653
-
654
- - **The cobalt fill takes a white label in both themes.** Dark `--i` is a
655
- saturated mid-cobalt (hue 256°, as light as a white label allows at 4.5:1),
656
- and `--i-hover` and `--i-pressed` step darker, as they do in light. `--i-ink`
657
- is unchanged, so in dark the fill and the ink are now different steps.
658
- `--on-i` is white everywhere; a `--danger` fill gets its own `--on-danger`,
659
- because rust still lifts to a pale fill with a dark label in dark.
660
- - **Controls have their own radius.** `--radius-control` (8px) for buttons,
661
- inputs, selects, the segmented control and menu items, between
662
- `--radius-sm` (chips, pills) and `--radius` (cards).
663
- - **A control may answer the person who used it.** A button settles by 2%
664
- while pressed, and a switch of view (a tab, a segment) may cross-fade
665
- through `document.startViewTransition()`, at the browser's default 250ms.
666
- The package styles nothing on the transition, so it can't change a site's
667
- own. Both are only ever started by the person, and neither happens under
668
- `prefers-reduced-motion`.
669
-
670
- ### Consequences
671
-
672
- - Everything drawn in `--i` in dark gets more saturated and darker: the
673
- checked checkbox and switch, the selected segment, the current page number,
674
- progress bars, the info dot, and the washes (`--i-surface`, `--i-line`,
675
- `--i-selection`), which mix the fill. All still clear their floors.
676
- - The danger button in dark keeps its pale fill and dark label. Bringing it
677
- in line means moving a state hue, which is a separate decision.
678
- - §7's list of what may move gains a third entry. Entrance, hover and scroll
679
- animation are still out.
680
- - Sheets and dialogs already move under ADR-0013 and get nothing new.
681
-
682
- ---
683
-
684
- ## ADR-0016 — The danger button has its own fills; the state hue doesn't move
685
-
686
- **Status:** accepted · 2026-11-12 · #147
687
- **Follows:** ADR-0015, which left the dark danger button as it was
688
-
689
- ### Context
690
-
691
- After ADR-0015 the primary button in dark is a deep cobalt with a white
692
- label. The danger button still filled with the state hue `--danger`, which in
693
- dark is a pale rust chosen to be read as text and marks on dark surfaces, so
694
- the button carried a dark label and went lighter on hover. Beside the primary
695
- the destructive action looked the softer of the two. Deepening `--danger`
696
- itself would have darkened every message, pill and field error with it.
697
-
698
- ### Decision
699
-
700
- A destructive button fills with tokens of its own: `--danger-fill`,
701
- `--danger-fill-hover` and `--danger-fill-pressed`, under a white
702
- `--on-danger` label in both themes. In light they are `--danger` and
703
- `--danger-ink`, so nothing changes there, and `npm run check` holds them to
704
- those. In dark they sit at rust's hue and chroma, as light as a white label
705
- allows at 4.5:1, stepping darker on hover and press: the method ADR-0015 used
706
- for cobalt.
707
-
708
- ### Consequences
709
-
710
- - `--danger`, `--danger-ink` and the danger washes are untouched, so
711
- messages, pills, toasts, field errors and diagram states look as before.
712
- - "Fill" and "state" are now separate roles for danger, as `--i` and `--i-ink`
713
- are for cobalt. Success and attention have no filled control, so they get
714
- no fill tokens until something needs one.
715
-
716
- ---
717
-
718
- ## ADR-0017 — A product page is built from what the product does
719
-
720
- **Status:** accepted · 2026-11-13 · #153
721
- **Supersedes in part:** ADR-0011 ("each looks like itself": the mark, layout and frame choices, and "actions stay cobalt on every product")
722
-
723
- ### Context
724
-
725
- ADR-0011 gave each product a mark, a hero layout and a proof frame. On the
726
- live sites that came to an 8% tint and whether the picture sat left or right.
727
- Driftwood, Guidebook and Sites still shared a header, a ground, a headline
728
- type, a status pill, a cobalt button in the same two places, a rounded stage
729
- and a band order, so switching between them read as one site with the words
730
- swapped. Anthony chose a direction from the wireframe
731
- (`previews/wireframes/product-identity.html`) and accepted the proposal
732
- (`proposals/product-identity.md`) the same day.
733
-
734
- ### Decision
735
-
736
- - **Five choices replace three.** Each product picks a ground, a voice for
737
- its thesis, a shape, a composition, and one piece of its own interface used
738
- on the page itself. No two products pick the same value for any of them.
739
- DESIGN.md §13 keeps the register.
740
- - **The primary button leaves cobalt on a product page.** It fills with the
741
- product's mark, or with ink. Inside the apps, buttons and links stay cobalt
742
- (ADR-0004, ADR-0014 unchanged).
743
- - **A product's look lives in its own repo**, written in tokens, with its
744
- choices in `BRIEF.md`. This package ships the tokens, the shared parts of
745
- `product-page.css` and the register, not a preset per product.
746
- - **Driftwood is rebuilt first**, then Guidebook, then Sites.
747
- - **A product page follows the visitor's theme** unless its look is a theme:
748
- Driftwood pins dark; Guidebook and Sites define their ground in both.
749
- - **No typeface per product for now.** Weight, size and mono carry the voice.
750
- Revisit if the three still read alike once built.
751
-
752
- ### Consequences
753
-
754
- - "One hue, one meaning" now has a second scoped exception on product pages:
755
- the mark may fill the one primary action and wash the page ground. It still
756
- never colours a link, text or a state, and never appears as a fill in an app.
757
- - The mark needs fill, label and surface tokens per product hue, each held to
758
- contrast in both themes by `npm run check`.
759
- - `product-page.css` stops being the look. The brief, show then tell, one
760
- primary action, the word budgets, `fold.mjs` and the stranger test stay.
761
- - Three pages differ, so a change to the shared rules is checked on three
762
- layouts. The `A|B` stamp in the footer is the one family resemblance.
763
-
764
- ## ADR-0018 — A product's card may carry its stage
765
-
766
- **Status:** accepted · 2026-11-15 · #164
767
- **Extends:** ADR-0011 (the stage behind a hero proof), ADR-0017
768
-
769
- ### Context
770
-
771
- brignano.io/projects lists products as cards, each with a drawing of what
772
- the product does. The approved wireframe puts each drawing on a faint field
773
- of its product's mark, so Driftwood's card reads as Driftwood before its
774
- name does. DESIGN.md §3 kept the mark grounds to product pages, and
775
- `.card-media` crops a photo to 16:9, which cuts a drawing's edges. Without a
776
- rule each site would invent its own tint.
777
-
778
- ### Decision
779
-
780
- - **`.card-media.card-stage`** draws the stage on a card: a
781
- `color-mix(in srgb, var(--mark-current) 8%, transparent)` field, with the
782
- picture padded and contained in its 16:9 box rather than cropped.
783
- - **Same strength as the product page.** `--pp-stage` and `.card-stage` mix
784
- the mark at 8%, so a product looks the same on its card and its page. No new
785
- token: `product-page.css` stays self-contained, so the value is repeated,
786
- and `npm run check` (gate 13) keeps the copies equal.
787
- - **Only on a card that stands for a product**, and only as its picture's
788
- ground. Buttons, links, text, chips and state on the card stay as they are.
789
- - **Unmarked products stay amber.** A product gets its own hue with its
790
- product page (§3); until then its card's stage is the family amber.
791
-
792
- ### Consequences
793
-
794
- - "Identity is not a fill" has a third scoped exception, the smallest: a
795
- translucent field behind one picture.
796
- - A site listing products gets the tint from the package instead of a local
797
- copy (brignano.io#340 drops its own).
798
- - Changing the stage strength means changing both files; the check fails
799
- until they agree.