:root{--room:#eef1f4;--paper:#fff;--ink:#16202c;--muted:#4f5b68;--rule:#c9d0d8;--grid:#e3e9f2;--marker:#1f4fb5;--marker-tint:#e3eafa;--on-marker:#fff;--highlighter:#ffe14d;--highlighter-edge:#e8b900;--on-highlighter:#16202c;--red:#c0322b;--good:#1d7a44;--warn:#9a6a00;--edge:#8b96a3;--tree:var(--marker);--v-white:#fff;--v-gray:#9e9e9e;--v-black:#000;--v-stroke:var(--ink);--v-black-stroke:var(--ink);--v-none:#d5e0f7;--font-text:"Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;--font-code:"Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--room:#141a18;--paper:#1c2622;--ink:#e6ebe6;--muted:#a7b3ad;--rule:#34423c;--grid:#22302a;--marker:#8fb3ff;--marker-tint:#1f2c44;--on-marker:#0f1a2e;--red:#ff8a80;--good:#7fd49b;--warn:#f2c14e;--edge:#7d8c85;--v-stroke:#e6ebe6;--v-black-stroke:#e6ebe6;--v-none:#2a3a52;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--room:#141a18;--paper:#1c2622;--ink:#e6ebe6;--muted:#a7b3ad;--rule:#34423c;--grid:#22302a;--marker:#8fb3ff;--marker-tint:#1f2c44;--on-marker:#0f1a2e;--red:#ff8a80;--good:#7fd49b;--warn:#f2c14e;--edge:#7d8c85;--v-stroke:#e6ebe6;--v-black-stroke:#e6ebe6;--v-none:#2a3a52;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{background:var(--room);color:var(--ink);font-family:var(--font-text);margin:0;font-size:16px;line-height:1.5}#root{max-width:1280px;margin:0 auto;padding:24px}code,.vars,.chip,.adj-head,.state td{font-family:var(--font-code)}a{color:var(--marker);text-underline-offset:3px}:focus-visible{outline:3px solid var(--marker);outline-offset:2px}.muted{color:var(--muted)}button{font:inherit;border:1.5px solid var(--rule);background:var(--paper);color:var(--ink);cursor:pointer;border-radius:4px;padding:6px 12px}button:hover:not(:disabled){border-color:var(--marker)}button:disabled{color:var(--muted);cursor:not-allowed;opacity:.7}button.primary{background:var(--marker);border-color:var(--marker);color:var(--on-marker);padding:6px 20px;font-weight:700}select,input{font:inherit;color:var(--ink);background:var(--paper);border:1.5px solid var(--rule);border-radius:4px;padding:5px 8px}input[type=checkbox]{accent-color:var(--marker);width:18px;height:18px;margin:0}input[type=range]{accent-color:var(--marker);background:0 0;border:none;padding:0}.page-header a{font-size:14px}.page-header h1{letter-spacing:-.01em;margin:4px 0 16px;font-size:31px;font-weight:800;line-height:1.15}.toolbar{border-bottom:2px solid var(--ink);flex-wrap:wrap;align-items:center;gap:12px 20px;margin-bottom:20px;padding-bottom:16px;display:flex}.toolbar label{align-items:center;gap:8px;max-width:100%;font-weight:700;display:flex}.toolbar select{min-width:0;max-width:100%;font-weight:400}.layout{grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start;gap:28px;display:grid}.main-col,.side-col{flex-direction:column;gap:16px;min-width:0;display:flex}.panel{border-top:1px solid var(--rule);padding:12px 0 0}.panel h3{margin:0 0 8px;font-size:16px;font-weight:700}.graph-canvas,.tree-canvas{background-color:var(--paper);background-image:linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);border:1.5px solid var(--rule);-webkit-user-select:none;user-select:none;background-position:-1px -1px;background-size:24px 24px;border-radius:4px;width:100%;height:auto;display:block}.editor .graph-canvas{touch-action:none}.canvas-bg{fill:#0000}.edge-line{stroke:var(--edge);stroke-width:2px}.edge-hit{stroke:#0000;stroke-width:14px;cursor:pointer}.edge.tree .edge-line{stroke:var(--tree);stroke-width:4.5px;stroke-linecap:round}.edge.active .edge-line{stroke:var(--marker);stroke-width:4px;stroke-dasharray:7 5}.edge.selected .edge-line{stroke:var(--red);stroke-width:4px}.edge.cycle .edge-line{stroke:var(--red);stroke-width:4px;stroke-dasharray:2 7;stroke-linecap:round}.edge.active.cycle .edge-line{stroke-dasharray:7 5}.arrow-head{fill:var(--edge)}.arrow-head.tree{fill:var(--tree)}.arrow-head.active{fill:var(--marker)}.arrow-head.selected{fill:var(--red)}.edge-weight{font-family:var(--font-code);fill:var(--ink);paint-order:stroke;stroke:var(--paper);stroke-width:4px;stroke-linejoin:round;pointer-events:none;font-size:14px;font-weight:700}.vertex{cursor:pointer}.vertex circle{stroke:var(--v-stroke);stroke-width:2px;fill:var(--v-none);transition:fill .25s,stroke .25s}.vertex text{font-family:var(--font-text);fill:var(--ink);pointer-events:none;font-size:15px;font-weight:700}.vertex.v-none circle{stroke:var(--marker);stroke-dasharray:5 3}.vertex.v-white circle{fill:var(--v-white)}.vertex.v-white text{fill:#000}.vertex.v-gray circle{fill:var(--v-gray)}.vertex.v-gray text{fill:#000}.vertex.v-black circle{fill:var(--v-black);stroke:var(--v-black-stroke)}.vertex.v-black text{fill:#fff}.vertex.v-plain circle{fill:var(--v-white)}.vertex.v-plain text{fill:#000}.vertex.settled circle{fill:var(--v-black);stroke:var(--v-black-stroke);stroke-dasharray:none}.vertex.settled text{fill:#fff}.vertex.active circle{stroke:var(--marker);stroke-width:5px;stroke-dasharray:none}.vertex.selected circle,.vertex.edge-from circle{stroke:var(--red);stroke-width:5px;stroke-dasharray:none}.tree-canvas{max-height:460px}.tree-edge{stroke:var(--edge);stroke-width:2px}.tree-edge.active{stroke:var(--marker);stroke-width:4px;stroke-dasharray:7 5}.tnode{cursor:pointer;transition:transform .3s}.tnode circle{fill:var(--v-white);stroke:var(--v-stroke);stroke-width:2px}.tnode text{font-family:var(--font-text);fill:#000;pointer-events:none;font-size:14px;font-weight:700}.tnode.active circle{stroke:var(--marker);stroke-width:5px}.tnode.detached circle{stroke-dasharray:5 3}.tnode .ptr-tag{font-family:var(--font-code);fill:var(--marker);font-size:12px}.nil-slot circle{fill:none;stroke:var(--muted);stroke-width:2px;stroke-dasharray:4 4}.nil-slot text{font-family:var(--font-code);fill:var(--muted);font-size:11px}.nil-edge{stroke:var(--muted);stroke-width:2px;stroke-dasharray:4 4}.empty-note{font-family:var(--font-code);fill:var(--muted);font-size:14px}@media (prefers-reduced-motion:reduce){.tnode{transition:none}}.pseudocode{background:var(--paper);border:1.5px solid var(--ink);border-radius:4px;padding:14px 16px;overflow-x:auto}.pseudocode section+section{border-top:1px dashed var(--rule);margin-top:16px;padding-top:12px}.pseudocode h3{font-family:var(--font-code)}.pseudocode ol{font-family:var(--font-code);margin:0;padding:0;font-size:15px;line-height:1.75;list-style:none}.pseudocode li{gap:10px;padding:0 6px;display:flex}.pseudocode li code{white-space:pre}.pseudocode .ln{color:var(--muted);text-align:right;flex:none;min-width:2.5ch}.pseudocode li.current,.pseudocode h3.current{background:var(--highlighter);color:var(--on-highlighter);box-shadow:inset 5px 0 0 var(--highlighter-edge);border-radius:3px 12px 4px 10px/10px 4px 12px 3px;margin:1px -6px;padding:1px 12px;font-weight:700}.pseudocode li.current .ln{color:var(--on-highlighter)}.state{overflow-x:auto}.state table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;font-size:15px}.state th,.state td{text-align:center;border-bottom:1px solid var(--rule);padding:5px 10px}.state thead th{border-bottom:2px solid var(--ink);font-family:var(--font-code)}.state tbody th{text-align:left;font-family:var(--font-code)}.vars{flex-wrap:wrap;gap:6px 20px;margin:0 0 10px;display:flex}.note{color:var(--muted);margin:10px 0 0;font-style:italic}.ds strong{font-size:16px}.ds .muted{font-size:14px}.queue-items{flex-wrap:wrap;align-items:stretch;min-height:38px;margin-top:8px;display:flex}.queue-items>.muted{font-family:var(--font-code);align-self:center;font-size:18px}.queue-items .chip{border-radius:0;margin:0 0 4px -1.5px;padding:6px 12px}.queue-items .chip:first-child{margin-left:0}.stack .queue-items .chip:first-child{border-left:5px solid var(--ink)}.stack .queue-items{flex-wrap:nowrap;overflow-x:auto}.queue-items .chip.current{background:var(--marker-tint);border-color:var(--marker);box-shadow:inset 0 -3px 0 var(--marker)}.chip{border:1.5px solid var(--ink);background:var(--paper);border-radius:3px;align-items:center;gap:2px;margin:2px;padding:2px 8px;display:inline-flex}.chip button{color:var(--marker);background:0 0;border:none;padding:0 4px;font-size:16px;line-height:1}.adjacency ul{margin:0 0 10px;padding:0;list-style:none}.adjacency li{padding:2px 0}.adj-head{margin-right:6px;font-weight:700}.edge-list{flex-wrap:wrap;gap:6px;margin:0 0 10px;display:flex}.weight-field{font-family:var(--font-code);flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:10px;display:flex}.weight-field input{width:7em}.weight-field input[aria-invalid=true]{border-color:var(--red)}.player{flex-direction:column;gap:10px;display:flex}.player-buttons{gap:6px;display:flex}.player-buttons button{flex:0 48px;min-width:44px;height:44px;padding:0;font-size:18px;line-height:1}.player input[type=range]{width:100%}.player-meta{color:var(--muted);flex-wrap:wrap;align-items:center;gap:8px 20px;display:flex}.player-meta label{align-items:center;gap:8px;display:flex}.player-meta span:first-child{color:var(--ink);font-variant-numeric:tabular-nums;font-weight:700}.question{border-left:6px solid var(--marker);background:var(--marker-tint);border-radius:0 4px 4px 0;padding:14px 16px}.question-prompt{margin:0 0 8px;font-size:18px;font-weight:700}.question .muted{margin:0 0 8px}.choices{flex-wrap:wrap;gap:6px;margin-bottom:10px;display:flex}.choices button{min-width:44px;font-family:var(--font-code)}.question form{flex-wrap:wrap;gap:6px;margin-bottom:10px;display:flex}.question form input{min-width:0}.question .skip{color:var(--marker);text-underline-offset:3px;background:0 0;border-color:#0000;padding-left:0;text-decoration:underline}.feedback{border-left:5px solid;border-radius:0 4px 4px 0;margin:0;padding:8px 12px}.feedback.good{border-color:var(--good);background:color-mix(in srgb, var(--good) 14%, transparent)}.feedback.bad{border-color:var(--red);background:color-mix(in srgb, var(--red) 14%, transparent)}.feedback.warn{border-color:var(--warn);background:color-mix(in srgb, var(--warn) 16%, transparent)}.algo-page>.feedback{margin-bottom:12px}.feedback.result{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 16px;padding:12px 14px;display:flex}.feedback.result p{flex:16em;margin:0}.settings{border:none;border-top:1px solid var(--rule);flex-direction:column;gap:8px;min-width:0;margin:0;display:flex}.settings legend{float:left;width:100%;margin-bottom:4px;padding:0;font-weight:700}.settings label{align-items:center;gap:8px;display:flex}.settings .indent{padding-left:26px}.editor{border-radius:4px}.editor:focus{outline:none}.editor:focus-visible{outline:3px solid var(--marker);outline-offset:4px}.editor-toolbar{flex-wrap:wrap;gap:6px;margin-bottom:4px;display:flex}.editor-toolbar button[aria-pressed=true]{background:var(--marker);color:var(--on-marker);border-color:var(--marker);font-weight:700}.hint{margin:6px 0 8px;font-size:14px}.home{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:56px;padding:12vh 0 48px;display:grid}.home h1{letter-spacing:-.015em;margin:0 0 20px;font-size:39px;font-weight:800;line-height:1.1}.home p{max-width:60ch;margin:0 0 14px}.home .lede{font-size:20px;line-height:1.45}.algo-list{border-top:2px solid var(--ink);max-width:60ch;margin:32px 0 0;padding:0;list-style:none}.algo-list li{border-bottom:1px solid var(--rule)}.algo-list a{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 16px;padding:16px 4px;text-decoration:none;display:flex}.algo-title{font-size:20px;font-weight:700}.algo-sig{color:var(--muted);font-size:16px}.algo-list a:hover .algo-title{text-decoration:underline}.list-title{margin:32px 0 0;font-size:16px;font-weight:700}.list-title+.algo-list{margin-top:8px}.key-input{width:6em}.key-input[aria-invalid=true]{border-color:var(--red)}.keep-result{margin:4px 0 12px}.excerpt{margin:0}.excerpt .excerpt-sig{font-size:16px;font-weight:700;font-family:var(--font-code);margin:0 0 8px}.excerpt .pseudocode ol{font-size:16px}.excerpt figcaption{color:var(--muted);margin-top:10px;font-size:14px}@media (width<=800px){#root{padding:16px}.layout{grid-template-columns:minmax(0,1fr)}.home{grid-template-columns:minmax(0,1fr);gap:32px;padding:16px 0}.algo-list a{flex-direction:column}.pseudocode{padding:12px 10px}.pseudocode ol,.excerpt .pseudocode ol{font-size:13px}.player-buttons{gap:4px}.home h1{font-size:31px}.home .lede{font-size:18px}.page-header h1{font-size:25px}}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.heap-canvas{flex-direction:column;gap:8px;display:flex}.tnode .idx-label,.heap-array .idx-label{font-family:var(--font-code);fill:var(--muted);font-size:10px;font-weight:400}.heap-array{height:auto;display:block}.heap-array .cell{cursor:default}.heap-array .cell.clickable{cursor:pointer}.heap-array .cell rect{fill:var(--v-white);stroke:var(--v-stroke);stroke-width:2px}.heap-array .cell text.key{font-family:var(--font-text);fill:#000;pointer-events:none;font-size:13px;font-weight:700}.heap-array .cell.past{cursor:default}.heap-array .cell.past rect{fill:none;stroke:var(--muted);stroke-dasharray:3 3}.heap-array .cell.past text.key{fill:var(--muted)}.heap-array .cell.active rect{stroke:var(--marker);stroke-width:4px}.heap-array .ptr-tag{font-family:var(--font-code);fill:var(--marker);font-size:11px}.heap-size-marker{stroke:var(--marker);stroke-width:3px}.marker-label{font-family:var(--font-code);fill:var(--muted);font-size:11px}.array-input{width:16em;max-width:100%}.array-input[aria-invalid=true]{border-color:var(--red)}.tnode.leaf rect{fill:var(--v-white);stroke:var(--v-stroke);stroke-width:2px}.tnode.leaf.sentinel rect{fill:none;stroke:var(--muted);stroke-dasharray:4 3}.tnode.leaf.sentinel text.key{fill:var(--muted)}.tnode.active rect{stroke:var(--marker);stroke-width:5px}.tnode.detached rect{stroke-dasharray:5 3}.two-three .tnode:not(.leaf),.two-three .tnode.sentinel{cursor:default}
