@atelier-ui/styles 0.3.5 → 0.3.7

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 (3) hide show
  1. package/README.md +11 -2
  2. package/package.json +1 -1
  3. package/tokens.css +602 -0
package/README.md CHANGED
@@ -18,8 +18,17 @@ the `--ui-*` design tokens.
18
18
  Vue extracts it into `index.css`. They do not depend on this package at
19
19
  runtime.
20
20
 
21
- You normally do not install this package yourself. The tokens (`--ui-*`) come
22
- from your framework package, e.g. `@atelier-ui/react/styles/tokens.css`.
21
+ The design tokens (`--ui-*`: colour, type, spacing, radius, shadow, light and
22
+ dark) are published here too, and this is their source of truth:
23
+
24
+ ```css
25
+ @import '@atelier-ui/styles/tokens.css';
26
+ ```
27
+
28
+ The same file still ships inside each framework package, so
29
+ `@import '@atelier-ui/react/styles/tokens.css'` (and the `angular` / `vue`
30
+ equivalents) keeps working unchanged. `@atelier-ui/react` depends on this
31
+ package; with Angular or Vue, install it yourself to use the import above.
23
32
 
24
33
  ## Layout
25
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atelier-ui/styles",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Atelier component CSS — class-rooted, token-driven, shared by the Angular, React and Vue libraries",
5
5
  "keywords": [
6
6
  "css",
package/tokens.css ADDED
@@ -0,0 +1,602 @@
1
+ /**
2
+ * Design tokens for the Atelier component library.
3
+ * Direction A — Conciso anchor only. Deep Conciso teal on a clean white
4
+ * canvas (light) / bright teal on rich slate (dark). Modernised radius
5
+ * scale. No moss, no warm bone — just Conciso.
6
+ *
7
+ * All foreground/background pairs verified WCAG 2.2 AA via
8
+ * tools/scripts/wcag-contrast.mjs (52/52 pairs passing 2026-04-26).
9
+ *
10
+ * Typography: Instrument Sans (UI) + Instrument Serif (display) + JetBrains
11
+ * Mono (code), chosen 2026-08-26 — see ADR-0035, which revises ADR-0020's
12
+ * Inter choice. The library declares the stacks; loading the faces is the
13
+ * consumer's job (the docs app does it through Astro's fonts config).
14
+ * The --ui-type-* roles (ADR-0036) are the layer component CSS should
15
+ * reference; the individual axes remain for the cases a role does not fit.
16
+ *
17
+ * Plan: ~/.claude/plans/atelier-design-rebrief.md (Direction A pivot)
18
+ *
19
+ * Usage:
20
+ * @import '@atelier-ui/{angular,react,vue}/styles/tokens.css';
21
+ */
22
+
23
+ :root {
24
+ /* Typography */
25
+ --ui-font-family:
26
+ 'Instrument Sans', ui-sans-serif, system-ui, -apple-system,
27
+ BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
28
+ --ui-font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
29
+ --ui-font-mono:
30
+ 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,
31
+ 'Courier New', monospace;
32
+ /* Below the smallest readable size, for text inside a box too small to hold it:
33
+ the initials in a 24px avatar and the count in its overflow badge. Named rather
34
+ than left as the two literals it replaces (0.625rem and 0.5625rem), which is the
35
+ whole off-scale type population the library had. */
36
+ --ui-font-size-2xs: 0.625rem;
37
+ --ui-font-size-xs: 0.75rem;
38
+ --ui-font-size-sm: 0.875rem;
39
+ --ui-font-size-md: 1rem;
40
+ --ui-font-size-lg: 1.125rem;
41
+ --ui-font-size-xl: 1.25rem;
42
+ --ui-font-size-2xl: 1.5rem;
43
+ --ui-letter-spacing-tight: -0.01em;
44
+ --ui-letter-spacing-normal: 0;
45
+ --ui-letter-spacing-wide: 0.01em;
46
+ --ui-letter-spacing-uppercase: 0.08em;
47
+ --ui-font-size-3xl: 2.25rem;
48
+
49
+ /* ── Control heights ────────────────────────────────────────
50
+ * The height of an interactive control is the primitive; its block padding
51
+ * is DERIVED from it (ADR-0041):
52
+ * padding-block: calc((height - line-height * font-size) / 2 - border)
53
+ * Stating the height and deriving the padding is what makes an input and a
54
+ * button the same height. Stating the padding and hoping, which is what the
55
+ * library did until 2026-08-26, made them 6px apart.
56
+ */
57
+ /* ── Row heights ────────────────────────────────────────────────────────────
58
+ * A row is taller than the control it holds. That relation lives here, in a
59
+ * calc over the control scale, rather than as a convention thirty stylesheets
60
+ * have to honour: `--ui-row-inset: 0` collapses the two ladders into one in a
61
+ * single edit.
62
+ *
63
+ * Measured, which is why the inset exists: a table cell at the *control* height
64
+ * of 40 renders 41.0px when it holds a 40px control (the extra pixel is the two
65
+ * collapsed cell borders), while the same cell at 48 renders exactly 48.00px
66
+ * holding text, a badge, an sm button, an md button or an md avatar. So at the
67
+ * row height any control of the matching step fits, with no convention.
68
+ *
69
+ * A row CENTRES its content; a control PADS it. ADR-0041's derived-padding
70
+ * formula therefore does not apply here — a size-md cell with derived padding
71
+ * renders 62.5px holding an md button. The row recipe is
72
+ * `min-height: var(--ui-row-height-*); padding-block: 0; line-height: tight`.
73
+ *
74
+ * Not rows, on purpose: breadcrumbs (17px of inline text, holding no control)
75
+ * and the card/dialog/drawer/chat headers (one-off bands with their own
76
+ * padding, not one line among many). See ADR-0052.
77
+ */
78
+ --ui-row-inset: 0.25rem;
79
+ --ui-row-height-sm: calc(
80
+ var(--ui-control-height-sm) + 2 * var(--ui-row-inset)
81
+ );
82
+ --ui-row-height-md: calc(
83
+ var(--ui-control-height-md) + 2 * var(--ui-row-inset)
84
+ );
85
+ --ui-row-height-lg: calc(
86
+ var(--ui-control-height-lg) + 2 * var(--ui-row-inset)
87
+ );
88
+
89
+ --ui-control-height-sm: 2rem;
90
+ --ui-control-height-md: 2.5rem;
91
+ --ui-control-height-lg: 3rem;
92
+ --ui-font-weight-normal: 400;
93
+ --ui-font-weight-medium: 500;
94
+ --ui-font-weight-semibold: 600;
95
+ --ui-font-weight-bold: 700;
96
+ --ui-line-height-tight: 1.25;
97
+ --ui-line-height-normal: 1.5;
98
+ /* Code needs looser leading than prose: a reader scans columns, not sentences.
99
+ * AtlCodeBlock had 1.65 as a literal in one stylesheet. */
100
+ --ui-line-height-code: 1.65;
101
+
102
+ /* ── Type roles ─────────────────────────────────────────────
103
+ * Composed entirely from the axes above, so sizes and weights stay
104
+ * single-sourced and a role adds meaning rather than new numbers.
105
+ * Reference a ROLE from component CSS (`font: var(--ui-type-body-md)`),
106
+ * not an axis — the role is what carries ADR-0035's rule that weight
107
+ * comes from the sans and the display face is never bolded.
108
+ *
109
+ * `font:` is a shorthand: it resets font-style, font-variant,
110
+ * font-stretch and line-height, so declare it BEFORE any font-* override
111
+ * on the same rule. It does not touch letter-spacing — pair the display
112
+ * role with --ui-letter-spacing-tight and an uppercased label role with
113
+ * --ui-letter-spacing-uppercase yourself.
114
+ */
115
+ --ui-type-display: italic var(--ui-font-weight-normal)
116
+ var(--ui-font-size-3xl) / var(--ui-line-height-tight) var(--ui-font-display);
117
+ --ui-type-headline: var(--ui-font-weight-bold) var(--ui-font-size-2xl) /
118
+ var(--ui-line-height-tight) var(--ui-font-family);
119
+ --ui-type-title: var(--ui-font-weight-semibold) var(--ui-font-size-lg) /
120
+ var(--ui-line-height-tight) var(--ui-font-family);
121
+ --ui-type-body-lg: var(--ui-font-weight-normal) var(--ui-font-size-lg) /
122
+ var(--ui-line-height-normal) var(--ui-font-family);
123
+ --ui-type-body-md: var(--ui-font-weight-normal) var(--ui-font-size-md) /
124
+ var(--ui-line-height-normal) var(--ui-font-family);
125
+ --ui-type-body-sm: var(--ui-font-weight-normal) var(--ui-font-size-sm) /
126
+ var(--ui-line-height-normal) var(--ui-font-family);
127
+ --ui-type-label: var(--ui-font-weight-medium) var(--ui-font-size-xs) /
128
+ var(--ui-line-height-tight) var(--ui-font-family);
129
+ --ui-type-code: var(--ui-font-weight-normal) var(--ui-font-size-sm) /
130
+ var(--ui-line-height-code) var(--ui-font-mono);
131
+
132
+ /* The two roles the eight did not span. Both were measured on BOTH sides
133
+ * before being added (ADR-0074), which is the only sound basis for a role:
134
+ *
135
+ * control Medium 14 — 6 CSS rules (tab button, page button, step label,
136
+ * chip label, select label, chat action) and 75 Figma text nodes.
137
+ * action SemiBold 16 — 3 CSS rules (button, accordion trigger, chat
138
+ * header title) and 15 Figma text nodes.
139
+ *
140
+ * Both are TIGHT, and that was unanimous rather than chosen: every one of the
141
+ * 30 Figma nodes in these two combinations that states a leading at all states
142
+ * 125%, and .atl-button and .accordion-trigger state --ui-line-height-tight.
143
+ *
144
+ * They are named for the --ui-control-height-* ladder they live on: text on a
145
+ * control, not prose. A control's own VALUE text (an input's content) is not
146
+ * one of these — that stays a longhand, because its padding formula names the
147
+ * leading as an operand (ADR-0073).
148
+ */
149
+ --ui-type-control: var(--ui-font-weight-medium) var(--ui-font-size-sm) /
150
+ var(--ui-line-height-tight) var(--ui-font-family);
151
+ --ui-type-action: var(--ui-font-weight-semibold) var(--ui-font-size-md) /
152
+ var(--ui-line-height-tight) var(--ui-font-family);
153
+
154
+ /* The row roles (ADR-0085). Where `control` is the label ON a control and
155
+ * `action` is the text of a control that acts, these two are the text IN a
156
+ * row: a menu item, an option, a table cell, a checkbox or radio label. They
157
+ * are regular weight, not medium, and they sit at the two default sizes the
158
+ * row ladder uses — `row` at md for the standard rung, `row-sm` at sm for the
159
+ * compact one. Same tight leading as the rest of the ladder: a row's height
160
+ * comes from --ui-row-height-*, so its leading must not grow with the text.
161
+ *
162
+ * The ADR-0073 carve-out applies here exactly as it does above: a control's
163
+ * own VALUE text keeps its longhands. `row` describes what the row DISPLAYS,
164
+ * not what an input CONTAINS.
165
+ */
166
+ --ui-type-row: var(--ui-font-weight-normal) var(--ui-font-size-md) /
167
+ var(--ui-line-height-tight) var(--ui-font-family);
168
+ --ui-type-row-sm: var(--ui-font-weight-normal) var(--ui-font-size-sm) /
169
+ var(--ui-line-height-tight) var(--ui-font-family);
170
+
171
+ /* ── Colours · light mode (default) ────────────────────────── */
172
+
173
+ /* Primary — Conciso deep teal */
174
+
175
+ /* ── Teal ramp · primitive tier (ADR-0038) ──────────────────
176
+ * The brand hue as a tonal scale. Semantics below alias into it, so a step
177
+ * is declared once and every mode picks a different step of the same ramp.
178
+ *
179
+ * Annotations are CHECKED, not decorative — `check:contrast` re-measures
180
+ * every one and fails if a stated ratio is wrong or below AA:
181
+ * ★ the brand anchor
182
+ * T on surface(light|dark) N.NN this step carries normal text on that
183
+ * canvas at the stated WCAG 2.2 ratio
184
+ * Steps 50–500 are generated by perceptual (OKLab) interpolation between the
185
+ * shipping values; 100–300 and 700–900 ARE the shipping values, unchanged.
186
+ */
187
+ --ui-color-teal-50: #99f4f4;
188
+ --ui-color-teal-100: #87efef;
189
+ --ui-color-teal-200: #5ee5e5;
190
+ --ui-color-teal-300: #34d8d8; /* T on surface(dark) 10.83 */
191
+ --ui-color-teal-400: #27babd; /* T on surface(dark) 8.01 */
192
+ --ui-color-teal-500: #1a9ca3; /* T on surface(dark) 5.73 — lightest step that still carries text on dark */
193
+ --ui-color-teal-600: #0d7f89; /* T on surface(light) 4.76 — lightest step that still carries text on light */
194
+ --ui-color-teal-700: #006470; /* ★ · T on surface(light) 6.87 */
195
+ --ui-color-teal-800: #004e58; /* T on surface(light) 9.41 */
196
+ --ui-color-teal-900: #003a42; /* T on surface(light) 12.47 */
197
+
198
+ /* Status ramps — the same construction as the teal ramp above, for the four
199
+ * status families. Every step the components ship was already sitting where a
200
+ * 100–950 ramp would put it: ordering the shipping values by OKLab lightness
201
+ * reproduces the step numbers in all four families, measured. So the shipping
202
+ * values are unchanged and only the gaps are generated.
203
+ *
204
+ * No 50 step. Extrapolating past each family's lightest shipping tint lands on
205
+ * #ffffff in three of the four — measured — so a 50 would be a name for the
206
+ * surface, which --ui-color-surface already is. The teal ramp has one because
207
+ * its light end is a vivid cyan the dark theme reads text against.
208
+ *
209
+ * The 950 is the dark theme's tinted background. It continues the ramp's
210
+ * direction (darker and less chromatic) with a visible chroma step down from
211
+ * the 900, which is correct for a surface tint rather than a text colour.
212
+ *
213
+ * Steps missing a shipping value in one family but present in another are
214
+ * placed at the fraction the family that HAS both puts them at, rather than at
215
+ * the midpoint: red ships an 800, a 900 and a 950, and its 900 sits 24.8% of the
216
+ * way from 800 to 950, not 50%. Interpolating to the midpoint would have made
217
+ * green's and amber's 900 too dark by a visible step.
218
+ */
219
+
220
+ /* red — the danger family */
221
+ --ui-color-red-100: #fee2e2; /* T on surface(dark) 15.56 */
222
+ --ui-color-red-200: #fecaca; /* T on surface(dark) 13.14 */
223
+ --ui-color-red-300: #fca5a5; /* T on surface(dark) 10.02 */
224
+ --ui-color-red-400: #f87171; /* T on surface(dark) 6.87 */
225
+ --ui-color-red-500: #e35856; /* T on surface(dark) 5.25 */
226
+ --ui-color-red-600: #ce3d3b; /* T on surface(light) 4.82 */
227
+ --ui-color-red-700: #b91c1c; /* ★ · T on surface(light) 6.47 */
228
+ --ui-color-red-800: #991b1b; /* T on surface(light) 8.31 */
229
+ --ui-color-red-900: #7f1d1d; /* T on surface(light) 10.02 */
230
+ --ui-color-red-950: #3a1414; /* T on surface(light) 16.28 */
231
+
232
+ /* green — the success family */
233
+ --ui-color-green-100: #dcfce7; /* T on surface(dark) 17.31 */
234
+ --ui-color-green-200: #b4f6ca; /* T on surface(dark) 15.37 */
235
+ --ui-color-green-300: #86efac; /* T on surface(dark) 13.54 */
236
+ --ui-color-green-400: #4ade80; /* T on surface(dark) 10.91 */
237
+ --ui-color-green-500: #39be69; /* T on surface(dark) 7.91 */
238
+ --ui-color-green-600: #279e53; /* T on surface(dark) 5.52 */
239
+ --ui-color-green-700: #15803d; /* ★ · T on surface(light) 5.02 */
240
+ --ui-color-green-800: #166534; /* T on surface(light) 7.13 */
241
+ --ui-color-green-900: #15582f; /* T on surface(light) 8.51 */
242
+ --ui-color-green-950: #0f3320; /* T on surface(light) 13.86 */
243
+
244
+ /* amber — the warning family */
245
+ --ui-color-amber-100: #fef3c7; /* T on surface(dark) 17.07 */
246
+ --ui-color-amber-200: #fde68a; /* T on surface(dark) 15.26 */
247
+ --ui-color-amber-300: #fcd361; /* T on surface(dark) 13.24 */
248
+ --ui-color-amber-400: #fbbf24; /* T on surface(dark) 11.39 */
249
+ --ui-color-amber-500: #e49b1b; /* T on surface(dark) 8.15 */
250
+ --ui-color-amber-600: #cc7712; /* T on surface(dark) 5.63 */
251
+ --ui-color-amber-700: #b45309; /* ★ · T on surface(light) 5.02 */
252
+ --ui-color-amber-800: #854d0e; /* T on surface(light) 6.85 */
253
+ --ui-color-amber-900: #714311; /* T on surface(light) 8.36 */
254
+ --ui-color-amber-950: #3a2510; /* T on surface(light) 14.46 */
255
+
256
+ /* sky — the info family */
257
+ --ui-color-sky-100: #e0f2fe; /* T on surface(dark) 16.57 */
258
+ --ui-color-sky-200: #bae6fd; /* T on surface(dark) 14.33 */
259
+ --ui-color-sky-300: #82d2fb; /* T on surface(dark) 11.37 */
260
+ --ui-color-sky-400: #38bdf8; /* T on surface(dark) 8.87 */
261
+ --ui-color-sky-500: #28a0da; /* T on surface(dark) 6.46 */
262
+ --ui-color-sky-600: #1784bd; /* T on surface(dark) 4.59 */
263
+ --ui-color-sky-700: #0369a1; /* ★ · T on surface(light) 5.93 */
264
+ --ui-color-sky-800: #0a5784; /* T on surface(light) 7.75 */
265
+ --ui-color-sky-900: #0c4a6e; /* T on surface(light) 9.46 */
266
+ --ui-color-sky-950: #102338; /* T on surface(light) 15.91 */
267
+
268
+ --ui-color-primary: var(--ui-color-teal-700);
269
+ --ui-color-primary-hover: var(--ui-color-teal-800);
270
+ --ui-color-primary-active: var(--ui-color-teal-900);
271
+ --ui-color-primary-light: rgba(0, 100, 112, 0.08);
272
+
273
+ /* Secondary (legacy — kept for components that opt in) */
274
+ --ui-color-secondary: #475569;
275
+ --ui-color-secondary-hover: #334155;
276
+ --ui-color-secondary-active: #1e293b;
277
+
278
+ /* Semantic */
279
+ --ui-color-danger: var(--ui-color-red-700);
280
+ --ui-color-danger-hover: var(--ui-color-red-800);
281
+ --ui-color-danger-active: var(--ui-color-red-900);
282
+ --ui-color-success: var(--ui-color-green-700);
283
+ --ui-color-warning: var(--ui-color-amber-700);
284
+ --ui-color-info: var(--ui-color-sky-700);
285
+
286
+ /* Semantic — AA-safe dark-text-on-tinted-bg pairs (Badge / Alert / Toast) */
287
+ --ui-color-success-bg: var(--ui-color-green-100);
288
+ --ui-color-success-text: var(--ui-color-green-800);
289
+ --ui-color-warning-bg: var(--ui-color-amber-100);
290
+ --ui-color-warning-text: var(--ui-color-amber-800);
291
+ --ui-color-danger-bg: var(--ui-color-red-100);
292
+ --ui-color-danger-text: var(--ui-color-red-800);
293
+ --ui-color-info-bg: var(--ui-color-sky-100);
294
+ --ui-color-info-text: var(--ui-color-sky-900);
295
+
296
+ /* Surfaces — clean white + cool slate */
297
+ --ui-color-surface: #ffffff;
298
+ --ui-color-surface-raised: #f8fafc;
299
+ --ui-color-surface-sunken: #f1f5f9;
300
+ --ui-color-overlay: rgba(0, 0, 0, 0.5);
301
+
302
+ /* Borders — split decorative from functional per WCAG 1.4.11 */
303
+ --ui-color-border: #e2e8f0; /* decorative */
304
+ --ui-color-border-hover: #cbd5e1;
305
+ --ui-color-border-strong: #64748b; /* functional ≥3:1 */
306
+
307
+ /* Text */
308
+ --ui-color-text: #0f172a;
309
+ --ui-color-text-muted: #475569;
310
+ --ui-color-text-on-primary: #ffffff;
311
+ --ui-color-text-on-secondary: #ffffff;
312
+ --ui-color-text-on-danger: #ffffff;
313
+ --ui-color-text-on-success: #ffffff;
314
+
315
+ /* Brand palette — Conciso reference, opt-in for components that need it */
316
+ --ui-color-brand-corporate: #00bebe;
317
+ --ui-color-brand-agile: #00d296;
318
+ --ui-color-brand-architecture: #009696;
319
+ --ui-color-brand-development: #00b4ff;
320
+ --ui-color-brand-petrol: #005064;
321
+ --ui-color-brand-ai: #b5e61c;
322
+ --ui-color-brand-light-blue: #00ebff;
323
+ --ui-color-brand-light-green: #a0fa50;
324
+ --ui-opacity-disabled: 0.5;
325
+
326
+ /* Border radius — bumped for modern feel */
327
+ --ui-radius-sm: 0.5rem; /* was 0.375rem */
328
+ --ui-radius-md: 0.625rem; /* was 0.5rem */
329
+ --ui-radius-lg: 0.875rem; /* was 0.75rem */
330
+ --ui-radius-xl: 1.25rem; /* was 1rem */
331
+ --ui-radius-full: 9999px;
332
+
333
+ /* ── Border widths ──────────────────────────────────────────────────────────
334
+ * Two steps, because the library only ever needed two: the hairline that
335
+ * separates surfaces (133 uses) and the heavier weight that marks a control
336
+ * (12 uses — the avatar status ring, the stepper circle, the checkbox mark,
337
+ * the table header rule). The 1.5px weight nine control outlines used is
338
+ * folded into `thick`: a half pixel renders blurry at 1x device-pixel-ratio
339
+ * and the two weights were never distinguishable side by side.
340
+ * Not here on purpose: AtlToast's 4px accent bar and AtlRadio's 6px dot are
341
+ * graphic devices drawn with `border-width`, not border weights. See ADR-0047. */
342
+ --ui-border-width: 1px;
343
+ --ui-border-width-thick: 2px;
344
+
345
+ /* Spacing */
346
+ --ui-spacing-1: 0.25rem;
347
+ --ui-spacing-2: 0.5rem;
348
+ --ui-spacing-3: 0.75rem;
349
+ --ui-spacing-4: 1rem;
350
+ --ui-spacing-5: 1.25rem;
351
+ --ui-spacing-6: 1.5rem;
352
+ --ui-spacing-8: 2rem;
353
+ --ui-spacing-10: 2.5rem;
354
+ --ui-spacing-12: 3rem;
355
+ --ui-spacing-16: 4rem;
356
+
357
+ /* Shadows — slate-tinted dual-layer (ambient + key light) */
358
+ --ui-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
359
+ --ui-shadow-sm:
360
+ 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
361
+ --ui-shadow-md:
362
+ 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
363
+ --ui-shadow-lg:
364
+ 0 10px 15px -3px rgba(15, 23, 42, 0.08),
365
+ 0 4px 6px -4px rgba(15, 23, 42, 0.04);
366
+ --ui-shadow-xl:
367
+ 0 20px 25px -5px rgba(15, 23, 42, 0.1),
368
+ 0 8px 10px -6px rgba(15, 23, 42, 0.04);
369
+
370
+ /* Motion */
371
+ --ui-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
372
+ --ui-ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
373
+ --ui-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
374
+
375
+ --ui-duration-fast: 150ms;
376
+ --ui-duration-normal: 200ms;
377
+ --ui-duration-slow: 300ms;
378
+
379
+ --ui-transition-fast: var(--ui-duration-fast) var(--ui-ease-out);
380
+ --ui-transition-normal: var(--ui-duration-normal) var(--ui-ease-out);
381
+ --ui-transition-slow: var(--ui-duration-slow) var(--ui-ease-out);
382
+
383
+ /* Focus ring — double-ring for light & dark background compatibility.
384
+ * Declared once: the inner ring tracks the surface and the outer the accent,
385
+ * both of which are mode-dependent, so the ring follows the mode for free.
386
+ * The danger variant exists so an invalid control does not have to restate
387
+ * the formula (it did, in atl-input.css, until 2026-08-26). */
388
+ --ui-focus-ring:
389
+ 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-primary);
390
+ --ui-focus-ring-danger:
391
+ 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-danger);
392
+
393
+ /* Form controls */
394
+ --ui-color-input-bg: var(--ui-color-surface-sunken);
395
+ --ui-color-input-bg-focus: var(--ui-color-surface);
396
+ --ui-color-input-border: var(--ui-color-border-strong);
397
+ --ui-color-input-border-hover: #475569;
398
+ --ui-color-input-border-focus: var(--ui-color-primary);
399
+ --ui-color-input-border-invalid: var(--ui-color-danger);
400
+ --ui-color-placeholder: #64748b;
401
+ --ui-color-error-text: var(--ui-color-danger-text);
402
+
403
+ /* Z-index scale */
404
+ --ui-z-base: 0;
405
+ --ui-z-dropdown: 100;
406
+ --ui-z-overlay: 200;
407
+ --ui-z-modal: 300;
408
+ --ui-z-toast: 400;
409
+ }
410
+
411
+ /* ── Colours · dark mode ───────────────────────────────────── */
412
+
413
+ @media (prefers-color-scheme: dark) {
414
+ :root {
415
+ --ui-color-primary: var(--ui-color-teal-300);
416
+ --ui-color-primary-hover: var(--ui-color-teal-200);
417
+ --ui-color-primary-active: var(--ui-color-teal-100);
418
+ --ui-color-primary-light: rgba(52, 216, 216, 0.15);
419
+
420
+ --ui-color-secondary: #94a3b8;
421
+ --ui-color-secondary-hover: #cbd5e1;
422
+ --ui-color-secondary-active: #e2e8f0;
423
+
424
+ --ui-color-danger: var(--ui-color-red-400);
425
+ --ui-color-danger-hover: var(--ui-color-red-300);
426
+ --ui-color-danger-active: var(--ui-color-red-200);
427
+ --ui-color-success: var(--ui-color-green-400);
428
+ --ui-color-warning: var(--ui-color-amber-400);
429
+ --ui-color-info: var(--ui-color-sky-400);
430
+
431
+ --ui-color-success-bg: var(--ui-color-green-950);
432
+ --ui-color-success-text: var(--ui-color-green-300);
433
+ --ui-color-warning-bg: var(--ui-color-amber-950);
434
+ --ui-color-warning-text: var(--ui-color-amber-200);
435
+ --ui-color-danger-bg: var(--ui-color-red-950);
436
+ --ui-color-danger-text: var(--ui-color-red-300);
437
+ --ui-color-info-bg: var(--ui-color-sky-950);
438
+ --ui-color-info-text: var(--ui-color-sky-200);
439
+
440
+ --ui-color-surface: #0a1116;
441
+ --ui-color-surface-raised: #131c24;
442
+ --ui-color-surface-sunken: #060c10;
443
+ --ui-color-overlay: rgba(0, 0, 0, 0.7);
444
+
445
+ --ui-color-border: #1e293b;
446
+ --ui-color-border-hover: #334155;
447
+ --ui-color-border-strong: #64748b;
448
+
449
+ --ui-color-text: #f1f5f9;
450
+ --ui-color-text-muted: #94a3b8;
451
+ --ui-color-text-on-primary: #0a1116;
452
+ --ui-color-text-on-secondary: #0f172a;
453
+ --ui-color-text-on-danger: #0a1116;
454
+ --ui-color-text-on-success: #0a1116;
455
+
456
+ --ui-opacity-disabled: 0.65;
457
+
458
+ --ui-color-input-border: var(--ui-color-border-strong);
459
+ --ui-color-input-border-hover: #94a3b8;
460
+ --ui-color-placeholder: #94a3b8;
461
+
462
+ --ui-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
463
+ --ui-shadow-sm:
464
+ 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
465
+ --ui-shadow-md:
466
+ 0 4px 6px -1px rgba(0, 0, 0, 0.45), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
467
+ --ui-shadow-lg:
468
+ 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
469
+ --ui-shadow-xl:
470
+ 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
471
+ }
472
+ }
473
+
474
+ [data-theme='dark'] {
475
+ --ui-color-primary: var(--ui-color-teal-300);
476
+ --ui-color-primary-hover: var(--ui-color-teal-200);
477
+ --ui-color-primary-active: var(--ui-color-teal-100);
478
+ --ui-color-primary-light: rgba(52, 216, 216, 0.15);
479
+
480
+ --ui-color-secondary: #94a3b8;
481
+ --ui-color-secondary-hover: #cbd5e1;
482
+ --ui-color-secondary-active: #e2e8f0;
483
+
484
+ --ui-color-danger: var(--ui-color-red-400);
485
+ --ui-color-danger-hover: var(--ui-color-red-300);
486
+ --ui-color-danger-active: var(--ui-color-red-200);
487
+ --ui-color-success: var(--ui-color-green-400);
488
+ --ui-color-warning: var(--ui-color-amber-400);
489
+ --ui-color-info: var(--ui-color-sky-400);
490
+
491
+ --ui-color-success-bg: var(--ui-color-green-950);
492
+ --ui-color-success-text: var(--ui-color-green-300);
493
+ --ui-color-warning-bg: var(--ui-color-amber-950);
494
+ --ui-color-warning-text: var(--ui-color-amber-200);
495
+ --ui-color-danger-bg: var(--ui-color-red-950);
496
+ --ui-color-danger-text: var(--ui-color-red-300);
497
+ --ui-color-info-bg: var(--ui-color-sky-950);
498
+ --ui-color-info-text: var(--ui-color-sky-200);
499
+
500
+ --ui-color-surface: #0a1116;
501
+ --ui-color-surface-raised: #131c24;
502
+ --ui-color-surface-sunken: #060c10;
503
+ --ui-color-overlay: rgba(0, 0, 0, 0.7);
504
+
505
+ --ui-color-border: #1e293b;
506
+ --ui-color-border-hover: #334155;
507
+ --ui-color-border-strong: #64748b;
508
+
509
+ --ui-color-text: #f1f5f9;
510
+ --ui-color-text-muted: #94a3b8;
511
+ --ui-color-text-on-primary: #0a1116;
512
+ --ui-color-text-on-secondary: #0f172a;
513
+ --ui-color-text-on-danger: #0a1116;
514
+ --ui-color-text-on-success: #0a1116;
515
+
516
+ --ui-opacity-disabled: 0.65;
517
+
518
+ --ui-color-input-border: var(--ui-color-border-strong);
519
+ --ui-color-input-border-hover: #94a3b8;
520
+ --ui-color-placeholder: #94a3b8;
521
+
522
+ --ui-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
523
+ --ui-shadow-sm:
524
+ 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
525
+ --ui-shadow-md:
526
+ 0 4px 6px -1px rgba(0, 0, 0, 0.45), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
527
+ --ui-shadow-lg:
528
+ 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
529
+ --ui-shadow-xl:
530
+ 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
531
+ }
532
+
533
+ /* Explicit light theme — declared last so it wins over prefers-color-scheme: dark */
534
+ [data-theme='light'] {
535
+ --ui-color-primary: var(--ui-color-teal-700);
536
+ --ui-color-primary-hover: var(--ui-color-teal-800);
537
+ --ui-color-primary-active: var(--ui-color-teal-900);
538
+ --ui-color-primary-light: rgba(0, 100, 112, 0.08);
539
+
540
+ --ui-color-secondary: #475569;
541
+ --ui-color-secondary-hover: #334155;
542
+ --ui-color-secondary-active: #1e293b;
543
+
544
+ --ui-color-danger: var(--ui-color-red-700);
545
+ --ui-color-danger-hover: var(--ui-color-red-800);
546
+ --ui-color-danger-active: var(--ui-color-red-900);
547
+ --ui-color-success: var(--ui-color-green-700);
548
+ --ui-color-warning: var(--ui-color-amber-700);
549
+ --ui-color-info: var(--ui-color-sky-700);
550
+
551
+ --ui-color-success-bg: var(--ui-color-green-100);
552
+ --ui-color-success-text: var(--ui-color-green-800);
553
+ --ui-color-warning-bg: var(--ui-color-amber-100);
554
+ --ui-color-warning-text: var(--ui-color-amber-800);
555
+ --ui-color-danger-bg: var(--ui-color-red-100);
556
+ --ui-color-danger-text: var(--ui-color-red-800);
557
+ --ui-color-info-bg: var(--ui-color-sky-100);
558
+ --ui-color-info-text: var(--ui-color-sky-900);
559
+
560
+ --ui-color-surface: #ffffff;
561
+ --ui-color-surface-raised: #f8fafc;
562
+ --ui-color-surface-sunken: #f1f5f9;
563
+ --ui-color-overlay: rgba(0, 0, 0, 0.5);
564
+
565
+ --ui-color-border: #e2e8f0;
566
+ --ui-color-border-hover: #cbd5e1;
567
+ --ui-color-border-strong: #64748b;
568
+
569
+ --ui-color-text: #0f172a;
570
+ --ui-color-text-muted: #475569;
571
+ --ui-color-text-on-primary: #ffffff;
572
+ --ui-color-text-on-secondary: #ffffff;
573
+ --ui-color-text-on-danger: #ffffff;
574
+ --ui-color-text-on-success: #ffffff;
575
+
576
+ --ui-opacity-disabled: 0.5;
577
+
578
+ --ui-color-input-border: var(--ui-color-border-strong);
579
+ --ui-color-input-border-hover: #475569;
580
+ --ui-color-placeholder: #64748b;
581
+
582
+ --ui-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
583
+ --ui-shadow-sm:
584
+ 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
585
+ --ui-shadow-md:
586
+ 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
587
+ --ui-shadow-lg:
588
+ 0 10px 15px -3px rgba(15, 23, 42, 0.08),
589
+ 0 4px 6px -4px rgba(15, 23, 42, 0.04);
590
+ --ui-shadow-xl:
591
+ 0 20px 25px -5px rgba(15, 23, 42, 0.1),
592
+ 0 8px 10px -6px rgba(15, 23, 42, 0.04);
593
+ }
594
+
595
+ @media (prefers-reduced-motion: reduce) {
596
+ :root {
597
+ --ui-duration-fast: 0ms;
598
+ --ui-duration-normal: 0ms;
599
+ --ui-duration-slow: 0ms;
600
+ --ui-ease-spring: ease;
601
+ }
602
+ }