tyrell-components 1.0.0-RC16 → 1.0.0-RC18

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 (240) hide show
  1. package/README.md +1 -1
  2. package/css/tyrell-colors-static.css +1 -316
  3. package/css/tyrell-theme.css +1 -1471
  4. package/css/tyrell.css +1 -1385
  5. package/dist/tyrell-colors-static.css +1 -1
  6. package/dist/tyrell-theme.css +1 -1
  7. package/dist/tyrell.js +1 -1
  8. package/lib/base/ty-component.d.ts +28 -15
  9. package/lib/base/ty-component.js +81 -38
  10. package/lib/components/button.d.ts +14 -0
  11. package/lib/components/button.js +55 -7
  12. package/lib/components/calendar-month.d.ts +7 -1
  13. package/lib/components/calendar-month.js +35 -28
  14. package/lib/components/calendar-navigation.js +19 -6
  15. package/lib/components/calendar.d.ts +27 -3
  16. package/lib/components/calendar.js +107 -63
  17. package/lib/components/checkbox.d.ts +8 -1
  18. package/lib/components/checkbox.js +27 -6
  19. package/lib/components/copy.d.ts +2 -0
  20. package/lib/components/copy.js +15 -31
  21. package/lib/components/date-picker.d.ts +53 -18
  22. package/lib/components/date-picker.js +217 -146
  23. package/lib/components/file-upload.d.ts +4 -1
  24. package/lib/components/file-upload.js +23 -5
  25. package/lib/components/input.d.ts +73 -3
  26. package/lib/components/input.js +158 -22
  27. package/lib/components/modal.d.ts +2 -0
  28. package/lib/components/modal.js +97 -17
  29. package/lib/components/option.d.ts +19 -0
  30. package/lib/components/option.js +45 -31
  31. package/lib/components/popup.js +115 -15
  32. package/lib/components/radio.d.ts +10 -1
  33. package/lib/components/radio.js +22 -29
  34. package/lib/components/resize-observer.js +2 -0
  35. package/lib/components/scroll-container.js +2 -0
  36. package/lib/components/select.d.ts +150 -190
  37. package/lib/components/select.js +501 -796
  38. package/lib/components/selected-tags.d.ts +14 -4
  39. package/lib/components/selected-tags.js +35 -8
  40. package/lib/components/switch.d.ts +9 -1
  41. package/lib/components/switch.js +27 -6
  42. package/lib/components/tabs.js +1 -1
  43. package/lib/components/tag.d.ts +0 -9
  44. package/lib/components/tag.js +0 -11
  45. package/lib/components/textarea.d.ts +47 -2
  46. package/lib/components/textarea.js +81 -17
  47. package/lib/index.d.ts +1 -0
  48. package/lib/index.js +1 -0
  49. package/lib/styles/button.js +21 -19
  50. package/lib/styles/calendar-month.js +1 -1
  51. package/lib/styles/calendar.js +3 -0
  52. package/lib/styles/checkbox.js +11 -5
  53. package/lib/styles/date-picker.js +16 -4
  54. package/lib/styles/file-upload.d.ts +1 -1
  55. package/lib/styles/file-upload.js +3 -3
  56. package/lib/styles/icon.d.ts +1 -1
  57. package/lib/styles/icon.js +2 -2
  58. package/lib/styles/input.js +6 -10
  59. package/lib/styles/option.d.ts +1 -1
  60. package/lib/styles/option.js +6 -7
  61. package/lib/styles/popup.d.ts +1 -1
  62. package/lib/styles/popup.js +2 -0
  63. package/lib/styles/radio.js +12 -6
  64. package/lib/styles/select-base.js +22 -60
  65. package/lib/styles/select.d.ts +1 -1
  66. package/lib/styles/select.js +13 -2
  67. package/lib/styles/switch.js +10 -5
  68. package/lib/styles/tag.js +3 -5
  69. package/lib/styles/textarea.d.ts +1 -1
  70. package/lib/styles/textarea.js +7 -0
  71. package/lib/types/common.d.ts +3 -3
  72. package/lib/utils/calendar-utils.d.ts +49 -0
  73. package/lib/utils/calendar-utils.js +63 -6
  74. package/lib/utils/property-manager.d.ts +6 -5
  75. package/lib/utils/property-manager.js +14 -15
  76. package/lib/utils/scroll-lock.d.ts +10 -4
  77. package/lib/utils/scroll-lock.js +102 -2
  78. package/lib/utils/upgrade-properties.d.ts +21 -0
  79. package/lib/utils/upgrade-properties.js +47 -0
  80. package/lib/utils/validity.d.ts +98 -2
  81. package/lib/utils/validity.js +244 -8
  82. package/lib/version.d.ts +1 -1
  83. package/lib/version.js +1 -1
  84. package/package.json +8 -6
  85. package/lib/base/ty-component.d.ts.map +0 -1
  86. package/lib/base/ty-component.js.map +0 -1
  87. package/lib/components/button.d.ts.map +0 -1
  88. package/lib/components/button.js.map +0 -1
  89. package/lib/components/calendar-month.d.ts.map +0 -1
  90. package/lib/components/calendar-month.js.map +0 -1
  91. package/lib/components/calendar-navigation.d.ts.map +0 -1
  92. package/lib/components/calendar-navigation.js.map +0 -1
  93. package/lib/components/calendar.d.ts.map +0 -1
  94. package/lib/components/calendar.js.map +0 -1
  95. package/lib/components/checkbox.d.ts.map +0 -1
  96. package/lib/components/checkbox.js.map +0 -1
  97. package/lib/components/copy.d.ts.map +0 -1
  98. package/lib/components/copy.js.map +0 -1
  99. package/lib/components/date-picker.d.ts.map +0 -1
  100. package/lib/components/date-picker.js.map +0 -1
  101. package/lib/components/dropdown.d.ts +0 -403
  102. package/lib/components/dropdown.d.ts.map +0 -1
  103. package/lib/components/dropdown.js +0 -1315
  104. package/lib/components/dropdown.js.map +0 -1
  105. package/lib/components/icon.d.ts.map +0 -1
  106. package/lib/components/icon.js.map +0 -1
  107. package/lib/components/input.d.ts.map +0 -1
  108. package/lib/components/input.js.map +0 -1
  109. package/lib/components/modal.d.ts.map +0 -1
  110. package/lib/components/modal.js.map +0 -1
  111. package/lib/components/multiselect.d.ts +0 -389
  112. package/lib/components/multiselect.d.ts.map +0 -1
  113. package/lib/components/multiselect.js +0 -1301
  114. package/lib/components/multiselect.js.map +0 -1
  115. package/lib/components/option.d.ts.map +0 -1
  116. package/lib/components/option.js.map +0 -1
  117. package/lib/components/popup.d.ts.map +0 -1
  118. package/lib/components/popup.js.map +0 -1
  119. package/lib/components/resize-observer.d.ts.map +0 -1
  120. package/lib/components/resize-observer.js.map +0 -1
  121. package/lib/components/scroll-container.d.ts.map +0 -1
  122. package/lib/components/scroll-container.js.map +0 -1
  123. package/lib/components/step.d.ts.map +0 -1
  124. package/lib/components/step.js.map +0 -1
  125. package/lib/components/tab.d.ts.map +0 -1
  126. package/lib/components/tab.js.map +0 -1
  127. package/lib/components/tabs.d.ts.map +0 -1
  128. package/lib/components/tabs.js.map +0 -1
  129. package/lib/components/tag.d.ts.map +0 -1
  130. package/lib/components/tag.js.map +0 -1
  131. package/lib/components/textarea.d.ts.map +0 -1
  132. package/lib/components/textarea.js.map +0 -1
  133. package/lib/components/tooltip.d.ts.map +0 -1
  134. package/lib/components/tooltip.js.map +0 -1
  135. package/lib/components/wizard.d.ts.map +0 -1
  136. package/lib/components/wizard.js.map +0 -1
  137. package/lib/icons/fontawesome/brands.d.ts.map +0 -1
  138. package/lib/icons/fontawesome/brands.js.map +0 -1
  139. package/lib/icons/fontawesome/regular.d.ts.map +0 -1
  140. package/lib/icons/fontawesome/regular.js.map +0 -1
  141. package/lib/icons/fontawesome/solid.d.ts.map +0 -1
  142. package/lib/icons/fontawesome/solid.js.map +0 -1
  143. package/lib/icons/heroicons/micro.d.ts.map +0 -1
  144. package/lib/icons/heroicons/micro.js.map +0 -1
  145. package/lib/icons/heroicons/mini.d.ts.map +0 -1
  146. package/lib/icons/heroicons/mini.js.map +0 -1
  147. package/lib/icons/heroicons/outline.d.ts.map +0 -1
  148. package/lib/icons/heroicons/outline.js.map +0 -1
  149. package/lib/icons/heroicons/solid.d.ts.map +0 -1
  150. package/lib/icons/heroicons/solid.js.map +0 -1
  151. package/lib/icons/lucide.d.ts.map +0 -1
  152. package/lib/icons/lucide.js.map +0 -1
  153. package/lib/icons/material/filled.d.ts.map +0 -1
  154. package/lib/icons/material/filled.js.map +0 -1
  155. package/lib/icons/material/outlined.d.ts.map +0 -1
  156. package/lib/icons/material/outlined.js.map +0 -1
  157. package/lib/icons/material/round.d.ts.map +0 -1
  158. package/lib/icons/material/round.js.map +0 -1
  159. package/lib/icons/material/sharp.d.ts.map +0 -1
  160. package/lib/icons/material/sharp.js.map +0 -1
  161. package/lib/icons/material/two-tone.d.ts.map +0 -1
  162. package/lib/icons/material/two-tone.js.map +0 -1
  163. package/lib/index.d.ts.map +0 -1
  164. package/lib/index.js.map +0 -1
  165. package/lib/styles/button.d.ts.map +0 -1
  166. package/lib/styles/button.js.map +0 -1
  167. package/lib/styles/calendar-month.d.ts.map +0 -1
  168. package/lib/styles/calendar-month.js.map +0 -1
  169. package/lib/styles/calendar-navigation.d.ts.map +0 -1
  170. package/lib/styles/calendar-navigation.js.map +0 -1
  171. package/lib/styles/calendar.d.ts.map +0 -1
  172. package/lib/styles/calendar.js.map +0 -1
  173. package/lib/styles/copy.d.ts.map +0 -1
  174. package/lib/styles/copy.js.map +0 -1
  175. package/lib/styles/date-picker.d.ts.map +0 -1
  176. package/lib/styles/date-picker.js.map +0 -1
  177. package/lib/styles/dropdown.d.ts +0 -12
  178. package/lib/styles/dropdown.d.ts.map +0 -1
  179. package/lib/styles/dropdown.js +0 -725
  180. package/lib/styles/dropdown.js.map +0 -1
  181. package/lib/styles/icon.d.ts.map +0 -1
  182. package/lib/styles/icon.js.map +0 -1
  183. package/lib/styles/input.d.ts.map +0 -1
  184. package/lib/styles/input.js.map +0 -1
  185. package/lib/styles/modal.d.ts.map +0 -1
  186. package/lib/styles/modal.js.map +0 -1
  187. package/lib/styles/multiselect.d.ts +0 -6
  188. package/lib/styles/multiselect.d.ts.map +0 -1
  189. package/lib/styles/multiselect.js +0 -568
  190. package/lib/styles/multiselect.js.map +0 -1
  191. package/lib/styles/option.d.ts.map +0 -1
  192. package/lib/styles/option.js.map +0 -1
  193. package/lib/styles/popup.d.ts.map +0 -1
  194. package/lib/styles/popup.js.map +0 -1
  195. package/lib/styles/resize-observer.d.ts.map +0 -1
  196. package/lib/styles/resize-observer.js.map +0 -1
  197. package/lib/styles/scroll-container.d.ts.map +0 -1
  198. package/lib/styles/scroll-container.js.map +0 -1
  199. package/lib/styles/step.d.ts.map +0 -1
  200. package/lib/styles/step.js.map +0 -1
  201. package/lib/styles/tab.d.ts.map +0 -1
  202. package/lib/styles/tab.js.map +0 -1
  203. package/lib/styles/tabs.d.ts.map +0 -1
  204. package/lib/styles/tabs.js.map +0 -1
  205. package/lib/styles/tag.d.ts.map +0 -1
  206. package/lib/styles/tag.js.map +0 -1
  207. package/lib/styles/textarea.d.ts.map +0 -1
  208. package/lib/styles/textarea.js.map +0 -1
  209. package/lib/styles/tooltip.d.ts.map +0 -1
  210. package/lib/styles/tooltip.js.map +0 -1
  211. package/lib/styles/wizard.d.ts.map +0 -1
  212. package/lib/styles/wizard.js.map +0 -1
  213. package/lib/types/common.d.ts.map +0 -1
  214. package/lib/types/common.js.map +0 -1
  215. package/lib/utils/calendar-utils.d.ts.map +0 -1
  216. package/lib/utils/calendar-utils.js.map +0 -1
  217. package/lib/utils/icon-registry.d.ts.map +0 -1
  218. package/lib/utils/icon-registry.js.map +0 -1
  219. package/lib/utils/locale.d.ts.map +0 -1
  220. package/lib/utils/locale.js.map +0 -1
  221. package/lib/utils/number-format.d.ts.map +0 -1
  222. package/lib/utils/number-format.js.map +0 -1
  223. package/lib/utils/parse-boolean.d.ts +0 -39
  224. package/lib/utils/parse-boolean.d.ts.map +0 -1
  225. package/lib/utils/parse-boolean.js +0 -23
  226. package/lib/utils/parse-boolean.js.map +0 -1
  227. package/lib/utils/positioning.d.ts.map +0 -1
  228. package/lib/utils/positioning.js.map +0 -1
  229. package/lib/utils/property-capture.d.ts.map +0 -1
  230. package/lib/utils/property-capture.js.map +0 -1
  231. package/lib/utils/property-manager.d.ts.map +0 -1
  232. package/lib/utils/property-manager.js.map +0 -1
  233. package/lib/utils/resize-observer.d.ts.map +0 -1
  234. package/lib/utils/resize-observer.js.map +0 -1
  235. package/lib/utils/scroll-lock.d.ts.map +0 -1
  236. package/lib/utils/scroll-lock.js.map +0 -1
  237. package/lib/utils/styles.d.ts.map +0 -1
  238. package/lib/utils/styles.js.map +0 -1
  239. package/lib/version.d.ts.map +0 -1
  240. package/lib/version.js.map +0 -1
@@ -1,1471 +1 @@
1
- /* =====================================================================
2
- * tyrell-theme.css — the OKLCH theme engine for Tyrell Components
3
- * =====================================================================
4
- *
5
- * Opt-in. Load AFTER `tyrell.css`. Override a few variables to rebrand —
6
- * or seed a color directly, declare a named theme, scope one to a
7
- * subtree. `tyrell.css` alone is correct and accessible without this
8
- * file; this is what turns it into a theming ENGINE rather than a fixed
9
- * palette: auto-contrast text, seed ingestion, named/scoped themes,
10
- * animated theme transitions. See CSS_GUIDE.md → Color Customization.
11
- *
12
- * <link rel="stylesheet" href=".../tyrell.css">
13
- * <link rel="stylesheet" href=".../tyrell-theme.css">
14
- *
15
- * :root {
16
- * --ty-primary-hue: 200; // teal. Try 260 indigo, 30 orange, 145 emerald.
17
- * --ty-primary-chroma: 0.13;
18
- * }
19
- *
20
- * =====================================================================
21
- * THE FORMULA
22
- * =====================================================================
23
- *
24
- * Every color in the library is one formula on five axes:
25
- *
26
- * oklch(
27
- * L = L-curve[shade] × flavor-l-factor ← Tier 2 × Tier 4
28
- * C = flavor-chroma × saturation-curve[shade] ← Tier 1 × Tier 3
29
- * H = flavor-hue ← Tier 1
30
- * )
31
- *
32
- * Pick a flavor (primary / success / warning / danger /
33
- * neutral). Pick a shade (strong / bold / base / soft / faint). That's
34
- * the cell; the formula gives you its color.
35
- *
36
- * FLAVOR axis — which semantic role (carries its own hue, chroma,
37
- * l-factor seeds)
38
- * SHADE axis — 5 emphasis stops shared across flavors
39
- * (strong / bold / base / soft / faint)
40
- * HUE axis — what color family (0°–360°)
41
- * CHROMA axis — how saturated (0 = grey, ~0.4 = max vivid)
42
- * L axis — how dark or light (0 = black, 1 = white)
43
- * Light mode: low L = more emphasis.
44
- * Dark mode: high L = more emphasis (curve flips).
45
- *
46
- * Worked example — `--ty-color-warning-bold` in LIGHT mode:
47
- *
48
- * L = 0.46 × 1 = 0.46 ← l-bold × warning-l-factor
49
- * C = 0.26 × 1.00 = 0.26 ← warning-chroma × c-bold-mult
50
- * H = 75° ← warning-hue
51
- * → oklch(0.46 0.26 75) (a punchy amber for +1 emphasis text)
52
- *
53
- * Want warning a notch darker without touching anything else? Set
54
- * `--ty-warning-l-factor: 0.85` and the new L becomes 0.46 × 0.85 =
55
- * 0.39. Every warning shade shifts in step; primary / success / danger
56
- * are untouched.
57
- *
58
- * =====================================================================
59
- * FILE LAYOUT
60
- * =====================================================================
61
- *
62
- * SECTION 1 — KNOBS
63
- * The variables you might want to override. Six tiers from drop-in
64
- * rebrand (Tier 1) to surgical per-flavor tweak (Tier 4) plus solid
65
- * buttons (Tier 5).
66
- *
67
- * SECTION 2 — IMPLEMENTATION
68
- * The oklch() expressions that wire the knobs through to the actual
69
- * color tokens. Rarely needs editing — Section 1 is the contract.
70
- *
71
- * Browser support: oklch() is in every evergreen browser since mid-2023.
72
- * Tier 5 (solid) additionally uses OKLCH relative color — oklch(from …) —
73
- * which lands later: Chrome 119, Safari 16.4, Firefox 128 (mid-2024).
74
- * Solid fills have no fallback below those versions.
75
- *
76
- * ===================================================================== */
77
-
78
- /* =====================================================================
79
- * SECTION 1 — KNOBS
80
- * =====================================================================
81
- *
82
- * Five tiers, ordered by how often you'd touch them. Override any of
83
- * these in your own `:root` (or `html.dark` for per-mode tuning) —
84
- * your declaration wins by source order.
85
- *
86
- * Tier 1 — FLAVOR SEEDS each flavor's hue + chroma, incl. primary.
87
- * Tier 2 — L-CURVE 5 lightness stops for the emphasis ramp.
88
- * Tier 3 — SATURATION CURVE per-shade chroma multipliers.
89
- * Tier 4 — PER-FLAVOR L-FACTOR per-flavor lightness multiplier — push
90
- * one flavor up or down without touching
91
- * the others. Default 1.
92
- * Tier 5 — SOLID FILLS solid-button system: hover/active/tone
93
- * L offsets + per-theme dim/desaturate.
94
- * ===================================================================== */
95
-
96
- :root {
97
- /* ----------------------------------------------------------------
98
- * Tier 1 — FLAVOR SEEDS
99
- * Every flavor — including primary — is one hue + one chroma. No
100
- * flavor derives from another; each is a standalone dial:
101
- * --ty-success-hue: 160; (more teal)
102
- * --ty-warning-chroma: 0.2; (more vivid)
103
- * Rebrand by overriding --ty-primary-hue/-chroma alone; touch the
104
- * others only when a specific flavor needs its own tuning.
105
- * --------------------------------------------------------------*/
106
-
107
- --ty-primary-hue: 252;
108
- --ty-primary-chroma: 0.08; /* restrained default; the loud 0.2 read as "bollywood" */
109
-
110
- /* Surface tint. 0 = monochrome surfaces (default, no primary leak).
111
- * Bump to ~0.005 (light) / ~0.012 (dark) to warm surfaces toward primary. */
112
- --ty-surface-chroma: 0;
113
-
114
- --ty-success-hue: 145;
115
- --ty-success-chroma: 0.086;
116
-
117
- --ty-warning-hue: 76;
118
- --ty-warning-chroma: 0.178;
119
-
120
- --ty-danger-hue: 31;
121
- --ty-danger-chroma: 0.134;
122
-
123
- /* Neutral is ACHROMATIC by default — greys do not follow primary.
124
- * Most of an interface is monochrome; a rebrand should not drift it.
125
- * To warm greys toward primary (the pre-2026-08 behavior), opt in:
126
- * --ty-neutral-hue: var(--ty-primary-hue);
127
- * --ty-neutral-chroma: 0.003; */
128
- --ty-neutral-hue: 0;
129
- --ty-neutral-chroma: 0;
130
-
131
- /* ----------------------------------------------------------------
132
- * Tier 2 — L-CURVE (light mode)
133
- * 5 lightness stops per flavor for the emphasis ramp.
134
- * Lower L = darker = more emphasis in light mode.
135
- * Plus 3 bg L stops for the soft-tint backgrounds.
136
- * --------------------------------------------------------------*/
137
-
138
- --ty-l-strong: 0.38; /* ++ max emphasis */
139
- --ty-l-bold: 0.46; /* + high emphasis */
140
- --ty-l-base: 0.54; /* body */
141
- --ty-l-soft: 0.72; /* - low emphasis */
142
- --ty-l-faint: 0.88; /* -- min emphasis */
143
-
144
- /* BG TRACK — the flavor's BASE color at low opacity, composited over
145
- * whatever surface it sits on. No bg-specific L or chroma stops: the
146
- * ink is always mid-scale (gamut-happy, l-factor-safe), and the alpha
147
- * does the washing. Direction is automatic — the same token lightens
148
- * a dark surface and darkens a light one — and l-factor reaches the
149
- * tint only through the ink, scaled by alpha: it points, it doesn't
150
- * shove. */
151
- --ty-a-bg-base: 9%;
152
- --ty-a-bg-bold: 17%;
153
- --ty-a-bg-soft: 4%;
154
-
155
- /* Text ladder (--ty-text-*) and surface borders — historically
156
- * hardcoded hexes in tyrell.css that a rebrand never touched; now
157
- * engine-wired at the SAME lightness the hexes had (measured via
158
- * oklch(from #hex l c h)), tinted by the neutral seeds. At the
159
- * default --ty-neutral-chroma (≈0.005) the tint is imperceptible. */
160
- --ty-l-text-strong: 0; /* was #000 */
161
- --ty-l-text-bold: 0; /* was #000 */
162
- --ty-l-text-base: 0.21; /* was #111827 */
163
- --ty-l-text-soft: 0.37; /* was #374151 */
164
- --ty-l-text-faint: 0.71; /* was #9ca3af */
165
-
166
- --ty-l-border-content: 0.93; /* was #e5e7eb */
167
- --ty-l-border-elevated: 0.93;
168
- --ty-l-border-floating: 0.93;
169
-
170
- /* Generic border ladder — borders are their OWN family, not ink.
171
- * Historically --ty-border-* aliased the neutral text ramp; that tied
172
- * app chrome to the text emphasis curve (and to --ty-neutral-l-factor),
173
- * so tuning text moved every border. Defaults preserve the exact L the
174
- * aliases produced. Borders sit relative to the surfaces they separate;
175
- * tune them here without touching text. */
176
- --ty-l-border-strong: 0.46; /* was color-neutral-bold */
177
- --ty-l-border-bold: 0.64;
178
- --ty-l-border: 0.76; /* was color-neutral-soft */
179
- --ty-l-border-soft: 0.88; /* was color-neutral-faint */
180
- --ty-l-border-faint: 0.92;
181
-
182
- /* Surface ladder + remaining per-mode absolutes, as L dials. These were
183
- * whole oklch() declarations swapped per mode; as numeric dials they are
184
- * (a) consistent with every other family and (b) interpolable — which is
185
- * what lets theme/mode switches ANIMATE (see THEME TRANSITIONS at the
186
- * end of this file). */
187
- --ty-l-surface-canvas: 0.985;
188
- --ty-l-surface-content: 1;
189
- --ty-l-surface-elevated: 1;
190
- --ty-l-surface-floating: 1;
191
- --ty-l-surface-input: 1;
192
-
193
- --ty-l-solid-neutral: 0.4; /* the neutral "ink" fill — dark in BOTH modes */
194
- /* neutral+ is FULL-CONTRAST ink — near-black on light, near-white on dark
195
- (mode block below) — not "anchor + shared offset" like other tones: the
196
- max-emphasis monochrome button is an absolute, not a nudge. Matches the
197
- static tyrell.css light value (#000) that predates this dial. */
198
- --ty-l-solid-neutral-strong: 0.15;
199
- --ty-l-bg-neutral-strong: 0.25; /* opposes the mode: dark bg on light page */
200
- --ty-l-bg-neutral-faint: 0.99; /* follows the mode */
201
- --ty-c-bg-neutral-faint-mult: 0.4;
202
-
203
- --ty-focus-ring-alpha: 5%; /* focus ring mix strength (dark needs more) */
204
-
205
- /* ----------------------------------------------------------------
206
- * Tier 3 — SATURATION CURVE
207
- * Per-shade chroma multipliers. Each shade's chroma =
208
- * flavor-chroma × multiplier. Drops near the extremes so
209
- * near-white and near-black can hold their tint.
210
- * --------------------------------------------------------------*/
211
-
212
- --ty-c-strong-mult: 0.77;
213
- --ty-c-bold-mult: 1;
214
- --ty-c-base-mult: 0.92;
215
- --ty-c-soft-mult: 0.77;
216
- --ty-c-faint-mult: 0.46;
217
-
218
- /* ----------------------------------------------------------------
219
- * Tier 4 — PER-FLAVOR L-FACTOR
220
- * Multiplies the L-curve values for that flavor only. Default 1 =
221
- * no change. Useful when one flavor's hue sits too close to
222
- * primary's on the wheel and the buttons blend.
223
- *
224
- * Example: primary-hue: 47° (gold). Warning sits at 75° (amber).
225
- * Both render as similar warm browns at that chroma. Drop warning
226
- * a notch and it darkens enough to stand apart:
227
- * --ty-warning-l-factor: 0.85;
228
- *
229
- * NOTE: the L-curve flips between light and dark mode, so a factor
230
- * < 1 darkens in light mode but DIMS in dark mode. If you want
231
- * symmetric "more emphatic" in both modes, set the factor here for
232
- * light AND set its inverse (1 / factor, roughly) in `html.dark`.
233
- * --------------------------------------------------------------*/
234
-
235
- --ty-primary-l-factor: 0.96;
236
- --ty-success-l-factor: 1;
237
- --ty-warning-l-factor: 1.3;
238
- --ty-danger-l-factor: 0.93;
239
- --ty-neutral-l-factor: 1;
240
-
241
- /* ----------------------------------------------------------------
242
- * Tier 5 — SOLID FILLS
243
- * Solid buttons are their OWN system, not the emphasis ramp. Each
244
- * flavor's fill defaults to --ty-color-{flavor}; the knobs below
245
- * derive its hover / active / tone+ / tone- and per-theme adjust.
246
- * Math lives in SECTION 2 (search "Tier 5 — SOLID"); these are the
247
- * dials.
248
- *
249
- * Axis A — interaction & tone, OKLCH L offsets on the fill.
250
- * Axis B — per-theme adjust applied to the base fill (dim/desaturate).
251
- *
252
- * NOTE: like Tier 4, the emphasis curve flips for dark, so these L
253
- * offsets are sign-flipped in `html.dark` below (darken in light =
254
- * lighten in dark). Keep the two blocks in sync.
255
- * --------------------------------------------------------------*/
256
-
257
- /* Axis A — interaction (light: darken on press, so offsets are negative) */
258
- --ty-solid-hover-l: -0.04; /* :hover */
259
- --ty-solid-active-l: -0.08; /* :active */
260
- --ty-solid-strong-l: -0.06; /* tone+ */
261
- --ty-solid-soft-l: 0.1; /* tone- */
262
-
263
- /* Axis B — per-theme adjust (light reads fine → identity) */
264
- --ty-solid-l: 0; /* lightness offset — negative dims */
265
- --ty-solid-c: 1; /* chroma multiplier — <1 desaturates */
266
- --ty-solid-h: 0; /* hue offset (deg) */
267
-
268
- /* Axis C — per-flavor solid anchor lift (added to the base fill's L,
269
- * tones/hover/active then derive from the lifted anchor). The solid
270
- * ladder's "darker = stronger" is FALSE for the yellow family: darkened
271
- * hue-75 is brown, so warning's whole ladder shifts UP instead — soft
272
- * 0.82 pale amber, base 0.72 vivid orange, strong 0.66 deep orange, all
273
- * black-text (Material treats amber the same way). Other flavors: 0. */
274
- --ty-primary-solid-l: 0;
275
- --ty-success-solid-l: 0;
276
- --ty-warning-solid-l: 0;
277
- --ty-danger-solid-l: 0;
278
- }
279
-
280
- /* Dark mode overrides for the L-curve and saturation curve, plus Tier 1
281
- * (per-flavor hue/chroma, incl. primary) and Tier 4 (l-factor)
282
- * — dark ships its own distinct flavor tuning here, not a
283
- * carry-through of :root's light values. */
284
- html.dark,
285
- html[data-theme="dark"],
286
- [data-ty-theme].dark,
287
- [data-ty-theme][data-theme="dark"] {
288
- --ty-primary-l-factor: 1;
289
- --ty-solid-fg-threshold: 0.5 !important;
290
- --ty-primary-hue: 226;
291
- --ty-primary-chroma: 0.065;
292
- --ty-success-hue: 129;
293
- --ty-success-chroma: 0.092;
294
- --ty-success-l-factor: 1.09;
295
- --ty-danger-hue: 13;
296
- --ty-danger-chroma: 0.101;
297
- --ty-danger-l-factor: 1.06;
298
- --ty-warning-hue: 82;
299
- --ty-warning-chroma: 0.195;
300
- --ty-warning-l-factor: 1.5;
301
- /* Tier 2 dark — inverted curve. Higher L = lighter text = more
302
- * emphasis on a dark background. */
303
- --ty-l-strong: 0.72;
304
- --ty-l-bold: 0.66;
305
- --ty-l-base: 0.62;
306
- --ty-l-soft: 0.46;
307
- --ty-l-faint: 0.3;
308
-
309
- /* BG TRACK dark — dark ink sits closer to its surface in L than
310
- * light's does, so the tint needs a touch more alpha to be felt. */
311
- --ty-a-bg-base: 13%;
312
- --ty-a-bg-bold: 22%;
313
- --ty-a-bg-soft: 7%;
314
-
315
- /* Text ladder + surface borders dark — L matched to the hexes
316
- * tyrell.css used to hardcode (#fff/#f9fafb/#d6d6d6/#7f8590/#555a63,
317
- * borders #030712/#414141/#494949). */
318
- --ty-l-text-strong: 1;
319
- --ty-l-text-bold: 0.985;
320
- --ty-l-text-base: 0.88;
321
- --ty-l-text-soft: 0.62;
322
- --ty-l-text-faint: 0.47;
323
-
324
- --ty-l-border-content: 0.13;
325
- --ty-l-border-elevated: 0.375;
326
- --ty-l-border-floating: 0.41;
327
-
328
- --ty-l-border-strong: 0.66;
329
- --ty-l-border-bold: 0.46;
330
- --ty-l-border: 0.38;
331
- --ty-l-border-soft: 0.3;
332
- --ty-l-border-faint: 0.3;
333
-
334
- /* Surface ladder + absolutes dark — hand-tuned values, now as dials. */
335
- --ty-l-surface-canvas: 0.12;
336
- --ty-l-surface-content: 0.16;
337
- --ty-l-surface-elevated: 0.19;
338
- --ty-l-surface-floating: 0.22;
339
- --ty-l-surface-input: 0.18;
340
-
341
- --ty-l-solid-neutral: 0.18;
342
- --ty-l-solid-neutral-strong: 0.88; /* inverted ink: white button, black text */
343
- --ty-l-bg-neutral-strong: 0.95;
344
- --ty-l-bg-neutral-faint: 0.15;
345
- --ty-c-bg-neutral-faint-mult: 2;
346
-
347
- /* Tier 4 dark — neutral inks pulled down a notch against dark surfaces. */
348
- --ty-neutral-l-factor: 0.8;
349
-
350
- --ty-focus-ring-alpha: 20%;
351
-
352
- /* Tier 3 dark — dim shades hold more chroma so they don't grey out;
353
- * strong shades trim chroma so bright tones don't over-pop. */
354
- --ty-c-strong-mult: 0.77;
355
- --ty-c-bold-mult: 1;
356
- --ty-c-base-mult: 0.92;
357
- --ty-c-soft-mult: 0.77;
358
- --ty-c-faint-mult: 0.5;
359
-
360
- /* Tier 5 dark — interaction offsets flip sign (press LIGHTENS on dark),
361
- * and the per-theme adjust dims + desaturates the fills against the
362
- * dark canvas. (Computed solid tokens are declared once at html:root.) */
363
- /* Bigger than light mode's 0.04/0.08: small L deltas at the dark end of
364
- * an emissive screen read much weaker than the same delta mid-scale, so
365
- * dark hover needs more push to be felt at all. */
366
- --ty-solid-hover-l: 0.07; /* :hover */
367
- --ty-solid-active-l: 0.11; /* :active */
368
- --ty-solid-strong-l: 0.06; /* tone+ */
369
- --ty-solid-soft-l: -0.1; /* tone- */
370
-
371
- --ty-solid-l: -0.2; /* dim against dark canvas */
372
- --ty-solid-c: 0.7; /* desaturate against dark canvas */
373
- --ty-solid-h: 0; /* hue offset */
374
-
375
- /* Axis C — dark warning fills are already dim enough not to brown out
376
- * (and browns read intentional on dark); no lift needed. */
377
- --ty-warning-solid-l: 0;
378
- }
379
-
380
- /* =====================================================================
381
- * SECTION 2 — IMPLEMENTATION
382
- * =====================================================================
383
- *
384
- * The oklch() expressions that turn Section 1's knobs into the actual
385
- * --ty-color-*, --ty-bg-*, --ty-border-*, --ty-surface-*, --ty-input-*,
386
- * and --ty-solid-* tokens that components read.
387
- *
388
- * Pattern for each flavor's 5-shade fg ramp + 3-shade bg ramp:
389
- *
390
- * --ty-color-{flavor}-{shade}: oklch(
391
- * calc(var(--ty-l-{shade}) * var(--ty-{flavor}-l-factor)) ← L
392
- * calc(var(--ty-{flavor}-chroma) * var(--ty-c-{shade}-mult)) ← C
393
- * var(--ty-{flavor}-hue) ← H
394
- * );
395
- *
396
- * Formulas are declared ONCE, at `html:root` (specificity 0,1,1 — NOT
397
- * plain `:root` (0,1,0)): they out-rank tyrell.css's hardcoded light
398
- * tokens by specificity and its hardcoded `html.dark` hexes (0,1,1) by
399
- * source order, since the theme layer loads after. Dark mode needs no
400
- * formula duplicates — the dials they read (Tier 2/3, SECTION 1) are
401
- * what flip per mode. The `html.dark` block at the END of this file
402
- * holds only genuine per-mode DATA (surface ladder, hand-pinned
403
- * absolutes) — never formulas. If you add a token here, do NOT mirror
404
- * it there unless its VALUE is mode-specific.
405
- * ===================================================================== */
406
-
407
- html:root,
408
- [data-ty-theme] {
409
- /* ----------------------------------------------------------------
410
- * Flavor color ramps (fg + bg + border)
411
- *
412
- * SEED INGESTION — every flavor resolves ONE seed color, and every
413
- * ramp formula reads that seed's c + h channels via relative color
414
- * syntax; L always comes from the mode-flipped curve. Two ways in:
415
- *
416
- * numbers (default) — the Tier 1 hue+chroma dials construct the
417
- * seed: --ty-primary-hue: 200; --ty-primary-chroma: 0.13;
418
- *
419
- * a color — set the seed directly and the dials are bypassed:
420
- * --ty-primary-seed: #76467c;
421
- * --ty-danger-seed: crimson;
422
- *
423
- * The seed's LIGHTNESS is discarded by design: a color's identity
424
- * here is hue + chroma; where each shade sits per mode is the
425
- * L-curve's job. That is what makes dark mode, tones and contrast
426
- * correct for ANY seed — light or dark. (Your exact pixel may
427
- * appear nowhere; pin --ty-solid-X etc. if you need it literally.)
428
- * --------------------------------------------------------------*/
429
- /* BG TRACK — `--ty-bg-X` is the flavor's BASE ink at low alpha, real
430
- * transparency, composited by the browser over whatever is actually
431
- * underneath. Why this beats computing a tint lightness:
432
- *
433
- * - The ink is MID-SCALE (L 0.38–0.88), where the gamut is widest
434
- * and `l-stop × l-factor` behaves — no near-white/near-black
435
- * endpoint math, no chroma clipping, no hue drift.
436
- * - Direction per mode is free: the same token darkens a light
437
- * surface and lightens a dark one, on ANY surface level (content,
438
- * elevated, floating), not just a nominal one.
439
- * - l-factor points rather than shoves: it moves the ink a little,
440
- * and only alpha × that movement reaches the tint.
441
- *
442
- * The wash amount is the --ty-a-bg-* dials (Tier 2 area). */
443
- --ty-primary-seed-resolved: var(
444
- --ty-primary-seed,
445
- oklch(0.5 var(--ty-primary-chroma) var(--ty-primary-hue))
446
- );
447
- --ty-success-seed-resolved: var(
448
- --ty-success-seed,
449
- oklch(0.5 var(--ty-success-chroma) var(--ty-success-hue))
450
- );
451
- --ty-warning-seed-resolved: var(
452
- --ty-warning-seed,
453
- oklch(0.5 var(--ty-warning-chroma) var(--ty-warning-hue))
454
- );
455
- --ty-danger-seed-resolved: var(
456
- --ty-danger-seed,
457
- oklch(0.5 var(--ty-danger-chroma) var(--ty-danger-hue))
458
- );
459
- --ty-neutral-seed-resolved: var(
460
- --ty-neutral-seed,
461
- oklch(0.5 var(--ty-neutral-chroma) var(--ty-neutral-hue))
462
- );
463
-
464
- /* Primary */
465
- --ty-color-primary-strong: oklch(
466
- from var(--ty-primary-seed-resolved)
467
- calc(var(--ty-l-strong) * var(--ty-primary-l-factor))
468
- calc(c * var(--ty-c-strong-mult)) h
469
- );
470
- --ty-color-primary-bold: oklch(
471
- from var(--ty-primary-seed-resolved)
472
- calc(var(--ty-l-bold) * var(--ty-primary-l-factor))
473
- calc(c * var(--ty-c-bold-mult)) h
474
- );
475
- --ty-color-primary: oklch(
476
- from var(--ty-primary-seed-resolved)
477
- calc(var(--ty-l-base) * var(--ty-primary-l-factor))
478
- calc(c * var(--ty-c-base-mult)) h
479
- );
480
- --ty-color-primary-soft: oklch(
481
- from var(--ty-primary-seed-resolved)
482
- calc(var(--ty-l-soft) * var(--ty-primary-l-factor))
483
- calc(c * var(--ty-c-soft-mult)) h
484
- );
485
- --ty-color-primary-faint: oklch(
486
- from var(--ty-primary-seed-resolved)
487
- calc(var(--ty-l-faint) * var(--ty-primary-l-factor))
488
- calc(c * var(--ty-c-faint-mult)) h
489
- );
490
- --ty-bg-primary: oklch(
491
- from var(--ty-color-primary) l c h / var(--ty-a-bg-base)
492
- );
493
- --ty-bg-primary-bold: oklch(
494
- from var(--ty-color-primary) l c h / var(--ty-a-bg-bold)
495
- );
496
- --ty-bg-primary-soft: oklch(
497
- from var(--ty-color-primary) l c h / var(--ty-a-bg-soft)
498
- );
499
- --ty-border-primary: var(--ty-color-primary-soft);
500
-
501
- /* Success */
502
- --ty-color-success-strong: oklch(
503
- from var(--ty-success-seed-resolved)
504
- calc(var(--ty-l-strong) * var(--ty-success-l-factor))
505
- calc(c * var(--ty-c-strong-mult)) h
506
- );
507
- --ty-color-success-bold: oklch(
508
- from var(--ty-success-seed-resolved)
509
- calc(var(--ty-l-bold) * var(--ty-success-l-factor))
510
- calc(c * var(--ty-c-bold-mult)) h
511
- );
512
- --ty-color-success: oklch(
513
- from var(--ty-success-seed-resolved)
514
- calc(var(--ty-l-base) * var(--ty-success-l-factor))
515
- calc(c * var(--ty-c-base-mult)) h
516
- );
517
- --ty-color-success-soft: oklch(
518
- from var(--ty-success-seed-resolved)
519
- calc(var(--ty-l-soft) * var(--ty-success-l-factor))
520
- calc(c * var(--ty-c-soft-mult)) h
521
- );
522
- --ty-color-success-faint: oklch(
523
- from var(--ty-success-seed-resolved)
524
- calc(var(--ty-l-faint) * var(--ty-success-l-factor))
525
- calc(c * var(--ty-c-faint-mult)) h
526
- );
527
- --ty-bg-success: oklch(
528
- from var(--ty-color-success) l c h / var(--ty-a-bg-base)
529
- );
530
- --ty-bg-success-bold: oklch(
531
- from var(--ty-color-success) l c h / var(--ty-a-bg-bold)
532
- );
533
- --ty-bg-success-soft: oklch(
534
- from var(--ty-color-success) l c h / var(--ty-a-bg-soft)
535
- );
536
- --ty-border-success: var(--ty-color-success-soft);
537
-
538
- /* Danger */
539
- --ty-color-danger-strong: oklch(
540
- from var(--ty-danger-seed-resolved)
541
- calc(var(--ty-l-strong) * var(--ty-danger-l-factor))
542
- calc(c * var(--ty-c-strong-mult)) h
543
- );
544
- --ty-color-danger-bold: oklch(
545
- from var(--ty-danger-seed-resolved)
546
- calc(var(--ty-l-bold) * var(--ty-danger-l-factor))
547
- calc(c * var(--ty-c-bold-mult)) h
548
- );
549
- --ty-color-danger: oklch(
550
- from var(--ty-danger-seed-resolved)
551
- calc(var(--ty-l-base) * var(--ty-danger-l-factor))
552
- calc(c * var(--ty-c-base-mult)) h
553
- );
554
- --ty-color-danger-soft: oklch(
555
- from var(--ty-danger-seed-resolved)
556
- calc(var(--ty-l-soft) * var(--ty-danger-l-factor))
557
- calc(c * var(--ty-c-soft-mult)) h
558
- );
559
- --ty-color-danger-faint: oklch(
560
- from var(--ty-danger-seed-resolved)
561
- calc(var(--ty-l-faint) * var(--ty-danger-l-factor))
562
- calc(c * var(--ty-c-faint-mult)) h
563
- );
564
- --ty-bg-danger: oklch(
565
- from var(--ty-color-danger) l c h / var(--ty-a-bg-base)
566
- );
567
- --ty-bg-danger-bold: oklch(
568
- from var(--ty-color-danger) l c h / var(--ty-a-bg-bold)
569
- );
570
- --ty-bg-danger-soft: oklch(
571
- from var(--ty-color-danger) l c h / var(--ty-a-bg-soft)
572
- );
573
- --ty-border-danger: var(--ty-color-danger-soft);
574
-
575
- /* Warning */
576
- --ty-color-warning-strong: oklch(
577
- from var(--ty-warning-seed-resolved)
578
- calc(var(--ty-l-strong) * var(--ty-warning-l-factor))
579
- calc(c * var(--ty-c-strong-mult)) h
580
- );
581
- --ty-color-warning-bold: oklch(
582
- from var(--ty-warning-seed-resolved)
583
- calc(var(--ty-l-bold) * var(--ty-warning-l-factor))
584
- calc(c * var(--ty-c-bold-mult)) h
585
- );
586
- --ty-color-warning: oklch(
587
- from var(--ty-warning-seed-resolved)
588
- calc(var(--ty-l-base) * var(--ty-warning-l-factor))
589
- calc(c * var(--ty-c-base-mult)) h
590
- );
591
- --ty-color-warning-soft: oklch(
592
- from var(--ty-warning-seed-resolved)
593
- calc(var(--ty-l-soft) * var(--ty-warning-l-factor))
594
- calc(c * var(--ty-c-soft-mult)) h
595
- );
596
- --ty-color-warning-faint: oklch(
597
- from var(--ty-warning-seed-resolved)
598
- calc(var(--ty-l-faint) * var(--ty-warning-l-factor))
599
- calc(c * var(--ty-c-faint-mult)) h
600
- );
601
- --ty-bg-warning: oklch(
602
- from var(--ty-color-warning) l c h / var(--ty-a-bg-base)
603
- );
604
- --ty-bg-warning-bold: oklch(
605
- from var(--ty-color-warning) l c h / var(--ty-a-bg-bold)
606
- );
607
- --ty-bg-warning-soft: oklch(
608
- from var(--ty-color-warning) l c h / var(--ty-a-bg-soft)
609
- );
610
- --ty-border-warning: var(--ty-color-warning-soft);
611
-
612
- /* Neutral — same L curve, near-zero chroma so the grey scale stays grey. */
613
- --ty-color-neutral-strong: oklch(
614
- from var(--ty-neutral-seed-resolved)
615
- calc(var(--ty-l-strong) * var(--ty-neutral-l-factor))
616
- calc(c * var(--ty-c-strong-mult)) h
617
- );
618
- --ty-color-neutral-bold: oklch(
619
- from var(--ty-neutral-seed-resolved)
620
- calc(var(--ty-l-bold) * var(--ty-neutral-l-factor))
621
- calc(c * var(--ty-c-bold-mult)) h
622
- );
623
- --ty-color-neutral: oklch(
624
- from var(--ty-neutral-seed-resolved)
625
- calc(var(--ty-l-base) * var(--ty-neutral-l-factor))
626
- calc(c * var(--ty-c-base-mult)) h
627
- );
628
- --ty-color-neutral-soft: oklch(
629
- from var(--ty-neutral-seed-resolved)
630
- calc(var(--ty-l-soft) * var(--ty-neutral-l-factor))
631
- calc(c * var(--ty-c-soft-mult)) h
632
- );
633
- --ty-color-neutral-faint: oklch(
634
- from var(--ty-neutral-seed-resolved)
635
- calc(var(--ty-l-faint) * var(--ty-neutral-l-factor))
636
- calc(c * var(--ty-c-faint-mult)) h
637
- );
638
- --ty-bg-neutral: oklch(
639
- from var(--ty-color-neutral) l c h / var(--ty-a-bg-base)
640
- );
641
- --ty-bg-neutral-bold: oklch(
642
- from var(--ty-color-neutral) l c h / var(--ty-a-bg-bold)
643
- );
644
- --ty-bg-neutral-soft: oklch(
645
- from var(--ty-color-neutral) l c h / var(--ty-a-bg-soft)
646
- );
647
- --ty-bg-neutral-strong: oklch(
648
- from var(--ty-neutral-seed-resolved) var(--ty-l-bg-neutral-strong)
649
- calc(c * 2) h
650
- );
651
- --ty-bg-neutral-faint: oklch(
652
- from var(--ty-neutral-seed-resolved) var(--ty-l-bg-neutral-faint)
653
- calc(c * var(--ty-c-bg-neutral-faint-mult)) h
654
- );
655
-
656
- /* ----------------------------------------------------------------
657
- * Global neutral borders — own family, own L ladder (Tier 2).
658
- * Tinted by the neutral seeds like everything grey, but NOT tied to
659
- * the text emphasis curve or --ty-neutral-l-factor. Per-flavor
660
- * accent borders (--ty-border-{flavor}) stay ink aliases — a colored
661
- * border SHOULD track its flavor's ink.
662
- * --------------------------------------------------------------*/
663
- --ty-border-strong: oklch(
664
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-strong) c h
665
- );
666
- --ty-border: oklch(
667
- from var(--ty-neutral-seed-resolved) var(--ty-l-border) c h
668
- );
669
- --ty-border-bold: oklch(
670
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-bold) c h
671
- );
672
- --ty-border-soft: oklch(
673
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-soft) c h
674
- );
675
- --ty-border-faint: oklch(
676
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-faint) c h
677
- );
678
-
679
- /* ----------------------------------------------------------------
680
- * Text ladder + surface borders — engine-wired versions of tokens
681
- * tyrell.css hardcodes as hexes. Own L dials (Tier 2), neutral
682
- * hue/chroma tint. These out-rank the base hexes the same way every
683
- * other token here does; a rebrand now reaches body text too.
684
- * --------------------------------------------------------------*/
685
- --ty-text-strong: oklch(
686
- from var(--ty-neutral-seed-resolved) var(--ty-l-text-strong) c h
687
- );
688
- --ty-text-bold: oklch(
689
- from var(--ty-neutral-seed-resolved) var(--ty-l-text-bold) c h
690
- );
691
- --ty-text: oklch(
692
- from var(--ty-neutral-seed-resolved) var(--ty-l-text-base) c h
693
- );
694
- --ty-text-soft: oklch(
695
- from var(--ty-neutral-seed-resolved) var(--ty-l-text-soft) c h
696
- );
697
- --ty-text-faint: oklch(
698
- from var(--ty-neutral-seed-resolved) var(--ty-l-text-faint) c h
699
- );
700
-
701
- --ty-content-border: oklch(
702
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-content) c h
703
- );
704
- --ty-elevated-border: oklch(
705
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-elevated) c h
706
- );
707
- --ty-floating-border: oklch(
708
- from var(--ty-neutral-seed-resolved) var(--ty-l-border-floating) c h
709
- );
710
-
711
- /* ----------------------------------------------------------------
712
- * Surfaces — monochrome by default; --ty-surface-chroma warms them.
713
- * --------------------------------------------------------------*/
714
- --ty-surface-canvas: oklch(
715
- from var(--ty-primary-seed-resolved) var(--ty-l-surface-canvas)
716
- var(--ty-surface-chroma) h
717
- );
718
- --ty-surface-content: oklch(
719
- from var(--ty-primary-seed-resolved) var(--ty-l-surface-content)
720
- var(--ty-surface-chroma) h
721
- );
722
- --ty-surface-elevated: oklch(
723
- from var(--ty-primary-seed-resolved) var(--ty-l-surface-elevated)
724
- var(--ty-surface-chroma) h
725
- );
726
- --ty-surface-floating: oklch(
727
- from var(--ty-primary-seed-resolved) var(--ty-l-surface-floating)
728
- var(--ty-surface-chroma) h
729
- );
730
- --ty-surface-input: oklch(
731
- from var(--ty-primary-seed-resolved) var(--ty-l-surface-input)
732
- var(--ty-surface-chroma) h
733
- );
734
-
735
- /* ----------------------------------------------------------------
736
- * Inputs — tied to neutral ramp so form controls retint with primary.
737
- * --------------------------------------------------------------*/
738
- --ty-input-bg: var(--ty-surface-input);
739
- /* Value text and placeholder ride the TEXT ladder, like the static
740
- palette (#111827 / #9ca3af). The neutral ink ramp they used before is
741
- scaled by --ty-neutral-l-factor (0.8 in dark), which put typed text at
742
- L 0.58 — dimmer than the field's own label — and the placeholder at
743
- L 0.37 on an L 0.18 surface. */
744
- --ty-input-color: var(--ty-text);
745
- /* Borders come from the BORDER family, not the neutral ink ramp: ink is
746
- multiplied by --ty-neutral-l-factor (0.8 in dark), which crushed the
747
- resting input border to L 0.24 against an L 0.18 input surface — half
748
- the separation light gets (0.88 on 1.0). The border ladder is exempt
749
- from that factor by design, and its own comments name these two as the
750
- successors of neutral-faint / neutral-soft. */
751
- --ty-input-border: var(--ty-border-soft);
752
- --ty-input-border-hover: var(--ty-border);
753
- --ty-input-border-focus: var(--ty-color-primary);
754
- --ty-input-placeholder: var(--ty-text-faint);
755
- --ty-input-disabled-bg: var(--ty-color-neutral-faint);
756
- --ty-input-disabled-border: var(--ty-color-neutral-faint);
757
- --ty-input-disabled-color: var(--ty-color-neutral-bold);
758
- --ty-input-shadow-focus: color-mix(
759
- in oklab,
760
- var(--ty-color-primary) var(--ty-focus-ring-alpha),
761
- transparent
762
- );
763
- }
764
-
765
- /* Dark takes the border family one rung harder than light. Genuine per-mode
766
- DATA, not a formula duplicate: a small L delta at the dark end of an
767
- emissive screen reads much weaker than the same delta mid-scale (the same
768
- reason dark hover/active offsets are bigger — see Tier 5 dark), so light's
769
- soft/base pair lands too quiet here. Dark uses base/bold instead.
770
-
771
- Placed AFTER the block above on purpose: html.dark and html:root are both
772
- (0,1,1), so source order is what decides this one — moving it up to the
773
- dial block at the top of the file would lose the tie. */
774
- html.dark,
775
- html[data-theme="dark"],
776
- [data-ty-theme].dark,
777
- [data-ty-theme][data-theme="dark"] {
778
- --ty-input-border: var(--ty-border);
779
- --ty-input-border-hover: var(--ty-border-bold);
780
- }
781
-
782
- /* ----------------------------------------------------------------
783
- * Tier 5 — SOLID (implementation)
784
- * Solid is its OWN system, NOT the text/emphasis ramp. The dials
785
- * (--ty-solid-hover-l / -active-l / -strong-l / -soft-l and
786
- * --ty-solid-l / -c / -h) live in SECTION 1, Tier 5. Below is the
787
- * derivation only: base fill bakes in the per-theme adjust (Axis B);
788
- * hover/active/strong/soft offset the base by Axis A. Override any
789
- * single --ty-solid-{flavor}-{state} to recolor just that segment.
790
- *
791
- * Declared at `html:root` (specificity 0,1,1) — NOT plain `:root` (0,1,0) —
792
- * on purpose: it must out-rank tyrell.css's hardcoded dark solids at
793
- * `html.dark` (0,1,1). It wins light by specificity over base's `html{}`,
794
- * and wins dark by source order over base's `html.dark` (theme layer loads after).
795
- * That's what lets dark solids re-tint with --ty-primary-hue. Declared ONCE —
796
- * the oklch(from var(--ty-color-*)) formulas resolve per-mode automatically,
797
- * so no dark duplicate is needed.
798
- * --------------------------------------------------------------*/
799
- html:root,
800
- [data-ty-theme] {
801
- /* base fill per flavor (= flavor color, theme-adjusted by Axis B) */
802
- --ty-solid-primary: oklch(
803
- from var(--ty-color-primary)
804
- calc(l + var(--ty-solid-l) + var(--ty-primary-solid-l, 0))
805
- calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h))
806
- );
807
- --ty-solid-success: oklch(
808
- from var(--ty-color-success)
809
- calc(l + var(--ty-solid-l) + var(--ty-success-solid-l, 0))
810
- calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h))
811
- );
812
- --ty-solid-danger: oklch(
813
- from var(--ty-color-danger)
814
- calc(l + var(--ty-solid-l) + var(--ty-danger-solid-l, 0))
815
- calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h))
816
- );
817
- --ty-solid-warning: oklch(
818
- from var(--ty-color-warning)
819
- calc(l + var(--ty-solid-l) + var(--ty-warning-solid-l, 0))
820
- calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h))
821
- );
822
- /* neutral is a deliberate dark grey fill, not the neutral text color */
823
- --ty-solid-neutral: oklch(
824
- from var(--ty-neutral-seed-resolved) var(--ty-l-solid-neutral)
825
- calc(c * var(--ty-c-strong-mult)) h
826
- );
827
-
828
- /* ----------------------------------------------------------------
829
- * SOLID FOREGROUNDS — auto-contrast.
830
- *
831
- * Each fill gets a foreground picked from its OWN lightness, so a
832
- * rebrand (--ty-primary-hue / --ty-primary-chroma / any L-curve override)
833
- * can't strand white text on a pale fill. Branchless, no JS:
834
- *
835
- * clamp(0, (threshold - l) * 1000, 1) -> 1 (white) when the fill
836
- * is darker than the threshold, 0 (black) when it's lighter.
837
- *
838
- * One token per FILL, not per flavor — base / -soft (tone-) / -strong
839
- * (tone+) each carry a different L, so each needs its own decision.
840
- * Declared once: the oklch(from ...) formulas re-resolve per mode,
841
- * because html.dark redefines the fills these read.
842
- *
843
- * TO REVERT to the old fixed-white behaviour, override in your app:
844
- * :root { --ty-solid-primary-fg: white; ... }
845
- * or set --ty-solid-fg-threshold: 1 to force white everywhere.
846
- * --------------------------------------------------------------*/
847
-
848
- /* Crossover point. Fills lighter than this get black text; higher =
849
- prefers white, lower = prefers black.
850
-
851
- Measured in-browser at stock dials, not guessed: the L at which black
852
- and white give EQUAL WCAG contrast is 0.553 (success) / 0.564 (neutral)
853
- / 0.569 (warning) / 0.570 (primary) / 0.578 (danger) — a 0.025 spread,
854
- so one global dial can serve every hue. Sweeping all 30 fills (15 ×
855
- light/dark), the window where every fill gets the better of black/white
856
- is (0.544, 0.588]; 0.57 sits ~mid-window. It previously read 0.62 —
857
- above every flavor's break-even — which put white on `warning+` in both
858
- modes: 4.23:1 light, 3.95:1 dark, each below AA and each the worse of
859
- the two choices. Locked by test/solid-contrast.test.ts. */
860
- --ty-solid-fg-threshold: 0.75;
861
-
862
- --ty-solid-primary-fg: oklch(
863
- from var(--ty-solid-primary)
864
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
865
- );
866
- --ty-solid-primary-soft-fg: oklch(
867
- from var(--ty-solid-primary-soft)
868
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
869
- );
870
- --ty-solid-primary-strong-fg: oklch(
871
- from var(--ty-solid-primary-strong)
872
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
873
- );
874
-
875
- --ty-solid-success-fg: oklch(
876
- from var(--ty-solid-success)
877
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
878
- );
879
- --ty-solid-success-soft-fg: oklch(
880
- from var(--ty-solid-success-soft)
881
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
882
- );
883
- --ty-solid-success-strong-fg: oklch(
884
- from var(--ty-solid-success-strong)
885
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
886
- );
887
-
888
- --ty-solid-danger-fg: oklch(
889
- from var(--ty-solid-danger)
890
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
891
- );
892
- --ty-solid-danger-soft-fg: oklch(
893
- from var(--ty-solid-danger-soft)
894
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
895
- );
896
- --ty-solid-danger-strong-fg: oklch(
897
- from var(--ty-solid-danger-strong)
898
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
899
- );
900
-
901
- --ty-solid-warning-fg: oklch(
902
- from var(--ty-solid-warning)
903
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
904
- );
905
- --ty-solid-warning-soft-fg: oklch(
906
- from var(--ty-solid-warning-soft)
907
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
908
- );
909
- --ty-solid-warning-strong-fg: oklch(
910
- from var(--ty-solid-warning-strong)
911
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
912
- );
913
-
914
- --ty-solid-neutral-fg: oklch(
915
- from var(--ty-solid-neutral)
916
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
917
- );
918
- --ty-solid-neutral-soft-fg: oklch(
919
- from var(--ty-solid-neutral-soft)
920
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
921
- );
922
- --ty-solid-neutral-strong-fg: oklch(
923
- from var(--ty-solid-neutral-strong)
924
- clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0
925
- );
926
-
927
- /* derived states — axis 2 offsets on each base fill */
928
- --ty-solid-primary-hover: oklch(
929
- from var(--ty-solid-primary) calc(l + var(--ty-solid-hover-l)) c h
930
- );
931
- --ty-solid-primary-active: oklch(
932
- from var(--ty-solid-primary) calc(l + var(--ty-solid-active-l)) c h
933
- );
934
- --ty-solid-primary-strong: oklch(
935
- from var(--ty-solid-primary) calc(l + var(--ty-solid-strong-l)) c h
936
- );
937
- --ty-solid-primary-soft: oklch(
938
- from var(--ty-solid-primary) calc(l + var(--ty-solid-soft-l)) c h
939
- );
940
-
941
- --ty-solid-success-hover: oklch(
942
- from var(--ty-solid-success) calc(l + var(--ty-solid-hover-l)) c h
943
- );
944
- --ty-solid-success-active: oklch(
945
- from var(--ty-solid-success) calc(l + var(--ty-solid-active-l)) c h
946
- );
947
- --ty-solid-success-strong: oklch(
948
- from var(--ty-solid-success) calc(l + var(--ty-solid-strong-l)) c h
949
- );
950
- --ty-solid-success-soft: oklch(
951
- from var(--ty-solid-success) calc(l + var(--ty-solid-soft-l)) c h
952
- );
953
-
954
- --ty-solid-danger-hover: oklch(
955
- from var(--ty-solid-danger) calc(l + var(--ty-solid-hover-l)) c h
956
- );
957
- --ty-solid-danger-active: oklch(
958
- from var(--ty-solid-danger) calc(l + var(--ty-solid-active-l)) c h
959
- );
960
- --ty-solid-danger-strong: oklch(
961
- from var(--ty-solid-danger) calc(l + var(--ty-solid-strong-l)) c h
962
- );
963
- --ty-solid-danger-soft: oklch(
964
- from var(--ty-solid-danger) calc(l + var(--ty-solid-soft-l)) c h
965
- );
966
-
967
- --ty-solid-warning-hover: oklch(
968
- from var(--ty-solid-warning) calc(l + var(--ty-solid-hover-l)) c h
969
- );
970
- --ty-solid-warning-active: oklch(
971
- from var(--ty-solid-warning) calc(l + var(--ty-solid-active-l)) c h
972
- );
973
- --ty-solid-warning-strong: oklch(
974
- from var(--ty-solid-warning) calc(l + var(--ty-solid-strong-l)) c h
975
- );
976
- --ty-solid-warning-soft: oklch(
977
- from var(--ty-solid-warning) calc(l + var(--ty-solid-soft-l)) c h
978
- );
979
-
980
- --ty-solid-neutral-hover: oklch(
981
- from var(--ty-solid-neutral) calc(l + var(--ty-solid-hover-l)) c h
982
- );
983
- --ty-solid-neutral-active: oklch(
984
- from var(--ty-solid-neutral) calc(l + var(--ty-solid-active-l)) c h
985
- );
986
- /* neutral+ reads its own absolute L dial, not anchor + shared offset —
987
- it's the full-contrast ink endpoint (see --ty-l-solid-neutral-strong). */
988
- --ty-solid-neutral-strong: oklch(
989
- from var(--ty-neutral-seed-resolved) var(--ty-l-solid-neutral-strong)
990
- calc(c * var(--ty-c-strong-mult)) h
991
- );
992
- --ty-solid-neutral-soft: oklch(
993
- from var(--ty-solid-neutral) calc(l + var(--ty-solid-soft-l)) c h
994
- );
995
- }
996
-
997
- /* =====================================================================
998
- * SECTION 3 — THEME TRANSITIONS
999
- * =====================================================================
1000
- *
1001
- * Every dial above is a plain number (or percentage) — and every color
1002
- * in the system is a pure function of those dials. Registering the
1003
- * dials as typed custom properties makes them INTERPOLABLE, so a theme
1004
- * or mode switch (html.dark, html.love, a [data-ty-theme] pack) does
1005
- * not snap: the dials animate, and every derived color — buttons,
1006
- * borders, surfaces, text, focus rings — crossfades through OKLCH
1007
- * space frame by frame. No JS, no repaint tricks; it falls out of the
1008
- * dials-not-colors architecture.
1009
- *
1010
- * Opt out (or retune) per app:
1011
- * :root { --ty-theme-transition: 0s; } no animation
1012
- * :root { --ty-theme-transition: 1.2s; } slower crossfade
1013
- * Reduced-motion users never get the animation.
1014
- *
1015
- * Browsers without @property simply skip registration — themes still
1016
- * work, switches just snap (the pre-TC37 behavior).
1017
- * ===================================================================== */
1018
-
1019
- @property --ty-primary-hue {
1020
- syntax: "<number>";
1021
- inherits: true;
1022
- initial-value: 252;
1023
- }
1024
- @property --ty-primary-chroma {
1025
- syntax: "<number>";
1026
- inherits: true;
1027
- initial-value: 0.08;
1028
- }
1029
- @property --ty-surface-chroma {
1030
- syntax: "<number>";
1031
- inherits: true;
1032
- initial-value: 0;
1033
- }
1034
- @property --ty-success-hue {
1035
- syntax: "<number>";
1036
- inherits: true;
1037
- initial-value: 145;
1038
- }
1039
- @property --ty-success-chroma {
1040
- syntax: "<number>";
1041
- inherits: true;
1042
- initial-value: 0.135;
1043
- }
1044
- @property --ty-warning-hue {
1045
- syntax: "<number>";
1046
- inherits: true;
1047
- initial-value: 75;
1048
- }
1049
- @property --ty-warning-chroma {
1050
- syntax: "<number>";
1051
- inherits: true;
1052
- initial-value: 0.25;
1053
- }
1054
- @property --ty-danger-hue {
1055
- syntax: "<number>";
1056
- inherits: true;
1057
- initial-value: 25;
1058
- }
1059
- @property --ty-danger-chroma {
1060
- syntax: "<number>";
1061
- inherits: true;
1062
- initial-value: 0.164;
1063
- }
1064
- @property --ty-neutral-hue {
1065
- syntax: "<number>";
1066
- inherits: true;
1067
- initial-value: 0;
1068
- }
1069
- @property --ty-neutral-chroma {
1070
- syntax: "<number>";
1071
- inherits: true;
1072
- initial-value: 0;
1073
- }
1074
- @property --ty-l-strong {
1075
- syntax: "<number>";
1076
- inherits: true;
1077
- initial-value: 0.38;
1078
- }
1079
- @property --ty-l-bold {
1080
- syntax: "<number>";
1081
- inherits: true;
1082
- initial-value: 0.46;
1083
- }
1084
- @property --ty-l-base {
1085
- syntax: "<number>";
1086
- inherits: true;
1087
- initial-value: 0.54;
1088
- }
1089
- @property --ty-l-soft {
1090
- syntax: "<number>";
1091
- inherits: true;
1092
- initial-value: 0.72;
1093
- }
1094
- @property --ty-l-faint {
1095
- syntax: "<number>";
1096
- inherits: true;
1097
- initial-value: 0.88;
1098
- }
1099
- @property --ty-a-bg-base {
1100
- syntax: "<percentage>";
1101
- inherits: true;
1102
- initial-value: 9%;
1103
- }
1104
- @property --ty-a-bg-bold {
1105
- syntax: "<percentage>";
1106
- inherits: true;
1107
- initial-value: 17%;
1108
- }
1109
- @property --ty-a-bg-soft {
1110
- syntax: "<percentage>";
1111
- inherits: true;
1112
- initial-value: 4%;
1113
- }
1114
- @property --ty-l-text-strong {
1115
- syntax: "<number>";
1116
- inherits: true;
1117
- initial-value: 0;
1118
- }
1119
- @property --ty-l-text-bold {
1120
- syntax: "<number>";
1121
- inherits: true;
1122
- initial-value: 0;
1123
- }
1124
- @property --ty-l-text-base {
1125
- syntax: "<number>";
1126
- inherits: true;
1127
- initial-value: 0.21;
1128
- }
1129
- @property --ty-l-text-soft {
1130
- syntax: "<number>";
1131
- inherits: true;
1132
- initial-value: 0.37;
1133
- }
1134
- @property --ty-l-text-faint {
1135
- syntax: "<number>";
1136
- inherits: true;
1137
- initial-value: 0.71;
1138
- }
1139
- @property --ty-l-border-content {
1140
- syntax: "<number>";
1141
- inherits: true;
1142
- initial-value: 0.93;
1143
- }
1144
- @property --ty-l-border-elevated {
1145
- syntax: "<number>";
1146
- inherits: true;
1147
- initial-value: 0.93;
1148
- }
1149
- @property --ty-l-border-floating {
1150
- syntax: "<number>";
1151
- inherits: true;
1152
- initial-value: 0.93;
1153
- }
1154
- @property --ty-l-border-strong {
1155
- syntax: "<number>";
1156
- inherits: true;
1157
- initial-value: 0.46;
1158
- }
1159
- @property --ty-l-border-bold {
1160
- syntax: "<number>";
1161
- inherits: true;
1162
- initial-value: 0.64;
1163
- }
1164
- @property --ty-l-border {
1165
- syntax: "<number>";
1166
- inherits: true;
1167
- initial-value: 0.76;
1168
- }
1169
- @property --ty-l-border-soft {
1170
- syntax: "<number>";
1171
- inherits: true;
1172
- initial-value: 0.88;
1173
- }
1174
- @property --ty-l-border-faint {
1175
- syntax: "<number>";
1176
- inherits: true;
1177
- initial-value: 0.92;
1178
- }
1179
- @property --ty-l-surface-canvas {
1180
- syntax: "<number>";
1181
- inherits: true;
1182
- initial-value: 0.985;
1183
- }
1184
- @property --ty-l-surface-content {
1185
- syntax: "<number>";
1186
- inherits: true;
1187
- initial-value: 1;
1188
- }
1189
- @property --ty-l-surface-elevated {
1190
- syntax: "<number>";
1191
- inherits: true;
1192
- initial-value: 1;
1193
- }
1194
- @property --ty-l-surface-floating {
1195
- syntax: "<number>";
1196
- inherits: true;
1197
- initial-value: 1;
1198
- }
1199
- @property --ty-l-surface-input {
1200
- syntax: "<number>";
1201
- inherits: true;
1202
- initial-value: 1;
1203
- }
1204
- @property --ty-l-solid-neutral {
1205
- syntax: "<number>";
1206
- inherits: true;
1207
- initial-value: 0.4;
1208
- }
1209
- @property --ty-l-solid-neutral-strong {
1210
- syntax: "<number>";
1211
- inherits: true;
1212
- initial-value: 0.15;
1213
- }
1214
- @property --ty-l-bg-neutral-strong {
1215
- syntax: "<number>";
1216
- inherits: true;
1217
- initial-value: 0.25;
1218
- }
1219
- @property --ty-l-bg-neutral-faint {
1220
- syntax: "<number>";
1221
- inherits: true;
1222
- initial-value: 0.99;
1223
- }
1224
- @property --ty-c-bg-neutral-faint-mult {
1225
- syntax: "<number>";
1226
- inherits: true;
1227
- initial-value: 0.4;
1228
- }
1229
- @property --ty-c-strong-mult {
1230
- syntax: "<number>";
1231
- inherits: true;
1232
- initial-value: 0.77;
1233
- }
1234
- @property --ty-c-bold-mult {
1235
- syntax: "<number>";
1236
- inherits: true;
1237
- initial-value: 1;
1238
- }
1239
- @property --ty-c-base-mult {
1240
- syntax: "<number>";
1241
- inherits: true;
1242
- initial-value: 0.92;
1243
- }
1244
- @property --ty-c-soft-mult {
1245
- syntax: "<number>";
1246
- inherits: true;
1247
- initial-value: 0.77;
1248
- }
1249
- @property --ty-c-faint-mult {
1250
- syntax: "<number>";
1251
- inherits: true;
1252
- initial-value: 0.46;
1253
- }
1254
- @property --ty-primary-l-factor {
1255
- syntax: "<number>";
1256
- inherits: true;
1257
- initial-value: 1;
1258
- }
1259
- @property --ty-success-l-factor {
1260
- syntax: "<number>";
1261
- inherits: true;
1262
- initial-value: 1;
1263
- }
1264
- @property --ty-warning-l-factor {
1265
- syntax: "<number>";
1266
- inherits: true;
1267
- initial-value: 1.15;
1268
- }
1269
- @property --ty-danger-l-factor {
1270
- syntax: "<number>";
1271
- inherits: true;
1272
- initial-value: 1;
1273
- }
1274
- @property --ty-neutral-l-factor {
1275
- syntax: "<number>";
1276
- inherits: true;
1277
- initial-value: 1;
1278
- }
1279
- /* Typography + button-depth dials (defined in tyrell.css, mode-flipped
1280
- there). Registered here so they interpolate on theme switch: with a
1281
- variable font, text weight crossfades along with the colors, and the
1282
- solid-button depth chrome (border offset) glides rather than snaps. */
1283
- @property --ty-weight-action {
1284
- syntax: "<number>";
1285
- inherits: true;
1286
- initial-value: 510;
1287
- }
1288
- @property --ty-weight-label {
1289
- syntax: "<number>";
1290
- inherits: true;
1291
- initial-value: 440;
1292
- }
1293
- @property --ty-button-depth {
1294
- syntax: "<number>";
1295
- inherits: true;
1296
- initial-value: 0.35;
1297
- }
1298
- @property --ty-button-border-l {
1299
- syntax: "<number>";
1300
- inherits: true;
1301
- initial-value: -0.08;
1302
- }
1303
- @property --ty-button-border-l-neutral {
1304
- syntax: "<number>";
1305
- inherits: true;
1306
- initial-value: -0.25;
1307
- }
1308
- @property --ty-primary-solid-l {
1309
- syntax: "<number>";
1310
- inherits: true;
1311
- initial-value: 0;
1312
- }
1313
- @property --ty-success-solid-l {
1314
- syntax: "<number>";
1315
- inherits: true;
1316
- initial-value: 0;
1317
- }
1318
- @property --ty-warning-solid-l {
1319
- syntax: "<number>";
1320
- inherits: true;
1321
- initial-value: 0.1;
1322
- }
1323
- @property --ty-danger-solid-l {
1324
- syntax: "<number>";
1325
- inherits: true;
1326
- initial-value: 0;
1327
- }
1328
- @property --ty-solid-hover-l {
1329
- syntax: "<number>";
1330
- inherits: true;
1331
- initial-value: -0.04;
1332
- }
1333
- @property --ty-solid-active-l {
1334
- syntax: "<number>";
1335
- inherits: true;
1336
- initial-value: -0.08;
1337
- }
1338
- @property --ty-solid-strong-l {
1339
- syntax: "<number>";
1340
- inherits: true;
1341
- initial-value: -0.06;
1342
- }
1343
- @property --ty-solid-soft-l {
1344
- syntax: "<number>";
1345
- inherits: true;
1346
- initial-value: 0.1;
1347
- }
1348
- @property --ty-solid-l {
1349
- syntax: "<number>";
1350
- inherits: true;
1351
- initial-value: 0;
1352
- }
1353
- @property --ty-solid-c {
1354
- syntax: "<number>";
1355
- inherits: true;
1356
- initial-value: 1;
1357
- }
1358
- @property --ty-solid-h {
1359
- syntax: "<number>";
1360
- inherits: true;
1361
- initial-value: 0;
1362
- }
1363
- @property --ty-solid-fg-threshold {
1364
- syntax: "<number>";
1365
- inherits: true;
1366
- initial-value: 0.75;
1367
- }
1368
- @property --ty-focus-ring-alpha {
1369
- syntax: "<percentage>";
1370
- inherits: true;
1371
- initial-value: 5%;
1372
- }
1373
-
1374
- @property --ty-primary-seed-resolved {
1375
- syntax: "<color>";
1376
- inherits: true;
1377
- initial-value: #808080;
1378
- }
1379
- @property --ty-success-seed-resolved {
1380
- syntax: "<color>";
1381
- inherits: true;
1382
- initial-value: #808080;
1383
- }
1384
- @property --ty-warning-seed-resolved {
1385
- syntax: "<color>";
1386
- inherits: true;
1387
- initial-value: #808080;
1388
- }
1389
- @property --ty-danger-seed-resolved {
1390
- syntax: "<color>";
1391
- inherits: true;
1392
- initial-value: #808080;
1393
- }
1394
- @property --ty-neutral-seed-resolved {
1395
- syntax: "<color>";
1396
- inherits: true;
1397
- initial-value: #808080;
1398
- }
1399
-
1400
- @media (prefers-reduced-motion: no-preference) {
1401
- html,
1402
- [data-ty-theme] {
1403
- transition-property:
1404
- --ty-primary-hue, --ty-primary-chroma, --ty-surface-chroma,
1405
- --ty-success-hue, --ty-success-chroma, --ty-warning-hue,
1406
- --ty-warning-chroma, --ty-danger-hue, --ty-danger-chroma,
1407
- --ty-neutral-hue, --ty-neutral-chroma, --ty-l-strong, --ty-l-bold,
1408
- --ty-l-base, --ty-l-soft, --ty-l-faint, --ty-a-bg-base, --ty-a-bg-bold,
1409
- --ty-a-bg-soft, --ty-l-text-strong, --ty-l-text-bold, --ty-l-text-base,
1410
- --ty-l-text-soft, --ty-l-text-faint, --ty-l-border-content,
1411
- --ty-l-border-elevated, --ty-l-border-floating, --ty-l-border-strong,
1412
- --ty-l-border-bold, --ty-l-border, --ty-l-border-soft,
1413
- --ty-l-border-faint, --ty-l-surface-canvas, --ty-l-surface-content,
1414
- --ty-l-surface-elevated, --ty-l-surface-floating, --ty-l-surface-input,
1415
- --ty-l-solid-neutral, --ty-l-solid-neutral-strong,
1416
- --ty-l-bg-neutral-strong, --ty-l-bg-neutral-faint,
1417
- --ty-c-bg-neutral-faint-mult, --ty-c-strong-mult, --ty-c-bold-mult,
1418
- --ty-c-base-mult, --ty-c-soft-mult, --ty-c-faint-mult,
1419
- --ty-primary-l-factor, --ty-success-l-factor, --ty-warning-l-factor,
1420
- --ty-danger-l-factor, --ty-neutral-l-factor, --ty-primary-solid-l,
1421
- --ty-success-solid-l, --ty-warning-solid-l, --ty-danger-solid-l,
1422
- --ty-solid-hover-l, --ty-solid-active-l, --ty-solid-strong-l,
1423
- --ty-solid-soft-l, --ty-solid-l, --ty-solid-c, --ty-solid-h,
1424
- --ty-solid-fg-threshold, --ty-focus-ring-alpha, --ty-weight-action,
1425
- --ty-weight-label, --ty-button-depth, --ty-button-border-l,
1426
- --ty-button-border-l-neutral;
1427
- transition-duration: var(--ty-theme-transition, 0.45s);
1428
- transition-timing-function: ease;
1429
- }
1430
- }
1431
-
1432
- /* Interactive components (button, input, switch, tabs, …) each carry their
1433
- * OWN short transition — background-color/border-color/color at 0.15–0.2s —
1434
- * for snappy hover/focus/active feedback. CSS transitions fire on ANY
1435
- * computed-value change, not just interaction, so a theme switch also
1436
- * (re-)triggers every one of those, racing the coordinated 0.45s dial
1437
- * crossfade above at a different speed on every element — hundreds of
1438
- * mistimed transitions instead of one wash, which reads as jittery rather
1439
- * than smooth.
1440
- *
1441
- * `.ty-theme-switching` is an opt-in escape hatch: add it to `<html>` (or
1442
- * a scoped `[data-ty-theme]` root) for the duration of a theme switch to
1443
- * silence local transitions on its descendants — NOT on the switching
1444
- * element itself, so the dial crossfade above is untouched. Five lines of
1445
- * JS around your theme toggle:
1446
- *
1447
- * root.classList.add('ty-theme-switching');
1448
- * root.classList.toggle('dark'); // or flip the theme pack
1449
- * setTimeout(() => root.classList.remove('ty-theme-switching'),
1450
- * parseFloat(getComputedStyle(root)
1451
- * .getPropertyValue('--ty-theme-transition')) * 1000 || 450);
1452
- *
1453
- * Two mechanisms, because Shadow DOM blocks the first from reaching the
1454
- * second: the `*` rule below only matches LIGHT-DOM elements (your own
1455
- * markup, Tailwind-transitioned nav items, etc.) — it cannot reach inside
1456
- * any ty-* component's shadow root, style encapsulation blocks a document
1457
- * stylesheet's universal selector from crossing that boundary. Every ty-*
1458
- * component's OWN local transition is instead wired to the inheriting
1459
- * custom property `--ty-local-transition` (unset by default; components
1460
- * fall back to their normal value) — custom properties DO inherit through
1461
- * shadow boundaries, so setting it once here reaches every component's
1462
- * internal styles for free. Purely additive — nothing here runs unless you
1463
- * add the class yourself. */
1464
- .ty-theme-switching {
1465
- --ty-local-transition: none;
1466
- }
1467
- .ty-theme-switching *,
1468
- .ty-theme-switching *::before,
1469
- .ty-theme-switching *::after {
1470
- transition: none !important;
1471
- }
1
+ :root{--ty-primary-hue: 243;--ty-primary-chroma: .105;--ty-surface-chroma: 0;--ty-success-hue: 145;--ty-success-chroma: .086;--ty-warning-hue: 76;--ty-warning-chroma: .178;--ty-danger-hue: 31;--ty-danger-chroma: .134;--ty-neutral-hue: 0;--ty-neutral-chroma: 0;--ty-l-strong: .38;--ty-l-bold: .46;--ty-l-base: .54;--ty-l-soft: .72;--ty-l-faint: .88;--ty-a-bg-base: 9%;--ty-a-bg-bold: 17%;--ty-a-bg-soft: 4%;--ty-l-text-strong: 0;--ty-l-text-bold: 0;--ty-l-text-base: .21;--ty-l-text-soft: .37;--ty-l-text-faint: .71;--ty-l-border-content: .93;--ty-l-border-elevated: .93;--ty-l-border-floating: .93;--ty-l-border-strong: .46;--ty-l-border-bold: .64;--ty-l-border: .76;--ty-l-border-soft: .88;--ty-l-border-faint: .92;--ty-l-surface-canvas: .985;--ty-l-surface-content: 1;--ty-l-surface-elevated: 1;--ty-l-surface-floating: 1;--ty-l-surface-input: 1;--ty-l-solid-neutral: .4;--ty-l-solid-neutral-strong: .15;--ty-l-bg-neutral-strong: .25;--ty-l-bg-neutral-faint: .99;--ty-c-bg-neutral-faint-mult: .4;--ty-focus-ring-alpha: 5%;--ty-c-strong-mult: .77;--ty-c-bold-mult: 1;--ty-c-base-mult: .92;--ty-c-soft-mult: .77;--ty-c-faint-mult: .46;--ty-primary-l-factor: .9;--ty-success-l-factor: 1;--ty-warning-l-factor: 1.3;--ty-danger-l-factor: .93;--ty-neutral-l-factor: 1;--ty-solid-hover-l: -.04;--ty-solid-active-l: -.08;--ty-solid-strong-l: -.06;--ty-solid-soft-l: .1;--ty-solid-l: 0;--ty-solid-c: 1;--ty-solid-h: 0;--ty-primary-solid-l: 0;--ty-success-solid-l: 0;--ty-warning-solid-l: 0;--ty-danger-solid-l: 0}html.dark,html[data-theme=dark],[data-ty-theme].dark,[data-ty-theme][data-theme=dark]{--ty-primary-l-factor: 1;--ty-solid-fg-threshold: .5 !important;--ty-primary-hue: 226;--ty-primary-chroma: .065;--ty-success-hue: 129;--ty-success-chroma: .092;--ty-success-l-factor: 1.09;--ty-danger-hue: 13;--ty-danger-chroma: .101;--ty-danger-l-factor: 1.06;--ty-warning-hue: 82;--ty-warning-chroma: .195;--ty-warning-l-factor: 1.5;--ty-l-strong: .72;--ty-l-bold: .66;--ty-l-base: .62;--ty-l-soft: .46;--ty-l-faint: .3;--ty-a-bg-base: 13%;--ty-a-bg-bold: 22%;--ty-a-bg-soft: 7%;--ty-l-text-strong: 1;--ty-l-text-bold: .985;--ty-l-text-base: .88;--ty-l-text-soft: .62;--ty-l-text-faint: .47;--ty-l-border-content: .13;--ty-l-border-elevated: .375;--ty-l-border-floating: .41;--ty-l-border-strong: .66;--ty-l-border-bold: .46;--ty-l-border: .38;--ty-l-border-soft: .3;--ty-l-border-faint: .3;--ty-l-surface-canvas: .12;--ty-l-surface-content: .16;--ty-l-surface-elevated: .19;--ty-l-surface-floating: .22;--ty-l-surface-input: .18;--ty-l-solid-neutral: .18;--ty-l-solid-neutral-strong: .88;--ty-l-bg-neutral-strong: .95;--ty-l-bg-neutral-faint: .15;--ty-c-bg-neutral-faint-mult: 2;--ty-neutral-l-factor: .8;--ty-focus-ring-alpha: 20%;--ty-c-strong-mult: .77;--ty-c-bold-mult: 1;--ty-c-base-mult: .92;--ty-c-soft-mult: .77;--ty-c-faint-mult: .5;--ty-solid-hover-l: .07;--ty-solid-active-l: .11;--ty-solid-strong-l: .06;--ty-solid-soft-l: -.1;--ty-solid-l: -.2;--ty-solid-c: .7;--ty-solid-h: 0;--ty-warning-solid-l: 0}html:root,[data-ty-theme]{--ty-primary-seed-resolved: var( --ty-primary-seed, oklch(.5 var(--ty-primary-chroma) var(--ty-primary-hue)) );--ty-success-seed-resolved: var( --ty-success-seed, oklch(.5 var(--ty-success-chroma) var(--ty-success-hue)) );--ty-warning-seed-resolved: var( --ty-warning-seed, oklch(.5 var(--ty-warning-chroma) var(--ty-warning-hue)) );--ty-danger-seed-resolved: var( --ty-danger-seed, oklch(.5 var(--ty-danger-chroma) var(--ty-danger-hue)) );--ty-neutral-seed-resolved: var( --ty-neutral-seed, oklch(.5 var(--ty-neutral-chroma) var(--ty-neutral-hue)) );--ty-color-primary-strong: oklch( from var(--ty-primary-seed-resolved) calc(var(--ty-l-strong) * var(--ty-primary-l-factor)) calc(c * var(--ty-c-strong-mult)) h );--ty-color-primary-bold: oklch( from var(--ty-primary-seed-resolved) calc(var(--ty-l-bold) * var(--ty-primary-l-factor)) calc(c * var(--ty-c-bold-mult)) h );--ty-color-primary: oklch( from var(--ty-primary-seed-resolved) calc(var(--ty-l-base) * var(--ty-primary-l-factor)) calc(c * var(--ty-c-base-mult)) h );--ty-color-primary-soft: oklch( from var(--ty-primary-seed-resolved) calc(var(--ty-l-soft) * var(--ty-primary-l-factor)) calc(c * var(--ty-c-soft-mult)) h );--ty-color-primary-faint: oklch( from var(--ty-primary-seed-resolved) calc(var(--ty-l-faint) * var(--ty-primary-l-factor)) calc(c * var(--ty-c-faint-mult)) h );--ty-bg-primary: oklch( from var(--ty-color-primary) l c h / var(--ty-a-bg-base) );--ty-bg-primary-bold: oklch( from var(--ty-color-primary) l c h / var(--ty-a-bg-bold) );--ty-bg-primary-soft: oklch( from var(--ty-color-primary) l c h / var(--ty-a-bg-soft) );--ty-border-primary: var(--ty-color-primary-soft);--ty-color-success-strong: oklch( from var(--ty-success-seed-resolved) calc(var(--ty-l-strong) * var(--ty-success-l-factor)) calc(c * var(--ty-c-strong-mult)) h );--ty-color-success-bold: oklch( from var(--ty-success-seed-resolved) calc(var(--ty-l-bold) * var(--ty-success-l-factor)) calc(c * var(--ty-c-bold-mult)) h );--ty-color-success: oklch( from var(--ty-success-seed-resolved) calc(var(--ty-l-base) * var(--ty-success-l-factor)) calc(c * var(--ty-c-base-mult)) h );--ty-color-success-soft: oklch( from var(--ty-success-seed-resolved) calc(var(--ty-l-soft) * var(--ty-success-l-factor)) calc(c * var(--ty-c-soft-mult)) h );--ty-color-success-faint: oklch( from var(--ty-success-seed-resolved) calc(var(--ty-l-faint) * var(--ty-success-l-factor)) calc(c * var(--ty-c-faint-mult)) h );--ty-bg-success: oklch( from var(--ty-color-success) l c h / var(--ty-a-bg-base) );--ty-bg-success-bold: oklch( from var(--ty-color-success) l c h / var(--ty-a-bg-bold) );--ty-bg-success-soft: oklch( from var(--ty-color-success) l c h / var(--ty-a-bg-soft) );--ty-border-success: var(--ty-color-success-soft);--ty-color-danger-strong: oklch( from var(--ty-danger-seed-resolved) calc(var(--ty-l-strong) * var(--ty-danger-l-factor)) calc(c * var(--ty-c-strong-mult)) h );--ty-color-danger-bold: oklch( from var(--ty-danger-seed-resolved) calc(var(--ty-l-bold) * var(--ty-danger-l-factor)) calc(c * var(--ty-c-bold-mult)) h );--ty-color-danger: oklch( from var(--ty-danger-seed-resolved) calc(var(--ty-l-base) * var(--ty-danger-l-factor)) calc(c * var(--ty-c-base-mult)) h );--ty-color-danger-soft: oklch( from var(--ty-danger-seed-resolved) calc(var(--ty-l-soft) * var(--ty-danger-l-factor)) calc(c * var(--ty-c-soft-mult)) h );--ty-color-danger-faint: oklch( from var(--ty-danger-seed-resolved) calc(var(--ty-l-faint) * var(--ty-danger-l-factor)) calc(c * var(--ty-c-faint-mult)) h );--ty-bg-danger: oklch( from var(--ty-color-danger) l c h / var(--ty-a-bg-base) );--ty-bg-danger-bold: oklch( from var(--ty-color-danger) l c h / var(--ty-a-bg-bold) );--ty-bg-danger-soft: oklch( from var(--ty-color-danger) l c h / var(--ty-a-bg-soft) );--ty-border-danger: var(--ty-color-danger-soft);--ty-color-warning-strong: oklch( from var(--ty-warning-seed-resolved) calc(var(--ty-l-strong) * var(--ty-warning-l-factor)) calc(c * var(--ty-c-strong-mult)) h );--ty-color-warning-bold: oklch( from var(--ty-warning-seed-resolved) calc(var(--ty-l-bold) * var(--ty-warning-l-factor)) calc(c * var(--ty-c-bold-mult)) h );--ty-color-warning: oklch( from var(--ty-warning-seed-resolved) calc(var(--ty-l-base) * var(--ty-warning-l-factor)) calc(c * var(--ty-c-base-mult)) h );--ty-color-warning-soft: oklch( from var(--ty-warning-seed-resolved) calc(var(--ty-l-soft) * var(--ty-warning-l-factor)) calc(c * var(--ty-c-soft-mult)) h );--ty-color-warning-faint: oklch( from var(--ty-warning-seed-resolved) calc(var(--ty-l-faint) * var(--ty-warning-l-factor)) calc(c * var(--ty-c-faint-mult)) h );--ty-bg-warning: oklch( from var(--ty-color-warning) l c h / var(--ty-a-bg-base) );--ty-bg-warning-bold: oklch( from var(--ty-color-warning) l c h / var(--ty-a-bg-bold) );--ty-bg-warning-soft: oklch( from var(--ty-color-warning) l c h / var(--ty-a-bg-soft) );--ty-border-warning: var(--ty-color-warning-soft);--ty-color-neutral-strong: oklch( from var(--ty-neutral-seed-resolved) calc(var(--ty-l-strong) * var(--ty-neutral-l-factor)) calc(c * var(--ty-c-strong-mult)) h );--ty-color-neutral-bold: oklch( from var(--ty-neutral-seed-resolved) calc(var(--ty-l-bold) * var(--ty-neutral-l-factor)) calc(c * var(--ty-c-bold-mult)) h );--ty-color-neutral: oklch( from var(--ty-neutral-seed-resolved) calc(var(--ty-l-base) * var(--ty-neutral-l-factor)) calc(c * var(--ty-c-base-mult)) h );--ty-color-neutral-soft: oklch( from var(--ty-neutral-seed-resolved) calc(var(--ty-l-soft) * var(--ty-neutral-l-factor)) calc(c * var(--ty-c-soft-mult)) h );--ty-color-neutral-faint: oklch( from var(--ty-neutral-seed-resolved) calc(var(--ty-l-faint) * var(--ty-neutral-l-factor)) calc(c * var(--ty-c-faint-mult)) h );--ty-bg-neutral: oklch( from var(--ty-color-neutral) l c h / var(--ty-a-bg-base) );--ty-bg-neutral-bold: oklch( from var(--ty-color-neutral) l c h / var(--ty-a-bg-bold) );--ty-bg-neutral-soft: oklch( from var(--ty-color-neutral) l c h / var(--ty-a-bg-soft) );--ty-bg-neutral-strong: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-bg-neutral-strong) calc(c*2) h );--ty-bg-neutral-faint: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-bg-neutral-faint) calc(c * var(--ty-c-bg-neutral-faint-mult)) h );--ty-border-neutral: var(--ty-color-neutral-soft);--ty-border-strong: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-strong) c h );--ty-border: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border) c h );--ty-border-bold: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-bold) c h );--ty-border-soft: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-soft) c h );--ty-border-faint: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-faint) c h );--ty-text-strong: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-text-strong) c h );--ty-text-bold: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-text-bold) c h );--ty-text: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-text-base) c h );--ty-text-soft: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-text-soft) c h );--ty-text-faint: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-text-faint) c h );--ty-content-border: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-content) c h );--ty-elevated-border: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-elevated) c h );--ty-floating-border: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-border-floating) c h );--ty-surface-canvas: oklch( from var(--ty-primary-seed-resolved) var(--ty-l-surface-canvas) var(--ty-surface-chroma) h );--ty-surface-content: oklch( from var(--ty-primary-seed-resolved) var(--ty-l-surface-content) var(--ty-surface-chroma) h );--ty-surface-elevated: oklch( from var(--ty-primary-seed-resolved) var(--ty-l-surface-elevated) var(--ty-surface-chroma) h );--ty-surface-floating: oklch( from var(--ty-primary-seed-resolved) var(--ty-l-surface-floating) var(--ty-surface-chroma) h );--ty-surface-input: oklch( from var(--ty-primary-seed-resolved) var(--ty-l-surface-input) var(--ty-surface-chroma) h );--ty-input-bg: var(--ty-surface-input);--ty-input-color: var(--ty-text);--ty-input-border: var(--ty-border-soft);--ty-input-border-hover: var(--ty-border);--ty-input-border-focus: var(--ty-color-primary);--ty-input-placeholder: var(--ty-text-faint);--ty-input-disabled-bg: var(--ty-color-neutral-faint);--ty-input-disabled-border: var(--ty-color-neutral-faint);--ty-input-disabled-color: var(--ty-color-neutral-bold);--ty-input-shadow-focus: color-mix( in oklab, var(--ty-color-primary) var(--ty-focus-ring-alpha), transparent )}html.dark,html[data-theme=dark],[data-ty-theme].dark,[data-ty-theme][data-theme=dark]{--ty-input-border: var(--ty-border);--ty-input-border-hover: var(--ty-border-bold)}html:root,[data-ty-theme]{--ty-solid-primary: oklch( from var(--ty-color-primary) calc(l + var(--ty-solid-l) + var(--ty-primary-solid-l, 0)) calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h)) );--ty-solid-success: oklch( from var(--ty-color-success) calc(l + var(--ty-solid-l) + var(--ty-success-solid-l, 0)) calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h)) );--ty-solid-danger: oklch( from var(--ty-color-danger) calc(l + var(--ty-solid-l) + var(--ty-danger-solid-l, 0)) calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h)) );--ty-solid-warning: oklch( from var(--ty-color-warning) calc(l + var(--ty-solid-l) + var(--ty-warning-solid-l, 0)) calc(c * var(--ty-solid-c)) calc(h + var(--ty-solid-h)) );--ty-solid-neutral: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-solid-neutral) calc(c * var(--ty-c-strong-mult)) h );--ty-solid-fg-threshold: .75;--ty-solid-primary-fg: oklch( from var(--ty-solid-primary) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-primary-soft-fg: oklch( from var(--ty-solid-primary-soft) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-primary-strong-fg: oklch( from var(--ty-solid-primary-strong) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-success-fg: oklch( from var(--ty-solid-success) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-success-soft-fg: oklch( from var(--ty-solid-success-soft) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-success-strong-fg: oklch( from var(--ty-solid-success-strong) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-danger-fg: oklch( from var(--ty-solid-danger) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-danger-soft-fg: oklch( from var(--ty-solid-danger-soft) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-danger-strong-fg: oklch( from var(--ty-solid-danger-strong) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-warning-fg: oklch( from var(--ty-solid-warning) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-warning-soft-fg: oklch( from var(--ty-solid-warning-soft) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-warning-strong-fg: oklch( from var(--ty-solid-warning-strong) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-neutral-fg: oklch( from var(--ty-solid-neutral) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-neutral-soft-fg: oklch( from var(--ty-solid-neutral-soft) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-neutral-strong-fg: oklch( from var(--ty-solid-neutral-strong) clamp(0, (var(--ty-solid-fg-threshold) - l) * 1000, 1) 0 0 );--ty-solid-primary-hover: oklch( from var(--ty-solid-primary) calc(l + var(--ty-solid-hover-l)) c h );--ty-solid-primary-active: oklch( from var(--ty-solid-primary) calc(l + var(--ty-solid-active-l)) c h );--ty-solid-primary-strong: oklch( from var(--ty-solid-primary) calc(l + var(--ty-solid-strong-l)) c h );--ty-solid-primary-soft: oklch( from var(--ty-solid-primary) calc(l + var(--ty-solid-soft-l)) c h );--ty-solid-success-hover: oklch( from var(--ty-solid-success) calc(l + var(--ty-solid-hover-l)) c h );--ty-solid-success-active: oklch( from var(--ty-solid-success) calc(l + var(--ty-solid-active-l)) c h );--ty-solid-success-strong: oklch( from var(--ty-solid-success) calc(l + var(--ty-solid-strong-l)) c h );--ty-solid-success-soft: oklch( from var(--ty-solid-success) calc(l + var(--ty-solid-soft-l)) c h );--ty-solid-danger-hover: oklch( from var(--ty-solid-danger) calc(l + var(--ty-solid-hover-l)) c h );--ty-solid-danger-active: oklch( from var(--ty-solid-danger) calc(l + var(--ty-solid-active-l)) c h );--ty-solid-danger-strong: oklch( from var(--ty-solid-danger) calc(l + var(--ty-solid-strong-l)) c h );--ty-solid-danger-soft: oklch( from var(--ty-solid-danger) calc(l + var(--ty-solid-soft-l)) c h );--ty-solid-warning-hover: oklch( from var(--ty-solid-warning) calc(l + var(--ty-solid-hover-l)) c h );--ty-solid-warning-active: oklch( from var(--ty-solid-warning) calc(l + var(--ty-solid-active-l)) c h );--ty-solid-warning-strong: oklch( from var(--ty-solid-warning) calc(l + var(--ty-solid-strong-l)) c h );--ty-solid-warning-soft: oklch( from var(--ty-solid-warning) calc(l + var(--ty-solid-soft-l)) c h );--ty-solid-neutral-hover: oklch( from var(--ty-solid-neutral) calc(l + var(--ty-solid-hover-l)) c h );--ty-solid-neutral-active: oklch( from var(--ty-solid-neutral) calc(l + var(--ty-solid-active-l)) c h );--ty-solid-neutral-strong: oklch( from var(--ty-neutral-seed-resolved) var(--ty-l-solid-neutral-strong) calc(c * var(--ty-c-strong-mult)) h );--ty-solid-neutral-soft: oklch( from var(--ty-solid-neutral) calc(l + var(--ty-solid-soft-l)) c h )}@property --ty-primary-hue{syntax: "<number>"; inherits: true; initial-value: 243;}@property --ty-primary-chroma{syntax: "<number>"; inherits: true; initial-value: .105;}@property --ty-surface-chroma{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-success-hue{syntax: "<number>"; inherits: true; initial-value: 145;}@property --ty-success-chroma{syntax: "<number>"; inherits: true; initial-value: .135;}@property --ty-warning-hue{syntax: "<number>"; inherits: true; initial-value: 75;}@property --ty-warning-chroma{syntax: "<number>"; inherits: true; initial-value: .25;}@property --ty-danger-hue{syntax: "<number>"; inherits: true; initial-value: 25;}@property --ty-danger-chroma{syntax: "<number>"; inherits: true; initial-value: .164;}@property --ty-neutral-hue{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-neutral-chroma{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-l-strong{syntax: "<number>"; inherits: true; initial-value: .38;}@property --ty-l-bold{syntax: "<number>"; inherits: true; initial-value: .46;}@property --ty-l-base{syntax: "<number>"; inherits: true; initial-value: .54;}@property --ty-l-soft{syntax: "<number>"; inherits: true; initial-value: .72;}@property --ty-l-faint{syntax: "<number>"; inherits: true; initial-value: .88;}@property --ty-a-bg-base{syntax: "<percentage>"; inherits: true; initial-value: 9%;}@property --ty-a-bg-bold{syntax: "<percentage>"; inherits: true; initial-value: 17%;}@property --ty-a-bg-soft{syntax: "<percentage>"; inherits: true; initial-value: 4%;}@property --ty-l-text-strong{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-l-text-bold{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-l-text-base{syntax: "<number>"; inherits: true; initial-value: .21;}@property --ty-l-text-soft{syntax: "<number>"; inherits: true; initial-value: .37;}@property --ty-l-text-faint{syntax: "<number>"; inherits: true; initial-value: .71;}@property --ty-l-border-content{syntax: "<number>"; inherits: true; initial-value: .93;}@property --ty-l-border-elevated{syntax: "<number>"; inherits: true; initial-value: .93;}@property --ty-l-border-floating{syntax: "<number>"; inherits: true; initial-value: .93;}@property --ty-l-border-strong{syntax: "<number>"; inherits: true; initial-value: .46;}@property --ty-l-border-bold{syntax: "<number>"; inherits: true; initial-value: .64;}@property --ty-l-border{syntax: "<number>"; inherits: true; initial-value: .76;}@property --ty-l-border-soft{syntax: "<number>"; inherits: true; initial-value: .88;}@property --ty-l-border-faint{syntax: "<number>"; inherits: true; initial-value: .92;}@property --ty-l-surface-canvas{syntax: "<number>"; inherits: true; initial-value: .985;}@property --ty-l-surface-content{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-l-surface-elevated{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-l-surface-floating{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-l-surface-input{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-l-solid-neutral{syntax: "<number>"; inherits: true; initial-value: .4;}@property --ty-l-solid-neutral-strong{syntax: "<number>"; inherits: true; initial-value: .15;}@property --ty-l-bg-neutral-strong{syntax: "<number>"; inherits: true; initial-value: .25;}@property --ty-l-bg-neutral-faint{syntax: "<number>"; inherits: true; initial-value: .99;}@property --ty-c-bg-neutral-faint-mult{syntax: "<number>"; inherits: true; initial-value: .4;}@property --ty-c-strong-mult{syntax: "<number>"; inherits: true; initial-value: .77;}@property --ty-c-bold-mult{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-c-base-mult{syntax: "<number>"; inherits: true; initial-value: .92;}@property --ty-c-soft-mult{syntax: "<number>"; inherits: true; initial-value: .77;}@property --ty-c-faint-mult{syntax: "<number>"; inherits: true; initial-value: .46;}@property --ty-primary-l-factor{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-success-l-factor{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-warning-l-factor{syntax: "<number>"; inherits: true; initial-value: 1.15;}@property --ty-danger-l-factor{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-neutral-l-factor{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-weight-action{syntax: "<number>"; inherits: true; initial-value: 510;}@property --ty-weight-label{syntax: "<number>"; inherits: true; initial-value: 440;}@property --ty-button-depth{syntax: "<number>"; inherits: true; initial-value: .35;}@property --ty-button-border-l{syntax: "<number>"; inherits: true; initial-value: -.08;}@property --ty-button-border-l-neutral{syntax: "<number>"; inherits: true; initial-value: -.25;}@property --ty-primary-solid-l{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-success-solid-l{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-warning-solid-l{syntax: "<number>"; inherits: true; initial-value: .1;}@property --ty-danger-solid-l{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-solid-hover-l{syntax: "<number>"; inherits: true; initial-value: -.04;}@property --ty-solid-active-l{syntax: "<number>"; inherits: true; initial-value: -.08;}@property --ty-solid-strong-l{syntax: "<number>"; inherits: true; initial-value: -.06;}@property --ty-solid-soft-l{syntax: "<number>"; inherits: true; initial-value: .1;}@property --ty-solid-l{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-solid-c{syntax: "<number>"; inherits: true; initial-value: 1;}@property --ty-solid-h{syntax: "<number>"; inherits: true; initial-value: 0;}@property --ty-solid-fg-threshold{syntax: "<number>"; inherits: true; initial-value: .75;}@property --ty-focus-ring-alpha{syntax: "<percentage>"; inherits: true; initial-value: 5%;}@property --ty-primary-seed-resolved{syntax: "<color>"; inherits: true; initial-value: #808080;}@property --ty-success-seed-resolved{syntax: "<color>"; inherits: true; initial-value: #808080;}@property --ty-warning-seed-resolved{syntax: "<color>"; inherits: true; initial-value: #808080;}@property --ty-danger-seed-resolved{syntax: "<color>"; inherits: true; initial-value: #808080;}@property --ty-neutral-seed-resolved{syntax: "<color>"; inherits: true; initial-value: #808080;}@media(prefers-reduced-motion:no-preference){html,[data-ty-theme]{transition-property:--ty-primary-hue,--ty-primary-chroma,--ty-surface-chroma,--ty-success-hue,--ty-success-chroma,--ty-warning-hue,--ty-warning-chroma,--ty-danger-hue,--ty-danger-chroma,--ty-neutral-hue,--ty-neutral-chroma,--ty-l-strong,--ty-l-bold,--ty-l-base,--ty-l-soft,--ty-l-faint,--ty-a-bg-base,--ty-a-bg-bold,--ty-a-bg-soft,--ty-l-text-strong,--ty-l-text-bold,--ty-l-text-base,--ty-l-text-soft,--ty-l-text-faint,--ty-l-border-content,--ty-l-border-elevated,--ty-l-border-floating,--ty-l-border-strong,--ty-l-border-bold,--ty-l-border,--ty-l-border-soft,--ty-l-border-faint,--ty-l-surface-canvas,--ty-l-surface-content,--ty-l-surface-elevated,--ty-l-surface-floating,--ty-l-surface-input,--ty-l-solid-neutral,--ty-l-solid-neutral-strong,--ty-l-bg-neutral-strong,--ty-l-bg-neutral-faint,--ty-c-bg-neutral-faint-mult,--ty-c-strong-mult,--ty-c-bold-mult,--ty-c-base-mult,--ty-c-soft-mult,--ty-c-faint-mult,--ty-primary-l-factor,--ty-success-l-factor,--ty-warning-l-factor,--ty-danger-l-factor,--ty-neutral-l-factor,--ty-primary-solid-l,--ty-success-solid-l,--ty-warning-solid-l,--ty-danger-solid-l,--ty-solid-hover-l,--ty-solid-active-l,--ty-solid-strong-l,--ty-solid-soft-l,--ty-solid-l,--ty-solid-c,--ty-solid-h,--ty-solid-fg-threshold,--ty-focus-ring-alpha,--ty-weight-action,--ty-weight-label,--ty-button-depth,--ty-button-border-l,--ty-button-border-l-neutral;transition-duration:var(--ty-theme-transition, .45s);transition-timing-function:ease}}.ty-theme-switching{--ty-local-transition: none}.ty-theme-switching *,.ty-theme-switching *:before,.ty-theme-switching *:after{transition:none!important}