.lab-head{gap:14px;display:grid}.intro{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;display:grid}@media (width<=760px){.intro{grid-template-columns:minmax(0,1fr)}}.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;align-content:start;gap:10px;min-width:0;padding:16px 18px;display:grid}.card h3{font:600 1.05rem var(--body);margin:0}pre.snip{font-family:var(--mono);background:var(--bg);border-radius:6px;margin:0;padding:10px 12px;font-size:.82rem;line-height:1.55;overflow-x:auto}.readhow{color:var(--muted);flex-wrap:wrap;gap:10px 22px;font-size:.88rem;display:flex}.readhow span{align-items:center;gap:8px;display:inline-flex}.lab{gap:14px;display:grid}.pickers{gap:10px;min-width:0;display:grid}.seg{border:1px solid var(--line);background:var(--surface);border-radius:999px;width:max-content;max-width:100%;padding:3px;display:inline-flex}.seg button{font:600 .92rem var(--body);color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:999px;padding:7px 16px}.seg button[aria-pressed=true]{background:var(--fg);color:var(--bg)}.ops{flex-wrap:wrap;gap:8px;display:flex}.op{font:500 .9rem var(--body);border:1px solid var(--line);background:var(--surface);color:var(--fg);cursor:pointer;border-radius:7px;align-items:baseline;gap:8px;padding:6px 12px;display:inline-flex}.op small{font-family:var(--mono);color:var(--muted);font-size:.72rem}.op[aria-pressed=true]{border-color:var(--hl);box-shadow:inset 0 0 0 1px var(--hl);background:var(--hl-soft)}.h-custom{flex-wrap:wrap;align-items:center;gap:8px 10px;font-size:.9rem;display:flex}.h-custom label{color:var(--muted)}.h-custom input{font:400 .9rem var(--mono);color:var(--fg);background:var(--surface);border:1px solid var(--line);border-radius:7px;flex:0 24rem;width:min(100%,24rem);min-width:0;padding:7px 10px}.h-custom input:focus-visible{outline:3px solid var(--ptr);outline-offset:1px}.h-custom input[aria-invalid=true]{border-color:var(--hl);box-shadow:inset 0 0 0 1px var(--hl)}.h-custom .btn{padding:6px 12px}.h-err{color:var(--hl);flex-basis:100%;font-size:.88rem;font-weight:600}.h-err:empty{display:none}.bench{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}.benchhead{border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:baseline;gap:6px 16px;padding:12px 16px;display:flex}.benchhead .call{font:600 1rem var(--mono);overflow-wrap:anywhere}.badge{font:600 .74rem var(--mono);border:1px solid var(--line);color:var(--muted);border-radius:999px;padding:2px 8px}.benchhead .sum{color:var(--muted);flex-basis:100%;font-size:.92rem}.stagewrap{border-bottom:1px solid var(--line);background-color:var(--bg);background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:24px 24px;overflow-x:auto}.stagewrap svg{width:100%;min-width:560px;height:auto;display:block}.lower{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);display:grid}@media (width<=760px){.lower{grid-template-columns:minmax(0,1fr)}.code{border-bottom:1px solid var(--line);border-right:0!important}}.code{font-family:var(--mono);border-right:1px solid var(--line);min-width:0;padding:12px 0;font-size:.82rem;line-height:1.5;overflow-x:auto}.code div{white-space:pre;border-left:3px solid #0000;gap:12px;width:max-content;min-width:100%;padding:1px 16px 1px 8px;display:flex}.code div .ln{color:var(--muted);opacity:.6;text-align:right;user-select:none;flex:none;width:2ch}.code div.on{background:var(--hl-soft);border-left-color:var(--hl);font-weight:600}.narr{align-content:start;gap:14px;min-width:0;padding:16px 18px;display:grid}.stepno{font-family:var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:.74rem}.narr p{font-size:1rem}.vars{flex-wrap:wrap;gap:6px;display:flex}.vars span{font:400 .8rem var(--mono);background:var(--bg);border:1px solid var(--line);overflow-wrap:anywhere;border-radius:5px;padding:2px 7px}.vars span.ix{border-color:var(--fg)}.vars span.ret{background:var(--hl-soft);border-color:var(--hl);font-weight:600}.vars:empty{display:none}.controls{border-top:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:10px;padding:12px 16px;display:flex}.btn{font:600 .9rem var(--body);border:1px solid var(--line);background:var(--bg);color:var(--fg);cursor:pointer;border-radius:8px;padding:8px 14px}.btn.primary{background:var(--ptr);border-color:var(--ptr);color:var(--surface)}.btn:disabled{opacity:.4;cursor:default}.h-dots{flex-wrap:wrap;gap:6px;max-width:100%;margin-left:auto;display:flex}.h-dot{background:var(--line);cursor:pointer;border:0;border-radius:50%;width:10px;height:10px;padding:0}.h-dot.on{background:var(--hl)}.hint{color:var(--muted);padding:0 16px 12px;font-size:.8rem}.h-edge{stroke:var(--line);stroke-width:2px}.h-edge.on{stroke:var(--hl);stroke-width:3.5px}.h-disc,.h-box{fill:var(--surface);stroke:var(--fg);stroke-width:1.6px}.settled .h-disc,.settled .h-box{fill:color-mix(in srgb,var(--ptr) 14%,var(--surface));stroke:var(--ptr)}.mover .h-disc,.mover .h-box{fill:var(--hl-soft);stroke:var(--hl);stroke-width:2px}.focus .h-disc,.focus .h-box{stroke:var(--hl);stroke-width:3.5px}.h-float .h-disc{stroke-dasharray:4 3;fill:var(--hl-soft);stroke:var(--hl)}.h-val{fill:var(--fg);font:600 18px var(--mono);text-anchor:middle}.h-idx{fill:var(--muted);font:400 11px var(--mono);text-anchor:middle}.h-meta{fill:var(--muted);font:400 13px var(--mono)}.h-flab{fill:var(--fg);font:600 12px var(--mono);text-anchor:middle}.h-empty{fill:none;stroke:var(--line);stroke-dasharray:4 3}.h-stem{stroke:var(--fg);stroke-width:1.4px}.h-tbox{fill:var(--fg)}.h-ttxt{fill:var(--bg);font:600 12px var(--mono);text-anchor:middle}.h-tag.outer .h-tbox{fill:var(--surface);stroke:var(--fg);stroke-width:1.4px}.h-tag.outer .h-ttxt{fill:var(--fg)}.h-tag.outer .h-stem{stroke-dasharray:3 3}.enter{animation:.45s ease-out h-pop}@keyframes h-pop{0%{opacity:0}}@media (prefers-reduced-motion:reduce){.enter{animation:none}}.h-lg-plain{fill:var(--surface);stroke:var(--fg);stroke-width:1.6px}.h-lg-settled{fill:color-mix(in srgb,var(--ptr) 14%,var(--surface));stroke:var(--ptr);stroke-width:1.6px}.h-lg-mover{fill:var(--hl-soft);stroke:var(--hl);stroke-width:2px}.h-lg-focus{fill:var(--surface);stroke:var(--hl);stroke-width:3px}.h-lg-tag{fill:var(--fg)}.h-sec{gap:14px;min-width:0;display:grid}.h-sec>p{max-width:72ch}pre.h-bad,pre.h-good{border-left:3px solid var(--hl)}pre.h-good{border-left-color:var(--ptr)}pre.h-bad:before,pre.h-good:before{font:600 .68rem var(--body);letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px;display:block}pre.h-bad:before{content:"Bug";color:var(--hl)}pre.h-good:before{content:"Fix";color:var(--ptr)}.h-formula{font:600 .95rem var(--mono);background:var(--surface);border:1px solid var(--line);white-space:nowrap;border-radius:8px;max-width:100%;padding:12px 14px;overflow-x:auto}pre.h-wide{max-width:42rem}.h-chart{background:var(--surface);border:1px solid var(--line);border-radius:10px;gap:10px;min-width:0;margin:0;padding:14px 16px;display:grid}.h-chart figcaption{font:600 .95rem var(--body)}.h-chart svg{width:100%;max-width:640px;height:auto;display:block}.h-legend{color:var(--muted);flex-wrap:wrap;gap:6px 18px;font-size:.85rem;display:flex}.h-legend span{align-items:center;gap:7px;display:inline-flex}.h-key{border-radius:2px;width:14px;height:10px;display:inline-block}.h-key.h-bar-nodes{background:var(--muted)}.h-key.h-bar-heapify{background:var(--ptr)}.h-key.h-bar-insert{background:var(--hl)}rect.h-bar-nodes{fill:var(--muted)}rect.h-bar-heapify{fill:var(--ptr)}rect.h-bar-insert{fill:var(--hl)}.h-axis{fill:var(--fg);font:600 13px var(--mono)}.h-num{fill:var(--muted);font:400 11px var(--mono)}.h-base{stroke:var(--line);stroke-width:1px}.ref{gap:14px;display:grid}.tablewrap{min-width:0;overflow-x:auto}.h-root table{border-collapse:collapse;background:var(--surface);border:1px solid var(--line);font-variant-numeric:tabular-nums;border-radius:8px;width:100%;min-width:560px;font-size:.92rem}.h-root caption{caption-side:top;text-align:left;font:600 .95rem var(--body);padding:0 0 8px}.h-root th,.h-root td{text-align:left;border-bottom:1px solid var(--line);vertical-align:top;padding:9px 14px}.h-root th{font:600 .72rem var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.h-root td:not(:first-child){font-family:var(--mono);font-size:.85rem}.h-root tr:last-child td{border-bottom:0}.h-root tr.h-total td{border-top:2px solid var(--line);font-weight:600}.h-root table.h-runs td:first-child{font-size:.88rem}
