/* =====================================================================
   refresh.css — the "zine" layer.
   Sits on top of style.css. Idea: less glossy UI kit, more hand-made:
   hard edges, pixel dithering instead of soft glows, marker highlights,
   bracket links, a sticker. Delete the <link> to this file to go back.
   ===================================================================== */

:root {
  --radius: 0px;
  --dither-v: url("assets/ui/fade-v.png");
  --dither-h: url("assets/ui/fade-h.png");
  --ink: #0d0d0e;
}

/* ---------- Background: a quiet dot grid and a dithered glow at the top of the page ---------- */
body::before {
  inset: 0 0 auto 0; height: 132px; position: absolute; transform: none; animation: none;
  background: rgba(var(--bg-rgb, 232, 229, 220), .11);
  -webkit-mask: var(--dither-v) repeat-x 0 0 / 24px 120px; mask: var(--dither-v) repeat-x 0 0 / 24px 120px;
  top: 64px;
}
body::after {
  opacity: .05;
  background-image: url("assets/ui/dots.png");
  background-size: 8px 8px;
  image-rendering: pixelated;
}
body:not([data-sec]), body[data-sec="home"] { --bg-rgb: 242, 204, 92; }

/* no frosted glass anywhere: flat panels read as more honest */
* { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ---------- Glows out ---------- */
.hero h1, .content h1 { text-shadow: none !important; }
.pillar::before { box-shadow: none; }
.pillar:hover { box-shadow: none; }

/* ---------- Headings: a plain "#", like the chapter anchors in the tree ---------- */
.content h2::before, .hero h2::before { content: "#"; color: rgba(var(--accent-rgb, 242, 204, 92), .55); margin-right: .5em; font-family: var(--mono); font-weight: 400; font-size: .8em; }

/* ---------- Highlights: bold with a thin marker line under it, not a block ---------- */
.content .hl, .pl-body .hl, .intro-item .hl {
  color: var(--white); font-weight: 700; background: none;
  text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb, 242, 204, 92), .75); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.pl-body .hl, .intro-item .hl { text-decoration-color: rgba(var(--sec-rgb), .75); }
.intro-lead .hl-me { color: var(--white); background: none; text-decoration: underline; text-decoration-color: var(--me); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.content .hl a, .pl-body .hl a { color: inherit; }

/* ---------- Buttons: square, with a hard offset shadow you can "press" ---------- */
.btn {
  border-radius: 0; border-width: 2px;
  box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .35);
  transition: transform .12s, box-shadow .12s, background .2s, color .2s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(var(--accent-rgb), .5); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(var(--accent-rgb), .5); }
.btn.ghost { box-shadow: 3px 3px 0 rgba(232, 229, 220, .14); }
.btn.small { box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .3); }

/* ---------- Panels: flat, square, a hard shadow when open ---------- */
details, .case, .ep-step, .card, pre, .shot-btn, .frame, .badge-box, .snippet pre { border-radius: 0 !important; }
.stack details[open], .sg[open], .guides details[open], .tools details[open] { box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .16); }
.sg > summary { border-bottom: 1px dashed transparent; }
.sg[open] > summary { border-bottom-color: var(--line); }

/* ---------- Chips and pills become plain bracket links ---------- */
.pl-links a:not(.pl-go), .gfilter button, .stack-plat {
  border-radius: 0 !important;
}
.pl-links a:not(.pl-go) {
  border: 0; background: none; padding: 2px 2px; color: var(--white);
  text-decoration: underline; text-decoration-color: rgba(var(--sec-rgb), .55); text-underline-offset: 4px;
}
.pl-links a:not(.pl-go)::before { content: "["; color: var(--sec); margin-right: 3px; text-decoration: none; display: inline-block; }
.pl-links a:not(.pl-go)::after { content: "]"; color: var(--sec); margin-left: 3px; display: inline-block; }
.pl-links a:not(.pl-go):hover { background: none; text-decoration-color: var(--sec); }
.pl-links .pl-go {
  border-radius: 0; border: 2px solid var(--sec);
  box-shadow: 3px 3px 0 rgba(var(--sec-rgb), .35);
  transition: transform .12s, box-shadow .12s, background .2s;
}
.pl-links .pl-go:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(var(--sec-rgb), .5); background: var(--sec); color: var(--ink); }

/* ---------- Home: the three pillars as zine blocks ---------- */
.pillar {
  border-radius: 0; border: 1px solid var(--line);
  background: #111213;
  box-shadow: 5px 5px 0 rgba(var(--sec-rgb), .18);
}
.pillar::before { /* the left bar becomes a dithered band across the top */
  left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 21px;
  background: rgba(var(--sec-rgb), .55);
  -webkit-mask: var(--dither-v) repeat-x 0 0 / 24px 120px; mask: var(--dither-v) repeat-x 0 0 / 24px 120px;
}
.pillar > summary { padding-top: 24px; }
.pillar:hover { border-color: rgba(var(--sec-rgb), .5); box-shadow: 6px 6px 0 rgba(var(--sec-rgb), .28); }
.pillar .intro-ico { border-radius: 0; }

/* ---------- The sticker ---------- */
.hero-top { grid-template-columns: minmax(0, 1fr) auto; }
.sticker {
  width: 177px; height: auto; image-rendering: pixelated;
  transform: rotate(-7deg); transform-origin: 50% 50%;
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .55));
  transition: transform .25s var(--ease);
  cursor: grab; user-select: none;
}
.sticker:hover { transform: rotate(-3deg) scale(1.04); }
@media (max-width: 720px) {
  .hero-top { grid-template-columns: 1fr; }
  .sticker { width: 140px; justify-self: start; margin: -6px 0 4px 4px; }
}

/* ---------- Side list and chapter tabs: square markers ---------- */
.toc a::before { border-radius: 0; }
.chap-tabs a, .chap-pager a { border-radius: 0 !important; }
.chap-pager a:hover { box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .2); }

/* ---------- Pull quotes: like a strip of tape ---------- */
.pull {
  border-left: 0 !important; padding: 14px 18px !important;
  background: repeating-linear-gradient(-45deg, rgba(var(--accent-rgb), .07) 0 6px, transparent 6px 12px) !important;
  border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  box-shadow: none !important;
}

/* ---------- Footer: a dithered edge instead of a line ---------- */
.site-footer { position: relative; border-top-color: transparent !important; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  background: rgba(var(--bg-rgb, 232, 229, 220), .22);
  -webkit-mask: var(--dither-v) repeat-x 0 100% / 24px 120px; mask: var(--dither-v) repeat-x 0 100% / 24px 120px;
  transform: scaleY(-1);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .pl-links .pl-go, .sticker { transition: none; }
}
.sg-n, .oss, .gtag, .chip { border-radius: 0 !important; }

/* =====================================================================
   The map: one file tree on every page (tree.js)
   ===================================================================== */
:root { --map-w: 290px; --hdr: 65px; }
.site-header { background: #0c0d0e; }
body.has-map .site-header nav { display: none; }              /* the map replaces the top menu (without JavaScript the old menu stays) */
.menu-btn, #site-menu { display: none !important; }

.qt {
  position: fixed; z-index: 9; left: 0; top: var(--hdr); bottom: 0; width: var(--map-w);
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 0 12px; background: #0c0d0e; border-right: 1px solid var(--line);
  font: .86rem/1.4 var(--mono);
}
.qt::after { /* a dithered right edge */
  content: ""; position: absolute; top: 0; bottom: 0; right: -7px; width: 6px; pointer-events: none;
  background: rgba(232, 229, 220, .07);
  -webkit-mask: url("assets/ui/fade-h.png") repeat-y 0 0 / 144px 6px; mask: url("assets/ui/fade-h.png") repeat-y 0 0 / 144px 6px;
}
.qt-top { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.qt-cmd { margin: 0; color: var(--muted); font-size: .78rem; }
.qt-ps { color: var(--me); margin-right: 4px; }
.qt-close { display: none; background: none; border: 1px solid var(--line); color: var(--white); width: 32px; height: 32px; cursor: pointer; font: 1rem var(--mono); }
.qt-find { display: block; padding: 0 12px; }
.qt-find input { width: 100%; padding: 8px 10px; background: #08090a; color: var(--white); border: 1px solid var(--line); font: .8rem var(--mono); border-radius: 0; }
.qt-find input:focus { outline: none; border-color: var(--me); }
.qt-nav { flex: 1; overflow-y: auto; padding: 0 8px 8px 14px; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; font-size: .8rem; line-height: 1.25; }
/* the tree is drawn with characters, like the `tree` command prints it */
.qt-ul { list-style: none; margin: 0; padding: 0; }
.qt-li { --sec-rgb: 232, 229, 220; --sec: var(--white); }
.qt-li.sec-da { --sec-rgb: 79, 220, 123; --sec: #4fdc7b; }
.qt-li.sec-web { --sec-rgb: 92, 196, 230; --sec: #5cc4e6; }
.qt-li.sec-res { --sec-rgb: 237, 162, 98; --sec: #eda262; }
.qt-li.sec-con { --sec-rgb: 183, 158, 240; --sec: #b79ef0; }
.qt-li.sec-home { --sec-rgb: 242, 204, 92; --sec: #f2cc5c; }
.qt-li.sec-lab { --sec-rgb: 230, 122, 169; --sec: #e67aa9; }
.qt-li.sec-site { --sec-rgb: 159, 180, 199; --sec: #9fb4c7; }
.qt-row { display: flex; align-items: stretch; height: 24px; line-height: 24px; }
.qt-tw { flex: none; display: inline-flex; align-items: center; padding: 0; margin: 0; background: none; border: 0; font: inherit; color: #4a4c4f; white-space: pre; }
button.qt-tw { cursor: pointer; }
/* the branch lines of the tree: one 22 px cell per level, lines drawn with borders so they always join up */
.qt-pre { display: inline-flex; height: 24px; }
.g { position: relative; display: inline-block; width: 22px; height: 24px; flex: none; }
.g-V::before, .g-T::before, .g-L::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; border-left: 1px solid #45474a; }
.g-L::before { bottom: 11px; }
.g-T::after, .g-L::after { content: ""; position: absolute; left: 7px; right: 2px; top: 12px; border-top: 1px solid #45474a; }
button.qt-tw:hover .g::before, button.qt-tw:hover .g::after { border-color: #77797c; }
.qt-ar { display: inline-block; width: 12px; text-align: center; font-size: .8em; color: rgba(var(--sec-rgb), .85); }
button.qt-tw:hover .qt-ar { color: var(--white); }
.qt-a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 3px; color: #bdbab2; text-decoration: none; }
.qt-a:hover { color: var(--white); background: rgba(var(--sec-rgb), .08); }
.qt-has > .qt-row .qt-l { color: rgb(var(--sec-rgb)); font-weight: 700; }
.qt-root > .qt-li > .qt-row .qt-l { color: rgb(var(--sec-rgb)); font-weight: 700; }
.qt-root > .qt-li:first-child > .qt-row .qt-l { color: var(--me); }
/* every name in the tree has its section colour; folders are bold, pages and parts of pages are not */
.qt-li > .qt-row .qt-l { color: rgb(var(--sec-rgb)); }
/* every folder looks the same, whether it is a page (Lab › Makers) or a part of a page (Digital Autonomy › Tools) */
.qt-li.qt-has > .qt-row .qt-l { color: rgb(var(--sec-rgb)); font-weight: 700; }
.qt-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-x { color: var(--muted); font-size: .85em; }
.qt-cur > .qt-a { color: var(--white); background: rgba(var(--sec-rgb), .13); }
.qt-here { margin-left: auto; flex: none; color: var(--sec); font-size: .72rem; }
.qt-chap > .qt-a .qt-l { color: var(--white) !important; text-decoration: underline; text-decoration-color: rgba(var(--sec-rgb), .7); text-underline-offset: 3px; }
.qt-none { margin: 8px 10px; font-size: .78rem; color: var(--muted); }
.qt-sum { margin: 14px 0 0; color: #5d5f62; font-size: .74rem; }
.qt-searching .qt-pre, .qt-searching .qt-sum { visibility: hidden; }
.map-btn { display: none; align-items: center; gap: 8px; padding: 7px 12px; background: transparent; color: var(--white); border: 2px solid var(--me); font: 700 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: 3px 3px 0 rgba(var(--me-rgb), .35); }
.map-btn .map-ic { color: var(--me); letter-spacing: 0; }
.qt-shade { display: none; }

/* wide screens: map always on the left, content beside it */
@media (min-width: 1100px) {
  body.has-map main, body.has-map .site-footer { margin-left: var(--map-w); }
  body.has-map .page { grid-template-columns: minmax(0, 1fr) !important; }
  body.has-map .page > .toc { display: none; }
  body.has-map .chap-tabs { display: none !important; }
  .site-header .wrap { max-width: none; padding-left: 20px; }
}
/* narrower screens: the map is a drawer */
@media (max-width: 1099px) {
  .map-btn { display: inline-flex; }
  .qt { top: 0; z-index: 60; width: min(340px, 88vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: 8px 0 0 rgba(0, 0, 0, .35); }
  .qt-close { display: inline-block; }
  body.map-open .qt { transform: none; }
  .qt-shade { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.map-open .qt-shade { opacity: 1; pointer-events: auto; }
  body.map-open { overflow: hidden; }
}
@media (max-width: 859px) { body.has-map .page > .toc { display: none; } }
@media (prefers-reduced-motion: reduce) { .qt, .qt-shade { transition: none; } }

/* =====================================================================
   Home without the duplicated section cards
   ===================================================================== */
.about { max-width: 900px; }
.about p { margin: 0 0 .9rem; color: #d8d5cd; }
.start-h { margin-top: 2.6rem; font-size: 1.35rem; }
.start-h::before { color: var(--me); }
.starts { display: grid; gap: 14px; max-width: 900px; margin: 1rem 0 2rem; }
@media (min-width: 700px) { .starts { grid-template-columns: 1fr 1fr; } }
.start {
  position: relative; display: grid; gap: 4px; padding: 30px 18px 16px; text-decoration: none; color: var(--white);
  background: #111213; border: 1px solid var(--line); box-shadow: 5px 5px 0 rgba(var(--sec-rgb), .2);
  transition: transform .12s, box-shadow .12s, border-color .2s;
}
.start::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 15px; background: rgba(var(--sec-rgb), .55);
  -webkit-mask: var(--dither-v) repeat-x 0 0 / 24px 120px; mask: var(--dither-v) repeat-x 0 0 / 24px 120px;
}
.start:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(var(--sec-rgb), .35); border-color: rgba(var(--sec-rgb), .6); }
.start:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(var(--sec-rgb), .35); }
.start-k { font-size: .8rem; color: var(--muted); }
.start-t { font-family: var(--pixel); font-size: 1.3rem; color: var(--sec); }
.start-t::after { content: " →"; }
.start-d { font-size: .84rem; color: #c8c5bd; }
.hero .kitty-perch { max-width: 900px; height: 0; position: relative; }
.hero .kitty-perch .kitty { position: absolute; right: 18px; top: -6px; }
.intro-more { max-width: 900px; }
/* the whole strip between the logo and the block height is clickable: a click anywhere in it puts you in the prompt */
.site-header .hp-form { display: flex; align-items: stretch; gap: 10px; flex: 1 1 auto; align-self: stretch; margin-right: 18px; }
.hp-form label { display: flex; flex: 1; align-items: center; min-height: 40px; cursor: text; }
.hp-msg { align-self: center; }
.hp-ps { color: var(--muted); }
.site-header .hp-in { box-sizing: content-box; min-width: 4ch; max-width: 46vw; height: auto; padding: 1px 4px; margin: 0 0 0 1px; background: transparent; border: 1px solid transparent; border-radius: 0; box-shadow: none; color: var(--accent); font: inherit; line-height: 1.4; caret-color: var(--accent); }
.hp-in::placeholder { color: #5d5f62; }
.site-header .hp-in:hover { border-bottom-color: var(--line); }
.site-header .hp-in:focus { outline: none; border-color: var(--line); background: rgba(0, 0, 0, .25); color: var(--white); }
.hp-msg { color: #e88a7a; font-size: .74rem; }
.hdr-path { margin: 0 auto 0 28px; font: .8rem var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hdr-path a { color: var(--muted); text-decoration: none; }
.hdr-path a:hover { color: var(--white); text-decoration: underline; }
.hp-sep { color: #555; margin: 0 2px; }
.hp-cur { color: var(--accent); }
.hp-caret { display: inline-block; width: .55em; height: 1em; margin-left: 4px; vertical-align: -2px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
.crumbs { display: none; margin: 0 0 14px; }
@media (max-width: 640px) { .site-header .hdr-path { display: none; } .crumbs { display: block; } }
@media (prefers-reduced-motion: reduce) { .hp-caret { animation: none; } }
.hero .kitty-perch { margin-top: 1rem; }
.hero .kitty-perch .kitty { right: 26px; top: auto; bottom: -4px; }
.start-h { margin-bottom: 0; }
@media (max-width: 699px) { .hero .kitty-perch { margin-top: 4.4rem; } }

/* =====================================================================
   More colour: every page gets a tinted dark instead of plain black
   ===================================================================== */
body[data-sec="home"] { --page-bg: #1c1912; --tint-rgb: 242, 204, 92; }
body[data-sec="da"]   { --page-bg: #121b15; --tint-rgb: 79, 220, 123; }
body[data-sec="web"]  { --page-bg: #11191e; --tint-rgb: 92, 196, 230; }
body[data-sec="res"]  { --page-bg: #1d1712; --tint-rgb: 237, 162, 98; }
body[data-sec="con"]  { --page-bg: #191522; --tint-rgb: 183, 158, 240; }
body[data-sec="lab"]  { --page-bg: #1e1319; --tint-rgb: 230, 122, 169; --accent: #e67aa9; --accent-rgb: 230, 122, 169; --accent-dim: #b8306c; --bg-rgb: 230, 70, 140; }
body[data-sec="site"] { --page-bg: #15181c; --tint-rgb: 159, 180, 199; --accent: #9fb4c7; --accent-rgb: 159, 180, 199; --accent-dim: #64788c; --bg-rgb: 120, 140, 160; }
html:has(body[data-sec]) { background: var(--page-bg, #111213); }
body[data-sec]::before { height: 190px; background: rgba(var(--tint-rgb), .17); -webkit-mask-size: 24px 120px; }
.site-header { background: color-mix(in srgb, var(--page-bg, #111213) 55%, #000) !important; }
.qt { background: color-mix(in srgb, var(--page-bg, #111213) 60%, #000); }
.qt-find input { background: color-mix(in srgb, var(--page-bg, #111213) 35%, #000); }
details, .case, .ep-step, .pillar, .howto-card { background-color: rgba(var(--tint-rgb, 232, 229, 220), .035) !important; }
.start { background: linear-gradient(180deg, rgba(var(--sec-rgb), .08), rgba(var(--sec-rgb), .02)) , color-mix(in srgb, var(--page-bg) 80%, #000) !important; }
body::after { opacity: .07; }

/* =====================================================================
   Home: pins instead of the sticker, About me as a fold-out, calmer
   ===================================================================== */
.sticker { display: none; }
.about-box { max-width: 900px; margin: 2.2rem 0 .6rem; border: 2px solid var(--me) !important; box-shadow: 5px 5px 0 rgba(var(--me-rgb), .3); background: rgba(var(--me-rgb), .06) !important; }
.about-box > summary { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; border: 0; }
.about-box > summary::-webkit-details-marker { display: none; }
.ab-k { display: grid; place-items: center; width: 30px; height: 30px; background: var(--me); color: var(--ink); font: 700 1rem var(--pixel); flex: none; }
.ab-t { font: 1.35rem var(--pixel); color: var(--white); }
.ab-s { color: var(--muted); font-size: .85rem; }
.ab-tw { margin-left: auto; color: var(--me); font: 700 1.2rem var(--mono); transition: transform .2s; }
.about-box[open] .ab-tw { transform: rotate(45deg); }
.about-box > summary .kitty.k-lounge { position: absolute; right: 54px; bottom: calc(100% - 4px); top: auto; left: auto; }
.ab-body { padding: 0 18px 8px 60px; }
.ab-body p { color: #d8d5cd; margin: 0 0 .9rem; }
@media (max-width: 640px) { .ab-s { display: none; } .ab-body { padding-left: 18px; } }
/* home: a quiet pointer to the tree, with a dotted line that runs into it */
.map-note { position: relative; max-width: 900px; margin: .2rem 0 0; font-size: .86rem; color: #a9a69e; }
.map-note b { color: var(--white); }
.mn-line { position: absolute; top: .72em; right: calc(100% + 10px); width: var(--mn-w, 0); border-top: 2px dotted rgba(var(--me-rgb), .45); }
.mn-line::before { content: ""; position: absolute; left: -2px; top: -6px; border: 5px solid transparent; border-right: 6px solid rgba(var(--me-rgb), .7); border-left: 0; }
.mn-narrow { display: none; }
@media (max-width: 1099px) { .mn-wide, .mn-line { display: none; } .mn-narrow { display: inline; } }
body.qt-point .qt { border-right-color: rgba(var(--me-rgb), .6); }
body.qt-point .qt-root > .qt-li > .qt-row .qt-a { background: rgba(var(--me-rgb), .05); }
/* fewer moving things on one page: no blinking cursor in the header, the box cat is gone */
.hp-caret { animation: none !important; opacity: .7; }
.about-box > summary::after, .about-box > summary::before { display: none !important; content: none !important; }

/* =====================================================================
   Cypherpunk layer: notched corners, hash card, tool cards, projects,
   glossary, changelog, block height, signature footer
   ===================================================================== */
/* cut corners are drawn with ::after so the hard shadows stay */

/* --- home: a big, quiet picture behind the greeting --- */
main:has(> .hero) { overflow-x: clip; }
.hero { position: relative; }
.hero > :not(.hero-bg) { position: relative; z-index: 1; }
/* a market nobody runs: dots that drift and now and then trade with a neighbour; the yellow one is me. See home.js.
   It covers the right two thirds of the greeting and fades out on every side, so it has no hard edges. */
.hero-bg { position: absolute; z-index: 0; top: -60px; right: -4vw; width: min(1150px, 85%); height: 560px; max-width: none !important; pointer-events: none;
  image-rendering: pixelated; opacity: .32 !important; animation: none !important;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 82%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 62%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 82%, transparent), linear-gradient(180deg, transparent, #000 18%, #000 62%, transparent);
  mask-composite: intersect; }
@media (max-width: 720px) { .hero-bg { display: none; } }
@media (prefers-reduced-transparency: reduce) { .hero-bg { display: none; } }

/* --- tools: three groups of cards --- */
.tgrp { display: flex; align-items: baseline; gap: 12px; margin: 2.2rem 0 .3rem; font: 1.35rem var(--pixel); color: var(--white); }
.tg-n { font: 700 .8rem var(--mono); color: var(--ink); background: var(--accent); padding: 2px 6px; transform: translateY(-3px); }
.tg-sub { margin: 0 0 .9rem; }
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tcard { --nc: rgba(var(--accent-rgb), .55); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 10px; border: 1px solid rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .04); color: inherit; text-decoration: none !important; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s; }
.tcard::after { content: ""; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: linear-gradient(225deg, var(--page-bg) calc(50% - 1px), rgba(var(--accent-rgb), .55) calc(50% - 1px) calc(50% + .5px), transparent calc(50% + .5px)); }
.tcard:hover, .tcard:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .35); border-color: var(--accent); }
.tc-t { font-weight: 700; color: var(--white); }
.tc-t::after { content: " →"; color: var(--accent); opacity: 0; transition: opacity .15s; }
.tcard:hover .tc-t::after { opacity: 1; }
.tc-d { font-size: .86rem; color: #cfccc4; line-height: 1.45; flex: 1; }
.tc-tag { align-self: flex-start; font: .68rem var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tc-tag::before { content: "#"; opacity: .6; }

/* --- web development: compact project cards with previews --- */
.projs { display: grid; gap: 22px; margin: 1.2rem 0 1.4rem; max-width: 1040px; }
.proj { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; padding: 16px; border: 2px solid rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .035); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .18); }
.proj::after { content: ""; position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; background: linear-gradient(225deg, var(--page-bg) calc(50% - 1px), rgba(var(--accent-rgb), .7) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.proj-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-self: start; }
.proj-shot { position: relative; inset: auto; z-index: auto; display: block; width: 100%; color: inherit; letter-spacing: 0; text-transform: none; height: 300px; padding: 0; overflow: hidden; border: 1px solid rgba(232, 229, 220, .18); background: #000; cursor: zoom-in; }
.proj-shot img { display: block; width: 100%; height: auto; object-fit: cover; object-position: top; transition: transform 2.4s ease; }
.proj-shot:hover img, .proj-shot:focus-visible img { transform: translateY(calc(-100% + 300px)); }
.ps-k { position: absolute; left: 0; bottom: 0; padding: 2px 7px; font: 700 .7rem var(--mono); text-transform: uppercase; background: #000; color: var(--muted); }
.proj-shot.po .ps-k { background: var(--accent); color: var(--ink); }
.proj-info h3 { margin: .4rem 0 .2rem; font: 1.5rem var(--pixel); }
.proj-lead { margin: 0 0 .7rem; color: var(--white); }
.proj-dl { display: grid; gap: 8px; margin: 0; }
.proj-dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding-top: 8px; border-top: 1px dashed rgba(232, 229, 220, .14); }
.proj-dl dt { font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--accent); padding-top: 3px; }
.proj-dl dd { margin: 0; font-size: .88rem; line-height: 1.5; color: #d8d5cd; }
.proj-note { margin: .7rem 0 0; font-size: .78rem; }
@media (max-width: 760px) {
  .proj { grid-template-columns: 1fr; }
  .proj-shot { height: 240px; }
  .proj-shot:hover img { transform: translateY(calc(-100% + 240px)); }
  .proj-dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* --- glossary --- */
.gl-find { display: block; max-width: 520px; margin: 1.2rem 0 .6rem; }
.gl-find input { width: 100%; padding: 10px 12px; font: .95rem var(--mono); color: var(--white); background: color-mix(in srgb, var(--page-bg) 50%, #000); border: 2px solid rgba(var(--accent-rgb), .45); border-radius: 0; }
.gl-find input:focus { outline: none; border-color: var(--accent); box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .25); }
.gl-letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 1.4rem; }
.gl-letters a { display: grid; place-items: center; min-width: 28px; height: 28px; font: 700 .8rem var(--mono); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .35); text-decoration: none; }
.gl-letters a:hover { background: var(--accent); color: var(--ink); }
.gl-L { margin: 1.4rem 0 .4rem; font: 1.4rem var(--pixel); color: var(--accent); scroll-margin-top: 80px; }
.gl-list { margin: 0; display: grid; gap: 0; }
.gl-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 8px 0; border-top: 1px dashed rgba(232, 229, 220, .12); }
.gl-item dt { font: 700 .88rem var(--mono); color: var(--white); }
.gl-item dd { margin: 0; color: #d8d5cd; font-size: .92rem; }
@media (max-width: 560px) { .gl-item { grid-template-columns: 1fr; gap: 2px; } }

/* --- changelog --- */
.log { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: 0; }
.log li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px dashed rgba(232, 229, 220, .12); }
.lg-k { align-self: start; text-align: center; font: 700 .68rem var(--mono); text-transform: uppercase; padding: 3px 0; background: var(--accent); color: var(--ink); }

/* --- header: estimated block height --- */
.hdr-blk { margin-left: 14px; font: .72rem var(--mono); color: var(--muted); white-space: nowrap; letter-spacing: .03em; }
.hdr-blk b { color: var(--accent); font-weight: 400; }
@media (max-width: 900px) { .hdr-blk { display: none; } }

/* --- footer: signature block --- */
.pgp-end { margin: 10px 0 0; font: .66rem var(--mono); color: rgba(232, 229, 220, .32); letter-spacing: .04em; overflow-wrap: anywhere; }
.pgp-end a { color: inherit; text-decoration: none; }
.pgp-end a:hover { color: var(--accent); }

/* --- h1: "decrypt" on hover --- */
.content h1 .dcr { color: var(--accent); }
.lg-k.add { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.lg-k.fix { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(232, 229, 220, .3); }

.sec-lab { --sec: #e67aa9; --sec-rgb: 230, 122, 169; }
.sec-site { --sec: #9fb4c7; --sec-rgb: 159, 180, 199; }

/* --- lab: downloads --- */
.dl-all { font-weight: 700; }
.avs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-bottom: 1.6rem; }
.av { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 6px; border: 1px solid rgba(var(--accent-rgb), .22); background: rgba(var(--accent-rgb), .03); color: var(--muted); font: .7rem var(--mono); text-decoration: none !important; transition: transform .15s var(--ease), box-shadow .15s, border-color .15s, color .15s; }
.av img { width: 100%; height: auto; image-rendering: pixelated; }
.av:hover, .av:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .35); border-color: var(--accent); color: var(--white); }
.av:hover span::after { content: " ↓"; color: var(--accent); }
.bns { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.bn { margin: 0; border: 1px solid rgba(var(--accent-rgb), .22); background: rgba(var(--accent-rgb), .03); }
.bn-img { position: relative; inset: auto; z-index: auto; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; }
.bn-img img { display: block; width: 100%; height: auto; }
.bn figcaption { display: flex; align-items: center; gap: 12px; padding: 7px 10px; font: .72rem var(--mono); }
.bn-n { margin-right: auto; color: var(--white); text-transform: capitalize; }
.bn figcaption a { color: var(--accent); text-decoration: none; }
.bn figcaption a::before { content: "↓ "; }
.bn figcaption a:hover { text-decoration: underline; }

/* --- page art for Lab and This site --- */
.art-lab .gl { stroke: rgba(var(--accent-rgb), .14); stroke-width: 1; }
.art-lab .px { fill: rgba(var(--accent-rgb), .55); opacity: 0; animation: lab-px 14s steps(1) infinite; animation-delay: calc(var(--i) * .25s); }
.art-lab .sw { stroke: rgba(232, 229, 220, .25); stroke-width: 1; }
.art-lab .s1 { fill: #e67aa9; } .art-lab .s2 { fill: #f2cc5c; } .art-lab .s3 { fill: #5cc4e6; } .art-lab .s4 { fill: #4fdc7b; } .art-lab .s5 { fill: #b79ef0; }
@keyframes lab-px { 0% { opacity: 0; } 2% { opacity: 1; } 85% { opacity: 1; } 92% { opacity: 0; } }
.page-art .k-sit { right: 30px; }
.art-site .ln { fill: rgba(232, 229, 220, .22); }
.art-site .ln.a { fill: rgba(var(--accent-rgb), .7); }
.art-site .f1 .win { fill: rgba(10, 11, 11, .85); }
.art-site .f2 .win { fill: rgba(10, 11, 11, .7); }
.page-art .k-boxed { right: -6px; bottom: -10px; --px: 2.6px; }
@media (prefers-reduced-motion: reduce) { .art-lab .px { animation: none; opacity: 1; } }

/* =====================================================================
   Lab: makers, collection, music
   ===================================================================== */
.lgs { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lg { margin: 0; border: 1px solid rgba(var(--accent-rgb), .22); background: rgba(var(--accent-rgb), .03); }
.lg-img { display: grid; place-items: center; height: 150px; padding: 14px; background: #0b0b0b; }
.lg-img img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.lg figcaption { display: flex; align-items: center; gap: 12px; padding: 7px 10px; font: .72rem var(--mono); }
.lg figcaption a { color: var(--accent); text-decoration: none; }
.lg figcaption a::before { content: "↓ "; }

.mk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 22px; align-items: start; margin-top: .6rem; }
.mk-wide { grid-template-columns: 1fr; }
.mk-stage { position: sticky; top: 84px; display: grid; gap: 10px; min-width: 0; }
.mk-wide .mk-stage { position: static; }
.mk-ctl { display: grid; gap: 10px; min-width: 0; }
.mk-ctl-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.mk-ctl-grid .mk-go, .mk-ctl-grid .mk-note { grid-column: 1 / -1; }
.mk fieldset, .as fieldset, .mu fieldset { margin: 0; padding: 10px 12px 12px; border: 1px solid rgba(var(--accent-rgb), .25); background: rgba(var(--accent-rgb), .03); display: grid; gap: 8px; min-width: 0; }
.mk legend, .as legend, .mu legend { padding: 0 6px; font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button, .mk-b { padding: 5px 9px; font: .76rem var(--mono); color: var(--white); background: color-mix(in srgb, var(--page-bg, #111) 60%, #000); border: 1px solid rgba(232, 229, 220, .18); border-radius: 0; cursor: pointer; }
.seg button:hover, .mk-b:hover { border-color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.mk-b:disabled { opacity: .55; cursor: default; }
.mk-main { background: var(--accent); color: var(--ink); border-color: var(--accent); font-weight: 700; box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .3); }
.mk-main:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .45); }
.mk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mk-go { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-col, .mk-chk, .mk-range, .mk-text { display: inline-flex; align-items: center; gap: 6px; font: .76rem var(--mono); color: var(--muted); }
.mk-range, .mk-text { display: grid; grid-template-columns: auto 1fr; }
.mk-text { grid-template-columns: 1fr; }
.mk-col input[type=color] { width: 30px; height: 24px; padding: 0; border: 1px solid rgba(232, 229, 220, .25); background: none; cursor: pointer; }
.mk-text input, .mk-text textarea { width: 100%; padding: 7px 9px; font: .85rem var(--mono); color: var(--white); background: color-mix(in srgb, var(--page-bg, #111) 50%, #000); border: 1px solid rgba(232, 229, 220, .2); border-radius: 0; resize: vertical; }
.mk-text input:focus, .mk-text textarea:focus { outline: none; border-color: var(--accent); }
.mk-range input { width: 100%; accent-color: var(--accent); }
.mk-chk input { accent-color: var(--accent); }
.mk-hint { margin: 0; font: .78rem var(--mono); color: var(--muted); }
.mk-note { margin: 0; font-size: .78rem; }
.mk [hidden] { display: none !important; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* avatar maker */
.av-wrap { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .18); background: #1b1c1e; overflow: hidden; }
.av-wrap canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; cursor: crosshair; touch-action: none; }
.av-wrap.round { border-radius: 50%; }
.av-mini { display: flex; align-items: flex-end; gap: 18px; font: .68rem var(--mono); color: var(--muted); }
.av-mini span { display: grid; justify-items: center; gap: 4px; }
.av-mini canvas { width: 64px; height: 64px; border-radius: 50%; image-rendering: pixelated; background: #2a2b2e; }
.av-mini .sm canvas { width: 40px; height: 40px; }
.av-mini .xs canvas { width: 24px; height: 24px; image-rendering: auto; }
.seg.sw button { font-size: .72rem; }

/* banner maker */
.bn-wrap { border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .18); background: #000; line-height: 0; }
.bn-wrap canvas { width: 100%; height: auto; display: block; }

/* badge maker */
.bd-wrap { display: grid; place-items: center; padding: 26px 10px; border: 2px solid rgba(var(--accent-rgb), .45); background: repeating-conic-gradient(#202124 0 25%, #18191b 0 50%) 0 0 / 16px 16px; }
.bd-wrap canvas { width: 352px; max-width: 100%; height: auto; image-rendering: pixelated; box-shadow: 4px 4px 0 rgba(0, 0, 0, .5); }
.bd-real { vertical-align: middle; margin-left: 6px; image-rendering: pixelated; }

/* ascii */
.as { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: .6rem; }
.as-in { display: grid; gap: 10px; }
.drop { display: grid; gap: 4px; padding: 18px; text-align: center; border: 2px dashed rgba(var(--accent-rgb), .45); cursor: pointer; font-size: .85rem; }
.drop.over { background: rgba(var(--accent-rgb), .1); border-style: solid; }
.as-outw { display: grid; gap: 8px; min-width: 0; position: sticky; top: 84px; }
.as-out { margin: 0; padding: 12px; min-height: 240px; max-height: 72vh; overflow: auto; font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace; white-space: pre; color: var(--white); background: #070707; border: 2px solid rgba(var(--accent-rgb), .45); letter-spacing: 0; }
.as-out.inv { background: #e8e5dc; color: #111; }
@media (max-width: 900px) { .as, .mk { grid-template-columns: 1fr; } .mk-stage, .as-outw { position: static; } }

/* collection */
.co-top { display: grid; gap: 10px; margin-bottom: 1rem; }
.co-count { margin: 0; font-size: 1rem; }
.co-count b { font: 1.6rem var(--pixel); color: var(--accent); margin-right: 8px; }
.co-bar { height: 14px; border: 1px solid rgba(var(--accent-rgb), .45); background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 10px) left / var(--p, 0%) 100% no-repeat; }
.co-live { padding: 10px 12px; font: .95rem var(--mono); background: #070707; border: 1px solid rgba(var(--accent-rgb), .3); color: var(--white); }
.co-ps { color: var(--accent); }
.co-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.co-card { position: relative; display: grid; gap: 6px; align-content: start; min-height: 86px; padding: 10px 12px; border: 1px dashed rgba(232, 229, 220, .14); font-size: .82rem; }
.co-card.got { border: 1px solid rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .05); }
.co-card q { color: var(--white); quotes: none; }
.co-n { font: .66rem var(--mono); color: var(--muted); }
.co-lock { color: rgba(232, 229, 220, .18); letter-spacing: -1px; font-family: var(--mono); }
.co-cat { position: absolute; right: 8px; top: 6px; height: 22px; width: auto; image-rendering: pixelated; opacity: .9; }
.co-card.rare { grid-column: 1 / -1; border-color: rgba(242, 204, 92, .35); }
.co-card.rare.got { background: rgba(242, 204, 92, .06); border-color: #f2cc5c; }
.co-trio { position: absolute; right: 10px; top: 10px; width: 57px; image-rendering: pixelated; }

/* music */
.mu { display: grid; gap: 12px; margin-top: .6rem; }
.mu-screen { border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .18); background: #070707; padding: 12px 12px 8px; }
.mu-screen canvas { display: block; width: 100%; height: 140px; image-rendering: pixelated; }
.mu-now { margin: 8px 0 0; font: .85rem var(--mono); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.mu-now b { font: 1.25rem var(--pixel); color: var(--accent); text-transform: capitalize; }
.mu-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }

/* --- line tiers: colours on the home page, in the collection and in toasts --- */
:root { --t-common: #d8d5cd; --t-uncommon: #4fdc7b; --t-rare: #5cc4e6; --t-epic: #b79ef0; --t-legendary: #eda262; --t-mythic: #f2cc5c; }
.rotator #rot[data-tier="rare"] { color: var(--t-rare); }
.rotator #rot[data-tier="epic"] { color: var(--t-epic); }
.rotator #rot[data-tier="legendary"] { color: var(--t-legendary); text-shadow: 0 0 14px rgba(237, 162, 98, .45); }
.rotator #rot[data-tier="mythic"] { color: var(--t-mythic); text-shadow: 0 0 18px rgba(242, 204, 92, .55); }
.rot-trio[hidden] { display: none; }
.rot-trio { display: inline-block; height: 1.1em; width: auto; margin-left: .5em; vertical-align: -.15em; image-rendering: pixelated; animation: trio-in .5s steps(4); }
@keyframes trio-in { from { opacity: 0; transform: translateY(4px); } }
.tier-common { color: var(--t-common); } .tier-uncommon { color: var(--t-uncommon); } .tier-rare { color: var(--t-rare); }
.tier-epic { color: var(--t-epic); } .tier-legendary { color: var(--t-legendary); } .tier-mythic { color: var(--t-mythic); }
.co-tier { --tc: var(--t-common); margin: 1.4rem 0 0; }
.co-tier.t-uncommon { --tc: var(--t-uncommon); } .co-tier.t-rare { --tc: var(--t-rare); } .co-tier.t-epic { --tc: var(--t-epic); }
.co-tier.t-legendary { --tc: var(--t-legendary); } .co-tier.t-mythic { --tc: var(--t-mythic); }
.co-tier h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 .6rem; font: .95rem var(--mono); }
.co-badge { padding: 2px 8px; font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); background: var(--tc); }
.co-have { color: var(--white); }
.co-odds { font: .72rem var(--mono); color: var(--muted); }
.co-tier .co-card.got { border-color: color-mix(in srgb, var(--tc) 60%, transparent); background: color-mix(in srgb, var(--tc) 7%, transparent); }
.co-tier .co-card.got q { color: color-mix(in srgb, var(--tc) 55%, var(--white)); }
.co-tier.t-mythic .co-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.co-tier.t-mythic .co-card { min-height: 64px; border-style: solid; border-color: rgba(242, 204, 92, .25); }
.co-tier.t-mythic .co-card.got { box-shadow: 0 0 24px rgba(242, 204, 92, .25); }
.co-tier.t-mythic .co-card.got q { font: 1.3rem var(--pixel); color: var(--t-mythic); }
.co-tier.t-legendary .co-card.got { box-shadow: 0 0 16px rgba(237, 162, 98, .18); }
.co-live .rot-trio { height: 1em; }
.np { display: grid; gap: 8px; }
.np-note { margin: 0; font-size: .76rem; }
.np-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: 6px; max-width: 720px; }
.np-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 10px 6px 6px; border: 1px solid rgba(232, 229, 220, .1); }
.np-list li.np-now { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .06); }
.np-art { width: 44px; height: 44px; object-fit: cover; display: grid; place-items: center; background: #111; color: var(--accent); }
.np-t { display: grid; min-width: 0; } .np-t b, .np-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-t span { font-size: .8rem; color: var(--muted); }
.np-when { font: .72rem var(--mono); color: var(--muted); white-space: nowrap; }
.np-now .np-when { color: var(--accent); }
.np-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; margin-right: 4px; }
.np-eq i { width: 3px; background: var(--accent); animation: np-eq .9s steps(3) infinite; }
.np-eq i:nth-child(2) { animation-delay: .3s; } .np-eq i:nth-child(3) { animation-delay: .6s; }
@keyframes np-eq { 0% { height: 3px; } 50% { height: 10px; } 100% { height: 5px; } }
.co-card { min-height: 58px; }
.co-card.got { padding-right: 52px; }
.co-tier.t-mythic .co-card.got { padding-right: 84px; }

/* --- music studio --- */
.st { display: grid; gap: 10px; margin-top: .6rem; }
.st-scroll { overflow-x: auto; border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .18); background: #070707; }
.st-roll { display: grid; grid-template-columns: 54px repeat(var(--steps), minmax(22px, 1fr)); gap: 2px; padding: 8px; min-width: calc(60px + var(--steps) * 24px); user-select: none; touch-action: none; }
.st-lab { font: .64rem var(--mono); color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; height: 18px; }
.st-lab.root { color: var(--accent); }
.st-lab.drum { height: 22px; }
.st-sep { grid-column: 1 / -1; height: 6px; }
.st-c { height: 18px; background: #141416; cursor: pointer; position: relative; }
.st-c.beat { background: #1b1b1f; }
.st-c.root { background: #19141a; }
.st-c.drum { height: 22px; background: #111; }
.st-c.drum.beat { background: #18181c; }
.st-c:hover { outline: 1px solid rgba(var(--accent-rgb), .6); outline-offset: -1px; }
.st-c.ghost::after { content: ""; position: absolute; inset: 6px; background: rgba(232, 229, 220, .22); }
.st-c.g-bass.ghost::after { background: rgba(92, 196, 230, .3); }
.st-c.on, .st-c.hold { background: var(--accent); }
.st-c.hold { opacity: .75; }
.st-c.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: rgba(255, 255, 255, .65); }
.st-roll[data-inst="bass"] .st-c.on, .st-roll[data-inst="bass"] .st-c.hold { background: #5cc4e6; }
.st-roll[data-inst="arp"] .st-c.on, .st-roll[data-inst="arp"] .st-c.hold { background: #f2cc5c; }
.st-c.drum.on { background: #e8e5dc; }
.st-c.now { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, .1); }
.st-c.now.on, .st-c.now.hold { filter: brightness(1.35); }
.mk-sel { padding: 4px 6px; font: .78rem var(--mono); color: var(--white); background: color-mix(in srgb, var(--page-bg, #111) 50%, #000); border: 1px solid rgba(232, 229, 220, .2); border-radius: 0; }
.av-pal { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.av-pal button { aspect-ratio: 1; padding: 0; border: 1px solid rgba(232, 229, 220, .25); background: var(--c); cursor: pointer; }
.av-pal button:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
fieldset.dim { opacity: .45; }
.bn-wrap canvas.free { cursor: move; touch-action: none; }
.bn-ed { display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed rgba(232, 229, 220, .15); }
.bn-ed[hidden], #bn-free-hint[hidden] { display: none !important; }
.btc-steps { padding-left: 1.4em; display: grid; gap: .6rem; }
.btc-steps li::marker { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.btc-now { margin: 1rem 0; }
.bn-wrap { display: flex; justify-content: center; }
.bn-wrap canvas { width: auto; max-width: 100%; max-height: 74vh; }
.pet-heart { position: fixed; z-index: 99; pointer-events: none; font: 700 16px var(--pixel); color: #ff4d6d; animation: pet-up 1.1s steps(6) forwards; }
@keyframes pet-up { to { transform: translateY(-42px); opacity: 0; } }
.ac-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ac { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; padding: 10px 12px; border: 1px dashed rgba(232, 229, 220, .14); opacity: .6; }
.ac.got { opacity: 1; border: 1px solid rgba(var(--accent-rgb), .5); background: rgba(var(--accent-rgb), .05); }
.ac-i { grid-row: 1 / 4; display: grid; place-items: center; width: 40px; height: 40px; font: 700 1.2rem var(--pixel); background: #0b0b0b; border: 1px solid rgba(232, 229, 220, .15); filter: grayscale(1); }
.ac.got .ac-i { filter: none; border-color: var(--accent); }
.ac b { color: var(--white); font-size: .9rem; }
.ac span { font-size: .78rem; color: var(--muted); }
.ac small { font: .66rem var(--mono); color: var(--accent); }

/* --- header switches: theme, language, print --- */
.hdr-tools { display: inline-flex; gap: 4px; margin-left: 12px; }
.ht-b { min-width: 30px; height: 28px; padding: 0 7px; font: 700 .78rem var(--mono); color: var(--muted); background: transparent; border: 1px solid rgba(232, 229, 220, .18); cursor: pointer; }
.ht-b:hover { color: var(--white); border-color: var(--accent); }
.ht-lang span { opacity: .45; } .ht-lang span + span { margin-left: 4px; }
.ht-lang[data-on="en"] [data-l="en"], .ht-lang[data-on="cs"] [data-l="cs"] { opacity: 1; color: var(--accent); }
@media (max-width: 640px) { .hdr-tools { margin-left: auto; margin-right: 8px; } .ht-b[data-act="print"] { display: none; } }
html.i18n-wait body { visibility: hidden; }

/* --- print: any page, clean black on white, all chapters at once --- */
@media print {
  body:not(.print-guides):not(.ep-printing) { background: #fff !important; }
  body:not(.print-guides):not(.ep-printing) :is(.site-header, .qt, .qt-shade, .map-btn, .site-footer, .toc, .chap-tabs, .chap-pager, .page-art, .hero-bg, .mk-ctl, .mk-go, .mk-row, .hdr-tools, .kitty, .rotator .caret, .egg-toast, .starts, .about-box > summary .kitty) { display: none !important; }
  body:not(.print-guides):not(.ep-printing)::before, body:not(.print-guides):not(.ep-printing)::after { display: none !important; }
  body:not(.print-guides):not(.ep-printing) main section.chap, body:not(.print-guides):not(.ep-printing) main section.chap[hidden] { display: block !important; opacity: 1 !important; transform: none !important; animation: none !important; visibility: visible !important; }
  body:not(.print-guides):not(.ep-printing) main * { opacity: 1 !important; animation: none !important; }
  body:not(.print-guides):not(.ep-printing) main, body:not(.print-guides):not(.ep-printing) .site-footer { margin-left: 0 !important; }
  body:not(.print-guides):not(.ep-printing) .page { display: block !important; }
  body:not(.print-guides):not(.ep-printing) main * { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; border-color: #999 !important; }
  body:not(.print-guides):not(.ep-printing) main .hl { background: #e8e8e8 !important; }
  body:not(.print-guides):not(.ep-printing) main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
  body:not(.print-guides):not(.ep-printing) details > *:not(summary) { display: block !important; }
  body:not(.print-guides):not(.ep-printing) main h2 { break-after: avoid; }
}

/* --- hub pages: a section's front page, one card per group --- */
.tcards.hubs { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 1.4rem 0 2rem; }
.tcard.hub { padding: 18px 18px 14px; gap: 8px; border-width: 2px; min-height: 150px; }
.tcard.hub .tc-t { font: 1.3rem var(--pixel); }
.tcard.hub .tc-t::after { content: ""; }
.tcard.hub .tc-d { font-size: .92rem; }
.tcard.hub .tc-tag { align-self: flex-end; font-size: .74rem; }
.tcard.hub .tc-tag::before { content: ""; }
.tcard.hub:hover .tc-tag { color: var(--white); }

/* --- paw prints: where the cats walked. They never move. --- */
.paw-trail { position: relative; z-index: -1; height: 46px; margin-top: -40px; pointer-events: none; }
.paw { position: absolute; width: 14px; height: 10px; background: var(--accent); opacity: .17; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%207%205%27%20shape-rendering%3D%27crispEdges%27%3E%3Crect%20x%3D%272%27%20y%3D%270%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%270%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%270%27%20y%3D%271%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%276%27%20y%3D%271%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%272%27%20y%3D%272%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%273%27%20y%3D%272%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%272%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%271%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%272%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%273%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%275%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%272%27%20y%3D%274%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%273%27%20y%3D%274%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%274%27%20width%3D%271%27%20height%3D%271%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%207%205%27%20shape-rendering%3D%27crispEdges%27%3E%3Crect%20x%3D%272%27%20y%3D%270%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%270%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%270%27%20y%3D%271%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%276%27%20y%3D%271%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%272%27%20y%3D%272%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%273%27%20y%3D%272%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%272%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%271%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%272%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%273%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%275%27%20y%3D%273%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%272%27%20y%3D%274%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%273%27%20y%3D%274%27%20width%3D%271%27%20height%3D%271%27/%3E%3Crect%20x%3D%274%27%20y%3D%274%27%20width%3D%271%27%20height%3D%271%27/%3E%3C/svg%3E") center / contain no-repeat; }
.paw-stamp { position: absolute; right: 10px; bottom: 8px; width: 21px; height: 15px; opacity: .18; }
@media print { .paw-trail, .paw { display: none !important; } }


/* ---------- Yarn: a faint pixel thread down the right side, ending in a ball (yarn.js) ---------- */
.yarn { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.yarn svg { position: absolute; top: 0; left: 0; }
.yarn path { fill: none; stroke: rgb(var(--tint-rgb, 232, 229, 220)); stroke-width: 2; opacity: .09; }
.yarn-ball { position: absolute; width: 30px; height: 30px; image-rendering: pixelated; opacity: .2; }
@media print { .yarn { display: none; } }
/* New Year: one pixel rocket (seasonal.js) */
.rocket { position: fixed; inset: 0; z-index: 55; width: 100vw; height: 100vh; pointer-events: none; image-rendering: pixelated; }
@media print { .rocket { display: none !important; } }

/* links inside text: in the section's colour, so you can see them without hovering */
:is(.content, .ab-body, .hero, .pl-body, .body) :is(p, li, dd, td, figcaption, .muted) a:not([class]) { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .45); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:is(.content, .ab-body, .hero, .pl-body, .body) :is(p, li, dd, td, figcaption, .muted) a:not([class]):hover { color: var(--white); text-decoration-color: var(--white); }

/* My stack: apps I don't use myself, but recommend */
.tip-tag { display: inline-block; font: 600 .6rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 5px 1px; margin-left: 4px; border: 1px dashed rgba(242, 204, 92, .55); color: #f2cc5c; vertical-align: .2em; }
.tools > details.tip > summary .name { color: rgba(232, 229, 220, .78); }
.tools > details.tip > summary .icos { opacity: .7; }
.tip-why { border-left: 2px dashed rgba(242, 204, 92, .45); padding-left: 10px; color: var(--muted); font-style: italic; }
