@filipgutica/design-system 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +20 -8
  2. package/dist/class/base.css +188 -0
  3. package/dist/class/themes/graphite-indigo.css +133 -0
  4. package/dist/themes/graphite-indigo.css +9 -0
  5. package/dist/tokens.d.ts +117 -0
  6. package/dist/tokens.js +222 -0
  7. package/dist/tokens.json +218 -0
  8. package/fonts/OFL-IBM-Plex-Mono.txt +93 -0
  9. package/fonts/OFL-IBM-Plex-Sans.txt +93 -0
  10. package/fonts/fonts.css +55 -0
  11. package/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  12. package/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
  13. package/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
  14. package/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  15. package/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
  16. package/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
  17. package/language/DESIGN.md +29 -29
  18. package/language/components.html +189 -189
  19. package/language/components.md +55 -55
  20. package/language/decisions.md +96 -18
  21. package/language/docs.html +20 -20
  22. package/language/product.html +22 -22
  23. package/language/reference.html +213 -213
  24. package/language/tokens.css +142 -143
  25. package/language/visualizations/build-count-report.mjs +4 -2
  26. package/language/visualizations/report.css +2 -2
  27. package/package.json +33 -6
  28. package/scripts/build-tokens.mjs +0 -236
  29. package/tokens/graphite-indigo.json +0 -298
  30. /package/language/{themes → editor-themes}/graphite-indigo/LICENSE +0 -0
  31. /package/language/{themes → editor-themes}/graphite-indigo/README.md +0 -0
  32. /package/language/{themes → editor-themes}/graphite-indigo/SOURCE.json +0 -0
  33. /package/language/{themes → editor-themes}/graphite-indigo/THIRD_PARTY_NOTICES.md +0 -0
  34. /package/language/{themes → editor-themes}/graphite-indigo/graphite-indigo.t3-theme.json +0 -0
  35. /package/language/{themes → editor-themes}/graphite-indigo/package.json +0 -0
  36. /package/language/{themes → editor-themes}/graphite-indigo/themes/graphite-indigo-dark-color-theme.json +0 -0
  37. /package/language/{themes → editor-themes}/graphite-indigo/themes/graphite-indigo-light-color-theme.json +0 -0
@@ -20,28 +20,28 @@
20
20
  /* ---------- Shared recipes ---------- */
21
21
  .icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
22
22
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
23
- .muted { color: var(--text-muted); }
23
+ .muted { color: var(--color-muted); }
24
24
 
25
25
  /* ================= Core ================= */
26
26
 
27
27
  /* Button */
28
- .btn { --depth: var(--shadow-raise); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-md); padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-md); background: var(--accent); color: var(--accent-text); box-shadow: var(--depth); font: var(--weight-medium) var(--text-md) / 1.25 var(--font-sans); letter-spacing: -0.01em; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
28
+ .btn { --depth: var(--shadow-raise); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-md); padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-control); background: var(--color-accent); color: var(--color-accent-text); box-shadow: var(--depth); font: var(--weight-medium) var(--text-md) / 1.25 var(--font-ui); letter-spacing: -0.01em; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
29
29
  .btn[data-size="sm"] { min-height: var(--control-sm); padding: 0 0.625rem; font-size: var(--text-sm); }
30
30
  .btn[data-size="lg"] { min-height: var(--control-lg); padding: 0 var(--space-4); font-size: var(--text-lg); }
31
- .btn:is(:hover, .is-hover):not(:disabled) { background: var(--button-hover); }
32
- .btn.secondary { background: var(--control-thumb); color: var(--text); }
33
- .btn.secondary:is(:hover, .is-hover):not(:disabled) { background: color-mix(in srgb, var(--text) 8%, var(--control-thumb)); }
34
- .btn.ghost { --depth: none; background: transparent; color: var(--text-muted); }
35
- .btn.ghost:is(:hover, .is-hover):not(:disabled) { background: var(--row-hover); color: var(--text); }
36
- /* Danger rises like the other filled variants; its text mixes the hue toward --text, as status badges do. */
37
- .btn.danger { background: var(--danger-soft); color: light-dark(color-mix(in srgb, var(--danger) 75%, var(--text)), color-mix(in srgb, var(--danger) 85%, var(--text))); }
38
- .btn.danger:is(:hover, .is-hover):not(:disabled) { background: color-mix(in srgb, var(--danger) 10%, var(--danger-soft)); }
39
- .btn.text { --depth: none; min-height: auto; padding: var(--space-1); background: transparent; color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; }
31
+ .btn:is(:hover, .is-hover):not(:disabled) { background: var(--color-button-hover); }
32
+ .btn.secondary { background: var(--color-control-thumb); color: var(--color-text); }
33
+ .btn.secondary:is(:hover, .is-hover):not(:disabled) { background: color-mix(in srgb, var(--color-text) 8%, var(--color-control-thumb)); }
34
+ .btn.ghost { --depth: none; background: transparent; color: var(--color-muted); }
35
+ .btn.ghost:is(:hover, .is-hover):not(:disabled) { background: var(--color-row-hover); color: var(--color-text); }
36
+ /* Danger rises like the other filled variants; its text mixes the hue toward --color-text, as status badges do. */
37
+ .btn.danger { background: var(--color-error-surface); color: light-dark(color-mix(in srgb, var(--color-error) 75%, var(--color-text)), color-mix(in srgb, var(--color-error) 85%, var(--color-text))); }
38
+ .btn.danger:is(:hover, .is-hover):not(:disabled) { background: color-mix(in srgb, var(--color-error) 10%, var(--color-error-surface)); }
39
+ .btn.text { --depth: none; min-height: auto; padding: var(--space-1); background: transparent; color: var(--color-link); text-decoration: underline; text-underline-offset: 0.2em; }
40
40
  .btn.text:is(:hover, .is-hover):not(:disabled) { background: transparent; }
41
41
  /* A press sinks the button 1px and changes its fill, so the click reads at a glance. */
42
- .btn:not(.secondary, .ghost, .danger, .text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: var(--button-hover); }
43
- .btn:is(.secondary, .ghost):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: var(--field); }
44
- .btn.danger:is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: color-mix(in srgb, var(--danger) 16%, var(--danger-soft)); }
42
+ .btn:not(.secondary, .ghost, .danger, .text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: var(--color-button-hover); }
43
+ .btn:is(.secondary, .ghost):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: var(--color-well); }
44
+ .btn.danger:is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: color-mix(in srgb, var(--color-error) 16%, var(--color-error-surface)); }
45
45
  .btn:not(.text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { --depth: var(--shadow-sink); transform: translateY(1px); }
46
46
  .btn:disabled { --depth: none; opacity: 0.58; cursor: not-allowed; }
47
47
  /* A link styled as a button keeps no underline. It has no disabled state: use <button disabled>. */
@@ -58,22 +58,22 @@
58
58
  The recipe centres its content, so an icon-only action's SVG sits on the box centre. Use an SVG icon,
59
59
  never a text glyph such as ×: a font draws a glyph's ink off its box centre.
60
60
  :where keeps the base below each component's own size and layout. */
61
- :where(.quiet-action) { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; font: inherit; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
62
- .quiet-action:is(:hover, .is-hover):where(:not(:disabled)) { color: var(--text); background: color-mix(in srgb, currentColor 12%, transparent); }
61
+ :where(.quiet-action) { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; font: inherit; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
62
+ .quiet-action:is(:hover, .is-hover):where(:not(:disabled)) { color: var(--color-text); background: color-mix(in srgb, currentColor 12%, transparent); }
63
63
  .quiet-action:is(:active, .is-active):where(:not(:disabled)) { background: color-mix(in srgb, currentColor 18%, transparent); }
64
64
  .quiet-action:disabled { opacity: 0.58; cursor: not-allowed; }
65
65
 
66
66
  /* Fields: input, textarea, select */
67
67
  .field { display: grid; gap: 0.375rem; justify-items: start; min-width: 0; }
68
68
  .field-label { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
69
- .field-description { font-size: var(--text-sm); color: var(--text-muted); }
70
- .field-error { font-size: var(--text-sm); color: var(--danger); }
71
- .input, .select, .textarea { --depth: var(--field-shadow); width: 100%; border: 1px solid var(--field-edge); border-radius: var(--radius-field); background: var(--field-bg); box-shadow: var(--depth); color: var(--text); font: var(--text-md) / 1.35 var(--font-sans); }
69
+ .field-description { font-size: var(--text-sm); color: var(--color-muted); }
70
+ .field-error { font-size: var(--text-sm); color: var(--color-error); }
71
+ .input, .select, .textarea { --depth: var(--shadow-field); width: 100%; border: 1px solid var(--color-field-edge); border-radius: var(--radius-field); background: var(--color-field-bg); box-shadow: var(--depth); color: var(--color-text); font: var(--text-md) / 1.35 var(--font-ui); }
72
72
  .input, .select { height: var(--control-md); padding: 0 0.625rem; }
73
73
  .input[data-size="sm"], .select[data-size="sm"] { height: var(--control-sm); padding-inline: 0.5625rem; font-size: var(--text-sm); }
74
74
  .input[data-size="lg"], .select[data-size="lg"] { height: var(--control-lg); padding-inline: 0.6875rem; font-size: var(--text-lg); }
75
75
  .textarea { display: block; min-height: 5.5rem; padding: 0.625rem; resize: vertical; }
76
- :is(.input, .textarea)::placeholder { color: var(--text-muted); opacity: 1; }
76
+ :is(.input, .textarea)::placeholder { color: var(--color-muted); opacity: 1; }
77
77
  /* Every size keeps the trailing room for the chevron. */
78
78
  .select, .select[data-size] { padding-right: 1.75rem; }
79
79
  /* The chevron is drawn in currentColor, so it follows the text in both themes. */
@@ -85,57 +85,57 @@
85
85
  .select { position: relative; display: flex; align-items: center; background-image: none; cursor: pointer; }
86
86
  .select:disabled { cursor: not-allowed; }
87
87
  .select::picker-icon { display: none; }
88
- .select::after { content: ""; position: absolute; right: var(--space-3); width: var(--space-2); height: var(--space-2); border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: translateY(-2px) rotate(45deg); }
89
- .select::picker(select) { min-width: anchor-size(width); max-height: min(20rem, 50dvh); overflow: auto; margin-block: var(--space-1); padding: var(--space-1); border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-popover); font: var(--text-md) / var(--leading) var(--font-sans); }
90
- .select option { min-height: var(--control-sm); padding: var(--space-2) var(--space-3); border-radius: calc(var(--radius-lg) - var(--space-1)); cursor: pointer; }
91
- .select option:checked { background: var(--row-selected); }
92
- .select option:hover { background: var(--row-hover); }
88
+ .select::after { content: ""; position: absolute; right: var(--space-3); width: var(--space-2); height: var(--space-2); border-right: 1.5px solid var(--color-muted); border-bottom: 1.5px solid var(--color-muted); transform: translateY(-2px) rotate(45deg); }
89
+ .select::picker(select) { min-width: anchor-size(width); max-height: min(20rem, 50dvh); overflow: auto; margin-block: var(--space-1); padding: var(--space-1); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); font: var(--text-md) / var(--leading) var(--font-ui); }
90
+ .select option { min-height: var(--control-sm); padding: var(--space-2) var(--space-3); border-radius: calc(var(--radius-panel) - var(--space-1)); cursor: pointer; }
91
+ .select option:checked { background: var(--color-row-selected); }
92
+ .select option:hover { background: var(--color-row-hover); }
93
93
  /* Inset: the picker scrolls. */
94
- .select option:focus-visible { background: var(--row-hover); outline: var(--focus-width) solid var(--focus); outline-offset: calc(var(--focus-width) * -1); }
95
- .select option::checkmark { order: 1; margin-left: auto; color: var(--accent); }
94
+ .select option:focus-visible { background: var(--color-row-hover); outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
95
+ .select option::checkmark { order: 1; margin-left: auto; color: var(--color-accent); }
96
96
  @media (pointer: coarse) { .select option { min-height: var(--control-lg); } }
97
97
  }
98
- :is(.input, .select, .textarea)[aria-invalid="true"] { border-color: var(--danger); }
98
+ :is(.input, .select, .textarea)[aria-invalid="true"] { border-color: var(--color-error); }
99
99
  /* Search: a field wrapper with a leading magnifier. The wrapper carries the field look and the width;
100
100
  the input inside takes the free space, so the clear cross sits at the trailing edge. */
101
- .search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0 var(--space-2); border: 1px solid var(--field-edge); border-radius: var(--radius-field); background: var(--field-bg); box-shadow: var(--field-shadow); color: var(--text-muted); min-width: 0; }
102
- .search input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--text-sm); flex: 1; min-width: 0; }
103
- .search input::placeholder { color: var(--text-muted); }
101
+ .search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0 var(--space-2); border: 1px solid var(--color-field-edge); border-radius: var(--radius-field); background: var(--color-field-bg); box-shadow: var(--shadow-field); color: var(--color-muted); min-width: 0; }
102
+ .search input { border: 0; outline: 0; background: transparent; color: var(--color-text); font: inherit; font-size: var(--text-sm); flex: 1; min-width: 0; }
103
+ .search input::placeholder { color: var(--color-muted); }
104
104
  /* The native search clear button, quieted to a thin muted cross drawn with a mask. */
105
- .search input::-webkit-search-cancel-button { width: 0.75rem; height: 0.75rem; margin-inline-start: var(--space-2); background: var(--text-muted); cursor: pointer; -webkit-appearance: none; appearance: none; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
106
- .search input::-webkit-search-cancel-button:hover { background: var(--text); }
105
+ .search input::-webkit-search-cancel-button { width: 0.75rem; height: 0.75rem; margin-inline-start: var(--space-2); background: var(--color-muted); cursor: pointer; -webkit-appearance: none; appearance: none; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
106
+ .search input::-webkit-search-cancel-button:hover { background: var(--color-text); }
107
107
  /* A disabled field drops into the grey well (the same fill as rest in dark) and loses its shadow. background-color keeps the select chevron. */
108
- :is(.input, .select, .textarea):disabled { background-color: var(--field); box-shadow: none; opacity: 0.58; cursor: not-allowed; }
108
+ :is(.input, .select, .textarea):disabled { background-color: var(--color-well); box-shadow: none; opacity: 0.58; cursor: not-allowed; }
109
109
  /* A static drawing of the open picker; a native select cannot be pinned open. */
110
- .picker { display: grid; width: 220px; max-width: 100%; margin: 0; padding: var(--space-1); list-style: none; border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-popover); }
111
- .picker li { display: flex; align-items: center; min-height: var(--control-sm); padding: var(--space-2) var(--space-3); border-radius: calc(var(--radius-lg) - var(--space-1)); }
112
- .picker li.is-hover { background: var(--row-hover); }
113
- .picker li[aria-selected="true"] { background: var(--row-selected); }
114
- .picker li[aria-selected="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); }
110
+ .picker { display: grid; width: 220px; max-width: 100%; margin: 0; padding: var(--space-1); list-style: none; border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); }
111
+ .picker li { display: flex; align-items: center; min-height: var(--control-sm); padding: var(--space-2) var(--space-3); border-radius: calc(var(--radius-panel) - var(--space-1)); }
112
+ .picker li.is-hover { background: var(--color-row-hover); }
113
+ .picker li[aria-selected="true"] { background: var(--color-row-selected); }
114
+ .picker li[aria-selected="true"]::after { content: "✓"; margin-left: auto; color: var(--color-accent); }
115
115
 
116
116
  /* Checkbox and radio: native inputs drawn with tokens. */
117
117
  .choices { display: flex; flex-wrap: wrap; gap: var(--space-4); }
118
118
  .check { display: inline-flex; align-items: center; gap: 0.5625rem; min-height: var(--control-md); cursor: pointer; }
119
- .check input { --depth: none; appearance: none; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); cursor: inherit; }
119
+ .check input { --depth: none; appearance: none; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--color-border); border-radius: var(--radius-inline); background: var(--color-surface-raised); cursor: inherit; }
120
120
  .check[data-size="sm"] { min-height: var(--control-sm); font-size: var(--text-sm); }
121
121
  .check[data-size="lg"] { min-height: var(--control-lg); font-size: var(--text-lg); }
122
122
  .check[data-size="sm"] input { width: 16px; height: 16px; }
123
123
  .check[data-size="lg"] input { width: 20px; height: 20px; }
124
124
  .check input[type="radio"] { border-radius: 50%; }
125
- .check input:checked { border-color: var(--accent); background: var(--accent); }
126
- .check input[type="checkbox"]:checked::before { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
127
- .check input[type="radio"]:checked { border-width: 5px; background: var(--surface-raised); }
125
+ .check input:checked { border-color: var(--color-accent); background: var(--color-accent); }
126
+ .check input[type="checkbox"]:checked::before { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid var(--color-accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
127
+ .check input[type="radio"]:checked { border-width: 5px; background: var(--color-surface-raised); }
128
128
  .check:has(input:disabled) { opacity: 0.58; cursor: not-allowed; }
129
129
 
130
130
  /* Radio card: the native radio owns selection; the label owns the card surface. */
131
131
  .radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); width: min(100%, 420px); border: 0; margin: 0; padding: 0; }
132
- .radio-card { --depth: var(--shadow-raise); position: relative; display: grid; gap: var(--space-1); min-width: 0; padding: var(--space-3); padding-right: var(--space-8); border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--depth); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out); }
133
- .radio-card:is(:hover, .is-hover):not(:has(input:checked, input:disabled)) { background: color-mix(in srgb, var(--surface-hover) 45%, var(--surface-raised)); }
132
+ .radio-card { --depth: var(--shadow-raise); position: relative; display: grid; gap: var(--space-1); min-width: 0; padding: var(--space-3); padding-right: var(--space-8); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--depth); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out); }
133
+ .radio-card:is(:hover, .is-hover):not(:has(input:checked, input:disabled)) { background: color-mix(in srgb, var(--color-surface-muted) 45%, var(--color-surface-raised)); }
134
134
  /* Depth and a check badge show the choice, without an accent ring. */
135
- .radio-card:has(input:checked) { --depth: var(--shadow-sink); background: var(--field); }
135
+ .radio-card:has(input:checked) { --depth: var(--shadow-sink); background: var(--color-well); }
136
136
  .radio-card:has(input:disabled) { opacity: 0.58; cursor: not-allowed; }
137
- .radio-card input { appearance: none; position: absolute; top: var(--space-3); right: var(--space-3); width: 16px; height: 16px; margin: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-raised); color: var(--accent-text); cursor: inherit; }
138
- .radio-card input:checked { border-color: var(--accent); background: var(--accent); }
137
+ .radio-card input { appearance: none; position: absolute; top: var(--space-3); right: var(--space-3); width: 16px; height: 16px; margin: 0; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface-raised); color: var(--color-accent-text); cursor: inherit; }
138
+ .radio-card input:checked { border-color: var(--color-accent); background: var(--color-accent); }
139
139
  .radio-card input:checked::after { content: ""; position: absolute; inset: 2px 4px 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
140
140
  /* The card draws the ring, so the radio inside it does not. */
141
141
  .radio-card input:focus-visible { outline: none; }
@@ -145,40 +145,40 @@
145
145
  .switch { --w: 2.75rem; --h: 1.375rem; --inset: 0.125rem; display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: var(--control-sm); min-height: var(--control-md); padding: 0; border: 0; background: transparent; cursor: pointer; }
146
146
  .switch[data-size="sm"] { --w: 2.2rem; --h: 1.1rem; --inset: 0.1rem; min-height: var(--control-sm); }
147
147
  .switch[data-size="lg"] { --w: 3.3rem; --h: 1.65rem; --inset: 0.15rem; min-height: var(--control-lg); }
148
- .switch-track, .toggle-track { --depth: var(--shadow-sink); position: relative; flex: none; width: var(--w); height: var(--h); border: 1px solid transparent; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--border) 90%, var(--field)); box-shadow: var(--depth); transition: background-color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out); }
149
- .switch-track::after, .toggle-track::after { content: ""; position: absolute; top: calc(var(--inset) - 1px); left: calc(var(--inset) - 1px); width: calc(var(--h) - 2 * var(--inset)); height: calc(var(--h) - 2 * var(--inset)); border-radius: var(--radius-pill); background: var(--surface-raised); box-shadow: var(--shadow-raise); transition: transform var(--duration) var(--ease-out), background-color var(--duration) var(--ease-out); }
150
- :is(.switch[aria-checked="true"] .switch-track, .toggle[aria-pressed="true"] .toggle-track) { border-color: var(--accent); background: var(--accent); }
151
- :is(.switch[aria-checked="true"] .switch-track, .toggle[aria-pressed="true"] .toggle-track)::after { background: var(--accent-text); transform: translateX(calc(var(--w) - var(--h))); }
148
+ .switch-track, .toggle-track { --depth: var(--shadow-sink); position: relative; flex: none; width: var(--w); height: var(--h); border: 1px solid transparent; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--color-border) 90%, var(--color-well)); box-shadow: var(--depth); transition: background-color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out); }
149
+ .switch-track::after, .toggle-track::after { content: ""; position: absolute; top: calc(var(--inset) - 1px); left: calc(var(--inset) - 1px); width: calc(var(--h) - 2 * var(--inset)); height: calc(var(--h) - 2 * var(--inset)); border-radius: var(--radius-pill); background: var(--color-surface-raised); box-shadow: var(--shadow-raise); transition: transform var(--duration) var(--ease-out), background-color var(--duration) var(--ease-out); }
150
+ :is(.switch[aria-checked="true"] .switch-track, .toggle[aria-pressed="true"] .toggle-track) { border-color: var(--color-accent); background: var(--color-accent); }
151
+ :is(.switch[aria-checked="true"] .switch-track, .toggle[aria-pressed="true"] .toggle-track)::after { background: var(--color-accent-text); transform: translateX(calc(var(--w) - var(--h))); }
152
152
  .switch:disabled, .switch:disabled + label { opacity: 0.58; cursor: not-allowed; }
153
153
  .switch-row label { cursor: pointer; }
154
154
  /* The button is a larger hit area, so the ring follows the visible track. */
155
155
  .switch:is(:focus-visible, .is-focus) { outline: none; }
156
156
 
157
157
  /* Toggle button */
158
- .toggle { --w: 2.75rem; --h: 1.375rem; --inset: 0.125rem; --depth: none; display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-field); background: var(--surface-raised); color: var(--text); font: var(--text-md) / var(--leading-tight) var(--font-sans); text-align: left; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
158
+ .toggle { --w: 2.75rem; --h: 1.375rem; --inset: 0.125rem; --depth: none; display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-field); background: var(--color-surface-raised); color: var(--color-text); font: var(--text-md) / var(--leading-tight) var(--font-ui); text-align: left; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
159
159
  .toggle[data-size="sm"] { --w: 2.2rem; --h: 1.1rem; --inset: 0.1rem; min-height: var(--control-sm); font-size: var(--text-sm); }
160
160
  .toggle[data-size="lg"] { --w: 3.3rem; --h: 1.65rem; --inset: 0.15rem; min-height: var(--control-lg); font-size: var(--text-lg); }
161
- .toggle:is(:hover, .is-hover):not(:disabled, [aria-pressed="true"]) { border-color: var(--border); }
161
+ .toggle:is(:hover, .is-hover):not(:disabled, [aria-pressed="true"]) { border-color: var(--color-border); }
162
162
  /* The switch carries the on state; the card takes a faint 8% accent tint and an accent hairline. */
163
- .toggle[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--surface-raised)); }
163
+ .toggle[aria-pressed="true"] { border-color: color-mix(in srgb, var(--color-accent) 35%, transparent); background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface-raised)); }
164
164
  .toggle:disabled { opacity: 0.58; cursor: not-allowed; }
165
165
  .toggle-text { display: grid; }
166
- .toggle-text small { color: var(--text-muted); font-size: var(--text-xs); }
166
+ .toggle-text small { color: var(--color-muted); font-size: var(--text-xs); }
167
167
 
168
168
  /* Segmented control: a raised pill thumb on a sunk, undivided track. */
169
- .segmented { --item: var(--control-md); --glide-lead: 260ms; --glide-trail: 300ms; display: inline-flex; flex: none; border: 1px solid transparent; border-radius: var(--radius-md); background: var(--field); box-shadow: var(--shadow-sink); isolation: isolate; }
169
+ .segmented { --item: var(--control-md); --glide-lead: 260ms; --glide-trail: 300ms; display: inline-flex; flex: none; border: 1px solid transparent; border-radius: var(--radius-control); background: var(--color-well); box-shadow: var(--shadow-sink); isolation: isolate; }
170
170
  /* The fill alone marks the track. The transparent border keeps its size, and forced colors draw it. */
171
171
  .segmented[data-size="sm"] { --item: var(--control-sm); font-size: var(--text-sm); }
172
172
  .segmented[data-size="lg"] { --item: var(--control-lg); font-size: var(--text-lg); }
173
- .segmented button { --depth: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--item); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); font: inherit; cursor: pointer; }
173
+ .segmented button { --depth: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--item); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--color-muted); font: inherit; cursor: pointer; }
174
174
  .segmented[data-icon-only] button { width: var(--item); padding: 0; }
175
175
  /* The thumb is inset inside each full-size button, so it floats on the track and the hit area keeps its size. */
176
- .segmented button::before { content: ""; position: absolute; inset: 2px; z-index: -2; border-radius: var(--radius-md); pointer-events: none; }
177
- .segmented button:is(:hover, .is-hover):not(:disabled, [aria-pressed="true"]) { color: var(--text); }
178
- .segmented button:is(:hover, .is-hover):not(:disabled, [aria-pressed="true"])::before { background: color-mix(in srgb, var(--control-thumb) 45%, transparent); }
179
- /* The pressed label reads at 4.5:1 on its thumb, and an icon at 3:1 (--segmented-current-text). */
180
- .segmented button[aria-pressed="true"] { color: var(--segmented-current-text); }
181
- .segmented button[aria-pressed="true"]::before { z-index: -1; background: var(--control-thumb); box-shadow: var(--shadow-raise); }
176
+ .segmented button::before { content: ""; position: absolute; inset: 2px; z-index: -2; border-radius: var(--radius-control); pointer-events: none; }
177
+ .segmented button:is(:hover, .is-hover):not(:disabled, [aria-pressed="true"]) { color: var(--color-text); }
178
+ .segmented button:is(:hover, .is-hover):not(:disabled, [aria-pressed="true"])::before { background: color-mix(in srgb, var(--color-control-thumb) 45%, transparent); }
179
+ /* The pressed label reads at 4.5:1 on its thumb, and an icon at 3:1 (--color-segmented-current-text). */
180
+ .segmented button[aria-pressed="true"] { color: var(--color-segmented-current-text); }
181
+ .segmented button[aria-pressed="true"]::before { z-index: -1; background: var(--color-control-thumb); box-shadow: var(--shadow-raise); }
182
182
  .segmented button:disabled { opacity: 0.58; cursor: not-allowed; }
183
183
  /* Motion answers only the reader: hover, and a change of choice, which the script marks with data-slide and the old thumb's edges. */
184
184
  @media (prefers-reduced-motion: no-preference) {
@@ -192,11 +192,11 @@
192
192
 
193
193
  /* Slider: a native range input. */
194
194
  .range { width: 220px; max-width: 100%; height: var(--control-md); margin: 0; background: transparent; appearance: none; cursor: pointer; }
195
- .range::-webkit-slider-runnable-track { height: 6px; border-radius: var(--radius-sm); background: linear-gradient(var(--accent), var(--accent)) 0 / var(--value, 50%) 100% no-repeat, var(--surface-hover); }
196
- .range::-moz-range-track { height: 6px; border-radius: var(--radius-sm); background: var(--surface-hover); }
197
- .range::-moz-range-progress { height: 6px; border-radius: var(--radius-sm); background: var(--accent); }
198
- .range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -6px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface-raised); }
199
- .range::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface-raised); }
195
+ .range::-webkit-slider-runnable-track { height: 6px; border-radius: var(--radius-inline); background: linear-gradient(var(--color-accent), var(--color-accent)) 0 / var(--value, 50%) 100% no-repeat, var(--color-surface-muted); }
196
+ .range::-moz-range-track { height: 6px; border-radius: var(--radius-inline); background: var(--color-surface-muted); }
197
+ .range::-moz-range-progress { height: 6px; border-radius: var(--radius-inline); background: var(--color-accent); }
198
+ .range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -6px; border: 2px solid var(--color-accent); border-radius: 50%; background: var(--color-surface-raised); }
199
+ .range::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--color-accent); border-radius: 50%; background: var(--color-surface-raised); }
200
200
  .range[data-size="sm"]::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -5px; }
201
201
  .range[data-size="lg"]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; }
202
202
  /* The Firefox thumb is content-box, so its 2px border adds 4px: these match the WebKit sizes. */
@@ -208,18 +208,18 @@
208
208
  .range:disabled { opacity: 0.58; cursor: not-allowed; }
209
209
  /* The ring goes on the thumb, not the full-width input. */
210
210
  .range:is(:focus-visible, .is-focus) { outline: none; }
211
- .range:is(:focus-visible, .is-focus)::-webkit-slider-thumb { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
212
- .range:is(:focus-visible, .is-focus)::-moz-range-thumb { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
211
+ .range:is(:focus-visible, .is-focus)::-webkit-slider-thumb { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
212
+ .range:is(:focus-visible, .is-focus)::-moz-range-thumb { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
213
213
 
214
214
  /* Progress and score */
215
- .progress { width: 220px; max-width: 100%; height: 9px; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-hover); }
216
- .progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: transform var(--duration-fast) var(--ease-out); }
215
+ .progress { width: 220px; max-width: 100%; height: 9px; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-inline); background: var(--color-surface-muted); }
216
+ .progress > span { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); transition: transform var(--duration-fast) var(--ease-out); }
217
217
  .score { display: inline-flex; align-items: center; gap: var(--space-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
218
218
  .score .pips { display: inline-flex; gap: 0.1875rem; }
219
- .score .pips i { width: 8px; height: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
220
- .score .pips i.on { border-color: var(--accent); background: var(--accent); }
219
+ .score .pips i { width: 8px; height: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-inline); }
220
+ .score .pips i.on { border-color: var(--color-accent); background: var(--color-accent); }
221
221
  .score b { font-weight: var(--weight-medium); }
222
- .score b span { color: var(--text-muted); font-weight: var(--weight-regular); }
222
+ .score b span { color: var(--color-muted); font-weight: var(--weight-regular); }
223
223
 
224
224
  /* Tabs */
225
225
  /* The list scrolls, so it clips on every side: the padding keeps the selected tab's shadow whole
@@ -229,65 +229,65 @@
229
229
  .tablist[data-clip="start"] { mask-image: linear-gradient(to right, transparent, #000 24px); }
230
230
  .tablist[data-clip="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
231
231
  .tablist[data-clip="start end"] { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
232
- .tab { flex: none; min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-field); background: transparent; color: var(--text-muted); font: var(--weight-medium) var(--text-md) / var(--leading) var(--font-sans); white-space: nowrap; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
233
- .tab:is(:hover, .is-hover) { background: var(--row-hover); color: var(--text); }
232
+ .tab { flex: none; min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-field); background: transparent; color: var(--color-muted); font: var(--weight-medium) var(--text-md) / var(--leading) var(--font-ui); white-space: nowrap; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
233
+ .tab:is(:hover, .is-hover) { background: var(--color-row-hover); color: var(--color-text); }
234
234
  /* The selected tab takes the navigation row's lifted fill and motion: one selected state for both. */
235
- .tab[aria-selected="true"] { background: var(--nav-current); box-shadow: var(--shadow-nav-current); color: var(--nav-current-text); }
235
+ .tab[aria-selected="true"] { background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); color: var(--color-nav-current-text); }
236
236
  /* Inset: the tab list scrolls sideways, which would clip an outer ring. */
237
- .tab:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--focus); outline-offset: calc(var(--focus-width) * -1); }
238
- .tabpanel { padding-top: var(--space-3); font-size: var(--text-sm); color: var(--text-muted); }
239
- .tabs-heading { margin-bottom: var(--space-1); color: var(--text); font-size: var(--text-md); font-weight: var(--weight-medium); letter-spacing: 0; }
237
+ .tab:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
238
+ .tabpanel { padding-top: var(--space-3); font-size: var(--text-sm); color: var(--color-muted); }
239
+ .tabs-heading { margin-bottom: var(--space-1); color: var(--color-text); font-size: var(--text-md); font-weight: var(--weight-medium); letter-spacing: 0; }
240
240
 
241
241
  /* Badge */
242
- .badge { display: inline-flex; align-items: center; gap: 0.375rem; width: fit-content; padding: 0.1875rem 0.5625rem; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--surface-hover); color: var(--text-muted); font: var(--weight-medium) var(--text-xs) / 1.25 var(--font-sans); white-space: nowrap; }
243
- .badge:is(.success, .warning, .danger, .info) { background: color-mix(in srgb, var(--tone) 22%, var(--surface-raised)); color: light-dark(color-mix(in srgb, var(--tone) 75%, var(--text)), color-mix(in srgb, var(--tone) 85%, var(--text))); }
242
+ .badge { display: inline-flex; align-items: center; gap: 0.375rem; width: fit-content; padding: 0.1875rem 0.5625rem; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--color-surface-muted); color: var(--color-muted); font: var(--weight-medium) var(--text-xs) / 1.25 var(--font-ui); white-space: nowrap; }
243
+ .badge:is(.success, .warning, .danger, .info) { background: color-mix(in srgb, var(--tone) 22%, var(--color-surface-raised)); color: light-dark(color-mix(in srgb, var(--tone) 75%, var(--color-text)), color-mix(in srgb, var(--tone) 85%, var(--color-text))); }
244
244
  .badge:is(.success, .warning, .danger, .info)::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
245
- .badge.success { --tone: var(--success); }
246
- .badge.warning { --tone: var(--warning); }
247
- .badge.danger { --tone: var(--danger); }
248
- .badge.info { --tone: var(--info); }
245
+ .badge.success { --tone: var(--color-success); }
246
+ .badge.warning { --tone: var(--color-warning); }
247
+ .badge.danger { --tone: var(--color-error); }
248
+ .badge.info { --tone: var(--color-info); }
249
249
 
250
250
  /* Alert */
251
- .alert { display: flex; align-items: flex-start; gap: var(--space-3); max-width: var(--measure); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); font-size: var(--text-sm); }
252
- .alert .icon { margin-top: 0.125rem; color: var(--text-muted); }
253
- .alert.success { background: var(--success-soft); } .alert.success .icon { color: var(--success); }
254
- .alert.warning { background: var(--warning-soft); } .alert.warning .icon { color: var(--warning); }
255
- .alert.danger { background: var(--danger-soft); } .alert.danger .icon { color: var(--danger); }
256
- .alert.info { background: var(--info-soft); } .alert.info .icon { color: var(--info); }
251
+ .alert { display: flex; align-items: flex-start; gap: var(--space-3); max-width: var(--measure); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); }
252
+ .alert .icon { margin-top: 0.125rem; color: var(--color-muted); }
253
+ .alert.success { background: var(--color-success-surface); } .alert.success .icon { color: var(--color-success); }
254
+ .alert.warning { background: var(--color-warning-surface); } .alert.warning .icon { color: var(--color-warning); }
255
+ .alert.danger { background: var(--color-error-surface); } .alert.danger .icon { color: var(--color-error); }
256
+ .alert.info { background: var(--color-info-surface); } .alert.info .icon { color: var(--color-info); }
257
257
 
258
258
  /* Surface and card */
259
- .surface, .card { min-width: 0; border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-surface); }
259
+ .surface, .card { min-width: 0; border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-surface); }
260
260
  .surface { padding: var(--space-4); }
261
261
  .surface[data-padding="compact"] { padding: var(--space-3); }
262
262
  .card { width: min(100%, 360px); overflow: hidden; }
263
263
  .card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); }
264
264
  .card-head h4 { font-size: var(--text-md); font-weight: var(--weight-medium); line-height: var(--leading); letter-spacing: 0; }
265
- .card-body { padding: 0 var(--space-4) var(--space-4); font-size: var(--text-sm); color: var(--text-muted); }
266
- .card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-inline: var(--space-4); padding-block: var(--space-3); border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: var(--text-sm); }
265
+ .card-body { padding: 0 var(--space-4) var(--space-4); font-size: var(--text-sm); color: var(--color-muted); }
266
+ .card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-inline: var(--space-4); padding-block: var(--space-3); border-top: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-sm); }
267
267
 
268
268
  /* Figure */
269
269
  .figure { display: grid; gap: var(--space-3); min-width: 0; margin: 0; }
270
- .figure-plate { min-width: 0; overflow-x: auto; padding: var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface); }
271
- .figure figcaption { max-width: var(--measure); color: var(--text-muted); font-size: var(--text-sm); }
272
- .figure figcaption b { color: var(--text); font-weight: var(--weight-medium); }
270
+ .figure-plate { min-width: 0; overflow-x: auto; padding: var(--space-5); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-surface); }
271
+ .figure figcaption { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
272
+ .figure figcaption b { color: var(--color-text); font-weight: var(--weight-medium); }
273
273
 
274
274
  /* Dialog and drawer. The catalogue shows them in place; real ones are native dialogs opened with showModal(). */
275
- .dialog { display: grid; width: min(512px, 100%); max-height: min(672px, calc(100dvh - var(--space-8))); overflow: hidden; padding: 0; border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-popover); }
275
+ .dialog { display: grid; width: min(512px, 100%); max-height: min(672px, calc(100dvh - var(--space-8))); overflow: hidden; padding: 0; border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
276
276
  /* The component sets display, so a closed native dialog needs its hidden state back. */
277
277
  dialog:not([open]) { display: none; }
278
278
  dialog.dialog { margin: auto; }
279
- dialog.dialog::backdrop { background: var(--overlay); }
279
+ dialog.dialog::backdrop { background: var(--color-overlay); }
280
280
  .dialog-head, .dialog-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); }
281
- .dialog-head { border-bottom: 1px solid var(--border-subtle); }
281
+ .dialog-head { border-bottom: 1px solid var(--color-border-subtle); }
282
282
  .dialog-head h4 { font-size: 1.125rem; font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
283
- .dialog-head p { margin-top: var(--space-1); color: var(--text-muted); }
283
+ .dialog-head p { margin-top: var(--space-1); color: var(--color-muted); }
284
284
  .dialog-body { min-height: 0; overflow: auto; padding: var(--space-4); }
285
- .dialog-foot { justify-content: flex-end; gap: var(--space-2); border-top: 1px solid var(--border-subtle); background: var(--surface); }
285
+ .dialog-foot { justify-content: flex-end; gap: var(--space-2); border-top: 1px solid var(--color-border-subtle); background: var(--color-surface); }
286
286
  /* The close button is a quiet action; this sets its size only. */
287
- .close { flex: none; width: var(--control-lg); min-height: var(--control-lg); padding: 0; color: var(--text-muted); }
288
- .drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-popover); }
287
+ .close { flex: none; width: var(--control-lg); min-height: var(--control-lg); padding: 0; color: var(--color-muted); }
288
+ .drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
289
289
  dialog.drawer { position: fixed; inset: 0 auto 0 0; height: 100dvh; max-height: none; margin: 0; }
290
- dialog.drawer::backdrop { background: var(--overlay); }
290
+ dialog.drawer::backdrop { background: var(--color-overlay); }
291
291
  @media (prefers-reduced-motion: no-preference) {
292
292
  dialog.drawer[open] { animation: drawer-in var(--duration) var(--ease-out); }
293
293
  dialog.drawer[open]::backdrop { animation: fade-in var(--duration) var(--ease-out); }
@@ -299,20 +299,20 @@
299
299
  @keyframes drawer-out { to { transform: translateX(-100%); } }
300
300
  @keyframes fade-in { from { opacity: 0; } }
301
301
  @keyframes fade-out { to { opacity: 0; } }
302
- .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); }
302
+ .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
303
303
  .drawer-head h4 { font-size: var(--text-md); font-weight: var(--weight-medium); letter-spacing: 0; }
304
304
  .drawer-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--space-4); }
305
305
 
306
306
  /* Navigation list */
307
307
  .navlist { display: grid; gap: 0.125rem; width: min(100%, 240px); }
308
- .navlist .group-label { padding: 0 var(--space-3) var(--space-1); color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
309
- .navlist a { position: relative; display: flex; align-items: center; min-height: var(--row); padding-inline: var(--space-3); border-radius: var(--radius-field); color: var(--text-muted); font-size: var(--text-sm); text-decoration: none; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
310
- .navlist a:is(:hover, .is-hover) { background: var(--row-hover); color: var(--text); text-decoration: none; }
311
- .navlist a[aria-current="page"] { background: var(--nav-current); box-shadow: var(--shadow-nav-current); color: var(--nav-current-text); font-weight: var(--weight-medium); }
312
- .navlist a[aria-current="location"] { color: var(--text); font-weight: var(--weight-medium); }
313
- .navlist a[aria-current="location"]::before { content: ""; position: absolute; inset-inline-start: var(--space-1); width: 3px; height: 14px; border-radius: var(--radius-pill); background: var(--accent); }
308
+ .navlist .group-label { padding: 0 var(--space-3) var(--space-1); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
309
+ .navlist a { position: relative; display: flex; align-items: center; min-height: var(--row); padding-inline: var(--space-3); border-radius: var(--radius-field); color: var(--color-muted); font-size: var(--text-sm); text-decoration: none; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
310
+ .navlist a:is(:hover, .is-hover) { background: var(--color-row-hover); color: var(--color-text); text-decoration: none; }
311
+ .navlist a[aria-current="page"] { background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); color: var(--color-nav-current-text); font-weight: var(--weight-medium); }
312
+ .navlist a[aria-current="location"] { color: var(--color-text); font-weight: var(--weight-medium); }
313
+ .navlist a[aria-current="location"]::before { content: ""; position: absolute; inset-inline-start: var(--space-1); width: 3px; height: 14px; border-radius: var(--radius-pill); background: var(--color-accent); }
314
314
  /* Inset: the rail and the drawer scroll. */
315
- .navlist a:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--focus); outline-offset: calc(var(--focus-width) * -1); }
315
+ .navlist a:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
316
316
  /* Phone trigger: a secondary button with a three-line menu glyph, because it opens a side drawer. */
317
317
  .menu-glyph::before { content: ""; flex: none; width: 14px; height: 10px; border-block: 1.5px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }
318
318
  /* No-JavaScript fallback: the list opens in place. The summary is a secondary button with a chevron; only the chevron is local. */
@@ -322,47 +322,47 @@
322
322
  details.rail[open] > .navlist { margin-top: var(--space-2); }
323
323
  /* List selection */
324
324
  .rows { display: grid; width: min(100%, 360px); }
325
- .rows [role="option"] { position: relative; display: flex; align-items: center; min-height: var(--row); padding: 0 var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-sm); }
325
+ .rows [role="option"] { position: relative; display: flex; align-items: center; min-height: var(--row); padding: 0 var(--space-3); border-radius: var(--radius-inline); font-size: var(--text-sm); }
326
326
  /* Dividers are straight lines inset by the row padding, so they never follow a rounded corner.
327
327
  A filled row (hovered or selected) hides the divider above it and the one below it. */
328
- .rows [role="option"] + [role="option"]::before { content: ""; position: absolute; inset: 0 var(--space-3) auto; border-top: 1px solid var(--border-subtle); }
328
+ .rows [role="option"] + [role="option"]::before { content: ""; position: absolute; inset: 0 var(--space-3) auto; border-top: 1px solid var(--color-border-subtle); }
329
329
  .rows [role="option"]:is(:hover, .is-hover, [aria-selected="true"])::before,
330
330
  .rows [role="option"]:is(:hover, .is-hover, [aria-selected="true"]) + [role="option"]::before { display: none; }
331
- .rows [role="option"]:is(:hover, .is-hover) { background: var(--row-hover); }
331
+ .rows [role="option"]:is(:hover, .is-hover) { background: var(--color-row-hover); }
332
332
  /* The selected row takes the navigation row's current recipe; it comes after hover, so hover keeps the fill. */
333
- .rows [role="option"][aria-selected="true"] { background: var(--nav-current); box-shadow: var(--shadow-nav-current); color: var(--nav-current-text); font-weight: var(--weight-medium); }
333
+ .rows [role="option"][aria-selected="true"] { background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); color: var(--color-nav-current-text); font-weight: var(--weight-medium); }
334
334
  @media (forced-colors: active) { .rows [role="option"][aria-selected="true"] { border-inline-start: 2px solid Highlight; } }
335
335
 
336
336
  /* Code block: a source well */
337
- .code { width: 100%; max-width: var(--measure); min-width: 0; overflow: hidden; border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--code-bg); color: var(--code-text); box-shadow: var(--shadow-surface); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
338
- .code-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-height: 2.5rem; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3); border-bottom: 1px solid var(--border-subtle); background: var(--surface-raised); font-size: var(--text-xs); }
337
+ .code { width: 100%; max-width: var(--measure); min-width: 0; overflow: hidden; border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-code); color: var(--color-code-text); box-shadow: var(--shadow-surface); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
338
+ .code-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-height: 2.5rem; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3); border-bottom: 1px solid var(--color-border-subtle); background: var(--color-surface-raised); font-size: var(--text-xs); }
339
339
  .code-head b { font-weight: var(--weight-semibold); }
340
- .code-head .lang { color: var(--text-muted); }
340
+ .code-head .lang { color: var(--color-muted); }
341
341
  /* Copy is a quiet action; this sets its size and place. */
342
342
  .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-lg); min-height: var(--control-lg); margin-left: auto; padding: var(--space-1) 0.375rem; color: inherit; }
343
343
  /* The code block has its own palette, so its Copy keeps the plate's text colour on hover. */
344
344
  .code .copy:is(:hover, .is-hover) { color: inherit; }
345
345
  /* Inset: the code block clips its content. */
346
- .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--focus); outline-offset: calc(var(--focus-width) * -1); }
346
+ .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
347
347
  .code .copy.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
348
348
  .code pre { margin: 0; padding: var(--space-4); overflow: auto; max-height: 32rem; font-size: var(--text-code); line-height: 1.65; tab-size: 2; }
349
349
  /* Each line is a baseline-aligned row, so a prompt or line number sits on the text's baseline. */
350
350
  .code .line { display: flex; align-items: baseline; min-height: 1.65em; }
351
351
  .code .line > span { white-space: pre; }
352
- .code .ln { min-width: 2.5em; padding-right: 1em; flex: none; text-align: right; color: var(--text-muted); user-select: none; }
353
- .code .k { color: var(--code-key); } .code .s { color: var(--code-string); } .code .n { color: var(--code-number); } .code .c { color: var(--code-comment); }
352
+ .code .ln { min-width: 2.5em; padding-right: 1em; flex: none; text-align: right; color: var(--color-muted); user-select: none; }
353
+ .code .k { color: var(--color-syntax-keyword); } .code .s { color: var(--color-syntax-string); } .code .n { color: var(--color-syntax-number); } .code .c { color: var(--color-syntax-comment); }
354
354
  .code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
355
355
  .code.compact pre { padding: var(--space-2) var(--space-3); }
356
356
  .code.compact .copy { margin: var(--space-1); }
357
357
 
358
358
  /* Code block with a live example: a live stage over its source, in one frame. */
359
- .example { width: 100%; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg); }
359
+ .example { width: 100%; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-bg); }
360
360
  /* The stage sits on the page background, so the preview shows components on the surface they sit on in a page. */
361
361
  .example-stage { display: grid; place-items: safe center; min-height: 8rem; overflow-x: auto; padding: var(--space-8); }
362
362
  .example-stage > * { min-width: 0; }
363
363
  /* The frame draws the edge, so the source is flat and full width, with one hairline above it.
364
364
  Copy comes first in DOM order and is placed in the source's top right corner. */
365
- .example > .code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; max-width: none; border-width: 1px 0 0; border-color: var(--border-subtle); border-radius: 0; box-shadow: none; }
365
+ .example > .code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; max-width: none; border-width: 1px 0 0; border-color: var(--color-border-subtle); border-radius: 0; box-shadow: none; }
366
366
  .example > .code > pre { grid-row: 1; grid-column: 1; }
367
367
  .example > .code > .copy { grid-row: 1; grid-column: 2; margin: var(--space-1); }
368
368
 
@@ -370,121 +370,121 @@
370
370
 
371
371
  /* Command plate: dark in both themes and tinted with the project hue. */
372
372
  /* The plate is dark in both themes, so its focus ring takes the dark-theme accent, which reaches 3:1 on it. */
373
- .code.command { --code-text: var(--terminal-text); --focus: var(--project-dark); border-color: var(--command-border); background: var(--command-bg); color: var(--terminal-text); }
374
- .code.command .code-head { border-color: var(--command-border); background: transparent; color: var(--terminal-caption-text); }
375
- .code.command .code-head .lang { color: var(--terminal-caption-text); }
373
+ .code.command { --color-code-text: var(--color-terminal-text); --color-focus: var(--color-project-dark); border-color: var(--color-command-border); background: var(--color-command-bg); color: var(--color-terminal-text); }
374
+ .code.command .code-head { border-color: var(--color-command-border); background: transparent; color: var(--color-terminal-caption-text); }
375
+ .code.command .code-head .lang { color: var(--color-terminal-caption-text); }
376
376
  /* The prompt is drawn by CSS, so copied and spoken text omit it. */
377
- .code.command .line::before { content: "$ " / ""; flex: none; white-space: pre; color: var(--project-dark); user-select: none; }
377
+ .code.command .line::before { content: "$ " / ""; flex: none; white-space: pre; color: var(--color-project-dark); user-select: none; }
378
378
 
379
379
  /* Terminal capture: neutral plate with a mono status line. The header stays terminal-dark in
380
380
  both page appearances, so the capture scopes its own tab, text, and focus colours. */
381
381
  .capture {
382
- --nav-current: color-mix(in srgb, var(--project-dark) 20%, transparent);
383
- --shadow-nav-current: var(--terminal-shadow-nav-current);
384
- --row-hover: color-mix(in srgb, var(--terminal-text) 4%, transparent);
385
- --nav-current-text: var(--project-dark);
386
- --text: var(--terminal-text);
387
- --text-muted: var(--terminal-caption-text);
388
- --accent: var(--project-dark);
389
- --focus: var(--project-dark);
390
- --border-subtle: var(--terminal-border);
391
- width: 100%; max-width: 640px; min-width: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--terminal); color: var(--terminal-text); box-shadow: var(--shadow-surface);
382
+ --color-nav-current: color-mix(in srgb, var(--color-project-dark) 20%, transparent);
383
+ --shadow-nav-current: var(--shadow-nav-current-dark);
384
+ --color-row-hover: color-mix(in srgb, var(--color-terminal-text) 4%, transparent);
385
+ --color-nav-current-text: var(--color-project-dark);
386
+ --color-text: var(--color-terminal-text);
387
+ --color-muted: var(--color-terminal-caption-text);
388
+ --color-accent: var(--color-project-dark);
389
+ --color-focus: var(--color-project-dark);
390
+ --color-border-subtle: var(--color-terminal-border);
391
+ width: 100%; max-width: 640px; min-width: 0; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-terminal); color: var(--color-terminal-text); box-shadow: var(--shadow-surface);
392
392
  }
393
393
  .capture-head { display: flex; align-items: center; min-width: 0; }
394
394
  .capture .tablist { flex: 1; width: auto; padding-inline: var(--space-2); }
395
395
  .capture .tab { min-height: var(--control-lg); font-family: var(--font-mono); font-size: var(--text-sm); }
396
396
  /* Full size is a quiet action; this sets its size and place. */
397
- .full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-lg); padding: 0 var(--space-3); color: var(--text-muted); font-size: var(--text-sm); }
397
+ .full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-lg); padding: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
398
398
  /* Inset: the panel clips its content. */
399
399
  .capture .full.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
400
400
  .capture .tabpanel { padding-top: 0; color: inherit; }
401
401
  /* Without JavaScript each capture keeps its heading, and panels after the first take a rule. */
402
402
  .capture .tabs-heading { margin: 0; padding: var(--space-3) var(--space-4); font-family: var(--font-mono); font-size: var(--text-sm); }
403
- .capture:not([data-enhanced]) .tabpanel + .tabpanel { border-top: 1px solid var(--border-subtle); }
403
+ .capture:not([data-enhanced]) .tabpanel + .tabpanel { border-top: 1px solid var(--color-border-subtle); }
404
404
  dialog.capture-viewer { width: min(960px, calc(100% - var(--space-8))); }
405
405
  .capture-viewer .dialog-head h4 { font-family: var(--font-mono); }
406
406
  .capture-viewer .dialog-body { padding: 0; }
407
407
  /* The full-size viewer clones the screen outside .capture, so it carries its own plate focus. */
408
- .screen { --focus: var(--project-dark); margin: 0; padding: var(--space-4); overflow-x: auto; background: var(--terminal); color: var(--terminal-text); font-size: var(--text-code); line-height: 1.5; }
408
+ .screen { --color-focus: var(--color-project-dark); margin: 0; padding: var(--space-4); overflow-x: auto; background: var(--color-terminal); color: var(--color-terminal-text); font-size: var(--text-code); line-height: 1.5; }
409
409
  /* Inset: the capture and the viewer body clip the screen's edges. */
410
410
  .screen:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
411
- .screen .hi { color: var(--project-dark); }
412
- .screen .dim { color: var(--terminal-caption-text); }
413
- .capture-caption { padding: var(--space-1) var(--space-4); background: var(--terminal-caption); color: var(--terminal-caption-text); font: var(--text-xs) / var(--leading) var(--font-mono); overflow-wrap: anywhere; }
411
+ .screen .hi { color: var(--color-project-dark); }
412
+ .screen .dim { color: var(--color-terminal-caption-text); }
413
+ .capture-caption { padding: var(--space-1) var(--space-4); background: var(--color-terminal-caption); color: var(--color-terminal-caption-text); font: var(--text-xs) / var(--leading) var(--font-mono); overflow-wrap: anywhere; }
414
414
 
415
415
  /* Site header */
416
- .site-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: var(--space-16); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--text); background: var(--bg); width: 100%; }
416
+ .site-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: var(--space-16); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-text); background: var(--color-bg); width: 100%; }
417
417
  .projects { position: relative; }
418
418
  /* The trigger is a quiet action; this sets its size and type. */
419
419
  .projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-lg); padding-inline: var(--space-3); font-family: var(--font-mono); font-weight: var(--weight-semibold); list-style: none; user-select: none; }
420
420
  .projects > summary::-webkit-details-marker { display: none; }
421
421
  /* The ~/ mark is decorative: the empty alternative text keeps it out of the name. */
422
- .projects > summary::before { content: "~/" / ""; color: var(--project); }
422
+ .projects > summary::before { content: "~/" / ""; color: var(--color-project); }
423
423
  /* The open menu keeps the hover tint. :where keeps it below the quiet action's press. */
424
424
  :where(.projects[open]) > summary { background: color-mix(in srgb, currentColor 12%, transparent); }
425
425
  .projects .icon { transition: transform var(--duration-fast) var(--ease-out); }
426
426
  .projects[open] .icon { transform: rotate(180deg); }
427
- .projects .navlist { position: absolute; z-index: 3; top: 100%; left: 0; min-width: 224px; margin-top: var(--space-1); padding: var(--space-1); border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-popover); }
427
+ .projects .navlist { position: absolute; z-index: 3; top: 100%; left: 0; min-width: 224px; margin-top: var(--space-1); padding: var(--space-1); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); }
428
428
  .projects.is-open .navlist { position: static; }
429
429
  .projects .navlist a { font-family: var(--font-mono); }
430
430
  .site-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin-left: auto; }
431
431
  .site-links { display: flex; gap: var(--space-4); }
432
- .site-links a { display: inline-flex; align-items: center; min-height: var(--control-lg); color: var(--text-muted); text-decoration: none; }
433
- .site-links a:hover { color: var(--text); }
432
+ .site-links a { display: inline-flex; align-items: center; min-height: var(--control-lg); color: var(--color-muted); text-decoration: none; }
433
+ .site-links a:hover { color: var(--color-text); }
434
434
 
435
435
  /* Page type and helpers */
436
436
  .folio-h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); letter-spacing: var(--tracking-tight); }
437
- .folio-h2::before { content: "## " / ""; color: var(--accent); }
437
+ .folio-h2::before { content: "## " / ""; color: var(--color-accent); }
438
438
  .folio-display { font: var(--weight-semibold) var(--text-display) / 1.08 var(--font-mono); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
439
439
  .steps { display: grid; gap: var(--space-5); max-width: var(--measure); margin: 0; padding: 0; list-style: none; counter-reset: step; }
440
440
  .steps li { position: relative; display: grid; gap: var(--space-1); padding-left: var(--space-12); counter-increment: step; }
441
- .steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: var(--space-8); font: var(--weight-semibold) var(--text-lg) / var(--leading-tight) var(--font-mono); color: var(--accent); text-align: right; }
442
- .steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(var(--space-8) + var(--space-2)); top: var(--space-6); bottom: calc(-1 * var(--space-4)); border-left: 1px solid var(--border-subtle); }
441
+ .steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: var(--space-8); font: var(--weight-semibold) var(--text-lg) / var(--leading-tight) var(--font-mono); color: var(--color-accent); text-align: right; }
442
+ .steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(var(--space-8) + var(--space-2)); top: var(--space-6); bottom: calc(-1 * var(--space-4)); border-left: 1px solid var(--color-border-subtle); }
443
443
  .steps h4 { font-size: var(--text-lg); }
444
- .steps p { color: var(--text-muted); }
444
+ .steps p { color: var(--color-muted); }
445
445
  .definitions { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-6); max-width: var(--measure); margin: 0; font-size: var(--text-sm); }
446
446
  .definitions dt { font-weight: var(--weight-medium); }
447
- .definitions dd { margin: 0; color: var(--text-muted); }
447
+ .definitions dd { margin: 0; color: var(--color-muted); }
448
448
  .definitions code { white-space: nowrap; }
449
449
  /* Skip link: hidden above the page until it takes focus. */
450
- .skip { position: absolute; top: calc(-1 * var(--space-16)); left: var(--space-4); z-index: 10; padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-field); background: var(--surface-raised); box-shadow: var(--shadow-popover); color: var(--text); }
450
+ .skip { position: absolute; top: calc(-1 * var(--space-16)); left: var(--space-4); z-index: 10; padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-field); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); color: var(--color-text); }
451
451
  .skip:focus { top: var(--space-4); }
452
- .skip.is-focus { position: static; outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
452
+ .skip.is-focus { position: static; outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
453
453
  .facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; font: var(--text-sm) / var(--leading) var(--font-mono); }
454
454
  .facts > div { display: flex; flex-wrap: wrap; column-gap: var(--space-2); }
455
- .facts dt { color: var(--text-muted); }
455
+ .facts dt { color: var(--color-muted); }
456
456
  .facts dd { margin: 0; overflow-wrap: anywhere; }
457
457
  .cmdlist { width: 100%; max-width: var(--measure); border-collapse: collapse; font-size: var(--text-sm); }
458
- .cmdlist th { padding: var(--space-2) var(--space-4) var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); text-align: left; }
459
- .cmdlist td { padding: var(--space-1) var(--space-4) var(--space-1) 0; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
458
+ .cmdlist th { padding: var(--space-2) var(--space-4) var(--space-2) 0; border-bottom: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); text-align: left; }
459
+ .cmdlist td { padding: var(--space-1) var(--space-4) var(--space-1) 0; border-bottom: 1px solid var(--color-border-subtle); vertical-align: middle; }
460
460
  .cmdlist td:first-child { width: 1%; white-space: nowrap; }
461
- .cmdlist td:nth-child(2) { color: var(--text-muted); }
461
+ .cmdlist td:nth-child(2) { color: var(--color-muted); }
462
462
  .cmdlist td:last-child { width: 1%; padding-right: 0; }
463
463
  .cmdlist .copy { margin: 0; }
464
- :where(.cmdlist) .copy { color: var(--text-muted); }
465
- .site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); width: 100%; padding-block: var(--space-4); border-top: 1px solid var(--border-subtle); font: var(--text-sm) / var(--leading) var(--font-mono); }
466
- .site-footer a { color: var(--text-muted); }
464
+ :where(.cmdlist) .copy { color: var(--color-muted); }
465
+ .site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); width: 100%; padding-block: var(--space-4); border-top: 1px solid var(--color-border-subtle); font: var(--text-sm) / var(--leading) var(--font-mono); }
466
+ .site-footer a { color: var(--color-muted); }
467
467
  .site-footer nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
468
468
 
469
469
  /* ---------- Focus, forced colors, and touch ---------- */
470
- /* One ring for every role: --focus-width of --focus (the accent) with a --focus-offset gap and no
470
+ /* One ring for every role: --focus-width of --color-focus (the accent) with a --focus-offset gap and no
471
471
  glow, over the control's own raise or sink. The tokens.css base draws it on links; these rules pin
472
472
  it and move it to the visible part of composite controls. */
473
473
  :is(.btn, .quiet-action, .check input, .segmented button, .toggle):is(:focus-visible, .is-focus),
474
474
  :is(.dialog, .drawer):focus-visible,
475
475
  .switch:is(:focus-visible, .is-focus) .switch-track,
476
- .radio-card:has(input:is(:focus-visible, .is-focus)) { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
476
+ .radio-card:has(input:is(:focus-visible, .is-focus)) { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
477
477
  /* Inside a segmented control, the ring hugs the thumb instead of crossing into the next option. */
478
478
  .segmented button:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
479
479
  /* Fields draw no ring: the edge turns the accent with a muted accent line inside it, and the fill stays. */
480
- :is(.input, .select, .textarea):is(:focus-visible, .is-focus) { outline: none; border-color: var(--accent); box-shadow: var(--field-shadow-focus); }
481
- :is(.input, .select, .textarea)[aria-invalid="true"]:is(:focus-visible, .is-focus) { border-color: var(--danger); box-shadow: var(--field-shadow-focus-invalid); }
480
+ :is(.input, .select, .textarea):is(:focus-visible, .is-focus) { outline: none; border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
481
+ :is(.input, .select, .textarea)[aria-invalid="true"]:is(:focus-visible, .is-focus) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
482
482
  /* The search wrapper takes the field focus, so the input inside it draws nothing. */
483
- .search:is(:has(input:focus-visible), .is-focus) { outline: none; border-color: var(--accent); box-shadow: var(--field-shadow-focus); }
483
+ .search:is(:has(input:focus-visible), .is-focus) { outline: none; border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
484
484
  /* A search wrapper follows the shared invalid and disabled field states through the input it holds. */
485
- .search:has(input[aria-invalid="true"]) { border-color: var(--danger); }
486
- .search:has(input[aria-invalid="true"]):is(:has(input:focus-visible), .is-focus) { border-color: var(--danger); box-shadow: var(--field-shadow-focus-invalid); }
487
- .search:has(input:disabled) { background: var(--field); box-shadow: none; opacity: 0.58; cursor: not-allowed; }
485
+ .search:has(input[aria-invalid="true"]) { border-color: var(--color-error); }
486
+ .search:has(input[aria-invalid="true"]):is(:has(input:focus-visible), .is-focus) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
487
+ .search:has(input:disabled) { background: var(--color-well); box-shadow: none; opacity: 0.58; cursor: not-allowed; }
488
488
 
489
489
  @media (forced-colors: active) {
490
490
  /* The inset accent line drops, so a focused field draws the system ring just inside its edge. */
@@ -522,8 +522,8 @@
522
522
 
523
523
  /* ---------- Catalogue page ---------- */
524
524
  .frame { width: min(calc(var(--page-max) + var(--sidebar)), calc(100% - var(--space-12))); margin-inline: auto; }
525
- .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--space-16); border-bottom: 1px solid var(--border-subtle); }
526
- .page-head .brand { color: var(--text); font: var(--weight-semibold) var(--text-md) var(--font-mono); }
525
+ .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
526
+ .page-head .brand { color: var(--color-text); font: var(--weight-semibold) var(--text-md) var(--font-mono); }
527
527
  .page-head nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); }
528
528
  .page-head nav a { display: inline-flex; align-items: center; min-height: var(--control-lg); font-size: var(--text-sm); }
529
529
  .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
@@ -534,17 +534,17 @@
534
534
  main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-12); min-width: 0; padding-block: var(--space-8) var(--space-16); }
535
535
  .intro { display: grid; gap: var(--space-3); }
536
536
  .intro h1 { font: var(--weight-semibold) var(--text-3xl) / 1.08 var(--font-mono); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
537
- .intro p { max-width: var(--measure); color: var(--text-muted); font-size: var(--text-reading); }
538
- .layer-head { display: grid; gap: var(--space-2); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); }
537
+ .intro p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-reading); }
538
+ .layer-head { display: grid; gap: var(--space-2); padding-top: var(--space-6); border-top: 1px solid var(--color-border-subtle); }
539
539
  .layer-head h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); }
540
- .layer-head h2::before { content: "## " / ""; color: var(--accent); }
541
- .layer-head p { max-width: var(--measure); color: var(--text-muted); }
540
+ .layer-head h2::before { content: "## " / ""; color: var(--color-accent); }
541
+ .layer-head p { max-width: var(--measure); color: var(--color-muted); }
542
542
  .component { display: grid; gap: var(--space-3); min-width: 0; scroll-margin-top: var(--space-4); }
543
543
  .component > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
544
544
  .component h3 { font-size: var(--text-lg); }
545
545
  .component > header a { font-size: var(--text-sm); }
546
- .note { max-width: var(--measure); color: var(--text-muted); font-size: var(--text-sm); }
547
- .row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-2) var(--space-6); padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle); }
546
+ .note { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
547
+ .row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-2) var(--space-6); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-subtle); }
548
548
  .row:last-child { border-bottom: 0; }
549
549
  .row h4 { padding-top: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-medium); letter-spacing: 0; }
550
550
  .states { display: flex; flex-wrap: wrap; align-items: start; gap: var(--space-4) var(--space-6); min-width: 0; }
@@ -554,7 +554,7 @@
554
554
  /* Layout only: a segmented control scrolls inside its column at large text sizes, labels on one line. */
555
555
  :is(.state, .page-head) > .segmented { max-width: 100%; overflow-x: auto; white-space: nowrap; }
556
556
  :is(.state, .page-head) > .segmented button { flex: none; }
557
- .caption { color: var(--text-muted); font-size: var(--text-xs); }
557
+ .caption { color: var(--color-muted); font-size: var(--text-xs); }
558
558
  .wide { flex-basis: 100%; }
559
559
  /* Fields fill their container; the catalogue gives each specimen a preferred width. */
560
560
  .state > :is(.field, .input, .select, .textarea, .search) { width: 220px; }
@@ -562,7 +562,7 @@
562
562
  @media (max-width: 800px) {
563
563
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
564
564
  /* Phones: the contents become one native scrolling strip, so the title stays in view. */
565
- .toc { position: static; max-height: none; display: flex; gap: var(--space-4); overflow-x: auto; padding-block: var(--space-2); border-bottom: 1px solid var(--border-subtle); }
565
+ .toc { position: static; max-height: none; display: flex; gap: var(--space-4); overflow-x: auto; padding-block: var(--space-2); border-bottom: 1px solid var(--color-border-subtle); }
566
566
  .toc .navlist + .navlist { margin-top: 0; }
567
567
  .toc .navlist { display: flex; flex: none; width: auto; }
568
568
  .toc .navlist a { flex: none; white-space: nowrap; }
@@ -577,7 +577,7 @@
577
577
  }
578
578
  @media (max-width: 640px) {
579
579
  /* Phones: a dialog becomes a bottom sheet with rounded top corners. */
580
- dialog.dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
580
+ dialog.dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-panel) var(--radius-panel) 0 0; }
581
581
  .definitions { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-1); }
582
582
  .definitions dd + dt { margin-top: var(--space-3); }
583
583
  .frame { width: calc(100% - var(--space-8)); }
@@ -586,7 +586,7 @@
586
586
  .example-stage { padding: var(--space-6) var(--space-4); }
587
587
  .cmdlist thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
588
588
  .cmdlist, .cmdlist tbody { display: block; }
589
- .cmdlist tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-2); padding-block: var(--space-2); border-bottom: 1px solid var(--border-subtle); }
589
+ .cmdlist tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-2); padding-block: var(--space-2); border-bottom: 1px solid var(--color-border-subtle); }
590
590
  .cmdlist td, .cmdlist td:first-child, .cmdlist td:last-child { width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
591
591
  .cmdlist td:nth-child(2) { grid-column: 1; }
592
592
  .cmdlist td:last-child { grid-column: 2; grid-row: 1 / span 2; }
@@ -956,7 +956,7 @@
956
956
  <div class="state"><button class="btn secondary" type="button" data-open="live-dialog">Open dialog</button><span class="caption">Opens a native modal dialog</span></div>
957
957
  </div></div>
958
958
  <div class="row"><h4>In place</h4><div class="states">
959
- <div class="state wide" inert><div class="dialog" role="dialog" aria-labelledby="dlg-static-title" aria-describedby="dlg-static-desc"><div class="dialog-head"><div><h4 id="dlg-static-title">Delete monitor</h4><p id="dlg-static-desc">This removes its history.</p></div><button class="quiet-action close" type="button" aria-label="Close dialog"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button></div><div class="dialog-body">API p95 latency stops alerting at once.</div><div class="dialog-foot"><button class="btn secondary" type="button">Cancel</button><button class="btn danger" type="button">Delete</button></div></div><span class="caption">Static specimen; the real one sits over an <code>--overlay</code> backdrop</span></div>
959
+ <div class="state wide" inert><div class="dialog" role="dialog" aria-labelledby="dlg-static-title" aria-describedby="dlg-static-desc"><div class="dialog-head"><div><h4 id="dlg-static-title">Delete monitor</h4><p id="dlg-static-desc">This removes its history.</p></div><button class="quiet-action close" type="button" aria-label="Close dialog"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button></div><div class="dialog-body">API p95 latency stops alerting at once.</div><div class="dialog-foot"><button class="btn secondary" type="button">Cancel</button><button class="btn danger" type="button">Delete</button></div></div><span class="caption">Static specimen; the real one sits over an <code>--color-overlay</code> backdrop</span></div>
960
960
  </div></div>
961
961
  </section>
962
962
 
@@ -1013,7 +1013,7 @@
1013
1013
  <div class="row"><h4>Commands</h4><div class="states">
1014
1014
  <div class="state wide"><div class="code command compact"><pre tabindex="0" role="region" aria-label="Install command"><code id="cmd-install"><span class="line"><span>brew install filipgutica/tap/filip-stack</span></span></code></pre><button class="quiet-action copy" type="button" data-copy="cmd-install" aria-label="Copy install command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, live; the <code>$</code> is drawn by CSS</span></div>
1015
1015
  <div class="state wide"><div class="code command"><div class="code-head"><b>Set up</b><button class="quiet-action copy" type="button" data-copy="cmd-setup"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="Set up commands"><code id="cmd-setup"><span class="line"><span>pnpm install --frozen-lockfile</span></span><span class="line"><span>pnpm check</span></span></code></pre></div><span class="caption">With a header, two lines</span></div>
1016
- <div class="state wide" inert><div class="code command compact"><pre><code><span class="line"><span>filip-stack apply</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy apply command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Focus visible on Copy, in <code>--project-dark</code></span></div>
1016
+ <div class="state wide" inert><div class="code command compact"><pre><code><span class="line"><span>filip-stack apply</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy apply command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Focus visible on Copy, in <code>--color-project-dark</code></span></div>
1017
1017
  </div></div>
1018
1018
  </section>
1019
1019