@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/DESIGN.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The visual contract for every brignano surface: `brignano.io`, `life`, `homelab`,
4
4
  `driftwood`, and whatever comes next. Values live in [`tokens.css`](./tokens.css)
5
5
  and [`tokens.chart.css`](./tokens.chart.css); the reasoning is in
6
- [`DECISIONS.md`](./DECISIONS.md).
6
+ [`decisions/`](./decisions/README.md), one record per decision.
7
7
 
8
8
  **Read this before styling anything.** An agent asked to build a page in any of
9
9
  these repos should use these tokens, not invent a palette.
@@ -35,7 +35,7 @@ family, motion and shape are identical; what changes is how much room things get
35
35
  | Body size | 17px | 15px |
36
36
  | Section rhythm | `--s9` (96px) | `--s6` (32px) |
37
37
  | Measure | 68ch | 780px |
38
- | Display face | Silkscreen — monogram, hero eyebrows | none (aliases to `--sans`) |
38
+ | Display face | Silkscreen — hero eyebrows | none (aliases to `--sans`) |
39
39
  | Motion | scroll reveal, overlays opening and closing (ADR-0013), a press and a switch of view (ADR-0015) | none, except overlays opening and closing (ADR-0013), a press and a switch of view (ADR-0015) |
40
40
  | Density | whitespace carries the layout | scanning beats reading |
41
41
 
@@ -68,7 +68,7 @@ system coherent across a marketing site and an operational tool.
68
68
 
69
69
  ### Identity is not a fill
70
70
 
71
- `--mark` inks a **graphic**: a product's glyph, the `A|B` monogram, a hero rule.
71
+ `--mark` inks a **graphic**: a product's glyph, the bar in the `A|B` logo, a hero rule.
72
72
  That is its entire permitted use. It is never a button, chip, badge, wash, border,
73
73
  or link. The scoped exceptions are the next sections: a product page, and the
74
74
  stage behind a product's picture on its card.
@@ -202,9 +202,9 @@ Three roles, no more:
202
202
  countdowns align in a column.
203
203
  - **`--mono` (IBM Plex Mono)** — data that must read *precise*: confirmation codes,
204
204
  timestamps, stat numbers, eyebrow labels.
205
- - **`--display` (Silkscreen)** — marketing tier only. The `A|B` monogram and hero
206
- eyebrows. Used **once, well** — it is memorable precisely because it is
207
- concentrated. On the tool tier it aliases to `--sans`.
205
+ - **`--display` (Silkscreen)** — marketing tier only. Hero eyebrows; the `A|B`
206
+ logo is drawn, not set in it ("The logo", below). Used **once, well** — it is
207
+ memorable precisely because it is concentrated. On the tool tier it aliases to `--sans`.
208
208
 
209
209
  No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
210
210
 
@@ -226,6 +226,31 @@ No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
226
226
  above a hero heading. (`--display` still names Silkscreen on the marketing tier until
227
227
  #142 removes it.)
228
228
 
229
+ ### The logo
230
+
231
+ The `A|B` logo is the monogram drawn once, in [`logo/`](./logo): the initials in
232
+ Geist at 800, outlined, with the bar between them as a text cursor in the mark
233
+ colour. It is the `.stamp` treatment made into a picture, so the logo and the
234
+ type match.
235
+
236
+ | File | For |
237
+ |---|---|
238
+ | `logo/paths.mjs` | the path data (`MARK`, `TILE`) to inline it: a site header, a share card |
239
+ | `logo/mark.svg` | the mark as an `<img>`, inked for the OS theme |
240
+ | `logo/tile.svg` | the favicon: the mark in an ink tile, the same in both themes |
241
+ | `logo/tile-180.png`, `logo/tile-512.png` | `apple-touch-icon` and the web manifest |
242
+
243
+ - **Inline it where the page has tokens.** The letters take `--ink` and the bar
244
+ `--mark-current`, so the header follows the site theme, not the OS. An
245
+ `<img>` can only follow the OS.
246
+ - **The letters are ink and only the bar is amber.** Never the whole mark in
247
+ `--mark`, never the letters in a state colour, never a gradient or a shadow.
248
+ - **Size by height.** 24 to 32px in a header; under 20px use the tile.
249
+ - **The tile is for icons only:** favicon, home screen, an app's sign-in. On a
250
+ page, use the bare mark.
251
+ - **The bar doesn't move,** except at most one blink on a page's first load,
252
+ and none under `prefers-reduced-motion`.
253
+
229
254
  Sizes change with the tier (`--text-xs` … `--text-4xl`); weight, leading and
230
255
  tracking don't:
231
256
 
@@ -828,6 +853,10 @@ and in what order: [`proposals/component-layer.md`](./proposals/component-layer.
828
853
  `aria-hidden`; an icon-only button carries an `aria-label`. Need one that
829
854
  isn't there? Add it from Lucide in a PR; don't draw one or pull in another
830
855
  set. Brand logos are the exception and stay with their brands.
856
+ - **Chip, segmented or tag.** A filter chip (`.chip`, a `<button>` with
857
+ `aria-pressed`) toggles one filter on a list, and any number can be on. One
858
+ of a few is `.segmented`; a filter already applied, with a remove button, is
859
+ `.tag`.
831
860
  - **Switch or checkbox.** A switch (`.switch`, `role="switch"`) is only for a
832
861
  setting that takes effect the moment it flips. Anything sent with a form's
833
862
  submit button is a checkbox, because a switch promises an effect the form
@@ -961,8 +990,9 @@ currency ("US$", "€") only when the reader could mistake it.
961
990
 
962
991
  These don't appear in a product's interface: exclamation marks; "simply",
963
992
  "just" or "easy" when they play a task down (they blame the person when it
964
- isn't); "Oops" or "Uh-oh"; emoji as words; ALL CAPS typed into the text; and,
965
- on marketing pages, jargon the reader has to look up.
993
+ isn't); "Oops" or "Uh-oh"; emoji as words, icons or category markers (use a
994
+ word or a Lucide icon); ALL CAPS typed into the text; and, on marketing pages,
995
+ jargon the reader has to look up.
966
996
 
967
997
  - Do: "Couldn't load your trips. Try again."
968
998
  - Don't: "Oops! Something went wrong!! Simply refresh."
package/README.md CHANGED
@@ -6,13 +6,14 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
6
6
  | File | What it is |
7
7
  |---|---|
8
8
  | [`DESIGN.md`](./DESIGN.md) | **Start here.** The rules — the three colour layers, the two tiers, type, motion. |
9
- | [`DECISIONS.md`](./DECISIONS.md) | Why the values are what they are. ADRs. |
9
+ | [`decisions/`](./decisions/README.md) | Why the values are what they are. One ADR per file. |
10
10
  | [`tokens.css`](./tokens.css) | Single source of truth for colour, type, space, shape, motion. |
11
11
  | [`tokens.chart.css`](./tokens.chart.css) | Validated categorical palette for data viz. |
12
12
  | [`components.css`](./components.css) | Shared controls and patterns as plain CSS in `@layer brignano.components`: one import, any framework. DESIGN.md §14; catalog in `proposals/component-layer.md`; preview in `previews/components.html`. |
13
13
  | [`product-page.css`](./product-page.css) | The structure of a product's marketing page, built from a five-line brief: thesis and proof on the first phone screen, one signature band, how it works, closing ask. The shared parts every page needs, and a starting point for the look each product writes over it: its mark fills the primary button, and five choices keep any two products from looking alike (ADR-0017). DESIGN.md §13; skeleton in `previews/product-page.html`, one worked example per product in `previews/product-page-example.html` (Driftwood), `product-page-guidebook.html` and `product-page-sites.html`, first-screen check in `scripts/fold.mjs`. |
14
14
  | [`templates/`](./templates) | Page templates built on `components.css`: `article.css` (posts and docs), `changelog.css`, `legal.css`, `error.css` (404, 500, offline), `settings.css`, and a transactional email (`email.html` + `email.txt`, filled from the tokens by `scripts/email-tokens.mjs`). Import as `@brignano/design/templates/<name>.css`. |
15
15
  | [`icons/`](./icons) | One curated outline icon set (Lucide, ISC; `icons/LICENSE`) on a 24px grid in `currentColor`. Size with `.icon-sm`, `.icon`, `.icon-lg` from `components.css`; browse and copy in `previews/icons.html`. Paste the markup inline (`@brignano/design/icons/<name>.svg`); through `<img>` an icon can't take the text colour. |
16
+ | [`logo/`](./logo) | The `A\|B` logo: `paths.mjs` to inline it (letters in `--ink`, bar in `--mark-current`), `mark.svg` for an `<img>`, `tile.svg` and the tile PNGs for a favicon and app icon. Rules in DESIGN.md §5, "The logo". |
16
17
  | [`previews/`](./previews) | Live swatches. Open one in a browser to see the tokens render. |
17
18
 
18
19
  ## The shape of it
package/components.css CHANGED
@@ -396,6 +396,57 @@
396
396
  }
397
397
  }
398
398
 
399
+ /* ── Filter chip (issue 167) ───────────────────────────────────────────────────
400
+ <div class="cluster gap-2" role="group" aria-label="Stage">
401
+ <button type="button" class="chip" aria-pressed="true">Lead</button>
402
+ <button type="button" class="chip" aria-pressed="false">Quoted</button>
403
+ </div>
404
+ A toggle for a filterable list: any number can be on at once. The state
405
+ is aria-pressed, never a class; your script flips it and filters the
406
+ list. Off is the card ground with a control edge; on is the --i fill, the
407
+ same as a chosen .segmented option. One of a few is .segmented; a filter
408
+ already applied, with a remove button, is .tag. */
409
+ @layer brignano.components {
410
+ .chip {
411
+ display: inline-flex;
412
+ align-items: center;
413
+ justify-content: center;
414
+ min-height: 32px;
415
+ margin: 0;
416
+ padding: 0 var(--s3);
417
+ border: 1px solid var(--line-control);
418
+ border-radius: var(--radius-control);
419
+ background-color: var(--card);
420
+ color: var(--ink);
421
+ font: inherit;
422
+ font-size: var(--text-sm);
423
+ font-weight: var(--weight-medium);
424
+ line-height: 20px;
425
+ white-space: nowrap;
426
+ cursor: pointer;
427
+ user-select: none;
428
+ transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
429
+ }
430
+ .chip:hover:not(:disabled) { background-color: var(--surface-hover); }
431
+ .chip[aria-pressed='true'], .chip[aria-pressed='true']:hover:not(:disabled) { border-color: transparent; background-color: var(--i); color: var(--on-i); }
432
+ .chip:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
433
+ .chip:disabled { border-color: var(--line); color: var(--i-disabled-ink); cursor: not-allowed; }
434
+ .chip[aria-pressed='true']:disabled { border-color: transparent; background-color: var(--i-disabled-bg); color: var(--i-disabled-ink); }
435
+
436
+ @media (pointer: coarse) {
437
+ .chip { min-height: 44px; }
438
+ }
439
+ @media (forced-colors: active) {
440
+ .chip { forced-color-adjust: none; border-color: CanvasText; background-color: Canvas; color: CanvasText; }
441
+ .chip[aria-pressed='true'] { border-color: Highlight; background-color: Highlight; color: HighlightText; }
442
+ .chip:disabled, .chip[aria-pressed='true']:disabled { border-color: GrayText; background-color: Canvas; color: GrayText; }
443
+ .chip:focus-visible { outline-color: CanvasText; }
444
+ }
445
+ @media (prefers-reduced-motion: reduce) {
446
+ .chip { transition: none; }
447
+ }
448
+ }
449
+
399
450
  /* ── Message and banner (#50) ─────────────────────────────────────────────
400
451
  <div class="msg msg-danger" role="alert">
401
452
  <svg aria-hidden="true" …></svg>
@@ -0,0 +1,56 @@
1
+ # ADR-0001 — The interactive hue is cobalt
2
+
3
+ **Status:** accepted · 2026-08-23
4
+ **Supersedes:** `brignano.io/docs/tsd-site-modernization.md` §10.3
5
+
6
+ ## Context
7
+
8
+ `brignano.io` shipped electric indigo/violet (`#6d28d9` / `#a78bfa`). `life`
9
+ shipped a warm functional ramp. Neither was chosen as an interactive colour —
10
+ §10.3 records violet as resolving a *negative* constraint:
11
+
12
+ > **Accent color:** ✅ **Shift the hue** away from emerald. Candidate: an
13
+ > **electric indigo/violet** … **amber as fallback**.
14
+
15
+ That decision answered "not green." A long argument followed about whether amber
16
+ or violet should replace it, which was the wrong argument — see ADR-0004. Once
17
+ identity, affordance and state were separated, the only question left was what
18
+ colour a *control* should be.
19
+
20
+ ## Decision
21
+
22
+ Cobalt (`#2563eb` / `#60a5fa`), with a full hover / pressed / focus / disabled ramp.
23
+
24
+ ## Rationale
25
+
26
+ Cobalt, indigo and violet were all measured against both grounds. **All three
27
+ cleared every gate**, so contrast did not decide it:
28
+
29
+ | Candidate | Text (light) | Fill (light) | Text (dark) | Pressed (dark) |
30
+ |---|---|---|---|---|
31
+ | cobalt | 6.70 | 5.17 | 7.64 | 10.77 |
32
+ | indigo | 7.90 | 6.29 | 6.51 | 9.74 |
33
+ | violet | 7.10 | 5.70 | 7.13 | 10.52 |
34
+
35
+ It was decided on the two things contrast can't measure:
36
+
37
+ 1. **Semantically inert.** Amber means caution, green means success, red means
38
+ error — all of them arrive with meaning already attached. Blue arrives with
39
+ none, which is exactly why product UIs converged on it. That is a functional
40
+ property, not a fashion.
41
+ 2. **Complementary to the mark hue.** Cobalt sits opposite larch on the wheel, so
42
+ identity and affordance never compete for the same attention.
43
+
44
+ Cobalt over indigo/violet specifically: it has the most dark-mode headroom of the
45
+ three, and blue is the most conventional link colour in existence — the lowest
46
+ cognitive cost and the highest affordance. **Distinctiveness belongs in the brand
47
+ layer; conventionality belongs in the control layer.** That is how you get both.
48
+
49
+ ## Consequences
50
+
51
+ - `brignano.io` migration surface: 4 literal hexes in `app/globals.css` plus ~15
52
+ `violet-*` utilities. Map **by job**, not find-and-replace: `.text-primary-color`
53
+ → `--i-ink`, filled buttons → `--i`, focus rings → `--i-ink`.
54
+ - The trail's summit zone (`tsd-signature-experience.md` §5.2, "summit
55
+ indigo/violet") is re-inked with `--mark`.
56
+ - `life` is unaffected — it has no interactive colour today.
@@ -0,0 +1,48 @@
1
+ # ADR-0002 — Charts keep a full categorical palette, re-derived and validated
2
+
3
+ **Status:** accepted · 2026-08-23
4
+
5
+ ## Context
6
+
7
+ An earlier draft suggested the `/coding` chart palette was "undercutting the
8
+ identity" and should derive from the brand accent. **That was wrong**, and it is
9
+ worth recording why.
10
+
11
+ Series colour answers *"which of these eight things am I looking at?"*, which needs
12
+ eight hues a human can separate at a glance. Deriving eight series colours from one
13
+ hue produces eight of that hue nobody can tell apart. **Charts genuinely need the
14
+ range.** The constraint is *separability*, not restraint.
15
+
16
+ ## The actual problem
17
+
18
+ `components/stats/chart-colors.ts` is not too colourful — it is insufficiently
19
+ separable. Validated (light, 10 slots):
20
+
21
+ ```
22
+ [FAIL] Lightness band outside band: #ef9aa3, #34d399
23
+ [WARN] CVD separation worst adjacent #a78bfa <-> #06b6d4 dE 6.6 (deutan)
24
+ [FAIL] Normal-vision floor worst adjacent #ef9aa3 <-> #f97316 dE 13.7
25
+ [WARN] Contrast vs surface 8 of 10 below 3:1
26
+ ```
27
+
28
+ ΔE 13.7 means those two are hard to separate **with full colour vision**, before
29
+ colourblindness is considered.
30
+
31
+ ## Decision
32
+
33
+ Keep a full 8-hue categorical palette, capped at 8 + "Other". Replace the values
34
+ with a set that passes every hard gate in both modes (adjacent CVD ΔE 9.1 light /
35
+ 8.4 dark; normal-vision ΔE 19.6 / 19.3). Values in `tokens.chart.css`.
36
+
37
+ ## Consequences
38
+
39
+ - **Slot order is load-bearing** — the gates measure *adjacent* pairs, so
40
+ re-ordering silently breaks colourblind safety. Fixed order, never cycled.
41
+ - Three light-mode slots sit below 3:1; that is legal only with relief (visible
42
+ labels or a table view). The donut's centre readout and legend already satisfy it.
43
+ - `stats-pie.tsx` already takes the top 8 and aggregates the rest — now the
44
+ documented rule rather than an implementation detail.
45
+ - Colour must follow the **entity**, not its rank. The current code indexes by
46
+ sorted position, so a data shift repaints every series. Map name → slot once.
47
+ - `chart-colors.ts` should read the CSS custom properties rather than literal hex,
48
+ or the two will drift the way everything else did.
@@ -0,0 +1,47 @@
1
+ # ADR-0003 — The system lives in one public repo, consumed as a package
2
+
3
+ **Status:** accepted · 2026-08-23
4
+
5
+ ## Decision
6
+
7
+ A standalone repo — `brignano/design` — installed as `@brignano/design`.
8
+
9
+ ## Rationale
10
+
11
+ **It cannot live in `life`.** `life` is private and holds confirmation codes and
12
+ booking details. `brignano.io` is public. A public site cannot install tokens from
13
+ a private repo without handing out credentials to the repo storing your boarding
14
+ passes. Hard blocker, not preference.
15
+
16
+ **It should not live in `brignano.io`.** That makes the site the owner and every
17
+ tool a downstream guest, pinning tools to the site's release cycle.
18
+
19
+ **Copy-paste is what already failed** — two repos, two stylesheets, two accents,
20
+ two chart palettes, and a documented decision only one of them followed.
21
+
22
+ ## Distribution
23
+
24
+ Three channels, because there are three kinds of consumer:
25
+
26
+ | Consumer | Channel |
27
+ |---|---|
28
+ | npm projects with a build (`brignano.io`, `life`) | git dependency pinned to a tag |
29
+ | no-build surfaces (`homelab`, a static page) | jsDelivr against the public repo |
30
+ | **projects that don't exist yet** | a Claude skill generated from this repo |
31
+
32
+ The third is the one that matters for "as I create new things" — a skill follows
33
+ the account, so a new project gets the system without anyone wiring it up.
34
+
35
+ npm publishing is deferred until `brignano.io` actually consumes it, so the first
36
+ published version isn't one that's immediately superseded. The scope `@brignano` is
37
+ already owned (it is the npm username), so no org setup is needed.
38
+
39
+ ## Consequences
40
+
41
+ - The repo must be **public**: private npm needs a paid plan, jsDelivr only serves
42
+ public repos, and a public `brignano.io` that can't `npm install` is broken.
43
+ - Nothing here is secret — hex values and spacing rules aren't a moat — and the
44
+ documented reasoning is itself a portfolio asset.
45
+ - Consumers pin the **same tag** and bump together. If one tracks `main` and another
46
+ a tag, the drift this repo exists to prevent comes straight back.
47
+ - A token rename is a breaking change.
@@ -0,0 +1,50 @@
1
+ # ADR-0004 — One hue, one meaning
2
+
3
+ **Status:** accepted · 2026-08-23
4
+ **Supersedes:** the "single accent" model in the first draft of this system
5
+
6
+ ## Context
7
+
8
+ The first draft had one accent carrying identity, affordance *and* warning. That is
9
+ what produced a long amber-versus-violet argument, and the argument was unwinnable
10
+ because the question was wrong: no hue can be all three without one meaning bleeding
11
+ into the others.
12
+
13
+ Worse, the founding rule of this system — *colour carries meaning, never
14
+ decoration* — was being violated by the system itself. A hue with two meanings is
15
+ exactly the thing the rule forbids, just relocated.
16
+
17
+ ## Decision
18
+
19
+ Every hue answers exactly one question, on every surface, in both tiers. Two
20
+ specific consequences:
21
+
22
+ **1. Attention is one meaning.** A warning toast, the `NEXT UP` strip, and a
23
+ deposit closing in six days are the same message at different volumes, so they are
24
+ the same colour. There is no separate "warning" hue and no separate "now/next" hue.
25
+ This is what lets a marketing site and an operational tool share one palette
26
+ honestly rather than by coincidence.
27
+
28
+ **2. Identity is not a fill.** `--mark` inks a graphic — the trail, the monogram, a
29
+ hero rule — and nothing else.
30
+
31
+ The intermediate proposal was to keep a `--brand-*` family and manage the overlap
32
+ with amber's warning meaning by convention: brand only at large decorative scale,
33
+ warning always with an icon. That works, and warm-brand companies do it. It was
34
+ rejected because it is enforced by remembering, every time, forever — and rules
35
+ enforced by remembering get forgotten by a version of you in a hurry. Naming is
36
+ cheaper and more reliable enforcement: `--brand` invites someone to tint a button
37
+ with it; `--mark` does not.
38
+
39
+ ## Consequences
40
+
41
+ - `brignano.io` gives up a brand fill for tinting eyebrows and section rules. Those
42
+ go to ink and neutrals — arguably better, since tinted eyebrow rules are the
43
+ portfolio-template tell the modernization TSD set out to escape.
44
+ - Identity now rests on the trail, the monogram, the type, and restraint. If that
45
+ feels thin in place, the fix is a stronger *mark*, not a tinted interface.
46
+ - Feedback state (success/attention/danger) and domain status (booked/active/
47
+ overdue) share hue families deliberately. Context plus the mandatory icon-and-word
48
+ separates them; a form error is not "rust means overdue", but they are the same
49
+ register of message.
50
+ - Nothing amber is clickable anywhere in the system.
@@ -0,0 +1,30 @@
1
+ # ADR-0005 — Diagrams are not charts: neutral nodes, colour for state only
2
+
3
+ **Status:** accepted · 2026-10-13
4
+
5
+ ## Context
6
+
7
+ `driftwood` draws architecture diagrams and was the first consumer to need them.
8
+ Its first pass on these tokens took the chart exception (§8, ADR-0002) and tinted
9
+ each node by family (edge, compute, data, messaging…) with `--chart-1…6`. On a
10
+ real 46-resource platform that put six hues on screen before anything was wrong,
11
+ and the database that was down was one more tinted box among them.
12
+
13
+ ## Decision
14
+
15
+ A diagram follows the restraint rule. The chart exception exists because a chart
16
+ has nothing *but* colour to tell series apart; a diagram node has an icon, a name
17
+ and a kind label, so family is already carried three times. Nodes are neutral.
18
+ Colour is reserved for state: health (`--danger`, `--attention`) and what a change
19
+ did, via three new aliases — `--diff-added`, `--diff-changed`, `--diff-removed` —
20
+ over the existing state hues. No new hue enters the system.
21
+
22
+ ## Consequences
23
+
24
+ - On a healthy, unchanged system the diagram is grey, and that is correct:
25
+ nothing is asking for you.
26
+ - `--diff-changed` shares cobalt with links. Context separates them (a node edge
27
+ with a `~ changed` tag is not underlined text), the same way feedback and domain
28
+ status share hues in ADR-0004.
29
+ - Standalone exports (SVG files, Mermaid in a pull request) take the light theme's
30
+ values, resolved from `tokens.css` by the consumer at build time.
@@ -0,0 +1,55 @@
1
+ # ADR-0006 — One declaration per colour, via `light-dark()`
2
+
3
+ **Status:** accepted · 2026-10-25
4
+
5
+ ## Context
6
+
7
+ Dark mode lived in three lists: a `prefers-color-scheme` block (the OS default),
8
+ a `[data-theme='dark']` block (the toggle, which has to win), and a copy in
9
+ `previews/_preview.css` so a preview could show both themes at once. CSS can't
10
+ share one declaration block between a media query and a selector, so the
11
+ duplication was structural, and the file's own rule — "edit one, edit the other"
12
+ — was enforced by remembering. The preview copy had already fallen behind
13
+ (`--i-selection`, `--scrim` and `--on-dark` were missing).
14
+
15
+ ## Decision
16
+
17
+ Every colour is declared once, on `:root`, as `light-dark(<light>, <dark>)`. The
18
+ theme is `color-scheme`: `light dark` by default, pinned by `[data-theme]`.
19
+
20
+ Arguments are always concrete colours, never a `var()` to another
21
+ theme-dependent token. Nested `light-dark()` — directly, or inside
22
+ `color-mix()` — is valid CSS, but support across engines couldn't be verified
23
+ when this was written, and getting it wrong would blank colours in one browser.
24
+ Where that forces a repeat (a wash repeats its hue, `--bg` repeats a ramp step),
25
+ `npm run check` holds the copy to its source.
26
+
27
+ Shadows differ in blur as well as colour, and `light-dark()` only switches
28
+ colour, so the two themes' shadows are separate layers, each transparent in the
29
+ other theme.
30
+
31
+ ## Rationale
32
+
33
+ - **Drift becomes impossible rather than checked.** There's no second list.
34
+ - **Theming becomes scoped for free.** The value is picked where a colour is
35
+ used, so `data-theme="dark"` on a `<section>` themes that section. The preview's
36
+ forced-dark panel is now `color-scheme: dark` and nothing else.
37
+ - **No change in output.** Verified in Chromium against the previous file: all
38
+ 119 tokens are identical in five setups (OS light, OS dark, a toggle forcing
39
+ each way, and both agreeing). The shadows and every preview page are
40
+ identical pixel for pixel.
41
+
42
+ ## Consequences
43
+
44
+ - Browser floor: Chrome/Edge 123, Firefox 120, Safari 17.5.
45
+ - `getPropertyValue('--x')` returns the `light-dark(…)` text. JavaScript that
46
+ needs a colour resolves it through `getComputedStyle` on an element
47
+ (DESIGN.md §11). ADR-0002's advice that `chart-colors.ts` read the custom
48
+ properties still stands, but by that route.
49
+ - Consumers shouldn't wrap tokens in `color-mix()`; washes are tokens. The
50
+ first consumer that needed one (`life`'s sticky bars) got `--surface-sticky`
51
+ in 0.3.1 rather than a local mix.
52
+ - A build that lowers `light-dark()` for older browsers (Lightning CSS, inside
53
+ Next.js and Vite) fixes the theme at `:root`, losing scoped theming. Found in
54
+ `brignano.io`; consumers set `browserslist` to the floor (DESIGN.md §11).
55
+ - Not a token rename and not a visual change, so a patch release.
@@ -0,0 +1,27 @@
1
+ # ADR-0007 — The neutral ramp is one temperature: OKLCH hue 286°
2
+
3
+ **Status:** accepted · 2026-10-25
4
+
5
+ ## Context
6
+
7
+ `tokens.css` called the ramp "cool-leaning", and most of it was: light 300–800
8
+ and dark 0–800 sit at OKLCH hue 286°. But light 50, 100 and 200 — the hairline,
9
+ `--line-soft`, the hover and pressed surfaces — sat at 106°, a faint yellow, and
10
+ dark 900, the primary ink, did too. A border and the label beside it disagreed
11
+ on temperature. It was too slight to notice as a colour, but enough to make a
12
+ surface read slightly dirty next to a cool one.
13
+
14
+ ## Decision
15
+
16
+ Every tinted step sits at hue 286°. The off-hue steps (light 25, 50, 100, 200,
17
+ 900; dark 800, 900) are regenerated at **their existing OKLCH lightness**, so
18
+ contrast stays within 0.04 of its old value. Their chroma fits the curve
19
+ already set by their neighbours: near zero at the ends, peaking in the
20
+ mid-tones. Steps already at 286° are untouched. Pure white stays pure white.
21
+ `npm run check` fails any step that leaves 286° ±3°.
22
+
23
+ ## Consequences
24
+
25
+ - A visible change, if a quiet one, so the release that carries it is a minor.
26
+ - The cool ground does the job the original comment gave it: the warm mark
27
+ and the amber attention state are the only warm things on a page.
@@ -0,0 +1,41 @@
1
+ # ADR-0008 — Cobalt is our own: OKLCH hue 256°, not Tailwind's blue
2
+
3
+ **Status:** accepted · 2026-10-25
4
+ **Amends:** ADR-0001 (the hue stays cobalt; the values change)
5
+
6
+ ## Context
7
+
8
+ ADR-0001 chose cobalt for two reasons: it's semantically inert, and it's
9
+ complementary to larch, so identity and affordance don't compete. The values
10
+ it shipped, `#2563eb` / `#1d4ed8` / `#1e40af` / `#1e3a8a` and `#60a5fa` /
11
+ `#93c5fd` / `#bfdbfe`, are exactly Tailwind's `blue-600…900` and `blue-300…400`,
12
+ and the sequential chart ramp was Tailwind's blues too. That undercut both the
13
+ second reason and DESIGN.md §1's "nothing here should read as a template":
14
+
15
+ - Tailwind's blue is at OKLCH 263–266°, leaning violet. Larch is ≈68°, so its
16
+ opposite is ≈248°. The stock values were 15° further from that than they
17
+ needed to be.
18
+ - It isn't even one hue. Across the ramp the stock steps wander from 251.8°
19
+ to 265.6°, so hover and pressed shift colour as well as depth.
20
+ - It is the single most recognisable colour in the Tailwind default theme.
21
+
22
+ ## Decision
23
+
24
+ Every cobalt step, interactive and sequential, sits at **OKLCH hue 256°**, and
25
+ `npm run check` holds it there ±3°. 256° is as near to larch's opposite as sRGB
26
+ allows while keeping cobalt's chroma (≈0.18 at the fill). At 248–252° the gamut
27
+ caps chroma near 0.14–0.16, which reads as steel or ocean blue, and links lose
28
+ some of the "you can act on this" that ADR-0001 chose blue for.
29
+
30
+ Each step's lightness was **solved for the contrast its predecessor met**, so
31
+ every ratio is within 0.07 of before: fill 5.18:1 under a white label, link
32
+ 6.78:1 on white, dark fill 7.07:1 on card. The sequential ramp keeps each
33
+ step's OKLCH lightness and stays monotonic.
34
+
35
+ ## Consequences
36
+
37
+ - The blue is deeper and calmer than Tailwind's electric violet-blue, and it is
38
+ one colour from fill to pressed. It still reads unmistakably as a link.
39
+ - A visible change, so the release that carries it is a minor.
40
+ - `--chart-1` is a separately validated categorical slot (ADR-0002) and is
41
+ unchanged.
@@ -0,0 +1,26 @@
1
+ # ADR-0009 — Motion the reader asks for is allowed in the tool tier
2
+
3
+ **Status:** accepted · 2026-10-31
4
+
5
+ ## Context
6
+
7
+ The tool tier has no motion (§2). driftwood's request flow view answers the
8
+ first question on an incident call, "where does traffic come in and what does
9
+ it pass through", and its *Trace a request* control walks a request through the
10
+ diagram one hop at a time. Shown all at once, the order is only in the numbers;
11
+ walked, it is obvious.
12
+
13
+ ## Decision
14
+
15
+ Motion is allowed in the tool tier when the reader starts it and it shows an
16
+ order: it runs only on a click, can be stopped, every step it shows is also
17
+ listed as text, and `prefers-reduced-motion` gets the final state at once (the
18
+ whole path lit). It uses the selection treatment from §9, so it adds no hue.
19
+ Decorative motion stays out.
20
+
21
+ ## Consequences
22
+
23
+ - The §7 contract still holds: nothing is hidden until an animation runs, and
24
+ the page reads the same with the script off.
25
+ - Any later animation in a tool has to meet the same four conditions or it is
26
+ decorative.
@@ -0,0 +1,39 @@
1
+ # ADR-0010 — Product pages show, then tell
2
+
3
+ **Status:** accepted · 2026-11-01
4
+
5
+ ## Context
6
+
7
+ The first product page built on §13 (driftwood.brignano.io) was shown on a
8
+ phone to a technical reader outside its field. They scrolled once and handed
9
+ the phone back. Rendered at iPhone size, the first screen was a 10-word thesis
10
+ over four lines and a 47-word subhead, with no picture; the proof started a
11
+ screen and a half down and was cropped; the page ran to almost nine screens,
12
+ most of it four prose chapters (problem, how it works, who it's for, why now).
13
+ The template asked for exactly that: copy before proof on a phone, and a story
14
+ of chapters, which reads as a case study.
15
+
16
+ ## Decision
17
+
18
+ A product page shows, then tells. The hero splits into head (status, a thesis
19
+ of 8 words or fewer naming the outcome), proof, and body (one sentence, the
20
+ actions), and stacks in that order on a phone, so the proof is on the first
21
+ screen. The story chapters give way to two short bands: three "what you get"
22
+ cards that each lead with a picture, and three one-line steps. At most one
23
+ chapter stays; the longer argument moves to the docs. `scripts/fold.mjs`
24
+ checks the first phone screen and the page length in CI.
25
+
26
+ ## Consequences
27
+
28
+ - The older hero markup still lays out, so existing sites keep working until
29
+ they move to the split; `fold.mjs` fails them until they do.
30
+ - The pictures carry the colour (state hues with their words, §3); the page
31
+ around them stays restrained.
32
+ - driftwood, guidebook and sites each rewrite their copy to the new limits in
33
+ their own repos.
34
+ - A cold read of the first example still left a stranger asking who it was
35
+ for, whether they could try it, and what "Request access" leads to. So the
36
+ hero also carries an audience line (checked), the secondary action is a
37
+ live demo when one exists, the note says what happens next, and unbacked
38
+ claims are cut. Forced scroll animation was considered and rejected: it
39
+ slows phones and loses skimmers; a hero clip carries the motion instead.
@@ -0,0 +1,59 @@
1
+ # ADR-0011 — Product pages start from a brief, and each looks like itself
2
+
3
+ **Status:** accepted · 2026-11-02
4
+ **Superseded in part by:** ADR-0017 (the three identity choices, and cobalt actions on a product page)
5
+
6
+ ## Context
7
+
8
+ ADR-0010 fixed the layout, and every product page still needed several rounds
9
+ of "explain it to a stranger" review. Driftwood, Guidebook and Sites were
10
+ each rebuilt on §13, then reworked again in their own repos: pain-first
11
+ subheads, captions inside the clip, plain words in the mock, the person
12
+ behind it, a plain price. Three causes:
13
+
14
+ - Nothing fixed the **message** before the page. The words came from the
15
+ repo, README and spec, so they described how the product works; each
16
+ review was a positioning debate held through page edits.
17
+ - Each review **added a required element** (an audience line, a "what happens
18
+ next" note, the status in two places), so the first screen grew to ~100
19
+ words while passing every check. `fold.mjs` counted the thesis and subhead
20
+ but not the page.
21
+ - The only clarity test, "hand it to someone outside the field", was a
22
+ manual checkbox, so it didn't run.
23
+
24
+ Put side by side, the three pages were also the same page: one grey ground,
25
+ one cobalt audience line, one black thesis, one status pill twice, one proof
26
+ on the right, one band order. Only the picture changed, so nobody looking
27
+ across the projects could tell them apart.
28
+
29
+ ## Decision
30
+
31
+ - **Brief first.** Five lines (Who, Pain, Promise, Moment, Ask) in
32
+ `BRIEF.md`, approved before any page; the page is built from it.
33
+ - **Budgets, checked.** 40 words of copy on the first phone screen, 180 on the
34
+ page, the status once. `fold.mjs` fails a page over them.
35
+ - **The stranger test is a step, not a checkbox.** The first-screen shot goes
36
+ to a person or a context-free agent with a fixed prompt; the answers go in
37
+ the PR and must match the brief.
38
+ - **Each product looks like itself.** A product mark (`--mark-teal`,
39
+ `--mark-violet`, `--mark-magenta`) chosen with `data-mark`, a hero layout
40
+ (`split`, `mirror`, `stage`) and a proof frame (bare, phone, browser). No two
41
+ products share all three. Each page also picks its own signature band
42
+ (cards, a comparison, or something of its own) instead of always having
43
+ three cards.
44
+ - Learned in the product repos and now in the template: the subhead is the Pain
45
+ then the fix; clips carry captions; the mock speaks plain words; the
46
+ audience line is ink, not cobalt.
47
+
48
+ ## Consequences
49
+
50
+ - A product mark is the one place a hue appears as a wash: the stage behind
51
+ the hero proof, at 8%. That is a scoped exception to "identity is not a
52
+ fill" (§3). It is safe because the product hues mean nothing else in the
53
+ system, and the stage never sits behind a control or a state.
54
+ - Actions stay cobalt on every product, so "you can click this" still means
55
+ one thing everywhere.
56
+ - §13 is shorter: the rules that drive clarity stay, and the ones that only
57
+ added words are gone.
58
+ - Driftwood, Guidebook and Sites each add a `BRIEF.md`, pick their identity
59
+ and cut to the budgets in their own repos.