@import "https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap";:root{color:#172033;font-synthesis:none;text-rendering:optimizelegibility;--ink:#172033;--muted:#6b7280;--line:#e5e7eb;--soft:#f7f8fa;--blue:#2563eb;--blue-dark:#1d4ed8;--green:#16803c;--red:#c62828;background:#fff;font-family:Manrope,sans-serif}*{box-sizing:border-box}body{min-width:320px;min-height:100svh;margin:0;overflow:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-offset:2px;outline:2px solid #93b4ff}svg{stroke-width:2px;width:18px;height:18px}.workspace{background:#fff;grid-template-rows:62px minmax(0,1fr);height:100svh;display:grid;overflow:hidden}.topbar{border-bottom:1px solid var(--line);z-index:10;justify-content:space-between;align-items:center;padding:0 20px;display:flex}.brand{color:var(--ink);align-items:center;gap:10px;font-size:15px;font-weight:700;text-decoration:none;display:inline-flex}.brand-mark{border-radius:7px;place-items:center;width:32px;height:32px;display:grid}.brand-mark img{width:32px;height:32px;display:block}.top-actions{align-items:center;gap:10px;display:flex}.select-wrap{border:1px solid var(--line);height:36px;color:var(--muted);border-radius:6px;align-items:center;gap:8px;padding:0 4px 0 11px;font-size:12px;display:flex}.select-wrap select{height:30px;color:var(--ink);background:0 0;border:0;outline:none;font-weight:600}.run-button{border:1px solid var(--blue);background:var(--blue);color:#fff;border-radius:6px;align-items:center;gap:8px;height:36px;padding:0 14px;font-size:13px;font-weight:700;display:inline-flex}.run-button:hover{background:var(--blue-dark)}.run-button svg{fill:currentColor;width:15px}.app-body{grid-template-columns:minmax(330px,390px) minmax(0,1fr);height:100%;min-height:0;display:grid;overflow:hidden}.editor-panel{border-right:1px solid var(--line);z-index:3;background:#fff;flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden}.panel-heading{flex:none;justify-content:space-between;align-items:flex-end;padding:20px 18px 14px;display:flex}.heading-actions{align-items:center;gap:8px;display:flex}.collapse-button{width:30px;height:30px}.collapse-button svg{width:15px}.eyebrow{color:var(--blue);text-transform:uppercase;letter-spacing:1.2px;margin-bottom:7px;font-size:10px;font-weight:700;line-height:1;display:block}h1{color:var(--ink);letter-spacing:0;margin:0;font-size:17px;line-height:1.2}.language-switch{border:1px solid var(--line);background:var(--soft);border-radius:6px;padding:3px;display:flex}.language-switch button{min-width:38px;height:27px;color:var(--muted);background:0 0;border:0;border-radius:4px;padding:0 8px;font-size:11px;font-weight:700}.language-switch button.is-selected{color:var(--ink);background:#fff;box-shadow:0 1px 3px #0f172a1a}.editor-shell{border-block:1px solid var(--line);background:#fbfcfd;flex:auto;grid-template-columns:42px minmax(0,1fr);min-height:140px;display:grid;position:relative;overflow:hidden}.editor-gutter{color:#a3a9b3;text-align:right;-webkit-user-select:none;user-select:none;background:#f7f8fa;border-right:1px solid #eef0f3;min-height:0;padding:16px 10px 48px 0;font:12px/1.72 DM Mono,monospace;overflow:hidden}.editor-gutter span{display:block}.editor-code{min-width:0;min-height:0;position:relative;overflow:hidden}.editor-highlight,#code-editor{tab-size:2;white-space:pre;border:0;width:100%;height:100%;margin:0;padding:16px 16px 48px;font:12px/1.72 DM Mono,monospace;position:absolute;inset:0}.editor-highlight{color:#243147;pointer-events:none;overflow:hidden}#code-editor{resize:none;color:#0000;caret-color:#172033;background:0 0;outline:0;overflow:auto}#code-editor::selection{color:#0000;background:#2563eb33}.tk-comment{color:#97a3b6;font-style:italic}.tk-meta{color:#9333ea}.tk-string{color:#15803d}.tk-number{color:#b45309}.tk-keyword{color:#7c3aed;font-weight:500}.tk-type{color:#2563eb}.tk-call{color:#0f766e}.tk-literal{color:#be185d}.input-block{border-bottom:1px solid var(--line);flex:none;padding:16px 18px}.input-block label{color:var(--ink);margin-bottom:7px;font-size:11px;font-weight:700;display:block}.input-block label+select+label{margin-top:12px}.input-block input{width:100%;height:36px;color:var(--ink);background:#fff;border:1px solid #d8dce3;border-radius:5px;padding:0 10px;font:12px DM Mono,monospace}.entry-select{width:100%;height:36px;color:var(--ink);background:#fff;border:1px solid #d8dce3;border-radius:5px;padding:0 8px;font:12px DM Mono,monospace}.entry-select:disabled{color:var(--muted);background:#f7f8fa}.input-block p{color:#8a919d;margin:7px 0 0;font-size:10px;line-height:1.4}.input-block p code{background:#f1f3f7;border-radius:3px;padding:1px 4px;font:10px DM Mono,monospace}.engine-note{background:#fcfcfd;flex:none;align-items:flex-start;gap:9px;padding:13px 18px 15px;display:flex}.note-dot{background:var(--green);border-radius:50%;flex:none;width:7px;height:7px;margin-top:5px;box-shadow:0 0 0 3px #dcfce7}.engine-note p{color:var(--muted);margin:0;font-size:10px;line-height:1.5}.engine-note strong{color:#374151;font-size:10px;display:block}.stage-panel{background:radial-gradient(circle at 1px 1px,#e3e8ef 1px,#0000 0) 0 0/26px 26px,#fdfdfe;min-width:0;min-height:0;position:relative;overflow:hidden}.tree-stage{touch-action:none;position:absolute;inset:0}.tree-svg{cursor:grab;width:100%;height:100%;display:block;position:absolute;inset:0}.tree-svg.is-dragging{cursor:grabbing}.tree-viewport{transition:none}.depth-rule{stroke:#e6eaf0;stroke-width:1px;stroke-dasharray:2 7}.depth-label{fill:#b3bccb;letter-spacing:.3px;font:9px DM Mono,monospace}.rnode{transition:opacity .2s}.rnode-box{fill:#fff;stroke:#ccd4e0;stroke-width:1.2px;filter:drop-shadow(0 2px 4px #0f172a0f);transition:fill .18s,stroke .18s,stroke-width .18s}.rnode-call{fill:#1d2a3f;font-family:DM Mono,monospace;font-weight:600;font-size:var(--node-call-size,12.5px)}.rnode-divider{stroke:#edf0f4;stroke-width:1px}.rnode-result{fill:#97a1b1;font-family:DM Mono,monospace;font-size:var(--node-result-size,10.5px)}.rnode-order circle{fill:#fff;stroke:#d5dce6;stroke-width:1.2px}.rnode-order text{fill:#97a1b1;font:600 9px DM Mono,monospace}.rnode.is-stack .rnode-box{stroke:#9dbcf7;fill:#fbfdff}.rnode.is-active .rnode-box{stroke:var(--blue);stroke-width:2.2px;fill:#fff;filter:drop-shadow(0 3px 12px #2563eb47)}.rnode.is-active .rnode-result{fill:var(--blue)}.rnode.is-active .rnode-order circle{fill:var(--blue);stroke:var(--blue)}.rnode.is-active .rnode-order text{fill:#fff}.rnode.is-returned .rnode-box{stroke:#9ed4b3;fill:#f6fdf8}.rnode.is-returned .rnode-result{fill:var(--green);font-weight:600}.rnode.is-returned.is-active .rnode-box{stroke:var(--green);stroke-width:2.2px;filter:drop-shadow(0 3px 12px #16a34a4d)}.rnode.is-returned.is-active .rnode-order circle{fill:var(--green);stroke:var(--green)}.rnode.is-receiving .rnode-box{stroke:#86c99b;stroke-width:2px;stroke-dasharray:5 3}.rnode.is-stopped .rnode-box{stroke:#e88b8b;stroke-width:2px;fill:#fff7f7}.rnode.is-stopped .rnode-result{fill:var(--red)}.rlink-call{fill:none;stroke:#cfd7e3;stroke-width:1.5px;marker-end:url(#arrow-call)}.rlink-call.is-stack{stroke:var(--blue);stroke-width:2px;marker-end:url(#arrow-call-active)}.rlink-return{fill:none;stroke:#4caf72;stroke-width:1.7px;stroke-dasharray:6 4;marker-end:url(#arrow-return)}.rlink-call.no-head,.rlink-call.no-head.is-stack,.rlink-return.no-head{marker-end:none}.rlink-return.is-flowing{stroke:var(--green);stroke-width:2.6px;animation:.7s linear infinite flow-up}@keyframes flow-up{to{stroke-dashoffset:-20px}}.return-chip rect{fill:#f0fdf4;stroke:#a7dcbb;stroke-width:1px}.return-chip text{fill:#15803d;font:600 10px DM Mono,monospace}.return-chip.is-plain rect{display:none}.return-chip.is-plain text{paint-order:stroke;stroke:#fff;stroke-width:3.5px;stroke-linejoin:round}.return-chip.is-flowing rect{fill:#dcfce7;stroke:var(--green);stroke-width:1.6px}.fold-chip{cursor:pointer}.fold-box{fill:#f7f8fb;stroke:#d3dae4;stroke-width:1.2px;stroke-dasharray:5 3;transition:fill .16s,stroke .16s}.fold-title{fill:#64748b;font-family:DM Mono,monospace;font-weight:600;font-size:calc(var(--node-call-size,12.5px) - 1.5px)}.fold-sub{fill:#a6b0bf;font-family:DM Mono,monospace;font-size:calc(var(--node-result-size,10.5px) - .5px)}.fold-hint{fill:var(--blue);font-family:DM Mono,monospace;font-size:calc(var(--node-result-size,10.5px) - .5px);display:none}.fold-chip:hover .fold-sub{display:none}.fold-chip:hover .fold-hint{display:block}.fold-chip.is-dead .fold-box{fill:#fdf7f7;stroke:#e6c3c3}.fold-chip.is-dead .fold-title{fill:#b4696a}.fold-chip:hover .fold-box{fill:#eef4ff;stroke:var(--blue);stroke-dasharray:none}.fold-chip:hover .fold-title{fill:var(--blue)}.rlink-fold{fill:none;stroke:#dbe1ea;stroke-width:1.4px;stroke-dasharray:4 4}.tree-svg.is-far .rnode-result,.tree-svg.is-far .rnode-divider,.tree-svg.is-far .rnode-order,.tree-svg.is-far .return-chip,.tree-svg.is-far .fold-sub,.tree-svg.is-far .fold-hint,.tree-svg.is-far .depth-label,.tree-svg.is-tiny .rnode-call,.tree-svg.is-tiny .fold-title{display:none}.flow-legend{z-index:4;border:1px solid var(--line);max-width:min(460px,100% - 250px);color:var(--muted);pointer-events:none;background:#fffffff2;border-radius:5px;flex-wrap:wrap;gap:6px 13px;padding:6px 9px;font-size:9px;display:flex;position:absolute;top:54px;left:18px}.flow-legend span{align-items:center;gap:5px;display:flex}.legend-line{border-top:2px solid #94a3b8;width:20px;height:0;position:relative}.legend-line:after{content:"";border-block:3px solid #0000;border-left:5px solid #94a3b8;position:absolute;top:-4px;right:-1px}.return-line{border-top-color:var(--green);border-top-style:dashed}.return-line:after{border-left-color:var(--green)}.legend-dot{border:1.5px solid #cbd5e1;border-radius:50%;width:11px;height:11px}.legend-chip{background:#f7f8fb;border:1.2px dashed #d3dae4;border-radius:3px;width:16px;height:11px}.legend-chip.is-dead{background:#fdf7f7;border-color:#e6c3c3}.legend-fold,.flow-legend .legend-fold{display:none}.tree-stage.has-folds~.flow-legend .legend-fold{display:flex}.stack-panel{z-index:4;border:1px solid var(--line);background:#fffffff7;border-radius:7px;flex-direction:column;width:210px;max-height:min(50%,320px);display:flex;position:absolute;top:54px;right:18px;overflow:hidden;box-shadow:0 4px 18px #0f172a14}.stack-panel header{color:var(--muted);text-transform:uppercase;letter-spacing:.8px;border-bottom:1px solid #eef1f5;justify-content:space-between;align-items:center;padding:7px 10px;font-size:9px;font-weight:700;display:flex}.stack-count{color:#fff;background:var(--ink);letter-spacing:0;border-radius:9px;place-items:center;min-width:18px;height:17px;padding:0 5px;font-size:9px;display:grid}.stack-list{flex:1;margin:0;padding:5px;list-style:none;overflow:auto}.stack-list li{border:1px solid #0000;border-radius:5px;grid-template-columns:16px minmax(0,1fr);align-items:center;gap:6px;padding:5px 6px;font:10px DM Mono,monospace;display:grid}.stack-list li+li{margin-top:2px}.stack-list li.is-top{background:#f5f9ff;border-color:#bfd6fb}.stack-list li.is-empty{color:#b3bccb;text-align:center;grid-template-columns:1fr}.frame-depth{color:#94a3b8;background:#f2f4f7;border-radius:4px;place-items:center;height:16px;font-size:9px;display:grid}.frame-call{color:#1d2a3f;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stack-list em{color:var(--blue);grid-column:2;font-size:9px;font-style:normal}.stack-list .frame-wait{color:#a9b2c0}.stack-list .frame-return{color:var(--green);font-weight:600}.stage-meta{z-index:4;pointer-events:none;align-items:center;gap:8px;display:flex;position:absolute;top:16px;left:18px}.state-pill{height:26px;color:var(--green);background:#f0fdf4f0;border:1px solid #bbebca;border-radius:5px;align-items:center;padding:0 9px;font-size:10px;font-weight:700;display:inline-flex}.state-pill.is-stopped{color:var(--red);background:#fff7f7;border-color:#fecaca}.stats{gap:5px;display:flex}.stats span{border:1px solid var(--line);color:var(--muted);background:#fff;border-radius:4px;align-items:baseline;gap:4px;padding:2px 6px;font-size:9px;display:inline-flex}.stats strong{color:var(--ink);font-size:10px}.result-panel{z-index:4;border:1px solid var(--line);background:#fffffff5;border-radius:6px;flex-direction:column;gap:5px;max-width:min(400px,100% - 36px);padding:9px 11px;display:flex;position:absolute;bottom:72px;left:18px;box-shadow:0 3px 14px #0f172a12}.result-head{justify-content:space-between;align-items:center;gap:14px;display:flex}.result-head>span{color:var(--muted);text-transform:uppercase;letter-spacing:.8px;font-size:9px;font-weight:700}.result-panel strong{color:var(--ink);text-overflow:ellipsis;white-space:nowrap;font:11px/1.4 DM Mono,monospace;overflow:hidden}.result-panel strong.is-warning{color:#b45309;white-space:normal;text-overflow:clip}.program-output{color:#475569;white-space:pre-wrap;background:#f6f7f9;border-radius:4px;max-height:84px;margin:2px 0 0;padding:6px 8px;font:10px/1.5 DM Mono,monospace;overflow:auto}.event-explanation{z-index:4;width:min(400px,100% - 520px);min-width:240px;min-height:46px;color:var(--muted);text-align:center;background:#fffffff7;border:1px solid #dbe3ee;border-radius:6px;flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:6px 12px;display:flex;position:absolute;top:16px;left:50%;transform:translate(-50%);box-shadow:0 3px 12px #0f172a0f}.event-explanation span{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:9px;overflow:hidden}.event-explanation strong{max-width:100%;color:var(--ink);text-overflow:ellipsis;white-space:nowrap;font:12px/1.4 DM Mono,monospace;overflow:hidden}.event-explanation.is-call{border-color:#bfd6fb}.event-explanation.is-call strong{color:var(--blue)}.event-explanation.is-return{background:#f6fdf8f7;border-color:#a7dcbb}.event-explanation.is-return strong{color:var(--green)}.event-explanation.is-stopped{background:#fff9f9;border-color:#fecaca}.event-explanation.is-stopped strong{color:var(--red);white-space:normal;font-size:10px}.error-banner{z-index:5;color:#991b1b;text-align:center;background:#fff7f7;border:1px solid #fecaca;border-radius:5px;width:min(520px,100% - 36px);padding:9px 12px;font-size:11px;position:absolute;top:58px;left:50%;transform:translate(-50%)}.playback{z-index:5;background:#fffffff5;border:1px solid #dfe3e8;border-radius:7px;align-items:center;gap:5px;width:min(690px,100% - 36px);height:46px;padding:5px 7px;display:flex;position:absolute;bottom:14px;left:50%;transform:translate(-50%);box-shadow:0 5px 22px #0f172a1a}.icon-button,.play-control{color:#647084;background:0 0;border:0;flex:none;place-items:center;display:grid}.icon-button{border-radius:5px;width:32px;height:32px}.icon-button:hover{color:var(--ink);background:var(--soft)}.play-control{color:#fff;background:var(--blue);border-radius:5px;width:34px;height:34px}.play-control:hover{background:var(--blue-dark)}.play-control svg{fill:currentColor;width:16px}#timeline{min-width:80px;height:20px;accent-color:var(--blue);flex:auto}.step-label{color:var(--muted);text-align:center;flex:0 0 54px;font:10px DM Mono,monospace}.expand-button{z-index:6;border:1px solid var(--line);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);height:30px;color:var(--muted);background:#fffffff0;border-radius:7px;align-items:center;gap:6px;padding:0 11px 0 8px;font-size:11px;font-weight:700;display:none;position:absolute;top:14px;left:14px;box-shadow:0 2px 8px #0f172a12}.expand-button:hover{color:var(--ink);border-color:#c3ccda}.expand-button svg{width:14px}body.code-collapsed .app-body{grid-template-columns:minmax(0,1fr)}body.code-collapsed .editor-panel{display:none}body.code-collapsed .expand-button{display:inline-flex}body.code-collapsed .stage-meta{left:108px}.settings-scrim{z-index:8;background:#0f172a2e;position:fixed;inset:62px 0 0}.settings-panel{z-index:9;border-left:1px solid var(--line);background:#fff;flex-direction:column;width:min(340px,92vw);display:flex;position:fixed;top:62px;bottom:0;right:0;box-shadow:-12px 0 32px #0f172a1f}.settings-panel[hidden],.settings-scrim[hidden]{display:none}.settings-head{border-bottom:1px solid var(--line);flex:none;justify-content:space-between;align-items:flex-end;padding:18px 18px 14px;display:flex}.settings-head h2{margin:0;font-size:16px;line-height:1.2}.settings-body{flex:auto;min-height:0;padding:4px 18px 20px;overflow:auto}.settings-group{border-bottom:1px solid var(--line);padding:16px 0 6px}.settings-group:last-of-type{border-bottom:0}.settings-group h3{color:var(--blue);text-transform:uppercase;letter-spacing:1.1px;margin:0 0 10px;font-size:10px;font-weight:700}.settings-note{color:var(--muted);margin:-4px 0 12px;font-size:10.5px;line-height:1.5}.settings-row{justify-content:space-between;align-items:center;gap:12px;padding:8px 0;display:flex}.settings-row.is-toggle{cursor:pointer}.settings-label{color:var(--ink);flex-direction:column;gap:2px;font-size:12px;font-weight:600;display:flex}.settings-label em{color:var(--muted);font-size:10.5px;font-style:normal;font-weight:400}.settings-control{align-items:center;gap:8px;display:flex}.settings-control input[type=range]{width:104px;height:18px;accent-color:var(--blue)}.settings-control output{min-width:46px;color:var(--muted);text-align:right;font:10px DM Mono,monospace}.settings-choice{border:1px solid var(--line);background:var(--soft);border-radius:6px;padding:3px;display:flex}.settings-choice button{height:24px;color:var(--muted);background:0 0;border:0;border-radius:4px;padding:0 9px;font-size:10.5px;font-weight:700}.settings-choice button.is-selected{color:var(--ink);background:#fff;box-shadow:0 1px 3px #0f172a1a}.settings-row input[type=checkbox]{width:16px;height:16px;accent-color:var(--blue)}.settings-reset{border:1px solid var(--line);width:100%;height:34px;color:var(--muted);background:#fff;border-radius:6px;margin-top:14px;font-size:12px;font-weight:600}.settings-reset:hover{color:var(--ink);border-color:#c3ccda}@media (width<=1180px){.event-explanation{width:min(360px,100% - 260px);top:50px;left:18px;right:auto;transform:none}.flow-legend{top:108px}.stack-panel{top:16px}}@media (width<=820px){body{overflow:auto}.workspace{grid-template-rows:58px auto;height:auto;min-height:100svh;overflow:visible}.app-body{grid-template-rows:auto 660px;grid-template-columns:1fr;height:auto;overflow:visible}.editor-panel{border-right:0;border-bottom:1px solid var(--line);height:auto}.editor-shell{flex:none;height:330px}.stage-panel{min-height:660px}.event-explanation{width:min(390px,100% - 20px);top:50px;left:50%;transform:translate(-50%)}.flow-legend{top:110px}.stack-panel{width:176px;max-height:200px;top:auto;bottom:72px;right:14px}}@media (width<=540px){.topbar{padding:0 12px}.brand>span:last-child,.select-wrap>span{display:none}.select-wrap{padding-left:5px}.run-button{justify-content:center;width:36px;padding:0}.run-button span{display:none}.panel-heading,.input-block,.engine-note{padding-inline:14px}.app-body{grid-template-rows:auto 600px}.stage-panel{min-height:600px}.playback{gap:2px;width:calc(100% - 20px);bottom:10px}.playback .icon-button:first-child,#zoom-out-button,#zoom-in-button{display:none}.step-label{flex-basis:45px}.result-panel{max-width:calc(100% - 20px);bottom:66px;left:10px}.stage-meta{top:10px;left:10px}.flow-legend{flex-wrap:wrap;max-width:calc(100% - 20px);left:10px}.stack-panel{display:none}}
