/* Ankra Ink: quiet surfaces, monochrome actions, colour for status and focus. */
:root{--bg:var(--ink-bg-canvas);--paper:var(--ink-bg-surface);--ink:var(--ink-fg-default);--muted:var(--ink-fg-muted);--line:var(--ink-border-default);--soft:var(--ink-bg-subtle);--warn:var(--ink-status-warn-fg);--warn-bg:var(--ink-status-warn-bg);--bad:var(--ink-status-danger-fg);--bad-bg:var(--ink-status-danger-bg)}
.studio-body{background:var(--bg)}
.dag-toolbar,.dag-lens,.dag-bottomline{background:var(--paper);border-color:var(--line);color:var(--ink)}
.dag-title small,.dag-title small span,.dag-context-label,.dag-lane,.dag-lane>span,.dag-lane small,.dag-resource-type,.dag-node-bottom,.dag-node-bottom>span:last-child,.dag-minimap>span,.dag-legend,.dag-bottomline,.upstream-key,.downstream-key{color:var(--muted)}
.dag-logo{background:var(--soft);border-color:var(--line);color:var(--ink);border-radius:var(--ink-radius-md)}
.dag-valid{color:var(--ink-status-good-fg);background:var(--paper);border-color:var(--ink-status-good-border);border-radius:var(--ink-radius-sm)}
.dag-controls button,.dag-view-options button,.execution-bar button{background:var(--paper);border-color:var(--ink-border-strong);color:var(--ink);border-radius:var(--ink-radius-md)}
.dag-controls button:hover,.dag-view-options button:hover,.execution-bar button:hover{background:var(--soft)}
.dag-controls .dag-connect{background:var(--paper);color:var(--ink);border-color:var(--ink-border-strong)}
.dag-controls .dag-connect:hover{background:var(--soft)}
.dag-view-options button[aria-pressed=true]{background:var(--soft);border-color:var(--ink)}
.canvas-viewport.dag-canvas{background-color:var(--ink-bg-canvas);background-image:radial-gradient(var(--ink-border-default) 1px,transparent 1px)}
.dag-canvas:before{background:none}
.dag-lane{border-color:var(--line);background:transparent;border-radius:var(--ink-radius-md)}
.dag-node.canvas-node{height:144px;background:var(--paper);border-color:var(--ink-border-strong);color:var(--ink);box-shadow:var(--ink-shadow-xs);border-radius:var(--ink-radius-md);padding:var(--ink-space-3);gap:var(--ink-space-2)}
.dag-node.canvas-node:hover{background:var(--ink-bg-subtle);border-color:var(--ink)}
.dag-node.canvas-node[aria-pressed=true]{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink),var(--ink-shadow-sm)}
.resource-glyph,.resource-glyph.glyph-helm,.resource-glyph.glyph-lock{color:var(--ink);background:var(--soft);border-color:var(--line);border-radius:var(--ink-radius-sm)}
.node-modified{color:var(--ink-status-warn-fg)}
.dag-node .node-port{top:67px;background:var(--paper);border-color:var(--ink-fg-muted)}
.dag-node .node-port.out{background:var(--ink-fg-muted)}
.dag-node .node-port.vertical{top:-5px}.dag-node .node-port.out.vertical{top:auto;bottom:-5px}
.dag-node .peer-tag{background:var(--ink-status-ai-bg);color:var(--ink-status-ai-fg);border:1px solid var(--ink-status-ai-border)}
.dag-node.peer-selected{outline-color:var(--ink-status-ai-border)}
.graph-edges .edge-line{stroke:var(--ink-fg-subtle)}
.graph-edges .edge-upstream{stroke:var(--ink-fg-default)}
.graph-edges .edge-downstream{stroke:var(--ink-fg-muted);stroke-dasharray:5 3}
.graph-edges .edge-failed{stroke:var(--ink-status-danger-fg)}
.graph-edges .arrow-neutral{fill:var(--ink-fg-subtle)}.graph-edges .arrow-upstream{fill:var(--ink-fg-default)}.graph-edges .arrow-downstream{fill:var(--ink-fg-muted)}.graph-edges .arrow-failed{fill:var(--ink-status-danger-fg)}
.dag-edge:focus .edge-line,.dag-edge:hover .edge-line{stroke:var(--ink-border-focus)}
.dag-floating-tools,.dag-minimap{background:var(--paper);border-color:var(--ink-border-strong);color:var(--muted);box-shadow:var(--ink-shadow-sm)}
.dag-floating-tools button{color:var(--ink)}.dag-floating-tools button:hover{background:var(--soft)}.dag-floating-tools>span{border-color:var(--line)}
.dag-minimap path{stroke:var(--ink-fg-muted)}.dag-minimap rect{fill:var(--ink-bg-muted);stroke:var(--ink-fg-subtle)}.dag-minimap .mini-selected{fill:var(--ink-fg-default);stroke:var(--ink-fg-default)}.dag-minimap .mini-viewport{fill:transparent;stroke:var(--ink-fg-default)}
.dag-legend{background:var(--paper)}.dag-legend i{background:var(--ink-fg-default)}.dag-legend .legend-downstream{background:repeating-linear-gradient(90deg,var(--muted) 0 4px,transparent 4px 6px)}
.execution-bar{background:var(--soft);border-color:var(--line);color:var(--ink)}.execution-bar strong{color:var(--muted)}
.dag-node.run-ready{border-color:var(--ink-border-strong)}.dag-node.run-ready .run-state{color:var(--ink-fg-default)}.dag-node.run-succeeded .run-state{color:var(--ink-status-good-fg)}.dag-node.run-failed{border-color:var(--ink-status-danger-border);background:var(--ink-status-danger-bg)}.dag-node.run-failed .run-state{color:var(--ink-status-danger-fg)}.dag-node.run-blocked{border-color:var(--ink-status-warn-border)}.dag-node.run-blocked .run-state{color:var(--ink-status-warn-fg)}
.live-band{padding:var(--ink-space-3) var(--ink-space-4);display:flex;align-items:center;gap:var(--ink-space-4);flex-wrap:wrap;border-bottom:1px solid var(--line);background:var(--paper);font-size:11px}
.live-band-label,.live-band-context,.live-band-actions{display:flex;align-items:center;gap:var(--ink-space-3);flex-wrap:wrap}.live-band-label b{font-weight:550}.live-band-context{color:var(--muted);flex:1}.live-band-actions button{font-size:10px;min-height:28px;padding:4px 8px}.live-dot{width:6px;height:6px;background:var(--ink-status-good-fg);border-radius:50%}.live-dot.stale{background:var(--ink-status-warn-fg)}
.observed-chip{display:inline-flex;align-items:center;gap:var(--ink-space-1);font-size:9px;line-height:16px;border:1px solid var(--line);border-radius:var(--ink-radius-sm);padding:0 var(--ink-space-1);color:var(--muted);background:var(--paper);white-space:nowrap}.observed-chip.warn{color:var(--warn);background:var(--warn-bg);border-color:var(--ink-status-warn-border)}.observed-chip.muted{color:var(--muted);background:var(--soft)}
.node-observed{display:flex;align-items:center;justify-content:space-between;gap:var(--ink-space-2);border-top:1px solid var(--line);padding-top:var(--ink-space-2);width:100%;font-size:9px;color:var(--muted)}
.live-summary{margin:0;padding:var(--ink-space-4);border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:grid;gap:var(--ink-space-2)}.live-summary>div{display:flex;align-items:center;justify-content:space-between;gap:var(--ink-space-2)}.live-summary .eyebrow{font-size:8px;margin:0;letter-spacing:1px}.live-summary p{font-size:11px}.live-summary small{font-size:10px}.live-summary button{justify-content:flex-start;min-height:24px;padding:0;border:0;background:none;font-size:10px;text-decoration:underline;text-underline-offset:3px}
.live-detail{display:grid;gap:var(--ink-space-4);font-size:11px}.live-detail-heading{display:flex;justify-content:space-between;gap:var(--ink-space-2)}.live-detail h3{font-size:13px}.live-detail h4{font-size:11px;font-weight:600;margin:0 0 8px}.live-freshness,.live-source{font-size:10px;color:var(--muted)}.live-facts{margin:0}.live-facts>div{display:flex;justify-content:space-between;gap:var(--ink-space-3);padding:var(--ink-space-2) 0;border-bottom:1px solid var(--line)}.live-facts dt{color:var(--muted)}.live-facts dd{margin:0;text-align:right;font-weight:500}.live-notice{padding:var(--ink-space-3);background:var(--warn-bg);color:var(--warn);border-left:2px solid var(--ink-status-warn-border)}.live-draft-context{padding:var(--ink-space-3) 0;border-bottom:1px solid var(--line)}.live-draft-context small{display:block;margin-top:8px;font-size:10px}.live-events{padding:0;margin:0;list-style:none;display:grid;gap:var(--ink-space-3)}.live-events time{font-size:9px;color:var(--muted)}.live-events p{margin:4px 0}.event-type{font-size:9px;color:var(--muted)}.event-type.warn{color:var(--warn)}.live-logs button{font-size:10px}.live-logs pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--soft);padding:var(--ink-space-3);font:10px/1.6 ui-monospace,monospace}.live-control-list{display:grid;gap:var(--ink-space-2)}
.live-peek{position:fixed;z-index:100;width:320px;max-width:calc(100vw - 16px);padding:var(--ink-space-4);border:1px solid var(--ink-border-strong);border-radius:var(--ink-radius-md);box-shadow:var(--ink-shadow-md);background:var(--paper);color:var(--ink);font-size:11px;display:grid;gap:var(--ink-space-2)}.live-peek>div{display:flex;align-items:center;justify-content:space-between;gap:var(--ink-space-2)}.live-peek small,.peek-hint{color:var(--muted);font-size:10px}.inspector-tabs button{padding-left:8px;padding-right:8px}
@media(max-width:650px){.live-band{padding:var(--ink-space-3);gap:var(--ink-space-2)}.live-band-context{flex-basis:100%;font-size:10px}.live-band-actions{width:100%}.live-summary{padding:var(--ink-space-3)}}
@media print{@page{size:1600px 1680px;margin:32px}.live-peek{display:none}.editor-print-page .live-detail{font-size:10px}.editor-print-page .inspector-content{max-height:none;overflow:visible}}

.inspector-tabs{gap:var(--ink-space-2);padding:0 var(--ink-space-3)}.inspector-tabs button{padding:8px 0;flex:1}.inspector-content:has(.live-detail){max-height:660px;grid-template-columns:1fr}

.center-table .node-observed{border:0;padding:0;gap:var(--ink-space-2);white-space:nowrap}

/* Resource source belongs to the same panel as its structured fields. */
.resource-context-label{display:block;font-size:8px;letter-spacing:1px;color:var(--muted);margin-bottom:6px}
.inspector .pane-title>.actions{gap:4px}.source-expand{font-size:10px;padding:4px 8px;min-height:28px}
.inspector-footer{align-items:center}.inspector-footer>span{font-size:9px;color:var(--muted)}
.resource-source-open .inspector-content{display:block;padding:0;max-height:none;overflow:hidden}
.inspector .source-header{flex-wrap:wrap;gap:8px;background:var(--soft)}
.inspector .source-file{min-width:0;overflow-wrap:anywhere}
.inspector .source-editor{min-height:320px;max-height:none}
.inspector .yaml-input{width:0;min-width:0;min-height:320px;font:12px/24px ui-monospace,monospace;padding:16px 12px 16px 8px}
.inspector .source-footer{flex-wrap:wrap;gap:12px}.inspector .source-footer>.actions{width:100%;justify-content:flex-end;flex-wrap:wrap}
.inspector .source-errors{overflow-wrap:anywhere}
@media(min-width:1051px){
  .resource-source-open.workbench{grid-template-columns:184px minmax(0,1fr) 440px}
  .resource-source-open.resource-source-expanded.workbench{grid-template-columns:160px minmax(0,1fr) min(600px,52vw)}
}
@media(min-width:1440px){
  .resource-source-open.workbench{grid-template-columns:208px minmax(0,1fr) 480px}
  .resource-source-open.resource-source-expanded.workbench{grid-template-columns:208px minmax(0,1fr) 640px}
}
@media(max-width:1050px){.source-expand{display:none}}
@media print{.editor-print-page .resource-source-open.workbench{grid-template-columns:184px minmax(0,1fr) 480px}.source-expand{display:none}}
