.studio { min-width:0; display:grid; gap:1.5rem; }
main:has(.studio) { background:radial-gradient(ellipse at 50% 0,#def0e3 0,transparent 66%),#f6f8f4; }
.studio-heading { padding-top:1.5rem; }
.studio-heading p { margin-top:.4rem; }
.studio-workbench { display:grid; align-items:start; grid-template-columns:minmax(0,1fr) minmax(215px,250px); gap:1rem; }
.studio-editor,.studio-inspector,.studio-reports { background:var(--surface); border:1px solid var(--line-strong); border-radius:17px; min-width:0; }
.studio-editor { overflow:hidden; }
.studio-editor-head, .studio-canvas-footer,.studio-report-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.studio-editor-head { padding:1rem 1.15rem; }
.studio-editor-head h2,.studio-inspector h2,.studio-reports h2 { font-family:var(--display-font); font-size:clamp(20px,2vw,29px); font-weight:500; }
.studio-editor-head .button,.studio-report-heading .button { min-height:34px; padding:5px 12px; }
.studio-palette { border-top:1px solid var(--line); padding:10px 1.15rem; }
.studio-palette summary,.studio-summary summary { cursor:pointer; color:var(--forest); font-weight:650; }
.studio-palette div { margin-top:.7rem; display:flex; flex-wrap:wrap; gap:6px; }
.studio-palette .button { font-weight:500; font-size:.86rem; min-height:34px; }
.studio-scroller { min-height:270px; max-height:65vh; overflow:auto; overscroll-behavior:contain; border-block:1px solid var(--line); background:radial-gradient(circle at 1px 1px,#adc6b2 1px,transparent 1.3px) 0 0 / 16px 16px,#f1f6ef; }
.studio-sheet,.studio-plane { position:relative; }
.studio-plane { transform-origin:top left; }
.studio-plane > svg { display:block; width:100%;height:100%; position:absolute; inset:0; pointer-events:none; }
.studio-wire { fill:none; stroke:#527e65;stroke-width:2; }
.studio-wire.otherwise { stroke-dasharray:6 4; }
.studio .studio-editor [hidden],.studio [data-edit-only][hidden] { display:none; }
.studio-hit { fill:none; stroke:transparent; stroke-width:20; }
.studio-edge[data-inspect-edge] { cursor:pointer; pointer-events:stroke; }
.studio-edge[data-inspect-edge] .studio-hit { pointer-events:stroke; }
.studio-edge[data-inspect-edge] .studio-wire { stroke:#a9b8ac; }
.studio-edge.taken .studio-wire { stroke:#16804d; stroke-width:3.5; filter:drop-shadow(0 1px 2px #25996e45); }
.studio-edge:focus-visible .studio-wire,.studio-edge.selected-edge .studio-wire,.studio-edge[data-inspect-edge]:hover .studio-wire { stroke-width:5; }
.studio-edge:focus-visible { outline:none; }
.studio-json { max-height:45vh; overflow:auto; padding:.75rem; margin:0; background:#f0f5f1; border-radius:8px; font-size:.75rem; line-height:1.6; }
.studio-confirmed,.studio-verified { color:#145d3b; }
.studio-verified span { display:inline-grid;place-items:center;width:1.25em;height:1.25em;border-radius:50%;background:#d8eddf;color:#176139;font-weight:700;margin-inline-end:.4em; }
.studio-fact { padding:.75rem; margin:.75rem 0; border-inline-start:3px solid #4a9669; background:#f8fcf8; border-radius:4px; }
.studio-fact ul { margin-bottom:0; }
.studio-advice { display:grid; gap:.3rem; }
.studio-advice dt { font-weight:650; }
.studio-advice dd { margin:0 0 .55rem; }
.studio-mismatch { color:#843e29; }
.studio-node { position:absolute; width:166px;height:76px; border:1px solid #a1b7a7; border-radius:13px; background:linear-gradient(140deg,#fff 0%,#f1f7f0 100%); box-shadow:0 4px 10px #214e3120; }
.studio-node.selected { border-color:#286249; box-shadow:0 0 0 2px #579d772e,0 4px 10px #214e3120; }
.studio-node-body { width:100%;height:100%; display:flex;align-items:center; gap:9px; padding:10px 13px; border:0; color:var(--forest); border-radius:inherit; background:transparent; text-align:left; touch-action:none; user-select:none; }
.studio-node-body:active { cursor:grabbing; }
.studio-node-body strong,.studio-node-body small { display:block; }
.studio-node-body strong { font-size:15px; font-weight:650; line-height:1.15; }
.studio-node-body small { font-size:12px; margin-top:4px; color:var(--muted); }
.studio-glyph { width:29px;height:29px; display:inline-grid;flex:none;place-items:center;border-radius:9px; background:#dfede0; color:#26583e;font:600 17px Georgia,serif; }
.studio-port { position:absolute;right:-9px;top:calc(50% - 9px);border:1.5px solid #547962; border-radius:50%;background:#fff;width:17px;height:17px;padding:0;color:#1d4d38;line-height:14px;font-size:13px; }
.studio-port.true { top:16px; }
.studio-port.false { top:44px; }
.studio-port:hover,.studio-port:focus-visible { background:#c8e5d4; }
.studio-canvas-footer { padding:9px 1rem; color:var(--muted); }
.studio-canvas-footer div { display:flex; align-items:center; gap:3px; }
.studio-canvas-footer button,.studio-del,.studio-close { background:transparent; color:var(--forest);border:1px solid var(--line);border-radius:7px;min-width:30px;min-height:30px; }
.studio-inspector { padding:1rem;display:grid;gap:.85rem; }
.studio-inspector-title { display:flex;gap:9px;align-items:center; }
.studio-inspector small,.studio-inspector p,.studio-report-heading small,.studio-stage-list small { color:var(--muted); }
.studio-inspector p { margin:0;line-height:1.45; }
.studio-inspector h3 { font-size:1rem; }
.studio-fields,.studio-edge-form,.studio-dialog-form { display:grid;gap:.75rem; }
.studio-fields:empty { display:none; }
.studio-links,.studio-findings,.studio-library { margin:0;padding:0;list-style:none; }
.studio-links li { display:flex;align-items:center;justify-content:space-between;font-size:.85rem;gap:.4rem;padding:.35rem 0; }
.studio-links li+li,.studio-library li+li { border-top:1px solid var(--line); }
.studio-delete,.studio-edge-form .button { justify-self:start; }
.studio-delete { color:#863d37; }
.studio-reports { padding:1.1rem; }
.studio-reports .studio-editor-head { padding:.3rem 0 1rem; }
.studio-reports [data-report] { display:grid;gap:14px; }
.studio-report-heading { justify-content:flex-start; }
.studio-report-heading h3 { margin-right:auto; }
.studio-stage-list { overflow:auto; }
.studio-stage-list table { border-collapse:collapse;width:100%; font-size:.9rem; }
.studio-stage-list caption { text-align:left;font-weight:650;margin-bottom:.55rem; }
.studio-stage-list th,.studio-stage-list td { text-align:left;border-bottom:1px solid var(--line);padding:.65rem .5rem; }
.studio-stage-list small { display:block;font-weight:400; }
.studio-findings { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1rem; }
.studio-findings li { border-left:3px solid #82ab90; padding:4px 12px;display:grid;align-content:start;gap:5px; }
.studio-findings small { font-weight:650;color:#60451f; }
.studio-findings code,.studio-summary code { overflow-wrap:anywhere; }
.studio-findings p,.studio-summary p,.studio-library p { margin:0;line-height:1.5; }
.studio-summary { padding:1rem; background:#eff5ed; border-radius:10px;display:grid;gap:.6rem; }
.studio-dialog { width:min(480px,calc(100vw - 2rem)); }
.studio-dialog[open] { padding:1.4rem; }
.studio-dialog h2 { margin-right:1.5rem;font:500 1.8rem var(--display-font); }
.studio-dialog form { position:relative; }
.studio-close { position:absolute;right:0;top:0; }
.studio-dialog [data-directory]:not([hidden]) { display:grid;gap:.6rem; }
.studio-library li { display:grid;gap:.5rem;padding:.55rem 0; }
.studio-library .button { justify-self:start; }
@media(max-width:940px){.studio-workbench{grid-template-columns:minmax(0,1fr)}.studio-inspector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.studio-inspector h3,.studio-links,.studio-fields{grid-column:1 / -1}}
@media(max-width:600px){.studio-inspector{display:grid;grid-template-columns:1fr}.studio-scroller{min-height:245px}.studio-editor-head,.studio-reports{padding:.8rem}.studio .portal-heading{padding-top:1rem}.studio-report-heading h3{flex-basis:100%}.studio-canvas-footer{padding:8px}.studio-heading .portal-actions{width:100%}}

.studio-live { position:absolute; top:-10px; left:12px; padding:2px 8px; border-radius:1em; background:#d2e9d8; color:#224d36; font-size:11px; font-weight:650; pointer-events:none; }
.studio-live[data-status=running] { background:#ffdfa8; color:#68411d; }
.studio-live[data-status=skipped] { background:#e4e9e5; color:#495b50; }
.studio-live[data-status=error] { background:#f5d7d2; color:#822b21; }
.studio-stage-list summary { cursor:pointer; }
.studio-stage-list ul { list-style:none; display:grid; gap:.4rem; margin:.5rem 0; padding:0; max-width:44ch; }
.studio-stage-list code { overflow-wrap:anywhere; }
