/* PROCOGNEX Process Lab v3.4 — contained, viewport-oriented application UI.
   Intentionally scoped to #pl-root so global website components remain unchanged. */
#pl-root{--pl-bg:#090b0e;--pl-card:#101317;--pl-card2:#0c0f12;--pl-line:#292e34;--pl-text:#f5f6f7;--pl-muted:#9ea7ae;--pl-lime:#d4ff58;background:#090b0e;color:var(--pl-text);font-family:Arial,Helvetica,sans-serif;min-height:100vh}
#pl-root button,#pl-root input,#pl-root select{font-family:Arial,Helvetica,sans-serif}
#pl-root button:focus-visible,#pl-root select:focus-visible,#pl-root input:focus-visible,#pl-root summary:focus-visible,#pl-root .pl-node:focus-visible{outline:2px solid var(--pl-lime);outline-offset:3px}
#pl-root .pl-page{padding:94px 0 24px}
#pl-root .pl-container{max-width:1320px}
#pl-root .pl-page-title{display:flex;align-items:end;justify-content:space-between;gap:22px;margin:0 0 14px}
#pl-root .pl-eyebrow,#pl-root .pl-overline{font-size:10px;font-weight:700;letter-spacing:.14em;color:#b5bec6}
#pl-root .pl-eyebrow{display:flex;align-items:center;gap:7px;margin-bottom:7px}
#pl-root .pl-status-dot{flex:none;display:inline-block;background:var(--pl-lime);width:7px;height:7px;border-radius:50%;box-shadow:0 0 9px rgba(212,255,88,.40)}
#pl-root .pl-page-title h1{font-size:clamp(24px,2.5vw,33px);line-height:1.16;font-weight:700;letter-spacing:-.035em;color:#fff;margin:0}
#pl-root .pl-page-title h1 span{font-size:.57em;font-weight:400;letter-spacing:-.01em;color:#a5acb4;white-space:nowrap}
#pl-root .pl-page-title p{font-size:12.5px;color:#9aa3aa;margin:0 0 2px;text-align:right;line-height:1.5;max-width:365px}
#pl-root .pl-shell{height:clamp(535px,calc(100dvh - 177px),770px);display:flex;flex-direction:column;border:1px solid #30343a;background:#0c0e11;border-radius:17px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.32)}
#pl-root .pl-shell-bar{flex:none;min-height:61px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #2a2e33;padding:10px 17px;background:#101317}
#pl-root .pl-shell-identity{display:flex;align-items:center;gap:9px;white-space:nowrap}
#pl-root .pl-shell-identity strong{font-size:11px;letter-spacing:.08em;font-weight:700}
#pl-root .pl-shell-subtitle{font-size:10px;color:#858f97;letter-spacing:.10em}
#pl-root .pl-top-actions{display:flex;align-items:center;gap:10px}
#pl-root .pl-scenario-select{display:flex;align-items:center;gap:8px;font-size:11px;color:#a9b1b8;white-space:nowrap}
#pl-root .pl-scenario-select select{font-size:12px;color:#f3f4f5;background:#191d22;border:1px solid #353a41;border-radius:9px;padding:9px 30px 9px 11px;max-width:200px;cursor:pointer}
#pl-root .pl-quiet-btn,#pl-root .pl-download-btn,#pl-root .pl-copy-btn{appearance:none;cursor:pointer;min-height:36px;border-radius:9px;border:1px solid #363b42;background:#171b20;color:#f4f6f8;padding:8px 12px;font-size:11px;font-weight:700;white-space:nowrap}
#pl-root .pl-download-btn{color:#141710;background:var(--pl-lime);border-color:var(--pl-lime)}
#pl-root .pl-download-btn span{margin-left:5px}
#pl-root .pl-workspace{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1.69fr) minmax(350px,.91fr);gap:12px;padding:12px}
#pl-root .pl-map-panel,#pl-root .pl-side-panel{min-height:0;border-radius:12px;border:1px solid var(--pl-line);background:#101317;overflow:hidden}
#pl-root .pl-map-panel{display:flex;flex-direction:column;padding:15px}
#pl-root .pl-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 13px}
#pl-root .pl-panel-head h2{font-size:18px;font-weight:700;line-height:1.2;margin:4px 0 0;letter-spacing:-.025em;color:#fff}
#pl-root .pl-example-pill,#pl-root .pl-pill{font-size:10px;color:#b7bfc5;border:1px solid #32383f;border-radius:999px;background:#171b20;padding:6px 9px;white-space:nowrap}
#pl-root .pl-path-controls{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}
#pl-root .pl-path-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:0;white-space:nowrap;flex:none;min-height:33px;padding:7px 10px;border:1px solid #343941;border-radius:8px;background:#15191e;color:#cbd2d7;font-size:11px;font-weight:600;cursor:pointer}
#pl-root .pl-path-btn:hover,#pl-root .pl-path-btn.active{background:#222918;color:#e6ffb4;border-color:#a1d53e}
#pl-root .pl-path-dot{width:6px;height:6px;display:inline-block;border-radius:100%;flex:none}
#pl-root .pl-path-dot.lime{background:#d4ff58}#pl-root .pl-path-dot.violet{background:#a997ff}#pl-root .pl-path-dot.white{background:#e3e5e8}#pl-root .pl-path-dot.orange{background:#ffb77b}
#pl-root .pl-map-area{flex:1;min-height:0;display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:9px;background:#090b0e;border:1px solid #242a2f}
#pl-root .pl-map{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-height:180px}
#pl-root .pl-route{fill:none;stroke-width:2.35;stroke-linecap:round;stroke-linejoin:round;opacity:.58;transition:opacity .23s,stroke-width .23s;pointer-events:stroke;cursor:pointer}
#pl-root .pl-route.is-dim{opacity:.065}#pl-root .pl-route.is-active{stroke-width:3.4;opacity:1;filter:drop-shadow(0 0 4px currentColor)}
#pl-root .pl-flow-dot{opacity:.8;transition:opacity .2s;pointer-events:none;filter:drop-shadow(0 0 4px currentColor)}
#pl-root .pl-flow-dot.is-dim{opacity:0}
#pl-root .pl-loop{opacity:.6}
#pl-root .pl-node{cursor:pointer;outline:none}
#pl-root .pl-node rect{fill:#11161a;stroke:#394249;stroke-width:1.2;transition:stroke .18s,fill .18s}
#pl-root .pl-node text{font-family:Arial,Helvetica,sans-serif;fill:#e0e4e7;font-size:11.5px;font-weight:600;user-select:none;pointer-events:none}
#pl-root .pl-node:hover rect,#pl-root .pl-node.is-selected rect{stroke:#d4ff58;fill:#202819}
#pl-root .pl-map-bottom{margin-top:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:35px}
#pl-root .pl-map-bottom>div{min-width:0;display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
#pl-root .pl-map-bottom strong{font-size:12px;white-space:nowrap;color:#fff}
#pl-root .pl-map-bottom span{font-size:11px;color:#9da6ad;line-height:1.45}
#pl-root .pl-map-pause{appearance:none;border:1px solid #32373e;border-radius:8px;padding:8px 10px;color:#b8c0c5;background:#171b1f;font-size:11px;cursor:pointer;white-space:nowrap}
#pl-root .pl-side-panel{display:flex;flex-direction:column;overflow:hidden}
#pl-root .pl-outcome{padding:15px 16px 11px;border-bottom:1px solid var(--pl-line);flex:none}
#pl-root .pl-outcome-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
#pl-root .pl-hero-metric span{font-size:12px;color:#b8c0c6;display:block}
#pl-root .pl-hero-metric strong{display:block;font-size:clamp(30px,3vw,42px);font-weight:700;line-height:1.13;letter-spacing:-.045em;color:var(--pl-lime);margin:2px 0 5px}
#pl-root .pl-hero-metric small{display:block;color:#8f9aa2;font-size:10px;line-height:1.4}
#pl-root .pl-kpi-row{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:11px}
#pl-root .pl-kpi-row>div{border-radius:9px;background:#171b20;border:1px solid #2a3036;padding:9px 10px}
#pl-root .pl-kpi-row span,#pl-root .pl-before-after span{display:block;color:#9da7ae;font-size:10px;line-height:1.3}
#pl-root .pl-kpi-row strong,#pl-root .pl-before-after strong{display:block;color:#f3f5f6;font-size:17px;letter-spacing:-.03em;margin-top:3px}
#pl-root .pl-before-after{display:flex;justify-content:space-between;gap:8px;margin-top:11px}
#pl-root .pl-before-after>div{flex:1;min-width:0}
#pl-root .pl-before-after>div:last-child{text-align:right}
#pl-root .pl-before-after strong{font-size:13px}
#pl-root .pl-comparison{height:5px;border-radius:999px;background:#293238;overflow:hidden;margin-top:7px}
#pl-root .pl-comparison span{display:block;height:100%;width:0;background:var(--pl-lime);transition:width .18s}
#pl-root .pl-controls{padding:12px 16px 12px;display:flex;flex-direction:column;gap:11px;flex:1;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#384047 transparent}
#pl-root .pl-control-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
#pl-root .pl-control-heading h2{font-size:15px;letter-spacing:-.01em;font-weight:700;margin:0;color:#fff}
#pl-root .pl-control-heading span{color:#86929b;font-size:10px}
#pl-root .pl-main-inputs,#pl-root .pl-advanced-fields{display:flex;flex-direction:column;gap:10px}
#pl-root .pl-input-item{min-width:0}
#pl-root .pl-input-item label{display:block;font-size:11px;color:#d0d7dc;margin-bottom:4px;font-weight:600}
#pl-root .pl-input-main{display:grid;grid-template-columns:minmax(60px,1fr) 112px;gap:11px;align-items:center}
#pl-root input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:6px;background:#3a4249;border-radius:999px;cursor:pointer;outline-offset:4px;accent-color:var(--pl-lime)}
#pl-root input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:var(--pl-lime);width:14px;height:14px;border:2px solid #151915;border-radius:100%}
#pl-root input[type=range]::-moz-range-thumb{background:var(--pl-lime);width:12px;height:12px;border:2px solid #151915;border-radius:100%}
#pl-root .pl-number-wrap{display:flex;align-items:center;gap:4px;padding:2px 7px;background:#15191e;border:1px solid #343b43;border-radius:7px;min-width:0;height:30px}
#pl-root .pl-number-wrap input{width:100%;min-width:0;font-size:12px;font-weight:700;text-align:right;background:transparent;color:#f1f4f6;border:0;outline:none}
#pl-root .pl-number-wrap span{font-size:10px;color:#a6b0b7;white-space:nowrap}
#pl-root .pl-advanced{border:1px solid #343941;border-radius:9px;background:#14181d}
#pl-root .pl-advanced summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;list-style:none;font-size:11px;color:#d9e0e3;font-weight:700;min-height:34px}
#pl-root .pl-advanced summary::-webkit-details-marker{display:none}
#pl-root .pl-advanced[open] summary>span{transform:rotate(180deg)}
#pl-root .pl-advanced-fields{padding:1px 11px 10px}
#pl-root .pl-advanced-note{margin:0 11px 11px;font-size:10px;color:#a4adb4;line-height:1.5}
#pl-root .pl-bottom-status{display:flex;gap:7px;align-items:start;margin-top:auto;color:#96a1a8;font-size:10px;line-height:1.3}
#pl-root .pl-bottom-status .pl-status-dot{margin-top:3px;width:6px;height:6px}
#pl-root .pl-shell-foot{flex:none;min-height:36px;padding:5px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #292e35;background:#0d1013}
#pl-root .pl-shell-foot span{font-size:10px;color:#8d99a1;line-height:1.4}
#pl-root .pl-copy-btn{padding:6px 10px;min-height:26px}
@media(max-width:1150px){#pl-root .pl-workspace{grid-template-columns:minmax(0,1.35fr) minmax(330px,.95fr)}#pl-root .pl-page-title p{display:none}}
@media(max-width:980px){#pl-root .pl-shell{height:auto;min-height:0}#pl-root .pl-workspace{display:flex;flex-direction:column}#pl-root .pl-map-area{min-height:390px}#pl-root .pl-side-panel{overflow:visible}#pl-root .pl-controls{overflow:visible}#pl-root .pl-main-inputs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}#pl-root .pl-map{height:390px}#pl-root .pl-workspace{padding:12px}}
@media(max-width:700px){#pl-root .pl-page{padding:88px 0 25px}#pl-root .pl-page-title h1{font-size:24px}#pl-root .pl-page-title h1 span{display:block;margin-top:3px;font-size:13px}#pl-root .pl-shell-bar{align-items:start;flex-direction:column;padding:12px}#pl-root .pl-top-actions{flex-wrap:wrap;width:100%}#pl-root .pl-scenario-select{flex:1}#pl-root .pl-scenario-select select{max-width:none;width:100%}#pl-root .pl-shell-subtitle{display:none}#pl-root .pl-map-panel{padding:10px}#pl-root .pl-panel-head{margin-bottom:9px}#pl-root .pl-path-controls{gap:5px}#pl-root .pl-path-btn{font-size:10px;padding:6px 7px;min-height:32px}#pl-root .pl-map-area{min-height:245px}#pl-root .pl-map{height:245px;min-height:200px}#pl-root .pl-map-bottom{align-items:start}#pl-root .pl-main-inputs{display:flex}#pl-root .pl-shell-foot{align-items:start}#pl-root .pl-shell-foot>span{max-width:70%}#pl-root .pl-side-panel{overflow:visible}#pl-root .pl-controls{overflow:visible}}
@media(prefers-reduced-motion:reduce){#pl-root .pl-flow-dot{display:none}#pl-root .pl-route,#pl-root .pl-comparison span{transition:none}}
/* Compact result stack leaves the advanced-options menu discoverable at 768px height. */
@media(min-width:981px){
  #pl-root .pl-outcome{padding:10px 14px 8px}
  #pl-root .pl-outcome-head{margin-bottom:4px}
  #pl-root .pl-hero-metric strong{font-size:clamp(28px,2.8vw,37px);line-height:1.08;margin:1px 0 3px}
  #pl-root .pl-hero-metric small{font-size:9px}
  #pl-root .pl-kpi-row{margin-top:7px;gap:7px}
  #pl-root .pl-kpi-row>div{padding:7px 9px}
  #pl-root .pl-kpi-row strong{font-size:15px;margin-top:1px}
  #pl-root .pl-before-after{margin-top:7px}
  #pl-root .pl-before-after strong{font-size:12px;margin-top:1px}
  #pl-root .pl-comparison{margin-top:5px;height:4px}
  #pl-root .pl-controls{padding:10px 14px 10px;gap:8px}
  #pl-root .pl-main-inputs{gap:7px}
  #pl-root .pl-input-item label{margin-bottom:3px}
  #pl-root .pl-input-main{grid-template-columns:minmax(60px,1fr) 110px;gap:9px}
}
/* On phones, retain sensible touch targets and allow horizontal map exploration. */
@media(max-width:700px){
  #pl-root .pl-map-area{justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
  #pl-root .pl-map{min-width:685px;width:685px;height:310px;max-width:none;flex:none}
  #pl-root .pl-map-bottom>div{display:block}
  #pl-root .pl-map-bottom span{display:block;margin-top:4px}
}
