.editor-app{--ed-bg:var(--windowBG);--ed-panel:var(--cardFill);--ed-line:var(--hairline);--ed-text:var(--primaryText);--ed-muted:var(--secondaryText);--ed-accent:var(--accentLink);--ed-canvas:var(--windowBG);width:1200px;height:740px;min-width:1000px;min-height:700px;display:flex;flex-direction:column;overflow:hidden;background:var(--ed-bg);color:var(--ed-text);font:14px/1.35 system-ui,-apple-system,sans-serif}
.editor-app *{box-sizing:border-box}.editor-app button,.editor-app input,.editor-app select,.editor-app textarea{font:inherit;color:inherit}.editor-app button{cursor:pointer}.editor-app button:disabled{cursor:default;opacity:.48}.editor-header{height:64px;min-height:64px;display:flex;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid var(--ed-line);background:var(--ed-bg)}.editor-heading{display:flex;flex-direction:column;gap:2px;min-width:0}.editor-heading>strong{font-size:18px;font-weight:650;line-height:1.2}.editor-heading>span{color:var(--ed-muted);font-size:13px}.editor-actions{margin-left:auto;display:flex;align-items:center;gap:8px;white-space:nowrap}.editor-actions>button,.editor-menu summary,.editor-menu button,.editor-modal button,.editor-proposal button{min-height:32px;padding:5px 12px;border:1px solid var(--ed-line);border-radius:8px;background:var(--ed-panel)}.editor-actions>button:disabled{opacity:.52}.editor-actions .editor-agent-button{padding-inline:15px;border:0;border-radius:18px;background:color-mix(in srgb,var(--accentLink) 12%,var(--ed-bg));color:var(--accentLink);font-weight:600}.editor-actions .editor-run,.editor-modal .editor-primary{background:#3454cf;color:#fff;border-color:#3454cf;border-radius:18px;padding-inline:16px;font-weight:600}.editor-menu{position:relative}.editor-menu summary{list-style:none;cursor:pointer;color:var(--ed-muted)}.editor-menu summary::-webkit-details-marker{display:none}.editor-menu>div{position:absolute;z-index:10;right:0;top:36px;display:grid;min-width:170px;padding:5px;background:var(--ed-panel);border:1px solid var(--ed-line);border-radius:10px;box-shadow:0 8px 24px #0002}.editor-menu button{text-align:left;border:0;background:transparent}
.editor-workspace{display:flex;flex:1;min-height:0;flex-direction:column}.editor-upper{display:flex;flex:1;min-height:0}.editor-main{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column}.editor-standalone{height:132px;min-height:132px;display:flex;align-items:center;gap:16px;padding:14px 20px;border-bottom:1px solid var(--ed-line);background:var(--ed-bg)}.editor-standalone-label{width:160px;min-width:160px;display:flex;flex-direction:column;gap:4px}.editor-standalone-label strong{font-size:14px}.editor-standalone-label span{font-size:13px;color:var(--ed-muted);white-space:nowrap}.editor-standalone-card{position:relative;width:200px;height:92px;min-width:200px;padding:12px 12px 9px 44px;display:grid;grid-template-rows:24px 18px 18px;gap:1px;text-align:left;border:1px solid var(--ed-line);border-radius:14px;background:var(--ed-panel);box-shadow:0 2px 5px #0001}.editor-standalone-card.selected,.editor-node.selected{outline:2px solid var(--ed-accent);outline-offset:0}.editor-orchestrator-icon{position:absolute;left:10px;top:10px;width:24px;height:24px;display:grid;place-items:center;color:white;background:#3859d5;border-radius:7px}.editor-card-title{display:flex;align-items:center;gap:5px;font-size:14px}.editor-card-title small{font-size:11px;color:var(--ed-muted)}.editor-backend{display:flex;align-items:center;gap:6px;color:var(--ed-text);font-size:12px}.editor-backend i{width:8px;height:8px;background:#747783;border-radius:50%}.editor-subtitle{font-size:12px;color:var(--ed-muted)}.editor-add-standalone{width:92px;height:92px;min-width:92px;border:1px dashed var(--ed-accent);border-radius:14px;background:transparent;font-size:25px}.editor-canvas-shell{position:relative;display:flex;flex:1;min-height:400px;flex-direction:column;background-color:var(--ed-canvas);background-image:radial-gradient(color-mix(in srgb,var(--secondaryText) 16%,transparent) 1px,transparent 1px);background-size:20px 20px}.editor-canvas{position:relative;display:flex;flex:1;min-height:0;overflow:hidden}.editor-graph-viewport{position:absolute;scrollbar-width:none;inset:0;overflow:auto;min-width:0;min-height:0}.editor-graph-viewport::-webkit-scrollbar{display:none}.editor-graph{position:relative;transform-origin:top left}.editor-edges{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}.editor-edge-hit{pointer-events:stroke;cursor:pointer}.editor-edge-hit path:not(.edge-hitbox){fill:none;stroke:var(--tertiaryText);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.editor-edge-hit.backward path:not(.edge-hitbox){stroke-dasharray:5 3}.editor-edge-hit circle{fill:var(--ed-panel);stroke:#777982;stroke-width:1.4}.editor-edge-hit.selected path:not(.edge-hitbox){stroke:var(--ed-accent);stroke-width:2}.editor-edge-hit.selected circle{stroke:var(--ed-accent);stroke-width:2}.editor-edge-hit .edge-hitbox{fill:none;stroke:transparent;stroke-width:14;pointer-events:stroke}.editor-node{position:absolute;z-index:1;padding:18px 12px 8px 44px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;text-align:left;background:var(--ed-panel);border:1px solid color-mix(in srgb,var(--ed-line) 85%,var(--secondaryText));border-radius:12px;box-shadow:0 2px 7px #0001}.editor-node>strong{font-size:14px;font-weight:650}.editor-node .editor-backend{font-size:12px}.editor-node-icon{position:absolute;left:10px;top:18px;display:grid;place-items:center;width:24px;height:24px;border-radius:6px;background:color-mix(in srgb,var(--secondaryText) 13%,var(--ed-bg));color:var(--ed-muted);font-size:17px}.editor-node small{font-size:12px;color:var(--ed-muted)}.editor-node.terminal{padding:5px;align-items:center;justify-content:center;border-radius:50%;gap:4px}.editor-node.terminal>strong{font-size:12px}.editor-terminal-icon{color:#23814a}.editor-port{position:absolute;top:calc(50% - 5px);z-index:2;width:10px;height:10px;border-radius:50%;border:1.5px solid #777982;background:var(--ed-panel)}.editor-port.input{left:-6px}.editor-port.output{right:-6px}.editor-canvas-controls{position:absolute;right:16px;bottom:80px;z-index:3;display:flex;gap:5px}.editor-canvas-controls button{height:28px;min-width:36px;border:1px solid var(--ed-line);border-radius:8px;background:color-mix(in srgb,var(--ed-panel) 92%,transparent)}.editor-canvas-controls button:nth-child(2){min-width:62px}.editor-tray{position:relative;z-index:3;min-height:48px;padding:7px 18px 4px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;background:color-mix(in srgb,var(--ed-bg) 94%,transparent)}.editor-tray>strong{margin-right:8px;color:var(--ed-muted);font-size:12px}.editor-tray button{height:30px;padding:4px 12px;display:flex;align-items:center;gap:7px;border:0;border-radius:8px;background:var(--ed-panel);white-space:nowrap}.editor-tray button:disabled{color:var(--ed-muted)}.editor-tray i{height:24px;margin:0 4px;border-left:1px solid var(--ed-line)}.editor-validation{min-height:31px;padding:5px 28px 8px;color:var(--ed-muted);font-size:12px}.editor-validation.problem{color:var(--dangerFG,var(--ed-muted))}.editor-validation button{margin-left:7px;border:0;background:transparent;color:var(--ed-accent);text-decoration:underline}.editor-empty-canvas{flex:1}.editor-inspector{width:288px;min-width:288px;max-width:288px;overflow:auto;padding:16px;border-left:1px solid var(--ed-line);background:var(--ed-bg)}.editor-inspector h2{margin:0 0 14px;font-size:18px}.editor-inspector h3{margin:17px 0 8px;color:var(--ed-muted);font-size:12px}.editor-inspector p{margin:0 0 12px;color:var(--ed-muted);font-size:12px}.editor-inspector .wf-form-row{min-height:34px}.editor-loading{width:100%;padding:30px;display:grid;gap:15px;align-content:start}.editor-loading span{height:26px;border-radius:8px;background:color-mix(in srgb,var(--secondaryText) 12%,var(--ed-bg))}.editor-loading span:nth-child(2){width:70%}.editor-loading span:nth-child(3){width:48%}.editor-unavailable{margin:auto;text-align:center;color:var(--ed-muted)}.editor-unavailable strong{color:var(--ed-text)}.editor-unavailable button{padding:6px 12px;border:1px solid var(--ed-line);border-radius:8px;background:var(--ed-panel)}.editor-inspector-placeholder{display:block}.editor-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.editor-workspace.has-builder .editor-upper{flex:1;min-height:400px}.editor-builder-workspace{height:230px;min-height:230px;overflow:auto;padding:14px 22px 12px;border-top:1px solid var(--ed-line);background:var(--ed-bg)}.editor-builder-head{display:flex;align-items:center;gap:9px;margin-bottom:9px}.editor-builder-head strong{font-size:13px}.editor-mock-chip{padding:2px 7px;border-radius:10px;background:color-mix(in srgb,var(--secondaryText) 12%,var(--ed-bg));color:var(--ed-muted);font-size:10px}.editor-builder-task h3{margin:2px 0 5px;font-size:13px}.editor-builder-task>p,.editor-builder-workspace>p{margin:0 0 7px;color:var(--ed-muted);font-size:12px}.editor-builder-message{display:flex;gap:8px;padding:8px 10px;border-radius:8px;background:var(--ed-panel);font-size:12px}.editor-builder-message i{width:7px;height:7px;margin-top:4px;border-radius:50%;background:#777982}.editor-builder-message p{margin:0}.editor-proposal{margin:7px 0;padding:7px 10px;border:1px solid var(--ed-line);border-radius:8px;background:var(--ed-panel);font-size:12px}.editor-proposal p{margin:4px 0 7px;color:var(--ed-muted)}.editor-proposal button{min-height:26px;margin-right:5px;padding:3px 9px;font-size:11px}.editor-builder-form{display:flex;gap:8px;margin-top:9px}.editor-builder-form textarea{flex:1;height:40px;min-height:40px;resize:vertical;padding:8px 10px;border:1px solid var(--ed-line);border-radius:9px;background:var(--ed-panel)}.editor-builder-form button{align-self:flex-end;height:32px;padding:4px 14px;border:0;border-radius:16px;background:#3454cf;color:white}
.editor-modal-backdrop{position:absolute;inset:0;z-index:20;display:grid;place-items:center;background:#0005}.editor-modal{width:500px;max-width:calc(100% - 32px);padding:20px;border:1px solid var(--ed-line);border-radius:16px;background:var(--ed-bg);box-shadow:0 18px 50px #0004}.editor-modal header{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.editor-modal h2{margin:0;font-size:18px}.editor-modal header button{min-width:30px;padding:3px}.editor-modal label{display:grid;gap:6px;margin:14px 0;color:var(--ed-muted);font-size:12px}.editor-modal textarea,.editor-modal input,.editor-modal select{width:100%;padding:9px;border:1px solid var(--ed-line);border-radius:8px;background:var(--ed-panel);color:var(--ed-text)}.editor-modal textarea{min-height:100px;resize:vertical}.editor-modal>p{color:var(--ed-muted)}.editor-modal footer{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.editor-modal-tabs{display:flex;gap:5px;border-bottom:1px solid var(--ed-line)}.editor-modal-tabs button{border:0;border-radius:8px 8px 0 0}.editor-modal-tabs .active{color:var(--ed-accent);background:color-mix(in srgb,var(--accentLink) 10%,var(--ed-bg))}.editor-help{margin:6px 0;color:var(--ed-muted);font-size:12px}
@media(max-width:1000px){.editor-app{width:1000px}.editor-header{gap:6px;padding-inline:12px}.editor-actions{gap:5px}.editor-inspector{width:288px}}

.editor-app{position:relative}.editor-glyph{display:inline-block;flex:none;width:16px;height:16px;background:center/contain no-repeat}.editor-glyph.sparkles{mask:url("../assets/symbols/sparkles.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/sparkles.png") center/contain no-repeat;background:currentColor}.editor-glyph.ellipsis{mask:url("../assets/symbols/ellipsis.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/ellipsis.png") center/contain no-repeat;background:currentColor}.editor-glyph.play{mask:url("../assets/symbols/play.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/play.png") center/contain no-repeat;background:currentColor}.editor-glyph.lock{width:12px;height:12px;mask:url("../assets/symbols/lock.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/lock.png") center/contain no-repeat;background:var(--ed-muted)}.editor-glyph.plus{width:18px;height:18px;mask:url("../assets/symbols/plus.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/plus.png") center/contain no-repeat;background:currentColor}.editor-glyph.planning,.editor-node-icon.planning:after{mask:url("../assets/symbols/planning.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/planning.png") center/contain no-repeat}.editor-glyph.implementation,.editor-node-icon.implementation:after{mask:url("../assets/symbols/implementation.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/implementation.png") center/contain no-repeat}.editor-glyph.review,.editor-node-icon.review:after{mask:url("../assets/symbols/review.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/review.png") center/contain no-repeat}.editor-glyph.task,.editor-node-icon.task:after{mask:url("../assets/symbols/task.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/task.png") center/contain no-repeat}.editor-glyph.workflow,.editor-node-icon.workflow:after{mask:url("../assets/symbols/workflow.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/workflow.png") center/contain no-repeat}.editor-node-icon.parallel:after{mask:url("../assets/symbols/point.3.connected.trianglepath.dotted.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/point.3.connected.trianglepath.dotted.png") center/contain no-repeat}.editor-orchestrator-icon{background:#3859d5;mask:url("../assets/symbols/orchestrator.png") center/16px 16px no-repeat;-webkit-mask:url("../assets/symbols/orchestrator.png") center/16px 16px no-repeat}.editor-node-icon{font-size:0;background:var(--neutralFill)}.editor-node-icon:after{content:"";position:absolute;inset:4px;background:var(--ed-muted)}.editor-glyph,.editor-node-icon{background-image:none!important}.editor-terminal-icon{display:block;width:16px;height:16px;background:center/contain no-repeat}.editor-terminal-icon.start{mask:url("../assets/symbols/start.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/start.png") center/contain no-repeat;background:var(--doneGreen)}.editor-terminal-icon.end{mask:url("../assets/symbols/end.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/end.png") center/contain no-repeat;background:var(--secondaryText)}.editor-state-screen{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--ed-muted)}.editor-state-screen strong{font-size:18px;color:var(--ed-text)}.editor-state-screen p{margin:0}.editor-state-screen button,.editor-choose-repo{border:1px solid var(--ed-line);border-radius:8px;background:var(--ed-panel);padding:6px 12px}.editor-state-error{font-size:24px;color:var(--dangerFG)}.editor-state-spinner{width:22px;height:22px;border:2px solid var(--ed-line);border-top-color:var(--ed-accent);border-radius:50%;animation:editor-spin .8s linear infinite}@keyframes editor-spin{to{transform:rotate(360deg)}}.editor-modal-description{color:var(--ed-muted)}.editor-modal small{color:var(--ed-muted);font-size:11px}.editor-modal-toggle{display:flex!important;align-items:center;grid-template-columns:16px 1fr!important}.editor-modal-toggle input{width:auto}.editor-permissions-preview{padding:10px;border:1px solid var(--ed-line);border-radius:8px;background:var(--ed-panel);font-size:12px;color:var(--ed-muted)}.editor-override-fields[hidden]{display:none}
.editor-app .editor-add-standalone{border:1px dashed var(--ed-accent);background:transparent}
.editor-app .editor-node.selected,.editor-app .editor-standalone-card.selected{border:2px solid var(--ed-accent);outline:0;background:var(--ed-panel)}
/* Keep native card geometry above the catalog's generic .app controls. */
.editor-app .editor-header{height:62px;min-height:62px}
.editor-app .editor-actions>button{display:flex;align-items:center;justify-content:center;gap:8px}
.editor-app .editor-standalone{padding:12px;gap:16px}
.editor-app .editor-standalone-label{width:146px;min-width:146px;font-size:12px}
.editor-app .editor-standalone-label strong,.editor-app .editor-standalone-label span{font-size:12px}
.editor-app .editor-standalone-card{padding:12px;display:grid;grid-template-columns:24px 1fr;grid-template-rows:24px 16px 16px;row-gap:4px;column-gap:8px;border-radius:12px}
.editor-app .editor-orchestrator-icon{position:relative;left:auto;top:auto;grid-row:1;grid-column:1;mask:none;-webkit-mask:none;background:#3859d5}
.editor-orchestrator-icon:after{content:"";position:absolute;inset:4px;background:white;mask:url("../assets/symbols/orchestrator.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/orchestrator.png") center/contain no-repeat}
.editor-app .editor-card-title{grid-column:2;grid-row:1;white-space:nowrap;gap:7px}
.editor-app .editor-standalone-card>.editor-backend{grid-column:1/3;grid-row:2}
.editor-app .editor-standalone-card>.editor-subtitle{grid-column:1/3;grid-row:3}
.editor-app .editor-add-standalone{padding:0;border-radius:14px;display:grid;place-items:center}
.editor-app .editor-node{padding:18px 12px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;border-radius:12px}
.editor-app .editor-node-title{display:flex;align-items:center;gap:8px;height:24px;min-height:24px;white-space:nowrap}
.editor-app .editor-node-title>strong{font-size:14px;font-weight:600}
.editor-app .editor-node-icon{position:relative;left:auto;top:auto;display:block;flex:0 0 24px;width:24px;height:24px;background:var(--neutralFill);border-radius:7px}
.editor-app .editor-node.terminal{padding:5px;align-items:center;justify-content:center;border-radius:50%;gap:4px}
.editor-app .editor-node .editor-backend{margin:0;font-size:12px;line-height:16px}
.editor-app .editor-canvas-shell{background-image:none}
.editor-app .editor-canvas{background-image:radial-gradient(var(--hairline) .7px,transparent .8px);background-size:20px 20px}
.editor-app .editor-canvas-controls{bottom:100px}
.editor-app .editor-canvas-controls button{padding:4px 8px;background:var(--neutralFill);font-size:12px}
.editor-app .editor-tray{min-height:58px;padding:8px 28px 10px;gap:8px;background:var(--ed-bg)}
.editor-app .editor-tray button{padding:4px 8px;height:30px;border:0;border-radius:8px;font-size:12px;gap:4px}
.editor-app .editor-validation{background:var(--ed-bg);padding:6px 28px 16px;min-height:36px;font-size:12px}
.editor-app .editor-glyph{background-color:currentColor}
.editor-app .editor-glyph.warning{width:28px;height:28px;mask:url("../assets/symbols/attention.png") center/contain no-repeat;-webkit-mask:url("../assets/symbols/attention.png") center/contain no-repeat}
.editor-app[data-editor-route="read-error"] .editor-canvas-controls,.editor-app[data-editor-route="read-error"] .editor-tray{display:none}
.editor-app[data-editor-route="read-error"] .editor-canvas{background-image:none}
.editor-app[data-editor-route="read-error"] .editor-actions{pointer-events:none;opacity:.5}
.editor-app .editor-unavailable{display:flex;flex-direction:column;align-items:center;gap:12px}
.editor-app .editor-unavailable strong{font-size:18px}
.editor-app .editor-loading-header{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;padding:12px 16px}
.editor-skeleton{display:block;max-width:100%;border-radius:5px;background:var(--skeletonFill,var(--neutralFill))}
.editor-loading-canvas{display:flex;flex:1;min-width:0;align-items:center;justify-content:center;padding:20px;overflow:hidden}
.editor-loading-graph{display:flex;align-items:center;min-width:508px;gap:0}
.editor-loading-node{width:130px;height:86px;flex:none;padding:14px;border:1px solid var(--cardBorder);border-radius:12px;display:flex;flex-direction:column;justify-content:center;gap:10px;background:var(--cardFill)}
.editor-loading-node.compact{width:64px;height:64px}
.editor-loading-graph>i{height:2px;width:40px;flex:none;background:var(--neutralFill)}
.editor-loading-inspector{padding:16px;display:flex;flex-direction:column;gap:16px}
.editor-app .editor-modal{width:580px;height:650px;max-height:calc(100% - 32px);padding:0;display:flex;flex-direction:column;overflow:hidden;border-radius:20px}
.editor-modal-body{flex:1;min-height:0;overflow:auto;padding:28px}
.editor-app .editor-modal header{margin-bottom:6px}
.editor-app .editor-modal header button{border:0;background:transparent}
.editor-app .editor-modal footer{flex:none;padding:20px;margin:0;border-top:1px solid var(--ed-line)}
.editor-app .editor-modal label{margin:24px 0}
.editor-app .editor-modal textarea{min-height:120px}
.editor-app .editor-modal footer button{min-height:28px;padding:4px 12px}
.editor-repo-row{display:flex;gap:8px;align-items:center}
.editor-repo-row input{flex:1;min-width:0}
.editor-app .editor-repo-row button{flex:none;white-space:nowrap;padding:5px 10px}
.editor-modal-section-label{display:block;font-size:12px;color:var(--ed-muted);margin:24px 0 8px}
.editor-modal-agent-group{overflow:hidden;border-radius:10px;background:var(--neutralFill);padding:0 12px}
.editor-app .editor-modal-agent-group label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;min-height:36px;padding:4px 0;color:var(--ed-text)}
.editor-app .editor-modal-agent-group label+label{border-top:1px solid var(--ed-line)}
.editor-app .editor-modal-agent-group select{width:auto;min-width:90px;max-width:180px;padding:4px 8px;border-color:transparent;background:var(--pillFill)}
.editor-app .editor-modal-agent-group label:nth-child(2) select{width:180px;background:var(--ed-panel)}
.editor-app .editor-modal-toggle{margin:14px 0 10px}
.editor-modal-fallbacks{margin-top:16px;font-size:13px}

.editor-app .editor-standalone,.editor-app .editor-canvas{background-color:var(--inspectorFill)}

.editor-app .editor-modal{background:var(--cardFill)}
.editor-app .editor-modal h2{font-size:15px}
.editor-app .editor-modal-name{gap:0}
.editor-app .editor-modal footer>button:first-child{margin-right:auto}
