nish-ui 1.7.0 → 1.8.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.
@@ -488,13 +488,15 @@
488
488
  display: block;
489
489
  height: auto;
490
490
  padding: 8px 12px;
491
- line-height: 1.625;
492
491
  resize: vertical;
493
492
  }
494
493
  @media (pointer: coarse) {
495
494
  :where(.nish-input, .nish-select, .nish-textarea) {
496
495
  font-size: var(--nish-text-base);
497
496
  }
497
+ :where(.nish-textarea) {
498
+ line-height: 1.5rem;
499
+ }
498
500
  }
499
501
 
500
502
  /* --- Label and Field (.nish-label, .nish-field) --------------------------------------
@@ -559,6 +561,7 @@
559
561
  grid-template-columns: var(--nish-field-label-width, 7rem) minmax(0, 1fr);
560
562
  align-items: center;
561
563
  column-gap: 12px;
564
+ row-gap: 4px;
562
565
  }
563
566
  :where(.nish-field--inline) > :where(.nish-field-label, .nish-label) {
564
567
  color: var(--nish-hi3);
@@ -590,14 +593,42 @@
590
593
  pointer-events: none;
591
594
  }
592
595
  :where(.nish-search) > :where(input) {
593
- padding-left: 32px;
596
+ padding-left: 36px;
594
597
  }
595
598
  :where(.nish-search) > :where(input:not(:last-child)) {
596
- padding-right: 40px;
599
+ padding-right: 32px;
597
600
  }
598
601
  :where(.nish-search) > :where(kbd, button) {
599
602
  position: absolute;
600
- right: 6px;
603
+ right: 4px;
604
+ }
605
+ /* The clear button is the React xs icon button: 24px, 44px under a coarse pointer. */
606
+ :where(.nish-search) > :where(button.nish-icon-btn) {
607
+ width: 24px;
608
+ height: 24px;
609
+ border-radius: 6px;
610
+ }
611
+ :where(.nish-search--sm) > :where(svg),
612
+ :where(.nish-search--xs) > :where(svg) {
613
+ width: 14px;
614
+ height: 14px;
615
+ }
616
+ :where(.nish-search--sm) > :where(input) {
617
+ height: 32px;
618
+ padding-left: 32px;
619
+ font-size: var(--nish-text-xs);
620
+ }
621
+ :where(.nish-search--xs) > :where(svg) {
622
+ left: 8px;
623
+ }
624
+ :where(.nish-search--xs) > :where(input) {
625
+ height: 28px;
626
+ padding-left: 28px;
627
+ padding-right: 8px;
628
+ font-size: var(--nish-text-2xs);
629
+ }
630
+ :where(.nish-search--xs) > :where(input:not(:last-child)) {
631
+ padding-right: 32px;
601
632
  }
602
633
  :where(.nish-search) > :where(kbd) {
603
634
  pointer-events: none;
@@ -606,6 +637,72 @@
606
637
  border-color: transparent;
607
638
  background-color: transparent;
608
639
  }
640
+ /* Room for the 44px clear button under a coarse pointer. */
641
+ @media (pointer: coarse) {
642
+ :where(.nish-search, .nish-search--xs) > :where(input:not(:last-child)) {
643
+ padding-right: 44px;
644
+ }
645
+ /* 16px input text on touch, like React's pointer-coarse:text-base (also stops focus zoom). */
646
+ :where(.nish-search--sm, .nish-search--xs) > :where(input) {
647
+ font-size: var(--nish-text-base);
648
+ }
649
+ }
650
+
651
+ /* --- Pill link (.nish-pill-link) -------------------------------------------------------
652
+ The "← nish.software" pill at the top left of a header:
653
+ <a class="nish-pill-link" href="https://nish.software" title="Back to nish.software">← nish.software</a>
654
+ Also in base.css (nish.css), so pages that load only nish-components.css get it too.
655
+ --compact: under 480px only the arrow shows, in a 44px circle; data-compact="always" at every width.
656
+ <a class="nish-pill-link nish-pill-link--compact" href="/">&larr; <span class="nish-pill-link-label">Artifacts</span></a> */
657
+ :where(.nish-pill-link) {
658
+ box-sizing: border-box;
659
+ display: inline-flex;
660
+ flex-shrink: 0;
661
+ align-items: center;
662
+ gap: 6px;
663
+ min-height: var(--nish-tap-min, 44px);
664
+ padding: 4px 12px;
665
+ border: 1px solid var(--nish-line);
666
+ border-radius: 999px;
667
+ color: var(--nish-hi2);
668
+ font-family: var(--nish-font-sans);
669
+ font-size: 14px;
670
+ line-height: 1.2;
671
+ text-decoration: none;
672
+ white-space: nowrap;
673
+ }
674
+ :where(.nish-pill-link:hover) {
675
+ border-color: var(--nish-line-strong);
676
+ color: var(--nish-hi);
677
+ }
678
+ :where(.nish-pill-link--compact[data-compact='always']) {
679
+ min-width: var(--nish-tap-min, 44px);
680
+ justify-content: center;
681
+ padding-inline: 6px;
682
+ }
683
+ :where(.nish-pill-link--compact[data-compact='always'] .nish-pill-link-label) {
684
+ position: absolute;
685
+ width: 1px;
686
+ height: 1px;
687
+ overflow: hidden;
688
+ clip-path: inset(50%);
689
+ white-space: nowrap;
690
+ }
691
+ @media (max-width: 480px) {
692
+ :where(.nish-pill-link--compact) {
693
+ min-width: var(--nish-tap-min, 44px);
694
+ justify-content: center;
695
+ padding-inline: 6px;
696
+ }
697
+ :where(.nish-pill-link--compact .nish-pill-link-label) {
698
+ position: absolute;
699
+ width: 1px;
700
+ height: 1px;
701
+ overflow: hidden;
702
+ clip-path: inset(50%);
703
+ white-space: nowrap;
704
+ }
705
+ }
609
706
 
610
707
  /* --- Segmented (.nish-seg) ----------------------------------------------------------
611
708
  <div class="nish-seg" role="group" aria-label="Mode">
@@ -660,6 +757,25 @@
660
757
  pointer-events: none;
661
758
  color: var(--nish-ghost);
662
759
  }
760
+ :where(.nish-seg--xs) > :where(button, a, [role='radio']) {
761
+ height: 24px;
762
+ padding: 0 8px;
763
+ font-size: var(--nish-text-2xs, 0.6875rem);
764
+ line-height: 1rem;
765
+ }
766
+ :where(.nish-seg--md) > :where(button, a, [role='radio']) {
767
+ height: 32px;
768
+ padding: 0 12px;
769
+ font-size: var(--nish-text-sm);
770
+ line-height: 1.25rem;
771
+ }
772
+ :where(.nish-seg--block) {
773
+ display: flex;
774
+ width: 100%;
775
+ }
776
+ :where(.nish-seg--block) > :where(button, a, [role='radio']) {
777
+ flex: 1 1 0;
778
+ }
663
779
  :where(.nish-seg--joined) {
664
780
  padding: 0;
665
781
  border: 0;
@@ -728,6 +844,7 @@
728
844
  color: var(--nish-hi2);
729
845
  font: inherit;
730
846
  font-size: var(--nish-text-sm);
847
+ font-weight: var(--nish-weight-medium);
731
848
  line-height: 1.25rem;
732
849
  white-space: nowrap;
733
850
  text-decoration: none;
@@ -741,7 +858,7 @@
741
858
  background: var(--nish-elevated);
742
859
  }
743
860
  :where(.nish-chip[aria-pressed='true']) {
744
- border-color: color-mix(in srgb, var(--nish-accent) 60%, transparent);
861
+ border-color: color-mix(in oklab, var(--nish-accent) 60%, transparent);
745
862
  background: var(--nish-accent-soft);
746
863
  color: var(--nish-accent);
747
864
  }
@@ -755,6 +872,9 @@
755
872
  }
756
873
  :where(.nish-chip--suggestion)::before {
757
874
  content: '+';
875
+ display: inline-block;
876
+ width: 14px;
877
+ text-align: center;
758
878
  font-weight: var(--nish-weight-medium);
759
879
  }
760
880
  :where(.nish-chip--sm) {
@@ -763,13 +883,25 @@
763
883
  font-size: var(--nish-text-xs);
764
884
  line-height: 1rem;
765
885
  }
886
+ :where(span.nish-chip) {
887
+ border-color: var(--nish-line);
888
+ background: var(--nish-elevated);
889
+ color: var(--nish-hi2);
890
+ cursor: default;
891
+ }
892
+ :where(span.nish-chip[data-removable]) {
893
+ padding-right: 4px;
894
+ }
895
+ :where(span.nish-chip--sm[data-removable]) {
896
+ padding-right: 2px;
897
+ }
766
898
 
767
899
  /* --- Callout (.nish-callout) --------------------------------------------------------
768
900
  <div class="nish-callout nish-callout--warn">
769
901
  <span class="nish-callout-icon" aria-hidden="true">!</span>
770
902
  <div><p class="nish-callout-title">Heads up</p><p>Body text.</p></div>
771
903
  </div>
772
- The icon square is the tone's fill with on-* text. */
904
+ The icon is a 16px glyph (an svg, or a character) in the tone's color. */
773
905
  :where(.nish-callout) {
774
906
  box-sizing: border-box;
775
907
  display: flex;
@@ -779,9 +911,9 @@
779
911
  border: 1px solid var(--nish-line);
780
912
  border-radius: var(--nish-radius-card, 12px);
781
913
  background: var(--nish-elevated);
782
- color: var(--nish-hi2);
914
+ color: var(--nish-hi);
783
915
  font-size: var(--nish-text-sm);
784
- line-height: 1.35rem;
916
+ line-height: 1.375;
785
917
  }
786
918
  :where(.nish-callout) > :where(div) {
787
919
  min-width: 0;
@@ -789,9 +921,18 @@
789
921
  }
790
922
  :where(.nish-callout) :where(p) {
791
923
  margin: 0;
924
+ color: var(--nish-hi2);
925
+ font-size: var(--nish-text-sm);
792
926
  }
793
927
  :where(.nish-callout) :where(p + p) {
794
- margin-top: 4px;
928
+ margin-top: 2px;
929
+ }
930
+ /* A box of running text (inline <b>, <code>, links) with no icon column:
931
+ <div class="nish-callout nish-callout--text nish-callout--warn">Prices change <b>daily</b>.</div>
932
+ Text flows as one block instead of splitting into flex items. */
933
+ :where(.nish-callout--text) {
934
+ display: block;
935
+ color: var(--nish-hi2);
795
936
  }
796
937
  :where(.nish-callout-title) {
797
938
  color: var(--nish-hi);
@@ -803,65 +944,60 @@
803
944
  flex-shrink: 0;
804
945
  align-items: center;
805
946
  justify-content: center;
806
- width: 24px;
807
- height: 24px;
808
- border-radius: 6px;
809
- background: var(--nish-overlay);
810
- color: var(--nish-hi2);
947
+ width: 16px;
948
+ height: 16px;
949
+ margin-top: 2px;
950
+ color: var(--nish-hi3);
811
951
  font-size: var(--nish-text-xs);
812
952
  font-weight: var(--nish-weight-bold);
813
953
  line-height: 1;
814
954
  }
815
955
  :where(.nish-callout-icon) > :where(svg) {
816
- width: 14px;
817
- height: 14px;
956
+ width: 16px;
957
+ height: 16px;
818
958
  }
819
959
  :where(.nish-callout--accent) {
820
- border-color: color-mix(in srgb, var(--nish-accent) 30%, transparent);
960
+ border-color: color-mix(in oklab, var(--nish-accent) 30%, transparent);
821
961
  background: var(--nish-accent-soft);
822
962
  }
823
963
  :where(.nish-callout--accent) :where(.nish-callout-icon) {
824
- background: var(--nish-accent);
825
- color: var(--nish-on-accent);
964
+ color: var(--nish-accent);
826
965
  }
827
966
  :where(.nish-callout--info) {
828
- border-color: color-mix(in srgb, var(--nish-info) 30%, transparent);
967
+ border-color: color-mix(in oklab, var(--nish-info) 30%, transparent);
829
968
  background: var(--nish-info-soft);
830
969
  }
831
970
  :where(.nish-callout--info) :where(.nish-callout-icon) {
832
- background: var(--nish-info-fill);
833
- color: var(--nish-on-info);
971
+ color: var(--nish-info);
834
972
  }
835
973
  :where(.nish-callout--ok) {
836
- border-color: color-mix(in srgb, var(--nish-ok) 30%, transparent);
974
+ border-color: color-mix(in oklab, var(--nish-ok) 30%, transparent);
837
975
  background: var(--nish-ok-soft);
838
976
  }
839
977
  :where(.nish-callout--ok) :where(.nish-callout-icon) {
840
- background: var(--nish-ok-fill);
841
- color: var(--nish-on-ok);
978
+ color: var(--nish-ok);
842
979
  }
843
980
  :where(.nish-callout--warn) {
844
- border-color: color-mix(in srgb, var(--nish-warn) 30%, transparent);
981
+ border-color: color-mix(in oklab, var(--nish-warn) 30%, transparent);
845
982
  background: var(--nish-warn-soft);
846
983
  }
847
984
  :where(.nish-callout--warn) :where(.nish-callout-icon) {
848
- background: var(--nish-warn-fill);
849
- color: var(--nish-on-warn);
985
+ color: var(--nish-warn);
850
986
  }
851
987
  :where(.nish-callout--loss) {
852
- border-color: color-mix(in srgb, var(--nish-loss) 30%, transparent);
988
+ border-color: color-mix(in oklab, var(--nish-loss) 30%, transparent);
853
989
  background: var(--nish-loss-soft);
854
990
  }
855
991
  :where(.nish-callout--loss) :where(.nish-callout-icon) {
856
- background: var(--nish-loss-fill);
857
- color: var(--nish-on-loss);
992
+ color: var(--nish-loss);
858
993
  }
859
994
 
860
995
  /* --- Stats (.nish-stats > .nish-stat) -----------------------------------------------
861
996
  <dl class="nish-stats">
862
997
  <div class="nish-stat"><dt class="nish-stat-label">Blocks</dt><dd class="nish-stat-value">1,284</dd></div>
863
998
  </dl>
864
- --tinted: raised fill instead of a card. --sm: denser, smaller values. */
999
+ --tinted: raised fill instead of a card. --sm: denser, smaller values.
1000
+ --4: exactly four tiles, two per row, then four in a row from 640px (no 3+1 orphan). */
865
1001
  :where(.nish-stats) {
866
1002
  display: grid;
867
1003
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
@@ -870,6 +1006,14 @@
870
1006
  padding: 0;
871
1007
  list-style: none;
872
1008
  }
1009
+ :where(.nish-stats--4) {
1010
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1011
+ }
1012
+ @media (min-width: 640px) {
1013
+ :where(.nish-stats--4) {
1014
+ grid-template-columns: repeat(4, minmax(0, 1fr));
1015
+ }
1016
+ }
873
1017
  :where(.nish-stat) {
874
1018
  box-sizing: border-box;
875
1019
  display: flex;
@@ -916,7 +1060,7 @@
916
1060
  }
917
1061
  :where(.nish-stats--tinted) > :where(.nish-stat),
918
1062
  :where(.nish-stat--tinted) {
919
- border-color: transparent;
1063
+ border: 0;
920
1064
  border-radius: var(--nish-radius-sm);
921
1065
  background: var(--nish-elevated);
922
1066
  box-shadow: none;
@@ -929,9 +1073,6 @@
929
1073
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
930
1074
  gap: 8px;
931
1075
  }
932
- :where(.nish-stats--sm) > :where(.nish-stat) {
933
- padding: 8px 10px;
934
- }
935
1076
  :where(.nish-stats--sm) :where(.nish-stat-value) {
936
1077
  font-size: var(--nish-text-base);
937
1078
  line-height: 1.5rem;
@@ -1016,7 +1157,7 @@
1016
1157
  display: block;
1017
1158
  position: relative;
1018
1159
  width: 100%;
1019
- height: 8px;
1160
+ height: 6px;
1020
1161
  overflow: hidden;
1021
1162
  border-radius: var(--nish-radius-pill);
1022
1163
  background: var(--nish-elevated);
@@ -1033,11 +1174,11 @@
1033
1174
  background: var(--nish-accent);
1034
1175
  transition: width var(--nish-dur-med) var(--nish-ease-out);
1035
1176
  }
1036
- :where(.nish-meter--sm) {
1177
+ :where(.nish-meter--xs) {
1037
1178
  height: 4px;
1038
1179
  }
1039
- :where(.nish-meter--lg) {
1040
- height: 12px;
1180
+ :where(.nish-meter--lg, .nish-meter--md) {
1181
+ height: 10px;
1041
1182
  }
1042
1183
  :where(.nish-meter--ok) > :where(i) {
1043
1184
  background: var(--nish-ok-fill);
@@ -1063,11 +1204,12 @@
1063
1204
  min-width: 0;
1064
1205
  }
1065
1206
  :where(.nish-disclosure) > :where(summary) {
1207
+ box-sizing: border-box;
1066
1208
  display: flex;
1067
1209
  align-items: center;
1068
- justify-content: space-between;
1069
1210
  gap: 8px;
1070
- min-height: 32px;
1211
+ padding-block: 6px;
1212
+ border-radius: var(--nish-radius-sm);
1071
1213
  color: var(--nish-hi);
1072
1214
  font-size: var(--nish-text-sm);
1073
1215
  font-weight: var(--nish-weight-medium);
@@ -1079,29 +1221,25 @@
1079
1221
  :where(.nish-disclosure) > :where(summary)::-webkit-details-marker {
1080
1222
  display: none;
1081
1223
  }
1082
- :where(.nish-disclosure) > :where(summary)::after {
1224
+ /* The chevron comes first and turns a quarter when open, like the React Disclosure. */
1225
+ :where(.nish-disclosure) > :where(summary)::before {
1083
1226
  content: '';
1084
1227
  flex-shrink: 0;
1085
- width: 6px;
1086
- height: 6px;
1087
- margin: 0 4px 3px;
1088
- border-right: 2px solid var(--nish-hi3);
1089
- border-bottom: 2px solid var(--nish-hi3);
1090
- transform: rotate(45deg);
1091
- transition: transform var(--nish-dur-fast) var(--nish-ease-out);
1092
- }
1093
- :where(.nish-disclosure[open]) > :where(summary)::after {
1094
- margin-bottom: -3px;
1095
- transform: rotate(-135deg);
1228
+ width: 14px;
1229
+ height: 14px;
1230
+ background: var(--nish-hi3);
1231
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
1232
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
1233
+ transition: transform 150ms;
1096
1234
  }
1097
- :where(.nish-disclosure) > :where(summary:hover) {
1098
- color: var(--nish-accent);
1235
+ :where(.nish-disclosure[open]) > :where(summary)::before {
1236
+ transform: rotate(90deg);
1099
1237
  }
1100
1238
  :where(.nish-disclosure) > :where(:not(summary)) {
1101
- margin-top: 8px;
1239
+ padding: 4px 0 8px 24px;
1102
1240
  color: var(--nish-hi2);
1103
1241
  font-size: var(--nish-text-sm);
1104
- line-height: 1.35rem;
1242
+ line-height: 1.25rem;
1105
1243
  }
1106
1244
  :where(.nish-disclosure--card) {
1107
1245
  border: 1px solid var(--nish-line);
@@ -1110,12 +1248,11 @@
1110
1248
  box-shadow: var(--nish-shadow-card);
1111
1249
  }
1112
1250
  :where(.nish-disclosure--card) > :where(summary) {
1113
- min-height: 44px;
1114
- padding: 0 16px;
1251
+ padding: 12px 16px;
1115
1252
  }
1116
1253
  :where(.nish-disclosure--card) > :where(:not(summary)) {
1117
- margin-top: 0;
1118
- padding: 0 16px 14px;
1254
+ padding: 12px 16px;
1255
+ border-top: 1px solid var(--nish-line);
1119
1256
  }
1120
1257
 
1121
1258
  /* --- Status dot (.nish-dot) ---------------------------------------------------------
@@ -1198,14 +1335,16 @@
1198
1335
  padding: 48px 24px;
1199
1336
  border: 1px dashed var(--nish-line);
1200
1337
  border-radius: var(--nish-radius-card, 12px);
1201
- color: var(--nish-hi3);
1202
- font-size: var(--nish-text-xs);
1338
+ color: var(--nish-hi);
1339
+ font-size: var(--nish-text-base);
1203
1340
  line-height: 1rem;
1204
1341
  text-align: center;
1205
1342
  }
1206
1343
  :where(.nish-empty, .nish-error-state) :where(p) {
1207
1344
  max-width: 24rem;
1208
1345
  margin: 0;
1346
+ color: var(--nish-hi3);
1347
+ font-size: var(--nish-text-xs);
1209
1348
  }
1210
1349
  :where(.nish-empty-title) {
1211
1350
  color: var(--nish-hi2);
@@ -1216,69 +1355,112 @@
1216
1355
  :where(.nish-empty, .nish-error-state) > :where(button, a, .nish-btn) {
1217
1356
  margin-top: 8px;
1218
1357
  }
1358
+ :where(.nish-error-state)::before {
1359
+ /* The React ErrorState's 22px alert triangle. */
1360
+ content: '';
1361
+ flex-shrink: 0;
1362
+ width: 22px;
1363
+ height: 22px;
1364
+ background: var(--nish-loss);
1365
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
1366
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
1367
+ }
1368
+ :where(.nish-error-state) :where(p) {
1369
+ max-width: 28rem;
1370
+ color: var(--nish-hi2);
1371
+ font-size: var(--nish-text-sm);
1372
+ }
1373
+ :where(.nish-error-state) > :where(button, a, .nish-btn) {
1374
+ height: 26px;
1375
+ margin-top: 4px;
1376
+ }
1219
1377
  :where(.nish-error-state) {
1220
1378
  padding: 40px 24px;
1221
- border: 1px solid color-mix(in srgb, var(--nish-loss) 30%, transparent);
1379
+ border: 1px solid color-mix(in oklab, var(--nish-loss) 30%, transparent);
1222
1380
  background: var(--nish-loss-soft);
1223
- color: var(--nish-hi2);
1224
- font-size: var(--nish-text-sm);
1381
+ color: var(--nish-hi);
1382
+ font-size: var(--nish-text-base);
1225
1383
  line-height: 1.25rem;
1226
1384
  }
1227
1385
 
1228
1386
  /* --- Toast (.nish-toast) -----------------------------------------------------------
1229
1387
  What showToast() from @nish/ui/theme (window.nishTheme.showToast) renders, inside one
1230
1388
  role="status" aria-live="polite" region. By hand:
1231
- <div class="nish-toast nish-toast--warn"><p class="nish-toast-body"><strong>mc</strong> is
1232
- not reachable. <a href="…">Open it anyway</a></p><button class="nish-toast-close" …></div> */
1389
+ <div class="nish-toast nish-toast--warn"><span class="nish-toast-icon"><svg …/></span>
1390
+ <p class="nish-toast-body"><strong>mc</strong> is not reachable. <a href="…">Open it anyway</a></p>
1391
+ <button class="nish-toast-close" …></div> */
1233
1392
  :where(.nish-toast) {
1234
1393
  box-sizing: border-box;
1235
1394
  position: fixed;
1236
1395
  /* Centered with margins, not a transform: the rise animation owns transform. */
1237
1396
  left: 0;
1238
1397
  right: 0;
1239
- bottom: max(calc(var(--nish-bottom-inset, 0px) + 8px), calc(16px + env(safe-area-inset-bottom)));
1398
+ bottom: max(calc(var(--nish-bottom-inset, 0px) + 8px), calc(12px + env(safe-area-inset-bottom)));
1240
1399
  z-index: var(--nish-z-toast, 60);
1241
1400
  display: flex;
1242
1401
  align-items: flex-start;
1243
1402
  gap: 10px;
1244
- width: min(100% - 2 * var(--nish-gutter, 16px), 520px);
1403
+ /* The React Toaster: 12px side gutters and max-w-md on phones, a 24rem stack at the bottom right from 640px. */
1404
+ width: min(100% - 24px, 28rem);
1245
1405
  margin: 0 auto;
1246
- padding: 12px 12px 12px 16px;
1406
+ padding: 12px 14px;
1247
1407
  border: 1px solid var(--nish-line-strong);
1248
- border-radius: var(--nish-radius-md);
1408
+ border-radius: 12px;
1249
1409
  background: var(--nish-elevated);
1250
1410
  box-shadow: var(--nish-shadow-pop);
1251
- color: var(--nish-hi2);
1252
- font-size: var(--nish-text-sm);
1253
- line-height: 1.25rem;
1411
+ color: var(--nish-hi);
1412
+ font-size: var(--nish-text-base);
1413
+ line-height: 1.375;
1254
1414
  animation: nish-rise-in 160ms var(--nish-ease-out, ease-out) both;
1255
1415
  }
1416
+ /* The tone icon showToast() draws first (15px, like the React toast). */
1417
+ :where(.nish-toast-icon) {
1418
+ display: inline-flex;
1419
+ flex-shrink: 0;
1420
+ margin-top: 2px;
1421
+ color: var(--nish-accent);
1422
+ }
1423
+ :where(.nish-toast-icon) > :where(svg) {
1424
+ display: block;
1425
+ width: 15px;
1426
+ height: 15px;
1427
+ }
1428
+ :where(.nish-toast--ok) > :where(.nish-toast-icon) {
1429
+ color: var(--nish-ok);
1430
+ }
1431
+ :where(.nish-toast--warn) > :where(.nish-toast-icon) {
1432
+ color: var(--nish-warn);
1433
+ }
1434
+ :where(.nish-toast--loss) > :where(.nish-toast-icon) {
1435
+ color: var(--nish-loss);
1436
+ }
1256
1437
  :where(.nish-toast-body) {
1257
1438
  flex: 1;
1258
1439
  min-width: 0;
1259
1440
  margin: 0;
1260
- padding-block: 2px;
1261
- overflow-wrap: anywhere;
1262
- }
1263
- :where(.nish-toast) :where(strong, a) {
1441
+ font-size: var(--nish-text-sm);
1264
1442
  color: var(--nish-hi);
1443
+ font-weight: var(--nish-weight-medium);
1444
+ overflow-wrap: anywhere;
1265
1445
  }
1266
1446
  :where(.nish-toast) :where(strong) {
1267
1447
  font-weight: var(--nish-weight-semibold);
1268
1448
  }
1269
1449
  :where(.nish-toast) :where(a) {
1450
+ color: var(--nish-hi);
1270
1451
  text-decoration: underline;
1271
1452
  text-underline-offset: 3px;
1272
1453
  }
1273
1454
  :where(.nish-toast-action) {
1274
1455
  flex-shrink: 0;
1275
- margin: -2px 0;
1276
- padding: 2px 8px;
1456
+ margin: -4px 0;
1457
+ padding: 4px 8px;
1277
1458
  border: 0;
1278
- border-radius: var(--nish-radius-xs, 4px);
1459
+ border-radius: 6px;
1279
1460
  background: transparent;
1280
1461
  color: var(--nish-accent);
1281
1462
  font: inherit;
1463
+ font-size: var(--nish-text-sm);
1282
1464
  font-weight: var(--nish-weight-medium);
1283
1465
  text-decoration: none;
1284
1466
  cursor: pointer;
@@ -1295,11 +1477,12 @@
1295
1477
  flex-shrink: 0;
1296
1478
  align-items: center;
1297
1479
  justify-content: center;
1298
- width: 24px;
1299
- height: 24px;
1480
+ width: 22px;
1481
+ height: 22px;
1482
+ margin: -4px;
1300
1483
  padding: 0;
1301
1484
  border: 0;
1302
- border-radius: var(--nish-radius-xs, 4px);
1485
+ border-radius: 6px;
1303
1486
  background: transparent;
1304
1487
  color: var(--nish-hi3);
1305
1488
  cursor: pointer;
@@ -1309,16 +1492,23 @@
1309
1492
  color: var(--nish-hi);
1310
1493
  }
1311
1494
  :where(.nish-toast--ok) {
1312
- border-color: color-mix(in srgb, var(--nish-ok) 30%, transparent);
1495
+ border-color: color-mix(in oklab, var(--nish-ok) 35%, transparent);
1313
1496
  }
1314
1497
  :where(.nish-toast--warn) {
1315
- border-color: color-mix(in srgb, var(--nish-warn) 30%, transparent);
1498
+ border-color: color-mix(in oklab, var(--nish-warn) 40%, transparent);
1316
1499
  }
1317
1500
  :where(.nish-toast--loss) {
1318
- border-color: color-mix(in srgb, var(--nish-loss) 30%, transparent);
1501
+ border-color: color-mix(in oklab, var(--nish-loss) 40%, transparent);
1319
1502
  }
1320
- :where(.nish-toast--info) {
1321
- border-color: color-mix(in srgb, var(--nish-info) 30%, transparent);
1503
+ /* info keeps the neutral border, like the React info toast. */
1504
+ @media (min-width: 640px) {
1505
+ :where(.nish-toast) {
1506
+ left: auto;
1507
+ right: 20px;
1508
+ width: 24rem;
1509
+ margin: 0;
1510
+ bottom: calc(var(--nish-bottom-inset, 0px) + 1.25rem + min(var(--nish-bottom-bar-h, 0px), 1rem));
1511
+ }
1322
1512
  }
1323
1513
  @media (prefers-reduced-motion: reduce) {
1324
1514
  :where(.nish-toast) {
@@ -1341,7 +1531,7 @@
1341
1531
  box-sizing: border-box;
1342
1532
  width: 100%;
1343
1533
  max-width: 100%;
1344
- max-height: 85dvh;
1534
+ max-height: 92dvh;
1345
1535
  margin: auto auto 0;
1346
1536
  padding: 0 0 env(safe-area-inset-bottom);
1347
1537
  overflow-y: auto;
@@ -1350,12 +1540,19 @@
1350
1540
  border-radius: 16px 16px 0 0;
1351
1541
  background: var(--nish-surface);
1352
1542
  box-shadow: var(--nish-shadow-modal);
1353
- color: var(--nish-hi2);
1543
+ color: var(--nish-hi);
1354
1544
  font-family: var(--nish-font-sans, inherit);
1355
- font-size: var(--nish-text-sm);
1356
- line-height: var(--nish-text-sm-lh, 1.35rem);
1545
+ font-size: var(--nish-text-base);
1546
+ line-height: 1.25rem;
1357
1547
  animation: nish-sheet-in 240ms var(--nish-ease-out, ease-out) both;
1358
1548
  }
1549
+ :where(.nish-dialog)::before {
1550
+ /* The phone grab handle: a 44px target with a 40x4 bar, like the React Modal. */
1551
+ content: '';
1552
+ display: block;
1553
+ height: 44px;
1554
+ background: linear-gradient(var(--nish-line-strong), var(--nish-line-strong)) center / 40px 4px no-repeat;
1555
+ }
1359
1556
  :where(.nish-dialog)::backdrop {
1360
1557
  background: rgb(0 0 0 / 0.6);
1361
1558
  background: color-mix(in srgb, var(--nish-scrim, #000) 60%, transparent);
@@ -1363,7 +1560,8 @@
1363
1560
  }
1364
1561
  :where(.nish-dialog-title) {
1365
1562
  margin: 0;
1366
- padding: 16px 20px 8px;
1563
+ /* The React header: 12px (16px from 640px) above a title with 4px of its own, and room for the 28px close button. */
1564
+ padding: 16px 20px 10px;
1367
1565
  color: var(--nish-hi);
1368
1566
  font-size: var(--nish-text-base);
1369
1567
  font-weight: var(--nish-weight-semibold);
@@ -1376,6 +1574,8 @@
1376
1574
  }
1377
1575
  :where(.nish-dialog-body) {
1378
1576
  margin: 0;
1577
+ color: var(--nish-hi2);
1578
+ font-size: var(--nish-text-sm);
1379
1579
  padding: 0 20px 20px;
1380
1580
  overflow-wrap: anywhere;
1381
1581
  }
@@ -1399,6 +1599,12 @@
1399
1599
  animation-name: nish-rise-in;
1400
1600
  animation-duration: 200ms;
1401
1601
  }
1602
+ :where(.nish-dialog)::before {
1603
+ display: none;
1604
+ }
1605
+ :where(.nish-dialog-title) {
1606
+ padding-top: 20px;
1607
+ }
1402
1608
  }
1403
1609
  @media (prefers-reduced-motion: reduce) {
1404
1610
  :where(.nish-dialog),
@@ -1493,7 +1699,7 @@
1493
1699
  :where(.nish-skeleton--text) {
1494
1700
  height: 1em;
1495
1701
  width: 100%;
1496
- border-radius: var(--nish-radius-xs, 4px);
1702
+ border-radius: 6px;
1497
1703
  }
1498
1704
  :where(.nish-skeleton--circle) {
1499
1705
  aspect-ratio: 1;
@@ -1609,7 +1815,7 @@
1609
1815
  box-sizing: border-box;
1610
1816
  width: 100%;
1611
1817
  max-width: 100%;
1612
- max-height: 85svh;
1818
+ max-height: 92dvh;
1613
1819
  margin: auto auto 0;
1614
1820
  padding: 0 0 env(safe-area-inset-bottom);
1615
1821
  overflow: hidden;
@@ -1619,10 +1825,10 @@
1619
1825
  border-radius: 16px 16px 0 0;
1620
1826
  background: var(--nish-surface);
1621
1827
  box-shadow: var(--nish-shadow-modal);
1622
- color: var(--nish-hi2);
1828
+ color: var(--nish-hi);
1623
1829
  font-family: var(--nish-font-sans, inherit);
1624
- font-size: var(--nish-text-sm);
1625
- line-height: var(--nish-text-sm-lh, 1.35rem);
1830
+ font-size: var(--nish-text-base);
1831
+ line-height: 1.25rem;
1626
1832
  /* The handle and header are drag targets; the body scrolls itself (pan-y below). */
1627
1833
  touch-action: none;
1628
1834
  }
@@ -1632,13 +1838,11 @@
1632
1838
  animation: nish-sheet-in 240ms var(--nish-ease-out, ease-out) both;
1633
1839
  }
1634
1840
  :where(.nish-sheet)::before {
1841
+ /* The grab handle: a 44px target with a 40x4 bar, like the React Modal. */
1635
1842
  content: '';
1636
1843
  flex-shrink: 0;
1637
- width: 36px;
1638
- height: 4px;
1639
- margin: 8px auto 0;
1640
- border-radius: 9999px;
1641
- background: var(--nish-line-strong);
1844
+ height: 44px;
1845
+ background: linear-gradient(var(--nish-line-strong), var(--nish-line-strong)) center / 40px 4px no-repeat;
1642
1846
  }
1643
1847
  :where(.nish-sheet)::backdrop {
1644
1848
  background: rgb(0 0 0 / 0.6);
@@ -1660,14 +1864,19 @@
1660
1864
  :where(.nish-sheet-header) {
1661
1865
  display: flex;
1662
1866
  flex-shrink: 0;
1663
- align-items: center;
1867
+ align-items: flex-start;
1664
1868
  justify-content: space-between;
1665
1869
  gap: 12px;
1666
- padding: 8px 12px 8px 20px;
1870
+ padding: 12px 14px 8px 20px;
1871
+ }
1872
+ :where(.nish-sheet-header) > :where(.nish-icon-btn) {
1873
+ width: 28px;
1874
+ height: 28px;
1667
1875
  }
1668
1876
  :where(.nish-sheet-title) {
1669
1877
  min-width: 0;
1670
1878
  margin: 0;
1879
+ padding-top: 4px;
1671
1880
  color: var(--nish-hi);
1672
1881
  font-size: var(--nish-text-base);
1673
1882
  font-weight: var(--nish-weight-semibold);
@@ -1676,8 +1885,10 @@
1676
1885
  }
1677
1886
  :where(.nish-sheet-body) {
1678
1887
  min-height: 0;
1888
+ color: var(--nish-hi2);
1889
+ font-size: var(--nish-text-sm);
1679
1890
  flex: 1 1 auto;
1680
- padding: 0 20px 16px;
1891
+ padding: 0 20px 20px;
1681
1892
  overflow-y: auto;
1682
1893
  overscroll-behavior: contain;
1683
1894
  touch-action: pan-y;
@@ -1695,7 +1906,7 @@
1695
1906
  }
1696
1907
  @media (min-width: 640px) {
1697
1908
  :where(.nish-sheet) {
1698
- width: min(100% - 32px, 32rem);
1909
+ width: min(100% - 32px, 28rem);
1699
1910
  margin: auto;
1700
1911
  padding-bottom: 0;
1701
1912
  border-bottom: 1px solid var(--nish-line);
@@ -1712,7 +1923,7 @@
1712
1923
  animation: nish-fade-out 160ms ease-in both;
1713
1924
  }
1714
1925
  :where(.nish-sheet-header) {
1715
- padding-top: 12px;
1926
+ padding-top: 16px;
1716
1927
  }
1717
1928
  }
1718
1929
  @media (prefers-reduced-motion: reduce) {
@@ -1728,43 +1939,46 @@
1728
1939
  <label class="nish-check-row"><input type="checkbox" class="nish-checkbox"> Email me</label>
1729
1940
  <label class="nish-check-row"><input type="checkbox" class="nish-switch" role="switch"> Alerts</label>
1730
1941
  <button type="button" class="nish-switch" role="switch" aria-checked="true"></button>
1731
- The wrapping .nish-check-row is the 44px target. Set --accent on the control or an
1732
- ancestor to recolor it (falls back to the theme accent). */
1942
+ The Checkbox (16px box) and Switch (36x20 track) components. The wrapping .nish-check-row
1943
+ is the 44px target under a coarse pointer. Set --accent on the control or an ancestor to
1944
+ recolor it (falls back to the theme accent). */
1733
1945
  :where(.nish-check-row) {
1734
1946
  box-sizing: border-box;
1735
1947
  display: flex;
1736
- align-items: center;
1737
- gap: 12px;
1738
- min-height: var(--nish-tap-min, 44px);
1739
- color: var(--nish-hi2);
1948
+ align-items: flex-start;
1949
+ gap: 10px;
1950
+ color: var(--nish-hi);
1740
1951
  font-size: var(--nish-text-sm);
1952
+ line-height: 1.375;
1741
1953
  cursor: pointer;
1742
1954
  }
1743
1955
  :where(.nish-checkbox) {
1744
1956
  appearance: none;
1745
1957
  -webkit-appearance: none;
1746
1958
  position: relative;
1959
+ color: inherit;
1960
+ font-size: inherit;
1747
1961
  box-sizing: border-box;
1748
1962
  display: inline-block;
1749
1963
  flex-shrink: 0;
1750
- width: 20px;
1751
- height: 20px;
1752
- margin: 0;
1753
- border: 1.5px solid var(--nish-line-strong);
1754
- border-radius: 5px;
1964
+ width: 16px;
1965
+ height: 16px;
1966
+ margin: 2px 0 0;
1967
+ border: 1px solid var(--nish-line-strong);
1968
+ border-radius: var(--nish-radius-xs, 4px);
1755
1969
  background: var(--nish-surface);
1756
1970
  cursor: pointer;
1757
1971
  transition:
1758
- background-color 120ms,
1759
- border-color 120ms;
1972
+ background-color 150ms,
1973
+ border-color 150ms;
1760
1974
  }
1761
1975
  :where(.nish-checkbox)::after {
1762
1976
  content: '';
1763
1977
  position: absolute;
1764
- top: 2px;
1765
- left: 6px;
1766
- width: 5px;
1767
- height: 10px;
1978
+ top: 1px;
1979
+ left: 4px;
1980
+ width: 4px;
1981
+ height: 8px;
1768
1982
  border: solid var(--nish-on-accent);
1769
1983
  border-width: 0 2px 2px 0;
1770
1984
  transform: rotate(45deg) scale(0);
@@ -1778,9 +1992,9 @@
1778
1992
  transform: rotate(45deg) scale(1);
1779
1993
  }
1780
1994
  :where(.nish-checkbox:indeterminate)::after {
1781
- top: 7px;
1995
+ top: 6px;
1782
1996
  left: 3px;
1783
- width: 10px;
1997
+ width: 8px;
1784
1998
  height: 0;
1785
1999
  border-width: 2px 0 0;
1786
2000
  transform: scale(1);
@@ -1797,20 +2011,20 @@
1797
2011
  appearance: none;
1798
2012
  -webkit-appearance: none;
1799
2013
  position: relative;
2014
+ color: var(--nish-hi);
2015
+ font-size: var(--nish-text-base);
1800
2016
  box-sizing: border-box;
1801
2017
  display: inline-block;
1802
2018
  flex-shrink: 0;
1803
- width: 44px;
1804
- height: 26px;
2019
+ width: 36px;
2020
+ height: 20px;
1805
2021
  margin: 0;
1806
2022
  padding: 0;
1807
- border: 1px solid var(--nish-line-strong);
2023
+ border: 0;
1808
2024
  border-radius: 9999px;
1809
- background: var(--nish-elevated);
2025
+ background: var(--nish-line-strong);
1810
2026
  cursor: pointer;
1811
- transition:
1812
- background-color 150ms,
1813
- border-color 150ms;
2027
+ transition: background-color 150ms;
1814
2028
  }
1815
2029
  /* The knob. */
1816
2030
  :where(.nish-switch)::after {
@@ -1818,29 +2032,65 @@
1818
2032
  position: absolute;
1819
2033
  top: 2px;
1820
2034
  left: 2px;
1821
- width: 20px;
1822
- height: 20px;
2035
+ width: 16px;
2036
+ height: 16px;
1823
2037
  border-radius: 9999px;
1824
- background: var(--nish-hi2);
2038
+ background: var(--nish-surface);
1825
2039
  box-shadow: var(--nish-shadow-card);
1826
2040
  transition:
1827
- transform 150ms var(--nish-ease-out, ease-out),
2041
+ transform 150ms,
1828
2042
  background-color 150ms;
1829
2043
  }
1830
- /* Extends the touch target to 44px tall without moving layout. */
1831
- :where(.nish-switch)::before {
1832
- content: '';
1833
- position: absolute;
1834
- inset: -9px 0;
2044
+ /* Extends the touch target to 44px under a coarse pointer without moving layout. */
2045
+ @media (pointer: coarse) {
2046
+ :where(.nish-switch)::before {
2047
+ content: '';
2048
+ position: absolute;
2049
+ inset: -12px -4px;
2050
+ }
2051
+ :where(.nish-check-row) {
2052
+ align-items: center;
2053
+ min-height: var(--nish-tap-min, 44px);
2054
+ padding-block: 10px;
2055
+ }
1835
2056
  }
1836
2057
  :where(.nish-switch:checked, .nish-switch[aria-checked='true']) {
1837
- border-color: var(--accent, var(--nish-accent));
1838
2058
  background: var(--accent, var(--nish-accent));
1839
2059
  }
1840
2060
  :where(.nish-switch:checked, .nish-switch[aria-checked='true'])::after {
1841
- transform: translateX(18px);
2061
+ transform: translateX(16px);
1842
2062
  background: var(--nish-on-accent);
1843
2063
  }
2064
+ /* The small switch: a 28x16 track with a 12px knob (the React size="sm"). */
2065
+ :where(.nish-switch--sm) {
2066
+ --nish-sw-w: 28px;
2067
+ width: 28px;
2068
+ height: 16px;
2069
+ }
2070
+ :where(.nish-switch--sm)::after {
2071
+ width: 12px;
2072
+ height: 12px;
2073
+ }
2074
+ :where(.nish-switch--sm:checked, .nish-switch--sm[aria-checked='true'])::after {
2075
+ transform: translateX(12px);
2076
+ }
2077
+ :where(.nish-check-row:has(> .nish-switch--sm)) {
2078
+ font-size: var(--nish-text-xs);
2079
+ }
2080
+ /* The React switch keeps 12px between the track and its text, and a 44px button around the
2081
+ track under a coarse pointer (the track sits centred in it). */
2082
+ :where(.nish-check-row) > :where(.nish-switch:first-child) {
2083
+ margin-right: 2px;
2084
+ }
2085
+ @media (pointer: coarse) {
2086
+ :where(.nish-check-row) > :where(.nish-switch) {
2087
+ margin-right: calc((var(--nish-tap-min, 44px) - var(--nish-sw-w, 36px)) / 2);
2088
+ margin-left: calc((var(--nish-tap-min, 44px) - var(--nish-sw-w, 36px)) / 2);
2089
+ }
2090
+ :where(.nish-check-row) > :where(.nish-switch:first-child) {
2091
+ margin-right: calc((var(--nish-tap-min, 44px) - var(--nish-sw-w, 36px)) / 2 + 2px);
2092
+ }
2093
+ }
1844
2094
  @media (prefers-reduced-motion: reduce) {
1845
2095
  :where(.nish-checkbox),
1846
2096
  :where(.nish-checkbox)::after,
@@ -2098,7 +2348,8 @@
2098
2348
  z-index: 40;
2099
2349
  display: flex;
2100
2350
  align-items: stretch;
2101
- padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
2351
+ min-height: 56px;
2352
+ padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
2102
2353
  border-top: 1px solid var(--nish-line);
2103
2354
  background: var(--nish-surface);
2104
2355
  }
@@ -2108,20 +2359,20 @@
2108
2359
  display: flex;
2109
2360
  flex: 1 1 0;
2110
2361
  min-width: 0;
2111
- min-height: 48px;
2112
2362
  flex-direction: column;
2113
2363
  align-items: center;
2114
2364
  justify-content: center;
2115
2365
  gap: 2px;
2116
- margin: 0 2px;
2117
- padding: 4px 2px;
2366
+ /* The React cell is 56px tall with 2px side padding and the tinted pill inside it. */
2367
+ margin: 4px 2px;
2368
+ padding: 4px 0;
2118
2369
  border: 0;
2119
2370
  border-radius: 12px;
2120
2371
  background: transparent;
2121
2372
  color: var(--nish-hi3);
2122
2373
  font: inherit;
2123
2374
  font-size: 11px;
2124
- line-height: 1.2;
2375
+ line-height: 1.25;
2125
2376
  text-decoration: none;
2126
2377
  cursor: pointer;
2127
2378
  -webkit-tap-highlight-color: transparent;
@@ -2134,8 +2385,8 @@
2134
2385
  }
2135
2386
  :where(.nish-bottom-nav-item) > :where(svg) {
2136
2387
  flex-shrink: 0;
2137
- width: 22px;
2138
- height: 22px;
2388
+ width: 24px;
2389
+ height: 24px;
2139
2390
  }
2140
2391
  :where(.nish-bottom-nav-item[aria-current='page']) {
2141
2392
  background: var(--nish-accent-soft);
@@ -2211,8 +2462,776 @@
2211
2462
  background: linear-gradient(to right, var(--accent, var(--nish-accent)) var(--p), var(--nish-line) var(--p));
2212
2463
  }
2213
2464
 
2465
+ /* --- Textarea that grows (.nish-textarea--grow) --------------------------------------
2466
+ <textarea class="nish-textarea nish-textarea--grow" rows="3" style="--nish-rows: 3">
2467
+ Grows with its text (field-sizing: content), no resize handle. --nish-rows sets the
2468
+ minimum height in lines (default 4, like the React Textarea's rows). Where field-sizing
2469
+ is not supported it stays a fixed, scrollable box. */
2470
+ :where(.nish-textarea--grow) {
2471
+ field-sizing: content;
2472
+ min-height: calc(var(--nish-rows, 4) * 1.25rem + 18px);
2473
+ resize: none;
2474
+ }
2475
+ @media (pointer: coarse) {
2476
+ :where(.nish-textarea--grow) {
2477
+ min-height: calc(var(--nish-rows, 4) * 1.5rem + 18px);
2478
+ }
2479
+ }
2480
+
2481
+ /* --- Tabs (.nish-tabs > .nish-tab) ----------------------------------------------------
2482
+ The Tabs component. Underline by default; --pill is the quieter switcher for a toolbar;
2483
+ --sm and --xs are the smaller sizes; --block gives each tab an equal share.
2484
+ <div class="nish-tabs" role="tablist" aria-label="Sections">
2485
+ <button class="nish-tab" role="tab" aria-selected="true">Overview</button>
2486
+ <button class="nish-tab" role="tab" aria-selected="false">Activity</button>
2487
+ </div>
2488
+ A router link marks the current tab with aria-current="page" instead. <nish-tabs> builds
2489
+ this markup and handles the keys and panels. */
2490
+ :where(.nish-tabs) {
2491
+ display: flex;
2492
+ align-items: flex-end;
2493
+ max-width: 100%;
2494
+ gap: 20px;
2495
+ overflow-x: auto;
2496
+ scrollbar-width: none;
2497
+ box-shadow: inset 0 -1px 0 var(--nish-line);
2498
+ }
2499
+ :where(.nish-tabs)::-webkit-scrollbar {
2500
+ display: none;
2501
+ }
2502
+ :where(.nish-tabs--pill) {
2503
+ gap: 4px;
2504
+ box-shadow: none;
2505
+ }
2506
+ :where(.nish-tabs--block) {
2507
+ width: 100%;
2508
+ }
2509
+ :where(.nish-tabs--block:not(.nish-tabs--pill)) {
2510
+ gap: 4px;
2511
+ }
2512
+ :where(.nish-tab) {
2513
+ box-sizing: border-box;
2514
+ position: relative;
2515
+ display: inline-flex;
2516
+ flex-shrink: 0;
2517
+ flex-direction: column;
2518
+ align-items: flex-start;
2519
+ justify-content: center;
2520
+ height: 40px;
2521
+ margin: 0;
2522
+ padding: 0 2px;
2523
+ border: 0;
2524
+ border-bottom: 2px solid transparent;
2525
+ border-radius: 0;
2526
+ background: transparent;
2527
+ color: var(--nish-hi3);
2528
+ font: inherit;
2529
+ font-size: var(--nish-text-sm);
2530
+ font-weight: var(--nish-weight-medium);
2531
+ line-height: 1.25rem;
2532
+ text-decoration: none;
2533
+ white-space: nowrap;
2534
+ cursor: pointer;
2535
+ transition: color 150ms;
2536
+ }
2537
+ :where(.nish-tab:hover) {
2538
+ color: var(--nish-hi);
2539
+ }
2540
+ :where(.nish-tab[aria-selected='true'], .nish-tab[aria-current]:not([aria-current='false'])) {
2541
+ border-bottom-color: var(--nish-accent);
2542
+ color: var(--nish-hi);
2543
+ }
2544
+ :where(.nish-tab:focus-visible) {
2545
+ outline-offset: -2px;
2546
+ }
2547
+ :where(.nish-tab:disabled, .nish-tab[aria-disabled='true']) {
2548
+ color: var(--nish-ghost);
2549
+ cursor: not-allowed;
2550
+ }
2551
+ :where(.nish-tabs--sm .nish-tab) {
2552
+ height: 32px;
2553
+ font-size: var(--nish-text-xs);
2554
+ line-height: 1rem;
2555
+ }
2556
+ :where(.nish-tabs--xs .nish-tab) {
2557
+ height: 28px;
2558
+ font-size: var(--nish-text-2xs);
2559
+ line-height: 1rem;
2560
+ }
2561
+ :where(.nish-tabs--pill .nish-tab) {
2562
+ height: 32px;
2563
+ padding: 0 12px;
2564
+ border-bottom: 0;
2565
+ border-radius: var(--nish-radius-sm);
2566
+ }
2567
+ :where(.nish-tabs--pill .nish-tab:hover) {
2568
+ background: color-mix(in srgb, var(--nish-elevated) 60%, transparent);
2569
+ }
2570
+ :where(.nish-tabs--pill .nish-tab[aria-selected='true'], .nish-tabs--pill .nish-tab[aria-current]:not([aria-current='false'])) {
2571
+ background: var(--nish-elevated);
2572
+ }
2573
+ :where(.nish-tabs--pill.nish-tabs--sm .nish-tab) {
2574
+ height: 28px;
2575
+ padding: 0 10px;
2576
+ }
2577
+ :where(.nish-tabs--pill.nish-tabs--xs .nish-tab) {
2578
+ height: 24px;
2579
+ padding: 0 8px;
2580
+ }
2581
+ :where(.nish-tabs--block .nish-tab) {
2582
+ flex: 1 1 0;
2583
+ min-width: 0;
2584
+ align-items: center;
2585
+ text-align: center;
2586
+ }
2587
+
2588
+ /* --- Combobox (.nish-combobox) --------------------------------------------------------
2589
+ The Combobox component: a text input that filters a listbox under it. <nish-combobox>
2590
+ builds this markup and runs the keyboard model.
2591
+ <div class="nish-combobox">
2592
+ <input class="nish-input nish-combobox-input" role="combobox" aria-expanded="true" …>
2593
+ <button class="nish-combobox-clear" aria-label="Clear" tabindex="-1"><span>×</span></button>
2594
+ <ul class="nish-combobox-list" role="listbox">
2595
+ <li class="nish-combobox-option" role="option" data-active aria-selected="false">
2596
+ <span>Austin</span><span class="nish-combobox-hint">TX</span></li>
2597
+ <li class="nish-combobox-empty">No matches</li>
2598
+ </ul>
2599
+ </div>
2600
+ data-placement="top" on the list opens it above the input. A selected option shows a check. */
2601
+ :where(.nish-combobox) {
2602
+ position: relative;
2603
+ width: 100%;
2604
+ min-width: 0;
2605
+ }
2606
+ :where(.nish-combobox-input) {
2607
+ padding-right: 44px;
2608
+ }
2609
+ :where(.nish-combobox--sm) > :where(.nish-combobox-input) {
2610
+ height: 32px;
2611
+ padding-left: 10px;
2612
+ }
2613
+ @media (pointer: fine) {
2614
+ :where(.nish-combobox--sm) > :where(.nish-combobox-input) {
2615
+ font-size: var(--nish-text-xs);
2616
+ }
2617
+ }
2618
+ :where(.nish-combobox-clear) {
2619
+ position: absolute;
2620
+ top: 0;
2621
+ right: 0;
2622
+ bottom: 0;
2623
+ display: flex;
2624
+ align-items: center;
2625
+ justify-content: center;
2626
+ width: 44px;
2627
+ padding: 0;
2628
+ border: 0;
2629
+ background: transparent;
2630
+ color: var(--nish-hi3);
2631
+ font: inherit;
2632
+ cursor: pointer;
2633
+ }
2634
+ :where(.nish-combobox-clear:hover) {
2635
+ color: var(--nish-hi);
2636
+ }
2637
+ :where(.nish-combobox-clear) > :where(span) {
2638
+ display: flex;
2639
+ align-items: center;
2640
+ justify-content: center;
2641
+ width: 32px;
2642
+ height: 32px;
2643
+ border-radius: 6px;
2644
+ }
2645
+ :where(.nish-combobox-clear:hover) > :where(span) {
2646
+ background: var(--nish-elevated);
2647
+ }
2648
+ :where(.nish-combobox-clear) :where(svg) {
2649
+ width: 16px;
2650
+ height: 16px;
2651
+ }
2652
+ :where(.nish-combobox-list) {
2653
+ box-sizing: border-box;
2654
+ position: absolute;
2655
+ top: 100%;
2656
+ right: 0;
2657
+ left: 0;
2658
+ z-index: 40;
2659
+ max-height: min(16rem, 40dvh);
2660
+ margin: 4px 0 0;
2661
+ padding: 0;
2662
+ overflow: auto;
2663
+ border: 1px solid var(--nish-line);
2664
+ border-radius: 12px;
2665
+ background: var(--nish-elevated);
2666
+ box-shadow: var(--nish-shadow-pop);
2667
+ list-style: none;
2668
+ }
2669
+ :where(.nish-combobox-list[data-placement='top']) {
2670
+ top: auto;
2671
+ bottom: 100%;
2672
+ margin: 0 0 4px;
2673
+ }
2674
+ :where(.nish-combobox-option, .nish-combobox-empty, .nish-combobox-loading) {
2675
+ box-sizing: border-box;
2676
+ display: flex;
2677
+ align-items: center;
2678
+ gap: 8px;
2679
+ min-height: 44px;
2680
+ margin: 0;
2681
+ padding: 0 12px;
2682
+ color: var(--nish-hi2);
2683
+ font-size: var(--nish-text-sm);
2684
+ line-height: 1.25rem;
2685
+ }
2686
+ :where(.nish-combobox-option) {
2687
+ cursor: pointer;
2688
+ }
2689
+ :where(.nish-combobox-option) > :where(span:first-child) {
2690
+ min-width: 0;
2691
+ flex: 1;
2692
+ overflow: hidden;
2693
+ text-overflow: ellipsis;
2694
+ white-space: nowrap;
2695
+ }
2696
+ :where(.nish-combobox-option[data-active]) {
2697
+ background: var(--nish-accent-soft);
2698
+ color: var(--nish-hi);
2699
+ }
2700
+ :where(.nish-combobox-option[aria-disabled='true']) {
2701
+ cursor: not-allowed;
2702
+ opacity: 0.5;
2703
+ }
2704
+ :where(.nish-combobox-option[aria-selected='true'])::after {
2705
+ content: '';
2706
+ flex-shrink: 0;
2707
+ width: 16px;
2708
+ height: 16px;
2709
+ background: var(--nish-accent);
2710
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
2711
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
2712
+ }
2713
+ :where(.nish-combobox-hint) {
2714
+ flex-shrink: 0;
2715
+ overflow: hidden;
2716
+ color: var(--nish-hi3);
2717
+ font-size: var(--nish-text-xs);
2718
+ text-overflow: ellipsis;
2719
+ white-space: nowrap;
2720
+ }
2721
+ :where(.nish-combobox-empty, .nish-combobox-loading) {
2722
+ color: var(--nish-hi3);
2723
+ }
2724
+
2725
+ /* --- List and list row (.nish-list > .nish-list-row) -----------------------------------
2726
+ The ListRow component: icon, title, subtitle, meta and a chevron; the whole row is the
2727
+ link or button. aria-current gives the active tint; --danger turns the title red;
2728
+ --dense is a 44px row (52px otherwise); --compact is dense with smaller text.
2729
+ <ul class="nish-list">
2730
+ <li><a class="nish-list-row" href="/jobs" aria-current="true">
2731
+ <span class="nish-list-icon"><svg …/></span>
2732
+ <span class="nish-list-text">
2733
+ <span class="nish-list-title">Backups</span>
2734
+ <span class="nish-list-subtitle">Last run 2h ago</span></span>
2735
+ <span class="nish-list-meta">12 GB</span>
2736
+ <svg class="nish-list-chevron" …/></a></li>
2737
+ </ul>
2738
+ A <button> or a <div> works the same; -title--2 lets the title use two lines. */
2739
+ :where(.nish-list) {
2740
+ margin: 0;
2741
+ padding: 0;
2742
+ list-style: none;
2743
+ }
2744
+ :where(.nish-list) > :where(li) {
2745
+ min-width: 0;
2746
+ }
2747
+ :where(.nish-list-row) {
2748
+ box-sizing: border-box;
2749
+ display: flex;
2750
+ align-items: center;
2751
+ gap: 12px;
2752
+ width: 100%;
2753
+ min-height: 52px;
2754
+ margin: 0;
2755
+ padding: 4px 12px;
2756
+ border: 0;
2757
+ border-radius: var(--nish-radius-sm);
2758
+ background: transparent;
2759
+ color: inherit;
2760
+ font: inherit;
2761
+ line-height: 1.5;
2762
+ text-align: left;
2763
+ text-decoration: none;
2764
+ }
2765
+ :where(.nish-list-row:has(.nish-list-subtitle)) {
2766
+ padding-block: 8px;
2767
+ }
2768
+ :where(.nish-list-row--dense, .nish-list-row--compact) {
2769
+ min-height: 44px;
2770
+ }
2771
+ :where(.nish-list-row--compact) {
2772
+ gap: 10px;
2773
+ }
2774
+ :where(.nish-list-row--compact:has(.nish-list-subtitle)) {
2775
+ padding-block: 6px;
2776
+ }
2777
+ :where(a.nish-list-row, button.nish-list-row) {
2778
+ cursor: pointer;
2779
+ transition: background-color 150ms;
2780
+ }
2781
+ :where(a.nish-list-row:hover, button.nish-list-row:hover) {
2782
+ background: var(--nish-elevated);
2783
+ }
2784
+ :where(a.nish-list-row:focus-visible, button.nish-list-row:focus-visible) {
2785
+ outline: 2px solid var(--nish-accent);
2786
+ outline-offset: -2px;
2787
+ }
2788
+ :where(.nish-list-row[aria-current]:not([aria-current='false'])) {
2789
+ background: var(--nish-accent-soft);
2790
+ }
2791
+ :where(.nish-list-icon) {
2792
+ display: flex;
2793
+ flex-shrink: 0;
2794
+ align-items: center;
2795
+ color: var(--nish-hi3);
2796
+ }
2797
+ :where(.nish-list-icon) > :where(svg) {
2798
+ width: 20px;
2799
+ height: 20px;
2800
+ }
2801
+ :where(.nish-list-text) {
2802
+ min-width: 0;
2803
+ flex: 1;
2804
+ }
2805
+ :where(.nish-list-title) {
2806
+ display: block;
2807
+ overflow: hidden;
2808
+ color: var(--nish-hi);
2809
+ text-overflow: ellipsis;
2810
+ white-space: nowrap;
2811
+ }
2812
+ :where(.nish-list-title--2) {
2813
+ display: -webkit-box;
2814
+ -webkit-box-orient: vertical;
2815
+ -webkit-line-clamp: 2;
2816
+ line-clamp: 2;
2817
+ overflow-wrap: break-word;
2818
+ white-space: normal;
2819
+ }
2820
+ :where(.nish-list-row--danger .nish-list-title) {
2821
+ color: var(--nish-loss);
2822
+ }
2823
+ :where(.nish-list-subtitle) {
2824
+ display: -webkit-box;
2825
+ -webkit-box-orient: vertical;
2826
+ -webkit-line-clamp: 2;
2827
+ line-clamp: 2;
2828
+ overflow: hidden;
2829
+ color: var(--nish-hi3);
2830
+ font-size: var(--nish-text-sm);
2831
+ line-height: 1.25rem;
2832
+ }
2833
+ :where(.nish-list-meta) {
2834
+ flex-shrink: 0;
2835
+ color: var(--nish-hi3);
2836
+ font-size: var(--nish-text-xs);
2837
+ line-height: 1rem;
2838
+ text-align: right;
2839
+ font-variant-numeric: tabular-nums;
2840
+ }
2841
+ /* On the active row's accent tint hi3 falls under 4.5:1 in light themes; hi2 holds it. */
2842
+ :where(.nish-list-row[aria-current]:not([aria-current='false'])) :where(.nish-list-subtitle, .nish-list-meta) {
2843
+ color: var(--nish-hi2);
2844
+ }
2845
+ :where(.nish-list-trailing) {
2846
+ display: flex;
2847
+ flex-shrink: 0;
2848
+ align-items: center;
2849
+ }
2850
+ :where(.nish-list-chevron) {
2851
+ flex-shrink: 0;
2852
+ width: 16px;
2853
+ height: 16px;
2854
+ color: var(--nish-ghost);
2855
+ }
2856
+ :where(.nish-list-row--compact .nish-list-title) {
2857
+ font-size: var(--nish-text-2xs);
2858
+ font-weight: var(--nish-weight-medium);
2859
+ line-height: 1.375;
2860
+ }
2861
+ :where(.nish-list-row--compact .nish-list-subtitle) {
2862
+ margin-top: 2px;
2863
+ line-height: 0.9rem;
2864
+ font-size: var(--nish-text-3xs);
2865
+ }
2866
+ :where(.nish-list-row--compact .nish-list-meta) {
2867
+ font-size: var(--nish-text-3xs);
2868
+ }
2869
+ :where(.nish-list-row--compact .nish-list-chevron) {
2870
+ width: 13px;
2871
+ height: 13px;
2872
+ }
2873
+
2874
+ /* --- Kbd (.nish-kbd) ------------------------------------------------------------------
2875
+ <kbd class="nish-kbd">Ctrl K</kbd> */
2876
+ :where(.nish-kbd) {
2877
+ box-sizing: border-box;
2878
+ display: inline-flex;
2879
+ align-items: center;
2880
+ justify-content: center;
2881
+ min-width: 1.5em;
2882
+ border: 1px solid var(--nish-line-strong);
2883
+ border-radius: var(--nish-radius-xs, 4px);
2884
+ background: var(--nish-elevated);
2885
+ font-family: var(--nish-font-mono, ui-monospace, monospace);
2886
+ line-height: 1rem;
2887
+ /* base.css styles the bare kbd element, which beats a zero-specificity class: !important wins. */
2888
+ padding: 0 6px !important;
2889
+ color: var(--nish-hi2) !important;
2890
+ font-size: var(--nish-text-2xs) !important;
2891
+ }
2892
+
2893
+ /* --- Page header (.nish-page-header) ----------------------------------------------------
2894
+ The title block at the top of a page: a text block and, on the right, actions that wrap
2895
+ under it on phones. Anything else you put in the header (a back link, an eyebrow) goes in
2896
+ the text block.
2897
+ <header class="nish-page-header">
2898
+ <div><h1 class="nish-page-header-title">Backups</h1>
2899
+ <p class="nish-page-header-subtitle">Nightly copies of every site.</p></div>
2900
+ <div class="nish-page-header-actions"><button class="nish-btn">Run now</button></div>
2901
+ </header> */
2902
+ :where(.nish-page-header) {
2903
+ display: flex;
2904
+ flex-wrap: wrap;
2905
+ align-items: flex-end;
2906
+ justify-content: space-between;
2907
+ gap: 12px 16px;
2908
+ }
2909
+ :where(.nish-page-header) > :where(:not(.nish-page-header-actions)) {
2910
+ min-width: 0;
2911
+ flex: 1 1 16rem;
2912
+ }
2913
+ :where(.nish-page-header-title) {
2914
+ margin: 0;
2915
+ color: var(--nish-hi);
2916
+ font-size: var(--nish-text-2xl);
2917
+ font-weight: var(--nish-weight-semibold);
2918
+ letter-spacing: -0.025em;
2919
+ line-height: 2rem;
2920
+ overflow-wrap: anywhere;
2921
+ }
2922
+ :where(.nish-page-header-subtitle) {
2923
+ margin: 4px 0 0;
2924
+ color: var(--nish-hi2);
2925
+ font-size: var(--nish-text-sm);
2926
+ line-height: 1.25rem;
2927
+ }
2928
+ :where(.nish-page-header-actions) {
2929
+ display: flex;
2930
+ flex-wrap: wrap;
2931
+ align-items: center;
2932
+ gap: 8px;
2933
+ }
2934
+
2935
+ /* --- Section header (.nish-section-header) -----------------------------------------------
2936
+ The heading row of a section inside a page: the title, with quiet text and a control on
2937
+ the right.
2938
+ <div class="nish-section-header"><h2 class="nish-section-header-title">Services</h2>
2939
+ <div class="nish-section-header-actions"><span>3 of 12</span><button class="nish-btn">Add</button></div></div> */
2940
+ :where(.nish-section-header) {
2941
+ display: flex;
2942
+ flex-wrap: wrap;
2943
+ align-items: baseline;
2944
+ justify-content: space-between;
2945
+ gap: 4px 12px;
2946
+ margin-bottom: 12px;
2947
+ }
2948
+ :where(.nish-section-header-title) {
2949
+ min-width: 0;
2950
+ margin: 0;
2951
+ color: var(--nish-hi);
2952
+ font-size: var(--nish-text-lg);
2953
+ font-weight: var(--nish-weight-semibold);
2954
+ letter-spacing: -0.025em;
2955
+ line-height: 1.75rem;
2956
+ overflow-wrap: anywhere;
2957
+ }
2958
+ :where(.nish-section-header-actions) {
2959
+ display: flex;
2960
+ align-items: center;
2961
+ gap: 12px;
2962
+ color: var(--nish-hi3);
2963
+ font-size: var(--nish-text-sm);
2964
+ line-height: 1.25rem;
2965
+ }
2966
+
2967
+ /* --- Key-value list (.nish-kv) -------------------------------------------------------------
2968
+ Label and value rows with dividers (the KeyValueList component, dl form). Rows are 44px
2969
+ (--dense: 32px). A row with --wrap lets a long value (a path, a URL) break anywhere;
2970
+ --words wraps prose at word breaks.
2971
+ <dl class="nish-kv"><div class="nish-kv-row"><dt>Host</dt><dd>mc.nish.software</dd></div></dl> */
2972
+ :where(.nish-kv) {
2973
+ display: grid;
2974
+ margin: 0;
2975
+ color: var(--nish-hi);
2976
+ font-size: var(--nish-text-sm);
2977
+ line-height: 1.25rem;
2978
+ }
2979
+ :where(.nish-kv-row) {
2980
+ box-sizing: border-box;
2981
+ display: flex;
2982
+ min-width: 0;
2983
+ min-height: 44px;
2984
+ align-items: center;
2985
+ justify-content: space-between;
2986
+ gap: 12px;
2987
+ border-bottom: 1px solid var(--nish-line);
2988
+ }
2989
+ :where(.nish-kv-row:last-child) {
2990
+ border-bottom: 0;
2991
+ }
2992
+ :where(.nish-kv--dense .nish-kv-row) {
2993
+ min-height: 32px;
2994
+ }
2995
+ :where(.nish-kv-row--wrap, .nish-kv-row--words) {
2996
+ padding-block: 8px;
2997
+ }
2998
+ :where(.nish-kv--dense .nish-kv-row--wrap, .nish-kv--dense .nish-kv-row--words) {
2999
+ padding-block: 4px;
3000
+ }
3001
+ :where(.nish-kv-row) > :where(dt) {
3002
+ min-width: 0;
3003
+ color: var(--nish-hi2);
3004
+ }
3005
+ :where(.nish-kv-row) > :where(dd) {
3006
+ flex-shrink: 0;
3007
+ margin: 0;
3008
+ text-align: right;
3009
+ }
3010
+ :where(.nish-kv-row--wrap) > :where(dt) {
3011
+ flex-shrink: 0;
3012
+ }
3013
+ :where(.nish-kv-row--wrap) > :where(dd) {
3014
+ min-width: 0;
3015
+ flex-shrink: 1;
3016
+ word-break: break-all;
3017
+ }
3018
+ :where(.nish-kv-row--words) > :where(dt) {
3019
+ flex-shrink: 0;
3020
+ max-width: calc(60% - 0.75rem);
3021
+ overflow-wrap: anywhere;
3022
+ }
3023
+ :where(.nish-kv-row--words) > :where(dd) {
3024
+ min-width: 0;
3025
+ flex: 1;
3026
+ overflow-wrap: anywhere;
3027
+ }
3028
+
3029
+ /* --- Chart legend (.nish-legend) ------------------------------------------------------------
3030
+ The key for a multi-series chart. --c on the item is the series color; --dot makes the
3031
+ mark an 8px dot (bars and points) instead of a short line.
3032
+ <ul class="nish-legend" aria-label="Legend">
3033
+ <li class="nish-legend-item" style="--c: var(--nish-chart-1)"><i class="nish-legend-swatch" aria-hidden="true"></i>CPU</li>
3034
+ </ul> */
3035
+ :where(.nish-legend) {
3036
+ display: flex;
3037
+ flex-wrap: wrap;
3038
+ gap: 4px 16px;
3039
+ margin: 0;
3040
+ padding: 0;
3041
+ color: var(--nish-hi2);
3042
+ font-size: var(--nish-text-xs);
3043
+ line-height: 1rem;
3044
+ list-style: none;
3045
+ }
3046
+ :where(.nish-legend-item) {
3047
+ display: inline-flex;
3048
+ align-items: center;
3049
+ gap: 6px;
3050
+ }
3051
+ :where(.nish-legend-swatch) {
3052
+ display: inline-block;
3053
+ flex-shrink: 0;
3054
+ width: 10px;
3055
+ height: 3px;
3056
+ border-radius: 4px;
3057
+ background: var(--c, var(--nish-chart-1));
3058
+ }
3059
+ :where(.nish-legend--dot .nish-legend-swatch) {
3060
+ width: 8px;
3061
+ height: 8px;
3062
+ border-radius: 9999px;
3063
+ }
3064
+
3065
+ /* --- Sparkline (.nish-sparkline) --------------------------------------------------------------
3066
+ The svg <nish-sparkline> draws: a line (and, with a fill, an area) in currentColor.
3067
+ --ok, --warn, --loss, --info, --accent and --chart-2 to --chart-8 pick the color
3068
+ (default chart-1); [data-empty] is the dashed flat line of a series with no data. */
3069
+ :where(.nish-sparkline) {
3070
+ display: block;
3071
+ flex-shrink: 0;
3072
+ overflow: visible;
3073
+ color: var(--nish-chart-1);
3074
+ }
3075
+ :where(.nish-sparkline--accent) {
3076
+ color: var(--nish-accent);
3077
+ }
3078
+ :where(.nish-sparkline--ok) {
3079
+ color: var(--nish-ok-fill);
3080
+ }
3081
+ :where(.nish-sparkline--warn) {
3082
+ color: var(--nish-warn-fill);
3083
+ }
3084
+ :where(.nish-sparkline--loss) {
3085
+ color: var(--nish-loss-fill);
3086
+ }
3087
+ :where(.nish-sparkline--info) {
3088
+ color: var(--nish-info-fill);
3089
+ }
3090
+ :where(.nish-sparkline--chart-2) {
3091
+ color: var(--nish-chart-2);
3092
+ }
3093
+ :where(.nish-sparkline--chart-3) {
3094
+ color: var(--nish-chart-3);
3095
+ }
3096
+ :where(.nish-sparkline--chart-4) {
3097
+ color: var(--nish-chart-4);
3098
+ }
3099
+ :where(.nish-sparkline--chart-5) {
3100
+ color: var(--nish-chart-5);
3101
+ }
3102
+ :where(.nish-sparkline--chart-6) {
3103
+ color: var(--nish-chart-6);
3104
+ }
3105
+ :where(.nish-sparkline--chart-7) {
3106
+ color: var(--nish-chart-7);
3107
+ }
3108
+ :where(.nish-sparkline--chart-8) {
3109
+ color: var(--nish-chart-8);
3110
+ }
3111
+ :where(.nish-sparkline[data-empty]) {
3112
+ color: var(--nish-line-strong);
3113
+ }
3114
+
3115
+ /* --- App header (.nish-app-header) -------------------------------------------------------------
3116
+ The top bar of an app: the hub pill (back), the wordmark, tools on the right and an
3117
+ optional row of nav links under them. Opaque, safe-area aware and sticky.
3118
+ <header class="nish-app-header">
3119
+ <a class="nish-pill-link nish-app-header-back" href="https://nish.software">← nish.software</a>
3120
+ <a class="nish-app-header-name" href="/"><svg …/>Trackers</a>
3121
+ <div class="nish-app-header-tools"><button class="nish-icon-btn" aria-label="Add">+</button></div>
3122
+ <nav class="nish-app-header-nav" aria-label="Trackers">
3123
+ <a class="nish-tab" href="/" aria-current="page">Overview</a></nav>
3124
+ </header> */
3125
+ :where(.nish-app-header) {
3126
+ container: nish-header / inline-size;
3127
+ box-sizing: border-box;
3128
+ position: sticky;
3129
+ top: 0;
3130
+ z-index: 30;
3131
+ display: flex;
3132
+ flex-wrap: wrap;
3133
+ align-items: center;
3134
+ gap: 0 8px;
3135
+ padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + var(--nish-page-gutter, 1rem)) 8px
3136
+ calc(env(safe-area-inset-left) + var(--nish-page-gutter, 1rem));
3137
+ border-bottom: 1px solid var(--nish-line);
3138
+ background: var(--nish-bg);
3139
+ }
3140
+ :where(.nish-app-header) > :where(:not(.nish-app-header-nav)) {
3141
+ min-height: 40px;
3142
+ }
3143
+ :where(.nish-app-header-back) {
3144
+ flex-shrink: 0;
3145
+ }
3146
+ @media (min-width: 640px) {
3147
+ :where(.nish-app-header) {
3148
+ column-gap: 12px;
3149
+ }
3150
+ }
3151
+ /* In a header 400px wide or less the back pill shrinks to its arrow (the React AppHeader's container query). */
3152
+ @container nish-header (max-width: 400px) {
3153
+ :where(.nish-app-header-back) {
3154
+ min-width: var(--nish-tap-min, 44px);
3155
+ justify-content: center;
3156
+ padding-inline: 6px;
3157
+ }
3158
+ :where(.nish-app-header-back .nish-pill-link-label) {
3159
+ position: absolute;
3160
+ width: 1px;
3161
+ height: 1px;
3162
+ overflow: hidden;
3163
+ clip-path: inset(50%);
3164
+ white-space: nowrap;
3165
+ }
3166
+ }
3167
+ :where(.nish-app-header-name) {
3168
+ display: inline-flex;
3169
+ min-width: 0;
3170
+ align-items: center;
3171
+ gap: 8px;
3172
+ color: var(--nish-hi);
3173
+ font-size: var(--nish-text-xl);
3174
+ font-weight: var(--nish-weight-bold);
3175
+ letter-spacing: -0.025em;
3176
+ line-height: 1.75rem;
3177
+ text-decoration: none;
3178
+ }
3179
+ :where(.nish-app-header-name) > :where(svg) {
3180
+ flex-shrink: 0;
3181
+ width: 20px;
3182
+ height: 20px;
3183
+ color: var(--nish-accent);
3184
+ }
3185
+ :where(a.nish-app-header-name) {
3186
+ min-width: 44px;
3187
+ min-height: 44px;
3188
+ border-radius: var(--nish-radius-sm);
3189
+ }
3190
+ :where(.nish-app-header-tools) {
3191
+ display: flex;
3192
+ flex-shrink: 0;
3193
+ align-items: center;
3194
+ gap: 8px;
3195
+ margin-left: auto;
3196
+ }
3197
+ :where(.nish-app-header-nav) {
3198
+ display: flex;
3199
+ flex: 0 0 100%;
3200
+ gap: 24px;
3201
+ margin: 8px calc(-1 * var(--nish-page-gutter, 1rem)) -9px;
3202
+ padding: 0 var(--nish-page-gutter, 1rem);
3203
+ overflow-x: auto;
3204
+ scrollbar-width: none;
3205
+ }
3206
+ :where(.nish-app-header-nav)::-webkit-scrollbar {
3207
+ display: none;
3208
+ }
3209
+
3210
+ /* --- Copy button (.nish-copy-btn) ----------------------------------------------------------------
3211
+ <nish-copy-button> renders a .nish-btn (or .nish-icon-btn) with this class and sets
3212
+ data-copied for 1.5 s after a copy: the check icon turns ok-green.
3213
+ <button class="nish-btn nish-btn--sm nish-copy-btn" data-copied><svg …/>Copied</button> */
3214
+ :where(.nish-copy-btn) {
3215
+ white-space: nowrap;
3216
+ }
3217
+ :where(.nish-copy-btn[data-copied] svg) {
3218
+ color: var(--nish-ok);
3219
+ }
3220
+
3221
+ /* The first and last block in a sheet or dialog body sit flush, like the React body. */
3222
+ :where(.nish-sheet-body, .nish-dialog-body) > :where(:first-child) {
3223
+ margin-top: 0;
3224
+ }
3225
+ :where(.nish-sheet-body, .nish-dialog-body) > :where(:last-child) {
3226
+ margin-bottom: 0;
3227
+ }
3228
+
2214
3229
  /* --- Touch targets for the pieces above ---------------------------------------------- */
2215
3230
  @media (pointer: coarse) {
3231
+ /* The React header holds a 44px close button under a coarse pointer. */
3232
+ :where(.nish-dialog-title) {
3233
+ padding-bottom: 26px;
3234
+ }
2216
3235
  :where(.nish-sheet-header) > :where(.nish-icon-btn) {
2217
3236
  min-width: var(--nish-tap-min);
2218
3237
  min-height: var(--nish-tap-min);
@@ -2221,7 +3240,7 @@
2221
3240
 
2222
3241
  /* --- Touch: every control is a 44px target under a coarse pointer ---------------------- */
2223
3242
  @media (pointer: coarse) {
2224
- :where(.nish-btn, .nish-input, .nish-select, .nish-chip, .nish-disclosure > summary) {
3243
+ :where(.nish-btn, .nish-input, .nish-select, .nish-chip, .nish-disclosure > summary, .nish-tab) {
2225
3244
  min-height: var(--nish-tap-min);
2226
3245
  }
2227
3246
  :where(.nish-dialog-actions) > :where(.nish-btn) {
@@ -2231,9 +3250,23 @@
2231
3250
  min-width: var(--nish-tap-min);
2232
3251
  min-height: var(--nish-tap-min);
2233
3252
  }
3253
+ :where(.nish-tab, .nish-chip) {
3254
+ min-width: var(--nish-tap-min);
3255
+ }
3256
+ :where(span.nish-chip) {
3257
+ min-height: 0;
3258
+ min-width: 0;
3259
+ }
2234
3260
  :where(.nish-btn--link) {
2235
3261
  min-height: 0;
2236
3262
  }
3263
+ /* Grown to 44px without growing the toast (the React toast's negative margins). */
3264
+ :where(.nish-toast-action) {
3265
+ margin-block: -10px;
3266
+ }
3267
+ :where(.nish-toast-close) {
3268
+ margin-block: -8px;
3269
+ }
2237
3270
  }
2238
3271
 
2239
3272
  /* --- Split stage: a cross-origin frame swallows pointer events, so a divider or pane drag turns them off --- */