*{box-sizing:border-box}body{margin:0;font:14px/1.5 'Segoe UI',Arial,sans-serif;background:#e9eff4;color:#183149;height:100dvh;display:flex;flex-direction:column;overflow:hidden}header{background:#142c40;color:#fff;display:flex;align-items:center;gap:24px;padding:14px 22px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:14px}.brand b{font-size:26px;letter-spacing:3px;color:#e6c17b}.brand span,.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700}nav{display:flex;gap:6px}button{font:inherit;cursor:pointer;border:1px solid #c4d0db;border-radius:7px;background:white;color:#223c50;padding:8px 12px}button:hover{background:#e6eef4}header button{background:#213d53;border-color:#496174;color:#e1edf7}button.active,button.primary{background:#127caa;color:white;border-color:#127caa}#status{margin-left:auto;color:#a9c1d2;font-size:12px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 16px;background:#fff;border-bottom:1px solid #cbd5df}.layers{display:flex;gap:16px;flex-wrap:wrap}.layers label{display:flex;align-items:center;gap:5px}input[type=checkbox]{accent-color:#127caa}main{display:flex;min-height:0;flex:1}#workspace{flex:1;position:relative;min-width:0;overflow:hidden;background:#f7fafc}#diagram,#scene{position:absolute;inset:0;width:100%;height:100%;touch-action:none}#diagram svg{width:100%;height:100%;display:block;user-select:none}.asset,.stream-label,.stream{cursor:pointer}.asset:hover>rect:first-child,.asset.selected>rect:first-child{stroke:#0b8dc1;stroke-width:5}.stream:hover>path:nth-child(2){stroke-width:12}.hint{position:absolute;bottom:10px;left:10px;background:#fffE;border:1px solid #d6e0e8;padding:7px 11px;border-radius:6px;font-size:12px;pointer-events:none}aside{width:305px;background:white;border-left:1px solid #d1dce5;padding:22px;overflow:auto}.eyebrow{color:#71879b}h2{font-size:20px;margin:8px 0}p{color:#62788a}.note{margin-top:24px;padding-top:14px;border-top:1px solid #e4eaf0;color:#758b9d;font-size:12px}.spec{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e4eaf0}.spec strong{text-align:right}.equipment-photo{width:100%;height:160px;object-fit:contain}dialog{width:min(1000px,95vw);max-height:90vh;border:1px solid #d2dce5;border-radius:12px;padding:0;color:#183149;box-shadow:0 18px 80px #102a4550}dialog::backdrop{background:#102a4577}.dialoghead,.editnav,footer{padding:15px 20px;display:flex;gap:10px;align-items:center;border-bottom:1px solid #dce5ec}.dialoghead{justify-content:space-between}.editnav{flex-wrap:wrap}#search{margin-left:auto;padding:9px;border:1px solid #cbd5df;border-radius:6px}#editbody{height:55vh;overflow:auto;padding:12px 20px}table{border-collapse:collapse;width:100%}td,th{padding:8px;text-align:left;border-bottom:1px solid #dce5ec}th{position:sticky;top:0;background:#edf3f7}td input{width:100%;min-width:85px;padding:7px;border:1px solid #cbd5df;border-radius:4px}footer{justify-content:space-between;border-top:1px solid #dce5ec;border-bottom:0} [hidden]{display:none!important}@media(max-width:760px){header{gap:8px;padding:8px}aside{width:220px;padding:12px}#status{display:none}.layers{gap:8px}.brand span{display:none}}@media(max-width:500px){aside{width:100%;max-height:28vh;border-left:0;border-top:1px solid #d1dce5}main{flex-direction:column}#workspace{min-height:0}}

/* V2 engineering canvas */
header{padding:9px 18px;gap:18px}.toolbar{padding:5px 12px}#workspace{background:#f7fafc}aside{position:absolute;right:0;top:105px;bottom:0;z-index:5;width:310px;box-shadow:-10px 0 28px #18314920}main{position:relative}aside{top:0}.asset:hover>.asset-hit,.asset.selected>.asset-hit{fill:#0b8dc110;stroke:#0b8dc1;stroke-width:3}.stream:hover>path:nth-child(2){stroke-width:25}.hint{font-size:11px;opacity:.85}
/* Responsive workspace: no duplicated diagram title or unused side column. */
html,body{width:100%;height:100%;overscroll-behavior:none}body{height:100dvh}header{flex:none;padding:7px 14px;gap:12px}.brand b{font-size:24px}header button,.toolbar button{padding:6px 10px}.toolbar{flex:none;padding:5px 10px;gap:6px}.toolbar>div:last-child{display:flex;gap:4px;flex-wrap:wrap}.layers{gap:12px}main{flex:1;min-height:0;width:100%;overflow:hidden}#workspace{width:100%;min-height:0}#diagram svg{max-width:none;max-height:none}.hint{bottom:5px;left:7px;font-size:10px;padding:3px 7px;opacity:.8}.flowlegend{flex:none;display:flex;justify-content:center;gap:5px 18px;flex-wrap:wrap;padding:5px 10px;background:white;border-top:1px solid #d6e0e8;font-size:11px;line-height:1.3}.flowlegend span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.flowlegend span:before{content:'';width:15px;height:3px;border-radius:2px;background:var(--c)}aside{width:min(320px,90vw);max-height:none;top:0;bottom:0} @media(min-width:1800px){header{padding:11px 20px}.toolbar{padding:8px 14px}.flowlegend{font-size:13px;gap:8px 24px}}@media(max-width:850px){header{gap:6px;padding:5px 8px}.brand b{font-size:20px}.brand span,#status{display:none}header button,.toolbar button{padding:5px 8px;font-size:12px}.toolbar{font-size:12px}.layers{gap:8px}.flowlegend{font-size:10px;gap:3px 9px}.hint{display:none}}@media(max-height:650px){header{padding:4px 10px}.brand b{font-size:19px}.toolbar{padding:3px 8px}.flowlegend{padding:3px 8px;font-size:10px}}
/* V4: neutral engineering canvas, crisp stream highlights, overlay inspector. */
#workspace{background:#f8fafb}#diagram svg{overflow:hidden}.stream:hover>path:nth-child(2){stroke-width:22;filter:brightness(1.13)}.asset:hover>.asset-hit,.asset.selected>.asset-hit{stroke:#2587ad;stroke-width:2;fill:#1e90c009;stroke-dasharray:7 5}.asset .equipment-art{pointer-events:visiblePainted}.stream-label:hover text{fill:#0e7699}.flowlegend{font-size:12px;padding:6px 10px}.flowlegend span:before{height:5px;width:20px}.brand b{font-weight:750}header{background:linear-gradient(100deg,#102b3e,#17364b)}#closepanel{float:right;padding:0 8px;font-size:22px;line-height:1.15;margin:-5px 0 0}.hint{background:#fffffff0}.toolbar button{border-color:#d4dfe6}.toolbar button:hover{background:#edf4f8}

.year-label{font-size:11px;color:#d6e3ea;font-weight:600;margin-left:8px}#plantyear{padding:7px 10px;border:1px solid #6d8799;background:#203e52;color:white;border-radius:6px;font:inherit;font-weight:600}header nav{flex-wrap:wrap;align-items:center} @media(max-width:850px){.year-label{display:none}#plantyear{font-size:12px;padding:5px}}

/* V14: separate, non-overlay details pane; drawing automatically refits. */
main{display:flex;flex-direction:row;position:relative;min-height:0;min-width:0;overflow:hidden}
#workspace{flex:1 1 0;width:auto;min-width:0;min-height:0}
#inspector{position:relative;inset:auto;flex:0 0 clamp(250px,25vw,370px);width:auto;max-width:40%;height:auto;max-height:none;min-height:0;overflow:auto;box-shadow:none;z-index:auto;overscroll-behavior:contain}
#diagram .equipment-name{visibility:hidden;pointer-events:none}
#diagram .show-names .equipment-name{visibility:visible}
#diagram #stream-annotations{display:none!important}
@media(max-width:600px){main{flex-direction:column}#inspector{flex:0 0 32%;width:100%;max-width:100%;max-height:38%;border-left:0;border-top:1px solid #d1dce5;padding:12px}#workspace{width:100%}}
/* V17: engineering register only; no drawing styles changed. */
.custom-register{margin-top:22px;border-top:1px solid #dce5ec;padding-top:10px}.custom-register h3{margin:6px 0;font-size:16px}.custom-register p{font-size:12px;margin:6px 0 10px}.reg-actions{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}.reg-actions button,.reg-section button{font-size:12px;padding:5px 8px}.reg-section{padding:9px;margin:10px 0;border:1px solid #d9e3ea;border-radius:7px;background:#f7fafc}.reg-section-head,.reg-field{display:grid;gap:5px;align-items:center;margin-bottom:6px}.reg-section-head{grid-template-columns:minmax(0,1fr) auto}.reg-field{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.reg-section input{width:100%;min-width:0;padding:6px;border:1px solid #cbd7df;border-radius:4px;font:inherit;font-size:12px;background:white;color:#183149}.reg-section-head input{font-weight:650}.reg-delete{color:#a33636}.reg-save{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.reg-save span{font-size:12px;color:#536b7c}
#simcontrols{flex:none;background:#eef4f7;padding:8px 14px;border-bottom:1px solid #c7d7e2;font-size:12px;max-height:36vh;overflow:auto}.siminputs,#simcomposition,#simmetrics{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0}#simcontrols label,#simparambody label{display:flex;align-items:center;gap:5px;font-weight:600}#simcontrols input[type=number]{width:75px}#simcontrols input,#simcontrols select,#simparambody input{padding:5px;border:1px solid #b9cbd7;border-radius:4px;background:white}#simmetrics span{padding:5px 8px;background:white;border-radius:4px}#simmetrics b{color:#17634e}.simwarning{color:#a34116}#simparambody{padding:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;max-height:70vh;overflow:auto}#simparambody label{justify-content:space-between}#simparambody input{width:85px}.sim-motion{animation:simflow .8s linear infinite;opacity:.95}@keyframes simflow{to{stroke-dashoffset:-34}}.sim-value{paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round;font-weight:700}#detail details{border-top:1px solid #cbd5df;padding:8px 0}#detail summary{cursor:pointer;font-size:12px;font-weight:600}@media(prefers-reduced-motion:reduce){.sim-motion{animation:none}}
/* V22 operational workspace */
:root{--ink:#193348;--muted:#647b8c;--edge:#dce5eb;--accent:#147e75}body{font-family:'Segoe UI',Arial,sans-serif;font-variant-numeric:tabular-nums}header{background:#102b3d;padding:9px 18px;gap:24px;min-height:54px}.brand b{color:#e9c98f;letter-spacing:3px}.brand span{color:#a9bdcb}header nav{gap:4px}header button{background:transparent;border-color:transparent;font-weight:600;color:#b9cbd8}header button.active{background:#285067;color:white;border-color:#47718a}header button:hover{background:#294b60;color:white}#plantyear{background:#18394d;border-color:#4a6375}.toolbar{padding:7px 16px;font-size:12px}.toolbar button{font-size:12px;padding:5px 10px}.toolbar input{margin:0}#simtools{display:inline-flex;gap:12px;border-left:1px solid var(--edge);padding-left:12px}.simulation-mode #workspace{background:#f8fafb}.simulation-mode #simcontrols{padding:10px 16px 7px;background:#edf2f5;border-bottom:1px solid #d5e0e7;max-height:40vh;overflow:auto}.operating{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.operating-title{display:flex;flex-direction:column;min-width:145px;align-self:center}.kicker,.sectiontitle{font-size:10px;letter-spacing:1.5px;font-weight:750;color:#667e8e;text-transform:uppercase}.operating-title strong{font-size:19px;line-height:1.4;color:var(--ink)}#simcontrols .operating label{display:flex;flex-direction:column;align-items:flex-start;gap:3px;font-size:11px;color:#526b7b}.operating select,.unitinput{height:35px;min-width:112px;background:white;border:1px solid #c9d6df;border-radius:6px}.unitinput{display:flex;align-items:center;padding-right:8px}.unitinput span{font-size:11px;color:#60798a;white-space:nowrap}#simcontrols .unitinput input{border:0;background:transparent;width:80px;font-weight:750;font-size:17px;padding:4px 8px;outline:none}.opactions{display:flex;gap:5px;margin-left:auto}.opactions button{font-size:12px;padding:8px 10px}#simmetrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:10px 0 0}.metric{min-width:0;border:1px solid #dbe4e9;background:white;border-radius:7px;padding:9px 11px;box-shadow:0 1px 2px #18314906}.metric>span{display:block!important;padding:0!important;background:none!important;color:#617a8a;font-weight:700;font-size:10px;letter-spacing:.6px;white-space:nowrap}.metric>div{display:flex;gap:5px;align-items:baseline;flex-wrap:wrap;line-height:1.2;margin-top:5px}.metric b,#simmetrics .metric b{font-size:clamp(19px,1.8vw,30px);font-weight:700;color:#18384c;letter-spacing:-.7px}.metric small{color:#647c8d;font-size:11px;font-weight:500;white-space:nowrap}.metric.product{border-left:3px solid #238771}.metric.product b,#simmetrics .metric.product b{color:#17715d}.metric.watermetric b{color:#1376a8}#simmessage{display:flex;gap:12px;align-items:center;min-height:25px;font-size:11px;margin-top:4px}.balance{font-weight:650;color:#217a65;white-space:nowrap}.balance.bad{color:#b94e31}#simmessage button{margin-left:auto;padding:3px 8px;font-size:11px;border:0;background:transparent;color:#1c657e;font-weight:700;white-space:nowrap}.simwarning{color:#9b4d19}#simcomposition{padding:8px 0;gap:10px}.composition-bar{height:8px;display:flex;overflow:hidden;border-radius:4px;background:#e5ebef;min-width:100px}.composition-bar span{display:block;min-width:0}.simulation-mode #inspector{flex:0 0 clamp(300px,27vw,410px);max-width:42%;padding:17px;background:#fff;border-left:1px solid #cfdae2}.simulation-mode #inspector h2{font-size:23px;letter-spacing:-.6px;line-height:1.2;margin:9px 0 3px}.simulation-mode #inspector>p{font-size:12px;margin:5px 0 12px}.simulation-mode #inspector .note{font-size:10px}.inspectstate{font-size:11px;font-weight:650;color:#24765f;margin-bottom:8px}.inspectstate.off{color:#7d8790}.inspect-photo{width:100%;height:85px;object-fit:contain;background:#f5f8fa;border-radius:6px}.sectiontitle{margin:18px 0 8px}.masscards{display:grid;grid-template-columns:1fr 1fr;gap:7px}.masscards .metric{background:#f5f8fa;padding:10px}.masscards .metric b{font-size:23px}.materialrows>div{display:flex;align-items:center;gap:7px;padding:6px 0;border-bottom:1px solid #edf1f4;font-size:12px}.materialrows i{width:8px;height:8px;border-radius:2px}.materialrows span{flex:1}.materialrows em{font-style:normal;color:#60798a;width:44px;text-align:right}.materialrows small{color:#647b8c}.properties{display:grid;grid-template-columns:1fr 1fr;gap:6px}.properties>div{background:#f2f6f8;padding:8px;border-radius:5px;display:flex;flex-direction:column}.properties span{font-size:11px;color:#60798a}.properties strong{font-size:17px}.properties small{font-size:10px;color:#647b8c}.connection{width:100%;text-align:left;display:block;border:1px solid #dce6eb;margin:5px 0;padding:8px 10px;background:#fff}.connection span{font-size:12px;font-weight:650}.connection div{font-size:11px;color:#647b8c;margin-top:3px}.connection b{color:#1c4054;font-size:14px;margin-left:5px}.connection b:first-child{margin-left:0}.connection i{float:right;font-size:18px;font-style:normal}.efficiency{display:flex;justify-content:space-between;background:#e9f4ef;padding:8px 10px;margin-top:8px;border-radius:5px;color:#1e725b}.overviewlink{margin-top:18px;width:100%;font-weight:600}.outcome{display:flex;flex-wrap:wrap;justify-content:space-between;font-size:12px;margin:12px 0}.outcome>div{width:100%;height:6px;background:#e7edf1;margin-top:5px;border-radius:3px;overflow:hidden}.outcome i{display:block;height:100%;background:#378a79}.stream.selected>path:first-child{stroke:#f0b34a;stroke-width:22;stroke-opacity:.65}.sim-motion{opacity:.8}.sim-value{font-size:20px;fill:#19384b;stroke-width:6px}.simulation-mode .hint{font-size:11px}.simulation-mode .flowlegend{font-size:11px} @media(max-width:1050px){#simmetrics{grid-template-columns:repeat(3,minmax(0,1fr))}.operating{gap:8px}.opactions{margin-left:0}}@media(max-width:600px){.simulation-mode #inspector{flex:0 0 38%;width:100%;max-width:100%;max-height:42%;padding:10px}.operating-title{display:none}#simcontrols .unitinput input{width:60px}#simmetrics .metric b{font-size:17px}.metric{padding:5px 7px}.metric>span{font-size:9px}#simmessage{flex-wrap:wrap}.simulation-mode #simcontrols{max-height:36vh}}

.masscards .moisturemetric{grid-column:1/-1;border-left:3px solid #1376a8}.masscards .moisturemetric b{color:#1376a8}


/* V26 simplification */
.brand{display:flex;align-items:center;gap:14px}.brand-logo{height:44px;width:auto;display:block}.brand-text{display:flex;flex-direction:column;line-height:1.1}.brand-text b{font-size:24px;letter-spacing:2px;color:#f3f7fb}.brand-text span{font-size:11px;letter-spacing:1.6px;color:#cbd9e3}.brand b{color:#f3f7fb}
.connection-list{display:grid;gap:10px;margin:10px 0 18px}.connection-item{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid #d7e2ea;border-radius:10px;background:#f8fbfd}.connection-item small{display:block;color:#7a8d9d;font-size:11px;letter-spacing:.2px}.connection-item b{display:block;color:#17364b}.connection-item .direction{font-weight:700;color:#157ca4}.simple-stream-card{padding:12px;border:1px solid #d7e2ea;border-radius:10px;background:#f8fbfd;margin:12px 0}.simple-stream-card div{display:flex;justify-content:space-between;gap:10px;padding:5px 0}.simple-stream-card span{color:#6c8294}.simple-stream-card strong{text-align:right}.custom-register h3{margin:18px 0 6px}.reg-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}.reg-actions button{background:#eff6fb}.reg-sections{display:grid;gap:12px}.reg-section{border:1px solid #d8e2ea;border-radius:12px;background:#f8fbfd;padding:10px}.reg-section-head,.reg-field{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center;margin-bottom:8px}.reg-section-head{grid-template-columns:1fr auto}.reg-section input{width:100%;padding:8px;border:1px solid #cbd5df;border-radius:8px}.reg-delete{padding:6px 10px}.reg-save{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.muted{color:#71879b}.simulation-mode .brand-text b{color:#f3f7fb}
@media(max-width:850px){.brand-logo{height:36px}.brand-text span{display:none}.brand-text b{font-size:19px}}

/* Operating summary: independent scroll region, never overlays the plant. */
#simmetrics:empty{display:none}.simulation-mode #simcontrols{padding:8px 16px 3px}#simleft{flex:0 0 clamp(290px,24vw,380px);min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;background:#eef3f6;border-right:1px solid #cedce4;padding:12px;scrollbar-width:thin}#leftopen{align-self:flex-start;margin:8px 0 0 5px;padding:5px 9px}.lefthead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:1px 1px 10px}.lefthead h2{font-size:19px;letter-spacing:-.5px;margin:1px 0;line-height:1.25}.lefthead button{font-size:22px;padding:0 9px;line-height:1.25}.lefthero{background:#fff;border:1px solid #cddfdc;border-left:4px solid #278a76;border-radius:9px;padding:12px;margin-bottom:10px}.lefthero>span{font-size:11px;letter-spacing:1px;font-weight:750;color:#557a76}.lefthero b{font-size:36px;color:#176e5f;letter-spacing:-1.2px;line-height:1.3}.lefthero small{font-size:13px;color:#627b8b}.lefthero p{margin:2px 0 0;font-size:11px}.leftgroup{background:white;border:1px solid #d4e1e8;border-radius:8px;margin-bottom:8px;overflow:hidden}.leftgroup summary{cursor:pointer;padding:10px 11px;font-size:12px;font-weight:750;color:#23475b;background:#f8fafb}.leftbody{padding:3px 10px 9px}.leftrow{display:flex;justify-content:space-between;gap:8px;align-items:baseline;padding:7px 0;border-bottom:1px solid #eaf0f3;font-size:11px}.leftrow:last-child{border-bottom:0}.leftrow span{color:#536d7e}.leftrow strong{font-size:15px;white-space:nowrap;color:#163e53}.leftrow small{font-size:10px;font-weight:500;color:#647b8c}.leftsub{font-size:10px;text-transform:uppercase;letter-spacing:.6px;font-weight:750;color:#718595;margin:12px 0 4px}.lefttable{font-size:11px;margin:3px 0 6px;font-variant-numeric:tabular-nums}.lefttable th,.lefttable td{padding:6px 3px;text-align:right;border-bottom:1px solid #e8eff3;position:static;background:transparent}.lefttable th:first-child{text-align:left}.lefttable thead th{font-size:9px;color:#708795;font-weight:650;line-height:1.3}.lefttable tbody th{font-weight:500;color:#526d7e}.lefttable tbody td{font-weight:650;color:#153f54}.lefttable tbody tr:last-child{background:#f0f5f7}.shiftlabel{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin:9px 0}.shiftlabel select{padding:5px;border:1px solid #d3dfe6;background:#fff;border-radius:5px;color:#17394d}.bagmetric{background:#f0f6f8;border-radius:6px;padding:8px 10px;display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}.bagmetric b{font-size:27px;color:#17715d}.bagmetric span{font-size:11px;font-weight:650}.bagmetric small{font-size:11px;color:#627b8c;width:100%}.leftempty{padding:8px}.simulation-mode #workspace{flex:1 1 0;min-width:0;width:auto}@media(max-width:850px){#simleft{flex:0 0 260px;padding:8px}}@media(max-width:600px){.simulation-mode main{flex-direction:column}#simleft{flex:0 0 30%;width:100%;max-height:30%;border-right:0;border-bottom:1px solid #cedce4}.simulation-mode #workspace{width:100%}.lefthead h2{font-size:15px}}
