@venizia/vulcan 0.4.8-0 → 0.4.9-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/hooks/antigravity-guards.ts +2 -1
- package/base/hooks/codex-guards.ts +2 -1
- package/base/hooks/guard-manifest.ts +2 -1
- package/base/hooks/guard-package.ts +2 -1
- package/base/hooks/guard-remote-hosts.ts +9 -3
- package/base/hooks/guard-scripting.ts +2 -1
- package/base/hooks/guard-writes.ts +14 -4
- package/base/hooks/post-tool.ts +2 -1
- package/base/hooks/prompt-submit.ts +2 -1
- package/base/hooks/session-start.ts +3 -1
- package/base/hooks/stop.ts +2 -1
- package/base/make/vulcan.mk +1 -4
- package/base/skills/build-a-feature/SKILL.md +1 -1
- package/base/skills/docs-update/SKILL.md +11 -5
- package/base/skills/docs-update/evals/evals.json +1 -1
- package/base/skills/docs-writing/SKILL.md +1 -1
- package/base/skills/plan-a-change/references/spec-card.md +1 -1
- package/base/skills/ship/SKILL.md +1 -1
- package/base/skills/visualize-work/SKILL.md +20 -6
- package/base/skills/visualize-work/references/spec.md +16 -5
- package/package.json +5 -6
- package/src/agents/codex-hooks.ts +11 -10
- package/src/agents/common/types.ts +1 -1
- package/src/agents/exclude.ts +1 -1
- package/src/agents/hooks-json.ts +4 -8
- package/src/agents/prompt.ts +2 -2
- package/src/agents/render.ts +8 -12
- package/src/cli.ts +3 -1
- package/src/commands/doctor.command.ts +3 -1
- package/src/commands/help.command.ts +11 -9
- package/src/commands/init.command.ts +3 -1
- package/src/commands/profile.command.ts +1 -1
- package/src/commands/upgrade.command.ts +5 -3
- package/src/commands/visualize.command.ts +23 -2
- package/src/common/index.ts +2 -0
- package/src/common/layout-folder.ts +2 -20
- package/src/common/record.ts +7 -0
- package/src/common/text.ts +7 -0
- package/src/config/common/constants.ts +13 -1
- package/src/config/common/types.ts +8 -1
- package/src/config/loader.ts +4 -2
- package/src/config/packages.ts +4 -1
- package/src/config/schema.ts +51 -4
- package/src/create/add-app.ts +170 -69
- package/src/create/add-lib.ts +41 -31
- package/src/create/common/constants.ts +1 -0
- package/src/create/common/failure.ts +10 -0
- package/src/create/common/index.ts +2 -0
- package/src/create/common/preset-path.ts +11 -0
- package/src/create/common/types.ts +7 -2
- package/src/create/init-monorepo.ts +5 -2
- package/src/create/lib-preset.ts +22 -17
- package/src/create/names.ts +1 -1
- package/src/create/next.ts +1 -1
- package/src/create/preset-diff.ts +232 -55
- package/src/create/preset-menu.ts +3 -3
- package/src/create/preset.ts +18 -10
- package/src/create/process.ts +4 -2
- package/src/create/scratch.ts +3 -1
- package/src/create/workspace.ts +37 -20
- package/src/doctor/checks.ts +74 -16
- package/src/doctor/runner.ts +2 -0
- package/src/doctor/tags.ts +2 -4
- package/src/hooks/codex-patch.ts +2 -2
- package/src/hooks/common/constants.ts +0 -3
- package/src/hooks/common/types.ts +15 -1
- package/src/hooks/decision.ts +1 -5
- package/src/hooks/guard-git.ts +1 -1
- package/src/hooks/guard-outside.ts +28 -9
- package/src/hooks/guard-package.ts +13 -7
- package/src/hooks/guard-scripting.ts +1 -1
- package/src/hooks/guard-writes.ts +73 -20
- package/src/hooks/owner-reply.ts +1 -1
- package/src/hooks/project-guards.ts +39 -4
- package/src/hooks/remote-hosts.ts +5 -20
- package/src/hooks/session-digest.ts +7 -0
- package/src/hooks/shell.ts +13 -4
- package/src/hooks/trusted-scripts.ts +80 -4
- package/src/init/common/types.ts +1 -1
- package/src/init/scaffold.ts +2 -2
- package/src/local/clean.ts +1 -1
- package/src/local/scan.ts +2 -2
- package/src/manifest/render.ts +20 -11
- package/src/owner/profile.ts +1 -3
- package/src/owner/shape.ts +1 -1
- package/src/owner/survey.ts +27 -18
- package/src/router.ts +4 -1
- package/src/rules/common/types.ts +1 -1
- package/src/signals/state.ts +1 -4
- package/src/sync/agent-removal.ts +7 -10
- package/src/sync/claude-launch.ts +36 -1
- package/src/sync/common/constants.ts +4 -0
- package/src/sync/common/index.ts +1 -0
- package/src/sync/common/symlink.ts +9 -0
- package/src/sync/common/types.ts +2 -2
- package/src/sync/planner.ts +10 -12
- package/src/sync/settings.ts +1 -1
- package/src/ui/keyboard.ts +3 -1
- package/src/ui/prompt.ts +4 -2
- package/src/visualize/assets.ts +370 -195
- package/src/visualize/charts.ts +11 -2
- package/src/visualize/compare-css.ts +30 -0
- package/src/visualize/compare-render.ts +194 -0
- package/src/visualize/compare-schema.ts +81 -0
- package/src/visualize/compare-validate.ts +126 -0
- package/src/visualize/constants.ts +29 -3
- package/src/visualize/diagrams.ts +1 -1
- package/src/visualize/gate.ts +136 -0
- package/src/visualize/icons.ts +5 -2
- package/src/visualize/index.ts +2 -0
- package/src/visualize/kinds-css.ts +54 -0
- package/src/visualize/kinds-render.ts +693 -0
- package/src/visualize/kinds-schema.ts +148 -0
- package/src/visualize/kinds-validate.ts +184 -0
- package/src/visualize/labels-vi.ts +109 -0
- package/src/visualize/labels.ts +49 -0
- package/src/visualize/layout.ts +10 -5
- package/src/visualize/page.ts +99 -61
- package/src/visualize/render.ts +48 -7
- package/src/visualize/schema.ts +21 -1
- package/src/visualize/sections.ts +115 -34
- package/src/visualize/sources.ts +270 -0
- package/src/visualize/theme.ts +472 -0
- package/src/visualize/validate.ts +6 -0
- package/src/wiki/anchors.ts +1 -1
- package/src/wiki/source-links.ts +3 -5
package/src/visualize/assets.ts
CHANGED
|
@@ -1,192 +1,364 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/** The colours a state or a chart series needs that are not the project's: the same names in both themes. */
|
|
2
|
+
export interface IStatePalette {
|
|
3
|
+
ok: string;
|
|
4
|
+
okBg: string;
|
|
5
|
+
warn: string;
|
|
6
|
+
warnBg: string;
|
|
7
|
+
bad: string;
|
|
8
|
+
badBg: string;
|
|
9
|
+
info: string;
|
|
10
|
+
infoBg: string;
|
|
11
|
+
s1: string;
|
|
12
|
+
s2: string;
|
|
13
|
+
s3: string;
|
|
14
|
+
s4: string;
|
|
15
|
+
s5: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Fixed state colours and the five chart series. `warn` is the amber of an inferred claim; a task that waits for the
|
|
20
|
+
* owner is the project's hot accent instead, so what needs the owner is one colour on the page.
|
|
21
|
+
*/
|
|
22
|
+
export const STATE_PALETTE: { light: IStatePalette; dark: IStatePalette } = {
|
|
23
|
+
light: {
|
|
24
|
+
ok: '#157a3a',
|
|
25
|
+
okBg: '#e4f3e8',
|
|
26
|
+
warn: '#9c5a06',
|
|
27
|
+
warnBg: '#fcefd8',
|
|
28
|
+
bad: '#bd2820',
|
|
29
|
+
badBg: '#fbe8e6',
|
|
30
|
+
info: '#1c5ccc',
|
|
31
|
+
infoBg: '#e6edfb',
|
|
32
|
+
s1: '#2a78d6',
|
|
33
|
+
s2: '#eb6834',
|
|
34
|
+
s3: '#1baf7a',
|
|
35
|
+
s4: '#eda100',
|
|
36
|
+
s5: '#e87ba4',
|
|
37
|
+
},
|
|
38
|
+
dark: {
|
|
39
|
+
ok: '#5fd18a',
|
|
40
|
+
okBg: '#13261b',
|
|
41
|
+
warn: '#f0b955',
|
|
42
|
+
warnBg: '#2b2212',
|
|
43
|
+
bad: '#ff8a80',
|
|
44
|
+
badBg: '#2d1816',
|
|
45
|
+
info: '#7ab0ff',
|
|
46
|
+
infoBg: '#14213a',
|
|
47
|
+
s1: '#3987e5',
|
|
48
|
+
s2: '#d95926',
|
|
49
|
+
s3: '#199e70',
|
|
50
|
+
s4: '#c98500',
|
|
51
|
+
s5: '#d55181',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const declarations = (opts: { palette: IStatePalette }): string => {
|
|
56
|
+
const p = opts.palette;
|
|
57
|
+
|
|
58
|
+
return `--ok:${p.ok};--ok-bg:${p.okBg};--warn:${p.warn};--warn-bg:${p.warnBg};--bad:${p.bad};--bad-bg:${p.badBg};--info:${p.info};--info-bg:${p.infoBg};--s1:${p.s1};--s2:${p.s2};--s3:${p.s3};--s4:${p.s4};--s5:${p.s5}`;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** The state colours in the same three-block form as the project tokens: light, system dark, explicit dark. */
|
|
62
|
+
const STATE_CSS = `:root{${declarations({ palette: STATE_PALETTE.light })}}
|
|
63
|
+
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){${declarations({ palette: STATE_PALETTE.dark })}}}
|
|
64
|
+
:root[data-theme=dark]{${declarations({ palette: STATE_PALETTE.dark })}}`;
|
|
65
|
+
|
|
66
|
+
/** The dark values, set again on everything that sits on the always-dark slab. */
|
|
67
|
+
const SLAB_STATES = declarations({ palette: STATE_PALETTE.dark });
|
|
6
68
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
body{margin:0;background:var(--bg);color:var(--
|
|
14
|
-
h1,h2,h3,p,ol,ul,figure,blockquote{margin:0}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
.
|
|
67
|
-
.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
78
|
-
.
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.
|
|
93
|
-
.
|
|
94
|
-
.
|
|
95
|
-
.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.
|
|
111
|
-
.
|
|
112
|
-
.
|
|
113
|
-
.
|
|
114
|
-
.
|
|
115
|
-
.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.
|
|
119
|
-
.
|
|
120
|
-
.
|
|
121
|
-
.
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.
|
|
146
|
-
|
|
147
|
-
.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
.
|
|
154
|
-
|
|
155
|
-
.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
.
|
|
176
|
-
|
|
177
|
-
.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
69
|
+
const BASE_CSS = [
|
|
70
|
+
// Reset and the page.
|
|
71
|
+
`:root{--font:'Inter','Inter Display',system-ui,-apple-system,'Segoe UI',sans-serif;--code:ui-monospace,'JetBrains Mono',Menlo,Consolas,monospace;--radius:4px;--raise:var(--bg);--line:color-mix(in srgb,var(--ink) 12%,transparent)}`,
|
|
72
|
+
`*{box-sizing:border-box}`,
|
|
73
|
+
`html{-webkit-text-size-adjust:100%;scroll-padding-top:84px}`,
|
|
74
|
+
`@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}`,
|
|
75
|
+
`body{margin:0;background:var(--bg);color:var(--body);font:17px/1.55 var(--font);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}`,
|
|
76
|
+
`h1,h2,h3,p,ol,ul,figure,blockquote{margin:0}`,
|
|
77
|
+
`h1,h2,h3{color:var(--ink);text-wrap:balance;font-weight:650;letter-spacing:-.03em}`,
|
|
78
|
+
`ol,ul{padding:0;list-style:none}`,
|
|
79
|
+
`a{color:inherit;text-underline-offset:3px}`,
|
|
80
|
+
`code{font-family:var(--code);font-size:.88em}`,
|
|
81
|
+
`.wrap{max-width:1240px;margin:0 auto;padding-inline:16px}`,
|
|
82
|
+
`.ic{flex:none;display:inline-block;vertical-align:middle}`,
|
|
83
|
+
`.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}`,
|
|
84
|
+
`.mut{color:var(--muted)}`,
|
|
85
|
+
`:focus-visible{outline:2px solid var(--accent);outline-offset:2px}`,
|
|
86
|
+
// The slab, the figure window, the pull-quote, the top bar and the slide deck are dark in both themes: the page tokens are redefined for them.
|
|
87
|
+
`.slab,.win,.pull,.deck{--bg:var(--slab);--bg-soft:var(--slab-2);--raise:var(--slab-3);--ink:var(--slab-ink);--body:var(--slab-body);--muted:var(--slab-muted);--accent:var(--hot);--accent-soft:var(--slab-3);--accent-ink:var(--hot-ink);--line:#ffffff1f;${SLAB_STATES};color:var(--body);background-color:var(--slab)}`,
|
|
88
|
+
`.slab,.win,.pull{background-image:radial-gradient(var(--slab-dot) 1px,transparent 1.2px);background-size:16px 16px}`,
|
|
89
|
+
// The tone of a thing: a colour for marks and words, a tint for its field.
|
|
90
|
+
`.c-ok{--c:var(--ok);--cb:var(--ok-bg)}.c-warn{--c:var(--accent);--cb:var(--accent-soft)}.c-bad{--c:var(--bad);--cb:var(--bad-bg)}.c-info{--c:var(--info);--cb:var(--info-bg)}.c-mut{--c:var(--muted);--cb:var(--bg-soft)}`,
|
|
91
|
+
`.chip{display:inline-flex;align-items:center;gap:8px;color:var(--c);font:600 13.5px/1.2 var(--font);letter-spacing:.02em;white-space:nowrap}`,
|
|
92
|
+
`.lab{font:600 13.5px/1.3 var(--font);color:var(--muted)}`,
|
|
93
|
+
`.inl{display:inline-flex;margin-right:6px;color:var(--c)}`,
|
|
94
|
+
`.btn{font:600 13.5px/1.2 var(--font);color:var(--body);background:transparent;border:1px solid var(--line);border-radius:var(--radius);padding:8px 12px;cursor:pointer;transition:color .2s,background-color .2s,border-color .2s}`,
|
|
95
|
+
`.btn:hover{color:var(--ink);border-color:var(--muted)}`,
|
|
96
|
+
`.btn:focus-visible{outline:2px solid var(--accent)}`,
|
|
97
|
+
`.btn[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}`,
|
|
98
|
+
`html:not(.js) .js-only,html:not(.js) .theme{display:none}`,
|
|
99
|
+
`html:not(.js) .steps button{cursor:default;pointer-events:none}`,
|
|
100
|
+
// The top bar: part of the slab, sticky, 64 px, with the theme switch.
|
|
101
|
+
`body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--slab)}`,
|
|
102
|
+
`.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:9;box-shadow:inset 0 -1px 0 #ffffff14}`,
|
|
103
|
+
`.top .wrap{height:64px;display:flex;align-items:center;gap:14px}`,
|
|
104
|
+
`.mark{width:13px;height:17px;fill:var(--hot);flex:none}`,
|
|
105
|
+
`.top .ttl{color:var(--ink);font-weight:650;font-size:16px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:36ch}`,
|
|
106
|
+
`.top nav{margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0}`,
|
|
107
|
+
`.top .links{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;min-width:0;mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent)}`,
|
|
108
|
+
`.top .links::-webkit-scrollbar{display:none}`,
|
|
109
|
+
`.top .links a{color:var(--body);text-decoration:none;font-size:14.5px;font-weight:500;padding:8px 10px;border-radius:var(--radius);white-space:nowrap;transition:color .2s,background-color .2s}`,
|
|
110
|
+
`.top .links a:hover{color:var(--ink);background:#ffffff0d}`,
|
|
111
|
+
`.top .sep{width:1px;height:20px;background:#ffffff1f;margin:0 8px;flex:none}`,
|
|
112
|
+
`.top .stamp{color:var(--muted);font-size:13.5px;white-space:nowrap}`,
|
|
113
|
+
`.theme{all:unset;box-sizing:border-box;cursor:pointer;position:relative;width:36px;height:36px;border-radius:var(--radius);color:var(--body);flex:none;transition:color .25s,background-color .25s}`,
|
|
114
|
+
`.theme:hover{color:var(--ink);background:#ffffff0d}`,
|
|
115
|
+
`.theme:focus-visible{outline:2px solid var(--hot);outline-offset:1px}`,
|
|
116
|
+
`.theme svg{position:absolute;top:8px;left:8px;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .4s cubic-bezier(.22,1,.36,1),opacity .25s ease}`,
|
|
117
|
+
`.theme .moon{opacity:0;transform:rotate(-90deg) scale(.6)}`,
|
|
118
|
+
`:root[data-theme=dark] .theme .sun{opacity:0;transform:rotate(90deg) scale(.6)}:root[data-theme=dark] .theme .moon{opacity:1;transform:none}`,
|
|
119
|
+
`@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .theme .sun{opacity:0;transform:rotate(90deg) scale(.6)}:root:not([data-theme=light]) .theme .moon{opacity:1;transform:none}}`,
|
|
120
|
+
`.theme .tip{position:absolute;top:calc(100% + 8px);right:0;white-space:nowrap;background:var(--slab-2);color:var(--slab-ink);font-size:13px;padding:6px 10px;border-radius:var(--radius);opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .15s,transform .15s;box-shadow:0 8px 24px #0006}`,
|
|
121
|
+
`.theme:hover .tip,.theme:focus-visible .tip{opacity:1;transform:none}`,
|
|
122
|
+
`::view-transition-old(root),::view-transition-new(root){animation-duration:200ms;animation-timing-function:ease}`,
|
|
123
|
+
`.theme-fade,.theme-fade *{transition:background-color .2s ease,color .2s ease,fill .2s ease,stroke .2s ease!important}`,
|
|
124
|
+
// The hero slab: the state, the title, the verdict, and the flow when the spec has one.
|
|
125
|
+
`.hero{padding-block:56px}`,
|
|
126
|
+
`.hero .state{display:inline-flex;align-items:center;gap:10px;margin-bottom:28px;color:var(--c);font:650 14.5px/1 var(--font);text-transform:uppercase;letter-spacing:.07em}`,
|
|
127
|
+
`.hero h1{font-size:clamp(32px,5vw,72px);line-height:1.02;max-width:30ch;letter-spacing:-.045em;color:var(--ink)}`,
|
|
128
|
+
`.hero .lede{margin-top:28px;font-size:clamp(18px,1.6vw,22px);max-width:46ch;color:var(--body)}`,
|
|
129
|
+
`.hero .cap{margin-top:14px;max-width:60ch;color:var(--muted)}`,
|
|
130
|
+
`.hero .meta{margin-top:22px;display:flex;flex-wrap:wrap;gap:4px 20px;font:500 13px/1.4 var(--code);color:var(--muted)}`,
|
|
131
|
+
// Sections: each a part with its title; the compositions below differ from neighbour to neighbour.
|
|
132
|
+
`.part{padding-top:88px}`,
|
|
133
|
+
`.sh{font-size:clamp(26px,3vw,40px);line-height:1.05;margin-bottom:36px;max-width:30ch}`,
|
|
134
|
+
`.panels{display:grid;gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
135
|
+
// Tiles: fields of colour with a big number.
|
|
136
|
+
`.slide-tiles{padding-top:56px}`,
|
|
137
|
+
`.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
138
|
+
`.tile{position:relative;display:grid;gap:10px;align-content:start;padding:28px 26px 30px;background:var(--bg-soft)}`,
|
|
139
|
+
`.tile.c-ok,.tile.c-warn,.tile.c-bad,.tile.c-info{background:var(--cb)}`,
|
|
140
|
+
`.tile .n{font-size:clamp(36px,4.4vw,60px);line-height:.95;font-weight:650;letter-spacing:-.05em;color:var(--ink);overflow-wrap:anywhere}`,
|
|
141
|
+
`.tile .l{color:var(--body);font-size:16px}`,
|
|
142
|
+
`.tile .ic{position:absolute;top:22px;right:22px;color:var(--c)}`,
|
|
143
|
+
// The minimap: a track, a stripe and a word per task.
|
|
144
|
+
`.strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
145
|
+
`.seg{display:grid;gap:10px;align-content:start;padding:0 20px 22px;background:var(--bg-soft)}`,
|
|
146
|
+
`.seg.c-warn{background:var(--accent-soft)}`,
|
|
147
|
+
`.seg .bar{display:block;height:6px;margin:0 -20px 12px;background:var(--c)}`,
|
|
148
|
+
`.seg.c-mut .bar{background:repeating-linear-gradient(90deg,var(--muted) 0 6px,transparent 6px 12px);opacity:.7}`,
|
|
149
|
+
`.seg .nm{display:grid;gap:6px}.seg .tn{font-weight:600;color:var(--ink);font-size:17px;line-height:1.3}`,
|
|
150
|
+
`.seg .nt{color:var(--muted);font-size:15px;line-height:1.4}`,
|
|
151
|
+
// What the owner has to do, what blocks it, and the two quiet facts.
|
|
152
|
+
`.two{padding-top:72px}`,
|
|
153
|
+
`.own{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);gap:2px;border-radius:var(--radius) var(--radius) 0 0;overflow:hidden}`,
|
|
154
|
+
`.own .nx{background:var(--bg-soft);padding:34px 34px 36px}`,
|
|
155
|
+
`.own .nx h2{font-size:clamp(24px,2.6vw,34px);line-height:1.15;letter-spacing:-.025em;margin:8px 0 0;max-width:30ch}`,
|
|
156
|
+
`.own .stop{background:var(--accent-soft);padding:34px 30px;display:grid;gap:10px;align-content:start;color:var(--ink)}`,
|
|
157
|
+
`.own .stop .lab{color:var(--accent)}.own .stop .lab+p{font-size:20px;line-height:1.35;letter-spacing:-.01em;font-weight:550}`,
|
|
158
|
+
`.check{display:grid;gap:8px;counter-reset:s;margin-top:22px}`,
|
|
159
|
+
`.check li{counter-increment:s;display:grid;grid-template-columns:30px minmax(0,1fr);gap:14px;align-items:center;padding:12px 14px;border-radius:var(--radius);background:var(--bg);color:var(--ink);font-weight:550}`,
|
|
160
|
+
`.check li::before{content:counter(s);display:grid;place-items:center;width:30px;height:30px;border-radius:var(--radius);background:var(--ink);color:var(--bg);font:650 15px var(--font)}`,
|
|
161
|
+
`.jump{display:inline-block;margin-top:20px;color:var(--ink);font-weight:600;font-size:15px}`,
|
|
162
|
+
`.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;margin-top:2px;border-radius:0 0 var(--radius) var(--radius);overflow:hidden}`,
|
|
163
|
+
`.fact{display:flex;gap:12px;padding:20px 26px;background:var(--bg-soft);color:var(--body);font-size:16px}`,
|
|
164
|
+
`.fact .ic{margin-top:3px;color:var(--muted)}.fact b{color:var(--ink);font-weight:600}`,
|
|
165
|
+
// The flow in the hero: the figure straight on the slab, then its steps and the line that says what is picked.
|
|
166
|
+
`.figure{margin-top:52px}`,
|
|
167
|
+
`.figure>.lab{margin-bottom:14px}`,
|
|
168
|
+
`.fig{overflow-x:auto}`,
|
|
169
|
+
`.fig svg{display:block;width:100%;height:auto;margin-inline:auto;color:var(--muted)}`,
|
|
170
|
+
`.win{padding:16px;border-radius:var(--radius)}`,
|
|
171
|
+
`.node rect{fill:var(--bg-soft)}`,
|
|
172
|
+
`.node .t{font:600 15px var(--font);fill:var(--ink);letter-spacing:-.01em}`,
|
|
173
|
+
`.node .s{font:13px var(--font);fill:var(--muted)}`,
|
|
174
|
+
`.node .st{color:var(--c)}`,
|
|
175
|
+
`.node.service rect{stroke:var(--ink);stroke-width:2}.node.store rect{stroke:var(--muted);stroke-width:2;stroke-dasharray:2 4}.node.actor rect{rx:30}.node.external rect{stroke:var(--muted);stroke-width:2;stroke-dasharray:8 5}`,
|
|
176
|
+
`.node.gate rect{fill:var(--raise);stroke:var(--hot);stroke-width:2}`,
|
|
177
|
+
`.gate .halo{fill:var(--hot-glow)}.gate .core{fill:var(--hot)}.gate .st{color:var(--hot-ink)}`,
|
|
178
|
+
`.edge path{fill:none;stroke:var(--muted);stroke-width:2}`,
|
|
179
|
+
`.edge text{font:13px var(--font);fill:var(--body);paint-order:stroke;stroke:var(--bg);stroke-width:5px;stroke-linejoin:round}`,
|
|
180
|
+
`.edge.branch path,.edge.return path{stroke-dasharray:7 6}.edge.fanout path{stroke:var(--ink);stroke-width:3.5}.edge.fanout text{font-weight:650}`,
|
|
181
|
+
`.edge.error path{stroke:var(--bad);stroke-dasharray:2 5;stroke-linecap:round}.edge.error text{fill:var(--bad)}`,
|
|
182
|
+
`.edge.hot path{stroke:var(--hot);stroke-width:3}.edge.hot text{fill:var(--hot)}`,
|
|
183
|
+
`marker .ah{fill:var(--muted)}marker .bad{fill:var(--bad)}marker .hot{fill:var(--hot)}`,
|
|
184
|
+
`.fig.playing .edge path{stroke-dasharray:6 6;animation:dash 1s linear infinite}`,
|
|
185
|
+
`@keyframes dash{to{stroke-dashoffset:-12}}`,
|
|
186
|
+
`.node,.edge{transition:opacity .25s ease}`,
|
|
187
|
+
`.focus .node:not(.on),.focus .edge:not(.on){opacity:.22}`,
|
|
188
|
+
`.node:focus-visible{outline:2px solid var(--hot);outline-offset:2px}`,
|
|
189
|
+
`.legend{display:flex;flex-wrap:wrap;gap:8px 28px;margin-top:22px;color:var(--body);font-size:14.5px}`,
|
|
190
|
+
`.legend li{display:flex;align-items:center;gap:10px}.legend .lg{width:44px;height:12px;flex:none;overflow:visible}.legend .edge path{stroke-width:2}`,
|
|
191
|
+
// Phone list of a figure.
|
|
192
|
+
`.path{display:none;margin:0}`,
|
|
193
|
+
`.path li{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:14px 16px;background:var(--bg-soft);margin-top:2px;color:var(--body);font-size:15px}.path li:first-child{margin-top:0;border-radius:var(--radius) var(--radius) 0 0}.path li:last-child{border-radius:0 0 var(--radius) var(--radius)}`,
|
|
194
|
+
`.path b{font-weight:600;color:var(--ink)}`,
|
|
195
|
+
`.verb{display:inline-block;border:1px solid var(--line);border-radius:var(--radius);padding:0 8px;font:13px/1.7 var(--code);color:var(--muted)}.verb.error{color:var(--bad);border-color:var(--bad)}.verb.branch,.verb.return{border-style:dashed}`,
|
|
196
|
+
`.path-detail{display:none;margin-top:12px;color:var(--body)}.path-detail li{padding:10px 0;border-top:1px solid var(--line)}.path-detail b{display:block;color:var(--ink)}`,
|
|
197
|
+
// The steps: panels to press; the line below says what is picked.
|
|
198
|
+
`.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:2px;margin-top:36px;border-radius:var(--radius);overflow:hidden}`,
|
|
199
|
+
`.steps li{display:grid;align-content:start;background:var(--bg-soft)}`,
|
|
200
|
+
`.steps button{all:unset;box-sizing:border-box;cursor:pointer;display:grid;align-content:start;gap:6px;width:100%;padding:16px;color:var(--body);transition:background-color .2s,color .2s}`,
|
|
201
|
+
`.steps button b{color:var(--ink);font-weight:600;font-size:16px;line-height:1.3;letter-spacing:0}.steps button span{font-size:14px;color:var(--muted)}`,
|
|
202
|
+
`.steps button:hover{background:var(--raise)}`,
|
|
203
|
+
`.steps button:focus-visible{outline:2px solid var(--hot);outline-offset:-2px}`,
|
|
204
|
+
`.steps button[aria-pressed=true]{background:var(--hot)}.steps button[aria-pressed=true] b,.steps button[aria-pressed=true] span{color:var(--hot-ink)}`,
|
|
205
|
+
`.steps .explain{padding:0 16px 16px;font-size:15px;color:var(--body)}`,
|
|
206
|
+
`.js .steps .explain{display:none}`,
|
|
207
|
+
`html:not(.js) .steps{grid-template-columns:minmax(0,1fr)}`,
|
|
208
|
+
`.say{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:start;margin-top:26px;min-height:5em}`,
|
|
209
|
+
`html:not(.js) .say{display:none}`,
|
|
210
|
+
`.say p{color:var(--ink);font-size:clamp(18px,1.7vw,24px);line-height:1.4;max-width:46ch;letter-spacing:-.01em}`,
|
|
211
|
+
`.say .ctl{display:flex;gap:8px;flex-wrap:wrap}.say .ctl[hidden],.say [hidden]{display:none}`,
|
|
212
|
+
// Architecture and explainer drawings sit in a dark window.
|
|
213
|
+
`.dband{fill:var(--bg-soft)}`,
|
|
214
|
+
`.dbox rect{fill:var(--raise)}.dbox.c-ok rect,.dbox.c-warn rect,.dbox.c-bad rect,.dbox.c-info rect,.dbox.c-mut rect{stroke:var(--c);stroke-width:1.5}`,
|
|
215
|
+
`.dbox .t{font:600 14px var(--font);fill:var(--ink)}.dbox .s{font:12.5px var(--font);fill:var(--muted)}.dbox .st{color:var(--c)}`,
|
|
216
|
+
`.dline{stroke:var(--muted);stroke-width:2;fill:none}`,
|
|
217
|
+
`.dl{font:12.5px var(--font);fill:var(--body);paint-order:stroke;stroke:var(--bg);stroke-width:4px}`,
|
|
218
|
+
`.dlab{font:600 13px var(--font);fill:var(--muted)}`,
|
|
219
|
+
`.win .path{margin-top:0}`,
|
|
220
|
+
// Comparison: panels side by side, the big total, the recommended pick filled.
|
|
221
|
+
`.ranks{max-width:520px;margin-bottom:28px}`,
|
|
222
|
+
`.ranks svg{display:block;width:100%;height:auto;margin-top:8px}`,
|
|
223
|
+
`.opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
224
|
+
`.opt{display:grid;gap:18px;align-content:start;padding:32px 30px 34px;background:var(--bg-soft)}`,
|
|
225
|
+
`.opt.rec{background:var(--accent-soft)}`,
|
|
226
|
+
`.opt .tag{justify-self:start;background:var(--accent);color:var(--accent-ink);padding:4px 10px;border-radius:var(--radius);font:650 13px/1.3 var(--font)}`,
|
|
227
|
+
`.opt h3{font-size:24px;line-height:1.2}.opt .ln{color:var(--body);max-width:46ch}`,
|
|
228
|
+
`.opt .tot{display:flex;align-items:baseline;gap:12px;font-size:clamp(64px,7vw,104px);line-height:.85;font-weight:650;letter-spacing:-.05em;color:var(--ink)}`,
|
|
229
|
+
`.opt .tot small{font:600 18px/1.2 var(--font);letter-spacing:0;color:var(--ink)}`,
|
|
230
|
+
`.opt.rec .tot{color:var(--accent)}`,
|
|
231
|
+
`.crit{display:grid;gap:8px}.crit div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;font-size:15.5px}`,
|
|
232
|
+
`.dots{display:inline-flex;gap:3px}.dots i{width:16px;height:8px;border-radius:2px;background:var(--line)}.dots i.on{background:var(--ink)}.opt.rec .dots i.on{background:var(--accent)}`,
|
|
233
|
+
`.pc{display:grid;gap:6px}.pc li{display:flex;gap:8px;font-size:15.5px}.pc .ic{margin-top:4px}.pc .p .ic{color:var(--ok)}.pc .c .ic{color:var(--bad)}`,
|
|
234
|
+
`.note{margin-top:20px;display:flex;gap:8px;max-width:70ch;color:var(--muted);font-size:15.5px}.note .ic{margin-top:4px}`,
|
|
235
|
+
// Idea map: a dark centre between two columns of panels.
|
|
236
|
+
`.idea{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.7fr) minmax(0,1fr);gap:2px;align-items:stretch}`,
|
|
237
|
+
`.idea .side{display:grid;gap:2px;align-content:stretch}`,
|
|
238
|
+
`.centre{display:grid;gap:12px;justify-items:center;align-content:center;text-align:center;padding:40px 24px;border-radius:var(--radius)}`,
|
|
239
|
+
`.centre .ic{color:var(--hot)}.centre b{color:var(--ink);font-size:clamp(20px,2vw,26px);line-height:1.2;letter-spacing:-.02em}`,
|
|
240
|
+
`.branch{display:grid;gap:12px;align-content:start;padding:22px 24px;background:var(--bg-soft);box-shadow:inset 4px 0 0 var(--sc,var(--muted))}`,
|
|
241
|
+
`.branch[data-s="1"]{--sc:var(--s1)}.branch[data-s="2"]{--sc:var(--s2)}.branch[data-s="3"]{--sc:var(--s3)}.branch[data-s="4"]{--sc:var(--s4)}.branch[data-s="5"]{--sc:var(--s5)}`,
|
|
242
|
+
`.branch h3{display:flex;gap:10px;align-items:center;font-size:18px;letter-spacing:-.01em}`,
|
|
243
|
+
`.chips{display:flex;flex-wrap:wrap;gap:6px}.chips li{padding:3px 10px;border-radius:var(--radius);background:var(--bg);color:var(--ink);font-size:15px}`,
|
|
244
|
+
// Explainer: a big numeral, the words, then the drawing.
|
|
245
|
+
`.ex{display:grid;gap:60px}`,
|
|
246
|
+
`.estep{display:grid;grid-template-columns:96px minmax(0,1fr) minmax(0,1.3fr);gap:10px 32px;align-items:start}`,
|
|
247
|
+
`.estep .no{font-size:72px;line-height:.8;font-weight:650;letter-spacing:-.05em;color:var(--ink)}`,
|
|
248
|
+
`.estep h3{font-size:24px;line-height:1.2}.estep .sb p{margin-top:10px;max-width:44ch;color:var(--body)}`,
|
|
249
|
+
// Timeline: a rule with a ring per date.
|
|
250
|
+
`.tl{position:relative;display:grid;gap:28px;padding-left:46px;max-width:76ch}`,
|
|
251
|
+
`.tl::before{content:"";position:absolute;left:13px;top:8px;bottom:8px;width:2px;background:var(--line)}`,
|
|
252
|
+
`.tl li{position:relative;display:grid;gap:3px}`,
|
|
253
|
+
`.tl .dot{position:absolute;left:-46px;top:0;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--bg);color:var(--c);border:2px solid var(--c)}`,
|
|
254
|
+
`.tl .dot .ic{width:15px;height:15px}.tl li.c-mut .dot{border-style:dashed}`,
|
|
255
|
+
`.tl time{font:600 14px/1.4 var(--code);color:var(--muted)}.tl h3{font-size:20px;line-height:1.25}.tl p{color:var(--body);max-width:60ch}`,
|
|
256
|
+
// Findings: tiles, panels with a chart each, and callouts with a stripe.
|
|
257
|
+
`.charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:2px;margin-top:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
258
|
+
`.tiles+.charts{margin-top:2px}`,
|
|
259
|
+
`figure.chart{display:grid;gap:16px;align-content:start;padding:26px 28px;background:var(--bg-soft)}`,
|
|
260
|
+
`figure.chart svg{display:block;width:100%;max-width:380px;height:auto}`,
|
|
261
|
+
`figure.chart.donut .cbody{display:flex;flex-wrap:wrap;gap:16px;align-items:center}figure.chart.donut svg{max-width:150px;flex:none}`,
|
|
262
|
+
`svg .ct{font:13px var(--font);fill:var(--body)}svg .ct.strong{font-weight:700;fill:var(--ink)}svg .cv{font:600 13px var(--font);fill:var(--ink)}`,
|
|
263
|
+
`svg .ctrack{fill:var(--line)}svg .cgrid{stroke:var(--line);stroke-width:1}svg .cring{stroke:var(--bg-soft);stroke-width:2}`,
|
|
264
|
+
`svg .cbig{font:650 22px var(--font);fill:var(--ink)}`,
|
|
265
|
+
`.clegend{display:grid;gap:6px;min-width:0;flex:1 1 150px}.clegend li{display:grid;grid-template-columns:14px minmax(0,1fr) auto auto;gap:8px;align-items:center;font-size:15px}.clegend.row{display:flex;flex-wrap:wrap;gap:6px 16px}.clegend.row li{display:flex}`,
|
|
266
|
+
`.clegend em{color:var(--muted);font-style:normal;font-size:13px}.clegend b{font-weight:600;font-size:14px;color:var(--ink)}`,
|
|
267
|
+
`.sw{width:12px;height:12px;border-radius:3px;background:var(--muted);display:inline-block}`,
|
|
268
|
+
`.sw[data-s="1"]{background:var(--s1)}.sw[data-s="2"]{background:var(--s2)}.sw[data-s="3"]{background:var(--s3)}.sw[data-s="4"]{background:var(--s4)}.sw[data-s="5"]{background:var(--s5)}`,
|
|
269
|
+
`.sw[data-t=ok]{background:var(--ok)}.sw[data-t=warn]{background:var(--accent)}.sw[data-t=bad]{background:var(--bad)}.sw[data-t=info]{background:var(--info)}.sw[data-t=mut]{background:var(--muted)}`,
|
|
270
|
+
`.tv summary{cursor:pointer;font:600 13.5px var(--font);color:var(--muted)}.tv .tw{margin-top:8px}`,
|
|
271
|
+
`.callouts{display:grid;gap:2px;margin-top:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
272
|
+
`.callout{display:flex;gap:14px;padding:20px 24px;background:var(--cb);box-shadow:inset 4px 0 0 var(--c);color:var(--ink)}.callout .ic{color:var(--c);margin-top:2px}`,
|
|
273
|
+
// Before and after: two panels; a plus or a minus, its word, and a line style.
|
|
274
|
+
`.diff{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
275
|
+
`.ba{background:var(--bg-soft);padding:28px 30px 30px}.ba h3{font-size:22px;margin-bottom:18px}`,
|
|
276
|
+
`.ba li{display:flex;gap:12px;padding:11px 0 11px 14px;border-left:3px solid transparent;color:var(--body)}`,
|
|
277
|
+
`.ba li .ic{margin-top:4px;flex:none}.ba li.same .ic{opacity:0}`,
|
|
278
|
+
`.ba li.add{border-left:4px solid var(--ink);color:var(--ink);font-weight:550}`,
|
|
279
|
+
`.ba li.del{border-left:3px dotted var(--muted)}.ba li.del .tx{text-decoration:line-through;text-decoration-thickness:1px}`,
|
|
280
|
+
`.wd{display:inline-block;margin-right:8px;font:650 12.5px/1.4 var(--font);text-transform:uppercase;letter-spacing:.06em;color:var(--ink);text-decoration:none}`,
|
|
281
|
+
// Decision record: the context, the options, the decision as a dark pull-quote, the consequences.
|
|
282
|
+
`.dr{display:grid;gap:28px}.dr .ctx{max-width:64ch;font-size:19px;color:var(--ink)}`,
|
|
283
|
+
`.pull{padding:clamp(28px,5vw,60px);border-radius:var(--radius)}`,
|
|
284
|
+
`.pull .ic{color:var(--hot);width:36px;height:36px}.pull .lab{color:var(--accent);margin:12px 0 10px}`,
|
|
285
|
+
`.pull .big{max-width:30ch;font-size:clamp(26px,3.4vw,46px);line-height:1.15;font-weight:650;letter-spacing:-.03em;color:var(--ink)}`,
|
|
286
|
+
`.cons{display:grid;gap:10px}.cons li{display:flex;gap:12px;font-size:17px}.cons .ic{color:var(--ok);margin-top:4px}`,
|
|
287
|
+
// Decisions: each question with a recommendation box.
|
|
288
|
+
`.qs{display:grid;gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
289
|
+
`.q{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);gap:32px;align-items:start;padding:30px 32px 32px;background:var(--bg-soft)}`,
|
|
290
|
+
`.q h3{font-size:22px;line-height:1.25;letter-spacing:-.02em;margin-bottom:10px}`,
|
|
291
|
+
`.q p{max-width:60ch;font-size:16.5px}.q .chg .lab{margin-right:8px}`,
|
|
292
|
+
`.q .rec{padding:18px 20px;border-radius:var(--radius);background:var(--accent-soft);color:var(--ink)}`,
|
|
293
|
+
`.q .rec b{display:block;margin-bottom:4px;color:var(--accent);font-size:13.5px;font-weight:600}.q .rec strong{font-size:20px;line-height:1.3;letter-spacing:-.01em}`,
|
|
294
|
+
// Evidence and log: ledgers, a rule between rows.
|
|
295
|
+
`.ledger,.log{display:grid}`,
|
|
296
|
+
`.ev{display:grid;grid-template-columns:160px minmax(0,1.6fr) minmax(0,1fr);gap:8px 28px;align-items:baseline;padding:22px 0;border-top:1px solid var(--line)}.ev:first-child,.log li:first-child{border-top:0}`,
|
|
297
|
+
`.ev b{color:var(--ink);font-weight:600;line-height:1.35}.ev .cl{display:grid;gap:4px}.ev .pr{color:var(--muted);font-size:15px}.ev .rs{font:600 15px/1.4 var(--code);color:var(--ink)}`,
|
|
298
|
+
`.badge{display:inline-flex;align-items:center;gap:8px;justify-self:start;color:var(--c);font:600 13.5px/1.3 var(--font)}`,
|
|
299
|
+
`.ev-verified{--c:var(--ok);--cb:var(--ok-bg)}.ev-inferred{--c:var(--warn);--cb:var(--warn-bg)}.ev-guess{--c:var(--muted);--cb:var(--bg-soft)}`,
|
|
300
|
+
`.log li{display:grid;grid-template-columns:160px minmax(0,1fr);gap:8px 28px;padding:18px 0;border-top:1px solid var(--line)}.log time{font:600 14px/1.6 var(--code);color:var(--muted)}.log li>span{color:var(--ink)}`,
|
|
301
|
+
// Risks: a table.
|
|
302
|
+
`.tw{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:16.5px}`,
|
|
303
|
+
`th{font:600 13.5px/1.3 var(--font);color:var(--muted);text-align:left;padding:0 20px 12px 0;border-bottom:1px solid var(--ink)}`,
|
|
304
|
+
`td{text-align:left;vertical-align:top;border-top:1px solid var(--line);padding:18px 20px 18px 0;color:var(--body)}td:first-child{color:var(--ink);font-weight:600}`,
|
|
305
|
+
`tbody tr:first-child td{border-top:0}`,
|
|
306
|
+
// Links.
|
|
307
|
+
`.links{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:2px;border-radius:var(--radius);overflow:hidden}`,
|
|
308
|
+
`.links li{background:var(--bg-soft)}.links a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 24px;color:var(--ink);font-weight:600;text-decoration:none}.links a:hover{text-decoration:underline}`,
|
|
309
|
+
// Footer.
|
|
310
|
+
`.foot{margin-top:112px;padding-block:44px}.foot p{font-size:14px;color:var(--muted)}`,
|
|
311
|
+
// The slide deck.
|
|
312
|
+
`.deck{display:none}`,
|
|
313
|
+
`html.present{font-size:1.12em}`,
|
|
314
|
+
`html.present [data-slide]{display:none}`,
|
|
315
|
+
`html.present [data-slide].cur{display:block;min-height:calc(100vh - 150px)}`,
|
|
316
|
+
`html.present .banner.cur{display:grid;align-content:center}`,
|
|
317
|
+
`html.present .part{padding-top:56px}`,
|
|
318
|
+
`html.present .foot,html.present .top .links,html.present .top .sep,html.present .top .stamp{display:none}`,
|
|
319
|
+
`html.present .deck{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:30;gap:12px;align-items:center;justify-content:center;padding:10px;border-top:1px solid var(--line)}`,
|
|
320
|
+
`html.present .deck span{font:600 14px var(--font);color:var(--muted)}`,
|
|
321
|
+
// A phone: panels stack, the bar keeps only the title, the state, present and the switch.
|
|
322
|
+
`@media (max-width:860px){.own,.facts,.q,.estep,.diff,.ev,.log li,.idea{grid-template-columns:minmax(0,1fr)}.q{gap:18px}.idea .centre{order:-1}.estep{gap:12px}.estep .no{font-size:56px}`,
|
|
323
|
+
`.part{padding-top:64px}.hero{padding-block:40px}.figure{margin-top:36px}.foot{margin-top:80px}.sh{margin-bottom:26px}.own .nx,.own .stop{padding:26px 22px}.opt{padding:26px 22px 28px}.q{padding:24px 22px 26px}.ba{padding:24px 22px}`,
|
|
324
|
+
`.top .links,.top .sep,.top .stamp{display:none}.top .wrap{gap:10px}.top .ttl{max-width:none;flex:1 1 auto}.top nav{margin-left:0}`,
|
|
325
|
+
`.stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.stack,.stack tbody,.stack tr,.stack td{display:block;width:100%}.stack tr{padding:14px 0;border-top:1px solid var(--line)}.stack tbody tr:first-child{border-top:0;padding-top:0}.stack td{border:0;padding:3px 0}`,
|
|
326
|
+
`.stack td[data-label]::before{content:attr(data-label);display:block;font:600 13px/1.3 var(--font);color:var(--muted);margin-bottom:2px}}`,
|
|
327
|
+
`@media (max-width:520px){body{font-size:16px}#present{display:none}.tile{padding:22px 20px}.steps{grid-template-columns:minmax(0,1fr)}.say{grid-template-columns:minmax(0,1fr)}}`,
|
|
328
|
+
// Motion is an extra: the hero rises and the owner's gate glows only when the reader has not asked for less.
|
|
329
|
+
`@media (prefers-reduced-motion:no-preference){.gate .halo{animation:heat 2.6s ease-in-out infinite;transform-origin:center;transform-box:fill-box}@keyframes heat{0%,100%{opacity:.55;transform:scale(.9)}50%{opacity:1;transform:scale(1.12)}}.hero h1,.hero .lede,.figure{animation:rise .7s cubic-bezier(.22,1,.36,1) both}.hero .lede{animation-delay:.08s}.figure{animation-delay:.16s}@keyframes rise{from{opacity:.001;transform:translateY(20px)}}}`,
|
|
330
|
+
`@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}`,
|
|
331
|
+
// Print: the final state, light on paper, one slide after another.
|
|
332
|
+
`@media print{body{background:#fff;color:#000}.top,.deck,.js-only,.say{display:none}.slab,.win,.pull{--slab:#fff;--slab-2:#f1f1f1;--slab-3:#e6e6e6;--slab-ink:#000;--slab-body:#222;--slab-muted:#444;--hot:#5a3600;--hot-ink:#fff;--hot-glow:transparent;--ok:#0f5c2a;--warn:#7a4504;--bad:#9a1d17;--info:#164a9e;background-image:none}`,
|
|
333
|
+
`.fig{overflow:visible;display:block!important}.path,.path-detail{display:none!important}.steps{display:block}.js .steps .explain{display:block}[data-slide]{display:block!important;break-inside:avoid}.banner{break-after:page}.fig.playing .edge path{animation:none}.focus .node:not(.on),.focus .edge:not(.on){opacity:1}}`,
|
|
334
|
+
].join('\n');
|
|
181
335
|
|
|
182
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* The page's stylesheet: the project tokens, the fixed state colours, then the shell and every kind. Light and dark by
|
|
338
|
+
* variables, no image, no font file, the final state in print and under reduced motion.
|
|
339
|
+
*/
|
|
340
|
+
export const pageCss = (opts: { tokens: string }): string =>
|
|
341
|
+
`${opts.tokens}\n${STATE_CSS}\n${BASE_CSS}`;
|
|
342
|
+
|
|
343
|
+
/** The first script of the page, run before the stylesheet is used: marks the page as scripted and applies the saved theme, so there is no flash. */
|
|
344
|
+
export const HEAD_JS = `(()=>{const r=document.documentElement;r.classList.add('js');try{const s=localStorage.getItem('vz-theme');if(s==='dark'||s==='light')r.setAttribute('data-theme',s)}catch(e){}})();`;
|
|
345
|
+
|
|
346
|
+
/** The page's script: the theme switch, detail on hover or focus, the steps, and the presentation mode. Text is set with textContent only. */
|
|
183
347
|
export const PAGE_JS = `(()=>{
|
|
184
348
|
const d=document,q=(s,r=d)=>r.querySelector(s),qa=(s,r=d)=>[...r.querySelectorAll(s)],root=d.documentElement;
|
|
185
|
-
try{const t=localStorage.getItem('vz-theme');if(t==='dark'||t==='light')root.dataset.theme=t}catch(e){}
|
|
186
349
|
const tb=q('#theme');
|
|
187
|
-
if(tb)
|
|
188
|
-
const
|
|
189
|
-
|
|
350
|
+
if(tb){
|
|
351
|
+
const mq=matchMedia('(prefers-color-scheme: dark)'),tip=q('.tip',tb);
|
|
352
|
+
const dark=()=>{const t=root.dataset.theme;return t?t==='dark':mq.matches};
|
|
353
|
+
const paint=()=>{const w=dark()?tb.dataset.toLight:tb.dataset.toDark;tb.setAttribute('aria-label',w);if(tip)tip.textContent=w};
|
|
354
|
+
const flip=()=>{const n=dark()?'light':'dark';root.dataset.theme=n;try{localStorage.setItem('vz-theme',n)}catch(e){}paint()};
|
|
355
|
+
paint();
|
|
356
|
+
mq.addEventListener('change',paint);
|
|
357
|
+
tb.onclick=()=>{
|
|
358
|
+
if(matchMedia('(prefers-reduced-motion: reduce)').matches){flip();return}
|
|
359
|
+
if(d.startViewTransition){d.startViewTransition(flip);return}
|
|
360
|
+
root.classList.add('theme-fade');flip();setTimeout(()=>root.classList.remove('theme-fade'),260)};
|
|
361
|
+
}
|
|
190
362
|
const slides=qa('[data-slide]'),pb=q('#present'),count=q('#slide-count');
|
|
191
363
|
let cur=0;
|
|
192
364
|
const show=i=>{cur=Math.max(0,Math.min(slides.length-1,i));slides.forEach((s,k)=>s.classList.toggle('cur',k===cur));if(count)count.textContent=(cur+1)+' / '+slides.length;scrollTo(0,0)};
|
|
@@ -200,22 +372,25 @@ if(k==='ArrowRight'||k==='ArrowDown'||k==='PageDown'||k===' '){e.preventDefault(
|
|
|
200
372
|
else if(k==='ArrowLeft'||k==='ArrowUp'||k==='PageUp'){e.preventDefault();show(cur-1)}
|
|
201
373
|
else if(k==='Home'){show(0)}else if(k==='End'){show(slides.length-1)}else if(k==='Escape'){present(false)}});
|
|
202
374
|
if(new URLSearchParams(location.search).get('present')==='1')present(true);
|
|
203
|
-
const fig=q('.fig'),
|
|
204
|
-
|
|
375
|
+
const fig=q('#flow .fig'),say=q('#say'),hint=say?say.textContent:'',all=q('#all');
|
|
376
|
+
let at=-1;
|
|
377
|
+
const note=t=>{if(say)say.textContent=t};
|
|
378
|
+
qa('[data-node]').forEach(n=>{const on=()=>{if(at<0)note(n.dataset.detail)};n.addEventListener('mouseenter',on);n.addEventListener('focus',on)});
|
|
205
379
|
const pp=q('#play');
|
|
206
|
-
if(pp&&fig)pp.onclick=()=>{const on=fig.classList.toggle('
|
|
207
|
-
const raw=q('#steps');
|
|
380
|
+
if(pp&&fig)pp.onclick=()=>{const on=fig.classList.toggle('playing');pp.textContent=on?pp.dataset.pause:pp.dataset.play;pp.setAttribute('aria-pressed',String(on))};
|
|
381
|
+
const raw=q('#steps'),btns=qa('#flow .steps button');
|
|
208
382
|
if(raw&&fig){
|
|
209
|
-
const steps=JSON.parse(raw.textContent)
|
|
210
|
-
let at=-1;
|
|
383
|
+
const steps=JSON.parse(raw.textContent);
|
|
211
384
|
const go=i=>{at=i;qa('.on',fig).forEach(x=>x.classList.remove('on'));
|
|
212
|
-
|
|
213
|
-
|
|
385
|
+
btns.forEach((b,k)=>b.setAttribute('aria-pressed',String(k===i)));
|
|
386
|
+
fig.classList.toggle('focus',i>=0);
|
|
387
|
+
if(all)all.hidden=i<0;
|
|
388
|
+
if(i<0){note(hint);return}
|
|
389
|
+
const s=steps[i];
|
|
214
390
|
s.nodes.forEach(id=>q('[data-node="'+id+'"]',fig)?.classList.add('on'));
|
|
215
391
|
s.edges.forEach(id=>q('[data-edge="'+id+'"]',fig)?.classList.add('on'));
|
|
216
|
-
note
|
|
217
|
-
|
|
218
|
-
if(next)next.onclick=()=>go(Math.min(steps.length-1,at+1));
|
|
392
|
+
note(s.note)};
|
|
393
|
+
btns.forEach((b,k)=>b.addEventListener('click',()=>go(at===k?-1:k)));
|
|
219
394
|
if(all)all.onclick=()=>go(-1);
|
|
220
395
|
}
|
|
221
396
|
})();`;
|