/* Pixels & Packets. One file for every page, which pages link with its
   hash in the URL (Site::stylesheet()), so browsers keep it for a year and
   fetch it again only when it changes. No web fonts: each platform's own
   sans and mono faces.

   Waterfall combined with the older site's design.
   From the older site: the all-ink ground, AAA text contrast (text 14:1,
   muted 7.7:1, cyan and amber 6.8:1 or better on every surface, deep cyan
   and deep amber for decoration only), the fluid type scale with a 14px
   floor, sans for reading and mono for labels, the nav as paths, the line under the header,
   the hero, $ command lines, the post log and the tag chips.
   From Waterfall: the seeded bars that load in, ls -lt listings, the
   "packet loss" tags and ## headings. */
:root{
	color-scheme:dark;
	--c-bg:#0B0E14;--c-surface:#141A24;--c-surface-2:#1B2330;--c-line:#2A3445;
	--c-text:#F2F4F7;--c-muted:#B8C0CB;
	--c-amber:#F2A33C;--c-cyan:#4CC9E8;--c-amber-deep:#C57A1E;--c-cyan-deep:#2E9FBE;
	--c-stage:#0B0E14;--c-stage-text:#F2F4F7;
	--font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
	--font-mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,"Cascadia Mono","Segoe UI Mono",Consolas,"Roboto Mono","Liberation Mono",monospace;
	--small:.875rem;
	--step-0:clamp(1.0625rem,1rem + .3vw,1.25rem);
	--step-1:clamp(1.2rem,1.1rem + .5vw,1.5rem);
	--step-2:clamp(1.5rem,1.3rem + 1vw,2.1rem);
	--step-3:clamp(2rem,1.5rem + 2.6vw,3.6rem);
	--step-4:clamp(2.8rem,1.6rem + 5.5vw,6.2rem);
	--gutter:clamp(1rem,4vw,3rem);--page:70rem;--prose:44rem;--radius:10px
}


/* Base */
*,*::before,*::after{box-sizing:border-box}
/* The scrollbar always shows, so a page that's taller or shorter than the
   window doesn't move sideways when it opens. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow-y:scroll}
body{margin:0;min-height:100dvh;display:flex;flex-direction:column;background:var(--c-bg);color:var(--c-text);font-family:var(--font);font-size:var(--step-0);line-height:1.65;overflow-wrap:break-word}
body>main{flex:1 0 auto}
img,svg,canvas{display:block;max-width:100%}
img{height:auto}
a{color:var(--c-cyan);text-underline-offset:.2em;text-decoration-thickness:.08em}
a:hover{color:var(--c-text)}
h1,h2,h3,h4{font-weight:700;line-height:1.15;letter-spacing:-.015em;text-wrap:balance}
p,li{text-wrap:pretty}
code,pre,kbd{font-family:var(--font-mono);font-size:.9em}
button,input,select,textarea{font:inherit}
pre{overflow-x:auto;padding:1.25rem 1.5rem;border:1px solid var(--c-line);border-left:4px solid var(--c-cyan);border-radius:6px;background:var(--c-surface);color:var(--c-text);line-height:1.5;font-size:.875em}
/* Syntax highlighting, from lib/highlight.php: the site's cyan and amber
   for keywords and numbers, and a few softer colours, each at least 5.8:1
   on the code's background. Printing swaps in darker ones for paper. */
:root{--hl-com:#8B95A5;--hl-kw:#4CC9E8;--hl-str:#A8D990;--hl-num:#F2A33C;--hl-fn:#8DB4FF;--hl-var:#F4878A;--hl-prop:#7FD8C8;--hl-attr:#C7A6F2}
.hl-com{color:var(--hl-com);font-style:italic}
.hl-kw{color:var(--hl-kw)}
.hl-str{color:var(--hl-str)}
.hl-num,.hl-tag{color:var(--hl-num)}
.hl-fn{color:var(--hl-fn)}
.hl-var{color:var(--hl-var)}
.hl-prop{color:var(--hl-prop)}
.hl-attr,.hl-at{color:var(--hl-attr)}
pre code{font-size:inherit}
/* A code block from Markdown (lib/markdown.php): a bar with its language
   and, from the footer's script, a copy button, over the code. The box is
   the wrapper's, so the bar and the code share it. */
.code{border:1px solid var(--c-line);border-left:4px solid var(--c-cyan);border-radius:6px;background:var(--c-surface);overflow:hidden}
.code pre{margin:0;border:0;border-radius:0}
/* The wrapper clips to its corners, so the code's focus ring goes inside. */
.code pre:focus-visible{outline-offset:-3px;border-radius:0 0 2px 0}
pre{tab-size:4}
.code-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:2.25rem;padding:.25rem .5rem .25rem 1.5rem;border-bottom:1px solid var(--c-line);background:var(--c-surface-2);font:.8rem/1.2 var(--font-mono);color:var(--c-muted)}
.code-copy{margin-left:auto;padding:.2rem .6rem;border:1px solid var(--c-line);border-radius:4px;background:none;color:var(--c-muted);font-size:.8rem;cursor:pointer}
.code-copy:hover{border-color:var(--c-cyan);color:var(--c-cyan)}
/* Line numbers: a counter, so they're not part of the text to select or
   copy, with no alternative text, so they're not read out. They stay put
   while a long line scrolls sideways. The column is a whole number of
   tab stops wide (--gutter, from lib/markdown.php), since a tab's stops
   count from the start of the line, numbers and all; the rule between
   it and the code is a gradient, not a border, to keep it that wide. */
.lines{counter-reset:line;padding-left:0}
.lines .line{counter-increment:line}
.lines .line::before{content:counter(line);content:counter(line) / "";position:sticky;left:0;display:inline-block;box-sizing:border-box;width:calc(var(--gutter,8) * 1ch);padding-right:3ch;background:linear-gradient(to right,transparent calc(100% - 1.5ch - 1px),var(--c-line) 0 calc(100% - 1.5ch),transparent 0) var(--c-surface);color:var(--hl-com);text-align:right}
:focus-visible{outline:3px solid var(--c-amber);outline-offset:3px;border-radius:4px}
::selection{background:var(--c-amber);color:var(--c-bg)}
.skip{position:absolute;left:-999px;top:0}
.skip:focus{left:1rem;top:1rem;z-index:99;padding:.5rem 1rem;background:var(--c-amber);color:var(--c-bg)}
.wrap{width:min(100% - 2 * var(--gutter),var(--page));margin-inline:auto}
.mark{flex:none;height:auto}
.amp{color:var(--c-amber)}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Header and nav */
.head-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 2rem;padding-block:1.1rem}
.brand{display:flex;align-items:center;gap:.75rem;color:var(--c-text);text-decoration:none;font-weight:700;font-size:var(--step-1);letter-spacing:-.01em}
.brand:hover{color:var(--c-text)}
.brand .mark{width:2.4rem}
.nav{display:flex;flex-wrap:wrap;gap:.25rem}
.nav a{padding:.45rem .8rem;border-radius:999px;font:600 1rem/1.2 var(--font-mono);color:var(--c-muted);text-decoration:none}
.nav a:hover,.nav a[aria-current]{background:var(--c-cyan);color:var(--c-bg)}

/* The logo draws itself once as the page opens, in 1.33s: the three
   packets (cyan) arrive left to right, then the four pixels (amber) render
   in reading order, then it's still. In the header the logo is spans, not
   SVG (Site::mark_animated), placed on the SVG's 280x130 grid, because a
   span's scale and opacity can be animated by the compositor, off the
   main thread, so it stays smooth while a slow phone is busy loading the
   page. Nothing around it is laid out again. Pointing at it, or focusing
   it, plays it again (the script at the end of footer.php). With reduced
   motion it's simply there. It keeps its colours in high contrast mode
   and print, which would otherwise drop the backgrounds it's drawn with. */
.mark-anim{position:relative;display:block;aspect-ratio:280/130;forced-color-adjust:none;print-color-adjust:exact}
.mark-anim span{position:absolute;left:58.2143%;height:20%;border-radius:999px;background:var(--c-cyan);transform-origin:left center;animation:mark-packet .5s cubic-bezier(.2,.7,.2,1) both}
.mark-anim span:nth-child(1){top:0;width:40%}
.mark-anim span:nth-child(2){top:36.1538%;width:27.8571%;animation-delay:.1s}
.mark-anim span:nth-child(3){top:72.3077%;width:33.9286%;animation-delay:.2s}
.mark-anim span:nth-child(n+4){left:0;top:0;width:20%;height:43.0769%;border-radius:10.7%;background:var(--c-amber);transform-origin:center;animation:mark-pixel .42s cubic-bezier(.3,1.5,.5,1) .55s both}
.mark-anim span:nth-child(5){left:26.0714%;animation-delay:.67s}
.mark-anim span:nth-child(6){top:56.1538%;animation-delay:.79s}
.mark-anim span:nth-child(7){left:26.0714%;top:56.1538%;animation-delay:.91s}
@keyframes mark-packet{from{scale:0 1}}
@keyframes mark-pixel{from{scale:.3;opacity:0}}

/* The line under the header */
.site-head{border-bottom:2px solid var(--c-cyan-deep)}

/* Hero: the banner's waterfall, seeded per day, loading in */
.hero{position:relative;overflow:clip;padding-block:clamp(3rem,9vw,7rem) clamp(2.5rem,6vw,4.5rem)}
.hero h1{font-size:var(--step-4);letter-spacing:-.035em;line-height:1;margin:0}
.tagline{margin:1.25rem 0 0;font:600 clamp(var(--small),.8rem + .4vw,1.05rem)/1.5 var(--font-mono);letter-spacing:.24em;color:var(--c-muted);text-wrap:balance}
.hero-copy{position:relative;z-index:1}
.falls{position:absolute;inset:0;pointer-events:none}
.falls span{position:absolute;left:calc(var(--x) * 1%);top:calc(var(--y) * 1%);width:calc(var(--len) * 1%);height:.7rem;opacity:.5;background:linear-gradient(90deg,var(--c-cyan-deep) 0 var(--c),var(--c-amber-deep) var(--c) var(--w),var(--c-amber) var(--w));transform-origin:left;animation:load 1.1s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i) * 90ms)}
@keyframes load{from{transform:scaleX(0)}}

/* Pages */
.page{width:min(100% - 2 * var(--gutter),var(--page));margin-inline:auto;padding-block:clamp(2.5rem,7vw,5rem)}
/* Posts, About and the error pages line up with the header like the
   others; only what's in them keeps to a reading width. */
.page-post>*,.page-about>*,.page-error>*,.page-search>*{max-width:var(--prose)}
.page-head,.post-head{display:grid;gap:.9rem;margin-bottom:2.25rem}
.page-head h1,.post-head h1,.page-error h1{font-size:var(--step-3);letter-spacing:-.025em;line-height:1.08;margin:0;overflow-wrap:anywhere}
.cmd{margin:0;font:400 1rem/1.4 var(--font-mono);color:var(--c-cyan);letter-spacing:.02em}
.cmd span{color:var(--c-amber)}
.cmd a{color:inherit;text-decoration-color:var(--c-cyan-deep)}
.cmd a:hover{color:var(--c-text)}
.sub,.post-head .meta{color:var(--c-muted);margin:0;font:400 1rem var(--font-mono)}
.byline::before{content:"· ";content:"· " / ""}
.byline a{color:var(--c-text);text-decoration-color:var(--c-line)}
.byline a:hover{text-decoration-color:currentColor}
.sub p{margin:0}
.sub p+p{margin-top:.5em}
.section-title{display:flex;align-items:baseline;flex-wrap:wrap;gap:.25rem 1rem;font-size:var(--step-2);margin:3rem 0 1.25rem}
.section-title a{color:var(--c-text);text-decoration-color:var(--c-amber)}
.section-title a:hover{color:var(--c-amber)}
.section-title small{font:400 1rem var(--font-mono);color:var(--c-muted);letter-spacing:0}
.page-home{padding-top:0}
.intro{max-width:var(--prose);font-size:var(--step-1);color:var(--c-muted);line-height:1.5}
.intro p{margin:0}
.latest .section-title{margin-top:2.5rem}
.more{margin:1.25rem 0 0}
.more a{display:inline-block;padding:.6rem 1rem;border-radius:8px;background:var(--c-amber);color:var(--c-bg);font:600 1rem/1.2 var(--font-mono);text-decoration:none}
.more a:hover{background:var(--c-text);color:var(--c-bg)}
.empty{padding:1.25rem 1.5rem;border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface);color:var(--c-muted)}
/* Search (lib/search.php): the box, in the footer, on /search and on the
   404 page, then the results, each with what it is, its title and a
   snippet, with the words that matched marked. */
.search-form form{display:flex;gap:.5rem}
.search-form input{flex:1;min-width:0;min-height:2.75rem;padding:.5rem .75rem;border:1px solid var(--c-line);border-radius:8px;background:var(--c-bg);color:var(--c-text);font:400 1rem var(--font-mono)}
.search-form input::placeholder{color:var(--c-muted);opacity:.8}
.search-form input:focus-visible{outline-offset:1px}
.search-main{margin-top:1.75rem}
.page-error .search-main{margin-top:1.25rem}
.results{display:grid;gap:1.75rem;margin:2.5rem 0 0;padding:0;list-style:none}
.result{display:grid;gap:.35rem}
.result-meta{margin:0;font:400 var(--small) var(--font-mono);color:var(--c-muted)}
.result-snippet{margin:0;color:var(--c-muted);overflow-wrap:anywhere}
.result mark{color:var(--c-text)}
.suggest .section-title{margin-top:2.5rem}
.suggest .results{margin-top:0}
.result :is(h2,h3){margin:0;font-size:var(--step-1);line-height:1.25}
.result :is(h2,h3) a{color:var(--c-text);text-decoration-color:var(--c-line)}
.result :is(h2,h3) a:hover{color:var(--c-amber);text-decoration-color:currentColor}
/* On the 404 page: the page whose URL is nearest the missing one. */
.nearest{margin:1.25rem 0 0;padding:1rem 1.25rem;border:1px solid var(--c-line);border-left:4px solid var(--c-amber);border-radius:6px;background:var(--c-surface);font-size:var(--step-1);font-weight:600}
.nearest-url{display:block;margin-top:.25rem;font:400 var(--small) var(--font-mono);color:var(--c-muted);overflow-wrap:anywhere}

/* The terminal window and the post log */
.term{border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface);overflow:hidden}
.term-bar{display:flex;align-items:center;gap:.4rem;margin:0;padding:.6rem 1rem;background:var(--c-surface-2);border-bottom:1px solid var(--c-line);font:400 var(--small) var(--font-mono);color:var(--c-muted)}
.term-bar i{flex:none;width:.7rem;height:.7rem;border-radius:50%;background:var(--c-line)}
.term-bar i:first-child{background:var(--c-amber-deep)}
.term-bar span{margin-left:.6rem}
.term-bar span::before{content:"$ ";content:"$ " / "";color:var(--c-amber)}
.log{list-style:none;margin:0;padding:0}
.entry{position:relative;display:grid;grid-template-columns:7.5rem minmax(0,1fr);gap:.35rem 1.5rem;align-items:baseline;padding:1.15rem 1.5rem;border-bottom:1px solid var(--c-line);transition:background .15s}
.entry:last-child{border-bottom:0}
.entry::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--c-cyan);transform:scaleY(0);transform-origin:top;transition:transform .25s cubic-bezier(.2,.7,.2,1)}
.entry:hover{background:var(--c-surface-2)}
.entry:hover::before{transform:scaleY(1)}
.entry time{font:400 var(--small)/2 var(--font-mono);color:var(--c-muted);font-variant-numeric:tabular-nums}
.entry-main{display:grid;gap:.5rem;min-width:0}
.entry :is(h2,h3){font-size:var(--step-1);line-height:1.25;margin:0}
.entry :is(h2,h3) a{color:var(--c-text);text-decoration:none}
.entry :is(h2,h3) a::after{content:"";position:absolute;inset:0}
.entry:hover :is(h2,h3) a{color:var(--c-amber)}

/* Tags: chips coloured by kind, each landing a little off, like a packet
   that took the long way. They straighten up when you point at them. */
.tags{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.tags a{position:relative;z-index:1;display:block;padding:.28rem .55rem;border:1px solid currentColor;border-radius:6px;font:600 var(--small)/1.1 var(--font-mono);color:var(--tag,var(--c-cyan));text-decoration:none;transition:transform .15s}
.tags li:nth-child(3n+1) a{transform:translateY(1px) rotate(-1.5deg)}
.tags li:nth-child(3n+2) a{transform:translateY(-1px) rotate(1deg)}
.tags a[href$="/security"],.tags a[href$="/tls"],.tags a[href$="/csp"],.tags a[href$="/cookies"]{--tag:var(--c-amber)}
.tags a[href$="/ui"],.tags a[href$="/css"],.tags a[href$="/fonts"],.tags a[href$="/accessibility"]{--tag:var(--c-text)}
.tags a:hover{transform:none;background:var(--tag,var(--c-cyan));color:var(--c-bg)}
.tag-cloud{gap:.6rem}
/* Every tag (/blog/tags), as uniq -c prints it: the count, then the tag. */
.sort{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}
.sort .btn[aria-pressed=true]{border-color:var(--c-cyan);background:var(--c-cyan);color:var(--c-bg)}
.tag-log li{display:grid;grid-template-columns:4ch minmax(0,1fr);gap:1rem;align-items:center;padding:.7rem 1.5rem;border-bottom:1px solid var(--c-line)}
.tag-log li:last-child{border-bottom:0}
.tag-n{font:400 1rem var(--font-mono);color:var(--c-muted);text-align:right;font-variant-numeric:tabular-nums}
.tag-log .tags{display:block;justify-self:start}

/* Explore: tools, games, tags */
.explore{margin-top:3.5rem}
.explore-block{padding:1.5rem;border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface)}
.explore-block .section-title{font-size:var(--step-1);margin:0 0 1rem;font-family:var(--font-mono);letter-spacing:0}
.explore-block .section-title a{text-decoration:none}

/* Tools and games index: cards with a status line */
.item-grid{list-style:none;margin:0;padding:0;display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,19rem),1fr))}
.item-card a:not(.item-daily){position:relative;display:grid;gap:.75rem;align-content:start;height:100%;padding:1.5rem;border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface);color:var(--c-text);text-decoration:none;transition:border-color .15s,transform .15s}
.item-card a:not(.item-daily)::before{content:"READY";content:"READY" / "";font:600 var(--small) var(--font-mono);letter-spacing:.14em;color:var(--c-muted)}
.item-card a:not(.item-daily):hover{border-color:var(--c-amber);transform:translateY(-3px)}
/* A game with a daily puzzle: a strip at the bottom of its card, its own
   link, straight into the daily. The card lifts as one. */
.item-card.has-daily{display:flex;flex-direction:column;transition:transform .15s}
.item-card.has-daily:hover{transform:translateY(-3px)}
.item-card.has-daily a:not(.item-daily){flex:1;height:auto;border-bottom-left-radius:0;border-bottom-right-radius:0}
.item-card.has-daily a:not(.item-daily):hover{transform:none}
.item-daily{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.6rem 1rem;padding:.9rem 1.5rem;border:1px solid var(--c-line);border-top-color:color-mix(in srgb,var(--c-amber),transparent 60%);border-radius:0 0 var(--radius) var(--radius);background:color-mix(in srgb,var(--c-amber),var(--c-surface) 90%);color:var(--c-muted);font-size:var(--small);line-height:1.45;text-decoration:none;transition:border-color .15s}
.item-daily span{flex:1 1 12rem}
.item-daily b{display:block;margin-bottom:.1rem;font:600 var(--small) var(--font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--c-amber)}
.item-card .item-daily-go{flex:none;padding:.45rem .8rem;border-radius:8px;background:var(--c-amber);color:var(--c-bg);font:600 var(--small) var(--font-mono)}
.item-daily:hover{border-color:var(--c-amber)}
.item-daily:hover .item-daily-go{background:var(--c-text)}
.item-card strong{font-size:var(--step-2);line-height:1.15}
.item-card span{color:var(--c-muted)}
/* Only under make dev: a draft or scheduled post, tool or game. */
.flag{display:inline-block;vertical-align:.2em;margin-left:.4em;padding:.2em .5em;border-radius:4px;font:700 .7rem/1.2 var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--c-bg);background:var(--c-amber)}
.badge{position:absolute;top:1.5rem;right:1.5rem;font:600 var(--small) var(--font-mono);font-style:normal;letter-spacing:.14em;text-transform:uppercase;color:var(--c-cyan)}

/* Posts and prose */
.post-head .tags{margin-top:.25rem}
.prose>*+*{margin-top:1.25em}
.prose p,.prose ul,.prose ol,.prose pre,.prose .code{margin-bottom:0}
.prose h2{font-size:var(--step-2);margin-top:2em}
.prose h2::before{content:"## ";content:"## " / "";font-family:var(--font-mono);color:var(--c-amber-deep);font-weight:400}
.prose h3{font-size:var(--step-1);margin-top:1.75em}
.prose h3::before{content:"### ";content:"### " / "";font-family:var(--font-mono);color:var(--c-amber-deep);font-weight:400}
.prose :not(pre)>code{background:var(--c-surface-2);padding:.1em .35em;border-radius:4px;color:var(--c-amber)}
.prose :is(ul,ol){padding-left:1.4em}
.prose li+li{margin-top:.4em}
.prose li::marker{color:var(--c-cyan)}
.prose blockquote{margin:1.5rem 0 0;padding:.25rem 0 .25rem 1.25rem;border-left:4px solid var(--c-amber);font-style:italic}
.prose hr{width:60%;height:4px;margin:2.5rem 0;border:0;border-radius:2px;background:linear-gradient(90deg,var(--c-cyan-deep) 0 18%,var(--c-amber-deep) 18% 55%,var(--c-amber) 55% 100%)}
.prose img{border-radius:6px}
/* The rest of what a post can hold, in the site's colours rather than the
   browser's. content/posts/2026/every-html-element.md shows each one. */
.prose h4{font-size:var(--step-0);margin-top:1.6em}
.prose :is(h5,h6){font-size:var(--step-0);margin-top:1.5em;color:var(--c-muted)}
.prose h4::before{content:"#### ";content:"#### " / "";font-family:var(--font-mono);color:var(--c-amber-deep);font-weight:400}
.prose h5::before{content:"##### ";content:"##### " / "";font-family:var(--font-mono);color:var(--c-amber-deep);font-weight:400}
.prose h6::before{content:"###### ";content:"###### " / "";font-family:var(--font-mono);color:var(--c-amber-deep);font-weight:400}
.prose hgroup>*+*{margin-top:.35rem;color:var(--c-muted)}
.prose hgroup h3{margin-top:0}
mark{padding:0 .2em;border-radius:3px;background:rgb(242 163 60 / .28);color:inherit}
kbd{padding:.05em .4em;border:1px solid var(--c-line);border-bottom-width:2px;border-radius:4px;background:var(--c-surface-2);font-size:.8em;white-space:nowrap}
samp{color:var(--c-muted)}
del{color:var(--c-muted)}
ins{text-decoration-color:var(--c-cyan)}
abbr[title]{text-decoration:underline dotted;text-underline-offset:.2em;cursor:help}
sub,sup{line-height:0}
output{font-family:var(--font-mono);color:var(--c-amber)}
.prose blockquote>*+*{margin-top:.75em}
.prose blockquote footer{font-style:normal;font-size:var(--small);color:var(--c-muted)}
.prose blockquote footer::before{content:"— "}
.prose dl{display:grid;gap:.2rem}
.prose dt{font-weight:700}
.prose dd+dt{margin-top:.9rem}
.prose dd{margin:0;padding-left:1rem;border-left:2px solid var(--c-line);color:var(--c-muted)}
.prose menu{display:flex;flex-wrap:wrap;gap:.5rem;padding:0;list-style:none}
.prose menu li+li{margin-top:0}
/* Tables: rows ruled, headings in the mono face, numbers lined up. */
.prose table{width:100%;border-collapse:collapse;font-size:var(--small);font-variant-numeric:tabular-nums}
.prose caption{margin-bottom:.6rem;text-align:left;font:600 var(--small) var(--font-mono);color:var(--c-muted)}
.prose :is(th,td){padding:.55rem .75rem;border-bottom:1px solid var(--c-line);text-align:left;vertical-align:top}
.prose thead th{border-bottom:2px solid var(--c-cyan-deep);font-family:var(--font-mono);font-weight:600;color:var(--c-muted)}
.prose tbody th{font-weight:600}
.prose tfoot :is(th,td){border-bottom:0;border-top:2px solid var(--c-line);font-weight:600}
.prose figure picture{display:block}
.prose math[display=block]{overflow-x:auto}
/* Boxes: an aside, a disclosure, and a dialog shown in the page. */
.prose :is(aside,details,dialog:not(:modal)){padding:1rem 1.25rem;border:1px solid var(--c-line);border-radius:6px;background:var(--c-surface);color:var(--c-text)}
.prose dialog:not(:modal){position:static;width:auto;max-width:none;margin:1.25em 0 0}
.prose :is(aside,details,dialog)>:first-child{margin-top:0}
.prose :is(aside,details,dialog)>*+*{margin-top:.75em}
.prose summary{cursor:pointer;font-weight:600}
.prose summary::marker{color:var(--c-amber)}
.prose details[open]>summary{margin-bottom:.6rem}
.prose address{font-style:normal}
/* Forms, like a tool's (.app, below). */
.prose fieldset{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;min-width:0;margin:0;padding:1rem 1.25rem 1.25rem;border:1px solid var(--c-line);border-radius:6px}
.prose legend{padding:0 .4rem;font:600 var(--small) var(--font-mono);color:var(--c-muted)}
.prose fieldset>p{margin:0}
.prose label:not(:has(input)){font-weight:600}
.prose :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=submit],[type=reset],[type=button]),select,textarea){min-height:2.75rem;max-width:100%;padding:.5rem .75rem;border:1px solid var(--c-line);border-radius:6px;background:var(--c-bg);color:var(--c-text);font:400 1rem var(--font-mono)}
.prose textarea{width:100%;resize:vertical}
.prose :is(input,select,textarea):disabled{opacity:.55;cursor:not-allowed}
.prose ::placeholder{color:var(--c-muted);opacity:.8}
.prose :is(button:not(.code-copy),input[type=submit],input[type=reset],input[type=button]),.prose ::file-selector-button{min-height:2.75rem;padding:.5rem 1rem;border:1px solid var(--c-line);border-radius:8px;background:var(--c-surface-2);color:var(--c-text);font:600 1rem/1.2 var(--font-mono);cursor:pointer}
.prose ::file-selector-button{min-height:2.25rem;margin-right:.75rem;font-size:var(--small)}
.prose :is(button:not(.code-copy),input[type=reset],input[type=button]):hover,.prose ::file-selector-button:hover{border-color:var(--c-cyan)}
.prose :is(button[type=submit],input[type=submit]){border-color:transparent;background:var(--c-amber);color:var(--c-bg)}
.prose :is(button[type=submit],input[type=submit]):hover{background:var(--c-text)}
.prose :is(input[type=checkbox],input[type=radio]){width:1.15rem;height:1.15rem;margin:0 .4rem 0 0;vertical-align:-.15em}
.prose input[type=color]{width:3.5rem;height:2.75rem;padding:.2rem;border:1px solid var(--c-line);border-radius:6px;background:var(--c-bg)}
.prose :is(input,progress,meter){accent-color:var(--c-amber)}
.prose :is(progress,meter){width:12rem;max-width:100%;vertical-align:middle}
.prose input[type=file]{max-width:100%}
/* Figures: an image on its own, with its caption, and videos, wherever
   Markdown goes: posts, pages, a tool's notes, and the intros on the home,
   tools and games pages. A wide one (lib/markdown.php) is wider than the
   text on a wide screen, up to 56rem, the page's own width being the
   limit: each page is the container that 100cqi measures. A tall one is
   kept within the screen's height. */
.page:not(.page-full){container-type:inline-size}
:is(.prose,.intro,.sub) figure{margin:2.25rem 0 0}
:is(.prose,.intro,.sub) figure+*{margin-top:2.25rem}
:is(.prose,.intro,.sub) .figure-wide{width:min(56rem,100cqi);max-width:none}
/* Code is wider than the text too, the same way, since its lines are
   longer and can't wrap. The text stays at --prose, about 75 to 80
   characters a line, as long as reads comfortably. Not in a list or a
   quote, which start further in, so would run off the page. */
:is(.prose,.intro,.sub)>.code{width:min(56rem,100cqi);max-width:none}
:is(.prose,.intro,.sub) figure img{width:auto;max-height:min(85vh,56rem);border-radius:8px}
.figure-zoom{display:block;width:fit-content;border-radius:8px}
/* An SVG fills its figure, whatever size it says it is; one too tall to
   fit the screen keeps its shape, at the left. */
:is(.prose,.intro,.sub) .figure-vector img{width:100%;object-fit:contain;object-position:left}
.figure-vector .figure-zoom{width:auto}
:is(.prose,.intro,.sub) figcaption{max-width:var(--prose);margin-top:.8rem;padding-left:.8rem;border-left:2px solid var(--c-amber-deep);font-size:var(--small);line-height:1.5;color:var(--c-muted)}
/* A YouTube video before it plays: its poster, a play button and its
   title, all one link. Pressing it swaps in YouTube's player (the script
   in footer.php), the same size. */
.video-link{position:relative;display:grid;aspect-ratio:16/9;overflow:hidden;border-radius:8px;background:var(--c-surface-2);color:var(--c-text);text-decoration:none}
.video-link>*,.video-link::after{grid-area:1/1}
.video-link::after{content:"";z-index:1;background:linear-gradient(to top,rgb(11 14 20 / .92),rgb(11 14 20 / .4) 40%,transparent 65%)}
:is(.prose,.intro,.sub) .video-poster{width:100%;height:100%;max-height:none;object-fit:cover;border-radius:0}
.video-play{z-index:2;place-self:center;width:clamp(3.25rem,2.5rem + 3vw,5rem);aspect-ratio:1;margin-bottom:12%;border-radius:50%;background:var(--c-amber);box-shadow:0 .4rem 1.5rem rgb(0 0 0 / .5);transition:transform .15s}
.video-play::before{content:"";display:block;width:36%;height:42%;margin:29% 0 0 37%;background:var(--c-bg);clip-path:polygon(0 0,100% 50%,0 100%)}
.video-link:hover,.video-link:focus-visible{color:var(--c-text)}
.video-link:is(:hover,:focus-visible) .video-play{transform:scale(1.08)}
.video-text{z-index:2;align-self:end;padding:clamp(.7rem,.5rem + 1vw,1.25rem) clamp(.85rem,.6rem + 1.2vw,1.5rem)}
.video-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-weight:700;font-size:clamp(1rem,.92rem + .45vw,1.3rem);line-height:1.3;text-shadow:0 1px 3px rgb(0 0 0 / .6)}
.video-note{display:block;margin-top:.2rem;font:400 .8rem/1.4 var(--font-mono);color:var(--c-muted)}
.video-frame{display:block;width:100%;height:auto;aspect-ratio:16/9;border:0;border-radius:8px;background:#000}
/* On a phone the title goes under the picture, where it doesn't crowd
   the play button. */
.video-link::before{content:"";grid-area:1/1;aspect-ratio:16/9}
@media (max-width:40rem){
.video-link{aspect-ratio:auto;grid-template-rows:auto auto}
.video-link::after{display:none}
:is(.prose,.intro,.sub) .video-poster{height:auto;aspect-ratio:16/9}
.video-play{margin-bottom:0}
.video-text{grid-area:2/1;align-self:auto;border-top:1px solid var(--c-line)}
.video-title{text-shadow:none}
.video-after{display:block;background:var(--c-surface-2);border-radius:0 0 8px 8px}
.video-frame:has(+.video-after){border-radius:8px 8px 0 0}
}
.pager{display:flex;justify-content:space-between;gap:1rem;margin-top:2.5rem;padding-top:2rem;border-top:1px solid var(--c-line)}
.pager a{display:grid;gap:.35rem;max-width:48%;padding:1rem 1.25rem;border:1px solid var(--c-line);border-radius:6px;background:var(--c-surface);color:var(--c-text);text-decoration:none;font-weight:600;line-height:1.35}
.pager a[rel=next]{text-align:right;margin-left:auto}
.pager a:hover{border-color:var(--c-cyan)}
.pager small{display:block;font:400 var(--small) var(--font-mono);text-transform:uppercase;letter-spacing:.1em;color:var(--c-muted)}
.other-tags .section-title{font-size:var(--step-1)}

/* Footer: the page's first byte, as the visitor's browser measured it */
.site-foot{border-top:1px solid var(--c-line);background:var(--c-surface);padding-block:2rem 4.5rem}
.foot-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.25rem 2rem}
.foot-row p{margin:0}
.foot-brand{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;font:400 var(--small) var(--font-mono);color:var(--c-muted)}
.foot-brand a{color:inherit;text-underline-offset:.2em}
.foot-brand a:hover{color:var(--c-text)}
.foot-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 2rem;margin-top:1.75rem;padding-top:1.25rem;border-top:1px solid var(--c-line)}
.foot-search{flex:0 1 24rem}
.foot-nav a{padding:.4rem .55rem;font-size:var(--small)}
.ttfb{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:.1rem 1rem;border-left:3px solid var(--c-cyan-deep);padding-left:.85rem}
.ttfb[hidden]{display:none}
.stat-label{grid-column:1/-1;font:400 var(--small)/1.4 var(--font-mono);color:var(--c-muted)}
.stat-value{font:600 1.35rem/1.25 var(--font-mono);color:var(--c-text);font-variant-numeric:tabular-nums}
.stat-note{font:400 var(--small)/1.4 var(--font-mono);color:var(--c-muted)}

/* Tools and games on a page of their own, under a heading */
.page-item:not(.page-full) .item-head{display:grid;gap:.9rem;margin-bottom:2rem}
.page-item:not(.page-full) .item-head h1{font-size:var(--step-3);letter-spacing:-.025em;margin:0}
.item-notes{max-width:var(--prose);margin-top:2.5rem;color:var(--c-muted)}

/* A tool's or game's controls: a panel of labelled fields, buttons and
   monospaced results. Fields are 1rem, so phones don't zoom into them,
   and every control is at least 44px tall. */
.app{display:grid;gap:1.25rem;max-width:var(--prose);padding:clamp(1rem,3vw,1.5rem);border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface)}
.app-row{display:flex;flex-wrap:wrap;gap:1rem;align-items:end}
.app label{display:grid;gap:.35rem;font:600 var(--small) var(--font-mono);color:var(--c-muted)}
.app label:has(input[type=checkbox]){display:flex;align-items:center;gap:.5rem;min-height:2.75rem}
.app :is(input:not([type=checkbox]),select,textarea){min-height:2.75rem;max-width:100%;padding:.5rem .75rem;border:1px solid var(--c-line);border-radius:6px;background:var(--c-bg);color:var(--c-text);font:400 1rem var(--font-mono)}
.app input[type=checkbox]{width:1.25rem;height:1.25rem;accent-color:var(--c-amber)}
.app textarea{width:100%;min-height:5rem;resize:vertical}
.btn{min-height:2.75rem;padding:.5rem 1rem;border:1px solid transparent;border-radius:8px;background:var(--c-amber);color:var(--c-bg);font:600 1rem/1.2 var(--font-mono);cursor:pointer}
.btn:hover{background:var(--c-text)}
.btn-quiet{border-color:var(--c-line);background:var(--c-surface-2);color:var(--c-text)}
.btn-quiet:hover{border-color:var(--c-cyan);background:var(--c-surface-2)}
.out{margin:0;font:400 1rem/1.5 var(--font-mono);font-variant-numeric:tabular-nums;overflow-x:auto}
.out table{width:100%;border-collapse:collapse}
.out :is(th,td){padding:.45rem .5rem;border-bottom:1px solid var(--c-line);text-align:left;vertical-align:top}
.out th{color:var(--c-muted);font-weight:400}
.out dt{color:var(--c-amber)}
.out dd{margin:0 0 .75rem;color:var(--c-muted);font-family:var(--font)}
.big{font:700 var(--step-3)/1 var(--font-mono);color:var(--c-text)}
.swatch{min-height:8rem;border:1px solid var(--c-line);border-radius:var(--radius)}
/* A grid of buttons, --n across. On a phone they shrink to fit, down to
   24px, the smallest target WCAG 2.2 allows. */
.cells{display:grid;grid-template-columns:repeat(var(--n),minmax(1.5rem,4rem));gap:.4rem}
.cell{aspect-ratio:1;border:1px solid var(--c-line);border-radius:6px;background:var(--c-bg);color:var(--c-muted);font:600 var(--small) var(--font-mono);cursor:pointer}
.cell[aria-pressed=true]{background:var(--c-amber);color:var(--c-bg)}
.ping{display:grid;place-items:center;width:100%;min-height:14rem;border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface-2);color:var(--c-text);font:700 var(--step-2) var(--font-mono);cursor:pointer;touch-action:manipulation}
.ping.is-go{background:var(--c-cyan);color:var(--c-bg)}
/* A full one: a bar of controls, then a canvas filling the rest. */
.stage-app{display:flex;flex-direction:column}
.stage-bar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.25rem;padding:.5rem 1rem;border-bottom:1px solid var(--c-line);font:400 var(--small) var(--font-mono);color:var(--c-muted)}
.stage-bar label{display:flex;align-items:center;gap:.5rem}
.stage-bar :is(select,input){min-height:2.75rem;padding:.25rem .5rem;border:1px solid var(--c-line);border-radius:6px;background:var(--c-bg);color:var(--c-text);font:400 1rem var(--font-mono)}
.stage-bar output{color:var(--c-text);font-variant-numeric:tabular-nums}
.stage-app canvas{flex:1;min-height:0;width:100%;touch-action:none}

/* Full viewport: a slim header with a quiet line, the app bar, then the
   stage fills the rest. The page itself doesn't scroll, but the
   scrollbar still shows, as on every other page, so opening a tool or
   game, or leaving one, doesn't shift the page sideways. The body is
   exactly the viewport's height and clips anything past it, so the
   scrollbar has nothing to scroll. */
html.is-full,html.is-full body{height:100%}
html.is-full body{height:100dvh;overflow:hidden}
.is-full .site-head{flex:none;padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);border-bottom:1px solid var(--c-line)}
.is-full .head-row{width:auto;margin-inline:1rem;padding-block:.4rem}
.is-full .brand{font-size:1rem}
.is-full .brand .mark{width:1.8rem}
.is-full .nav a{padding:.3rem .65rem;font-size:.875rem}
.is-full .page-full{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:none;margin:0;padding:0}
.is-full .page-full .item-head{display:flex;align-items:center;gap:.75rem;margin:0;padding:.5rem 1rem;background:var(--c-surface-2);border-bottom:1px solid var(--c-line)}
.is-full .page-full .item-head h1{margin:0;font:600 1rem var(--font-mono);letter-spacing:0}
.is-full .page-full .item-head .cmd{font-size:.875rem}
.stage{flex:1;min-height:0;position:relative;background:var(--c-stage);color:var(--c-stage-text)}
.fs-btn{margin-left:auto;align-self:center;font:600 var(--small)/1.2 var(--font-mono);padding:.35rem .75rem;border-radius:6px;border:1px solid var(--c-line);background:var(--c-surface);color:var(--c-text);cursor:pointer}
.fs-btn:hover{border-color:var(--c-cyan)}

/* Color Sequence (content/games/color-sequence): a bar, the board, then a
   dock with the colors and buttons. The board is a size container, so the
   pegs (--peg) fit whatever room it has: eleven rows tall (ten guesses and
   the code), and as wide as the level's row, from 20px up to 52px. app.js
   sets the level's sizes on .cs: --p pegs, key pins in --kc columns taking
   --kw pegs' width, and the colors in --pc columns, or --pn on a narrow
   screen and --pl on a phone on its side. Each color
   has a shape on it too, for anyone who can't tell two colors apart, and
   the key pins differ by shape: a solid dot for the right spot, a ring for
   the wrong one. Only transform and opacity animate. */
/* Control sizes follow the screen's height, smoothly, between a
   comfortable minimum for a finger and the full size: --tap for the
   bar's buttons, --act for Clear and Guess, --pick for the colors
   (which also shrink to the width), --sp for the dock's spacing. */
.cs{--tap:clamp(2.25rem,1.25rem + 2.5dvh,2.5rem);--act:clamp(2.4rem,1.3rem + 3.2dvh,2.9rem);--pick:clamp(2.4rem,1rem + 4.5dvh,3.25rem);--sp:clamp(.35rem,1.1dvh,.6rem);display:grid;grid-template:"bar" auto "board" minmax(0,1fr) "dock" auto/minmax(0,1fr);padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
.cs [data-c="0"]{--k:#E5484D;--shape:circle(44%)}
.cs [data-c="1"]{--k:#F28B2C;--shape:polygon(50% 4%,98% 90%,2% 90%)}
.cs [data-c="2"]{--k:#F5D547;--shape:inset(10%)}
.cs [data-c="3"]{--k:#3FB950;--shape:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.cs [data-c="4"]{--k:#4C8DF6;--shape:polygon(34% 0,66% 0,66% 34%,100% 34%,100% 66%,66% 66%,66% 100%,34% 100%,34% 66%,0 66%,0 34%,34% 34%)}
.cs [data-c="5"]{--k:#A371F7;--shape:polygon(50% 0,62% 36%,100% 36%,69% 58%,81% 95%,50% 72%,19% 95%,31% 58%,0 36%,38% 36%)}
.cs [data-c="6"]{--k:#EC6FB5;--shape:polygon(25% 6%,75% 6%,100% 50%,75% 94%,25% 94%,0 50%)}
.cs [data-c="7"]{--k:#2EC4B6;--shape:polygon(20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%,0 80%,30% 50%,0 20%)}
.cs [data-c="8"]{--k:#E4E7EB;--shape:inset(34% 0)}
.cs [data-c="9"]{--k:#9C6B3E;--shape:polygon(0 0,100% 0,56% 50%,100% 100%,0 100%,44% 50%)}
.cs-ball,.cs-peg[data-c]{background:radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--k),#fff 50%),var(--k) 45%,color-mix(in srgb,var(--k),#000 35%));box-shadow:inset 0 -2px 3px rgb(0 0 0 / .25),0 2px 4px rgb(0 0 0 / .45)}
.cs-ball::after,.cs-peg[data-c]::after{content:"";position:absolute;inset:31%;background:rgb(0 0 0 / .42);clip-path:var(--shape)}

.cs-bar{grid-area:bar;display:flex;align-items:center;gap:clamp(.35rem,1.5vw,.5rem);padding:calc(var(--sp) * .7) clamp(.5rem,2.5vw,.75rem);border-bottom:1px solid var(--c-line);font:400 var(--small) var(--font-mono);color:var(--c-muted)}
.cs-home{display:none}
.cs-count{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:0 .9rem;min-width:0;margin:0 0 0 auto;line-height:1.25;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.cs-count b{color:var(--c-text)}
.cs-btn{min-height:var(--tap,2.5rem);padding:.35rem .8rem;white-space:nowrap;border:1px solid var(--c-line);border-radius:8px;background:var(--c-surface-2);color:var(--c-text);font:600 var(--small)/1.2 var(--font-mono);cursor:pointer}
.cs-btn:hover{border-color:var(--c-cyan)}
.cs-btn-round{width:var(--tap,2.5rem);padding:0;border-radius:50%;font-size:1rem}
.cs-btn-go{border-color:transparent;background:var(--c-amber);color:var(--c-bg)}
.cs-btn-go:hover{background:var(--c-text)}
.cs-btn-go:disabled{opacity:.35;cursor:default;background:var(--c-amber)}
.cs button:focus-visible{outline:2px solid var(--c-cyan);outline-offset:2px}
/* Music and effects buttons: the speaker shows waves when on and a cross
   when off; the note gets a slash when off. */
.cs-sound{display:inline-grid;place-items:center}
.cs-sound[aria-pressed=true] .cs-sound-off,.cs-sound[aria-pressed=false] .cs-sound-on{display:none}
.cs-sound[aria-pressed=false]{color:var(--c-muted)}
/* The browser is holding the music back until a touch or key press:
   the music button glows amber, gently, until then. */
.cs.is-audio-waiting .cs-bar [data-act=music]{border-color:var(--c-amber);color:var(--c-amber);animation:cs-wait 1.6s ease-in-out infinite}

.cs-board{grid-area:board;container-type:size;overflow:hidden auto;overscroll-behavior:contain;scrollbar-width:thin;position:relative}
/* The finale's fireworks, drawn over the board; with reduced motion, a
   warm glow instead. */
.cs-sky{position:absolute;top:0;left:0;width:100%;height:100cqh;pointer-events:none}
.cs.is-finale .cs-board{box-shadow:inset 0 0 4rem color-mix(in srgb,var(--c-amber),transparent 75%)}
/* --peg fits the board's height, but not below 2rem: past that the board
   scrolls instead. Its width always fits: --p pegs with --g gaps between
   (narrower from 8 pegs), the number, the key pins or tally (--kw) and
   the padding. */
.cs-field{--peg:clamp(.8125rem,min(max(calc((100cqh - 1rem) / 13.3),2rem),calc((100cqw - 1rem) / (var(--p,4) * (1 + var(--g,.2)) + var(--g,.2) + var(--kw,1) + 1.3))),3.25rem);--gap:calc(var(--peg) * var(--g,.2));min-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.5rem}
.cs-rows{display:flex;flex-direction:column-reverse;gap:calc(var(--peg) * .06);margin:0;padding:0;list-style:none}
.cs-row,.cs-secret{display:grid;grid-template-columns:minmax(calc(var(--peg) * .7),max-content) auto calc(var(--peg) * var(--kw,1));align-items:center;gap:var(--gap);padding:calc(var(--peg) * .05) calc(var(--peg) * .25);border-radius:calc(var(--peg) * .3);transition:background-color .15s}
/* The rim round each empty hole and the dot for each key pin: 4.3:1
   against the board, so they show on any screen, and a little dimmer, still
   3.6:1, on the rows not reached yet. */
.cs{--rim:#6B788D}
.cs-row:not(.is-done,.is-active){--rim:#5E6B80}
.cs-row.is-active{background:var(--c-surface-2);box-shadow:inset 0 0 0 1px var(--c-line)}
.cs-row.is-active .cs-peg{cursor:pointer}
.cs-row.is-win{background:color-mix(in srgb,var(--c-amber),transparent 84%)}
@media (hover:hover){.cs:not(.is-over) .cs-row.is-done{cursor:copy}.cs:not(.is-over) .cs-row.is-done:hover{background:var(--c-surface)}}
.cs-num{font:400 max(.625rem,calc(var(--peg) * .32))/1 var(--font-mono);white-space:nowrap;color:var(--c-muted);text-align:right}
.cs-row.is-active .cs-num{color:var(--c-amber);font-weight:700}
.cs-pegs{display:flex;gap:var(--gap)}
.cs-peg{--n:0;position:relative;flex:none;width:var(--peg);height:var(--peg);border-radius:50%;background:#06080C;box-shadow:inset 0 2px 5px rgb(0 0 0 / .8),0 0 0 max(1.5px,calc(var(--peg) * .06)) var(--rim)}
.cs-peg.is-cur{outline:2px solid var(--c-cyan);outline-offset:2px}
.cs-row.is-active .cs-peg[data-c]{animation:cs-pop .18s ease-out}
.cs-pegs>:nth-child(2),.cs-keys>:nth-child(2){--n:1}
.cs-pegs>:nth-child(3),.cs-keys>:nth-child(3){--n:2}
.cs-pegs>:nth-child(4),.cs-keys>:nth-child(4){--n:3}
.cs-pegs>:nth-child(5),.cs-keys>:nth-child(5){--n:4}
.cs-pegs>:nth-child(6),.cs-keys>:nth-child(6){--n:5}
.cs-pegs>:nth-child(7),.cs-keys>:nth-child(7){--n:6}
.cs-pegs>:nth-child(8),.cs-keys>:nth-child(8){--n:7}
.cs-pegs>:nth-child(9),.cs-keys>:nth-child(9){--n:8}
.cs-pegs>:nth-child(10),.cs-keys>:nth-child(10){--n:9}
.cs-keys{display:grid;grid-template-columns:repeat(var(--kc,2),1fr);place-items:center;width:calc(var(--peg) * .44 * var(--kc,2));height:calc(var(--peg) * .8)}
.cs-key{--n:0;display:inline-block;width:calc(var(--peg) * .14);height:calc(var(--peg) * .14);border-radius:50%;background:var(--rim,#6B788D);vertical-align:middle}
.cs-key[data-k]{width:calc(var(--peg) * .36);height:calc(var(--peg) * .36)}
/* The tally: a row's result as numbers, a dot for the right spot and a
   ring for the wrong spot, in place of the pins where they'd be too
   small (is-tally, set by app.js). */
.cs-tally{display:none}
.cs.is-tally .cs-keys{display:none}
.cs.is-tally .cs-tally{grid-column:3;grid-row:1;display:flex;align-items:center;gap:.45em;font:700 clamp(11px,calc(var(--peg) * .45),15px)/1 var(--font-mono);font-variant-numeric:tabular-nums;color:var(--c-text)}
.cs-tally b,.cs-tally i{display:inline-flex;align-items:center;gap:.2em;font-style:normal}
.cs-tally b{color:var(--c-amber)}
.cs-tally :empty{display:none}
.cs-tally b::before,.cs-tally i::before{content:"";width:.62em;height:.62em;border-radius:50%}
.cs-tally b::before{background:var(--c-amber)}
.cs-tally i::before{box-shadow:inset 0 0 0 2px var(--c-text)}

.cs-key[data-k="2"]{background:var(--c-amber);box-shadow:0 0 calc(var(--peg) * .15) color-mix(in srgb,var(--c-amber),transparent 50%)}
.cs-key[data-k="1"]{background:none;box-shadow:inset 0 0 0 max(2px,calc(var(--peg) * .06)) var(--c-text)}
.cs-row.is-new .cs-key[data-k]{animation:cs-key .3s calc(var(--n) * 90ms) cubic-bezier(.3,1.6,.5,1) both}
.cs-secret{position:sticky;top:0;z-index:1;margin-bottom:calc(var(--peg) * .3);background:var(--c-surface);box-shadow:inset 0 0 0 1px var(--c-line)}
.cs-secret .cs-peg:not([data-c]){background:var(--c-surface-2);box-shadow:inset 0 0 0 max(1.5px,calc(var(--peg) * .06)) var(--rim)}
.cs-secret .cs-peg:not([data-c])::after{content:"?";position:absolute;inset:0;display:grid;place-items:center;font:700 calc(var(--peg) * .45)/1 var(--font-mono);color:var(--c-muted)}
.cs-secret.is-flip .cs-peg{animation:cs-flip .45s calc(var(--n) * 110ms) ease-out both}
.cs.is-over:not(.is-won) .cs-secret{box-shadow:inset 0 0 0 2px var(--c-amber)}
.cs.is-won .cs-row.is-win .cs-peg{animation:cs-hop .5s calc(.35s + var(--n) * 80ms) ease-in-out}

.cs-dock{grid-area:dock;display:grid;justify-items:center;gap:var(--sp);padding:var(--sp) .75rem calc(var(--sp) + .15rem + env(safe-area-inset-bottom));border-top:1px solid var(--c-line);background:var(--c-surface)}
.cs-msg{margin:0;min-height:1.4em;font:400 var(--small)/1.4 var(--font-mono);color:var(--c-muted);text-align:center;text-wrap:balance}
.cs.is-over .cs-msg{font:700 var(--step-1)/1.3 var(--font);color:var(--c-text)}
/* --pal, set by app.js: all the colors in one row when the dock is wide
   enough for them at a good size, otherwise two. */
.cs-pal{display:grid;grid-template-columns:repeat(var(--pal,6),minmax(0,var(--pick)));justify-content:center;gap:.4rem;width:100%;max-width:36rem}
.cs-pick[hidden]{display:none}
.cs-pick{position:relative;min-width:0;aspect-ratio:1;padding:0;border:0;border-radius:50%;cursor:pointer;transition:transform .08s}
.cs-pick:active{transform:scale(.88)}
.cs-pick kbd{display:none}
@media (hover:hover) and (pointer:fine){
.cs-pick:hover{transform:scale(1.07)}
.cs-pick:active{transform:scale(.9)}
.cs-pick kbd{display:block;position:absolute;right:-.15rem;bottom:-.15rem;min-width:1.15rem;padding:.05rem .2rem;border:1px solid var(--c-line);border-radius:4px;background:var(--c-bg);color:var(--c-muted);font:600 .7rem/1.2 var(--font-mono)}
}
.cs-acts{display:flex;gap:.5rem;width:100%;max-width:30rem}
.cs-acts .cs-btn,.cs-end .cs-btn{flex:1;min-height:var(--act);font-size:1rem}
.cs-end{display:none;justify-items:center;gap:.6rem;width:100%;max-width:30rem}
.cs-end-acts{display:flex;gap:.5rem;width:100%}
.cs-end .cs-btn[hidden]{display:none}
.cs.is-over .cs-end{display:grid}
.cs.is-over :is(.cs-pal,.cs-acts){display:none}
.cs-stats{margin:0;min-height:1.4em;font:400 var(--small)/1.4 var(--font-mono);color:var(--c-muted)}

/* A narrow screen: the title row goes up beside the site's name, where
   the menu would be, to give the board the room. */
@media (max-width:34rem){
.is-full .page-full:has(.cs) .item-head{position:absolute;top:0;right:0;height:2.5rem;padding:0 .75rem;background:none;border:0}
.is-full .page-full:has(.cs) .item-head h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

.cs-help{--peg:2rem;width:min(34rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);padding:0;border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-surface);color:var(--c-text);font-size:1rem;line-height:1.55;-webkit-user-select:text;user-select:text}
.cs-help::backdrop{background:rgb(0 0 0 / .65)}
.cs-help-body{padding:1.25rem 1.5rem 1.5rem}
.cs-help h2{margin:0 0 .5rem;font-size:var(--step-1)}
.cs-help h2:not(:first-child){margin-top:1.5rem}
.cs-help h3{margin:1.25rem 0 .25rem;font:600 var(--small) var(--font-mono);color:var(--c-muted);text-transform:uppercase;letter-spacing:.06em}
.cs-help :is(p,ul){margin:.5rem 0}
.cs-help ul{padding-left:1.2rem}
.cs-help li+li{margin-top:.35rem}
.cs-help .cs-key{margin:0 .35rem 0 .1rem}
.cs-help kbd{padding:.05rem .35rem;border:1px solid var(--c-line);border-radius:4px;background:var(--c-bg)}
.cs-help form{margin-top:1.25rem}
/* On/off switches: a track with a knob, which slides right when on. */
/* The sound settings: each switch, then its volume slider, 1 to 10, with
   a numbered mark under each step, which can be tapped. The slider is
   drawn here, the same in every browser, so the marks line up under
   the thumb's centre: from half a thumb in at 1 to half a thumb in from
   the end at 10. --f, set by app.js, is how far along it is, 0 to 1,
   for the filled part of the track. */
.cs-mixer{display:grid;gap:.1rem}
.cs-vol{--thumb:1.5rem;margin-bottom:.6rem}
.cs-switch[aria-pressed=false]+.cs-vol{opacity:.5}
.cs-vol input{--fill:calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--f,.5));display:block;width:100%;height:2.25rem;margin:0;background:none;cursor:pointer;-webkit-appearance:none;appearance:none}
.cs-vol input::-webkit-slider-runnable-track{height:.4rem;border-radius:.2rem;background:linear-gradient(90deg,var(--c-amber) var(--fill),var(--c-line) var(--fill))}
.cs-vol input::-moz-range-track{height:.4rem;border-radius:.2rem;background:linear-gradient(90deg,var(--c-amber) var(--fill),var(--c-line) var(--fill))}
.cs-vol input::-webkit-slider-thumb{width:var(--thumb);height:var(--thumb);margin-top:calc(.2rem - var(--thumb) / 2);border:3px solid var(--c-amber);border-radius:50%;background:var(--c-text);box-shadow:0 1px 3px rgb(0 0 0 / .5);-webkit-appearance:none;appearance:none}
.cs-vol input::-moz-range-thumb{box-sizing:border-box;width:var(--thumb);height:var(--thumb);border:3px solid var(--c-amber);border-radius:50%;background:var(--c-text);box-shadow:0 1px 3px rgb(0 0 0 / .5)}
.cs-vol input:focus-visible{outline:2px solid var(--c-cyan);outline-offset:2px;border-radius:4px}
.cs-ticks{display:flex;justify-content:space-between;padding-inline:calc(var(--thumb) / 2 - .75rem)}
.cs-ticks span{display:grid;justify-items:center;width:1.5rem;padding-top:.1rem;font:400 .75rem/1.6 var(--font-mono);color:var(--c-muted);cursor:pointer;-webkit-user-select:none;user-select:none}
.cs-ticks span::before{content:"";width:1px;height:.35rem;background:var(--c-line)}
.cs-ticks span.is-on{color:var(--c-amber);font-weight:700}
.cs-ticks span.is-on::before{width:2px;background:var(--c-amber)}
.cs-reset{justify-self:start;margin-top:.1rem}
.cs-reset:disabled{opacity:.45;cursor:default;border-color:var(--c-line)}
.cs-switch{display:inline-flex;align-items:center;gap:.6rem;min-height:2.75rem;padding:0;border:0;background:none;color:var(--c-text);font:600 1rem var(--font);cursor:pointer}
.cs-switch::before{content:"";width:2.6rem;height:1.5rem;border-radius:1rem;background:radial-gradient(circle at .75rem 50%,var(--c-muted) .5rem,transparent calc(.5rem + 1px)) var(--c-bg);box-shadow:inset 0 0 0 1px var(--c-line);transition:background-position .15s}
.cs-switch[aria-pressed=true]::before{background:radial-gradient(circle at 1.85rem 50%,var(--c-bg) .5rem,transparent calc(.5rem + 1px)) var(--c-amber);box-shadow:none}
.cs-help form .cs-btn{width:100%;min-height:2.9rem;font-size:1rem}
/* The mode button, the modes panel and the daily's results. */
.cs-mode{display:inline-flex;align-items:center;gap:.35rem}
.cs-mode [aria-hidden]{color:var(--c-muted);font-size:.75em}
.cs-mode-card{margin:.75rem 0;padding:.85rem 1rem 1rem;border:1px solid var(--c-line);border-radius:10px;background:var(--c-bg)}
.cs-help .cs-mode-card h3{margin:0;font:700 1.05rem var(--font);color:var(--c-text);text-transform:none;letter-spacing:0}
.cs-mode-card p{margin:.25rem 0 .75rem;color:var(--c-muted)}
.cs-mode-acts{display:flex;gap:.5rem}
.cs-mode-acts .cs-btn{flex:1;min-height:2.75rem;font-size:1rem}
.cs-results-sum{font:700 var(--step-1)/1.3 var(--font)}
.cs-grid{display:grid;gap:.3rem;margin:1rem 0;padding:0;list-style:none}
.cs-grid li{display:flex;align-items:center;gap:.25rem}
.cs-grid b{width:1.75rem;font:600 var(--small) var(--font-mono);color:var(--c-muted);text-align:right;margin-right:.4rem}
.cs-grid span,.cs-grid-key span{width:1.1rem;height:1.1rem;border-radius:3px;background:#3A4558}
.cs-grid [data-s="1"],.cs-grid-key [data-s="1"]{background:var(--c-amber)}
.cs-grid [data-s="2"],.cs-grid-key [data-s="2"]{background:#3FB950}
.cs-grid i{margin-left:.3rem;font-style:normal;font-weight:700;color:#E5484D}
.cs-grid-key{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .45rem;font-size:var(--small);color:var(--c-muted)}
.cs-grid-key span{display:inline-block;width:.85rem;height:.85rem}
.cs-grid-key i{display:inline-flex;align-items:center;gap:.3rem;font-style:normal;white-space:nowrap}
.cs-share{width:100%;min-height:2.9rem;margin-top:.5rem;font-size:1rem}
.cs-share-note{min-height:1.4em;text-align:center;color:var(--c-muted);font-size:var(--small)}
.cs-share-text{width:100%;padding:.5rem;border:1px solid var(--c-line);border-radius:8px;background:var(--c-bg);color:var(--c-text);font:400 var(--small)/1.4 var(--font-mono)}
.cs-share-text[hidden]{display:none}
.cs-results-next{color:var(--c-muted);font-size:var(--small)}
.cs-levels{display:grid;gap:.35rem;margin:.75rem 0 0;padding:0;list-style:none}
.cs-lv{display:grid;grid-template-columns:5.5rem 1fr;gap:0 .75rem;width:100%;padding:.5rem .75rem;border:1px solid var(--c-line);border-radius:8px;background:var(--c-bg);color:var(--c-text);font:400 var(--small)/1.4 var(--font-mono);text-align:left;cursor:pointer}
.cs-lv b{grid-row:span 2}
.cs-lv small{grid-column:2;color:var(--c-muted);font:400 .8rem/1.4 var(--font)}
.cs-lv:hover:not(:disabled){border-color:var(--c-cyan)}
.cs-lv:disabled{opacity:.45;cursor:default}
.cs-lv[aria-current]{border-color:var(--c-amber);box-shadow:inset 0 0 0 1px var(--c-amber)}
.cs-lv[aria-current] b{color:var(--c-amber)}

@keyframes cs-pop{0%{transform:scale(.55)}65%{transform:scale(1.1)}100%{transform:none}}
@keyframes cs-key{from{transform:scale(0);opacity:0}}
@keyframes cs-flip{from{transform:rotateY(90deg)}}
@keyframes cs-hop{40%{transform:translateY(-24%)}}
@keyframes cs-wait{50%{transform:scale(1.12)}}

/* The side layout (is-side, chosen by app.js when the screen is too
   short for the rows stacked above the colors and wide enough to set
   them side by side, whatever the device): the board on the left at the
   screen's full height, with no site header or title row, and on the
   right the bar, with a link home in place of the header, and the
   colors, scrolling only if even that's too much. Both clear the notch
   and the home indicator. */
html.is-full:has(.cs.is-side) .site-head,.is-full .page-full:has(.cs.is-side) .item-head{display:none}
.cs.is-side{grid-template:"board bar" auto "board dock" minmax(0,1fr)/minmax(0,1fr) min(21rem,max(15rem,48vw))}
.is-side .cs-board{padding-bottom:env(safe-area-inset-bottom)}
/* The side bar wraps as the column narrows: the mode and the three round
   buttons on the first line if they fit, then Home, then the count,
   on a line of its own if it has to be. */
.is-side .cs-bar{flex-wrap:wrap;gap:.35rem;padding:.35rem .5rem;border-bottom:0;border-left:1px solid var(--c-line);background:var(--c-surface)}
.is-side .cs-bar [data-act=music]{margin-left:auto}
.is-side .cs-home{display:block;order:1;flex:1 0 50%;color:var(--c-muted);font:600 .8rem var(--font-mono);text-decoration:none;white-space:nowrap}
.is-side .cs-home:hover{color:var(--c-text)}
.is-side .cs-count{order:2;gap:0 .6rem;margin:0;font-size:.8rem}
.is-side .cs-dock{align-content:center;padding-inline:.5rem;border-top:0;border-left:1px solid var(--c-line);overflow-y:auto}
.is-side .cs-msg{font-size:.8rem;line-height:1.3}
.cs.is-side.is-over .cs-msg{font-size:1rem}
.is-side .cs-pal{gap:.3rem}

@media (max-width:46rem){
.falls span{opacity:.22}
.entry{grid-template-columns:minmax(0,1fr);padding:1.1rem 1.25rem;gap:.3rem}
.entry time{order:-1;line-height:1.4}
.term-bar span{margin-left:.3rem}
.is-full .nav{display:none}
.is-full .page-full .item-head .cmd{display:none}
.pager{flex-direction:column}
.pager a,.pager a[rel=next]{max-width:none;margin-left:0}
.pager>span:empty{display:none}
}
/* Windows high contrast drops backgrounds, so mark the current page another
   way. */
@media (forced-colors:active){
.nav a[aria-current]{text-decoration:underline;text-decoration-thickness:2px}
.flag{border:1px solid}
}
/* Printing: dark text on white paper, without the nav, the footer or the
   links to other posts, and with each link's address after it, since
   paper can't be clicked. */
@media print{
:root{--hl-com:#5A6270;--hl-kw:#00536B;--hl-str:#2E6B12;--hl-num:#8A4B00;--hl-fn:#1F4FB0;--hl-var:#A3262B;--hl-prop:#00695C;--hl-attr:#6B3FA0}
:root{color-scheme:light;--c-bg:#fff;--c-surface:#fff;--c-surface-2:#f2f2f2;--c-line:#bbb;--c-text:#000;--c-muted:#333;--c-amber:#7a4a00;--c-cyan:#00536b;--c-amber-deep:#7a4a00;--c-cyan-deep:#00536b}
html{overflow:visible}
body{font-size:11pt;line-height:1.5}
.site-head{border-bottom:1px solid #000}
.nav,.skip,.site-foot,.pager,.other-tags,.sort,.fs-btn,.falls,.code-copy,.search-form{display:none}
.page{padding-block:1.5rem}
.mark-anim span{animation:none}
.prose a[href^="http"]::after{content:" (" attr(href) ")";font-size:.85em;color:var(--c-muted);overflow-wrap:anywhere}
.prose :is(pre,.code,blockquote,img,figure),.entry{break-inside:avoid}
/* A video prints as its poster and title, then its address, which the
   rule above adds where the screen has its shading. */
.video-play,.video-link::before{display:none}
.video-link{display:block;aspect-ratio:auto}
.video-link::after{display:block;background:none;padding-top:.4rem}
.prose :is(h2,h3){break-after:avoid}
}
@media (prefers-reduced-motion:reduce){
*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
