/* www.migniot.com — one stylesheet, no framework, no web fonts.
   Everything here is optional: without CSS (links, lynx, w3m) the HTML reads top to bottom.
   Each top-level section sets --hue on <body>; every accent colour derives from it. */

/* ---------------------------------------------------------------- tokens */
:root {
  --hue: 265;
  --bg: #0d0e12;
  --bg-2: #14161c;
  --surface: rgb(255 255 255 / .045);
  --surface-hi: rgb(255 255 255 / .08);
  --border: rgb(255 255 255 / .09);
  --text: #ececef;
  --muted: #a0a3b1;
  --acc-l: 80%; --acc-c: .13; --acc2-l: 72%; --glow-l: 70%; --glow-a: .45;
  --accent-ink: #0d0e12;
  --logo-ink: #0d0e12;
  --shadow: 0 10px 30px -12px rgb(0 0 0 / .6);
  --radius: 14px;
  --measure: 70ch;
  --side: 15rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f5f2; --bg-2: #ffffff;
    --surface: rgb(255 255 255 / .7); --surface-hi: #fff;
    --border: rgb(20 22 30 / .1);
    --text: #15161b; --muted: #585c6b;
    --acc-l: 50%; --acc-c: .16; --acc2-l: 56%; --glow-l: 60%; --glow-a: .3;
    --accent-ink: #fff; --logo-ink: #fff;
    --shadow: 0 10px 30px -14px rgb(30 30 60 / .35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f5f2; --bg-2: #ffffff;
  --surface: rgb(255 255 255 / .7); --surface-hi: #fff;
  --border: rgb(20 22 30 / .1);
  --text: #15161b; --muted: #585c6b;
  --acc-l: 50%; --acc-c: .16; --acc2-l: 56%; --glow-l: 60%; --glow-a: .3;
  --accent-ink: #fff; --logo-ink: #fff;
  --shadow: 0 10px 30px -14px rgb(30 30 60 / .35);
  color-scheme: light;
}

/* Hue-dependent colours are recomputed wherever a --hue is set (body, section links, cards…) */
:root, body, [style*="--hue"], .app .prose {
  --accent: oklch(var(--acc-l) var(--acc-c) var(--hue));
  --accent-2: oklch(var(--acc2-l) .17 calc(var(--hue) + 45));
  --glow: oklch(var(--glow-l) .2 var(--hue) / var(--glow-a));
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
.text-only, .search label, .search button { display: none; }   /* only text browsers see these */
.skip { position: absolute; left: -9999px; z-index: 100; }
.skip:focus { left: 1rem; top: .75rem; background: var(--bg-2); padding: .4rem .8rem; border-radius: 8px; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- background
   No-JS / no-motion version: an aurora tinted by the section hue.
   site.js may add a <canvas> (waves, constellation) on top of it. */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 15% -10%, oklch(55% .17 var(--hue) / .32), transparent 65%),
    radial-gradient(50rem 35rem at 100% 10%, oklch(55% .17 calc(var(--hue) + 45) / .22), transparent 60%),
    radial-gradient(60rem 30rem at 50% 115%, oklch(45% .12 calc(var(--hue) - 40) / .25), transparent 65%),
    var(--bg);
  transition: background .6s;
}
.backdrop canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
[data-bg="debian"] .backdrop::after, [data-bg="none"] .backdrop { background: var(--bg); }
[data-bg="debian"] .backdrop::after { content: ""; position: absolute; inset: 0;
  background: url(../deb.png) center / cover no-repeat; opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-bg="debian"] .backdrop::after { filter: invert(1) hue-rotate(180deg) brightness(.7); } }
:root[data-theme="dark"][data-bg="debian"] .backdrop::after { filter: invert(1) hue-rotate(180deg) brightness(.7); }

/* ---------------------------------------------------------------- frame */
.wrap { margin: 0 auto; padding: 0 1rem 3rem; max-width: calc(var(--measure) + 2rem); }
.wrap.app { max-width: 76rem; }

header.site {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .8rem 0; isolation: isolate;
}
header.site::before {   /* full-bleed glass bar */
  content: ""; position: absolute; inset: 0 -50vw; z-index: -1;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.logo { width: 1.9rem; height: 1.9rem; filter: drop-shadow(0 0 10px var(--glow)); transition: transform .4s; }
.brand:hover .logo { transform: rotate(60deg); }
.sections { flex: 1 1 auto; }
.sections ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; }
.sections a { display: block; padding: .3rem .7rem; border-radius: 999px; color: var(--muted);
  text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .2s, background .2s; }
.sections a:hover { color: var(--text); background: var(--surface-hi); }
.sections a[aria-current] { color: var(--accent); background: oklch(70% .15 var(--hue) / .14);
  box-shadow: inset 0 0 0 1px oklch(70% .15 var(--hue) / .35); }

.search { position: relative; display: flex; align-items: center; }
.search input[type=search] {
  width: 12rem; padding: .42rem .8rem .42rem 2.1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: .9rem; transition: width .25s, border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: .7rem center; background-size: 1rem;
}
.search input[type=search]:focus { outline: none; width: 16rem; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.search kbd { position: absolute; right: .55rem; pointer-events: none; font-size: .72rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; padding: 0 .35rem; background: var(--surface); }
.search input:focus ~ kbd { display: none; }

.crumbs { margin: 1.25rem 0 0; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { opacity: .5; margin: 0 .2rem; }
.crumbs [aria-current] { color: var(--text); }

/* ---------------------------------------------------------------- content */
main { padding-top: .5rem; min-width: 0; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 2.2rem 0 .8rem; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); margin-top: 1.2rem; font-weight: 750;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 75%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p, ul, ol, table, pre, blockquote, figure, dl { margin: 0 0 1.1rem; }
.prose p, .prose li { text-wrap: pretty; }
li { margin: .25rem 0; }
li::marker { color: var(--accent); }
img, video, svg, canvas, iframe { max-width: 100%; height: auto; }
.prose img, .prose video { border-radius: 12px; box-shadow: var(--shadow); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
blockquote { margin-left: 0; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--accent); color: var(--muted); }
code, kbd, pre, samp { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--surface-hi); padding: .12em .38em; border-radius: 5px; border: 1px solid var(--border); }
pre { background: var(--bg-2); border: 1px solid var(--border); padding: 1rem 1.2rem; overflow-x: auto; border-radius: 12px; line-height: 1.5; }
.wrap:not(.app) .prose > table { border-collapse: collapse; display: block; overflow-x: auto; }
.wrap:not(.app) .prose > table :is(th, td) { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.wrap:not(.app) .prose > table th { color: var(--muted); font-weight: 600; font-size: .9rem; }
.meta { color: var(--muted); font-size: .9rem; margin: 1rem 0 -.5rem; }
.small { font-size: .875rem; }
.footnotes { font-size: .9rem; color: var(--muted); }
.footnotes-sep { margin: 3rem 0 1rem; }
.footnotes p { margin: 0; }

/* buttons & inputs (also used by game pages) */
input, button, select, textarea { font: inherit; color: inherit; }
input[type=text], textarea, select, .form-control {
  padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.btn, .wrap:not(.app) .prose button {
  display: inline-block; padding: .55rem 1.1rem; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; box-shadow: 0 6px 20px -8px var(--glow);
  transition: transform .15s, box-shadow .2s, filter .2s; }
.btn:hover, .wrap:not(.app) .prose button:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px var(--glow); filter: brightness(1.06); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn.ghost:hover { background: var(--surface-hi); }

/* ---------------------------------------------------------------- tools & games (HTML fragment pages)
   They were written for a light page, so they run on a light "screen" whatever the theme. */
.app .prose {
  --text: #18191e; --muted: #5a5e6c; --border: rgb(20 22 30 / .12); --surface: #f0f1f4; --surface-hi: #e7e9ee;
  --acc-l: 48%; --acc-c: .17; --bg-2: #f3f4f6;
  color-scheme: light; color: var(--text); background: #fbfbfa;
  border-radius: 18px; padding: clamp(1rem, 3vw, 2rem); margin-top: 1rem;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 30px 80px -30px var(--glow), 0 20px 40px -20px rgb(0 0 0 / .5);
}
.app .prose h1, .app .prose h2 { background: none; color: var(--text); -webkit-text-fill-color: currentColor; }
.app .prose h1 { margin-top: 0; }

/* ---------------------------------------------------------------- home: hero + hex mosaic */
.hero { padding: 3.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 4vw, 4rem); line-height: 1.05; margin: 0 0 1rem; letter-spacing: -.035em; }
.tagline { font-size: 1.2rem; color: var(--muted); max-width: 38rem; }
.cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

.mosaic { container-type: inline-size; margin: 2.5rem 0 3rem; }
/* honeycomb: each tile only knows its index --i; columns adapt to the width, rows follow */
.mosaic ul { --cols: var(--wide-cols); --rows: round(up, var(--n) / var(--cols), 1);
  --w: calc(100cqw / (var(--cols) + .5)); --h: calc(var(--w) * 1.1547);
  position: relative; list-style: none; margin: 0; padding: 0;
  height: calc((var(--rows) - 1) * var(--h) * .75 + var(--h)); }
@container (max-width: 46rem) { .mosaic ul { --cols: 5; } }
@container (max-width: 30rem) { .mosaic ul { --cols: 4; } }
.mosaic li { --r: round(down, var(--i) / var(--cols), 1); --c: mod(var(--i), var(--cols));
  position: absolute; margin: 0; width: var(--w); height: var(--h);
  left: calc(var(--c) * var(--w) + mod(var(--r), 2) * var(--w) / 2);
  top: calc(var(--r) * var(--h) * .75);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  padding: 2px; background: var(--border);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s, filter .3s; }
.mosaic li:hover, .mosaic li:focus-within { transform: scale(1.08); z-index: 2;
  background: linear-gradient(160deg, oklch(85% .15 var(--hue)), oklch(65% .2 calc(var(--hue) + 45))); }
.mosaic img, .mosaic .initials { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; box-shadow: none;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: saturate(.85) brightness(.78); transition: filter .3s; }
.mosaic li:hover img, .mosaic li:focus-within img, .mosaic li:hover .initials { filter: none; }
.mosaic a { position: absolute; inset: auto 0 22% 0; text-align: center; color: #fff; text-decoration: none;
  font-size: clamp(.6rem, 1.6cqw, .85rem); font-weight: 650; line-height: 1.2; padding: 0 12%;
  text-shadow: 0 1px 6px rgb(0 0 0 / .9); outline: none; }
.mosaic a::after { content: ""; position: absolute; inset: -500px; }   /* the whole hexagon is clickable */
.mosaic .initials { display: grid; font-size: clamp(1rem, 3.5cqw, 2rem); padding-bottom: 22%; }
/* Generated tile for pages without a picture: unique per page (--seed), tinted by the section hue.
   The monogram comes from CSS (data-i) so text browsers don't print it. */
.initials::before { content: attr(data-i); }
.initials { --t: calc(var(--hue) + (var(--seed, 0) - 180) / 6);
  display: grid; place-items: center; font-weight: 800; font-size: 2.2rem; letter-spacing: -.04em; color: rgb(255 255 255 / .92);
  text-shadow: 0 2px 14px rgb(0 0 0 / .35);
  background:
    repeating-linear-gradient(calc(var(--seed, 0) * 1deg), rgb(255 255 255 / .06) 0 1px, transparent 1px 14px),
    radial-gradient(circle at calc(10% + var(--seed, 0) / 4.5 * 1%) 15%, oklch(82% .16 var(--t)), transparent 60%),
    linear-gradient(calc(var(--seed, 0) * 1deg + 120deg), oklch(55% .2 calc(var(--t) + 35)), oklch(30% .12 calc(var(--t) - 25))); }
.home .prose h1:first-child { display: none; }

/* ---------------------------------------------------------------- cards ("In this section")
   Picture first, then the link stretched over the card (text browsers then show no [IMG]). */
.children { margin-top: 3rem; }
.children h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 1rem; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; }
.cards li { position: relative; margin: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(6px); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; }
.cards li:hover, .cards li:focus-within { transform: translateY(-4px) scale(1.02); border-color: oklch(75% .15 var(--hue) / .7);
  box-shadow: 0 0 0 1px oklch(75% .15 var(--hue) / .5), 0 18px 40px -14px var(--glow); }
.cards img, .cards .initials { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; }
.cards a { padding: .8rem 1rem .15rem; font-size: 1.02rem; font-weight: 650; color: var(--text); text-decoration: none; outline: none; }
.cards a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card is clickable */
.cards .desc { padding: 0 1rem 1rem; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.cards .desc::first-letter { color: transparent; font-size: 0; }   /* hide the "—" used by text browsers */

/* Sitemap / blog lists */
.columns { columns: 16rem; column-gap: 2rem; padding-left: 1.1rem; }
.columns li { break-inside: avoid; }
.posts { list-style: none; padding: 0; }
.posts li { margin: 0; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.posts time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 1rem; font-size: .9rem; }

/* ---------------------------------------------------------------- footer / site tree */
footer.site { margin-top: 5rem; padding-top: 2rem; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }
.tree h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 1rem; color: var(--muted); }
.tree ul { list-style: none; padding: 0; margin: 0; }
.tree > ul { columns: 11rem; column-gap: 1.5rem; }
.tree > ul > li { break-inside: avoid; margin: 0 0 1.1rem; }
.tree > ul > li > a { font-weight: 650; color: var(--accent); }
.tree ul ul { padding-left: .85rem; margin: .2rem 0 0; border-left: 1px solid var(--border); }
.tree li { margin: .12rem 0; }
.tree a { color: var(--muted); text-decoration: none; }
.tree a:hover { color: var(--text); }
.tree a[aria-current] { color: var(--accent); font-weight: 650; }
.tree button.twisty { display: none; }
.colophon { margin-top: 1.5rem; font-size: .85rem; }
.colophon a { color: var(--muted); }

/* ---------------------------------------------------------------- landscape: site tree as a left sidebar
   Pure CSS (source order unchanged, so text browsers still get content first). */
@media (min-width: 68rem) and (orientation: landscape) {
  .wrap, .wrap.app {
    max-width: none; padding-inline: max(1.5rem, (100vw - 82rem) / 2);
    display: grid; column-gap: 3.5rem;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "head head" "side crumbs" "side main" "side foot";
  }
  .wrap:not(.app) main, .wrap:not(.app) .crumbs { max-width: calc(var(--measure) + 4rem); }
  .wrap.home main { max-width: none; }
  .home .hero, .home .prose { max-width: var(--measure); }
  header.site { grid-area: head; }
  .crumbs { grid-area: crumbs; }
  main { grid-area: main; }
  footer.site { display: contents; }
  .tree { grid-area: side; align-self: start; position: sticky; top: 4.6rem;
    max-height: calc(100vh - 5.5rem); overflow-y: auto; overscroll-behavior: contain;
    margin-top: 1.4rem; padding: 1rem .5rem 1rem 0; font-size: .9rem; scrollbar-width: thin; }
  .tree > ul { columns: auto; }
  .tree > ul > li { margin-bottom: .6rem; }
  .colophon { grid-area: foot; margin-top: 5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
  /* collapsible tree once site.js is there */
  .js .tree li { position: relative; }
  .js .tree button.twisty { display: block; position: absolute; left: -1.35rem; top: .2rem; width: 1.2rem; height: 1.2rem;
    padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; transition: transform .2s, color .2s; }
  .js .tree button.twisty:hover { color: var(--accent); background: var(--surface-hi); }
  .js .tree button.twisty::before { content: ""; display: block; width: .38rem; height: .38rem; margin: .3rem auto 0;
    border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); }
  .js .tree li.closed > ul { display: none; }
  .js .tree li.closed > button.twisty { transform: rotate(-90deg); }
  .js .tree { padding-left: 1.3rem; }
}

/* ---------------------------------------------------------------- JS search overlay (site.js) */
.finder { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 0;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  animation: fade .2s ease-out; }
.finder[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.finder svg { width: 100%; height: 100%; }
.finder .link { stroke: var(--accent); stroke-opacity: .35; stroke-width: 1.2; }
.finder .node circle { fill: var(--bg-2); stroke: oklch(75% .16 var(--h)); stroke-width: 2; transition: r .2s; }
.finder .node.hit circle { fill: oklch(75% .16 var(--h)); filter: drop-shadow(0 0 8px oklch(70% .2 var(--h))); }
.finder .node.sel circle { stroke: var(--text); stroke-width: 3; }
.finder .node text { fill: var(--text); font-size: 13px; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.finder .node.dim text { fill: var(--muted); font-size: 11px; }
.finder .node a { cursor: pointer; }
.finder .results { overflow-y: auto; padding: 5rem 1rem 1rem; border-left: 1px solid var(--border); background: color-mix(in oklab, var(--bg-2) 85%, transparent); }
.finder .results p { color: var(--muted); font-size: .85rem; margin: 0 .5rem 1rem; }
.finder ol { list-style: none; margin: 0; padding: 0; }
.finder li { margin: 0 0 .3rem; }
.finder li a { display: block; padding: .6rem .8rem; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.finder li a small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: .15rem; }
.finder li a mark { background: oklch(75% .16 var(--h) / .3); color: inherit; border-radius: 3px; }
.finder li.sel a, .finder li a:hover { background: var(--surface-hi); border-color: oklch(75% .16 var(--h) / .55); }
.finder .hint { position: absolute; left: 1.25rem; bottom: 1rem; font-size: .78rem; color: var(--muted); }
.finder .hint kbd { border: 1px solid var(--border); border-radius: 4px; padding: 0 .3rem; }
.searching header.site { z-index: 60; }
@media (max-width: 52rem) { .finder { grid-template-columns: 1fr; grid-template-rows: 40vh 1fr; }
  .finder .results { border-left: 0; border-top: 1px solid var(--border); padding-top: 1rem; } }

/* appearance popover (site.js) */
.appearance { position: relative; }
.appearance > button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; display: grid; place-items: center; }
.appearance > button:hover { background: var(--surface-hi); }
.appearance .panel { position: absolute; right: 0; top: calc(100% + .6rem); width: 15rem; padding: .9rem; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .88rem; }
.appearance .panel[hidden] { display: none; }
.appearance fieldset { border: 0; margin: 0 0 .7rem; padding: 0; }
.appearance legend { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem; }
.appearance .seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface); }
.appearance .seg label { text-align: center; padding: .3rem .2rem; border-radius: 8px; cursor: pointer; }
.appearance .seg input { position: absolute; opacity: 0; }
.appearance .seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.appearance .seg label:has(input:focus-visible) { outline: 2px solid var(--accent); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 40rem) {
  header.site { gap: .4rem .8rem; }
  .sections { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .sections ul { flex-wrap: nowrap; }
  .sections a { white-space: nowrap; }
  .search { margin-left: auto; }
  .search input[type=search] { width: 2.4rem; padding-right: 0; color: transparent; cursor: pointer; }
  .search input[type=search]::placeholder { color: transparent; }
  .search input[type=search]:focus { width: calc(100vw - 6rem); color: var(--text); cursor: text; }
  .search kbd { display: none; }
  .hero { padding-top: 2rem; }
}

/* ---------------------------------------------------------------- Bootstrap class names used by a few pages */
.container { max-width: 100%; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.card-img-top { width: 100%; border-radius: 0 !important; box-shadow: none !important; display: block; }
.card-body { padding: .8rem 1rem; }
.card-text { margin: 0; }
.badge { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .8em; background: var(--surface-hi); }
.bg-success { background: oklch(55% .14 150); color: #fff; }
.list-group-item { list-style: none; padding: .45rem 0; border-bottom: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  header.site, footer.site, .crumbs, .children, .backdrop, .mosaic { display: none !important; }
  body { background: #fff; color: #000; } h1 { color: #000; background: none; }
  .wrap { display: block !important; max-width: none; }
}
