:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#203631;background:#f3f6f5;font-size:16px;--bg:#f3f6f5;--panel:#fff;--ink:#203631;--muted:#6f807b;--line:#e2eae6;--green:#086d56;--soft:#e9f4ef;--orange:#d58b38;--blue:#588cae;--purple:#a378b6;--shadow:0 2px 5px #173d3010;--sidebar:#fbfdfc}
:root[data-theme=dark]{color-scheme:dark;--bg:#101b19;--panel:#192823;--ink:#e0eee8;--muted:#a0b3aa;--line:#2d4038;--green:#7bd4ac;--soft:#213d31;--sidebar:#14211d;--shadow:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}button,a,input,select{outline-offset:4px}button{cursor:pointer;transition:background .15s,transform .15s}button:disabled{cursor:wait;opacity:.6}button:hover{filter:brightness(.96)}a{color:var(--green);text-underline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:1.9rem;font-weight:600;letter-spacing:-.055rem;margin-bottom:0}h2{font-size:1.06rem;font-weight:650;margin-bottom:12px}h3{font-size:1rem}p{line-height:1.6;color:var(--muted);margin-bottom:16px}small,.caption{font-size:.8rem;color:var(--muted);line-height:1.5}.caption{margin:14px 0 0}.muted{color:var(--muted)}[hidden]{display:none!important}.eyebrow{font-size:.75rem;letter-spacing:.12em;color:var(--muted);font-weight:600;margin-bottom:10px}.brand-mark{background:var(--green);color:var(--panel);width:44px;height:44px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;font-size:2rem;line-height:1}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;font-size:2rem;font-weight:600;letter-spacing:-.05em;color:var(--ink)}.brand-sub{display:block;letter-spacing:.08em;font-size:.58rem;margin-top:2px;color:var(--muted)}aside{position:fixed;left:0;top:0;bottom:0;width:226px;padding:30px 20px;background:var(--sidebar);border-right:1px solid var(--line);display:flex;flex-direction:column}.home-label{font-size:.75rem;letter-spacing:.1em;margin:40px 10px 25px;color:var(--muted)}.home-label span{display:block;font-size:.8rem;letter-spacing:0;margin-top:7px}nav{display:grid;gap:7px}nav button{border:0;background:none;padding:13px 14px;text-align:left;color:var(--muted);border-radius:9px;font-size:.88rem;font-weight:550;white-space:nowrap}nav button span{font-size:1.15rem;display:inline-block;width:26px;font-weight:400}nav button.active{background:var(--soft);color:var(--green)}.sidebar-bottom{margin-top:auto;padding:20px 9px 0}.sidebar-bottom p{font-size:.8rem;line-height:1.7;margin:12px 0}.sidebar-bottom span{font-size:.75rem}.collector-pill{font-size:.8rem;color:var(--green)}.collector-pill:before{content:'';display:inline-block;width:7px;height:7px;background:currentColor;border-radius:50%;margin-right:7px}.workspace{margin-left:226px}header{padding:28px 32px 24px;display:flex;justify-content:space-between;align-items:center;gap:15px}.header-actions{display:flex;align-items:center;gap:12px}.header-actions .muted{font-size:.8rem}main{padding:0 32px 20px}.primary,.outline,.icon-btn{border-radius:8px;padding:10px 15px;font-size:.875rem;font-weight:550;line-height:1.3}.primary{background:var(--green);color:var(--panel);border:1px solid var(--green)}.outline,.icon-btn{background:var(--panel);color:var(--ink);border:1px solid var(--line)}.icon-btn{font-size:1.15rem;padding:7px 12px}.text-btn{border:none;background:none;color:var(--green);padding:5px 0;font-size:.83rem;font-weight:600}.test-banner{display:flex;justify-content:space-between;align-items:center;gap:16px;background:var(--soft);border:1px solid var(--line);border-radius:10px;padding:15px 20px;margin-bottom:22px}.test-banner>div{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.test-banner strong{font-size:.875rem;font-weight:600}.test-banner>div>span:last-child{font-size:.8rem;color:var(--muted)}.pill{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid var(--line);padding:5px 8px;border-radius:5px;font-size:.65rem;letter-spacing:.055em;font-weight:650;background:var(--soft);color:var(--green)}.muted-pill{color:var(--muted);background:var(--bg)}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:22px}.kpi{padding:20px 22px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);position:relative}.kpi-label{font-size:.85rem;color:var(--muted);margin-bottom:17px;display:flex;justify-content:space-between}.kpi-label i{font-style:normal;color:var(--green);font-size:1.2rem}.kpi-value{font-size:2rem;letter-spacing:-.06rem;font-weight:550}.kpi-value small{font-size:1rem;letter-spacing:0;font-weight:400}.kpi-note{font-size:.75rem;color:var(--muted);margin-top:11px;line-height:1.45}.kpi:first-child{border-top:3px solid var(--green);padding-top:18px}.overview-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(310px,1fr);gap:20px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:23px;box-shadow:var(--shadow);min-width:0}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.panel-head h2{margin-bottom:6px}.panel-head p{font-size:.8rem;margin:0}.panel-head select{width:auto;max-width:190px;font-size:.8rem;padding:8px 32px 8px 10px}.chart{height:258px;position:relative}.chart svg{width:100%;height:100%;overflow:visible}.chart text{font-family:inherit;fill:var(--muted);font-size:12px}.chart .grid{stroke:var(--line);stroke-width:1}.chart .series{fill:none;stroke-width:2.3;stroke-linejoin:round;stroke-linecap:round}.empty{min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);line-height:1.7;font-size:.9rem;padding:20px}.empty b{color:var(--ink);margin-bottom:8px}.legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:16px;font-size:.73rem;color:var(--muted)}.legend span:before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:6px}.legend-orange:before{background:var(--orange)!important}.legend-blue:before{background:var(--blue)!important}.legend-purple:before{background:var(--purple)!important}.flow-house{margin:18px auto 23px;padding:17px;text-align:center;width:160px;border:1px solid var(--line);border-radius:14px;background:var(--bg)}.flow-house span{font-size:1.8rem;color:var(--green)}.flow-house strong{display:block;font-size:1.4rem;margin:4px 0}.flow-house small{font-size:.75rem}.flow-items{display:flex;justify-content:space-around;gap:10px;border-bottom:1px solid var(--line);padding-bottom:19px}.flow-items div{text-align:center}.flow-items b{display:block;font-size:1rem;margin-top:7px}.flow-items small{font-size:.75rem}.phase-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:17px}.phase{background:var(--bg);padding:9px;text-align:center;border-radius:7px}.phase span{display:block;font-size:.72rem;color:var(--muted);margin-bottom:5px}.phase b{font-size:.9rem;font-weight:550}.bottom-grid{display:grid;grid-template-columns:1.8fr 1fr;gap:20px;margin-top:20px}.source-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;padding-top:9px}.source-item{border-right:1px solid var(--line);padding-right:10px}.source-item:last-child{border:none}.source-item b{display:block;font-size:.85rem;font-weight:550}.source-item span{display:block;font-size:.73rem;color:var(--muted);margin-top:9px}.source-item .connected{color:var(--green)}.insight{background:var(--soft);box-shadow:none}.insight h2{line-height:1.4;margin-bottom:8px}.insight p{font-size:.85rem;margin:0}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:22px}.spaced{margin-top:22px}.timeline{border-left:1px solid var(--line);margin:25px 0 0 10px;padding-left:25px}.timeline>div{position:relative;margin-bottom:30px}.timeline>div:before{content:'';width:9px;height:9px;background:var(--line);border:3px solid var(--panel);box-shadow:0 0 0 1px var(--line);border-radius:50%;position:absolute;left:-32px;top:3px}.timeline .current:before{background:var(--green)}.timeline b{font-size:.75rem;color:var(--green)}.timeline h3{margin:10px 0}.timeline p{font-size:.9rem}.notice{background:var(--soft);border-left:3px solid var(--green);padding:16px 20px;font-size:.9rem;line-height:1.5;border-radius:8px;margin-bottom:22px}.check-row{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding:15px 0;font-size:.9rem}.check-row b{font-weight:550;color:var(--green)}form{display:grid;gap:15px;margin:18px 0}label{display:block;font-size:.85rem;color:var(--muted);line-height:1.5}input,select{display:block;margin-top:7px;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink);min-height:41px}input[type=range]{padding:0;accent-color:var(--green);border:none;min-height:30px}select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23708078' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:30px}label output{float:right;color:var(--green);font-weight:600}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.inline-form{display:flex;gap:15px;align-items:flex-end;flex-wrap:wrap}.inline-form label{flex:1;min-width:125px}.inline-form button{margin-bottom:1px}details{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}summary{cursor:pointer;font-size:.9rem;margin-bottom:14px}details p{font-size:.85rem}.simulation-layout{display:grid;grid-template-columns:300px 1fr;gap:22px}.pump-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.pump-card h2{min-height:40px}.pump-card .cop{font-size:2.3rem;color:var(--green);margin:15px 0}.pump-card .cop small{font-size:.85rem}.pump-card dl{margin:20px 0;font-size:.85rem}.pump-card dl div{display:flex;justify-content:space-between;gap:15px;padding:9px 0;border-bottom:1px solid var(--line)}dt{color:var(--muted)}dd{margin:0;font-weight:550}.pump-card a{font-size:.8rem}.source-cards{display:grid;grid-template-columns:1fr 1fr;gap:22px}.source-cards p,.source-cards li{font-size:.9rem;line-height:1.7}.source-cards ol{padding-left:22px;color:var(--muted)}.table-wrap{overflow:auto;max-height:420px}table{width:100%;border-collapse:collapse;font-size:.82rem;text-align:left}th,td{padding:11px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th{color:var(--muted);font-weight:550;position:sticky;top:0;background:var(--panel)}.button-row{display:flex;gap:10px;margin-top:18px}.error{color:#c25945}.success{color:var(--green)}.number{font-variant-numeric:tabular-nums}.result-big{font-size:2rem;color:var(--green);margin:18px 0}.badge-note{font-size:.75rem;line-height:1.5;color:var(--muted)}footer{padding:15px 32px 22px;display:flex;justify-content:space-between;font-size:.72rem;color:var(--muted)}#toast{position:fixed;bottom:25px;right:25px;max-width:480px;background:var(--ink);color:var(--panel);box-shadow:0 5px 30px #0002;padding:16px 22px;border-radius:10px;z-index:20;font-size:.9rem;line-height:1.5}.auth-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 65% 10%,var(--soft),var(--bg) 65%);padding:30px}.auth-card{max-width:430px;width:100%;background:var(--panel);padding:40px;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}.auth-card .eyebrow{margin:25px 0 15px}.auth-card h1{font-size:2.7rem;line-height:1.15;margin-bottom:20px}.auth-card small{display:block}.privacy-line{margin-top:28px;font-size:.75rem;color:var(--green);border-top:1px solid var(--line);padding-top:20px}#registerSearch{max-width:280px;margin:0}#tokenResult code{display:block;word-break:break-all;white-space:normal;margin:15px 0;padding:15px;background:var(--bg);font-size:.85rem}#tokenResult p{font-size:.85rem}
@media(min-width:1600px){main,header{padding-left:40px;padding-right:40px}.chart{height:295px}.kpi-value{font-size:2.4rem}.kpi{padding-top:25px;padding-bottom:25px}}
@media(max-width:1200px){aside{width:195px;padding:25px 12px}.workspace{margin-left:195px}header{padding:24px}main{padding:0 24px 20px}.kpi-grid{gap:12px}.kpi{padding:16px}.kpi-value{font-size:1.8rem}.overview-grid{grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr)}.panel{padding:18px}.test-banner>div>span:last-child{display:none}.source-strip{grid-template-columns:repeat(2,1fr);gap:16px}.source-item:nth-child(2){border:none}.simulation-layout{grid-template-columns:260px 1fr}.pump-grid{grid-template-columns:1fr}}
@media(max-width:900px){aside{position:static;width:100%;padding:15px 20px;border-right:0;border-bottom:1px solid var(--line);display:block}.brand{font-size:1.5rem}.brand-mark{width:36px;height:36px}.home-label,.sidebar-bottom,.brand-sub{display:none}nav{display:flex;overflow:auto;margin-top:16px;gap:7px}nav button{padding:9px 12px}nav button span{display:none}.workspace{margin-left:0}.overview-grid,.bottom-grid,.two-col,.source-cards{grid-template-columns:1fr}.kpi-grid{grid-template-columns:repeat(2,1fr)}.flow-panel{display:none}.header-actions .muted{display:none}.simulation-layout{grid-template-columns:1fr}.pump-grid{grid-template-columns:1fr 1fr}.sim-controls form{grid-template-columns:1fr 1fr}.sim-controls small{grid-column:1/-1}.source-strip{grid-template-columns:repeat(4,1fr)}}
@media(max-width:550px){header{padding:22px 16px}main{padding:0 16px 15px}h1{font-size:1.5rem}.header-actions{gap:6px}.header-actions .outline{display:none}.test-banner{padding:14px;gap:7px}.test-banner strong{font-size:.8rem}.test-banner .text-btn{display:none}.kpi-grid{gap:10px}.kpi-value{font-size:1.65rem}.kpi-label{font-size:.78rem}.kpi-note{font-size:.7rem}.panel-head{flex-wrap:wrap}.chart{height:230px}.legend{font-size:.68rem;gap:10px}.source-strip{grid-template-columns:repeat(2,1fr)}.pump-grid,.form-grid,.sim-controls form{grid-template-columns:1fr}.panel{padding:17px}.auth-card{padding:28px}footer span{display:none}.inline-form label{min-width:120px}.button-row{flex-wrap:wrap}}

.phase-chart svg{width:100%;height:auto;display:block}.phase-chart text{font-size:11px;fill:var(--muted)}.phase small{display:block;font-size:.7rem;color:var(--muted);margin-top:5px}
.phase-chart .series{fill:none;stroke-width:2}.phase-chart .grid{stroke:var(--line);stroke-width:1}#steps .table-wrap td:last-child{white-space:normal;min-width:150px}@media(min-width:901px){#page-analysis>.two-col{grid-template-columns:minmax(230px,.7fr) minmax(0,1.3fr)}}

.time-controls{margin:12px 0 16px}.time-presets,.time-custom,.time-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:end}.time-controls label{font-size:12px;min-width:120px}.time-controls select,.time-controls input{padding:9px;min-height:38px}.time-controls button{min-height:36px}.time-custom{margin-top:10px}.time-custom[hidden],.time-controls [hidden]{display:none!important}.time-actions{align-items:center;justify-content:space-between;margin-top:8px;font-size:12px;color:var(--muted)}.time-exports{display:flex;gap:12px}.time-controls .caption{margin:5px 0}.time-error:empty{display:none}.chart-panel .panel-head{flex-wrap:wrap}.time-anchor-label{max-width:180px}

.text-button{border:0;background:transparent;color:var(--green);padding:8px;font-size:.875rem;cursor:pointer}.pwa-install{width:100%;margin-top:8px}.pwa-help{font-size:.875rem}.live-now-label{font-weight:700}.time-controls input,.time-controls select{max-width:100%}.time-actions .time-label{overflow-wrap:anywhere}.table-wrap{max-width:100%;overscroll-behavior-x:contain}.table-wrap th{white-space:normal}.table-wrap table{font-variant-numeric:tabular-nums}
@media(max-width:600px){
 body{font-size:16px}main{padding:0 12px 20px}.workspace>header{padding:16px 12px}.workspace h1{font-size:1.45rem}.panel{padding:16px}.time-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}.time-presets label{grid-column:span 2;min-width:0}.time-controls label{font-size:14px}.time-controls input,.time-controls select{font-size:16px;min-height:44px;width:100%}.time-controls button{min-height:44px}.time-custom{display:grid;grid-template-columns:1fr;gap:8px}.time-exports{gap:4px;width:100%;justify-content:space-between}.time-label{font-size:14px}.live-readings{grid-template-columns:repeat(2,minmax(0,1fr))}.live-readings span{font-size:14px}.live-plot{overflow:visible}.live-plot svg{min-width:0;width:100%;height:auto}.live-plot text{font-size:15px}.live-cursor-readout{font-size:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.live-cursor-readout>b{grid-column:1/-1}.live-tooltip{font-size:12px;max-height:70vh;overflow-y:auto;pointer-events:none}.live-tooltip-row{grid-template-columns:minmax(0,1fr) 70px 47px}.table-wrap{overflow-x:auto}.table-wrap table{min-width:560px}.live-finance .table-wrap:last-of-type table{min-width:0;width:100%}.live-finance .table-wrap:last-of-type td:last-child{white-space:nowrap}.panel-head{flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.sidebar-bottom .pwa-install{display:block}.kpi-note{font-size:13px}.notice{font-size:14px}.pwa-help{font-size:14px}.chart{height:auto;min-height:180px}.chart svg{height:auto;min-height:180px}
}

.mobile-menu{display:none}
@media(max-width:900px){aside{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;padding:12px 16px}.mobile-menu{display:block;min-height:44px}aside nav{display:none;grid-column:1/-1;overflow:visible;margin-top:12px}aside.menu-open nav{display:grid;grid-template-columns:1fr 1fr}aside nav button{min-height:44px;white-space:normal}aside.menu-open .sidebar-bottom{display:block;grid-column:1/-1;padding:12px 0 0}.sidebar-bottom p{display:none}.sidebar-bottom .pwa-install{width:auto;margin:0 12px}.sidebar-bottom .collector-pill{margin-bottom:10px}.sidebar-bottom .pwa-help{display:block}.header-actions .outline{display:inline-flex;min-height:44px}.header-actions .icon-btn{min-height:44px}}
@media(max-width:600px){.live-finance td:first-child,.live-finance th:first-child{white-space:normal}.live-finance .table-wrap:last-of-type{overflow:visible}.live-finance .table-wrap:last-of-type td:first-child{max-width:230px}.live-finance .table-wrap:last-of-type td:last-child{min-width:50px}.time-presets .outline{padding:10px 8px}#toast{left:12px;right:12px;bottom:12px}.phase-chart{overflow-x:auto}.phase-chart svg{min-width:480px}}

.connection-panel{margin-bottom:16px}.connection-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.connection-row{padding:12px;border:1px solid var(--line);border-radius:10px;overflow-wrap:anywhere}.connection-row>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex-wrap:wrap}.connection-state{font-size:.8rem;font-weight:650}.connection-state.connected{color:var(--green)}.connection-state.connecting{color:#ae7200}.connection-state.disconnected,.connection-state.attention{color:#c25945}.connection-state.paused{color:var(--muted)}.connection-row .caption{margin-top:5px;font-size:.8rem}
