.algorithm-demo{--signal:#c9fc67;--electric:#7bd8ca;--hot:#ffac70;pointer-events:auto;width:100%;color:var(--ink,#eeeee4)}.algorithm-diagram{width:100%;margin:0 auto 12px;max-width:780px}.algorithm-diagram svg{width:100%;height:auto;display:block;overflow:visible}.algorithm-diagram text{text-anchor:middle;font-family:var(--mono,monospace);font-weight:600;font-size:26px;fill:var(--ink,#eeeee4)}.tree-edge{fill:none;stroke:#3d544a;stroke-width:3}.tree-edge.is-path{stroke:var(--hot);stroke-width:4}.tree-node circle{fill:#18221b;stroke:#547564;stroke-width:2}.tree-node.is-range circle{stroke:var(--electric);fill:#1b3029}.tree-node.is-covered circle{fill:var(--signal);stroke:var(--signal)}.tree-node.is-covered text{fill:#101210}.tree-node.is-current circle{stroke:var(--hot);stroke-width:5;filter:drop-shadow(0 0 6px #c9fc6740)}.algorithm-diagram .tree-index{fill:#a2aa9b;font-weight:400}.algorithm-controls{display:flex;gap:24px;margin-top:12px}.algorithm-controls:empty{display:none}.algorithm-controls label{flex:1;min-width:0;color:#bcc8b6;font:14px/1.5 var(--mono,monospace)}.algorithm-controls output{float:right;color:var(--signal);font-size:17px}.algorithm-controls input{display:block;width:100%;height:44px;margin:0;accent-color:var(--signal);cursor:pointer}.algorithm-controls input:focus-visible{outline:2px solid var(--electric);outline-offset:2px}.algorithm-result{font:700 clamp(21px,2.7vw,32px)/1.3 var(--mono,monospace);letter-spacing:-.045em;color:var(--signal);margin:15px 0 10px}.algorithm-status{font:14px/1.55 var(--mono,monospace);color:#c9cfbf;min-height:4.7em;margin:0 0 16px;overflow-wrap:anywhere}.algorithm-actions{display:flex;flex-wrap:wrap;gap:8px}.algorithm-actions button{border:1px solid #4a6350;background:#19221b;color:var(--ink,#eeeee4);min-height:44px;padding:10px 15px;font:13px/1.3 var(--mono,monospace);cursor:pointer}.algorithm-actions button:first-child{border-color:var(--signal);color:var(--signal)}.algorithm-actions button:hover:enabled,.algorithm-actions button[aria-pressed=true]{background:#304128}.algorithm-actions button:disabled{opacity:.4;cursor:default}.algorithm-actions button:focus-visible{outline:2px solid var(--electric);outline-offset:3px}.algorithm-actions button span{margin-left:8px}.algorithm-footnote{font:14px/1.6 var(--mono,monospace);color:#a2aa9b;margin:17px 0 0;max-width:72ch}.flow-edge{fill:none;stroke:#496b61;stroke-width:4}.flow-edge.is-active{stroke:#50763d}.flow-edge.is-cut{stroke:var(--hot);stroke-width:5;filter:drop-shadow(0 0 4px #ffac7044)}#flow-arrow path{fill:#82aa97}#flow-active-arrow path{fill:var(--signal)}.flow-pulse{fill:none;stroke:var(--signal);stroke-width:5;stroke-dasharray:10 13;animation:algorithm-flow 1.1s linear infinite;animation-play-state:paused;filter:drop-shadow(0 0 4px #c9fc6780)}.flow-pulse.is-steady{stroke:var(--electric);filter:drop-shadow(0 0 4px #7bd8ca66)}.flow-pulse.is-reverse{stroke:var(--electric)}.algorithm-demo.is-visible:not(.is-motion-paused) .flow-pulse{animation-play-state:running}body[data-motion=paused] .algorithm-demo .flow-pulse{animation-play-state:paused}.flow-label rect{fill:#101a14;stroke:#304d3f;stroke-width:1}.flow-label.is-active text{fill:var(--signal)}.flow-node circle{fill:#18251e;stroke:var(--electric);stroke-width:3}.flow-node.is-terminal circle{stroke:var(--signal);stroke-width:4}.flow-node.is-source-side circle{fill:#284130}.algorithm-diagram .flow-node text{font-size:30px}.flow-node.is-terminal text{fill:var(--signal)}@keyframes algorithm-flow{to{stroke-dashoffset:-46}}@media(max-width:420px){.algorithm-controls{gap:18px}.algorithm-actions{gap:7px}.algorithm-actions button{padding:10px 11px;font-size:12px}.algorithm-diagram text{font-size:32px}.algorithm-diagram .flow-node text{font-size:34px}.algorithm-status{font-size:14px}.algorithm-footnote{font-size:14px}}
