/* Physical signal endpoints follow the existing V06 model, independently of PI state. */
html body.lab-layout-v14 .lab-stage{position:relative;isolation:isolate}
html body.lab-layout-v14 .v14-component-frame{top:25px;bottom:30px;height:calc(100% - 55px)}
.physical-wires{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none;overflow:hidden}
.physical-wires .wire{fill:none;stroke:#285e92;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;marker-end:url(#physical-command-arrow)}
.physical-wires .feedback{stroke:#687b89;stroke-dasharray:5 4;marker-end:url(#physical-feedback-arrow)}
.physical-wires .fuel-delivery{stroke:#b47b43;marker-end:url(#physical-fuel-arrow)}
.physical-wires .port{fill:white;stroke:#285e92;stroke-width:1.7}
.physical-wires .feedback-port{stroke:#687b89}
.physical-wires .fuel-port{stroke:#b47b43}
.physical-wires .wire-caption{font:14px 'Course Han','Times New Roman',serif;fill:#354a59;paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round}
.physical-wires .device-caption{font:12px 'Course Han','Times New Roman',serif;fill:#69747b;paint-order:stroke;stroke:#f6f7f6;stroke-width:4px;stroke-linejoin:round}
.physical-wires .wire-pulse{fill:#285e92}
.physical-wires .fuel-pulse{fill:#b47b43}
html body.lab-layout-v14 .v14-component-heading>span{display:none}
html body.lab-layout-v14 .v14-component-reading small{display:none}
html body.lab-layout-v14 .v14-fadec-logic{max-height:165px}
@media(prefers-reduced-motion:reduce){.physical-wires .wire-pulse{display:none}}
@media(max-width:700px){.physical-wires{display:none}html body.lab-layout-v14 .v14-component-frame{top:0;bottom:0;height:100%}}

@media(min-width:701px){
 html body.lab-layout-v14 .lab-main{grid-template-rows:auto minmax(0,1fr) 165px 18px!important}
 html body.lab-layout-v14 .lab-stage,html body.lab-layout-v14 .lab-stage.overview{grid-template-columns:minmax(0,1fr) minmax(330px,1.3fr) minmax(0,1fr)!important;column-gap:12px;padding-top:25px;box-sizing:border-box}
 html body.lab-layout-v14 .scene-panel{grid-column:1;grid-row:1}
 html body.lab-layout-v14 .fadec-panel{grid-column:2;grid-row:1}
 html body.lab-layout-v14 .v14-fan-panel{grid-column:3;grid-row:1}
 html body.lab-layout-v14 .v14-energy-strip{grid-column:1/-1;grid-row:2}
 .physical-wires .wire-caption{font-size:13px}
}

/* User-confirmed personal-site style: gold borders and brown mathematical labels. */
html body.lab-layout-v14 .v14-control-lines path{stroke:#72502f;stroke-width:2.2}
html body.lab-layout-v14 .v14-control-lines .v14-feedback-lines{stroke:#a48761;stroke-width:1.9;stroke-dasharray:5 4}
html body.lab-layout-v14 #v14-loop-arr path{fill:#72502f}
html body.lab-layout-v14 .v14-control-boxes rect{fill:#fffcf5;stroke:#c69a3c;stroke-width:2;rx:2px}
html body.lab-layout-v14 .v14-fadec-logic[data-selected="engine"] .v14-control-boxes rect:first-child,
html body.lab-layout-v14 .v14-fadec-logic[data-selected="fan"] .v14-control-boxes rect:last-child{fill:#fff4d8;stroke:#c69a3c;stroke-width:2.5}
html body.lab-layout-v14 .v14-control-boxes rect:nth-child(2){fill:#fdf7e8;stroke:#c9982e;stroke-width:1.7}
html body.lab-layout-v14 .v14-control-sums circle{fill:#fffcf5;stroke:#c69a3c;stroke-width:2}
html body.lab-layout-v14 .v14-signs text{fill:#6b4927}
html body.lab-layout-v14 .v14-error-node{fill:#72502f}
html body.lab-layout-v14 .v14-wire-label{color:#6b4927!important}
.physical-wires .wire{stroke:#72502f;stroke-width:1.8}
.physical-wires .feedback{stroke:#a48761;stroke-width:1.7}
.physical-wires .fuel-delivery{stroke:#b47b43}
.physical-wires .wire-caption{fill:#6b4927}
@media(min-width:701px){
 html body.lab-layout-v14 .fadec-panel{gap:2px!important;padding-top:5px!important;padding-bottom:5px!important}
 html body.lab-layout-v14 .v14-fadec-logic{margin-top:20px;min-height:130px;max-height:160px}
 html body.lab-layout-v14 .pi-equation{line-height:1.2!important;margin:3px 0!important}
 html body.lab-layout-v14 .pi-field input[type=number]{min-height:28px!important;height:28px!important;padding:2px 5px!important}
}

html body.lab-layout-v14 .fadec-heading h2{color:#6b4927!important}

.physical-wires .wire-pulse{fill:#72502f}
.physical-wires .fuel-pulse{fill:#b47b43}
.physical-wires .port{stroke:#c69a3c}
.physical-wires .feedback-port{stroke:#a48761}

/* A single bounded FADEC, with three equally spaced software modules. */
html body.lab-layout-v14 .fadec-panel{border:1.5px solid #c69a3c!important;border-radius:9px;background:#fffefb!important}
html body.lab-layout-v14 .v14-control-boxes rect,
html body.lab-layout-v14 .v14-control-boxes rect:nth-child(2){stroke:#bd8e2d;stroke-width:2.5;fill:#fffcf5}
html body.lab-layout-v14 .v14-fadec-logic{border:1px solid #ddcba3;border-radius:6px;background:#fff;padding:8px;box-sizing:border-box}
html body.lab-layout-v14 .playback-controls[hidden]{display:none!important}
html body.lab-layout-v14 #view-description{display:none!important}
html body.lab-layout-v14 .v14-task-select{font-size:14px!important;margin-right:4px!important}
html body.lab-layout-v14 .v14-task-select select{font-size:14px!important;min-width:108px}
html body.lab-layout-v14 .v14-trial-menu-panel .conditions-row{display:flex!important;gap:6px;padding:6px 2px;flex-wrap:wrap}
html body.lab-layout-v14 .lab-statusline{gap:12px;justify-content:flex-start}
html body.lab-layout-v14 .lab-statusline>button{margin-left:auto}
html body.lab-layout-v14 #curve-clock{white-space:nowrap;color:#6b747c}
html body.lab-layout-v14 .v14-energy-strip{display:none}
@media(min-width:701px){
 html body.lab-layout-v14 .lab-stage,html body.lab-layout-v14 .lab-stage.overview{column-gap:16px;grid-template-rows:minmax(0,1fr)!important}
 html body.lab-layout-v14 .scene-panel,html body.lab-layout-v14 .v14-fan-panel{border:1px solid #d8d3c9;border-radius:9px}
 html body.lab-layout-v14 .v14-fadec-logic{min-height:170px;max-height:190px;margin-top:20px}
 html body.lab-layout-v14 .pi-tabs{margin-top:17px!important}
 html body.lab-layout-v14 .lab-heading{min-height:38px}
}

html body.lab-layout-v14 #fadec-panel{border:1.5px solid #c69a3c!important;background:#fffefb!important}

/* Discrete tuning, clear selection and more room for the measured responses. */
html body.lab-layout-v14 #fadec-panel .pi-tabs button[aria-selected="true"]{background:#fff0c8!important;border:1.5px solid #b38329!important;color:#6b4927!important;box-shadow:inset 0 -3px #b38329!important;font-weight:600}
html body.lab-layout-v14 #fadec-panel .pi-tabs button[aria-selected="false"]{background:white!important;border:1px solid #ded8cb!important;color:#7b776f!important;box-shadow:none!important}
html body.lab-layout-v14 .pi-field input[type=range]{background:repeating-linear-gradient(90deg,#bfae89 0 1px,transparent 1px 20%) center bottom/100% 5px no-repeat;padding-bottom:6px}
html body.lab-layout-v14 .plot-summary,html body.lab-layout-v14 .lab-statusline{display:none!important}
html body.lab-layout-v14 .lab-plots .plot-panel{grid-template-rows:auto minmax(0,1fr)!important}
html body.lab-layout-v14 .lab-plots .plot-heading h2 .katex{font-size:1em}
@media(min-width:701px){
 html body.lab-layout-v14 .lab-main{grid-template-rows:auto minmax(0,1fr) 195px 0!important;row-gap:9px!important}
 html body.lab-layout-v14 .lab-stage,html body.lab-layout-v14 .lab-stage.overview{grid-template-columns:minmax(0,1.15fr) minmax(330px,1.3fr) minmax(0,.85fr)!important;padding:25px 12px 12px;column-gap:18px}
}

@media(min-width:701px){html body.lab-layout-v14 .v14-fadec-logic{min-height:150px;max-height:155px;margin-top:16px}html body.lab-layout-v14 .pi-tabs{margin-top:10px!important}}

/* Conventional controller -> plant layout; both plants stay on the right. */
html body.lab-layout-v14 .v14-structure-toolbar,html body.lab-layout-v14 .v14-task-select{display:none!important}
html body.lab-layout-v14 .lab-actions>.conditions-row{display:flex!important;gap:7px;align-items:center;margin:0;border:0;padding:0}
html body.lab-layout-v14 .lab-actions>.conditions-row label{font-size:14px;white-space:nowrap}
html body.lab-layout-v14 .lab-actions>.conditions-row button[hidden]{display:none!important}
html body.lab-layout-v14 .v21-scenario{font-size:13px;color:#6b4927;line-height:1.4;margin:2px 0}
html body.lab-layout-v14 #v21-defaults{border-top:1px solid #dccda8;padding-top:6px;margin-top:4px;font-size:13px;color:#6b4927}
.default-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
html body.lab-layout-v14 #v21-defaults button{background:transparent!important;border:0!important;box-shadow:none!important;min-height:23px!important;padding:1px 4px!important;font-size:12px!important;color:#856027!important}
.default-values{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-family:'Times New Roman','Course Han',serif;font-size:13px;line-height:1.8}
html body.lab-layout-v14 #v21-fan-target{display:block!important;font-size:12px;white-space:nowrap;color:#6b747c}
@media(min-width:701px){
 html body.lab-layout-v14 .lab-stage,html body.lab-layout-v14 .lab-stage.overview{grid-template-columns:minmax(360px,1fr) minmax(0,1.05fr)!important;grid-template-rows:minmax(0,1.05fr) minmax(0,1fr)!important;padding:10px 12px;column-gap:18px;row-gap:12px}
 html body.lab-layout-v14 #fadec-panel{grid-column:1;grid-row:1/3;padding:8px 10px!important;gap:2px!important}
 html body.lab-layout-v14 .scene-panel{grid-column:2;grid-row:1;grid-template-rows:29px minmax(0,1fr) 25px!important}
 html body.lab-layout-v14 .v14-fan-panel{grid-column:2;grid-row:2;grid-template-rows:29px minmax(0,1fr) 25px!important}
 html body.lab-layout-v14 .v14-component-frame{top:2px;bottom:2px;height:calc(100% - 4px)}
 html body.lab-layout-v14 .v14-component-reading{font-size:13px}
 html body.lab-layout-v14 .v14-component-reading strong{font-size:14px}
 html body.lab-layout-v14 .v14-fadec-logic{margin-top:0;min-height:115px;max-height:140px}
 html body.lab-layout-v14 .pi-tabs{margin-top:5px!important}
 html body.lab-layout-v14 .pi-tabs button{min-height:29px!important;height:29px!important;padding:2px 8px!important}
 html body.lab-layout-v14 .pi-equation{font-size:15px!important;margin:1px 0!important}
 html body.lab-layout-v14 .pi-field{min-height:24px}
 html body.lab-layout-v14 .pi-field input[type=number]{min-height:24px!important;height:24px!important}
}

html body.lab-layout-v14 #fadec-panel .fadec-heading{display:flex;justify-content:space-between;align-items:center;min-height:26px;height:26px}
html body.lab-layout-v14 #fadec-panel .fadec-heading .pi-equation{font-size:14px!important;margin:0!important;line-height:1!important}
html body.lab-layout-v14 .v14-fan-panel .v14-component-reading:before{content:'当前';font-size:12px;color:#6b747c;margin-right:2px}
@media(min-width:701px){html body.lab-layout-v14 .v14-fadec-logic{min-height:140px;max-height:150px}}
html body.lab-layout-v14 #lab-stage>.scene-panel,html body.lab-layout-v14 #lab-stage>.v14-fan-panel{border-color:#c9baa0!important}


html body.lab-layout-v14 #v21-defaults .default-tip{font-size:12px!important;line-height:1.4!important;margin:0;color:#7a7164}

html body.lab-layout-v14 #fadec-panel{overflow:clip!important}
html body.lab-layout-v14 #v21-defaults .default-heading{height:20px}
html body.lab-layout-v14 #v21-defaults .default-heading strong{font-size:13px!important;line-height:18px}
html body.lab-layout-v14 #v21-defaults button{min-height:20px!important;height:20px!important}
html body.lab-layout-v14 #v21-defaults .default-values span{font-size:13px!important;line-height:18px!important}
html body.lab-layout-v14 #v21-scenario{font-size:13px!important;line-height:18px!important}
@media(min-width:701px){html body.lab-layout-v14 .v14-fadec-logic{min-height:125px;max-height:140px}html body.lab-layout-v14 #fadec-panel .pi-tabs{height:30px!important;min-height:30px!important}html body.lab-layout-v14 #fadec-panel .pi-tabs button{height:28px!important;min-height:28px!important}}

/* Let the diagram absorb available height; keep tuning and defaults near the bottom. */
@media(min-width:701px){
 html body.lab-layout-v14 #fadec-panel{row-gap:clamp(2px,.5vh,6px)!important}
 html body.lab-layout-v14 #fadec-panel .v14-fadec-logic{flex:1 1 0!important;min-height:110px!important;max-height:none!important;margin:0!important}
 html body.lab-layout-v14 #fadec-panel>.fadec-heading,
 html body.lab-layout-v14 #fadec-panel>.pi-tabs,
 html body.lab-layout-v14 #fadec-panel>.v21-scenario,
 html body.lab-layout-v14 #fadec-panel>.pi-field,
 html body.lab-layout-v14 #fadec-panel>#v21-defaults{flex-shrink:0}
 html body.lab-layout-v14 #fadec-panel>.pi-tabs{margin-top:clamp(6px,1vh,14px)!important}
 html body.lab-layout-v14 #fadec-panel>#v21-defaults{margin-top:clamp(5px,.8vh,12px)!important;padding-bottom:3px}
}
