:root{--bg-primary:#0a0a0a;--bg-secondary:#141414;--bg-tertiary:#1f1f1f;--text-primary:#ffffff;--text-secondary:#a0a0a0;--text-muted:#666666;--border-color:#2a2a2a;--accent:#ffffff;--link-color:#82b1ff;--bar-default:#3498db;--bar-compare:#f39c12;--bar-swap:#e74c3c;--bar-sorted:#2ecc71;--bar-pivot:#9b59b6;--pf-bg:#1a1a2e;--pf-wall:#0a0a0a;--pf-visited:#2a4a6a;--pf-frontier:#f39c12;--pf-path:#2ecc71;--pf-start:#3498db;--pf-end:#e74c3c;--spring:cubic-bezier(.34,1.56,.64,1);--smooth:cubic-bezier(.4,0,.2,1);--transition:.3s ease}[data-theme=light]{--bg-primary:#ffffff;--bg-secondary:#f5f5f5;--bg-tertiary:#ebebeb;--text-primary:#0a0a0a;--text-secondary:#555555;--text-muted:#888888;--border-color:#e0e0e0;--accent:#0a0a0a;--link-color:#1a73e8;--bar-default:#2980b9;--bar-compare:#e67e22;--bar-swap:#c0392b;--bar-sorted:#27ae60;--bar-pivot:#8e44ad;--pf-bg:#dce9f5;--pf-wall:#b0b8c4;--pf-visited:#aecde8;--pf-frontier:#e67e22;--pf-path:#27ae60;--pf-start:#2980b9;--pf-end:#c0392b}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:Outfit,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg-primary);color:var(--text-primary);min-height:100vh;display:flex;flex-direction:column;transition:background var(--transition),color var(--transition);line-height:1.6}header{position:sticky;top:0;z-index:100;background:var(--bg-primary);border-bottom:1px solid var(--border-color);padding:0 2rem;height:56px;display:flex;align-items:center;transition:background var(--transition)}.header-inner{max-width:1400px;margin:0 auto;width:100%;display:flex;align-items:center;justify-content:space-between;gap:1.5rem}.back-link{color:var(--text-muted);text-decoration:none;font-size:.85rem;transition:color .2s ease;white-space:nowrap}.back-link:hover{color:var(--text-primary)}.header-title{font-size:.95rem;font-weight:600;color:var(--text-primary);letter-spacing:-.01em}.theme-toggle-btn{width:36px;height:20px;border-radius:10px;background:var(--bg-tertiary);border:1px solid var(--border-color);cursor:pointer;position:relative;transition:background .3s ease;flex-shrink:0}.theme-toggle-btn:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--text-muted);transition:transform .3s var(--spring),background .3s ease}[data-theme=light] .theme-toggle-btn:after{transform:translate(16px);background:var(--text-primary)}.page-shell{display:grid;grid-template-columns:260px 1fr;flex:1;max-width:1400px;margin:0 auto;width:100%;align-items:start}.sidebar{position:sticky;top:56px;height:calc(100vh - 56px);overflow-y:auto;padding:1.25rem 0 2rem;border-right:1px solid var(--border-color);scrollbar-width:thin;scrollbar-color:var(--border-color) transparent}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:2px}.sidebar>details{border-bottom:1px solid var(--border-color)}.sidebar>details:last-child{border-bottom:none}.sidebar>details>summary{padding:.65rem 1.1rem;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.11em;color:var(--text-muted);cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;-webkit-user-select:none;user-select:none;transition:color .2s ease}.sidebar>details>summary:hover{color:var(--text-primary)}.sidebar>details>summary::-webkit-details-marker{display:none}.sidebar>details>summary:after{content:"›";font-size:1rem;transition:transform .2s ease}.sidebar>details[open]>summary:after{transform:rotate(90deg)}.sidebar details details summary{padding:.42rem 1.1rem .42rem 1.5rem;font-size:.74rem;font-weight:600;color:var(--text-secondary);cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;-webkit-user-select:none;user-select:none;transition:color .2s ease}.sidebar details details summary:hover{color:var(--text-primary)}.sidebar details details summary::-webkit-details-marker{display:none}.sidebar details details summary:after{content:"›";font-size:.85rem;transition:transform .2s ease}.sidebar details details[open] summary:after{transform:rotate(90deg)}.sidebar a{display:block;padding:.24rem 1.1rem .24rem 2.5rem;font-size:.78rem;color:var(--text-muted);text-decoration:none;transition:color .15s ease,background .15s ease;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar a:hover{color:var(--text-primary);background:var(--bg-secondary)}.sidebar a.active{color:var(--text-primary);background:var(--bg-tertiary);font-weight:600}main{padding:2.5rem 2.5rem 3rem;min-width:0}.intro{margin-bottom:2.5rem;padding-bottom:2rem;border-bottom:1px solid var(--border-color)}.intro h1{font-size:1.9rem;font-weight:700;letter-spacing:-.03em;margin-bottom:.6rem}.intro p{color:var(--text-secondary);max-width:680px;line-height:1.65}.section-heading{font-size:1.45rem;font-weight:700;letter-spacing:-.02em;margin:3rem 0 .4rem;color:var(--text-primary);scroll-margin-top:72px}.sub-heading{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.13em;color:var(--text-muted);margin:2rem 0 .85rem;padding-bottom:.45rem;border-bottom:1px solid var(--border-color);scroll-margin-top:72px}.algo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:.8rem;margin-bottom:.8rem}.algo-card{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:10px;padding:1rem;transition:border-color .2s ease,background .2s ease;scroll-margin-top:72px}.algo-card:hover{border-color:var(--text-muted);background:var(--bg-tertiary)}.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.card-top h3{font-size:.9rem;font-weight:600;line-height:1.3;color:var(--text-primary)}.badges{display:flex;gap:.28rem;flex-wrap:wrap;justify-content:flex-end;flex-shrink:0}.badge{font-size:.62rem;font-weight:600;padding:.15rem .4rem;border-radius:4px;white-space:nowrap;font-family:SF Mono,Consolas,monospace}.badge.time{background:#3498db24;color:#82c4f8;border:1px solid rgba(52,152,219,.22)}.badge.space{background:#9b59b624;color:#c9a7f5;border:1px solid rgba(155,89,182,.22)}.badge.stable{background:#2ecc7124;color:#7deda8;border:1px solid rgba(46,204,113,.22)}.badge.unstable{background:#e74c3c24;color:#f5917e;border:1px solid rgba(231,76,60,.22)}[data-theme=light] .badge.time{color:#1a6fa8}[data-theme=light] .badge.space{color:#6c3483}[data-theme=light] .badge.stable{color:#1e8449}[data-theme=light] .badge.unstable{color:#a93226}.algo-svg{display:block;width:100%;height:52px;border-radius:6px;background:var(--bg-tertiary);margin-bottom:.65rem}.algo-svg .d{fill:var(--bar-default)}.algo-svg .s{fill:var(--bar-sorted)}.algo-svg .c{fill:var(--bar-compare)}.algo-svg .sw{fill:var(--bar-swap)}.algo-svg .pv{fill:var(--bar-pivot)}@keyframes compare-swap{0%,to{fill:var(--bar-compare)}50%{fill:var(--bar-swap)}}@keyframes compare-only{0%,to{fill:var(--bar-compare)}50%{fill:var(--bar-default)}}@keyframes pivot-pulse{0%,to{fill:var(--bar-pivot)}50%{fill:#c39bd3}}@keyframes bogo-chaos{0%{fill:var(--bar-swap)}20%{fill:var(--bar-default)}40%{fill:var(--bar-compare)}60%{fill:var(--bar-swap)}80%{fill:var(--bar-sorted)}to{fill:var(--bar-swap)}}@keyframes dist-jump{0%,44%{fill:var(--bar-compare)}55%,to{fill:var(--bar-sorted)}}@keyframes flip-anim{0%,to{fill:var(--bar-default)}30%{fill:var(--bar-compare)}65%{fill:var(--bar-swap)}}.anim-bubble .c{animation:compare-swap 1.2s ease-in-out infinite}.anim-bubble .c.b{animation-delay:.6s}.anim-selection .c{animation:compare-only 1.4s ease-in-out infinite}.anim-selection .sw{animation:compare-swap 1.4s ease-in-out infinite .3s}.anim-insertion .c{animation:compare-only 1.1s ease-in-out infinite}.anim-insertion .sw{animation:compare-swap 1.1s ease-in-out infinite .55s}.anim-shell .c{animation:compare-swap 1.3s ease-in-out infinite}.anim-shell .c.b{animation-delay:.65s}.anim-cycle .c{animation:compare-only 1.5s ease-in-out infinite}.anim-cycle .sw{animation:compare-swap 1.5s ease-in-out infinite .4s}.anim-merge .c{animation:compare-only 1s ease-in-out infinite}.anim-merge .sw{animation:compare-swap 1s ease-in-out infinite .5s}.anim-quick .pv{animation:pivot-pulse 1.5s ease-in-out infinite}.anim-quick .c{animation:compare-swap 1.5s ease-in-out infinite .3s}.anim-quick .c.b{animation-delay:.75s}.anim-heap .c{animation:compare-only 1.2s ease-in-out infinite}.anim-heap .sw{animation:compare-swap 1.2s ease-in-out infinite .6s}.anim-tim .c{animation:compare-swap 1.1s ease-in-out infinite}.anim-tim .pv{animation:compare-only 1.1s ease-in-out infinite .3s}.anim-bitonic .c{animation:compare-swap 1.3s ease-in-out infinite}.anim-bitonic .c.b{animation-delay:.43s}.anim-bitonic .c.c2{animation-delay:.87s}.anim-distribution .c{animation:dist-jump 1.6s ease-in-out infinite}.anim-distribution .c.b{animation-delay:.25s}.anim-distribution .c.c2{animation-delay:.5s}.anim-distribution .c.c3{animation-delay:.75s}.anim-pancake .c{animation:flip-anim 1.4s ease-in-out infinite}.anim-pancake .c.b{animation-delay:.35s}.anim-pancake .c.c2{animation-delay:.7s}.anim-block .c{animation:compare-only 1.2s ease-in-out infinite}.anim-block .pv{animation:pivot-pulse 1.2s ease-in-out infinite .3s}.anim-stooge .c{animation:compare-swap 2.2s ease-in-out infinite}.anim-stooge .c.b{animation-delay:1.1s}.anim-bogo .d{animation:bogo-chaos .9s ease-in-out infinite}.anim-bogo .d.b{animation-delay:.11s}.anim-bogo .d.c2{animation-delay:.22s}.anim-bogo .d.c3{animation-delay:.33s}.anim-bogo .d.c4{animation-delay:.44s}.anim-bogo .d.c5{animation-delay:.55s}.anim-bogo .d.c6{animation-delay:.66s}.anim-bogo .d.c7{animation-delay:.77s}.pf-svg{display:block;width:100%;height:84px;border-radius:6px;background:var(--pf-bg);margin-bottom:.65rem}.pf-svg rect{fill:var(--pf-bg)}.pf-svg .w{fill:var(--pf-wall)}.pf-svg .v{fill:var(--pf-visited)}.pf-svg .p{fill:var(--pf-path)}.pf-svg .st{fill:var(--pf-start)}.pf-svg .en{fill:var(--pf-end)}.pf-svg .f{fill:var(--pf-frontier)}@keyframes frontier-pulse{0%,to{fill:var(--pf-frontier);opacity:1}50%{fill:var(--pf-visited);opacity:.7}}@keyframes bogo-pf{0%{fill:var(--pf-frontier)}25%{fill:var(--pf-bg)}50%{fill:var(--pf-visited)}75%{fill:var(--pf-frontier)}to{fill:var(--pf-bg)}}@keyframes path-glow{0%,to{opacity:1}50%{opacity:.45}}.pf-svg .f{animation:frontier-pulse 1.2s ease-in-out infinite}.anim-bfs .f.b{animation-delay:.15s}.anim-bfs .f.c2{animation-delay:.3s}.anim-bfs .f.c3{animation-delay:.45s}.anim-dijkstra .f.b{animation-delay:.2s}.anim-dijkstra .f.c2{animation-delay:.4s}.anim-astar .f.b{animation-delay:.25s}.anim-bidir .f.b{animation-delay:.4s}.anim-bidir .f.c2{animation-delay:0s}.anim-bidir .f.c3{animation-delay:.4s}.anim-random .f{animation:bogo-pf 1.1s ease-in-out infinite}.anim-random .f.b{animation-delay:.2s}.anim-random .f.c2{animation-delay:.5s}.anim-random .f.c3{animation-delay:.8s}.anim-bogo-pf .f{animation:bogo-pf .8s ease-in-out infinite}.anim-bogo-pf .v{animation:bogo-pf .8s ease-in-out infinite .4s}.anim-path-glow .p{animation:path-glow 1.4s ease-in-out infinite}.algo-card p{font-size:.8rem;color:var(--text-secondary);line-height:1.55}.ref-section{margin-top:3rem;padding-top:2rem;border-top:1px solid var(--border-color);scroll-margin-top:72px}.ref-section h2{font-size:1.4rem;font-weight:700;letter-spacing:-.02em;margin-bottom:1rem}.data-table{width:100%;border-collapse:collapse;font-size:.78rem}.data-table th{text-align:left;padding:.5rem .7rem;border-bottom:2px solid var(--border-color);color:var(--text-muted);font-weight:600;font-size:.67rem;text-transform:uppercase;letter-spacing:.07em;white-space:nowrap}.data-table td{padding:.4rem .7rem;border-bottom:1px solid var(--border-color);color:var(--text-secondary);font-family:SF Mono,Consolas,monospace;font-size:.75rem}.data-table tr:hover td{background:var(--bg-secondary)}.data-table .name-col{font-family:inherit;font-weight:500;color:var(--text-primary);font-size:.79rem}.data-table .yes{color:var(--bar-sorted)}.data-table .no{color:var(--bar-swap)}.read-progress{position:fixed;top:56px;left:0;height:2px;width:0%;background:var(--link-color);z-index:200;pointer-events:none;transition:width .08s linear}@media(max-width:960px){.page-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;border-right:none;border-bottom:1px solid var(--border-color);padding:.75rem 0}.algo-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}main{padding:1.5rem 1.25rem 2rem}}@media(max-width:540px){.algo-grid{grid-template-columns:1fr}.card-top{flex-direction:column;gap:.4rem}.badges{justify-content:flex-start}}