/* Window buttons (his ask 2026-11-26, shipped 11-29): the drawn _ [] x on the panes work; the main x crashes and
   shuts the site down, and you restart it. */
header.top{position:relative}
.wb{position:absolute;top:6px;width:18px;height:18px;padding:0;border:0;background:transparent;cursor:pointer;z-index:5}
.wb.min{right:54px}.wb.max{right:32px}.wb.cls{right:10px}
.wb:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
@media(max-width:820px){.wb{top:4px}}

/* minimise: the whole window drops to a chip at the top of the desktop (top, so it never covers the mole board) */
body{transition:transform .35s cubic-bezier(.5,0,.8,.6),opacity .35s}
body.w-min{transform:translateY(110vh) scale(.3);opacity:0;pointer-events:none}
.w-task{position:fixed;left:16px;top:14px;z-index:200;display:none;align-items:center;gap:8px;border:3px solid var(--ink);
  background:var(--win);box-shadow:4px 4px 0 var(--ink);padding:8px 14px;font:600 14px/1 system-ui,sans-serif;color:var(--ink);cursor:pointer}
.w-task.on{display:flex;animation:w-pop .3s cubic-bezier(.2,.9,.3,1.3)}
@keyframes w-pop{from{transform:translateY(-40px)}}

/* maximise: edge to edge */
body.w-max{margin:0!important;box-shadow:none!important;border-width:0!important}
body.w-max{max-width:none!important;translate:none!important}
/* windowed: drag the site by its red title bar, like a real window (his ask 2026-11-30); double-click maximises */
header.top::before{cursor:move;touch-action:none;user-select:none}
body.w-max header.top::before{cursor:default}
body.w-drag{transition:none;user-select:none}

/* close: the crash dialog */
.w-dlg{position:fixed;inset:0;z-index:300;display:grid;place-items:center;background:rgba(20,20,22,.25)}
.w-dlg .box{width:min(420px,calc(100vw - 24px));background:var(--bg);border:3px solid var(--ink);box-shadow:8px 8px 0 var(--ink);font-size:15px;color:var(--ink)}
.w-dlg .bar{height:28px;display:flex;align-items:center;padding:0 10px;background:#c9c4bb;border-bottom:3px solid var(--ink);font:700 13px system-ui,sans-serif}
.w-dlg .in{padding:16px;display:flex;gap:14px}
.w-dlg .ic{flex:none;width:38px;height:38px;border-radius:50%;background:var(--win);border:2px solid var(--ink);display:grid;place-items:center;font:900 22px/1 system-ui}
.w-dlg p{margin:0 0 6px}
.w-dlg .btns{display:flex;gap:10px;justify-content:flex-end;padding:0 16px 16px}
.w-dlg button{border:2px solid var(--ink);background:var(--bg);box-shadow:3px 3px 0 var(--ink);padding:8px 16px;font:700 14px system-ui,sans-serif;cursor:pointer;color:var(--ink)}
.w-dlg button.go{background:var(--win)}
.w-dlg.shake .box{animation:w-shake .4s}
@keyframes w-shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}

/* shutdown: the screen collapses like an old CRT, then the safe-to-turn-off screen */
html.w-off{background:#000!important}
html.w-off body{animation:w-crt .7s cubic-bezier(.6,0,.9,.4) forwards;transform-origin:50% 50vh}
@keyframes w-crt{0%{transform:scale(1,1);filter:none}55%{transform:scale(1,.004);filter:brightness(6)}100%{transform:scale(0,.004);filter:brightness(6);opacity:0}}
.w-black{position:fixed;inset:0;z-index:400;background:#000;color:#f2a33a;display:grid;place-items:center;text-align:center;
  font:22px/1.5 ui-monospace,Consolas,monospace;opacity:0;transition:opacity .5s}
.w-black.on{opacity:1}
.w-black small{display:block;color:#888;font-size:14px;margin-top:22px}
.w-black button{margin-top:26px;background:none;border:2px solid #f2a33a;color:#f2a33a;font:inherit;font-size:16px;padding:8px 22px;cursor:pointer}
.w-boot{position:fixed;inset:0;z-index:410;background:#000;color:#cfcfcf;font:15px/1.6 ui-monospace,Consolas,monospace;padding:28px 32px;white-space:pre-wrap}

/* the project cards */
.posters .winbar i{cursor:pointer}
.posters .poster.w-fold .thumb > :not(.winbar){visibility:hidden}
.posters .poster.w-fold .thumb{background:var(--panel-2) radial-gradient(var(--line-strong) 1px,transparent 1.2px) 0 0/14px 14px}
.posters .poster.w-shake .thumb{animation:w-shake .4s}
.w-tip{position:absolute;z-index:20;left:8px;right:8px;top:30px;background:var(--bg);border:2px solid var(--ink);box-shadow:3px 3px 0 var(--ink);
  padding:8px 10px;font:600 13px/1.35 system-ui,sans-serif;color:var(--ink)}
@media(prefers-reduced-motion:reduce){body,.w-task.on,html.w-off body,.w-dlg.shake .box,.posters .poster.w-shake .thumb{animation:none;transition:none}}

/* The burrow background (his pick 2026-11-29): moles fight in the earth behind the window; on wide screens the window narrows so it shows */
html{background:#2e2018!important}
.bg-gen{position:fixed;inset:0;width:100vw;height:100vh;z-index:-1;pointer-events:none}
body{position:relative}
@media(min-width:1400px){body{max-width:1280px;margin-left:auto!important;margin-right:auto!important}}
/* a dragged window would show the skip link parked above it: keep it invisible until it has focus */
.skip:not(:focus){clip-path:inset(50%);opacity:0}
