.sld-page{max-width:1800px;margin:auto;padding:25px 30px}.sld-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.sld-heading h1{margin:3px 0 8px}.sld-heading p{max-width:850px;color:#627681}.sld-layout{display:grid;grid-template-columns:330px minmax(0,1fr);gap:22px;margin-top:20px}.sld-sidebar{display:flex;flex-direction:column;gap:14px}.sld-sidebar .card{padding:18px}.sld-station{padding:12px 0;border-bottom:1px solid #dae2e4}.sld-station strong,.sld-station small{display:block;margin-bottom:7px}.sld-station small{color:#60717c}.sld-station button{font-size:12px;margin:3px 4px 3px 0}.sld-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:12px}.sld-toolbar select{width:auto;max-width:400px}.sld-paper{background:#dbe2e5;border:1px solid #c4d1d7;padding:16px;overflow:auto;min-height:480px}.sld-paper svg{display:block;background:white;width:100%;height:auto;box-shadow:0 3px 15px #23334022}.sld-issues{max-height:220px;overflow:auto;font-size:12px;margin:12px 0}.sld-issues p{padding:6px 0;border-bottom:1px solid #eee;margin:0}.sld-status{background:#e8f1f0;padding:12px;border-radius:6px;margin-top:14px}.sld-dialog{width:min(97vw,1760px);max-width:1760px;max-height:96vh;padding:20px}.sld-dialog h2{margin:0 0 12px}.sld-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 295px;gap:16px}.sld-editor-grid aside{max-height:65vh;overflow:auto;padding:10px;background:#f4f7f8}.sld-editor-grid svg{width:100%;height:auto;min-height:320px;background:#fff;border:1px solid #bac9d0;touch-action:none}.sld-editor-grid .sld-selected{stroke:#008c78!important;stroke-width:3!important}.sld-editor-grid svg [data-device]{cursor:move}.sld-editor-grid svg [data-terminal]{cursor:crosshair}.sld-editor-grid textarea{font-size:12px;min-height:100px;resize:vertical}.sld-dialog label{font-size:12px}.sld-dialog .button-row{margin-top:12px}.sld-meta{display:grid;grid-template-columns:1fr 2fr;gap:15px;margin-bottom:12px}.sld-portmap{display:grid;grid-template-columns:130px 1fr;align-items:center;gap:8px}.sld-portmap select{font-size:12px;max-width:100%}.sld-error{color:#b4342d;white-space:pre-wrap;min-height:20px}.sld-item{border-bottom:1px solid #d6e1e5;padding:10px 0}.sld-item small{display:block;word-break:break-word}.sld-editor-tip{font-size:12px;color:#536978;margin:4px 0 10px}.sld-dialog footer{display:flex;justify-content:space-between;gap:12px;margin-top:10px}.sld-toolbar button.active{background:#006e5a;color:white}.sld-badge{font-size:11px;background:#fbefda;color:#7e5617;padding:4px 7px;border-radius:4px}.sld-dialog .sld-small{max-width:700px}.sld-dialog details{margin:12px 0}.sld-dialog summary{cursor:pointer;font-weight:600}.sld-dialog select,.sld-dialog input,.sld-dialog textarea{width:100%}.sld-dialog button{white-space:normal}.sld-zoom{width:100px!important}.sld-paper.zoomed svg{max-width:none;width:1600px}.sld-loading{padding:60px;color:#586f7e;text-align:center}@media(max-width:1000px){.sld-layout{grid-template-columns:1fr}.sld-sidebar{display:grid;grid-template-columns:1fr 1fr}.sld-editor-grid{grid-template-columns:1fr}.sld-editor-grid aside{max-height:350px}.sld-meta{grid-template-columns:1fr}.sld-page{padding:15px}.sld-heading{align-items:flex-start;flex-direction:column}}@media(max-width:640px){.sld-sidebar{display:block}.sld-sidebar .card{margin-bottom:12px}.sld-toolbar select{max-width:100%}.sld-heading .button-row{flex-wrap:wrap}}
.ms-dialog{width:98vw;max-width:1920px}.ms-top{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.ms-dialog .sld-toolbar{background:#eef4f4;padding:10px;border-radius:8px;align-items:flex-end}.ms-dialog .sld-toolbar label{display:flex;flex-direction:column;gap:4px}.ms-dialog .sld-toolbar select{max-width:180px}.ms-controls{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:8px 0;color:#536978;font-size:12px}.ms-controls label{display:flex;align-items:center;gap:6px}.ms-controls input[type=checkbox],.ms-dialog input[type=checkbox]{width:auto}.ms-controls select{width:115px}.ms-workspace{display:grid;grid-template-columns:180px minmax(300px,1fr) 290px;gap:12px;height:59vh;min-height:430px}.ms-workspace>nav,.ms-workspace>aside{overflow:auto;background:#f4f7f8;border:1px solid #d3dfe3;border-radius:7px;padding:10px}.ms-workspace>nav button{display:block;text-align:left;width:100%;font-size:12px;margin:3px 0;background:white;border:1px solid #d5e0e3}.ms-workspace>nav button.active{background:#d9eee8;border-color:#008873}.ms-workspace>nav small{display:block;font-size:10px;color:#617b87;margin-top:2px}.ms-workspace aside label{display:block;margin:10px 0}.ms-workspace aside h3{margin:0 0 8px}.ms-workspace aside p{font-size:12px;white-space:pre-wrap}.ms-workspace aside button{margin:4px 3px 4px 0;font-size:12px}.ms-workspace textarea{font-size:11px;min-height:80px}.ms-scroll{overflow:auto;border:1px solid #afc2c9;border-radius:7px;background:#fff}.ms-scroll svg{display:block;min-height:250px;touch-action:none;user-select:none;background:#fff}.ms-scroll svg:focus-visible{outline:2px solid #008873;outline-offset:-2px}.ms-scroll [data-ms-assembly],.ms-scroll [data-ms-device]{cursor:move}.ms-scroll [data-ms-field]{cursor:pointer}.ms-scroll [data-ms-port]{cursor:crosshair}.ms-scroll [data-ms-port]:hover .ms-port-mark{stroke:#008873;stroke-width:2}.ms-busy{cursor:progress}.ms-busy #ms-inspector{opacity:.7;pointer-events:none}.ms-change{max-width:1100px}.ms-change-preview{max-height:40vh;overflow:auto;background:#f8fbfb;border:1px solid #c9d9de}.ms-change-preview svg{width:100%;min-height:250px}.ms-conflicts label{display:block;margin:10px 0}.ms-change footer{display:flex;justify-content:space-between}.ms-dialog .sld-meta{margin-bottom:8px}.ms-dialog .sld-meta input{padding:7px}.ms-dialog .sld-error{margin:8px 0}.ms-dialog .sld-portmap{max-height:220px;overflow:auto}@media(max-width:1100px){.ms-workspace{grid-template-columns:140px minmax(250px,1fr);height:65vh}.ms-workspace>aside{grid-column:1/-1;max-height:280px}.ms-top{flex-wrap:wrap}}@media(max-width:640px){.ms-workspace{display:flex;flex-direction:column;height:auto}.ms-workspace>nav{max-height:140px}.ms-scroll{height:420px}.ms-workspace>aside{max-height:400px}.ms-controls{gap:8px}.ms-top{display:block}}

/* SPEC-005: full-page editors and previews, with only panels scrolling. */
#station-editor-view,#sld-view{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.station-editor-page{display:flex;flex-direction:column;flex:1;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:#fff;color:#263d36}
.station-editor-header{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 10px;border-bottom:1px solid var(--line);flex:none;background:#f9fbfa}
.station-editor-header h1,.station-editor-header h2{font-size:15px;font-weight:600;line-height:1.3;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.station-editor-header>h1,.station-editor-header>h2{flex:1}
.station-editor-header>div:first-of-type{min-width:0}
.station-editor-header button{white-space:nowrap;flex:none;min-height:30px}
.station-editor-header .button-row{margin:0;flex-wrap:nowrap;gap:5px}
.ms-navigation{display:flex;align-items:center;gap:4px;margin-left:auto;flex:none;white-space:nowrap}
.ms-navigation button{font-size:11px;min-width:30px;padding:4px 7px}
.ms-navigation select{width:92px;max-width:110px;font-size:11px}
.ms-navigation label{display:flex;gap:4px;align-items:center;margin:0;font-size:11px}
.ms-navigation input[type=checkbox]{width:auto}
.station-editor-toolbar.sld-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:nowrap;flex:none;min-height:40px;padding:4px 10px;margin:0;border-bottom:1px solid var(--line);background:#f1f5f3;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.station-editor-toolbar>*{flex:none}
.station-editor-toolbar button{white-space:nowrap;min-height:30px;font-size:12px;padding:4px 8px}
.station-editor-toolbar label{display:flex;align-items:center;gap:5px;margin:0;font-size:11px}
.station-editor-toolbar select{width:auto;min-width:80px;max-width:160px;margin:0;font-size:12px;min-height:30px}
.station-editor-toolbar input[type=checkbox]{width:auto;min-height:0;margin:0}
.station-editor-toolbar button.active,.ms-navigation button.active,.ms-navigation button[aria-pressed=true]{color:#fff;background:#176b58;border-color:#176b58}
.station-editor-page .ms-workspace{display:grid;grid-template-columns:172px minmax(0,1fr) 264px;gap:0;flex:1;height:auto;min-height:0;min-width:0;position:relative;overflow:hidden}
.station-editor-page .ms-workspace>nav,.station-editor-page .ms-workspace>aside{max-height:none;min-width:0;min-height:0;overflow:auto;border:0;border-radius:0;background:#f7faf8;padding:9px;grid-column:auto;scrollbar-width:thin}
.station-editor-page .ms-workspace>nav{border-right:1px solid var(--line)}
.station-editor-page .ms-workspace>aside{border-left:1px solid var(--line)}
.station-editor-page .ms-workspace>nav button{border:0;border-radius:4px;padding-top:5px;padding-right:5px;padding-bottom:5px;min-height:30px;margin:1px 0;background:transparent;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
.station-editor-page .ms-workspace>nav button:hover{background:#e9f1ec}
.station-editor-page .ms-workspace>nav button.active{background:#dfede5;color:#155b43;box-shadow:inset 2px 0 #26755b}
.station-editor-page .ms-workspace>nav small{font-size:11px;line-height:1.3;color:#657a6e;margin-top:2px}
.station-editor-page .ms-workspace aside label{font-size:11px;margin:8px 0;line-height:1.4}
.station-editor-page .ms-workspace aside label input,.station-editor-page .ms-workspace aside label select{margin-top:3px}
.station-editor-page .ms-workspace aside p{font-size:12px;line-height:1.5;margin:8px 0}
.station-editor-page .ms-workspace aside h3{font-size:13px;margin:2px 0 10px}
.station-editor-page .ms-workspace aside button{font-size:11px;min-height:28px;padding:4px 7px;margin:3px 3px 3px 0}
.station-editor-page .ms-workspace textarea{font-size:12px;min-height:74px;resize:vertical}
.station-editor-page .ms-scroll{height:auto;min-height:0;min-width:0;overflow:hidden;border:0;border-radius:0;background:#fff;position:relative;isolation:isolate}
.station-editor-page .ms-scroll svg{display:block;width:100%;height:100%;min-height:0;max-width:none;touch-action:none;user-select:none;background:#fff}
.station-editor-page .ms-scroll:focus-within{box-shadow:inset 0 0 0 2px #26755b}
.station-editor-page.ms-tree-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr) 264px}
.station-editor-page.ms-tree-collapsed #ms-tree{display:none}
.station-editor-page.ms-inspector-collapsed .ms-workspace{grid-template-columns:172px minmax(0,1fr)}
.station-editor-page.ms-inspector-collapsed .ms-inspector-panel{display:none}
.station-editor-page.ms-tree-collapsed.ms-inspector-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr)}
.ms-inspector-panel>details{margin:0 0 10px;border-bottom:1px solid #dce5df;padding:0 0 8px;font-size:12px}
.ms-inspector-panel>details>summary{padding:4px 0;font-size:12px;font-weight:600;cursor:pointer;line-height:1.4;color:#355b49}
.ms-inspector-panel #ms-inspector{padding:3px 0 10px;font-size:12px}
.ms-inspector-panel .sld-portmap{grid-template-columns:minmax(65px,.8fr) minmax(0,1.2fr);gap:6px;font-size:11px}
.ms-inspector-panel .sld-portmap select{padding:5px 4px;font-size:11px;min-width:0}
.ms-inspector-panel #ms-ports:has(.ms-port-row){display:block}
.ms-inspector-panel .ms-port-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;padding:7px 0;border-bottom:1px solid var(--line)}
.ms-inspector-panel .ms-port-row>span,.ms-inspector-panel .ms-port-row>strong{min-width:0;overflow-wrap:anywhere}
.ms-inspector-panel .ms-port-row>label{grid-column:1/-1;margin:2px 0}
.ms-inspector-panel .ms-port-row>small{font-size:11px;align-self:center}
.ms-inspector-panel .ms-port-row select{grid-column:1/-1;width:100%}
.ms-inspector-panel .ms-port-row button{font-size:11px;padding:2px 5px;min-height:26px;margin:0}
.ms-inspector-panel #ms-issues{font-size:11px;line-height:1.5}
.station-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;min-height:26px;padding:3px 10px;border-top:1px solid var(--line);background:#f4f8f5;font-size:11px;color:#5b7265;line-height:18px}
.station-editor-footer #ms-mode{margin:0;min-width:0;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.station-editor-footer .sld-error{min-height:0;margin:0;font-size:11px;line-height:1.4;max-height:36px;overflow:auto}
.station-editor-footer .sld-error:empty{display:none}
.station-editor-footer .sld-badge{flex:none;white-space:nowrap;font-size:11px;padding:1px 6px;line-height:18px}
.station-editor-footer .ms-controls{padding:0;font-size:11px;gap:7px}

/* Project SLD remains a composed output, with its own camera and context rail. */
#sld-view .sld-page{max-width:none;display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;width:100%;margin:0;padding:0;overflow:hidden}
#sld-view .sld-heading{min-height:48px;flex:none;gap:10px;padding:6px 12px;border-bottom:1px solid var(--line);background:#f9fbfa}
#sld-view .sld-heading h1{font-size:18px;line-height:1.2;margin:0 0 2px;letter-spacing:-.2px}
#sld-view .sld-heading .eyebrow{font-size:10px;letter-spacing:.5px}
#sld-view .sld-heading p{font-size:11px;line-height:1.4;margin:3px 0 0;max-width:1000px}
#sld-view .sld-heading .button-row{flex:none;flex-wrap:nowrap;margin:0}
#sld-view .sld-heading button{white-space:nowrap}
#sld-view .sld-heading>div:first-child{display:flex;align-items:baseline;gap:12px;min-width:0}
#sld-view .sld-heading .eyebrow{display:none}
#sld-view .sld-heading h1{flex:none;margin:0}
#sld-view .sld-heading p{margin:0}
#sld-view .sld-layout{display:grid;grid-template-columns:248px minmax(0,1fr);gap:0;flex:1;min-width:0;min-height:0;margin:0;overflow:hidden}
#sld-view .sld-sidebar{display:flex;flex-direction:column;gap:0;min-height:0;overflow:auto;background:#f7faf8;border-right:1px solid var(--line);padding:10px;scrollbar-width:thin}
#sld-view .sld-sidebar .card{border:0;border-radius:0;padding:0 0 12px;background:transparent;border-bottom:1px solid var(--line);margin:0 0 12px}
#sld-view .sld-sidebar .card:last-child{border:0;margin-bottom:0}
#sld-view .sld-sidebar h2{font-size:13px;margin:0 0 8px}
#sld-view .sld-sidebar p{font-size:11px;line-height:1.5;margin:6px 0}
#sld-view .sld-sidebar button{font-size:11px;min-height:28px;padding:4px 6px}
#sld-view .sld-sidebar .button-row{gap:4px;margin:8px 0}
#sld-view .sld-station{padding:8px 0;font-size:12px}
#sld-view .sld-station small{font-size:11px;line-height:1.4;margin-bottom:4px}
#sld-view .sld-station strong{margin-bottom:4px}
#sld-view .sld-station button{margin:2px 3px 2px 0}
#sld-view .sld-layout>section{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}
#sld-view .sld-toolbar{display:flex;flex-wrap:nowrap;gap:5px;align-items:center;flex:none;min-height:40px;padding:4px 10px;margin:0;border-bottom:1px solid var(--line);background:#f1f5f3;overflow-x:auto;scrollbar-width:thin}
#sld-view .sld-toolbar button{flex:none;white-space:nowrap}
#sld-view .sld-toolbar select{min-width:120px;max-width:380px;flex:1;font-size:12px}
#sld-view #sld-paper{flex:1;min-height:0;min-width:0;padding:0;border:0;overflow:hidden;background:#eaf0ed;position:relative}
#sld-view #sld-paper svg{width:100%;height:100%;max-width:none;display:block;box-shadow:none;touch-action:none;user-select:none}
#sld-view .sld-status{flex:none;min-height:25px;font-size:11px;line-height:17px;padding:4px 10px;margin:0;border-radius:0;background:#eef4f0;border-top:1px solid var(--line)}
#sld-view .sld-layout>section>details{flex:none;padding:5px 10px;font-size:11px;border-top:1px solid var(--line);background:#fff}
#sld-view .sld-layout>section>details summary{cursor:pointer;line-height:17px}
#sld-view .sld-issues{max-height:160px;margin:6px 0 0;font-size:11px}
#sld-view.sld-sidebar-collapsed .sld-layout,#sld-view .sld-page.sld-sidebar-collapsed .sld-layout{grid-template-columns:minmax(0,1fr)}
#sld-view.sld-sidebar-collapsed .sld-sidebar,#sld-view .sld-page.sld-sidebar-collapsed .sld-sidebar{display:none}
.sld-paper[data-pan=true],.ms-scroll[data-pan=true]{cursor:grab}
.sld-paper[data-panning=true],.ms-scroll[data-panning=true]{cursor:grabbing}
.ms-scroll svg.hand-mode,.ms-scroll svg.space-pan,.sld-paper svg.hand-mode,.sld-paper svg.space-pan{cursor:grab}
.ms-scroll svg.is-panning,.sld-paper svg.is-panning{cursor:grabbing}
.ms-scroll svg.hand-mode *,.ms-scroll svg.space-pan *,.ms-scroll svg.is-panning *{cursor:inherit!important}

@media(max-width:1100px){
 .station-editor-header{gap:5px;padding-left:8px;padding-right:8px}.station-editor-header h1,.station-editor-header h2{font-size:14px}
 .ms-navigation{gap:3px}.ms-navigation button{padding:4px 5px;font-size:11px}
 #sld-view .sld-heading{align-items:center;flex-direction:row}#sld-view .sld-heading p{display:none}
 #sld-view .sld-sidebar{display:flex}#sld-view .sld-layout{grid-template-columns:224px minmax(0,1fr)}
}
@media(max-width:900px){
 .station-editor-header{flex-wrap:wrap}.station-editor-header .ms-navigation{margin-left:auto}
 .station-editor-page .ms-workspace,.station-editor-page.ms-tree-collapsed .ms-workspace,.station-editor-page.ms-inspector-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr)}
 .station-editor-page .ms-workspace>#ms-tree{position:absolute;left:0;top:0;bottom:0;width:172px;z-index:3;box-shadow:3px 0 12px #21392d1a}
 .station-editor-page .ms-workspace>.ms-inspector-panel{position:absolute;right:0;top:0;bottom:0;width:264px;z-index:3;box-shadow:-3px 0 12px #21392d1a}
 #sld-view .sld-layout{grid-template-columns:210px minmax(0,1fr)}
}
@media(max-width:640px){
 .station-editor-header{min-height:40px;row-gap:4px}.station-editor-header h1,.station-editor-header h2{max-width:calc(100vw - 150px)}
 .station-editor-header>.ms-navigation{width:100%;overflow:auto;margin:0;padding:0 0 2px}
 .station-editor-header button{font-size:11px;padding:4px 6px}
 .station-editor-toolbar.sld-toolbar{padding:4px 7px;min-height:38px}
 .station-editor-toolbar button,.station-editor-toolbar select{font-size:11px}
 .station-editor-footer{padding:3px 7px;gap:5px}.station-editor-footer #ms-mode{max-width:58vw}
 #sld-view .sld-heading{gap:6px;padding:6px 8px}#sld-view .sld-heading h1{font-size:15px}
 #sld-view .sld-heading .eyebrow{display:none}#sld-view .sld-heading button{font-size:11px;padding:4px 6px}
 #sld-view .sld-layout{grid-template-columns:minmax(0,1fr);position:relative}
 #sld-view .sld-sidebar{position:absolute;left:0;top:0;bottom:0;z-index:3;width:230px;box-shadow:3px 0 12px #21392d1a}
 #sld-view .sld-toolbar{padding:4px 7px}#sld-view .sld-status{font-size:11px;white-space:nowrap;overflow:auto}
}
@media print{
 #station-editor-view,#sld-view{display:block;overflow:visible;height:auto}
 .station-editor-header,.station-editor-toolbar,.station-editor-footer,.station-editor-page .ms-workspace>nav,.station-editor-page .ms-workspace>aside{display:none!important}
 .station-editor-page .ms-workspace{display:block;height:90vh}
 #sld-view .sld-page,#sld-view .sld-layout,#sld-view .sld-layout>section{display:block;overflow:visible}
 #sld-view .sld-heading,#sld-view .sld-sidebar,#sld-view .sld-toolbar,#sld-view .sld-status,#sld-view details{display:none!important}
 #sld-view #sld-paper{height:90vh}
}

/* SPEC-006: temporary configuration is a compact form with persistent actions. */
.station-editor-page.ms-configuring{--config-panel-width:400px}
.station-editor-page.ms-configuring .ms-workspace{grid-template-columns:172px minmax(0,1fr) var(--config-panel-width)}
.station-editor-page.ms-configuring.ms-tree-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr) var(--config-panel-width)}
.station-editor-page.ms-configuring.ms-inspector-collapsed .ms-workspace{grid-template-columns:172px minmax(0,1fr)}
.station-editor-page.ms-configuring.ms-tree-collapsed.ms-inspector-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr)}
.station-editor-page.ms-configuring .ms-workspace>.ms-inspector-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr) auto;overflow:hidden;padding:0}
.station-editor-page.ms-configuring.ms-inspector-collapsed .ms-inspector-panel{display:none}
.station-editor-page.ms-configuring .ms-inspector-panel>#ms-inspector{grid-column:1/-1;display:flex;flex-direction:column;flex:1;min-height:0;padding:0;overflow:hidden}
.station-editor-page.ms-configuring .ms-inspector-panel>details{flex:none;margin:0;padding:0 12px;border-bottom:1px solid var(--line);max-height:180px;overflow:auto}
.station-editor-page.ms-configuring .ms-inspector-panel>details[open]{grid-column:1/-1}
.station-editor-page.ms-configuring .ms-inspector-panel>details>summary{font-size:11px;line-height:18px;padding:4px 0}
.ms-inspector-body{flex:1;min-height:0;padding:10px 12px;overflow:auto;scrollbar-width:thin}
.ms-inspector-actions{position:sticky;bottom:0;flex:none;z-index:2;padding:6px 12px 8px;border-top:1px solid #d4dfd7;background:#f4f8f5;font-size:11px}
.ms-inspector-actions>div:last-child{display:flex;justify-content:flex-end;align-items:center;gap:6px}
.station-editor-page .ms-workspace aside .ms-inspector-actions button{min-height:30px;margin:0;padding:4px 11px;font-size:12px}
.inspector-preview-state{font-size:11px;line-height:15px;min-height:15px;margin:0 0 5px;color:#607469;overflow-wrap:anywhere}
.inspector-preview-state.error{color:#a4382c}
.ms-inspector-grid,.inspector-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 9px;align-items:start}
.ms-wide,.inspector-full{grid-column:1/-1}
.ms-conditional:not([hidden]),.ms-conditional:not([hidden])>.ms-inspector-grid{display:contents}
.station-editor-page .ms-workspace aside .ms-inspector-grid>.ms-wide>label{margin:0}
.ms-inspector-grid>.ms-wide:has(>label>#mi-indicator),.ms-inspector-grid>.ms-wide:has(>label>#mi-vdis){grid-column:auto;min-width:0}
.station-editor-page .ms-workspace aside .ms-inspector-grid>label,.station-editor-page .ms-workspace aside .inspector-grid>label{margin:0;min-width:0;font-size:11px;line-height:15px}
.station-editor-page .ms-workspace aside .ms-inspector-grid input,.station-editor-page .ms-workspace aside .ms-inspector-grid select,.station-editor-page .ms-workspace aside .inspector-grid input,.station-editor-page .ms-workspace aside .inspector-grid select{margin-top:2px;min-height:28px;padding:4px 7px;font-size:12px;line-height:18px;min-width:0;width:100%}
.station-editor-page .ms-workspace aside [aria-invalid=true]{border-color:#b84a3c;outline:1px solid #b84a3c}
.ms-option,.inspector-check{display:flex!important;align-items:center;gap:6px;min-height:29px;padding:3px 0;font-size:12px!important;line-height:17px!important;margin:0!important}
.ms-option input[type=checkbox],.inspector-check input[type=checkbox]{flex:none;width:15px!important;height:15px;min-height:0!important;margin:0!important;accent-color:#176b58}
.ms-option>span,.inspector-check>span{min-width:0;flex:1;overflow-wrap:anywhere;hyphens:auto}
.ms-option small,.inspector-check small{flex:none;font-size:11px;color:#8a641f}
.station-editor-page .ms-workspace aside .ms-option button{flex:none;min-width:24px;min-height:24px;margin:0;padding:1px 5px;font-size:11px}
.ms-inspector-body h3{font-size:14px!important;margin:0 0 8px!important}
.ms-inspector-body h4{font-size:12px;color:#355849;margin:10px 0 5px}
.ms-inspector-body>details{margin:9px 0 0;border-top:1px solid var(--line);padding-top:7px;font-size:11px}
.ms-inspector-body>details>summary{cursor:pointer;font-size:11px;font-weight:600;color:#516e5b;line-height:18px}
.ms-inspector-body>details>div{margin-top:6px}
.ms-inspector-body p{font-size:11px!important;line-height:1.4!important;margin:5px 0!important}
.ms-inspector-body textarea{min-height:60px!important;font-size:12px!important}
.ms-inspector-body .button-row{gap:4px;margin:6px 0}
.ms-inspector-body fieldset{min-width:0;border:0;border-top:1px solid var(--line);padding:6px 0 0;margin:8px 0 0}
.ms-inspector-body legend{font-size:11px;font-weight:600;color:#4d6959;padding:0 5px 0 0}
#ms-metadata:not(.ms-inspector-panel #ms-metadata){position:absolute;top:42px;right:12px;width:360px;max-width:calc(100vw - 24px);z-index:8;background:#fff;border:1px solid #bccdc2;border-radius:6px;box-shadow:0 8px 30px #213b3029;padding:12px}
.station-editor-page{position:relative}

/* Reusable NSHV configurator: groups are compact; long feeder lists scroll locally. */
.lv-config{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
.lv-config .ms-inspector-body{display:flex;flex-direction:column;overflow:hidden;padding:9px 10px 6px}
.lv-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;margin:0 0 7px;flex:none}
.lv-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.lv-heading span{font-size:11px;white-space:nowrap;color:#687d71}
.inspector-tabs{display:flex;gap:3px;padding:3px;border:1px solid #d7e3db;border-radius:5px;background:#eaf1ec;flex:none;margin-bottom:8px}
.station-editor-page .ms-workspace aside .inspector-tabs button{flex:1;margin:0;border:0;min-height:28px;padding:4px 8px;color:#536f60;font-size:12px;background:transparent}
.station-editor-page .ms-workspace aside .inspector-tabs button[aria-selected=true]{background:white;color:#185c45;box-shadow:0 1px 3px #183d2914;font-weight:600}
.lv-tab-body{min-height:0;flex:1;overflow:auto;scrollbar-width:thin;padding-right:1px}
.lv-section{margin:0 0 8px;padding:0 0 8px;border-bottom:1px solid var(--line)}
.lv-section:last-child{border-bottom:0;padding-bottom:0;margin-bottom:0}
.lv-section h4{font-size:12px;margin:0 0 5px;color:#355849}
.lv-section-title{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-bottom:4px}
.lv-section-title h4{margin:0}
.station-editor-page .ms-workspace aside .lv-section-title button{margin:0 0 0 3px;min-height:26px;padding:2px 7px;font-size:11px}
.lv-product-summary{font-size:11px!important;line-height:1.4;color:#597263;align-self:center;margin:2px 0!important;overflow-wrap:anywhere}
.lv-section>.ms-inspector-grid>.lv-product-summary.ms-wide{display:none}
.lv-groups>.lv-small{display:none}
.lv-three-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:5px}
.station-editor-page .ms-workspace aside .lv-three-columns label{font-size:11px;margin:0}
.station-editor-page .ms-workspace aside .lv-three-columns input{min-height:28px;margin-top:2px;padding:4px 6px}
.lv-copper{font-size:11px;margin-top:5px}
.lv-copper summary{cursor:pointer;color:#5b7565;line-height:19px}
.lv-group-scroll{max-height:144px;overflow:auto;scrollbar-width:thin;border:1px solid #dce5de;border-radius:4px}
.lv-group-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:11px}
.lv-group-table th{position:sticky;top:0;z-index:1;background:#edf4ef;font-size:10px;font-weight:600;color:#617869;text-align:left;padding:3px 5px;line-height:16px}
.lv-group-table td{padding:3px 4px;border-top:1px solid #e1e9e3}
.lv-group-table th:first-child{width:30%}.lv-group-table th:nth-child(2){width:22%}.lv-group-table th:nth-child(3){width:34%}.lv-group-table th:last-child{width:14%}
.station-editor-page .ms-workspace aside .lv-group-table input,.station-editor-page .ms-workspace aside .lv-group-table select{width:100%;min-width:0;min-height:27px;padding:3px 5px;font-size:12px}
.station-editor-page .ms-workspace aside .lv-group-table button{margin:0;min-width:26px;min-height:26px;font-size:16px;padding:0 5px}
.lv-small{font-size:11px!important;margin:4px 0 0!important;line-height:18px!important;color:#62776a}
.station-editor-page .ms-workspace aside button.lv-inline{display:inline;min-height:0;margin:0;border:0;background:none;text-decoration:underline;padding:0;color:#22614a;font-size:11px}
.lv-feeder-list{max-height:150px;overflow:auto;scrollbar-width:thin;border:1px solid #d8e3db;border-radius:4px;margin:0 0 8px;background:white}
.station-editor-page .ms-workspace aside .lv-feeder-list button{display:grid;grid-template-columns:minmax(0,1fr) 60px 100px;gap:6px;width:100%;min-height:28px;margin:0;padding:5px 7px;border:0;border-bottom:1px solid #e7ece8;border-radius:0;font-size:11px;text-align:left;background:white;line-height:16px}
.lv-feeder-list button strong{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lv-feeder-list button span:last-child{text-align:right}
.station-editor-page .ms-workspace aside .lv-feeder-list button.active{background:#e2efe7;color:#175d44;box-shadow:inset 2px 0 #26755b}
.lv-feeder-details h4{font-size:12px;margin:0}
.lv-config .lv-more{flex:none;margin:7px 0 0;border-top:1px solid var(--line);padding-top:5px;max-height:150px;overflow:auto;font-size:11px}
.lv-config .lv-more summary{font-size:11px;line-height:18px}
.lv-config .ms-inspector-actions{padding:5px 10px 7px}
@media(max-height:850px){
 .ms-inspector-body:not(.lv-config .ms-inspector-body){padding-top:8px;padding-bottom:8px}
 .ms-inspector-body>.ms-inspector-grid{row-gap:5px}
 .lv-feeder-list{max-height:88px;margin-bottom:6px}
 .lv-config .lv-feeder-details .lv-small{margin-top:2px!important;line-height:15px!important}
}
@media(min-width:1600px){.station-editor-page.ms-configuring{--config-panel-width:420px}}
@media(max-width:1100px){
 .station-editor-page.ms-configuring .ms-workspace,.station-editor-page.ms-configuring.ms-tree-collapsed .ms-workspace,.station-editor-page.ms-configuring.ms-inspector-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr)}
 .station-editor-page.ms-configuring .ms-workspace>.ms-inspector-panel{position:absolute;right:0;top:0;bottom:0;width:min(400px,100%);z-index:4;box-shadow:-4px 0 18px #21392d24}
 .station-editor-page.ms-configuring .ms-workspace>#ms-tree{position:absolute;left:0;top:0;bottom:0;width:172px;z-index:3}
}
@media(max-width:420px){.ms-inspector-body{padding:8px}.ms-inspector-grid,.inspector-grid{gap:5px 7px}.lv-config .ms-inspector-body{padding:8px}.lv-heading{font-size:12px}.station-editor-page .ms-workspace aside .lv-feeder-list button{grid-template-columns:minmax(0,1fr) 48px 92px}}
.station-editor-toolbar .ms-insert-menu{position:relative;flex:none;margin:0;border:0;padding:0}
.station-editor-toolbar .ms-insert-menu>summary{list-style:none;cursor:pointer;white-space:nowrap;border:1px solid #cbdad5;border-radius:4px;background:#fff;padding:7px 10px;font-size:11px;line-height:15px}
.station-editor-toolbar .ms-insert-menu[open]>summary{background:#e9f3ef;color:#006957}
.station-editor-toolbar .ms-insert-menu>div{position:absolute;top:calc(100% + 5px);left:0;z-index:20;width:370px;max-width:calc(100vw - 30px);padding:12px;background:#fff;border:1px solid #b9cec5;border-radius:6px;box-shadow:0 6px 20px #152e3b22;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.station-editor-toolbar .ms-insert-menu>div label{display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:4px}
.station-editor-toolbar .ms-insert-menu>div select{width:100%;max-width:none}
.station-editor-toolbar .ms-insert-menu>.ms-insert-menu-body{display:flex;flex-direction:column;align-items:stretch}
.station-editor-toolbar .ms-insert-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.station-editor-toolbar:has(.ms-insert-menu){overflow:visible;flex-wrap:wrap}
.component-config .ms-inspector-body h3{margin:0 0 10px;font-size:14px}
.component-config .ms-inspector-body>details{margin-top:9px}
.component-config .ms-inspector-body>.delete{margin-top:12px}
.component-config .ms-inspector-grid{row-gap:7px}
.component-config .ms-inspector-body input{min-width:0}
/* SPEC-023: station inspector width is a UI preference and never changes the drawing. */
@media(min-width:934px){
.station-editor-page .ms-workspace,.station-editor-page.ms-configuring .ms-workspace{grid-template-columns:172px minmax(0,1fr) var(--station-inspector-width,29vw)}
.station-editor-page.ms-tree-collapsed .ms-workspace,.station-editor-page.ms-configuring.ms-tree-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr) var(--station-inspector-width,29vw)}
.station-editor-page.ms-inspector-collapsed .ms-workspace,.station-editor-page.ms-configuring.ms-inspector-collapsed .ms-workspace{grid-template-columns:172px minmax(0,1fr)}
.station-editor-page.ms-tree-collapsed.ms-inspector-collapsed .ms-workspace{grid-template-columns:minmax(0,1fr)}
.station-editor-page .ms-workspace>.ms-inspector-panel,.station-editor-page.ms-configuring .ms-workspace>.ms-inspector-panel{position:relative;inset:auto;width:auto;display:block;overflow:auto;padding:10px 14px}
.station-editor-page.ms-inspector-collapsed .ms-workspace>.ms-inspector-panel{display:none}
.station-editor-page.ms-configuring .ms-inspector-panel>#ms-inspector{display:block;overflow:visible}
}
.ms-width-handle{position:absolute;left:0;top:0;bottom:0;width:9px;cursor:ew-resize;z-index:6;touch-action:none;border-left:2px solid #c6d9ce}
.ms-width-handle:focus-visible,.ms-width-handle:hover{background:#00887355;outline:2px solid #008873}
.ms-properties-back{display:none}
#ms-readiness{padding:8px;background:#edf1f5;border-left:3px solid #64748b;margin:8px 0;font-size:12px}
#ms-readiness p{margin:6px 0}
.station-editor-page .ms-port-row label:has([data-port-map]){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px}
#ms-metadata{max-height:calc(100vh - 110px);overflow:auto}
#ms-metadata label{display:block;margin:6px 0}
#ms-metadata input,#ms-metadata select,#ms-metadata textarea{width:100%}
#ms-side [data-ms-external]{max-width:100%}
.ms-scroll [data-ms-graphic]{cursor:move}
.ms-scroll [data-graphic-handle]{cursor:nwse-resize}
.ms-scroll [data-ms-port]:focus-visible .ms-port-mark{stroke-width:3}
@media(max-width:933px){
.station-editor-page .ms-workspace,.station-editor-page.ms-configuring .ms-workspace{grid-template-columns:minmax(0,1fr)}
.station-editor-page .ms-workspace>.ms-inspector-panel,.station-editor-page.ms-configuring .ms-workspace>.ms-inspector-panel{display:none}
.station-editor-page.ms-properties-view .ms-workspace>.ms-inspector-panel,.station-editor-page.ms-properties-view.ms-configuring .ms-workspace>.ms-inspector-panel{display:block;position:relative;inset:auto;width:100%;grid-column:1;padding:10px 16px;overflow:auto}
.station-editor-page.ms-properties-view #ms-scroll,.station-editor-page.ms-properties-view #ms-tree{display:none}
.ms-width-handle{display:none}.ms-properties-back{display:block;position:sticky;top:0;background:white;z-index:8}
.station-editor-page .ms-inspector-actions{position:sticky;bottom:0;background:white;padding:8px;z-index:7}
}
.ms-scroll [data-mapping-suitable=yes] .ms-port-mark{stroke-width:2.5}
.ms-scroll [data-mapping-suitable=no]{opacity:.45}
.ms-scroll [data-mapping-suitable=yes]:hover .ms-port-mark{stroke-width:4}
/* SPEC-023 review A28: reserve real working height at narrow/zoomed CSS sizes. */
@media(max-width:933px){
 .station-editor-page .station-editor-header{flex-wrap:nowrap;min-height:42px;max-height:42px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
 .station-editor-page .station-editor-header>*{flex-shrink:0}
 .station-editor-page .station-editor-header h2{flex:0 0 auto;max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .station-editor-page .station-editor-header .ms-navigation{width:auto;margin-left:0;padding:0;overflow:visible}
 .station-editor-page .station-editor-toolbar.sld-toolbar{flex-wrap:nowrap;min-height:44px;max-height:44px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
 .station-editor-page .ms-insert-menu[open] .ms-insert-menu-body{position:fixed;top:190px;left:76px;max-width:calc(100vw - 90px);max-height:calc(100vh - 205px);overflow:auto;z-index:30}
 .station-editor-page.ms-properties-view .station-editor-toolbar{display:none}
 .station-editor-page.ms-properties-view .station-editor-header .ms-navigation{display:none}
 .station-editor-page.ms-properties-view .station-editor-header h2{flex:1 1 auto;min-width:30px}
 .station-editor-page.ms-properties-view .station-editor-header #ms-status{display:none}
 .station-editor-page.ms-properties-view .ms-workspace{min-height:160px}
 .station-editor-page.ms-properties-view .ms-workspace>.ms-inspector-panel{min-height:0;padding-top:4px}
 .station-editor-page .station-editor-footer{flex-wrap:nowrap;min-height:26px;max-height:42px;overflow:auto;align-items:center}
 .station-editor-page .station-editor-footer #ms-mode{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:80px}
 .station-editor-page .station-editor-footer .sld-error{white-space:normal;min-width:140px;max-width:50vw;max-height:36px;overflow:auto;margin:0;flex-shrink:0}
}
/* SPEC-024: readable optional product details and independent functional mapping. */
.station-editor-page .ms-v7-block{min-width:0;max-width:100%;margin:6px 0;padding:10px;border:1px solid #bdcbc6;border-radius:5px;display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.station-editor-page .ms-v7-block legend{font-weight:650;padding:0 5px;max-width:100%;white-space:normal}
.station-editor-page .ms-v7-block label,.station-editor-page .ms-v7-block input,.station-editor-page .ms-v7-block select,.station-editor-page .ms-v7-block textarea,.station-editor-page .ms-contact-pair{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.station-editor-page .ms-v7-block [hidden]{display:none!important}
.station-editor-page .ms-product-evidence{font-size:12px;line-height:1.5;padding:8px;background:var(--surface-muted,#f4f7f5);border-radius:4px;overflow-wrap:anywhere;white-space:normal}
.station-editor-page .ms-product-evidence p{margin:5px 0;white-space:normal}
.station-editor-page .ms-circuit-choice{display:flex;gap:8px;align-items:flex-start;overflow-wrap:anywhere;white-space:normal}
.station-editor-page .ms-circuit-choice input{width:auto;min-width:16px;flex:0 0 auto;margin-top:3px}
.station-editor-page .ms-contact-pair{border-bottom:1px solid #cbd5d0;padding:5px 0;display:grid;gap:5px}
.station-editor-page .ms-conflicts label{white-space:normal;overflow-wrap:anywhere}
.station-editor-page .ms-change-preview svg{width:100%;min-height:160px;max-height:340px}
.station-editor-page .ms-v7-form>.ms-option{grid-column:1/-1;display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.station-editor-page .ms-v7-form>.ms-option>span{flex:1;overflow-wrap:normal;word-break:normal}
.station-editor-page .ms-v7-form>.ms-option>input,.station-editor-page .ms-v7-form>.ms-option>button{flex:0 0 auto}
/* QB01: keep native choice boxes independent of full-width inspector inputs. */
.station-editor-page .ms-workspace aside .ms-inspector-grid .ms-circuit-choice{display:grid;grid-template-columns:16px minmax(0,1fr);gap:8px;align-items:start;min-height:24px;min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.station-editor-page .ms-workspace aside .ms-inspector-grid .ms-circuit-choice>input[type=checkbox]{width:16px;min-width:16px;max-width:16px;height:16px;min-height:16px;max-height:16px;margin:2px 0 0;padding:0;box-sizing:border-box}
