PyDecisionGraph 0.3.2.post1__cp315-cp315t-win_amd64.whl

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 (148) hide show
  1. decision_graph/__infra__.pxd +1 -0
  2. decision_graph/__init__.pxd +1 -0
  3. decision_graph/__init__.py +39 -0
  4. decision_graph/decision_tree/__init__.pxd +2 -0
  5. decision_graph/decision_tree/__init__.py +85 -0
  6. decision_graph/decision_tree/bake/__infra__.pxd +502 -0
  7. decision_graph/decision_tree/bake/__init__.pxd +502 -0
  8. decision_graph/decision_tree/bake/__init__.py +29 -0
  9. decision_graph/decision_tree/bake/c_action.cp315t-win_amd64.pyd +0 -0
  10. decision_graph/decision_tree/bake/c_action.h +324 -0
  11. decision_graph/decision_tree/bake/c_action.pxd +54 -0
  12. decision_graph/decision_tree/bake/c_action.pyi +126 -0
  13. decision_graph/decision_tree/bake/c_action.pyx +65 -0
  14. decision_graph/decision_tree/bake/c_allocator_protocol.cp315t-win_amd64.pyd +0 -0
  15. decision_graph/decision_tree/bake/c_allocator_protocol.pxd +24 -0
  16. decision_graph/decision_tree/bake/c_allocator_protocol.pyi +61 -0
  17. decision_graph/decision_tree/bake/c_allocator_protocol.pyx +109 -0
  18. decision_graph/decision_tree/bake/c_bake.cp315t-win_amd64.pyd +0 -0
  19. decision_graph/decision_tree/bake/c_bake.h +629 -0
  20. decision_graph/decision_tree/bake/c_bake.pxd +52 -0
  21. decision_graph/decision_tree/bake/c_bake.pyi +151 -0
  22. decision_graph/decision_tree/bake/c_bake.pyx +142 -0
  23. decision_graph/decision_tree/bake/c_collections.cp315t-win_amd64.pyd +0 -0
  24. decision_graph/decision_tree/bake/c_collections.h +692 -0
  25. decision_graph/decision_tree/bake/c_collections.pxd +52 -0
  26. decision_graph/decision_tree/bake/c_collections.pyi +193 -0
  27. decision_graph/decision_tree/bake/c_collections.pyx +161 -0
  28. decision_graph/decision_tree/bake/c_const.cp315t-win_amd64.pyd +0 -0
  29. decision_graph/decision_tree/bake/c_const.h +395 -0
  30. decision_graph/decision_tree/bake/c_const.pxd +56 -0
  31. decision_graph/decision_tree/bake/c_const.pyi +305 -0
  32. decision_graph/decision_tree/bake/c_const.pyx +278 -0
  33. decision_graph/decision_tree/bake/c_edge.cp315t-win_amd64.pyd +0 -0
  34. decision_graph/decision_tree/bake/c_edge.h +511 -0
  35. decision_graph/decision_tree/bake/c_edge.pxd +117 -0
  36. decision_graph/decision_tree/bake/c_edge.pyi +192 -0
  37. decision_graph/decision_tree/bake/c_edge.pyx +270 -0
  38. decision_graph/decision_tree/bake/c_eval.h +848 -0
  39. decision_graph/decision_tree/bake/c_eval.pxd +40 -0
  40. decision_graph/decision_tree/bake/c_expr.cp315t-win_amd64.pyd +0 -0
  41. decision_graph/decision_tree/bake/c_expr.h +1900 -0
  42. decision_graph/decision_tree/bake/c_expr.pxd +129 -0
  43. decision_graph/decision_tree/bake/c_expr.pyi +280 -0
  44. decision_graph/decision_tree/bake/c_expr.pyx +272 -0
  45. decision_graph/decision_tree/bake/c_hierarchy.cp315t-win_amd64.pyd +0 -0
  46. decision_graph/decision_tree/bake/c_hierarchy.h +731 -0
  47. decision_graph/decision_tree/bake/c_hierarchy.pxd +71 -0
  48. decision_graph/decision_tree/bake/c_hierarchy.pyi +409 -0
  49. decision_graph/decision_tree/bake/c_hierarchy.pyx +277 -0
  50. decision_graph/decision_tree/bake/c_logic_group.cp315t-win_amd64.pyd +0 -0
  51. decision_graph/decision_tree/bake/c_logic_group.h +1226 -0
  52. decision_graph/decision_tree/bake/c_logic_group.pxd +162 -0
  53. decision_graph/decision_tree/bake/c_logic_group.pyi +264 -0
  54. decision_graph/decision_tree/bake/c_logic_group.pyx +308 -0
  55. decision_graph/decision_tree/bake/c_node.cp315t-win_amd64.pyd +0 -0
  56. decision_graph/decision_tree/bake/c_node.h +2660 -0
  57. decision_graph/decision_tree/bake/c_node.pxd +381 -0
  58. decision_graph/decision_tree/bake/c_node.pyi +438 -0
  59. decision_graph/decision_tree/bake/c_node.pyx +639 -0
  60. decision_graph/decision_tree/bake/c_reconstruct.cp315t-win_amd64.pyd +0 -0
  61. decision_graph/decision_tree/bake/c_reconstruct.pxd +63 -0
  62. decision_graph/decision_tree/bake/c_reconstruct.pyi +60 -0
  63. decision_graph/decision_tree/bake/c_reconstruct.pyx +252 -0
  64. decision_graph/decision_tree/bake/c_var.cp315t-win_amd64.pyd +0 -0
  65. decision_graph/decision_tree/bake/c_var.h +2054 -0
  66. decision_graph/decision_tree/bake/c_var.pxd +205 -0
  67. decision_graph/decision_tree/bake/c_var.pyi +271 -0
  68. decision_graph/decision_tree/bake/c_var.pyx +228 -0
  69. decision_graph/decision_tree/capi/__infra__.pxd +33 -0
  70. decision_graph/decision_tree/capi/__init__.pxd +33 -0
  71. decision_graph/decision_tree/capi/__init__.py +57 -0
  72. decision_graph/decision_tree/capi/c_abc.cp315t-win_amd64.pyd +0 -0
  73. decision_graph/decision_tree/capi/c_abc.pxd +246 -0
  74. decision_graph/decision_tree/capi/c_abc.pyi +770 -0
  75. decision_graph/decision_tree/capi/c_abc.pyx +1532 -0
  76. decision_graph/decision_tree/capi/c_collection.cp315t-win_amd64.pyd +0 -0
  77. decision_graph/decision_tree/capi/c_collection.pxd +22 -0
  78. decision_graph/decision_tree/capi/c_collection.pyi +245 -0
  79. decision_graph/decision_tree/capi/c_collection.pyx +138 -0
  80. decision_graph/decision_tree/capi/c_node.cp315t-win_amd64.pyd +0 -0
  81. decision_graph/decision_tree/capi/c_node.pxd +95 -0
  82. decision_graph/decision_tree/capi/c_node.pyi +492 -0
  83. decision_graph/decision_tree/capi/c_node.pyx +551 -0
  84. decision_graph/decision_tree/exc.py +189 -0
  85. decision_graph/decision_tree/native/__init__.py +57 -0
  86. decision_graph/decision_tree/native/abc.py +1167 -0
  87. decision_graph/decision_tree/native/collection.py +134 -0
  88. decision_graph/decision_tree/native/node.py +521 -0
  89. decision_graph/includes/decision_graph/decision_tree/bake/c_action.c +16320 -0
  90. decision_graph/includes/decision_graph/decision_tree/bake/c_action.h +324 -0
  91. decision_graph/includes/decision_graph/decision_tree/bake/c_allocator_protocol.c +12473 -0
  92. decision_graph/includes/decision_graph/decision_tree/bake/c_bake.c +16485 -0
  93. decision_graph/includes/decision_graph/decision_tree/bake/c_bake.h +629 -0
  94. decision_graph/includes/decision_graph/decision_tree/bake/c_collections.c +17381 -0
  95. decision_graph/includes/decision_graph/decision_tree/bake/c_collections.h +692 -0
  96. decision_graph/includes/decision_graph/decision_tree/bake/c_const.c +20815 -0
  97. decision_graph/includes/decision_graph/decision_tree/bake/c_const.h +395 -0
  98. decision_graph/includes/decision_graph/decision_tree/bake/c_edge.c +20696 -0
  99. decision_graph/includes/decision_graph/decision_tree/bake/c_edge.h +511 -0
  100. decision_graph/includes/decision_graph/decision_tree/bake/c_eval.h +848 -0
  101. decision_graph/includes/decision_graph/decision_tree/bake/c_expr.c +22065 -0
  102. decision_graph/includes/decision_graph/decision_tree/bake/c_expr.h +1900 -0
  103. decision_graph/includes/decision_graph/decision_tree/bake/c_hierarchy.c +23267 -0
  104. decision_graph/includes/decision_graph/decision_tree/bake/c_hierarchy.h +731 -0
  105. decision_graph/includes/decision_graph/decision_tree/bake/c_logic_group.c +22434 -0
  106. decision_graph/includes/decision_graph/decision_tree/bake/c_logic_group.h +1226 -0
  107. decision_graph/includes/decision_graph/decision_tree/bake/c_node.c +28385 -0
  108. decision_graph/includes/decision_graph/decision_tree/bake/c_node.h +2660 -0
  109. decision_graph/includes/decision_graph/decision_tree/bake/c_reconstruct.c +15955 -0
  110. decision_graph/includes/decision_graph/decision_tree/bake/c_var.c +16881 -0
  111. decision_graph/includes/decision_graph/decision_tree/bake/c_var.h +2054 -0
  112. decision_graph/includes/decision_graph/decision_tree/capi/c_abc.c +59196 -0
  113. decision_graph/includes/decision_graph/decision_tree/capi/c_collection.c +19967 -0
  114. decision_graph/includes/decision_graph/decision_tree/capi/c_node.c +39229 -0
  115. decision_graph/logic_group/__init__.py +25 -0
  116. decision_graph/logic_group/base.py +100 -0
  117. decision_graph/logic_group/pending_request.py +384 -0
  118. decision_graph/webui/__init__.py +24 -0
  119. decision_graph/webui/bake/__init__.py +65 -0
  120. decision_graph/webui/bake/app.py +488 -0
  121. decision_graph/webui/bake/static/d3.v7.min.js +2 -0
  122. decision_graph/webui/bake/static/script.js +1440 -0
  123. decision_graph/webui/bake/static/style.css +920 -0
  124. decision_graph/webui/bake/templates/index.html +183 -0
  125. decision_graph/webui/bake/templates/offline.html +184 -0
  126. decision_graph/webui/capi/__init__.py +54 -0
  127. decision_graph/webui/capi/app.py +366 -0
  128. decision_graph/webui/capi/main.py +53 -0
  129. decision_graph/webui/capi/static/d3.v7.min.js +2 -0
  130. decision_graph/webui/capi/static/script.js +1026 -0
  131. decision_graph/webui/capi/static/style.css +656 -0
  132. decision_graph/webui/capi/templates/index.html +93 -0
  133. decision_graph/webui/capi/templates/offline.html +94 -0
  134. decision_graph/webui/native/__init__.py +54 -0
  135. decision_graph/webui/native/app.py +366 -0
  136. decision_graph/webui/native/main.py +53 -0
  137. decision_graph/webui/native/static/d3.v7.min.js +2 -0
  138. decision_graph/webui/native/static/script.js +1026 -0
  139. decision_graph/webui/native/static/style.css +656 -0
  140. decision_graph/webui/native/templates/index.html +93 -0
  141. decision_graph/webui/native/templates/offline.html +94 -0
  142. pydecisiongraph-0.3.2.post1.dist-info/METADATA +136 -0
  143. pydecisiongraph-0.3.2.post1.dist-info/RECORD +148 -0
  144. pydecisiongraph-0.3.2.post1.dist-info/WHEEL +5 -0
  145. pydecisiongraph-0.3.2.post1.dist-info/licenses/LICENSE +373 -0
  146. pydecisiongraph-0.3.2.post1.dist-info/top_level.txt +2 -0
  147. tests/bake_c_evaluator.cp315t-win_amd64.pyd +0 -0
  148. tests/bake_eval_probe.cp315t-win_amd64.pyd +0 -0
@@ -0,0 +1,920 @@
1
+ /* ==========================================================================
2
+ Bake Graph — a card per node, laid out on a grid.
3
+
4
+ Everything the drawing uses is a custom property, so the theme toggle is one
5
+ attribute on <html> and an export can snapshot the values it finds: the SVG
6
+ is styled by the same names the page is.
7
+ ========================================================================== */
8
+
9
+ :root {
10
+ --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
11
+ --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
12
+
13
+ --radius-lg: 14px;
14
+ --radius-md: 9px;
15
+ --radius-sm: 5px;
16
+
17
+ --sidebar-w: 268px;
18
+ --titlebar-h: 52px;
19
+
20
+ --t-fast: 120ms;
21
+ --t-slow: 260ms;
22
+ }
23
+
24
+ /* ---- Dark (default) ---- */
25
+ :root,
26
+ :root[data-theme="dark"] {
27
+ --bg: #0e1015;
28
+ --bg-grid: #171a21;
29
+ /* The paper the cards sit on: a step off the background, not an edge. At
30
+ the line colour it reads as a second graph drawn behind the first. */
31
+ --grid-line: #1b1f28;
32
+ --panel: #14171e;
33
+ --panel-2: #1b1f28;
34
+ --item: #222733;
35
+ --line: #2b3140;
36
+ --text: #e8ecf4;
37
+ --text-dim: #9aa4b8;
38
+ --text-faint: #667089;
39
+ --accent: #6ea8fe;
40
+ --accent-soft: rgba(110, 168, 254, 0.16);
41
+ --ok: #4ade80;
42
+ --warn: #fbbf24;
43
+ --bad: #f87171;
44
+ --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
45
+
46
+ --card-bg: #1a1f29;
47
+ --card-line: #313847;
48
+ --card-repr: #dfe6f2;
49
+ --card-meta: #8b95a9;
50
+ --card-active-ring: #7dd3fc;
51
+
52
+ --fam-input: #3b82f6;
53
+ --fam-op: #a855f7;
54
+ --fam-action: #f59e0b;
55
+ --fam-special: #ec4899;
56
+ --fam-other: #64748b;
57
+ --fam-on: #0b0e14;
58
+
59
+ /* The action family says more than "it is an action": what it DOES is the
60
+ colour, so a leaf is read at a glance without reading its text. */
61
+ --act-long: #22c55e;
62
+ --act-short: #ef4444;
63
+ --act-none: #6b7280;
64
+ --act-cancel: #eab308;
65
+ --act-clear: #14b8a6;
66
+ --act-placeholder: #4b5563;
67
+ }
68
+
69
+ /* ---- Light ---- */
70
+ :root[data-theme="light"] {
71
+ --bg: #eef1f6;
72
+ --bg-grid: #e3e7ee;
73
+ --grid-line: #e8ebf1;
74
+ --panel: #ffffff;
75
+ --panel-2: #f7f9fc;
76
+ --item: #eceff5;
77
+ --line: #d6dbe4;
78
+ --text: #1a2230;
79
+ --text-dim: #5a6577;
80
+ --text-faint: #8b95a6;
81
+ --accent: #2563eb;
82
+ --accent-soft: rgba(37, 99, 235, 0.12);
83
+ --ok: #16a34a;
84
+ --warn: #b45309;
85
+ --bad: #dc2626;
86
+ --shadow: 0 6px 16px rgba(24, 33, 51, 0.12);
87
+
88
+ --card-bg: #ffffff;
89
+ --card-line: #d3d9e3;
90
+ --card-repr: #1f2733;
91
+ --card-meta: #6b7686;
92
+ --card-active-ring: #0284c7;
93
+
94
+ --fam-input: #2563eb;
95
+ --fam-op: #7c3aed;
96
+ --fam-action: #d97706;
97
+ --fam-special: #db2777;
98
+ --fam-other: #64748b;
99
+ --fam-on: #ffffff;
100
+
101
+ --act-long: #16a34a;
102
+ --act-short: #dc2626;
103
+ --act-none: #64748b;
104
+ --act-cancel: #ca8a04;
105
+ --act-clear: #0d9488;
106
+ --act-placeholder: #94a3b8;
107
+ }
108
+
109
+ * { box-sizing: border-box; }
110
+
111
+ html, body {
112
+ height: 100%;
113
+ margin: 0;
114
+ }
115
+
116
+ body {
117
+ display: flex;
118
+ flex-direction: column;
119
+ background: var(--bg);
120
+ color: var(--text);
121
+ font-family: var(--font-ui);
122
+ font-size: 13px;
123
+ overflow: hidden;
124
+ }
125
+
126
+ /* ============================ Title bar ============================ */
127
+
128
+ #titlebar {
129
+ height: var(--titlebar-h);
130
+ flex: 0 0 auto;
131
+ display: flex;
132
+ align-items: center;
133
+ gap: 16px;
134
+ padding: 0 16px;
135
+ background: var(--panel);
136
+ border-bottom: 1px solid var(--line);
137
+ z-index: 5;
138
+ }
139
+
140
+ .brand {
141
+ display: flex;
142
+ align-items: center;
143
+ gap: 8px;
144
+ font-weight: 600;
145
+ letter-spacing: 0.2px;
146
+ }
147
+
148
+ .brand-mark {
149
+ display: grid;
150
+ place-items: center;
151
+ width: 24px;
152
+ height: 24px;
153
+ border-radius: var(--radius-sm);
154
+ background: var(--accent-soft);
155
+ color: var(--accent);
156
+ font-size: 15px;
157
+ }
158
+
159
+ .graph-title {
160
+ flex: 1 1 auto;
161
+ min-width: 0;
162
+ font-family: var(--font-mono);
163
+ color: var(--text-dim);
164
+ white-space: nowrap;
165
+ overflow: hidden;
166
+ text-overflow: ellipsis;
167
+ }
168
+
169
+ .title-stats {
170
+ display: flex;
171
+ align-items: center;
172
+ gap: 8px;
173
+ }
174
+
175
+ .stat {
176
+ padding: 3px 9px;
177
+ border: 1px solid var(--line);
178
+ border-radius: 999px;
179
+ background: var(--panel-2);
180
+ color: var(--text-dim);
181
+ font-size: 12px;
182
+ white-space: nowrap;
183
+ }
184
+
185
+ .stat b {
186
+ color: var(--text);
187
+ font-weight: 600;
188
+ }
189
+
190
+ /* ============================ Shell ============================ */
191
+
192
+ #shell {
193
+ flex: 1 1 auto;
194
+ min-height: 0;
195
+ display: flex;
196
+ }
197
+
198
+ #sidebar {
199
+ width: var(--sidebar-w);
200
+ flex: 0 0 var(--sidebar-w);
201
+ background: var(--panel);
202
+ border-right: 1px solid var(--line);
203
+ overflow-y: auto;
204
+ padding: 12px;
205
+ display: flex;
206
+ flex-direction: column;
207
+ gap: 12px;
208
+ }
209
+
210
+ .panel {
211
+ background: var(--panel-2);
212
+ border: 1px solid var(--line);
213
+ border-radius: var(--radius-md);
214
+ padding: 10px 12px 12px;
215
+ }
216
+
217
+ .panel-title {
218
+ margin: 0 0 10px;
219
+ font-size: 11px;
220
+ font-weight: 600;
221
+ letter-spacing: 0.9px;
222
+ text-transform: uppercase;
223
+ color: var(--text-faint);
224
+ }
225
+
226
+ /* ---- A panel folds ---- */
227
+
228
+ .panel-toggle {
229
+ display: flex;
230
+ align-items: center;
231
+ justify-content: space-between;
232
+ gap: 8px;
233
+ cursor: pointer;
234
+ user-select: none;
235
+ }
236
+
237
+ .panel-toggle:hover {
238
+ color: var(--text-dim);
239
+ }
240
+
241
+ .panel-toggle:focus-visible {
242
+ outline: 1px solid var(--accent);
243
+ outline-offset: 3px;
244
+ border-radius: var(--radius-sm);
245
+ }
246
+
247
+ .panel-caret {
248
+ width: 0;
249
+ height: 0;
250
+ border-left: 4px solid transparent;
251
+ border-right: 4px solid transparent;
252
+ border-top: 5px solid currentColor;
253
+ transition: transform var(--t-fast) ease;
254
+ }
255
+
256
+ .panel.is-collapsed .panel-caret {
257
+ transform: rotate(-90deg);
258
+ }
259
+
260
+ .panel.is-collapsed .panel-title {
261
+ margin-bottom: 0;
262
+ }
263
+
264
+ .panel.is-collapsed .panel-body {
265
+ display: none;
266
+ }
267
+
268
+ .field {
269
+ margin-bottom: 10px;
270
+ }
271
+
272
+ .field:last-child {
273
+ margin-bottom: 0;
274
+ }
275
+
276
+ .field-label {
277
+ display: block;
278
+ margin-bottom: 5px;
279
+ font-size: 11px;
280
+ color: var(--text-dim);
281
+ }
282
+
283
+ /* ---- Segmented control ---- */
284
+
285
+ .segmented {
286
+ display: flex;
287
+ border: 1px solid var(--line);
288
+ border-radius: var(--radius-sm);
289
+ overflow: hidden;
290
+ }
291
+
292
+ .segmented button {
293
+ flex: 1 1 0;
294
+ padding: 5px 6px;
295
+ border: 0;
296
+ background: var(--item);
297
+ color: var(--text-dim);
298
+ font: inherit;
299
+ font-size: 12px;
300
+ cursor: pointer;
301
+ transition: background var(--t-fast), color var(--t-fast);
302
+ }
303
+
304
+ .segmented button + button {
305
+ border-left: 1px solid var(--line);
306
+ }
307
+
308
+ .segmented button:hover {
309
+ color: var(--text);
310
+ }
311
+
312
+ .segmented button.active {
313
+ background: var(--accent-soft);
314
+ color: var(--accent);
315
+ font-weight: 600;
316
+ }
317
+
318
+ /* ---- Buttons ---- */
319
+
320
+ .btn-row {
321
+ display: flex;
322
+ gap: 6px;
323
+ margin-bottom: 8px;
324
+ }
325
+
326
+ .btn-row:last-child {
327
+ margin-bottom: 0;
328
+ }
329
+
330
+ .btn {
331
+ flex: 1 1 auto;
332
+ padding: 6px 8px;
333
+ border: 1px solid var(--line);
334
+ border-radius: var(--radius-sm);
335
+ background: var(--item);
336
+ color: var(--text);
337
+ font: inherit;
338
+ font-size: 12px;
339
+ cursor: pointer;
340
+ transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
341
+ }
342
+
343
+ .btn:hover {
344
+ border-color: var(--accent);
345
+ color: var(--accent);
346
+ }
347
+
348
+ .btn:active {
349
+ transform: translateY(1px);
350
+ }
351
+
352
+ .btn-primary {
353
+ background: var(--accent-soft);
354
+ border-color: var(--accent);
355
+ color: var(--accent);
356
+ font-weight: 600;
357
+ }
358
+
359
+ .btn[disabled] {
360
+ opacity: 0.45;
361
+ cursor: not-allowed;
362
+ }
363
+
364
+ .icon-btn {
365
+ width: 26px;
366
+ height: 26px;
367
+ display: grid;
368
+ place-items: center;
369
+ border: 1px solid var(--line);
370
+ border-radius: var(--radius-sm);
371
+ background: var(--item);
372
+ color: var(--text-dim);
373
+ cursor: pointer;
374
+ font: inherit;
375
+ }
376
+
377
+ .icon-btn:hover {
378
+ color: var(--accent);
379
+ border-color: var(--accent);
380
+ }
381
+
382
+ /* ---- Switch ---- */
383
+
384
+ .switch-row {
385
+ display: flex;
386
+ align-items: center;
387
+ gap: 8px;
388
+ margin-bottom: 8px;
389
+ cursor: pointer;
390
+ user-select: none;
391
+ }
392
+
393
+ .switch-row input {
394
+ position: absolute;
395
+ opacity: 0;
396
+ pointer-events: none;
397
+ }
398
+
399
+ .switch-track {
400
+ flex: 0 0 auto;
401
+ width: 30px;
402
+ height: 17px;
403
+ border-radius: 999px;
404
+ background: var(--item);
405
+ border: 1px solid var(--line);
406
+ position: relative;
407
+ transition: background var(--t-fast), border-color var(--t-fast);
408
+ }
409
+
410
+ .switch-knob {
411
+ position: absolute;
412
+ top: 2px;
413
+ left: 2px;
414
+ width: 11px;
415
+ height: 11px;
416
+ border-radius: 50%;
417
+ background: var(--text-faint);
418
+ transition: transform var(--t-fast), background var(--t-fast);
419
+ }
420
+
421
+ .switch-row input:checked + .switch-track {
422
+ background: var(--accent-soft);
423
+ border-color: var(--accent);
424
+ }
425
+
426
+ .switch-row input:checked + .switch-track .switch-knob {
427
+ transform: translateX(13px);
428
+ background: var(--accent);
429
+ }
430
+
431
+ .switch-text {
432
+ font-size: 12px;
433
+ color: var(--text-dim);
434
+ }
435
+
436
+ /* ---- Readout ---- */
437
+
438
+ .readout {
439
+ margin: 0;
440
+ display: flex;
441
+ flex-direction: column;
442
+ gap: 3px;
443
+ }
444
+
445
+ .readout > div {
446
+ display: flex;
447
+ gap: 8px;
448
+ align-items: baseline;
449
+ }
450
+
451
+ .readout dt {
452
+ flex: 0 0 58px;
453
+ color: var(--text-faint);
454
+ font-size: 11px;
455
+ text-transform: uppercase;
456
+ letter-spacing: 0.5px;
457
+ }
458
+
459
+ .readout dd {
460
+ margin: 0;
461
+ flex: 1 1 auto;
462
+ min-width: 0;
463
+ font-family: var(--font-mono);
464
+ font-size: 12px;
465
+ color: var(--text);
466
+ overflow-wrap: anywhere;
467
+ }
468
+
469
+ .readout-wide dt {
470
+ flex: 0 0 72px;
471
+ }
472
+
473
+ /* ---- Sliders ---- */
474
+
475
+ .slider-row {
476
+ display: grid;
477
+ grid-template-columns: 1fr auto;
478
+ align-items: center;
479
+ column-gap: 8px;
480
+ row-gap: 3px;
481
+ margin-bottom: 10px;
482
+ cursor: pointer;
483
+ }
484
+
485
+ .slider-row:last-of-type {
486
+ margin-bottom: 8px;
487
+ }
488
+
489
+ .slider-label {
490
+ grid-column: 1;
491
+ font-size: 11px;
492
+ color: var(--text-dim);
493
+ }
494
+
495
+ .slider-value {
496
+ grid-column: 2;
497
+ font-family: var(--font-mono);
498
+ font-size: 11px;
499
+ color: var(--text-faint);
500
+ }
501
+
502
+ .slider-row input[type="range"] {
503
+ grid-column: 1 / -1;
504
+ width: 100%;
505
+ height: 16px;
506
+ margin: 0;
507
+ accent-color: var(--accent);
508
+ cursor: pointer;
509
+ }
510
+
511
+ /* ---- Chips ---- */
512
+
513
+ .chips {
514
+ display: flex;
515
+ flex-wrap: wrap;
516
+ gap: 5px;
517
+ }
518
+
519
+ /* The logic groups: one label per row. A group name is a word or two, and a
520
+ wrapped row of chips reads as a sentence rather than as a list. */
521
+ #ctl-groups {
522
+ flex-direction: column;
523
+ align-items: stretch;
524
+ }
525
+
526
+ #ctl-groups .chip {
527
+ text-align: left;
528
+ overflow-wrap: anywhere;
529
+ }
530
+
531
+ .chip {
532
+ padding: 3px 9px;
533
+ border: 1px solid var(--line);
534
+ border-radius: 999px;
535
+ background: var(--item);
536
+ color: var(--text-dim);
537
+ font-size: 11px;
538
+ cursor: pointer;
539
+ transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
540
+ }
541
+
542
+ .chip:hover {
543
+ color: var(--text);
544
+ }
545
+
546
+ .chip.active {
547
+ background: var(--accent-soft);
548
+ border-color: var(--accent);
549
+ color: var(--accent);
550
+ font-weight: 600;
551
+ }
552
+
553
+ .hint {
554
+ margin: 8px 0 0;
555
+ font-size: 11px;
556
+ line-height: 1.45;
557
+ color: var(--text-faint);
558
+ }
559
+
560
+ .hint.is-error {
561
+ color: var(--bad);
562
+ }
563
+
564
+ .hint.is-ok {
565
+ color: var(--ok);
566
+ }
567
+
568
+ .textarea {
569
+ width: 100%;
570
+ resize: vertical;
571
+ padding: 6px 8px;
572
+ margin-bottom: 8px;
573
+ border: 1px solid var(--line);
574
+ border-radius: var(--radius-sm);
575
+ background: var(--item);
576
+ color: var(--text);
577
+ font-family: var(--font-mono);
578
+ font-size: 11px;
579
+ line-height: 1.5;
580
+ }
581
+
582
+ .textarea:focus {
583
+ outline: none;
584
+ border-color: var(--accent);
585
+ }
586
+
587
+ /* ============================ Stage ============================ */
588
+
589
+ #stage {
590
+ flex: 1 1 auto;
591
+ min-width: 0;
592
+ position: relative;
593
+ overflow: hidden;
594
+ background-color: var(--bg-grid);
595
+ /* The grid the cards are laid out on: paper, not edges. */
596
+ background-image:
597
+ linear-gradient(var(--grid-line) 1px, transparent 1px),
598
+ linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
599
+ background-size: 24px 24px, 24px 24px;
600
+ }
601
+
602
+ #canvas {
603
+ position: absolute;
604
+ inset: 0;
605
+ cursor: grab;
606
+ }
607
+
608
+ #canvas.is-panning {
609
+ cursor: grabbing;
610
+ }
611
+
612
+ #graph {
613
+ width: 100%;
614
+ height: 100%;
615
+ display: block;
616
+ touch-action: none;
617
+ }
618
+
619
+ /* `hidden` has to win over the layout below it, or a page that drew nothing
620
+ would say it drew nothing forever - including when it drew something. */
621
+ #empty-note[hidden] {
622
+ display: none;
623
+ }
624
+
625
+ #empty-note.is-visible {
626
+ display: grid;
627
+ }
628
+
629
+ #empty-note {
630
+ position: absolute;
631
+ inset: 0;
632
+ display: none;
633
+ place-items: center;
634
+ padding: 24px;
635
+ text-align: center;
636
+ color: var(--text-faint);
637
+ font-size: 13px;
638
+ }
639
+
640
+ /* ============================ Edges ============================ */
641
+
642
+ .edge {
643
+ fill: none;
644
+ stroke: var(--line);
645
+ /* Set from the presentation slider; the active line is a multiple of it. */
646
+ stroke-width: var(--edge-width, 1.6);
647
+ transition: stroke var(--t-slow), stroke-width var(--t-slow), opacity var(--t-slow);
648
+ }
649
+
650
+ .edge.is-active {
651
+ stroke: var(--card-active-ring);
652
+ stroke-width: calc(var(--edge-width, 1.6) * 1.6);
653
+ }
654
+
655
+ .edge.is-dim {
656
+ opacity: 0.25;
657
+ }
658
+
659
+ .vlink {
660
+ fill: none;
661
+ stroke: var(--fam-special);
662
+ stroke-width: var(--edge-width, 1.6);
663
+ stroke-dasharray: 6 5;
664
+ opacity: 0.75;
665
+ transition: opacity var(--t-slow);
666
+ }
667
+
668
+ .vlink.is-dim {
669
+ opacity: 0.18;
670
+ }
671
+
672
+ .edge-chip {
673
+ transition: opacity var(--t-slow);
674
+ }
675
+
676
+ .edge-chip.is-dim {
677
+ opacity: 0.25;
678
+ }
679
+
680
+ .edge-chip.is-active .edge-chip-bg {
681
+ stroke: var(--card-active-ring);
682
+ stroke-width: 1.6;
683
+ }
684
+
685
+ .edge-chip.is-active .edge-chip-text {
686
+ fill: var(--card-active-ring);
687
+ }
688
+
689
+ .edge-chip-bg {
690
+ fill: var(--panel);
691
+ stroke: var(--line);
692
+ stroke-width: 1;
693
+ }
694
+
695
+ .edge-chip-text {
696
+ fill: var(--text-dim);
697
+ font-family: var(--font-mono);
698
+ font-size: 10px;
699
+ dominant-baseline: middle;
700
+ text-anchor: middle;
701
+ }
702
+
703
+ .edge-chip.is-true .edge-chip-bg { stroke: var(--ok); }
704
+ .edge-chip.is-false .edge-chip-bg { stroke: var(--bad); }
705
+ .edge-chip.is-else .edge-chip-bg { stroke: var(--warn); }
706
+ .edge-chip.is-value .edge-chip-bg { stroke: var(--accent); }
707
+
708
+ /* ============================ Cards ============================ */
709
+
710
+ .card {
711
+ cursor: pointer;
712
+ }
713
+
714
+ /* The copy of what has just left the drawing. It is there to be looked at on
715
+ its way out, not to be touched or read. */
716
+ .ghost-layer {
717
+ pointer-events: none;
718
+ }
719
+
720
+ .card-body {
721
+ fill: var(--card-bg);
722
+ stroke: var(--card-line);
723
+ stroke-width: 1.4;
724
+ transition: stroke var(--t-slow), stroke-width var(--t-slow);
725
+ }
726
+
727
+ .card-band {
728
+ fill: var(--fam-other);
729
+ }
730
+
731
+ .card.fam-INPUT .card-band { fill: var(--fam-input); }
732
+ .card.fam-OP .card-band { fill: var(--fam-op); }
733
+ .card.fam-ACTION .card-band { fill: var(--fam-action); }
734
+ .card.fam-SPECIAL .card-band { fill: var(--fam-special); }
735
+ .card.fam-OTHER .card-band { fill: var(--fam-other); }
736
+
737
+ /* An action node's own colour, on top of its family's: the family says where
738
+ it sits, the type says what it does. These follow the family rules, so the
739
+ order here is what gives them the last word. */
740
+ .card.type-LONGACTION .card-band { fill: var(--act-long); }
741
+ .card.type-SHORTACTION .card-band { fill: var(--act-short); }
742
+ .card.type-NOACTION .card-band { fill: var(--act-none); }
743
+ .card.type-CANCELACTION .card-band { fill: var(--act-cancel); }
744
+ .card.type-CLEARACTION .card-band { fill: var(--act-clear); }
745
+ .card.type-PLACEHOLDER .card-band { fill: var(--act-placeholder); }
746
+
747
+ .card-type {
748
+ fill: var(--fam-on);
749
+ font-family: var(--font-ui);
750
+ font-size: 10px;
751
+ font-weight: 700;
752
+ letter-spacing: 0.8px;
753
+ dominant-baseline: middle;
754
+ }
755
+
756
+ .card-badge-text {
757
+ /* The band's own contrast colour, not the card's: a badge sits ON the band,
758
+ and a grey band under grey text is a badge nobody can read. */
759
+ fill: var(--fam-on);
760
+ opacity: 0.72;
761
+ font-family: var(--font-ui);
762
+ font-size: 9px;
763
+ dominant-baseline: middle;
764
+ text-anchor: end;
765
+ }
766
+
767
+ .card-repr {
768
+ fill: var(--card-repr);
769
+ font-family: var(--font-mono);
770
+ font-size: 11.5px;
771
+ dominant-baseline: middle;
772
+ }
773
+
774
+ .card-meta {
775
+ fill: var(--card-meta);
776
+ font-family: var(--font-mono);
777
+ font-size: 10px;
778
+ dominant-baseline: middle;
779
+ }
780
+
781
+ .card.is-active .card-body {
782
+ stroke: var(--card-active-ring);
783
+ stroke-width: 2.2;
784
+ }
785
+
786
+ .card.is-active .card-band {
787
+ filter: saturate(1.25) brightness(1.08);
788
+ }
789
+
790
+ .card.is-dim {
791
+ opacity: 0.28;
792
+ }
793
+
794
+ .card.is-selected .card-body {
795
+ stroke: var(--accent);
796
+ stroke-width: 2.6;
797
+ }
798
+
799
+ .card.is-failed .card-body {
800
+ stroke: var(--bad);
801
+ stroke-width: 2.2;
802
+ }
803
+
804
+ .card.is-leaf .card-repr {
805
+ font-weight: 600;
806
+ }
807
+
808
+ .card-note {
809
+ fill: var(--text-faint);
810
+ font-family: var(--font-ui);
811
+ font-size: 9px;
812
+ font-style: italic;
813
+ dominant-baseline: middle;
814
+ }
815
+
816
+ .card-toggle-bg {
817
+ fill: var(--item);
818
+ stroke: var(--card-line);
819
+ stroke-width: 1;
820
+ }
821
+
822
+ .card-toggle-text {
823
+ fill: var(--text-dim);
824
+ font-family: var(--font-mono);
825
+ font-size: 10px;
826
+ dominant-baseline: middle;
827
+ text-anchor: middle;
828
+ }
829
+
830
+ .card:hover .card-body {
831
+ stroke: var(--accent);
832
+ }
833
+
834
+ /* ============================ Inspector ============================ */
835
+
836
+ #inspector {
837
+ position: absolute;
838
+ right: 16px;
839
+ bottom: 16px;
840
+ width: 340px;
841
+ max-height: 60vh;
842
+ overflow-y: auto;
843
+ padding: 12px;
844
+ border: 1px solid var(--line);
845
+ border-radius: var(--radius-lg);
846
+ background: var(--panel);
847
+ box-shadow: var(--shadow);
848
+ z-index: 8;
849
+ }
850
+
851
+ .inspector-head {
852
+ display: flex;
853
+ align-items: center;
854
+ justify-content: space-between;
855
+ margin-bottom: 10px;
856
+ }
857
+
858
+ .inspector-type {
859
+ font-family: var(--font-mono);
860
+ font-size: 12px;
861
+ font-weight: 700;
862
+ letter-spacing: 0.6px;
863
+ color: var(--accent);
864
+ }
865
+
866
+ .inspector-block {
867
+ margin-top: 10px;
868
+ padding-top: 10px;
869
+ border-top: 1px solid var(--line);
870
+ }
871
+
872
+ .field-note {
873
+ color: var(--text-faint);
874
+ font-weight: 400;
875
+ letter-spacing: 0;
876
+ text-transform: none;
877
+ }
878
+
879
+ #ins-arms,
880
+ #ins-operands {
881
+ margin: 6px 0 0;
882
+ padding: 0;
883
+ list-style: none;
884
+ display: flex;
885
+ flex-direction: column;
886
+ gap: 4px;
887
+ font-family: var(--font-mono);
888
+ font-size: 11px;
889
+ color: var(--text-dim);
890
+ }
891
+
892
+ #ins-arms li,
893
+ #ins-operands li {
894
+ display: flex;
895
+ gap: 6px;
896
+ align-items: baseline;
897
+ }
898
+
899
+ #ins-arms .arm-key,
900
+ #ins-operands .arm-key {
901
+ flex: 0 0 auto;
902
+ padding: 1px 6px;
903
+ border-radius: var(--radius-sm);
904
+ background: var(--item);
905
+ color: var(--text);
906
+ }
907
+
908
+ #ins-arms .arm-key.is-true { color: var(--ok); }
909
+ #ins-arms .arm-key.is-false { color: var(--bad); }
910
+ #ins-arms .arm-key.is-else { color: var(--warn); }
911
+
912
+ #ins-arms .arm-name,
913
+ #ins-operands .arm-name {
914
+ min-width: 0;
915
+ overflow-wrap: anywhere;
916
+ }
917
+
918
+ #ins-operands .arm-name.is-own {
919
+ color: var(--text);
920
+ }