studio-engine 0.126.0 → 0.128.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +138 -0
  3. data/README.md +13 -3
  4. data/app/assets/javascripts/studio/page_transition_reveal.js +1 -1
  5. data/app/assets/tailwind/studio_engine/engine.css +562 -36
  6. data/app/controllers/studio/surveys_controller.rb +16 -3
  7. data/app/helpers/studio/loader_helper.rb +2 -2
  8. data/app/helpers/studio_icon_helper.rb +10 -0
  9. data/app/javascript/studio/agent_chat.js +14 -3
  10. data/app/javascript/studio/agent_chat_voice.js +42 -4
  11. data/app/javascript/studio/controllers/page_header_controller.js +16 -2
  12. data/app/javascript/studio/loader.js +130 -5
  13. data/app/javascript/studio/microphone_chip.js +28 -2
  14. data/app/javascript/studio/page_header.js +7 -0
  15. data/app/javascript/studio/page_transitions.js +28 -19
  16. data/app/javascript/studio/survey.js +16 -3
  17. data/app/javascript/studio/theme_editor.js +4 -0
  18. data/app/javascript/studio/voice_recorder.js +18 -7
  19. data/app/models/studio/survey_response.rb +24 -17
  20. data/app/views/components/_geo_signpost.html.erb +1 -0
  21. data/app/views/components/_link_sidebar.html.erb +42 -12
  22. data/app/views/components/_sidebar_panel.html.erb +22 -4
  23. data/app/views/layouts/studio/_head.html.erb +18 -7
  24. data/app/views/layouts/studio/_smooth_load.html.erb +1 -0
  25. data/app/views/layouts/studio/component_preview.html.erb +1 -1
  26. data/app/views/studio/_page_header.html.erb +5 -3
  27. data/app/views/studio/agent_chat/_turn.html.erb +3 -1
  28. data/app/views/studio/agent_chat/_voice.html.erb +28 -13
  29. data/app/views/studio/loader/_overlay.html.erb +4 -4
  30. data/app/views/style/_components.html.erb +1 -1
  31. data/app/views/style/_glass.html.erb +83 -0
  32. data/app/views/style/_host.html.erb +1 -1
  33. data/app/views/style/_modals.html.erb +11 -11
  34. data/app/views/style/_scrims.html.erb +1 -1
  35. data/app/views/style/_site_footer.html.erb +1 -1
  36. data/app/views/style/_tasks.html.erb +1 -1
  37. data/app/views/style/_theme.html.erb +56 -72
  38. data/app/views/style/_tricks.html.erb +13 -11
  39. data/app/views/style/_type_ladder.html.erb +33 -0
  40. data/app/views/style/index.html.erb +5 -1
  41. data/docs/SITE_FOOTER.md +1 -1
  42. data/lib/studio/agent_chat.rb +4 -2
  43. data/lib/studio/icons/README.md +12 -0
  44. data/lib/studio/icons/lucide/LICENSE +43 -0
  45. data/lib/studio/icons/lucide/activity.svg +15 -0
  46. data/lib/studio/icons/lucide/book-open.svg +16 -0
  47. data/lib/studio/icons/lucide/chart-column.svg +18 -0
  48. data/lib/studio/icons/lucide/diamond.svg +15 -0
  49. data/lib/studio/icons/lucide/door-stairwell.svg +19 -0
  50. data/lib/studio/icons/lucide/globe.svg +17 -0
  51. data/lib/studio/icons/lucide/hammer.svg +17 -0
  52. data/lib/studio/icons/lucide/inbox.svg +16 -0
  53. data/lib/studio/icons/lucide/key-round.svg +16 -0
  54. data/lib/studio/icons/lucide/layout-grid.svg +18 -0
  55. data/lib/studio/icons/lucide/log-out.svg +17 -0
  56. data/lib/studio/icons/lucide/message-circle.svg +15 -0
  57. data/lib/studio/icons/lucide/package.svg +18 -0
  58. data/lib/studio/icons/lucide/palette.svg +19 -0
  59. data/lib/studio/icons/lucide/plug.svg +18 -0
  60. data/lib/studio/icons/lucide/rocket.svg +18 -0
  61. data/lib/studio/icons/lucide/user.svg +16 -0
  62. data/lib/studio/icons.rb +52 -0
  63. data/lib/studio/loader.rb +7 -0
  64. data/lib/studio/sidebar_sections.rb +52 -4
  65. data/lib/studio/site_footer.rb +23 -2
  66. data/lib/studio/version.rb +1 -1
  67. data/lib/studio.rb +54 -2
  68. metadata +25 -2
@@ -163,16 +163,22 @@ body.modal-open .studio-app-banner {
163
163
 
164
164
  /* -- Surfaces -------------------------------------------------------------- */
165
165
 
166
+ /* --surface-card-fill is unset unless an app opts in to the glass surfaces (THE GLASS SURFACES,
167
+ below). A token and not a higher-specificity rule, so a card's own tone still wins: a bg-warning/5,
168
+ a border-danger or a hover:bg-surface-alt on the element beats this as it always did. */
166
169
  @utility card {
167
- @apply bg-surface rounded-xl border border-subtle;
170
+ @apply rounded-xl border border-subtle;
171
+ background-color: var(--surface-card-fill, var(--color-surface));
168
172
  }
169
173
 
170
174
  @utility card-hover {
171
- @apply bg-surface rounded-xl border border-subtle hover:border-primary-700/50 hover:shadow-lg hover:shadow-primary-900/10 transition;
175
+ background-color: var(--surface-card-fill, var(--color-surface));
176
+ @apply rounded-xl border border-subtle hover:border-primary-700/50 hover:shadow-lg hover:shadow-primary-900/10 transition;
172
177
  }
173
178
 
174
179
  @utility empty-state {
175
- @apply bg-surface rounded-xl border border-subtle p-8 text-center;
180
+ @apply rounded-xl border border-subtle p-8 text-center;
181
+ background-color: var(--surface-card-fill, var(--color-surface));
176
182
  }
177
183
 
178
184
  @utility json-debug {
@@ -223,18 +229,55 @@ body.modal-open .studio-app-banner {
223
229
  line-height: 1.4;
224
230
  }
225
231
 
232
+ /* THE TYPE LADDER, on trial on /admin/style (Alex McRitchie, 2026-11-04: "standardize font
233
+ sizes across pages"). A role sets size, weight and line height; the tag stays whatever the
234
+ document outline needs, so a page's one <h1> may wear type-h2. These sizes are fixed px, so
235
+ type-dense does not move them. On Studio::TypeScale: h1 (3x of 16) and h4 (1x of 16). Off it,
236
+ on purpose: h2 and h3, the two steps the scale lacks between 3x and 1.5x and below 1.5x.
237
+ Body and fine print are the scale's own type-body and type-fine. */
238
+ @utility type-h1 {
239
+ font-size: 48px;
240
+ font-weight: var(--type-display-weight, 800);
241
+ line-height: 1.1;
242
+ }
243
+
244
+ @utility type-h2 {
245
+ font-size: 30px;
246
+ font-weight: var(--type-display-weight, 800);
247
+ line-height: 1.2;
248
+ }
249
+
250
+ @utility type-h3 {
251
+ font-size: 20px;
252
+ font-weight: 700;
253
+ line-height: 1.3;
254
+ }
255
+
256
+ @utility type-h4 {
257
+ font-size: 16px;
258
+ font-weight: 600;
259
+ line-height: 1.4;
260
+ }
261
+
226
262
  /* -- The page header (studio/_page_header, docs/PAGE_HEADER.md) ---------
227
263
  A normal page header at rest and a bar once stuck. The border is there in
228
264
  both states, in transparent at rest, so the row's height never changes and
229
265
  the pinned stack has nothing to republish. The layout is owned here: the
230
266
  engine's views depend on no responsive utility a host may not have emitted.
231
267
  The fade is owned too, because .fade-edge-x is in the opt-in motion layer, and
232
- it marks only an end that hides a tab (studio/controllers/page_header). */
268
+ it marks only an end that hides a tab (studio/controllers/page_header).
269
+
270
+ A LONG TITLE: the row wraps. The tabs' flex-basis is their floor, so a title that
271
+ leaves them less than that takes the first line and the tabs take the next, at
272
+ full width. A title too long for its line wraps, then stops at three lines. A short
273
+ title never reaches the floor, and its row is one line as before. */
233
274
 
234
275
  @utility page-header {
235
276
  display: flex;
277
+ flex-wrap: wrap;
236
278
  align-items: center;
237
279
  gap: 0.75rem;
280
+ min-width: 0;
238
281
  padding-block: 0.5rem;
239
282
  border-block: 1px solid transparent;
240
283
  background-color: transparent;
@@ -256,7 +299,7 @@ body.modal-open .studio-app-banner {
256
299
  display: flex;
257
300
  align-items: baseline;
258
301
  gap: 0.5rem;
259
- flex-shrink: 0;
302
+ flex: 0 1 auto;
260
303
  min-width: 0;
261
304
  }
262
305
 
@@ -265,6 +308,21 @@ body.modal-open .studio-app-banner {
265
308
  font-size: calc(var(--type-base, 16px) * 1.5);
266
309
  font-weight: var(--type-display-weight, 800);
267
310
  line-height: 1.25;
311
+ min-width: 0;
312
+ overflow-wrap: anywhere;
313
+ display: -webkit-box;
314
+ -webkit-box-orient: vertical;
315
+ -webkit-line-clamp: 3;
316
+ /* Up and down only. A hidden x would shave a glyph's overhang off a short title. */
317
+ overflow-x: visible;
318
+ overflow-y: clip;
319
+ }
320
+
321
+ /* The trial's one reach into the page header: the shared title keeps its own size everywhere
322
+ but under this attribute. Same numbers as type-h2. */
323
+ [data-type-ladder] .page-header-title {
324
+ font-size: 30px;
325
+ line-height: 1.2;
268
326
  }
269
327
 
270
328
  @utility page-header-meta {
@@ -278,7 +336,7 @@ body.modal-open .studio-app-banner {
278
336
  @utility page-header-tabs {
279
337
  --page-header-fade-start: 0px;
280
338
  --page-header-fade-end: 0px;
281
- flex: 1 1 0%;
339
+ flex: 1 1 6rem;
282
340
  min-width: 0;
283
341
  overflow-x: auto;
284
342
  scrollbar-width: none;
@@ -653,16 +711,18 @@ body.modal-open .studio-app-banner {
653
711
  }
654
712
 
655
713
  /* -- App-to-app page transitions --------------------------------------------
656
- Studio.page_transition_direction (studio/page_transitions, docs/PAGE_TRANSITIONS.md).
657
- Every rule is gated on an attribute only that script sets, so an app without
658
- the setting keeps the fade above. Attribute selectors outrank the bare
659
- ::view-transition-*(root) rules, here and in a host. The effects are from the
660
- Codrops Page Transitions demo, at its values; the keyframes were written fresh.
661
-
662
- Black behind the pages gives the shading: a page at opacity 0.3 darkens as it
663
- moves. */
714
+ Studio.page_transition_direction and Studio.page_transition_style
715
+ (studio/page_transitions, docs/PAGE_TRANSITIONS.md). Every rule is gated on an
716
+ attribute only that script sets, so an app without the setting keeps the fade
717
+ above. Attribute selectors outrank the bare ::view-transition-*(root) rules, here
718
+ and in a host. The effects are from the Codrops Page Transitions demo; the
719
+ keyframes were written fresh.
720
+
721
+ The app's own page color sits behind the pages, so no gap reads as a dark band.
722
+ Each page stays opaque as it moves: a page color seen through a fading page
723
+ would still shade it. The fallback covers a layout with no runtime theme block. */
664
724
  html[data-page-transition]:not([data-page-transition="still"])::view-transition {
665
- background: #000;
725
+ background: var(--color-page, Canvas);
666
726
  }
667
727
 
668
728
  html[data-page-transition]::view-transition-old(root),
@@ -708,14 +768,14 @@ html[data-page-transition-direction]:not([data-page-transition-morph]) [data-vt-
708
768
  view-transition-name: none !important;
709
769
  }
710
770
 
711
- html[data-page-transition="fade-left"]::view-transition-old(root) { animation-name: pt-out-left; }
712
- html[data-page-transition="fade-left"]::view-transition-new(root) { animation-name: pt-in-from-right; }
713
- html[data-page-transition="fade-right"]::view-transition-old(root) { animation-name: pt-out-right; }
714
- html[data-page-transition="fade-right"]::view-transition-new(root) { animation-name: pt-in-from-left; }
715
- html[data-page-transition="fade-top"]::view-transition-old(root) { animation-name: pt-out-top; }
716
- html[data-page-transition="fade-top"]::view-transition-new(root) { animation-name: pt-in-from-bottom; }
717
- html[data-page-transition="fade-bottom"]::view-transition-old(root) { animation-name: pt-out-bottom; }
718
- html[data-page-transition="fade-bottom"]::view-transition-new(root) { animation-name: pt-in-from-top; }
771
+ html[data-page-transition="slide-left"]::view-transition-old(root) { animation-name: pt-out-left; }
772
+ html[data-page-transition="slide-left"]::view-transition-new(root) { animation-name: pt-in-from-right; }
773
+ html[data-page-transition="slide-right"]::view-transition-old(root) { animation-name: pt-out-right; }
774
+ html[data-page-transition="slide-right"]::view-transition-new(root) { animation-name: pt-in-from-left; }
775
+ html[data-page-transition="slide-top"]::view-transition-old(root) { animation-name: pt-out-top; }
776
+ html[data-page-transition="slide-top"]::view-transition-new(root) { animation-name: pt-in-from-bottom; }
777
+ html[data-page-transition="slide-bottom"]::view-transition-old(root) { animation-name: pt-out-bottom; }
778
+ html[data-page-transition="slide-bottom"]::view-transition-new(root) { animation-name: pt-in-from-top; }
719
779
 
720
780
  html[data-page-transition="unfold-right"]::view-transition-old(root) { animation-name: pt-out-left; }
721
781
  html[data-page-transition="unfold-right"]::view-transition-new(root) { animation-name: pt-unfold-right; transform-origin: 0% 50%; }
@@ -726,14 +786,14 @@ html[data-page-transition="unfold-bottom"]::view-transition-new(root) { animatio
726
786
  html[data-page-transition="unfold-top"]::view-transition-old(root) { animation-name: pt-out-bottom; }
727
787
  html[data-page-transition="unfold-top"]::view-transition-new(root) { animation-name: pt-unfold-top; transform-origin: 50% 100%; }
728
788
 
729
- @keyframes pt-out-left { to { opacity: 0.3; transform: translateX(-100%); } }
730
- @keyframes pt-out-right { to { opacity: 0.3; transform: translateX(100%); } }
731
- @keyframes pt-out-top { to { opacity: 0.3; transform: translateY(-100%); } }
732
- @keyframes pt-out-bottom { to { opacity: 0.3; transform: translateY(100%); } }
733
- @keyframes pt-in-from-right { from { opacity: 0.3; transform: translateX(100%); } }
734
- @keyframes pt-in-from-left { from { opacity: 0.3; transform: translateX(-100%); } }
735
- @keyframes pt-in-from-bottom { from { opacity: 0.3; transform: translateY(100%); } }
736
- @keyframes pt-in-from-top { from { opacity: 0.3; transform: translateY(-100%); } }
789
+ @keyframes pt-out-left { to { transform: translateX(-100%); } }
790
+ @keyframes pt-out-right { to { transform: translateX(100%); } }
791
+ @keyframes pt-out-top { to { transform: translateY(-100%); } }
792
+ @keyframes pt-out-bottom { to { transform: translateY(100%); } }
793
+ @keyframes pt-in-from-right { from { transform: translateX(100%); } }
794
+ @keyframes pt-in-from-left { from { transform: translateX(-100%); } }
795
+ @keyframes pt-in-from-bottom { from { transform: translateY(100%); } }
796
+ @keyframes pt-in-from-top { from { transform: translateY(-100%); } }
737
797
  @keyframes pt-unfold-right { from { opacity: 0; transform: perspective(1200px) translateX(100%) rotateY(90deg); } }
738
798
  @keyframes pt-unfold-left { from { opacity: 0; transform: perspective(1200px) translateX(-100%) rotateY(-90deg); } }
739
799
  @keyframes pt-unfold-bottom { from { opacity: 0; transform: perspective(1200px) translateY(100%) rotateX(-90deg); } }
@@ -1085,6 +1145,472 @@ html[data-page-transition="unfold-top"]::view-transition-new(root) { animation-n
1085
1145
  }
1086
1146
  }
1087
1147
 
1148
+ /* THE SIDEBAR'S EDGE (components/_sidebar_panel, edge: true). A soft band along the panel's
1149
+ inner edge, where the page behind is blurred and fades out to sharp, so the panel
1150
+ stands off a busy page with no scrim and no darkening.
1151
+
1152
+ It is a pseudo-element of the panel: it moves with the slide, it leaves with the
1153
+ panel, and it takes no clicks, so an outside click still reaches the page. A
1154
+ transform on the panel does not start a new backdrop root, so it blurs the page.
1155
+ 100px wide, a 6px blur, on an eased mask: whole at the panel, half at 60px, nothing
1156
+ at the far end, and flat at both ends, so no stop shows as a line where the blur
1157
+ ends. A hold and a straight fade showed that line over a photo. A blur reads only
1158
+ above about half strength, so the 50% stop sits past the middle to carry it out.
1159
+ right: 100% measures from the padding box, so the band runs over the panel's 1px
1160
+ border. Stopping short of it left the border as a lit line beside the blur.
1161
+
1162
+ FROM md UP ONLY. Below that the link sidebar fills the width, so nothing sits
1163
+ beside it, and a phone does not pay for a backdrop filter through the slide. A
1164
+ browser with no backdrop-filter gets an empty box, so the panel is plain. */
1165
+ @media (min-width: 768px) {
1166
+ [data-sidebar-edge]::before {
1167
+ content: "";
1168
+ position: absolute;
1169
+ inset-block: 0;
1170
+ right: 100%;
1171
+ width: 6.25rem;
1172
+ pointer-events: none;
1173
+ -webkit-backdrop-filter: blur(6px);
1174
+ backdrop-filter: blur(6px);
1175
+ -webkit-mask-image: linear-gradient(to left, #000, rgb(0 0 0 / 0.99) 10%, rgb(0 0 0 / 0.96) 20%, rgb(0 0 0 / 0.9) 30%, rgb(0 0 0 / 0.8) 40%, rgb(0 0 0 / 0.66) 50%, rgb(0 0 0 / 0.5) 60%, rgb(0 0 0 / 0.33) 70%, rgb(0 0 0 / 0.17) 80%, rgb(0 0 0 / 0.05) 90%, transparent);
1176
+ mask-image: linear-gradient(to left, #000, rgb(0 0 0 / 0.99) 10%, rgb(0 0 0 / 0.96) 20%, rgb(0 0 0 / 0.9) 30%, rgb(0 0 0 / 0.8) 40%, rgb(0 0 0 / 0.66) 50%, rgb(0 0 0 / 0.5) 60%, rgb(0 0 0 / 0.33) 70%, rgb(0 0 0 / 0.17) 80%, rgb(0 0 0 / 0.05) 90%, transparent);
1177
+ }
1178
+ }
1179
+
1180
+ /* THE GLASS SIDEBAR (Studio.sidebar_style = :glass, components/_sidebar_panel glass: true).
1181
+ A rounded panel floats off the page's edge with the page blurred through it.
1182
+
1183
+ TWO BOXES. The aside keeps the drawer's geometry: its top and height from --nav-bottom,
1184
+ data-pin-edge's scroll animation, and Alpine's translate-x-full slide, which now carries
1185
+ the inset off screen with it. It is a clear frame that takes no clicks, so a click in
1186
+ the inset reaches the page and closes the panel like any outside click. The shell inside
1187
+ holds the fill and the blur. That keeps the containing block a backdrop-filter makes off
1188
+ the element Alpine, Turbo's snapshot and a view transition move.
1189
+
1190
+ THE FILL IS THE FALLBACK. Here it is nearly solid, so a browser with no backdrop-filter,
1191
+ or a reader who asks for less transparency, still gets readable text. The @supports rule
1192
+ thins it where the browser says it has the blur.
1193
+
1194
+ CONTRAST. The worst page behind the panel is the opposite of its theme: a white image
1195
+ under dark glass, a black one under light. A browser can claim the blur and not paint it, so
1196
+ the thin fill alone holds resting soft ink at 4.5:1 over both, and brightness() only adds
1197
+ to that. A thinner fill looks more like glass and fails over a white page.
1198
+
1199
+ IT HANGS FROM THE NAVBAR. The frame has no top padding, so no page shows between the
1200
+ navbar and the panel, and the shell's top is square with no top border: the navbar is
1201
+ its top edge. The sides and the bottom keep the inset and the round corners. The frame
1202
+ still takes its top from --nav-bottom and data-pin-edge, so it follows every navbar state.
1203
+
1204
+ SPACING IS FIVE TOKENS, on the shell: --glass-row-height, --glass-row-gap between rows,
1205
+ --glass-icon-size, --glass-icon-gap between icon and label, and --glass-section-gap,
1206
+ which sets the space under a section and above its header and from which the title and
1207
+ Log out padding derive. A row's no-jump description needs no rule of its own: the 18px
1208
+ label and 14px description take 32px, and with the lift at 7px a 44px row leaves 6px above
1209
+ and below them.
1210
+
1211
+ THE PHONE gets a narrower inset, the full width and a lighter blur, which costs less
1212
+ through the slide. */
1213
+ [data-sidebar-glass] {
1214
+ --sidebar-glass-inset: 0.75rem;
1215
+ width: 19.5rem;
1216
+ padding: 0 var(--sidebar-glass-inset) var(--sidebar-glass-inset);
1217
+ pointer-events: none;
1218
+ }
1219
+ [data-sidebar-glass-shell] {
1220
+ --glass-row-height: 2.75rem;
1221
+ --glass-row-gap: 0.125rem;
1222
+ --glass-icon-size: 1.375rem;
1223
+ --glass-icon-gap: 0.625rem;
1224
+ --glass-section-gap: 1rem;
1225
+ --sidebar-row-lift: 0.4375rem;
1226
+ --glass-fill: rgb(250 249 253 / 0.97);
1227
+ --glass-thin-fill: rgb(255 255 255 / 0.72);
1228
+ --glass-filter: blur(24px) saturate(150%) brightness(1.15);
1229
+ --glass-ink: #1d1832;
1230
+ --glass-soft-ink: #474260;
1231
+ --glass-hover: rgb(29 24 50 / 0.08);
1232
+ --glass-line: rgb(29 24 50 / 0.14);
1233
+ --glass-shadow: 0 24px 60px rgb(29 24 50 / 0.24);
1234
+ pointer-events: auto;
1235
+ overflow: hidden;
1236
+ min-height: 0;
1237
+ border: 1px solid var(--glass-line);
1238
+ border-top: 0;
1239
+ border-radius: 0 0 1.125rem 1.125rem;
1240
+ background-color: var(--glass-fill);
1241
+ box-shadow: var(--glass-shadow);
1242
+ color: var(--glass-ink);
1243
+ font-size: 0.84375rem;
1244
+ }
1245
+ .dark [data-sidebar-glass-shell] {
1246
+ --glass-fill: rgb(36 30 62 / 0.97);
1247
+ --glass-thin-fill: rgb(36 30 62 / 0.72);
1248
+ --glass-filter: blur(24px) saturate(150%) brightness(0.8);
1249
+ --glass-ink: #f1effa;
1250
+ --glass-soft-ink: #dedaed; /* 4.5:1 on the thin fill alone over white, if a blur never paints */
1251
+ --glass-hover: rgb(255 255 255 / 0.1);
1252
+ --glass-line: rgb(255 255 255 / 0.14);
1253
+ --glass-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
1254
+ }
1255
+ /* The less-transparency rule turns the blur off, rather than this rule asking for that
1256
+ setting's absence: a browser that does not know the media feature answers false to a
1257
+ not query as well, which left Safari and Firefox on the solid fill. */
1258
+ @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
1259
+ [data-sidebar-glass-shell] {
1260
+ background-color: var(--glass-thin-fill);
1261
+ -webkit-backdrop-filter: var(--glass-filter);
1262
+ backdrop-filter: var(--glass-filter);
1263
+ }
1264
+ @media (prefers-reduced-transparency: reduce) {
1265
+ [data-sidebar-glass-shell] {
1266
+ background-color: var(--glass-fill);
1267
+ -webkit-backdrop-filter: none;
1268
+ backdrop-filter: none;
1269
+ }
1270
+ }
1271
+ }
1272
+ @media (max-width: 47.99rem) {
1273
+ [data-sidebar-glass] {
1274
+ --sidebar-glass-inset: 0.5rem;
1275
+ width: 100%;
1276
+ }
1277
+ [data-sidebar-glass-shell] { --glass-filter: blur(16px) saturate(150%); }
1278
+ .dark [data-sidebar-glass-shell] { --glass-filter: blur(16px) saturate(150%) brightness(0.8); }
1279
+ }
1280
+ [data-sidebar-glass-head] {
1281
+ padding: calc(var(--glass-section-gap) + 0.25rem) 0.875rem calc(var(--glass-section-gap) * 0.75) 1.125rem;
1282
+ border-bottom: 0;
1283
+ }
1284
+ [data-sidebar-glass-head] [data-link-sidebar-title],
1285
+ [data-sidebar-glass-head] [data-sidebar-panel-lead] > * {
1286
+ color: var(--glass-ink);
1287
+ font-size: 0.9375rem;
1288
+ font-weight: 600;
1289
+ }
1290
+ [data-sidebar-glass-head] [data-link-sidebar-close] { color: var(--glass-soft-ink); }
1291
+ [data-sidebar-glass-head] [data-link-sidebar-close]:hover {
1292
+ color: var(--glass-ink);
1293
+ background-color: var(--glass-hover);
1294
+ }
1295
+ [data-sidebar-glass-shell] nav { padding-block: 0; scrollbar-width: thin; scrollbar-color: var(--glass-line) transparent; }
1296
+ [data-sidebar-glass-shell] nav > [role="group"] { padding: 0 0.625rem var(--glass-section-gap); }
1297
+ [data-sidebar-glass-shell] [data-sidebar-group-header] {
1298
+ padding: calc(var(--glass-section-gap) * 0.5) 0.5rem 0.375rem;
1299
+ color: var(--glass-soft-ink);
1300
+ font-size: 0.6875rem;
1301
+ font-weight: 600;
1302
+ letter-spacing: normal;
1303
+ text-transform: none;
1304
+ }
1305
+ [data-sidebar-glass-shell] nav > [role="group"] > :is(a, [aria-disabled]),
1306
+ [data-sidebar-glass-foot] > a {
1307
+ height: var(--glass-row-height);
1308
+ gap: var(--glass-icon-gap);
1309
+ padding: 0 0.5rem 0 0.375rem;
1310
+ border-radius: 0.625rem;
1311
+ color: var(--glass-ink);
1312
+ font-size: inherit;
1313
+ font-weight: 500;
1314
+ line-height: 1.125rem;
1315
+ }
1316
+ [data-sidebar-glass-shell] nav > [role="group"] > :is(a, [aria-disabled]):hover,
1317
+ [data-sidebar-glass-foot] > a:hover {
1318
+ color: var(--glass-ink);
1319
+ background-color: var(--glass-hover);
1320
+ }
1321
+ [data-sidebar-glass-shell] [data-sidebar-row-desc] {
1322
+ color: var(--glass-soft-ink);
1323
+ font-size: 0.6875rem;
1324
+ line-height: 0.875rem;
1325
+ }
1326
+ [data-sidebar-glass-shell] nav > [role="group"] > a[aria-current="page"],
1327
+ [data-sidebar-glass-shell] nav > [role="group"] > a[aria-current="page"]:hover {
1328
+ /* A step down the primary's own scale: white on the hub's primary is 3.1:1, and this
1329
+ mix holds 4.5:1 and still reads as the brand's violet. */
1330
+ background-color: color-mix(in srgb, var(--color-primary-600) 65%, var(--color-primary-700));
1331
+ box-shadow: 0 4px 14px rgb(var(--color-primary-rgb) / 0.4);
1332
+ color: #fff;
1333
+ }
1334
+ /* The glow above outranks the row's focus ring, which is a box-shadow. This ring is an
1335
+ outline set inside the edge, so the row's own fill shows on both sides of it: at the
1336
+ edge, white would melt into the light theme's panel. */
1337
+ [data-sidebar-glass-shell] nav > [role="group"] > a[aria-current="page"]:focus-visible {
1338
+ outline: 2px solid #fff;
1339
+ outline-offset: -4px;
1340
+ }
1341
+ [data-sidebar-glass-shell] a[aria-current="page"] [data-sidebar-row-desc] { color: rgb(255 255 255 / 0.9); }
1342
+ [data-sidebar-glass-shell] nav > [role="group"] > a + a { margin-top: var(--glass-row-gap); }
1343
+ /* The fixed column: a line icon sits in the 24px box the engine's emoji and portrait rows
1344
+ already take (EMOJI_SWAP_CSS), so every label starts at one x. A line icon, a portrait
1345
+ and an emoji all draw at --glass-icon-size. The swap's box is 1.25em tall and clips, so
1346
+ the font size is what keeps an emoji or a portrait whole. A host's portrait class asks
1347
+ for 20px, and the helper's svg for 18. */
1348
+ [data-sidebar-glass-shell] [data-sidebar-row-icon] {
1349
+ display: inline-flex;
1350
+ align-items: center;
1351
+ justify-content: center;
1352
+ width: 1.5rem;
1353
+ height: var(--glass-icon-size);
1354
+ }
1355
+ [data-sidebar-glass-shell] [data-sidebar-row-icon] svg,
1356
+ [data-sidebar-glass-shell] nav > [role="group"] > a > :is(.studio-emoji-box, .studio-emoji-swap) img {
1357
+ width: var(--glass-icon-size);
1358
+ height: var(--glass-icon-size);
1359
+ }
1360
+ [data-sidebar-glass-shell] nav > [role="group"] > a > :is(.studio-emoji-box, .studio-emoji-swap) {
1361
+ font-size: calc(var(--glass-icon-size) / 1.25);
1362
+ }
1363
+ [data-sidebar-glass-foot] {
1364
+ padding: calc(var(--glass-section-gap) * 0.625) 0.625rem;
1365
+ border-top: 1px solid var(--glass-line);
1366
+ }
1367
+
1368
+ /* THE GLASS SURFACES (Studio.surface_style = :glass, on the host's root as
1369
+ html[data-surface-style="glass"]). A card turns translucent over a soft ambient page.
1370
+
1371
+ THE AMBIENT PAGE IS WHAT MAKES IT READ. On a flat page a translucent card looks like a
1372
+ flat tinted one, so body::before lays low glows behind everything. It is one fixed layer
1373
+ behind the content, so a scroll does not repaint it.
1374
+
1375
+ TWO TIERS. A dense card (--surface-glass-card) gets fill, hairline, top highlight and
1376
+ soft shadow, with no backdrop-filter: a board holds a hundred of them. A card a host
1377
+ marks with .surface-glass-blur, or a page's few big panels, adds the real blur. The
1378
+ fill is the same in both, so a browser with no backdrop-filter draws the first tier.
1379
+
1380
+ WHAT IT REACHES: .card, .card-hover, .empty-state, and a hand-rolled panel spelled
1381
+ .bg-surface.rounded-xl.border. NOT a menu, popover or modal: anything .absolute, .fixed,
1382
+ .sticky or .shadow-2xl, or inside a .fixed scrim or a dialog, stays solid, because it
1383
+ floats over text and has no blur to protect it. Under prefers-reduced-transparency
1384
+ every surface goes solid. */
1385
+ html[data-surface-style="glass"] {
1386
+ --surface-glass-fill: color-mix(in srgb, var(--color-surface) 62%, transparent);
1387
+ --surface-glass-fill-hover: color-mix(in srgb, var(--color-surface) 80%, transparent);
1388
+ --surface-glass-line: rgb(29 24 50 / 0.1);
1389
+ --surface-glass-highlight: inset 0 1px 0 rgb(255 255 255 / 0.7);
1390
+ --surface-glass-shadow: 0 6px 20px rgb(60 50 120 / 0.08);
1391
+ --surface-glass-filter: blur(16px) saturate(140%);
1392
+ --surface-glass-ambient:
1393
+ radial-gradient(60vw 55vh at 10% 5%, rgb(var(--color-primary-rgb) / 0.17), transparent 70%),
1394
+ radial-gradient(50vw 60vh at 92% 30%, rgb(56 130 246 / 0.1), transparent 70%),
1395
+ radial-gradient(70vw 55vh at 45% 100%, rgb(var(--color-primary-rgb) / 0.14), transparent 70%);
1396
+ }
1397
+ html.dark[data-surface-style="glass"] {
1398
+ --surface-glass-fill: color-mix(in srgb, var(--color-surface) 52%, transparent);
1399
+ --surface-glass-fill-hover: color-mix(in srgb, var(--color-surface) 72%, transparent);
1400
+ --surface-glass-line: rgb(255 255 255 / 0.1);
1401
+ --surface-glass-highlight: inset 0 1px 0 rgb(255 255 255 / 0.08);
1402
+ --surface-glass-shadow: 0 8px 24px rgb(0 0 0 / 0.22);
1403
+ --surface-glass-ambient:
1404
+ radial-gradient(60vw 55vh at 10% 5%, rgb(var(--color-primary-rgb) / 0.2), transparent 70%),
1405
+ radial-gradient(50vw 60vh at 92% 30%, rgb(56 130 246 / 0.1), transparent 70%),
1406
+ radial-gradient(70vw 55vh at 45% 100%, rgb(var(--color-primary-rgb) / 0.14), transparent 70%);
1407
+ }
1408
+ html[data-surface-style="glass"] body::before {
1409
+ content: "";
1410
+ position: fixed;
1411
+ inset: 0;
1412
+ z-index: -1;
1413
+ pointer-events: none;
1414
+ background-image: var(--surface-glass-ambient);
1415
+ }
1416
+ /* A CARD KEEPS WHAT IT SAYS. Glass sets no border and no tone. The fill of .card, .card-hover and
1417
+ .empty-state is a token its own utility reads, so an authored bg-*, border-* or focus-within:*
1418
+ on the element wins as it always did. A hand-rolled panel has .bg-surface, so it has no tone to
1419
+ lose, and only its fill changes. The shadow list carries the element's own ring and shadow. */
1420
+ html[data-surface-style="glass"] { --surface-card-fill: var(--surface-glass-fill); }
1421
+ html[data-surface-style="glass"] :is(.card, .card-hover, .empty-state):is(.absolute, .fixed, .sticky, .shadow-2xl, .fixed *, [role="dialog"] *) { --surface-card-fill: var(--color-surface); }
1422
+ html[data-surface-style="glass"] :is(.card-hover, a.card):not(.absolute, .fixed, .sticky, .shadow-2xl, .fixed *, [role="dialog"] *):hover { --surface-card-fill: var(--surface-glass-fill-hover); }
1423
+ html[data-surface-style="glass"] .bg-surface.rounded-xl.border:not(.absolute, .fixed, .sticky, .shadow-2xl, .fixed *, [role="dialog"] *) { background-color: var(--surface-glass-fill); }
1424
+ html[data-surface-style="glass"] :is(.card, .card-hover, .empty-state, .bg-surface.rounded-xl.border):not(.absolute, .fixed, .sticky, .shadow-2xl, .fixed *, [role="dialog"] *) {
1425
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
1426
+ var(--surface-glass-highlight), var(--surface-glass-shadow), var(--tw-shadow, 0 0 #0000);
1427
+ }
1428
+ /* A backdrop-filter starts a stacking context and a containing block, so a tooltip inside
1429
+ a blurred card must lift the card above its neighbours. */
1430
+ @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
1431
+ html[data-surface-style="glass"] .surface-glass-blur {
1432
+ -webkit-backdrop-filter: var(--surface-glass-filter);
1433
+ backdrop-filter: var(--surface-glass-filter);
1434
+ }
1435
+ html[data-surface-style="glass"] .surface-glass-blur:is(:hover, :focus-within) { position: relative; z-index: 2; }
1436
+ /* The navbar is a blurred bar already. Thinner, the ambient page runs under it and no
1437
+ hard edge marks where the page begins. */
1438
+ html[data-surface-style="glass"] .nav-shell {
1439
+ background-color: color-mix(in srgb, var(--color-page) 62%, transparent);
1440
+ -webkit-backdrop-filter: blur(18px) saturate(140%);
1441
+ backdrop-filter: blur(18px) saturate(140%);
1442
+ }
1443
+ }
1444
+
1445
+ /* THE STICKY PAGE HEADER UNDER GLASS. Stuck, the shared rule fills it with surface grey.
1446
+ Here it is a bar like the sidebar: square against the navbar, round at the bottom, a
1447
+ hairline edge and the same top light. Opaque page color without a blur; thin with one.
1448
+ A failed page-header controller takes the same bar, as it takes the grey one today. */
1449
+ html[data-surface-style="glass"] .page-header:is([data-stuck], [data-studio-controller-failed~="page-header"] + .page-header) {
1450
+ background-color: var(--color-page);
1451
+ border-top-color: transparent;
1452
+ border-bottom-color: var(--surface-glass-line);
1453
+ border-radius: 0 0 0.875rem 0.875rem;
1454
+ box-shadow: var(--surface-glass-highlight), var(--surface-glass-shadow);
1455
+ }
1456
+ @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
1457
+ html[data-surface-style="glass"] .page-header:is([data-stuck], [data-studio-controller-failed~="page-header"] + .page-header) {
1458
+ background-color: color-mix(in srgb, var(--color-page) 62%, transparent);
1459
+ -webkit-backdrop-filter: blur(18px) saturate(140%);
1460
+ backdrop-filter: blur(18px) saturate(140%);
1461
+ }
1462
+ }
1463
+
1464
+ /* LIT FROM ABOVE, under the same opt-in: one light for buttons, badges and inputs, from the
1465
+ direction of the cards' top highlight. Four shadows: top light, bottom shade, contact, and
1466
+ a glow in the button's own color.
1467
+
1468
+ THE GRADIENT KEEPS ITS CHROMA. Both stops are built in oklch from the token, a brighter
1469
+ and an equally saturated top over a deep saturated bottom; mixing toward black or grey is
1470
+ what mutes a button. White text is held to 4.5:1 against the midpoint behind it, so the
1471
+ top stop reads lower, as it does in the rule this follows.
1472
+
1473
+ WHO GETS WHAT. Every full-size filled button: gradient, top, bottom, contact and a glow in
1474
+ its own color, on the same 0.15 lightness range. A .btn-sm has no glow, since a toolbar or
1475
+ a board of them would be noise. Neutral,
1476
+ outline and google, which includes a resting tab: top, bottom, contact, softer. Badges: a
1477
+ small top light and contact, no press. Inputs read pressed in. Disabled is flat.
1478
+
1479
+ THE PRESS flips the shadow to inset. Only a full-size button also moves 1px: translate
1480
+ takes no layout, but a toolbar row of small buttons should not jitter, and reduced motion
1481
+ never moves.
1482
+
1483
+ FOCUS IS AN OUTLINE on .btn, which no box-shadow here touches. Each list names the ring
1484
+ variables on the element itself: declared once on the root they would resolve there, to no
1485
+ ring. A button that spells its own bg-* or border-* keeps it.
1486
+
1487
+ EDGE TO EDGE. An inset box-shadow paints inside the padding box, so a 1px border leaves a
1488
+ strip where the light and the shade stop short. The inset shadows live on ::after, over
1489
+ the whole border box and on the same radius. The clear 1px border stays as a spacer, so
1490
+ every size, including a hand-sized .btn px-3 py-1, keeps its box and a selected tab is as
1491
+ tall as the neutral tabs beside it. Neutral paints its hairline there too. An outline
1492
+ button keeps its real border.
1493
+
1494
+ data-lit-state forces a state, for the specimens on the style guide. */
1495
+ html[data-surface-style="glass"] {
1496
+ --lit-top: inset 0 1px 0 rgb(255 255 255 / 0.35);
1497
+ --lit-bottom: inset 0 -2px 0 rgb(0 0 0 / 0.2);
1498
+ --lit-contact: 0 1px 2px rgb(0 0 0 / 0.4);
1499
+ --lit-glow: 0 8px 24px -6px;
1500
+ --lit-glow-alpha: 0.6;
1501
+ --lit-soft-top: inset 0 1px 0 rgb(255 255 255 / 0.8);
1502
+ --lit-soft-bottom: inset 0 -1px 0 rgb(29 24 50 / 0.08);
1503
+ --lit-pressed: inset 0 2px 4px rgb(0 0 0 / 0.27);
1504
+ --lit-soft-pressed: inset 0 2px 3px rgb(29 24 50 / 0.16);
1505
+ --lit-badge: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 1px 1px rgb(29 24 50 / 0.12);
1506
+ --lit-input: inset 0 1px 2px rgb(29 24 50 / 0.14), inset 0 -1px 0 rgb(255 255 255 / 0.6);
1507
+ }
1508
+ html.dark[data-surface-style="glass"] {
1509
+ --lit-bottom: inset 0 -2px 0 rgb(0 0 0 / 0.3);
1510
+ --lit-contact: 0 1px 2px rgb(0 0 0 / 0.65);
1511
+ --lit-glow: 0 12px 28px -10px;
1512
+ --lit-glow-alpha: 0.8;
1513
+ --lit-soft-top: inset 0 1px 0 rgb(255 255 255 / 0.12);
1514
+ --lit-soft-bottom: inset 0 -1px 0 rgb(0 0 0 / 0.25);
1515
+ --lit-soft-pressed: inset 0 2px 3px rgb(0 0 0 / 0.4);
1516
+ --lit-badge: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 1px 1px rgb(0 0 0 / 0.35);
1517
+ --lit-input: inset 0 1px 2px rgb(0 0 0 / 0.4), inset 0 -1px 0 rgb(255 255 255 / 0.06);
1518
+ }
1519
+ /* Stops: the app's primary is often too light for white, so it steps down its own lightness;
1520
+ the semantic fills already hold 4.5:1, so the midpoint stays on the fill. */
1521
+ html[data-surface-style="glass"] .btn-primary {
1522
+ --lit-top-stop: oklch(from var(--color-cta) calc(l - 0.03) calc(c + 0.03) h / var(--lit-fill-alpha, 1));
1523
+ --lit-low-stop: oklch(from var(--color-cta) calc(l - 0.18) calc(c + 0.05) h / var(--lit-fill-alpha, 1));
1524
+ }
1525
+ html[data-surface-style="glass"] :is(.btn-secondary, .btn-danger, .btn-warning, .btn-success) {
1526
+ --lit-top-stop: oklch(from var(--lit-fill) calc(l + 0.075) calc(c + 0.03) h / var(--lit-fill-alpha, 1));
1527
+ --lit-low-stop: oklch(from var(--lit-fill) calc(l - 0.075) calc(c + 0.03) h / var(--lit-fill-alpha, 1));
1528
+ }
1529
+ html[data-surface-style="glass"] .btn-secondary { --lit-fill: var(--btn-secondary-bg, var(--color-success)); }
1530
+ html[data-surface-style="glass"] .btn-danger { --lit-fill: var(--color-danger-fill, var(--color-danger)); }
1531
+ html[data-surface-style="glass"] .btn-warning { --lit-fill: var(--color-warning-fill, var(--color-warning)); }
1532
+ html[data-surface-style="glass"] .btn-success { --lit-fill: var(--color-success); }
1533
+ /* The spacer holds in every state, so a submit that disables its button moves nothing. */
1534
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success):not([class*=" bg-"], [class^="bg-"]) { border: 1px solid transparent; }
1535
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success):not(:disabled, [aria-disabled="true"], [class*=" bg-"], [class^="bg-"]) {
1536
+ background-origin: border-box;
1537
+ background-repeat: no-repeat;
1538
+ background-image: linear-gradient(var(--lit-top-stop), var(--lit-low-stop));
1539
+ --lit-inset: var(--lit-top), var(--lit-bottom);
1540
+ --lit-inset-pressed: var(--lit-pressed);
1541
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-contact);
1542
+ }
1543
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success):not(.btn-sm, :disabled, [aria-disabled="true"]) {
1544
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-contact),
1545
+ var(--lit-glow) oklch(from var(--lit-glow-stop, var(--lit-low-stop)) l c h / var(--lit-glow-alpha));
1546
+ }
1547
+ /* On a dark page a deep green, red or orange glow disappears, so these glow from the top
1548
+ stop. The violet is already bright enough at its low stop. */
1549
+ html.dark[data-surface-style="glass"] :is(.btn-secondary, .btn-danger, .btn-warning, .btn-success) { --lit-glow-stop: var(--lit-top-stop); }
1550
+ /* A TOUCH OF TRANSPARENCY on a full-size filled button, dark theme only: a photo behind it
1551
+ shows subtly, and white text holds 4.5:1 at the midpoint. An outer shadow is not painted
1552
+ under its own box, so the glow never brightens the fill. On a light page the backdrop would
1553
+ lift the fill and cost contrast, so it stays solid there. Without a blur, or without relative
1554
+ oklch (the gradient would drop out and leave white text on nothing), it stays solid. */
1555
+ @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (color: oklch(from red l c h)) {
1556
+ html.dark[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success):not(.btn-sm, :disabled, [aria-disabled="true"], [class*=" bg-"], [class^="bg-"]) {
1557
+ --lit-fill-alpha: 0.94;
1558
+ background-color: transparent;
1559
+ -webkit-backdrop-filter: blur(6px);
1560
+ backdrop-filter: blur(6px);
1561
+ }
1562
+ }
1563
+ html[data-surface-style="glass"] .btn-primary:not(:disabled, [aria-disabled="true"]):is(:hover, [data-lit-state="hover"]) {
1564
+ filter: brightness(0.94);
1565
+ }
1566
+ html[data-surface-style="glass"] :is(.btn-neutral, .btn-google):not(:disabled, [aria-disabled="true"], [class*=" border-"]) {
1567
+ border-color: transparent;
1568
+ }
1569
+ html[data-surface-style="glass"] :is(.btn-neutral, .btn-google):not(:disabled, [aria-disabled="true"]) {
1570
+ --lit-inset: inset 0 0 0 1px var(--surface-glass-line), var(--lit-soft-top), var(--lit-soft-bottom);
1571
+ --lit-inset-pressed: inset 0 0 0 1px var(--surface-glass-line), var(--lit-soft-pressed);
1572
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-contact);
1573
+ }
1574
+ html[data-surface-style="glass"] .btn-outline:not(:disabled, [aria-disabled="true"]) {
1575
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-soft-top), var(--lit-soft-bottom), var(--lit-contact);
1576
+ }
1577
+ html[data-surface-style="glass"] .btn-outline:not(:disabled, [aria-disabled="true"]):is(:active, [data-lit-state="pressed"]) {
1578
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-soft-pressed);
1579
+ }
1580
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success, .btn-neutral, .btn-google):not(:disabled, [aria-disabled="true"], .absolute, .fixed, .sticky) { position: relative; }
1581
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success, .btn-neutral, .btn-google):not(:disabled, [aria-disabled="true"])::after {
1582
+ content: "";
1583
+ position: absolute;
1584
+ inset: -1px;
1585
+ border-radius: inherit;
1586
+ pointer-events: none;
1587
+ box-shadow: var(--lit-inset);
1588
+ }
1589
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success, .btn-neutral, .btn-google):not(:disabled, [aria-disabled="true"]):is(:active, [data-lit-state="pressed"]) {
1590
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000);
1591
+ }
1592
+ html[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success, .btn-neutral, .btn-google):not(:disabled, [aria-disabled="true"]):is(:active, [data-lit-state="pressed"])::after {
1593
+ box-shadow: var(--lit-inset-pressed);
1594
+ }
1595
+ @media (prefers-reduced-motion: no-preference) {
1596
+ html[data-surface-style="glass"] .btn:not(.btn-sm, :disabled, [aria-disabled="true"]):is(:active, [data-lit-state="pressed"]) { translate: 0 1px; }
1597
+ }
1598
+ html[data-surface-style="glass"] .btn[data-lit-state="focus"] {
1599
+ outline: 2px solid color-mix(in srgb, var(--color-cta) 70%, transparent);
1600
+ outline-offset: 2px;
1601
+ }
1602
+ html[data-surface-style="glass"] .badge { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-badge); }
1603
+ html[data-surface-style="glass"] .input-field { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--lit-input); }
1604
+
1605
+ /* LESS TRANSPARENCY: every surface above goes solid and drops its blur. Last, to win on order;
1606
+ both spellings of the root, since html.dark outranks a bare html[...] on specificity. */
1607
+ @media (prefers-reduced-transparency: reduce) {
1608
+ html[data-surface-style="glass"], html.dark[data-surface-style="glass"] { --surface-glass-fill: var(--color-surface); --surface-glass-fill-hover: var(--color-surface-alt); }
1609
+ html[data-surface-style="glass"] :is(.surface-glass-blur, .nav-shell, .page-header:is([data-stuck], [data-studio-controller-failed~="page-header"] + .page-header)),
1610
+ html.dark[data-surface-style="glass"] :is(.btn-primary, .btn-secondary, .btn-danger, .btn-warning, .btn-success):not(.btn-sm, :disabled, [aria-disabled="true"]) { --lit-fill-alpha: 1; -webkit-backdrop-filter: none; backdrop-filter: none; }
1611
+ html[data-surface-style="glass"] :is(.nav-shell, .page-header:is([data-stuck], [data-studio-controller-failed~="page-header"] + .page-header)) { background-color: var(--color-page); }
1612
+ }
1613
+
1088
1614
  /* THE SIDEBAR ROW'S DESCRIPTION (components/_link_sidebar, _geo_signpost). At rest
1089
1615
  a row with a description is one line, the height of any other row. On hover or
1090
1616
  keyboard focus the description fades in under the label, and no layout changes:
@@ -1113,23 +1639,23 @@ html[data-page-transition="unfold-top"]::view-transition-new(root) { animation-n
1113
1639
  [data-sidebar-row-label] { transition: transform 140ms ease-in; }
1114
1640
  [data-sidebar-row-described]:focus-visible [data-sidebar-row-label],
1115
1641
  [data-sidebar-row-described][aria-disabled="true"]:focus [data-sidebar-row-label] {
1116
- transform: translateY(-0.5rem);
1642
+ transform: translateY(calc(-1 * var(--sidebar-row-lift, 0.5rem)));
1117
1643
  transition: transform 200ms ease-out 150ms;
1118
1644
  }
1119
1645
  [data-sidebar-row-described]:focus-visible [data-sidebar-row-desc],
1120
1646
  [data-sidebar-row-described][aria-disabled="true"]:focus [data-sidebar-row-desc] {
1121
1647
  opacity: 1;
1122
- transform: translateY(-0.5rem);
1648
+ transform: translateY(calc(-1 * var(--sidebar-row-lift, 0.5rem)));
1123
1649
  transition: opacity 200ms ease-out 150ms, transform 200ms ease-out 150ms;
1124
1650
  }
1125
1651
  @media (hover: hover) {
1126
1652
  [data-sidebar-row-described]:hover [data-sidebar-row-label] {
1127
- transform: translateY(-0.5rem);
1653
+ transform: translateY(calc(-1 * var(--sidebar-row-lift, 0.5rem)));
1128
1654
  transition: transform 200ms ease-out 150ms;
1129
1655
  }
1130
1656
  [data-sidebar-row-described]:hover [data-sidebar-row-desc] {
1131
1657
  opacity: 1;
1132
- transform: translateY(-0.5rem);
1658
+ transform: translateY(calc(-1 * var(--sidebar-row-lift, 0.5rem)));
1133
1659
  transition: opacity 200ms ease-out 150ms, transform 200ms ease-out 150ms;
1134
1660
  }
1135
1661
  }
@@ -1142,7 +1668,7 @@ html[data-page-transition="unfold-top"]::view-transition-new(root) { animation-n
1142
1668
  [data-sidebar-row-described]:hover [data-sidebar-row-desc],
1143
1669
  [data-sidebar-row-described]:focus-visible [data-sidebar-row-desc],
1144
1670
  [data-sidebar-row-described][aria-disabled="true"]:focus [data-sidebar-row-desc] {
1145
- transform: translateY(-0.5rem);
1671
+ transform: translateY(calc(-1 * var(--sidebar-row-lift, 0.5rem)));
1146
1672
  transition: opacity 200ms ease-out 150ms;
1147
1673
  }
1148
1674
  }