.algorithm-stepper{--algorithm-blue:var(--color-primary);--algorithm-blue-soft:color-mix(in srgb, var(--color-primary) 12%, var(--bg-primary));--algorithm-green:#15803d;--algorithm-green-soft:color-mix(in srgb, #22c55e 14%, var(--bg-primary));--algorithm-amber:#b45309;--algorithm-amber-soft:color-mix(in srgb, #f59e0b 16%, var(--bg-primary));--algorithm-red:#b91c1c;--algorithm-red-soft:color-mix(in srgb, #ef4444 12%, var(--bg-primary));color:var(--text-primary);background:var(--bg-secondary);border:1px solid var(--border-color);box-shadow:var(--shadow-sm);border-radius:8px;margin:1.5rem 0 2rem;overflow:hidden}html.dark .algorithm-stepper{--algorithm-green:#4ade80;--algorithm-amber:#fbbf24;--algorithm-red:#f87171}.algorithm-stepper__canvas{overscroll-behavior-inline:contain;background:var(--bg-secondary);scrollbar-width:thin;width:100%;overflow:auto hidden}.algorithm-stepper__canvas:focus-visible{outline:2px solid var(--algorithm-blue);outline-offset:-3px}.algorithm-stepper__canvas>svg{width:100%;min-width:560px;height:auto;display:block}.algorithm-stepper [data-step-frame][hidden],.algorithm-stepper [data-step-frame][data-initial-hidden]{display:none}.algorithm-stepper [data-step-frame]:not([hidden]){animation:.18s ease-out algorithm-frame-enter}.algorithm-stepper svg rect,.algorithm-stepper svg circle,.algorithm-stepper svg line,.algorithm-stepper svg path,.algorithm-stepper svg polyline{vector-effect:non-scaling-stroke}.algorithm-stepper .algorithm-surface,.algorithm-stepper .algorithm-cell{fill:var(--bg-primary);stroke:var(--border-color-hover);stroke-width:1.4px}.algorithm-stepper .algorithm-cell.is-current,.algorithm-stepper .algorithm-surface.is-current{fill:var(--algorithm-blue-soft);stroke:var(--algorithm-blue);stroke-width:2px}.algorithm-stepper .algorithm-cell.is-success,.algorithm-stepper .algorithm-surface.is-success{fill:var(--algorithm-green-soft);stroke:var(--algorithm-green);stroke-width:2px}.algorithm-stepper .algorithm-cell.is-warning,.algorithm-stepper .algorithm-surface.is-warning{fill:var(--algorithm-amber-soft);stroke:var(--algorithm-amber);stroke-width:2px}.algorithm-stepper .algorithm-cell.is-invalid,.algorithm-stepper .algorithm-surface.is-invalid{fill:var(--algorithm-red-soft);stroke:var(--algorithm-red);stroke-width:2px;stroke-dasharray:5 4}.algorithm-stepper .algorithm-value,.algorithm-stepper .algorithm-label,.algorithm-stepper .algorithm-note,.algorithm-stepper .algorithm-kicker{font-family:SFMono-Regular,Consolas,Liberation Mono,monospace}.algorithm-stepper .algorithm-value{fill:var(--text-primary);font-size:15px;font-weight:750}.algorithm-stepper .algorithm-label{fill:var(--text-secondary);font-size:12px;font-weight:700}.algorithm-stepper .algorithm-note{fill:var(--text-tertiary);font-size:11px;font-weight:650}.algorithm-stepper .algorithm-kicker{fill:var(--text-tertiary);letter-spacing:.08em;font-size:11px;font-weight:800}.algorithm-stepper .algorithm-link{fill:none;stroke:var(--border-color-hover);stroke-width:1.6px}.algorithm-stepper .algorithm-link.is-current{stroke:var(--algorithm-blue);stroke-width:2.2px}.algorithm-stepper .algorithm-link.is-success{stroke:var(--algorithm-green);stroke-width:2.2px}.algorithm-stepper .algorithm-link.is-warning{stroke:var(--algorithm-amber);stroke-width:2.2px}.algorithm-stepper .algorithm-text-blue{fill:var(--algorithm-blue)}.algorithm-stepper .algorithm-text-green{fill:var(--algorithm-green)}.algorithm-stepper .algorithm-text-amber{fill:var(--algorithm-amber)}.algorithm-stepper .algorithm-text-red{fill:var(--algorithm-red)}.algorithm-stepper .is-muted{opacity:.28}.algorithm-stepper__controls{background:var(--bg-primary);border-top:1px solid var(--border-color);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.85rem;min-height:4.25rem;padding:.75rem .9rem;display:grid}.algorithm-stepper__buttons{gap:.35rem;display:flex}.algorithm-stepper__buttons button{width:2.75rem;height:2.75rem;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border-color-hover);cursor:pointer;transition:color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);border-radius:6px;place-items:center;padding:0;display:inline-grid}.algorithm-stepper__buttons button span{font-size:1rem;font-weight:800;line-height:1}.algorithm-stepper__buttons button:hover:not(:disabled){color:var(--algorithm-blue);background:var(--algorithm-blue-soft);border-color:var(--algorithm-blue)}.algorithm-stepper__buttons button:focus-visible{outline:2px solid var(--algorithm-blue);outline-offset:2px}.algorithm-stepper__buttons button:disabled{opacity:.42;cursor:not-allowed}.algorithm-stepper__buttons .algorithm-stepper__play{color:#fff;background:var(--algorithm-blue);border-color:var(--algorithm-blue)}html.dark .algorithm-stepper__buttons .algorithm-stepper__play{color:#082f49}.algorithm-stepper__status{min-width:0}.algorithm-stepper__status strong,.algorithm-stepper__status span{overflow-wrap:anywhere;display:block}.algorithm-stepper__status strong{color:var(--text-primary);font-size:.82rem;line-height:1.35}.algorithm-stepper__status span{color:var(--text-tertiary);margin-top:.15rem;font-size:.72rem;line-height:1.4}.algorithm-stepper__count{min-width:3.6rem;color:var(--algorithm-blue);text-align:right;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.72rem;font-weight:800}.algorithm-stepper figcaption{color:var(--text-tertiary);background:var(--bg-primary);border-top:1px solid var(--border-color);gap:.15rem;padding:.65rem .9rem .75rem;font-size:.72rem;line-height:1.45;display:grid}.algorithm-stepper figcaption strong{color:var(--text-secondary);font-size:.74rem}.algorithm-stepper .visually-hidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes algorithm-frame-enter{0%{opacity:.35}to{opacity:1}}@media (width<=560px){.algorithm-stepper__controls{grid-template-columns:auto minmax(0,1fr);align-items:start}.algorithm-stepper__count{text-align:left;grid-column:2}}@media (prefers-reduced-motion:reduce){.algorithm-stepper [data-step-frame]:not([hidden]){animation:none}.algorithm-stepper__buttons button{transition:none}}.hash-diagram[data-astro-cid-foahfsmt] .hash-array[data-astro-cid-foahfsmt],.two-pointers-diagram[data-astro-cid-563ovaha],.sliding-window-diagram[data-astro-cid-3ntfdnip]{shape-rendering:geometricprecision}
