agent-dag 1.33.114 → 1.33.116
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/bin/agent-dag.js +142 -14
- package/bin/deck.js +58 -9
- package/dist/web/assets/index-IYz4hT-u.css +1 -0
- package/dist/web/assets/{index-DK70gG3I.js → index-xn_csnqv.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/src/server/index.mjs +11 -0
- package/src/server/npx.mjs +108 -1
- package/src/server/self-update.mjs +32 -3
- package/src/server/supervisor.mjs +92 -1
- package/dist/web/assets/index-CJoxl1uq.css +0 -1
package/bin/agent-dag.js
CHANGED
|
@@ -20,18 +20,27 @@
|
|
|
20
20
|
// inherited so the terminal is unchanged, and Ctrl+C keeps working because the
|
|
21
21
|
// process group never changes.
|
|
22
22
|
//
|
|
23
|
+
// The upgrade path has one more constraint, learned the expensive way: the
|
|
24
|
+
// worker must not be torn down to find out whether an upgrade is possible. It
|
|
25
|
+
// used to be — the worker exited 76, and only then did npx discover it was
|
|
26
|
+
// offline — so every failed update cost a full outage and could be retried
|
|
27
|
+
// identically forever. Now the worker ASKS (an `upgrade` message), the fetch
|
|
28
|
+
// happens beside it while it keeps serving, and only a fetch that worked is
|
|
29
|
+
// answered with the exit that gives up the port. See prefetchUpgrade.
|
|
30
|
+
//
|
|
23
31
|
// Everything else the deck does still lives in bin/deck.js. This file must stay
|
|
24
32
|
// boring: it is the one process that is never replaced.
|
|
25
33
|
import { spawn } from "node:child_process";
|
|
26
34
|
import { connect } from "node:net";
|
|
27
35
|
import { dirname, join } from "node:path";
|
|
28
36
|
import { fileURLToPath } from "node:url";
|
|
29
|
-
import {
|
|
37
|
+
import { killTree } from "../src/server/exec.mjs";
|
|
38
|
+
import { npxFailureHint, npxFailureSummary, npxLaunch, npxPrefetch } from "../src/server/npx.mjs";
|
|
30
39
|
import {
|
|
31
|
-
bareSpecName, claimRestartFailureKey, clearRestartFailure, installedVersion,
|
|
32
|
-
recordRestartFailure,
|
|
40
|
+
bareSpecName, claimRestartFailureKey, clearRestartFailure, installedVersion, lastKnownLatest,
|
|
41
|
+
npxRestartSpec, readRestartFailure, recordRestartFailure,
|
|
33
42
|
} from "../src/server/self-update.mjs";
|
|
34
|
-
import { dieOfSignal, workerExitAction } from "../src/server/supervisor.mjs";
|
|
43
|
+
import { dieOfSignal, upgradeAttempt, upgradeRefusalText, workerExitAction } from "../src/server/supervisor.mjs";
|
|
35
44
|
|
|
36
45
|
const BIN_DIR = dirname(fileURLToPath(import.meta.url));
|
|
37
46
|
const WORKER = join(BIN_DIR, "deck.js");
|
|
@@ -55,6 +64,15 @@ claimRestartFailureKey();
|
|
|
55
64
|
let boundPort = null;
|
|
56
65
|
let restarts = 0;
|
|
57
66
|
let child = null;
|
|
67
|
+
// The npx process fetching a replacement, while the worker above keeps serving.
|
|
68
|
+
// Held separately from `child` for exactly that reason: for the length of a
|
|
69
|
+
// fetch there are two of them, and only one is the deck.
|
|
70
|
+
let fetching = null;
|
|
71
|
+
// The upgrade this supervisor has committed to, from the moment the pre-flight
|
|
72
|
+
// allowed it until the replacement is serving or the attempt has been written
|
|
73
|
+
// off. giveUp runs long after the decision that permitted the attempt and has
|
|
74
|
+
// to record that decision's count, not a fresh one.
|
|
75
|
+
let attempting = null;
|
|
58
76
|
// Set by the signal handlers, and the first thing every exit path asks. Without
|
|
59
77
|
// it, Ctrl+C during an npx fetch looks exactly like a failed fetch, and a
|
|
60
78
|
// worker that was already exiting 75 or 76 when the signal landed reads as a
|
|
@@ -66,7 +84,7 @@ function launch(respawn) {
|
|
|
66
84
|
// Appended last so it wins: the worker's parser keeps the final --port.
|
|
67
85
|
if (respawn && boundPort != null) args.push("--port", String(boundPort));
|
|
68
86
|
|
|
69
|
-
|
|
87
|
+
const worker = spawn(process.execPath, args, {
|
|
70
88
|
// stdio inherited so the child owns the same terminal the user started:
|
|
71
89
|
// same banner, same colours, same Ctrl+C. The fourth slot adds an IPC
|
|
72
90
|
// channel — the only way the worker can tell us which port it got, since
|
|
@@ -82,12 +100,24 @@ function launch(respawn) {
|
|
|
82
100
|
},
|
|
83
101
|
});
|
|
84
102
|
|
|
85
|
-
child
|
|
86
|
-
|
|
103
|
+
child = worker;
|
|
104
|
+
|
|
105
|
+
worker.on("message", (m) => {
|
|
106
|
+
if (!m || typeof m !== "object") return;
|
|
107
|
+
if (m.type === "listening" && typeof m.port === "number") boundPort = m.port;
|
|
108
|
+
// The worker asking to be replaced, while it is still serving. Answered by
|
|
109
|
+
// prefetchUpgrade, which is the whole of this file's new shape: the fetch
|
|
110
|
+
// happens here, and only then does that worker exit — see UPGRADE_CODE.
|
|
111
|
+
else if (m.type === "upgrade") prefetchUpgrade(worker);
|
|
87
112
|
});
|
|
88
113
|
|
|
89
|
-
|
|
114
|
+
worker.on("exit", (code, signal) => {
|
|
90
115
|
child = null;
|
|
116
|
+
// A fetch is for the worker that asked for it. That worker is gone, so the
|
|
117
|
+
// download is spent effort and the process holding it has to be stopped:
|
|
118
|
+
// left running it would keep writing into the npx cache directory the next
|
|
119
|
+
// attempt reads, minutes after the deck stopped waiting for it.
|
|
120
|
+
if (fetching) { killTree(fetching); fetching = null; attempting = null; }
|
|
91
121
|
// `stopping` outranks the exit code — see supervisor.mjs. A restart and a
|
|
92
122
|
// Ctrl+C can land together, and honouring the code first is how the deck
|
|
93
123
|
// came back to life after the user stopped it.
|
|
@@ -111,7 +141,7 @@ function launch(respawn) {
|
|
|
111
141
|
else process.exit(next.code);
|
|
112
142
|
});
|
|
113
143
|
|
|
114
|
-
|
|
144
|
+
worker.on("error", (err) => {
|
|
115
145
|
console.error(`agents-deck: could not start ${WORKER}: ${err.message}`);
|
|
116
146
|
process.exit(1);
|
|
117
147
|
});
|
|
@@ -131,6 +161,88 @@ function withoutPortAndOpen(args) {
|
|
|
131
161
|
return out;
|
|
132
162
|
}
|
|
133
163
|
|
|
164
|
+
/** The note the browser reads, written by the only process that knows why an
|
|
165
|
+
* upgrade did not happen. `failedAt` is when the FETCH failed, which a refusal
|
|
166
|
+
* restating an earlier failure carries forward — see upgradeAttempt. */
|
|
167
|
+
function noteFailure({ pkgName, spec, error, target, attempts, failedAt = Date.now() }) {
|
|
168
|
+
recordRestartFailure({
|
|
169
|
+
name: pkgName,
|
|
170
|
+
command: `npx -y ${spec}`,
|
|
171
|
+
error,
|
|
172
|
+
version: VERSION === "?" ? null : VERSION,
|
|
173
|
+
target,
|
|
174
|
+
attempts,
|
|
175
|
+
failedAt,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Fetch the replacement while the deck this supervisor started keeps serving.
|
|
181
|
+
*
|
|
182
|
+
* The order used to be: kill the working deck, attempt, fail, rebuild the deck.
|
|
183
|
+
* Every failed upgrade was therefore a real interruption — the SSE stream
|
|
184
|
+
* dropped, hook events fired into the gap lost outright, the canvas back with
|
|
185
|
+
* tools stuck in flight — and it was paid in full even when the update never
|
|
186
|
+
* had a chance of working. Reported from a terminal that had been left alone:
|
|
187
|
+
* the same version, the same ETARGET, the same teardown, four times over.
|
|
188
|
+
*
|
|
189
|
+
* npm can resolve and download without the deck dying. So the fetch is done
|
|
190
|
+
* first, and the worker is only asked to exit once there is something to hand
|
|
191
|
+
* the port to. There is never a second server: npxPrefetch installs the package
|
|
192
|
+
* and runs nothing out of it, and the replacement is spawned only after this
|
|
193
|
+
* process has watched the old worker's exit.
|
|
194
|
+
*
|
|
195
|
+
* A refusal costs nothing but the click. The deck keeps its port, its stream
|
|
196
|
+
* and its hooks; the failure reaches the browser through the note, exactly as a
|
|
197
|
+
* failed fetch always has.
|
|
198
|
+
*/
|
|
199
|
+
async function prefetchUpgrade(worker) {
|
|
200
|
+
if (stopping || fetching || attempting) return;
|
|
201
|
+
const reply = (msg) => { try { worker.send?.(msg); } catch { /* the worker is gone */ } };
|
|
202
|
+
|
|
203
|
+
const spec = npxRestartSpec(PKG_ROOT);
|
|
204
|
+
// Not an npx run after all, so there is nothing to fetch and the files on
|
|
205
|
+
// disk are already the newest this deck can reach.
|
|
206
|
+
if (!spec) { reply({ type: "upgrade-refused", error: "this deck was not started by npx" }); return; }
|
|
207
|
+
const pkgName = bareSpecName(spec) ?? "agents-deck";
|
|
208
|
+
// What the banner offered, straight off the marker the version check writes.
|
|
209
|
+
// The note is keyed by it so that "this exact version already failed here" is
|
|
210
|
+
// a question anything can answer — and so a newer release clears the slate.
|
|
211
|
+
const target = lastKnownLatest(pkgName);
|
|
212
|
+
|
|
213
|
+
const note = readRestartFailure(pkgName);
|
|
214
|
+
const decision = upgradeAttempt({ note, target, now: Date.now() });
|
|
215
|
+
if (!decision.allow) {
|
|
216
|
+
const error = upgradeRefusalText(decision, target);
|
|
217
|
+
// Re-stamped even though nothing was attempted: the tab ends its attempt on
|
|
218
|
+
// a failure note it has not seen before, so a refusal that left the note
|
|
219
|
+
// untouched would leave the button reading "fetching…" for the full three
|
|
220
|
+
// minutes it allows, over a deck that never went anywhere.
|
|
221
|
+
noteFailure({
|
|
222
|
+
pkgName, spec, error, target,
|
|
223
|
+
attempts: decision.attempt,
|
|
224
|
+
failedAt: typeof note?.failedAt === "number" ? note.failedAt : Date.now(),
|
|
225
|
+
});
|
|
226
|
+
reply({ type: "upgrade-refused", error });
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
attempting = { pkgName, spec, target, attempt: decision.attempt };
|
|
231
|
+
process.stdout.write(`\n ↻ fetching ${spec}…\n`);
|
|
232
|
+
const got = await npxPrefetch(spec, { onChild: (c) => { fetching = c; } });
|
|
233
|
+
fetching = null;
|
|
234
|
+
// Ctrl+C, or a worker that died on its own while npm was working: either way
|
|
235
|
+
// the deck this fetch was for is not there to be replaced, and the exit path
|
|
236
|
+
// that noticed has already had its say.
|
|
237
|
+
if (stopping || child !== worker) { attempting = null; return; }
|
|
238
|
+
if (got.ok) { reply({ type: "upgrade-ready" }); return; }
|
|
239
|
+
|
|
240
|
+
const error = [got.error, got.hint].filter(Boolean).join(" — ");
|
|
241
|
+
noteFailure({ pkgName, spec, error, target, attempts: decision.attempt });
|
|
242
|
+
attempting = null;
|
|
243
|
+
reply({ type: "upgrade-refused", error });
|
|
244
|
+
}
|
|
245
|
+
|
|
134
246
|
/**
|
|
135
247
|
* Come back on a newer version, for a deck that npx started.
|
|
136
248
|
*
|
|
@@ -162,7 +274,10 @@ function launchNpx() {
|
|
|
162
274
|
const pkgName = bareSpecName(spec) ?? "agents-deck";
|
|
163
275
|
clearRestartFailure(pkgName);
|
|
164
276
|
|
|
165
|
-
|
|
277
|
+
// No "fetching…" line here any more: prefetchUpgrade printed it and the
|
|
278
|
+
// tarball is already unpacked, so this resolves out of the npx cache and the
|
|
279
|
+
// next thing on screen is the new deck's own banner.
|
|
280
|
+
//
|
|
166
281
|
// npxLaunch prefers npm's own npx-cli.js next to this Node binary, which
|
|
167
282
|
// needs no PATH lookup and no batch shim; the PATH shim is the fallback and
|
|
168
283
|
// still goes through cmd.exe with each argument quoted.
|
|
@@ -222,12 +337,18 @@ function launchNpx() {
|
|
|
222
337
|
if (hint) console.error(` ${hint}`);
|
|
223
338
|
// Left for the worker about to be launched: it is the only way the browser
|
|
224
339
|
// learns this happened at all. See recordRestartFailure.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
340
|
+
//
|
|
341
|
+
// This is the outage the pre-flight cannot spare anyone: the fetch worked,
|
|
342
|
+
// the port was handed over, and the replacement still did not serve. It
|
|
343
|
+
// counts against the same target as any other failed attempt, so a copy
|
|
344
|
+
// that starts and dies is not offered forever either.
|
|
345
|
+
noteFailure({
|
|
346
|
+
pkgName, spec,
|
|
228
347
|
error: [summary ?? why, hint].filter(Boolean).join(" — "),
|
|
229
|
-
|
|
348
|
+
target: attempting?.target ?? null,
|
|
349
|
+
attempts: attempting?.attempt ?? 1,
|
|
230
350
|
});
|
|
351
|
+
attempting = null;
|
|
231
352
|
restarts++;
|
|
232
353
|
launch(true);
|
|
233
354
|
};
|
|
@@ -256,6 +377,13 @@ for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
|
256
377
|
// on the next boot.
|
|
257
378
|
const second = stopping; // an impatient user pressing Ctrl+C again
|
|
258
379
|
stopping = true;
|
|
380
|
+
// A fetch in flight is not the deck and does not stop with it. On POSIX the
|
|
381
|
+
// Ctrl+C that reached us reached it too — it is in this process group — but
|
|
382
|
+
// a plain `kill` of the supervisor, or a systemd stop, is not, and on
|
|
383
|
+
// Windows the shim path leaves npm as a grandchild of cmd.exe that only
|
|
384
|
+
// killTree can reach. Stopped before the worker, since the worker's own
|
|
385
|
+
// exit path is what ends this process.
|
|
386
|
+
if (fetching) { killTree(fetching, second ? "SIGKILL" : sig); fetching = null; }
|
|
259
387
|
if (!child) { process.exit(0); return; }
|
|
260
388
|
try { child.kill(second ? "SIGKILL" : sig); } catch { /* already gone */ }
|
|
261
389
|
// The npx step is a shell that exec's the new deck, and a signal can land in
|
package/bin/deck.js
CHANGED
|
@@ -84,7 +84,7 @@ const persist = flags.noPersist
|
|
|
84
84
|
|
|
85
85
|
const { installHooks, keepDiscovery, removeDiscovery, hasCodexInstalled } =
|
|
86
86
|
await import(pathToFileURL(join(PKG_ROOT, "src/server/installer.mjs")).href);
|
|
87
|
-
const { startServer, hookToken } =
|
|
87
|
+
const { startServer, hookToken, releaseRestart } =
|
|
88
88
|
await import(pathToFileURL(join(PKG_ROOT, "src/server/index.mjs")).href);
|
|
89
89
|
|
|
90
90
|
// Codex hooks install when ~/.codex/ exists, unless --no-codex was passed.
|
|
@@ -279,20 +279,69 @@ if (upgrade) {
|
|
|
279
279
|
// only after this process is gone — which is precisely what keeps the
|
|
280
280
|
// replacement from racing this listener onto a random fallback port.
|
|
281
281
|
let restarting = false;
|
|
282
|
+
// Outer bound on the supervisor's answer below. It cannot be reached today —
|
|
283
|
+
// the fetch has a deadline of its own and every path through it replies — but
|
|
284
|
+
// `restarting` is a latch, and a latch with no way out is how a deck ends up
|
|
285
|
+
// silently refusing every restart for the rest of its life.
|
|
286
|
+
const UPGRADE_ANSWER_MS = 150_000;
|
|
287
|
+
let upgradeTimer = null;
|
|
288
|
+
|
|
282
289
|
const requestRestart = (mode) => {
|
|
283
290
|
if (restarting) return;
|
|
284
291
|
restarting = true;
|
|
285
|
-
// "npx" means the newer code is not on this disk at all
|
|
286
|
-
//
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
// "npx" means the newer code is not on this disk at all, so it has to be
|
|
293
|
+
// fetched — and this process keeps serving while that happens. Exiting first
|
|
294
|
+
// is what made every failed upgrade an outage: the SSE stream dropped, hook
|
|
295
|
+
// events fired into the gap were lost outright (hook/hook.js is
|
|
296
|
+
// fire-and-forget with a 1s timeout and no retry), and the canvas came back
|
|
297
|
+
// with whatever was in flight stuck until the stale sweeper reaped it — all
|
|
298
|
+
// of it paid before anyone knew whether npm could even resolve the version.
|
|
299
|
+
// Nothing is torn down here now; the supervisor answers when it knows.
|
|
300
|
+
if (mode === "npx") {
|
|
301
|
+
upgradeTimer = setTimeout(() => abandonUpgrade("no answer from the supervisor"), UPGRADE_ANSWER_MS);
|
|
302
|
+
upgradeTimer.unref?.();
|
|
303
|
+
// Armed before the ask, not after: a send that throws is a supervisor that
|
|
304
|
+
// can no longer answer, and the deck has to come back out of the latch on
|
|
305
|
+
// its own rather than wait out an answer that cannot arrive.
|
|
306
|
+
try { process.send({ type: "upgrade" }); }
|
|
307
|
+
catch (err) { abandonUpgrade(err?.message ?? "the supervisor is no longer listening"); }
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
const to = restartTarget();
|
|
311
|
+
process.stdout.write(`\n ${C.yellow}↻${C.reset} ${C.dim}restarting${to ? ` → v${to}` : ""}…${C.reset}\n`);
|
|
312
|
+
shutdown(RESTART_CODE);
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
// The upgrade did not happen and this deck is still the deck. Said out loud
|
|
316
|
+
// because the terminal has just printed that a fetch was starting, and left
|
|
317
|
+
// unsaid it reads as a restart that hung.
|
|
318
|
+
const abandonUpgrade = (why) => {
|
|
319
|
+
clearTimeout(upgradeTimer);
|
|
320
|
+
restarting = false;
|
|
321
|
+
// The server's own latch, which no longer has an exiting process to clear it.
|
|
322
|
+
releaseRestart();
|
|
289
323
|
process.stdout.write(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
: `\n ${C.yellow}↻${C.reset} ${C.dim}restarting${to ? ` → v${to}` : ""}…${C.reset}\n`,
|
|
324
|
+
`\n ${C.yellow}✕${C.reset} ${C.dim}update not applied — still on ${C.reset}v${PKG_VERSION}\n` +
|
|
325
|
+
(why ? ` ${C.dim}${why}${C.reset}\n` : ""),
|
|
293
326
|
);
|
|
294
|
-
shutdown(viaNpx ? UPGRADE_CODE : RESTART_CODE);
|
|
295
327
|
};
|
|
328
|
+
|
|
329
|
+
// The supervisor's verdict on the fetch it was asked for. Only it can answer:
|
|
330
|
+
// the fetch is its child, and it is the process that will still be here when
|
|
331
|
+
// this one exits.
|
|
332
|
+
process.on("message", (m) => {
|
|
333
|
+
if (!restarting || !m || typeof m !== "object") return;
|
|
334
|
+
if (m.type === "upgrade-ready") {
|
|
335
|
+
clearTimeout(upgradeTimer);
|
|
336
|
+
// The replacement is on the machine now, so this is the last moment the
|
|
337
|
+
// port is worth holding: exiting hands it straight over.
|
|
338
|
+
process.stdout.write(`\n ${C.yellow}↻${C.reset} ${C.dim}updating via npx…${C.reset}\n`);
|
|
339
|
+
shutdown(UPGRADE_CODE);
|
|
340
|
+
} else if (m.type === "upgrade-refused") {
|
|
341
|
+
abandonUpgrade(m.error);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
|
|
296
345
|
// What a restart would land on. Read from disk now rather than remembered from
|
|
297
346
|
// boot, because the whole point is that the two differ.
|
|
298
347
|
function restartTarget() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}:root,:root[data-theme=dark]{--bg: #0b0c10;--bg-soft: #0f1116;--panel: #14161b;--line: #1f2229;--line-soft: #1a1c22;--text: #d8dae0;--muted: #7e828c;--muted-dim: #50535b;--text-dim: #7e828c;--accent: #7dd3fc;--accent-dim: #38bdf850;--ok: #86efac;--warn: #fcd34d;--err: #fca5a5;--inflight: #f0abfc;--shadow-1: 0 6px 18px rgba(0,0,0,.25);--shadow-2: 0 10px 24px rgba(0,0,0,.32);--node-grad: linear-gradient(180deg, var(--panel), var(--bg-soft));--topbar-grad: linear-gradient(to bottom, var(--panel), var(--bg-soft));--bg-grid-1: rgba(125,211,252,.06);--bg-grid-2: rgba(240,171,252,.05);--grid-line: #1a1d24;--minimap-mask: rgba(11,12,16,.85);color-scheme:dark}:root[data-theme=light]{--bg: #eef1f6;--bg-soft: #ffffff;--panel: #ffffff;--line: #c8cdd6;--line-soft: #dde1e8;--text: #0d1117;--muted: #4a5260;--muted-dim: #7c8493;--text-dim: #5f6673;--accent: #0369a1;--accent-dim: rgba(3,105,161,.22);--ok: #15803d;--warn: #b45309;--err: #b91c1c;--inflight: #7e22ce;--shadow-1: 0 4px 14px rgba(15,23,42,.1);--shadow-2: 0 10px 28px rgba(15,23,42,.16);--node-grad: linear-gradient(180deg, #ffffff, #f2f5fa);--topbar-grad: linear-gradient(to bottom, #ffffff, #eef1f6);--bg-grid-1: rgba(3,105,161,.1);--bg-grid-2: rgba(126,34,206,.08);--grid-line: #d0d5dd;--minimap-mask: rgba(238,241,246,.85);color-scheme:light}*{box-sizing:border-box}html,body,#root{margin:0;height:100%;background:var(--bg);color:var(--text);font:13px/1.45 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior:none}*::-webkit-scrollbar{width:10px;height:10px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:var(--line);border:2px solid var(--bg);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:var(--muted-dim)}*{scrollbar-color:var(--line) transparent;scrollbar-width:thin}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}button:focus-visible,.search input:focus-visible{outline-offset:1px}.app{display:grid;grid-template-columns:1fr 360px;grid-template-rows:52px auto 1fr;height:100vh}.app:has(.session-list){grid-template-columns:240px 1fr 360px}.app:has(.accounts-panel){grid-template-columns:288px 1fr 360px}.app:has(.session-list) .canvas-wrap,.app:has(.accounts-panel) .canvas-wrap{grid-column:2}.app:has(.session-list) .conn-banner,.app:has(.accounts-panel) .conn-banner,.app:has(.session-list) .ver-banner,.app:has(.accounts-panel) .ver-banner{grid-column:2}.canvas-wrap{grid-column:1;grid-row:3}.detail{grid-column:2;grid-row:2 / -1}.app:has(.session-list) .detail{grid-column:3}.topbar{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:var(--topbar-grad);border-bottom:1px solid var(--line);-webkit-user-select:none;user-select:none}.topbar .brand{font-weight:600;letter-spacing:.02em;color:var(--text);display:flex;align-items:center;gap:10px;font-size:14px;white-space:nowrap;flex:none}.topbar .brand .logo{width:14px;height:14px;border-radius:4px;background:conic-gradient(from 220deg,#7dd3fc,#f0abfc,#86efac,#7dd3fc);box-shadow:0 0 12px #7dd3fc73}.topbar .brand .v{color:var(--muted);font-weight:400;font-size:11px;margin-left:2px}.topbar .brand button.v{display:inline-flex;align-items:center;flex:none;gap:5px;padding:2px 7px;border:1px solid transparent;border-radius:999px;background:none;font:inherit;font-size:11px;font-weight:500;cursor:pointer;transition:background .13s,border-color .13s,color .13s}.topbar .brand button.v:not(.stale){color:var(--muted);font-weight:400;border-color:var(--line)}.topbar .brand button.v:not(.stale):hover{color:var(--text);border-color:var(--muted-dim);background:color-mix(in srgb,var(--text) 6%,transparent)}.topbar .brand button.v.checking{cursor:progress;opacity:.6}.topbar .brand button.v.stale{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 34%,transparent);background:color-mix(in srgb,var(--warn) 10%,transparent)}.topbar .brand button.v.stale:hover{border-color:color-mix(in srgb,var(--warn) 55%,transparent);background:color-mix(in srgb,var(--warn) 18%,transparent)}.topbar .brand button.v .v-dot{width:5px;height:5px;border-radius:50%;background:var(--warn);box-shadow:0 0 7px var(--warn);animation:pulse 2.4s infinite}.topbar .actions{display:flex;gap:8px;align-items:center}.selected-ribbon{display:inline-flex;align-items:center;gap:8px;padding:4px 6px 4px 10px;margin:0 12px 0 4px;background:var(--bg-soft);border:1px solid var(--line);border-radius:999px;color:var(--text);font:inherit;font-size:12px;cursor:pointer;max-width:380px;min-width:0;transition:border-color .12s,background .12s}.selected-ribbon:hover{border-color:var(--accent-dim);background:var(--bg)}.selected-ribbon:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.selected-ribbon .selected-label{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:0 1 auto}.selected-ribbon .selected-cost{color:var(--ok);font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px}.selected-ribbon .selected-rate{color:var(--muted);font-size:10.5px}.selected-ribbon .selected-extra{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;background:var(--accent-dim);color:var(--text);font-size:10.5px;font-weight:600;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.selected-ribbon .selected-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:var(--muted);font-size:14px;line-height:1;cursor:pointer;transition:background .12s,color .12s}.selected-ribbon .selected-close:hover{background:var(--line);color:var(--text)}.topbar .status{color:var(--muted);font-size:12px;margin-right:6px;display:inline-flex;align-items:center;gap:14px}.topbar .status .stat{display:inline-flex;align-items:baseline;gap:4px;font-variant-numeric:tabular-nums}.topbar .status .stat .lbl{color:var(--muted)}.topbar .status .stat+.stat:before{content:"";display:inline-block;width:1px;height:12px;background:var(--line);margin-right:10px;position:relative;top:1px}.topbar .status .pill{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:999px;background:var(--bg-soft);border:1px solid var(--line);font-size:11px}.topbar .status .pill.live{color:var(--ok);border-color:#86efac40}.topbar .status .pill.live:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--ok);box-shadow:0 0 6px var(--ok);animation:pulse 1.6s ease-in-out infinite}.topbar .status .pill.dead{color:var(--err);border-color:#fca5a559;background:#fca5a50f}.topbar .status .pill.dead:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--err);box-shadow:0 0 6px var(--err)}.topbar .status .count{color:var(--text);font-variant-numeric:tabular-nums}.topbar .status .mcp-legend{display:inline-flex;align-items:center;gap:3px;cursor:default}.topbar .status .mcp-legend .mcp-dot{display:inline-block;width:8px;height:8px;border-radius:50%;border:1px solid rgba(0,0,0,.35);box-shadow:0 0 4px #00000040}.topbar .status .mcp-legend .mcp-more{font-size:9.5px;color:var(--muted);margin-left:1px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.35}}button.btn{background:transparent;color:var(--text);border:1px solid var(--line);padding:6px 12px;border-radius:6px;cursor:pointer;font:inherit;font-size:12px;transition:border-color .12s,color .12s,background .12s,transform .14s cubic-bezier(.23,1,.32,1)}button.btn:hover{border-color:var(--accent-dim);color:var(--accent)}button.btn:active:not(:disabled){transform:scale(.97)}button.btn.primary{background:var(--accent-dim);color:var(--text);border-color:var(--accent-dim)}button.btn.warn{border-color:#fcd34d80;color:var(--warn)}button.btn.warn:hover{border-color:var(--warn);color:var(--warn)}button.btn.danger{color:var(--err);border-color:color-mix(in srgb,var(--err) 40%,transparent)}button.btn.danger:hover{border-color:var(--err);color:var(--err);background:color-mix(in srgb,var(--err) 12%,transparent)}button.btn.icon-btn{width:30px;height:30px;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1}.search{position:relative;display:inline-flex;align-items:center;margin-right:4px}.search-icon{position:absolute;left:8px;color:var(--muted);font-size:14px;pointer-events:none}.search input{background:var(--bg-soft);color:var(--text);border:1px solid var(--line);padding:6px 26px 6px 24px;border-radius:6px;font:inherit;font-size:12px;min-width:220px;outline:none;transition:border-color .12s,box-shadow .12s}.search input::placeholder{color:var(--muted)}.search input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}.search-clear{position:absolute;right:4px;background:transparent;border:none;color:var(--muted);cursor:pointer;font-size:16px;padding:0 6px;line-height:1}.search-clear:hover{color:var(--text)}.search-kbd{position:absolute;right:6px;pointer-events:none;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;font-weight:600;color:var(--muted);background:var(--bg);border:1px solid var(--line);border-radius:4px;padding:0 5px;line-height:16px;height:16px}.search input:focus~.search-kbd{opacity:0}.conn-banner{grid-column:1;grid-row:2;display:flex;align-items:center;gap:10px;padding:8px 18px;background:linear-gradient(90deg,rgba(252,165,165,.12),transparent);border-bottom:1px solid rgba(252,165,165,.3);color:var(--err);font-size:12.5px;font-weight:500;animation:fadeIn .2s ease}.conn-banner .conn-dot{width:7px;height:7px;border-radius:50%;background:var(--err);box-shadow:0 0 8px var(--err);animation:pulse 1.2s infinite}.ver-banner{grid-column:1;grid-row:2;display:flex;align-items:center;gap:10px;padding:8px 18px;background:linear-gradient(90deg,color-mix(in srgb,var(--warn) 13%,transparent),transparent);border-bottom:1px solid color-mix(in srgb,var(--warn) 30%,transparent);color:var(--text);font-size:12.5px;font-weight:500;animation:fadeIn .2s ease}.ver-banner .ver-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--warn);box-shadow:0 0 8px var(--warn);animation:pulse 2.4s infinite}.ver-banner strong{font-weight:600}.ver-banner strong,.ver-banner .ver-sub{white-space:nowrap}.ver-banner .ver-sub{color:var(--muted);font-weight:400;min-width:0;overflow:hidden;text-overflow:ellipsis}.ver-banner .ver-cmd{display:inline-flex;align-items:center;gap:8px;padding:3px 5px 3px 9px;border:1px solid var(--line);border-radius:999px;background:var(--bg-soft);color:var(--text);cursor:pointer;transition:border-color .13s,background .13s}.ver-banner .ver-cmd:hover{border-color:var(--accent-dim);background:var(--panel)}.ver-banner .ver-cmd code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;-webkit-user-select:text;user-select:text}.ver-banner .ver-cmd-hint{font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);background:var(--line);border-radius:999px;padding:2px 7px}.ver-banner.done{background:linear-gradient(90deg,color-mix(in srgb,var(--ok) 13%,transparent),transparent);border-bottom-color:color-mix(in srgb,var(--ok) 30%,transparent)}.ver-banner.done .ver-dot{background:var(--ok);box-shadow:0 0 8px var(--ok);animation:none}.ver-banner .ver-act{padding:3px 11px;border:1px solid color-mix(in srgb,var(--warn) 45%,transparent);border-radius:999px;background:color-mix(in srgb,var(--warn) 16%,transparent);color:var(--warn);font:inherit;font-size:11.5px;font-weight:600;cursor:pointer;transition:background .13s,border-color .13s}.ver-banner .ver-act:hover:not(:disabled){background:color-mix(in srgb,var(--warn) 26%,transparent);border-color:color-mix(in srgb,var(--warn) 70%,transparent)}.ver-banner .ver-act:disabled{opacity:.6;cursor:default}.ver-banner .ver-sub.fail{color:var(--err)}.ver-banner .ver-auto{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid transparent;border-radius:999px;background:none;color:var(--muted);font:inherit;font-size:11.5px;cursor:pointer;transition:color .13s,border-color .13s}.ver-banner .ver-auto:hover{color:var(--text);border-color:var(--line)}.ver-banner .ver-auto i{width:6px;height:6px;border-radius:50%;background:var(--muted-dim);transition:background .13s,box-shadow .13s}.ver-banner .ver-auto.on{color:var(--warn)}.ver-banner .ver-auto.on i{background:var(--warn);box-shadow:0 0 6px var(--warn)}.ver-banner .ver-close{display:inline-flex;align-items:center;justify-content:center;margin-left:2px;flex:none;width:24px;height:24px;padding:0;border:0;border-radius:999px;background:none;color:var(--muted);font:inherit;font-size:14px;line-height:1;cursor:pointer;transition:background .12s,color .12s}.ver-banner .ver-close:hover{background:var(--line);color:var(--text)}.react-flow__node.rf-dim{opacity:.22;filter:saturate(.4)}.react-flow__node.rf-dim:hover{opacity:.6}.react-flow__node.rf-spotlit-out{opacity:.16;filter:saturate(.3) blur(.3px);transition:opacity .2s ease,filter .2s ease}.react-flow__node.rf-spotlit-out:hover{opacity:.55;filter:saturate(.7)}.react-flow__edge.rf-edge-selected .react-flow__edge-path{stroke-dasharray:6 3;animation:dashflow .8s linear infinite;filter:drop-shadow(0 0 4px var(--accent-dim))}.react-flow__node.rf-exiting{pointer-events:none}.react-flow__node.rf-exiting .agent-node{animation:nodeExit .6s cubic-bezier(.55,0,.55,1) forwards}@keyframes nodeExit{0%{opacity:1;filter:blur(0) saturate(1);transform:scale(1)}60%{opacity:.4;filter:blur(2px) saturate(.4)}to{opacity:0;filter:blur(6px) saturate(0);transform:scale(.85)}}.react-flow__edge.rf-edge-exiting .react-flow__edge-path{animation:edgeExit .6s ease forwards}@keyframes edgeExit{to{opacity:0;stroke-dashoffset:40}}.canvas-wrap{position:relative;background:radial-gradient(1200px 600px at 60% -10%,var(--bg-grid-1),transparent 60%),radial-gradient(1000px 500px at 10% 110%,var(--bg-grid-2),transparent 60%),var(--bg);overflow:hidden}.cat-filter-bar{position:absolute;top:14px;left:14px;z-index:6;display:flex;gap:4px;padding:4px;background:#14161bc7;border:1px solid var(--line);border-radius:999px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);box-shadow:0 6px 18px #0000004d}:root[data-theme=light] .cat-filter-bar{background:#ffffffc7;box-shadow:0 6px 18px #0f172a1a}.cat-filter{display:inline-flex;align-items:center;gap:5px;padding:4px 10px 4px 8px;border-radius:999px;border:1px solid transparent;background:transparent;color:var(--text);font:inherit;font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.02em;cursor:pointer;transition:background .12s,color .12s,opacity .12s}.cat-filter .cat-emoji{font-size:13px;line-height:1}.cat-filter .cat-name{text-transform:lowercase}.cat-filter:hover{background:var(--bg-soft)}.cat-filter:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.cat-filter.off{opacity:.38;color:var(--muted)}.cat-filter.off .cat-emoji{filter:grayscale(.7)}.cat-filter.off:hover{opacity:.8}.detail{position:relative;background:var(--panel);border-left:1px solid var(--line);padding:18px;overflow:auto;display:flex;flex-direction:column;gap:12px}.detail-close{position:absolute;top:10px;right:12px;width:24px;height:24px;display:grid;place-items:center;font-size:18px;line-height:1;color:var(--muted);background:transparent;border:1px solid transparent;border-radius:6px;cursor:pointer;z-index:2;transition:background .12s ease,color .12s ease,border-color .12s ease}.detail-close:hover{color:var(--text);background:var(--bg-soft, rgba(127,127,127,.12));border-color:var(--line)}.app:has(.detail-reopen){grid-template-columns:1fr}.app:has(.session-list):has(.detail-reopen){grid-template-columns:240px 1fr}.app:has(.accounts-panel):has(.detail-reopen){grid-template-columns:288px 1fr}.detail-reopen{position:fixed;top:64px;right:0;width:22px;height:44px;display:grid;place-items:center;font-size:16px;line-height:1;color:var(--muted);background:var(--panel);border:1px solid var(--line);border-right:none;border-radius:8px 0 0 8px;cursor:pointer;z-index:10;box-shadow:-2px 2px 8px #0003;transition:color .12s ease,background .12s ease}.detail-reopen:hover{color:var(--text)}.detail h3{margin:0;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}.detail .empty{color:var(--muted);font-style:italic}.detail .hint{border:1px dashed var(--line);border-radius:8px;padding:12px;color:var(--muted);font-size:12px;line-height:1.55;background:var(--bg-soft)}.detail .hint code{background:var(--bg);border:1px solid var(--line);padding:1px 6px;border-radius:4px;font-size:11.5px;color:var(--text)}.detail .row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;border-bottom:1px solid var(--line-soft);font-size:12px;gap:12px}.detail .row:last-child{border-bottom:none}.detail .row .k{color:var(--muted)}.detail .row .v{color:var(--text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;overflow:hidden;text-overflow:ellipsis;max-width:220px;white-space:nowrap}.detail .tool{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;padding:5px 0;color:var(--text);display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid var(--line-soft)}.detail .tool:last-child{border-bottom:none}.detail .tool .name{display:inline-flex;align-items:center;gap:8px}.detail .tool .name .status-dot{display:inline-block;width:6px;height:6px;border-radius:50%}.detail .tool .name .status-dot.inflight{background:var(--inflight);animation:pulse 1.2s infinite}.detail .tool .name .status-dot.done{background:var(--ok)}.detail .tool .name .status-dot.err{background:var(--err)}.react-flow__renderer{background:transparent}.react-flow__node{transition:transform .32s cubic-bezier(.22,1,.36,1);animation:nodeSpawn .36s cubic-bezier(.22,1,.36,1) both}@keyframes nodeSpawn{0%{opacity:0;filter:blur(2px)}to{opacity:1;filter:blur(0)}}.react-flow__node.dragging,.react-flow__node:active{transition:none}.react-flow__edge-path{stroke:var(--accent-dim);stroke-width:1.5;transition:stroke .2s ease}.react-flow__edge.animated .react-flow__edge-path{stroke:var(--inflight);stroke-dasharray:5;animation:dashflow .8s linear infinite}@keyframes dashflow{to{stroke-dashoffset:-10}}.react-flow__attribution{display:none}.react-flow__controls{background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:none;overflow:hidden}.react-flow__controls-button{background:var(--panel);color:var(--text);border-bottom:1px solid var(--line);fill:var(--text)}.react-flow__controls-button:hover{background:var(--bg-soft)}.agent-node{position:relative;min-width:220px;max-width:260px;padding:10px 12px 10px 16px;background:var(--node-grad);border:1px solid var(--line);border-radius:10px;color:var(--text);font-size:12px;box-shadow:var(--shadow-1);transition:border-color .2s ease,box-shadow .2s ease;overflow:hidden;will-change:transform}.agent-node:hover{box-shadow:var(--shadow-2)}.agent-node.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-dim),0 10px 24px #0006}.agent-node.state-active{border-color:var(--inflight);box-shadow:0 0 0 1px #f0abfc73,0 8px 22px #f0abfc2e}.agent-node.state-done{border-color:#86efac80}.agent-node.state-err{border-color:#fca5a599}.agent-node .accent-stripe{position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent);opacity:.7}.agent-node .head{display:flex;align-items:center;justify-content:space-between;gap:8px}.agent-node .head-right{display:flex;align-items:center;gap:6px}.ctx-donut{background:transparent;border:none;padding:0;cursor:pointer;line-height:0;border-radius:50%;transition:filter .12s ease,transform .12s ease}.ctx-donut:hover{filter:brightness(1.2);transform:scale(1.08)}.ctx-donut:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.ctx-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:flex;align-items:center;justify-content:center;z-index:100;padding:24px}.ctx-modal{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 20px 50px #00000080;width:min(560px,100%);max-height:80vh;overflow:auto;padding:18px 20px 22px;color:var(--text)}.ctx-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.ctx-modal-title{font-size:15px;font-weight:600}.ctx-modal-sub{font-size:11px;color:var(--muted);margin-top:3px}.ctx-modal-close{background:transparent;border:1px solid var(--line);color:var(--text);border-radius:6px;width:28px;height:28px;font-size:18px;line-height:1;cursor:pointer}.ctx-modal-close:hover{background:var(--bg-soft)}.ctx-window-row{margin-bottom:16px}.ctx-window-bar{position:relative;height:10px;border-radius:999px;background:var(--bg-soft);border:1px solid var(--line);overflow:hidden}.ctx-window-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--inflight));transition:width .4s ease}.ctx-window-meta{display:flex;justify-content:space-between;font-size:11px;margin-top:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted)}.ctx-window-pct{color:var(--text);font-weight:600}.ctx-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:18px 0 8px;font-weight:600}.ctx-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}.ctx-row{display:flex;justify-content:space-between;padding:4px 0;font-size:12px;border-bottom:1px dashed var(--line)}.ctx-row.accent .ctx-row-val{color:var(--accent);font-weight:600}.ctx-row-label{color:var(--muted)}.ctx-row-val{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums}.ctx-empty{font-size:12px;color:var(--muted);padding:8px 0}.ctx-md-list{list-style:none;padding:0;margin:0}.ctx-md-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0;border-bottom:1px dashed var(--line);font-size:12px}.ctx-md-path{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ctx-md-size{color:var(--muted);font-variant-numeric:tabular-nums;flex-shrink:0}.agent-node .title{display:flex;align-items:center;gap:8px;min-width:0}.agent-node .title .label{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.agent-node .time{font-variant-numeric:tabular-nums;font-size:11px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.state-pill{display:inline-flex;align-items:center;padding:1px 7px;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;border-radius:999px;border:1px solid transparent}.state-pill.state-active{color:var(--inflight);border-color:#f0abfc66;background:#f0abfc14}.state-pill.state-active:before{content:"";width:5px;height:5px;border-radius:50%;background:var(--inflight);box-shadow:0 0 6px var(--inflight);margin-right:5px;animation:pulse 1.2s infinite}.state-pill.state-done{color:var(--ok);border-color:#86efac59;background:#86efac14}.state-pill.state-err{color:var(--err);border-color:#fca5a566;background:#fca5a514}.agent-node .sub{color:var(--muted);font-size:11px;margin-top:3px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-node .chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px;min-height:18px;align-items:center}.tool-chip{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;padding:2px 6px;border-radius:4px;border:1px solid var(--line);background:var(--bg);color:var(--text);white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis}.tool-chip.inflight{border-color:#f0abfc80;color:var(--inflight);background:#f0abfc0f;animation:pulse 1.4s infinite}.tool-chip.done{border-color:#86efac40;color:var(--ok)}.tool-chip.err{border-color:#fca5a566;color:var(--err);background:#fca5a50f}.chips-empty{color:var(--text-dim);font-size:11px;font-style:italic}.chips-more{color:var(--muted);font-size:10.5px;padding:2px 4px}.tool-spark-row{display:flex;align-items:center;gap:8px;margin-top:6px;height:14px}.tool-spark{flex:0 0 auto;overflow:visible}.tool-spark-bar{fill:var(--muted-dim);transition:fill .2s}.tool-spark-bar.active{fill:var(--accent);opacity:.72}.tool-spark-bar.latest{fill:var(--inflight);opacity:1;filter:drop-shadow(0 0 3px rgba(240,171,252,.55))}.tool-spark-label{color:var(--muted);font-size:9.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em;text-transform:uppercase}:root[data-theme=light] .tool-spark-bar.active{fill:var(--accent);opacity:.85}:root[data-theme=light] .tool-spark-bar.latest{fill:var(--inflight);filter:drop-shadow(0 0 3px rgba(126,34,206,.45))}.agent-node .meta{color:var(--muted);font-size:11px;margin-top:8px;display:flex;gap:12px}.agent-node .meta b{color:var(--text);font-weight:600}.agent-node .meta .inflight-meta,.agent-node .meta .inflight-meta b{color:var(--inflight)}.agent-node .meta .tokens-meta{color:var(--accent);margin-left:auto}.agent-node .meta .tokens-meta b{color:var(--accent)}.agent-node .meta .cost-meta{color:var(--ok);display:inline-flex;align-items:baseline;gap:4px}.agent-node .meta .cost-meta b{color:var(--ok)}.agent-node .meta .cost-meta .cost-rate{color:var(--muted);font-size:9.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.02em}.tokens-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;padding:8px 10px;background:var(--bg-soft);border:1px solid var(--line);border-radius:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.tokens-grid>div{display:flex;justify-content:space-between;align-items:baseline}.tokens-grid .k{color:var(--muted);font-size:10.5px;text-transform:uppercase;letter-spacing:.06em}.tokens-grid b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}.agent-node.synthetic{border-style:dashed;opacity:.92}.agent-node .synth-tag{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;border:1px solid var(--muted);color:var(--muted);font-size:10px;font-weight:700;margin-left:4px}.spawn-badge{display:inline-flex;align-items:center;padding:1px 6px;margin-left:6px;border-radius:999px;border:1px solid var(--line);color:var(--accent);background:var(--bg-soft);font-size:10.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:600}.model-chip{display:inline-flex;align-items:center;padding:1px 7px;margin-left:6px;border-radius:999px;border:1px solid var(--line);color:var(--text);background:var(--bg-soft);font-size:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:600;letter-spacing:.02em}.model-chip[title*=opus]{color:#f0abfc;border-color:#f0abfc66;background:#f0abfc0f}.model-chip[title*=sonnet]{color:#7dd3fc;border-color:#7dd3fc66;background:#7dd3fc0f}.model-chip[title*=haiku]{color:#86efac;border-color:#86efac66;background:#86efac0f}.model-chip[title*=fable]{color:#fcd34d;border-color:#fcd34d66;background:#fcd34d0f}:root[data-theme=light] .model-chip[title*=opus]{color:#6b21a8;border-color:#7e22ce8c;background:#7e22ce24}:root[data-theme=light] .model-chip[title*=sonnet]{color:#075985;border-color:#0369a18c;background:#0369a124}:root[data-theme=light] .model-chip[title*=haiku]{color:#166534;border-color:#15803d8c;background:#15803d24}:root[data-theme=light] .model-chip[title*=fable]{color:#92400e;border-color:#b453098c;background:#b4530924}.now-running{margin-top:8px;padding:5px 8px;border-radius:6px;background:linear-gradient(90deg,#f0abfc1a,#7dd3fc14);border:1px solid rgba(240,171,252,.3);display:flex;align-items:center;gap:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:var(--text)}:root[data-theme=light] .now-running{background:linear-gradient(90deg,#a21caf12,#0284c70f);border-color:#a21caf4d}.now-running .now-dot{width:6px;height:6px;border-radius:50%;background:var(--inflight);box-shadow:0 0 8px var(--inflight);animation:pulse 1.1s infinite}.now-running .now-label{text-transform:uppercase;letter-spacing:.08em;color:var(--inflight);font-size:9.5px;font-weight:700}.now-running .now-tool{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text);font-weight:600}.now-running .now-time{color:var(--muted);font-variant-numeric:tabular-nums;font-size:10.5px}.react-flow__edge-textbg{fill:var(--bg-soft);fill-opacity:.9}.react-flow__edge-text{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;fill:var(--text)}.session-clusters{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:0}.cluster-card{position:absolute;border-radius:16px;border:1px solid transparent;transition:opacity .2s ease,left .32s cubic-bezier(.22,1,.36,1),top .32s cubic-bezier(.22,1,.36,1),width .32s cubic-bezier(.22,1,.36,1),height .32s cubic-bezier(.22,1,.36,1);overflow:visible;pointer-events:auto;cursor:grab}.cluster-card.dragging{transition:opacity .2s ease;cursor:grabbing}.cluster-label{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:3px 10px;border-radius:999px;background:var(--bg);border:1px solid var(--line);box-shadow:0 2px 6px #00000040;white-space:nowrap;line-height:1;cursor:grab;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;transition:box-shadow .12s ease,filter .12s ease}.cluster-label:hover{filter:brightness(1.25);box-shadow:0 4px 14px #00000073,0 0 0 1px currentColor}.cluster-label.dragging{cursor:grabbing;filter:brightness(1.3);box-shadow:0 6px 18px #00000080,0 0 0 1px currentColor}.session-group-handle{cursor:grab;background:transparent}.react-flow__node-sessionGroup{cursor:grab}.react-flow__node-sessionGroup.dragging,.react-flow__node-sessionGroup:active{cursor:grabbing}.react-flow__node-sessionGroup.selected{box-shadow:none}:root[data-theme=light] .cluster-label{background:var(--bg-soft);box-shadow:0 1px 4px #0f172a14}.tool-bursts-layer{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:5;overflow:visible}.tool-bursts-svg{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}.tool-conn{fill:none;stroke-width:1.4;stroke-dasharray:5 4;stroke-linecap:round;transition:opacity .3s ease}.tool-conn.status-inflight{stroke:var(--inflight);animation:dashflow .7s linear infinite;filter:drop-shadow(0 0 4px rgba(240,171,252,.45))}.tool-conn.status-done{stroke:#86efacd9}.tool-conn.status-err{stroke:#fca5a5d9}.tool-conn.fading{stroke-dasharray:4 6}.tool-burst-wrap{position:absolute;pointer-events:none;will-change:transform,left,top;transition:top .22s cubic-bezier(.22,1,.36,1)}.tool-burst{display:inline-flex;align-items:center;gap:6px;padding:5px 11px 5px 9px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;box-shadow:0 4px 14px #00000059,0 0 0 1px #00000040;white-space:nowrap;color:var(--text);animation:bubble-spawn .46s cubic-bezier(.34,1.56,.64,1) both}.tool-burst .tb-emoji{font-size:13px;line-height:1;filter:saturate(1.2);display:inline-block}.tool-burst .tb-name{font-weight:600;letter-spacing:.01em}.tool-burst .tb-spin{width:8px;height:8px;border-radius:50%;background:radial-gradient(circle at 30% 30%,var(--inflight),transparent 70%);box-shadow:0 0 8px var(--inflight);animation:pulse 1.1s ease-in-out infinite}.tool-burst .tb-mark{font-weight:700;font-size:12px;line-height:1;margin-left:2px;animation:mark-pop .26s cubic-bezier(.34,1.56,.64,1) both}.tool-burst .tb-mark.done{color:var(--ok);text-shadow:0 0 6px rgba(134,239,172,.55)}.tool-burst .tb-mark.err{color:var(--err);text-shadow:0 0 6px rgba(252,165,165,.55)}.tool-burst.status-inflight{border-color:#f0abfc8c;background:linear-gradient(180deg,#f0abfc1a,#7dd3fc0d),var(--panel);box-shadow:0 0 0 1px #f0abfc4d,0 6px 18px #f0abfc40}.tool-burst.status-inflight .tb-emoji{animation:emoji-wobble 1.6s ease-in-out infinite}.tool-burst.status-done{border-color:#86efac8c;background:linear-gradient(180deg,rgba(134,239,172,.1),transparent),var(--panel);box-shadow:0 0 0 1px #86efac38,0 4px 14px #86efac26;animation:bubble-spawn .46s cubic-bezier(.34,1.56,.64,1) both,bubble-done-flash .52s .46s ease-out}.tool-burst.status-err{border-color:#fca5a599;background:linear-gradient(180deg,rgba(252,165,165,.1),transparent),var(--panel);box-shadow:0 0 0 1px #fca5a559,0 4px 12px #fca5a52e;animation:bubble-spawn .46s cubic-bezier(.34,1.56,.64,1) both,bubble-err-shake .38s .46s ease-in-out}.tool-burst.fading{animation:bubble-fade .6s ease-in forwards}.tool-burst{position:relative}.tool-burst:before{content:"";position:absolute;left:4px;top:6px;bottom:6px;width:3px;border-radius:2px;background:var(--cat-accent, transparent);opacity:.85}.tool-burst.cat-file{--cat-accent: #7dd3fc}.tool-burst.cat-shell{--cat-accent: #fcd34d}.tool-burst.cat-web{--cat-accent: #67e8f9}.tool-burst.cat-agent{--cat-accent: #f0abfc}.tool-burst.cat-task{--cat-accent: #86efac}.tool-burst.cat-plan{--cat-accent: #c4b5fd}.tool-burst.cat-mcp{--cat-accent: #5eead4}.tool-burst.cat-other{--cat-accent: #94a3b8}.tool-burst.dim{opacity:.22;filter:saturate(.4);transition:opacity .18s ease,filter .18s ease}.tool-burst.dim:hover{opacity:.6}.tool-burst.sub{font-size:10.5px;padding:4px 10px 4px 8px;opacity:.94;animation:bubble-spawn .46s .22s cubic-bezier(.34,1.56,.64,1) both}.tool-burst.sub .tb-emoji{font-size:12px}.tool-burst.sub.status-done{animation:bubble-spawn .46s .22s cubic-bezier(.34,1.56,.64,1) both,bubble-done-flash .52s .68s ease-out}.tool-burst.sub.status-err{animation:bubble-spawn .46s .22s cubic-bezier(.34,1.56,.64,1) both,bubble-err-shake .38s .68s ease-in-out}.tool-burst.sub.fading{animation:bubble-fade .6s ease-in forwards}.tool-burst.clickable{pointer-events:auto;cursor:pointer}.tool-burst.clickable:hover{transform:translateY(-1px);box-shadow:0 6px 18px #00000073,0 0 0 1px var(--cat-accent, rgba(255,255,255,.15))}.tool-burst.clickable:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes bubble-spawn{0%{opacity:0;transform:translate(var(--spawn-dx, -28px),var(--spawn-dy, 0)) scale(.35);filter:blur(3px) brightness(1.4)}55%{opacity:1;transform:translate(0) scale(1.12);filter:blur(0) brightness(1.15)}to{opacity:1;transform:translate(0) scale(1);filter:blur(0) brightness(1)}}@keyframes bubble-done-flash{0%{transform:scale(1);box-shadow:0 0 0 1px #86efac38,0 4px 14px #86efac26}40%{transform:scale(1.14);box-shadow:0 0 0 2px #86efac8c,0 0 22px #86efac8c}to{transform:scale(1);box-shadow:0 0 0 1px #86efac38,0 4px 14px #86efac26}}@keyframes bubble-err-shake{0%,to{transform:translate(0)}15%{transform:translate(-4px)}35%{transform:translate(4px)}55%{transform:translate(-3px)}75%{transform:translate(2px)}}@keyframes bubble-fade{0%{opacity:1;transform:scale(1) translate(0);filter:blur(0)}to{opacity:0;transform:scale(.82) translate(18px,-4px);filter:blur(1.5px)}}@keyframes emoji-wobble{0%,to{transform:rotate(-6deg) scale(1)}50%{transform:rotate(6deg) scale(1.08)}}@keyframes mark-pop{0%{opacity:0;transform:scale(.3) rotate(-30deg)}to{opacity:1;transform:scale(1) rotate(0)}}:root[data-theme=light] .tool-burst{box-shadow:0 2px 8px #0f172a1a,0 0 0 1px #0f172a0a}:root[data-theme=light] .tool-burst.status-inflight{border-color:#7e22ce8c;background:linear-gradient(180deg,rgba(126,34,206,.06),transparent),var(--panel);box-shadow:0 0 0 1px #7e22ce33,0 6px 14px #7e22ce2e}:root[data-theme=light] .tool-burst.status-done{border-color:#15803d80}:root[data-theme=light] .tool-burst.status-err{border-color:#b91c1c8c}:root[data-theme=light] .tool-conn.status-inflight{stroke:#7e22ced9;filter:drop-shadow(0 0 3px rgba(126,34,206,.35))}:root[data-theme=light] .tool-conn.status-done{stroke:#15803dd9}:root[data-theme=light] .tool-conn.status-err{stroke:#b91c1cd9}.cat-file{--cat-color: #7dd3fc}.cat-shell{--cat-color: #fcd34d}.cat-web{--cat-color: #67e8f9}.cat-agent{--cat-color: #f0abfc}.cat-task{--cat-color: #86efac}.cat-plan{--cat-color: #c4b5fd}.cat-mcp{--cat-color: #5eead4}.cat-other{--cat-color: #94a3b8}.session-list{grid-column:1;grid-row:2 / -1;background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;overflow:hidden}.session-list .sl-header{display:flex;align-items:center;gap:8px;padding:12px 12px 10px 14px;border-bottom:1px solid var(--line)}.session-list .sl-header h3{margin:0;flex:1;display:inline-flex;align-items:center;gap:8px}.session-list .sl-count{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;background:var(--bg-soft);border:1px solid var(--line);color:var(--text);font-size:10px;font-weight:600;text-transform:none;letter-spacing:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.session-list .sl-live-count{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--inflight);font-weight:600}.session-list .sl-close{width:26px;height:26px;font-size:15px}.session-list .sl-rows{flex:1;overflow-y:auto;padding:6px;display:flex;flex-direction:column;gap:4px}.session-list .sl-empty{padding:16px 12px;color:var(--muted);font-size:12px;font-style:italic}.session-list .sl-row{display:flex;align-items:flex-start;gap:9px;padding:9px 10px;background:transparent;border:1px solid transparent;border-radius:8px;cursor:pointer;text-align:left;color:var(--text);font:inherit;transition:background .12s,border-color .12s;min-width:0}.session-list .sl-row:hover{background:var(--bg-soft)}.session-list .sl-row.selected{background:var(--bg-soft);border-color:var(--accent-dim)}.session-list .sl-row:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.session-list .sl-dot{display:inline-block;width:8px;height:8px;margin-top:6px;flex:0 0 8px;border-radius:50%;background:var(--muted-dim)}.session-list .sl-dot.state-active{background:var(--inflight);box-shadow:0 0 8px var(--inflight);animation:pulse 1.4s ease-in-out infinite}.session-list .sl-dot.state-done{background:var(--ok)}.session-list .sl-dot.state-err{background:var(--err)}.session-list .sl-row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.session-list .sl-row-head{display:flex;align-items:center;gap:6px;min-width:0}.session-list .sl-label{font-weight:600;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.session-list .sl-row-meta{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.session-list .sl-row-meta b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}.session-list .sl-cost b{color:var(--ok)}.session-list .sl-elapsed{margin-left:auto}.detail-hero{display:flex;flex-direction:column;gap:8px;padding:4px 0 14px;border-bottom:1px solid var(--line)}.detail-hero .hero-line{display:flex;align-items:center;gap:10px;min-width:0}.detail-hero .hero-title{margin:0;font-size:17px;font-weight:600;letter-spacing:.01em;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.detail-hero .hero-meta{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;flex-wrap:wrap}.detail-hero .hero-meta-item{letter-spacing:.03em}.detail-hero .hero-sep{color:var(--text-dim)}.detail-hero .hero-cost{margin-top:8px;padding:10px 12px;background:var(--bg-soft);border:1px solid var(--line);border-radius:10px}.detail-hero .hero-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.detail-hero .hero-action-btn{padding:5px 12px;font-size:11px}.detail-hero .hero-cost-headline{display:flex;align-items:baseline;gap:6px;margin-bottom:8px}.detail-hero .hero-cost-value{font-size:22px;font-weight:700;color:var(--ok);font-variant-numeric:tabular-nums;letter-spacing:-.01em}.detail-hero .hero-cost-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}.cost-bar{display:flex;height:8px;width:100%;border-radius:4px;overflow:hidden;background:var(--line);gap:1px}.cost-bar .cb-seg{height:100%;display:block;transition:filter .12s ease}.cost-bar .cb-seg:hover{filter:brightness(1.3)}.cost-bar .cb-input{background:#5e9fed}.cost-bar .cb-output{background:#c679ec}.cost-bar .cb-cache-r{background:#5cd699}.cost-bar .cb-cache-w{background:#f2b25a}.detail-section{display:flex;flex-direction:column;gap:8px;padding-top:4px}.detail-section h3{display:flex;align-items:center;gap:8px}.detail-section h3 .section-count{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;background:var(--bg-soft);border:1px solid var(--line);color:var(--text);font-size:10px;font-weight:600;text-transform:none;letter-spacing:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.activity-row{display:flex;flex-direction:column;gap:8px}.activity-counters{display:flex;gap:12px;font-size:12px;color:var(--muted)}.activity-counters .ac-item b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}.activity-counters .ac-live,.activity-counters .ac-live b{color:var(--inflight)}.activity-counters .ac-err,.activity-counters .ac-err b{color:var(--err)}.cat-strip{display:flex;flex-wrap:wrap;gap:5px}.cat-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px 3px 7px;border-radius:999px;border:1px solid var(--line);background:var(--bg-soft);font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.cat-chip .cat-emoji{font-size:12px;line-height:1}.cat-chip .cat-count{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}.cat-chip.cat-file{border-color:#7dd3fc66}.cat-chip.cat-shell{border-color:#fcd34d66}.cat-chip.cat-web{border-color:#67e8f966}.cat-chip.cat-agent{border-color:#f0abfc66}.cat-chip.cat-task{border-color:#86efac66}.cat-chip.cat-plan{border-color:#c4b5fd66}.cat-chip.cat-mcp{border-color:#5eead466}.prompts{display:flex;flex-direction:column;gap:8px}.prompt-entry{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:var(--bg-soft)}.prompt-time{color:var(--muted);font-size:10.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em;text-transform:uppercase;margin-bottom:4px}.prompt-text{font-size:12.5px;line-height:1.5;color:var(--text);white-space:pre-wrap;word-break:break-word}button.tool.clickable{width:100%;background:transparent;border:none;border-bottom:1px solid var(--line-soft);text-align:left;cursor:pointer;color:var(--text);font:inherit;padding:6px 0;display:flex;align-items:center;gap:8px;justify-content:space-between;border-radius:4px;transition:background .12s}button.tool.clickable{padding-left:6px;padding-right:6px}button.tool.clickable:hover{background:var(--bg-soft)}button.tool.clickable:last-child{border-bottom:none}.shortcuts{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;align-items:center}.shortcuts .sc{display:contents}.shortcuts .sc kbd{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;font-weight:600;color:var(--text);background:var(--bg-soft);border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;padding:2px 7px;text-align:center;min-width:38px}.shortcuts .sc span{color:var(--muted);font-size:12px}.empty-hero .hint-row{margin-top:14px;font-size:12px;opacity:.75}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0506098c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:100;animation:fadeIn .14s ease-out}:root[data-theme=light] .modal-backdrop{background:#0f172a4d}.modal{width:min(820px,92vw);max-height:82vh;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-2),0 0 0 1px #7dd3fc1a;overflow:hidden;animation:popIn .18s cubic-bezier(.22,1,.36,1)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--bg-soft)}.modal-title{display:flex;align-items:center;gap:10px;min-width:0}.modal-title .status-dot{display:inline-block;width:8px;height:8px;border-radius:50%}.modal-title .status-dot.inflight{background:var(--inflight);animation:pulse 1.2s infinite}.modal-title .status-dot.done{background:var(--ok)}.modal-title .status-dot.err{background:var(--err)}.modal-tool-name{font-weight:600;font-size:14px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.modal-tool-id{color:var(--muted);font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.modal-actions{display:flex;align-items:center;gap:8px}.modal-dur{color:var(--muted);font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.modal-body{padding:16px;overflow:auto;display:flex;flex-direction:column;gap:16px}.modal-section h4{margin:0 0 6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600;display:flex;align-items:center;gap:8px}.modal-section .err-tag{font-size:9.5px;font-weight:700;padding:1px 6px;border-radius:4px;color:var(--err);background:#fca5a51a;border:1px solid rgba(252,165,165,.3)}.modal-note{margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--muted);font-size:11.5px;line-height:1.5}.modal-section pre{margin:0;padding:12px;background:var(--bg);border:1px solid var(--line);border-radius:8px;color:var(--text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-word;max-height:320px;overflow:auto}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes popIn{0%{opacity:0;transform:translateY(4px) scale(.985)}to{opacity:1;transform:none}}.modal.clear-confirm{width:min(440px,92vw)}.clear-confirm .cc-actions{display:flex;justify-content:flex-end;gap:8px}.session-summary{width:min(720px,92vw)}.session-summary .ss-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:22px;padding:18px 18px 20px;background:linear-gradient(180deg,rgba(134,239,172,.05),transparent);border-bottom:1px solid var(--line)}.session-summary .ss-hero-left{display:flex;flex-direction:column;gap:8px;min-width:0}.session-summary .ss-cost-label{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}.session-summary .ss-cost{font-size:34px;font-weight:700;color:var(--ok);font-variant-numeric:tabular-nums;letter-spacing:-.02em;line-height:1}.session-summary .ss-models{display:flex;gap:6px;flex-wrap:wrap}.session-summary .ss-hero-right{display:flex;flex-direction:column;justify-content:center;gap:10px;min-width:0}.cost-bar.cost-bar-lg{height:14px;border-radius:7px}.session-summary .ss-cost-legend{display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;font-size:11.5px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.session-summary .ssl{display:inline-flex;align-items:baseline;gap:5px}.session-summary .ssl b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}.session-summary .ssl:before{content:"";display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:1px}.session-summary .ssl-in:before{background:#5e9fed}.session-summary .ssl-out:before{background:#c679ec}.session-summary .ssl-cr:before{background:#5cd699}.session-summary .ssl-cw:before{background:#f2b25a}.session-summary .ss-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;padding:14px 18px;border-bottom:1px solid var(--line)}.session-summary .ss-stat{display:flex;flex-direction:column;gap:2px;padding:8px 10px;background:var(--bg-soft);border:1px solid var(--line);border-radius:8px}.session-summary .ss-stat-value{font-size:18px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-.01em;line-height:1.1}.session-summary .ss-stat-label{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.session-summary .ss-stat.tone-err .ss-stat-value{color:var(--err)}@media(max-width:640px){.session-summary .ss-hero{grid-template-columns:1fr}.session-summary .ss-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}.session-summary .ss-top-tools{display:flex;flex-direction:column;gap:6px}.session-summary .ss-tt{display:grid;grid-template-columns:130px 1fr 36px;gap:10px;align-items:center}.session-summary .ss-tt-name{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.session-summary .ss-tt-bar{height:6px;background:var(--line);border-radius:3px;overflow:hidden}.session-summary .ss-tt-bar-fill{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--inflight));border-radius:3px}.session-summary .ss-tt-count{text-align:right;font-variant-numeric:tabular-nums;font-size:11.5px;color:var(--muted)}.session-summary .ss-prompt{font-size:12.5px;line-height:1.55;color:var(--text);padding:10px 12px;background:var(--bg-soft);border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:4px;white-space:pre-wrap;word-break:break-word;max-height:200px;overflow:auto}.empty-hero{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;pointer-events:none;color:var(--muted);-webkit-user-select:none;user-select:none;max-width:520px}.empty-hero .orbit-stack{position:relative;width:260px;height:260px;margin:0 auto 28px}.empty-hero .orbit{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;border:1px dashed rgba(125,211,252,.18)}.empty-hero .orbit.r1{top:0;right:0;bottom:0;left:0;animation:spin 22s linear infinite}.empty-hero .orbit.r2{top:30px;right:30px;bottom:30px;left:30px;animation:spin 14s linear infinite reverse;border-color:#f0abfc33}.empty-hero .orbit.r3{top:60px;right:60px;bottom:60px;left:60px;animation:spin 9s linear infinite;border-color:#86efac38}.empty-hero .orbit .dot{position:absolute;width:14px;height:14px;border-radius:50%;top:-7px;left:50%;margin-left:-7px}.empty-hero .orbit.r1 .dot{background:var(--accent);box-shadow:0 0 22px var(--accent)}.empty-hero .orbit.r2 .dot{background:var(--inflight);box-shadow:0 0 22px var(--inflight);width:12px;height:12px;margin-left:-6px;top:-6px}.empty-hero .orbit.r3 .dot{background:var(--ok);box-shadow:0 0 22px var(--ok);width:10px;height:10px;margin-left:-5px;top:-5px}.empty-hero .orbit .dot.b{top:auto;bottom:-7px}.empty-hero .orbit.r2 .dot.b{bottom:-6px}.empty-hero .orbit.r3 .dot.b{bottom:-5px}.empty-hero .core{position:absolute;top:50%;left:50%;width:56px;height:56px;margin:-28px 0 0 -28px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#f0abfc,#7dd3fc 55%,#14161b);box-shadow:0 0 28px #f0abfc8c,0 0 64px #7dd3fc59;animation:corepulse 2.6s ease-in-out infinite}.empty-hero .core:after{content:"";position:absolute;top:-14px;right:-14px;bottom:-14px;left:-14px;border-radius:50%;border:1px solid rgba(255,255,255,.06);animation:corewave 2.6s ease-out infinite}@keyframes corepulse{0%,to{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.08);filter:brightness(1.15)}}@keyframes corewave{0%{transform:scale(.85);opacity:.6}to{transform:scale(1.6);opacity:0}}.empty-hero h2{color:var(--text);font-size:18px;font-weight:600;margin:0 0 8px;letter-spacing:.01em}.empty-hero p{margin:0;font-size:13px;line-height:1.65}.empty-hero code{background:var(--bg-soft);border:1px solid var(--line);padding:2px 7px;border-radius:5px;color:var(--text);font-size:12.5px}@keyframes spin{to{transform:rotate(360deg)}}:root[data-theme=light] .topbar .status .pill.live{border-color:#15803d73;background:#15803d1a}:root[data-theme=light] .topbar .status .pill.dead{border-color:#b91c1c80;background:#b91c1c1a}:root[data-theme=light] .agent-node.state-active{border-color:#7e22cea6;box-shadow:0 0 0 1px #7e22ce4d,0 8px 22px #7e22ce2e}:root[data-theme=light] .agent-node.state-done{border-color:var(--ok)}:root[data-theme=light] .agent-node.state-err{border-color:var(--err)}:root[data-theme=light] .state-pill.state-active{border-color:#7e22ce73;background:#7e22ce1a}:root[data-theme=light] .state-pill.state-active:before{box-shadow:0 0 5px #7e22ce8c}:root[data-theme=light] .state-pill.state-done{border-color:#15803d73;background:#15803d1a;color:#166534}:root[data-theme=light] .state-pill.state-err{border-color:#b91c1c80;background:#b91c1c1a}:root[data-theme=light] .tool-chip{background:#f4f6fa}:root[data-theme=light] .tool-chip.inflight{border-color:#7e22cea6;background:#7e22ce29;color:#6b21a8}:root[data-theme=light] .tool-chip.done{border-color:#15803d8c;background:#15803d1f;color:#166534}:root[data-theme=light] .tool-chip.err{border-color:#b91c1ca6;background:#b91c1c29;color:#991b1b}:root[data-theme=light] .modal-section .err-tag{background:#b91c1c1a;border-color:#b91c1c73}:root[data-theme=light] .now-running .now-dot{box-shadow:0 0 6px #7e22ce99}:root[data-theme=light] .empty-hero .orbit{border-color:#0369a14d}:root[data-theme=light] .empty-hero .orbit.r2{border-color:#7e22ce4d}:root[data-theme=light] .empty-hero .orbit.r3{border-color:#15803d52}:root[data-theme=light] .empty-hero .core{background:radial-gradient(circle at 30% 30%,#c084fc,#0ea5e9 55%,#1e293b);box-shadow:0 0 28px #7e22ce66,0 0 64px #0369a140}:root[data-theme=light] .conn-banner{background:linear-gradient(90deg,rgba(185,28,28,.14),transparent);border-bottom-color:#b91c1c73}:root[data-theme=light] button.btn.warn{border-color:#b453098c;color:var(--warn)}:root[data-theme=light] .search-clear{color:var(--muted)}:root[data-theme=light] .react-flow__edge-path{stroke:#0369a166}:root[data-theme=light] .react-flow__minimap-node{stroke:#0f172a40}.usage-panel{position:fixed;top:60px;right:368px;width:280px;max-height:calc(100vh - 76px);overflow-y:auto;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-2);z-index:20;padding:0 0 12px}.up-header{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;border-bottom:1px solid var(--line-soft);position:sticky;top:0;background:var(--panel);z-index:1}.up-header h3{margin:0;font-size:13px;font-weight:600;flex:1}.up-header-right{display:flex;align-items:center;gap:4px}.up-rate{font-size:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums;color:var(--inflight);padding:2px 6px;border-radius:999px;background:#f0abfc1f}.up-close{font-size:16px;line-height:1;padding:2px 6px;color:var(--muted)}.up-total{display:flex;align-items:baseline;gap:8px;padding:14px 14px 6px}.up-total-value{font-size:26px;font-weight:700;font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ok);line-height:1}.up-total-label{font-size:11px;color:var(--muted)}.usage-panel .cost-bar{margin:4px 14px 10px;border-radius:3px}.up-tokens-row{display:flex;flex-wrap:wrap;gap:10px 16px;padding:6px 14px 10px}.up-tok{display:flex;align-items:baseline;gap:5px;font-size:12px;font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.up-k{font-size:10px;color:var(--muted);font-family:inherit}.up-section{padding:0 14px;margin-top:4px;border-top:1px solid var(--line-soft)}.up-section-title{display:flex;align-items:baseline;gap:8px;margin:8px 0 6px;font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.up-section-age{margin-left:auto;font-size:10px;font-weight:400;color:var(--text-dim);text-transform:none;letter-spacing:0;white-space:nowrap}.up-table{width:100%;border-collapse:collapse;font-size:12px}.up-table th{text-align:left;color:var(--muted);font-weight:500;font-size:10px;padding:0 0 4px;border-bottom:1px solid var(--line-soft)}.up-table th:not(:first-child){text-align:right}.up-table td{padding:4px 0;vertical-align:middle}.up-model-name{color:var(--text);font-weight:500;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.up-num{text-align:right;font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted);font-size:11px}.up-cost-val{color:var(--ok)}.up-sessions{display:flex;flex-direction:column;gap:4px}.up-session-row{display:flex;align-items:center;gap:7px;font-size:12px;padding:3px 0}.up-session-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.up-session-tokens{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:var(--muted)}.up-session-cost{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:var(--ok);min-width:36px;text-align:right}.up-hint{padding:8px 14px 4px;font-size:11px;color:var(--muted);line-height:1.5}.up-empty{padding:20px 14px;font-size:12px;color:var(--muted);text-align:center;line-height:1.6}.app:not(:has(.detail)) .usage-panel{right:8px}.up-quota-section{padding-top:10px;border-top:none}.up-quota-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.up-refresh-btn{font-size:14px;padding:1px 7px;color:var(--muted);line-height:1.4}.up-quota-bars{display:flex;flex-direction:column;gap:10px}.qb-row{display:flex;flex-direction:column;gap:3px}.qb-meta{display:flex;justify-content:space-between;align-items:baseline;font-size:11px}.qb-label{color:var(--muted)}.qb-pct{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;font-weight:600}.qb-track{position:relative;height:6px;border-radius:3px;background:var(--line);overflow:hidden}.qb-fill{height:100%;border-radius:3px;transition:width .4s ease}.qb-pace-marker{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;border-radius:1px;box-shadow:0 0 2px #00000080;transition:left .4s ease;z-index:2}.qb-reset-row{display:flex;justify-content:space-between;align-items:baseline;gap:4px;min-height:14px}.qb-reset{font-size:10px;color:var(--text-dim)}.qb-pace{font-size:10px;font-weight:500;text-align:right;flex-shrink:0}.qb-limit-badge{margin-left:4px;font-size:10px}.up-plan-badge{margin-left:6px;padding:1px 5px;border:1px solid var(--line-soft);border-radius:3px;font-size:9px;font-weight:500;color:var(--text-dim);text-transform:none;letter-spacing:0;vertical-align:1px}.up-quota-na{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--muted)}.up-quota-hint{color:var(--text-dim)}.up-quota-hint code{background:var(--line);padding:0 3px;border-radius:3px;font-size:10.5px}.up-quota-loading{font-size:11px;color:var(--text-dim)}.up-quota-sub{font-size:10px;color:var(--text-dim);margin-top:4px}.up-credits{color:var(--accent)}.up-reset-credits{color:var(--ok)}:root[data-theme=light] .up-rate{background:#7e22ce1a}.uh-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:flex;align-items:center;justify-content:center;z-index:100;padding:24px}.uh-modal{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 20px 50px #00000080;width:min(760px,100%);max-height:84vh;overflow:auto;padding:16px 18px 20px;color:var(--text)}.uh-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}.uh-titlewrap{display:flex;flex-direction:column;gap:2px;margin-right:auto}.uh-title{font-size:14px;font-weight:600}.uh-sub{font-size:10.5px;color:var(--text-dim);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.uh-range{display:inline-flex;gap:2px;background:var(--bg-soft);border:1px solid var(--line);border-radius:999px;padding:2px}.uh-range-btn{font:inherit;font-size:10.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;padding:2px 9px;border:none;border-radius:999px;color:var(--muted);background:transparent;cursor:pointer;transition:background .12s,color .12s}.uh-range-btn:hover{color:var(--text)}.uh-range-btn.on{background:var(--accent-dim);color:var(--text)}.uh-reload{width:24px;height:24px;font-size:13px;padding:0}.uh-close{width:24px;height:24px;font-size:16px;line-height:1;border:none;background:transparent;color:var(--muted);cursor:pointer;border-radius:6px}.uh-close:hover{color:var(--text);background:var(--bg-soft)}.uh-status{padding:40px 0;text-align:center;color:var(--muted);font-size:12px}.uh-status.uh-err{color:var(--err)}.uh-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}.uh-stat{display:flex;flex-direction:column;gap:2px;padding:8px 10px;background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:8px}.uh-stat-val{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}.uh-stat-val.accent{color:var(--ok)}.uh-stat-label{font-size:9.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.uh-chart{display:flex;align-items:flex-end;gap:1px;height:168px;margin-bottom:10px;padding-bottom:16px;border-bottom:1px solid var(--line-soft)}.uh-bar-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;position:relative;background:none;border:none;padding:0;cursor:pointer;min-width:0}.uh-bar-col:hover .uh-bar{filter:brightness(1.15)}.uh-bar-col.sel .uh-bar{outline:1px solid var(--accent);outline-offset:1px}.uh-bar{width:78%;min-height:1px;display:flex;flex-direction:column;border-radius:2px 2px 0 0;overflow:hidden;transition:height .3s ease}.uh-bar-seg{width:100%}.uh-bar-label{position:absolute;bottom:-15px;font-size:8px;color:var(--text-dim);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap;transform:rotate(0);overflow:hidden;max-width:100%;text-overflow:ellipsis}.uh-legend{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px;font-size:11px;color:var(--muted)}.uh-legend-item{display:inline-flex;align-items:center;gap:5px}.uh-legend-dot{width:8px;height:8px;border-radius:2px;display:inline-block;flex-shrink:0}.uh-legend-cost{color:var(--text);font-variant-numeric:tabular-nums}.uh-detail{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:10px;padding:12px 14px}.uh-detail-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.uh-detail-date{font-size:12px;font-weight:600}.uh-detail-cost{font-size:12px;color:var(--ok);font-variant-numeric:tabular-nums}.uh-detail-agents{margin-left:auto;font-size:10px;color:var(--text-dim);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.uh-detail-mini{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:12px}.uh-ministat{display:flex;flex-direction:column;gap:1px}.uh-ministat-val{font-size:12px;font-variant-numeric:tabular-nums}.uh-ministat-label{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.uh-detail-models{display:flex;flex-direction:column;gap:5px}.uh-model-row{display:grid;grid-template-columns:130px 1fr auto;align-items:center;gap:8px}.uh-model-name{display:inline-flex;align-items:center;gap:5px;font-size:11px}.uh-model-bar{height:6px;border-radius:3px;background:var(--line);overflow:hidden}.uh-model-bar-fill{display:block;height:100%;border-radius:3px}.uh-model-cost{font-size:11px;color:var(--text);font-variant-numeric:tabular-nums}:root[data-theme=light] .uh-backdrop{background:#0f172a4d}.accounts-panel{grid-column:1;grid-row:2 / -1;background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;overflow-y:auto}.ap-header{display:flex;align-items:center;gap:8px;padding:12px 12px 10px 14px;border-bottom:1px solid var(--line);flex-shrink:0}.ap-header h3{margin:0;font-size:12px;font-weight:600;letter-spacing:.02em}.ap-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.ap-refresh{padding:1px 6px;font-size:11px}.ap-account{padding:9px 14px 8px;border-bottom:1px solid var(--line-soft)}.ap-account.active{background:color-mix(in srgb,var(--accent) 6%,transparent)}.ap-account.disabled{opacity:.5}.ap-account-head{display:flex;align-items:center;gap:6px;margin-bottom:6px}.ap-num{font-size:10px;color:var(--muted);min-width:9px}.ap-alias{font-size:11px;font-weight:600;color:var(--fg)}.ap-email{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.ap-badge-active{font-size:10px;color:var(--accent);flex-shrink:0}.ap-switch{padding:1px 7px;font-size:10px;flex-shrink:0}.ap-lane{display:grid;grid-template-columns:30px 1fr 32px;grid-template-areas:"label track pct" ". reset reset";align-items:center;gap:2px 6px;margin-bottom:3px}.ap-lane-label{grid-area:label;font-size:10px;color:var(--text-dim)}.ap-lane-track{grid-area:track;height:4px;border-radius:2px;background:var(--line-soft);overflow:hidden}.ap-lane-fill{height:100%;border-radius:2px}.ap-lane-pct{grid-area:pct;font-size:10px;text-align:right}.ap-lane-reset{grid-area:reset;font-size:9px;color:var(--muted)}.ap-lane-reset:empty{display:none}.ap-meta{display:flex;align-items:baseline;gap:8px;margin-top:5px;font-size:9px;color:var(--muted)}.ap-err,.ap-stale{color:var(--warn)}.ap-age{margin-left:auto;white-space:nowrap;cursor:help}.ap-empty{display:flex;flex-direction:column;gap:4px;padding:12px 14px;font-size:11px;color:var(--muted)}.ap-hint{font-size:10px;line-height:1.5;color:var(--muted)}.ap-empty .ap-cmd{display:block;margin:6px 0 2px;padding:7px 9px;border-radius:5px;background:color-mix(in srgb,var(--accent) 7%,transparent);color:var(--text);font-family:var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:10px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}.ap-empty .ap-hint code{padding:1px 4px;border-radius:3px;background:color-mix(in srgb,var(--accent) 7%,transparent);font-size:10px}.ap-failure{display:flex;align-items:flex-start;gap:6px;margin:8px 14px 0;padding:6px 8px;border-radius:4px;background:color-mix(in srgb,var(--err) 12%,transparent);color:var(--err);font-size:10px;word-break:break-word}.ap-failure-text{flex:1;min-width:0}.ap-failure-x{flex:none;margin:-2px -2px 0 0;padding:0 3px;border:0;background:none;color:inherit;opacity:.6;font-size:12px;line-height:1.2;cursor:pointer}.ap-failure-x:hover{opacity:1}.ap-auto{padding:12px 14px 11px;border-top:1px solid var(--line)}.ap-auto-head{display:flex;align-items:center;gap:10px;min-height:24px}.ap-auto-ctl{margin-left:auto;display:flex;align-items:center;gap:8px;flex-shrink:0}.ap-auto-title{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.ap-auto-state{display:inline-flex;align-items:center;gap:5px;padding:2px 8px 2px 7px;border:1px solid var(--line);border-radius:999px;background:transparent;font:inherit;font-size:10px;color:var(--muted);line-height:1.5}.ap-dot{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.55;flex-shrink:0}button.ap-auto-state{cursor:pointer;transition:border-color .12s,color .12s}button.ap-auto-state:hover:not(:disabled){border-color:var(--accent-dim);color:var(--accent)}button.ap-auto-state:focus-visible{outline:2px solid var(--accent);outline-offset:1px}button.ap-auto-state:disabled{cursor:default;opacity:.6}.ap-auto-state.live{border-color:var(--accent-dim);color:var(--accent)}.ap-pulse{position:relative;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.ap-pulse:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;border:1px solid currentColor;animation:ap-ping 2.6s cubic-bezier(.22,.61,.36,1) infinite}@keyframes ap-ping{0%{transform:scale(1);opacity:.7}50%{transform:scale(3.2);opacity:0}to{transform:scale(3.2);opacity:0}}@media(prefers-reduced-motion:reduce){.ap-pulse:after{animation:none;opacity:.35;transform:scale(2.2)}}.ap-auto-note{margin:9px 0 0;font-size:9px;line-height:1.6;color:var(--muted)}.ap-auto-note .ap-pulse{display:inline-block;margin-right:5px;vertical-align:1px;color:var(--accent)}.ap-auto-note code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9px;color:var(--fg);white-space:nowrap}.ap-auto-now{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}.ap-auto-now:after{content:"/";margin-left:8px;color:var(--muted);opacity:.45}.ap-auto-now.near{color:var(--warn)}.ap-field{position:relative;display:inline-block}.ap-field:after{content:"";position:absolute;right:7px;top:50%;width:5px;height:5px;margin-top:-3px;border-right:1.2px solid currentColor;border-bottom:1.2px solid currentColor;transform:rotate(45deg);opacity:.5;pointer-events:none}.ap-field select{-moz-appearance:none;appearance:none;-webkit-appearance:none;background:var(--bg-soft);color:var(--text);border:1px solid var(--line);border-radius:5px;padding:2px 19px 2px 7px;font:inherit;font-size:11px;line-height:1.5;text-align:right;cursor:pointer;transition:border-color .12s,color .12s}.ap-field select:hover:not(:disabled){border-color:var(--accent-dim);color:var(--accent)}.ap-field select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ap-field select:disabled{cursor:default;opacity:.6}.ap-field:has(select:hover:not(:disabled)):after{color:var(--accent);opacity:1}.ap-auto-foot{display:flex;align-items:baseline;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid var(--line-soft)}.ap-auto-result{font-size:10px;line-height:1.5;color:var(--muted);min-width:0}.ap-rotate{background:none;border:none;padding:0;font:inherit;font-size:9px;color:var(--muted);cursor:pointer;text-decoration:underline dotted;text-underline-offset:2px}.ap-rotate:hover:not(:disabled){color:var(--accent)}.ap-rotate:disabled{cursor:default;opacity:.6}.ap-footnote{margin:0;padding:9px 14px 2px;border-top:1px solid var(--line-soft);font-size:9px;line-height:1.5;color:var(--muted);cursor:help}.canvas-wrap.bubbling .react-flow__node{transition:transform .42s cubic-bezier(.22,.61,.36,1)}.canvas-wrap.bubbling .react-flow__node.react-flow__node-sessionGroup{transition:transform .42s cubic-bezier(.22,.61,.36,1),width .42s cubic-bezier(.22,.61,.36,1),height .42s cubic-bezier(.22,.61,.36,1)}@media(prefers-reduced-motion:reduce){.canvas-wrap.bubbling .react-flow__node,.canvas-wrap.bubbling .react-flow__node.react-flow__node-sessionGroup{transition:none}}.canvas-wrap.bubbling .react-flow__node.dragging,.canvas-wrap.dragging-any .react-flow__node,.canvas-wrap.dragging-any .react-flow__node.react-flow__node-sessionGroup{transition:none}.ap-add{font-size:16px;line-height:1;padding:2px 8px 4px;color:var(--accent)}.ap-add:hover{border-color:var(--accent-dim)}.ap-more{margin-left:4px;padding:0 5px;border:1px solid transparent;border-radius:6px;background:none;color:var(--text-dim);font-size:13px;line-height:1.1;cursor:pointer;opacity:0;transition:opacity .12s,color .12s,border-color .12s}.ap-account:hover .ap-more,.ap-more:focus-visible,.ap-more.on{opacity:1}.ap-more:hover,.ap-more.on{color:var(--text);border-color:var(--line)}.ap-manage{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding-top:8px;border-top:1px dashed var(--line-soft)}.ap-manage-row{display:flex;align-items:center;gap:6px}.ap-manage-label{width:34px;flex:none;color:var(--text-dim);font-size:10px;letter-spacing:.04em;text-transform:uppercase}.ap-manage-hint{color:var(--text-dim);font-size:10px}.ap-manage-input{flex:1;min-width:0;padding:3px 7px;border:1px solid var(--line);border-radius:6px;background:var(--bg-soft);color:var(--text);font:inherit;font-size:11px}.ap-manage-input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ap-manage-btn{padding:3px 9px;border:1px solid var(--line);border-radius:999px;background:var(--bg-soft);color:var(--muted);font:inherit;font-size:10.5px;cursor:pointer;transition:border-color .12s,color .12s,background .12s,transform .14s cubic-bezier(.23,1,.32,1)}.ap-manage-btn:hover:not(:disabled){color:var(--text);border-color:var(--accent-dim)}.ap-manage-btn:active:not(:disabled){transform:scale(.97)}.ap-manage-btn:disabled{opacity:.45;cursor:default}.ap-manage-btn.danger{color:var(--err);border-color:color-mix(in srgb,var(--err) 30%,transparent)}.ap-manage-btn.danger.armed{color:var(--bg);background:var(--err);border-color:var(--err);font-weight:600}.ap-share{display:flex;flex-direction:column;gap:5px}.ap-share-blob{display:block;max-height:66px;overflow:auto;overflow-wrap:anywhere;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg-soft);color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9.5px;line-height:1.4;-webkit-user-select:all;user-select:all}.ap-share-foot{display:flex;align-items:center;gap:8px}.aa-modal{width:min(560px,92vw)}.aa-body{gap:18px;display:flex;flex-direction:column}.aa-tabs{display:inline-flex;gap:4px}.aa-tab{padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:none;color:var(--muted);font:inherit;font-size:12px;cursor:pointer;transition:color .12s,border-color .12s,background .12s}.aa-tab:hover{color:var(--text)}.aa-tab.on{color:var(--text);border-color:var(--accent-dim);background:color-mix(in srgb,var(--accent) 12%,transparent)}.aa-step{display:flex;flex-direction:column;gap:8px}.aa-step h4{margin:0;color:var(--muted);font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.aa-note{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.aa-err{margin:0;color:var(--err);font-size:12px;line-height:1.5}.aa-link{overflow-wrap:anywhere;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg-soft);color:var(--accent);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.5;text-decoration:none;-webkit-user-select:all;user-select:all}.aa-link:hover{border-color:var(--accent-dim);text-decoration:underline}.aa-field{display:flex;align-items:center;gap:8px}.aa-field input{flex:1;min-width:0;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:var(--bg-soft);color:var(--text);font:inherit;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.aa-field input::placeholder{color:var(--text-dim)}.aa-field input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.aa-field input:disabled{opacity:.55}.aa-primer .aa-note{max-width:46ch}.aa-actions{display:flex;gap:8px;align-items:center;margin-top:2px}.aa-done{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;padding:6px 0 2px;text-align:center;animation:aa-done-in .22s cubic-bezier(.23,1,.32,1) both}.aa-done h4{margin:0;color:var(--text);font-size:13px;font-weight:600;letter-spacing:0;text-transform:none}.aa-done .aa-note{max-width:44ch}@keyframes aa-done-in{0%{opacity:0;transform:scale(.97) translateY(4px)}to{opacity:1;transform:none}}.aa-mark{width:44px;height:44px;overflow:visible}.aa-mark-ring,.aa-mark-tick{fill:none;stroke:var(--ok);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.aa-mark-ring{opacity:.45;stroke-dasharray:126;stroke-dashoffset:126;transform:rotate(-90deg);transform-origin:50% 50%;animation:aa-draw .38s cubic-bezier(.23,1,.32,1) 40ms forwards}.aa-mark-tick{stroke-dasharray:30;stroke-dashoffset:30;animation:aa-draw .26s cubic-bezier(.23,1,.32,1) .2s forwards}@keyframes aa-draw{to{stroke-dashoffset:0}}.confetti{position:fixed;width:0;height:0;z-index:101;pointer-events:none}.confetti-bit{position:absolute;top:0;left:0;width:6px;height:9px;margin:-4px 0 0 -3px;border-radius:1.5px;background:var(--accent);opacity:0;animation:aa-burst-move .9s cubic-bezier(.16,.9,.3,1) both,aa-burst-fade .9s linear both}.confetti-bit.round{width:6px;height:6px;border-radius:50%}.confetti-bit[data-hue="1"]{background:var(--ok)}.confetti-bit[data-hue="2"]{background:var(--warn)}.confetti-bit[data-hue="3"]{background:color-mix(in srgb,var(--accent) 55%,var(--ok))}@keyframes aa-burst-move{0%{transform:translateZ(0) scale(calc(var(--s, 1) * .6)) rotate(0)}70%{transform:translate3d(var(--dx),var(--dy),0) scale(var(--s, 1)) rotate(var(--rot))}to{transform:translate3d(calc(var(--dx) * 1.08),calc(var(--dy) * .82 + 16px),0) scale(calc(var(--s, 1) * .9)) rotate(var(--rot))}}@keyframes aa-burst-fade{0%{opacity:0}10%{opacity:1}62%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.aa-done{animation:aa-done-fade .16s ease both}.aa-mark-ring,.aa-mark-tick{animation:none;stroke-dashoffset:0}@keyframes aa-done-fade{0%{opacity:0}to{opacity:1}}}.cat-filter-bar{transition:opacity .18s ease}.cat-filter-bar.occluded{opacity:.2}.cat-filter-bar.occluded:focus-within{opacity:1}@media(hover:hover)and (pointer:fine){.cat-filter-bar.occluded:hover{opacity:1}}.ap-manage{animation:ap-manage-in .18s cubic-bezier(.23,1,.32,1) both}@keyframes ap-manage-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}.ap-more{transition:opacity .14s ease,color .12s,border-color .12s,transform .14s cubic-bezier(.23,1,.32,1)}.ap-more:active{transform:scale(.94)}.ap-manage-btn.danger.armed{position:relative;overflow:hidden}.ap-manage-btn.danger.armed:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:color-mix(in srgb,var(--bg) 70%,transparent);transform-origin:left center;animation:ap-disarm 4s linear forwards}@keyframes ap-disarm{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.ap-share{animation:ap-manage-in .18s cubic-bezier(.23,1,.32,1) both}.ap-share-blob{-webkit-user-select:all;user-select:all;max-height:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-dim)}.ap-share-foot .ap-manage-btn{color:var(--accent);border-color:var(--accent-dim);background:color-mix(in srgb,var(--accent) 10%,transparent)}.ap-share-foot .ap-manage-btn:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 18%,transparent)}.ap-share.expired .ap-share-blob{opacity:.45}.ap-share-expiry.soon{color:var(--warn)}.ap-share-expiry.gone{color:var(--err)}@media(prefers-reduced-motion:reduce){.ap-manage,.ap-share{animation:none}.ap-manage-btn.danger.armed:after{animation:none;transform:scaleX(0)}button.btn:active:not(:disabled),.ap-manage-btn:active:not(:disabled),.ap-more:active{transform:none}}.ap-fix{margin-left:6px;padding:1px 8px;border:1px solid color-mix(in srgb,var(--warn) 40%,transparent);border-radius:999px;background:color-mix(in srgb,var(--warn) 12%,transparent);color:var(--warn);font:inherit;font-size:10px;cursor:pointer;transition:background .12s,border-color .12s,transform .14s cubic-bezier(.23,1,.32,1)}.ap-fix:hover{background:color-mix(in srgb,var(--warn) 22%,transparent);border-color:var(--warn)}.ap-fix:active{transform:scale(.97)}@media(prefers-reduced-motion:reduce){.ap-fix:active{transform:none}}
|