@shift-css/core 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shift.css CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  -webkit-font-smoothing: antialiased;
19
19
  -moz-osx-font-smoothing: grayscale;
20
- text-rendering: optimizeLegibility;
20
+ text-rendering: optimizelegibility;
21
21
  }
22
22
 
23
23
  body {
@@ -359,14 +359,18 @@
359
359
  --_surface-bg: var(--s-surface-base);
360
360
  --_surface-padding: var(--s-space-4);
361
361
  --_surface-radius: var(--s-radius-lg);
362
+ --_surface-depth: 0;
362
363
  background-color: var(--_surface-bg);
363
364
  padding: var(--_surface-padding);
364
365
  border-radius: var(--_surface-radius);
365
366
  color: var(--s-text-primary);
366
- container-type: inline-size;
367
+ container: surface / inline-size;
367
368
 
368
369
  @supports (color: oklch(from red l c h)) {
369
- color: oklch(from var(--_surface-bg) clamp(.15, calc((.55 - l) * 1000 + .15), .95) 0 0);
370
+ color: oklch(from var(--_surface-bg)
371
+ /* If L < 0.55, use light text (0.95); otherwise dark text (0.15)
372
+ Threshold 0.55 ensures 4.5:1 contrast per WCAG 2.1 AA */
373
+ clamp(.15, calc((.55 - l) * 1000 + .15), .95) 0 0);
370
374
  }
371
375
 
372
376
  @supports (color: contrast-color(red)) {
@@ -376,20 +380,24 @@
376
380
 
377
381
  [s-surface="flat"] {
378
382
  --_surface-bg: var(--s-surface-base);
383
+ --_surface-depth: 0;
379
384
  }
380
385
 
381
386
  [s-surface="sunken"] {
382
387
  --_surface-bg: var(--s-surface-sunken);
388
+ --_surface-depth: -1;
383
389
  box-shadow: var(--s-shadow-inner);
384
390
  }
385
391
 
386
392
  [s-surface="raised"] {
387
393
  --_surface-bg: var(--s-surface-raised);
394
+ --_surface-depth: 1;
388
395
  box-shadow: var(--s-shadow-md);
389
396
  }
390
397
 
391
398
  [s-surface="floating"] {
392
399
  --_surface-bg: var(--s-surface-raised);
400
+ --_surface-depth: 2;
393
401
  box-shadow: var(--s-shadow-xl);
394
402
  }
395
403
 
@@ -399,7 +407,8 @@
399
407
 
400
408
  [s-surface][s-interactive] {
401
409
  cursor: pointer;
402
- transition: transform var(--s-duration-150) var(--s-ease-out), box-shadow var(--s-duration-150) var(--s-ease-out);
410
+ transition: transform var(--s-duration-150) var(--s-ease-out),
411
+ box-shadow var(--s-duration-150) var(--s-ease-out);
403
412
 
404
413
  &:hover {
405
414
  box-shadow: var(--s-shadow-lg);
@@ -443,7 +452,7 @@
443
452
  background-color: #d4edda;
444
453
  background-color: var(--_surface-bg);
445
454
  border-left: 4px solid var(--s-state-success);
446
- color: #1a1a1a;
455
+ color: light-dark(#1a1a1a, #e5e5e5);
447
456
  }
448
457
 
449
458
  [s-surface="warning"] {
@@ -451,7 +460,7 @@
451
460
  background-color: #fff3cd;
452
461
  background-color: var(--_surface-bg);
453
462
  border-left: 4px solid var(--s-state-warning);
454
- color: #1a1a1a;
463
+ color: light-dark(#1a1a1a, #e5e5e5);
455
464
  }
456
465
 
457
466
  [s-surface="danger"] {
@@ -459,7 +468,7 @@
459
468
  background-color: #f8d7da;
460
469
  background-color: var(--_surface-bg);
461
470
  border-left: 4px solid var(--s-state-danger);
462
- color: #1a1a1a;
471
+ color: light-dark(#1a1a1a, #e5e5e5);
463
472
  }
464
473
 
465
474
  @container (width <= 20rem) {
@@ -500,16 +509,27 @@
500
509
  color: contrast-color(var(--_btn-bg));
501
510
  }
502
511
 
503
- transition: background-color var(--s-duration-150) var(--s-ease-out), border-color var(--s-duration-150) var(--s-ease-out), transform var(--s-duration-100) var(--s-ease-out);
512
+ transition: background-color var(--s-duration-150) var(--s-ease-out),
513
+ border-color var(--s-duration-150) var(--s-ease-out),
514
+ transform var(--s-duration-100) var(--s-ease-out);
504
515
  cursor: pointer;
505
516
  user-select: none;
506
517
 
507
518
  &:hover:not(:disabled) {
508
- --_btn-bg: var(--s-interactive-primary-hover);
519
+ background-color: var(--s-interactive-primary-hover);
520
+
521
+ @supports (color: oklch(from red l c h)) and (color: light-dark(red, blue)) {
522
+ background-color: light-dark(oklch(from var(--_btn-bg) calc(l * .92) c h), oklch(from var(--_btn-bg) min(calc(l * 1.1), .95) c h));
523
+ }
509
524
  }
510
525
 
511
526
  &:active:not(:disabled) {
512
- --_btn-bg: var(--s-interactive-primary-active);
527
+ background-color: var(--s-interactive-primary-active);
528
+
529
+ @supports (color: oklch(from red l c h)) and (color: light-dark(red, blue)) {
530
+ background-color: light-dark(oklch(from var(--_btn-bg) calc(l * .85) c h), oklch(from var(--_btn-bg) min(calc(l * 1.2), .98) c h));
531
+ }
532
+
513
533
  transform: scale(.98);
514
534
  }
515
535
 
@@ -528,14 +548,6 @@
528
548
  [s-btn="primary"] {
529
549
  --_btn-bg: var(--s-interactive-primary);
530
550
  --_btn-text: var(--s-text-inverse);
531
-
532
- &:hover:not(:disabled) {
533
- --_btn-bg: var(--s-interactive-primary-hover);
534
- }
535
-
536
- &:active:not(:disabled) {
537
- --_btn-bg: var(--s-interactive-primary-active);
538
- }
539
551
  }
540
552
 
541
553
  [s-btn="secondary"] {
@@ -543,10 +555,6 @@
543
555
  --_btn-text: var(--s-text-primary);
544
556
  --_btn-border: var(--s-border-default);
545
557
  color: var(--_btn-text);
546
-
547
- &:hover:not(:disabled) {
548
- --_btn-bg: var(--s-surface-sunken);
549
- }
550
558
  }
551
559
 
552
560
  [s-btn="ghost"] {
@@ -581,45 +589,21 @@
581
589
 
582
590
  &:hover:not(:disabled) {
583
591
  --_btn-bg: var(--s-interactive-primary);
584
- --_btn-text: var(--s-text-inverse);
585
- color: var(--_btn-text);
592
+ background-color: var(--s-interactive-primary);
593
+ color: var(--s-text-inverse);
586
594
  }
587
595
  }
588
596
 
589
597
  [s-btn="danger"] {
590
598
  --_btn-bg: var(--s-state-danger);
591
-
592
- &:hover:not(:disabled) {
593
- --_btn-bg: var(--s-danger-800);
594
- }
595
-
596
- &:active:not(:disabled) {
597
- --_btn-bg: var(--s-danger-900);
598
- }
599
599
  }
600
600
 
601
601
  [s-btn="success"] {
602
602
  --_btn-bg: var(--s-state-success);
603
-
604
- &:hover:not(:disabled) {
605
- --_btn-bg: var(--s-success-800);
606
- }
607
-
608
- &:active:not(:disabled) {
609
- --_btn-bg: var(--s-success-900);
610
- }
611
603
  }
612
604
 
613
605
  [s-btn="warning"] {
614
606
  --_btn-bg: var(--s-state-warning);
615
-
616
- &:hover:not(:disabled) {
617
- --_btn-bg: var(--s-warning-800);
618
- }
619
-
620
- &:active:not(:disabled) {
621
- --_btn-bg: var(--s-warning-900);
622
- }
623
607
  }
624
608
 
625
609
  [s-btn][s-size="sm"] {
@@ -691,6 +675,31 @@
691
675
  }
692
676
  }
693
677
 
678
+ @supports (container-type: inline-size) {
679
+ @container surface style(--_surface-depth: 1) {
680
+ :where([s-btn="secondary"]) {
681
+ --_btn-border: var(--s-border-strong);
682
+ }
683
+ }
684
+
685
+ @container surface style(--_surface-depth: 2) {
686
+ :where([s-btn="secondary"]) {
687
+ --_btn-border: var(--s-border-strong);
688
+ --_btn-bg: var(--s-surface-base);
689
+ }
690
+
691
+ :where([s-btn="ghost"]) {
692
+ --_btn-border: var(--s-border-muted);
693
+ }
694
+ }
695
+
696
+ @container surface style(--_surface-depth: -1) {
697
+ :where([s-btn="secondary"]) {
698
+ --_btn-bg: var(--s-surface-base);
699
+ }
700
+ }
701
+ }
702
+
694
703
  :where([s-card]) {
695
704
  --_card-bg: var(--s-surface-raised);
696
705
  --_card-border: var(--s-border-muted);
@@ -750,6 +759,12 @@
750
759
  color: var(--s-text-secondary);
751
760
  }
752
761
 
762
+ [s-card-actions] {
763
+ gap: var(--s-space-2);
764
+ margin-top: var(--s-space-4);
765
+ display: flex;
766
+ }
767
+
753
768
  [s-card="flat"] {
754
769
  --_card-shadow: none;
755
770
  --_card-border: var(--s-border-default);
@@ -757,12 +772,12 @@
757
772
 
758
773
  [s-card="elevated"], [s-card][s-surface="raised"] {
759
774
  --_card-shadow: var(--s-shadow-lg);
760
- --_card-border: transparent;
775
+ --_card-border: oklch(0% 0 0 / 0);
761
776
  }
762
777
 
763
778
  [s-card][s-surface="floating"] {
764
779
  --_card-shadow: var(--s-shadow-xl);
765
- --_card-border: transparent;
780
+ --_card-border: oklch(0% 0 0 / 0);
766
781
  }
767
782
 
768
783
  [s-card="outline"] {
@@ -773,11 +788,17 @@
773
788
 
774
789
  [s-card][s-interactive] {
775
790
  cursor: pointer;
776
- transition: transform var(--s-duration-200) var(--s-ease-out), box-shadow var(--s-duration-200) var(--s-ease-out);
791
+ transition: transform var(--s-duration-200) var(--s-ease-out),
792
+ box-shadow var(--s-duration-200) var(--s-ease-out),
793
+ border-color var(--s-duration-200) var(--s-ease-out);
777
794
 
778
795
  &:hover {
779
796
  --_card-shadow: var(--s-shadow-xl);
780
797
  transform: translateY(-4px);
798
+
799
+ @supports (color: oklch(from red l c h)) {
800
+ border-color: oklch(from var(--_card-border) max(calc(l - .1), .05) c h);
801
+ }
781
802
  }
782
803
 
783
804
  &:active {
@@ -852,6 +873,53 @@
852
873
  display: flex;
853
874
  }
854
875
 
876
+ @supports (container-type: inline-size) {
877
+ @container surface style(--_surface-depth: 1) {
878
+ :where([s-card]) {
879
+ --_card-shadow: var(--s-shadow-sm);
880
+ }
881
+ }
882
+
883
+ @container surface style(--_surface-depth: 2) {
884
+ :where([s-card]) {
885
+ --_card-shadow: none;
886
+ --_card-border: var(--s-border-default);
887
+ }
888
+ }
889
+
890
+ @container surface style(--_surface-depth: -1) {
891
+ :where([s-card]) {
892
+ --_card-shadow: var(--s-shadow-md);
893
+ }
894
+ }
895
+ }
896
+
897
+ @supports selector(:scope) {
898
+ @scope ([s-card]) to ([s-card]) {
899
+ [s-card-header] {
900
+ border-bottom: 1px solid var(--_card-border, var(--s-border-muted));
901
+ }
902
+
903
+ [s-card-footer] {
904
+ border-top: 1px solid var(--_card-border, var(--s-border-muted));
905
+ }
906
+
907
+ [s-card-title] {
908
+ color: inherit;
909
+ }
910
+
911
+ [s-card-subtitle] {
912
+ color: var(--s-text-secondary);
913
+ }
914
+
915
+ [s-card-actions] {
916
+ gap: var(--s-space-2);
917
+ margin-top: var(--s-space-4);
918
+ display: flex;
919
+ }
920
+ }
921
+ }
922
+
855
923
  :where([s-input]) {
856
924
  --_input-bg: var(--s-surface-base);
857
925
  --_input-border: var(--s-border-default);
@@ -867,7 +935,8 @@
867
935
  color: var(--_input-text);
868
936
  font-size: var(--s-text-sm);
869
937
  line-height: var(--s-leading-normal);
870
- transition: border-color var(--s-duration-150) var(--s-ease-out), box-shadow var(--s-duration-150) var(--s-ease-out);
938
+ transition: border-color var(--s-duration-150) var(--s-ease-out),
939
+ box-shadow var(--s-duration-150) var(--s-ease-out);
871
940
  display: block;
872
941
 
873
942
  &::placeholder {
@@ -882,6 +951,10 @@
882
951
  --_input-border: var(--s-interactive-primary);
883
952
  outline: 2px solid var(--s-focus-ring);
884
953
  outline-offset: 2px;
954
+
955
+ @supports (color: oklch(from red l c h)) {
956
+ outline-color: oklch(from var(--s-interactive-primary) l c h / .3);
957
+ }
885
958
  }
886
959
 
887
960
  &:disabled {
@@ -914,6 +987,16 @@
914
987
  min-height: 6rem;
915
988
  }
916
989
 
990
+ textarea[s-input][s-autosize] {
991
+ resize: none;
992
+
993
+ @supports (field-sizing: content) {
994
+ field-sizing: content;
995
+ min-height: 3lh;
996
+ max-height: 20lh;
997
+ }
998
+ }
999
+
917
1000
  select[s-input] {
918
1001
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
919
1002
  background-repeat: no-repeat;
@@ -995,7 +1078,8 @@
995
1078
  cursor: pointer;
996
1079
  width: 1.25rem;
997
1080
  height: 1.25rem;
998
- transition: background-color var(--s-duration-150) var(--s-ease-out), border-color var(--s-duration-150) var(--s-ease-out);
1081
+ transition: background-color var(--s-duration-150) var(--s-ease-out),
1082
+ border-color var(--s-duration-150) var(--s-ease-out);
999
1083
 
1000
1084
  &:checked {
1001
1085
  background-color: var(--s-interactive-primary);
@@ -1084,6 +1168,211 @@
1084
1168
  }
1085
1169
  }
1086
1170
 
1171
+ @supports (container-type: inline-size) {
1172
+ @container surface style(--_surface-depth: 1) {
1173
+ :where([s-input]) {
1174
+ --_input-bg: var(--s-surface-sunken);
1175
+ }
1176
+
1177
+ :where([s-checkbox]) input, :where([s-radio]) input {
1178
+ background-color: var(--s-surface-sunken);
1179
+ }
1180
+ }
1181
+
1182
+ @container surface style(--_surface-depth: 2) {
1183
+ :where([s-input]) {
1184
+ --_input-bg: var(--s-surface-sunken);
1185
+ --_input-border: var(--s-border-strong);
1186
+ }
1187
+
1188
+ :where([s-checkbox]) input, :where([s-radio]) input {
1189
+ background-color: var(--s-surface-sunken);
1190
+ border-color: var(--s-border-strong);
1191
+ }
1192
+ }
1193
+
1194
+ @container surface style(--_surface-depth: -1) {
1195
+ :where([s-input]) {
1196
+ --_input-bg: var(--s-surface-raised);
1197
+ --_input-border: var(--s-border-muted);
1198
+ }
1199
+
1200
+ :where([s-checkbox]) input, :where([s-radio]) input {
1201
+ background-color: var(--s-surface-raised);
1202
+ }
1203
+ }
1204
+ }
1205
+
1206
+ @supports (appearance: base-select) {
1207
+ [s-select], [s-select]::picker(select) {
1208
+ appearance: base-select;
1209
+ }
1210
+
1211
+ :where([s-select]) {
1212
+ --_select-bg: var(--s-surface-base);
1213
+ --_select-border: var(--s-border-default);
1214
+ --_select-text: var(--s-text-primary);
1215
+ --_select-radius: var(--s-radius-md);
1216
+ align-items: center;
1217
+ gap: var(--s-space-2);
1218
+ min-width: 10rem;
1219
+ padding: var(--s-space-2) var(--s-space-3);
1220
+ background-color: var(--_select-bg);
1221
+ border: 2px solid var(--_select-border);
1222
+ border-radius: var(--_select-radius);
1223
+ color: var(--_select-text);
1224
+ font-size: var(--s-text-sm);
1225
+ line-height: var(--s-leading-normal);
1226
+ cursor: pointer;
1227
+ transition: border-color var(--s-duration-150) var(--s-ease-out),
1228
+ box-shadow var(--s-duration-150) var(--s-ease-out);
1229
+ display: inline-flex;
1230
+
1231
+ &:hover:not(:disabled) {
1232
+ --_select-border: var(--s-border-strong);
1233
+ }
1234
+
1235
+ &:open {
1236
+ --_select-border: var(--s-interactive-primary);
1237
+ }
1238
+
1239
+ &:focus-visible {
1240
+ --_select-border: var(--s-interactive-primary);
1241
+ outline: 2px solid var(--s-focus-ring);
1242
+ outline-offset: 2px;
1243
+
1244
+ @supports (color: oklch(from red l c h)) {
1245
+ outline-color: oklch(from var(--s-interactive-primary) l c h / .3);
1246
+ }
1247
+ }
1248
+
1249
+ &:disabled {
1250
+ opacity: .5;
1251
+ cursor: not-allowed;
1252
+ background-color: var(--s-surface-sunken);
1253
+ }
1254
+ }
1255
+
1256
+ [s-select]::picker-icon {
1257
+ color: var(--s-text-tertiary);
1258
+ transition: rotate var(--s-duration-200) var(--s-ease-out);
1259
+ }
1260
+
1261
+ [s-select]:open::picker-icon {
1262
+ rotate: 180deg;
1263
+ }
1264
+
1265
+ [s-select]::picker(select) {
1266
+ background: var(--s-surface-base);
1267
+ border: 2px solid var(--s-border-default);
1268
+ border-radius: var(--s-radius-md);
1269
+ box-shadow: var(--s-shadow-lg);
1270
+ padding: var(--s-space-1);
1271
+ inset: auto;
1272
+ top: anchor(bottom);
1273
+ left: anchor(left);
1274
+ min-width: anchor-size(width);
1275
+ }
1276
+
1277
+ [s-select] option {
1278
+ align-items: center;
1279
+ gap: var(--s-space-2);
1280
+ padding: var(--s-space-2) var(--s-space-3);
1281
+ border-radius: var(--s-radius-sm);
1282
+ color: var(--s-text-primary);
1283
+ cursor: pointer;
1284
+ transition: background-color var(--s-duration-150) var(--s-ease-out);
1285
+ display: flex;
1286
+
1287
+ &:hover {
1288
+ background-color: var(--s-surface-hover);
1289
+ }
1290
+
1291
+ &:checked {
1292
+ background-color: var(--s-interactive-primary);
1293
+ color: var(--s-text-on-primary);
1294
+ }
1295
+ }
1296
+
1297
+ [s-select] option::checkmark {
1298
+ opacity: 0;
1299
+ order: 1;
1300
+ margin-left: auto;
1301
+ }
1302
+
1303
+ [s-select] option:checked::checkmark {
1304
+ opacity: 1;
1305
+ }
1306
+
1307
+ [s-select][s-size="sm"] {
1308
+ padding: var(--s-space-1) var(--s-space-2);
1309
+ font-size: var(--s-text-xs);
1310
+ min-width: 8rem;
1311
+ }
1312
+
1313
+ [s-select][s-size="lg"] {
1314
+ padding: var(--s-space-3) var(--s-space-4);
1315
+ font-size: var(--s-text-base);
1316
+ min-width: 12rem;
1317
+ }
1318
+
1319
+ @container surface style(--_surface-depth: 1) {
1320
+ :where([s-select]) {
1321
+ --_select-bg: var(--s-surface-sunken);
1322
+ }
1323
+ }
1324
+
1325
+ @container surface style(--_surface-depth: 2) {
1326
+ :where([s-select]) {
1327
+ --_select-bg: var(--s-surface-sunken);
1328
+ --_select-border: var(--s-border-strong);
1329
+ }
1330
+ }
1331
+
1332
+ @container surface style(--_surface-depth: -1) {
1333
+ :where([s-select]) {
1334
+ --_select-bg: var(--s-surface-raised);
1335
+ --_select-border: var(--s-border-muted);
1336
+ }
1337
+ }
1338
+ }
1339
+
1340
+ @supports not (appearance: base-select) {
1341
+ [s-select] {
1342
+ appearance: none;
1343
+ width: 100%;
1344
+ padding: var(--s-space-2) var(--s-space-3);
1345
+ padding-right: var(--s-space-10);
1346
+ background-color: var(--s-surface-base);
1347
+ border: 2px solid var(--s-border-default);
1348
+ border-radius: var(--s-radius-md);
1349
+ color: var(--s-text-primary);
1350
+ font-size: var(--s-text-sm);
1351
+ line-height: var(--s-leading-normal);
1352
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
1353
+ background-repeat: no-repeat;
1354
+ background-position: right var(--s-space-3) center;
1355
+ transition: border-color var(--s-duration-150) var(--s-ease-out),
1356
+ box-shadow var(--s-duration-150) var(--s-ease-out);
1357
+ display: block;
1358
+
1359
+ &:hover:not(:disabled) {
1360
+ border-color: var(--s-border-strong);
1361
+ }
1362
+
1363
+ &:focus-visible {
1364
+ border-color: var(--s-interactive-primary);
1365
+ outline: 2px solid var(--s-focus-ring);
1366
+ outline-offset: 2px;
1367
+ }
1368
+
1369
+ &:disabled {
1370
+ opacity: .5;
1371
+ cursor: not-allowed;
1372
+ }
1373
+ }
1374
+ }
1375
+
1087
1376
  dialog[s-modal]:not([open]) {
1088
1377
  display: none;
1089
1378
  }
@@ -1114,39 +1403,76 @@
1114
1403
  }
1115
1404
 
1116
1405
  dialog[s-modal][open] {
1117
- animation: s-modal-scale-in var(--s-duration-200) var(--s-ease-out);
1118
- }
1119
-
1120
- dialog[s-modal]:focus-visible {
1121
- outline: 2px solid var(--s-focus-ring);
1122
- outline-offset: 2px;
1406
+ opacity: 1;
1407
+ transition: opacity var(--s-duration-200) var(--s-ease-out),
1408
+ transform var(--s-duration-200) var(--s-ease-out),
1409
+ overlay var(--s-duration-200) var(--s-ease-out) allow-discrete,
1410
+ display var(--s-duration-200) var(--s-ease-out) allow-discrete;
1411
+ transform: scale(1)translateY(0);
1123
1412
  }
1124
1413
 
1125
- @keyframes s-modal-scale-in {
1126
- from {
1414
+ @starting-style {
1415
+ dialog[s-modal][open] {
1127
1416
  opacity: 0;
1128
1417
  transform: scale(.95)translateY(-10px);
1129
1418
  }
1419
+ }
1130
1420
 
1131
- to {
1132
- opacity: 1;
1133
- transform: scale(1)translateY(0);
1421
+ @supports not (transition-behavior: allow-discrete) {
1422
+ dialog[s-modal][open] {
1423
+ animation: s-modal-scale-in var(--s-duration-200) var(--s-ease-out);
1424
+ }
1425
+
1426
+ @keyframes s-modal-scale-in {
1427
+ from {
1428
+ opacity: 0;
1429
+ transform: scale(.95)translateY(-10px);
1430
+ }
1431
+
1432
+ to {
1433
+ opacity: 1;
1434
+ transform: scale(1)translateY(0);
1435
+ }
1134
1436
  }
1135
1437
  }
1136
1438
 
1439
+ dialog[s-modal]:focus-visible {
1440
+ outline: 2px solid var(--s-focus-ring);
1441
+ outline-offset: 2px;
1442
+ }
1443
+
1137
1444
  dialog[s-modal]::backdrop {
1138
1445
  backdrop-filter: blur(4px);
1139
- animation: s-modal-backdrop-in var(--s-duration-200) var(--s-ease-out);
1446
+ opacity: 1;
1447
+ transition: opacity var(--s-duration-200) var(--s-ease-out),
1448
+ overlay var(--s-duration-200) var(--s-ease-out) allow-discrete,
1449
+ display var(--s-duration-200) var(--s-ease-out) allow-discrete;
1140
1450
  background: oklch(0% 0 0 / .5);
1451
+
1452
+ @supports (color: oklch(from red l c h)) {
1453
+ background: oklch(from var(--s-primary-500) .1 .02 h / .5);
1454
+ }
1141
1455
  }
1142
1456
 
1143
- @keyframes s-modal-backdrop-in {
1144
- from {
1457
+ @starting-style {
1458
+ dialog[s-modal]::backdrop {
1145
1459
  opacity: 0;
1146
1460
  }
1461
+ }
1147
1462
 
1148
- to {
1149
- opacity: 1;
1463
+ @supports not (transition-behavior: allow-discrete) {
1464
+ dialog[s-modal]::backdrop {
1465
+ animation: s-modal-backdrop-in var(--s-duration-200) var(--s-ease-out);
1466
+ }
1467
+
1468
+ @keyframes s-modal-backdrop-in {
1469
+ from {
1470
+ opacity: 0;
1471
+ }
1472
+
1473
+ to {
1474
+ opacity: 1;
1475
+ }
1150
1476
  }
1151
1477
  }
1152
1478
 
@@ -1177,13 +1503,29 @@
1177
1503
  }
1178
1504
 
1179
1505
  dialog[s-modal][s-position="left"] {
1180
- margin-left: var(--s-space-8);
1506
+ border-radius: 0 var(--_modal-radius) var(--_modal-radius) 0;
1507
+ margin-left: 0;
1181
1508
  margin-right: auto;
1182
1509
  }
1183
1510
 
1511
+ @media (width >= 640px) {
1512
+ dialog[s-modal][s-position="left"] {
1513
+ margin-left: var(--s-space-8);
1514
+ border-radius: var(--_modal-radius);
1515
+ }
1516
+ }
1517
+
1184
1518
  dialog[s-modal][s-position="right"] {
1519
+ border-radius: var(--_modal-radius) 0 0 var(--_modal-radius);
1185
1520
  margin-left: auto;
1186
- margin-right: var(--s-space-8);
1521
+ margin-right: 0;
1522
+ }
1523
+
1524
+ @media (width >= 640px) {
1525
+ dialog[s-modal][s-position="right"] {
1526
+ margin-right: var(--s-space-8);
1527
+ border-radius: var(--_modal-radius);
1528
+ }
1187
1529
  }
1188
1530
 
1189
1531
  :where([s-modal-header]) {
@@ -1226,7 +1568,8 @@
1226
1568
  min-height: 2.75rem;
1227
1569
  font-size: var(--s-text-xl);
1228
1570
  color: var(--s-text-secondary);
1229
- transition: background-color var(--s-duration-150) var(--s-ease-out), color var(--s-duration-150) var(--s-ease-out);
1571
+ transition: background-color var(--s-duration-150) var(--s-ease-out),
1572
+ color var(--s-duration-150) var(--s-ease-out);
1230
1573
  background: none;
1231
1574
  border: none;
1232
1575
  justify-content: center;
@@ -1250,6 +1593,17 @@
1250
1593
  }
1251
1594
  }
1252
1595
 
1596
+ @media (prefers-reduced-motion: reduce) {
1597
+ dialog[s-modal][open] {
1598
+ transition: none;
1599
+ transform: none;
1600
+ }
1601
+
1602
+ dialog[s-modal]::backdrop {
1603
+ transition: none;
1604
+ }
1605
+ }
1606
+
1253
1607
  @media (forced-colors: active) {
1254
1608
  dialog[s-modal] {
1255
1609
  border: 2px solid canvastext;
@@ -1507,118 +1861,644 @@
1507
1861
  --_prose-body: var(--s-text-lg);
1508
1862
  }
1509
1863
 
1510
- @media (prefers-color-scheme: dark) {
1511
- :where([s-prose]) {
1512
- --_prose-link-color: var(--s-primary-400);
1513
- --_prose-link-hover: var(--s-primary-300);
1514
- --_prose-code-bg: var(--s-neutral-800);
1515
- --_prose-code-color: var(--s-danger-400);
1516
- --_prose-pre-bg: var(--s-neutral-950);
1517
- --_prose-pre-color: var(--s-neutral-200);
1864
+ @media (prefers-color-scheme: dark) {
1865
+ :where([s-prose]) {
1866
+ --_prose-link-color: var(--s-primary-400);
1867
+ --_prose-link-hover: var(--s-primary-300);
1868
+ --_prose-code-bg: var(--s-neutral-800);
1869
+ --_prose-code-color: var(--s-danger-400);
1870
+ --_prose-pre-bg: var(--s-neutral-950);
1871
+ --_prose-pre-color: var(--s-neutral-200);
1872
+ }
1873
+
1874
+ :where([s-prose]) :where(kbd) {
1875
+ background-color: var(--s-neutral-700);
1876
+ border-color: var(--s-neutral-600);
1877
+ box-shadow: 0 1px 0 var(--s-neutral-500);
1878
+ }
1879
+ }
1880
+
1881
+ :root[style*="color-scheme: dark"] :where([s-prose]), :root[style*="color-scheme:dark"] :where([s-prose]) {
1882
+ --_prose-link-color: var(--s-primary-400);
1883
+ --_prose-link-hover: var(--s-primary-300);
1884
+ --_prose-code-bg: var(--s-neutral-800);
1885
+ --_prose-code-color: var(--s-danger-400);
1886
+ --_prose-pre-bg: var(--s-neutral-950);
1887
+ --_prose-pre-color: var(--s-neutral-200);
1888
+ }
1889
+
1890
+ :where([s-skip-link]) {
1891
+ --_skip-bg: var(--s-primary-600);
1892
+ --_skip-color: white;
1893
+ --_skip-radius: var(--s-radius-md);
1894
+ --_skip-shadow: var(--s-shadow-lg);
1895
+ --_skip-z: 9999;
1896
+ z-index: var(--_skip-z);
1897
+ align-items: center;
1898
+ gap: var(--s-space-2);
1899
+ padding: var(--s-space-3) var(--s-space-6);
1900
+ background-color: var(--_skip-bg);
1901
+ color: var(--_skip-color);
1902
+ font-size: var(--s-text-sm);
1903
+ font-weight: var(--s-font-semibold);
1904
+ border-radius: var(--_skip-radius);
1905
+ box-shadow: var(--_skip-shadow);
1906
+ white-space: nowrap;
1907
+ transition: top var(--s-duration-200) var(--s-ease-out),
1908
+ opacity var(--s-duration-200) var(--s-ease-out);
1909
+ opacity: 0;
1910
+ text-decoration: none;
1911
+ display: inline-flex;
1912
+ position: fixed;
1913
+ top: -100%;
1914
+ left: 50%;
1915
+ transform: translateX(-50%);
1916
+ }
1917
+
1918
+ [s-skip-link]:focus, [s-skip-link]:focus-visible {
1919
+ top: var(--s-space-4);
1920
+ opacity: 1;
1921
+ box-shadow: var(--_skip-shadow),
1922
+ 0 0 0 3px white,
1923
+ 0 0 0 5px var(--_skip-bg);
1924
+ outline: none;
1925
+ }
1926
+
1927
+ [s-skip-link-group] {
1928
+ z-index: 9999;
1929
+ align-items: center;
1930
+ gap: var(--s-space-2);
1931
+ padding: var(--s-space-2);
1932
+ flex-direction: column;
1933
+ display: flex;
1934
+ position: fixed;
1935
+ top: 0;
1936
+ left: 50%;
1937
+ transform: translateX(-50%);
1938
+ }
1939
+
1940
+ [s-skip-link-group] [s-skip-link] {
1941
+ position: relative;
1942
+ top: -200%;
1943
+ left: 0;
1944
+ transform: none;
1945
+ }
1946
+
1947
+ [s-skip-link-group] [s-skip-link]:focus, [s-skip-link-group] [s-skip-link]:focus-visible {
1948
+ top: 0;
1949
+ }
1950
+
1951
+ [s-skip-link="secondary"] {
1952
+ --_skip-bg: var(--s-neutral-800);
1953
+ }
1954
+
1955
+ [s-skip-link="contrast"] {
1956
+ --_skip-bg: var(--s-neutral-950);
1957
+ --_skip-color: var(--s-neutral-50);
1958
+ }
1959
+
1960
+ @media (prefers-reduced-motion: reduce) {
1961
+ [s-skip-link] {
1962
+ transition: none;
1963
+ }
1964
+ }
1965
+
1966
+ @media (prefers-color-scheme: dark) {
1967
+ :where([s-skip-link]:not([s-skip-link="secondary"]):not([s-skip-link="contrast"])) {
1968
+ --_skip-bg: var(--s-primary-500);
1969
+ }
1970
+
1971
+ [s-skip-link]:focus, [s-skip-link]:focus-visible {
1972
+ box-shadow: var(--_skip-shadow),
1973
+ 0 0 0 3px var(--s-neutral-900),
1974
+ 0 0 0 5px var(--_skip-bg);
1975
+ }
1976
+ }
1977
+
1978
+ :root[style*="color-scheme: dark"] :where([s-skip-link]:not([s-skip-link="secondary"]):not([s-skip-link="contrast"])), :root[style*="color-scheme:dark"] :where([s-skip-link]:not([s-skip-link="secondary"]):not([s-skip-link="contrast"])) {
1979
+ --_skip-bg: var(--s-primary-500);
1980
+ }
1981
+
1982
+ :where([s-badge]) {
1983
+ --_badge-bg: var(--s-neutral-200);
1984
+ --_badge-text: var(--s-text-primary);
1985
+ justify-content: center;
1986
+ align-items: center;
1987
+ gap: var(--s-space-1);
1988
+ padding: var(--s-space-1) var(--s-space-2);
1989
+ border-radius: var(--s-radius-sm);
1990
+ font-weight: var(--s-font-medium);
1991
+ font-size: var(--s-text-xs);
1992
+ white-space: nowrap;
1993
+ vertical-align: middle;
1994
+ background-color: var(--_badge-bg);
1995
+ color: var(--_badge-text);
1996
+ line-height: 1.25;
1997
+ display: inline-flex;
1998
+
1999
+ @supports (color: oklch(from red l c h)) {
2000
+ color: oklch(from var(--_badge-bg) clamp(.15, calc((.55 - l) * 1000 + .15), .95) 0 0);
2001
+ }
2002
+
2003
+ @supports (color: contrast-color(red)) {
2004
+ color: contrast-color(var(--_badge-bg));
2005
+ }
2006
+ }
2007
+
2008
+ [s-badge="primary"] {
2009
+ --_badge-bg: var(--s-primary-700);
2010
+ background-color: var(--s-primary-700);
2011
+ color: #fff;
2012
+ }
2013
+
2014
+ [s-badge="secondary"] {
2015
+ --_badge-bg: var(--s-neutral-700);
2016
+ background-color: var(--s-neutral-700);
2017
+ color: #fff;
2018
+ }
2019
+
2020
+ [s-badge="success"] {
2021
+ --_badge-bg: var(--s-success-700);
2022
+ background-color: var(--s-success-700);
2023
+ color: #fff;
2024
+ }
2025
+
2026
+ [s-badge="warning"] {
2027
+ --_badge-bg: var(--s-warning-400);
2028
+ background-color: var(--s-warning-400);
2029
+ color: var(--s-warning-950);
2030
+ }
2031
+
2032
+ [s-badge="danger"] {
2033
+ --_badge-bg: var(--s-danger-700);
2034
+ background-color: var(--s-danger-700);
2035
+ color: #fff;
2036
+ }
2037
+
2038
+ [s-badge="accent"] {
2039
+ --_badge-bg: var(--s-accent-700);
2040
+ background-color: var(--s-accent-700);
2041
+ color: #fff;
2042
+ }
2043
+
2044
+ [s-badge="outline"] {
2045
+ --_badge-bg: transparent;
2046
+ color: var(--s-text-primary);
2047
+ box-shadow: inset 0 0 0 1px var(--s-border-default);
2048
+ background-color: #0000;
2049
+ }
2050
+
2051
+ [s-badge="outline-primary"] {
2052
+ --_badge-bg: transparent;
2053
+ background-color: oklch(from var(--s-primary-500) l c h / .1);
2054
+ color: light-dark(var(--s-primary-700), var(--s-primary-300));
2055
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-primary-500), var(--s-primary-400));
2056
+ }
2057
+
2058
+ [s-badge="outline-success"] {
2059
+ --_badge-bg: transparent;
2060
+ background-color: oklch(from var(--s-success-500) l c h / .1);
2061
+ color: light-dark(var(--s-success-700), var(--s-success-300));
2062
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-success-500), var(--s-success-400));
2063
+ }
2064
+
2065
+ [s-badge="outline-warning"] {
2066
+ --_badge-bg: transparent;
2067
+ background-color: oklch(from var(--s-warning-500) l c h / .1);
2068
+ color: light-dark(var(--s-warning-800), var(--s-warning-300));
2069
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-warning-500), var(--s-warning-400));
2070
+ }
2071
+
2072
+ [s-badge="outline-danger"] {
2073
+ --_badge-bg: transparent;
2074
+ background-color: oklch(from var(--s-danger-500) l c h / .1);
2075
+ color: light-dark(var(--s-danger-800), var(--s-danger-300));
2076
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-danger-500), var(--s-danger-400));
2077
+ }
2078
+
2079
+ [s-badge][s-size="sm"] {
2080
+ padding: .125rem .375rem;
2081
+ font-size: .625rem;
2082
+ }
2083
+
2084
+ [s-badge][s-size="lg"] {
2085
+ padding: var(--s-space-2) var(--s-space-4);
2086
+ font-size: var(--s-text-sm);
2087
+ }
2088
+
2089
+ [s-badge][s-pill] {
2090
+ border-radius: var(--s-radius-full);
2091
+ }
2092
+
2093
+ [s-badge][s-dot] {
2094
+ border-radius: var(--s-radius-full);
2095
+ width: .5rem;
2096
+ height: .5rem;
2097
+ padding: 0;
2098
+ }
2099
+
2100
+ [s-badge][s-dot][s-size="sm"] {
2101
+ width: .375rem;
2102
+ height: .375rem;
2103
+ }
2104
+
2105
+ [s-badge][s-dot][s-size="lg"] {
2106
+ width: .75rem;
2107
+ height: .75rem;
2108
+ }
2109
+
2110
+ @media (forced-colors: active) {
2111
+ [s-badge] {
2112
+ border: 1px solid canvastext;
2113
+ }
2114
+ }
2115
+
2116
+ @supports (container-type: inline-size) {
2117
+ @container surface style(--_surface-depth: 1) {
2118
+ :where([s-badge=""]) {
2119
+ --_badge-bg: var(--s-neutral-300);
2120
+ }
2121
+
2122
+ :where([s-badge="outline"]) {
2123
+ box-shadow: inset 0 0 0 1px var(--s-border-strong);
2124
+ }
2125
+ }
2126
+
2127
+ @container surface style(--_surface-depth: 2) {
2128
+ :where([s-badge=""]) {
2129
+ --_badge-bg: var(--s-neutral-300);
2130
+ box-shadow: var(--s-shadow-sm);
2131
+ }
2132
+
2133
+ :where([s-badge="outline"]) {
2134
+ box-shadow: inset 0 0 0 1px var(--s-border-strong);
2135
+ }
2136
+ }
2137
+
2138
+ @container surface style(--_surface-depth: -1) {
2139
+ :where([s-badge=""]) {
2140
+ --_badge-bg: var(--s-neutral-100);
2141
+ }
2142
+ }
2143
+ }
2144
+
2145
+ :where([s-tooltip]) {
2146
+ --_tooltip-bg: var(--s-surface-overlay);
2147
+ --_tooltip-text: var(--s-text-inverse);
2148
+ --_tooltip-radius: var(--s-radius-md);
2149
+ --_tooltip-padding-x: var(--s-space-3);
2150
+ --_tooltip-padding-y: var(--s-space-1_5);
2151
+ --_tooltip-offset: var(--s-space-2);
2152
+ --_tooltip-max-width: 200px;
2153
+ --_tooltip-arrow-size: 6px;
2154
+ position: relative;
2155
+ }
2156
+
2157
+ :where([s-tooltip]):after {
2158
+ content: attr(s-tooltip);
2159
+ visibility: hidden;
2160
+ opacity: 0;
2161
+ z-index: 9999;
2162
+ margin-bottom: var(--_tooltip-offset);
2163
+ background-color: var(--_tooltip-bg);
2164
+ color: var(--_tooltip-text);
2165
+ padding: var(--_tooltip-padding-y) var(--_tooltip-padding-x);
2166
+ border-radius: var(--_tooltip-radius);
2167
+ box-shadow: var(--s-shadow-md);
2168
+ position: absolute;
2169
+ bottom: 100%;
2170
+ left: 50%;
2171
+ transform: translateX(-50%)translateY(4px);
2172
+
2173
+ @supports (color: oklch(from red l c h)) {
2174
+ border: 1px solid
2175
+ oklch(from var(--_tooltip-bg) max(calc(l - .1), .05) c h);
2176
+ }
2177
+
2178
+ font-size: var(--s-text-xs);
2179
+ font-weight: var(--s-font-medium);
2180
+ line-height: var(--s-leading-tight);
2181
+ text-align: center;
2182
+ text-wrap: balance;
2183
+ min-width: min(100%,
2184
+ var(--_tooltip-max-width));
2185
+ max-width: var(--_tooltip-max-width);
2186
+ pointer-events: none;
2187
+ transition: opacity var(--s-duration-150) var(--s-ease-out),
2188
+ visibility var(--s-duration-150) var(--s-ease-out),
2189
+ transform var(--s-duration-150) var(--s-ease-out);
2190
+ }
2191
+
2192
+ :where([s-tooltip]):before {
2193
+ content: "";
2194
+ visibility: hidden;
2195
+ opacity: 0;
2196
+ z-index: 9999;
2197
+ margin-bottom: calc(var(--_tooltip-offset) - var(--_tooltip-arrow-size));
2198
+ border-left: var(--_tooltip-arrow-size) solid transparent;
2199
+ border-right: var(--_tooltip-arrow-size) solid transparent;
2200
+ border-top: var(--_tooltip-arrow-size) solid var(--_tooltip-bg);
2201
+ pointer-events: none;
2202
+ transition: opacity var(--s-duration-150) var(--s-ease-out),
2203
+ visibility var(--s-duration-150) var(--s-ease-out),
2204
+ transform var(--s-duration-150) var(--s-ease-out);
2205
+ position: absolute;
2206
+ bottom: 100%;
2207
+ left: 50%;
2208
+ transform: translateX(-50%)translateY(4px);
2209
+ }
2210
+
2211
+ [s-tooltip]:hover:after, [s-tooltip]:hover:before, [s-tooltip]:focus-visible:after, [s-tooltip]:focus-visible:before {
2212
+ visibility: visible;
2213
+ opacity: 1;
2214
+ transform: translateX(-50%)translateY(0);
2215
+ }
2216
+
2217
+ [s-tooltip-pos="bottom"]:after {
2218
+ margin-bottom: 0;
2219
+ margin-top: var(--_tooltip-offset);
2220
+ top: 100%;
2221
+ bottom: auto;
2222
+ transform: translateX(-50%)translateY(-4px);
2223
+ }
2224
+
2225
+ [s-tooltip-pos="bottom"]:before {
2226
+ margin-bottom: 0;
2227
+ margin-top: calc(var(--_tooltip-offset) - var(--_tooltip-arrow-size));
2228
+ border-top: none;
2229
+ border-bottom: var(--_tooltip-arrow-size) solid var(--_tooltip-bg);
2230
+ top: 100%;
2231
+ bottom: auto;
2232
+ transform: translateX(-50%)translateY(-4px);
2233
+ }
2234
+
2235
+ [s-tooltip-pos="bottom"]:hover:after, [s-tooltip-pos="bottom"]:hover:before, [s-tooltip-pos="bottom"]:focus-visible:after, [s-tooltip-pos="bottom"]:focus-visible:before {
2236
+ transform: translateX(-50%)translateY(0);
2237
+ }
2238
+
2239
+ [s-tooltip-pos="left"]:after {
2240
+ margin-bottom: 0;
2241
+ margin-right: var(--_tooltip-offset);
2242
+ inset: 50% 100% auto auto;
2243
+ transform: translateY(-50%)translateX(4px);
2244
+ }
2245
+
2246
+ [s-tooltip-pos="left"]:before {
2247
+ margin-bottom: 0;
2248
+ margin-right: calc(var(--_tooltip-offset) - var(--_tooltip-arrow-size));
2249
+ border-top: var(--_tooltip-arrow-size) solid transparent;
2250
+ border-bottom: var(--_tooltip-arrow-size) solid transparent;
2251
+ border-left: var(--_tooltip-arrow-size) solid var(--_tooltip-bg);
2252
+ border-right: none;
2253
+ inset: 50% 100% auto auto;
2254
+ transform: translateY(-50%)translateX(4px);
2255
+ }
2256
+
2257
+ [s-tooltip-pos="left"]:hover:after, [s-tooltip-pos="left"]:hover:before, [s-tooltip-pos="left"]:focus-visible:after, [s-tooltip-pos="left"]:focus-visible:before {
2258
+ transform: translateY(-50%)translateX(0);
2259
+ }
2260
+
2261
+ [s-tooltip-pos="right"]:after {
2262
+ margin-bottom: 0;
2263
+ margin-left: var(--_tooltip-offset);
2264
+ top: 50%;
2265
+ bottom: auto;
2266
+ left: 100%;
2267
+ transform: translateY(-50%)translateX(-4px);
2268
+ }
2269
+
2270
+ [s-tooltip-pos="right"]:before {
2271
+ margin-bottom: 0;
2272
+ margin-left: calc(var(--_tooltip-offset) - var(--_tooltip-arrow-size));
2273
+ border-top: var(--_tooltip-arrow-size) solid transparent;
2274
+ border-bottom: var(--_tooltip-arrow-size) solid transparent;
2275
+ border-right: var(--_tooltip-arrow-size) solid var(--_tooltip-bg);
2276
+ border-left: none;
2277
+ top: 50%;
2278
+ bottom: auto;
2279
+ left: 100%;
2280
+ transform: translateY(-50%)translateX(-4px);
2281
+ }
2282
+
2283
+ [s-tooltip-pos="right"]:hover:after, [s-tooltip-pos="right"]:hover:before, [s-tooltip-pos="right"]:focus-visible:after, [s-tooltip-pos="right"]:focus-visible:before {
2284
+ transform: translateY(-50%)translateX(0);
2285
+ }
2286
+
2287
+ @media (prefers-reduced-motion: reduce) {
2288
+ [s-tooltip]:after, [s-tooltip]:before {
2289
+ transition: none;
2290
+ }
2291
+ }
2292
+
2293
+ @media (forced-colors: active) {
2294
+ [s-tooltip]:after {
2295
+ color: canvastext;
2296
+ background-color: canvas;
2297
+ border: 1px solid canvastext;
2298
+ }
2299
+
2300
+ [s-tooltip]:before {
2301
+ display: none;
2302
+ }
2303
+ }
2304
+
2305
+ :where([s-menu]) {
2306
+ --_menu-bg: var(--s-surface-raised);
2307
+ --_menu-border: var(--s-border-muted);
2308
+ --_menu-radius: var(--s-radius-lg);
2309
+ --_menu-shadow: var(--s-shadow-lg);
2310
+ --_menu-min-width: 10rem;
2311
+ --_menu-padding: var(--s-space-1);
2312
+ --_menu-offset: var(--s-space-1);
2313
+ }
2314
+
2315
+ [s-menu] {
2316
+ anchor-scope: --menu-trigger;
2317
+ display: inline-block;
2318
+ position: relative;
2319
+ }
2320
+
2321
+ [s-menu]::marker {
2322
+ display: none;
2323
+ }
2324
+
2325
+ [s-menu] ::-webkit-details-marker {
2326
+ display: none;
2327
+ }
2328
+
2329
+ [s-menu-trigger] {
2330
+ cursor: pointer;
2331
+ anchor-name: --menu-trigger;
2332
+ list-style: none;
2333
+ }
2334
+
2335
+ [s-menu-trigger]::-webkit-details-marker {
2336
+ display: none;
2337
+ }
2338
+
2339
+ [s-menu-items] {
2340
+ z-index: 9999;
2341
+ margin-top: var(--_menu-offset);
2342
+ background-color: var(--_menu-bg);
2343
+ border: 1px solid var(--_menu-border);
2344
+ border-radius: var(--_menu-radius);
2345
+ box-shadow: var(--_menu-shadow);
2346
+ min-width: var(--_menu-min-width);
2347
+ padding: var(--_menu-padding);
2348
+ font-size: var(--s-text-sm);
2349
+ color: var(--s-text-primary);
2350
+ opacity: 0;
2351
+ visibility: hidden;
2352
+ transition: opacity var(--s-duration-150) var(--s-ease-out),
2353
+ transform var(--s-duration-150) var(--s-ease-out),
2354
+ visibility var(--s-duration-150);
2355
+ flex-direction: column;
2356
+ display: flex;
2357
+ position: absolute;
2358
+ top: 100%;
2359
+ left: 0;
2360
+ transform: scale(.95)translateY(-4px);
2361
+ }
2362
+
2363
+ [s-menu][open] > [s-menu-items] {
2364
+ opacity: 1;
2365
+ visibility: visible;
2366
+ transform: scale(1)translateY(0);
2367
+ }
2368
+
2369
+ [s-menu="end"] > [s-menu-items] {
2370
+ left: auto;
2371
+ right: 0;
2372
+ }
2373
+
2374
+ [s-menu="top"] > [s-menu-items] {
2375
+ margin-top: 0;
2376
+ margin-bottom: var(--_menu-offset);
2377
+ top: auto;
2378
+ bottom: 100%;
2379
+ transform: scale(.95)translateY(4px);
2380
+ }
2381
+
2382
+ [s-menu="top"][open] > [s-menu-items] {
2383
+ transform: scale(1)translateY(0);
2384
+ }
2385
+
2386
+ [s-menu="top-end"] > [s-menu-items] {
2387
+ margin-top: 0;
2388
+ margin-bottom: var(--_menu-offset);
2389
+ inset: auto 0 100% auto;
2390
+ transform: scale(.95)translateY(4px);
2391
+ }
2392
+
2393
+ [s-menu="top-end"][open] > [s-menu-items] {
2394
+ transform: scale(1)translateY(0);
2395
+ }
2396
+
2397
+ @supports (anchor-scope: all) {
2398
+ [s-menu-items] {
2399
+ position-anchor: --menu-trigger;
2400
+ inset: auto;
2401
+ margin: 0;
2402
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
2403
+ margin-block-start: var(--_menu-offset);
2404
+ position: absolute;
2405
+ inset-block-start: anchor(end);
2406
+ inset-inline-start: anchor(start);
2407
+ }
2408
+
2409
+ [s-menu="end"] > [s-menu-items] {
2410
+ inset-inline-start: auto;
2411
+ inset-inline-end: anchor(end);
1518
2412
  }
1519
2413
 
1520
- :where([s-prose]) :where(kbd) {
1521
- background-color: var(--s-neutral-700);
1522
- border-color: var(--s-neutral-600);
1523
- box-shadow: 0 1px 0 var(--s-neutral-500);
2414
+ [s-menu="top"] > [s-menu-items] {
2415
+ margin-block-start: 0;
2416
+ margin-block-end: var(--_menu-offset);
2417
+ inset-block-start: auto;
2418
+ inset-block-end: anchor(start);
1524
2419
  }
1525
- }
1526
2420
 
1527
- :root[style*="color-scheme: dark"] :where([s-prose]), :root[style*="color-scheme:dark"] :where([s-prose]) {
1528
- --_prose-link-color: var(--s-primary-400);
1529
- --_prose-link-hover: var(--s-primary-300);
1530
- --_prose-code-bg: var(--s-neutral-800);
1531
- --_prose-code-color: var(--s-danger-400);
1532
- --_prose-pre-bg: var(--s-neutral-950);
1533
- --_prose-pre-color: var(--s-neutral-200);
2421
+ [s-menu="top-end"] > [s-menu-items] {
2422
+ margin-block-start: 0;
2423
+ margin-block-end: var(--_menu-offset);
2424
+ inset-block-start: auto;
2425
+ inset-block-end: anchor(start);
2426
+ inset-inline-start: auto;
2427
+ inset-inline-end: anchor(end);
2428
+ }
1534
2429
  }
1535
2430
 
1536
- :where([s-skip-link]) {
1537
- --_skip-bg: var(--s-primary-600);
1538
- --_skip-color: white;
1539
- --_skip-radius: var(--s-radius-md);
1540
- --_skip-shadow: var(--s-shadow-lg);
1541
- --_skip-z: 9999;
1542
- z-index: var(--_skip-z);
2431
+ [s-menu-item] {
1543
2432
  align-items: center;
1544
2433
  gap: var(--s-space-2);
1545
- padding: var(--s-space-3) var(--s-space-6);
1546
- background-color: var(--_skip-bg);
1547
- color: var(--_skip-color);
1548
- font-size: var(--s-text-sm);
1549
- font-weight: var(--s-font-semibold);
1550
- border-radius: var(--_skip-radius);
1551
- box-shadow: var(--_skip-shadow);
1552
- white-space: nowrap;
1553
- transition: top var(--s-duration-200) var(--s-ease-out), opacity var(--s-duration-200) var(--s-ease-out);
1554
- opacity: 0;
1555
- text-decoration: none;
1556
- display: inline-flex;
1557
- position: fixed;
1558
- top: -100%;
1559
- left: 50%;
1560
- transform: translateX(-50%);
2434
+ width: 100%;
2435
+ padding: var(--s-space-2) var(--s-space-3);
2436
+ border-radius: var(--s-radius-md);
2437
+ color: var(--s-text-primary);
2438
+ font-size: inherit;
2439
+ text-align: start;
2440
+ cursor: pointer;
2441
+ transition: background-color var(--s-duration-100) var(--s-ease-out);
2442
+ background: none;
2443
+ border: none;
2444
+ display: flex;
1561
2445
  }
1562
2446
 
1563
- [s-skip-link]:focus, [s-skip-link]:focus-visible {
1564
- top: var(--s-space-4);
1565
- opacity: 1;
1566
- box-shadow: var(--_skip-shadow), 0 0 0 3px white, 0 0 0 5px var(--_skip-bg);
1567
- outline: none;
2447
+ [s-menu-item]:hover {
2448
+ background-color: var(--s-surface-sunken);
1568
2449
  }
1569
2450
 
1570
- [s-skip-link-group] {
1571
- z-index: 9999;
1572
- align-items: center;
1573
- gap: var(--s-space-2);
1574
- padding: var(--s-space-2);
1575
- flex-direction: column;
1576
- display: flex;
1577
- position: fixed;
1578
- top: 0;
1579
- left: 50%;
1580
- transform: translateX(-50%);
2451
+ [s-menu-item]:focus-visible {
2452
+ outline: 2px solid var(--s-focus-ring);
2453
+ outline-offset: -2px;
1581
2454
  }
1582
2455
 
1583
- [s-skip-link-group] [s-skip-link] {
1584
- position: relative;
1585
- top: -200%;
1586
- left: 0;
1587
- transform: none;
2456
+ [s-menu-item]:disabled {
2457
+ opacity: .5;
2458
+ cursor: not-allowed;
1588
2459
  }
1589
2460
 
1590
- [s-skip-link-group] [s-skip-link]:focus, [s-skip-link-group] [s-skip-link]:focus-visible {
1591
- top: 0;
2461
+ [s-menu-item][s-danger] {
2462
+ color: var(--s-state-danger);
1592
2463
  }
1593
2464
 
1594
- [s-skip-link="secondary"] {
1595
- --_skip-bg: var(--s-neutral-800);
2465
+ [s-menu-item][s-danger]:hover {
2466
+ background-color: var(--s-state-danger-bg);
1596
2467
  }
1597
2468
 
1598
- [s-skip-link="contrast"] {
1599
- --_skip-bg: var(--s-neutral-950);
1600
- --_skip-color: var(--s-neutral-50);
2469
+ [s-menu-divider] {
2470
+ height: 1px;
2471
+ margin: var(--s-space-1) 0;
2472
+ background-color: var(--s-border-muted);
2473
+ border: none;
2474
+ }
2475
+
2476
+ [s-menu-label] {
2477
+ padding: var(--s-space-2) var(--s-space-3);
2478
+ font-size: var(--s-text-xs);
2479
+ font-weight: var(--s-font-semibold);
2480
+ color: var(--s-text-secondary);
2481
+ text-transform: uppercase;
2482
+ letter-spacing: var(--s-tracking-wide);
2483
+ display: block;
1601
2484
  }
1602
2485
 
1603
2486
  @media (prefers-reduced-motion: reduce) {
1604
- [s-skip-link] {
2487
+ [s-menu-items] {
1605
2488
  transition: none;
1606
2489
  }
1607
2490
  }
1608
2491
 
1609
- @media (prefers-color-scheme: dark) {
1610
- :where([s-skip-link]:not([s-skip-link="secondary"]):not([s-skip-link="contrast"])) {
1611
- --_skip-bg: var(--s-primary-500);
2492
+ @media (forced-colors: active) {
2493
+ [s-menu-items] {
2494
+ border: 2px solid canvastext;
1612
2495
  }
1613
2496
 
1614
- [s-skip-link]:focus, [s-skip-link]:focus-visible {
1615
- box-shadow: var(--_skip-shadow), 0 0 0 3px var(--s-neutral-900), 0 0 0 5px var(--_skip-bg);
2497
+ [s-menu-item]:hover {
2498
+ color: highlighttext;
2499
+ background-color: highlight;
1616
2500
  }
1617
2501
  }
1618
-
1619
- :root[style*="color-scheme: dark"] :where([s-skip-link]:not([s-skip-link="secondary"]):not([s-skip-link="contrast"])), :root[style*="color-scheme:dark"] :where([s-skip-link]:not([s-skip-link="secondary"]):not([s-skip-link="contrast"])) {
1620
- --_skip-bg: var(--s-primary-500);
1621
- }
1622
2502
  }
1623
2503
 
1624
2504
  @layer shift.utils {
@@ -3465,4 +4345,342 @@
3465
4345
  .s-opacity-100 {
3466
4346
  opacity: 1;
3467
4347
  }
4348
+
4349
+ [s-scroll-progress] {
4350
+ --_scroll-progress-z: var(--s-scroll-progress-z, 1000);
4351
+ height: 3px;
4352
+ z-index: var(--_scroll-progress-z);
4353
+ background: var(--s-interactive-primary);
4354
+ transform-origin: 0;
4355
+ position: fixed;
4356
+ top: 0;
4357
+ left: 0;
4358
+ right: 0;
4359
+ transform: scaleX(0);
4360
+ }
4361
+
4362
+ @supports (animation-timeline: scroll()) {
4363
+ [s-scroll-progress] {
4364
+ animation-name: s-scroll-progress-grow;
4365
+ animation-duration: 1ms;
4366
+ animation-timing-function: linear;
4367
+ animation-fill-mode: both;
4368
+ animation-timeline: scroll();
4369
+ }
4370
+
4371
+ @keyframes s-scroll-progress-grow {
4372
+ from {
4373
+ transform: scaleX(0);
4374
+ }
4375
+
4376
+ to {
4377
+ transform: scaleX(1);
4378
+ }
4379
+ }
4380
+ }
4381
+
4382
+ [s-scroll-progress="secondary"] {
4383
+ background: var(--s-secondary-500);
4384
+ }
4385
+
4386
+ [s-scroll-progress="accent"] {
4387
+ background: var(--s-accent-500);
4388
+ }
4389
+
4390
+ [s-scroll-progress="gradient"] {
4391
+ background: linear-gradient(90deg,
4392
+ var(--s-primary-500),
4393
+ var(--s-secondary-500),
4394
+ var(--s-accent-500));
4395
+ }
4396
+
4397
+ [s-scroll-reveal] {
4398
+ opacity: 1;
4399
+ }
4400
+
4401
+ @supports (animation-timeline: view()) {
4402
+ [s-scroll-reveal] {
4403
+ animation: linear both s-scroll-fade-in view();
4404
+ animation-range: entry;
4405
+ }
4406
+
4407
+ @keyframes s-scroll-fade-in {
4408
+ from {
4409
+ opacity: 0;
4410
+ }
4411
+
4412
+ to {
4413
+ opacity: 1;
4414
+ }
4415
+ }
4416
+
4417
+ [s-scroll-reveal="slide-up"] {
4418
+ animation-name: s-scroll-slide-up;
4419
+ }
4420
+
4421
+ @keyframes s-scroll-slide-up {
4422
+ from {
4423
+ opacity: 0;
4424
+ transform: translateY(2rem);
4425
+ }
4426
+
4427
+ to {
4428
+ opacity: 1;
4429
+ transform: translateY(0);
4430
+ }
4431
+ }
4432
+
4433
+ [s-scroll-reveal="slide-down"] {
4434
+ animation-name: s-scroll-slide-down;
4435
+ }
4436
+
4437
+ @keyframes s-scroll-slide-down {
4438
+ from {
4439
+ opacity: 0;
4440
+ transform: translateY(-2rem);
4441
+ }
4442
+
4443
+ to {
4444
+ opacity: 1;
4445
+ transform: translateY(0);
4446
+ }
4447
+ }
4448
+
4449
+ [s-scroll-reveal="slide-left"] {
4450
+ animation-name: s-scroll-slide-left;
4451
+ }
4452
+
4453
+ @keyframes s-scroll-slide-left {
4454
+ from {
4455
+ opacity: 0;
4456
+ transform: translateX(2rem);
4457
+ }
4458
+
4459
+ to {
4460
+ opacity: 1;
4461
+ transform: translateX(0);
4462
+ }
4463
+ }
4464
+
4465
+ [s-scroll-reveal="slide-right"] {
4466
+ animation-name: s-scroll-slide-right;
4467
+ }
4468
+
4469
+ @keyframes s-scroll-slide-right {
4470
+ from {
4471
+ opacity: 0;
4472
+ transform: translateX(-2rem);
4473
+ }
4474
+
4475
+ to {
4476
+ opacity: 1;
4477
+ transform: translateX(0);
4478
+ }
4479
+ }
4480
+
4481
+ [s-scroll-reveal="scale"] {
4482
+ animation-name: s-scroll-scale-up;
4483
+ }
4484
+
4485
+ @keyframes s-scroll-scale-up {
4486
+ from {
4487
+ opacity: 0;
4488
+ transform: scale(.9);
4489
+ }
4490
+
4491
+ to {
4492
+ opacity: 1;
4493
+ transform: scale(1);
4494
+ }
4495
+ }
4496
+ }
4497
+
4498
+ @supports (animation-timeline: scroll()) {
4499
+ [s-scroll-parallax] {
4500
+ animation: linear s-scroll-parallax-slow scroll();
4501
+ }
4502
+
4503
+ @keyframes s-scroll-parallax-slow {
4504
+ from {
4505
+ transform: translateY(0);
4506
+ }
4507
+
4508
+ to {
4509
+ transform: translateY(-10%);
4510
+ }
4511
+ }
4512
+
4513
+ [s-scroll-parallax="fast"] {
4514
+ animation-name: s-scroll-parallax-fast;
4515
+ }
4516
+
4517
+ @keyframes s-scroll-parallax-fast {
4518
+ from {
4519
+ transform: translateY(0);
4520
+ }
4521
+
4522
+ to {
4523
+ transform: translateY(-25%);
4524
+ }
4525
+ }
4526
+
4527
+ [s-scroll-parallax="reverse"] {
4528
+ animation-name: s-scroll-parallax-reverse;
4529
+ }
4530
+
4531
+ @keyframes s-scroll-parallax-reverse {
4532
+ from {
4533
+ transform: translateY(0);
4534
+ }
4535
+
4536
+ to {
4537
+ transform: translateY(10%);
4538
+ }
4539
+ }
4540
+
4541
+ [s-scroll-rotate] {
4542
+ animation: linear s-scroll-rotate scroll();
4543
+ }
4544
+
4545
+ @keyframes s-scroll-rotate {
4546
+ from {
4547
+ transform: rotate(0);
4548
+ }
4549
+
4550
+ to {
4551
+ transform: rotate(360deg);
4552
+ }
4553
+ }
4554
+
4555
+ [s-scroll-rotate="reverse"] {
4556
+ animation-name: s-scroll-rotate-reverse;
4557
+ }
4558
+
4559
+ @keyframes s-scroll-rotate-reverse {
4560
+ from {
4561
+ transform: rotate(0);
4562
+ }
4563
+
4564
+ to {
4565
+ transform: rotate(-360deg);
4566
+ }
4567
+ }
4568
+ }
4569
+
4570
+ @media (prefers-reduced-motion: reduce) {
4571
+ [s-scroll-reveal], [s-scroll-parallax], [s-scroll-rotate] {
4572
+ opacity: 1 !important;
4573
+ animation: none !important;
4574
+ transform: none !important;
4575
+ }
4576
+
4577
+ [s-scroll-progress] {
4578
+ transform: scaleX(1);
4579
+ animation: none !important;
4580
+ }
4581
+ }
4582
+
4583
+ @function --s-alpha(--color, --opacity) {
4584
+ result: oklch(from var(--color) l c h / var(--opacity));
4585
+ }
4586
+
4587
+ @function --s-lighten(--color, --amount) {
4588
+ result: oklch(from var(--color) calc(l + var(--amount)) c h);
4589
+ }
4590
+
4591
+ @function --s-darken(--color, --amount) {
4592
+ result: oklch(from var(--color) calc(l - var(--amount)) c h);
4593
+ }
4594
+
4595
+ @function --s-saturate(--color, --amount) {
4596
+ result: oklch(from var(--color) l calc(c + var(--amount)) h);
4597
+ }
4598
+
4599
+ @function --s-desaturate(--color, --amount) {
4600
+ result: oklch(from var(--color) l calc(c - var(--amount)) h);
4601
+ }
4602
+
4603
+ @function --s-hue-rotate(--color, --degrees) {
4604
+ result: oklch(from var(--color) l c calc(h + var(--degrees)));
4605
+ }
4606
+
4607
+ @function --s-complement(--color) {
4608
+ result: oklch(from var(--color) l c calc(h + 180));
4609
+ }
4610
+
4611
+ @function --s-glow(--color, --intensity) {
4612
+ result: 0 0 calc(var(--intensity) * 10px) oklch(from var(--color) l c h / .5),
4613
+ 0 0 calc(var(--intensity) * 20px) oklch(from var(--color) l c h / .3),
4614
+ 0 0 calc(var(--intensity) * 30px) oklch(from var(--color) l c h / .1);
4615
+ }
4616
+
4617
+ @function --s-text-shadow-glow(--color, --intensity) {
4618
+ result: 0 0 calc(var(--intensity) * 5px) oklch(from var(--color) l c h / .8),
4619
+ 0 0 calc(var(--intensity) * 10px) oklch(from var(--color) l c h / .5);
4620
+ }
4621
+
4622
+ @function --s-contrast-text(--bg) {
4623
+ result: oklch(from var(--bg) clamp(.15, calc((.6 - l) * 1000 + .15), .95) 0 0);
4624
+ }
4625
+
4626
+ @function --s-readable-on(--bg, --text) {
4627
+ /* Mix text with inverted bg lightness (achromatic) to push toward contrast */
4628
+ /* Dark bg (l≈0) → mix with light (1-l≈1), Light bg (l≈1) → mix with dark (1-l≈0) */
4629
+ result: color-mix(in oklch,
4630
+ var(--text) 60%,
4631
+ oklch(from var(--bg) clamp(.2, calc(1 - l), .9) 0 0));
4632
+ }
4633
+
4634
+ @function --s-fluid(--min, --max) {
4635
+ result: clamp(var(--min),
4636
+ calc(var(--min) + (var(--max) - var(--min)) * ((100vw - 320px) / (1200px - 320px))),
4637
+ var(--max));
4638
+ }
4639
+
4640
+ @function --s-space-scale(--base, --factor) {
4641
+ result: calc(var(--base) * var(--factor));
4642
+ }
4643
+
4644
+ [s-card][s-auto-contrast] {
4645
+ color: if(supports(color: oklch(62.7955% .257683 29.2339)):
4646
+ --s-contrast-text(var(--_card-bg));
4647
+ else: var(--s-text-primary););
4648
+ }
4649
+
4650
+ [s-responsive-padding] {
4651
+ padding: var(--s-space-4);
4652
+ padding: if(media(width < 640px): var(--s-space-2);
4653
+ media(width < 1024px): var(--s-space-4);
4654
+ else: var(--s-space-6););
4655
+ }
4656
+
4657
+ [s-motion-safe] {
4658
+ transition-duration: var(--s-duration-200);
4659
+ transition-duration: if(media(prefers-reduced-motion: reduce): 0s;
4660
+ else: var(--s-duration-200););
4661
+ }
4662
+
4663
+ [s-dark-aware] {
4664
+ --_bg: if(media(prefers-color-scheme: dark): var(--s-surface-sunken);
4665
+ else: var(--s-surface-raised););
4666
+ background-color: var(--_bg);
4667
+ background-color: var(--_bg);
4668
+ }
4669
+
4670
+ [s-size-aware] {
4671
+ padding: var(--s-space-4);
4672
+ font-size: var(--s-text-base);
4673
+ padding: if(style(--size: sm): var(--s-space-2);
4674
+ style(--size: lg): var(--s-space-6);
4675
+ else: var(--s-space-4););
4676
+ font-size: if(style(--size: sm): var(--s-text-sm);
4677
+ style(--size: lg): var(--s-text-lg);
4678
+ else: var(--s-text-base););
4679
+ }
4680
+
4681
+ @media (prefers-reduced-motion: reduce) {
4682
+ [s-motion-safe] {
4683
+ transition-duration: 0s !important;
4684
+ }
4685
+ }
3468
4686
  }