.ladder-symbol{width:64px;height:36px;display:block;color:currentColor;overflow:visible}.ladder-symbol.compact{width:70px;height:34px}.symbol-stroke{fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:square;stroke-linejoin:round;vector-effect:non-scaling-stroke}.symbol-cutout{fill:var(--ladder-surface, #f8fafc)}.coil-cutout{rx:2}.symbol-mark,.block-mark{dominant-baseline:middle;fill:currentColor;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:800;pointer-events:none;text-anchor:middle}.symbol-mark{font-size:11px}.block-symbol{color:#334155;width:76px}.block-mark{dominant-baseline:middle;font-size:17px;font-weight:900;text-anchor:middle}.instruction-palette{width:280px;min-width:280px;border-left:1px solid #cbd5e1;background:#f8fafc;display:flex;flex-direction:column}.palette-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:10px;border-bottom:1px solid #e2e8f0}.palette-tabs button{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:6px;padding:6px 8px;font-size:12px;cursor:pointer}.palette-tabs button.active{border-color:var(--state-off);color:var(--state-off);background:var(--state-off-soft)}.palette-list{display:grid;gap:8px;padding:12px;overflow:auto}.palette-item{display:grid;grid-template-columns:76px minmax(0,1fr);gap:10px;align-items:center;border:1px solid #cbd5e1;border-radius:8px;padding:10px;background:#fff;color:#172033;cursor:grab;-webkit-user-select:none;user-select:none}.palette-item:active{cursor:grabbing}.palette-icon{min-width:70px;color:var(--state-off);display:inline-flex;align-items:center;justify-content:center;position:relative}.palette-coil{color:var(--state-off)}.palette-timer,.palette-counter,.palette-comparison,.palette-math,.palette-res{color:#334155}.palette-copy{min-width:0;display:grid;gap:2px}.palette-copy strong{color:#172033;font-size:13px}.palette-copy small{color:#64748b;font-size:11px}.rung-editor{--ladder-surface: #f8fafc;min-width:0;min-height:0;height:100%;flex:1 1 auto;display:flex;flex-direction:column;background:#f1f5f9;color:#172033}.rung-editor-toolbar,.rung-card-header{display:flex;align-items:center;gap:8px}.rung-editor-toolbar{flex:0 0 auto;padding:10px 12px;border-bottom:1px solid #cbd5e1;background:#fff}.rung-editor button,.floating-menu button,.tag-popover button{border:1px solid #cbd5e1;background:#fff;color:#172033;border-radius:6px;padding:6px 9px;cursor:pointer}.delete-confirmation{display:inline-flex;align-items:center;gap:4px}.rung-editor button.danger-button{border-color:#fed7aa;background:#fff7ed;color:#9a3412}.rung-editor-list{min-height:0;flex:1 1 auto;overflow:auto;padding:18px;display:grid;align-content:start;gap:16px}.empty-rung-workspace{min-height:220px;border:1px dashed #94a3b8;border-radius:8px;background:#fff;display:grid;place-content:center;gap:12px;color:#64748b}.rung-card{background:#fff;border:1px solid #d5dee8;border-radius:8px;padding:12px;box-shadow:0 8px 22px #0f172a14;overflow:visible}.rung-card-header{margin-bottom:18px}.rung-card-header input{flex:1;min-width:220px;border:1px solid #cbd5e1;border-radius:6px;padding:7px 9px}.rung-number{font-weight:800;color:#334155;cursor:grab;-webkit-user-select:none;user-select:none}.validation-pill{color:#92400e;background:#fef3c7;border:1px solid #f59e0b;border-radius:999px;padding:3px 8px;font-size:12px}.rung-strip{min-height:56px;display:grid;grid-template-columns:4px 1fr 4px;gap:0;align-items:center;background:var(--ladder-surface);border:1px solid #e2e8f0;border-radius:4px;overflow:visible;transition:border-color .12s ease,box-shadow .12s ease,background .12s ease}.rung-strip.drag-over{border-color:#60a5fa;box-shadow:0 0 0 2px #3b82f61f}.power-rail{background:#2f3b45;min-height:100%}.ladder-lane{min-width:0;display:flex;align-items:flex-start;padding:4px 0;position:relative;min-height:56px}.ladder-lane:has(.block-chip){min-height:80px;padding-top:24px}.ladder-lane:before{content:"";position:absolute;top:28px;left:0;right:0;height:2px;background:var(--state-off);z-index:0}.ladder-lane:has(.block-chip):before{top:48px}.rung-elements{min-width:0;display:flex;align-items:flex-start;position:relative;z-index:1}.input-elements{justify-content:flex-start}.output-elements{justify-content:flex-end}.rung-wire{flex:1 1 auto;min-width:72px;height:2px;background:transparent}.drop-zone{width:14px;align-self:center;flex:0 0 14px;height:48px;border-radius:3px;position:relative;transition:flex-basis .12s ease,background .12s ease}.drop-zone.active{flex-basis:24px}.drop-zone.active:after{content:"";position:absolute;top:12px;left:3px;right:3px;bottom:12px;background:#3b82f62e;border:2px solid var(--state-off);border-radius:4px}.element-chip{width:90px;height:48px;padding:0;background:transparent;color:#172033;display:flex;flex-direction:column;align-items:center;gap:0;cursor:pointer;position:relative;z-index:1}.element-symbol{color:inherit;height:36px;display:flex;align-items:center;justify-content:center;width:76px;padding:0;position:absolute;top:6px;left:50%;transform:translate(-50%);z-index:2}.element-tag{font-size:9px;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:88px;text-align:center;line-height:14px;height:14px;position:absolute;top:34px;left:1px;right:1px}.element-value{display:none}.element-chip:hover{background:#3b82f614;border-radius:3px}.block-chip:hover{background:#fff;border-color:var(--state-off);border-radius:4px;box-shadow:0 0 0 2px #2563eb1f}.element-chip:hover>.chip-actions{display:flex}.branch-chip:hover>.chip-actions{display:none}.branch-chip.actions-open>.chip-actions{display:flex}.element-chip.drop-before:before,.element-chip.drop-after:before{content:"";position:absolute;top:10px;bottom:10px;width:18px;background:#3b82f62e;border:2px solid var(--state-off);border-radius:4px;z-index:5}.element-chip.drop-before:before{right:calc(100% + 6px)}.element-chip.drop-after:before{left:calc(100% + 6px)}.element-chip.drop-branch{background:#3b82f614;border-radius:4px;box-shadow:inset 0 0 0 2px var(--state-off)}.element-chip.drop-branch:before{content:"";position:absolute;left:-10px;right:-10px;top:22px;bottom:-20px;border-left:2px solid rgba(37,99,235,.42);border-right:2px solid rgba(37,99,235,.42);border-bottom:2px solid rgba(37,99,235,.42);border-radius:0 0 5px 5px;pointer-events:none;z-index:4}.element-chip.drop-branch:after{content:"";position:absolute;left:50%;bottom:-30px;width:30px;height:16px;transform:translate(-50%);background:#3b82f61a;border:2px solid rgba(37,99,235,.42);border-radius:4px;pointer-events:none;z-index:5}.contact-chip,.coil-chip{color:var(--state-off)}.block-chip{width:190px;height:auto;min-height:106px;border:2px solid #334155;border-radius:4px;background:#fff;color:#111827;padding:0 7px 7px;box-sizing:border-box}.branch-chip{width:auto;min-width:126px;height:auto;min-height:48px;align-items:stretch;border:0;border-radius:0;background:transparent;padding:0 14px;cursor:default}.element-chip.energized{color:var(--state-on)}.branch-chip.energized>.branch-paths>.branch-path.has-next>.branch-rail{background:var(--state-on)}.contact-chip .element-symbol,.coil-chip .element-symbol{color:var(--state-off)}.block-chip .element-symbol{color:#111827;top:-24px;left:50%;width:86px;height:22px;justify-content:center;transform:translate(-50%);background:transparent;border:0;padding:0;pointer-events:none}.block-chip .block-symbol{width:62px;height:22px}.block-details{width:100%;margin-top:42px;display:grid;gap:4px;color:#334155}.block-tag-line{position:absolute;top:10px;right:auto;left:8px;min-width:0;width:min(118px,calc(100% - 16px));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:18px;font-weight:900;color:#172033;border:1px solid #cbd5e1;border-radius:4px;background:#f8fafc;padding:1px 20px 1px 7px;z-index:3}.block-tag-line:after{content:"";position:absolute;top:50%;right:8px;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #334155;transform:translateY(-30%)}.block-tag-line.missing-tag{color:#b45309;background:#fffbeb;border:1px solid #fbbf24;border-radius:4px;padding:2px 4px}.block-io-grid{display:grid;gap:2px}.block-io-row{min-width:0;display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:4px;font-size:9px;line-height:11px}.block-io-row span{color:#111827;font-weight:800}.block-io-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#111827;font-weight:700}.block-io-row.output span,.block-io-row.output strong{color:#111827}.block-io-row.bool-off strong{color:var(--state-off)}.block-io-row.bool-on strong,.element-chip.energized .element-symbol,.element-chip.energized .element-tag,.element-chip.energized .element-value{color:var(--state-on)}.element-chip.energized.block-chip .element-symbol,.element-chip.energized.block-chip .block-io-row span,.element-chip.energized.block-chip .block-io-row strong{color:#111827}.chip-actions{display:none;align-items:center;gap:4px;position:absolute;top:-24px;left:50%;transform:translate(-50%);background:#fff;border:1px solid #cbd5e1;border-radius:4px;padding:2px 4px;box-shadow:0 2px 8px #0000001f;z-index:20;white-space:nowrap}.chip-actions button{padding:2px 5px;font-size:10px;white-space:nowrap}.branch-paths{display:grid;grid-auto-rows:minmax(48px,auto);align-items:stretch;width:max-content;min-width:100%;position:relative;background:var(--ladder-surface)}.branch-path{min-width:100%;width:100%;display:flex;align-items:stretch;gap:4px;padding:0 12px;box-sizing:border-box;position:relative;font-size:11px;font-family:ui-monospace,monospace;border-radius:4px;transition:background .12s ease,box-shadow .12s ease}.branch-rail{position:absolute;top:24px;height:100%;width:2px;background:var(--state-off);pointer-events:none;z-index:3}.branch-rail-left{left:-6px}.branch-rail-right{right:-6px}.branch-path:before{content:"";position:absolute;top:24px;left:-6px;right:-6px;height:2px;background:var(--state-off);z-index:0}.branch-path.drag-over{background:#3b82f61f;box-shadow:inset 0 0 0 2px #3b82f6}.branch-path.empty-path.drag-over:after{content:"";position:absolute;left:36px;top:12px;width:24px;height:24px;background:#3b82f62e;border:2px solid var(--state-off);border-radius:4px;z-index:4}.branch-path .drop-zone{width:10px;height:48px;flex:0 0 10px;align-self:flex-start}.branch-path .drop-zone.active{flex-basis:20px}.branch-path>.branch-chip{flex:1 1 auto;align-self:flex-start;min-width:126px}.branch-path>.branch-chip>.branch-paths{width:100%}.floating-menu,.tag-popover{position:fixed;z-index:30;display:grid;gap:8px;width:260px;padding:12px;background:#fff;border:1px solid #94a3b8;border-radius:8px;box-shadow:0 14px 32px #0f172a29}.quick-add-menu{width:360px;max-height:min(520px,calc(100vh - 32px));grid-template-rows:auto minmax(0,1fr)}.quick-search{display:grid;gap:4px;font-size:11px;font-weight:700;color:#475569}.quick-search input{width:100%;border:1px solid #cbd5e1;border-radius:6px;padding:7px 9px;color:#172033}.quick-menu-list{min-height:0;max-height:390px;overflow:auto;display:grid;gap:6px;padding-right:2px}.floating-menu button{display:grid;grid-template-columns:76px 52px 1fr;gap:8px;align-items:center;text-align:left}.quick-empty{color:#64748b;padding:12px;text-align:center}.quick-symbol{color:var(--state-off);display:inline-flex;justify-content:center}.quick-symbol-coil{color:var(--state-off)}.quick-symbol-timer,.quick-symbol-counter,.quick-symbol-comparison,.quick-symbol-math,.quick-symbol-res{color:#334155}.floating-menu small{color:#64748b}.tag-popover{position:fixed;z-index:30;display:grid;gap:8px;width:220px;padding:12px;background:#fff;border:1px solid #94a3b8;border-radius:8px;box-shadow:0 14px 32px #0f172a29}.tag-popover label{display:grid;gap:6px;font-size:12px;color:#475569;font-weight:700}.tag-popover input{border:1px solid #cbd5e1;border-radius:6px;padding:8px}.popover-actions{display:flex;justify-content:flex-end;gap:8px}.mode-selector{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;padding:7px 9px;cursor:pointer;font-size:13px}.mode-selector:disabled{opacity:.55;cursor:not-allowed}.problem-picker{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;padding:7px 9px;cursor:pointer;font-size:13px;min-width:200px}.problem-picker optgroup{font-weight:800;color:#334155}.problem-picker option{font-weight:400;color:#172033}.problem-picker-empty{font-size:13px;color:#64748b;padding:7px 9px}.results-modal{border:none;border-radius:12px;padding:0;width:520px;max-width:90vw;max-height:80vh;overflow:hidden;box-shadow:0 20px 60px #0000004d}.results-modal::backdrop{background:#00000080}.results-modal-content{display:flex;flex-direction:column;max-height:80vh;background:#fff}.results-modal-title{margin:0;padding:20px 24px 16px;font-size:18px;font-weight:800;color:#0f172a;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:12px}.results-count{font-size:14px;font-weight:700;color:#64748b}.results-list{flex:1;overflow-y:auto;padding:12px 24px;display:grid;gap:8px}.results-row{display:grid;grid-template-columns:24px 1fr;gap:6px 8px;align-items:start;padding:10px 12px;border-radius:8px;border:1px solid #e2e8f0}.results-pass{background:#f0fdf4;border-color:#bbf7d0}.results-fail{background:#fff7ed;border-color:#fed7aa}.results-icon{font-size:16px;font-weight:800;line-height:1.5;text-align:center}.results-pass .results-icon{color:#16a34a}.results-fail .results-icon{color:#dc2626}.results-name{font-weight:700;font-size:14px;line-height:1.5}.results-failure-detail{grid-column:2;display:grid;gap:2px;font-size:12px;color:#64748b;margin-top:4px;padding:6px 8px;background:#fed7aa4d;border-radius:4px;border:1px solid #fed7aa}.results-modal-actions{display:flex;gap:8px;padding:16px 24px;border-top:1px solid #e2e8f0;background:#f8fafc;justify-content:flex-end}.results-modal-empty{padding:32px 24px;color:#64748b;text-align:center;font-size:14px}.results-btn-accept,.results-btn-run-again,.results-btn-try-again{border:1px solid #cbd5e1;border-radius:6px;padding:8px 16px;cursor:pointer;font-size:13px;font-weight:600;background:#fff;color:#172033}.results-btn-accept{background:#0f172a;color:#fff;border-color:#0f172a}.results-btn-run-again{background:#2563eb;color:#fff;border-color:#2563eb}.results-btn-accept:hover{background:#1e293b}.results-btn-run-again:hover{background:#1d4ed8}.results-btn-try-again:hover{background:#f1f5f9}.run-tests-button{background:#2563eb;color:#fff;border:none;border-radius:6px;padding:8px 14px;font-size:13px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:8px;white-space:nowrap}.run-tests-button:hover:not(:disabled){background:#1d4ed8}.run-tests-button:disabled{opacity:.75;cursor:not-allowed}@keyframes spin{to{transform:rotate(360deg)}}.run-tests-spinner{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;flex-shrink:0;animation:spin .7s linear infinite}.speed-selector{display:flex;border:1px solid #cbd5e1;border-radius:6px;overflow:hidden}.speed-btn{border:none;border-right:1px solid #cbd5e1;background:#fff;color:#475569;padding:6px 10px;font-size:12px;font-weight:700;cursor:pointer;line-height:1}.speed-btn:last-child{border-right:none}.speed-btn.active{background:#1e3a8a;color:#fff}.speed-btn:hover:not(.active){background:#f1f5f9}.export-menu-container{position:relative}.export-menu-trigger{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;padding:7px 9px;cursor:pointer;font-size:13px;white-space:nowrap}.export-menu-trigger:hover{background:#f1f5f9}.export-dropdown{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 4px 16px #0000001f;z-index:100;min-width:160px;overflow:hidden;display:flex;flex-direction:column}.export-dropdown button{border:none;background:#fff;color:#172033;padding:10px 14px;cursor:pointer;font-size:13px;text-align:left}.export-dropdown button:hover{background:#f1f5f9}.share-link-field{position:absolute;top:calc(100% + 4px);right:0;width:320px;border:1px solid #cbd5e1;border-radius:6px;padding:7px 10px;font-size:12px;background:#0f172a;color:#fff;z-index:101;box-shadow:0 4px 16px #0000001f}.rung-editor-container{position:relative;min-width:0;min-height:0;height:100%;flex:1 1 auto;display:flex;flex-direction:column}.rung-editor-lock-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:#0f172a1f;pointer-events:none}.rung-editor-lock-icon{font-size:32px;line-height:1}.rung-editor-lock-label{font-size:13px;font-weight:700;color:#334155;background:#ffffffeb;padding:4px 12px;border-radius:6px;box-shadow:0 1px 4px #0000001a}.hmi-panel{--hmi-green: #22c55e;--hmi-red: #ef4444;--hmi-yellow: #eab308;--hmi-blue: #3b82f6;--hmi-gray: #6b7280;min-width:0;min-height:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr) 280px;background:#e8eef6;overflow:hidden}.hmi-canvas{min-width:0;min-height:0;position:relative;overflow:hidden;background-color:#eef4fb;background-image:radial-gradient(circle at 1px 1px,rgb(71 85 105 / .16) 1px,transparent 0),linear-gradient(135deg,#f8fbff,#eef4fb 52%,#e6eef8);background-size:20px 20px,100% 100%;box-shadow:inset 0 0 0 1px #94a3b852}.hmi-canvas.drag-over{box-shadow:inset 0 0 0 2px var(--hmi-blue)}.hmi-canvas-label{position:absolute;top:0;left:0;z-index:4;padding:5px 9px;border:0;border-right:1px solid rgb(37 99 235 / .18);border-bottom:1px solid rgb(37 99 235 / .18);border-radius:0 0 8px;background:#ffffffd1;color:#1e3a5f;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;box-shadow:inset 0 1px #ffffffbf,0 8px 22px #0f172a14;pointer-events:none}.hmi-widget-frame{position:absolute;display:grid;place-items:stretch;border:2px solid transparent;border-radius:10px;-webkit-user-select:none;user-select:none;cursor:grab;touch-action:none}.hmi-widget-frame.selected{border:2px solid var(--hmi-blue);box-shadow:0 0 0 4px #3b82f629,0 14px 32px #0f172a21}.hmi-widget-frame:active{cursor:grabbing}.hmi-warning-badge{position:absolute;top:-8px;right:-8px;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:var(--hmi-yellow);color:#111827;font-size:12px;font-weight:900;z-index:5}.hmi-resize-handle{position:absolute;background:var(--hmi-blue);border:2px solid #ffffff;box-shadow:0 0 0 1px #2563eb59,0 5px 14px #0f172a47;z-index:30;pointer-events:auto}.hmi-resize-handle:after{content:"";position:absolute;top:-8px;right:-8px;bottom:-8px;left:-8px}.hmi-resize-handle.nw,.hmi-resize-handle.ne,.hmi-resize-handle.se,.hmi-resize-handle.sw{width:20px;height:20px;border-radius:6px}.hmi-resize-handle.nw{top:-11px;left:-11px;cursor:nwse-resize}.hmi-resize-handle.ne{top:-11px;right:-11px;cursor:nesw-resize}.hmi-resize-handle.sw{bottom:-11px;left:-11px;cursor:nesw-resize}.hmi-resize-handle.se{bottom:-11px;right:-11px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 38%,#ffffff 38% 47%,transparent 47% 58%,#ffffff 58% 67%,transparent 67%),var(--hmi-blue)}.hmi-resize-handle.n,.hmi-resize-handle.s{left:22px;right:22px;height:14px;border:0;border-radius:999px;background:#3b82f64d;box-shadow:inset 0 0 0 1px #3b82f62e;cursor:ns-resize}.hmi-resize-handle.n{top:-9px}.hmi-resize-handle.s{bottom:-9px}.hmi-resize-handle.e,.hmi-resize-handle.w{top:22px;bottom:22px;width:14px;border:0;border-radius:999px;background:#3b82f64d;box-shadow:inset 0 0 0 1px #3b82f62e;cursor:ew-resize}.hmi-resize-handle.e{right:-9px}.hmi-resize-handle.w{left:-9px}.hmi-widget-palette{min-width:280px;border-left:1px solid #334155;background:#f8fafc;display:flex;flex-direction:column}.hmi-palette-title{padding:12px;border-bottom:1px solid #e2e8f0;color:#172033;font-weight:900}.hmi-palette-list{display:grid;gap:8px;padding:12px;overflow:auto}.hmi-palette-item{display:grid;grid-template-columns:82px minmax(0,1fr);gap:12px;align-items:center;border:1px solid #cbd5e1;border-radius:8px;min-height:60px;padding:9px 10px;background:#fff;color:#172033;cursor:grab}.hmi-palette-item:active{cursor:grabbing}.hmi-palette-icon{width:64px;height:38px;display:grid;place-items:center;color:var(--hmi-blue)}.hmi-palette-icon.numeric-display{width:56px;height:30px;justify-self:center}.hmi-palette-icon b,.hmi-icon-numeric{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:18px;color:#172033}.hmi-icon-numeric{display:grid;place-items:center;width:48px;height:28px;border:1px solid #94a3b8;border-radius:6px;background:linear-gradient(180deg,#f8fafc,#eaf2fb);box-shadow:inset 0 1px #ffffffd9;font-style:normal;font-weight:900;font-size:16px;line-height:1}.hmi-palette-item span:last-child{min-width:0;display:flex;align-items:center;height:100%}.hmi-palette-item strong{font-size:14px;line-height:1.15;overflow-wrap:anywhere}.hmi-icon-button,.hmi-icon-light,.hmi-icon-tank,.hmi-icon-conveyor,.hmi-icon-motor{display:block}.hmi-icon-button{width:32px;height:32px;border-radius:50%;background:var(--hmi-green);box-shadow:inset 0 -5px #0000002e,0 3px 8px #0003}.hmi-icon-light{width:28px;height:28px;border-radius:50%;background:var(--hmi-yellow);box-shadow:0 0 12px 4px #eab3084d}.hmi-icon-tank{width:46px;height:42px;overflow:visible}.hmi-icon-tank-shadow{fill:#0f172a1f;transform:translate(2px,2px)}.hmi-icon-tank-glass{fill:#f8fafc;stroke:#334155;stroke-width:2.4;stroke-linejoin:round}.hmi-icon-tank-fill{fill:var(--hmi-blue);stroke:none}.hmi-icon-tank-shine{fill:none;stroke:#ffffffad;stroke-width:2.2;stroke-linecap:round}.hmi-icon-conveyor{width:44px;height:22px;border:2px solid #334155;border-radius:4px;background:repeating-linear-gradient(135deg,#94a3b8 0,#94a3b8 8px,#e2e8f0 8px,#e2e8f0 16px)}.hmi-icon-motor{width:58px;height:34px;fill:#e2e8f0;stroke:#334155;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.hmi-icon-motor circle,.hmi-icon-motor path:last-child{fill:none;stroke:var(--hmi-blue);stroke-width:3}.hmi-pushbutton{width:100%;height:100%;border:0;background:transparent;display:grid;place-items:center;gap:2px;color:#f8fafc;cursor:pointer;transition:transform .12s ease}.hmi-pushbutton-face{width:clamp(28px,62%,160px);aspect-ratio:1;border-radius:50%;background:var(--hmi-widget-color);box-shadow:inset 0 -9px #0000003d,inset 0 4px #ffffff2e,0 10px 16px #00000052;transition:transform .1s ease,box-shadow .1s ease,filter .1s ease}.hmi-pushbutton.pressed{transform:translateY(3px)}.hmi-pushbutton.pressed .hmi-pushbutton-face{transform:scale(.9) translateY(4px);background:color-mix(in srgb,var(--hmi-widget-color) 48%,#020617);box-shadow:inset 0 8px 14px #0000008c,inset 0 -2px #ffffff14,0 2px 5px #00000038;filter:saturate(.9)}.hmi-pushbutton strong,.hmi-indicator strong,.hmi-motor strong,.hmi-tank strong,.hmi-conveyor strong{color:#172033;text-shadow:0 1px 0 rgb(255 255 255 / .52);font-size:13px}.hmi-pushbutton small{color:#475569;font-size:10px}.hmi-indicator{width:100%;height:100%;display:grid;place-items:center;gap:6px}.hmi-indicator-lens{width:min(54px,58%);aspect-ratio:1;border-radius:50%;background:var(--hmi-widget-color);box-shadow:inset 0 -8px #0000002e}.hmi-indicator.active .hmi-indicator-lens{box-shadow:inset 0 -8px #0000002e,0 0 12px 4px color-mix(in srgb,var(--hmi-widget-color) 25%,transparent)}.hmi-numeric-display{width:100%;height:100%;display:grid;align-content:center;gap:6px;border:1px solid #38bdf8;border-radius:10px;background:linear-gradient(180deg,rgb(56 189 248 / .11),transparent 42%),linear-gradient(180deg,#12345c,#071829);box-shadow:inset 0 1px #ffffff1a,0 10px 24px #0f172a2e;padding:10px 12px;box-sizing:border-box}.hmi-numeric-display span{color:#bfdbfe;font-size:12px;font-weight:800}.hmi-numeric-display strong{display:flex;align-items:baseline;gap:6px;color:#ecfeff;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:clamp(20px,34%,36px)}.hmi-numeric-display strong em{color:#bfdbfe;font-size:.48em;font-style:normal;font-weight:800;letter-spacing:0}.hmi-motor{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}.hmi-motor svg{width:100%;height:auto;max-height:calc(100% - 18px);flex:0 1 auto;min-height:0;overflow:visible}.hmi-motor-body{fill:var(--hmi-blue);stroke:#e5e7eb;stroke-width:3;transition:fill .2s ease}.hmi-motor.running .hmi-motor-body{fill:var(--hmi-green)}.hmi-motor-endcap,.hmi-motor-foot{fill:#334155;stroke:#e5e7eb;stroke-width:3;stroke-linejoin:round}.hmi-motor-shaft{fill:none;stroke:#e5e7eb;stroke-width:6;stroke-linecap:round}.hmi-motor-rotor{transform-origin:57px 45px;fill:none;stroke:#f8fafc;stroke-width:3.5;stroke-linecap:round}.hmi-motor.running .hmi-motor-rotor{animation:hmi-rotate 2s linear infinite}.hmi-tank{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}.hmi-tank svg{width:100%;height:auto;max-height:calc(100% - 14px);flex:0 1 auto;min-height:0;filter:drop-shadow(0 9px 16px rgb(15 23 42 / .13));overflow:visible}.hmi-motor strong,.hmi-tank strong{margin-top:-2px}.hmi-tank-shadow{fill:#0f172a29;transform:translate(4px,4px)}.hmi-tank-glass{fill:#f8fafcd1;stroke:#24364f;stroke-width:3}.hmi-tank-cap,.hmi-tank-base{fill:#dbeafe;stroke:#24364f;stroke-width:3;stroke-linejoin:round}.hmi-tank-frame{fill:none;stroke:#24364f;stroke-width:3}.hmi-tank-fill{fill:var(--hmi-widget-color);opacity:.9;transition:height .3s ease,y .3s ease}.hmi-tank-liquid-surface{fill:color-mix(in srgb,var(--hmi-widget-color) 78%,#ffffff)}.hmi-tank-highlight{fill:#ffffff6b}.hmi-tank text{fill:#0f172a;font-weight:900;text-anchor:middle;font-family:inherit;paint-order:stroke;stroke:#ffffffe6;stroke-width:4px}.hmi-tank-percent{font-size:16px}.hmi-conveyor{width:100%;height:100%;display:grid;grid-template-rows:1fr auto;gap:4px;align-items:center}.hmi-conveyor-belt{height:48px;border:2px solid #e5e7eb;border-radius:8px;background-color:var(--hmi-gray);background-image:repeating-linear-gradient(135deg,rgb(255 255 255 / .28) 0 10px,transparent 10px 20px)}.hmi-conveyor.running .hmi-conveyor-belt{background-color:var(--hmi-green);animation:hmi-conveyor-scroll .5s linear infinite}.hmi-conveyor-rollers{position:absolute;left:14px;right:14px;bottom:22px;display:flex;justify-content:space-between}.hmi-conveyor-rollers span{width:16px;height:16px;border-radius:50%;background:#0f172a;border:2px solid #e5e7eb}.hmi-config-popover{position:absolute;width:280px;display:grid;gap:10px;z-index:20;padding:12px;border:1px solid #334155;border-radius:10px;background:#f8fafc;color:#172033;box-shadow:0 18px 48px #00000059}.hmi-config-popover header{display:flex;align-items:center;justify-content:space-between}.hmi-config-popover button,.hmi-config-popover input,.hmi-config-popover select{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;padding:6px 8px}.hmi-config-popover label{display:grid;gap:4px;font-size:12px;font-weight:800;color:#475569}.hmi-delete-widget{border-color:#fecaca!important;background:#fff7f7!important;color:#991b1b!important}@keyframes hmi-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hmi-conveyor-scroll{0%{background-position:0 0}to{background-position:20px 0}}.panel-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:12px;height:100%;overflow:auto}.panel-section,.problem-panel,.test-panel,.table-panel{background:#fff;border:1px solid #cbd5e1;border-radius:8px;padding:12px;color:#172033}.panel-section h3,.problem-panel h3{margin:0 0 10px;color:#334155}.io-panel{height:100%;min-height:0;display:grid;grid-template-rows:auto 1fr;gap:10px;color:#172033}.io-panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.io-panel-header h3{margin:0;color:#334155}.io-summary{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.io-summary span{border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#475569;font-size:11px;font-weight:800;padding:4px 8px}.io-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;min-height:0;overflow:auto;align-content:start}.io-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;border:1px solid #cbd5e1;border-left-width:4px;border-radius:6px;background:#fff;padding:8px 10px}.io-row-input,.io-row-output{border-left-color:var(--state-off)}.io-row-internal{border-left-color:#64748b}.io-row-system{border-left-color:#334155}.io-tag-meta{display:grid;gap:2px;min-width:0}.io-tag-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.io-tag-meta span{display:flex;align-items:center;gap:6px;color:#64748b;font-size:12px}.io-tag-meta b{color:#334155;font-size:10px;letter-spacing:0}.bool-inputs{display:flex;align-items:center;gap:8px}.switch input{display:none}.switch span{display:block;width:42px;height:22px;border-radius:999px;background:var(--state-off);position:relative}.switch span:after{content:"";width:18px;height:18px;border-radius:50%;background:#fff;position:absolute;top:2px;left:2px;transition:transform .12s ease}.switch input:checked+span{background:var(--state-on)}.switch input:checked+span:after{transform:translate(20px)}.momentary,.panel-actions button,.table-panel button,.test-panel button{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;padding:6px 9px;cursor:pointer}.indicator{width:18px;height:18px;border-radius:50%;background:var(--state-off);box-shadow:0 0 0 2px var(--state-off-border)}.indicator.on{background:var(--state-on);box-shadow:0 0 0 2px var(--state-on-border),0 0 16px color-mix(in srgb,var(--state-on) 42%,transparent)}.numeric-input,.numeric-display,.structured-display,.table-panel input,.table-panel select{border:1px solid #cbd5e1;border-radius:6px;padding:7px 8px;background:#fff;min-width:92px}.numeric-display,.structured-display{background:#f8fafc}.structured-editor{min-width:190px;display:grid;gap:6px}.structured-preset{display:grid;grid-template-columns:78px minmax(74px,1fr);align-items:center;gap:6px;color:#475569;font-size:11px;font-weight:800}.structured-preset input{min-width:0;width:100%;border:1px solid #cbd5e1;border-radius:6px;padding:5px 7px;color:#172033}.structured-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;font-size:11px;color:#475569}.structured-status span{min-width:0;display:flex;justify-content:space-between;gap:6px}.structured-status b{color:#334155;font-weight:800}.structured-status strong,.bool-text-on,.bool-text-off{font-weight:800}.bool-text-on{color:var(--state-on)}.bool-text-off{color:var(--state-off)}.structured-flags{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:11px;color:#475569}.structured-flags label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.structured-flags input{width:13px;height:13px;accent-color:var(--state-on)}.structured-flags .bool-field.on,.tag-structured-flags .bool-field.on{color:var(--state-on)}.structured-flags .bool-field.off,.tag-structured-flags .bool-field.off{color:var(--state-off)}.table-panel{height:100%;overflow:auto}.panel-actions{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.table-panel table{width:100%;border-collapse:collapse}.table-panel th,.table-panel td{border-bottom:1px solid #e2e8f0;padding:8px;text-align:left;vertical-align:middle}.table-panel th button{border:0;padding:0;background:transparent;font-weight:800;color:#334155}.forced-row{background:#fffbeb}.tag-table input{width:100%;min-width:0;font-size:12px;padding:4px 6px}.tag-table select{font-size:12px;padding:4px;width:100%}.tag-table td,.tag-table th{padding:5px 4px;font-size:12px}.tag-table .col-name{width:38%}.tag-table .col-type{width:20%}.tag-table .col-value{width:37%}.tag-table .col-delete{width:5%}.bool-toggle{border:1px solid #cbd5e1;border-radius:4px;padding:3px 8px;font-size:11px;font-weight:700;cursor:pointer;width:100%}.bool-toggle.on{background:var(--state-on-soft);color:var(--state-on);border-color:var(--state-on)}.bool-toggle.off{background:var(--state-off-soft);color:var(--state-off);border-color:var(--state-off)}.value-input{width:100%;font-size:12px;padding:3px 6px;border:1px solid #cbd5e1;border-radius:4px}.value-display{font-size:11px;color:#475569}.force-cell{display:grid;grid-template-columns:20px minmax(86px,1fr);gap:6px;align-items:center}.force-cell input[type=checkbox]{width:16px}.tag-structured-cell{display:grid;gap:5px;min-width:150px}.tag-structured-cell label{min-width:0;display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:5px;color:#475569;font-size:10px;font-weight:800}.tag-structured-cell input[type=number]{min-width:0;width:100%;border:1px solid #cbd5e1;border-radius:4px;padding:3px 4px;font-size:11px}.tag-structured-flags{display:flex;flex-wrap:wrap;gap:4px 8px;color:#475569;font-size:10px;font-weight:800}.tag-structured-flags label{display:inline-flex;grid-template-columns:none;gap:3px;align-items:center;white-space:nowrap}.tag-structured-flags input{width:13px;accent-color:var(--state-on)}.tag-structured-reset{border:1px solid #cbd5e1;border-radius:5px;padding:3px 6px;background:#fff;color:#475569;font-size:10px;font-weight:800;cursor:pointer}.tag-counter-toggle{width:auto;min-width:66px;padding:3px 8px}.tag-structured-reset{color:#334155;background:#f8fafc;border-color:#cbd5e1}.problem-title-row{display:flex;align-items:start;justify-content:space-between;gap:12px}.problem-title-row h2{margin:0}.problem-title-row span{color:#f59e0b;letter-spacing:0}.problem-panel ul{padding-left:20px}.tag-pill-list{display:flex;flex-wrap:wrap;gap:6px}.tag-pill-list span{background:var(--state-off-soft);border:1px solid var(--state-off-border);color:var(--state-off);border-radius:999px;padding:4px 8px;font-size:12px}.test-list{display:grid;gap:8px}.test-list details{border:1px solid #cbd5e1;border-radius:8px;padding:8px}.test-list summary{display:grid;grid-template-columns:24px 1fr auto;gap:8px;align-items:center;cursor:pointer}.passed-test{background:var(--state-on-soft)}.failed-test{background:#fff7ed}.failure-row{display:grid;gap:4px;border-top:1px solid #fed7aa;padding-top:8px;margin-top:8px}.empty-panel-text{color:#64748b;font-size:13px}.app-shell{min-width:1280px;height:100vh;min-height:0;display:grid;grid-template-rows:auto 1fr auto;background:#dbe4ee;color:#172033}.top-bar{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#fff;border-bottom:1px solid #cbd5e1;box-shadow:0 1px 3px #0f172a14}.brand{font-weight:800;color:#0f172a;margin-right:8px;white-space:nowrap}.top-bar label{display:flex;align-items:center;gap:6px;color:#475569;font-size:12px;font-weight:700}.top-bar select,.top-bar button,.import-button{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;padding:7px 9px;cursor:pointer;font-size:13px}.clear-all-button{font-weight:800}.clear-all-confirmation{display:flex;align-items:center;gap:6px;max-width:420px;padding:4px 6px;border:1px solid #fecaca;border-radius:6px;background:#fff7f7;color:#991b1b;font-size:12px;font-weight:800}.clear-all-confirmation span{min-width:0;overflow-wrap:anywhere}.clear-all-confirmation .danger-button{border-color:#ef4444;background:#fee2e2;color:#991b1b;font-weight:900}.top-bar button:disabled{opacity:.55;cursor:not-allowed}.sim-controls,.view-mode-controls,.zoom-controls{display:flex;align-items:center;gap:6px;border-left:1px solid #e2e8f0;padding-left:10px}.view-mode-controls button.active{border-color:var(--state-off);background:var(--state-off-soft);color:var(--state-off);font-weight:800}.zoom-controls span,.sim-controls span{min-width:54px;color:#475569;font-size:12px;font-weight:700}.import-button input{display:none}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172033;font-size:16px;cursor:pointer;padding:0;flex-shrink:0}.icon-btn:hover:not(:disabled){background:#f1f5f9}.icon-btn:disabled{opacity:.55;cursor:not-allowed}.share-link{position:absolute;right:16px;top:58px;max-width:520px;z-index:40;padding:8px 10px;background:#0f172a;color:#fff;border-radius:6px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:copy}.workspace{min-height:0;height:100%;display:grid;grid-template-columns:380px minmax(0,1fr)}.left-panel{min-width:0;border-right:1px solid #cbd5e1;background:#f8fafc;display:grid;grid-template-rows:auto 1fr}.left-panel-title{padding:12px;background:#eef2f7;border-bottom:1px solid #cbd5e1;font-weight:800;color:#334155}.panel-tabs{display:flex;gap:6px;padding:8px;background:#eef2f7;border-bottom:1px solid #cbd5e1}.panel-tabs button{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#334155;padding:7px 10px;cursor:pointer}.panel-tabs button.active{border-color:var(--state-off);background:var(--state-off-soft);color:var(--state-off)}.left-panel-content{min-height:0;overflow:auto;padding:10px}.center-panel{min-width:0;min-height:0;width:100%;height:100%;display:grid;grid-template-rows:1fr 0}.center-panel[data-view=full-ladder]{grid-template-rows:1fr 0}.center-panel[data-view=split-h]{grid-template-rows:1fr 1fr}.center-panel[data-view=split-v]{grid-template-rows:1fr;grid-template-columns:1fr 1fr}.center-panel[data-view=full-hmi]{grid-template-rows:0 1fr}.ladder-work-area{min-width:0;min-height:0;width:100%;height:100%;flex:1;display:grid;grid-template-columns:minmax(0,1fr) auto;overflow:hidden}.hmi-work-area{min-width:0;min-height:0;overflow:hidden}.center-panel[data-view=full-hmi] .ladder-work-area,.center-panel[data-view=full-ladder] .hmi-work-area{visibility:hidden;overflow:hidden;height:0}.renderer-stack{min-width:0;min-height:0;width:100%;height:100%;display:flex;flex-direction:column;background:#f1f5f9}.center-problem-prompt{margin:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;overflow:hidden}.center-problem-prompt summary{padding:10px 12px;cursor:pointer;font-weight:800;color:#334155;background:#f8fafc}.center-problem-prompt .problem-panel{border:0;border-radius:0;padding-top:8px}.bottom-panel{min-height:0;max-height:240px;display:grid;grid-template-rows:auto minmax(0,1fr);border-top:1px solid #cbd5e1;background:#eef2f7}.bottom-panel-tabs{display:flex;gap:6px;padding:8px;border-bottom:1px solid #cbd5e1}.bottom-panel-tabs button{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#334155;padding:7px 10px}.bottom-panel-tabs button.active{border-color:var(--state-off);background:var(--state-off-soft);color:var(--state-off);font-weight:800}.bottom-panel-content{min-height:0;overflow:auto;padding:10px}*{box-sizing:border-box}:root{--state-off: #2563eb;--state-off-soft: #eff6ff;--state-off-border: #bfdbfe;--state-on: #16a34a;--state-on-soft: #ecfdf5;--state-on-border: #86efac;--state-neutral: #64748b}html,body,#root{width:100%;height:100%;margin:0}body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#dbe4ee}button,input,select,textarea{font:inherit}button:hover,.import-button:hover{border-color:#94a3b8}
