@warlock.js/grimoire 5.57.0 → 5.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/esm/apps/check-apps.mjs +11 -5
  3. package/esm/apps/check-apps.mjs.map +1 -1
  4. package/esm/book/build.d.mts.map +1 -1
  5. package/esm/book/build.mjs +2 -1
  6. package/esm/book/build.mjs.map +1 -1
  7. package/esm/book/render.mjs +10 -0
  8. package/esm/book/render.mjs.map +1 -1
  9. package/esm/bookmap/build.d.mts.map +1 -1
  10. package/esm/bookmap/build.mjs +7 -5
  11. package/esm/bookmap/build.mjs.map +1 -1
  12. package/esm/bookmap/steps.mjs +85 -39
  13. package/esm/bookmap/steps.mjs.map +1 -1
  14. package/esm/check/check-grimoire.d.mts.map +1 -1
  15. package/esm/check/check-grimoire.mjs +4 -1
  16. package/esm/check/check-grimoire.mjs.map +1 -1
  17. package/esm/check/rules/criteria.mjs +21 -2
  18. package/esm/check/rules/criteria.mjs.map +1 -1
  19. package/esm/check/rules/screenshots.mjs +57 -0
  20. package/esm/check/rules/screenshots.mjs.map +1 -0
  21. package/esm/codes/codes.d.mts +12 -0
  22. package/esm/codes/codes.d.mts.map +1 -1
  23. package/esm/codes/codes.mjs +6 -0
  24. package/esm/codes/codes.mjs.map +1 -1
  25. package/esm/contracts/adapter.d.mts +28 -1
  26. package/esm/contracts/adapter.d.mts.map +1 -1
  27. package/esm/contracts/book.d.mts +2 -0
  28. package/esm/contracts/book.d.mts.map +1 -1
  29. package/esm/contracts/book.mjs.map +1 -1
  30. package/esm/contracts/bookmap.d.mts +19 -1
  31. package/esm/contracts/bookmap.d.mts.map +1 -1
  32. package/esm/contracts/scry.d.mts +26 -6
  33. package/esm/contracts/scry.d.mts.map +1 -1
  34. package/esm/contracts/snapshot.d.mts +14 -1
  35. package/esm/contracts/snapshot.d.mts.map +1 -1
  36. package/esm/contracts/test-results.d.mts +34 -0
  37. package/esm/contracts/test-results.d.mts.map +1 -1
  38. package/esm/contracts/written.d.mts +44 -0
  39. package/esm/contracts/written.d.mts.map +1 -1
  40. package/esm/contracts/written.mjs.map +1 -1
  41. package/esm/devtools/data.mjs +116 -5
  42. package/esm/devtools/data.mjs.map +1 -1
  43. package/esm/devtools/feature-map.mjs +149 -0
  44. package/esm/devtools/feature-map.mjs.map +1 -0
  45. package/esm/devtools/index.d.mts +28 -2
  46. package/esm/devtools/index.d.mts.map +1 -1
  47. package/esm/devtools/index.mjs +111 -7
  48. package/esm/devtools/index.mjs.map +1 -1
  49. package/esm/devtools/product-map.d.mts +14 -0
  50. package/esm/devtools/product-map.d.mts.map +1 -0
  51. package/esm/devtools/product-map.mjs +460 -0
  52. package/esm/devtools/product-map.mjs.map +1 -0
  53. package/esm/devtools/site.d.mts +43 -1
  54. package/esm/devtools/site.d.mts.map +1 -1
  55. package/esm/devtools/site.mjs +190 -22
  56. package/esm/devtools/site.mjs.map +1 -1
  57. package/esm/devtools/snapshot-source.mjs +24 -7
  58. package/esm/devtools/snapshot-source.mjs.map +1 -1
  59. package/esm/graph/index.d.mts +10 -1
  60. package/esm/graph/index.d.mts.map +1 -1
  61. package/esm/graph/index.mjs +3 -2
  62. package/esm/graph/index.mjs.map +1 -1
  63. package/esm/index.d.mts +5 -5
  64. package/esm/ownership/index.d.mts.map +1 -1
  65. package/esm/ownership/index.mjs +60 -1
  66. package/esm/ownership/index.mjs.map +1 -1
  67. package/esm/paths/index.d.mts +2 -0
  68. package/esm/paths/index.d.mts.map +1 -1
  69. package/esm/paths/index.mjs +3 -1
  70. package/esm/paths/index.mjs.map +1 -1
  71. package/esm/scry/compact.mjs +170 -0
  72. package/esm/scry/compact.mjs.map +1 -0
  73. package/esm/scry/format.d.mts.map +1 -1
  74. package/esm/scry/format.mjs +19 -2
  75. package/esm/scry/format.mjs.map +1 -1
  76. package/esm/scry/query.d.mts.map +1 -1
  77. package/esm/scry/query.mjs +159 -24
  78. package/esm/scry/query.mjs.map +1 -1
  79. package/esm/test-results/index.d.mts +7 -2
  80. package/esm/test-results/index.d.mts.map +1 -1
  81. package/esm/test-results/index.mjs +79 -12
  82. package/esm/test-results/index.mjs.map +1 -1
  83. package/esm/vitest/index.d.mts +6 -0
  84. package/esm/vitest/index.d.mts.map +1 -1
  85. package/esm/vitest/index.mjs +22 -6
  86. package/esm/vitest/index.mjs.map +1 -1
  87. package/esm/warlock/actions.mjs +15 -7
  88. package/esm/warlock/actions.mjs.map +1 -1
  89. package/esm/warlock/adapter.d.mts.map +1 -1
  90. package/esm/warlock/adapter.mjs +42 -4
  91. package/esm/warlock/adapter.mjs.map +1 -1
  92. package/esm/warlock/commands.mjs +7 -2
  93. package/esm/warlock/commands.mjs.map +1 -1
  94. package/esm/warlock/logo.mjs +12 -0
  95. package/esm/warlock/logo.mjs.map +1 -0
  96. package/esm/warlock/mcp-tools.mjs +51 -15
  97. package/esm/warlock/mcp-tools.mjs.map +1 -1
  98. package/esm/workspace/cache.mjs +194 -0
  99. package/esm/workspace/cache.mjs.map +1 -0
  100. package/esm/workspace/index.d.mts.map +1 -1
  101. package/esm/workspace/index.mjs +7 -3
  102. package/esm/workspace/index.mjs.map +1 -1
  103. package/esm/written/apps.mjs +4 -2
  104. package/esm/written/apps.mjs.map +1 -1
  105. package/esm/written/features.mjs +119 -6
  106. package/esm/written/features.mjs.map +1 -1
  107. package/esm/written/markdown.mjs +66 -1
  108. package/esm/written/markdown.mjs.map +1 -1
  109. package/esm/written/parse-grimoire.d.mts.map +1 -1
  110. package/esm/written/parse-grimoire.mjs +1 -1
  111. package/esm/written/parse-grimoire.mjs.map +1 -1
  112. package/llms-full.txt +108 -12
  113. package/package.json +3 -3
  114. package/skills/backfill-a-grimoire/SKILL.md +5 -0
  115. package/skills/describe-an-app/SKILL.md +12 -0
  116. package/skills/record-a-change/SKILL.md +10 -0
  117. package/skills/use-the-grimoire/SKILL.md +44 -10
  118. package/skills/write-a-feature/SKILL.md +37 -2
  119. package/ui/grimoire-static.js +61 -6
  120. package/ui/grimoire-view.js +2133 -316
  121. package/ui/grimoire.css +1030 -24
  122. package/ui/product-map.css +785 -0
  123. package/ui/product-map.js +1265 -0
package/ui/grimoire.css CHANGED
@@ -6,11 +6,13 @@
6
6
  * under .grimoire-root so nothing leaks into, or depends on, the dashboard.
7
7
  */
8
8
  .grimoire-root {
9
+ container-type: inline-size;
9
10
  --gm-gap: 16px;
10
11
  --gm-radius: var(--radius, 10px);
11
12
  --gm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
12
13
  --gm-focus: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
13
14
  display: grid;
15
+ grid-template-columns: minmax(0, 1fr);
14
16
  gap: var(--gm-gap);
15
17
  min-width: 0;
16
18
  max-width: 100%;
@@ -75,23 +77,99 @@
75
77
  /* Header: tabs and search */
76
78
  .grimoire-header {
77
79
  display: grid;
80
+ grid-template-columns: minmax(0, 1fr);
78
81
  gap: 12px;
82
+ min-width: 0;
83
+ }
84
+ .grimoire-brand-slot:empty {
85
+ display: none;
86
+ }
87
+ .grimoire-brand {
88
+ display: flex;
89
+ align-items: center;
90
+ gap: 8px;
91
+ min-width: 0;
92
+ }
93
+ .grimoire-brand-logo {
94
+ flex: none;
95
+ width: 24px;
96
+ height: 24px;
97
+ border-radius: 6px;
98
+ object-fit: contain;
99
+ }
100
+ .grimoire-brand-name {
101
+ color: var(--foreground);
102
+ font-weight: 700;
103
+ letter-spacing: -0.01em;
104
+ }
105
+ .grimoire-brand-version {
106
+ padding: 0 8px;
107
+ border: 1px solid var(--border);
108
+ border-radius: 999px;
109
+ background: var(--muted);
110
+ color: var(--muted-foreground);
111
+ font-family: var(--gm-mono);
112
+ font-size: 12px;
113
+ line-height: 20px;
114
+ }
115
+ .grimoire-footer:empty {
116
+ display: none;
117
+ }
118
+ .grimoire-footer {
119
+ padding-top: 12px;
120
+ border-top: 1px solid var(--border);
121
+ font-size: 13px;
122
+ }
123
+ .grimoire-appline {
124
+ margin: 0;
125
+ text-align: center;
79
126
  }
80
127
  .grimoire-tabs {
81
128
  display: flex;
82
129
  gap: 4px;
83
130
  padding: 4px;
84
131
  overflow-x: auto;
132
+ overscroll-behavior-x: contain;
133
+ scroll-snap-type: x proximity;
134
+ scrollbar-width: thin;
85
135
  border-radius: var(--gm-radius);
86
- background: var(--muted);
136
+ /* Scroll shadows: an edge darkens while more tabs sit past it (the "local" covers hide it at the ends). */
137
+ background-color: var(--muted);
138
+ background-image:
139
+ linear-gradient(to right, var(--muted) 40%, transparent),
140
+ linear-gradient(to left, var(--muted) 40%, transparent),
141
+ radial-gradient(
142
+ farthest-side at 0 50%,
143
+ color-mix(in srgb, var(--foreground) 28%, transparent),
144
+ transparent
145
+ ),
146
+ radial-gradient(
147
+ farthest-side at 100% 50%,
148
+ color-mix(in srgb, var(--foreground) 28%, transparent),
149
+ transparent
150
+ );
151
+ background-position:
152
+ left center,
153
+ right center,
154
+ left center,
155
+ right center;
156
+ background-size:
157
+ 32px 100%,
158
+ 32px 100%,
159
+ 14px 100%,
160
+ 14px 100%;
161
+ background-repeat: no-repeat;
162
+ background-attachment: local, local, scroll, scroll;
87
163
  }
88
164
  .grimoire-root .grimoire-tab {
89
165
  display: inline-flex;
90
166
  align-items: center;
91
167
  gap: 6px;
92
168
  flex: none;
169
+ scroll-snap-align: center;
93
170
  min-height: 40px;
94
171
  padding: 0 14px;
172
+ white-space: nowrap;
95
173
  border-radius: calc(var(--gm-radius) - 3px);
96
174
  color: var(--muted-foreground);
97
175
  font-weight: 600;
@@ -208,6 +286,7 @@
208
286
  }
209
287
  .grimoire-view {
210
288
  display: grid;
289
+ grid-template-columns: minmax(0, 1fr);
211
290
  gap: var(--gm-gap);
212
291
  min-width: 0;
213
292
  }
@@ -257,6 +336,81 @@
257
336
  --gm-tone: var(--destructive);
258
337
  }
259
338
 
339
+ /* Flow cards on the feature page */
340
+ .grimoire-flowcards {
341
+ display: grid;
342
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
343
+ gap: 12px;
344
+ margin: 0;
345
+ padding: 0;
346
+ list-style: none;
347
+ }
348
+ .grimoire-flowcard {
349
+ position: relative;
350
+ display: grid;
351
+ align-content: start;
352
+ gap: 8px;
353
+ min-width: 0;
354
+ padding: 14px;
355
+ border: 1px solid var(--border);
356
+ border-radius: var(--gm-radius);
357
+ background: var(--card);
358
+ color: var(--card-foreground);
359
+ transition: border-color 0.15s ease;
360
+ }
361
+ .grimoire-flowcard:hover,
362
+ .grimoire-flowcard:focus-within {
363
+ border-color: var(--brand);
364
+ }
365
+ .grimoire-flowcard-top {
366
+ display: flex;
367
+ flex-wrap: wrap;
368
+ align-items: center;
369
+ justify-content: space-between;
370
+ gap: 6px 10px;
371
+ font-size: 13px;
372
+ }
373
+ .grimoire-root .grimoire-flowcard-title {
374
+ margin: 0;
375
+ font-size: 16px;
376
+ line-height: 1.3;
377
+ overflow-wrap: anywhere;
378
+ }
379
+ /* The whole card is the link: its hit area covers the card. */
380
+ .grimoire-root .grimoire-flowcard-link {
381
+ color: var(--foreground);
382
+ text-decoration: none;
383
+ }
384
+ .grimoire-root .grimoire-flowcard-link::after {
385
+ position: absolute;
386
+ inset: 0;
387
+ content: "";
388
+ }
389
+ .grimoire-root .grimoire-flowcard-link:focus-visible {
390
+ box-shadow: none;
391
+ }
392
+ .grimoire-flowcard:has(.grimoire-flowcard-link:focus-visible) {
393
+ box-shadow: var(--gm-focus);
394
+ }
395
+ .grimoire-flowcard-metrics {
396
+ display: flex;
397
+ flex-wrap: wrap;
398
+ gap: 4px 12px;
399
+ margin: 0;
400
+ padding: 0;
401
+ color: var(--muted-foreground);
402
+ font-size: 13px;
403
+ list-style: none;
404
+ }
405
+ .grimoire-flowcard-findings {
406
+ justify-self: start;
407
+ }
408
+ @media (prefers-reduced-motion: reduce) {
409
+ .grimoire-flowcard {
410
+ transition: none;
411
+ }
412
+ }
413
+
260
414
  /* Cards and sections */
261
415
  .grimoire-card {
262
416
  display: grid;
@@ -602,6 +756,31 @@
602
756
  background-size: 200% 100%;
603
757
  animation: grimoire-shimmer 1.4s ease-in-out infinite;
604
758
  }
759
+ .grimoire-skeleton-row {
760
+ border-radius: calc(var(--gm-radius) - 4px);
761
+ background: linear-gradient(90deg, var(--muted) 0%, var(--accent) 50%, var(--muted) 100%);
762
+ background-size: 200% 100%;
763
+ animation: grimoire-shimmer 1.4s ease-in-out infinite;
764
+ }
765
+ .grimoire-load-bar {
766
+ animation: grimoire-slide 1.2s ease-in-out infinite;
767
+ }
768
+ .grimoire-load-elapsed {
769
+ font-variant-numeric: tabular-nums;
770
+ color: var(--foreground);
771
+ }
772
+ .grimoire-search:disabled {
773
+ opacity: 0.6;
774
+ cursor: progress;
775
+ }
776
+ @keyframes grimoire-slide {
777
+ from {
778
+ transform: translateX(-100%);
779
+ }
780
+ to {
781
+ transform: translateX(250%);
782
+ }
783
+ }
605
784
  @keyframes grimoire-shimmer {
606
785
  from {
607
786
  background-position: 100% 0;
@@ -625,30 +804,857 @@
625
804
  overflow-wrap: anywhere;
626
805
  }
627
806
 
628
- /* Small screens and touch */
629
- @media (max-width: 640px) {
630
- .grimoire-facts {
631
- grid-template-columns: minmax(0, 1fr);
632
- gap: 0;
633
- }
634
- .grimoire-facts dd {
635
- margin-bottom: 8px;
636
- }
637
- .grimoire-root h2 {
638
- font-size: 19px;
639
- }
807
+ /* Inline code, ids that never wrap, headline */
808
+ .grimoire-root .grimoire-code {
809
+ padding: 1px 5px;
810
+ border-radius: 5px;
811
+ background: var(--secondary);
812
+ color: var(--secondary-foreground);
813
+ font-family: var(--gm-mono);
814
+ font-size: 0.88em;
815
+ overflow-wrap: anywhere;
640
816
  }
641
- @media (pointer: coarse) {
642
- .grimoire-root .grimoire-tab,
643
- .grimoire-root .grimoire-hit {
644
- min-height: 44px;
645
- }
646
- .grimoire-root .grimoire-more {
647
- min-height: 44px;
648
- }
817
+ .grimoire-root .grimoire-nowrap {
818
+ white-space: nowrap;
649
819
  }
650
- @media (prefers-reduced-motion: reduce) {
651
- .grimoire-skeleton-block {
652
- animation: none;
820
+ .grimoire-headline {
821
+ color: var(--muted-foreground);
822
+ font-size: 15px;
823
+ font-weight: 600;
824
+ }
825
+ .grimoire-subhead {
826
+ font-size: 14px;
827
+ color: var(--muted-foreground);
828
+ }
829
+ .grimoire-stat-small {
830
+ font-size: 20px;
831
+ }
832
+ div.grimoire-stat {
833
+ cursor: default;
834
+ }
835
+
836
+ /* Sub-tabs inside a view (file sets of a step) */
837
+ .grimoire-subtabs {
838
+ display: flex;
839
+ flex-wrap: wrap;
840
+ gap: 6px;
841
+ }
842
+ .grimoire-root .grimoire-subtab {
843
+ flex: none;
844
+ min-height: 36px;
845
+ padding: 0 12px;
846
+ border: 1px solid var(--input);
847
+ border-radius: 999px;
848
+ background: var(--card);
849
+ color: var(--foreground);
850
+ font: inherit;
851
+ font-size: 13px;
852
+ font-weight: 600;
853
+ cursor: pointer;
854
+ }
855
+ .grimoire-root .grimoire-subtab.is-active {
856
+ border-color: var(--brand);
857
+ background: var(--brand);
858
+ color: var(--brand-foreground);
859
+ }
860
+ .grimoire-root .grimoire-filter.is-active {
861
+ border-color: var(--brand);
862
+ background: var(--brand);
863
+ color: var(--brand-foreground);
864
+ }
865
+ .grimoire-root a.grimoire-filter {
866
+ display: inline-flex;
867
+ align-items: center;
868
+ text-decoration: none;
869
+ }
870
+
871
+ /* Flow page: mini header, switcher, health strip, fix next */
872
+ .grimoire-minihead {
873
+ display: none;
874
+ }
875
+ .grimoire-switcher {
876
+ display: inline-flex;
877
+ gap: 12px;
878
+ margin-left: auto;
879
+ }
880
+ .grimoire-pager {
881
+ display: flex;
882
+ justify-content: space-between;
883
+ gap: 12px;
884
+ padding-top: 8px;
885
+ border-top: 1px solid var(--border);
886
+ }
887
+ .grimoire-root .grimoire-neighbour {
888
+ display: inline-flex;
889
+ align-items: center;
890
+ min-height: 44px;
891
+ max-width: 100%;
892
+ overflow-wrap: anywhere;
893
+ font-weight: 600;
894
+ text-decoration: none;
895
+ }
896
+ .grimoire-root .grimoire-neighbour.is-next {
897
+ margin-left: auto;
898
+ text-align: right;
899
+ }
900
+ .grimoire-fixnext {
901
+ border-left: 4px solid var(--warning);
902
+ }
903
+ .grimoire-fixnext.is-good {
904
+ border-left-color: var(--success);
905
+ }
906
+ .grimoire-fixnext-lead {
907
+ overflow-wrap: anywhere;
908
+ }
909
+ .grimoire-copyline {
910
+ display: flex;
911
+ flex-wrap: wrap;
912
+ align-items: center;
913
+ gap: 8px;
914
+ }
915
+ .grimoire-copyline .grimoire-code {
916
+ flex: 1 1 260px;
917
+ padding: 8px 10px;
918
+ user-select: all;
919
+ }
920
+
921
+ /* Journey: a vertical stepper */
922
+ .grimoire-stepper {
923
+ display: grid;
924
+ gap: 0;
925
+ margin: 0;
926
+ padding: 0;
927
+ list-style: none;
928
+ }
929
+ .grimoire-step {
930
+ position: relative;
931
+ display: grid;
932
+ grid-template-columns: 36px minmax(0, 1fr);
933
+ gap: 12px;
934
+ padding-bottom: 18px;
935
+ }
936
+ .grimoire-step:not(:last-child)::before {
937
+ content: "";
938
+ position: absolute;
939
+ top: 36px;
940
+ bottom: 0;
941
+ left: 17px;
942
+ width: 2px;
943
+ background: var(--border);
944
+ }
945
+ .grimoire-step-marker {
946
+ display: inline-flex;
947
+ align-items: center;
948
+ justify-content: center;
949
+ width: 36px;
950
+ height: 36px;
951
+ border: 2px solid var(--brand);
952
+ border-radius: 50%;
953
+ background: var(--card);
954
+ color: var(--brand);
955
+ }
956
+ .grimoire-step-body {
957
+ display: grid;
958
+ align-content: start;
959
+ gap: 6px;
960
+ min-width: 0;
961
+ }
962
+ .grimoire-step-head,
963
+ .grimoire-step-counts {
964
+ display: flex;
965
+ flex-wrap: wrap;
966
+ align-items: center;
967
+ gap: 6px 10px;
968
+ min-width: 0;
969
+ }
970
+ .grimoire-step-target {
971
+ font-weight: 600;
972
+ overflow-wrap: anywhere;
973
+ }
974
+ .grimoire-linked {
975
+ padding: 8px 10px;
976
+ border-radius: calc(var(--gm-radius) - 2px);
977
+ background: var(--muted);
978
+ overflow-wrap: anywhere;
979
+ }
980
+ .grimoire-step-files {
981
+ display: grid;
982
+ gap: 10px;
983
+ padding: 10px;
984
+ border: 1px solid var(--border);
985
+ border-radius: calc(var(--gm-radius) - 2px);
986
+ background: var(--background);
987
+ }
988
+ .grimoire-step-files-body {
989
+ display: grid;
990
+ gap: 10px;
991
+ min-width: 0;
992
+ }
993
+ .grimoire-module-group h5 {
994
+ margin: 8px 0 4px;
995
+ color: var(--muted-foreground);
996
+ font-family: var(--gm-mono);
997
+ font-size: 12px;
998
+ overflow-wrap: anywhere;
999
+ }
1000
+ .grimoire-expand {
1001
+ display: grid;
1002
+ min-width: 0;
1003
+ }
1004
+ .grimoire-expand:empty {
1005
+ display: none;
1006
+ }
1007
+
1008
+ /* Proof rows */
1009
+ .grimoire-proofs,
1010
+ .grimoire-proof-tests,
1011
+ .grimoire-cases,
1012
+ .grimoire-check-features {
1013
+ display: grid;
1014
+ gap: 10px;
1015
+ margin: 0;
1016
+ padding: 0;
1017
+ list-style: none;
1018
+ }
1019
+ .grimoire-proof {
1020
+ display: grid;
1021
+ gap: 6px;
1022
+ padding: 10px 12px;
1023
+ border: 1px solid var(--border);
1024
+ border-radius: calc(var(--gm-radius) - 2px);
1025
+ background: var(--background);
1026
+ scroll-margin-top: 72px;
1027
+ }
1028
+ .grimoire-proof-head {
1029
+ display: flex;
1030
+ flex-wrap: wrap;
1031
+ align-items: center;
1032
+ gap: 8px;
1033
+ }
1034
+ .grimoire-proof-text {
1035
+ overflow-wrap: anywhere;
1036
+ }
1037
+ .grimoire-proof-tests {
1038
+ gap: 4px;
1039
+ font-size: 13px;
1040
+ }
1041
+ .grimoire-proof-tests li {
1042
+ overflow-wrap: anywhere;
1043
+ }
1044
+ .grimoire-cases li {
1045
+ overflow-wrap: anywhere;
1046
+ }
1047
+ .grimoire-details summary {
1048
+ min-height: 32px;
1049
+ color: var(--muted-foreground);
1050
+ font-weight: 600;
1051
+ cursor: pointer;
1052
+ }
1053
+ .grimoire-details[open] summary {
1054
+ margin-bottom: 6px;
1055
+ }
1056
+
1057
+ /* Check groups */
1058
+ .grimoire-check-filters {
1059
+ align-items: stretch;
1060
+ }
1061
+ .grimoire-check-head {
1062
+ display: flex;
1063
+ flex-wrap: wrap;
1064
+ align-items: center;
1065
+ gap: 6px 10px;
1066
+ }
1067
+ .grimoire-check-head h3 {
1068
+ flex: 1 1 200px;
1069
+ overflow-wrap: anywhere;
1070
+ }
1071
+ .grimoire-check-feature-row {
1072
+ display: flex;
1073
+ flex-wrap: wrap;
1074
+ align-items: center;
1075
+ gap: 6px 12px;
1076
+ }
1077
+ .grimoire-check-feature-row > :first-child {
1078
+ flex: 1 1 140px;
1079
+ overflow-wrap: anywhere;
1080
+ }
1081
+ .grimoire-paged {
1082
+ display: grid;
1083
+ gap: 8px;
1084
+ margin-top: 8px;
1085
+ }
1086
+
1087
+ /* Small screens and touch */
1088
+ @media (max-width: 640px) {
1089
+ .grimoire-facts {
1090
+ grid-template-columns: minmax(0, 1fr);
1091
+ gap: 0;
1092
+ }
1093
+ .grimoire-facts dd {
1094
+ margin-bottom: 8px;
1095
+ }
1096
+ .grimoire-root h2 {
1097
+ font-size: 19px;
1098
+ }
1099
+ .grimoire-card {
1100
+ padding: 12px;
1101
+ }
1102
+
1103
+ /* No tables: every row is a card and every cell names its column. */
1104
+ .grimoire-scroll:has(> .grimoire-table) {
1105
+ overflow-x: visible;
1106
+ }
1107
+ .grimoire-table,
1108
+ .grimoire-table tbody,
1109
+ .grimoire-table tr,
1110
+ .grimoire-table td {
1111
+ display: block;
1112
+ width: 100%;
1113
+ }
1114
+ .grimoire-table thead {
1115
+ position: absolute;
1116
+ width: 1px;
1117
+ height: 1px;
1118
+ overflow: hidden;
1119
+ clip-path: inset(50%);
1120
+ }
1121
+ .grimoire-table tr {
1122
+ margin-bottom: 10px;
1123
+ padding: 6px 10px;
1124
+ border: 1px solid var(--border);
1125
+ border-radius: calc(var(--gm-radius) - 2px);
1126
+ background: var(--background);
1127
+ }
1128
+ .grimoire-table td {
1129
+ display: grid;
1130
+ grid-template-columns: 88px minmax(0, 1fr);
1131
+ gap: 8px;
1132
+ padding: 5px 0;
1133
+ border-bottom: 1px dashed var(--border);
1134
+ overflow-wrap: anywhere;
1135
+ }
1136
+ .grimoire-table td:last-child {
1137
+ border-bottom: 0;
1138
+ }
1139
+ .grimoire-table td::before {
1140
+ content: attr(data-label);
1141
+ color: var(--muted-foreground);
1142
+ font-size: 12px;
1143
+ font-weight: 600;
1144
+ }
1145
+ .grimoire-table td:empty {
1146
+ display: none;
1147
+ }
1148
+ .grimoire-svg {
1149
+ min-width: 560px;
1150
+ }
1151
+
1152
+ /* The flow page keeps its title in view and moves prev/next to the bottom. */
1153
+ .grimoire-minihead {
1154
+ position: sticky;
1155
+ top: 0;
1156
+ z-index: 10;
1157
+ display: flex;
1158
+ flex-wrap: nowrap;
1159
+ align-items: center;
1160
+ gap: 8px;
1161
+ margin: 0 -2px;
1162
+ padding: 8px 10px;
1163
+ border: 1px solid var(--border);
1164
+ border-radius: calc(var(--gm-radius) - 2px);
1165
+ background: var(--card);
1166
+ box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 10%, transparent);
1167
+ }
1168
+ .grimoire-minihead strong {
1169
+ flex: 1 1 auto;
1170
+ min-width: 0;
1171
+ overflow: hidden;
1172
+ text-overflow: ellipsis;
1173
+ white-space: nowrap;
1174
+ }
1175
+ .grimoire-minihead .grimoire-pill,
1176
+ .grimoire-minihead .grimoire-muted {
1177
+ flex: none;
1178
+ }
1179
+ .grimoire-switcher {
1180
+ display: none;
1181
+ }
1182
+ .grimoire-pager {
1183
+ flex-direction: column;
1184
+ }
1185
+ .grimoire-root .grimoire-neighbour.is-next {
1186
+ margin-left: 0;
1187
+ text-align: left;
1188
+ }
1189
+ .grimoire-step {
1190
+ grid-template-columns: 30px minmax(0, 1fr);
1191
+ gap: 10px;
1192
+ }
1193
+ .grimoire-step-marker {
1194
+ width: 30px;
1195
+ height: 30px;
1196
+ }
1197
+ .grimoire-step:not(:last-child)::before {
1198
+ top: 30px;
1199
+ left: 14px;
1200
+ }
1201
+ .grimoire-toolbar .grimoire-sort {
1202
+ width: 100%;
1203
+ }
1204
+ }
1205
+ @media (pointer: coarse) {
1206
+ .grimoire-root .grimoire-tab,
1207
+ .grimoire-root .grimoire-hit {
1208
+ min-height: 44px;
1209
+ }
1210
+ .grimoire-root .grimoire-more,
1211
+ .grimoire-root .grimoire-subtab {
1212
+ min-height: 44px;
1213
+ }
1214
+ }
1215
+ @media (prefers-reduced-motion: reduce) {
1216
+ .grimoire-skeleton-block,
1217
+ .grimoire-skeleton-row,
1218
+ .grimoire-load-bar {
1219
+ animation: none;
1220
+ }
1221
+ .grimoire-load-bar {
1222
+ width: 100% !important;
1223
+ opacity: 0.5;
1224
+ }
1225
+ .grimoire-tabs {
1226
+ scroll-behavior: auto;
1227
+ }
1228
+ }
1229
+
1230
+ /* Page tabs (feature and flow pages): real buttons over lazily built panels */
1231
+ .grimoire-tabbed {
1232
+ display: grid;
1233
+ gap: var(--gm-gap);
1234
+ min-width: 0;
1235
+ }
1236
+ .grimoire-pagetabs {
1237
+ display: flex;
1238
+ gap: 4px;
1239
+ min-width: 0;
1240
+ overflow-x: auto;
1241
+ border-bottom: 1px solid var(--border);
1242
+ scrollbar-width: thin;
1243
+ }
1244
+ .grimoire-root .grimoire-pagetab {
1245
+ display: inline-flex;
1246
+ align-items: center;
1247
+ gap: 6px;
1248
+ flex: none;
1249
+ min-height: 44px;
1250
+ padding: 0 14px;
1251
+ border: 0;
1252
+ border-bottom: 2px solid transparent;
1253
+ background: transparent;
1254
+ color: var(--muted-foreground);
1255
+ font: inherit;
1256
+ font-weight: 600;
1257
+ white-space: nowrap;
1258
+ cursor: pointer;
1259
+ }
1260
+ .grimoire-root .grimoire-pagetab:hover {
1261
+ color: var(--foreground);
1262
+ }
1263
+ .grimoire-root .grimoire-pagetab.is-active {
1264
+ border-bottom-color: var(--brand);
1265
+ color: var(--foreground);
1266
+ }
1267
+ .grimoire-root .grimoire-pagetab:focus-visible,
1268
+ .grimoire-root .grimoire-group-head:focus-visible,
1269
+ .grimoire-root .grimoire-jnode:focus-visible,
1270
+ .grimoire-tabpanel:focus-visible {
1271
+ outline: none;
1272
+ box-shadow: var(--gm-focus);
1273
+ }
1274
+ .grimoire-tabpanel {
1275
+ display: grid;
1276
+ min-width: 0;
1277
+ }
1278
+ .grimoire-tabstack {
1279
+ display: grid;
1280
+ gap: var(--gm-gap);
1281
+ min-width: 0;
1282
+ }
1283
+ .grimoire-sr {
1284
+ position: absolute;
1285
+ width: 1px;
1286
+ height: 1px;
1287
+ overflow: hidden;
1288
+ clip-path: inset(50%);
1289
+ }
1290
+
1291
+ /* Collapsible groups */
1292
+ .grimoire-groups {
1293
+ display: grid;
1294
+ gap: 8px;
1295
+ min-width: 0;
1296
+ }
1297
+ .grimoire-group {
1298
+ --gm-tone: var(--border);
1299
+ min-width: 0;
1300
+ border: 1px solid var(--border);
1301
+ border-left: 3px solid var(--gm-tone);
1302
+ border-radius: calc(var(--gm-radius) - 2px);
1303
+ background: var(--background);
1304
+ }
1305
+ .grimoire-group.is-good {
1306
+ --gm-tone: var(--success);
1307
+ }
1308
+ .grimoire-group.is-warn {
1309
+ --gm-tone: var(--warning);
1310
+ }
1311
+ .grimoire-group.is-bad {
1312
+ --gm-tone: var(--destructive);
1313
+ }
1314
+ .grimoire-root .grimoire-group-head {
1315
+ display: flex;
1316
+ flex-wrap: wrap;
1317
+ align-items: center;
1318
+ gap: 6px 10px;
1319
+ width: 100%;
1320
+ min-height: 44px;
1321
+ padding: 6px 12px;
1322
+ border: 0;
1323
+ background: transparent;
1324
+ color: var(--foreground);
1325
+ font: inherit;
1326
+ text-align: left;
1327
+ cursor: pointer;
1328
+ }
1329
+ .grimoire-group-caret {
1330
+ display: inline-block;
1331
+ width: 12px;
1332
+ color: var(--muted-foreground);
1333
+ transition: transform 0.12s;
1334
+ }
1335
+ .grimoire-group-head[aria-expanded="true"] .grimoire-group-caret {
1336
+ transform: rotate(90deg);
1337
+ }
1338
+ .grimoire-group-title {
1339
+ min-width: 0;
1340
+ font-weight: 600;
1341
+ overflow-wrap: anywhere;
1342
+ }
1343
+ .grimoire-group-body {
1344
+ display: none;
1345
+ padding: 4px 12px 12px;
1346
+ }
1347
+ .grimoire-group-body.is-open {
1348
+ display: grid;
1349
+ gap: 8px;
1350
+ }
1351
+ .grimoire-group-note {
1352
+ display: block;
1353
+ margin-bottom: 6px;
1354
+ }
1355
+ .grimoire-root .grimoire-more.is-hidden {
1356
+ display: none;
1357
+ }
1358
+ .grimoire-filterbox {
1359
+ flex: 1 1 240px;
1360
+ min-height: 44px;
1361
+ padding: 0 14px;
1362
+ border: 1px solid var(--input);
1363
+ border-radius: var(--gm-radius);
1364
+ background: var(--card);
1365
+ color: var(--foreground);
1366
+ font: inherit;
1367
+ }
1368
+
1369
+ /* Feature map: flows by the places they run */
1370
+ .grimoire-mapgrid th,
1371
+ .grimoire-mapgrid td {
1372
+ vertical-align: top;
1373
+ }
1374
+ .grimoire-mapgrid thead th:not(:first-child),
1375
+ .grimoire-mapgrid td {
1376
+ min-width: 150px;
1377
+ }
1378
+ .grimoire-mapgrid thead th {
1379
+ white-space: normal;
1380
+ }
1381
+ .grimoire-mapgrid thead th > span {
1382
+ display: block;
1383
+ }
1384
+ .grimoire-maptype {
1385
+ color: var(--muted-foreground);
1386
+ font-size: 11px;
1387
+ font-weight: 600;
1388
+ text-transform: uppercase;
1389
+ letter-spacing: 0.04em;
1390
+ }
1391
+ .grimoire-mapgrid thead th:not(:first-child) span:last-child {
1392
+ color: var(--foreground);
1393
+ font-size: 13px;
1394
+ }
1395
+ .grimoire-maprow {
1396
+ display: grid;
1397
+ gap: 2px;
1398
+ min-width: 150px;
1399
+ text-align: left;
1400
+ white-space: normal;
1401
+ }
1402
+ .grimoire-mapgrid td.is-empty {
1403
+ text-align: center;
1404
+ }
1405
+ .grimoire-mapcell {
1406
+ display: flex;
1407
+ flex-wrap: wrap;
1408
+ gap: 4px;
1409
+ }
1410
+ .grimoire-root .grimoire-mapchip {
1411
+ --gm-tone: var(--muted-foreground);
1412
+ display: inline-flex;
1413
+ align-items: center;
1414
+ gap: 5px;
1415
+ max-width: 100%;
1416
+ padding: 2px 8px 2px 6px;
1417
+ border: 1px solid color-mix(in srgb, var(--gm-tone) 40%, transparent);
1418
+ border-radius: 6px;
1419
+ background: color-mix(in srgb, var(--gm-tone) 9%, transparent);
1420
+ color: var(--foreground);
1421
+ font-size: 12px;
1422
+ text-decoration: none;
1423
+ }
1424
+ .grimoire-root a.grimoire-mapchip:hover {
1425
+ border-color: var(--brand);
1426
+ text-decoration: underline;
1427
+ }
1428
+ .grimoire-mapchip.is-page {
1429
+ --gm-tone: var(--info);
1430
+ }
1431
+ .grimoire-mapchip.is-route {
1432
+ --gm-tone: var(--brand);
1433
+ }
1434
+ .grimoire-mapchip.is-mail,
1435
+ .grimoire-mapchip.is-notification {
1436
+ --gm-tone: var(--chart-3);
1437
+ }
1438
+ .grimoire-mapchip.is-job,
1439
+ .grimoire-mapchip.is-event {
1440
+ --gm-tone: var(--chart-2);
1441
+ }
1442
+ .grimoire-mapchip.is-missing {
1443
+ border-style: dashed;
1444
+ border-color: var(--warning);
1445
+ background: color-mix(in srgb, var(--warning) 10%, transparent);
1446
+ }
1447
+ .grimoire-mapchip-label {
1448
+ min-width: 0;
1449
+ font-family: var(--gm-mono);
1450
+ overflow-wrap: anywhere;
1451
+ }
1452
+ .grimoire-mapchip .grimoire-step-icon {
1453
+ flex: none;
1454
+ color: var(--gm-tone);
1455
+ }
1456
+
1457
+ /* Journey: connected nodes in order */
1458
+ .grimoire-journey {
1459
+ display: grid;
1460
+ gap: 12px;
1461
+ min-width: 0;
1462
+ }
1463
+ .grimoire-jny {
1464
+ --gm-jny-cols: 5;
1465
+ display: grid;
1466
+ grid-template-columns: repeat(var(--gm-jny-cols), minmax(0, 1fr));
1467
+ gap: 18px 26px;
1468
+ margin: 0;
1469
+ padding: 0;
1470
+ list-style: none;
1471
+ }
1472
+ .grimoire-jstep {
1473
+ position: relative;
1474
+ display: grid;
1475
+ min-width: 0;
1476
+ }
1477
+ .grimoire-jstep::after {
1478
+ content: "";
1479
+ position: absolute;
1480
+ top: 50%;
1481
+ left: 100%;
1482
+ width: 26px;
1483
+ height: 2px;
1484
+ background: var(--border);
1485
+ }
1486
+ .grimoire-jstep:last-child::after,
1487
+ .grimoire-jstep:nth-child(5n)::after {
1488
+ display: none;
1489
+ }
1490
+ .grimoire-root .grimoire-jnode {
1491
+ --gm-tone: var(--muted-foreground);
1492
+ display: grid;
1493
+ align-content: start;
1494
+ gap: 4px;
1495
+ width: 100%;
1496
+ min-height: 72px;
1497
+ padding: 8px 10px;
1498
+ border: 1px solid color-mix(in srgb, var(--gm-tone) 50%, var(--border));
1499
+ border-radius: calc(var(--gm-radius) - 2px);
1500
+ background: var(--card);
1501
+ color: var(--foreground);
1502
+ font: inherit;
1503
+ text-align: left;
1504
+ cursor: pointer;
1505
+ }
1506
+ .grimoire-jnode.is-page {
1507
+ --gm-tone: var(--info);
1508
+ }
1509
+ .grimoire-jnode.is-route {
1510
+ --gm-tone: var(--brand);
1511
+ }
1512
+ .grimoire-jnode.is-mail,
1513
+ .grimoire-jnode.is-notification {
1514
+ --gm-tone: var(--chart-3);
1515
+ }
1516
+ .grimoire-jnode.is-job,
1517
+ .grimoire-jnode.is-event {
1518
+ --gm-tone: var(--chart-2);
1519
+ }
1520
+ .grimoire-jnode.is-affects {
1521
+ --gm-tone: var(--chart-4);
1522
+ }
1523
+ .grimoire-root .grimoire-jnode:hover,
1524
+ .grimoire-root .grimoire-jnode.is-selected {
1525
+ border-color: var(--gm-tone);
1526
+ background: color-mix(in srgb, var(--gm-tone) 10%, var(--card));
1527
+ }
1528
+ .grimoire-root .grimoire-jnode.is-missing {
1529
+ border-style: dashed;
1530
+ border-color: var(--warning);
1531
+ background: color-mix(in srgb, var(--warning) 10%, var(--card));
1532
+ }
1533
+ .grimoire-jnode-top {
1534
+ display: flex;
1535
+ align-items: center;
1536
+ gap: 6px;
1537
+ color: var(--gm-tone);
1538
+ font-size: 11px;
1539
+ font-weight: 700;
1540
+ text-transform: uppercase;
1541
+ letter-spacing: 0.04em;
1542
+ }
1543
+ .grimoire-jnode-index {
1544
+ margin-left: auto;
1545
+ color: var(--muted-foreground);
1546
+ font-family: var(--gm-mono);
1547
+ }
1548
+ .grimoire-jnode-label {
1549
+ font-family: var(--gm-mono);
1550
+ font-size: 12.5px;
1551
+ overflow-wrap: anywhere;
1552
+ display: -webkit-box;
1553
+ -webkit-line-clamp: 3;
1554
+ -webkit-box-orient: vertical;
1555
+ overflow: hidden;
1556
+ }
1557
+ .grimoire-jnode-flag {
1558
+ color: var(--warning);
1559
+ font-size: 11px;
1560
+ font-weight: 700;
1561
+ }
1562
+ .grimoire-jpanel:empty {
1563
+ display: none;
1564
+ }
1565
+ .grimoire-jdetail {
1566
+ display: grid;
1567
+ gap: 8px;
1568
+ padding: 12px;
1569
+ border: 1px solid var(--border);
1570
+ border-radius: calc(var(--gm-radius) - 2px);
1571
+ background: var(--card);
1572
+ }
1573
+ .grimoire-story {
1574
+ display: grid;
1575
+ gap: 4px;
1576
+ margin: 0;
1577
+ padding-left: 22px;
1578
+ }
1579
+ .grimoire-whatif {
1580
+ display: grid;
1581
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
1582
+ gap: 10px;
1583
+ margin: 0;
1584
+ padding: 0;
1585
+ list-style: none;
1586
+ }
1587
+ .grimoire-whatif-card {
1588
+ display: grid;
1589
+ align-content: start;
1590
+ gap: 6px;
1591
+ min-width: 0;
1592
+ padding: 10px 12px;
1593
+ border: 1px solid var(--border);
1594
+ border-left: 3px solid var(--info);
1595
+ border-radius: calc(var(--gm-radius) - 2px);
1596
+ background: var(--background);
1597
+ overflow-wrap: anywhere;
1598
+ }
1599
+ .grimoire-whatif-card p {
1600
+ margin: 0;
1601
+ }
1602
+
1603
+ @container (max-width: 1000px) {
1604
+ .grimoire-jny {
1605
+ --gm-jny-cols: 4;
1606
+ }
1607
+ .grimoire-jstep:nth-child(5n)::after {
1608
+ display: block;
1609
+ }
1610
+ .grimoire-jstep:nth-child(4n)::after {
1611
+ display: none;
1612
+ }
1613
+ }
1614
+ @container (max-width: 760px) {
1615
+ .grimoire-jny {
1616
+ --gm-jny-cols: 3;
1617
+ }
1618
+ .grimoire-jstep:nth-child(4n)::after {
1619
+ display: block;
1620
+ }
1621
+ .grimoire-jstep:nth-child(3n)::after {
1622
+ display: none;
1623
+ }
1624
+ }
1625
+ @container (max-width: 520px) {
1626
+ .grimoire-jny {
1627
+ --gm-jny-cols: 1;
1628
+ gap: 26px;
1629
+ }
1630
+ .grimoire-jstep::after,
1631
+ .grimoire-jstep:nth-child(3n)::after {
1632
+ top: 100%;
1633
+ left: 24px;
1634
+ display: block;
1635
+ width: 2px;
1636
+ height: 26px;
1637
+ }
1638
+ .grimoire-jstep:last-child::after {
1639
+ display: none;
1640
+ }
1641
+ }
1642
+ @media (max-width: 640px) {
1643
+ .grimoire-mapgrid tr {
1644
+ display: flex;
1645
+ flex-direction: column;
1646
+ }
1647
+ .grimoire-mapgrid th.grimoire-maprow {
1648
+ order: -1;
1649
+ display: grid;
1650
+ padding: 2px 0 6px;
1651
+ border-bottom: 1px solid var(--border);
1652
+ }
1653
+ .grimoire-mapgrid td.is-empty {
1654
+ display: none;
1655
+ }
1656
+ .grimoire-mapgrid td {
1657
+ min-width: 0;
1658
+ text-align: left;
653
1659
  }
654
1660
  }