/* V5.4 · the six scene-first workbenches share the PV visual language. */
.gv-lab{--gv-ink:#163747;--gv-muted:#4f6b79;--gv-teal:#166d63;--gv-border:#d7e7eb}
.gv-lab .pv-top .kicker{margin-bottom:5px}
.gv-steps{grid-template-columns:repeat(var(--gv-steps),minmax(0,1fr))}
.gv-steps button{padding-inline:12px}
.gv-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,346px);align-items:start;gap:14px}
.gv-main,.gv-side{min-width:0;gap:14px}
.gv-stage,.gv-data,.gv-evidence,.gv-controls{min-width:0}
.gv-stage-head{align-items:flex-start;margin-bottom:11px}
.gv-stage-head p{font-size:13px;color:var(--gv-muted);margin:.25rem 0 0;max-width:58ch}
.gv-stage-head h2{font-size:clamp(19px,2vw,26px);color:var(--gv-ink)}
.gv-stage-head #gv-phase{flex:none}
.gv-stage-head #gv-phase .badge{white-space:normal;max-width:13ch;text-align:center}
.gv-scroller{overflow:auto;border:1px solid #d5e5eb;border-radius:11px;background:#f3f8fa;scrollbar-color:#9cbdc8 #edf4f6}
.gv-canvas{position:relative;min-width:570px;aspect-ratio:840/342}
.gv-canvas svg{display:block;width:100%;height:auto}
.gv-node,.gv-terminal{appearance:none;position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);cursor:pointer;touch-action:manipulation}
.gv-node{z-index:1;display:flex;align-items:flex-end;justify-content:center;width:var(--w);height:var(--h);padding:0 0 1px;background:transparent;color:#254c61;border:1px solid transparent;border-radius:9px}
.gv-node>span{background:#fffffff0;border:1px solid #cbdde6;border-radius:5px;padding:2px 6px;line-height:1.35;font-size:clamp(11px,1.05vw,14px);font-weight:720;text-align:center}
.gv-node:hover,.gv-node[aria-pressed=true]{border-color:#72b3aa;background:#c4edea26}
.gv-node[aria-pressed=true]>span{border-color:#70b9aa;background:#d8f2ed;color:#0b5b51}
.gv-node:focus-visible,.gv-terminal:focus-visible{outline:2px solid #126966;outline-offset:2px}
.gv-terminal{z-index:3;width:24px;height:24px;padding:0;border:2px solid #377895;background:#e3f5ff;border-radius:50%;box-shadow:0 0 0 3px #ffffffca}
.gv-terminal:after{content:"";display:block;width:7px;height:7px;margin:auto;border-radius:50%;background:#4489a1}
.gv-terminal[aria-pressed=true]{border-color:#197865;background:#bfeee3}
.gv-terminal:disabled{opacity:.48;cursor:not-allowed}
.gv-small,.gv-read,.gv-caption{font-family:system-ui,"Microsoft YaHei",sans-serif;fill:#44697d;font-size:13px;font-weight:590}
.gv-read{font-weight:740;font-size:14px;fill:#244d62}
.gv-caption{letter-spacing:1.2px;font-size:11px;fill:#50788c;font-weight:720}
.gv-body{fill:url(#gv-case);stroke:#7fa8bc;stroke-width:1.45}
.gv-on{stroke:#3f9d8a;stroke-width:1.9;fill:#f5fcf9}
.gv-hot{stroke:#c47862;stroke-width:2.3}
.gv-side{fill:#dcebf1;stroke:#98b8c8;stroke-width:1.3}
.gv-foot{fill:#dbe8ee}
.gv-stroke{stroke:#467c94;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
.gv-plate,.gv-tray{fill:#eaf2f7;stroke:#c7dce6;stroke-width:1.15}
.gv-tray{fill:#e6f0f4;stroke:#afcbd8}
.gv-meter-track{fill:#e7eff4;stroke:#aec9d5;stroke-width:.7}
.gv-wire{stroke:#a5bdc9;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:6 5}
.gv-wire.live{stroke:var(--gv-line);stroke-dasharray:none;opacity:.66;stroke-width:3}
.gv-wire.matched{stroke:#298c79;stroke-width:3;stroke-dasharray:none}
.gv-wire.fault{stroke:#b76059;stroke-width:2.7}
.gv-wire.pending{stroke:#3e80a0}
.gv-pulse{fill:none;stroke-width:4.6;stroke-linecap:round;stroke-dasharray:1 18;animation:gv-flow 1.1s linear infinite;animation-delay:var(--gv-delay,0s)}
.gv-arrow{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.gv-pulse.reverse{animation-direction:reverse}
@keyframes gv-flow{to{stroke-dashoffset:-38}}
.gv-blades{fill:#e3f2f8;stroke:#5e9ab0;stroke-width:1.35}
.gv-rotor.rotating{animation:gv-rotor var(--gv-rpm,3s) linear infinite;animation-delay:var(--gv-delay,0s);transform-origin:0 0}
@keyframes gv-rotor{to{transform:rotate(360deg)}}
.gv-wire-note{display:flex;gap:6px;align-items:center;font-size:12px;margin:9px 0 0;color:#345c72}
.gv-wire-note .icon{width:15px}
.gv-inspector{display:flex;justify-content:space-between;align-items:center;gap:7px 20px;padding:9px 1px}
.gv-inspector .flow{flex:0 1 auto;justify-content:flex-end}
.gv-inspector h3{font-size:14px;color:#175d66;margin:.1rem 0}
.gv-inspector p{font-size:12px;margin:0;color:var(--gv-muted)}
.gv-micro{font-size:10px;letter-spacing:.08em;color:#54798d}
.gv-meter-grid{grid-template-columns:repeat(auto-fit,minmax(106px,1fr))}
.gv-meter-grid .pv-meter b{overflow-wrap:anywhere}
.gv-controls .gv-parameters{display:grid;gap:8px}
.gv-controls .field,.gv-playback .field{gap:3px;font-size:13px}
.gv-controls select{min-width:0;max-width:100%}
.gv-controls .gv-actions{gap:7px}
.gv-controls .gv-actions .btn{min-height:34px}
.gv-range>span{display:flex;justify-content:space-between;gap:6px}
.gv-range input[type=range]{min-width:0;width:100%;accent-color:#247d70;margin:3px 0}
.gv-range output{font-weight:720;color:var(--gv-teal);font-variant-numeric:tabular-nums}
.gv-quick-run{display:flex;justify-content:space-between;gap:7px;align-items:center;flex-wrap:wrap;padding:7px 8px;background:#eaf6f1;border:1px solid #cce8dd;border-radius:8px}
.gv-quick-run[hidden]{display:none}
.gv-quick-run b{font-size:12px;color:#28675c}
.gv-ai{padding:0!important;overflow:hidden}
.gv-ai>summary{padding:12px 14px;margin:0}
.gv-ai>div,.gv-ai>form,.gv-ai>p{margin:0;padding:0 13px 10px}
.gv-ai>form{gap:5px}
.gv-ai>form .btn{justify-self:start}
.gv-ai-read{background:#f0f3fb;border:1px solid #e1e5f0;border-radius:7px;padding:7px 8px}
.gv-ai-read>span{color:#565d9a;font-size:11px;font-weight:750}
.gv-ai-read p,.gv-ai-warning{margin:2px 0;font-size:12px;line-height:1.55}
.gv-ai-warning{color:#934742;margin-top:5px}
.gv-data{gap:8px}
.gv-data h3{font-size:17px}
.gv-data h4{font-size:14px;color:#264c62}
.gv-data .fine{font-size:12px;margin:0}
.gv-data .chart{margin:0}
.gv-data #gv-playback:empty{display:none}
.gv-playback{display:flex;gap:8px 14px;align-items:end;flex-wrap:wrap}
.gv-playback .gv-range{flex:1;min-width:min(235px,100%)}
.gv-data-context{font-size:11px;color:#507184}
.gv-data-context:empty,.gv-controls #gv-quick-run:empty{display:none}
.gv-empty{background:#f4f8fa;min-height:93px;display:grid;place-content:center;justify-items:center;padding:13px;border:1px dashed #b9d2dd;border-radius:8px}
.gv-empty p{font-size:13px;margin:5px 0 0;text-align:center;color:#4b687b}
.gv-empty .icon{color:#5e90a9;width:20px;height:20px}
.gv-balance{padding:8px 10px;background:#f4f8fb;border:1px solid var(--gv-border);border-radius:8px}
.gv-balance>div{display:grid;grid-template-columns:74px 1fr minmax(69px,auto);gap:8px;align-items:center;margin:5px 0;font-size:12px}
.gv-balance strong{text-align:right;font-variant-numeric:tabular-nums}
.gv-bar-track{height:8px;border-radius:3px;background:#e0ebf1;overflow:hidden}
.gv-bar-track i{display:block;height:100%;transition:width .25s ease}
.gv-protect,.gv-frames,.gv-logic-blocks{display:grid;grid-template-columns:repeat(auto-fit,minmax(137px,1fr));gap:7px}
.gv-protect>div,.gv-frames>div,.gv-logic-slot{display:grid;gap:5px;padding:9px;border:1px solid #d8e7ee;background:#f4f8fc;border-radius:7px}
.gv-protect span,.gv-frames span,.gv-logic-slot>span,.gv-case-num{font-size:11px;font-weight:750;letter-spacing:.04em;color:#507286}
.gv-protect small{font-size:12px;color:#496978}
.gv-protect .trip,.gv-cases .fail{border-color:#edc8bd;background:#fff2ee}
.gv-protect .seen,.gv-cases .pass{border-color:#cbe4d9;background:#ecf7f2}
.gv-protect .waiting,.gv-cases .waiting{opacity:.7}
.gv-frame-notice{display:flex;align-items:center;gap:9px;background:#fff4e6;border:1px solid #edd7b7;border-radius:8px;padding:10px;font-size:13px}
.gv-frame-notice p{margin:.2rem 0 0}
.gv-frames>div.now{border-color:#a9a7d8;background:#f0effb}
.gv-frames code,.gv-logic pre{font-family:ui-monospace,Consolas,monospace;overflow-wrap:anywhere}
.gv-frames code{font-size:13px;color:#243f58}
.gv-logic{margin:3px 0 9px;padding:9px;background:#f6f7fb;border:1px solid #e0e4f1;border-radius:8px}
.gv-logic h3{font-size:14px}
.gv-logic-blocks{margin-top:6px}
.gv-logic-slot .btn{cursor:grab}
.gv-logic-slot .btn[aria-pressed=true]{border-color:#aaa8d8;background:#eeebfa;color:#484786}
.gv-logic pre{white-space:pre-wrap;margin:7px 0 0;padding:8px;background:#ebf1f7;border-radius:6px;font-size:12px;color:#1e425d}
.gv-cases{display:grid;gap:5px}
.gv-cases>div{display:grid;grid-template-columns:27px minmax(110px,1fr) auto;align-items:center;gap:7px;border:1px solid #dce7ec;border-radius:7px;padding:6px 8px;background:#f4f8fa;font-size:13px}
.gv-cases small{display:block;font-size:11px;color:#537184}
.gv-cases strong{font-size:12px}
@media(max-width:950px){.gv-layout{grid-template-columns:minmax(0,1fr) minmax(236px,280px);gap:10px}.gv-steps button{padding-inline:7px}}
@media(max-width:750px){
  .gv-layout{grid-template-columns:minmax(0,1fr)}
  .gv-main,.gv-side{display:contents}
  .gv-stage{order:1}.gv-controls{order:2}.gv-data{order:3}.gv-ai{order:4}.gv-evidence{order:5}
  .gv-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .gv-inspector{flex-wrap:wrap}
  .gv-inspector .flow{justify-content:flex-start}
}
@media(max-width:435px){.gv-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.gv-canvas{min-width:515px}.gv-stage-head{gap:5px}.gv-stage-head #gv-phase .badge{font-size:10px}}
@media(prefers-reduced-motion:reduce){.gv-pulse,.gv-rotor.rotating{animation:none}.gv-bar-track i{transition:none}}
