@brignano/design 0.8.0 → 0.10.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 (61) hide show
  1. package/DECISIONS.md +175 -0
  2. package/DESIGN.md +345 -29
  3. package/README.md +15 -10
  4. package/components.css +175 -61
  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 +3 -1
  53. package/product-page.css +119 -55
  54. package/tailwind.css +26 -0
  55. package/templates/app-shell.css +346 -0
  56. package/templates/article.css +7 -7
  57. package/templates/changelog.css +2 -2
  58. package/templates/error.css +81 -0
  59. package/templates/legal.css +3 -3
  60. package/templates/settings.css +95 -0
  61. package/tokens.css +180 -16
package/DECISIONS.md CHANGED
@@ -458,6 +458,7 @@ checks the first phone screen and the page length in CI.
458
458
  ## ADR-0011 — Product pages start from a brief, and each looks like itself
459
459
 
460
460
  **Status:** accepted · 2026-11-02
461
+ **Superseded in part by:** ADR-0017 (the three identity choices, and cobalt actions on a product page)
461
462
 
462
463
  ### Context
463
464
 
@@ -586,3 +587,177 @@ and closes, in both tiers, when:
586
587
  adopt it in a later change.
587
588
  - Anything else that wants to move still has to meet ADR-0009 or it is
588
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
+
package/DESIGN.md CHANGED
@@ -18,6 +18,11 @@ colour used so sparingly that when it appears you look at it.
18
18
  Nothing here should read as a developer-portfolio template, and nothing should
19
19
  read as a toy.
20
20
 
21
+ What makes a screen recognisably one of these (ADR-0014): a **mono voice** (a
22
+ small uppercase mono label opens every screen, and every number, date and code
23
+ is set in mono), the product's own mark on its glyph, and one heavy, tight
24
+ Geist moment where a screen has something big to say. §5 has the classes.
25
+
21
26
  ## 2. Two tiers, one foundation
22
27
 
23
28
  The professional site should be more polished than a private trip planner. That
@@ -31,7 +36,7 @@ family, motion and shape are identical; what changes is how much room things get
31
36
  | Section rhythm | `--s9` (96px) | `--s6` (32px) |
32
37
  | Measure | 68ch | 780px |
33
38
  | Display face | Silkscreen — monogram, hero eyebrows | none (aliases to `--sans`) |
34
- | Motion | the trail, scroll reveal, overlays opening and closing (ADR-0013) | none, except overlays opening and closing (ADR-0013) |
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) |
35
40
  | Density | whitespace carries the layout | scanning beats reading |
36
41
 
37
42
  ## 3. Colour — one hue, one meaning
@@ -63,17 +68,57 @@ system coherent across a marketing site and an operational tool.
63
68
 
64
69
  ### Identity is not a fill
65
70
 
66
- `--mark` inks a **graphic**: the trail line, the `A|B` monogram, a hero rule.
71
+ `--mark` inks a **graphic**: a product's glyph, the `A|B` monogram, a hero rule.
67
72
  That is its entire permitted use. It is never a button, chip, badge, wash, border,
68
73
  or link.
69
74
 
70
75
  This is the resolution of a real problem. Amber used to be both the brand colour
71
76
  and the warning colour, kept apart by a rule about scale — and rules enforced by
72
77
  remembering get forgotten. Identity moved to the things that were always carrying
73
- it (the trail, the monogram, the type, restraint), so amber in UI chrome now only
78
+ it (the monogram, the type, restraint; ADR-0014), so amber in UI chrome now only
74
79
  ever means *attention*. If you're reaching for `--mark` to tint an interface
75
80
  element, the answer is a neutral or a state colour.
76
81
 
82
+ ### A product's mark follows it
83
+
84
+ Each product has one mark colour (`--mark-teal`, `--mark-violet`,
85
+ `--mark-magenta`; §13), and it is the same on its marketing page, inside its
86
+ app and on its error pages (ADR-0014). Set it once:
87
+
88
+ ```html
89
+ <html data-mark="teal">
90
+ ```
91
+
92
+ `data-mark` sets `--mark-current` for everything inside the element. The brand
93
+ glyph in `.site-brand` and `.error-page-mark` (an inline SVG in `currentColor`)
94
+ and `.rule` draw in it; the name beside the glyph stays `--ink`. With no
95
+ attribute the mark is the family amber, so personal tools share it. A product
96
+ gets its own hue when it gets a product page, not before.
97
+
98
+ The contract is `--mark`'s: a graphic only. Buttons and links stay cobalt in
99
+ every app, so "you can act on this" looks the same everywhere a person works.
100
+
101
+ ### On a product page, the mark may fill and wash
102
+
103
+ A product's marketing page (§13) is the one place a mark is more than a
104
+ graphic (ADR-0017). There, and only there, it may do two more things:
105
+
106
+ - **Fill the one primary button**: `--mark-fill` under a white `--on-mark`
107
+ label, stepping darker to `--mark-fill-hover` and `--mark-fill-pressed`.
108
+ - **Wash the page ground**: `--mark-surface`, a faint opaque tint that
109
+ `--ink`, `--ink-soft` and links in `--i-ink` all read on.
110
+
111
+ `data-mark` points all four at the product's, as it does `--mark-current`;
112
+ with no attribute they are the family amber. The fill is its own step, the
113
+ way `--i` sits beside `--i-ink`: in light it is the mark (amber is deepened
114
+ to carry the label), in dark it is the mark's hue as light as a white label
115
+ allows. Never fill or wash with
116
+ `--mark-teal` and its siblings directly: in dark they are pale, for drawing.
117
+
118
+ This is a scoped exception to "identity is not a fill", as the stage behind a
119
+ hero proof was (ADR-0011). It never reaches an app, a link, text or a state,
120
+ and the focus ring stays `--i-ink`.
121
+
77
122
  ### Colour is a surface, not text
78
123
 
79
124
  A wash (12% light / 20% dark via `color-mix`) behind an element with the text kept
@@ -109,7 +154,13 @@ type is already carried by a text label. Nor `idea`, `planning`, `someday`, or
109
154
 
110
155
  The part that makes an interface feel built rather than styled.
111
156
 
112
- - `--i` fill, `--i-hover`, `--i-pressed`, `--i-ink` for links/icons/focus.
157
+ - `--i` fill, `--i-hover`, `--i-pressed`, `--i-ink` for links/icons/focus. The
158
+ fill is a saturated cobalt with a white label (`--on-i`) in both themes, and
159
+ hover and pressed step darker in both. In dark the fill and the ink are
160
+ different steps: fill a surface with `--i`, write or draw on a surface with
161
+ `--i-ink`, and a hovered link takes `--i-ink-hover`, never the fill's hover. A destructive button fills with `--danger-fill` (and its
162
+ `-hover` and `-pressed` steps) under a white `--on-danger` label, not with
163
+ the state hue `--danger`, which in dark is a pale rust for reading.
113
164
  - **Disabled is neutral, never hued** (`--i-disabled-bg` / `--i-disabled-ink`). A
114
165
  greyed-out control must stop signalling "click me". Its low contrast is allowed
115
166
  only because WCAG 1.4.3 exempts *inactive* controls, so the state must be real:
@@ -142,15 +193,72 @@ Three roles, no more:
142
193
 
143
194
  No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
144
195
 
196
+ **The voice** (ADR-0014) is these three roles used the same way everywhere:
197
+
198
+ - **One eyebrow per screen.** `.eyebrow` is a small uppercase mono label above
199
+ the screen's heading that says where you are ("Production" above
200
+ "Services"). One, not one per card. Written in sentence case; the CSS
201
+ uppercases it (§15).
202
+ - **Numbers in mono.** A number, date, time or code a person might compare or
203
+ copy takes `.num` (mono, tabular figures). A table's numeric column and a
204
+ stat's value already do.
205
+ - **One heavy moment.** `.display` sets an error code or a single headline
206
+ figure in Geist at `--weight-heavy` (800), tight and large; `.stamp` sets the
207
+ `A|B` monogram at the same weight, spaced open (`--tracking-caps`) so the bar
208
+ doesn't read as an I, for a footer or an about page. This is the
209
+ display treatment, in both tiers. It is the one use of a weight above 600,
210
+ and at most once a screen. `.rule` is the short bar in the mark in force (`--mark-current`, §3)
211
+ above a hero heading. (`--display` still names Silkscreen on the marketing tier until
212
+ #142 removes it.)
213
+
214
+ Sizes change with the tier (`--text-xs` … `--text-4xl`); weight, leading and
215
+ tracking don't:
216
+
217
+ | Token | Value | For |
218
+ |---|---|---|
219
+ | `--weight-regular` / `-medium` / `-semibold` | 400 / 500 / 600 | text / controls and labels / headings. Nothing lighter or bolder. |
220
+ | `--weight-heavy` | 800 | `.display` and `.stamp` only |
221
+ | `--leading-display` | 1.15 | display headings |
222
+ | `--leading-title` | 1.3 | titles |
223
+ | `--leading-ui` | 1.4 | interface text |
224
+ | `--leading-body` | 1.6 | paragraphs |
225
+ | `--tracking-title` / `--tracking-display` | -0.01em / -0.025em | headings / large display headings |
226
+ | `--tracking-caps` | 0.08em | uppercase mono eyebrows; the `.stamp` monogram |
227
+
228
+ They are named by role because Tailwind already owns `--leading-tight`,
229
+ `--tracking-tight` and the rest; the bridge adds `leading-display`,
230
+ `tracking-title` and so on and leaves Tailwind's own utilities alone.
231
+
232
+ A heading or title balances its lines (`text-wrap: balance`) and running text
233
+ avoids a one-word last line (`pretty`). On a touch screen the tool tier's
234
+ `--text-xs` rises from 11px to 12px.
235
+
145
236
  ## 6. Space, shape, elevation
146
237
 
147
- 4px base (`--s1` … `--s9`). Radius: `--radius-sm` for chips and pills, `--radius`
148
- for cards, `--radius-lg` for hero surfaces.
238
+ 4px base (`--s1` … `--s9`). Radius steps by what the thing is, so a control
239
+ inside a card reads as nested rather than as a smaller card: `--radius-sm`
240
+ (6px) for chips and pills, `--radius-control` (8px) for buttons, inputs,
241
+ selects, the segmented control and menu items, `--radius` (12px) for cards,
242
+ messages, popovers and code blocks, `--radius-lg` (18px) for dialogs and
243
+ hero surfaces.
149
244
 
150
245
  **Elevation differs by theme.** Light mode separates surfaces with a hairline plus
151
246
  a shadow (`--shadow-1/2/3`). Dark mode does not use borders — surfaces get
152
247
  *lighter* with elevation. This is why `--line` can stay nearly invisible in dark.
153
248
 
249
+ **Stacking** is named, not numbered: `--z-raised` (a control above its card's
250
+ stretched link), `--z-sticky` (a header), `--z-float` (a floating label),
251
+ `--z-skip` (the skip link), `--z-toast`. Dialogs, popovers and sheets sit in the
252
+ browser's top layer and need none.
253
+
254
+ **Breakpoints are a short list, not tokens**, because a CSS variable can't be
255
+ used in a media query. Components and templates size to their own container
256
+ (`@container`) wherever they can, so the same markup works in a narrow column
257
+ and a wide page. The steps in use: 30rem (480px) and 35rem (560px) for a
258
+ phone, 48rem (768px) where a second column appears, 60rem (960px) for a
259
+ desktop layout, 75rem (1200px) where a third column appears. Reach for one of
260
+ these before adding another.
261
+
154
262
  **Sticky chrome** — a header or toolbar that content scrolls under — is
155
263
  `--surface-sticky` with `backdrop-filter: blur(8px)`: 92% of the card in light,
156
264
  of the page ground in dark, so it reads as the surface it sits on, not a new layer.
@@ -188,6 +296,27 @@ shown, so a browser without `@starting-style` shows it at once; and under
188
296
  already open when the page loads doesn't animate. That is the whole
189
297
  exception: content on the page itself still never animates in.
190
298
 
299
+ **The third: a control may answer the person who used it** (ADR-0015). Two
300
+ cases, both only ever started by the person:
301
+
302
+ - **A press.** A `.btn` settles by 2% over `--dur-fast` while it is held down. Not when it is
303
+ disabled or busy.
304
+ - **A switch of view.** When someone picks a tab or a segment, the script that
305
+ swaps the content may wrap the swap in `document.startViewTransition()`, and
306
+ the old view cross-fades to the new one at the browser's default, 250ms
307
+ (the same as `--dur`). The package sets nothing on the transition, so a
308
+ site that already uses view transitions is not affected. Opt in per switch;
309
+ a browser without the API swaps at once.
310
+
311
+ Under `prefers-reduced-motion` neither happens. Nothing here runs on load, on
312
+ hover or on scroll.
313
+
314
+ **Print is the light theme.** `tokens.css` forces `color-scheme: light` on
315
+ paper whatever the screen was showing, and `components.css` drops sticky
316
+ chrome, shadows, popovers, sheets and controls that do nothing on paper, keeps cards and table
317
+ rows whole across a page break, and writes an outside link's address after it
318
+ in `.prose`.
319
+
191
320
  ## 8. Charts
192
321
 
193
322
  The one place the restraint rule does **not** apply: a categorical chart needs
@@ -278,10 +407,14 @@ not just `<html>`.** A dark hero band on a light marketing page is
278
407
  `<section data-theme="dark">`. Give that element its own
279
408
  `background: var(--bg); color: var(--ink)` — backgrounds don't inherit.
280
409
 
410
+ A page may **pin** a theme only when the look is the theme: a product page
411
+ whose identity is an always-dark console sets `data-theme="dark"` on `.pp`
412
+ (§13, ADR-0017). An app never pins; it follows the OS or the person's toggle.
413
+
281
414
  Two consequences for code that touches tokens directly:
282
415
 
283
416
  - **Don't read a token's value with `getPropertyValue`.** It returns the
284
- declaration text, `light-dark(#076bd3, #6ba5f3)`, not a colour. To get the
417
+ declaration text, `light-dark(#076bd3, #0371e0)`, not a colour. To get the
285
418
  colour a chart library needs, resolve it on an element in the right subtree:
286
419
  set `el.style.color = 'var(--chart-1)'` and read `getComputedStyle(el).color`.
287
420
  Re-read it when the theme changes.
@@ -309,7 +442,7 @@ alone. In the consumer's `package.json`:
309
442
  ```
310
443
 
311
444
  Verified with Lightning CSS: older targets lower the tokens; these targets
312
- pass `light-dark(#076bd3, #6ba5f3)` through untouched.
445
+ pass `light-dark(#076bd3, #0371e0)` through untouched.
313
446
 
314
447
  ### Tailwind
315
448
 
@@ -383,8 +516,10 @@ back, rewrite the brief, not the page.
383
516
  ### 2. Build the page from it
384
517
 
385
518
  `product-page.css` is the structure; `previews/product-page.html` is the
386
- skeleton (the brief template is at its top) and
387
- `previews/product-page-example.html` is a worked example. Import it after the
519
+ skeleton (the brief template is at its top). Three worked examples, one per
520
+ product, show a look written over it (§3 below): `product-page-example.html`
521
+ (Driftwood), `product-page-guidebook.html` and `product-page-sites.html`, all
522
+ in `previews/`. Import it after the
388
523
  tokens, put `tier-marketing` on `<html>` and `pp` on `<body>`.
389
524
 
390
525
  ```css
@@ -436,27 +571,57 @@ When a page is over, cut sentences, don't shrink type.
436
571
  ### 3. Make it look like this product
437
572
 
438
573
  Shared structure is what makes a page fast to build; shared looks is what made
439
- Driftwood, Guidebook and Sites read as one page with the words swapped. Each
440
- product makes three choices, and **no two products make all three the same**:
441
-
442
- - **A mark** (`data-mark` on `.pp`: `teal`, `violet` or `magenta`; tokens
443
- `--mark-teal` and so on). It inks the product's glyph (an inline SVG in
444
- `currentColor`), the hero rule above the thesis, the **stage** (a faint field
445
- behind the hero proof), the clip's current step and the how-it-works
446
- numerals. Like `--mark` (§3), it is never a button, link, text or state: the
447
- actions stay cobalt on every product, so "you can click this" means the same
448
- thing everywhere.
574
+ Driftwood, Guidebook and Sites read as one page with the words swapped
575
+ (ADR-0017). `product-page.css` is the structure and a **starting point** for
576
+ the look: the parts every page needs are marked *shared*, and the header,
577
+ hero, stage, bands and footer are a layout a product overrides in its own
578
+ stylesheet.
579
+
580
+ Each product makes **five choices**, writes them under **Look** in its
581
+ `BRIEF.md`, and **no two products pick the same value for any of them**:
582
+
583
+ | Choice | What it is |
584
+ |---|---|
585
+ | **Ground** | the page's own surface: `--bg`, `--card`, the mark's wash (`data-ground="mark"`), or a pinned dark theme |
586
+ | **Voice** | how the thesis is set: weight, size and face (Geist or Plex Mono; no third typeface) |
587
+ | **Shape** | the corners on the button and every surface: square, the system radii, or pills |
588
+ | **Composition** | where the product sits on the first screen: beside the words, behind them, over them, leaning in from the edge |
589
+ | **The page does the thing** | one piece of the product's own interface used on the page itself, not only pictured |
590
+
591
+ The register, so the next product can see what is taken:
592
+
593
+ | | Ground | Voice | Shape | Composition | The page does the thing |
594
+ |---|---|---|---|---|---|
595
+ | **Driftwood** (teal) | always dark | Plex Mono 600 | square | the system map is the background | a diff and a status line |
596
+ | **Guidebook** (violet) | bright, `--card` | Geist 800, as large as the screen allows | pill | the product annotates the page | a coach mark and a step counter |
597
+ | **Sites** (magenta) | the mark's wash | Geist 500 | soft and round | the phone leans in from the edge | a message and its reply |
598
+
599
+ The attributes `product-page.css` gives every page:
600
+
601
+ - **A mark** (`data-mark` on `.pp` or on `<html>`, the same attribute its app
602
+ uses, §3: `teal`, `violet` or `magenta`). It inks the product's glyph (an
603
+ inline SVG in `currentColor`), the hero rule above the thesis, the
604
+ **stage** (a faint field behind the hero proof), the clip's current step and
605
+ the how-it-works numerals, and it **fills the one primary button**
606
+ (`--mark-fill` under `--on-mark`, §3). It is never a link, text or state,
607
+ and the focus ring stays `--i-ink`.
608
+ - **An ink button** (`data-button="ink"` on `.pp`) when the mark is better
609
+ kept for the picture. A page with no `data-mark` is ink too.
610
+ - **A mark ground** (`data-ground="mark"` on `.pp`): the page washes in
611
+ `--mark-surface`.
612
+ - **A pinned theme** (`data-theme` on `.pp`, §11), only when the look *is* a
613
+ theme. Otherwise the page follows the visitor, and the product's own
614
+ stylesheet defines its ground for both.
449
615
  - **A hero layout** (`data-layout` on `.pp-hero`): `split` (the default, proof
450
- on the right), `mirror` (proof on the left, for a picture that should be
451
- read first) or `stage` (centred words and actions, the proof full width
452
- under them, for a wide picture such as a map). Phones stack all three the same.
453
- - **A frame for the proof** that matches where the product lives: bare, a
454
- phone (`.pp-device`) for something used on a phone, or a browser window
455
- (`.pp-browser`, with `.pp-browser-bar` and `.pp-browser-url`) for an
456
- extension or web app.
616
+ on the right), `mirror` (proof on the left) or `stage` (centred words and
617
+ actions, the proof full width under them). Phones stack all three the same.
618
+ - **A frame for the proof**: bare, a phone (`.pp-device`) or a browser window
619
+ (`.pp-browser`, with `.pp-browser-bar` and `.pp-browser-url`).
457
620
 
458
- Then the voice: the thesis, the signature band and the close are written for
459
- this product's reader, not copied from the last page.
621
+ A product's look lives in its own repo, in tokens, over this file: no hex, no
622
+ preset in this package. Inside the product's app nothing changes: actions stay
623
+ cobalt (ADR-0014). Then the words: the thesis, the signature band and the
624
+ close are written for this product's reader, not copied from the last page.
460
625
 
461
626
  ### Compare
462
627
 
@@ -630,8 +795,159 @@ and in what order: [`proposals/component-layer.md`](./proposals/component-layer.
630
795
  edge check because they are never a control's edge.
631
796
  - **Every class is shown.** A class in `components.css` or a template that no
632
797
  preview page uses fails the check: if it isn't shown, it isn't reviewed.
798
+ - **Every preview is its docs page.** A component or template page carries
799
+ `data-status` on `<html>` (`stable`, `beta` or `planned`; the header shows it
800
+ and the index card repeats it) and, under its live examples, a `.docs` block
801
+ with four sections tagged `data-doc`: **Use it** (`usage`, a copy-paste
802
+ snippet), **Use when** (`use-when`), **Don't use when** (`dont-use`, naming
803
+ the better choice) and **Accessibility** (`a11y`: keyboard, screen reader,
804
+ required attributes). Other sections (variants, states, behaviour your script
805
+ owns) sit between them. `npm run check` fails on a missing section or a status
806
+ the index disagrees with. Planned components are listed on the index with a
807
+ link to their issue.
808
+ - **One icon set.** `icons/` holds the only icons a surface uses: outline
809
+ icons from Lucide (ISC, `icons/LICENSE`) on a 24px grid at a 2px stroke, in
810
+ `currentColor`, so pasted inline they take their text's colour (through
811
+ `<img>` they draw black). Size them with `.icon-sm`,
812
+ `.icon` or `.icon-lg` (1.25× the text beside them). Decorative icons are
813
+ `aria-hidden`; an icon-only button carries an `aria-label`. Need one that
814
+ isn't there? Add it from Lucide in a PR; don't draw one or pull in another
815
+ set. Brand logos are the exception and stay with their brands.
633
816
  - **Switch or checkbox.** A switch (`.switch`, `role="switch"`) is only for a
634
817
  setting that takes effect the moment it flips. Anything sent with a form's
635
818
  submit button is a checkbox, because a switch promises an effect the form
636
819
  hasn't made yet.
637
820
 
821
+
822
+ ## 15. Content
823
+
824
+ Words are part of the interface. A product that labels one button "Save" and
825
+ the next "Submit changes" reads as inconsistent as one with two greys. These
826
+ rules cover the words inside a product: controls, messages, data. Marketing copy
827
+ follows the brief in §13. English only for now.
828
+
829
+ Each rule has one do and one don't. The live page is
830
+ [`previews/writing.html`](./previews/writing.html); `npm run check` fails when
831
+ a rule here has no section there.
832
+
833
+ ### Voice
834
+
835
+ Competent, calm, plain words. Say what happened and what to do next, the way a
836
+ colleague who knows the system would. No hype, no jokes, no apology theatre.
837
+
838
+ - Do: "Changes saved."
839
+ - Don't: "Awesome! Your changes have been successfully saved!"
840
+
841
+ ### Sentence case
842
+
843
+ Everything is in sentence case: buttons, headings, labels, menu items, tabs,
844
+ page titles. Capitalise only the first word and proper nouns. An eyebrow can be
845
+ uppercase through CSS, but it is written in sentence case.
846
+
847
+ - Do: "Account settings", "Sign in with GitHub"
848
+ - Don't: "Account Settings", "SIGN IN"
849
+
850
+ ### Buttons and links
851
+
852
+ A button is a verb and its object, so it still makes sense read on its own. A
853
+ link names where it goes. The button that confirms an action repeats that
854
+ action's verb.
855
+
856
+ - Do: "Delete trip", "Read the release notes"
857
+ - Don't: "OK", "Click here"
858
+
859
+ ### Form labels
860
+
861
+ A label is a short noun phrase above its field, never a placeholder. Mark the
862
+ optional fields with "(optional)", not the required ones, and put formats in
863
+ the hint below.
864
+
865
+ - Do: "Phone (optional)", with the hint "We only call about bookings."
866
+ - Don't: "Phone*", or "Please enter your phone number" as the placeholder
867
+
868
+ ### Errors
869
+
870
+ Say what happened and how to fix it, in that order, next to the thing that
871
+ went wrong. Name the field or the action, never the person. No codes unless
872
+ someone will search for them, and then in mono after the words.
873
+
874
+ - Do: "That date has passed. Pick today or later."
875
+ - Don't: "Invalid input.", "You entered a wrong date."
876
+
877
+ ### Empty states
878
+
879
+ Say what will be here and give the one action that fills it. If the person
880
+ can't fill it (no results, nothing assigned yet), say why it's empty and what
881
+ would change that.
882
+
883
+ - Do: "No trips yet", then "Plan one and it shows up here." and a "Plan a trip" button
884
+ - Don't: "Nothing to see here!"
885
+
886
+ ### Confirmations
887
+
888
+ Ask only before something that can't be undone. The title names the action and
889
+ the object, the body says what goes with it, and the buttons are the verb and
890
+ a way out ("Cancel", or "Keep trip" when that reads better). Where an action
891
+ can be undone, do it and offer Undo instead of asking.
892
+
893
+ - Do: "Delete Lisbon 2027?" / "Its 12 photos go with it. This can't be undone." / "Delete trip", "Keep trip"
894
+ - Don't: "Are you sure?" / "Yes", "No"
895
+
896
+ ### Success messages
897
+
898
+ Past tense, the object first, and Undo when there is one. A success message
899
+ is quiet: a toast or an inline line, never a dialog.
900
+
901
+ - Do: "Trip deleted", with Undo
902
+ - Don't: "Success!"
903
+
904
+ ### Dates
905
+
906
+ In the interface a date is day, short month, year: "7 Nov 2026", with the
907
+ weekday first when it helps planning ("Sat 7 Nov 2026"). Drop the year inside
908
+ the current year when nothing is ambiguous. Data a person might copy, sort or
909
+ search (logs, IDs, exports, timestamps in a table) uses ISO 8601 in `--mono`.
910
+
911
+ - Do: "7 Nov 2026" in a sentence, `2026-11-07` in a log row
912
+ - Don't: "11/07/2026", "November 7th, 2026"
913
+
914
+ ### Times
915
+
916
+ Twelve-hour, with a space and capital AM or PM; drop ":00" on the hour in prose.
917
+ Add the zone when the reader might be elsewhere. 24-hour time is not used,
918
+ except inside ISO 8601 data in mono (`2026-11-07T21:30Z` in a log). For
919
+ something in the last day, a relative time ("5 min ago") is fine, with the full
920
+ date and time in a tooltip or `title`.
921
+
922
+ - Do: "9:30 AM", "3 PM ET", "2–3 AM UTC"
923
+ - Don't: "21:30", "9:30am"
924
+
925
+ ### Numbers
926
+
927
+ Numerals for every number, a comma every three digits, and a space before a
928
+ unit except %. Compact durations in tables and mono data ("2h 11m", "150ms")
929
+ can drop the space. Words a person typed, like a quoted message, stay as
930
+ written. Figures that line up in a column use tabular figures, which the
931
+ type tokens already set.
932
+
933
+ - Do: "3 trips · 10,482 photos · 64 GB · 64%"
934
+ - Don't: "three trips · 10482 photos · 64GB · 64 %"
935
+
936
+ ### Currency
937
+
938
+ The symbol before the number with no space. Whole amounts drop ".00" in prose;
939
+ a table of prices shows two decimals on every row so they line up. Name the
940
+ currency ("US$", "€") only when the reader could mistake it.
941
+
942
+ - Do: "$1,240", "$12.50"
943
+ - Don't: "$1240.00", "12.5 USD"
944
+
945
+ ### What never appears
946
+
947
+ These don't appear in a product's interface: exclamation marks; "simply",
948
+ "just" or "easy" when they play a task down (they blame the person when it
949
+ isn't); "Oops" or "Uh-oh"; emoji as words; ALL CAPS typed into the text; and,
950
+ on marketing pages, jargon the reader has to look up.
951
+
952
+ - Do: "Couldn't load your trips. Try again."
953
+ - Don't: "Oops! Something went wrong!! Simply refresh."