*{box-sizing:border-box}
body{margin:0}
button,input,textarea,select{font:inherit}
button,a,input,textarea,select{touch-action:manipulation}
button{cursor:pointer}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}
button{transition:background .13s,box-shadow .13s}
button:hover:not(:disabled){filter:brightness(.98)}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0}
h1{font-size:24px;letter-spacing:-.65px;font-weight:600}
h2{font-size:17px;letter-spacing:-.3px;font-weight:600}
h3{font-size:14px;font-weight:650}
p{line-height:1.55;color:var(--muted-foreground)}
small,.subtle{font-size:12px;color:var(--muted-foreground)}
.topbar{height:88px;background:var(--background);display:flex;align-items:center;gap:38px;padding:0 28px;border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--foreground);font-size:18px;font-weight:600;letter-spacing:-.5px;flex-shrink:0}
.brand-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;background:var(--primary);color:var(--primary-foreground);font-family:var(--font-mono);font-size:21px;font-weight:600;letter-spacing:-2px;line-height:1}
.experiment-heading{display:flex;flex-direction:column;gap:5px;flex:1;min-width:100px}
.experiment-heading input{border:0;background:transparent;font-size:16px;font-weight:600;color:var(--foreground);width:100%;padding:2px 0}
.topbar-actions,.button-row{display:flex;align-items:center;gap:8px}
.button{border:1px solid transparent;border-radius:var(--radius);padding:9px 14px;font-weight:500;font-size:13px;white-space:nowrap}
.button.primary{background:var(--primary);color:var(--primary-foreground)}
.button.primary:hover:not(:disabled){background:var(--primary-hover)}
.button.secondary{background:var(--background);border-color:var(--border);color:var(--foreground)}
.button.danger{background:var(--danger-soft);color:var(--danger)}
.button.small{padding:8px 11px;font-size:11px}
.full-width{width:100%}
.icon-button{border:1px solid var(--border);border-radius:6px;background:var(--background);width:28px;height:28px;color:var(--muted-foreground);font-size:18px;line-height:1}
.workspace-tabs{display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:var(--background);height:54px;border-bottom:1px solid var(--border)}
.tabs{display:flex;height:100%;gap:28px}
.tab{border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted-foreground);padding:0 2px;font-size:12px;font-weight:600}
.tab.active{color:var(--primary);border-bottom-color:var(--primary)}
.runtime-badge{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted-foreground)}
.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--success)}
.status-dot.idle{background:var(--muted-foreground)}
.view{display:none}
.view.active{display:block}
.flow-view.active{display:flex;height:calc(100dvh - 142px);min-height:500px}
.graph-area{flex:1;min-width:0;display:flex;flex-direction:column}
.graph-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:24px 28px 20px}
.graph-toolbar h1{font-size:20px}
.graph-toolbar p{font-size:12px;margin-top:5px}
.graph-viewport{flex:1;overflow:hidden;position:relative;background-image:radial-gradient(var(--input-border) 1px,transparent 1px);background-size:20px 20px;cursor:grab;min-height:340px}
.graph-viewport.panning{cursor:grabbing}
.graph-world{position:absolute;transform-origin:0 0;left:0;top:0;width:4000px;height:3000px}
.graph-edges{position:absolute;inset:0;overflow:visible;pointer-events:none;color:var(--input-border)}
.edge-path{fill:none;stroke:currentColor;stroke-width:2;marker-end:url(#arrow)}
.graph-edge.selected,.graph-edge:hover,.graph-edge:focus{color:var(--primary)}
.graph-edge.selected .edge-path,.graph-edge:hover .edge-path,.graph-edge:focus .edge-path{stroke-width:3}
.edge-label{fill:var(--muted-foreground);font-size:10px;paint-order:stroke;stroke:var(--muted);stroke-width:6px;stroke-linejoin:round}
.graph-node{position:absolute;width:216px;min-height:96px;background:var(--background);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;cursor:grab;user-select:none;padding:14px 16px 12px;text-align:left;color:var(--foreground);touch-action:none}
.graph-node.selected{border:2px solid var(--primary);padding:13px 15px 11px;box-shadow:0 0 0 4px var(--accent)}
.graph-node.running{box-shadow:0 0 0 4px var(--success-soft);border-color:var(--success)}
.graph-node.connect-target{border-color:var(--success);box-shadow:0 0 0 4px var(--success-soft)}
.node-topline{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:10px}
.node-kind{font-size:9px;letter-spacing:.6px;text-transform:none;color:var(--muted-foreground)}
.node-kind.custom{color:var(--primary)}
.node-start{font-size:9px;color:var(--success);background:var(--success-soft);padding:2px 5px;border-radius:3px}
.node-title{font-size:13px;line-height:1.35;font-weight:650;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.node-detail{display:block;font-size:10px;margin-top:6px;color:var(--muted-foreground)}
.node-port{position:absolute;right:-12px;top:50%;transform:translateY(-50%);width:24px;height:24px;background:var(--background);border:2px solid var(--primary);border-radius:50%;cursor:crosshair;padding:0}
.node-port:hover{background:var(--primary)}
.graph-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 22px;font-size:10px;color:var(--muted-foreground);border-top:1px solid var(--border);background:var(--background)}
.graph-footer .button-row{gap:10px}
.inspector{width:370px;background:var(--background);border-left:1px solid var(--border);overflow-y:auto;padding:24px;flex-shrink:0}
.inspector-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:24px}
.inspector-heading>div:first-child{min-width:0;overflow-wrap:anywhere}
.inspector-heading-actions{display:flex;flex-direction:column;align-items:flex-end;gap:10px;flex-shrink:0}
.eyebrow{display:block;color:var(--primary);font-size:10px;letter-spacing:1.7px;font-weight:600;margin-bottom:9px}
.inspector label,label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:600;margin-bottom:17px}
input,textarea,select{border:1px solid var(--border);border-radius:6px;background:var(--background);padding:10px 11px;color:var(--foreground);min-width:0}
textarea{resize:vertical;line-height:1.55}
input::placeholder,textarea::placeholder{color:var(--muted-foreground);font-weight:400}
.help-text{font-size:11px;line-height:1.6;margin:8px 0 15px}
.field-label{font-size:12px;font-weight:650;display:block;margin-bottom:8px}
.inspector-section{border-top:1px solid var(--border);padding-top:20px;margin-top:20px}
.inspector-section>h3{margin-bottom:12px}
.checkbox-row{display:flex;align-items:center;gap:9px;font-size:12px;margin-bottom:10px;font-weight:400}
.checkbox-row input{accent-color:var(--primary)}
.transition-card{background:var(--muted);padding:12px;border:1px solid var(--border);border-radius:7px;margin:9px 0}
.transition-card .route{display:flex;justify-content:space-between;align-items:center;gap:6px;font-weight:600;font-size:11px;margin-bottom:6px}
.transition-card p{font-size:11px}
.inline-actions{display:flex;gap:8px;margin-top:9px}
.text-button{border:0;background:none;padding:2px 0;color:var(--primary);font-size:11px;font-weight:600}
.text-button.danger{color:var(--danger)}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 28px;text-align:center;gap:12px;height:100%;max-width:440px;margin:auto}
.empty-state h2{font-size:18px}
.empty-state p{font-size:12px}
.empty-symbol{font-size:45px;color:var(--focus-ring);font-weight:300}
.content-view{max-width:1800px;margin:auto;padding:32px 34px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:26px}
.section-heading p{font-size:12px;margin-top:8px}
.panel{background:var(--background);border:1px solid var(--border);border-radius:var(--radius);padding:22px;min-width:0}
.panel h2{margin-bottom:16px}
.panel-heading{display:flex;align-items:start;justify-content:space-between;gap:12px}
.panel-heading h2{margin-bottom:6px}
.panel-heading p{font-size:11px;margin-bottom:20px}
.tools-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,1fr);gap:24px;max-width:1280px}
.card-list{display:grid;gap:13px;margin-bottom:16px}
.tool-card{background:var(--background);border:1px solid var(--border);border-radius:var(--radius);padding:22px}
.tool-card .tool-heading{display:flex;justify-content:space-between;align-items:start;gap:18px}
.tool-name{font-family:var(--font-mono);color:var(--primary);font-size:14px;font-weight:600;margin-bottom:9px}
.tool-card p{font-size:12px;max-width:650px}
.tool-operation{display:inline-flex;gap:6px;align-items:center;font-size:11px;background:var(--accent);color:var(--primary-hover);padding:6px 9px;border-radius:5px;margin:15px 0 0}
.tool-operation.read{background:var(--success-soft);color:var(--success)}
.tool-assignments{font-size:10px;color:var(--muted-foreground);margin-top:12px}
.state-field{border-top:1px solid var(--border);padding:14px 0}
.state-field:first-child{border-top:0}
.state-field-header{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;font-weight:600;margin-bottom:9px}
.type-tag{font-size:9px;background:var(--muted);padding:3px 6px;border-radius:4px;color:var(--muted-foreground);font-weight:400}
.state-value{font-family:var(--font-mono);font-size:11px;background:var(--muted);white-space:pre-wrap;padding:10px;border-radius:6px;overflow-wrap:anywhere}
.scenario-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;max-width:1200px}
.scenario-layout aside{align-self:start}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
.form-grid .wide{grid-column:1/-1}
.advanced{border-top:1px solid var(--border);padding-top:17px;margin-top:20px}
.advanced summary{font-size:12px;color:var(--muted-foreground);cursor:pointer}
.code-input{font-family:var(--font-mono);font-size:11px;width:100%;margin:14px 0;tab-size:2}
.run-layout{display:grid;grid-template-columns:240px minmax(320px,1fr) minmax(260px,.7fr);gap:16px;height:calc(100dvh - 294px);min-height:580px}
.run-settings{overflow:auto;padding:19px}
.run-settings label{font-size:11px;margin-bottom:14px}
.run-settings h2{font-size:14px}
.run-settings select{font-size:11px;padding:9px}
.simulation-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 18px}
.simulation-grid button{font-size:10px;padding:10px 4px}
.conversation-panel{padding:0;display:flex;flex-direction:column;overflow:hidden}
.conversation-header{padding:18px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px}
.conversation-header .status-dot{margin-right:5px}
.transcript{flex:1;overflow:auto;padding:22px;min-height:200px}
.transcript-message{max-width:90%;margin:0 0 20px;overflow-wrap:anywhere}
.transcript-message .speaker{font-size:10px;font-weight:600;color:var(--muted-foreground);margin-bottom:7px;display:flex;align-items:center;gap:8px}
.transcript-message .bubble{padding:13px 16px;background:var(--muted);border-radius:3px 12px 12px 12px;font-size:13px;line-height:1.6;white-space:pre-wrap}
.transcript-message.user{margin-left:auto}
.transcript-message.user .speaker{justify-content:flex-end}
.transcript-message.user .bubble{background:var(--accent);border-radius:12px 3px 12px 12px}
.transcript-message.partial .bubble{opacity:.65}
.message-form{display:flex;padding:14px;gap:8px;border-top:1px solid var(--border)}
.message-form input{flex:1;font-size:12px}
.diagnostics-panel{padding:0;display:flex;flex-direction:column;overflow:hidden}
.diagnostic-tabs{display:flex;gap:24px;height:51px;border-bottom:1px solid var(--border);padding:0 18px;flex-shrink:0}
.diagnostic-output{overflow:auto;padding:17px;flex:1;font-size:11px;margin:0;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap}
.event-card{position:relative;padding:0 0 16px 16px;border-left:1px solid var(--border);margin-left:3px}
.event-card:before{content:"";position:absolute;left:-4px;top:5px;width:7px;height:7px;background:var(--primary);border-radius:50%}
.event-card.tool:before{background:var(--success)}
.event-card.error:before{background:var(--danger)}
.event-card .event-title{font-size:11px;font-weight:600}
.event-card time{font-size:9px;color:var(--muted-foreground);display:block;margin:3px 0 6px}
.event-card pre{font-size:10px;line-height:1.55;white-space:pre-wrap;background:var(--muted);border-radius:5px;margin:6px 0;padding:9px}
.code-output{font-family:var(--font-mono);font-size:10px}
.log-line{font-family:var(--font-mono);font-size:10px;margin-bottom:10px}
.log-line.error{color:var(--danger)}
.run-history{border-top:1px solid var(--border);margin-top:20px;padding-top:18px}
.run-history button{display:block;margin-top:8px;font-size:10px;text-align:left}
#camera-preview{width:100%;border-radius:8px;background:var(--muted);margin:12px 0}
hr{height:1px;border:0;background:var(--border);margin:20px 0}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--foreground);color:var(--background);padding:14px 22px;border-radius:9px;box-shadow:0 6px 26px #00000014;font-size:12px;z-index:100;max-width:min(680px,90vw);line-height:1.6}
.toast.error{background:var(--danger)}
dialog{border:1px solid var(--border);border-radius:12px;padding:0;width:min(620px,calc(100vw - 32px));max-height:90dvh;box-shadow:0 22px 80px #00000029}
dialog::backdrop{background:var(--backdrop);backdrop-filter:blur(2px)}
.dialog-shell{padding:26px}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:26px;padding-top:20px;border-top:1px solid var(--border)}
#dialog-secondary-actions{margin-right:auto;min-width:0}
#dialog-secondary-actions:empty{display:none}
#editor-dialog .dialog-shell{display:flex;flex-direction:column;max-height:90dvh}
#editor-dialog .dialog-heading,#editor-dialog .dialog-actions{flex-shrink:0}
#dialog-content{overflow-y:auto;min-height:0}
.path-preview-error{background:var(--warning-soft);border-radius:6px;padding:12px;margin:10px 0 16px;font-size:12px;line-height:1.5}
.path-preview-error p{margin:0 0 8px}
.path-preview-error details{margin:8px 0}
.path-preview-error summary{cursor:pointer}
.path-error-details{max-height:160px;overflow:auto;overflow-wrap:anywhere;margin-top:8px}
.path-error-details pre{white-space:pre-wrap;font-size:11px}
.path-error-details ul{padding-left:18px}
.path-error-details li+li{margin-top:6px}
.parameter-row{display:grid;grid-template-columns:1fr 110px 28px;gap:8px;margin-bottom:9px}
.parameter-row input,.parameter-row select{font-size:11px;padding:8px}
.library-item{padding:16px 0;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:18px}
.library-item h3{margin-bottom:5px}
.library-item p{font-size:11px}
.error-banner{background:var(--danger-soft);color:var(--danger);border:1px solid var(--danger-border);border-radius:8px;padding:13px 16px;font-size:12px;line-height:1.6;margin:12px 0}
.hint-banner{background:var(--accent);color:var(--primary-hover);border-radius:7px;padding:12px;font-size:11px;line-height:1.6}
.state-reference{font-family:var(--font-mono);font-size:10px;color:var(--primary)}
.fields-group{border-top:1px solid var(--border);padding-top:16px;margin-top:16px}
.fields-group summary{cursor:pointer;font-size:13px;font-weight:600;margin-bottom:17px}
.array-item{padding:12px;border:1px solid var(--border);border-radius:7px;margin-bottom:10px;background:var(--muted)}
.array-item-header{display:flex;justify-content:space-between;margin-bottom:12px}
.array-item-header span{font-size:11px;color:var(--muted-foreground)}

@media(min-width:1700px){.inspector{width:420px}
.run-layout{grid-template-columns:270px minmax(420px,1fr) minmax(310px,.7fr)}
}

@media(max-width:1250px){.topbar{gap:22px;padding:0 20px}
.topbar-actions{gap:6px}
.topbar-actions .button{padding:9px 10px}
.brand{font-size:22px}
.inspector{width:320px;padding:20px}
.graph-toolbar{padding:20px}
.graph-footer #graph-hint{display:none}
.content-view{padding:26px 22px}
.run-layout{grid-template-columns:205px minmax(290px,1fr)}
.diagnostics-panel{grid-column:1/-1;min-height:280px}
.run-layout{height:auto}
.conversation-panel{min-height:620px}
.run-settings{max-height:700px}
}

@media(max-width:850px){.topbar{height:auto;min-height:96px;flex-wrap:wrap;gap:14px;padding:18px}
.brand small{display:none}
.experiment-heading{width:50%}
.topbar-actions{width:100%;justify-content:flex-end}
.topbar-actions .button{flex:1}
.workspace-tabs{padding:0 18px}
.tabs{gap:22px}
.runtime-badge{display:none}
.flow-view.active{height:auto;min-height:calc(100dvh - 184px);flex-direction:column}
.graph-area{height:550px;flex:none}
.inspector{width:100%;border-left:0;border-top:1px solid var(--border);overflow:visible}
.graph-toolbar h1{font-size:18px}
.graph-toolbar p{font-size:11px}
.graph-toolbar{align-items:start}
.graph-toolbar .button-row{flex-direction:column}
.tools-layout,.scenario-layout{grid-template-columns:1fr}
.section-heading{align-items:start}
.section-heading h1{font-size:23px}
.run-view .section-heading{flex-direction:column}
.run-layout{grid-template-columns:1fr}
.run-settings{max-height:none}
.run-settings>label{display:inline-flex;width:calc(50% - 8px);margin-right:5px}
.run-settings .simulation-grid{grid-template-columns:repeat(4,1fr)}
.conversation-panel{min-height:560px}
.diagnostics-panel{grid-column:auto}
.content-view{padding:24px 18px}
.graph-footer{padding:12px 18px}
}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}

.inspector label.checkbox-row,label.checkbox-row{flex-direction:row;justify-content:flex-start;align-items:center;font-weight:400}
.checkbox-row input{margin:0;flex:none}
input,textarea,select{font-weight:400}
.graph-node{font-weight:400}
.fields-group>.form-grid>.fields-group{grid-column:1/-1}

.native-tool-card{background:var(--muted);border:1px solid var(--border);border-radius:7px;margin:9px 0;padding:11px}
.native-tool-card summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer}
.native-tool-card .tool-name{font-size:11px;margin:0}
.native-tool-card>p{font-size:10px;margin-top:10px}
.native-tool-card label{font-size:10px;margin:12px 0 8px}
.native-tool-card textarea{font-size:10px}
.schema-summary{font-family:var(--font-mono);color:var(--muted-foreground)}

.interrupt-shelf{flex-shrink:0;padding:17px 22px;background:var(--muted);border-top:1px dashed var(--input-border)}

.interrupt-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}

.interrupt-heading h2{font-size:13px;margin:0}
.interrupt-heading h2 span{font-size:11px;color:var(--muted-foreground);font-weight:400;margin-left:5px}

.interrupt-badge{font-size:10px;color:var(--primary);border:1px solid var(--border);border-radius:4px;padding:3px 6px}

.interrupt-shelf>p{font-size:11px;margin:7px 0 12px;color:var(--muted-foreground)}

.interrupt-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;max-height:142px;overflow-y:auto;padding:3px}

.interrupt-card{display:flex;align-items:center;gap:10px;border:1px dashed var(--input-border);border-radius:7px;background:var(--background);padding:10px 12px;text-align:left;min-width:0;color:var(--foreground);cursor:pointer}

.interrupt-card>span:nth-child(2){min-width:0;flex:1}
.interrupt-symbol{font-size:21px;color:var(--primary)}

.interrupt-title{display:block;font-size:11px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.interrupt-detail{display:block;font-size:9px;color:var(--muted-foreground);margin-top:4px}

.interrupt-card:hover{background:var(--accent)}
.interrupt-card.selected{border:1px solid var(--primary);box-shadow:0 0 0 2px var(--accent);background:var(--accent)}
.interrupt-card.running{box-shadow:0 0 0 3px var(--success-soft)}

.interrupt-path-link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:9px;background:var(--accent);color:var(--primary);border:1px dashed var(--input-border);border-radius:4px;font-size:10px;padding:5px 7px;cursor:pointer}

.interrupt-context{background:var(--muted);border-left:3px solid var(--primary);padding:13px 14px;margin-bottom:22px;border-radius:0 6px 6px 0}
.interrupt-context-label{font-size:11px;color:var(--primary);font-weight:600}
.interrupt-context p{font-size:11px;line-height:1.6;margin-top:8px}
.interrupt-context h3{font-size:11px;margin:12px 0 5px}
.interrupt-context .text-button{display:block;margin-top:6px;text-align:left}
.route-target{text-align:left}

@media(max-width:850px){.graph-area{height:760px}
.interrupt-shelf{padding:14px 18px}
.interrupt-cards{grid-template-columns:repeat(2,minmax(0,1fr));max-height:146px}
.interrupt-heading{gap:8px}
.interrupt-card{padding:9px 8px;gap:6px}
.interrupt-detail{font-size:9px}
}

.interrupt-heading{justify-content:space-between}
.interrupt-heading #interrupt-source-name{font:inherit;color:var(--primary);margin:0;font-weight:600}
.interrupt-heading .button-row{gap:8px}
.interrupt-heading .button.primary{background:var(--primary);border-color:var(--primary)}

.interrupt-scope{display:flex;align-items:center;gap:16px;margin:10px 0}
.interrupt-scope label{display:flex;flex-direction:row;align-items:center;gap:8px;flex-shrink:0;font-size:10px;margin:0;font-weight:400}
.interrupt-scope select{font-size:11px;width:190px;padding:7px 9px}
.interrupt-scope p{font-size:10px;line-height:1.6;color:var(--muted-foreground);margin:0;max-width:490px}

.interrupt-empty{grid-column:1/-1;font-size:11px;line-height:1.6;color:var(--muted-foreground);padding:10px 12px;margin:0}
.interrupt-empty strong{font-weight:600;color:var(--foreground)}
.interrupt-empty p{margin:5px 0 0}
.interrupt-empty details{margin-top:7px}
.interrupt-empty summary{cursor:pointer}
.interrupt-condition-label{display:block;font-size:9px;color:var(--warning);margin-top:4px}
.interrupt-detail{white-space:normal;line-height:1.35}

.interrupt-source-fields{padding:15px 0;border:0;border-top:1px solid var(--border);margin:8px 0 16px}
.interrupt-source-fields legend{padding:0 8px 0 0;font-size:12px;font-weight:600}
.interrupt-choice-list{display:grid;grid-template-columns:1fr 1fr;max-height:190px;overflow:auto;gap:4px 14px}
.interrupt-source-fields label.checkbox-row{font-size:11px;margin:5px 0}
.interrupt-context>.button{margin-top:13px;font-size:10px}
.interrupt-context b{font-weight:600}

.graph-node.interrupt-source-node{border:2px dashed var(--primary);padding:13px 15px 11px}
.graph-node.interrupt-source-node::after{content:'INTERRUPT SOURCE';position:absolute;bottom:-17px;left:0;color:var(--primary);font-size:8px;letter-spacing:.6px}

#interrupt-library-dialog .library-item>div{min-width:0}
#interrupt-library-dialog .library-item p{overflow-wrap:anywhere;margin-bottom:8px}
#interrupt-library-dialog .library-item>.button{flex-shrink:0}

@media(max-width:850px){.interrupt-heading .button-row{width:100%}
.interrupt-heading .button-row .button{flex:1}
.interrupt-scope{align-items:stretch;flex-direction:column;gap:6px}
.interrupt-scope label{justify-content:space-between}
.interrupt-scope select{width:calc(100% - 66px)}
.interrupt-choice-list{grid-template-columns:1fr}
.interrupt-shelf{padding:13px 16px}
.interrupt-cards{max-height:133px}
.graph-area{height:830px}
}


/* Keep the editable revision separate from immutable run evidence. */
.topbar{gap:22px}
.topbar-actions{flex-wrap:wrap;justify-content:flex-end;max-width:650px}
.topbar-actions .button{padding:8px 11px}

.save-conflict{display:flex;align-items:center;justify-content:center;gap:12px;padding:12px 24px;background:var(--warning-soft);color:var(--warning);font-size:12px;flex-wrap:wrap}

.run-context-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-8px 0 18px;padding:14px 18px;border:1px solid var(--border);border-radius:8px;background:var(--accent)}

.run-context-panel strong{font-size:12px;overflow-wrap:anywhere}
.run-context-panel p{font-size:11px;margin-top:5px}
.run-context-panel .button-row{flex-shrink:0}

.run-history-heading{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border);margin-top:20px;padding-top:18px}
.run-history-heading h2{margin:0}

.run-history{border:0;margin-top:8px;padding-top:0}
.run-history-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid var(--border);font-size:11px}
.run-history-item small{display:block;font-size:10px;margin-top:4px}
.run-history-item b{overflow-wrap:anywhere}
.run-history-item button{margin:0;flex-shrink:0}

@media(max-width:1000px){.topbar{height:auto;min-height:88px;padding:14px 20px;flex-wrap:wrap}
.topbar-actions{max-width:none}
.run-context-panel{align-items:flex-start;flex-direction:column}
.run-context-panel .button-row{flex-wrap:wrap}
}

/* Direct graph manipulation: generous ports, visible draft, selectable paths. */
.graph-viewport{touch-action:none}
.graph-viewport.connecting,.graph-viewport.connecting .graph-node{cursor:crosshair}
.graph-node.connect-source{border-color:var(--primary)}
.node-input-port{position:absolute;left:-6px;top:50%;transform:translateY(-50%);width:10px;height:10px;border:2px solid var(--input-border);border-radius:50%;background:var(--background);pointer-events:none}
.connect-target .node-input-port{border-color:var(--success);background:var(--success-soft)}
.node-port::after{content:'+';position:absolute;inset:0;display:grid;place-items:center;font-size:15px;line-height:1;color:var(--primary)}
.node-port:hover::after{color:var(--primary-foreground)}
.edge-hit{fill:none;stroke:transparent;stroke-width:16;pointer-events:stroke;cursor:pointer;vector-effect:non-scaling-stroke}
.edge-path{pointer-events:none;vector-effect:non-scaling-stroke}
.edge-path.automatic{stroke-dasharray:6 4}
.graph-edge .edge-label{visibility:hidden;pointer-events:none}
.graph-edge.selected .edge-label,.graph-edge:hover .edge-label,.graph-edge:focus .edge-label{visibility:visible}
.graph-edge:focus{outline:none}
.graph-edge:focus .edge-path{stroke:var(--primary);stroke-width:4}
.connection-preview{fill:none;stroke:var(--success);stroke-width:2;stroke-dasharray:6 4;pointer-events:none;vector-effect:non-scaling-stroke;marker-end:url(#arrow)}
.path-status{display:block;font-size:11px;font-weight:600;margin-top:10px}
.path-status.available{color:var(--success)}
.path-status.unavailable{color:var(--warning)}
.path-status.pending{color:var(--muted-foreground)}
.path-checks{padding-left:0;list-style:none;font-size:11px;line-height:1.6;color:var(--muted-foreground);margin:6px 0}
.graph-edge.unavailable .edge-path{opacity:.35}
.graph-edge.unavailable:hover .edge-path,.graph-edge.unavailable:focus .edge-path{opacity:1}
#transition-policy{border-left:2px solid var(--border);padding-left:12px;margin-bottom:16px}
.transition-card .inline-actions{flex-wrap:wrap}
.path-tool{display:block;overflow-wrap:anywhere;font-size:11px;font-family:var(--font-mono);margin-top:6px}

.run-review-panel { margin-top:16px; padding:16px; }
.run-review-panel summary { cursor:pointer; font-weight:600; }
.run-review-note { padding:12px 0; border-bottom:1px solid var(--border); }
.run-review-note p { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; }
