*{box-sizing:border-box}:root{font-family:Inter,system-ui,sans-serif;color:#202923;background:#f6f7f2;line-height:1.55;--green: #214e39;--border: #d9ded5;--muted: #536258}body{margin:0}header{background:#fff;border-bottom:1px solid var(--border)}.header-inner,main{max-width:1100px;margin:auto;padding-inline:clamp(1rem,4vw,2.5rem)}.header-inner{min-height:4.25rem;display:flex;align-items:center;justify-content:space-between}a{color:var(--green);text-underline-offset:.2em}.brand{text-decoration:none;font-weight:750;font-size:1.2rem}.brand span{background:var(--green);color:#fff;display:inline-grid;place-items:center;width:2rem;height:2rem;border-radius:.5rem;margin-right:.4rem;font-family:monospace}nav a{font-weight:650}main{padding-block:clamp(1.5rem,6vw,4rem)}.intro{margin-bottom:2rem}h1{font-size:clamp(2.1rem,6vw,3.7rem);letter-spacing:-.045em;line-height:1.12;margin:0 0 .75rem}h2{font-size:1.15rem;margin:0 0 .6rem}p{margin:0 0 .75rem}.intro p,.count,.problem-list p,.problem-heading,#input-hint,.empty,.complexity{color:var(--muted)}.intro p{font-size:1.15rem}.filters{display:grid;gap:.85rem;grid-template-columns:2fr repeat(3,1fr);margin-bottom:1.25rem}label{display:block;font-size:.93rem;font-weight:650}input,select,textarea,button{font:inherit;background:#fff;color:inherit;border:1px solid var(--border);border-radius:.55rem;padding:.58rem .75rem;min-height:44px}input,select,textarea{width:100%}input,select{margin-top:.25rem}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding-right:2.1rem;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23536258' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .65rem center}button{cursor:pointer;font-weight:650}button:hover,.problem-list a:hover{border-color:var(--green)}button:disabled{opacity:.5;cursor:default}.primary{color:#fff;background:var(--green);border-color:var(--green)}:focus-visible{outline:3px solid #387c5b;outline-offset:3px}.problem-list{list-style:none;display:grid;gap:.55rem;padding:0}.problem-list a{display:flex;gap:.8rem;justify-content:space-between;align-items:center;padding:.85rem 1.1rem;text-decoration:none;color:inherit}.problem-list a,.panel{background:#fff;border:1px solid var(--border);border-radius:.75rem}.problem-list h2,.problem-list p{margin:0}.problem-list p{font-size:.875rem}.difficulty{display:inline-block;font-size:.875rem;font-weight:650;background:#e7f2e9;color:#23563a;border-radius:2rem;padding:.2rem .65rem}.difficulty.medium{background:#fbefcf;color:#73530e}.problem-heading{margin-top:1rem}.problem-heading span+span{margin-left:.65rem}.problem-heading h1{margin-top:.65rem;color:#202923}.panel{padding:clamp(.85rem,3vw,1.35rem);min-width:0}.statement dl{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}.statement dl div{background:#f4f6f0;padding:.7rem;border-radius:.5rem;min-width:0}dt,.state-group h3{font-weight:650;font-size:.9rem}dd{margin:.2rem 0 0;overflow-wrap:anywhere}code,textarea,.pseudocode li,.cells{font-family:ui-monospace,Consolas,monospace}.reveal{margin:1rem 0}.solution-summary{margin-block:.5rem 1rem}.input-row{display:flex;align-items:start;gap:.5rem;flex-wrap:wrap}textarea{flex:1 1 16rem;resize:vertical}.error{color:#a12620;margin:.6rem 0 0}.controls{display:flex;gap:.5rem 1rem;align-items:center;justify-content:space-between;flex-wrap:wrap;position:sticky;top:0;z-index:1;padding:.65rem;background:#f2f5ef;border-radius:.75rem .75rem 0 0;border-bottom:1px solid var(--border)}.step-count{font:650 .85rem ui-monospace,Consolas,monospace;white-space:nowrap;color:var(--muted)}.control-buttons{display:flex;gap:.45rem}.control-buttons select{width:auto;margin:0}.play{display:grid;place-items:center;width:44px;border-radius:50%;padding:0}.timeline{flex:1 1 12rem;display:flex;gap:.75rem;align-items:center}.timeline input{margin:0;padding:0;min-width:0;accent-color:var(--green)}.player{margin-top:1rem;border:1px solid var(--border);border-radius:.8rem;background:#fff}.step-message{background:#edf4ec;border-radius:0 0 .75rem .75rem;margin:0;padding:.85rem 1rem}.step-message strong{color:var(--green);margin-right:.35rem}.walkthrough{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);min-height:19rem}.walkthrough>section{padding:clamp(.85rem,2.5vw,1.4rem);min-width:0}.pseudocode{background:#f7f8f5;border-left:1px solid var(--border)}.pseudocode ol{margin:0;padding-left:2rem}.pseudocode li{padding:.5rem;border-left:3px solid transparent;font-size:.9rem;overflow-wrap:anywhere}.pseudocode li::marker{color:var(--muted)}.pseudocode li[aria-current]{background:#e5f0e4;border-left-color:var(--green);font-weight:700}.state{background:#fdfefb}.state-views{display:grid;gap:1.3rem;padding:1.25rem 0}.state-group{text-align:center;min-width:0}.state-group h3{margin:0 0 .55rem;color:var(--muted);font:650 .8rem ui-monospace,Consolas,monospace;letter-spacing:.09em;text-transform:uppercase}.cells{display:flex;flex-wrap:wrap;gap:.35rem;list-style:none;margin:0;padding:0}.state .cells{justify-content:center}.cells li{padding:.3rem .5rem;border:1px solid var(--border);border-radius:.35rem;background:#f6f7f2;text-align:center;min-width:2rem;overflow-wrap:anywhere;max-width:100%}.cells li.active{border:2px solid var(--green);padding:calc(.3rem - 1px) calc(.5rem - 1px);background:#dbeedb;font-weight:750}.cells small{display:block;color:var(--muted)}.cells.array li{display:flex;flex-direction:column-reverse;justify-content:center;gap:.3rem;min-width:2.75rem;min-height:3.35rem;border-radius:.35rem;border-color:transparent;background:#edf1eb}.cells.array li>span:first-of-type{font-weight:750;font-size:1.05rem}.cells.array li.active{color:#124a36;border-color:#2a7257;background:#dcefe4}.cells.array.window li.active{box-shadow:inset 0 -3px #2a7257}.cells.array li.changed{background:#fff0d5;border-color:#bc852f}.cells.array li.changed.active{outline:2px solid #2a7257;outline-offset:-2px}.cells.value li{background:transparent;border-color:#dbe3da}.levels>div+div{margin-top:.4rem}.empty{font-size:.9rem}.result{display:grid;justify-items:center;gap:.25rem;margin:0;padding:.75rem;background:#eaf4ec;border-radius:.5rem;color:#214e39;text-align:center;overflow-wrap:anywhere}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:700px){.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.walkthrough{grid-template-columns:1fr;min-height:0}.pseudocode{border-left:0;border-top:1px solid var(--border)}.timeline{flex-basis:100%;order:1}}@media(max-width:400px){.statement dl{grid-template-columns:1fr}}
