@cameronsjo/artificer 0.12.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.
- package/LICENSE +202 -0
- package/README.md +260 -0
- package/package.json +46 -0
- package/src/artificer-editorial.css +136 -0
- package/src/artificer-focus.js +47 -0
- package/src/artificer-icons.js +163 -0
- package/src/artificer-tabs.js +169 -0
- package/src/artificer-theme.js +63 -0
- package/src/artificer-whimsy.css +317 -0
- package/src/artificer-whimsy.js +184 -0
- package/src/artificer.css +1478 -0
- package/src/assets/favicon.svg +9 -0
- package/src/assets/fonts/ia-writer-quattro-400-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-400.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-700-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-700.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-400-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-400.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-700-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-700.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-v-400-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-v-400.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-400.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-500.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-700.woff2 +0 -0
- package/src/assets/og-image.png +0 -0
- package/src/assets/og-image.svg +54 -0
- package/src/print.css +167 -0
- package/src/theme-bootstrap.html +23 -0
- package/src/tokens.json +169 -0
|
@@ -0,0 +1,1478 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
ARTIFICER · Design tokens · v0.12.0 (apothecary × deco × speakeasy)
|
|
3
|
+
AuDHD-optimized, Ghostty-rooted, with warm Jazz-Age accents.
|
|
4
|
+
Default theme = dark. Add data-theme="light" on <html> for ivory paper mode.
|
|
5
|
+
|
|
6
|
+
v0.6 palette — locked Nov 2024:
|
|
7
|
+
• indigo ink #20203e replaces navy #0d1b2a (cooler, richer)
|
|
8
|
+
• apothecary green #4a8a5e is the one success color (was olive #b7bd73)
|
|
9
|
+
• brick #a04540 is destructive (was vermillion #c4392a / #e8836f)
|
|
10
|
+
• copper #b87333 retired from status duty — available decoratively
|
|
11
|
+
• gold #dbbb6f (was #e0b558) — slightly warmer
|
|
12
|
+
• rose #c4808a promoted to warning (was #e5afb7)
|
|
13
|
+
• deep purple #331567 + lifted purple #5a3a9a (replaces lilac #c9b5e8)
|
|
14
|
+
• steel #b8cad4 (slightly brighter than #9fb6c4)
|
|
15
|
+
• light: ivory paper #f5ead0 floor, champagne #eddcc0 raised
|
|
16
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
17
|
+
|
|
18
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
19
|
+
CONTENTS · the map (#78 — primitive roles shouldn't need a grep)
|
|
20
|
+
Source order. Jump by searching the section banner, e.g. "═══ Buttons" or
|
|
21
|
+
"NAVIGATION —". Per-primitive role taxonomies live inline in each banner.
|
|
22
|
+
|
|
23
|
+
SETUP Self-hosted fonts · :root design tokens · light mode (@media) ·
|
|
24
|
+
reduced-motion (@media)
|
|
25
|
+
FOUNDATION Base · Type utilities
|
|
26
|
+
COMPONENTS Buttons · Cards · Inputs · Badges · Kbd · Dividers · Focus-pane ·
|
|
27
|
+
Selection · Scrollbar · Theme toggle
|
|
28
|
+
LAYOUT Layout primitives · Overlays (modal & popover) · Form controls
|
|
29
|
+
(extended) · Data display · States (empty · skeleton · progress) ·
|
|
30
|
+
Accessibility utilities
|
|
31
|
+
COMPOSITION density modes · table extensions · dashboard layouts ·
|
|
32
|
+
live-update atoms
|
|
33
|
+
CHARTS tokens + primitives
|
|
34
|
+
DIAGRAMS primitives for hand-drawn SVG
|
|
35
|
+
NAVIGATION the spine — .crumb (where am I) · .sidenav (what sections) ·
|
|
36
|
+
.appbar (global chrome) · .tabs (switch view within a surface)
|
|
37
|
+
BRAND wordmark (lowercase "artificer." + burnished stop)
|
|
38
|
+
RESPONSIVE breakpoints · touch escalation · safe-area · table reflow
|
|
39
|
+
PRIMITIVES v0.10.0 — avatar · accordion · selectable rows · date/time
|
|
40
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
41
|
+
|
|
42
|
+
/* ─── Self-hosted fonts ──────────────────────────────────────────────────
|
|
43
|
+
JetBrains Mono — code, identifiers, numerals, dense tool body
|
|
44
|
+
iA Writer Quattro — humanist sans, document body & UI labels
|
|
45
|
+
Both SIL OFL 1.1. Files live in src/assets/fonts/.
|
|
46
|
+
See FONTS.md for the rationale and how to ship Quattro S/V if desired. */
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: 'JetBrains Mono';
|
|
49
|
+
src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2');
|
|
50
|
+
font-weight: 400; font-style: normal; font-display: swap;
|
|
51
|
+
}
|
|
52
|
+
@font-face {
|
|
53
|
+
font-family: 'JetBrains Mono';
|
|
54
|
+
src: url('assets/fonts/jetbrains-mono-500.woff2') format('woff2');
|
|
55
|
+
font-weight: 500; font-style: normal; font-display: swap;
|
|
56
|
+
}
|
|
57
|
+
@font-face {
|
|
58
|
+
font-family: 'JetBrains Mono';
|
|
59
|
+
src: url('assets/fonts/jetbrains-mono-700.woff2') format('woff2');
|
|
60
|
+
font-weight: 700; font-style: normal; font-display: swap;
|
|
61
|
+
}
|
|
62
|
+
@font-face {
|
|
63
|
+
font-family: 'iA Writer Quattro';
|
|
64
|
+
src: url('assets/fonts/ia-writer-quattro-400.woff2') format('woff2');
|
|
65
|
+
font-weight: 400; font-style: normal; font-display: swap;
|
|
66
|
+
}
|
|
67
|
+
@font-face {
|
|
68
|
+
font-family: 'iA Writer Quattro';
|
|
69
|
+
src: url('assets/fonts/ia-writer-quattro-400-italic.woff2') format('woff2');
|
|
70
|
+
font-weight: 400; font-style: italic; font-display: swap;
|
|
71
|
+
}
|
|
72
|
+
@font-face {
|
|
73
|
+
font-family: 'iA Writer Quattro';
|
|
74
|
+
src: url('assets/fonts/ia-writer-quattro-700.woff2') format('woff2');
|
|
75
|
+
font-weight: 700; font-style: normal; font-display: swap;
|
|
76
|
+
}
|
|
77
|
+
@font-face {
|
|
78
|
+
font-family: 'iA Writer Quattro';
|
|
79
|
+
src: url('assets/fonts/ia-writer-quattro-700-italic.woff2') format('woff2');
|
|
80
|
+
font-weight: 700; font-style: italic; font-display: swap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* iA Writer Quattro S — tabular-numeral variant, preferred on tool surfaces
|
|
84
|
+
for stacked numeric data. Same metrics as Quattro, so the fallback chain
|
|
85
|
+
doesn't reflow when this variant is missing. */
|
|
86
|
+
@font-face {
|
|
87
|
+
font-family: 'iA Writer Quattro S';
|
|
88
|
+
src: url('assets/fonts/ia-writer-quattro-s-400.woff2') format('woff2');
|
|
89
|
+
font-weight: 400; font-style: normal; font-display: swap;
|
|
90
|
+
}
|
|
91
|
+
@font-face {
|
|
92
|
+
font-family: 'iA Writer Quattro S';
|
|
93
|
+
src: url('assets/fonts/ia-writer-quattro-s-400-italic.woff2') format('woff2');
|
|
94
|
+
font-weight: 400; font-style: italic; font-display: swap;
|
|
95
|
+
}
|
|
96
|
+
@font-face {
|
|
97
|
+
font-family: 'iA Writer Quattro S';
|
|
98
|
+
src: url('assets/fonts/ia-writer-quattro-s-700.woff2') format('woff2');
|
|
99
|
+
font-weight: 700; font-style: normal; font-display: swap;
|
|
100
|
+
}
|
|
101
|
+
@font-face {
|
|
102
|
+
font-family: 'iA Writer Quattro S';
|
|
103
|
+
src: url('assets/fonts/ia-writer-quattro-s-700-italic.woff2') format('woff2');
|
|
104
|
+
font-weight: 700; font-style: italic; font-display: swap;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* iA Writer Quattro V — display variant (slightly tighter, more contrast).
|
|
108
|
+
Only 400 weight ships from iA; use for hero/marquee type where Quattro
|
|
109
|
+
feels too even. */
|
|
110
|
+
@font-face {
|
|
111
|
+
font-family: 'iA Writer Quattro V';
|
|
112
|
+
src: url('assets/fonts/ia-writer-quattro-v-400.woff2') format('woff2');
|
|
113
|
+
font-weight: 400; font-style: normal; font-display: swap;
|
|
114
|
+
}
|
|
115
|
+
@font-face {
|
|
116
|
+
font-family: 'iA Writer Quattro V';
|
|
117
|
+
src: url('assets/fonts/ia-writer-quattro-v-400-italic.woff2') format('woff2');
|
|
118
|
+
font-weight: 400; font-style: italic; font-display: swap;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* ─── DARK (default) ──────────────────────────────────────────────────── */
|
|
122
|
+
:root {
|
|
123
|
+
/* Surfaces — Ghostty dark grey spine */
|
|
124
|
+
--bg: #292c33; /* base surface */
|
|
125
|
+
--bg-raised: #313540; /* cards, sidebar */
|
|
126
|
+
--bg-overlay: #3c4150; /* modals, command palette */
|
|
127
|
+
--bg-inactive: #1d1f21; /* unfocused panes */
|
|
128
|
+
|
|
129
|
+
/* Foreground — bone, not chrome. Softer than #fff but still AAA. */
|
|
130
|
+
--fg: #e8e6e1; /* warm off-white, 11.2:1 on --bg */
|
|
131
|
+
--fg-secondary: #c5c8c6;
|
|
132
|
+
--fg-disabled: #666666;
|
|
133
|
+
|
|
134
|
+
/* Structure */
|
|
135
|
+
--border: #4a4f5c;
|
|
136
|
+
--border-lifted: #5a606e; /* lifted border — diagram rails, perceptible on canvas */
|
|
137
|
+
|
|
138
|
+
/* ── Jazz Age accents, contrast-tuned for dark bg ──────────────────── */
|
|
139
|
+
--accent: #dbbb6f; /* burnished gold — interactive */
|
|
140
|
+
--accent-bright: #e3c885; /* hover/focus, slightly lifted */
|
|
141
|
+
--accent-fill: #c4932a; /* deep gold, fill-only (buttons, badges, selection) */
|
|
142
|
+
--attention: #c4808a; /* dusty rose — "look when you can" */
|
|
143
|
+
--attention-fill: #c4808a; /* rose, fill-only */
|
|
144
|
+
--urgent: #a04540; /* brick — destructive, errors */
|
|
145
|
+
--urgent-fill: #a04540; /* brick fill, buttons */
|
|
146
|
+
--success: #4a8a5e; /* apothecary green — completed, merged, autoAccept */
|
|
147
|
+
--success-fill: #2d6644; /* deep apothecary fill — badges/dots, ivory-on 5.67 AA */
|
|
148
|
+
--steel: #b8cad4; /* honest middle; meta / secondary UI */
|
|
149
|
+
--steel-fill: #5a7a8a;
|
|
150
|
+
|
|
151
|
+
/* Brand — personal signature (gold + purple = Cameron). Not semantic.
|
|
152
|
+
bare = deep, NOT a foreground role (chart series-3, whimsy gradient stop).
|
|
153
|
+
-bright = foreground (syntax keyword). -fill = surface. */
|
|
154
|
+
--brand-purple: #5a3a9a; /* deep — chart series-3, whimsy gradient stop */
|
|
155
|
+
--brand-purple-bright: #b095e0; /* lifted — syntax keyword foreground · 5.47:1 AA · v0.10.1 */
|
|
156
|
+
--brand-purple-fill: #331567; /* deep — surface / button fill */
|
|
157
|
+
|
|
158
|
+
/* Diff backgrounds — derived tints of success/urgent. Same hue, low L, kept C. */
|
|
159
|
+
--diff-add-bg: #1f3a28; /* derived from --success #4a8a5e */
|
|
160
|
+
--diff-del-bg: #3a1f1d; /* derived from --urgent #a04540 */
|
|
161
|
+
|
|
162
|
+
/* Ivory / ink anchors — only used for on-color text */
|
|
163
|
+
--ivory: #f5ead0;
|
|
164
|
+
--ivory-raised: #eddcc0; /* champagne — only meaningful in light mode */
|
|
165
|
+
--ink: #20203e; /* midnight indigo — was --navy */
|
|
166
|
+
--navy: #20203e; /* alias for back-compat */
|
|
167
|
+
|
|
168
|
+
/* On-color text — chosen for AAA where possible, strong AA otherwise */
|
|
169
|
+
--on-accent: #20203e; /* indigo on gold */
|
|
170
|
+
--on-attention: #20203e; /* indigo on rose */
|
|
171
|
+
--on-urgent: #f5ead0; /* ivory on brick */
|
|
172
|
+
--on-success: #f5ead0; /* ivory on apothecary green */
|
|
173
|
+
|
|
174
|
+
/* Type, radii, spacing, motion — identical across themes */
|
|
175
|
+
--font-mono: 'JetBrains Mono', 'Berkeley Mono', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
176
|
+
/* iA Writer Quattro — humanist sans designed alongside Quattro S/V.
|
|
177
|
+
If you self-install Quattro S (tabular nums) or V (display), they take
|
|
178
|
+
precedence here automatically. Falls back to serif → system-ui. */
|
|
179
|
+
--font-sans: 'iA Writer Quattro S', 'iA Writer Quattro V', 'iA Writer Quattro',
|
|
180
|
+
'Iowan Old Style', 'Charter', 'Source Sans 3',
|
|
181
|
+
system-ui, -apple-system, sans-serif;
|
|
182
|
+
|
|
183
|
+
/* Type sizes are REM (root = browser default, never overridden) so text
|
|
184
|
+
honors the user's browser font-size preference, not just zoom. 1rem = 16px
|
|
185
|
+
at default. Spacing/radii/component-internal px stay px on purpose. */
|
|
186
|
+
--t-headline-lg-size: 1.75rem; --t-headline-lg-lh: 1.3; --t-headline-lg-ls: -0.01em; /* 28px */
|
|
187
|
+
--t-headline-md-size: 1.375rem; --t-headline-md-lh: 1.35; /* 22px */
|
|
188
|
+
--t-body-lg-size: 1rem; --t-body-lg-lh: 1.65; /* 16px */
|
|
189
|
+
--t-body-md-size: 0.875rem; --t-body-md-lh: 1.6; /* 14px */
|
|
190
|
+
--t-label-md-size: 0.8125rem; --t-label-md-lh: 1.3; /* 13px */
|
|
191
|
+
--t-label-sm-size: 0.75rem; --t-label-sm-lh: 1.3; /* 12px */
|
|
192
|
+
--t-label-xs-size: 0.6875rem; --t-label-xs-lh: 1.3; /* 11px — micro-chrome (v0.9.0 tier; restored v0.10.1) */
|
|
193
|
+
--t-code-size: 0.875rem; --t-code-lh: 1.5; /* 14px */
|
|
194
|
+
|
|
195
|
+
--letter-spacing-body: 0.01em;
|
|
196
|
+
--word-spacing-body: 0.16em;
|
|
197
|
+
|
|
198
|
+
--radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px;
|
|
199
|
+
|
|
200
|
+
--s-xs: 4px; --s-sm: 8px; --s-md: 16px; --s-lg: 24px; --s-xl: 32px; --s-2xl: 48px; --s-3xl: 96px;
|
|
201
|
+
|
|
202
|
+
--dur-instant: 80ms; --dur-fast: 160ms; --dur-max: 300ms;
|
|
203
|
+
--ease: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
204
|
+
--ease-linear: linear; /* continuous translation only (motion pattern #02) */
|
|
205
|
+
|
|
206
|
+
/* Focus ring — tokenized so themes/consumers retune; a11y floor: never 0. */
|
|
207
|
+
--focus-width: 2px;
|
|
208
|
+
--focus-offset: 2px; /* default — drawn outside the box */
|
|
209
|
+
--focus-offset-loose: 4px; /* sliders / thumbs that need air */
|
|
210
|
+
--focus-offset-inset: -2px; /* rings drawn inside (nav items, table rows) */
|
|
211
|
+
|
|
212
|
+
--shadow-overlay: 0 4px 12px rgba(0, 0, 0, 0.35);
|
|
213
|
+
--shadow-popover: 0 2px 8px rgba(0, 0, 0, 0.30);
|
|
214
|
+
|
|
215
|
+
/* z-index scale — six rungs, no improvising */
|
|
216
|
+
--z-base: 1; /* in-flow */
|
|
217
|
+
--z-raised: 10; /* sticky elements, dropdown triggers */
|
|
218
|
+
--z-overlay: 100; /* sidebars, theme toggle */
|
|
219
|
+
--z-popover: 1000; /* tooltips, popovers, dropdowns */
|
|
220
|
+
--z-modal: 2000; /* dialogs, scrim + content */
|
|
221
|
+
--z-toast: 3000; /* always-on-top notifications */
|
|
222
|
+
|
|
223
|
+
/* Artificer v0.10.1 — baseline contract: see CLAUDE.md § Baseline contract */
|
|
224
|
+
--art-version: "0.12.0";
|
|
225
|
+
|
|
226
|
+
color-scheme: dark;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* ─── LIGHT — ivory paper floor, champagne raised, indigo ink ────────── */
|
|
230
|
+
:root[data-theme="light"] {
|
|
231
|
+
--bg: #f5ead0; /* ivory paper · the floor */
|
|
232
|
+
--bg-raised: #eddcc0; /* champagne · the lifted card */
|
|
233
|
+
--bg-overlay: #e4d4b0; /* modal, palette */
|
|
234
|
+
--bg-inactive: #dcc99c; /* dimmed panes */
|
|
235
|
+
|
|
236
|
+
--fg: #20203e; /* midnight indigo */
|
|
237
|
+
--fg-secondary: #4a3f2a; /* warm muted */
|
|
238
|
+
--fg-disabled: #8a8070;
|
|
239
|
+
|
|
240
|
+
--border: #cbb88a;
|
|
241
|
+
--border-lifted: #b8a674; /* lifted border — diagram rails */
|
|
242
|
+
|
|
243
|
+
--accent: #7a5a10; /* deep gold, AA 5.33 on ivory */
|
|
244
|
+
--accent-bright: #866010; /* slightly lighter */
|
|
245
|
+
--accent-fill: #c4932a; /* standard gold for button fills */
|
|
246
|
+
--attention: #8a6618; /* dark gold doubles as attention in light */
|
|
247
|
+
--attention-fill: #dbbb6f;
|
|
248
|
+
--urgent: #8a2418; /* deep brick, AAA on ivory */
|
|
249
|
+
--urgent-fill: #a04540; /* brick fill */
|
|
250
|
+
--success: #2a5a3a; /* deep apothecary green */
|
|
251
|
+
--success-fill: #2a5a3a; /* fill == bare success in light; ivory-on 6.70 AA */
|
|
252
|
+
--steel: #2e4a5a;
|
|
253
|
+
--steel-fill: #5a7a8a;
|
|
254
|
+
|
|
255
|
+
--brand-purple: #4a25a0; /* deep — chart series-3, whimsy gradient stop · 8.51:1 on ivory */
|
|
256
|
+
--brand-purple-bright: #5a35b0; /* lifted — syntax keyword foreground · 6.83:1 on ivory · v0.10.1 */
|
|
257
|
+
--brand-purple-fill: #331567; /* deep purple, fill */
|
|
258
|
+
|
|
259
|
+
--diff-add-bg: #d8e4cc; /* derived light tint of apothecary green */
|
|
260
|
+
--diff-del-bg: #ecd6d4; /* derived light tint of brick */
|
|
261
|
+
|
|
262
|
+
--ivory: #f5ead0;
|
|
263
|
+
--ivory-raised: #eddcc0;
|
|
264
|
+
--ink: #20203e;
|
|
265
|
+
--navy: #20203e; /* alias */
|
|
266
|
+
|
|
267
|
+
--on-accent: #f5ead0; /* ivory on gold-fill button */
|
|
268
|
+
--on-attention: #20203e;
|
|
269
|
+
--on-urgent: #f5ead0;
|
|
270
|
+
--on-success: #f5ead0;
|
|
271
|
+
|
|
272
|
+
--shadow-overlay: 0 4px 12px rgba(32, 32, 62, 0.18);
|
|
273
|
+
--shadow-popover: 0 2px 8px rgba(32, 32, 62, 0.14);
|
|
274
|
+
|
|
275
|
+
color-scheme: light;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* Honor OS preference when no explicit theme set */
|
|
279
|
+
@media (prefers-color-scheme: light) {
|
|
280
|
+
:root:not([data-theme]) {
|
|
281
|
+
--bg: #f5ead0;
|
|
282
|
+
--bg-raised: #eddcc0;
|
|
283
|
+
--bg-overlay: #e4d4b0;
|
|
284
|
+
--bg-inactive: #dcc99c;
|
|
285
|
+
--fg: #20203e;
|
|
286
|
+
--fg-secondary: #4a3f2a;
|
|
287
|
+
--fg-disabled: #8a8070;
|
|
288
|
+
--border: #cbb88a;
|
|
289
|
+
--border-lifted: #b8a674;
|
|
290
|
+
--accent: #7a5a10;
|
|
291
|
+
--accent-bright: #866010;
|
|
292
|
+
--accent-fill: #c4932a;
|
|
293
|
+
--attention: #8a6618;
|
|
294
|
+
--attention-fill: #dbbb6f;
|
|
295
|
+
--urgent: #8a2418;
|
|
296
|
+
--urgent-fill: #a04540;
|
|
297
|
+
--success: #2a5a3a;
|
|
298
|
+
--success-fill: #2a5a3a;
|
|
299
|
+
--steel: #2e4a5a;
|
|
300
|
+
--steel-fill: #5a7a8a;
|
|
301
|
+
--brand-purple: #4a25a0;
|
|
302
|
+
--brand-purple-bright: #5a35b0; /* v0.10.1 — syntax keyword foreground · 6.83:1 */
|
|
303
|
+
--brand-purple-fill: #331567;
|
|
304
|
+
--diff-add-bg: #d8e4cc;
|
|
305
|
+
--diff-del-bg: #ecd6d4;
|
|
306
|
+
--ivory-raised: #eddcc0;
|
|
307
|
+
--ink: #20203e;
|
|
308
|
+
--on-accent: #f5ead0;
|
|
309
|
+
--on-attention: #20203e;
|
|
310
|
+
--on-urgent: #f5ead0;
|
|
311
|
+
--on-success: #f5ead0;
|
|
312
|
+
--shadow-overlay: 0 4px 12px rgba(32, 32, 62, 0.18);
|
|
313
|
+
--shadow-popover: 0 2px 8px rgba(32, 32, 62, 0.14);
|
|
314
|
+
color-scheme: light;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@media (prefers-reduced-motion: reduce) {
|
|
319
|
+
:root { --dur-instant: 0ms; --dur-fast: 0ms; --dur-max: 0ms; }
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* ═══ Base ══════════════════════════════════════════════════════════════ */
|
|
323
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
324
|
+
|
|
325
|
+
html, body {
|
|
326
|
+
background: var(--bg);
|
|
327
|
+
color: var(--fg);
|
|
328
|
+
font-family: var(--font-sans);
|
|
329
|
+
font-size: var(--t-body-md-size);
|
|
330
|
+
line-height: var(--t-body-md-lh);
|
|
331
|
+
letter-spacing: var(--letter-spacing-body);
|
|
332
|
+
margin: 0; padding: 0;
|
|
333
|
+
-webkit-font-smoothing: antialiased;
|
|
334
|
+
text-rendering: optimizeLegibility;
|
|
335
|
+
transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Tool-surface override: dashboards, terminals, data tables, settings.
|
|
339
|
+
Apply <body class="surface-tool"> (or to a top-level container) to flip the
|
|
340
|
+
body face to mono. Documents inherit the sans default. */
|
|
341
|
+
.surface-tool, .surface-tool * { font-family: var(--font-mono); }
|
|
342
|
+
.surface-tool .btn,
|
|
343
|
+
.surface-tool .field > label, .surface-tool .field > .hint, .surface-tool .field > .error,
|
|
344
|
+
.surface-tool .badge, .surface-tool .table th, .surface-tool .checkbox, .surface-tool .radio,
|
|
345
|
+
.surface-tool .toggle, .surface-tool .theme-toggle, .surface-tool .tooltip {
|
|
346
|
+
/* labels/hints/microcopy on tool surfaces stay sans, per the rule */
|
|
347
|
+
font-family: var(--font-sans);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* ═══ Type utilities ════════════════════════════════════════════════════
|
|
351
|
+
Headlines and body run on --font-sans (Quattro) by default — document mode.
|
|
352
|
+
On tool surfaces, wrap the surface in <… class="surface-tool"> to flip to mono.
|
|
353
|
+
.t-mono-* are explicit mono utilities for code blocks and identifier displays. */
|
|
354
|
+
.t-headline-lg { font-family: var(--font-sans); font-weight: 700; font-size: var(--t-headline-lg-size); line-height: var(--t-headline-lg-lh); letter-spacing: var(--t-headline-lg-ls); color: var(--fg); }
|
|
355
|
+
.t-headline-md { font-family: var(--font-sans); font-weight: 700; font-size: var(--t-headline-md-size); line-height: var(--t-headline-md-lh); color: var(--fg); }
|
|
356
|
+
.t-body-lg { font-family: var(--font-sans); font-weight: 400; font-size: var(--t-body-lg-size); line-height: var(--t-body-lg-lh); }
|
|
357
|
+
.t-body-md { font-family: var(--font-sans); font-weight: 400; font-size: var(--t-body-md-size); line-height: var(--t-body-md-lh); }
|
|
358
|
+
.t-label-md { font-family: var(--font-sans); font-weight: 500; font-size: var(--t-label-md-size); line-height: var(--t-label-md-lh); }
|
|
359
|
+
.t-label-sm { font-family: var(--font-sans); font-weight: 400; font-size: var(--t-label-sm-size); line-height: var(--t-label-sm-lh); }
|
|
360
|
+
.t-label-xs { font-family: var(--font-sans); font-weight: 500; font-size: var(--t-label-xs-size); line-height: var(--t-label-xs-lh); } /* micro-chrome: keycaps, timestamps, dense table meta. Never body. */
|
|
361
|
+
.t-code { font-family: var(--font-mono); font-weight: 400; font-size: var(--t-code-size); line-height: var(--t-code-lh); color: var(--accent); }
|
|
362
|
+
.t-mono-headline-lg { font-family: var(--font-mono); font-weight: 700; font-size: var(--t-headline-lg-size); line-height: var(--t-headline-lg-lh); letter-spacing: var(--t-headline-lg-ls); color: var(--fg); }
|
|
363
|
+
.t-mono-body-md { font-family: var(--font-mono); font-weight: 400; font-size: var(--t-body-md-size); line-height: var(--t-body-md-lh); }
|
|
364
|
+
|
|
365
|
+
.anchor { font-weight: 700; color: var(--fg); }
|
|
366
|
+
.meta { color: var(--fg-secondary); }
|
|
367
|
+
|
|
368
|
+
code, .code {
|
|
369
|
+
font-family: var(--font-mono);
|
|
370
|
+
font-size: 0.95em;
|
|
371
|
+
color: var(--accent);
|
|
372
|
+
background: transparent;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
a {
|
|
376
|
+
color: var(--accent);
|
|
377
|
+
text-decoration: none;
|
|
378
|
+
transition: color var(--dur-fast) var(--ease);
|
|
379
|
+
}
|
|
380
|
+
a:hover, a:focus-visible { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 2px; }
|
|
381
|
+
a:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); border-radius: 2px; }
|
|
382
|
+
|
|
383
|
+
/* ═══ Buttons ═══════════════════════════════════════════════════════════ */
|
|
384
|
+
.btn {
|
|
385
|
+
display: inline-flex; align-items: center; justify-content: center; gap: var(--s-sm);
|
|
386
|
+
font-family: var(--font-sans); font-size: var(--t-label-md-size); font-weight: 500; line-height: 1;
|
|
387
|
+
padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
|
|
388
|
+
cursor: pointer; white-space: nowrap;
|
|
389
|
+
transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
|
|
390
|
+
}
|
|
391
|
+
.btn:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
|
|
392
|
+
|
|
393
|
+
.btn--primary { background: var(--accent-fill); color: var(--on-accent); }
|
|
394
|
+
.btn--primary:hover { background: var(--accent-bright); }
|
|
395
|
+
|
|
396
|
+
.btn--secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
|
|
397
|
+
.btn--secondary:hover { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent-bright); border-color: var(--accent-bright); }
|
|
398
|
+
|
|
399
|
+
.btn--ghost { background: transparent; color: var(--fg-secondary); }
|
|
400
|
+
.btn--ghost:hover { background: var(--bg-raised); color: var(--fg); }
|
|
401
|
+
|
|
402
|
+
/* Icon-only button — square, meets the 44px nav touch floor (a11y #8).
|
|
403
|
+
Compose with any variant (.btn.btn--icon.btn--ghost). Always needs an
|
|
404
|
+
aria-label, since there's no text. v0.10.0. */
|
|
405
|
+
.btn--icon { width: 44px; height: 44px; min-width: 44px; padding: 0; }
|
|
406
|
+
|
|
407
|
+
.btn--destructive { background: var(--urgent-fill); color: var(--on-urgent); }
|
|
408
|
+
.btn--destructive:hover { filter: brightness(1.08); }
|
|
409
|
+
|
|
410
|
+
/* Size axis — orthogonal to role. Compose freely: .btn--secondary.btn--sm.
|
|
411
|
+
.btn--sm is for dense/overlay/mouse contexts (toolbar, card corner, inline).
|
|
412
|
+
The @media (pointer: coarse) touch escalation (below) still applies — on a
|
|
413
|
+
finger, .btn--sm gets the same min-height: 44px floor as the base size. */
|
|
414
|
+
.btn--sm { padding: 6px 12px; /* tuned */ font-size: var(--t-label-sm-size); }
|
|
415
|
+
.btn--lg { padding: 14px 28px; /* tuned */ font-size: var(--t-body-md-size); }
|
|
416
|
+
|
|
417
|
+
.btn[disabled], .btn--disabled {
|
|
418
|
+
background: var(--bg-raised); color: var(--fg-disabled); border-color: transparent; cursor: not-allowed;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/* ═══ Cards ═════════════════════════════════════════════════════════════ */
|
|
422
|
+
.card {
|
|
423
|
+
background: var(--bg-raised); color: var(--fg);
|
|
424
|
+
border-radius: var(--radius-md); padding: var(--s-lg);
|
|
425
|
+
border: 1px solid transparent;
|
|
426
|
+
}
|
|
427
|
+
.card--active { background: var(--bg); border-left: 2px solid var(--accent); }
|
|
428
|
+
.card--attention { background: var(--bg); border-left: 2px solid var(--attention); }
|
|
429
|
+
.card--urgent { background: var(--bg); border-left: 2px solid var(--urgent); }
|
|
430
|
+
.card--success { background: var(--bg); border-left: 2px solid var(--success); }
|
|
431
|
+
|
|
432
|
+
/* ═══ Inputs ════════════════════════════════════════════════════════════ */
|
|
433
|
+
.input, .textarea, .select {
|
|
434
|
+
background: var(--bg); color: var(--fg);
|
|
435
|
+
font-family: var(--font-mono); font-size: var(--t-body-md-size); line-height: 1.4;
|
|
436
|
+
padding: 10px 14px;
|
|
437
|
+
border: 1px solid var(--border); border-radius: var(--radius-sm); width: 100%;
|
|
438
|
+
transition: border-color var(--dur-fast) var(--ease);
|
|
439
|
+
}
|
|
440
|
+
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); }
|
|
441
|
+
.input::placeholder { color: var(--fg-disabled); }
|
|
442
|
+
.input[aria-invalid="true"] { border-color: var(--urgent); }
|
|
443
|
+
|
|
444
|
+
.field { display: flex; flex-direction: column; gap: var(--s-sm); }
|
|
445
|
+
.field > label { font-family: var(--font-sans); font-size: var(--t-label-md-size); font-weight: 500; color: var(--fg); }
|
|
446
|
+
.field > .hint { font-family: var(--font-sans); font-size: var(--t-label-sm-size); color: var(--fg-secondary); }
|
|
447
|
+
.field > .error { font-family: var(--font-sans); font-size: var(--t-label-sm-size); color: var(--urgent); }
|
|
448
|
+
|
|
449
|
+
/* ═══ Badges ════════════════════════════════════════════════════════════ */
|
|
450
|
+
.badge {
|
|
451
|
+
display: inline-flex; align-items: center; gap: var(--s-xs);
|
|
452
|
+
padding: 2px 8px;
|
|
453
|
+
font-family: var(--font-sans); font-size: var(--t-label-sm-size); font-weight: 500; line-height: 1.3;
|
|
454
|
+
border-radius: var(--radius-sm); white-space: nowrap;
|
|
455
|
+
}
|
|
456
|
+
.badge--accent { background: var(--accent-fill); color: var(--on-accent); }
|
|
457
|
+
.badge--attention { background: var(--attention-fill); color: var(--on-attention); }
|
|
458
|
+
.badge--urgent { background: var(--urgent-fill); color: var(--on-urgent); }
|
|
459
|
+
.badge--success { background: var(--success-fill); color: var(--on-success); }
|
|
460
|
+
.badge--ghost { background: transparent; color: var(--fg-secondary); border: 1px solid var(--border); }
|
|
461
|
+
|
|
462
|
+
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
|
463
|
+
.dot--accent { background: var(--accent-fill); }
|
|
464
|
+
.dot--attention { background: var(--attention-fill); }
|
|
465
|
+
.dot--urgent { background: var(--urgent-fill); }
|
|
466
|
+
.dot--success { background: var(--success-fill); }
|
|
467
|
+
|
|
468
|
+
/* ═══ Kbd ══════════════════════════════════════════════════════════════ */
|
|
469
|
+
kbd, .kbd {
|
|
470
|
+
font-family: var(--font-mono); font-size: 11px; font-weight: 500;
|
|
471
|
+
padding: 2px 6px; background: var(--bg); color: var(--fg-secondary);
|
|
472
|
+
border: 1px solid var(--border); border-radius: 3px; line-height: 1.2; white-space: nowrap;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* ═══ Dividers ══════════════════════════════════════════════════════════ */
|
|
476
|
+
hr, .divider { border: none; border-top: 1px solid var(--border); margin: var(--s-lg) 0; }
|
|
477
|
+
|
|
478
|
+
/* ═══ Focus-pane ════════════════════════════════════════════════════════ */
|
|
479
|
+
.pane--inactive {
|
|
480
|
+
opacity: 0.55; background: var(--bg-inactive); filter: saturate(0.6);
|
|
481
|
+
transition: opacity var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
|
|
482
|
+
}
|
|
483
|
+
.pane--active { border-left: 2px solid var(--accent); }
|
|
484
|
+
|
|
485
|
+
/* ═══ Selection ═════════════════════════════════════════════════════════ */
|
|
486
|
+
::selection { background: var(--accent-fill); color: var(--on-accent); }
|
|
487
|
+
|
|
488
|
+
/* ═══ Scrollbar ═════════════════════════════════════════════════════════ */
|
|
489
|
+
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
|
|
490
|
+
*::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
491
|
+
*::-webkit-scrollbar-track { background: transparent; }
|
|
492
|
+
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
|
|
493
|
+
*::-webkit-scrollbar-thumb:hover { background: var(--fg-disabled); background-clip: padding-box; border: 2px solid transparent; }
|
|
494
|
+
|
|
495
|
+
/* ═══ Theme toggle — shared across pages ═══════════════════════════════ */
|
|
496
|
+
.theme-toggle {
|
|
497
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
498
|
+
background: var(--bg-raised); color: var(--fg-secondary);
|
|
499
|
+
border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
500
|
+
padding: 6px 10px; cursor: pointer;
|
|
501
|
+
font-family: var(--font-sans); font-size: 11px; font-weight: 500;
|
|
502
|
+
letter-spacing: 0.08em; text-transform: uppercase;
|
|
503
|
+
transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
|
|
504
|
+
}
|
|
505
|
+
.theme-toggle:hover { color: var(--fg); border-color: var(--accent); }
|
|
506
|
+
.theme-toggle .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-fill); }
|
|
507
|
+
|
|
508
|
+
/* ═══ Layout primitives ════════════════════════════════════════════════ */
|
|
509
|
+
/* Stack: vertical rhythm. --gap defaults to --s-md. */
|
|
510
|
+
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--s-md)); }
|
|
511
|
+
.stack--xs { --gap: var(--s-xs); }
|
|
512
|
+
.stack--sm { --gap: var(--s-sm); }
|
|
513
|
+
.stack--md { --gap: var(--s-md); }
|
|
514
|
+
.stack--lg { --gap: var(--s-lg); }
|
|
515
|
+
.stack--xl { --gap: var(--s-xl); }
|
|
516
|
+
.stack--2xl { --gap: var(--s-2xl); }
|
|
517
|
+
|
|
518
|
+
/* Cluster: horizontal flow that wraps. */
|
|
519
|
+
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, var(--s-md)); align-items: center; }
|
|
520
|
+
.cluster--sm { --gap: var(--s-sm); }
|
|
521
|
+
.cluster--lg { --gap: var(--s-lg); }
|
|
522
|
+
.cluster--between { justify-content: space-between; }
|
|
523
|
+
.cluster--end { justify-content: flex-end; }
|
|
524
|
+
|
|
525
|
+
/* Auto-grid: equal columns, --min controls breakpoint.
|
|
526
|
+
minmax(0,1fr) not bare 1fr: a bare 1fr is minmax(AUTO,1fr), whose min is the
|
|
527
|
+
cell's max-content — so one wide child (a <pre>, fixed SVG, wide table) refuses
|
|
528
|
+
to let the track shrink and overflows the page. minmax(0,…) lets it shrink and
|
|
529
|
+
the child scrolls/wraps within its cell. (#116 — the overflow-safe track.) */
|
|
530
|
+
.grid-auto { display: grid; gap: var(--gap, var(--s-md)); grid-template-columns: repeat(auto-fill, minmax(var(--min, 240px), 1fr)); }
|
|
531
|
+
.grid-2 { display: grid; gap: var(--gap, var(--s-md)); grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
532
|
+
.grid-3 { display: grid; gap: var(--gap, var(--s-md)); grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
533
|
+
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
|
|
534
|
+
|
|
535
|
+
/* Container: max-width wrapper, three sizes. */
|
|
536
|
+
.container { width: 100%; margin-inline: auto; padding-inline: var(--s-lg); }
|
|
537
|
+
.container--sm { max-width: 560px; }
|
|
538
|
+
.container--md { max-width: 820px; }
|
|
539
|
+
.container--lg { max-width: 1120px; }
|
|
540
|
+
|
|
541
|
+
/* Page shell: sticky masthead + scrolling main. */
|
|
542
|
+
.page-shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
|
|
543
|
+
.page-shell > header { position: sticky; top: 0; z-index: var(--z-overlay); background: var(--bg); border-bottom: 1px solid var(--border); }
|
|
544
|
+
|
|
545
|
+
/* ═══ Overlays · modal & popover ═══════════════════════════════════════ */
|
|
546
|
+
.scrim {
|
|
547
|
+
position: fixed; inset: 0; z-index: var(--z-modal);
|
|
548
|
+
background: rgba(0,0,0,.55);
|
|
549
|
+
display: flex; align-items: center; justify-content: center;
|
|
550
|
+
padding: var(--s-lg);
|
|
551
|
+
animation: scrim-in var(--dur-fast) var(--ease);
|
|
552
|
+
}
|
|
553
|
+
:root[data-theme="light"] .scrim { background: rgba(13,27,42,.4); }
|
|
554
|
+
/* Flush scrim — no gutter padding; the child owns its own insets.
|
|
555
|
+
Use for full-screen mobile sheets or media viewers that fill the viewport. */
|
|
556
|
+
.scrim--flush { padding: 0; }
|
|
557
|
+
@keyframes scrim-in { from { opacity: 0 } to { opacity: 1 } }
|
|
558
|
+
|
|
559
|
+
.modal {
|
|
560
|
+
background: var(--bg-overlay); color: var(--fg);
|
|
561
|
+
border-radius: var(--radius-lg); padding: var(--s-xl);
|
|
562
|
+
width: 100%; max-width: 480px;
|
|
563
|
+
box-shadow: var(--shadow-overlay);
|
|
564
|
+
border: 1px solid var(--border);
|
|
565
|
+
animation: modal-in var(--dur-fast) var(--ease);
|
|
566
|
+
}
|
|
567
|
+
.modal--lg { max-width: 720px; }
|
|
568
|
+
.modal--xl { max-width: min(96vw, 1100px); }
|
|
569
|
+
.modal--full { max-width: 100vw; border-radius: 0; }
|
|
570
|
+
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
|
|
571
|
+
.modal__title { font-family: var(--font-mono); font-weight: 700; font-size: var(--t-headline-md-size); line-height: var(--t-headline-md-lh); margin: 0 0 var(--s-sm); }
|
|
572
|
+
.modal__body { color: var(--fg-secondary); margin: 0 0 var(--s-lg); line-height: 1.6; }
|
|
573
|
+
.modal__footer { display: flex; gap: var(--s-sm); justify-content: flex-end; }
|
|
574
|
+
|
|
575
|
+
.popover {
|
|
576
|
+
background: var(--bg-overlay); color: var(--fg);
|
|
577
|
+
border-radius: var(--radius-md); padding: var(--s-md);
|
|
578
|
+
border: 1px solid var(--border);
|
|
579
|
+
box-shadow: var(--shadow-popover);
|
|
580
|
+
font-family: var(--font-sans); font-size: var(--t-label-sm-size); line-height: 1.5;
|
|
581
|
+
z-index: var(--z-popover);
|
|
582
|
+
max-width: 280px;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.tooltip {
|
|
586
|
+
position: absolute; z-index: var(--z-popover);
|
|
587
|
+
background: var(--fg); color: var(--bg);
|
|
588
|
+
padding: 4px 8px; border-radius: var(--radius-sm);
|
|
589
|
+
font-family: var(--font-sans); font-size: 11px; line-height: 1.3;
|
|
590
|
+
pointer-events: none; white-space: nowrap;
|
|
591
|
+
box-shadow: var(--shadow-popover);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/* ═══ Form controls — extended ═════════════════════════════════════════ */
|
|
595
|
+
/* Checkbox & radio — custom-rendered via accent-color so the focus ring
|
|
596
|
+
stays consistent with the rest of the system. */
|
|
597
|
+
.checkbox, .radio {
|
|
598
|
+
display: inline-flex; align-items: flex-start; gap: var(--s-sm);
|
|
599
|
+
font-family: var(--font-sans); font-size: var(--t-label-md-size); line-height: 1.4;
|
|
600
|
+
cursor: pointer; user-select: none;
|
|
601
|
+
}
|
|
602
|
+
.checkbox > input, .radio > input {
|
|
603
|
+
appearance: none; -webkit-appearance: none;
|
|
604
|
+
width: 16px; height: 16px; flex-shrink: 0; margin: 2px 0 0;
|
|
605
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
606
|
+
cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
|
|
607
|
+
}
|
|
608
|
+
.checkbox > input { border-radius: 3px; }
|
|
609
|
+
.radio > input { border-radius: 50%; }
|
|
610
|
+
.checkbox > input:checked, .radio > input:checked { background: var(--accent-fill); border-color: var(--accent-fill); }
|
|
611
|
+
.checkbox > input:checked::after {
|
|
612
|
+
content: ""; display: block; width: 4px; height: 8px; margin: 1px auto 0;
|
|
613
|
+
border: solid var(--on-accent); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg);
|
|
614
|
+
}
|
|
615
|
+
.radio > input:checked::after {
|
|
616
|
+
content: ""; display: block; width: 6px; height: 6px; border-radius: 50%;
|
|
617
|
+
background: var(--on-accent); margin: 4px auto 0;
|
|
618
|
+
}
|
|
619
|
+
.checkbox > input:focus-visible, .radio > input:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
|
|
620
|
+
.checkbox > input:disabled + *, .radio > input:disabled + * { color: var(--fg-disabled); cursor: not-allowed; }
|
|
621
|
+
|
|
622
|
+
/* Toggle / switch */
|
|
623
|
+
.toggle {
|
|
624
|
+
display: inline-flex; align-items: center; gap: var(--s-sm);
|
|
625
|
+
font-family: var(--font-sans); font-size: var(--t-label-md-size);
|
|
626
|
+
cursor: pointer; user-select: none;
|
|
627
|
+
}
|
|
628
|
+
.toggle > input {
|
|
629
|
+
appearance: none; -webkit-appearance: none;
|
|
630
|
+
width: 32px; height: 18px; border-radius: 999px;
|
|
631
|
+
background: var(--border); border: none; position: relative;
|
|
632
|
+
cursor: pointer; transition: background var(--dur-fast) var(--ease);
|
|
633
|
+
flex-shrink: 0;
|
|
634
|
+
}
|
|
635
|
+
.toggle > input::after {
|
|
636
|
+
content: ""; position: absolute; top: 2px; left: 2px;
|
|
637
|
+
width: 14px; height: 14px; border-radius: 50%;
|
|
638
|
+
background: var(--bg); transition: transform var(--dur-fast) var(--ease);
|
|
639
|
+
}
|
|
640
|
+
.toggle > input:checked { background: var(--accent-fill); }
|
|
641
|
+
.toggle > input:checked::after { transform: translateX(14px); background: var(--on-accent); }
|
|
642
|
+
.toggle > input:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
|
|
643
|
+
|
|
644
|
+
/* Search input — input + leading icon slot */
|
|
645
|
+
.search {
|
|
646
|
+
display: flex; align-items: center; gap: var(--s-sm);
|
|
647
|
+
background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
648
|
+
padding: 0 12px;
|
|
649
|
+
transition: border-color var(--dur-fast) var(--ease);
|
|
650
|
+
}
|
|
651
|
+
.search:focus-within { border-color: var(--accent); }
|
|
652
|
+
.search > input {
|
|
653
|
+
flex: 1; min-width: 0; background: transparent; border: none; outline: none;
|
|
654
|
+
font-family: var(--font-mono); font-size: var(--t-body-md-size);
|
|
655
|
+
padding: 10px 0; color: var(--fg);
|
|
656
|
+
}
|
|
657
|
+
.search > input::placeholder { color: var(--fg-disabled); }
|
|
658
|
+
.search > .icon { color: var(--fg-secondary); flex-shrink: 0; }
|
|
659
|
+
|
|
660
|
+
/* Slider */
|
|
661
|
+
.slider { width: 100%; appearance: none; -webkit-appearance: none; height: 4px; background: var(--border); border-radius: 2px; }
|
|
662
|
+
.slider::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-fill); cursor: pointer; transition: transform var(--dur-fast) var(--ease); }
|
|
663
|
+
.slider::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--accent-fill); cursor: pointer; }
|
|
664
|
+
.slider:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset-loose); border-radius: 2px; }
|
|
665
|
+
|
|
666
|
+
/* File field */
|
|
667
|
+
.file-field {
|
|
668
|
+
display: flex; align-items: center; gap: var(--s-sm);
|
|
669
|
+
border: 1px dashed var(--border); border-radius: var(--radius-sm);
|
|
670
|
+
padding: var(--s-md); background: var(--bg);
|
|
671
|
+
font-family: var(--font-sans); font-size: var(--t-label-md-size); color: var(--fg-secondary);
|
|
672
|
+
}
|
|
673
|
+
.file-field input[type="file"] { display: none; }
|
|
674
|
+
|
|
675
|
+
/* ═══ Data display ═════════════════════════════════════════════════════ */
|
|
676
|
+
.code-block {
|
|
677
|
+
font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
|
|
678
|
+
background: var(--bg-inactive); color: var(--fg);
|
|
679
|
+
padding: var(--s-md) var(--s-lg);
|
|
680
|
+
border-radius: var(--radius-md); border: 1px solid var(--border);
|
|
681
|
+
overflow-x: auto;
|
|
682
|
+
white-space: pre;
|
|
683
|
+
margin: 0;
|
|
684
|
+
}
|
|
685
|
+
.code-block .tok-comment { color: var(--fg-disabled); font-style: italic; }
|
|
686
|
+
.code-block .tok-keyword { color: var(--brand-purple-bright); }
|
|
687
|
+
.code-block .tok-string { color: var(--success); }
|
|
688
|
+
.code-block .tok-number { color: var(--attention); }
|
|
689
|
+
.code-block .tok-fn { color: var(--accent); }
|
|
690
|
+
|
|
691
|
+
.table {
|
|
692
|
+
width: 100%; border-collapse: collapse;
|
|
693
|
+
font-family: var(--font-mono); font-size: var(--t-body-md-size);
|
|
694
|
+
}
|
|
695
|
+
.table th, .table td { text-align: left; padding: var(--s-sm) var(--s-md); border-bottom: 1px solid var(--border); }
|
|
696
|
+
.table th { font-family: var(--font-sans); font-size: var(--t-label-sm-size); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-secondary); }
|
|
697
|
+
.table tbody tr:hover { background: var(--bg-raised); }
|
|
698
|
+
.table--zebra tbody tr:nth-child(even) { background: var(--bg-raised); }
|
|
699
|
+
|
|
700
|
+
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-sm) var(--s-lg); font-family: var(--font-mono); font-size: var(--t-body-md-size); }
|
|
701
|
+
.kv dt { color: var(--fg-secondary); }
|
|
702
|
+
.kv dd { margin: 0; color: var(--fg); }
|
|
703
|
+
|
|
704
|
+
/* ═══ States — empty, skeleton, progress ══════════════════════════════ */
|
|
705
|
+
.empty-state {
|
|
706
|
+
display: flex; flex-direction: column; align-items: flex-start;
|
|
707
|
+
gap: var(--s-sm); padding: var(--s-2xl) var(--s-lg);
|
|
708
|
+
border: 1px dashed var(--border); border-radius: var(--radius-md);
|
|
709
|
+
background: transparent;
|
|
710
|
+
}
|
|
711
|
+
.empty-state__title { font-family: var(--font-mono); font-weight: 700; font-size: var(--t-body-lg-size); margin: 0; }
|
|
712
|
+
.empty-state__body { font-family: var(--font-mono); font-size: var(--t-body-md-size); color: var(--fg-secondary); margin: 0; max-width: 50ch; line-height: 1.55; }
|
|
713
|
+
|
|
714
|
+
.skeleton {
|
|
715
|
+
display: block; background: var(--bg-raised); border-radius: var(--radius-sm);
|
|
716
|
+
position: relative; overflow: hidden;
|
|
717
|
+
height: 1em; width: 100%;
|
|
718
|
+
}
|
|
719
|
+
.skeleton::after {
|
|
720
|
+
content: ""; position: absolute; inset: 0;
|
|
721
|
+
background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--fg) 6%, transparent), transparent);
|
|
722
|
+
animation: skeleton-shimmer 1.4s var(--ease-linear) infinite;
|
|
723
|
+
}
|
|
724
|
+
@keyframes skeleton-shimmer { from { transform: translateX(-100%) } to { transform: translateX(100%) } }
|
|
725
|
+
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; opacity: .25; } }
|
|
726
|
+
.skeleton--text { height: 0.85em; }
|
|
727
|
+
.skeleton--title { height: 1.5em; width: 60%; }
|
|
728
|
+
.skeleton--block { height: 80px; }
|
|
729
|
+
|
|
730
|
+
.progress {
|
|
731
|
+
width: 100%; height: 4px; background: var(--bg-raised); border-radius: 2px; overflow: hidden;
|
|
732
|
+
}
|
|
733
|
+
.progress__bar { height: 100%; background: var(--accent-fill); transition: width var(--dur-max) var(--ease); }
|
|
734
|
+
|
|
735
|
+
/* Attention pulse — for urgent state, accessibility-aware */
|
|
736
|
+
@keyframes attention-pulse {
|
|
737
|
+
0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--urgent) 35%, transparent); }
|
|
738
|
+
50% { box-shadow: 0 0 0 6px color-mix(in oklch, var(--urgent) 0%, transparent); }
|
|
739
|
+
}
|
|
740
|
+
.pulse { animation: attention-pulse 1.6s var(--ease) infinite; border-radius: inherit; }
|
|
741
|
+
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
|
|
742
|
+
|
|
743
|
+
/* ═══ Accessibility utilities ═════════════════════════════════════════ */
|
|
744
|
+
.sr-only {
|
|
745
|
+
position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
746
|
+
overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
747
|
+
}
|
|
748
|
+
.skip-link {
|
|
749
|
+
position: absolute; top: -40px; left: var(--s-md);
|
|
750
|
+
background: var(--accent-fill); color: var(--on-accent);
|
|
751
|
+
padding: 8px 12px; border-radius: var(--radius-sm);
|
|
752
|
+
font-family: var(--font-sans); font-size: var(--t-label-md-size); font-weight: 500;
|
|
753
|
+
text-decoration: none; z-index: var(--z-toast);
|
|
754
|
+
transition: top var(--dur-fast) var(--ease);
|
|
755
|
+
}
|
|
756
|
+
.skip-link:focus { top: var(--s-md); }
|
|
757
|
+
|
|
758
|
+
/* Global focus-ring strategy — opt every interactive element in.
|
|
759
|
+
Already wired on a/.btn; this catches everything else. */
|
|
760
|
+
button:focus-visible,
|
|
761
|
+
input:focus-visible,
|
|
762
|
+
textarea:focus-visible,
|
|
763
|
+
select:focus-visible,
|
|
764
|
+
[tabindex]:focus-visible,
|
|
765
|
+
[role="button"]:focus-visible,
|
|
766
|
+
[role="link"]:focus-visible,
|
|
767
|
+
[role="menuitem"]:focus-visible,
|
|
768
|
+
[role="option"]:focus-visible,
|
|
769
|
+
[role="tab"]:focus-visible {
|
|
770
|
+
outline: var(--focus-width) solid var(--accent);
|
|
771
|
+
outline-offset: var(--focus-offset);
|
|
772
|
+
border-radius: var(--radius-sm);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
776
|
+
COMPOSITION · density modes
|
|
777
|
+
Three densities for tables, lists, and dashboards. Set on a container.
|
|
778
|
+
compact = consoles, log views, ops; cozy = default; comfortable = docs.
|
|
779
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
780
|
+
.density-compact { --row-y: 4px; --row-x: 10px; --gap: var(--s-sm); }
|
|
781
|
+
.density-cozy { --row-y: 8px; --row-x: 16px; --gap: var(--s-md); }
|
|
782
|
+
.density-comfortable { --row-y: 14px; --row-x: 20px; --gap: var(--s-lg); }
|
|
783
|
+
|
|
784
|
+
/* When a density is set, table cells and list items pick it up */
|
|
785
|
+
[class*="density-"] .table th,
|
|
786
|
+
[class*="density-"] .table td { padding: var(--row-y) var(--row-x); }
|
|
787
|
+
[class*="density-"] .stack { gap: var(--gap); }
|
|
788
|
+
|
|
789
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
790
|
+
COMPOSITION · table extensions
|
|
791
|
+
Sticky header + sticky first column + numeric column + group header.
|
|
792
|
+
Layered onto .table — additive, no replacement.
|
|
793
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
794
|
+
.table--sticky-head thead th {
|
|
795
|
+
position: sticky; top: 0; z-index: var(--z-raised);
|
|
796
|
+
background: var(--bg);
|
|
797
|
+
box-shadow: 0 1px 0 var(--border);
|
|
798
|
+
}
|
|
799
|
+
.table--sticky-col tbody td:first-child,
|
|
800
|
+
.table--sticky-col thead th:first-child {
|
|
801
|
+
position: sticky; left: 0; z-index: var(--z-raised);
|
|
802
|
+
background: var(--bg);
|
|
803
|
+
}
|
|
804
|
+
.table--sticky-head.table--sticky-col thead th:first-child { z-index: calc(var(--z-raised) + 1); }
|
|
805
|
+
.table .num,
|
|
806
|
+
.table th.num,
|
|
807
|
+
.table td.num { font-variant-numeric: tabular-nums; text-align: right; }
|
|
808
|
+
.table tr.group-row td {
|
|
809
|
+
font-family: var(--font-sans); font-size: var(--t-label-sm-size);
|
|
810
|
+
text-transform: uppercase; letter-spacing: 0.08em;
|
|
811
|
+
color: var(--fg-secondary); background: var(--bg-inactive);
|
|
812
|
+
padding: var(--s-sm) var(--row-x, var(--s-md));
|
|
813
|
+
border-bottom: 1px solid var(--border);
|
|
814
|
+
}
|
|
815
|
+
.table tfoot td {
|
|
816
|
+
font-weight: 700; border-top: 2px solid var(--border); border-bottom: none;
|
|
817
|
+
background: var(--bg-raised);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
821
|
+
COMPOSITION · dashboard layouts
|
|
822
|
+
Page shells used by the composition page. They read on top of .container.
|
|
823
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
824
|
+
/* KPI strip — 2–6 stat cards across, wraps to 2-up at narrow widths */
|
|
825
|
+
.kpi-strip { display: grid; gap: var(--s-md); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
|
|
826
|
+
|
|
827
|
+
/* Split-pane — sidebar + main, 280px / fr; collapses to stack on mobile.
|
|
828
|
+
minmax(0,1fr) on the content track, not bare 1fr — see the .grid-* note: a
|
|
829
|
+
wide child (log line, table, diagram) in the main pane would otherwise grow
|
|
830
|
+
the track to its content width and overflow the page. (#116) */
|
|
831
|
+
.split-pane { display: grid; gap: var(--s-lg); grid-template-columns: 280px minmax(0, 1fr); }
|
|
832
|
+
@media (max-width: 800px) { .split-pane { grid-template-columns: 1fr; } }
|
|
833
|
+
|
|
834
|
+
/* ── Dashboard frame ── one shell, many bodies. Promoted v0.10.0 (was
|
|
835
|
+
demo-only in composition.html). .dash is the framed surface; .dash__topbar
|
|
836
|
+
carries the title + live/range actions; the body (1fr) is built from
|
|
837
|
+
primitives — .kpi-strip, .split-pane, .table, or a chart grid. The "five
|
|
838
|
+
shells" (KPI · ops · observe · table-first · split) are RECIPES = .dash +
|
|
839
|
+
a density-* + one of those bodies, NOT five classes. */
|
|
840
|
+
.dash {
|
|
841
|
+
display: grid; grid-template-rows: auto 1fr; gap: var(--s-md);
|
|
842
|
+
padding: var(--s-md) var(--s-lg) var(--s-lg);
|
|
843
|
+
background: var(--bg);
|
|
844
|
+
}
|
|
845
|
+
.dash__topbar {
|
|
846
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
847
|
+
gap: var(--s-md); padding-bottom: var(--s-sm);
|
|
848
|
+
border-bottom: 1px solid var(--border);
|
|
849
|
+
}
|
|
850
|
+
.dash__title {
|
|
851
|
+
font-family: var(--font-mono); font-weight: 700;
|
|
852
|
+
font-size: var(--t-body-md-size); color: var(--fg);
|
|
853
|
+
margin: 0; letter-spacing: 0.04em;
|
|
854
|
+
}
|
|
855
|
+
.dash__actions { display: flex; gap: var(--s-sm); align-items: center; }
|
|
856
|
+
|
|
857
|
+
/* Filter bar — horizontal cluster of chips, search, time-range */
|
|
858
|
+
.filter-bar {
|
|
859
|
+
display: flex; flex-wrap: wrap; gap: var(--s-sm); align-items: center;
|
|
860
|
+
padding: var(--s-sm) var(--s-md);
|
|
861
|
+
background: var(--bg-raised); border: 1px solid var(--border);
|
|
862
|
+
border-radius: var(--radius-md);
|
|
863
|
+
}
|
|
864
|
+
.filter-bar > .grow { flex: 1; min-width: 160px; }
|
|
865
|
+
|
|
866
|
+
.chip {
|
|
867
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
868
|
+
font-family: var(--font-sans); font-size: 12px; font-weight: 500;
|
|
869
|
+
padding: 4px 10px; border-radius: 999px;
|
|
870
|
+
background: transparent; color: var(--fg-secondary);
|
|
871
|
+
border: 1px solid var(--border);
|
|
872
|
+
cursor: pointer; white-space: nowrap;
|
|
873
|
+
transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
|
|
874
|
+
}
|
|
875
|
+
.chip:hover { color: var(--fg); border-color: var(--fg-secondary); }
|
|
876
|
+
.chip[aria-pressed="true"], .chip--active {
|
|
877
|
+
background: color-mix(in oklch, var(--accent) 14%, transparent);
|
|
878
|
+
color: var(--accent); border-color: var(--accent);
|
|
879
|
+
}
|
|
880
|
+
.chip__count { font-variant-numeric: tabular-nums; color: var(--fg-secondary); }
|
|
881
|
+
|
|
882
|
+
/* Time-range segmented control */
|
|
883
|
+
.timerange { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
|
|
884
|
+
.timerange button {
|
|
885
|
+
background: transparent; color: var(--fg-secondary);
|
|
886
|
+
font-family: var(--font-mono); font-size: 12px; font-weight: 500;
|
|
887
|
+
padding: 6px 12px; border: none; cursor: pointer;
|
|
888
|
+
border-right: 1px solid var(--border);
|
|
889
|
+
transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
|
|
890
|
+
}
|
|
891
|
+
.timerange button:last-child { border-right: none; }
|
|
892
|
+
.timerange button:hover { color: var(--fg); background: var(--bg-raised); }
|
|
893
|
+
.timerange button[aria-pressed="true"] {
|
|
894
|
+
background: var(--bg-raised); color: var(--accent);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
898
|
+
COMPOSITION · live-update atoms
|
|
899
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
900
|
+
/* Pulsing dot — for "this is live" indicators */
|
|
901
|
+
.live-tick {
|
|
902
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
903
|
+
font-family: var(--font-sans); font-size: 11px; letter-spacing: .06em;
|
|
904
|
+
text-transform: uppercase; color: var(--fg-secondary);
|
|
905
|
+
}
|
|
906
|
+
.live-tick::before {
|
|
907
|
+
content: ""; width: 6px; height: 6px; border-radius: 50%;
|
|
908
|
+
background: var(--success);
|
|
909
|
+
box-shadow: 0 0 0 0 color-mix(in oklch, var(--success) 60%, transparent);
|
|
910
|
+
animation: live-pulse 2s var(--ease) infinite;
|
|
911
|
+
}
|
|
912
|
+
@keyframes live-pulse {
|
|
913
|
+
0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--success) 60%, transparent); }
|
|
914
|
+
50% { box-shadow: 0 0 0 6px color-mix(in oklch, var(--success) 0%, transparent); }
|
|
915
|
+
}
|
|
916
|
+
@media (prefers-reduced-motion: reduce) { .live-tick::before { animation: none; } }
|
|
917
|
+
|
|
918
|
+
.last-updated {
|
|
919
|
+
font-family: var(--font-mono); font-size: 11px;
|
|
920
|
+
color: var(--fg-secondary); font-variant-numeric: tabular-nums;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/* Number that swaps in place — soft fade so changes are perceived */
|
|
924
|
+
.live-value { transition: color var(--dur-max) var(--ease); }
|
|
925
|
+
.live-value.flash { color: var(--accent); }
|
|
926
|
+
|
|
927
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
928
|
+
CHARTS · tokens + primitives
|
|
929
|
+
Platform-agnostic: any library that lets you set stroke/axis/grid colors
|
|
930
|
+
can read these. Pages use them in inline SVG; framework adapters can
|
|
931
|
+
forward them to ECharts/Chart.js/etc.
|
|
932
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
933
|
+
:root {
|
|
934
|
+
/* Structural — the chart's chrome */
|
|
935
|
+
--chart-grid: color-mix(in oklch, var(--border) 70%, transparent);
|
|
936
|
+
--chart-grid-strong: var(--border);
|
|
937
|
+
--chart-axis: var(--fg-secondary);
|
|
938
|
+
--chart-axis-label: var(--fg-secondary);
|
|
939
|
+
--chart-plot-bg: transparent;
|
|
940
|
+
|
|
941
|
+
/* Series — categorical 5-color palette, contrast-tuned for both themes.
|
|
942
|
+
Order matters: series 1 is the accent. Keep total ≤ 5; beyond that,
|
|
943
|
+
re-encode (split charts, group, or use sequential ramp). */
|
|
944
|
+
--series-1: var(--accent); /* gold */
|
|
945
|
+
--series-2: var(--steel); /* steel-blue */
|
|
946
|
+
--series-3: var(--brand-purple); /* purple */
|
|
947
|
+
--series-4: var(--success); /* olive */
|
|
948
|
+
--series-5: var(--attention); /* rose */
|
|
949
|
+
|
|
950
|
+
/* Sequential ramp — single-hue, 5 stops light→dark.
|
|
951
|
+
Use for quantitative encoding (heatmap, choropleth). */
|
|
952
|
+
--ramp-1: color-mix(in oklch, var(--accent) 25%, var(--bg));
|
|
953
|
+
--ramp-2: color-mix(in oklch, var(--accent) 45%, var(--bg));
|
|
954
|
+
--ramp-3: color-mix(in oklch, var(--accent) 65%, var(--bg));
|
|
955
|
+
--ramp-4: color-mix(in oklch, var(--accent) 85%, var(--bg));
|
|
956
|
+
--ramp-5: var(--accent);
|
|
957
|
+
|
|
958
|
+
/* Diverging — for signed deltas. Vermillion-low → neutral → olive-high. */
|
|
959
|
+
--diverge-low: var(--urgent);
|
|
960
|
+
--diverge-mid: var(--fg-disabled);
|
|
961
|
+
--diverge-high: var(--success);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/* Chart shell — gives it a card-like surface, optional header row,
|
|
965
|
+
and a fixed aspect-ratio plot area so SVG charts size predictably. */
|
|
966
|
+
.chart {
|
|
967
|
+
background: var(--bg-raised);
|
|
968
|
+
border: 1px solid var(--border);
|
|
969
|
+
border-radius: var(--radius-md);
|
|
970
|
+
padding: var(--s-md) var(--s-lg) var(--s-lg);
|
|
971
|
+
display: flex; flex-direction: column; gap: var(--s-sm);
|
|
972
|
+
}
|
|
973
|
+
.chart__header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-md); }
|
|
974
|
+
.chart__title { font-family: var(--font-mono); font-size: 12px; font-weight: 700;
|
|
975
|
+
letter-spacing: .08em; text-transform: uppercase; color: var(--fg-secondary); margin: 0; }
|
|
976
|
+
.chart__value { font-family: var(--font-mono); font-size: 28px; font-weight: 700;
|
|
977
|
+
color: var(--fg); font-variant-numeric: tabular-nums; line-height: 1; }
|
|
978
|
+
.chart__plot { width: 100%; aspect-ratio: 16 / 7; position: relative; }
|
|
979
|
+
.chart__plot--tall { aspect-ratio: 16 / 9; }
|
|
980
|
+
.chart__plot--square { aspect-ratio: 1 / 1; }
|
|
981
|
+
.chart__legend {
|
|
982
|
+
display: flex; flex-wrap: wrap; gap: var(--s-md);
|
|
983
|
+
font-family: var(--font-sans); font-size: 12px; color: var(--fg-secondary);
|
|
984
|
+
}
|
|
985
|
+
.chart__legend > span { display: inline-flex; align-items: center; gap: 6px; }
|
|
986
|
+
.chart__legend i {
|
|
987
|
+
width: 10px; height: 2px; background: currentColor; border-radius: 1px;
|
|
988
|
+
display: inline-block;
|
|
989
|
+
}
|
|
990
|
+
.chart__legend i.dot { width: 8px; height: 8px; border-radius: 50%; }
|
|
991
|
+
|
|
992
|
+
/* Series swatches — reachable as utilities and inline SVG fills */
|
|
993
|
+
.series-1 { color: var(--series-1); fill: var(--series-1); stroke: var(--series-1); }
|
|
994
|
+
.series-2 { color: var(--series-2); fill: var(--series-2); stroke: var(--series-2); }
|
|
995
|
+
.series-3 { color: var(--series-3); fill: var(--series-3); stroke: var(--series-3); }
|
|
996
|
+
.series-4 { color: var(--series-4); fill: var(--series-4); stroke: var(--series-4); }
|
|
997
|
+
.series-5 { color: var(--series-5); fill: var(--series-5); stroke: var(--series-5); }
|
|
998
|
+
|
|
999
|
+
/* Sparkline — small inline trend, no axis. Used in tables and stat cards. */
|
|
1000
|
+
.sparkline {
|
|
1001
|
+
display: inline-block; vertical-align: middle;
|
|
1002
|
+
width: 80px; height: 22px;
|
|
1003
|
+
}
|
|
1004
|
+
.sparkline path.line { fill: none; stroke: var(--series-1); stroke-width: 1.5; }
|
|
1005
|
+
.sparkline path.area { fill: var(--series-1); opacity: .14; stroke: none; }
|
|
1006
|
+
.sparkline circle.last-point { fill: var(--series-1); }
|
|
1007
|
+
|
|
1008
|
+
/* Sparkbar — micro bar chart, same footprint as sparkline */
|
|
1009
|
+
.sparkbars { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; vertical-align: middle; }
|
|
1010
|
+
.sparkbars > span { width: 4px; background: var(--series-1); border-radius: 1px 1px 0 0; opacity: .9; }
|
|
1011
|
+
|
|
1012
|
+
/* Annotation tag (for editorial mode) — text label + leader line */
|
|
1013
|
+
.chart-annotation {
|
|
1014
|
+
font-family: var(--font-sans); font-size: 11px; line-height: 1.3;
|
|
1015
|
+
fill: var(--fg-secondary); font-weight: 500;
|
|
1016
|
+
}
|
|
1017
|
+
.chart-annotation.strong { fill: var(--fg); font-weight: 700; }
|
|
1018
|
+
.chart-leader { stroke: var(--fg-secondary); stroke-width: 1; stroke-dasharray: 2 2; fill: none; }
|
|
1019
|
+
|
|
1020
|
+
/* Gauge — percentage indicator in a half-ring */
|
|
1021
|
+
.gauge { width: 120px; aspect-ratio: 2 / 1.1; display: block; }
|
|
1022
|
+
.gauge .track { fill: none; stroke: var(--bg-inactive); stroke-width: 12; stroke-linecap: round; }
|
|
1023
|
+
.gauge .fill { fill: none; stroke: var(--series-1); stroke-width: 12; stroke-linecap: round;
|
|
1024
|
+
transition: stroke-dashoffset var(--dur-max) var(--ease); }
|
|
1025
|
+
|
|
1026
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
1027
|
+
DIAGRAMS · primitives for hand-drawn SVG
|
|
1028
|
+
Use as inline classes on SVG <rect>, <path>, <text> for boxes-and-arrows.
|
|
1029
|
+
Mermaid + React Flow override the same tokens via their respective theming.
|
|
1030
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
1031
|
+
:root {
|
|
1032
|
+
--dia-node-bg: var(--bg-raised);
|
|
1033
|
+
--dia-node-fg: var(--fg);
|
|
1034
|
+
--dia-node-border: var(--border);
|
|
1035
|
+
--dia-edge: var(--fg-secondary);
|
|
1036
|
+
--dia-edge-strong: var(--fg);
|
|
1037
|
+
--dia-rail: var(--border-lifted);
|
|
1038
|
+
}
|
|
1039
|
+
.dia-node {
|
|
1040
|
+
fill: var(--dia-node-bg);
|
|
1041
|
+
stroke: var(--dia-node-border);
|
|
1042
|
+
stroke-width: 1;
|
|
1043
|
+
}
|
|
1044
|
+
.dia-node--accent { stroke: var(--accent); stroke-width: 1.5; }
|
|
1045
|
+
.dia-node--ghost { fill: transparent; stroke-dasharray: 4 3; }
|
|
1046
|
+
.dia-node-label { fill: var(--dia-node-fg); font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
|
|
1047
|
+
.dia-node-meta { fill: var(--fg-secondary); font-family: var(--font-mono); font-size: 10px; }
|
|
1048
|
+
|
|
1049
|
+
.dia-edge {
|
|
1050
|
+
stroke: var(--dia-edge); stroke-width: 1.25; fill: none;
|
|
1051
|
+
}
|
|
1052
|
+
.dia-edge--strong { stroke: var(--dia-edge-strong); stroke-width: 1.5; }
|
|
1053
|
+
.dia-edge--dashed { stroke-dasharray: 4 3; }
|
|
1054
|
+
.dia-edge-label { fill: var(--fg-secondary); font-family: var(--font-mono); font-size: 10px;
|
|
1055
|
+
paint-order: stroke; stroke: var(--bg); stroke-width: 4; }
|
|
1056
|
+
|
|
1057
|
+
.dia-rail { stroke: var(--dia-rail); stroke-width: 1; stroke-dasharray: 2 4; }
|
|
1058
|
+
.dia-swimlane-label {
|
|
1059
|
+
fill: var(--fg-secondary); font-family: var(--font-sans); font-size: 11px;
|
|
1060
|
+
letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
1065
|
+
NAVIGATION — the spine. Promoted v0.10.0 from orphan demos (.crumb was
|
|
1066
|
+
copied verbatim ~14x; .sidenav lived in composition.html). Core, not a
|
|
1067
|
+
carve: nav is load-bearing chrome.
|
|
1068
|
+
Four surfaces, distinct jobs:
|
|
1069
|
+
.crumb — where am I (hierarchy / location)
|
|
1070
|
+
.sidenav — what sections exist (between-surface spine) [+ --rail, drawer]
|
|
1071
|
+
.appbar — global chrome (brand · search · actions)
|
|
1072
|
+
.tabs — switch the VIEW within one surface
|
|
1073
|
+
(For switching a PARAMETER of one view — time window, density — use the
|
|
1074
|
+
.timerange segmented control, not .tabs.)
|
|
1075
|
+
No new tokens: --s-* for gaps/padding, raw px only for fixed dimensions
|
|
1076
|
+
(bar height, rail width), exactly as .split-pane / .btn already do.
|
|
1077
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
1078
|
+
|
|
1079
|
+
/* ── Breadcrumb ── location in a hierarchy. Inline; last item is current. */
|
|
1080
|
+
.crumb {
|
|
1081
|
+
font-family: var(--font-sans); font-size: var(--t-label-sm-size);
|
|
1082
|
+
letter-spacing: 0.12em; text-transform: uppercase;
|
|
1083
|
+
color: var(--fg-secondary); margin: 0 0 var(--s-md);
|
|
1084
|
+
}
|
|
1085
|
+
.crumb a { color: var(--fg-secondary); text-decoration: none; }
|
|
1086
|
+
.crumb a:hover, .crumb a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
1087
|
+
.crumb [aria-current="page"] { color: var(--fg); }
|
|
1088
|
+
.crumb__sep { color: var(--fg-disabled); margin: 0 0.4em; }
|
|
1089
|
+
|
|
1090
|
+
/* ── Sidebar nav ── the between-surface spine. Sections of one product. */
|
|
1091
|
+
.sidenav {
|
|
1092
|
+
display: flex; flex-direction: column; gap: 2px;
|
|
1093
|
+
padding: var(--s-md);
|
|
1094
|
+
background: var(--bg-raised); border: 1px solid var(--border);
|
|
1095
|
+
border-radius: var(--radius-md);
|
|
1096
|
+
}
|
|
1097
|
+
/* Group label. Hierarchy at scale (#94): a long spine of uniform 44px rows
|
|
1098
|
+
reads flat with only the active row as an anchor, so the header is made to
|
|
1099
|
+
work harder — STICKY, so the current section's label pins as the list scrolls
|
|
1100
|
+
("where am I" without reading every row), and a DIVIDER above every group
|
|
1101
|
+
after the first, so the chunk boundaries are legible even unscrolled. Short,
|
|
1102
|
+
non-scrolling navs are unaffected (nothing pins, the divider just separates). */
|
|
1103
|
+
.sidenav__group {
|
|
1104
|
+
font-family: var(--font-sans); font-size: var(--t-label-sm-size);
|
|
1105
|
+
letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary);
|
|
1106
|
+
padding: var(--s-sm) var(--s-sm) var(--s-xs);
|
|
1107
|
+
position: sticky; top: 0; z-index: var(--z-raised);
|
|
1108
|
+
background: var(--bg-raised); /* opaque over rows scrolling beneath; matches .sidenav surface */
|
|
1109
|
+
}
|
|
1110
|
+
.sidenav__group:not(:first-child) {
|
|
1111
|
+
margin-top: var(--s-sm); padding-top: var(--s-md);
|
|
1112
|
+
border-top: 1px solid var(--border);
|
|
1113
|
+
}
|
|
1114
|
+
/* .sidenav supports both <a> (document nav) and <button> (SPA section-switch).
|
|
1115
|
+
Selectors mirror .tabs which already uses "button, a" for the same reason.
|
|
1116
|
+
Note: a closed .nav-drawer should carry the `inert` attribute to remove its
|
|
1117
|
+
buttons from the tab order — there's no CSS-only way to prevent phantom tabs. */
|
|
1118
|
+
.sidenav a,
|
|
1119
|
+
.sidenav button {
|
|
1120
|
+
display: flex; align-items: center; gap: var(--s-sm);
|
|
1121
|
+
min-height: 44px; padding: 6px 10px; /* 44px nav touch target (a11y #8) */
|
|
1122
|
+
border-radius: var(--radius-sm);
|
|
1123
|
+
color: var(--fg-secondary); font-family: var(--font-sans);
|
|
1124
|
+
font-size: var(--t-label-md-size); text-decoration: none;
|
|
1125
|
+
transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
|
|
1126
|
+
}
|
|
1127
|
+
/* Button reset — bring <button> in line with the <a> presentation. */
|
|
1128
|
+
.sidenav button {
|
|
1129
|
+
appearance: none; background: none; border: 0;
|
|
1130
|
+
width: 100%; text-align: left; font: inherit; cursor: pointer;
|
|
1131
|
+
}
|
|
1132
|
+
.sidenav a > .label,
|
|
1133
|
+
.sidenav button > .label { flex: 1; min-width: 0; }
|
|
1134
|
+
.sidenav a > [data-icon], .sidenav a > .i,
|
|
1135
|
+
.sidenav button > [data-icon], .sidenav button > .i { flex: none; }
|
|
1136
|
+
.sidenav a > .count,
|
|
1137
|
+
.sidenav button > .count {
|
|
1138
|
+
margin-left: auto; font-variant-numeric: tabular-nums;
|
|
1139
|
+
font-size: var(--t-label-sm-size); color: var(--fg-disabled);
|
|
1140
|
+
}
|
|
1141
|
+
.sidenav a:hover,
|
|
1142
|
+
.sidenav button:hover { background: var(--bg); color: var(--fg); }
|
|
1143
|
+
.sidenav a:focus-visible,
|
|
1144
|
+
.sidenav button:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset-inset); }
|
|
1145
|
+
.sidenav a[aria-current="page"],
|
|
1146
|
+
.sidenav button[aria-current="page"] {
|
|
1147
|
+
background: var(--bg); color: var(--accent);
|
|
1148
|
+
box-shadow: inset 2px 0 0 var(--accent); /* active rail — no layout shift */
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/* Rail — collapsed, icon-only (~56px). Labels go SR-only, not display:none,
|
|
1152
|
+
so the link keeps an accessible name. Counts → a dot. */
|
|
1153
|
+
.sidenav--rail { width: 56px; padding: var(--s-sm) 6px; }
|
|
1154
|
+
.sidenav--rail .sidenav__group { display: none; }
|
|
1155
|
+
.sidenav--rail a,
|
|
1156
|
+
.sidenav--rail button { justify-content: center; gap: 0; padding: 0; width: 44px; margin: 0 auto; }
|
|
1157
|
+
.sidenav--rail a > .label,
|
|
1158
|
+
.sidenav--rail button > .label {
|
|
1159
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
1160
|
+
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
|
|
1161
|
+
}
|
|
1162
|
+
.sidenav--rail a > .count,
|
|
1163
|
+
.sidenav--rail button > .count {
|
|
1164
|
+
margin: 0; position: absolute; top: 6px; right: 6px;
|
|
1165
|
+
width: 6px; height: 6px; padding: 0; border-radius: 50%;
|
|
1166
|
+
background: var(--accent); color: transparent; overflow: hidden;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/* Drawer — off-canvas sidenav for mobile. Toggle [data-nav-open] on a
|
|
1170
|
+
shared ancestor (or <body>); a trigger sets aria-expanded + aria-controls.
|
|
1171
|
+
Slide = modal-entry motion (pattern #05); collapses under reduced-motion. */
|
|
1172
|
+
.nav-scrim {
|
|
1173
|
+
position: fixed; inset: 0; z-index: var(--z-modal);
|
|
1174
|
+
background: rgba(0,0,0,.55);
|
|
1175
|
+
opacity: 0; visibility: hidden;
|
|
1176
|
+
transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast) var(--ease);
|
|
1177
|
+
}
|
|
1178
|
+
:root[data-theme="light"] .nav-scrim { background: rgba(13,27,42,.4); }
|
|
1179
|
+
.nav-drawer {
|
|
1180
|
+
position: fixed; top: 0; bottom: 0; left: 0;
|
|
1181
|
+
z-index: calc(var(--z-modal) + 1);
|
|
1182
|
+
width: min(280px, 80vw); overflow-y: auto;
|
|
1183
|
+
transform: translateX(-100%);
|
|
1184
|
+
transition: transform var(--dur-max) var(--ease);
|
|
1185
|
+
}
|
|
1186
|
+
.nav-drawer > .sidenav { height: 100%; border: none; border-radius: 0; }
|
|
1187
|
+
[data-nav-open] .nav-scrim { opacity: 1; visibility: visible; }
|
|
1188
|
+
[data-nav-open] .nav-drawer { transform: none; }
|
|
1189
|
+
|
|
1190
|
+
/* ── App bar ── global top chrome. Brand · (search) · spacer · actions.
|
|
1191
|
+
At most one .btn--primary here (one-CTA rule). The brand wordmark is a
|
|
1192
|
+
sanctioned .whimsy home; nothing else in the bar is. */
|
|
1193
|
+
.appbar {
|
|
1194
|
+
display: flex; align-items: center; gap: var(--s-md);
|
|
1195
|
+
height: 56px; padding: 0 var(--s-md);
|
|
1196
|
+
background: var(--bg); border-bottom: 1px solid var(--border);
|
|
1197
|
+
position: sticky; top: 0; z-index: var(--z-overlay);
|
|
1198
|
+
}
|
|
1199
|
+
.appbar__brand {
|
|
1200
|
+
display: flex; align-items: center; gap: var(--s-sm);
|
|
1201
|
+
font-family: var(--font-mono); font-weight: 700;
|
|
1202
|
+
font-size: var(--t-body-lg-size); letter-spacing: -0.01em;
|
|
1203
|
+
color: var(--fg); text-decoration: none;
|
|
1204
|
+
}
|
|
1205
|
+
.appbar__search { flex: 0 1 360px; min-width: 0; }
|
|
1206
|
+
.appbar__spacer { flex: 1; }
|
|
1207
|
+
.appbar__actions { display: flex; align-items: center; gap: var(--s-xs); }
|
|
1208
|
+
.appbar__menu-btn { display: none; }
|
|
1209
|
+
@media (max-width: 800px) {
|
|
1210
|
+
.appbar__menu-btn { display: inline-flex; }
|
|
1211
|
+
.appbar__search { display: none; }
|
|
1212
|
+
}
|
|
1213
|
+
/* Contained — inside a padded .container the bar's own inline padding
|
|
1214
|
+
double-insets; zero it so the container owns the gutter exclusively.
|
|
1215
|
+
The safe-area block below still sets max(0, env(safe-area-inset-*))
|
|
1216
|
+
so notch clearance is preserved. */
|
|
1217
|
+
.appbar--contained { padding-inline: 0; }
|
|
1218
|
+
/* Static — opts out of sticky positioning for compact tool surfaces or
|
|
1219
|
+
layouts where a second sticky plane (sidenav) is already the anchor. */
|
|
1220
|
+
.appbar--static { position: static; top: auto; }
|
|
1221
|
+
|
|
1222
|
+
/* ── Tabs ── switch the VIEW within one surface. role=tablist (button +
|
|
1223
|
+
aria-selected) or links (aria-current). Underline marks the active view.
|
|
1224
|
+
NOT for filtering one view's parameters — that's .timerange. */
|
|
1225
|
+
.tabs {
|
|
1226
|
+
display: flex; gap: var(--s-md); align-items: stretch;
|
|
1227
|
+
border-bottom: 1px solid var(--border);
|
|
1228
|
+
}
|
|
1229
|
+
.tabs button, .tabs a {
|
|
1230
|
+
appearance: none; background: none; border: none; cursor: pointer;
|
|
1231
|
+
display: inline-flex; align-items: center; min-height: 44px;
|
|
1232
|
+
padding: var(--s-sm) 2px; margin-bottom: -1px;
|
|
1233
|
+
font-family: var(--font-sans); font-size: var(--t-label-md-size); font-weight: 500;
|
|
1234
|
+
color: var(--fg-secondary); text-decoration: none;
|
|
1235
|
+
border-bottom: 2px solid transparent;
|
|
1236
|
+
transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
|
|
1237
|
+
}
|
|
1238
|
+
.tabs button:hover, .tabs a:hover { color: var(--fg); }
|
|
1239
|
+
.tabs [aria-selected="true"], .tabs [aria-current="page"] {
|
|
1240
|
+
color: var(--accent); border-bottom-color: var(--accent);
|
|
1241
|
+
}
|
|
1242
|
+
.tabs button:focus-visible, .tabs a:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
1246
|
+
BRAND · wordmark — the mark is lowercase "artificer" closed by a
|
|
1247
|
+
burnished full stop (the accent period). Mono, tight tracking. The stop
|
|
1248
|
+
is the signature; it also caps display page titles ("Navigation.").
|
|
1249
|
+
Override the stop's color per surface if needed; never stretch the
|
|
1250
|
+
mark's tracking or set it in sans. v0.10.0.
|
|
1251
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
1252
|
+
.wordmark {
|
|
1253
|
+
display: inline-block; width: max-content; /* guard: keeps ::after inline,
|
|
1254
|
+
not a separate flex item when .wordmark is placed on a flex container */
|
|
1255
|
+
font-family: var(--font-mono); font-weight: 700;
|
|
1256
|
+
text-transform: lowercase; letter-spacing: -0.01em;
|
|
1257
|
+
color: var(--fg); text-decoration: none; white-space: nowrap;
|
|
1258
|
+
}
|
|
1259
|
+
.wordmark::after { content: "."; color: var(--accent); }
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
1263
|
+
RESPONSIVE — breakpoints · touch escalation · safe-area · table reflow.
|
|
1264
|
+
v0.10.0. Reconciles Lane 3's "mobile layer" audit, with two corrections:
|
|
1265
|
+
1. The 44px target is a NAV rule (a11y #8: "in nav"), NOT a blanket
|
|
1266
|
+
floor. Desktop controls stay dense by design; they grow only on a
|
|
1267
|
+
finger — gated to @media (pointer: coarse), so a mouse desktop is
|
|
1268
|
+
untouched.
|
|
1269
|
+
2. CSS @media can't read var(--bp-*). The --bp-* tokens (and tokens.json)
|
|
1270
|
+
are the source of truth for JS / Tailwind / Figma; the literal @media
|
|
1271
|
+
widths below MUST be kept equal to them.
|
|
1272
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
1273
|
+
|
|
1274
|
+
:root {
|
|
1275
|
+
--bp-mobile: 640px; /* phone */
|
|
1276
|
+
--bp-tablet: 800px; /* small tablet / split view */
|
|
1277
|
+
--bp-wide: 1200px; /* wide desktop */
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/* Safe-area — sticky/fixed chrome clears the notch + home indicator.
|
|
1281
|
+
Requires <meta name="viewport" content="..., viewport-fit=cover">. */
|
|
1282
|
+
.appbar {
|
|
1283
|
+
padding-left: max(var(--s-md), env(safe-area-inset-left));
|
|
1284
|
+
padding-right: max(var(--s-md), env(safe-area-inset-right));
|
|
1285
|
+
}
|
|
1286
|
+
/* .appbar--contained zeroes the inline padding so a padded container owns the
|
|
1287
|
+
gutter. Safe-area: use max(0px, inset) so we still clear the notch edge when
|
|
1288
|
+
the container is also full-bleed on a notched device (rare but safe). */
|
|
1289
|
+
.appbar--contained {
|
|
1290
|
+
padding-left: max(0px, env(safe-area-inset-left));
|
|
1291
|
+
padding-right: max(0px, env(safe-area-inset-right));
|
|
1292
|
+
}
|
|
1293
|
+
.nav-drawer { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
|
|
1294
|
+
|
|
1295
|
+
/* Touch escalation — on coarse pointers (finger) interactive controls grow
|
|
1296
|
+
to the 44px target. Fine-pointer (mouse) desktops keep Artificer density. */
|
|
1297
|
+
@media (pointer: coarse) {
|
|
1298
|
+
.btn { min-height: 44px; }
|
|
1299
|
+
.input, .textarea, .select { min-height: 44px; }
|
|
1300
|
+
.checkbox, .radio { min-height: 44px; align-items: center; }
|
|
1301
|
+
.checkbox > input, .radio > input { width: 22px; height: 22px; }
|
|
1302
|
+
.checkbox > input:checked::after { width: 5px; height: 10px; margin-top: 2px; }
|
|
1303
|
+
.radio > input:checked::after { width: 8px; height: 8px; margin-top: 6px; }
|
|
1304
|
+
.toggle > input { width: 44px; height: 26px; }
|
|
1305
|
+
.toggle > input::after { width: 22px; height: 22px; }
|
|
1306
|
+
.toggle > input:checked::after { transform: translateX(18px); }
|
|
1307
|
+
.slider { height: 6px; }
|
|
1308
|
+
.slider::-webkit-slider-thumb { width: 24px; height: 24px; }
|
|
1309
|
+
.slider::-moz-range-thumb { width: 24px; height: 24px; }
|
|
1310
|
+
.chip { padding: 8px 14px; }
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
/* Table -> cards reflow. Below --bp-mobile (640px) a wide data table
|
|
1314
|
+
restacks: each row becomes a card, each cell labelled by its column.
|
|
1315
|
+
Opt-in: add .table--responsive and a data-label on every <td>. */
|
|
1316
|
+
@media (max-width: 640px) {
|
|
1317
|
+
.table--responsive thead {
|
|
1318
|
+
position: absolute; width: 1px; height: 1px;
|
|
1319
|
+
overflow: hidden; clip: rect(0,0,0,0);
|
|
1320
|
+
}
|
|
1321
|
+
.table--responsive tbody tr {
|
|
1322
|
+
display: block; margin-bottom: var(--s-md);
|
|
1323
|
+
border: 1px solid var(--border); border-radius: var(--radius-md);
|
|
1324
|
+
padding: var(--s-sm) var(--s-md);
|
|
1325
|
+
}
|
|
1326
|
+
.table--responsive tbody td {
|
|
1327
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
1328
|
+
gap: var(--s-md); border: none; padding: 6px 0; text-align: right;
|
|
1329
|
+
}
|
|
1330
|
+
.table--responsive tbody td::before {
|
|
1331
|
+
content: attr(data-label); text-align: left;
|
|
1332
|
+
font-family: var(--font-sans); font-size: var(--t-label-sm-size);
|
|
1333
|
+
letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-secondary);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
1339
|
+
RESPONSIVE LAYER — wide-screen tier (#111, Lane 1 ruling) + app-shell (#116).
|
|
1340
|
+
One spine: the ONLY thing that caps width is the reading measure. Documents
|
|
1341
|
+
cap at --editorial-measure (66ch); tools fill; the middle is intrinsic
|
|
1342
|
+
(auto-fit/minmax). --bp-wide is the system's single MIN-WIDTH breakpoint
|
|
1343
|
+
(reveal a structural region), NOT a content cap. No 100vw anywhere —
|
|
1344
|
+
scrollbar-safe by construction. (token-mirror rule: literal @media widths
|
|
1345
|
+
below are kept equal to --bp-tablet 800 / --bp-wide 1200 in tokens.json.)
|
|
1346
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
1347
|
+
|
|
1348
|
+
/* Bleed-track grids. Two contexts share one mechanism so .full-bleed is ONE
|
|
1349
|
+
class: a centered/left content column flanked by gutter tracks plus named
|
|
1350
|
+
[bleed-*] lines a child can span to reach the surface edge — no negative
|
|
1351
|
+
margins, no 100vw.
|
|
1352
|
+
.measure-grid document — content column capped at 66ch (#111)
|
|
1353
|
+
.bleed-grid tool — content column minmax(0,1fr), uncapped (#116)
|
|
1354
|
+
.app-shell__content the app body, a bleed-grid by default */
|
|
1355
|
+
.measure-grid {
|
|
1356
|
+
display: grid;
|
|
1357
|
+
grid-template-columns:
|
|
1358
|
+
[bleed-start] minmax(var(--s-lg), 1fr)
|
|
1359
|
+
[content-start measure-start] minmax(0, var(--editorial-measure, 66ch)) [measure-end content-end]
|
|
1360
|
+
minmax(var(--s-lg), 1fr) [bleed-end];
|
|
1361
|
+
}
|
|
1362
|
+
.bleed-grid,
|
|
1363
|
+
.app-shell__content {
|
|
1364
|
+
display: grid;
|
|
1365
|
+
align-content: start; row-gap: var(--s-lg); padding-block: var(--s-lg);
|
|
1366
|
+
grid-template-columns:
|
|
1367
|
+
[bleed-start] var(--s-lg)
|
|
1368
|
+
[content-start] minmax(0, 1fr) [content-end]
|
|
1369
|
+
var(--s-lg) [bleed-end];
|
|
1370
|
+
}
|
|
1371
|
+
.measure-grid > *,
|
|
1372
|
+
.bleed-grid > *,
|
|
1373
|
+
.app-shell__content > * { grid-column: content-start / content-end; }
|
|
1374
|
+
/* Break out to the surface edge — works in any bleed-track grid above; a no-op
|
|
1375
|
+
(grid-column ignored) in a non-grid parent, so it can't misfire. */
|
|
1376
|
+
.full-bleed { grid-column: bleed-start / bleed-end; }
|
|
1377
|
+
|
|
1378
|
+
/* Container query opt-in for NEW components that restack on their OWN width
|
|
1379
|
+
(not the viewport). Forward-only; existing @media-stacked primitives unchanged. */
|
|
1380
|
+
.cq { container-type: inline-size; }
|
|
1381
|
+
|
|
1382
|
+
/* Inspector split — master/detail that reveals a third (detail) pane only on a
|
|
1383
|
+
genuinely wide viewport (the single min-width step, == --bp-wide). Content
|
|
1384
|
+
track is minmax(0,1fr), never bare 1fr — overflow-safe (#116). */
|
|
1385
|
+
.split-pane--inspector { display: grid; gap: var(--s-lg); grid-template-columns: 280px minmax(0, 1fr); }
|
|
1386
|
+
@media (max-width: 800px) { .split-pane--inspector { grid-template-columns: 1fr; } }
|
|
1387
|
+
@media (min-width: 1200px) { .split-pane--inspector { grid-template-columns: 280px minmax(0, 1fr) 320px; } }
|
|
1388
|
+
|
|
1389
|
+
/* App-shell — the responsive page scaffold (#116). Composes the existing chrome
|
|
1390
|
+
(.appbar / .sidenav / .nav-drawer) into a page that survives a phone: a
|
|
1391
|
+
sidebar+content grid whose content track is overflow-safe, collapsing the
|
|
1392
|
+
sidebar to the off-canvas .nav-drawer at --bp-tablet. Tools fill; nothing here
|
|
1393
|
+
caps width — that's the reading measure's job. */
|
|
1394
|
+
.app-shell {
|
|
1395
|
+
display: grid;
|
|
1396
|
+
min-height: 100dvh;
|
|
1397
|
+
grid-template-rows: [bar] auto [body] 1fr;
|
|
1398
|
+
grid-template-columns: [rail] var(--shell-rail, 240px) [main-start] minmax(0, 1fr) [main-end];
|
|
1399
|
+
}
|
|
1400
|
+
.app-shell > .appbar { grid-row: bar; grid-column: 1 / -1; }
|
|
1401
|
+
.app-shell > .sidenav { grid-row: body; grid-column: rail; }
|
|
1402
|
+
.app-shell__content {
|
|
1403
|
+
grid-row: body; grid-column: main-start / main-end;
|
|
1404
|
+
min-width: 0; /* belt-and-suspenders with the minmax(0,1fr) main track */
|
|
1405
|
+
overflow-x: clip; /* a rogue wide child clips here, never scrolls the page */
|
|
1406
|
+
}
|
|
1407
|
+
@media (max-width: 800px) {
|
|
1408
|
+
.app-shell { grid-template-columns: [main-start] minmax(0, 1fr) [main-end]; }
|
|
1409
|
+
.app-shell > .sidenav { display: none; } /* the .nav-drawer takes over */
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/* Media fit — opt-in: shrink an image/diagram to its container instead of
|
|
1413
|
+
forcing sideways scroll. Scoped to .media-fit (NOT a blanket svg rule, which
|
|
1414
|
+
would distort the fixed-size chrome icons). Wraps media or sits on it. */
|
|
1415
|
+
.media-fit :where(img, svg, video, canvas),
|
|
1416
|
+
:where(img, svg, video, canvas).media-fit { max-width: 100%; height: auto; }
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
1420
|
+
PRIMITIVES (v0.10.0) — avatar, accordion, selectable rows, date/time.
|
|
1421
|
+
From Lane 3's "missing primitives" audit. Built the small/proven ones;
|
|
1422
|
+
the floating-list family (combobox/menu/palette/select) is deferred and
|
|
1423
|
+
UNIFIED onto one option-popover primitive. Token-pure.
|
|
1424
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
1425
|
+
|
|
1426
|
+
/* Avatar — image or initials. .dot is an 8px status; .badge is a pill;
|
|
1427
|
+
this is the 24-64px person/entity mark. Default 32px, circular. */
|
|
1428
|
+
.avatar {
|
|
1429
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1430
|
+
width: 32px; height: 32px; flex: none; overflow: hidden;
|
|
1431
|
+
border-radius: 50%; border: 1px solid var(--border);
|
|
1432
|
+
background: var(--bg-raised); color: var(--fg-secondary);
|
|
1433
|
+
font-family: var(--font-mono); font-weight: 700;
|
|
1434
|
+
font-size: var(--t-label-sm-size); text-transform: uppercase;
|
|
1435
|
+
letter-spacing: 0.02em; user-select: none;
|
|
1436
|
+
}
|
|
1437
|
+
.avatar > img { width: 100%; height: 100%; object-fit: cover; }
|
|
1438
|
+
.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
|
|
1439
|
+
.avatar--lg { width: 48px; height: 48px; font-size: var(--t-label-md-size); }
|
|
1440
|
+
.avatar--xl { width: 64px; height: 64px; font-size: var(--t-body-lg-size); }
|
|
1441
|
+
.avatar--square { border-radius: var(--radius-sm); }
|
|
1442
|
+
|
|
1443
|
+
/* Accordion — built on native <details>/<summary>: accessible + keyboard
|
|
1444
|
+
for free, no JS. Wrap <details> items in .accordion; body in .accordion__body. */
|
|
1445
|
+
.accordion { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
|
|
1446
|
+
.accordion > details { border-bottom: 1px solid var(--border); }
|
|
1447
|
+
.accordion > details:last-child { border-bottom: none; }
|
|
1448
|
+
.accordion summary {
|
|
1449
|
+
display: flex; align-items: center; justify-content: space-between; gap: var(--s-md);
|
|
1450
|
+
min-height: 44px; padding: var(--s-sm) var(--s-md); cursor: pointer; list-style: none;
|
|
1451
|
+
font-family: var(--font-sans); font-weight: 500; color: var(--fg);
|
|
1452
|
+
transition: background var(--dur-fast) var(--ease);
|
|
1453
|
+
}
|
|
1454
|
+
.accordion summary::-webkit-details-marker { display: none; }
|
|
1455
|
+
.accordion summary::after {
|
|
1456
|
+
content: ""; flex: none; width: 7px; height: 7px;
|
|
1457
|
+
border-right: 1.5px solid var(--fg-secondary); border-bottom: 1.5px solid var(--fg-secondary);
|
|
1458
|
+
transform: rotate(45deg); transition: transform var(--dur-fast) var(--ease);
|
|
1459
|
+
}
|
|
1460
|
+
.accordion details[open] > summary::after { transform: rotate(-135deg); }
|
|
1461
|
+
.accordion summary:hover { background: var(--bg-raised); }
|
|
1462
|
+
.accordion summary:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset-inset); }
|
|
1463
|
+
.accordion__body { padding: 0 var(--s-md) var(--s-md); color: var(--fg-secondary); }
|
|
1464
|
+
|
|
1465
|
+
/* Selectable table rows — when rows are interactive (tabindex / role="row"),
|
|
1466
|
+
they must be keyboard-reachable + show focus. (No effect on plain rows.) */
|
|
1467
|
+
.table tbody tr:focus-visible {
|
|
1468
|
+
background: var(--bg-raised);
|
|
1469
|
+
outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset-inset);
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
/* Date / time fields — take .input like any field; keep mono numerals and a
|
|
1473
|
+
tappable picker icon. The native picker popup stays browser-default. */
|
|
1474
|
+
.input[type="date"], .input[type="time"], .input[type="datetime-local"] {
|
|
1475
|
+
font-family: var(--font-mono); font-variant-numeric: tabular-nums;
|
|
1476
|
+
}
|
|
1477
|
+
.input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }
|
|
1478
|
+
.input::-webkit-calendar-picker-indicator:hover { opacity: 1; }
|