@brignano/design 0.12.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/DESIGN.md +179 -23
  2. package/README.md +51 -3
  3. package/components.css +249 -249
  4. package/controls.css +2251 -0
  5. package/decisions/0001-cobalt.md +1 -1
  6. package/decisions/0008-cobalt-hue-256.md +1 -1
  7. package/decisions/0014-identity.md +1 -1
  8. package/decisions/0015-white-label-on-cobalt.md +1 -1
  9. package/decisions/0017-product-identity.md +1 -1
  10. package/decisions/0019-house-theme-shell.md +51 -0
  11. package/decisions/0020-kits-opt-in.md +56 -0
  12. package/decisions/README.md +2 -0
  13. package/kits/larch.css +125 -0
  14. package/kits/ledger.css +121 -0
  15. package/kits/split.css +123 -0
  16. package/package.json +13 -2
  17. package/product-page.css +82 -82
  18. package/scripts/colour.mjs +42 -0
  19. package/scripts/theme.mjs +190 -0
  20. package/tailwind.css +13 -20
  21. package/templates/app-shell.css +15 -15
  22. package/templates/article.css +26 -26
  23. package/templates/changelog.css +9 -9
  24. package/templates/email.html +3 -3
  25. package/templates/error.css +7 -7
  26. package/templates/legal.css +11 -11
  27. package/templates/settings.css +9 -9
  28. package/themes/driftwood.css +109 -0
  29. package/themes/driftwood.theme +5 -0
  30. package/themes/guidebook.css +104 -0
  31. package/themes/guidebook.theme +5 -0
  32. package/themes/homelab.css +101 -0
  33. package/themes/homelab.theme +2 -0
  34. package/themes/receipts.css +101 -0
  35. package/themes/receipts.theme +2 -0
  36. package/themes/sites.css +106 -0
  37. package/themes/sites.theme +7 -0
  38. package/tokens/base.css +37 -0
  39. package/tokens/chart.json +145 -0
  40. package/tokens/color.json +840 -0
  41. package/tokens/component.json +75 -0
  42. package/tokens/head.css +84 -0
  43. package/tokens/kits/larch.json +255 -0
  44. package/tokens/kits/ledger.json +247 -0
  45. package/tokens/kits/split.json +247 -0
  46. package/tokens/motion.json +38 -0
  47. package/tokens/names.d.ts +246 -0
  48. package/tokens/shape.json +56 -0
  49. package/tokens/space.json +99 -0
  50. package/tokens/tailwind.json +343 -0
  51. package/tokens/type.json +206 -0
  52. package/tokens.chart.css +23 -23
  53. package/tokens.css +278 -136
package/controls.css ADDED
@@ -0,0 +1,2251 @@
1
+ /* controls.css — GENERATED from components.css by scripts/controls.mjs.
2
+ Do not edit: change components.css and run `npm run controls`.
3
+ The same components without the layout primitives (.container, .stack,
4
+ .cluster, .grid, .section, .divider, .gap-2 … .gap-6), for a site whose
5
+ utility framework already owns those names. DESIGN.md §14. */
6
+
7
+ /* components.css — the shared controls and patterns every brignano surface
8
+ uses: buttons, fields, messages, pills, cards, dialogs and the rest.
9
+ DESIGN.md §14; the catalog and its order are in proposals/component-layer.md.
10
+
11
+ @import '@brignano/design/tokens.css';
12
+ @import '@brignano/design/components.css';
13
+
14
+ Rules for anything added here (ADR-0012):
15
+ - Everything sits in the `brignano.components` cascade layer, so a
16
+ consumer's own CSS and utilities win without !important.
17
+ - Short names: `.name`, `.name-variant`. State comes from real attributes
18
+ (disabled, aria-invalid, aria-current, aria-expanded, [open]), never from
19
+ a state class.
20
+ - Native first: <dialog>, popover, <details>. Where behaviour needs JS, the
21
+ component's preview page documents the ARIA contract; the consumer owns
22
+ the script.
23
+ - Tokens only. No hex, no colour that isn't a var() (npm run check).
24
+ - Every class here appears on a preview page, and every rule that sets both
25
+ a text colour and a background is contrast-checked in both themes. */
26
+
27
+ @layer brignano.components;
28
+
29
+ /* ── Button and link (#47) ────────────────────────────────────────────────
30
+ <button class="btn btn-primary">Save</button>
31
+ <a class="btn btn-secondary" href="…">Cancel</a>
32
+ Variants: .btn-primary (one per view), .btn-secondary (the default look of
33
+ a bare .btn), .btn-ghost, .btn-danger (the only non-cobalt fill). Sizes:
34
+ .btn-sm, default, .btn-lg. .btn-icon is square and needs aria-label;
35
+ .btn-block fills its row. Works the same on <button> and <a>.
36
+ State comes from attributes:
37
+ - disabled, or aria-disabled="true" on a link or a button that must stay
38
+ focusable: neutral --disabled and --disabled-ink, never opacity, no hover;
39
+ - aria-busy="true": the label hides behind a spinner and the button keeps
40
+ its width. Your script sets it and ignores clicks while it is set.
41
+ .link is the inline link for running text. */
42
+ @layer brignano.components {
43
+ .btn {
44
+ position: relative;
45
+ display: inline-flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ gap: var(--space-2);
49
+ min-height: 40px;
50
+ padding: 0 var(--space-4);
51
+ font: inherit;
52
+ font-size: var(--text-sm);
53
+ font-weight: var(--weight-medium);
54
+ line-height: 20px;
55
+ white-space: nowrap;
56
+ text-decoration: none;
57
+ vertical-align: middle;
58
+ cursor: pointer;
59
+ user-select: none;
60
+ border: 1px solid var(--line-control);
61
+ border-radius: var(--radius-control);
62
+ background: transparent;
63
+ color: var(--ink);
64
+ transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), scale var(--duration-fast) var(--ease);
65
+ }
66
+ /* Pressing a button answers the press (ADR-0015): it settles by 2%. Not on a
67
+ disabled or busy one, and tokens.css makes it instant under reduced motion. */
68
+ .btn:active:not(:disabled, [aria-disabled='true'], [aria-busy='true']) { scale: 0.98; }
69
+ @media (prefers-reduced-motion: reduce) {
70
+ .btn:active:not(:disabled, [aria-disabled='true'], [aria-busy='true']) { scale: none; }
71
+ }
72
+ .btn > svg { flex: none; width: 1.25em; height: 1.25em; }
73
+ .btn:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
74
+
75
+ .btn:hover, .btn-secondary:hover { background: var(--surface-hover); }
76
+ .btn:active, .btn-secondary:active { background: var(--surface-active); }
77
+ .btn-secondary { border-color: var(--line-control); background: transparent; color: var(--ink); }
78
+
79
+ .btn-primary { border-color: transparent; background: var(--action); color: var(--on-action); }
80
+ .btn-primary:hover { background: var(--action-hover); }
81
+ .btn-primary:active { background: var(--action-pressed); }
82
+
83
+ .btn-ghost { border-color: transparent; background: transparent; color: var(--action-ink); }
84
+ .btn-ghost:is(:hover, :active) { background: var(--action-surface); }
85
+
86
+ /* Danger has its own fills (--danger-fill…), not the state hue: in dark
87
+ --danger is a pale rust meant to be read, the button a deep one meant
88
+ to be pressed. Hover and press step darker, like the primary. */
89
+ .btn-danger { border-color: transparent; background: var(--danger-fill); color: var(--on-danger); }
90
+ .btn-danger:hover { background: var(--danger-fill-hover); }
91
+ .btn-danger:active { background: var(--danger-fill-pressed); }
92
+
93
+ .btn-sm { min-height: 32px; padding: 0 var(--space-3); font-size: var(--text-xs); line-height: 16px; }
94
+ .btn-lg { min-height: 48px; padding: 0 var(--space-5); font-size: var(--text-base); line-height: 24px; }
95
+ .btn-icon { aspect-ratio: 1; padding: 0; }
96
+ .btn-block { display: flex; width: 100%; }
97
+
98
+ /* Disabled: neutral, never opacity. Its low contrast is allowed only
99
+ because the control is really inactive (WCAG 1.4.3, DESIGN.md §4);
100
+ check.mjs exempts exactly this pair on :disabled / aria-disabled rules. */
101
+ .btn:is(:disabled, [aria-disabled='true']) {
102
+ border-color: transparent;
103
+ background: var(--disabled);
104
+ color: var(--disabled-ink);
105
+ cursor: not-allowed;
106
+ }
107
+
108
+ /* Busy: the text goes transparent but keeps its box, so the width holds;
109
+ the spinner draws in the text colour. */
110
+ .btn[aria-busy='true'] { -webkit-text-fill-color: transparent; cursor: progress; pointer-events: none; }
111
+ .btn[aria-busy='true'] > * { visibility: hidden; }
112
+ .btn[aria-busy='true']::after {
113
+ content: '';
114
+ position: absolute;
115
+ inset: 0;
116
+ width: 1em;
117
+ height: 1em;
118
+ margin: auto;
119
+ border: 2px solid currentColor;
120
+ border-right-color: transparent;
121
+ border-radius: 50%;
122
+ animation: spinner-spin 0.7s linear infinite;
123
+ }
124
+ /* Shared with .spinner (#59). */
125
+ @keyframes spinner-spin { to { transform: rotate(1turn); } }
126
+
127
+ .link { color: var(--action-ink); text-decoration: underline; text-underline-offset: 3px; border-radius: 2px; }
128
+ .link:hover { color: var(--action-ink-hover); }
129
+ .link:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
130
+
131
+ @media (pointer: coarse) {
132
+ .btn:not(.btn-lg) { min-height: 44px; }
133
+ .btn-icon { min-width: 44px; }
134
+ }
135
+ /* Forced colours repaint the hidden label, so the busy button takes
136
+ system colours itself and the spinner draws on a clean face. */
137
+ @media (forced-colors: active) {
138
+ .btn[aria-busy='true'] { forced-color-adjust: none; background: ButtonFace; color: ButtonText; border-color: ButtonText; }
139
+ }
140
+ /* Under reduced motion tokens.css stops the spin: a still arc, and
141
+ aria-busy still says the button is working. */
142
+ @media (prefers-reduced-motion: reduce) {
143
+ .btn { transition: none; }
144
+ }
145
+ }
146
+
147
+ /* ── Text field (#48) ─────────────────────────────────────────────────────
148
+ <div class="field">
149
+ <label for="email">Email <span class="field-optional">(optional)</span></label>
150
+ <input id="email" type="email" aria-describedby="email-hint email-error">
151
+ <p class="field-hint" id="email-hint">We only use it to reply.</p>
152
+ <p class="field-error" id="email-error"><svg …></svg>Enter an email like name@example.com</p>
153
+ </div>
154
+ The label sits above, never a placeholder in its place. Required fields
155
+ carry no star; mark the optional ones. Text-like <input>, <textarea> and a
156
+ native <select> are styled inside .field. State comes from attributes:
157
+ aria-invalid="true" turns the edge to --danger, disabled goes neutral.
158
+ .field-affix wraps a control with a prefix or suffix (a unit or an icon);
159
+ name the unit in the label too. When to validate is your script's call. */
160
+ @layer brignano.components {
161
+ .field { display: grid; align-content: start; gap: 6px; min-width: 0; }
162
+ .field > label { font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: var(--leading-ui); color: var(--ink); }
163
+ .field-optional { font-weight: var(--weight-regular); color: var(--ink-soft); }
164
+ .field-hint { margin: 0; font-size: var(--text-sm); line-height: var(--leading-ui); color: var(--ink-soft); }
165
+ .field-error { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: var(--text-sm); line-height: var(--leading-ui); color: var(--danger-ink); }
166
+ .field-error > svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--danger); }
167
+ .field-error[hidden] { display: none; }
168
+
169
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), textarea, select),
170
+ .field-affix {
171
+ box-sizing: border-box;
172
+ width: 100%;
173
+ min-width: 0;
174
+ min-height: 40px;
175
+ margin: 0;
176
+ border: 1px solid var(--line-control);
177
+ border-radius: var(--radius-control);
178
+ background-color: var(--card);
179
+ color: var(--ink);
180
+ transition: border-color var(--duration-fast) var(--ease);
181
+ }
182
+ /* At least 16px, so phones don't zoom in on focus (the tool tier's base is 15px). */
183
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), textarea, select) { padding: 7px 12px; font: max(1rem, var(--text-base)) / 24px var(--sans); }
184
+ .field textarea { min-height: 7em; resize: vertical; }
185
+ .field :is(input, textarea)::placeholder { color: var(--slate); opacity: 1; }
186
+
187
+ /* Native select, no custom dropdown: the chevron is two gradients in the
188
+ text colour, so it follows the theme and needs no image. */
189
+ .field select {
190
+ appearance: none;
191
+ padding-right: 36px;
192
+ background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
193
+ background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
194
+ background-size: 5px 5px;
195
+ background-repeat: no-repeat;
196
+ cursor: pointer;
197
+ }
198
+
199
+ /* Hover darkens the edge: --line-strong would drop it under 3:1 (DESIGN.md §4). */
200
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), textarea, select):hover, .field-affix:hover { border-color: var(--ink-soft); }
201
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), textarea, select):focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
202
+
203
+ .field [aria-invalid='true'], .field [aria-invalid='true']:hover,
204
+ .field-affix:has([aria-invalid='true']) { border-color: var(--danger); background-color: var(--card); }
205
+
206
+ /* Disabled stays readable: a disabled field can still hold a value the
207
+ reader needs, so its text keeps the 4.5:1 floor. The edge goes, so it
208
+ no longer reads as something to type in. */
209
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), textarea, select):disabled,
210
+ .field-affix:has(:disabled) { border-color: transparent; background-color: var(--surface-hover); color: var(--ink-soft); cursor: not-allowed; }
211
+
212
+ /* Affix: the wrapper draws the edge and the focus ring; the control inside
213
+ goes bare. */
214
+ .field-affix { display: flex; align-items: center; gap: var(--space-2); padding: 0 12px; font-size: max(1rem, var(--text-base)); color: var(--ink-soft); }
215
+ .field-affix > svg { flex: none; width: 18px; height: 18px; }
216
+ .field .field-affix > :is(input, select) {
217
+ flex: 1;
218
+ width: auto;
219
+ min-height: 38px;
220
+ padding: 7px 0;
221
+ border: 0;
222
+ border-radius: 0;
223
+ background-color: transparent;
224
+ color: var(--ink);
225
+ outline: 0;
226
+ }
227
+ .field .field-affix > :disabled { color: var(--ink-soft); }
228
+ .field .field-affix > select { padding-right: 24px; background-position: calc(100% - 7px) 50%, calc(100% - 2px) 50%; }
229
+ .field-affix:has(:focus-visible) { outline: 2px solid var(--action-ink); outline-offset: 2px; }
230
+
231
+ @media (pointer: coarse) {
232
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), select), .field-affix { min-height: 44px; }
233
+ .field .field-affix > :is(input, select) { min-height: 42px; }
234
+ }
235
+ /* Forced colours drop the gradient chevron: give the select its native arrow back. */
236
+ @media (forced-colors: active) {
237
+ .field select { appearance: auto; background-image: none; }
238
+ }
239
+ @media (prefers-reduced-motion: reduce) {
240
+ .field :is(input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='hidden'], [type='submit'], [type='button'], [type='reset'], [type='image'])), textarea, select), .field-affix { transition: none; }
241
+ }
242
+ }
243
+
244
+ /* ── Checkbox, radio, switch, segmented control (#49) ─────────────────────
245
+ <fieldset class="choice-group">
246
+ <legend>Notify me</legend>
247
+ <label class="choice"><input type="checkbox" name="n" value="email"><span>By email</span></label>
248
+ <div class="choice">
249
+ <input type="radio" id="ship-fast" name="ship" aria-describedby="ship-fast-hint">
250
+ <label for="ship-fast">Express</label>
251
+ <p class="choice-hint" id="ship-fast-hint">Two working days.</p>
252
+ </div>
253
+ </fieldset>
254
+ Inside .choice, checkboxes and radios are drawn from tokens (issue 118): an
255
+ --line-control box on --card, filled --action with an --on-action mark when
256
+ checked, a dash when indeterminate. The tick is the row's ::before laid
257
+ over the box, because an <input> can't reliably hold a pseudo-element.
258
+ Outside .choice they stay native and take accent-color (DESIGN.md §4). .switch goes on <input type="checkbox" role="switch">,
259
+ only for a setting that applies at once; a form you submit uses a
260
+ checkbox. .segmented is a row of radios drawn as one control: keep the
261
+ real radios inside it, so arrow keys and the group name come for free. */
262
+ @layer brignano.components {
263
+ .choice-group { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
264
+ .choice-group > legend { margin: 0 0 6px; padding: 0; font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: var(--leading-ui); color: var(--ink); }
265
+
266
+ .choice { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-2); align-items: start; line-height: 1.5; color: var(--ink); cursor: pointer; }
267
+ .choice > input { grid-column: 1; font: inherit; cursor: inherit; }
268
+ .choice > input:not(.switch) { width: 18px; height: 18px; margin: calc((1.5em - 18px) / 2) 0 0; }
269
+ .choice > input:is([type='checkbox'], [type='radio']):not(.switch) {
270
+ appearance: none;
271
+ box-sizing: border-box;
272
+ grid-area: 1 / 1;
273
+ flex: none;
274
+ border: 1px solid var(--line-control);
275
+ border-radius: var(--radius-sm);
276
+ background-color: var(--card);
277
+ background-repeat: no-repeat;
278
+ background-position: center;
279
+ }
280
+ .choice > input[type='radio']:not(.switch) { border-radius: 50%; } /* (0,3,1), after the base rule */
281
+ .choice > input:is([type='checkbox'], [type='radio']):not(.switch):not(:disabled):hover { border-color: var(--ink-soft); }
282
+ .choice > input:is([type='checkbox']:is(:checked, :indeterminate), [type='radio']:checked):not(.switch) {
283
+ border-color: transparent;
284
+ background-color: var(--action);
285
+ color: var(--on-action);
286
+ }
287
+ .choice > input:is([type='checkbox']:is(:checked, :indeterminate), [type='radio']:checked):not(.switch):not(:disabled):hover { background-color: var(--action-hover); }
288
+ .choice > input[type='radio']:checked { background-image: radial-gradient(circle, currentColor 0 3.5px, transparent 4px); }
289
+ .choice > input[type='checkbox']:indeterminate { background-image: linear-gradient(currentColor, currentColor); background-size: 10px 2px; }
290
+ .choice > input:is([type='checkbox'], [type='radio']):not(.switch):disabled { border-color: transparent; background-color: var(--disabled); color: var(--disabled-ink); cursor: not-allowed; }
291
+ /* The tick: the row's ::before sits in the box's grid cell, masked to a check. */
292
+ .choice:has(> input[type='checkbox']:checked:not(:indeterminate, .switch))::before {
293
+ content: '';
294
+ grid-area: 1 / 1;
295
+ width: 18px;
296
+ height: 18px;
297
+ margin: calc((1.5em - 18px) / 2) 0 0;
298
+ background-color: var(--on-action);
299
+ pointer-events: none;
300
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
301
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
302
+ }
303
+ .choice:has(> input[type='checkbox']:checked:disabled)::before { background-color: var(--disabled-ink); }
304
+ .choice > :not(input) { grid-column: 2; }
305
+ .choice > label { cursor: inherit; }
306
+ .choice-hint { margin: 0; font-size: var(--text-sm); line-height: var(--leading-ui); color: var(--ink-soft); }
307
+ .choice > input:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
308
+ .choice:has(> input:disabled) { color: var(--disabled-ink); cursor: not-allowed; }
309
+
310
+ /* Switch: track and knob drawn on the input itself. The knob is a radial
311
+ gradient in the text colour, so on and off read by its position, not
312
+ by colour alone. */
313
+ .switch {
314
+ appearance: none;
315
+ box-sizing: border-box;
316
+ flex: none;
317
+ width: 40px;
318
+ height: 24px;
319
+ margin: 0;
320
+ border: 1px solid var(--line-control);
321
+ border-radius: 999px;
322
+ background-color: var(--card);
323
+ background-image: radial-gradient(circle, currentColor 0 7px, transparent 7.5px);
324
+ background-size: 22px 22px;
325
+ background-position: 0 50%;
326
+ background-repeat: no-repeat;
327
+ color: var(--ink-soft);
328
+ cursor: pointer;
329
+ vertical-align: middle;
330
+ transition: background-position var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);
331
+ }
332
+ .switch:checked { border-color: transparent; background-color: var(--action); background-position: 100% 50%; color: var(--on-action); }
333
+ .switch:not(:disabled):hover { border-color: var(--ink-soft); }
334
+ .switch:checked:not(:disabled):hover { border-color: transparent; background-color: var(--action-hover); }
335
+ .switch:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
336
+ .switch:disabled { border-color: transparent; background-color: var(--disabled); color: var(--disabled-ink); cursor: not-allowed; }
337
+ /* In a .choice row the switch sits in the first column like a checkbox. */
338
+ .choice > .switch { margin: calc((1.5em - 24px) / 2) 0 0; }
339
+
340
+ /* Segmented: a track with the chosen option filled. The radio stays in
341
+ the tab order but out of sight; its label is the visible segment. */
342
+ .segmented {
343
+ display: inline-flex;
344
+ flex-wrap: wrap;
345
+ gap: 2px;
346
+ width: fit-content;
347
+ max-width: 100%;
348
+ padding: 2px;
349
+ border: 1px solid var(--line-control);
350
+ border-radius: var(--radius-control);
351
+ background-color: var(--card);
352
+ }
353
+ .segmented > label {
354
+ position: relative;
355
+ display: inline-flex;
356
+ align-items: center;
357
+ justify-content: center;
358
+ min-height: 34px;
359
+ padding: 0 var(--space-3);
360
+ border-radius: calc(var(--radius-control) - 3px);
361
+ font-size: var(--text-sm);
362
+ font-weight: var(--weight-medium);
363
+ line-height: 20px;
364
+ color: var(--ink);
365
+ cursor: pointer;
366
+ user-select: none;
367
+ transition: background-color var(--duration-fast) var(--ease);
368
+ }
369
+ .segmented > label > input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
370
+ .segmented > label:not(:has(:disabled)):hover { background-color: var(--surface-hover); }
371
+ .segmented > label:has(:checked), .segmented > label:has(:checked):hover { background-color: var(--action); color: var(--on-action); }
372
+ .segmented > label:has(:focus-visible) { outline: 2px solid var(--action-ink); outline-offset: 2px; }
373
+ .segmented > label:has(:disabled) { color: var(--disabled-ink); cursor: not-allowed; }
374
+ .segmented > label:has(:checked:disabled) { background-color: var(--disabled); color: var(--disabled-ink); }
375
+
376
+ @media (pointer: coarse) {
377
+ .choice { min-height: 44px; align-content: center; }
378
+ .segmented > label { min-height: 44px; }
379
+ }
380
+ @media (forced-colors: active) {
381
+ .switch { forced-color-adjust: none; border-color: CanvasText; background-color: Canvas; color: CanvasText; }
382
+ .switch:checked { border-color: Highlight; background-color: Highlight; color: HighlightText; }
383
+ .switch:disabled { border-color: GrayText; background-color: Canvas; color: GrayText; }
384
+ .choice > input:is([type='checkbox'], [type='radio']):not(.switch) { forced-color-adjust: none; border-color: CanvasText; background-color: Canvas; color: HighlightText; }
385
+ .choice > input:is([type='checkbox']:is(:checked, :indeterminate), [type='radio']:checked):not(.switch) { border-color: Highlight; background-color: Highlight; }
386
+ .choice > input:is([type='checkbox'], [type='radio']):not(.switch):disabled { border-color: GrayText; background-color: Canvas; color: GrayText; }
387
+ .choice:has(> input[type='checkbox']:checked:not(:indeterminate, .switch))::before { forced-color-adjust: none; background-color: HighlightText; }
388
+ .choice:has(> input[type='checkbox']:checked:disabled)::before { background-color: GrayText; }
389
+ /* Hover and focus keep system colours too (forced-color-adjust: none stops the browser doing it). */
390
+ .choice > input:is([type='checkbox'], [type='radio']):not(.switch):not(:disabled):hover { border-color: CanvasText; }
391
+ .choice > input:is([type='checkbox']:is(:checked, :indeterminate), [type='radio']:checked):not(.switch):not(:disabled):hover { border-color: Highlight; background-color: Highlight; }
392
+ .choice > input:focus-visible, .switch:focus-visible { outline-color: CanvasText; }
393
+ .switch:not(:disabled):hover { border-color: CanvasText; }
394
+ .switch:checked:not(:disabled):hover { border-color: Highlight; background-color: Highlight; }
395
+ .segmented > label { forced-color-adjust: none; color: CanvasText; }
396
+ .segmented > label:has(:checked) { background-color: Highlight; color: HighlightText; }
397
+ .segmented > label:has(:disabled) { color: GrayText; }
398
+ .segmented > label:has(:focus-visible) { outline-color: CanvasText; }
399
+ }
400
+ @media (prefers-reduced-motion: reduce) {
401
+ .switch, .segmented > label { transition: none; }
402
+ }
403
+ }
404
+
405
+ /* ── Filter chip (issue 167) ───────────────────────────────────────────────────
406
+ <div class="cluster gap-2" role="group" aria-label="Stage">
407
+ <button type="button" class="chip" aria-pressed="true">Lead</button>
408
+ <button type="button" class="chip" aria-pressed="false">Quoted</button>
409
+ </div>
410
+ A toggle for a filterable list: any number can be on at once. The state
411
+ is aria-pressed, never a class; your script flips it and filters the
412
+ list. Off is the card ground with a control edge; on is the --action fill, the
413
+ same as a chosen .segmented option. One of a few is .segmented; a filter
414
+ already applied, with a remove button, is .tag. */
415
+ @layer brignano.components {
416
+ .chip {
417
+ display: inline-flex;
418
+ align-items: center;
419
+ justify-content: center;
420
+ min-height: 32px;
421
+ margin: 0;
422
+ padding: 0 var(--space-3);
423
+ border: 1px solid var(--line-control);
424
+ border-radius: var(--radius-control);
425
+ background-color: var(--card);
426
+ color: var(--ink);
427
+ font: inherit;
428
+ font-size: var(--text-sm);
429
+ font-weight: var(--weight-medium);
430
+ line-height: 20px;
431
+ white-space: nowrap;
432
+ cursor: pointer;
433
+ user-select: none;
434
+ transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
435
+ }
436
+ .chip:hover:not(:disabled) { background-color: var(--surface-hover); }
437
+ .chip[aria-pressed='true'], .chip[aria-pressed='true']:hover:not(:disabled) { border-color: transparent; background-color: var(--action); color: var(--on-action); }
438
+ .chip:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
439
+ .chip:disabled { border-color: var(--line); color: var(--disabled-ink); cursor: not-allowed; }
440
+ .chip[aria-pressed='true']:disabled { border-color: transparent; background-color: var(--disabled); color: var(--disabled-ink); }
441
+
442
+ @media (pointer: coarse) {
443
+ .chip { min-height: 44px; }
444
+ }
445
+ @media (forced-colors: active) {
446
+ .chip { forced-color-adjust: none; border-color: CanvasText; background-color: Canvas; color: CanvasText; }
447
+ .chip[aria-pressed='true'] { border-color: Highlight; background-color: Highlight; color: HighlightText; }
448
+ .chip:disabled, .chip[aria-pressed='true']:disabled { border-color: GrayText; background-color: Canvas; color: GrayText; }
449
+ .chip:focus-visible { outline-color: CanvasText; }
450
+ }
451
+ @media (prefers-reduced-motion: reduce) {
452
+ .chip { transition: none; }
453
+ }
454
+ }
455
+
456
+ /* ── Message and banner (#50) ─────────────────────────────────────────────
457
+ <div class="msg msg-danger" role="alert">
458
+ <svg aria-hidden="true" …></svg>
459
+ <div class="msg-content">
460
+ <p class="msg-title">Couldn't reach WakaTime</p>
461
+ <p class="msg-body">Showing the last cached week.</p>
462
+ <div class="msg-actions"><button class="btn btn-sm">Try again</button></div>
463
+ </div>
464
+ <button class="btn btn-ghost btn-icon btn-sm msg-close" aria-label="Dismiss">…</button>
465
+ </div>
466
+ Kinds: .msg-info (neutral, cobalt icon: not a fourth hue; a bare .msg
467
+ looks the same), .msg-success,
468
+ .msg-attention, .msg-danger. Every kind carries an icon and words, never
469
+ colour alone. role="status" for info and success, role="alert" for
470
+ danger, and for attention when it needs action now. .banner is the same
471
+ message as a full-width strip above the site header, .banner-info and the
472
+ rest. The icon slot takes any inline SVG; dismissing is your script. */
473
+ @layer brignano.components {
474
+ .msg {
475
+ display: flex;
476
+ gap: 10px;
477
+ align-items: flex-start;
478
+ padding: 12px 14px;
479
+ border: 1px solid var(--line-strong);
480
+ border-radius: var(--radius-card);
481
+ background-color: var(--card);
482
+ color: var(--ink);
483
+ font-size: var(--text-sm);
484
+ line-height: 1.45;
485
+ }
486
+ .msg > svg, .banner > svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--action); }
487
+ .msg-content { display: grid; gap: 2px; flex: 1; min-width: 0; }
488
+ .msg-title { margin: 0; font-weight: var(--weight-semibold); }
489
+ .msg-body { margin: 0; color: var(--ink-soft); }
490
+ .msg-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
491
+ /* An outlined button's --line-control edge is under 3:1 on a status wash,
492
+ so in a message it sits on its own --card fill. Zero-specificity
493
+ :where() keeps hover, pressed and disabled winning. */
494
+ :where(.msg-actions) > .btn:where(:not(.btn-primary, .btn-danger, .btn-ghost)) { background-color: var(--card); }
495
+ .msg-close { flex: none; margin: -6px -8px -6px 0; color: var(--ink-soft); }
496
+
497
+ /* Banner: the same parts in a strip, edge to edge, above the header. */
498
+ .banner {
499
+ display: flex;
500
+ gap: 10px;
501
+ align-items: flex-start;
502
+ padding: 10px var(--space-4);
503
+ border: 0;
504
+ border-bottom: 1px solid var(--line-strong);
505
+ background-color: var(--surface-hover);
506
+ color: var(--ink);
507
+ font-size: var(--text-sm);
508
+ line-height: 1.45;
509
+ }
510
+ /* The wash alone marks the box. Its -line token is under 3:1 on the wash,
511
+ so it can't be the edge (DESIGN.md §4); the border stays, transparent,
512
+ so every kind is the same size. */
513
+ .msg-success, .banner-success { border-color: transparent; background-color: var(--success-surface); color: var(--ink); }
514
+ .msg-attention, .banner-attention { border-color: transparent; background-color: var(--attention-surface); color: var(--ink); }
515
+ .msg-danger, .banner-danger { border-color: transparent; background-color: var(--danger-surface); color: var(--ink); }
516
+ :is(.msg-info, .banner-info) > svg { color: var(--action); }
517
+ :is(.msg-success, .banner-success) > svg { color: var(--success); }
518
+ :is(.msg-attention, .banner-attention) > svg { color: var(--attention); }
519
+ :is(.msg-danger, .banner-danger) > svg { color: var(--danger); }
520
+
521
+ .banner .msg-content { display: flex; flex-wrap: wrap; column-gap: var(--space-2); align-items: baseline; }
522
+ .banner .msg-actions { margin: 0; }
523
+ }
524
+
525
+ /* ── Pill, badge and tag (#51) ────────────────────────────────────────────
526
+ <span class="pill pill-success">Booked</span>
527
+ <button class="btn btn-ghost btn-icon" aria-label="Notifications, 3 unread">
528
+ <svg …></svg><span class="badge" aria-hidden="true">3</span>
529
+ </button>
530
+ <span class="tag">Kayak<button type="button" class="tag-remove" aria-label="Remove Kayak"><svg …></svg></button></span>
531
+ .pill is a status label: neutral by default; .pill-success, -attention,
532
+ -danger and -info add a dot and their wash. Status always carries a word,
533
+ and categories stay neutral (no new hues). Domain names (booked, overdue)
534
+ belong to the consumer: map them onto these kinds. .badge is a count on
535
+ an icon button; put the count in the button's name too. .tag is a
536
+ removable filter chip; your script removes it. */
537
+ @layer brignano.components {
538
+ .pill {
539
+ display: inline-flex;
540
+ align-items: center;
541
+ gap: 6px;
542
+ padding: 2px 8px;
543
+ border: 1px solid transparent;
544
+ border-radius: var(--radius-sm);
545
+ background-color: var(--surface-hover);
546
+ color: var(--ink-soft);
547
+ font-family: var(--mono);
548
+ font-size: var(--text-xs);
549
+ font-weight: var(--weight-medium);
550
+ line-height: 16px;
551
+ letter-spacing: .04em;
552
+ text-transform: uppercase;
553
+ white-space: nowrap;
554
+ vertical-align: middle;
555
+ }
556
+ .pill-success { background-color: var(--success-surface); color: var(--success-ink); }
557
+ .pill-attention { background-color: var(--attention-surface); color: var(--attention-ink); }
558
+ .pill-danger { background-color: var(--danger-surface); color: var(--danger-ink); }
559
+ .pill-info { background-color: var(--info-surface); color: var(--info-ink); }
560
+ :is(.pill-success, .pill-attention, .pill-danger, .pill-info)::before {
561
+ content: '';
562
+ flex: none;
563
+ width: 6px;
564
+ height: 6px;
565
+ border-radius: 50%;
566
+ background-color: currentColor;
567
+ }
568
+ .pill-success::before { background-color: var(--success); }
569
+ .pill-attention::before { background-color: var(--attention); }
570
+ .pill-danger::before { background-color: var(--danger); }
571
+ .pill-info::before { background-color: var(--info); }
572
+
573
+ /* Badge: a count pinned to the corner of an icon button (.btn is
574
+ position: relative). The ring in the card colour lifts it off the icon. */
575
+ .badge {
576
+ display: inline-flex;
577
+ align-items: center;
578
+ justify-content: center;
579
+ box-sizing: border-box;
580
+ min-width: 18px;
581
+ height: 18px;
582
+ padding: 0 4px;
583
+ border: 1px solid transparent;
584
+ border-radius: 999px;
585
+ background-color: var(--action);
586
+ color: var(--on-action);
587
+ font-size: 11px;
588
+ font-weight: var(--weight-semibold);
589
+ line-height: 1;
590
+ font-variant-numeric: tabular-nums;
591
+ }
592
+ .btn > .badge { position: absolute; top: -6px; right: -6px; box-shadow: 0 0 0 2px var(--card); }
593
+
594
+ /* Tag: a filter chip with a remove button. The button is 24px, and 44px
595
+ of hit area on touch through an invisible ::before. */
596
+ .tag {
597
+ display: inline-flex;
598
+ align-items: center;
599
+ gap: 4px;
600
+ min-height: 28px;
601
+ padding: 0 2px 0 10px;
602
+ border: 1px solid var(--line-control);
603
+ border-radius: var(--radius-sm);
604
+ background-color: var(--card);
605
+ color: var(--ink);
606
+ font-size: var(--text-sm);
607
+ line-height: 20px;
608
+ white-space: nowrap;
609
+ vertical-align: middle;
610
+ }
611
+ .tag-remove {
612
+ position: relative;
613
+ display: inline-flex;
614
+ align-items: center;
615
+ justify-content: center;
616
+ width: 24px;
617
+ height: 24px;
618
+ margin: 0;
619
+ padding: 0;
620
+ border: 0;
621
+ border-radius: calc(var(--radius-sm) - 2px);
622
+ background: transparent;
623
+ color: var(--ink-soft);
624
+ cursor: pointer;
625
+ }
626
+ .tag-remove > svg { width: 14px; height: 14px; }
627
+ .tag-remove:hover { background-color: var(--surface-hover); color: var(--ink); }
628
+ .tag-remove:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
629
+
630
+ @media (pointer: coarse) {
631
+ .tag-remove::before { content: ''; position: absolute; inset: -10px; }
632
+ }
633
+ @media (forced-colors: active) {
634
+ :is(.pill-success, .pill-attention, .pill-danger, .pill-info)::before { background-color: CanvasText; }
635
+ .pill, .badge { border-color: CanvasText; }
636
+ }
637
+ }
638
+
639
+ /* ── Card (#52) ───────────────────────────────────────────────────────────
640
+ <article class="card card-link">
641
+ <div class="card-media"><img src="…" alt=""></div>
642
+ <header class="card-header">
643
+ <h3 class="card-title"><a href="/trips/lisbon">Lisbon, 4 days</a></h3>
644
+ <p class="card-meta">12–15 Mar · 2 people</p>
645
+ </header>
646
+ <div class="card-body"><p>…</p></div>
647
+ <footer class="card-footer"><span class="pill pill-success">Booked</span></footer>
648
+ </article>
649
+ .card is a static surface; every part is optional. .card-link makes the
650
+ whole card one target through the title link's ::after (a stretched
651
+ link), so the markup stays a heading and a link, not a link wrapped
652
+ round blocks. One focus ring goes round the card. Other buttons and
653
+ links inside a .card-link still work: they sit above the stretched area.
654
+ .card-media goes first and runs edge to edge. No cards inside cards.
655
+ .card-media.card-stage is for a drawing of a product (data-mark on the
656
+ card picks its hue): <div class="card-media card-stage"><svg …></div>. */
657
+ @layer brignano.components {
658
+ .card {
659
+ position: relative;
660
+ display: flex;
661
+ flex-direction: column;
662
+ gap: var(--space-3);
663
+ min-width: 0;
664
+ padding: var(--space-5);
665
+ border: 1px solid var(--card-line);
666
+ border-radius: var(--card-radius);
667
+ background-color: var(--card);
668
+ color: var(--ink);
669
+ box-shadow: var(--card-shadow);
670
+ overflow: hidden;
671
+ }
672
+ .card-media { margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) 0; }
673
+ .card-media > :is(img, video, picture, svg) { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
674
+ /* Stage (ADR-0018): a product's drawing on a faint field of its mark, the
675
+ same 8% mix as --pp-stage on its product page, so the card and the page
676
+ match. data-mark on the card or an ancestor picks the hue; with none it
677
+ is the family amber. The drawing is padded and contained, never cropped,
678
+ and the box stays 16:9. Only on a card that stands for a product. */
679
+ .card-stage { background-color: color-mix(in srgb, var(--mark-current) 8%, transparent); }
680
+ .card-stage > :is(img, video, picture, svg) { box-sizing: border-box; padding: var(--space-5); object-fit: contain; }
681
+ .card-header { display: grid; gap: var(--space-1); }
682
+ .card-title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); }
683
+ .card-title a { color: inherit; text-decoration: none; }
684
+ .card-meta { margin: 0; font-size: var(--text-sm); color: var(--ink-soft); }
685
+ .card-body { color: var(--ink-soft); }
686
+ .card-body > :first-child { margin-top: 0; }
687
+ .card-body > :last-child { margin-bottom: 0; }
688
+ .card-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: auto; }
689
+
690
+ /* Link card: the title link stretches over the card. */
691
+ .card-link { transition: background-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease); }
692
+ .card-link .card-title a::after { content: ''; position: absolute; inset: 0; z-index: 0; }
693
+ /* Zero-specificity so components that position their own parts (for example .segmented) still win. */
694
+ :where(.card-link :is(a, button, input, select, textarea, label):not(.card-title a)) { position: relative; z-index: var(--z-raised); }
695
+ .card-link:hover { background-color: var(--surface-hover); box-shadow: var(--shadow-3); }
696
+ .card-link:hover .card-title a { text-decoration: underline; text-underline-offset: 3px; }
697
+ /* The ring moves to the card only where :has() works; elsewhere the link keeps its own ring. */
698
+ .card-link:has(.card-title a:focus-visible) { outline: 2px solid var(--action-ink); outline-offset: 2px; }
699
+ .card-link:has(.card-title a:focus-visible) .card-title a { outline: none; }
700
+
701
+ @media (forced-colors: active) {
702
+ .card { border-color: CanvasText; }
703
+ }
704
+ @media (prefers-reduced-motion: reduce) {
705
+ .card-link { transition: none; }
706
+ }
707
+ }
708
+
709
+ /* ── Icon (#87) ────────────────────────────────────────────────────────────
710
+ <svg class="icon" aria-hidden="true">…</svg> paste from icons/<name>.svg
711
+ One curated set (Lucide, ISC: icons/LICENSE), drawn on a 24px grid at a
712
+ 2px stroke in currentColor, so an icon takes its text's colour. Sizes
713
+ follow the type scale at 1.25× the text they sit beside, the same ratio
714
+ .btn gives an svg: .icon-sm beside --text-sm, .icon beside body text,
715
+ .icon-lg beside --text-lg. Decorative icons take aria-hidden="true"; an
716
+ icon alone in a button needs the button's aria-label. A state icon never
717
+ stands in for its word (DESIGN.md §3). */
718
+ @layer brignano.components {
719
+ .icon {
720
+ flex: none;
721
+ display: inline-block;
722
+ width: calc(var(--text-base) * 1.25);
723
+ height: calc(var(--text-base) * 1.25);
724
+ vertical-align: -0.25em;
725
+ }
726
+ .icon-sm { width: calc(var(--text-sm) * 1.25); height: calc(var(--text-sm) * 1.25); }
727
+ .icon-lg { width: calc(var(--text-lg) * 1.25); height: calc(var(--text-lg) * 1.25); }
728
+ }
729
+
730
+ /* ── Site header, nav and footer (#54) ────────────────────────────────────
731
+ <a class="skip-link" href="#main">Skip to content</a>
732
+ <header class="site-header">
733
+ <div class="site-header-inner container container-wide">
734
+ <a class="site-brand" href="/">…</a>
735
+ <nav class="site-nav" id="site-menu" popover aria-label="Main">
736
+ <button type="button" class="btn btn-ghost btn-icon site-menu-close"
737
+ popovertarget="site-menu" popovertargetaction="hide"
738
+ aria-label="Close menu" autofocus>…</button>
739
+ <ul><li><a href="/" aria-current="page">Home</a></li>…</ul>
740
+ </nav>
741
+ <div class="site-actions">…</div>
742
+ <button type="button" class="btn btn-ghost btn-icon site-menu-button"
743
+ popovertarget="site-menu" aria-label="Menu">…</button>
744
+ </div>
745
+ </header>
746
+ - The header is sticky on --surface-sticky with an 8px blur (DESIGN.md §6).
747
+ One header for both tiers; the marketing tier only makes it taller.
748
+ - The nav is a popover. Wide, it is shown inline and the popover is never
749
+ opened. When the header is narrower than 45rem the links hide behind the
750
+ menu button, which opens the nav as a sheet from the top, with no script:
751
+ Esc or a click outside closes it, the autofocus close button takes focus
752
+ when it opens, and focus goes back to the menu button when it closes.
753
+ - aria-current="page" marks the current link: ink text, a cobalt underline.
754
+ - .site-footer: .site-footer-columns of link lists, each under a
755
+ .site-footer-heading, then .site-footer-legal and .site-footer-small. */
756
+ @layer brignano.components {
757
+ .skip-link {
758
+ position: absolute;
759
+ top: var(--space-3);
760
+ left: var(--space-4);
761
+ z-index: var(--z-skip);
762
+ padding: var(--space-2) var(--space-3);
763
+ border-radius: var(--radius-sm);
764
+ background-color: var(--card);
765
+ color: var(--ink);
766
+ font-weight: var(--weight-medium);
767
+ box-shadow: var(--shadow-2);
768
+ transform: translateY(calc(-100% - var(--space-5)));
769
+ }
770
+ .skip-link:focus { transform: none; outline: 2px solid var(--action-ink); outline-offset: 2px; }
771
+
772
+ .site-header {
773
+ container: site-header / inline-size;
774
+ position: sticky;
775
+ top: 0;
776
+ z-index: var(--z-sticky);
777
+ border-bottom: 1px solid var(--line);
778
+ background-color: var(--surface-sticky);
779
+ color: var(--ink);
780
+ -webkit-backdrop-filter: blur(8px);
781
+ backdrop-filter: blur(8px);
782
+ }
783
+ .site-header-inner {
784
+ display: flex;
785
+ align-items: center;
786
+ gap: var(--space-4);
787
+ min-height: 56px;
788
+ }
789
+ .tier-marketing .site-header-inner { min-height: 72px; gap: var(--space-5); }
790
+
791
+ .site-brand {
792
+ display: inline-flex;
793
+ align-items: center;
794
+ gap: var(--space-2);
795
+ min-height: 40px;
796
+ margin-inline-end: auto; /* pushes the nav and actions to the end */
797
+ color: var(--ink);
798
+ font-weight: var(--weight-semibold);
799
+ font-size: var(--text-lg);
800
+ letter-spacing: var(--tracking-title);
801
+ text-decoration: none;
802
+ }
803
+ .site-brand > :is(img, svg) { flex: none; width: 24px; height: 24px; }
804
+ /* The glyph takes the product's mark (ADR-0014); the name beside it stays ink. */
805
+ .site-brand > svg { color: var(--mark-current); }
806
+
807
+ /* Wide: the popover is shown in the flow, never opened. */
808
+ .site-nav[popover] {
809
+ display: block;
810
+ position: static;
811
+ inset: auto;
812
+ width: auto;
813
+ height: auto;
814
+ margin: 0;
815
+ padding: 0;
816
+ overflow: visible;
817
+ border: 0;
818
+ background: none;
819
+ color: inherit;
820
+ }
821
+ .site-nav ul { display: flex; align-items: center; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
822
+ .site-nav a {
823
+ display: inline-flex;
824
+ align-items: center;
825
+ min-height: 40px;
826
+ padding: 0 var(--space-3);
827
+ border-radius: var(--radius-sm);
828
+ color: var(--ink-soft);
829
+ font-size: var(--text-sm);
830
+ font-weight: var(--weight-medium);
831
+ text-decoration: none;
832
+ }
833
+ .site-nav a:hover { color: var(--ink); }
834
+ .site-nav a[aria-current='page'] {
835
+ color: var(--ink);
836
+ text-decoration: underline 2px var(--action);
837
+ text-underline-offset: 6px;
838
+ }
839
+ .site-nav a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
840
+
841
+ .site-actions { display: flex; align-items: center; gap: var(--space-2); }
842
+ .site-menu-button, .site-menu-close { display: none; }
843
+
844
+ /* Narrow: the links move into a sheet behind the menu button. */
845
+ @container site-header (max-width: 45rem) {
846
+ .site-header .site-header-inner { gap: var(--space-2); } /* beats the marketing gap */
847
+ .site-brand { min-width: 0; }
848
+ .site-menu-button { display: inline-flex; }
849
+ .site-nav[popover]:not(:popover-open) { display: none; }
850
+ }
851
+
852
+ /* The open sheet, at any width, so it stays usable if the header widens
853
+ while it is open (a rotated tablet, a resized window). */
854
+ .site-nav[popover]:popover-open {
855
+ position: fixed;
856
+ inset: 0 0 auto;
857
+ display: flex;
858
+ flex-direction: column;
859
+ gap: var(--space-2);
860
+ width: 100%;
861
+ max-height: 100dvh;
862
+ box-sizing: border-box;
863
+ padding: var(--space-3) var(--space-4) var(--space-5);
864
+ overflow-y: auto;
865
+ border-bottom: 1px solid var(--line);
866
+ background-color: var(--card);
867
+ color: var(--ink);
868
+ box-shadow: var(--shadow-3);
869
+ }
870
+ .site-nav[popover]::backdrop { background-color: var(--scrim); }
871
+ .site-nav:popover-open .site-menu-close { display: inline-flex; align-self: flex-end; }
872
+ .site-nav:popover-open ul { flex-direction: column; align-items: stretch; }
873
+ .site-nav:popover-open a { width: 100%; min-height: 44px; font-size: var(--text-base); }
874
+
875
+ @media (pointer: coarse) {
876
+ .site-nav a { min-height: 44px; }
877
+ }
878
+
879
+ .site-footer {
880
+ padding-block: var(--space-6) var(--space-7);
881
+ border-top: 1px solid var(--line);
882
+ color: var(--ink-soft);
883
+ font-size: var(--text-sm);
884
+ }
885
+ .site-footer-columns {
886
+ display: grid;
887
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
888
+ gap: var(--space-5);
889
+ }
890
+ .site-footer-heading { margin: 0 0 var(--space-2); color: var(--ink); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
891
+ .site-footer ul { display: grid; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
892
+ .site-footer a { color: var(--ink-soft); text-decoration: none; }
893
+ .site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
894
+ .site-footer ul a { display: inline-flex; align-items: center; min-height: 28px; }
895
+ .site-footer-legal {
896
+ display: flex;
897
+ flex-wrap: wrap;
898
+ align-items: center;
899
+ gap: var(--space-2) var(--space-4);
900
+ margin: var(--space-6) 0 0;
901
+ padding-top: var(--space-4);
902
+ border-top: 1px solid var(--line-soft);
903
+ }
904
+ .site-footer-small { margin: var(--space-2) 0 0; font-size: var(--text-xs); }
905
+
906
+ @media (pointer: coarse) {
907
+ .site-footer ul a { min-height: 44px; }
908
+ }
909
+ @media (forced-colors: active) {
910
+ .site-header { border-bottom-color: CanvasText; }
911
+ .site-nav a[aria-current='page'] { text-decoration-color: CanvasText; }
912
+ .site-nav[popover]:popover-open { border: 1px solid CanvasText; }
913
+ }
914
+ @media (prefers-reduced-transparency: reduce) {
915
+ .site-header { background-color: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
916
+ }
917
+ }
918
+
919
+ /* ── Dialog and sheet (#55) ───────────────────────────────────────────────
920
+ <dialog class="dialog" id="rename" aria-labelledby="rename-title">
921
+ <div class="dialog-header">
922
+ <h2 class="dialog-title" id="rename-title">Rename trip</h2>
923
+ <form method="dialog"><button class="btn btn-ghost btn-icon btn-sm dialog-close" aria-label="Close">…</button></form>
924
+ </div>
925
+ <div class="dialog-body">…</div>
926
+ <div class="dialog-footer">…actions, primary last…</div>
927
+ </dialog>
928
+ Open it with dialog.showModal(), or with no script at all where
929
+ <button commandfor="rename" command="show-modal"> is supported. Native
930
+ <dialog> only: the browser traps focus, Esc closes it, and focus goes back
931
+ to the opener. Never open a dialog on top of a dialog. Use <div>s for the
932
+ header and footer: a <header> or <footer> inside a dialog reads as the
933
+ page's banner or footer landmark.
934
+ - .dialog-confirm: a narrow confirm. The destructive button names the
935
+ action ("Delete trip"), never "OK".
936
+ - .sheet (with .dialog): slides in from the right on a wide screen and up
937
+ from the bottom on a phone.
938
+ - Open and close: a fade and a short slide over --duration-fast, from the
939
+ edge a sheet comes from (ADR-0013), for modal dialogs only: one that is
940
+ open in the markup renders still. Only opacity and transform move, and
941
+ the open state is always fully shown, so a browser without
942
+ @starting-style just shows it at once. Instant under
943
+ prefers-reduced-motion. */
944
+ @layer brignano.components {
945
+ .dialog {
946
+ box-sizing: border-box;
947
+ width: min(100% - 2 * var(--space-4), 32rem);
948
+ max-width: none;
949
+ max-height: min(100dvh - 2 * var(--space-4), 44rem);
950
+ padding: 0;
951
+ border: 1px solid var(--line);
952
+ border-radius: var(--radius-lg);
953
+ background-color: var(--card);
954
+ color: var(--ink);
955
+ box-shadow: var(--shadow-3);
956
+ flex-direction: column; /* here, not on [open], so it holds while closing */
957
+ opacity: 0;
958
+ transform: translateY(8px);
959
+ transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
960
+ }
961
+ /* display only while open, so the UA's display: none still hides it closed. */
962
+ .dialog[open] { display: flex; opacity: 1; transform: none; }
963
+ @starting-style {
964
+ .dialog:modal { opacity: 0; transform: translateY(8px); }
965
+ }
966
+ .dialog::backdrop {
967
+ background-color: var(--scrim);
968
+ opacity: 0;
969
+ transition: opacity var(--duration-fast) var(--ease);
970
+ }
971
+ .dialog[open]::backdrop { opacity: 1; }
972
+ @starting-style {
973
+ .dialog:modal::backdrop { opacity: 0; }
974
+ }
975
+ /* Closing animates only where the dialog can stay in the top layer while it
976
+ fades (overlay). Elsewhere it would drop into the page flow, so it closes
977
+ at once. */
978
+ @supports (overlay: auto) {
979
+ .dialog {
980
+ transition:
981
+ opacity var(--duration-fast) var(--ease),
982
+ transform var(--duration-fast) var(--ease),
983
+ overlay var(--duration-fast) allow-discrete,
984
+ display var(--duration-fast) allow-discrete;
985
+ }
986
+ .dialog::backdrop {
987
+ transition:
988
+ opacity var(--duration-fast) var(--ease),
989
+ overlay var(--duration-fast) allow-discrete,
990
+ display var(--duration-fast) allow-discrete;
991
+ }
992
+ }
993
+
994
+ .dialog-header {
995
+ display: flex;
996
+ align-items: flex-start;
997
+ gap: var(--space-3);
998
+ padding: var(--space-5) var(--space-5) 0;
999
+ }
1000
+ .dialog-title { margin: 0; padding-top: 2px; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-ui); }
1001
+ .dialog-header > form { display: contents; }
1002
+ .dialog-close { flex: none; margin: -6px -8px 0 auto; }
1003
+ .dialog-body {
1004
+ flex: 1 1 auto;
1005
+ min-height: 0;
1006
+ padding: var(--space-3) var(--space-5);
1007
+ overflow-y: auto;
1008
+ color: var(--ink-soft);
1009
+ }
1010
+ .dialog-body > :first-child { margin-top: 0; }
1011
+ .dialog-body > :last-child { margin-bottom: 0; }
1012
+ .dialog-footer {
1013
+ display: flex;
1014
+ flex-wrap: wrap;
1015
+ justify-content: flex-end;
1016
+ gap: var(--space-2);
1017
+ padding: var(--space-4) var(--space-5) var(--space-5);
1018
+ }
1019
+ .dialog-footer > form { display: contents; }
1020
+
1021
+ .dialog-confirm { width: min(100% - 2 * var(--space-4), 26rem); }
1022
+
1023
+ /* Sheet: from the right on a wide screen. */
1024
+ .sheet {
1025
+ width: min(100%, 28rem);
1026
+ height: 100dvh;
1027
+ max-height: 100dvh;
1028
+ margin: 0 0 0 auto;
1029
+ border-width: 0 0 0 1px;
1030
+ border-radius: 0;
1031
+ opacity: 1;
1032
+ transform: translateX(100%);
1033
+ }
1034
+ .sheet[open] { transform: none; }
1035
+ @starting-style {
1036
+ .sheet:modal { opacity: 1; transform: translateX(100%); }
1037
+ }
1038
+
1039
+ /* Phone: dialogs fill the width; a sheet comes up from the bottom. */
1040
+ @media (max-width: 40rem) {
1041
+ /* The forms are display: contents, so their buttons are flex items too. */
1042
+ .dialog-footer > .btn, .dialog-footer > form > .btn { flex: 1 1 auto; }
1043
+ .sheet {
1044
+ width: 100%;
1045
+ height: fit-content; /* auto would stretch between inset 0 and 0 */
1046
+ max-height: 85dvh;
1047
+ margin: auto 0 0;
1048
+ border-width: 1px 0 0;
1049
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
1050
+ transform: translateY(100%);
1051
+ }
1052
+ @starting-style {
1053
+ .sheet:modal { transform: translateY(100%); }
1054
+ }
1055
+ }
1056
+
1057
+ @media (forced-colors: active) {
1058
+ .dialog { border-color: CanvasText; }
1059
+ }
1060
+ /* tokens.css stops transitions for *, ::before and ::after, not ::backdrop. */
1061
+ @media (prefers-reduced-motion: reduce) {
1062
+ .dialog, .dialog::backdrop { transition: none; transform: none; }
1063
+ }
1064
+ }
1065
+
1066
+ /* ── Popover and menu (#56) ───────────────────────────────────────────────
1067
+ <button class="btn" popovertarget="trip-menu">Trip</button>
1068
+ <div class="popover" id="trip-menu" popover>
1069
+ <div class="menu">
1070
+ <button class="menu-item">Rename</button>
1071
+ <a class="menu-item" href="…">Open itinerary</a>
1072
+ <hr class="menu-separator">
1073
+ <button class="menu-item menu-item-danger">Delete trip</button>
1074
+ </div>
1075
+ </div>
1076
+ The popover attribute (popover="auto") gives light dismiss: Esc or a click
1077
+ outside closes it, and opening another one closes this one. Content of any
1078
+ kind can sit in a .popover; .menu is for a list of actions or links.
1079
+ - Position: below the button that opened it, lined up with its start edge,
1080
+ with CSS anchor positioning. The opener is the anchor when it opens the
1081
+ popover with popovertarget (or commandfor); otherwise set anchor-name on
1082
+ the opener and position-anchor on the popover. Flips above or to the other
1083
+ side when there's no room. Without anchor positioning, set --popover-top
1084
+ and --popover-left from the opener's box on the toggle event (the preview
1085
+ page has the four lines); with neither, the browser centres it.
1086
+ - Menu items are <button> or <a>, never a <div>. .menu-item-danger is for
1087
+ the destructive action, last and after a separator. .menu-item-hint
1088
+ holds a shortcut or count at the end of the row.
1089
+ - ARIA: without a script, leave roles off. The items are plain buttons and
1090
+ links that Tab moves through, which needs nothing more. role="menu" and
1091
+ role="menuitem" promise arrow keys, Home/End and focus moving into the
1092
+ menu on open, so add them only with a script that does all of that.
1093
+ - Open and close: a fade and a 4px slide over --duration-fast (ADR-0013).
1094
+ Instant under prefers-reduced-motion. */
1095
+ @layer brignano.components {
1096
+ .popover {
1097
+ box-sizing: border-box;
1098
+ min-width: 12rem;
1099
+ max-width: min(100vw - 2 * var(--space-4), 22rem);
1100
+ max-height: min(100dvh - 2 * var(--space-4), 28rem);
1101
+ padding: var(--space-3);
1102
+ overflow-y: auto;
1103
+ border: 1px solid var(--line);
1104
+ border-radius: var(--radius-card);
1105
+ background-color: var(--card);
1106
+ color: var(--ink);
1107
+ box-shadow: var(--shadow-2);
1108
+ transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
1109
+ }
1110
+ /* Hidden state on :not(:popover-open), so a browser without popover
1111
+ support shows the content rather than an invisible, focusable box. */
1112
+ .popover:not(:popover-open) { opacity: 0; transform: translateY(-4px); }
1113
+ @starting-style {
1114
+ .popover:popover-open { opacity: 0; transform: translateY(-4px); }
1115
+ }
1116
+ @supports (overlay: auto) {
1117
+ .popover {
1118
+ transition:
1119
+ opacity var(--duration-fast) var(--ease),
1120
+ transform var(--duration-fast) var(--ease),
1121
+ overlay var(--duration-fast) allow-discrete,
1122
+ display var(--duration-fast) allow-discrete;
1123
+ }
1124
+ }
1125
+ .popover:has(> .menu) { padding: var(--space-1); }
1126
+
1127
+ @supports (position-area: block-end) {
1128
+ .popover {
1129
+ inset: auto;
1130
+ margin: var(--space-1) 0;
1131
+ position-area: block-end span-inline-end;
1132
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
1133
+ }
1134
+ }
1135
+ @supports not (position-area: block-end) {
1136
+ .popover[style*='--popover-top'] {
1137
+ inset: var(--popover-top) auto auto var(--popover-left);
1138
+ margin: var(--space-1) 0 0;
1139
+ }
1140
+ }
1141
+
1142
+ .menu { display: flex; flex-direction: column; gap: 1px; }
1143
+ .menu-item {
1144
+ box-sizing: border-box;
1145
+ display: flex;
1146
+ align-items: center;
1147
+ gap: var(--space-2);
1148
+ width: 100%;
1149
+ min-height: 36px;
1150
+ padding: var(--space-2) var(--space-3);
1151
+ border: 0;
1152
+ border-radius: var(--radius-control);
1153
+ background-color: transparent;
1154
+ color: var(--ink);
1155
+ font: inherit;
1156
+ font-size: var(--text-sm);
1157
+ line-height: var(--leading-ui);
1158
+ text-align: start;
1159
+ text-decoration: none;
1160
+ cursor: pointer;
1161
+ }
1162
+ .menu-item > svg { flex: none; width: 16px; height: 16px; color: var(--ink-soft); }
1163
+ .menu-item:hover, .menu-item:focus-visible { background-color: var(--surface-hover); color: var(--ink); }
1164
+ .menu-item:active { background-color: var(--surface-active); color: var(--ink); }
1165
+ .menu-item:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
1166
+ .menu-item-hint { margin-inline-start: auto; padding-inline-start: var(--space-3); color: var(--ink-soft); font-size: var(--text-xs); }
1167
+ .menu-item-danger, .menu-item-danger > svg { color: var(--danger-ink); }
1168
+ .menu-item-danger:is(:hover, :focus-visible, :active) { background-color: var(--danger-surface); color: var(--danger-ink); }
1169
+ .menu-item:is(:disabled, [aria-disabled='true']) { background-color: transparent; color: var(--disabled-ink); cursor: not-allowed; }
1170
+ .menu-item:is(:disabled, [aria-disabled='true']) > svg { color: inherit; }
1171
+ .menu-separator {
1172
+ height: 0;
1173
+ margin: var(--space-1) calc(-1 * var(--space-1));
1174
+ border: 0;
1175
+ border-block-start: 1px solid var(--line);
1176
+ }
1177
+
1178
+ @media (pointer: coarse) {
1179
+ .menu-item { min-height: 44px; }
1180
+ }
1181
+ @media (forced-colors: active) {
1182
+ .popover { border-color: CanvasText; }
1183
+ /* forced-color-adjust: none, or the text backplate (Canvas) hides
1184
+ HighlightText on the Highlight row. */
1185
+ .menu-item:not(:disabled, [aria-disabled='true']):is(:hover, :focus-visible) {
1186
+ forced-color-adjust: none;
1187
+ background-color: Highlight;
1188
+ color: HighlightText;
1189
+ }
1190
+ .menu-item:not(:disabled, [aria-disabled='true']):is(:hover, :focus-visible) > * { color: inherit; }
1191
+ .menu-item:focus-visible { outline-color: CanvasText; }
1192
+ .menu-item:is(:disabled, [aria-disabled='true']) { background-color: Canvas; color: GrayText; }
1193
+ }
1194
+ @media (prefers-reduced-motion: reduce) {
1195
+ .popover { transition: none; transform: none; }
1196
+ }
1197
+ }
1198
+
1199
+ /* ── Tooltip (#57) ─────────────────────────────────────────────────────────
1200
+ <span class="tooltip-wrap">
1201
+ <button class="btn btn-icon" interestfor="tip-share" aria-labelledby="tip-share">…svg…</button>
1202
+ <span class="tooltip" id="tip-share" popover="hint" role="tooltip">Share trip</span>
1203
+ </span>
1204
+ A tooltip only names the thing it points at, in one short phrase. Anything
1205
+ longer, or anything a reader needs, is a popover or text on the page:
1206
+ touch users never hover, so a tooltip is never the only place something is
1207
+ said. The trigger takes its accessible name from the tooltip
1208
+ (aria-labelledby), so the two can't disagree. It stays open while the
1209
+ pointer is on it, so a magnifier user can move onto it to read it.
1210
+ - Where interestfor is supported, the browser opens it as a hint popover on
1211
+ hover or keyboard focus after 300ms and closes it at once when interest
1212
+ leaves; it sits above the trigger with anchor positioning and flips below
1213
+ when there's no room. Elsewhere, .tooltip-wrap shows it on :hover and
1214
+ :focus-visible with the same 300ms delay in and none out. That fallback
1215
+ can't close on Esc or flip at the top of the viewport, and an
1216
+ overflow: hidden ancestor clips it.
1217
+ - A 150ms fade in only. Under prefers-reduced-motion the fade goes and the
1218
+ delay stays: it's a wait, not motion. */
1219
+ @layer brignano.components {
1220
+ .tooltip-wrap { position: relative; display: inline-flex; vertical-align: middle; }
1221
+ .tooltip {
1222
+ box-sizing: border-box;
1223
+ width: max-content;
1224
+ max-width: 16rem;
1225
+ margin: 0;
1226
+ padding: 4px var(--space-2);
1227
+ overflow: visible;
1228
+ border: 1px solid transparent;
1229
+ border-radius: var(--radius-sm);
1230
+ background-color: var(--ink);
1231
+ color: var(--card);
1232
+ font-family: var(--sans);
1233
+ font-size: var(--text-xs);
1234
+ font-weight: var(--weight-medium);
1235
+ line-height: var(--leading-ui);
1236
+ text-align: center;
1237
+ }
1238
+ /* A transparent strip over the gap on both block sides, so the pointer can
1239
+ move from the trigger onto the tooltip without losing it (WCAG 1.4.13). */
1240
+ .tooltip::before {
1241
+ content: '';
1242
+ position: absolute;
1243
+ inset: calc(-1 * var(--space-1) - 1px) 0;
1244
+ z-index: -1;
1245
+ }
1246
+ .tooltip-wrap > [interestfor] { interest-delay: 300ms 0s; }
1247
+
1248
+ @supports selector(:interest-source) {
1249
+ .tooltip {
1250
+ inset: auto;
1251
+ margin: var(--space-1) 0;
1252
+ position-area: block-start;
1253
+ position-try-fallbacks: flip-block;
1254
+ opacity: 0;
1255
+ transition: opacity var(--duration-fast) var(--ease);
1256
+ }
1257
+ .tooltip:popover-open { opacity: 1; }
1258
+ @starting-style {
1259
+ .tooltip:popover-open { opacity: 0; }
1260
+ }
1261
+ }
1262
+ @supports not selector(:interest-source) {
1263
+ .tooltip {
1264
+ display: block;
1265
+ position: absolute;
1266
+ inset: auto auto 100% 50%;
1267
+ translate: -50% 0;
1268
+ margin: 0 0 var(--space-1);
1269
+ visibility: hidden;
1270
+ opacity: 0;
1271
+ }
1272
+ .tooltip-wrap:has(> :hover, > :focus-visible) > .tooltip {
1273
+ visibility: visible;
1274
+ opacity: 1;
1275
+ transition: opacity var(--duration-fast) var(--ease) 300ms, visibility 0s linear 300ms;
1276
+ }
1277
+ }
1278
+
1279
+ @media (forced-colors: active) {
1280
+ .tooltip { border-color: CanvasText; }
1281
+ }
1282
+ }
1283
+
1284
+ /* ── Toast (#58) ───────────────────────────────────────────────────────────
1285
+ <section class="toast-region" aria-label="Notifications">
1286
+ <div class="toast-list" role="status"></div> ← success and attention
1287
+ <div class="toast-list" role="alert"></div> ← danger
1288
+ </section>
1289
+ …and what your script adds to a list:
1290
+ <div class="toast toast-success">
1291
+ <svg aria-hidden="true" …></svg>
1292
+ <div class="toast-content">
1293
+ <p class="toast-title">Trip saved</p>
1294
+ <p class="toast-body">Lisbon, 4 days is in your list.</p>
1295
+ </div>
1296
+ <button class="btn btn-ghost btn-sm toast-action">Undo</button>
1297
+ <button class="btn btn-ghost btn-icon btn-sm toast-close" aria-label="Dismiss">…</button>
1298
+ </div>
1299
+ A short note that something happened. Kinds: .toast-success,
1300
+ .toast-attention, .toast-danger, each with its icon, an edge in its colour
1301
+ and a title that says in words what happened, never colour alone. There's
1302
+ no info toast: use a .msg on the page.
1303
+ - The region and both lists are in the page from the start, empty. Two
1304
+ live regions, never nested: role="status" (polite) for success and
1305
+ attention, role="alert" for danger, which sits below them. Newest at the
1306
+ bottom of each; bottom-centre on a phone, bottom-right from 40rem.
1307
+ - Script is yours (design ships none): add toasts to a list; remove a
1308
+ success toast after 5s, pausing while it's hovered or has focus; leave
1309
+ attention and danger until dismissed. To remove one, set data-leaving,
1310
+ then take it out on its own transitionend (or after 200ms, whichever is
1311
+ first). The transition still runs, in 0.01ms, under reduced motion, so
1312
+ transitionend always fires. If focus was inside it, move focus to the
1313
+ next toast, or back to where it was before.
1314
+ - While a modal dialog is open, everything outside it is inert, toasts
1315
+ included: report inside the dialog with a .msg instead.
1316
+ - Enter and leave: a fade and an 8px slide over --duration-fast (ADR-0013).
1317
+ Instant under prefers-reduced-motion. */
1318
+ @layer brignano.components {
1319
+ .toast-region {
1320
+ position: fixed;
1321
+ z-index: var(--z-toast);
1322
+ inset: auto var(--space-4) var(--space-4);
1323
+ display: flex;
1324
+ flex-direction: column;
1325
+ align-items: center;
1326
+ pointer-events: none;
1327
+ }
1328
+ /* A flex column, not display: contents, which some browsers still drop
1329
+ from the accessibility tree, live region and all. Never display: none
1330
+ either: a hidden live region misses what's added as it appears. */
1331
+ .toast-list {
1332
+ display: flex;
1333
+ flex-direction: column;
1334
+ align-items: inherit;
1335
+ align-self: stretch;
1336
+ gap: var(--space-2);
1337
+ }
1338
+ .toast-list:not(:empty) ~ .toast-list:not(:empty) { margin-top: var(--space-2); }
1339
+ .toast-region .toast { pointer-events: auto; }
1340
+ @media (min-width: 40rem) {
1341
+ .toast-region { inset: auto var(--space-5) var(--space-5) auto; align-items: flex-end; }
1342
+ }
1343
+
1344
+ .toast {
1345
+ box-sizing: border-box;
1346
+ display: flex;
1347
+ align-items: flex-start;
1348
+ gap: 10px;
1349
+ width: min(100%, 24rem);
1350
+ padding: 12px 10px 12px 14px;
1351
+ border: 1px solid var(--line);
1352
+ border-inline-start: 3px solid var(--line-control);
1353
+ border-radius: var(--radius-card);
1354
+ background-color: var(--card);
1355
+ color: var(--ink);
1356
+ box-shadow: var(--shadow-2);
1357
+ font-size: var(--text-sm);
1358
+ line-height: 1.45;
1359
+ transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
1360
+ }
1361
+ @starting-style {
1362
+ .toast { opacity: 0; transform: translateY(8px); }
1363
+ }
1364
+ .toast[data-leaving] { opacity: 0; transform: translateY(8px); }
1365
+ .toast > svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
1366
+ .toast-content { display: grid; gap: 2px; flex: 1; min-width: 0; }
1367
+ .toast-title { margin: 0; font-weight: var(--weight-semibold); }
1368
+ .toast-body { margin: 0; color: var(--ink-soft); }
1369
+ .toast-action { flex: none; margin: -4px 0; }
1370
+ .toast-close { flex: none; margin: -4px -2px -4px 0; color: var(--ink-soft); }
1371
+
1372
+ .toast-success { border-inline-start-color: var(--success); }
1373
+ .toast-attention { border-inline-start-color: var(--attention); }
1374
+ .toast-danger { border-inline-start-color: var(--danger); }
1375
+ .toast-success > svg { color: var(--success); }
1376
+ .toast-attention > svg { color: var(--attention); }
1377
+ .toast-danger > svg { color: var(--danger); }
1378
+
1379
+ @media (forced-colors: active) {
1380
+ .toast { border-color: CanvasText; }
1381
+ }
1382
+ /* tokens.css cuts the transition to 0.01ms, which keeps transitionend
1383
+ firing for the script that removes a leaving toast; no slide either. */
1384
+ @media (prefers-reduced-motion: reduce) {
1385
+ .toast, .toast[data-leaving] { transform: none; }
1386
+ }
1387
+ }
1388
+
1389
+ /* ── Loading and empty states (#59) ─────────────────────────────────────────
1390
+ Spinner, for a wait whose layout isn't known yet:
1391
+ <p class="cluster"><span class="spinner" aria-hidden="true"></span> Loading trips…</p>
1392
+ Sizes: .spinner-sm (16px), default (24px). Always with words beside it,
1393
+ or role="img" aria-label="Loading" when there's no room for any. Under
1394
+ reduced motion it holds still (tokens.css stops animations); the words
1395
+ carry the meaning. .btn[aria-busy='true'] draws the same ring.
1396
+ Skeleton, only when the layout is known ahead:
1397
+ <div role="group" aria-busy="true" aria-label="Loading trip">
1398
+ <span class="skeleton skeleton-circle" aria-hidden="true"></span>
1399
+ <span class="skeleton skeleton-text" aria-hidden="true"></span>
1400
+ </div>
1401
+ .skeleton-text (a line of text; the last in a run is shorter),
1402
+ .skeleton-circle (an avatar), .skeleton-rect (media, 16:9). The shimmer
1403
+ stops under reduced motion.
1404
+ Progress and meter: native elements, drawn from tokens.
1405
+ <progress class="progress" value="40" max="100">40%</progress>
1406
+ <meter class="meter" value="0.8" low="0.5" high="0.75" optimum="0.2">80%</meter>
1407
+ Label them (<label for>, or aria-label). With no value, a progress bar is
1408
+ indeterminate and shows a pulsing centre segment. A meter's fill is cobalt when
1409
+ its value is in the optimum range, --attention one range off and --danger
1410
+ two off. Bare <progress> and <meter> stay native (DESIGN.md §4).
1411
+ Empty state: an icon, one line, at most one action, no illustration.
1412
+ <div class="empty">
1413
+ <svg aria-hidden="true" …></svg>
1414
+ <p class="empty-title">No trips yet</p>
1415
+ <p class="empty-body">Trips you save show up here.</p>
1416
+ <a class="btn btn-primary" href="…">Plan a trip</a>
1417
+ </div> */
1418
+ @layer brignano.components {
1419
+ .spinner {
1420
+ display: inline-block;
1421
+ flex: none;
1422
+ box-sizing: border-box;
1423
+ width: 24px;
1424
+ height: 24px;
1425
+ border: 2.5px solid currentColor;
1426
+ border-right-color: transparent;
1427
+ border-radius: 50%;
1428
+ color: var(--action);
1429
+ vertical-align: middle;
1430
+ animation: spinner-spin 0.7s linear infinite;
1431
+ }
1432
+ .spinner-sm { width: 16px; height: 16px; border-width: 2px; }
1433
+
1434
+ /* The shimmer is a transformed ::after (compositor only, DESIGN.md §7).
1435
+ At rest it sits off the block, so under reduced motion, where
1436
+ tokens.css ends the animation at once, nothing is left showing. */
1437
+ .skeleton {
1438
+ position: relative;
1439
+ display: block;
1440
+ overflow: hidden;
1441
+ border-radius: var(--radius-sm);
1442
+ background-color: var(--surface-hover);
1443
+ }
1444
+ .skeleton::after {
1445
+ content: '';
1446
+ position: absolute;
1447
+ inset: 0;
1448
+ background-image: linear-gradient(90deg, transparent 0, var(--surface-active) 50%, transparent 100%);
1449
+ transform: translateX(-100%);
1450
+ animation: skeleton-shimmer 1.4s var(--ease) infinite;
1451
+ }
1452
+ @keyframes skeleton-shimmer { to { transform: translateX(100%); } }
1453
+ .skeleton-text { height: 0.75em; margin-block: 0.4em; }
1454
+ .skeleton-text:last-child:not(:first-child) { width: 60%; }
1455
+ .skeleton-circle { width: 40px; height: 40px; flex: none; border-radius: 50%; }
1456
+ .skeleton-rect { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-card); }
1457
+
1458
+ .progress, .meter {
1459
+ appearance: none;
1460
+ box-sizing: border-box;
1461
+ display: block;
1462
+ width: 100%;
1463
+ height: 8px;
1464
+ overflow: hidden;
1465
+ border: 0;
1466
+ border-radius: 999px;
1467
+ background-color: var(--surface-active);
1468
+ }
1469
+ .progress::-webkit-progress-bar { border-radius: inherit; background-color: var(--surface-active); }
1470
+ .progress::-webkit-progress-value { border-radius: inherit; background-color: var(--action); }
1471
+ .progress::-moz-progress-bar { border-radius: inherit; background-color: var(--action); }
1472
+ /* Indeterminate: a centred segment that can't be read as an amount, which
1473
+ pulses (opacity only, DESIGN.md §7). Under reduced motion it holds
1474
+ still at full strength. */
1475
+ .progress:indeterminate {
1476
+ background-image: linear-gradient(90deg, transparent 35%, var(--action) 35% 65%, transparent 65%);
1477
+ animation: progress-pulse 1.4s var(--ease) infinite alternate;
1478
+ }
1479
+ .progress:indeterminate::-webkit-progress-bar { background-color: transparent; }
1480
+ .progress:indeterminate::-moz-progress-bar { background-color: transparent; }
1481
+ @keyframes progress-pulse { to { opacity: 0.45; } }
1482
+
1483
+ .meter::-webkit-meter-bar { height: 8px; border: 0; border-radius: inherit; background: var(--surface-active); }
1484
+ .meter::-webkit-meter-optimum-value { border-radius: inherit; background: var(--action); }
1485
+ .meter::-webkit-meter-suboptimum-value { border-radius: inherit; background: var(--attention); }
1486
+ .meter::-webkit-meter-even-less-good-value { border-radius: inherit; background: var(--danger); }
1487
+ .meter::-moz-meter-bar { border-radius: inherit; background: var(--action); }
1488
+ .meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--attention); }
1489
+ .meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }
1490
+
1491
+ .empty {
1492
+ display: flex;
1493
+ flex-direction: column;
1494
+ align-items: center;
1495
+ justify-content: center;
1496
+ gap: var(--space-2);
1497
+ padding: var(--space-7) var(--space-4);
1498
+ text-align: center;
1499
+ }
1500
+ .empty > svg { width: 32px; height: 32px; margin-bottom: var(--space-2); color: var(--ink-soft); }
1501
+ .empty-title { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--ink); }
1502
+ .empty-body { max-width: 32ch; margin: 0; font-size: var(--text-sm); color: var(--ink-soft); }
1503
+ .empty > .btn { margin-top: var(--space-3); }
1504
+
1505
+ /* Vendor pseudo-elements each get their own rule: one unknown selector in
1506
+ a list drops the whole rule in the other engine. */
1507
+ @media (forced-colors: active) {
1508
+ .spinner { forced-color-adjust: none; border-color: CanvasText; border-right-color: transparent; }
1509
+ .skeleton { background: GrayText; }
1510
+ .skeleton::after { display: none; }
1511
+ .progress, .meter { forced-color-adjust: none; border: 1px solid CanvasText; background: Canvas; }
1512
+ .progress::-webkit-progress-bar { background: Canvas; }
1513
+ .meter::-webkit-meter-bar { background: Canvas; }
1514
+ .progress::-webkit-progress-value { background: Highlight; }
1515
+ .progress::-moz-progress-bar { background: Highlight; }
1516
+ .meter::-webkit-meter-optimum-value { background: Highlight; }
1517
+ .meter::-webkit-meter-suboptimum-value { background: Highlight; }
1518
+ .meter::-webkit-meter-even-less-good-value { background: Highlight; }
1519
+ .meter::-moz-meter-bar { background: Highlight; }
1520
+ .progress:indeterminate { background-image: linear-gradient(90deg, transparent 35%, Highlight 35% 65%, transparent 65%); }
1521
+ .progress:indeterminate::-webkit-progress-bar { background: transparent; }
1522
+ }
1523
+ }
1524
+
1525
+ /* ── Table (#61) ───────────────────────────────────────────────────────────
1526
+ <div class="table-wrap"><table class="table">…</table></div>
1527
+ Numbers right-aligned with .num; sortable headers carry aria-sort and a
1528
+ <button>; .table-sticky pins the header inside a scrolling .table-wrap.
1529
+ On a phone the table scrolls sideways inside .table-wrap; rows are never
1530
+ stacked into cards, so columns stay comparable. No zebra stripes. */
1531
+ @layer brignano.components {
1532
+ .table-wrap {
1533
+ overflow-x: auto;
1534
+ max-width: 100%;
1535
+ /* Scroll shadows: an edge darkens only while there is more to scroll. */
1536
+ background:
1537
+ linear-gradient(to right, var(--card) 30%, transparent) left / 40px 100% no-repeat local,
1538
+ linear-gradient(to left, var(--card) 30%, transparent) right / 40px 100% no-repeat local,
1539
+ radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 16%, transparent), transparent) left / 12px 100% no-repeat scroll,
1540
+ radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 16%, transparent), transparent) right / 12px 100% no-repeat scroll;
1541
+ background-color: var(--card);
1542
+ }
1543
+ .table {
1544
+ width: 100%;
1545
+ border-collapse: collapse;
1546
+ font-size: var(--text-sm);
1547
+ font-variant-numeric: tabular-nums;
1548
+ color: var(--ink);
1549
+ }
1550
+ .table caption {
1551
+ caption-side: top;
1552
+ text-align: left;
1553
+ font-weight: var(--weight-semibold);
1554
+ padding: 0 0 var(--space-2);
1555
+ }
1556
+ .table th,
1557
+ .table td {
1558
+ padding: var(--space-2) var(--space-3);
1559
+ text-align: left;
1560
+ vertical-align: top;
1561
+ border-bottom: 1px solid var(--line);
1562
+ }
1563
+ .table th {
1564
+ font-weight: var(--weight-semibold);
1565
+ color: var(--ink-soft);
1566
+ white-space: nowrap;
1567
+ border-bottom-color: var(--line-strong);
1568
+ }
1569
+ .table tbody tr:hover { background: var(--surface-hover); }
1570
+ .table .num { text-align: right; white-space: nowrap; }
1571
+ .table th.num { font-family: inherit; } /* the figures are mono (.num); their column's label is not */
1572
+ .table tfoot td { font-weight: var(--weight-semibold); border-top: 1px solid var(--line-strong); border-bottom: 0; }
1573
+
1574
+ /* Sortable header: the <button> fills the cell; the arrow is decoration,
1575
+ aria-sort on the <th> is what assistive tech reads. */
1576
+ .table th[aria-sort] { padding: 0; }
1577
+ .table th[aria-sort] > button {
1578
+ all: unset;
1579
+ box-sizing: border-box;
1580
+ display: flex;
1581
+ align-items: center;
1582
+ gap: var(--space-1);
1583
+ width: 100%;
1584
+ padding: var(--space-2) var(--space-3);
1585
+ cursor: pointer;
1586
+ border-radius: var(--radius-sm);
1587
+ }
1588
+ .table th.num[aria-sort] > button { justify-content: flex-end; }
1589
+ .table th[aria-sort] > button:hover { color: var(--ink); }
1590
+ .table th[aria-sort] > button:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
1591
+ /* \FE0E asks for the text glyph: ↕ is one of the arrows phones draw as an emoji. */
1592
+ .table th[aria-sort] > button::after { content: '↕\FE0E' / ''; color: var(--slate); }
1593
+ .table th[aria-sort='ascending'] > button::after { content: '↑' / ''; color: var(--ink); }
1594
+ .table th[aria-sort='descending'] > button::after { content: '↓' / ''; color: var(--ink); }
1595
+ .table th[aria-sort='ascending'],
1596
+ .table th[aria-sort='descending'] { color: var(--ink); }
1597
+ @media (pointer: coarse) {
1598
+ .table th[aria-sort] > button { min-height: 44px; }
1599
+ }
1600
+
1601
+ /* Sticky header: .table-wrap scrolls sideways, which also makes it the
1602
+ header's scroll container, so the header only sticks when the wrap has a
1603
+ max-height and scrolls vertically itself. Without one, it scrolls away
1604
+ with the page. */
1605
+ .table-sticky thead th { position: sticky; top: 0; z-index: var(--z-raised); background: var(--card); }
1606
+
1607
+ .tier-marketing .table { font-size: var(--text-base); }
1608
+ .tier-marketing .table th,
1609
+ .tier-marketing .table td { padding: var(--space-3) var(--space-4); }
1610
+ .tier-marketing .table th[aria-sort] { padding: 0; }
1611
+ .tier-marketing .table th[aria-sort] > button { padding: var(--space-3) var(--space-4); }
1612
+ }
1613
+
1614
+ /* ── Key-value list (#62) ──────────────────────────────────────────────────
1615
+ <dl class="kv"><dt>Booked</dt><dd>7 Nov 2026</dd>…</dl>
1616
+ Two columns when there's room, stacked on a phone. A <div> may wrap each
1617
+ dt/dd pair (valid HTML); it doesn't affect the layout. */
1618
+ @layer brignano.components {
1619
+ .kv {
1620
+ display: grid;
1621
+ grid-template-columns: minmax(8rem, max-content) 1fr;
1622
+ gap: var(--space-2) var(--space-5);
1623
+ margin: 0;
1624
+ font-size: var(--text-sm);
1625
+ }
1626
+ .kv > div { display: contents; }
1627
+ .kv dt { color: var(--ink-soft); }
1628
+ .kv dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
1629
+ @media (max-width: 480px) {
1630
+ .kv { grid-template-columns: 1fr; row-gap: 0; }
1631
+ .kv dd { margin-bottom: var(--space-3); }
1632
+ }
1633
+ .tier-marketing .kv { font-size: var(--text-base); }
1634
+ }
1635
+
1636
+ /* ── Stat tile (#62) ───────────────────────────────────────────────────────
1637
+ <div class="stat">
1638
+ <span class="stat-label">Visitors</span>
1639
+ <span class="stat-value">1,284</span>
1640
+ <span class="stat-delta" data-dir="up" data-tone="good">Up 12% from last week</span>
1641
+ </div>
1642
+ The number is mono with tabular figures (DESIGN.md §5). A delta always says
1643
+ its direction in words; the arrow is decoration. data-tone="good" / "bad"
1644
+ colours it only when up or down is good or bad for the reader; without a
1645
+ tone it stays neutral. */
1646
+ @layer brignano.components {
1647
+ .stat {
1648
+ display: flex;
1649
+ flex-direction: column;
1650
+ gap: var(--space-1);
1651
+ min-width: 0;
1652
+ padding: var(--space-4) var(--space-5);
1653
+ color: var(--ink);
1654
+ background: var(--card);
1655
+ border: 1px solid var(--line);
1656
+ border-radius: var(--radius-card);
1657
+ box-shadow: var(--shadow-1);
1658
+ }
1659
+ .stat-label { font-size: var(--text-sm); color: var(--ink-soft); }
1660
+ .stat-value {
1661
+ font-family: var(--mono);
1662
+ font-size: var(--text-2xl);
1663
+ font-weight: var(--weight-medium);
1664
+ line-height: var(--leading-display);
1665
+ font-variant-numeric: tabular-nums;
1666
+ letter-spacing: var(--tracking-title);
1667
+ }
1668
+ .stat-delta { font-size: var(--text-sm); color: var(--ink-soft); }
1669
+ .stat-delta[data-dir]::before { margin-right: var(--space-1); }
1670
+ .stat-delta[data-dir='up']::before { content: '↑' / ''; }
1671
+ .stat-delta[data-dir='down']::before { content: '↓' / ''; }
1672
+ .stat-delta[data-tone='good'] { color: var(--success-ink); }
1673
+ .stat-delta[data-tone='bad'] { color: var(--danger-ink); }
1674
+ .stat-grid {
1675
+ display: grid;
1676
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
1677
+ gap: var(--space-4);
1678
+ }
1679
+ }
1680
+
1681
+ /* ── Tabs (#63) ────────────────────────────────────────────────────────────
1682
+ <div class="tabs">
1683
+ <div class="tabs-list" role="tablist" aria-label="Trip">
1684
+ <button role="tab" id="t1" aria-selected="true" aria-controls="p1">Itinerary</button>
1685
+ <button role="tab" id="t2" aria-selected="false" aria-controls="p2" tabindex="-1">Bookings</button>
1686
+ </div>
1687
+ <div class="tabs-panel" role="tabpanel" id="p1" aria-labelledby="t1">…</div>
1688
+ <div class="tabs-panel" role="tabpanel" id="p2" aria-labelledby="t2" hidden>…</div>
1689
+ </div>
1690
+ Tabs switch views of one thing; navigation between pages is a nav, never
1691
+ tabs. The selected tab is underlined in cobalt. The consumer's script owns
1692
+ selection and arrow keys (contract on previews/tabs.html). */
1693
+ @layer brignano.components {
1694
+ .tabs-list {
1695
+ display: flex;
1696
+ gap: var(--space-1);
1697
+ overflow-x: auto;
1698
+ scrollbar-width: none;
1699
+ /* Inset hairline, not a border: a border would push the tab's 2px
1700
+ underline past the scroll box, which clips it and scrolls by 1px. */
1701
+ box-shadow: inset 0 -1px 0 var(--line);
1702
+ }
1703
+ .tabs-list::-webkit-scrollbar { display: none; }
1704
+ .tabs-list > [role='tab'] {
1705
+ all: unset;
1706
+ box-sizing: border-box;
1707
+ flex: none;
1708
+ padding: var(--space-2) var(--space-3);
1709
+ font-size: var(--text-sm);
1710
+ font-weight: var(--weight-medium);
1711
+ color: var(--ink-soft);
1712
+ white-space: nowrap;
1713
+ cursor: pointer;
1714
+ border-bottom: 2px solid transparent;
1715
+ border-radius: var(--radius-sm) var(--radius-sm) 0 0;
1716
+ transition: color var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);
1717
+ }
1718
+ .tabs-list > [role='tab']:hover { color: var(--ink); background: var(--surface-hover); }
1719
+ .tabs-list > [role='tab']:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
1720
+ .tabs-list > [role='tab'][aria-selected='true'] { color: var(--ink); border-bottom-color: var(--action); }
1721
+ .tabs-list > [role='tab'][aria-disabled='true'] { color: var(--disabled-ink); cursor: not-allowed; background: none; }
1722
+ .tabs-panel { padding-top: var(--space-4); }
1723
+ .tabs-panel:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; border-radius: var(--radius-sm); }
1724
+ .tier-marketing .tabs-list > [role='tab'] { font-size: var(--text-base); padding: var(--space-3) var(--space-4); }
1725
+ @media (pointer: coarse) {
1726
+ .tabs-list > [role='tab'] { display: inline-flex; align-items: center; min-height: 44px; }
1727
+ }
1728
+ @media (prefers-reduced-motion: reduce) {
1729
+ .tabs-list > [role='tab'] { transition: none; }
1730
+ }
1731
+ }
1732
+
1733
+ /* ── Breadcrumb (#64) ──────────────────────────────────────────────────────
1734
+ <nav class="breadcrumb" aria-label="Breadcrumb"><ol>
1735
+ <li><a href="/">Home</a></li><li><a href="/blog">Blog</a></li>
1736
+ <li><a href="/blog/x" aria-current="page">This post</a></li>
1737
+ </ol></nav>
1738
+ Separators are drawn, not typed, so they aren't read aloud. On a phone the
1739
+ middle crumbs collapse to an ellipsis: first, parent and current stay. */
1740
+ @layer brignano.components {
1741
+ .breadcrumb ol {
1742
+ display: flex;
1743
+ flex-wrap: wrap;
1744
+ align-items: center;
1745
+ gap: var(--space-1) var(--space-2);
1746
+ margin: 0;
1747
+ padding: 0;
1748
+ list-style: none;
1749
+ font-size: var(--text-sm);
1750
+ color: var(--ink-soft);
1751
+ }
1752
+ .breadcrumb li { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
1753
+ .breadcrumb li + li::before { content: '/' / ''; color: var(--slate); }
1754
+ .breadcrumb a { color: var(--action-ink); text-decoration: none; border-radius: var(--radius-sm); }
1755
+ .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
1756
+ .breadcrumb a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
1757
+ .breadcrumb [aria-current='page'] {
1758
+ color: var(--ink);
1759
+ pointer-events: none;
1760
+ overflow: hidden;
1761
+ text-overflow: ellipsis;
1762
+ white-space: nowrap;
1763
+ }
1764
+ @media (max-width: 480px) {
1765
+ .breadcrumb li:not(:first-child):not(:nth-last-child(-n + 2)) { display: none; }
1766
+ /* The parent crumb's separator stands in for the hidden ones. */
1767
+ .breadcrumb li:nth-last-child(2):not(:nth-child(2))::before { content: '/ … /' / ''; }
1768
+ }
1769
+ @media (pointer: coarse) {
1770
+ .breadcrumb ol { row-gap: 0; }
1771
+ .breadcrumb a:not([aria-current]) { display: inline-flex; align-items: center; min-height: 44px; }
1772
+ }
1773
+ }
1774
+
1775
+ /* ── Pagination (#64) ──────────────────────────────────────────────────────
1776
+ <nav class="pagination" aria-label="Pages">
1777
+ <a class="pagination-prev" href="?p=2">Previous</a>
1778
+ <ol class="pagination-pages">
1779
+ <li><a href="?p=1">1</a></li> <li><a href="?p=3" aria-current="page">3</a></li> …
1780
+ </ol>
1781
+ <span class="pagination-status">Page 3 of 9</span>
1782
+ <a class="pagination-next" href="?p=4">Next</a>
1783
+ </nav>
1784
+ Numbered pages are for tables; content lists use .load-more instead. When
1785
+ the nav itself is narrower than 34rem (a phone, a sidebar, a half-width
1786
+ column) the numbers hide and "Page 3 of 9" shows. A missing previous or next
1787
+ is a <span aria-disabled="true">, not a dead link. */
1788
+ @layer brignano.components {
1789
+ .pagination {
1790
+ container: pagination / inline-size;
1791
+ display: flex;
1792
+ align-items: center;
1793
+ justify-content: space-between;
1794
+ gap: var(--space-2);
1795
+ font-size: var(--text-sm);
1796
+ }
1797
+ .pagination-pages { display: flex; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
1798
+ .pagination-prev,
1799
+ .pagination-next,
1800
+ .pagination-pages a,
1801
+ .pagination-pages span {
1802
+ display: inline-flex;
1803
+ align-items: center;
1804
+ justify-content: center;
1805
+ min-width: 2.25rem;
1806
+ min-height: 2.25rem;
1807
+ padding: 0 var(--space-3);
1808
+ color: var(--ink);
1809
+ text-decoration: none;
1810
+ border-radius: var(--radius-sm);
1811
+ font-variant-numeric: tabular-nums;
1812
+ }
1813
+ .pagination-pages span { color: var(--slate); padding: 0; }
1814
+ .pagination-prev:hover,
1815
+ .pagination-next:hover,
1816
+ .pagination-pages a:hover { background: var(--surface-hover); }
1817
+ .pagination-prev:focus-visible,
1818
+ .pagination-next:focus-visible,
1819
+ .pagination-pages a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
1820
+ .pagination-pages [aria-current='page'] { color: var(--on-action); background: var(--action); font-weight: var(--weight-semibold); }
1821
+ .pagination-prev,
1822
+ .pagination-next { flex-shrink: 0; white-space: nowrap; }
1823
+ .pagination-prev::before { content: '←' / ''; margin-right: var(--space-1); }
1824
+ .pagination-next::after { content: '→' / ''; margin-left: var(--space-1); }
1825
+ .pagination [aria-disabled='true'] { color: var(--disabled-ink); pointer-events: none; }
1826
+ .pagination-status { display: none; color: var(--ink-soft); }
1827
+ @container pagination (max-width: 34rem) {
1828
+ .pagination-pages { display: none; }
1829
+ .pagination-status { display: block; }
1830
+ }
1831
+ @media (pointer: coarse) {
1832
+ .pagination-prev,
1833
+ .pagination-next,
1834
+ .pagination-pages a { min-height: 44px; min-width: 44px; }
1835
+ }
1836
+
1837
+ /* Load more: the default for content lists (posts, photos, activity). */
1838
+ .load-more { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-5) 0; }
1839
+ .load-more-count { font-size: var(--text-sm); color: var(--ink-soft); }
1840
+ .load-more > button,
1841
+ .load-more > a {
1842
+ all: unset;
1843
+ box-sizing: border-box;
1844
+ padding: var(--space-2) var(--space-4);
1845
+ font-size: var(--text-sm);
1846
+ font-weight: var(--weight-medium);
1847
+ color: var(--ink);
1848
+ background: var(--card);
1849
+ border: 1px solid var(--line-control);
1850
+ border-radius: var(--radius-control);
1851
+ cursor: pointer;
1852
+ }
1853
+ .load-more > button:hover,
1854
+ .load-more > a:hover { background: var(--surface-hover); }
1855
+ .load-more > button:focus-visible,
1856
+ .load-more > a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
1857
+ @media (pointer: coarse) {
1858
+ .load-more > button,
1859
+ .load-more > a { display: inline-flex; align-items: center; min-height: 44px; }
1860
+ }
1861
+ }
1862
+
1863
+ /* ── Disclosure and accordion (#65) ───────────────────────────────────────
1864
+ <details class="disclosure"><summary>Question</summary><p>Answer</p></details>
1865
+ <div class="accordion">
1866
+ <details class="disclosure" name="faq">…</details>
1867
+ <details class="disclosure" name="faq">…</details>
1868
+ </div>
1869
+ Native <details> only, no JS. A shared name="…" makes the group exclusive:
1870
+ opening one closes the rest. The height doesn't animate; only the chevron
1871
+ turns. */
1872
+ @layer brignano.components {
1873
+ .disclosure > summary {
1874
+ display: flex;
1875
+ align-items: center;
1876
+ justify-content: space-between;
1877
+ gap: var(--space-3);
1878
+ padding: var(--space-3);
1879
+ font-weight: var(--weight-medium);
1880
+ color: var(--ink);
1881
+ list-style: none;
1882
+ cursor: pointer;
1883
+ border-radius: var(--radius-sm);
1884
+ transition: background-color var(--duration-fast) var(--ease);
1885
+ }
1886
+ .disclosure > summary::-webkit-details-marker { display: none; }
1887
+ .disclosure > summary::after {
1888
+ content: '';
1889
+ flex: none;
1890
+ width: .5em;
1891
+ height: .5em;
1892
+ margin-right: .25em;
1893
+ border-right: 2px solid var(--ink-soft);
1894
+ border-bottom: 2px solid var(--ink-soft);
1895
+ transform: translateY(-25%) rotate(45deg);
1896
+ transition: transform var(--duration-fast) var(--ease);
1897
+ }
1898
+ .disclosure[open] > summary::after { transform: translateY(25%) rotate(-135deg); }
1899
+ .disclosure > summary:hover { background: var(--surface-hover); }
1900
+ .disclosure > summary:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
1901
+ .disclosure > :not(summary) { margin: 0; padding: 0 var(--space-3) var(--space-3); color: var(--ink-soft); }
1902
+
1903
+ .accordion { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
1904
+ .accordion > .disclosure + .disclosure { border-top: 1px solid var(--line); }
1905
+ .accordion > .disclosure > summary { border-radius: 0; }
1906
+
1907
+ .tier-marketing .disclosure > summary { font-size: var(--text-lg); padding: var(--space-4) var(--space-3); }
1908
+ @media (pointer: coarse) {
1909
+ .disclosure > summary { min-height: 44px; }
1910
+ }
1911
+ @media (prefers-reduced-motion: reduce) {
1912
+ .disclosure > summary,
1913
+ .disclosure > summary::after { transition: none; }
1914
+ }
1915
+ }
1916
+
1917
+ /* ── Avatar (#66) ─────────────────────────────────────────────────────────
1918
+ <span class="avatar"><img src="…" alt="Ana Ruiz"></span>
1919
+ <span class="avatar avatar-sm" role="img" aria-label="Ana Ruiz">AR</span>
1920
+ A circle. Initials are the fallback when there's no photo; the wrapper
1921
+ then carries the name for screen readers. */
1922
+ @layer brignano.components {
1923
+ .avatar {
1924
+ display: inline-flex;
1925
+ align-items: center;
1926
+ justify-content: center;
1927
+ flex: none;
1928
+ width: 2.5rem;
1929
+ height: 2.5rem;
1930
+ overflow: hidden;
1931
+ font-size: var(--text-sm);
1932
+ font-weight: var(--weight-semibold);
1933
+ line-height: 1;
1934
+ color: var(--ink);
1935
+ background: var(--surface-active);
1936
+ border-radius: 50%;
1937
+ user-select: none;
1938
+ }
1939
+ .avatar > img { width: 100%; height: 100%; object-fit: cover; }
1940
+ .avatar-sm { width: 1.5rem; height: 1.5rem; font-size: var(--text-xs); }
1941
+ .avatar-lg { width: 4rem; height: 4rem; font-size: var(--text-lg); }
1942
+ }
1943
+
1944
+ /* ── Keycap, inline code, code block (#66) ─────────────────────────────────
1945
+ <kbd class="kbd">⌘</kbd> <kbd class="kbd">K</kbd> <code class="code">npm run check</code>
1946
+ <figure class="code-block">
1947
+ <figcaption class="code-block-header">
1948
+ <span class="code-block-file">deploy.sh</span>
1949
+ <button type="button" class="code-block-copy">Copy</button>
1950
+ </figcaption>
1951
+ <pre tabindex="0"><code>…</code></pre>
1952
+ </figure>
1953
+ The block scrolls sideways and never wraps; tabindex="0" lets keyboard
1954
+ users scroll it. Tokens are spans: .tok-keyword, .tok-string,
1955
+ .tok-comment; a highlighted line is <span class="line-highlight">. Your
1956
+ app owns the copy button's script. */
1957
+ @layer brignano.components {
1958
+ .kbd,
1959
+ .prose kbd {
1960
+ display: inline-block;
1961
+ min-width: 1.6em;
1962
+ padding: .1em .4em;
1963
+ font-family: var(--mono);
1964
+ font-size: .85em;
1965
+ line-height: var(--leading-ui);
1966
+ text-align: center;
1967
+ color: var(--ink);
1968
+ background: var(--card);
1969
+ border: 1px solid var(--line-control);
1970
+ border-bottom-width: 2px;
1971
+ border-radius: var(--radius-sm);
1972
+ }
1973
+ .code,
1974
+ .prose :not(pre) > code {
1975
+ padding: .1em .35em;
1976
+ font-family: var(--mono);
1977
+ font-size: .9em;
1978
+ color: var(--code-ink);
1979
+ background: var(--surface-hover);
1980
+ border-radius: var(--radius-sm);
1981
+ }
1982
+
1983
+ .code-block {
1984
+ margin: 0;
1985
+ overflow: hidden;
1986
+ color: var(--code-ink);
1987
+ background: var(--code-surface);
1988
+ border: 1px solid var(--line);
1989
+ border-radius: var(--radius-card);
1990
+ }
1991
+ .code-block-header {
1992
+ display: flex;
1993
+ align-items: center;
1994
+ justify-content: space-between;
1995
+ gap: var(--space-3);
1996
+ padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
1997
+ font-size: var(--text-xs);
1998
+ font-family: var(--mono);
1999
+ color: var(--ink-soft);
2000
+ border-bottom: 1px solid var(--line);
2001
+ }
2002
+ .code-block-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2003
+ .code-block-copy {
2004
+ all: unset;
2005
+ box-sizing: border-box;
2006
+ flex: none;
2007
+ padding: var(--space-1) var(--space-3);
2008
+ font-family: var(--sans);
2009
+ font-size: var(--text-xs);
2010
+ font-weight: var(--weight-medium);
2011
+ color: var(--ink-soft);
2012
+ cursor: pointer;
2013
+ border-radius: var(--radius-sm);
2014
+ }
2015
+ .code-block-copy:hover { color: var(--ink); background: var(--surface-hover); }
2016
+ .code-block-copy:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
2017
+ .code-block pre { margin: 0; }
2018
+ .code-block pre,
2019
+ .prose > pre {
2020
+ padding: var(--space-4);
2021
+ overflow-x: auto;
2022
+ font-family: var(--mono);
2023
+ font-size: var(--text-sm);
2024
+ line-height: var(--leading-body);
2025
+ tab-size: 2;
2026
+ }
2027
+ .code-block pre:focus-visible,
2028
+ .prose > pre:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
2029
+ .code-block code { font: inherit; }
2030
+ .tok-keyword { color: var(--code-keyword); }
2031
+ .tok-string { color: var(--code-string); }
2032
+ .tok-comment { color: var(--code-comment); font-style: italic; }
2033
+ /* The band reaches into the pre's padding with side shadows, not padding,
2034
+ so a box-sizing reset in the consuming site can't shorten it. */
2035
+ .line-highlight {
2036
+ display: inline-block;
2037
+ min-width: 100%;
2038
+ background: var(--code-highlight);
2039
+ box-shadow: calc(var(--space-4) * -1) 0 0 var(--code-highlight), var(--space-4) 0 0 var(--code-highlight);
2040
+ }
2041
+ /* Slate falls under 4.5:1 on the cobalt wash; comments step up to the
2042
+ string ink there and keep their italics. */
2043
+ .line-highlight .tok-comment { color: var(--code-string); }
2044
+ @media (pointer: coarse) {
2045
+ .code-block-copy { display: inline-flex; align-items: center; min-height: 44px; }
2046
+ }
2047
+ }
2048
+
2049
+ /* ── Blockquote and figure (#66) ───────────────────────────────────────────
2050
+ <blockquote class="blockquote"><p>…</p><cite>Ana Ruiz, ops lead</cite></blockquote>
2051
+ <figure class="figure"><img src="…" alt="…"><figcaption>…</figcaption></figure>
2052
+ The quote bar is a neutral rule, not cobalt: a quote isn't interactive. */
2053
+ @layer brignano.components {
2054
+ .blockquote {
2055
+ margin: 0;
2056
+ padding: 0 0 0 var(--space-4);
2057
+ font-size: var(--text-lg);
2058
+ color: var(--ink);
2059
+ border-left: 3px solid var(--line-strong);
2060
+ }
2061
+ .blockquote > p { margin: 0 0 var(--space-2); }
2062
+ .blockquote > cite { display: block; font-size: var(--text-sm); font-style: normal; color: var(--ink-soft); }
2063
+ .blockquote > cite::before { content: '— ' / ''; }
2064
+ .figure { margin: 0; }
2065
+ .figure > img,
2066
+ .figure > video { display: block; max-width: 100%; height: auto; border-radius: var(--radius-card); }
2067
+ .figure > figcaption { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--slate); }
2068
+ }
2069
+
2070
+ /* ── Prose (#67) ──────────────────────────────────────────────────────────
2071
+ <article class="prose">…plain HTML from Markdown…</article>
2072
+ Long-form text: blog posts, docs, legal pages. Styles the bare elements
2073
+ a Markdown renderer emits, reusing the code, quote, figure and table
2074
+ pieces above. Capped at the tier's --measure; spacing comes from --s*.
2075
+ Heading anchors: <h2 id="x">Title <a class="anchor" href="#x" aria-label="Link to Title"></a></h2>. */
2076
+ @layer brignano.components {
2077
+ .prose {
2078
+ max-width: var(--measure);
2079
+ font-size: var(--text-base);
2080
+ line-height: 1.7;
2081
+ color: var(--ink);
2082
+ overflow-wrap: break-word;
2083
+ }
2084
+ .prose > * { margin: 0; }
2085
+ .prose > * + * { margin-top: var(--space-4); }
2086
+ .prose :where(h2, h3, h4) {
2087
+ font-weight: var(--weight-semibold);
2088
+ line-height: var(--leading-title);
2089
+ letter-spacing: var(--tracking-title);
2090
+ scroll-margin-top: var(--space-7);
2091
+ }
2092
+ .prose h2 { font-size: var(--text-xl); }
2093
+ .prose h3 { font-size: var(--text-lg); }
2094
+ .prose h4 { font-size: var(--text-base); }
2095
+ .prose > * + h2 { margin-top: var(--space-7); }
2096
+ .prose > * + :where(h3, h4) { margin-top: var(--space-6); }
2097
+ .prose > :where(h2, h3, h4) + * { margin-top: var(--space-2); }
2098
+
2099
+ /* The # follows the heading text and shows on hover or focus; on
2100
+ devices without hover it always shows. */
2101
+ .prose .anchor {
2102
+ margin-left: var(--space-2);
2103
+ font-weight: var(--weight-regular);
2104
+ color: var(--slate);
2105
+ text-decoration: none;
2106
+ opacity: 0;
2107
+ }
2108
+ .prose .anchor::before { content: '#'; }
2109
+ .prose :where(h2, h3, h4):hover > .anchor,
2110
+ .prose .anchor:focus-visible { opacity: 1; }
2111
+ .prose .anchor:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; border-radius: var(--radius-sm); }
2112
+ @media (hover: none) {
2113
+ .prose .anchor { opacity: 1; }
2114
+ }
2115
+ @media (pointer: coarse) {
2116
+ /* A 44px hit area without moving the heading text. */
2117
+ .prose .anchor { display: inline-block; min-width: 44px; padding: 12px; margin: -12px -12px -12px calc(var(--space-2) - 12px); text-align: left; }
2118
+ }
2119
+
2120
+ .prose a:not(.anchor) { color: var(--action-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
2121
+ .prose a:not(.anchor):hover { color: var(--action-ink-hover); text-decoration-thickness: 2px; }
2122
+ .prose a:not(.anchor):focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; border-radius: 2px; }
2123
+ .prose strong { font-weight: var(--weight-semibold); }
2124
+
2125
+ .prose :where(ul, ol) { padding-left: var(--space-5); }
2126
+ .prose li + li { margin-top: var(--space-1); }
2127
+ .prose li > :where(ul, ol) { margin-top: var(--space-1); }
2128
+ .prose li::marker { color: var(--slate); }
2129
+
2130
+ .prose hr { height: 0; margin-block: var(--space-7); border: 0; border-top: 1px solid var(--line); }
2131
+
2132
+ /* Reused pieces, applied to bare elements. Inline code, kbd and the
2133
+ pre's type come from the #66 rules above, which list these selectors
2134
+ too; a bare pre adds the block's frame here. */
2135
+ .prose > pre {
2136
+ color: var(--code-ink);
2137
+ background: var(--code-surface);
2138
+ border: 1px solid var(--line);
2139
+ border-radius: var(--radius-card);
2140
+ }
2141
+ .prose pre code { font: inherit; }
2142
+ .prose > blockquote {
2143
+ padding-left: var(--space-4);
2144
+ color: var(--ink-soft);
2145
+ border-left: 3px solid var(--line-strong);
2146
+ }
2147
+ .prose > blockquote > * { margin: 0; }
2148
+ .prose > blockquote > * + * { margin-top: var(--space-2); }
2149
+ .prose > figure > :where(img, video) { display: block; max-width: 100%; height: auto; border-radius: var(--radius-card); }
2150
+ .prose > figure > figcaption { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--slate); }
2151
+ .prose img { max-width: 100%; height: auto; }
2152
+ .prose > p > img { border-radius: var(--radius-card); }
2153
+ .prose > :where(figure, pre, .table-wrap, .code-block) { margin-top: var(--space-5); }
2154
+ .prose > :where(figure, pre, .table-wrap, .code-block) + * { margin-top: var(--space-5); }
2155
+
2156
+ /* Footnotes, in the shape remark-gfm and markdown-it-footnote emit. */
2157
+ .prose sup { line-height: 0; }
2158
+ .prose :where(.footnotes, section[data-footnotes]) {
2159
+ margin-top: var(--space-7);
2160
+ padding-top: var(--space-4);
2161
+ font-size: var(--text-sm);
2162
+ color: var(--ink-soft);
2163
+ border-top: 1px solid var(--line);
2164
+ }
2165
+ .prose :is(.footnotes, section[data-footnotes]) h2 { font-size: var(--text-sm); color: var(--ink-soft); }
2166
+
2167
+ .tier-marketing .prose { line-height: 1.75; }
2168
+ .tier-marketing .prose h2 { font-size: var(--text-2xl); }
2169
+ .tier-marketing .prose h3 { font-size: var(--text-xl); }
2170
+ }
2171
+
2172
+ /* ── Voice (ADR-0014) ───────────────────────────────────────────────────────
2173
+ What makes a screen read as one of these products (DESIGN.md §5):
2174
+
2175
+ <p class="eyebrow">Production</p> ← one per screen, above its heading
2176
+ <h1>Services</h1>
2177
+ Deployed <span class="num">2026-11-07 09:30</span> ← any number, date or code
2178
+ <p class="display">404</p> ← one heavy moment, at most
2179
+ <span class="stamp" role="img" aria-label="Anthony Brignano">A|B</span>
2180
+ <span class="rule"></span> ← the bar above a hero heading
2181
+
2182
+ The eyebrow is written in sentence case and uppercased here. .rule is the
2183
+ mark in force (--mark-current: the product's, or the family amber): it inks
2184
+ a graphic, never a control (§3). */
2185
+ @layer brignano.components {
2186
+ .eyebrow {
2187
+ margin: 0;
2188
+ font-family: var(--mono);
2189
+ font-size: var(--text-xs);
2190
+ font-weight: var(--weight-medium);
2191
+ line-height: var(--leading-ui);
2192
+ letter-spacing: var(--tracking-caps);
2193
+ text-transform: uppercase;
2194
+ color: var(--ink-soft);
2195
+ }
2196
+ .num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; } /* a date never breaks in two */
2197
+ .display {
2198
+ margin: 0;
2199
+ font-family: var(--sans);
2200
+ font-size: var(--text-4xl);
2201
+ font-weight: var(--weight-heavy);
2202
+ line-height: var(--leading-display);
2203
+ letter-spacing: calc(var(--tracking-display) * 2);
2204
+ color: var(--ink);
2205
+ }
2206
+ .stamp {
2207
+ font-family: var(--sans);
2208
+ font-weight: var(--weight-heavy);
2209
+ letter-spacing: var(--tracking-caps); /* open, not tight: closed up, the heavy bar reads as an I */
2210
+ white-space: nowrap;
2211
+ color: var(--ink);
2212
+ }
2213
+ .rule { display: block; width: 56px; height: 3px; border: 0; border-radius: 2px; background: var(--mark-current); }
2214
+ }
2215
+
2216
+ /* ── Line breaks ────────────────────────────────────────────────────────────
2217
+ A short title balances its lines, so a two-line heading doesn't end on one
2218
+ stranded word; running text avoids a last line of one word. Both are hints:
2219
+ a browser without text-wrap breaks lines as before. */
2220
+ @layer brignano.components {
2221
+ :where(.card-title, .dialog-title, .empty-title, .msg-title, .toast-title, .stat-delta),
2222
+ .prose :where(h2, h3, h4) { text-wrap: balance; }
2223
+ :where(.empty-body, .field-hint, .choice-hint),
2224
+ .prose :where(p, li, blockquote, figcaption) { text-wrap: pretty; }
2225
+ }
2226
+
2227
+ /* ── Print ──────────────────────────────────────────────────────────────────
2228
+ A receipt, a legal page or an article gets printed. tokens.css already
2229
+ forces the light theme on paper; this drops what only works on a screen
2230
+ (sticky chrome, shadows, popovers and sheets, controls that do nothing on
2231
+ paper; an open dialog still prints, since it is what the reader is looking at), keeps blocks
2232
+ whole across a page break, and writes an outside link's address after it
2233
+ in running text, where the reader can no longer follow it. */
2234
+ @layer brignano.components {
2235
+ @media print {
2236
+ .site-header { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
2237
+ .skip-link, .site-menu-button, .toast-region, .tooltip, .popover, .sheet, .msg-close, .dialog-close,
2238
+ .code-block-copy, .tag-remove, .pagination, .load-more { display: none; }
2239
+ .card, .stat, .msg, .code-block, .table-wrap, .dialog { box-shadow: none; }
2240
+ .card, .stat, .msg, .figure, .blockquote, .kv > div, .table tr { break-inside: avoid; }
2241
+ .table-wrap { overflow: visible; }
2242
+ .code-block pre, .prose pre { white-space: pre-wrap; overflow: visible; }
2243
+ .prose :where(h2, h3, h4) { break-after: avoid; }
2244
+ .prose a[href^='http']::after {
2245
+ content: ' (' attr(href) ')';
2246
+ font-size: var(--text-sm);
2247
+ color: var(--ink-soft);
2248
+ overflow-wrap: anywhere;
2249
+ }
2250
+ }
2251
+ }