@font-face{font-family:JetBrains Mono;src:url(/static/fonts/jetbrains-mono-400.woff2)format("woff2");font-weight:400;font-display:swap}@font-face{font-family:JetBrains Mono;src:url(/static/fonts/jetbrains-mono-700.woff2)format("woff2");font-weight:700;font-display:swap}@font-face{font-family:Inter;src:url(/static/fonts/inter-400.woff2)format("woff2");font-weight:400;font-display:swap}@font-face{font-family:Inter;src:url(/static/fonts/inter-600.woff2)format("woff2");font-weight:600;font-display:swap}:root{--mono:"JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;--prose:var(--mono);--fs:15px}html[data-font=prose]{--prose:"Inter", system-ui, sans-serif}html,html[data-theme=tty]{--root:#15141f;--surface:#1c1b2a;--surface2:#262539;--surface3:#34334d;--fg:#cdd6f4;--fg-dim:#9399b8;--muted:#626683;--border:#45475a;--accent:#a6e3a1;--accent-bg:#2c3a2e;--blue:#89b4fa;--yellow:#f9e2af;--pink:#f5c2e7;--red:#f38ba8;--orange:#fab387;--teal:#94e2d5;--grid:transparent;--figure-bg:#fff;color-scheme:dark}html[data-theme=blueprint]{--root:#172647;--surface:#1c2e55;--surface2:#233866;--surface3:#2e4679;--fg:#eaf1fb;--fg-dim:#aebfdc;--muted:#7488b0;--border:#6f8fc4;--accent:#9fdcff;--accent-bg:#23456e;--blue:#9fdcff;--yellow:#f3e3a8;--pink:#f1c4e6;--red:#ff9fb0;--orange:#ffc89a;--teal:#a8f0e0;--grid:#9fdcff12;--figure-bg:#fff;color-scheme:dark}html[data-theme=paper]{--root:#f4f2ea;--surface:#fbfaf5;--surface2:#ebe8dc;--surface3:#dcd8c8;--fg:#1c2333;--fg-dim:#4d566b;--muted:#8a90a0;--border:#9aa3b5;--accent:#2346a0;--accent-bg:#dfe6f7;--blue:#2346a0;--yellow:#8a6a00;--pink:#9c3c86;--red:#b3263e;--orange:#a95a12;--teal:#1d6f62;--grid:#2346a00f;--figure-bg:#fff;color-scheme:light}*{box-sizing:border-box}html,body{height:100%;margin:0}body{background-color:var(--root);background-image:linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);color:var(--fg);font:var(--fs)/1.45 var(--mono);background-size:2lh 2lh;overflow:hidden}a{color:var(--blue);text-decoration:none}a:hover,a:focus-visible{outline:none;text-decoration:underline}::selection{background:var(--accent);color:var(--root)}h1,h2,h3,h4{margin:0;font-size:1em}code{font-family:var(--mono)}.dim{color:var(--fg-dim)}.muted{color:var(--muted)}.green{color:var(--accent)}.yellow{color:var(--yellow)}.red{color:var(--red)}kbd{font:inherit;color:var(--root);background:var(--fg-dim);padding:0 .6ch}.skip{z-index:20;background:var(--accent);color:var(--root);padding:0 1ch;position:absolute;top:0;left:-999px}.skip:focus{left:1ch}#screen{flex-direction:column;gap:1lh;height:100dvh;padding:1lh 2ch;display:flex}#bar{background:var(--surface2);flex-wrap:wrap;align-items:center;gap:2ch;padding:.3lh 1ch;display:flex}#workspaces{flex-wrap:wrap;flex:1;gap:1ch;display:flex}.ws{color:var(--fg);display:inline-flex}.ws:hover{text-decoration:none}.ws .n{background:var(--surface3);padding:0 1ch}.ws .l{background:var(--surface);padding:0 1ch}.ws[aria-current=page] .n{background:var(--accent);color:var(--root)}.ws:hover .l,.ws:focus-visible .l{color:var(--accent)}#bar .right{color:var(--fg-dim);flex-wrap:wrap;gap:2ch;display:flex}#bar button{all:unset;cursor:pointer}#bar button:hover,#bar button:focus-visible{color:var(--accent)}html:not(.js) #bar button{display:none}#tiles{overflow-wrap:anywhere;flex:1;gap:1lh 2ch;min-width:0;min-height:0;display:flex}.tile{border:2px solid var(--border);background:var(--surface);flex-direction:column;min-width:0;min-height:0;padding:1lh 2ch;animation:.35s ease-out both place;display:flex;position:relative}.tile:nth-child(2){animation-delay:.12s}.tile:nth-child(3){animation-delay:.24s}.tile.focus{border-color:var(--accent)}.tile>.title{background:var(--root);color:var(--fg-dim);white-space:nowrap;text-overflow:ellipsis;max-width:calc(100% - 3ch);margin:0;padding:0 1ch;font-weight:400;position:absolute;top:-.75lh;left:1.5ch;overflow:hidden}.tile.focus>.title{color:var(--accent)}.tile>.title .k{color:var(--muted)}.tile .body{scrollbar-width:thin;scrollbar-color:var(--surface3) transparent;flex:1;overflow:hidden auto}@keyframes place{0%{opacity:0;clip-path:inset(-1lh 100% -1lh -1ch)}to{opacity:1;clip-path:inset(-1lh -1ch)}}@media (prefers-reduced-motion:reduce){.tile{animation:none}}.prompt{white-space:pre-wrap}.prompt .host{color:var(--blue)}.prompt .path{color:var(--pink)}.cursor{background:var(--fg);width:1ch;animation:1s step-end infinite blink;display:inline-block}.cursor:before{content:" "}@keyframes blink{50%{opacity:0}}html.js .prompt[data-cmd]:not(.typing):not(.done) .typed,html.js .prompt[data-cmd]:not(.done)+.out{visibility:hidden}.sel{color:var(--fg);cursor:pointer;margin:0 -1ch;padding:0 1ch;display:block;position:relative}a.sel:hover{text-decoration:none}.sel.cur{background:var(--accent-bg)}.sel.cur .t{color:var(--accent)}.sel.cur:before{content:">";color:var(--accent);position:absolute;left:-1.4ch}.sel[hidden]{display:none!important}.ls .sel{grid-template-columns:11ch 11ch 7ch 1fr;gap:0 2ch;display:grid}.ls .perm{color:var(--fg-dim)}.ls .date{color:var(--blue)}.ls .size{color:var(--fg-dim);text-align:right}.tag{color:var(--muted);white-space:nowrap}.tag:before{content:"#"}@media (width<=1100px){.ls .sel{grid-template-columns:11ch 7ch 1fr}.ls .perm{display:none}}@media (width<=560px){.ls .sel{grid-template-columns:1fr}.ls .size{display:none}}.sep{color:var(--yellow);align-items:center;gap:1ch;margin:1lh 0 .5lh;font-weight:400;display:flex}.sep:before,.sep:after{content:"";border-top:2px solid var(--surface3);flex:1}.sep:before{flex:0 0 2ch}.leader{gap:1ch;display:flex}.leader:after{content:"";border-bottom:2px dotted var(--surface3);flex:1;order:1;min-width:2ch;margin-bottom:.45lh}.leader>:last-child{order:2}.fetch{flex-wrap:wrap;gap:3ch;margin-top:.5lh;display:flex}.avatar{aspect-ratio:1;background:var(--accent);flex:none;width:22ch;position:relative;overflow:hidden}.avatar img{object-fit:cover;filter:grayscale()contrast(1.15)brightness(1.15);mix-blend-mode:luminosity;width:100%;height:100%;transition:all .3s;display:block}.avatar:after{content:"";pointer-events:none;background:repeating-linear-gradient(#0000 0 2px,#0000002e 2px 3px);position:absolute;inset:0}.avatar:hover img{filter:none;mix-blend-mode:normal}.kv .k{color:var(--blue);min-width:9ch;display:inline-block}.swatches{margin-top:.5lh;display:flex}.swatches i{width:3ch;height:1lh;display:block}.article{font-family:var(--prose)}.article>:where(:not(.post-body)),.post-body>:where(:not(.demo)){max-width:80ch}.post-body{margin-top:1lh}.post-body>.demo{width:75%}@media (width<=820px){.post-body>.demo{width:auto}}html[data-font=prose] .article{font-size:16.5px;line-height:1.65}.article h1{font:700 1.5em/1.3 var(--mono);color:var(--fg);margin:.3lh 0}.article h1:before{content:"# ";color:var(--muted)}.article h2,.article h3,.article h4{font:700 1.05em var(--mono);color:var(--yellow);margin:1.4lh 0 .4lh;scroll-margin-top:1lh}.article h2:before{content:"## ";color:var(--muted)}.article h3:before{content:"### ";color:var(--muted)}.article h4:before{content:"#### ";color:var(--muted)}.article p,.article ul,.article ol,.article table,.article blockquote{margin:0 0 .8lh}.article ul,.article ol{padding-left:3ch}.article ul li::marker{content:"- ";color:var(--accent)}.article ol li::marker{color:var(--accent)}.article blockquote{border-left:2px solid var(--pink);color:var(--fg-dim);margin-left:0;padding-left:2ch}.article img{max-width:100%;height:auto}.article :not(pre)>code{background:var(--surface2);padding:0 .5ch;font-size:.92em}.article table{border-collapse:collapse;font-family:var(--mono);font-size:14px;display:block;overflow-x:auto}.article th,.article td{border:1px solid var(--surface3);text-align:left;padding:0 1ch}.article th{color:var(--yellow);font-weight:400}.article hr{border:0;border-top:2px dashed var(--surface3);margin:1lh 0}.meta{font-family:var(--mono);color:var(--fg-dim)}figure.fig{border:2px solid var(--border);background:var(--root);max-width:64ch;margin:1.2lh 0}figure.fig .figbar{background:var(--surface2);font-family:var(--mono);color:var(--fg-dim);justify-content:space-between;gap:2ch;padding:0 1ch;display:flex}figure.fig .figbar span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}figure.fig .figimg{background:var(--figure-bg);padding:1lh 2ch}figure.fig img{width:100%;height:auto;display:block}figure.fig figcaption{font-family:var(--mono);border-top:2px solid var(--border);color:var(--fg-dim);grid-template-columns:auto 1fr;gap:0 2ch;padding:.3lh 1ch;display:grid}figure.fig figcaption b{color:var(--fg);font-weight:400}.video{aspect-ratio:16/9;border:2px solid var(--border);background:#000;max-width:64ch;margin:1lh 0;position:relative}.video iframe{border:0;width:100%;height:100%;position:absolute;inset:0}pre.code{font:14px/1.5 var(--mono);background:var(--root);border:2px solid var(--surface3);color:var(--fg);margin:.8lh 0;padding:.5lh 2ch;position:relative;overflow-x:auto}pre.code[data-lang]:not([data-lang=""]):before{content:attr(data-lang);color:var(--muted);position:absolute;top:0;right:1ch}.hl-comment{color:var(--muted);font-style:italic}.hl-keyword,.hl-storage{color:var(--pink)}.hl-entity.hl-name,.hl-support.hl-function,.hl-variable.hl-function{color:var(--blue)}.hl-entity.hl-name.hl-type,.hl-support.hl-type,.hl-support.hl-class,.hl-storage.hl-type{color:var(--yellow)}.hl-string{color:var(--accent)}.hl-constant{color:var(--orange)}.hl-punctuation,.hl-keyword.hl-operator{color:var(--fg-dim)}.hl-meta.hl-annotation,.hl-meta.hl-attribute,.hl-entity.hl-other.hl-attribute-name{color:var(--teal)}.postnav{border-top:2px dashed var(--surface3);font-family:var(--mono);flex-wrap:wrap;justify-content:space-between;gap:2ch;margin-top:2lh;padding-top:.5lh;display:flex}.demo{border:2px solid var(--accent);font-family:var(--mono);background:#000;outline:none;margin:1.2lh 0;font-size:14px;position:relative}.demo:focus-within,.demo:focus{box-shadow:0 0 0 2px var(--accent-bg)}.demo .demobar{background:var(--accent-bg);color:var(--fg);flex-wrap:wrap;gap:0 2ch;padding:0 1ch;display:flex}.demo .demobar .name{color:var(--accent);white-space:nowrap;flex:1}.demo .demobar button{white-space:nowrap}.demo .demobar.more{border-top:1px solid var(--surface3);justify-content:flex-end}@media (width<=700px){.demo .demobar.more{justify-content:flex-start}}.demo .demobar[hidden]{display:none}.demo button{all:unset;cursor:pointer;color:var(--fg)}.demo button:hover,.demo button:focus-visible{color:var(--accent)}.demo .stage{touch-action:none;cursor:crosshair;background:#000;position:relative;overflow:hidden}.demo canvas{display:block}.demo canvas.lines{pointer-events:none;position:absolute;top:0;left:0}.demo .demostat{color:var(--fg-dim);background:var(--root);border-top:2px solid var(--surface3);flex-wrap:wrap;gap:0 3ch;padding:0 1ch;display:flex}.demo .demomsg{color:var(--yellow)}.demo .demohelp{background:color-mix(in srgb, var(--surface) 94%, transparent);border:2px solid var(--border);z-index:2;width:max-content;max-width:calc(100% - 2ch);max-height:calc(100% - 3lh);padding:.5lh 2ch;position:absolute;inset:1.5lh auto auto 1ch;overflow:auto}.demo .demohelp[hidden]{display:none}.demo .demohelp table td{vertical-align:top;padding:0 2ch 0 0}.demo .loading{color:var(--fg-dim);background:var(--root);padding:2lh 2ch}.demo:fullscreen{border:0;flex-direction:column;display:flex}.demo:fullscreen .stage{flex:1;min-height:0}.demo .stage.tsp{background:var(--root) url(/assets/tsp/salesmen.webp) center / cover no-repeat;cursor:default;touch-action:manipulation;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;gap:.5lh 1ch;padding:.5lh 1ch;display:grid}.tsp .lane{background:color-mix(in srgb, var(--root) 85%, transparent);padding:.2lh .8ch .3lh}.demo .stage.tsp.narrow{grid-template-columns:repeat(2,minmax(0,1fr))}.tsp .lane{min-width:0}.tsp .lane.setup{grid-column:1/-1;justify-self:center;width:50%}.tsp.narrow .lane.setup{width:100%}.tsp .lane canvas{border:1px solid var(--surface3);width:100%;display:block}.tsp .lane.setup canvas{cursor:crosshair}.tsp .lanehead,.tsp .lanefoot{color:var(--fg-dim);justify-content:space-between;gap:0 1ch;font-size:12px;line-height:1.6;display:flex}.tsp .lanehead{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tsp .lanefoot{flex-direction:column;min-height:4.8em}.tsp .lanefoot>span{white-space:nowrap;text-overflow:ellipsis;min-height:1.6em;overflow:hidden}.tsp .lanename{color:var(--fg)}.tsp .lane[data-state=racing] .lanestatus{color:var(--yellow)}.tsp .lane[data-state=done] .lanestatus{color:var(--accent)}.tsp .lane[data-state=skipped]{opacity:.5}.demo .stage:is(.kruskal,.sudoku){background:var(--root);cursor:default;touch-action:manipulation;grid-template-columns:minmax(0,1fr) 36ch;display:grid}.kruskal canvas{cursor:crosshair;width:100%}:is(.kruskal,.sudoku) .kside{contain:size;border-left:2px solid var(--surface3);flex-direction:column;min-height:0;display:flex}.demo .stage:is(.kruskal,.sudoku).narrow{grid-template-columns:minmax(0,1fr)}:is(.kruskal,.sudoku).narrow .kside{contain:none;border-left:0;border-top:2px solid var(--surface3);height:10lh}:is(.kruskal,.sudoku) .ksum{color:var(--fg);border-bottom:1px solid var(--surface3);padding:0 1ch}:is(.kruskal,.sudoku) .klog{flex:1;margin:0;padding:0 1ch;font-size:12px;line-height:1.6;list-style:none;overflow-y:auto}:is(.kruskal,.sudoku) .klog li{white-space:nowrap;color:var(--fg-dim);grid-template-columns:2ch minmax(0,1fr) 6ch auto;gap:0 1ch;display:grid}:is(.kruskal,.sudoku) .klog .kedge{text-overflow:ellipsis;overflow:hidden}.kruskal .klog .kcost{text-align:right}.kruskal .klog .in .kmark{color:var(--accent)}.kruskal .klog .out .kmark,.kruskal .klog .out .kwhy{color:var(--red)}:is(.kruskal,.sudoku) .klog li:first-child{color:var(--fg)}.sudoku .sboard{justify-content:center;align-items:flex-start;padding:8px;display:flex}.demo:fullscreen .sudoku .sboard,#demo-popup .sudoku .sboard{align-items:center}.sudoku .board{grid-template-columns:repeat(9, var(--cell));grid-auto-rows:var(--cell);border:2px solid var(--fg-dim);display:grid}.sudoku .cell{border:solid var(--surface3);font-size:calc(var(--cell) * .55);color:var(--accent);cursor:pointer;user-select:none;border-width:0 1px 1px 0;justify-content:center;align-items:center;line-height:1;display:flex}.sudoku .cell.r{border-right:2px solid var(--fg-dim)}.sudoku .cell.b{border-bottom:2px solid var(--fg-dim)}.sudoku .cell:nth-child(9n){border-right:0}.sudoku .cell:nth-child(n+73){border-bottom:0}.sudoku .cell.diag{background:color-mix(in srgb, var(--accent-bg) 60%, transparent)}.demo .stage.fireflies{touch-action:manipulation}.demo .stage.fireflies.hunting{touch-action:none}.fireflies canvas{width:100%}.demo .demobar.sliders{background:var(--surface);border-top:1px solid var(--surface3);color:var(--fg-dim);gap:0 3ch}.demo .demobar.sliders label{white-space:nowrap;align-items:center;gap:0 1ch;display:flex}.demo .demobar.sliders label[hidden],.demo .demobar button[hidden]{display:none}.demo .demobar.sliders input{width:11ch;accent-color:var(--accent);margin:0}.demo .demobar.sliders .val{min-width:4ch;color:var(--fg)}.demo .demobar button.on{color:var(--accent);text-underline-offset:3px;text-decoration:underline}.demo.fill{z-index:20;border:0;flex-direction:column;margin:0;display:flex;position:fixed;inset:0}.demo.fill .stage{flex:1;min-height:0}.sudoku .cell[data-origin=given]{color:var(--fg);font-weight:700}.sudoku .cell[data-origin=guess]{color:var(--yellow)}.sudoku .cell.picked{background:var(--surface3)}.sudoku .cell.last{box-shadow:inset 0 0 0 2px var(--last)}.sudoku .marks{text-align:center;width:100%;height:100%;font-size:calc(var(--cell) * .24);color:var(--fg-dim);grid-template-columns:repeat(3,1fr);align-items:center;display:grid}.sudoku .klog li{grid-template-columns:5ch 3ch minmax(0,1fr)}.sudoku .klog .k0 .kmark{color:var(--blue)}.sudoku .klog .k1 .kmark{color:var(--accent)}.sudoku .klog .k2 .kmark{color:var(--pink)}.sudoku .klog .k3 .kmark{color:var(--yellow)}.sudoku .klog .k4 .kmark{color:var(--red)}.demo .demostat.kstat{white-space:nowrap;flex-wrap:nowrap;overflow:hidden}.demo .kstat .demomsg{text-overflow:ellipsis;min-width:0;overflow:hidden}.projects{width:100%;margin-top:.5lh}.projects .sel,.projects-head{grid-template-columns:4ch minmax(0,1fr) minmax(0,28ch);gap:0 2ch;display:grid}.projects .sel{padding-top:.3lh;padding-bottom:.3lh}.projects-head{color:var(--muted);border-bottom:2px solid var(--surface3);margin:0 -1ch;padding:0 1ch}.projects .desc{display:block}.projects .spec{align-self:start}[data-playground] .projects .sel{grid-template-columns:4ch minmax(0,1fr)}[data-playground] .projects .spec{grid-column:2}@media (width<=1100px){.projects .sel,.projects-head{grid-template-columns:4ch minmax(0,1fr)}.projects .spec,.projects-head span:last-child{display:none}}.projects .pos span{border:2px solid var(--fg-dim);border-radius:50%;place-items:center;width:3ch;height:3ch;font-size:12px;display:inline-grid}.projects .sel.cur .pos span{border-color:var(--accent);color:var(--accent)}.chip{background:var(--surface2);color:var(--fg-dim);margin:.2lh .5ch 0 0;padding:0 1ch;display:inline-block}.proj h2{color:var(--accent);margin:.5lh 0;font-size:1.3em}html.js .proj:not(.cur){display:none}html:not(.js) .proj+.proj{border-top:2px dashed var(--surface3);margin-top:2lh;padding-top:1lh}.shot{vertical-align:top;border:2px solid var(--border);background:var(--figure-bg);max-width:100%;margin:.5lh 0 1lh;display:inline-block}.shot img{width:auto;max-width:100%;max-height:16lh;display:block}.refs{grid-template-columns:auto 1fr;gap:0 2ch;margin:0;display:grid}.refs dt{color:var(--muted)}.refs dd{margin:0}.siteinfo{border:2px solid var(--border);font-family:var(--mono);font-size:var(--fs);grid-template-columns:repeat(3,1fr);margin-top:1lh;line-height:1.45;display:grid}.siteinfo>div{border:1px solid var(--border);padding:.2lh 1ch}.siteinfo .lbl{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-size:11px;display:block}.siteinfo .wide{grid-column:span 2}#status{background:var(--surface2);white-space:nowrap;display:flex;overflow:hidden}#status>span{padding:0 1ch}#mode{background:var(--accent);color:var(--root);font-weight:700}#mode.cmd{background:var(--yellow)}#mode.filter{background:var(--pink)}#status .path{background:var(--surface3)}#status .hints{color:var(--fg-dim);text-overflow:ellipsis;flex:1;overflow:hidden}#status .hints[hidden]{display:none}#status .rev{color:var(--fg-dim)}#cmdline{all:unset;color:var(--fg);caret-color:var(--accent);flex:1;padding:0 1ch}#cmdline[hidden]{display:none}#msg{color:var(--yellow)}#help{z-index:10;background:#0000008c;place-items:center;display:none;position:fixed;inset:0}#help.open{display:grid}#help .tile{width:min(72ch,92vw);max-height:90vh;animation:none}#help table td{vertical-align:top;padding:0 2ch 0 0}#demo-popup{z-index:10;background:#0000008c;place-items:center;display:none;position:fixed;inset:0}#demo-popup.open{display:grid}#demo-popup .tile{max-width:90vw;max-height:90vh;padding:1lh 1ch .5lh;animation:none}#demo-popup .body{flex-direction:column;display:flex;overflow:hidden}#demo-popup .demo{flex-direction:column;flex:1;min-height:0;margin:0;display:flex}#demo-popup .demo .stage{flex:1;min-height:0}#demo-popup .close{all:unset;cursor:pointer;background:var(--root);color:var(--fg-dim);padding:0 1ch;position:absolute;top:-.75lh;right:1.5ch}#demo-popup .close:hover,#demo-popup .close:focus-visible{color:var(--accent)}.play{all:unset;cursor:pointer;color:var(--blue)}.play:hover,.play:focus-visible{text-decoration:underline}html:not(.js) .play{display:none}@media (width<=820px){body{overflow:auto}#screen{height:auto;min-height:100vh;padding:.5lh 1ch}#tiles{flex-direction:column}.tile{flex:none!important}#toc-tile{order:1}.tile .body{overflow:visible}#status{position:sticky;bottom:0}#status .hints,#status .rev{display:none}.siteinfo{grid-template-columns:1fr 1fr}}