@basaltkit/deploy-ui 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +167 -2
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +3 -0
- package/dist/cli.d.ts +34 -0
- package/dist/cli.js +124 -0
- package/dist/client/api.js +203 -0
- package/dist/client/app.js +252 -0
- package/dist/client/dialog.js +48 -0
- package/dist/client/dom.js +83 -0
- package/dist/client/icons.js +47 -0
- package/dist/client/main.js +81 -0
- package/dist/client/messages.d.ts +58 -0
- package/dist/client/messages.js +1 -0
- package/dist/client/reply.js +41 -0
- package/dist/client/sanitize.js +16 -0
- package/dist/client/view-history.js +57 -0
- package/dist/client/view-plan.js +171 -0
- package/dist/client/view-run.js +338 -0
- package/dist/client/view-status.js +60 -0
- package/dist/client/view-targets.js +136 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +14 -0
- package/dist/open.d.ts +13 -0
- package/dist/open.js +31 -0
- package/dist/page.d.ts +7 -0
- package/dist/page.js +470 -0
- package/dist/remote.d.ts +68 -0
- package/dist/remote.js +220 -0
- package/dist/security.d.ts +38 -0
- package/dist/security.js +64 -0
- package/dist/server.d.ts +39 -0
- package/dist/server.js +513 -0
- package/dist/session.d.ts +66 -0
- package/dist/session.js +123 -0
- package/dist/ssh.d.ts +71 -0
- package/dist/ssh.js +186 -0
- package/dist/stream.d.ts +70 -0
- package/dist/stream.js +155 -0
- package/dist/targets.d.ts +80 -0
- package/dist/targets.js +242 -0
- package/package.json +51 -3
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ApiError } from './api.js';
|
|
2
|
+
import { confirmDialog } from './dialog.js';
|
|
3
|
+
import { button, card, el, emptyState, pageHead, replace } from './dom.js';
|
|
4
|
+
import { icon } from './icons.js';
|
|
5
|
+
import { banner, describe, problem } from './reply.js';
|
|
6
|
+
const FIELDS = [
|
|
7
|
+
{ key: 'name', label: 'Name', help: 'lowercase letters, digits and -, e.g. staging' },
|
|
8
|
+
{ key: 'ssh', label: 'SSH destination', help: '[user@]host, or a Host alias from your ~/.ssh/config (jump hosts and keys go there)' },
|
|
9
|
+
{ key: 'port', label: 'Port', help: 'optional; default: your ~/.ssh/config, else 22', type: 'number' },
|
|
10
|
+
{ key: 'dir', label: 'Checkout on the server', help: 'absolute path, e.g. /srv/myapp' },
|
|
11
|
+
{ key: 'node', label: 'node on the server', help: 'optional absolute path, when a non-interactive shell has no node on PATH' },
|
|
12
|
+
{ key: 'config', label: 'Config file', help: 'optional, relative to the checkout (default deploy.config.ts)' },
|
|
13
|
+
{ key: 'protected', label: 'Protected: type the name to deploy or roll back', help: '', type: 'checkbox' },
|
|
14
|
+
];
|
|
15
|
+
/** Targets: list, add/edit/remove, check the connection. */
|
|
16
|
+
export function renderTargets(app) {
|
|
17
|
+
const root = el('section', { aria: { labelledby: 'targets-title' } });
|
|
18
|
+
const checkArea = el('div', { aria: { live: 'polite' } });
|
|
19
|
+
const formArea = el('div');
|
|
20
|
+
const t = app.targets;
|
|
21
|
+
const list = t.targets.length === 0
|
|
22
|
+
? emptyState('targets', 'No target yet', 'No target yet. Add the server you already reach with ssh as the app user.')
|
|
23
|
+
: card('Servers', [el('div', { class: 'table-wrap' }, el('table', {}, el('thead', {}, el('tr', {}, el('th', { scope: 'col' }, 'Name'), el('th', { scope: 'col' }, 'SSH'), el('th', { scope: 'col' }, 'Checkout'), el('th', { scope: 'col' }, el('span', { class: 'sr-only' }, 'Protection')), el('th', { scope: 'col', class: 'num' }, 'Actions'))), el('tbody', {}, ...t.targets.map((target) => el('tr', {}, el('td', { class: 'target-name' }, target.name), el('td', { class: 'mono' }, `${target.ssh}${target.port ? ` -p ${target.port}` : ''}`), el('td', { class: 'mono' }, target.dir), el('td', {}, target.protected ? el('span', { class: 'badge badge-protected' }, icon('shield'), 'protected') : ''), el('td', { class: 'num' }, el('div', { class: 'row' }, button('Use', () => { app.select(target.name); app.show('status'); void app.refreshStatus(); }, { class: target.name === app.current?.name ? 'sm ghost' : 'sm' }), button('Check connection', () => { void check(app, target, checkArea); }, { class: 'sm' }), button('Edit', () => replace(formArea, targetForm(app, target)), { class: 'sm ghost' }), button('Remove', () => { void remove(app, target); }, { class: 'sm ghost danger' }))))))))], { bodyClass: 'flush', actions: [el('span', { class: 'muted num' }, `${t.targets.length} target${t.targets.length === 1 ? '' : 's'}`)] });
|
|
24
|
+
replace(root, pageHead('targets-title', 'Targets', ['Stored on this machine only, in ', el('code', {}, t.path), ' (0600). They hold no secret.'], el('button', { type: 'button', class: 'primary', on: { click: () => replace(formArea, targetForm(app, undefined)) } }, 'Add a target')), t.error ? banner('err', t.error) : null, list, checkArea, formArea, actorForm(app));
|
|
25
|
+
if (t.targets.length === 0 && !t.error)
|
|
26
|
+
replace(formArea, targetForm(app, undefined));
|
|
27
|
+
return root;
|
|
28
|
+
}
|
|
29
|
+
async function check(app, target, area) {
|
|
30
|
+
replace(area, el('p', { class: 'muted' }, `Connecting to ${target.ssh}…`));
|
|
31
|
+
let reply;
|
|
32
|
+
try {
|
|
33
|
+
reply = await app.api.post('status', { target: target.name });
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
replace(area, problem(undefined, error));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (reply.hello?.protocol === 1 && !reply.failure) {
|
|
40
|
+
replace(area, banner('ok', `${target.name} answers: @basaltkit/deploy ${reply.hello.version}, protocol 1, host ${reply.hello.host}`));
|
|
41
|
+
if (app.current?.name === target.name) {
|
|
42
|
+
app.statusReply = reply;
|
|
43
|
+
app.hello = reply.hello;
|
|
44
|
+
app.renderBar();
|
|
45
|
+
}
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
replace(area, problem(reply));
|
|
49
|
+
}
|
|
50
|
+
async function remove(app, target) {
|
|
51
|
+
const ok = await confirmDialog({ title: `Remove ${target.name}?`, lines: ['Only this UI forgets it; nothing changes on the server.'], confirmLabel: 'Remove', danger: true });
|
|
52
|
+
if (!ok)
|
|
53
|
+
return;
|
|
54
|
+
try {
|
|
55
|
+
app.targets = await app.api.post('targets/remove', { name: target.name });
|
|
56
|
+
await app.loadTargets();
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
app.shell.main.prepend(problem(undefined, error));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
app.show('targets');
|
|
63
|
+
}
|
|
64
|
+
function actorForm(app) {
|
|
65
|
+
const input = el('input', { type: 'text', id: 'actor', value: app.targets.actor ?? '', autocomplete: 'off', spellcheck: false, aria: { describedby: 'actor-help' } });
|
|
66
|
+
const message = el('span', { id: 'actor-help', class: 'muted' }, 'Recorded with each release as --actor (letters, digits and ._@+-).');
|
|
67
|
+
const form = el('form', { class: 'card', aria: { label: 'Audit actor' }, on: { submit: (event) => {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
void app.api.post('targets/save', { actor: input.value.trim() === '' ? null : input.value.trim() })
|
|
70
|
+
.then((reply) => { app.targets = reply; replace(message, 'Saved.'); })
|
|
71
|
+
.catch((error) => { replace(message, el('span', { class: 'field-error' }, describe(error))); });
|
|
72
|
+
} } }, el('div', { class: 'card-head' }, el('h3', {}, 'Audit')), el('div', { class: 'card-body' }, el('div', { class: 'field' }, el('label', { for: 'actor' }, 'Your name in the audit (actor)'), input, message)), el('div', { class: 'card-foot' }, el('button', { type: 'submit' }, 'Save actor')));
|
|
73
|
+
return form;
|
|
74
|
+
}
|
|
75
|
+
function targetForm(app, existing) {
|
|
76
|
+
const inputs = new Map();
|
|
77
|
+
const errors = new Map();
|
|
78
|
+
const general = el('div', { aria: { live: 'polite' } });
|
|
79
|
+
const fields = FIELDS.map((field) => {
|
|
80
|
+
const id = `target-${field.key}`;
|
|
81
|
+
const value = existing?.[field.key];
|
|
82
|
+
const error = el('span', { id: `${id}-error`, class: 'field-error' });
|
|
83
|
+
errors.set(field.key, error);
|
|
84
|
+
const input = field.type === 'checkbox'
|
|
85
|
+
? el('input', { type: 'checkbox', id, checked: value === true, aria: { describedby: `${id}-error` } })
|
|
86
|
+
: el('input', { type: field.type === 'number' ? 'number' : 'text', id, value: value === undefined ? '' : String(value), autocomplete: 'off', spellcheck: false, required: field.key === 'name' || field.key === 'ssh' || field.key === 'dir', aria: { describedby: `${id}-help ${id}-error` } });
|
|
87
|
+
inputs.set(field.key, input);
|
|
88
|
+
if (field.type === 'checkbox') {
|
|
89
|
+
return el('div', { class: 'field check span-2' }, el('label', { for: id }, input, el('span', {}, field.label)), error);
|
|
90
|
+
}
|
|
91
|
+
return el('div', { class: 'field' }, el('label', { for: id }, field.label, field.key === 'name' || field.key === 'ssh' || field.key === 'dir' ? el('span', { class: 'required' }, ' *') : null), input, field.help ? el('span', { id: `${id}-help`, class: 'field-help' }, field.help) : null, error);
|
|
92
|
+
});
|
|
93
|
+
const submit = async (event) => {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
for (const error of errors.values())
|
|
96
|
+
replace(error);
|
|
97
|
+
replace(general);
|
|
98
|
+
const target = {};
|
|
99
|
+
for (const field of FIELDS) {
|
|
100
|
+
const input = inputs.get(field.key);
|
|
101
|
+
if (field.type === 'checkbox') {
|
|
102
|
+
if (input.checked)
|
|
103
|
+
target[field.key] = true;
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const value = input.value.trim();
|
|
107
|
+
if (value === '')
|
|
108
|
+
continue;
|
|
109
|
+
target[field.key] = field.type === 'number' ? Number(value) : value;
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
app.targets = await app.api.post('targets/save', { target, ...(existing ? { previousName: existing.name } : {}) });
|
|
113
|
+
await app.loadTargets();
|
|
114
|
+
if (!app.current)
|
|
115
|
+
app.select(String(target['name']));
|
|
116
|
+
app.show('targets');
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
const fieldErrors = error instanceof ApiError ? error.body['errors'] : undefined;
|
|
120
|
+
if (fieldErrors) {
|
|
121
|
+
for (const [key, message] of Object.entries(fieldErrors)) {
|
|
122
|
+
const slot = errors.get(key);
|
|
123
|
+
if (slot)
|
|
124
|
+
replace(slot, message);
|
|
125
|
+
else
|
|
126
|
+
general.append(el('p', { class: 'field-error' }, `${key}: ${message}`));
|
|
127
|
+
}
|
|
128
|
+
;
|
|
129
|
+
(inputs.get(Object.keys(fieldErrors)[0]) ?? inputs.get('name'))?.focus();
|
|
130
|
+
}
|
|
131
|
+
else
|
|
132
|
+
replace(general, problem(undefined, error));
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
return el('form', { class: 'card', aria: { label: existing ? `Edit ${existing.name}` : 'Add a target' }, on: { submit: (event) => { void submit(event); } } }, el('div', { class: 'card-head' }, el('h3', {}, existing ? `Edit ${existing.name}` : 'Add a target')), el('div', { class: 'card-body' }, el('div', { class: 'form-grid' }, ...fields), general), el('div', { class: 'card-foot' }, button('Cancel', () => app.show('targets')), el('button', { type: 'submit', class: 'primary' }, 'Save')));
|
|
136
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @basaltkit/deploy-ui — a local UI for @basaltkit/deploy (RFC 0009). The
|
|
3
|
+
* package is a program (`basalt-deploy-ui`); these exports are its building
|
|
4
|
+
* blocks, for tests and for a wrapper that starts it differently.
|
|
5
|
+
*/
|
|
6
|
+
export { main, parseFlags, USAGE, type CliDeps, type CliFlags } from './cli.js';
|
|
7
|
+
export { startUiServer, MAX_SSH_SESSIONS, type UiServer, type UiServerOptions } from './server.js';
|
|
8
|
+
export { checkRequest, SECURITY_HEADERS, type Verdict } from './security.js';
|
|
9
|
+
export { IdleTimer, Session, LAUNCH_TTL_MS } from './session.js';
|
|
10
|
+
export { checkTarget, checkTargetsFile, defaultTargetsPath, readTargets, writeTargets, TargetsFileError, type Target, type TargetsFile } from './targets.js';
|
|
11
|
+
export { classifySshFailure, DEPLOY_BIN, remoteCommand, shQuote, sshArgs, sshProgram, SSH_OPTIONS, type RemoteSpec } from './ssh.js';
|
|
12
|
+
export { ProtocolReader, sanitizeText, MAX_LINE_BYTES } from './stream.js';
|
|
13
|
+
export { execRemote, follow, type SshRunner } from './remote.js';
|
|
14
|
+
export { openerCommand } from './open.js';
|
|
15
|
+
export type { CommandReply, StreamMessage, TargetsReply } from './client/messages.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @basaltkit/deploy-ui — a local UI for @basaltkit/deploy (RFC 0009). The
|
|
3
|
+
* package is a program (`basalt-deploy-ui`); these exports are its building
|
|
4
|
+
* blocks, for tests and for a wrapper that starts it differently.
|
|
5
|
+
*/
|
|
6
|
+
export { main, parseFlags, USAGE } from './cli.js';
|
|
7
|
+
export { startUiServer, MAX_SSH_SESSIONS } from './server.js';
|
|
8
|
+
export { checkRequest, SECURITY_HEADERS } from './security.js';
|
|
9
|
+
export { IdleTimer, Session, LAUNCH_TTL_MS } from './session.js';
|
|
10
|
+
export { checkTarget, checkTargetsFile, defaultTargetsPath, readTargets, writeTargets, TargetsFileError } from './targets.js';
|
|
11
|
+
export { classifySshFailure, DEPLOY_BIN, remoteCommand, shQuote, sshArgs, sshProgram, SSH_OPTIONS } from './ssh.js';
|
|
12
|
+
export { ProtocolReader, sanitizeText, MAX_LINE_BYTES } from './stream.js';
|
|
13
|
+
export { execRemote, follow } from './remote.js';
|
|
14
|
+
export { openerCommand } from './open.js';
|
package/dist/open.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Spawn } from './remote.js';
|
|
2
|
+
/**
|
|
3
|
+
* The platform's browser opener, as argv (RFC 0009 §4.6): never a shell —
|
|
4
|
+
* `cmd /c start` would need one and mangles `&` and `#`. On Windows an
|
|
5
|
+
* absolute `rundll32.exe`: a bare name is looked up in the working directory
|
|
6
|
+
* first.
|
|
7
|
+
*/
|
|
8
|
+
export declare function openerCommand(platform: NodeJS.Platform, url: string, env?: NodeJS.ProcessEnv): {
|
|
9
|
+
command: string;
|
|
10
|
+
args: string[];
|
|
11
|
+
};
|
|
12
|
+
/** Starts the opener, detached and silent, in `cwd` (the home directory, never the app's); resolves false when it could not start or failed. */
|
|
13
|
+
export declare function openBrowser(spawn: Spawn, platform: NodeJS.Platform, url: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<boolean>;
|
package/dist/open.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { win32 } from 'node:path';
|
|
2
|
+
import { windowsSystemRoot } from './ssh.js';
|
|
3
|
+
/**
|
|
4
|
+
* The platform's browser opener, as argv (RFC 0009 §4.6): never a shell —
|
|
5
|
+
* `cmd /c start` would need one and mangles `&` and `#`. On Windows an
|
|
6
|
+
* absolute `rundll32.exe`: a bare name is looked up in the working directory
|
|
7
|
+
* first.
|
|
8
|
+
*/
|
|
9
|
+
export function openerCommand(platform, url, env = {}) {
|
|
10
|
+
if (platform === 'darwin')
|
|
11
|
+
return { command: 'open', args: [url] };
|
|
12
|
+
if (platform === 'win32')
|
|
13
|
+
return { command: win32.join(windowsSystemRoot(env), 'System32', 'rundll32.exe'), args: ['url.dll,FileProtocolHandler', url] };
|
|
14
|
+
return { command: 'xdg-open', args: [url] };
|
|
15
|
+
}
|
|
16
|
+
/** Starts the opener, detached and silent, in `cwd` (the home directory, never the app's); resolves false when it could not start or failed. */
|
|
17
|
+
export function openBrowser(spawn, platform, url, cwd, env = {}) {
|
|
18
|
+
const { command, args } = openerCommand(platform, url, env);
|
|
19
|
+
return new Promise((resolve) => {
|
|
20
|
+
try {
|
|
21
|
+
const options = { shell: false, stdio: 'ignore', detached: platform !== 'win32', windowsHide: true, ...(cwd ? { cwd } : {}) };
|
|
22
|
+
const child = spawn(command, args, options);
|
|
23
|
+
child.on('error', () => resolve(false));
|
|
24
|
+
child.on('exit', (code) => resolve(code === 0));
|
|
25
|
+
child.unref();
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
resolve(false);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
package/dist/page.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page and its stylesheet, as strings (the way the `*-ui` packages ship
|
|
3
|
+
* markup): no inline script, no inline style — the CSP allows neither. The
|
|
4
|
+
* one module script is `/client/main.js`, compiled by tsc from `src/client`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const INDEX_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"referrer\" content=\"no-referrer\">\n<meta name=\"color-scheme\" content=\"light dark\">\n<title>Basalt deploy</title>\n<link rel=\"stylesheet\" href=\"/app.css\">\n<script type=\"module\" src=\"/client/main.js\"></script>\n</head>\n<body>\n<div class=\"shell\">\n<aside class=\"sidebar\">\n <h1 class=\"brand\">\n <svg class=\"brand-mark\" viewBox=\"40 40 120 120\" width=\"28\" height=\"28\" aria-hidden=\"true\" focusable=\"false\">\n <g stroke=\"#0B0E13\" stroke-width=\"3\" stroke-linejoin=\"round\">\n <polygon points=\"52.37,72.5 100,45 147.63,72.5 100,100\" fill=\"#8B9AA7\"/>\n <polygon points=\"52.37,72.5 100,100 100,155 52.37,127.5\" fill=\"#2C3843\"/>\n <polygon points=\"100,100 147.63,72.5 147.63,127.5 100,155\" fill=\"#FF5A1F\"/>\n </g>\n <line x1=\"100\" y1=\"100\" x2=\"100\" y2=\"155\" stroke=\"#FFB347\" stroke-width=\"4\" stroke-linecap=\"round\"/>\n </svg>\n <span class=\"brand-text\"><span class=\"brand-name\">Basalt</span> <span class=\"brand-sub\">Deploy</span></span>\n </h1>\n <nav id=\"nav\" class=\"nav\" aria-label=\"Screens\"></nav>\n <div class=\"sidebar-foot\">\n <p class=\"local-note\" title=\"Local only: this page talks to 127.0.0.1, which talks to your servers over your own ssh.\">\n <svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M6 11h12v10H6zM8 11V7a4 4 0 0 1 8 0v4\"/></svg>\n <span>Local only <span aria-hidden=\"true\">\u00B7</span> <span class=\"mono\">127.0.0.1</span></span>\n </p>\n <div id=\"session\" class=\"session\"></div>\n </div>\n</aside>\n<div class=\"main-col\">\n <div id=\"target-bar\" class=\"target-bar\" aria-live=\"polite\"></div>\n <main id=\"app\" class=\"app\">\n <p class=\"muted\">Starting\u2026</p>\n <noscript><p>This UI needs JavaScript (its own module only; nothing is loaded from elsewhere).</p></noscript>\n </main>\n</div>\n</div>\n</body>\n</html>\n";
|
|
7
|
+
export declare const APP_CSS = "/* Basalt deploy: an operations console. Graphite neutrals, one molten accent used sparingly. */\n:root {\n color-scheme: light dark;\n --font-sans: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n --font-mono: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-base: 14px; --fs-lg: 16px; --fs-xl: 20px;\n --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;\n --radius: 8px; --radius-sm: 6px; --radius-xs: 4px;\n --control-h: 32px;\n --sidebar-w: 240px;\n\n --bg: #f5f6f8;\n --surface: #ffffff;\n --surface-2: #f9fafb;\n --surface-3: #f0f2f5;\n --border: #e2e6eb;\n --border-strong: #cdd3da;\n --text: #0f141a;\n --text-2: #2c3843;\n --muted: #5b6672;\n --faint: #8a949f;\n\n --molten: #ff5a1f;\n --accent-text: #b93a0a;\n --accent-soft: #fff1ea;\n --primary-bg: #c93f0b;\n --primary-bg-hover: #b23708;\n --primary-fg: #ffffff;\n\n --ok: #157f3b; --ok-soft: #e8f5ec; --ok-line: #b7dfc4;\n --warn: #9a6200; --warn-soft: #fdf4e1; --warn-line: #f0d39a;\n --err: #c4271d; --err-soft: #fdecea; --err-line: #f3bdb8;\n --info: #44546a; --info-soft: #eef1f5; --info-line: #cfd7e1;\n --protected-bg: #b42318; --protected-fg: #ffffff;\n\n --term-bg: #0d1117; --term-border: #0d1117; --term-fg: #c9d1d9; --term-muted: #8b949e; --term-ts: #7d8590;\n --term-warn: #e3b341; --term-err: #ff7b72; --term-ok: #56d364; --term-warn-bg: rgb(227 179 65 / 0.08); --term-err-bg: rgb(255 123 114 / 0.10);\n\n --shadow-sm: 0 1px 2px rgb(15 20 26 / 0.05);\n --shadow-md: 0 1px 2px rgb(15 20 26 / 0.06), 0 4px 12px rgb(15 20 26 / 0.06);\n --shadow-lg: 0 2px 6px rgb(15 20 26 / 0.08), 0 24px 48px rgb(15 20 26 / 0.18);\n --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--molten);\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --bg: #0b0e13;\n --surface: #121820;\n --surface-2: #0f141b;\n --surface-3: #18202a;\n --border: #232c36;\n --border-strong: #2f3a46;\n --text: #e6eaef;\n --text-2: #c3cad3;\n --muted: #95a1ae;\n --faint: #6b7784;\n\n --accent-text: #ff8a5c;\n --accent-soft: rgb(255 90 31 / 0.12);\n --primary-bg: #ff5a1f;\n --primary-bg-hover: #ff7340;\n --primary-fg: #0b0e13;\n\n --ok: #3fcf79; --ok-soft: rgb(63 207 121 / 0.10); --ok-line: rgb(63 207 121 / 0.32);\n --warn: #f2b13d; --warn-soft: rgb(242 177 61 / 0.10); --warn-line: rgb(242 177 61 / 0.32);\n --err: #ff6b5e; --err-soft: rgb(255 107 94 / 0.10); --err-line: rgb(255 107 94 / 0.34);\n --info: #9aa8b8; --info-soft: rgb(154 168 184 / 0.10); --info-line: rgb(154 168 184 / 0.28);\n --protected-bg: #b42318; --protected-fg: #ffffff;\n\n --term-bg: #07090c; --term-border: #232c36;\n\n --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);\n --shadow-md: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3);\n --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.5), 0 24px 48px rgb(0 0 0 / 0.55);\n }\n}\n\n/* Base */\n*, *::before, *::after { box-sizing: border-box; }\nhtml, body { margin: 0; background: var(--bg); color: var(--text); }\nbody { font: var(--fs-base)/20px var(--font-sans); -webkit-font-smoothing: antialiased; font-feature-settings: \"cv11\", \"ss01\"; text-rendering: optimizeLegibility; }\nh1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }\nh2 { font-size: var(--fs-xl); line-height: 28px; letter-spacing: -0.015em; }\nh3 { font-size: var(--fs-base); line-height: 20px; }\np { margin: 0; }\np + p { margin-top: var(--sp-2); }\na { color: var(--accent-text); }\n.muted { color: var(--muted); }\n.mono, code, kbd, pre { font-family: var(--font-mono); font-size: 12.5px; }\ncode { background: var(--surface-3); border: 1px solid var(--border); padding: 0 5px; border-radius: var(--radius-xs); overflow-wrap: anywhere; color: var(--text-2); line-height: 18px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }\n.num, time { font-variant-numeric: tabular-nums; }\n.section-label { display: block; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.hidden { display: none !important; }\n.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }\n::selection { background: rgb(255 90 31 / 0.22); }\n\n/* Shell */\n.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px) var(--sidebar-w), transparent var(--sidebar-w)); }\n.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-4) var(--sp-3); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }\n.brand { display: flex; align-items: center; gap: 10px; padding: var(--sp-1) var(--sp-2); font-size: var(--fs-base); }\n.brand-mark { flex: none; }\n.brand-text { display: flex; flex-direction: column; line-height: 1.15; }\n.brand-name { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }\n.brand-sub { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }\n.nav { display: flex; flex-direction: column; gap: var(--sp-5); }\n.nav-target { display: grid; gap: 6px; padding: 0 var(--sp-2); }\n.nav-target .section-label { padding: 0; }\n.nav-list { display: flex; flex-direction: column; gap: 2px; }\n.nav .nav-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-weight: 500; text-align: left; justify-content: flex-start; position: relative; box-shadow: none; }\n.nav .nav-item .icon { color: var(--faint); }\n.nav .nav-item:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }\n.nav .nav-item:hover .icon { color: var(--text-2); }\n.nav .nav-item[aria-current=\"page\"] { background: var(--surface-3); color: var(--text); font-weight: 600; }\n.nav .nav-item[aria-current=\"page\"] .icon { color: var(--molten); }\n.nav .nav-item[aria-current=\"page\"]::before { content: \"\"; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--molten); }\n.sidebar-foot { margin-top: auto; display: grid; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2) 0; border-top: 1px solid var(--border); }\n.local-note { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }\n.local-note .mono { font-size: var(--fs-sm); }\n.session:empty { display: none; }\n.session button { width: 100%; justify-content: flex-start; }\n\n.main-col { min-width: 0; display: flex; flex-direction: column; }\n.app { width: 100%; max-width: 1200px; padding: var(--sp-5) var(--sp-6) var(--sp-7); }\n.app > section > * + * { margin-top: var(--sp-4); }\n\n/* Context strip: which target every screen acts on */\n.target-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-3); min-height: 52px; padding: 10px var(--sp-6); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); font-size: var(--fs-md); }\n.target-bar:empty { display: none; }\n.target-bar.is-protected { box-shadow: inset 0 3px 0 var(--protected-bg); }\n.ctx-target { display: inline-flex; align-items: center; gap: var(--sp-2); }\n.ctx-name { font-size: var(--fs-base); font-weight: 600; letter-spacing: -0.01em; }\n.ctx-sep { display: inline-block; width: 1px; height: 16px; background: var(--border-strong); font-size: 0; line-height: 0; overflow: hidden; color: transparent; }\n.ctx-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); min-width: 0; }\n.ctx-item .icon { color: var(--faint); flex: none; }\n.ctx-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.ctx-val { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }\n.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.05em; line-height: 1; white-space: nowrap; }\n.badge .icon { width: 12px; height: 12px; }\n.badge-protected { background: var(--protected-bg); color: var(--protected-fg); box-shadow: 0 0 0 3px rgb(180 35 24 / 0.16); }\n.badge-neutral { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }\n\n/* Page header */\n.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-3) var(--sp-4); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }\n.app > section > .page-head + * { margin-top: 0; }\n.page-title { min-width: 0; display: grid; gap: var(--sp-1); }\n.page-title h2 { overflow-wrap: anywhere; }\n.page-title h2.mono-title { font-family: var(--font-mono); font-size: 18px; letter-spacing: -0.01em; font-weight: 600; }\n.page-sub { color: var(--muted); max-width: 72ch; }\n.page-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }\n\n/* Buttons */\nbutton, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h); padding: 0 12px; font: 500 var(--fs-base)/1 var(--font-sans); white-space: nowrap; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease; }\nbutton:hover { background: var(--surface-3); border-color: var(--border-strong); }\nbutton:active { transform: translateY(0.5px); }\nbutton:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }\nbutton .icon { flex: none; }\nbutton.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); font-weight: 600; box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / 0.12); }\nbutton.primary:hover { background: var(--primary-bg-hover); border-color: var(--primary-bg-hover); }\nbutton.danger { color: var(--err); border-color: var(--err-line); background: var(--surface); }\nbutton.danger:hover { background: var(--err-soft); border-color: var(--err); }\ndialog.is-danger button.danger, button.danger.solid { background: var(--err); border-color: var(--err); color: #ffffff; font-weight: 600; }\ndialog.is-danger button.danger:hover, button.danger.solid:hover { filter: brightness(0.94); }\n@media (prefers-color-scheme: dark) { dialog.is-danger button.danger, button.danger.solid { background: #d92d20; border-color: #d92d20; } }\nbutton.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }\nbutton.ghost:hover { background: var(--surface-3); color: var(--text); }\nbutton.ghost.danger { color: var(--err); }\nbutton.ghost.danger:hover { background: var(--err-soft); }\nbutton.sm { height: 28px; padding: 0 10px; font-size: var(--fs-md); }\nbutton:disabled, button:disabled:hover { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }\n.row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }\n.actions-end { justify-content: flex-end; }\n\n/* Cards */\n.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }\n.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border); }\n.card-head h3 { font-size: var(--fs-base); }\n.card-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }\n.card-body { padding: var(--sp-4); min-width: 0; }\n.card-body > * + * { margin-top: var(--sp-3); }\n.card-body.flush { padding: 0; }\n.card-foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; align-items: center; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }\n.card.accent { border-color: var(--accent-line, var(--border)); box-shadow: var(--shadow-sm), inset 3px 0 0 var(--molten); }\n.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }\n.lead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }\n.lead .mono { font-size: 13px; color: var(--text); }\n\n/* Key/value */\n.kv { display: grid; gap: 0; }\ndl { margin: 0; }\n.kv-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--sp-3); padding: 7px 0; border-top: 1px solid var(--border); align-items: baseline; }\n.kv-row:first-child { border-top: 0; padding-top: 0; }\n.kv-row:last-child { padding-bottom: 0; }\n.kv dt { color: var(--muted); font-size: var(--fs-md); }\n.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }\n\n/* Pills and badges */\n.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid; vertical-align: middle; }\n.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n.pill-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }\n.pill-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }\n.pill-err { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }\n.pill-info { color: var(--info); background: var(--info-soft); border-color: var(--info-line); }\n.pill-skip { color: var(--muted); background: var(--surface-3); border-color: var(--border); }\n.pill-run { color: var(--accent-text); background: var(--accent-soft); border-color: rgb(255 90 31 / 0.35); }\n.pill-run .dot { animation: pulse 1.4s ease-in-out infinite; }\n.status-ok { color: var(--ok); }\n.status-warn { color: var(--warn); }\n.status-err { color: var(--err); }\n\n/* Tables */\n.table-wrap { overflow-x: auto; max-width: 100%; }\n.card > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }\ntable { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-base); }\nth, td { text-align: left; padding: 10px var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; }\nthead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }\ntbody tr:last-child > * { border-bottom: 0; }\ntbody tr:hover > * { background: var(--surface-2); }\ntd.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }\ntd.nowrap, th.nowrap { white-space: nowrap; }\ntd.wrap { overflow-wrap: anywhere; min-width: 20ch; }\ntd.mono { color: var(--text-2); }\ntd .row { flex-wrap: nowrap; justify-content: flex-end; }\n.plan-lines th { width: 1%; white-space: nowrap; font-weight: 500; }\n.plan-lines tbody th { background: transparent; }\n.step-chip { display: inline-block; padding: 1px 7px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }\n.plan-lines td { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }\n\n/* Forms */\n.field { display: grid; gap: 6px; }\n.field + .field { margin-top: var(--sp-4); }\n.field > label { font-size: var(--fs-md); font-weight: 600; color: var(--text); }\n.field-key { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }\n.field-help, .field > .muted { font-size: var(--fs-sm); color: var(--muted); }\n.field-error { color: var(--err); font-size: var(--fs-sm); }\n.field-error:empty { display: none; }\n.required { color: var(--err); }\ninput[type=\"text\"], input[type=\"password\"], input[type=\"number\"], select { font: var(--fs-base)/1 var(--font-sans); height: var(--control-h); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); width: 100%; max-width: 32rem; box-shadow: var(--shadow-sm); transition: border-color 120ms ease, box-shadow 120ms ease; }\ninput[type=\"password\"], input#confirm-name, .field input[spellcheck=\"false\"][type=\"text\"] { font-family: var(--font-mono); font-size: 13px; }\ninput:hover, select:hover { border-color: var(--faint); }\ninput:focus-visible, select:focus-visible { border-color: var(--molten); }\ninput[aria-invalid=\"true\"] { border-color: var(--err); }\nselect { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }\ninput[type=\"checkbox\"] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary-bg); flex: none; }\n.check > label, label.check { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: 500; font-size: var(--fs-base); line-height: 20px; cursor: pointer; }\n.check input[type=\"checkbox\"] { margin-top: 2px; }\n.form-section + .form-section { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--border); }\n.form-note { font-size: var(--fs-md); color: var(--muted); display: flex; gap: var(--sp-2); align-items: flex-start; }\n.form-note .icon { margin-top: 2px; color: var(--faint); flex: none; }\n\n.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }\n.form-grid > .field + .field { margin-top: 0; }\n.form-grid input[type=\"text\"], .form-grid input[type=\"number\"] { max-width: none; }\n.span-2 { grid-column: 1 / -1; }\n.target-name { font-weight: 600; }\n.card-body > [aria-live]:empty { display: none; }\n\n/* Disclosures */\ndetails > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-md); font-weight: 500; width: fit-content; border-radius: var(--radius-xs); list-style-position: inside; }\ndetails > summary:hover { color: var(--text); }\ndetails[open] > summary { margin-bottom: var(--sp-2); }\n.advanced { margin-top: var(--sp-3); }\n.form-section > .advanced:first-child { margin-top: 0; }\n.form-section + .form-section:has(> .advanced:first-child) { padding-top: var(--sp-4); margin-top: var(--sp-4); }\n.advanced[open] { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }\n.diagnostics { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 18px; margin: 0; padding: 10px var(--sp-3); background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); max-height: 40vh; overflow-y: auto; }\n\n/* Banners */\n.banner { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--info-line); border-left-width: 3px; border-radius: var(--radius); background: var(--info-soft); color: var(--text); }\n.banner-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--info); }\n.banner-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }\n.banner-body > p { margin-top: 4px; color: var(--text-2); }\n.banner-body > details { margin-top: var(--sp-2); }\n.banner-title { font-weight: 600; }\n.banner-code { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }\n.banner.ok { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-soft); }\n.banner.ok .banner-icon { color: var(--ok); }\n.banner.warn { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-soft); }\n.banner.warn .banner-icon { color: var(--warn); }\n.banner.err { border-color: var(--err-line); border-left-color: var(--err); background: var(--err-soft); }\n.banner.err .banner-icon { color: var(--err); }\n.banner + .banner { margin-top: var(--sp-2); }\n\n/* Findings */\n.findings { list-style: none; margin: 0; padding: 0; }\n.finding { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-3); row-gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); align-items: baseline; }\n.finding:first-child { border-top: 0; }\n.finding-msg { min-width: 0; overflow-wrap: anywhere; }\n.finding-id { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); margin-right: 6px; }\n.sev { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; height: 20px; padding: 0 7px; border-radius: var(--radius-xs); font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid; }\n.sev-error { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }\n.sev-warning { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }\n.fix { grid-column: 2; display: flex; align-items: baseline; gap: var(--sp-2); padding: 6px 10px; background: var(--surface-3); border: 1px solid var(--border); border-left: 2px solid var(--faint); border-radius: var(--radius-xs); min-width: 0; }\n.fix-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); flex: none; }\n.fix code { background: none; border: 0; padding: 0; user-select: all; }\n\n/* Empty states */\n.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: var(--sp-7) var(--sp-4); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }\n.empty-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); color: var(--muted); margin-bottom: var(--sp-2); }\n.empty-icon .icon { width: 20px; height: 20px; }\n.empty-title { font-weight: 600; font-size: var(--fs-lg); line-height: 24px; }\n.empty-text { color: var(--muted); max-width: 52ch; }\n.empty .row { margin-top: var(--sp-3); justify-content: center; }\n.stopped { max-width: 560px; margin: var(--sp-7) 0 0; }\n.stopped .banner { margin-top: var(--sp-4); text-align: left; }\n\n/* Dialogs */\ndialog { padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); width: min(32rem, calc(100vw - 32px)); max-width: none; box-shadow: var(--shadow-lg); }\ndialog::backdrop { background: rgb(11 14 19 / 0.55); backdrop-filter: blur(2px); }\ndialog[open] { animation: rise 160ms ease-out; }\n.dialog-head { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 20px 20px 0; }\n.dialog-head h2 { font-size: var(--fs-lg); line-height: 24px; overflow-wrap: anywhere; }\n.dialog-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--accent-soft); color: var(--accent-text); }\n.dialog-icon .icon { width: 18px; height: 18px; }\ndialog.is-danger { border-top: 3px solid var(--err); }\ndialog.is-danger .dialog-icon { background: var(--err-soft); color: var(--err); }\n.dialog-body { padding: var(--sp-3) 20px 20px 64px; color: var(--text-2); overflow-wrap: anywhere; }\n.dialog-body > p + p { margin-top: var(--sp-2); }\n.dialog-context { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 6px 10px; }\n.dialog-protected { display: flex; align-items: center; gap: var(--sp-2); color: var(--err); font-weight: 500; }\n.dialog-body .field { margin-top: var(--sp-4); }\n.dialog-body .field > label { font-weight: 500; color: var(--text-2); }\n.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 12px 12px; }\n\n/* Run: the step timeline */\n.run-state { display: flex; align-items: center; gap: var(--sp-2); width: fit-content; max-width: 100%; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: var(--fs-md); box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }\n.run-state::before { content: \"\"; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }\n.run-state.is-live::before { background: var(--molten); animation: pulse 1.4s ease-in-out infinite; }\n.run-state.is-ok::before { background: var(--ok); }\n.run-state.is-err::before { background: var(--err); }\n.run-state:empty { display: none; }\n.run-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }\n.run-outcome:empty, .run-findings:empty { display: none; }\n.steps { list-style: none; padding: 0; margin: 0; }\n.steps:empty::before { content: \"Waiting for the first step\u2026\"; display: block; color: var(--muted); font-size: var(--fs-md); }\n.step { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; min-height: 32px; padding: 6px 0; }\n.step:not(:last-child)::after { content: \"\"; position: absolute; left: 9.5px; top: 28px; bottom: -6px; width: 1px; background: var(--border-strong); }\n.step.is-ok:not(:last-child)::after { background: var(--ok); opacity: 0.45; }\n.step-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); }\n.step.is-ok .step-icon { background: var(--ok); border-color: var(--ok); color: var(--surface); }\n.step.is-failed .step-icon { background: var(--err); border-color: var(--err); color: var(--surface); }\n.step.is-skipped .step-icon { background: var(--surface-3); border-color: var(--border-strong); color: var(--muted); }\n.step.is-running .step-icon { color: transparent; border-color: var(--molten); border-right-color: transparent; animation: spin 0.9s linear infinite; }\n.step.is-aborted .step-icon { color: transparent; border-style: dashed; border-color: var(--warn); }\n.step.is-aborted .step-icon::after { content: \"\"; position: absolute; inset: 5px; border-radius: 2px; background: var(--warn); }\n.step-title { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }\n.step.is-running .step-title { font-weight: 600; }\n.step.is-skipped .step-title { color: var(--muted); }\n.step-meta { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }\n.step-status { text-transform: lowercase; }\n.step.is-failed .step-status { color: var(--err); font-weight: 600; }\n.step.is-running .step-status { color: var(--accent-text); font-weight: 600; }\n.step.is-aborted .step-status { color: var(--warn); font-weight: 600; }\n.step-dur { font-family: var(--font-mono); font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; color: var(--text-2); }\n\n/* Run: the log console (a terminal in both themes) */\n.console { background: var(--term-bg); border: 1px solid var(--term-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); min-width: 0; }\n.console-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); height: 40px; padding: 0 var(--sp-4); border-bottom: 1px solid rgb(255 255 255 / 0.08); color: var(--term-muted); }\n.console-head h3 { color: #e6edf3; font-size: var(--fs-md); display: flex; align-items: center; gap: var(--sp-2); }\n.console-head .icon { color: var(--term-muted); }\n.console-meta { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--term-muted); }\n.log { list-style: none; margin: 0; padding: 10px 0; max-height: 60vh; min-height: 120px; overflow-y: auto; color: var(--term-fg); font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #30363d transparent; }\n.log li { position: relative; padding: 0 var(--sp-4) 0 calc(var(--sp-4) + 10ch); }\n.log li::before { content: attr(data-ts); position: absolute; left: var(--sp-4); width: 9ch; color: var(--term-ts); font-variant-numeric: tabular-nums; }\n.log li:hover { background: rgb(255 255 255 / 0.03); }\n.log .src { color: var(--term-muted); }\n.log li.src { font-style: italic; }\n.log li.warn { color: var(--term-warn); background: var(--term-warn-bg); box-shadow: inset 2px 0 0 var(--term-warn); }\n.log li.error { color: var(--term-err); background: var(--term-err-bg); box-shadow: inset 2px 0 0 var(--term-err); }\n.log li.ok { color: var(--term-ok); }\n.log:empty::after { content: \"No output yet.\"; display: block; padding: 0 var(--sp-4); color: var(--term-muted); }\n\n@keyframes spin { to { transform: rotate(360deg); } }\n@keyframes pulse { 50% { opacity: 0.35; } }\n@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(0.99); } }\n\n/* Responsive: below 900px the sidebar becomes a top bar */\n@media (max-width: 900px) {\n .shell { grid-template-columns: minmax(0, 1fr); background: none; }\n .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }\n .brand { padding: 0; order: 1; }\n .sidebar-foot { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: var(--sp-3); }\n .session button { width: auto; }\n .nav { order: 3; width: 100%; flex-direction: row; align-items: center; gap: var(--sp-3); min-width: 0; }\n .nav-target { padding: 0; display: flex; align-items: center; gap: var(--sp-2); flex: none; }\n .nav-target select { width: 10.5rem; }\n .nav-list { flex-direction: row; gap: 2px; overflow-x: auto; min-width: 0; scrollbar-width: none; }\n .nav .nav-item { width: auto; flex: none; }\n .nav .nav-item[aria-current=\"page\"]::before { left: 10px; right: 10px; top: auto; bottom: -12px; width: auto; height: 2px; border-radius: 2px 2px 0 0; }\n .target-bar { position: static; padding: 10px var(--sp-4); }\n .app { padding: var(--sp-5) var(--sp-4) var(--sp-7); }\n .run-grid { grid-template-columns: minmax(0, 1fr); }\n}\n@media (max-width: 640px) {\n .form-grid { grid-template-columns: minmax(0, 1fr); }\n .local-note > span { display: none; }\n .nav { flex-wrap: wrap; }\n .nav-target { width: 100%; }\n .nav-target select { width: 100%; max-width: none; }\n .nav-list { width: 100%; margin: 0 -4px; }\n .nav .nav-item[aria-current=\"page\"]::before { display: none; }\n .nav-list { gap: 0; justify-content: space-between; }\n .nav .nav-item { padding: 0 8px; font-size: var(--fs-md); height: 32px; }\n .nav .nav-item .icon { display: none; }\n .grid-2 { grid-template-columns: minmax(0, 1fr); }\n .kv-row { grid-template-columns: 96px minmax(0, 1fr); }\n .page-head { margin-bottom: var(--sp-4); }\n h2 { font-size: 18px; line-height: 24px; }\n th, td { padding: 8px var(--sp-3); }\n .card-head, .card-body { padding-left: var(--sp-3); padding-right: var(--sp-3); }\n .finding { grid-template-columns: minmax(0, 1fr); padding: var(--sp-3); }\n .fix { grid-column: 1; }\n .dialog-body { padding-left: 20px; }\n .log li { padding-left: var(--sp-3); }\n .log li::before { display: none; }\n .target-bar .ctx-sep { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }\n .step.is-running .step-icon { border-right-color: var(--molten); border-style: dotted; }\n}\n";
|