/* ==========================================================================
   Retr0+ — retr0plus.se
   "Purple board rev.A" — matches the Retr0+ stream overlay pack.
   All fonts are self-hosted (SIL OFL 1.1, see /fonts/LICENSE-*.txt).
   No third-party requests are made by this site.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "Chakra Petch"; src: url("/fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("/fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url("/fonts/share-tech-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "VT323"; src: url("/fonts/vt323-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Tokens (same palette as the overlay pack) ---------- */
:root {
  color-scheme: dark;

  --sub: #150a24;          /* substrate */
  --sub2: #1e0f33;
  --trace: #6d28d9;
  --trace-hi: #a855f7;
  --glow: #c084fc;         /* 6.9:1 on --sub */
  --gold: #d4a54a;         /* ENIG pads + traces */
  --gold-hi: #ffd88a;
  --silk: #ede7f6;         /* silkscreen */
  --silk-dim: #9a8bb5;     /* 5.6:1 on --sub */
  --amber: #ff9f1c;
  --up: #7ee0a8;
  --red: #ff3c38;          /* the + in the logo */
  --line: rgba(168, 85, 247, 0.28);
  --line-strong: rgba(168, 85, 247, 0.5);

  --font-head: "Chakra Petch", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-logo: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel: "VT323", ui-monospace, Menlo, Consolas, monospace;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1240px;
  --header-h: 72px;
  /* Edge-cut PCB: panels have all four corners milled off, with a lit line along each cut */
  --cut: 16px;             /* panels */
  --cut-btn: 12px;         /* buttons (two corners) */
  --cut-sm: 7px;           /* small controls (two corners) */
  --edge: rgba(192, 132, 252, 0.75);
  --edge-glow: rgba(192, 132, 252, 0.16);
  --panel-fill: linear-gradient(160deg, rgba(30, 15, 51, 0.92), rgba(19, 9, 34, 0.86));

  /* Extra delay for intro animations while the boot screen is showing */
  --intro: 4.7s;
}
.booted { --intro: 0s; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background-color: var(--sub);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--silk);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
em { font-style: normal; }

::selection { background: var(--trace-hi); color: #fff; }

/* ---------- Substrate: perfboard holes + CRT scanlines + vignette ---------- */
.bg {
  position: absolute;               /* part of the page, like the traces */
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(168, 85, 247, 0.15) 1.4px, transparent 1.6px);
  background-size: 32px 32px;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}
body::before {
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  opacity: 0.45;
}
body::after {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(8, 3, 16, 0.6) 100%);
}

/* ---------- Intro: boot log + LOADING (first page view per session) ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: pointer;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(109, 40, 217, 0.32), transparent 72%),
    radial-gradient(circle, rgba(168, 85, 247, 0.15) 1.4px, transparent 1.6px) 0 0 / 32px 32px,
    var(--sub);
}
.booted .boot { display: none; }
.boot__skip-tap { display: none; }
@media (hover: none) and (pointer: coarse) { .boot__skip-key { display: none; } .boot__skip-tap { display: inline; } }
.boot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px);
}
.boot__inner { width: min(620px, 100%); }
.boot__sys {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--amber);
}
.boot__log {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  line-height: 1.9;
  color: var(--silk-dim);
}
.boot__log li { display: flex; gap: 10px; align-items: baseline; }
.boot__log li::before { content: ">"; color: var(--amber); }
.boot__log .dots { flex: 1; border-bottom: 2px dotted rgba(154, 139, 181, 0.35); transform: translateY(-4px); }
.boot__log b { font-weight: 400; color: var(--up); }
.boot__log b.warn { color: var(--amber); }
.boot__logo {
  margin-top: 30px;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: clamp(3.5rem, 13vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--silk);
  text-shadow: 0 0 44px rgba(168, 85, 247, 0.65), 0 0 12px rgba(192, 132, 252, 0.45);
}
.boot__logo .pad-plus { width: 0.58em; height: 0.58em; margin-left: 0.12em; }
.boot__status {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.42em;
  color: var(--silk-dim);
}
.boot__pct { color: var(--amber); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.boot__bar {
  position: relative;
  height: 14px;
  margin-top: 10px;
  background: rgba(109, 40, 217, 0.2);
  border: 2px solid rgba(168, 85, 247, 0.45);
  overflow: hidden;
}
.boot__bar span {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--trace-hi) 0 5px, var(--trace) 5px 10px);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.7);
  transform-origin: left;
  transform: scaleX(0);
}
.boot__skip {
  margin-top: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: rgba(154, 139, 181, 0.6);
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 300;
  padding: 8px 14px;
  background: var(--glow);
  color: var(--sub);
  font-family: var(--font-mono);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Logo: the Retr0+ wordmark ---------- */
.logo {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--silk);
  text-decoration: none;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.55);
  padding-block: 2px;          /* at least 24 px to tap on a phone */
}
/* The + is a plus-shaped gold solder pad with a drilled via (a real hole) */
.pad-plus {
  display: inline-block;
  width: 0.64em;
  height: 0.64em;
  margin-left: 0.08em;
  vertical-align: 0.01em;
  overflow: visible;
  fill: var(--gold);
  filter: drop-shadow(0 0 0.1em rgba(212, 165, 74, 0.8));
}
.pad-ring { fill: none; stroke: var(--gold); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.glitch__layer .pad-plus { fill: currentColor; filter: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(21, 10, 36, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header__inner {
  min-height: var(--header-h);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px clamp(14px, 2vw, 26px);
}
.nav a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silk-dim);
  text-decoration: none;
  padding: 10px 0 8px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:hover { color: var(--silk); }
.nav a[aria-current="page"] { color: var(--silk); border-bottom-color: var(--trace-hi); }

.status-led {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* ---------- Layout ---------- */
main { flex: 1 0 auto; }
.container {
  width: 100%;   /* auto margins in a flex column would otherwise shrink it */
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--amber);
}

/* Shared "board plate" look: gradient panel, trace-coloured border, edge-cut corners (see "Edge-cut PCB") */
.plate {
  --fill: var(--panel-fill);
  border: 2px solid rgba(168, 85, 247, 0.34);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-decoration: none;
  clip-path: polygon(var(--cut-btn) 0, 100% 0, 100% calc(100% - var(--cut-btn)), calc(100% - var(--cut-btn)) 100%, 0 100%, 0 var(--cut-btn));
  max-width: 100%;
  overflow-wrap: anywhere;   /* "> WATCH_ON_STREAM" in large text on a phone */
  transition: box-shadow 0.25s ease, transform 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.btn--solid {
  background: var(--glow);
  color: var(--sub);
}
.btn--solid:hover { background-color: #d7a6ff; transform: translateY(-2px); }
.btn--ghost {
  color: var(--silk);
  background: rgba(109, 40, 217, 0.18);
  box-shadow: inset 0 0 0 2px rgba(168, 85, 247, 0.5);
}
.btn--ghost:hover { background-color: rgba(109, 40, 217, 0.34); }
button.btn { border: 0; }   /* (a <button> kept the browser's grey outset border round its own edge) */

/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 88px var(--gutter) 140px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* glow pool behind the wordmark */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse min(900px, 90vw) min(620px, 70vh) at 50% 46%, rgba(109, 40, 217, 0.3), transparent 70%);
}

/* PCB traces */
.traces {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: min(27vw, 540px);
  height: 100%;
  pointer-events: none;
}
.traces--left { left: 0; }
.traces--right { right: 0; transform: scaleX(-1); }
.t-base { fill: none; stroke: var(--gold); stroke-width: 3; opacity: 0.5; stroke-linecap: round; }
.t-flow { fill: none; stroke: var(--gold-hi); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 7 34; opacity: 0; }
.pad { fill: var(--gold); opacity: 0.9; }
.via { fill: var(--sub); }
.padglow { fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0.3; transform-box: fill-box; transform-origin: center; }

/* HUD corner brackets */
.bracket {
  position: absolute;
  width: 88px;
  height: 88px;
  border: 3px solid var(--trace-hi);
  opacity: 0.7;
  pointer-events: none;
}
.bracket--tl { top: 32px; left: 32px; border-right: 0; border-bottom: 0; }
.bracket--tr { top: 32px; right: 32px; border-left: 0; border-bottom: 0; }
.bracket--bl { bottom: 32px; left: 32px; border-right: 0; border-top: 0; }
.bracket--br { bottom: 32px; right: 32px; border-left: 0; border-top: 0; }

.glitch {
  position: relative;
  display: inline-block;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: clamp(4.5rem, 19vw, 11rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--silk);
  text-shadow: 0 0 44px rgba(168, 85, 247, 0.65), 0 0 12px rgba(192, 132, 252, 0.45);
}
.glitch__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  text-shadow: none;
}
.glitch__layer--a { color: var(--glow); }
.glitch__layer--b { color: var(--red); }

.rule {
  width: min(620px, 80%);
  height: 2px;
  margin: 30px auto 0;
  background: linear-gradient(90deg, transparent, var(--trace-hi), transparent);
  opacity: 0.8;
}

/* Tagline: an invisible full copy reserves the width, so the centred line
   types left-to-right instead of growing from the middle. */
.tagline {
  display: inline-grid;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  line-height: 1.4;
  color: var(--silk);
  text-align: left;   /* no letter-spacing here: the typing width is measured in ch */
}
.tagline > * { grid-area: 1 / 1; }
.tagline__ghost { visibility: hidden; }
.tagline__live { justify-self: start; }
.tagline__prompt { color: var(--amber); margin-right: 1ch; }
.typed { --chars: 42; } /* must equal the number of characters in the tagline */

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.2em;
  vertical-align: -0.15em;
  background: var(--amber);
}

/* what the site is, in one plain sentence, under the tagline */
.hero__about { max-width: 46ch; margin: 22px auto 0; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.6; color: var(--silk-dim); text-wrap: balance; }
.hero__about a { color: var(--silk); text-underline-offset: 3px; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.clock {
  position: absolute;
  right: calc(var(--gutter) + 56px);
  bottom: 48px;
  text-align: right;
  font-family: var(--font-mono);
  color: var(--silk-dim);
}
.clock__time {
  display: block;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--silk);
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.6);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.clock__label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.clock__zone { color: var(--amber); }

/* ---------- Home: rolling bar ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(21, 10, 36, 0.6);
  padding: 16px 0;
}
.marquee__track { display: flex; width: max-content; }
.marquee__list { display: flex; gap: 54px; padding-right: 54px; }
.marquee__list li {
  display: flex;
  align-items: center;
  gap: 13px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silk-dim);
}
.marquee__list li::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* ---------- Home: sections ---------- */
.section { padding-top: clamp(80px, 10vw, 128px); }

.section__title,
.page-title {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.55);
}
.section__title { margin-top: 18px; font-size: clamp(min(2.4rem, 10vw), 6vw, 4.2rem); overflow-wrap: break-word; }
.section__title em,
.page-title em { color: var(--trace-hi); }
.page-title { margin-top: 16px; font-size: clamp(min(2.6rem, 11vw), 7vw, 4.6rem); overflow-wrap: break-word; }   /* 11vw: long one-word titles fit a phone even at 175 % text */

/* Workbench window (styled like the overlay chat well) */
.window {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}
.window__inner { padding: 22px 26px 26px; }
.window__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;             /* large text on a phone: the dots go under the title, not off the screen */
}
.window__title {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
}
.window__dots { display: flex; gap: 8px; }
.window__dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(168, 85, 247, 0.4); }
.window__dots span:first-child { background: var(--gold); box-shadow: 0 0 9px var(--gold); }
.window__hint { margin-top: 20px; font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0.04em; color: var(--silk-dim); }
.window__hint a { color: var(--glow); text-underline-offset: 3px; }

.corner {
  position: absolute;
  width: 30px; height: 30px;
  border: 3px solid var(--gold);
  opacity: 0.9;
  pointer-events: none;
}
.corner--a { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.corner--b { top: -6px; right: -6px; border-left: 0; border-bottom: 0; }
.corner--c { bottom: -6px; left: -6px; border-right: 0; border-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(109, 40, 217, 0.16);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.45);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--silk);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.chips a:hover { background-color: var(--glow); color: var(--sub); box-shadow: 0 0 16px rgba(192, 132, 252, 0.5); }

/* Print of the week (js/potw.js): the print's picture beside its story */
.potw__card { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 0; }
.potw__pic { position: relative; min-height: 260px; background: #0f0719; border-right: 1px solid var(--line); }
.potw__pic[hidden] { display: none; }
.potw__text { display: grid; gap: 10px; align-content: center; min-width: 0; padding: 30px 34px 34px; }
.potw__text .section__title { font-size: clamp(min(2rem, 9vw), 4vw, 2.8rem); }
.potw__name { font-family: var(--font-head); font-size: 1.35rem; color: var(--silk); overflow-wrap: anywhere; }
.potw__name .badge { margin-left: 10px; font-size: 0.7rem; vertical-align: middle; white-space: nowrap; }
.potw__meta { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.06em; color: var(--silk-dim); }
.potw__note { padding-left: 12px; border-left: 2px solid var(--amber); color: var(--silk); overflow-wrap: anywhere; }
.potw__links { padding-top: 6px; }
@media (max-width: 760px) {
  .potw__card { grid-template-columns: minmax(0, 1fr); }
  .potw__pic { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); }
  .potw__text { padding: 22px 22px 26px; }
}

/* Oscilloscope strip */
.scope {
  position: relative;
  height: 150px;
  max-width: 1024px;
  margin: 0 auto;
  border: 2px solid rgba(168, 85, 247, 0.4);
  background: rgba(10, 4, 20, 0.6);
  overflow: hidden;
}
.scope::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(168, 85, 247, 0.14) 1px, transparent 1px),
    linear-gradient(180deg, rgba(168, 85, 247, 0.14) 1px, transparent 1px);
  background-size: 64px 37.5px;
}
.scope__label {
  position: absolute;
  left: 14px;
  top: 10px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  color: var(--amber);
  opacity: 0.9;
}
.scope svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave { fill: none; stroke: var(--glow); stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px var(--trace-hi)); }
/* the printer on the scope (js/scope.js): CH2, the bed, in gold */
.wave--ch2 { stroke: var(--gold); stroke-width: 2; opacity: 0.8; filter: drop-shadow(0 0 5px rgba(212, 165, 74, 0.6)); }
.wave--ch2[hidden] { display: none; }
.scope--printer .scope__label { color: var(--gold-hi); }

/* Contact */
.contact {
  padding-top: clamp(96px, 12vw, 150px);
  padding-bottom: clamp(96px, 12vw, 150px);
  text-align: center;
}
.contact__text {
  max-width: 48ch;
  margin: 22px auto 38px;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--silk-dim);
}
.btn--big { padding: 16px 38px; font-size: 1.15rem; }

/* ---------- Page heading (projects / workbench / 404) ---------- */
.page-head {
  padding-top: clamp(52px, 8vw, 96px);
  padding-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.page-intro { margin-top: 18px; max-width: 56ch; color: var(--silk-dim); }
.count { font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silk-dim); }
/* the Print tab: when it was last updated, and a way to the print log */
.print__side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.print__side .count:empty { display: none; }
@media (max-width: 700px) { .print__side { align-items: flex-start; } }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 26px; }
.filter {
  padding: 9px 18px;
  border: 0;
  background: rgba(109, 40, 217, 0.14);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.4);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silk-dim);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.filter:hover { color: var(--silk); }
.filter[aria-pressed="true"] { background-color: var(--glow); color: var(--sub); box-shadow: none; }

/* ---------- Cards (projects + workbench) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
  padding-block: 34px 100px;
}

.card {
  --accent: var(--trace-hi);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 26px 30px;
  --fill: var(--panel-fill);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-top: 3px solid var(--accent);
  transition: border-color 0.2s ease;
}
.card:hover,
.card:focus-within { border-color: var(--accent); --edge: var(--glow); }

.card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card__icon { font-size: 1.75rem; line-height: 1; }
.badge {
  padding: 4px 9px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--up);
}
.badge--wip { color: var(--amber); }
.badge--mine { color: var(--gold); }

.card__meta { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silk-dim); overflow-wrap: anywhere; }
.card__tag { color: var(--accent); }
.card__title { font-family: var(--font-head); font-weight: 700; font-size: 1.55rem; line-height: 1.1; letter-spacing: 0.02em; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--glow); }
.card--link .card__title a::after { content: ""; position: absolute; inset: 0; }
.card__desc { color: var(--silk-dim); font-size: 0.95rem; }
.card__tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.card__tech li {
  padding: 4px 9px;
  background: rgba(109, 40, 217, 0.16);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--silk-dim);
}
.card__links { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 4px; }
.card__links a { font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--glow); text-underline-offset: 3px; }

.card__img {
  margin: -24px -26px 4px;
  aspect-ratio: 16 / 10;
  background: #0f0719;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Tool detail ---------- */
.back {
  display: inline-block;
  margin-top: clamp(34px, 6vw, 58px);
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--silk-dim);
  text-decoration: none;
}
.back:hover { color: var(--glow); }

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-top: 28px;
  padding-bottom: 100px;
}
.tool__figure {
  position: relative;
  border: 2px solid rgba(168, 85, 247, 0.5);
  background: #0f0719;
}
.tool__figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tool__body .page-title { margin-top: 0; font-size: clamp(2.4rem, 5vw, 3.8rem); }
.tool__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.tool__type { font-family: var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.tool__desc { margin-top: 24px; max-width: 62ch; color: var(--silk-dim); }
.tool__desc p + p { margin-top: 14px; }
.tool__block { margin-top: 34px; }
.tool__block h2 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
}
.tool__list { margin-top: 12px; display: grid; gap: 10px; }
.tool__list a {
  display: inline-flex;
  gap: 12px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--glow);
  text-underline-offset: 3px;
}
.tool__list .kind { color: var(--silk-dim); font-size: 0.85rem; letter-spacing: 0.1em; }

/* ---------- Terminal panel (empty states, 404) ---------- */
.terminal {
  margin-block: 34px 100px;
  max-width: 660px;
  padding: 26px 30px 32px;
  --fill: var(--panel-fill);
  border: 2px solid rgba(168, 85, 247, 0.34);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 2;
  color: var(--silk);
}
.terminal .out { color: var(--silk-dim); }
.terminal .ok { color: var(--amber); }
.terminal a { color: var(--glow); text-underline-offset: 3px; }
.terminal .cursor { height: 0.95em; }
.mf-pipe { margin: 26px 0 0; max-width: 760px; font-size: 1rem; line-height: 1.8; }
.scope--page { margin: 34px 0 0; }
.scope + .terminal { margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); background: rgba(21, 10, 36, 0.6); }
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silk-dim);
}
.site-footer__brand { font-family: var(--font-logo); font-weight: 700; letter-spacing: -0.02em; text-transform: none; font-size: 1.1rem; color: var(--silk); }
.social { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.social li { display: flex; align-items: center; gap: 11px; }
.social li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.social a { color: var(--silk-dim); text-decoration: none; transition: color 0.2s ease; }
.social a[href]:hover { color: var(--silk); }
.social a:not([href]) { color: #6b5c86; cursor: default; }
.social li:has(a:not([href]))::before { background: #6b5c86; box-shadow: none; }


/* ---------- LIVE badge (shown only while streaming) ---------- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: clamp(12px, 2vw, 24px);
  padding: 5px 12px;
  border: 1px solid rgba(255, 60, 56, 0.6);
  background: rgba(255, 60, 56, 0.12);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: #ffd9d8;
  text-decoration: none;
}
.live-badge:hover { background-color: rgba(255, 60, 56, 0.25); }
.live-badge__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }

/* ---------- Schedule panel ---------- */
.sched {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px 48px;
  align-items: end;
  padding: 34px 38px 40px;
}
.sched .section__title { font-size: clamp(min(2.2rem, 10vw), 5vw, 3.4rem); }
.sched__topic { margin-top: 14px; font-family: var(--font-mono); letter-spacing: 0.06em; color: var(--silk-dim); }
.sched__time { text-align: right; }
.sched__when {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: 0.08em;
  color: var(--silk);
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.55);
}
.sched__count { margin-top: 6px; font-family: var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.sched__local { margin-top: 10px; color: var(--silk-dim); font-size: 0.95rem; }
.sched__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.sched.is-live { box-shadow: inset 0 0 0 2px rgba(255, 60, 56, 0.55); }
.sched.is-live .section__title em { color: var(--red); }

/* ---------- GitHub repositories ---------- */
.gh { padding-top: 24px; padding-bottom: 20px; }
.gh .section__title { font-size: clamp(min(2rem, 9vw), 5vw, 3rem); }
.gh .grid { padding-top: 26px; }
.card__meta--foot { margin-top: auto; text-transform: none; letter-spacing: 0.06em; }

/* ---------- Print tab ---------- */
.print {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 22px;
  padding-top: 34px;
}
.print__main, .print__side { padding: 28px 30px 34px; }
.print__state {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silk-dim);
}
.led { width: 11px; height: 11px; border-radius: 50%; background: #6b5c86; }
.led--on { background: var(--up); box-shadow: 0 0 12px var(--up); }
.led--ok { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.led--warn { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.led--err { background: var(--red); box-shadow: 0 0 12px var(--red); }
.print__job {
  margin: 14px 0 26px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.print__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silk-dim);
}
.print__top b { color: var(--amber); font-weight: 400; }
.meter {
  position: relative;
  height: 16px;
  background: rgba(109, 40, 217, 0.2);
  border: 2px solid rgba(168, 85, 247, 0.45);
  overflow: hidden;
}
.meter i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: repeating-linear-gradient(90deg, var(--trace-hi) 0 5px, var(--trace) 5px 10px);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.7);
  transition: width 1s linear;
}
.print__times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silk-dim);
}
.print__times b { display: block; margin-top: 6px; font-size: 1.35rem; font-weight: 400; letter-spacing: 0.04em; color: var(--silk); }
.print__times div:last-child { text-align: right; }
.print__watch { margin-top: 28px; }
.print__notify { margin-top: 28px; }
.print__watch:not([hidden]) + .print__notify { margin-left: 12px; }
.print__notify[aria-pressed="true"] { color: var(--gold-hi); box-shadow: inset 0 0 0 2px var(--gold); }
.print__notify-msg { margin-top: 12px; font-size: 0.95rem; color: var(--silk-dim); }
.print__notify-msg:empty { display: none; }
.readout {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  font-family: var(--font-mono);
}
.readout dt, .readout dd { padding: 9px 0; border-bottom: 1px solid rgba(168, 85, 247, 0.16); }
.readout dt { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem; color: var(--silk-dim); }
.readout dd { margin: 0; text-align: right; color: var(--silk); display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.readout dd.print__credit { flex-direction: column; align-items: flex-end; gap: 4px; overflow-wrap: anywhere; }
.print__credit a { color: var(--gold-hi); text-underline-offset: 3px; }
.print__licence { font-size: 0.85rem; color: var(--silk-dim); }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(237, 231, 246, 0.5); }
.print__note { margin: 22px 0 100px; font-size: 0.95rem; color: var(--silk-dim); }
#print-offline { margin-bottom: 0; }

/* ---------- 3D viewer ---------- */
.view3d {
  margin-left: 14px;
  padding: 4px 12px;
  border: 0;
  background: rgba(109, 40, 217, 0.2);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--silk);
  cursor: pointer;
}
.view3d:hover { background: var(--glow); color: var(--sub); }
.stl { margin-top: 18px; border: 2px solid rgba(168, 85, 247, 0.5); background: #0f0719; }
.stl__bar, .stl__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}
.stl__name { color: var(--amber); }
.stl__info { color: var(--silk-dim); }
.stl__canvas { display: block; width: 100%; cursor: grab; touch-action: none; }
.stl__canvas:active { cursor: grabbing; }
.stl__controls { justify-content: flex-end; border-top: 1px solid var(--line); }
.stl__btn {
  padding: 6px 14px;
  border: 0;
  background: rgba(109, 40, 217, 0.2);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.45);
  font-family: var(--font-mono);
  color: var(--silk);
  cursor: pointer;
}
.stl__btn:hover { background: rgba(109, 40, 217, 0.4); }


/* ---------- Featured project card (picture beside the text) ---------- */
.card--featured { grid-column: 1 / -1; }
.card__go { align-self: flex-start; margin-top: 6px; }
@media (min-width: 861px) {
  .card--featured {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0;
    padding: 0;
  }
  .card--featured .card__img { margin: 0; aspect-ratio: auto; display: flex; align-items: center; border-bottom: 0; border-right: 1px solid var(--line); }
  .card--featured .card__img img { height: auto; aspect-ratio: 16 / 10; }
  .card--featured .card__body { display: flex; flex-direction: column; gap: 14px; padding: 30px 32px 38px; }
  .card--featured .card__title { font-size: 2.1rem; }
}

/* ---------- Page sections (Maker Forge, Contact) ---------- */
.block { padding-top: clamp(56px, 8vw, 96px); }
.block__title {
  margin-top: 14px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.block__title em { color: var(--trace-hi); }
.block__intro { margin-top: 14px; max-width: 60ch; color: var(--silk-dim); }
.placeholder-note {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 159, 28, 0.55);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

/* Maker Forge hero */
.mf-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 60px); align-items: center; padding-top: clamp(44px, 7vw, 84px); }
.mf-hero .page-title { font-size: clamp(3rem, 8vw, 5.4rem); }
.mf-hero .hero__actions { justify-content: flex-start; }
.mf-shot { position: relative; }
.mf-shot img { width: 100%; height: auto; border: 2px solid rgba(168, 85, 247, 0.5); clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.mf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-top: 30px; font-family: var(--font-mono); }
.mf-stats dt { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silk-dim); }
.mf-stats dd { margin: 4px 0 0; color: var(--silk); }
.mf-stats__when { color: var(--silk-dim); font-size: 0.85em; }

/* Screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 28px; }
.gallery figure { margin: 0; }
.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid rgba(168, 85, 247, 0.4);
  background: #0f0719;
  cursor: zoom-in;
}
.gallery button:hover { border-color: var(--glow); }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery img[data-src] { color: transparent; }   /* waiting its turn (main.js): keep the frame, hide the alt text */
.gallery figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.06em; color: var(--silk-dim); }

.lightbox {
  width: min(1200px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 2px solid rgba(168, 85, 247, 0.6);
  background: var(--sub);
  color: var(--silk);
}
.lightbox::backdrop { background: rgba(8, 3, 16, 0.85); }
.lightbox img { display: block; width: 100%; height: auto; max-height: calc(92vh - 70px); object-fit: contain; background: #0f0719; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--silk-dim); }

/* Feature grid, roadmap */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; margin-top: 28px; }
.feature { padding: 22px 24px 28px; }
.feature h3 { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.02em; }
.feature p { margin-top: 8px; color: var(--silk-dim); font-size: 0.95rem; }
.feature__n { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.3em; color: var(--amber); }
.roadmap { margin-top: 24px; display: grid; gap: 10px; font-family: var(--font-mono); max-width: 720px; }
.roadmap li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid rgba(168, 85, 247, 0.16); color: var(--silk); }
.roadmap li::before { content: "[ ]"; color: var(--silk-dim); }
.roadmap li.done::before { content: "[x]"; color: var(--up); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { padding: 6px 12px; background: rgba(109, 40, 217, 0.16); box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.4); font-family: var(--font-mono); font-size: 0.9rem; }

/* Contact tab */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; margin-top: 34px; }
.contact-card { padding: 28px 30px 34px; }
.contact-email {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  letter-spacing: 0.04em;
  color: var(--silk);
  overflow-wrap: anywhere;
  user-select: all;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.copy-status { min-height: 1.6em; margin-top: 10px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--up); }
.channel-list { margin-top: 16px; font-family: var(--font-mono); }
.channel-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid rgba(168, 85, 247, 0.16); }   /* (large text on a phone: the note goes under the name) */
.channel-list li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 9px var(--gold); }
.channel-list li:has(a:not([href]))::before { background: #6b5c86; box-shadow: none; }
.channel-list a { color: var(--silk); letter-spacing: 0.1em; text-decoration: none; }
.channel-list a[href]:hover { color: var(--glow); }
.channel-list a:not([href]) { color: #6b5c86; }
.channel-list span { margin-left: auto; font-size: 0.85rem; color: var(--silk-dim); }
.reasons { margin-top: 22px; display: grid; gap: 12px; }
.reasons li { padding-left: 20px; position: relative; color: var(--silk-dim); }
.reasons li::before { content: ">"; position: absolute; left: 0; color: var(--amber); font-family: var(--font-mono); }


/* ==========================================================================
   Easy reading (set by the Aa panel; applied before paint by boot.js)
   ========================================================================== */
html { font-size: calc(100% * var(--ez-scale, 1)); }
.ez-font {
  --font-head: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
.ez-font .eyebrow, .ez-font .nav a, .ez-font .btn, .ez-font .count, .ez-font .filter { letter-spacing: 0.06em; }
.ez-contrast {
  --silk: #ffffff;
  --silk-dim: #e9e2f7;
  --glow: #e2c4ff;
  --trace-hi: #d7a6ff;
  --amber: #ffc266;
  --line: rgba(226, 196, 255, 0.65);
  --line-strong: rgba(226, 196, 255, 0.95);
}
.ez-contrast body { background: #0c0514; }
.ez-contrast .bg, .ez-contrast body::before, .ez-contrast body::after { display: none; }
.ez-contrast .glitch, .ez-contrast .page-title, .ez-contrast .section__title, .ez-contrast .logo { text-shadow: none; }
.ez-contrast .plate, .ez-contrast .card, .ez-contrast .terminal { --fill: none; background-color: #150a24; border-color: var(--line-strong); }
.ez-contrast { --edge: rgba(226, 196, 255, 0.95); --edge-glow: transparent; }
.ez-contrast a:not(.btn):not(.logo) { text-decoration-thickness: 2px; }
.ez-calm body::before, .ez-calm body::after, .ez-calm .bg, .ez-calm .boot, .ez-calm .glitch__layer, .ez-calm .scope { display: none !important; }
.ez-calm *, .ez-calm *::before, .ez-calm *::after { animation: none !important; transition: none !important; }
.ez-calm .typed { width: auto !important; }
.ez-calm html { scroll-behavior: auto; }

/* ---------- Header tools ---------- */
.site-header__inner { flex-wrap: nowrap; }
.nav { margin-left: auto; }
.hdr-tools { display: flex; align-items: center; gap: 8px; margin-left: clamp(10px, 2vw, 22px); }
.tool-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  background: rgba(109, 40, 217, 0.18);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.45);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--silk);
  cursor: pointer;
}
.tool-btn:hover, .tool-btn[aria-expanded="true"] { background-color: rgba(109, 40, 217, 0.4); }

.ez-panel {
  position: absolute;
  right: var(--gutter);
  top: calc(100% + 8px);
  z-index: 120;
  width: min(360px, calc(100vw - 32px));
  padding: 20px 22px 22px;
  background: #1a0c2c;
  border: 2px solid rgba(168, 85, 247, 0.6);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.ez-panel h2 { font-family: var(--font-mono); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--amber); }
.ez-panel fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.ez-panel legend { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silk-dim); margin-bottom: 8px; }
.ez-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ez-sizes label { position: relative; }
.ez-sizes input { position: absolute; opacity: 0; }
.ez-sizes span { display: block; padding: 8px 0; text-align: center; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.45); font-family: var(--font-mono); cursor: pointer; }
.ez-sizes input:checked + span { background: var(--glow); color: var(--sub); }
.ez-sizes input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.ez-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; cursor: pointer; }
.ez-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--glow); flex: none; }
.ez-check b { display: block; font-weight: 400; color: var(--silk); }
.ez-check small { display: block; color: var(--silk-dim); font-size: 0.85rem; }
.ez-actions { display: flex; justify-content: space-between; margin-top: 18px; gap: 10px; }

/* ---------- Menus: More (desktop) + Menu (phones) ---------- */
.menu { position: relative; }
.menu summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silk-dim);
  padding: 10px 0 8px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " \25BE"; }
.menu[open] summary, .menu summary:hover { color: var(--silk); }
.menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 110;
  min-width: 220px;
  padding: 8px 0;
  background: #1a0c2c;
  border: 2px solid rgba(168, 85, 247, 0.6);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  /* never taller than the screen below the header: on a phone the list scrolls by itself, and a swipe on it
     moves the list, not the page behind it (js/extras.js sets the exact height when it opens) */
  max-height: calc(100vh - var(--header-h) - 24px);
  max-height: calc(100dvh - var(--header-h) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.7) transparent;
}
/* a glow at the edge that has more of the list beyond it (js/extras.js marks it), so you can see it scrolls */
.menu__list.more-below { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), inset 0 -40px 26px -18px rgba(192, 132, 252, 0.9); }
.menu__list.more-above { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), inset 0 40px 26px -18px rgba(192, 132, 252, 0.9); }
.menu__list.more-above.more-below { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), inset 0 40px 26px -18px rgba(192, 132, 252, 0.9), inset 0 -40px 26px -18px rgba(192, 132, 252, 0.9); }
.menu__list li { display: block; }
.nav .menu__list a, .menu__list a {
  display: block;
  padding: 10px 18px;
  border: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silk-dim);
  text-decoration: none;
}
.menu__list a:hover, .menu__list a:focus-visible { background: rgba(109, 40, 217, 0.3); color: var(--silk); }
.menu__list a[aria-current="page"] { color: var(--silk); box-shadow: inset 3px 0 0 var(--trace-hi); }
.menu--mobile { display: none; }
.nav .menu__list { display: block; }
.logo { white-space: nowrap; }
/* Large text: use the compact header menu so nothing wraps */
.ez-large .nav, .nav-tight .nav { display: none; }
.ez-large .menu--mobile, .nav-tight .menu--mobile { display: block; }
.ez-large .hdr-tools { margin-left: auto; }
/* Large text on a narrow screen: the header may take two rows (logo, then the buttons on the right)
   instead of making every page scroll sideways. */
.ez-large .site-header__inner { flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.ez-large .menu--mobile summary { white-space: nowrap; letter-spacing: 0.06em; }
.menu--mobile summary { white-space: nowrap; padding: 8px 12px; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.45); background: rgba(109, 40, 217, 0.18); color: var(--silk); letter-spacing: 0.14em; }

/* ---------- Terminal ---------- */
.term {
  width: min(760px, 94vw);
  padding: 0;
  border: 2px solid rgba(168, 85, 247, 0.7);
  background: #0e0618;
  color: var(--silk);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(168, 85, 247, 0.25);
}
.term::backdrop { background: rgba(8, 3, 16, 0.75); }
.term__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(109, 40, 217, 0.18); }
.term__bar h2 { font-family: var(--font-mono); font-weight: 400; font-size: 0.9rem; letter-spacing: 0.3em; color: var(--amber); }
.term__out { height: min(46vh, 380px); overflow-y: auto; padding: 14px 18px; font-family: var(--font-mono); font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; }
.term__out p { margin: 0; }
.term__out .cmd { color: var(--glow); margin-top: 8px; }
.term__out .err { color: #ff8f8c; }
.term__line { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); font-family: var(--font-mono); }
.term__line span { color: var(--amber); }
.term__line input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--silk); font: inherit; font-size: 1rem; caret-color: var(--amber); }
.term__line input:focus { outline: none; }
.term__line:focus-within { box-shadow: inset 0 0 0 2px var(--amber); }
.term__hint { padding: 0 18px 12px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--silk-dim); }
kbd { font-family: var(--font-mono); padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: 0.85em; }
.hero__hint { margin-top: 22px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.12em; color: var(--silk-dim); }
.hero__hint button { border: 0; background: none; padding: 0; color: var(--glow); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 260;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  background: #1a0c2c;
  border: 2px solid var(--gold);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--silk);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-on { opacity: 1; transform: none; }
.toast:empty { display: none; }

/* ---------- Lights out ---------- */
.lights {
  --mx: 50vw; --my: 40vh;
  position: fixed;
  inset: 0;
  z-index: 240;
  pointer-events: none;
  background: radial-gradient(circle 180px at var(--mx) var(--my), rgba(6, 2, 12, 0) 0%, rgba(6, 2, 12, 0.55) 55%, rgba(6, 2, 12, 0.96) 100%);
}
.lights__log {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 250;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: #ff8f8c;
  text-shadow: 0 0 10px rgba(255, 60, 56, 0.6);
  pointer-events: none;
}
.lights__off {
  position: fixed;
  right: 16px;
  top: calc(var(--header-h) + 12px);
  z-index: 250;
  padding: 8px 14px;
  border: 1px solid #ff8f8c;
  background: rgba(20, 5, 10, 0.9);
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  color: #ffd9d8;
  cursor: pointer;
}
.lights-out .glitch { color: #d8d0e6; }

/* ---------- Seasons (extras.js): pumpkin orange the last week of October, fairy lights in December ---------- */
.season-halloween { --gold: #ff8a1f; --gold-hi: #ffb466; }
.season-december .pad, .season-december .bgt .p { fill: #ff4d4a; }
.season-december .pad:nth-of-type(3n+1), .season-december .bgt .p:nth-of-type(3n+1) { fill: #59e08f; }
.season-december .pad:nth-of-type(3n+2), .season-december .bgt .p:nth-of-type(3n+2) { fill: #ffd88a; }
@media (prefers-reduced-motion: no-preference) {
  :root.season-december:not(.ez-calm) .pad, :root.season-december:not(.ez-calm) .bgt .p { animation: fairy 2.4s steps(1, end) infinite; }
  :root.season-december:not(.ez-calm) .pad:nth-of-type(3n+1), :root.season-december:not(.ez-calm) .bgt .p:nth-of-type(3n+1) { animation-delay: -0.8s; }
  :root.season-december:not(.ez-calm) .pad:nth-of-type(3n+2), :root.season-december:not(.ez-calm) .bgt .p:nth-of-type(3n+2) { animation-delay: -1.6s; }
}
@keyframes fairy { 0% { fill: #ff4d4a; opacity: 1; } 33% { fill: #59e08f; opacity: 0.95; } 66% { fill: #ffd88a; opacity: 1; } }

/* ---------- Clickable pads on the home board ---------- */
.traces--right { transform: none; }
/* Pads sit above the hero's own box (so they can be clicked) but below its text */
.hero .traces { z-index: 0; }
.hero > :not(.traces):not(.clock):not(.bracket):not(.gb-corner):not(.season-hero) { position: relative; z-index: 1; }
.hero .clock { z-index: 1; }
.pad-link { pointer-events: auto; cursor: pointer; }
.pad-hit { fill: transparent; stroke: none; }
.pad-label {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 3px;
  fill: var(--silk-dim);
  opacity: 0.55;
  transition: opacity 0.2s ease, fill 0.2s ease;
}
.pad-link:hover .pad-label, .pad-link:focus .pad-label { opacity: 1; fill: var(--gold-hi); }
.pad-link:hover .t-base, .pad-link:focus .t-base { stroke: var(--gold-hi); opacity: 1; }
.pad-link:hover .pad, .pad-link:focus .pad { fill: var(--gold-hi); }
.pad-link:focus { outline: none; }
.pad-link:focus-visible .pad-hit { stroke: var(--amber); stroke-width: 3; }

/* ---------- Build logs ---------- */
.logs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 30px 100px; max-width: 860px; }   /* (a long date line wraps instead of widening every log) */
.log { padding: 26px 30px 32px; scroll-margin-top: calc(var(--header-h) + 16px); }
.log__meta { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silk-dim); overflow-wrap: anywhere; }
.log__project { color: var(--amber); }
.log__title { margin: 10px 0 14px; font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.log__title a { color: inherit; text-decoration: none; }
.log__title a:hover { color: var(--glow); }
.log__p { color: var(--silk-dim); max-width: 68ch; }
.log__p + .log__p { margin-top: 12px; }
/* Journal posts (same frame as a build log) and the links between posts and logs */
.post__summary { color: var(--silk); font-size: 1.05rem; max-width: 68ch; margin: 0 0 14px; }
.log__journal { margin-top: 14px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--silk-dim); overflow-wrap: anywhere; }
.log__journal a { color: var(--gold); }
.log__images { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; margin: 18px 0 4px; }
.log__img { margin: 0; border: 2px solid rgba(168, 85, 247, 0.4); }
.log__img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.log .card__tech { margin-top: 18px; }

/* ---------- Hall of Spaghetti / Horror / Downloads ---------- */
.fail__label { margin-top: 4px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.fail .card__desc { margin-top: -6px; }
.card .badge--wip { vertical-align: middle; }
.card__title .badge, .card__meta .badge { margin-left: 8px; font-size: 0.7rem; }
.fear { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); }
.fear__label { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silk-dim); }
.fear__skulls { font-size: 1.3rem; letter-spacing: 4px; color: rgba(154, 139, 181, 0.35); }
.fear__skulls .is-on { color: #ff8f8c; text-shadow: 0 0 10px rgba(255, 60, 56, 0.5); }
.horror--backlog { --fill: linear-gradient(160deg, rgba(30, 15, 51, 0.7), rgba(19, 9, 34, 0.6)); border-style: dashed; }   /* (not see-through: its small text must stay easy to read) */
.dl .tool__list { margin-top: 4px; }
/* My designs from the printer (js/mydesigns.js), under the other downloads */
.grid + .dl-printed { margin-top: -40px; }
.dl--printed { gap: 12px; }
.dl__pic { aspect-ratio: 16 / 9; }
.dl--printed .card__links { align-items: center; margin-top: auto; }
.dl--printed .view3d { margin-left: 0; }
.dl--printed .stl { margin-top: 0; }

/* ---------- Guestbook ---------- */
.gb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: start; padding-block: 30px 100px; }
.gb > * { min-width: 0; }   /* grid columns may shrink below their content (phones, large text) */
.gb-form { padding: 26px 28px 30px; }
.field { display: block; margin-top: 16px; }
.field span { display: block; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silk-dim); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #0f0719;
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5);
  color: var(--silk);
  font: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.field small { display: block; margin-top: 4px; color: var(--silk-dim); font-size: 0.85rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gb-form .btn { margin-top: 20px; }
.form-status { min-height: 1.6em; margin-top: 12px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--up); }
.gb-list { display: grid; gap: 14px; }
.gb-entry { padding: 18px 22px 22px; }
.gb-entry__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-family: var(--font-mono); }
.gb-entry__name { min-width: 0; color: var(--amber); letter-spacing: 0.08em; overflow-wrap: anywhere; }
.gb-entry__date { color: var(--silk-dim); font-size: 0.85rem; }
.gb-entry__msg { margin-top: 8px; color: var(--silk); white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-reply { margin: 14px 0 0 18px; padding: 10px 14px 12px; border-left: 2px solid var(--gold); background: rgba(212, 165, 74, 0.07); }
.gb-reply__head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); }
.gb-reply__who { color: var(--gold-hi); letter-spacing: 0.08em; }
.gb-reply__who::before { content: "\21B3  "; color: var(--gold); }
.gb-reply__msg { margin-top: 6px; color: var(--silk); white-space: pre-wrap; overflow-wrap: anywhere; }
.gba-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.gba-reply { margin-top: 6px; }
.adm-reply { color: var(--gold-hi); }
.adm-reply-box { flex-basis: 100%; margin-top: 4px; }

/* ---------- Home: the guestbook, with a robot asking you to sign ----------
   The robot (tools/build-pages.py, ROBOT) stands in the first screen's lower left corner, by a button that
   takes you down to the guestbook. It bobs on the spot; every 8 seconds it hops and points at the button
   for a moment. It perks up when you're near the button, cheers when the form opens and dances when
   you've signed. All still for reduced motion and calm mode. */
.hero .gb-corner { position: absolute; left: 58px; bottom: 50px; z-index: 2; display: flex; align-items: flex-end; gap: 2px; }
.gb-corner .btn { margin-bottom: 14px; }
.gb-corner .bot { width: clamp(84px, 7vw, 106px); transform: scaleX(-1); }      /* facing right, towards its button */
.gb-corner .bot__say { transform-origin: 32px 19.5px; transform: scaleX(-1); }   /* (but the words read the right way) */
#guestbook { scroll-margin-top: calc(var(--header-h) + 18px); }
/* narrower screens and large text: below the clock instead, still on the left */
@media (max-width: 860px) { .hero .gb-corner { position: static; align-self: flex-start; margin: 26px 0 0 -4px; } }
.ez-large .hero .gb-corner { position: static; align-self: flex-start; margin: 30px 0 0 -4px; }
.hgb__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; }
.hgb__intro { flex: 1 1 380px; min-width: 0; }
.hgb__text { max-width: 60ch; margin-top: 12px; color: var(--silk-dim); }
.hgb__call { display: flex; align-items: flex-end; gap: 4px; max-width: 100%; }
.hgb__call .btn { margin-bottom: 14px; }
.hgb .gb-form { margin-top: 26px; max-width: 760px; }
.hgb__latest { margin-top: 34px; }
.gb-list--home { margin-top: 12px; }
.hgb__more { margin-top: 16px; font-family: var(--font-mono); letter-spacing: 0.08em; }
.bot { flex: none; width: clamp(86px, 25vw, 132px); height: auto; overflow: visible; }
@media (max-width: 560px) {
  .hgb__call .btn--big { padding: 14px 16px; font-size: 0.98rem; letter-spacing: 0.08em; }
  .bot { width: 80px; }
}
.bot * { transform-box: view-box; }
.bot__say { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; fill: #120820; }
.bot__say--thanks { display: none; }
.bot__all { transform-origin: 90px 140px; animation: bot-bob 8s ease-in-out infinite; }
.bot__shadow { transform-origin: 90px 142px; animation: bot-shadow 8s ease-in-out infinite; }
.bot__head { transform-origin: 90px 78px; animation: bot-head 8s ease-in-out infinite; }
.bot__arm--point { transform-origin: 69px 89px; transform: rotate(84deg); animation: bot-point 8s ease-in-out infinite; }
.bot__arm--free { transform-origin: 111px 89px; transform: rotate(-8deg); animation: bot-free 8s ease-in-out infinite; }
.bot__eyes { transform-origin: 90px 49px; animation: bot-blink 4.7s linear infinite; }
.bot__led { animation: bot-led 1.8s ease-in-out infinite; }
.bot__bubble { transform-origin: 46px 34px; animation: bot-bubble 8s ease-in-out infinite; }
@keyframes bot-bob {
  0%, 12%, 24%, 36%, 48% { transform: translateY(0); }
  6%, 18%, 30%, 42% { transform: translateY(-2.5px); }
  52% { transform: translateY(1px) scale(1.05, 0.94); }
  58% { transform: translateY(-17px) scale(0.97, 1.04); }
  64% { transform: translateY(0) scale(1.06, 0.94); }
  68%, 100% { transform: translateY(0) scale(1); }
  80% { transform: translateY(-1.5px); }
}
@keyframes bot-shadow { 0%, 52%, 64%, 100% { transform: scale(1); opacity: 0.55; } 58% { transform: scale(0.62); opacity: 0.3; } }
@keyframes bot-head { 0%, 66%, 96%, 100% { transform: rotate(0); } 72%, 90% { transform: rotate(-7deg); } }
@keyframes bot-point {
  0%, 50%, 100% { transform: rotate(8deg); }
  58% { transform: rotate(-30deg); }
  68% { transform: rotate(84deg); }
  72%, 80% { transform: rotate(74deg); }
  76%, 84%, 90% { transform: rotate(86deg); }
  96% { transform: rotate(8deg); }
}
@keyframes bot-free { 0%, 50%, 66%, 100% { transform: rotate(-8deg); } 58% { transform: rotate(-60deg); } }
@keyframes bot-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.12); } }
@keyframes bot-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes bot-bubble { 0%, 66%, 97%, 100% { opacity: 0; transform: scale(0.4); } 71%, 92% { opacity: 1; transform: scale(1); } }
/* near the button: on its toes, waving, still asking */
.gb-corner:hover .bot__all, .gb-corner:focus-within .bot__all { animation: bot-perk 0.9s ease-in-out infinite; }
.gb-corner:hover .bot__arm--point, .gb-corner:focus-within .bot__arm--point { animation: bot-wag 0.45s ease-in-out infinite alternate; }
.gb-corner:hover .bot__arm--free, .gb-corner:focus-within .bot__arm--free { animation: bot-wave 0.45s ease-in-out infinite alternate; }
.gb-corner:hover .bot__bubble, .gb-corner:focus-within .bot__bubble { animation: none; opacity: 1; transform: none; }
.gb-corner:hover .bot__head, .gb-corner:focus-within .bot__head, .gb-corner:hover .bot__shadow, .gb-corner:focus-within .bot__shadow { animation: none; }
@keyframes bot-perk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bot-wag { from { transform: rotate(78deg); } to { transform: rotate(92deg); } }
@keyframes bot-wave { from { transform: rotate(-120deg); } to { transform: rotate(-150deg); } }
/* the form opened: one glad hop; signed: a little dance, both arms up */
.bot.is-glad .bot__all { animation: bot-hop 0.8s ease-out 2; }
.bot.is-happy .bot__all { animation: bot-dance 0.5s ease-in-out infinite alternate; }
.bot.is-happy .bot__arm--point { animation: bot-up-l 0.25s ease-in-out infinite alternate; }
.bot.is-happy .bot__arm--free { animation: bot-up-r 0.25s ease-in-out infinite alternate; }
.bot.is-happy .bot__bubble { animation: none; opacity: 1; transform: none; }
.bot.is-happy .bot__say--ask { display: none; }
.bot.is-happy .bot__say--thanks { display: inline; }
.bot.is-happy .bot__head { animation: bot-head-dance 0.5s ease-in-out infinite alternate; }
@keyframes bot-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
@keyframes bot-dance { from { transform: rotate(-7deg) translateY(0); } to { transform: rotate(7deg) translateY(-6px); } }
@keyframes bot-up-l { from { transform: rotate(150deg); } to { transform: rotate(170deg); } }
@keyframes bot-up-r { from { transform: rotate(-150deg); } to { transform: rotate(-170deg); } }
@keyframes bot-head-dance { from { transform: rotate(6deg); } to { transform: rotate(-6deg); } }
/* still: pointing at the button, asking */
@media (prefers-reduced-motion: reduce) {
  .bot *, .gb-corner .bot * { animation: none !important; }
  .bot__bubble { opacity: 1; transform: none; }
  .bot.is-happy .bot__arm--point { transform: rotate(160deg); }
  .bot.is-happy .bot__arm--free { transform: rotate(-160deg); }
}
.ez-calm .bot *, .ez-calm .gb-corner .bot * { animation: none !important; }
.ez-calm .bot__bubble { opacity: 1; transform: none; }
.ez-calm .bot.is-happy .bot__arm--point { transform: rotate(160deg); }
.ez-calm .bot.is-happy .bot__arm--free { transform: rotate(-160deg); }
.gba-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 26px 0 18px; }
.gba-bar .field { margin: 0; min-width: 200px; }

/* ---------- Votes ---------- */
.votes { display: grid; gap: 16px; padding-block: 30px 30px; max-width: 820px; }
.vote { padding: 22px 26px 24px; }
.vote__title { font-family: var(--font-head); font-size: 1.4rem; }
.vote__desc { margin-top: 6px; color: var(--silk-dim); }
.vote__meter { margin-top: 16px; }
.vote__row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 12px; }
.vote__count { font-family: var(--font-mono); color: var(--silk-dim); letter-spacing: 0.08em; }
.vote .btn[disabled] { opacity: 0.7; cursor: default; }

/* ---------- Bench status ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; padding-block: 30px 100px; }
.board__panel { padding: 22px 24px 26px; }
.board__panel h2 { font-family: var(--font-mono); font-weight: 400; font-size: 0.9rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--amber); }
.board__big { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.board__small { margin-top: 8px; color: var(--silk-dim); overflow-wrap: anywhere; }
.board__panel ul { margin-top: 12px; display: grid; gap: 8px; }
.board__panel li { position: relative; padding-left: 18px; color: var(--silk); }
.board__panel li::before { content: ">"; position: absolute; left: 0; color: var(--amber); font-family: var(--font-mono); }
.board__link { display: inline-block; margin-top: 14px; font-family: var(--font-mono); color: var(--glow); max-width: 100%; overflow-wrap: anywhere; }
.board__panel--wide { grid-column: 1 / -1; }

/* ---------- Badges ---------- */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; padding-block: 30px 30px; }
.badge-card { padding: 20px 22px 22px; background: rgba(21, 10, 36, 0.7); border: 2px dashed rgba(154, 139, 181, 0.35); }
.badge-card.is-earned { border: 2px solid var(--gold); --fill: var(--panel-fill); --edge: var(--gold); }
.badge-card__icon { display: block; font-size: 1.8rem; color: rgba(154, 139, 181, 0.5); }
.is-earned .badge-card__icon { color: var(--gold); text-shadow: 0 0 14px rgba(212, 165, 74, 0.7); }
.badge-card__name { margin-top: 8px; font-family: var(--font-head); font-size: 1.2rem; }
.badge-card__how { margin-top: 4px; color: var(--silk-dim); font-size: 0.95rem; }
.badge-card__state { margin-top: 10px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silk-dim); }
.is-earned .badge-card__state { color: var(--up); }

/* ---------- Privacy (plain prose) ---------- */
.prose { max-width: 70ch; padding-block: 20px 100px; }
.prose h2 { margin-top: 40px; font-family: var(--font-head); font-size: 1.5rem; }
.prose p, .prose li { color: var(--silk-dim); }
.prose p { margin-top: 12px; }
.prose ul { margin-top: 12px; display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 20px; }
.prose li::before { content: ">"; position: absolute; left: 0; color: var(--amber); font-family: var(--font-mono); }
.prose strong { color: var(--silk); font-weight: 500; }
.prose a { color: var(--glow); }
.prose code { font-family: var(--font-mono); color: var(--silk); }

/* ---------- Footer explore row ---------- */
.explore { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.explore a { color: var(--silk-dim); text-decoration: none; }
.explore a:hover { color: var(--silk); }


/* ---------- Background traces (every page, like the stream overlays) ---------- */
/* Printed on the page: the traces (and the perfboard dots, below) cover the whole page
   and scroll with the text, so new traces come into view as you go down. */
body { position: relative; }
.bg-traces { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* Each side only fills the empty margin next to the content, and fades out before the text */
.bgt-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(220px, max(0px, calc((100vw - var(--maxw)) / 2 + 90px)));
  overflow: hidden;
}
.bgt-side--left { left: 0; -webkit-mask-image: linear-gradient(to right, #000 55%, transparent); mask-image: linear-gradient(to right, #000 55%, transparent); }
.bgt-side--right { right: 0; -webkit-mask-image: linear-gradient(to left, #000 55%, transparent); mask-image: linear-gradient(to left, #000 55%, transparent); }
.bgt { position: absolute; top: 0; width: 220px; overflow: visible; }   /* (pieces added as the page grows: a trace may cross into the next) */
.bgt--left { left: 0; }
.bgt--right { right: 0; }
.bgt .b { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; opacity: 0.3; }
.bgt .f { fill: none; stroke: var(--gold-hi); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 40; opacity: 0; }
.bgt .p { fill: var(--gold); opacity: 0.55; }
.bgt .v { fill: var(--sub); }
/* The home hero has its own clickable board, so it covers the background traces */
.hero {
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.15) 1.4px, transparent 1.6px) 0 calc(-1 * var(--header-h)) / 32px 32px,
    var(--sub);
}
.ez-contrast .bg-traces { display: none; }
/* The control panels are tools: no traces running under their menus and text */
:root:has(#adm-app) .bg-traces, :root:has(#gba) .bg-traces { display: none; }
:root:has(#adm-app) :is(.season-sky, .season-garland, .season-scene), :root:has(#gba) :is(.season-sky, .season-garland, .season-scene) { display: none; }
.ez-contrast .hero { background: #0c0514; }
/* Narrower screens have no empty margin: the traces still show, just softer and
   fading out before the middle, so text on top stays easy to read. */
@media (max-width: 1499px) {
  .bgt-side { width: min(220px, 34vw); }
  .bgt .b { opacity: 0.28; }
  .bgt .p { opacity: 0.45; }
}
/* Below 1100 px the home page's own clickable board is hidden, so don't cover the background traces */
@media (max-width: 1099px) {
  .hero { background: none; }
}
@media print { .bg-traces { display: none; } }


/* ---------- Print tab: thumbnail, camera, model ---------- */
.print__head { display: flex; align-items: center; gap: 16px; margin: 14px 0 26px; }
.print__head > * { min-width: 0; }
.print__head .print__job { margin: 0; overflow-wrap: anywhere; }
.print__last { margin: -12px 0 26px; color: var(--silk-dim); overflow-wrap: anywhere; }   /* the print before, once the printer is idle */   /* file names have no spaces to break at */
.print__thumb { width: 96px; height: 96px; flex: none; object-fit: contain; background: #0f0719; border: 2px solid rgba(168, 85, 247, 0.45); }
.print { align-items: start; }
.print-media { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; padding-top: 22px; align-items: start; }
.print-media__panel { padding: 24px 26px 28px; }
.print-media__panel .btn { margin-top: 16px; }
.print-cam { margin-top: 14px; background: #0f0719; border: 2px solid rgba(168, 85, 247, 0.45); }
.print-cam img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
/* Camera LED: a 5 mm through-hole LED soldered into the board (SVG in the Print page).
   Glows while pictures arrive and flashes once per new picture (print.js), amber when a picture
   is late, dark when they stopped. The colour is currentColor. */
.cam-status { display: flex; align-items: flex-end; gap: 10px; }
.led5 { flex: none; width: 22px; height: 35px; color: #6b5c86; overflow: visible; }
.led5--live { color: var(--up); }
.led5--late { color: var(--amber); }
.led5__glow { opacity: 0; }
.led5--live .led5__glow { opacity: 0.55; }
.led5--late .led5__glow { opacity: 0.4; }
.led5--flash .led5__glow { opacity: 1; }
.led5__dome { fill: currentColor; fill-opacity: 0.3; stroke: currentColor; stroke-opacity: 0.8; stroke-width: 0.6; }
.led5--live .led5__dome, .led5--late .led5__dome { fill-opacity: 0.85; }
.led5--flash .led5__dome { fill-opacity: 1; }
.led5__hot { opacity: 0; }
.led5--live .led5__hot, .led5--late .led5__hot { opacity: 0.45; }
.led5--flash .led5__hot { opacity: 1; }
.led5__rim { fill: currentColor; fill-opacity: 0.55; }
.led5__die { fill: #241a33; fill-opacity: 0.55; }
.led5__leg { fill: #cfc8dc; }
.led5__pad { fill: var(--gold); }
.led5__solder { fill: #e9e3f2; }
.led5__shine { fill: none; stroke: #fff; stroke-opacity: 0.6; stroke-width: 0.8; stroke-linecap: round; }
@media (max-width: 860px) { .print-media { grid-template-columns: 1fr; } }

/* ==========================================================================
   Motion — only when the visitor hasn't asked for reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.05s steps(1, end) infinite; }
  .status-led { animation: breathe-dot 3.4s ease-in-out infinite; }
  .live-badge__dot, .led--on { animation: breathe-dot 1.6s ease-in-out infinite; }
  .led5__glow, .led5__dome, .led5__hot { transition: opacity 0.4s ease, fill-opacity 0.4s ease; }
  .led5--flash .led5__glow, .led5--flash .led5__dome, .led5--flash .led5__hot { transition: none; }   /* on at once, fade out */

  .boot__sys { animation: fade-in 0.4s ease both; }
  .boot__log li { animation: reveal 0.01s steps(1, end) both; }
  .boot__log li:nth-child(1) { animation-delay: 0.4s; }
  .boot__log li:nth-child(2) { animation-delay: 0.7s; }
  .boot__log li:nth-child(3) { animation-delay: 1s; }
  .boot__log li:nth-child(4) { animation-delay: 1.3s; }
  .boot__log li:nth-child(5) { animation-delay: 1.6s; }
  .boot__log li:nth-child(6) { animation-delay: 1.9s; }
  .boot__logo { animation: power-on 0.85s ease-out 2.1s both; }
  .boot__status, .boot__bar { animation: fade-in 0.4s ease 2.4s both; }
  .boot__bar span { animation: load 1.8s cubic-bezier(.5,0,.5,1) 2.5s both; }
  .boot__skip { animation: fade-in 0.5s ease 1s both; }
  .boot { animation: boot-out 0.5s ease 4.4s both; }

  .t-flow { opacity: 1; filter: drop-shadow(0 0 6px var(--gold)); animation: flow 2.6s linear infinite; }
  .bgt .f { opacity: 0.75; animation: bg-flow 3.4s linear infinite; }
  .bgt .f:nth-of-type(3n) { animation-duration: 4.6s; animation-delay: -2s; }
  .bgt .f:nth-of-type(3n+1) { animation-duration: 2.8s; animation-delay: -1s; }
  .padglow { animation: pad-breathe 4.5s ease-in-out infinite; }
  .pad-ring { animation: ring-breathe 3.6s ease-in-out calc(var(--intro) + 0.8s) infinite; }

  .glitch__layer--a { animation: glitch-a 6s steps(1, end) calc(var(--intro) + 1.2s) infinite; }
  .glitch__layer--b { animation: glitch-b 6s steps(1, end) calc(var(--intro) + 1.2s) infinite; }
  .hero .glitch   { animation: power-on 0.95s ease-out var(--intro) both; }
  .hero .rule     { animation: fade-in 0.8s ease-out calc(var(--intro) + 0.55s) both; }
  .hero .tagline  { animation: fade-in 0.6s ease-out calc(var(--intro) + 0.7s) both; }
  .hero .hero__actions { animation: fade-up 0.8s ease-out calc(var(--intro) + 1.7s) both; }
  .clock          { animation: fade-in 1.3s ease calc(var(--intro) + 1.4s) both; }
  .hero .gb-corner { animation: fade-in 1.3s ease calc(var(--intro) + 1.8s) both; }

  .marquee__track { animation: marquee 34s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }

  .wave { animation: scope 3.4s linear infinite; }
}

/* Typing effect: only where the line fits on one row */
@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  .typed {
    display: inline-block;
    vertical-align: bottom;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2.5s steps(42, end) calc(var(--intro) + 1.1s) both;
  }
  .tagline { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .boot { display: none; }
  .t-flow { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes breathe-dot { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal { from { visibility: hidden; } to { visibility: visible; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }
@keyframes typing { from { width: 0; } to { width: calc(var(--chars) * 1ch); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes flow { to { stroke-dashoffset: -82; } }
@keyframes bg-flow { to { stroke-dashoffset: -92; } }
@keyframes pad-breathe { 0%, 100% { opacity: 0.18; transform: scale(0.95); } 50% { opacity: 0.5; transform: scale(1.3); } }
@keyframes scope { to { transform: translateX(-512px); } }
@keyframes ring-breathe { 0%, 100% { opacity: 0.2; transform: scale(0.9); } 50% { opacity: 0.6; transform: scale(1.04); } }
@keyframes power-on {
  0%   { opacity: 0; transform: scaleY(0.02) scaleX(1.2); filter: brightness(3); }
  60%  { opacity: 1; transform: scaleY(1.04) scaleX(1); filter: brightness(1.6); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes glitch-a {
  0%   { opacity: 0; }
  88%  { opacity: 0.85; clip-path: inset(12% 0 62% 0); transform: translateX(-4px); }
  90%  { clip-path: inset(58% 0 18% 0); transform: translateX(3px); }
  92%  { clip-path: inset(34% 0 44% 0); transform: translateX(-2px); }
  94%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes glitch-b {
  0%   { opacity: 0; }
  89%  { opacity: 0.65; clip-path: inset(70% 0 8% 0); transform: translateX(4px); }
  91%  { clip-path: inset(20% 0 60% 0); transform: translateX(-3px); }
  93%  { clip-path: inset(46% 0 30% 0); transform: translateX(2px); }
  95%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .traces { display: none; }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .menu--mobile { display: block; }
  .hdr-tools { margin-left: auto; }
  .gb { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; }
  .print, .sched, .mf-hero, .contact-grid { grid-template-columns: minmax(0, 1fr); }   /* (minmax: a long word wraps instead of widening the page) */
  .sched__time { text-align: left; }
  .sched__btns { justify-content: flex-start; }
}
@media (max-width: 640px) {
  :root { --cut: 12px; }
  .live-badge { margin-right: 0; padding: 4px 8px; letter-spacing: 0.16em; }
  .logo { font-size: 1.35rem; }
  .tool-btn { min-width: 36px; padding: 0 8px; }
  .status-led { display: none; }
  .bracket { width: 48px; height: 48px; }
  .bracket--tl, .bracket--tr { top: 16px; }
  .bracket--bl, .bracket--br { bottom: 16px; }
  .bracket--tl, .bracket--bl { left: 16px; }
  .bracket--tr, .bracket--br { right: 16px; }
  .hero { padding-bottom: 72px; }
  .clock { position: static; text-align: center; margin-top: 44px; }
  .hero { padding-top: 64px; }
  .clock__time { font-size: 1.8rem; }
  .tagline { text-align: center; }
  .eyebrow { letter-spacing: 0.24em; }
  .scope { height: 120px; }
}
@media (max-width: 480px) {
  .print__times { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow-wrap: anywhere; }   /* (large text: a long word wraps) */
  .print__times div:last-child { text-align: left; }
  .print__times b { font-size: 1.15rem; }
  .print__main, .print__side, .sched { padding: 22px 20px 28px; }
  .card { padding: 20px 20px 26px; }
  .card__img { margin: -20px -20px 4px; }
  .terminal { padding: 20px 20px 26px; font-size: 1rem; }
  .btn { padding: 12px 20px; }
}

/* ---------- Print ---------- */
@media print {
  html { background: #fff; }
  body::before, body::after, .bg, .boot, .site-header, .filters, .cursor, .marquee, .clock, .traces, .bracket, .scope, .gb-corner { display: none; }
  body, .card, .terminal { color: #000; background: #fff; }
}

/* Softer moving pulses on narrow screens (placed last so it wins over the motion rules) */
@media (prefers-reduced-motion: no-preference) and (max-width: 1499px) {
  .bgt .f { opacity: 0.55; }
}

/* ---------- Print tab: live view switch + click-to-load YouTube ---------- */
.live-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.live-modes { display: flex; gap: 8px; }
.live-modes .filter { padding: 6px 12px; font-size: 0.8rem; }
.yt-consent { margin-top: 14px; padding: 22px 22px 24px; background: #0f0719; border: 2px dashed rgba(168, 85, 247, 0.5); }
.yt-consent__title { font-family: var(--font-head); font-size: 1.3rem; color: var(--silk); }
.yt-consent .board__small { max-width: 60ch; }
.yt-consent__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.yt-consent__actions .btn { margin-top: 0; }
.yt-frame { margin-top: 14px; aspect-ratio: 16 / 9; background: #000; border: 2px solid rgba(168, 85, 247, 0.45); }
.yt-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Edge-cut PCB ----------
   Panels have their four corners milled off like the edge of a circuit board, with a lit line along
   each cut. The lines are the first four background layers; each panel's own fill (--fill) goes
   under them. Buttons and small controls are cut on two corners. Clipping also cuts off anything
   drawn outside the shape (focus rings, shadows), so focus rings on these are drawn just inside. */
.plate, .card, .terminal, .tool__figure, .stl, .print-cam, .yt-consent, .yt-frame, .badge-card, .scope, .term, .ez-panel, .menu__list {
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                     calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  --e: var(--edge) calc(var(--cut) * 0.7071 + 2px), var(--edge-glow) 0, transparent calc(var(--cut) * 0.7071 + 9px);
  background-image: linear-gradient(135deg, var(--e)), linear-gradient(225deg, var(--e)),
                    linear-gradient(315deg, var(--e)), linear-gradient(45deg, var(--e)), var(--fill, none);
  background-position: top left, top right, bottom right, bottom left, center;
  background-size: calc(var(--cut) * 2) calc(var(--cut) * 2), calc(var(--cut) * 2) calc(var(--cut) * 2),
                   calc(var(--cut) * 2) calc(var(--cut) * 2), calc(var(--cut) * 2) calc(var(--cut) * 2), 100% 100%;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.btn--ghost, .tool-btn, .filter, .live-badge, .menu--mobile summary, .chips a, .tag, .field input, .field textarea, .field select {
  --c: var(--cut-sm);
  --w: 1px;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  --e: rgba(168, 85, 247, 0.6) calc(var(--c) * 0.7071 + var(--w)), transparent 0;
  background-image: linear-gradient(135deg, var(--e)), linear-gradient(315deg, var(--e));
  background-position: top left, bottom right;
  background-size: calc(var(--c) * 2) calc(var(--c) * 2);
  background-repeat: no-repeat;
  background-origin: border-box;
}
/* Pictures, video and the 3D view cover their panel's background, so their lit edges go on top */
.tool__figure, .stl, .print-cam, .yt-frame { position: relative; }
.tool__figure::after, .stl::after, .print-cam::after, .yt-frame::after, .pl::after, .dl--printed::after, .potw__card::after {
  content: "";
  position: absolute;
  inset: -2px;                 /* over the 2px border, so the lines meet the cut */
  pointer-events: none;
  background-image: linear-gradient(135deg, var(--e)), linear-gradient(225deg, var(--e)),
                    linear-gradient(315deg, var(--e)), linear-gradient(45deg, var(--e));
  background-position: top left, top right, bottom right, bottom left;
  background-size: calc(var(--cut) * 2) calc(var(--cut) * 2);
  background-repeat: no-repeat;
}
.pl::after, .dl--printed::after { inset: -3px -2px -2px; }   /* cards have a 3px top border */
.menu__list { --cut: 10px; }
.badge-card { --edge: rgba(154, 139, 181, 0.35); --edge-glow: transparent; }
.badge-card.is-earned { --edge: var(--gold); }
.btn--ghost { --c: var(--cut-btn); --w: 2px; }
.live-badge { --e: rgba(255, 60, 56, 0.6) calc(var(--c) * 0.7071 + var(--w)), transparent 0; }
.btn:focus-visible, .tool-btn:focus-visible, .filter:focus-visible, .live-badge:focus-visible, .menu--mobile summary:focus-visible,
.chips a:focus-visible, .tag:focus-visible { outline-offset: -5px; }
.field input:focus, .field textarea:focus, .field select:focus { outline-offset: -2px; }
@media print {
  .plate, .card, .terminal { --fill: none; background-color: #fff; }
}

/* Small phones: tighter header, and below 350 px the LIVE badge is just its red dot */
@media (max-width: 400px) {
  .site-header__inner { column-gap: 10px; }
  .live-badge { padding: 5px 8px; letter-spacing: 0.12em; margin-right: 0; }
  .hdr-tools { gap: 6px; margin-left: 0; }
  .menu--mobile summary { padding: 8px 9px; letter-spacing: 0.08em; }
  .tool-btn { min-width: 36px; padding: 0 8px; }
}
@media (max-width: 350px) {
  .live-badge__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .live-badge { gap: 0; padding: 5px 7px; }
}

/* ---------- Tags: clickable keywords (/tags/) ---------- */
.card__tech li.has-tag { padding: 0; background: none; }
.tag {
  --c: 5px;
  display: block;
  padding: 4px 9px;
  background-color: rgba(109, 40, 217, 0.16);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--silk-dim);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tag:hover { background-color: rgba(109, 40, 217, 0.42); color: var(--silk); }
.tag[aria-current="true"] { background-color: var(--glow); color: var(--sub); }
.card--link .card__tech a { position: relative; z-index: 1; }   /* above the link that covers the card */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 30px; }
.tag--cloud { --c: 7px; display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 14px; font-size: 0.95rem; color: var(--silk); max-width: 100%; overflow-wrap: anywhere; }
.tag--mid { font-size: 1.1rem; }
.tag--big { font-size: 1.25rem; padding: 9px 16px; }
.tag__n { font-size: 0.75rem; color: var(--amber); }
.tag[aria-current="true"] .tag__n { color: var(--sub); }
/* search: the box on the Tags page, the ones in the menus, and the words found */
.site-search { margin-top: 26px; max-width: 720px; }
.site-search__label { display: block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silk-dim); }
.site-search__row { display: flex; flex-wrap: wrap; gap: 10px; }
.site-search input { flex: 1 1 14em; min-width: 0; padding: 10px 12px; border: 0; background: #0f0719; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5); color: var(--silk); font: inherit; }
.site-search input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.menu__search { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); }
.menu-search { display: flex; gap: 6px; }
.menu-search input { flex: 1 1 auto; width: 100%; min-width: 0; padding: 6px 8px; border: 0; background: #0f0719; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5); color: var(--silk); font: inherit; font-size: 0.9rem; }
.menu-search input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.menu-search__go { flex: none; padding: 6px 10px; border: 1px solid var(--line-strong); background: rgba(109, 40, 217, 0.3); color: var(--silk); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.1em; cursor: pointer; }
.menu-search__go:hover, .menu-search__go:focus-visible { background: var(--glow); color: var(--sub); }
mark.hit { padding: 0 2px; background: rgba(212, 165, 74, 0.35); color: var(--silk); }
.tag-status { margin-top: 30px; }
.tag-status:focus { outline: none; }
.tag-results { padding-bottom: 100px; }
.tag-group { margin-top: 30px; }
.tag-grid { padding-block: 16px 0; }
.log__project a { color: inherit; text-underline-offset: 3px; }
a.tool__type { text-underline-offset: 4px; }
.tool__tags { margin-top: 24px; }
.is-target { --edge: var(--amber); border-color: var(--amber) !important; }

/* ---------- Build logs: Updates | Print log ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; border-bottom: 2px solid var(--line-strong); }
.tab {
  padding: 12px 22px 10px;
  border: 0;
  background: rgba(109, 40, 217, 0.14);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silk-dim);
  cursor: pointer;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
}
.tab:hover { color: var(--silk); background: rgba(109, 40, 217, 0.3); }
.tab[aria-selected="true"] { background: var(--glow); color: var(--sub); }
.tab:focus-visible { outline-offset: -5px; }
.tabpanel .logs { padding-top: 26px; }

.pl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 14px; margin: 26px 0 0; max-width: 860px; }
.pl-stat { --cut: 12px; padding: 14px 18px 16px; }
.pl-stat__label { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silk-dim); }
.pl-stat__value { margin: 4px 0 0; font-family: var(--font-pixel); font-size: 2.6rem; line-height: 1; color: var(--amber); text-shadow: 0 0 14px rgba(255, 159, 28, 0.4); white-space: nowrap; }
.pl-stat__value--long { font-size: 1.9rem; line-height: 1.37; }
/* "Follow with a feed reader": the usual feed sign (a dot and two arcs) before it */
.feed-link { font-family: var(--font-mono); font-size: 0.9em; color: var(--glow); text-underline-offset: 3px; }
.feed-link::before { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.4em; vertical-align: -0.05em;
  background: radial-gradient(circle at 0 100%, var(--amber) 0 18%, transparent 19% 38%, var(--amber) 39% 53%, transparent 54% 68%, var(--amber) 69% 84%, transparent 85%); }

/* charts: boxes as bars, their heights a share of the tallest month */
.pl-charts { margin: 22px 0 0; max-width: 1100px; }
.pl-charts__open { width: fit-content; cursor: pointer; font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.12em; color: var(--glow); }
.pl-charts__open:hover { color: var(--silk); }
.pl-charts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 14px; }
.pl-chart { --cut: 12px; display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; padding: 16px 18px 18px; }
.pl-chart__title { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silk-dim); }
.pl-chart__sum { margin: 0; font-size: 0.95rem; color: var(--silk); }
.pl-bars { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 10em; padding-top: 1.5em; }
.pl-bars__max { position: absolute; top: 0; left: 0; font-family: var(--font-mono); font-size: 0.75rem; color: var(--silk-dim); white-space: nowrap; }
.pl-bar { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; }
.pl-bar__stack { display: flex; flex-direction: column-reverse; min-height: 0; border-bottom: 1px solid var(--line-strong); }
.pl-bar__part { display: block; flex: none; height: var(--h); min-height: 2px; }
.pl-bar__part--ok { background: var(--gold); }
.pl-bar__part--fail { background: var(--red); }
.pl-bar__part--fil { background: var(--amber); }
.pl-bar__part--time { background: var(--glow); }
.pl-bar:hover .pl-bar__part { filter: brightness(1.25); }
.pl-bar__label { padding-top: 4px; overflow: hidden; font-family: var(--font-mono); font-size: 0.68rem; text-align: center; white-space: nowrap; color: var(--silk-dim); }
@media (max-width: 560px) { .pl-bar:nth-child(even) .pl-bar__label { visibility: hidden; } }
.pl-chart__key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-family: var(--font-mono); font-size: 0.8rem; color: var(--silk-dim); }
.pl-key::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--gold); }
.pl-key--fail::before { background: var(--red); }
.pl-mats { display: grid; gap: 10px; }
.pl-mat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-family: var(--font-mono); font-size: 0.9rem; }
.pl-mat__name { overflow-wrap: anywhere; color: var(--silk); }
.pl-mat__g { color: var(--silk-dim); text-align: right; }
.pl-mat__bar { grid-column: 1 / -1; grid-row: 2; height: 10px; background: rgba(168, 85, 247, 0.15); }
.pl-mat__fill { display: block; width: var(--w); height: 100%; background: var(--gold); }
/* the print calendar: 53 weeks of days, Monday on top */
.pl-chart--wide { grid-column: 1 / -1; }
.pl-cal { overflow-x: auto; padding-bottom: 6px; }
.pl-cal__months, .pl-cal__grid { display: grid; grid-template-columns: repeat(53, minmax(9px, 1fr)); gap: 3px; min-width: 600px; }
.pl-cal__months { margin-bottom: 4px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--silk-dim); }
.pl-cal__months span { white-space: nowrap; overflow: hidden; }
.pl-cal__grid { grid-template-rows: repeat(7, auto); grid-auto-flow: column; }
.pl-cal__d { display: block; aspect-ratio: 1; background: rgba(168, 85, 247, 0.13); }
.pl-cal__d--1 { background: rgba(212, 165, 74, 0.35); }
.pl-cal__d--2 { background: rgba(212, 165, 74, 0.6); }
.pl-cal__d--3 { background: var(--gold); }
.pl-cal__d--4 { background: var(--gold-hi); box-shadow: 0 0 6px rgba(255, 216, 138, 0.6); }
.pl-cal__key { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pl-cal__key .pl-cal__d { width: 11px; }
.pl-status { margin-top: 18px; }
.pl-status:empty { display: none; }
.pl-grid { padding-block: 22px 30px; }
.pl { gap: 12px; }
.pl--failed { --accent: var(--red); }
.pl__pics { position: relative; margin: -24px -26px 4px; aspect-ratio: 16 / 9; background: #0f0719; border-bottom: 1px solid var(--line); overflow: hidden; }
.pl__main { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pl__main img { width: 100%; height: 100%; object-fit: cover; }
.pl__main--plate img { object-fit: contain; }
.pl__main:focus-visible { outline-offset: -5px; }
.pl__plate { position: absolute; right: 10px; bottom: 10px; width: 28%; height: auto; aspect-ratio: 1; object-fit: contain; background: rgba(15, 7, 25, 0.85); border: 1px solid var(--line-strong); pointer-events: none; }
/* the timelapse: a button on the picture, then the video in its place */
.pl__tl { position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-hi); background: rgba(15, 7, 25, 0.88); border: 1px solid var(--gold); cursor: pointer; }
.pl__tl:hover { color: var(--silk); border-color: var(--gold-hi); }
.pl__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.dl__pic { position: relative; }
.pl__nopic { display: grid; place-items: center; height: 100%; padding: 0 20px; text-align: center; font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.1em; color: var(--silk-dim);
  background: repeating-linear-gradient(45deg, rgba(168, 85, 247, 0.07) 0 10px, transparent 10px 20px); }
.pl__name { font-size: 1.25rem; overflow-wrap: anywhere; }
.pl__credit { margin: -6px 0 0; font-size: 0.9rem; color: var(--silk-dim); overflow-wrap: anywhere; }
.pl__credit b { font-weight: 600; color: var(--silk); }
.pl__credit a { color: var(--gold-hi); text-underline-offset: 3px; }
.pl__lic { display: block; width: fit-content; margin-top: 6px; padding: 1px 7px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--silk-dim); border: 1px solid var(--line-strong); vertical-align: 1px; }
.pl__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-family: var(--font-mono); }
.pl__facts dt { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--silk-dim); }
.pl__facts dd { margin: 2px 0 0; color: var(--silk); }
.pl__fil { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--silk); }
.pl__fil li { display: inline-flex; align-items: center; gap: 7px; }
.pl__g { color: var(--silk-dim); }
.swatch--none { background: transparent; border-style: dashed; }
.pl__note { padding-left: 12px; border-left: 2px solid var(--amber); color: var(--silk); overflow-wrap: anywhere; }
.pl__spaghetti { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.06em; color: var(--glow); text-underline-offset: 3px; }
.pl .card__links { align-items: center; margin-top: auto; }
.pl .view3d { margin-left: 0; }
.pl .stl { margin-top: 0; }
.badge--fail { color: #ff8f8c; }
.pl__badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pl__badges .badge, .dl--printed .badge { white-space: nowrap; }
.pl-more { margin: 0 0 100px; text-align: center; }
.gba-print.is-hidden { opacity: 0.7; }
.gba-print .field textarea { min-height: 0; }

/* ---------- Control panel (/admin/) ---------- */
.adm { padding-block: 10px 100px; }
.adm > .form-status { margin: 0 0 14px; }
.form-status.is-bad { color: #ff8f8c; }
.adm-h { margin-bottom: 4px; }
.adm-h:focus { outline: none; }
.adm-h:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.adm-sub { font-family: var(--font-head); font-size: 1.25rem; color: var(--silk); }
.adm-auth { max-width: 560px; padding: 26px 28px 30px; }
.adm-auth .btn--solid { margin-top: 22px; }
.adm-link { display: block; margin-top: 14px; padding: 8px 14px; font-size: 0.95rem; letter-spacing: 0.06em; }
.adm-warn { color: var(--amber); }
.adm-field > label, .adm-group > legend {
  display: block; margin-bottom: 6px; padding: 0;
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silk-dim);
}
.adm-err { color: #ff8f8c !important; }
.adm-field input[type="color"] { width: 64px; height: 40px; margin-top: 8px; padding: 2px; }
.adm-check, .adm-ref { display: block; }
.adm-check label, .adm-ref { display: flex; gap: 10px; align-items: flex-start; color: var(--silk); cursor: pointer; }
.adm-check input, .adm-ref input {
  flex: none; width: 1.2em; height: 1.2em; margin: 0.15em 0 0; padding: 0;
  clip-path: none; background: none; box-shadow: none; accent-color: var(--glow);
}
.adm-check input:focus-visible, .adm-ref input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.adm-group { margin: 18px 0 0; padding: 14px 16px 16px; border: 1px solid var(--line); min-width: 0; }
.adm-refs { display: grid; gap: 8px; margin-top: 8px; }
.adm-ref.is-gone { color: var(--amber); }
.adm-rows { display: grid; gap: 14px; margin: 10px 0 14px; }
.adm-row { padding: 12px 14px 14px; border-left: 2px solid var(--line-strong); background: rgba(15, 7, 25, 0.5); }
.adm-row__title { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.adm-row__bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.adm-mini { padding: 7px 12px; font-size: 0.9rem; letter-spacing: 0.06em; }
.adm-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.adm-mini[disabled], .adm .btn[disabled] { opacity: 0.45; cursor: default; transform: none; }
.adm-thumb { display: block; max-width: 160px; max-height: 120px; margin-top: 8px; border: 1px solid var(--line-strong); background: #0f0719; object-fit: contain; }
.adm-long { min-height: 280px !important; }

/* signed in: the top bar, then the sections on the left and the open one on the right */
.adm-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; padding: 14px 20px; }
.adm-who { font-family: var(--font-mono); color: var(--silk-dim); letter-spacing: 0.06em; overflow-wrap: anywhere; }
.adm-pub { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-left: auto; }
.adm-pill { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.08em; color: var(--up); }
.adm-pill.is-changed { color: var(--amber); }
.adm-wrap { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 22px; }
.adm-wrap > * { min-width: 0; }
.adm-nav ul { display: grid; gap: 4px; }
.adm-nav a {
  display: block; padding: 9px 12px; border-left: 2px solid transparent;
  font-family: var(--font-mono); letter-spacing: 0.06em; color: var(--silk-dim); text-decoration: none;
}
.adm-nav a:hover { color: var(--silk); border-left-color: var(--line-strong); }
.adm-nav a[aria-current="page"] { color: var(--gold-hi); border-left-color: var(--gold); background: rgba(212, 165, 74, 0.08); }
.adm-nav a:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.adm-view > .btn { margin-top: 18px; }
.adm-back { display: inline-block; margin-top: 10px; color: var(--glow); text-underline-offset: 3px; }
.adm-form { margin-top: 16px; padding: 10px 24px 26px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.adm-problems { margin-top: 14px; padding-left: 1.2em; list-style: disc; color: #ff8f8c; }
.adm-problems li + li { margin-top: 4px; }
.adm-publish { margin-top: 18px; padding: 20px 24px 24px; }
/* suggested text: the notice on the overview and the page to look it over */
.adm-suggest-note { margin-top: 18px; padding: 20px 24px 24px; border-left: 3px solid var(--amber); }
.adm-suggest-note > .btn { margin-top: 16px; }
.adm-suggest { display: grid; gap: 14px; margin-top: 18px; }
.adm-suggest__item { min-width: 0; margin: 0; padding: 14px 20px 18px; border: 0; }
.adm-suggest__head { padding: 0; font-family: var(--font-mono); font-size: 0.95rem; color: var(--silk); }
.adm-suggest__head label { display: flex; gap: 10px; align-items: baseline; cursor: pointer; overflow-wrap: anywhere; }
.adm-suggest__field { margin-top: 12px; }
.adm-suggest__label { margin: 0 0 4px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silk-dim); }
.adm-suggest__now, .adm-suggest__new { margin: 4px 0 0; padding: 8px 12px; white-space: pre-line; overflow-wrap: anywhere; }
.adm-suggest__now { color: var(--silk-dim); background: rgba(255, 60, 56, 0.08); text-decoration: line-through; text-decoration-color: rgba(255, 143, 140, 0.6); }
.adm-suggest__new { color: var(--silk); background: rgba(126, 224, 168, 0.08); }
.adm-suggest__tag { display: inline-block; margin-right: 10px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--amber); }
.adm-publish > .btn { margin-top: 18px; }
.adm-counts, .adm-items { display: grid; gap: 10px; margin-top: 18px; }
.adm-counts li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 14px 20px; }
.adm-counts a { color: var(--silk); font-family: var(--font-head); font-size: 1.1rem; text-underline-offset: 3px; }
.adm-count { font-family: var(--font-mono); color: var(--silk-dim); }
.adm-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 20px; }
.adm-item > * { grid-column: 1; min-width: 0; }
.adm-item__title { font-family: var(--font-head); font-size: 1.1rem; color: var(--silk); overflow-wrap: anywhere; }
a.adm-item__title { text-underline-offset: 3px; }
.adm-item__meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--silk-dim); }
.adm-item__note { color: var(--silk); white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-item__moves { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.adm-item.is-hidden { opacity: 0.72; }
.adm-item.is-live { border-color: var(--gold); }
.adm-item .adm-thumb { margin: 0 0 4px; }
.adm-print .field { margin-top: 8px; }
.adm-undo { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 16px; padding: 12px 20px; color: var(--silk); }
.adm-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.adm-toggle [aria-pressed="true"] { background-color: var(--glow); color: var(--sub); }
.adm-sec { margin-top: 18px; padding: 20px 24px 24px; }
.adm-sec > .btn, .adm-2fa > .btn { margin-top: 16px; }
.adm-inline { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.adm-inline .field { flex: 1 1 240px; min-width: 0; }
.adm-inline > .btn { margin-top: 12px; }
.adm-stack { display: block; }
.adm-stack > .btn { margin-top: 20px; }
.adm-steps { margin: 14px 0 0; padding-left: 1.3em; list-style: decimal; color: var(--silk); }
.adm-steps li + li { margin-top: 6px; }
.adm-qr { display: block; width: min(240px, 100%); height: auto; margin-top: 16px; image-rendering: pixelated; }
.adm-key { margin-top: 10px; font-family: var(--font-mono); color: var(--silk-dim); overflow-wrap: anywhere; }
.adm-key code { color: var(--gold-hi); letter-spacing: 0.08em; }
.adm-codecheck { flex-basis: 100%; margin-top: 4px; color: var(--silk); }
.adm-codecheck:empty { display: none; }
.adm-codecheck.is-ok { color: var(--up); }
.adm-codecheck.is-bad { color: var(--amber); }
.adm-log { display: grid; gap: 6px; margin-top: 14px; font-size: 0.95rem; }
.adm-log li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; gap: 4px 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.adm-log__when, .adm-log__who { font-family: var(--font-mono); color: var(--silk-dim); font-size: 0.85rem; }
.adm-log__what { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .adm-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .adm-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .adm-nav a { padding: 7px 10px; border-left: 0; border-bottom: 2px solid transparent; }
  .adm-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
  .adm-pub { margin-left: 0; }
  .adm-form, .adm-publish, .adm-sec, .adm-auth { padding-inline: 16px; }
  .adm-item { grid-template-columns: minmax(0, 1fr); padding-inline: 16px; }
  .adm-item__moves { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .adm-log li { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Gliding between pages (js/boot.js) ----------
   Going to another page, the view goes up off the page until all of it is in sight, over the board along
   the trace to the next page and down into it. The header goes with its page; the board is a canvas that
   only exists during the glide. */
@view-transition { navigation: auto; }
.glide-board { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: -2; pointer-events: none; view-transition-name: glide-board; }
/* the board always fills exactly the box the pages' pictures are in, wherever the browser would have put
   the canvas (phones put that box partly under the address bar, each in their own way) */
::view-transition-group(glide-board) { z-index: 0; animation: none; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; transform: none !important; }
::view-transition-new(glide-board) { animation: none; width: 100%; height: 100%; object-fit: fill; }
::view-transition-group(root) { z-index: 1; animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; transform-origin: 0 0; }
/* while the glide runs, the page's own looping animations wait: less for a phone to redraw every frame */
.gliding .t-flow, .gliding .bgt .f, .gliding .padglow, .gliding .pad-ring, .gliding .glitch__layer--a, .gliding .glitch__layer--b,
.gliding .marquee__track, .gliding .wave, .gliding .cursor, .gliding .status-led, .gliding .live-badge__dot, .gliding .led--on, .gliding .bot * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* The traces strip at the top of every page but home (tools/build-pages.py): a thick gold trace back
   towards home and thin ones out to the pages next to it on the board. Same parts as the home page's. */
main.has-ptraces { position: relative; }
.ptraces { position: absolute; top: 0; left: 50%; width: 100vw; margin-left: -50vw; height: clamp(44px, 7vw, 84px); pointer-events: none; z-index: 1; }
.ptraces__side { position: absolute; top: 0; height: 100%; width: auto; aspect-ratio: 480 / 84; max-width: 42vw; overflow: visible; }
.ptraces__side--left { left: 0; }
.ptraces__side--right { right: 0; }
.pt-gold .pad-label { font-size: 18px; }
.pt-small .t-base { stroke-width: 2; opacity: 0.38; }
.pt-small .t-flow { stroke-width: 2; stroke-dasharray: 5 36; }   /* 41 a gap, like .t-flow: the flow animation moves exactly two, so its loop doesn't jump */
.pt-small .pad { opacity: 0.75; }
.pt-small .pad-label { font-size: 14px; letter-spacing: 2px; }
/* the trace you came in on */
.pad-link.is-from .t-base { stroke: var(--gold-hi); opacity: 1; }
.pad-link.is-from .pad { fill: var(--gold-hi); opacity: 1; }
.pad-link.is-from .pad-label { opacity: 1; fill: var(--gold-hi); }
main:has(#workbench-back:not([hidden])) .ptraces { display: none; }   /* a tool's own page has its back link there */
@media (max-width: 1100px) { .ptraces { display: none; } }
@media print { .ptraces { display: none; } }
/* Maker Forge tab: what's new, newest first */
.mf-news { display: grid; gap: 12px; margin-top: 24px; max-width: 900px; }
.mf-news li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 16px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mf-news__v { font-family: var(--font-mono); color: var(--gold); letter-spacing: 0.08em; }
.mf-news p { color: var(--silk-dim); }
.mf-news strong { color: var(--silk); font-weight: 600; }
@media (max-width: 560px) { .mf-news li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* Build logs: entries that wrote themselves (api/auto-log), slimmer than the written ones */
.badge--auto { color: var(--glow); }
.badge--live { color: var(--up); }
.log--auto { padding: 16px 30px 14px; --fill: linear-gradient(160deg, rgba(30, 15, 51, 0.7), rgba(19, 9, 34, 0.6)); border-style: dashed; }
.log--auto .log__title { margin: 6px 0 0; font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
.log--auto .log__title a { padding-block: 3px; }   /* at least 24 px to tap on a phone */
#logs-kinds:not([hidden]) + #logs-filters:not([hidden]) { margin-top: 10px; }
/* Preview of unpublished changes (only the owner sees it) */
.preview-bar { position: fixed; left: 16px; right: 16px; bottom: 14px; width: fit-content; margin-inline: auto; z-index: 150; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  max-width: calc(100vw - 32px); padding: 10px 18px; font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.04em;
  color: var(--sub); background: var(--amber); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.preview-bar a { color: var(--sub); font-weight: 700; text-underline-offset: 3px; }
.preview-bar a:focus-visible { outline: 2px solid var(--sub); outline-offset: 2px; }
/* ---- Seasonal decorations (js/seasons.js): never in the way of a click, still with reduced motion or calm mode ---- */
.season-garland, .season-sky, .season-hero, .season-scene { pointer-events: none; }
.season-garland { position: absolute; left: 0; top: 100%; overflow: visible; }
.sp-blood { fill: #9b0712; }
.sp-blood__shine { fill: rgba(255, 140, 140, 0.45); }
.sp-drop { fill: #9b0712; opacity: 0; }
.sp-wire { fill: none; stroke: #1e3a1e; stroke-width: 2; }
.sp-bulb__cap { fill: #3a3a2c; }
.sp-bulb__halo { opacity: 0.35; }
.sp-bulb--r .sp-bulb__glass, .sp-bulb--r .sp-bulb__halo, .sp-ball--r { fill: #ff4d4a; }
.sp-bulb--g .sp-bulb__glass, .sp-bulb--g .sp-bulb__halo, .sp-ball--g { fill: #59e08f; }
.sp-bulb--y .sp-bulb__glass, .sp-bulb--y .sp-bulb__halo, .sp-ball--y { fill: #ffd88a; }
.sp-bulb--b .sp-bulb__glass, .sp-bulb--b .sp-bulb__halo, .sp-ball--b { fill: #6cb6ff; }
.season-sky { position: fixed; inset: 0; z-index: 70; overflow: hidden; }
.sp-bat { position: absolute; left: 0; top: var(--fy); width: 58px; height: 28px; fill: #0d0712; transform: translateX(-12vw);
  filter: drop-shadow(0 0 2px rgba(255, 138, 31, 0.9)) drop-shadow(0 0 8px rgba(255, 138, 31, 0.35)); }
.sp-bat--b { width: 42px; height: 20px; }
.sp-bat--c { width: 32px; height: 15px; }
.sp-flake { position: absolute; top: -12px; left: var(--x); width: var(--sz); height: var(--sz); border-radius: 50%; background: #fff; opacity: var(--o); }
.season-hero { position: absolute; top: 0; z-index: 0; }
.season-hero--web { right: 0; width: clamp(120px, 16vw, 200px); height: auto; aspect-ratio: 200 / 260; overflow: visible; }
.season-hero--baubles { left: 0; width: 100%; height: clamp(90px, 15vw, 180px); }
.sp-web { fill: none; stroke: rgba(220, 210, 235, 0.38); stroke-width: 1; }
.sp-thread { stroke: rgba(220, 210, 235, 0.55); stroke-width: 1; }
.sp-spider__legs { fill: none; stroke: #120a18; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-spider__body { fill: #120a18; }
.sp-spider { filter: drop-shadow(0 0 2px rgba(255, 138, 31, 0.8)); }
.sp-spider__eye { fill: #ff2a2a; }
.sp-bauble__cap { fill: #c9a34a; }
.sp-bauble__shine { fill: none; stroke: rgba(255, 255, 255, 0.6); stroke-width: 2.5; stroke-linecap: round; }
.season-scene { display: block; width: 100%; height: clamp(90px, 13vw, 160px); margin-top: 40px; }
.sp-moon { fill: #f4ecd2; opacity: 0.85; }
.sp-fence { fill: #2a1d3c; }
.sp-deadtree { fill: none; stroke: #2e2142; stroke-width: 5; stroke-linecap: round; }
.sp-ground { fill: #120a1c; }
.sp-stone { fill: #3b3150; stroke: #5a4c74; stroke-width: 1.5; }
.sp-stone__text { fill: #a597c2; font-family: var(--font-mono); font-size: 8px; font-weight: 700; letter-spacing: 0.06em; }
.sp-cross { fill: none; stroke: #4a3e60; stroke-width: 6; stroke-linecap: square; }
.sp-pumpkin__side { fill: #c4520e; }
.sp-pumpkin__body { fill: #ef7a1a; }
.sp-pumpkin__stem { fill: #3e6b2a; }
.sp-face { fill: #3a1606; }
.sp-lit .sp-face { fill: #ffd36b; }
.sp-eyes { fill: #ffe36b; }
.sp-snowfield { fill: #e9f0fb; }
.sp-snowfield--back { fill: #c8d6ee; }
.sp-tree__layer { fill: #1f7a3a; }
.sp-tree__trunk { fill: #5a3a22; }
.sp-star { fill: #ffd88a; }
.sp-gift__box { fill: #d23a3a; }
.sp-gift--green .sp-gift__box { fill: #2f9d55; }
.sp-gift--purple .sp-gift__box { fill: #8b5cf6; }
.sp-gift--gold .sp-gift__box { fill: #d4a54a; }
.sp-gift__lid { filter: brightness(1.12); }
.sp-gift__ribbon { fill: #ffd88a; }
.sp-gift--gold .sp-gift__ribbon, .sp-gift--green .sp-gift__ribbon { fill: #ff4d4a; }
.sp-snow { fill: #f4f8ff; stroke: #c8d6ee; stroke-width: 1; }
.sp-scarf { fill: #ff4d4a; }
.sp-hat, .sp-coal { fill: #1a1424; }
.sp-carrot { fill: #ff8a1f; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.ez-calm) .sp-drop { animation: sp-drop var(--dd) ease-in var(--dl) infinite; }
  :root:not(.ez-calm) .sp-bulb { animation: sp-twinkle 3s steps(1, end) var(--tw) infinite; }
  :root:not(.ez-calm) .sp-tree .sp-ball--r, :root:not(.ez-calm) .sp-tree .sp-ball--g, :root:not(.ez-calm) .sp-tree .sp-ball--y,
  :root:not(.ez-calm) .sp-tree .sp-ball--b { animation: sp-twinkle 2.4s steps(1, end) var(--tw) infinite; }
  :root:not(.ez-calm) .sp-star { animation: sp-glow 2.2s ease-in-out infinite alternate; }
  :root:not(.ez-calm) .sp-lit .sp-face { animation: sp-flicker 1.7s steps(5, end) infinite; }
  :root:not(.ez-calm) .sp-eyes { animation: sp-blink 6s steps(1, end) var(--bl) infinite; }
  :root:not(.ez-calm) .sp-bat { animation: sp-fly var(--fd) linear var(--fl) infinite; }
  :root:not(.ez-calm) .sp-bat__wings { transform-origin: 50% 40%; animation: sp-flap 0.28s ease-in-out infinite alternate; }
  :root:not(.ez-calm) .sp-flake { animation: sp-fall var(--fd) linear var(--fl) infinite; }
  :root:not(.ez-calm) .sp-spider { animation: sp-bob 5s ease-in-out infinite alternate; }
  :root:not(.ez-calm) .sp-bauble { transform-box: fill-box; transform-origin: 50% 0; animation: sp-swing 4s ease-in-out var(--sw) infinite alternate; }
}
@keyframes sp-drop { 0%, 55% { opacity: 0; transform: translateY(0); } 60% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(70px); } }
@keyframes sp-twinkle { 0% { opacity: 1; } 70% { opacity: 0.35; } }
@keyframes sp-glow { from { opacity: 0.7; } to { opacity: 1; } }
@keyframes sp-flicker { 0% { opacity: 1; } 20% { opacity: 0.75; } 40% { opacity: 0.95; } 60% { opacity: 0.7; } 80% { opacity: 1; } }
@keyframes sp-blink { 0%, 100% { opacity: 1; } 47% { opacity: 0; } 49% { opacity: 1; } 51% { opacity: 0; } 53% { opacity: 1; } }
@keyframes sp-fly { 0% { transform: translate(-12vw, 0); } 10% { transform: translate(18vw, -4vh); } 20% { transform: translate(48vw, 3vh); }
  30% { transform: translate(78vw, -3vh); } 40%, 100% { transform: translate(112vw, 0); } }
@keyframes sp-flap { from { transform: scaleY(1); } to { transform: scaleY(0.35); } }
@keyframes sp-fall { from { transform: translate(0, -2vh); } to { transform: translate(var(--dx), 104vh); } }
@keyframes sp-bob { from { transform: translateY(0); } to { transform: translateY(46px); } }
@keyframes sp-swing { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.ez-contrast .season-sky, .ez-contrast .season-garland, .ez-contrast .season-hero { display: none; }
@media print { .season-sky, .season-garland, .season-hero, .season-scene { display: none !important; } }
/* the seasons' preview (?season=…): the same bar, above Lights out so it can always be ended */
.season-preview { z-index: 260; }
.season-preview__end { padding: 2px 0; border: 0; background: none; color: var(--sub); font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.season-preview__end:focus-visible { outline: 2px solid var(--sub); outline-offset: 2px; }
/* Control panel, round two: a compact title once signed in, preview, pictures, the phone's menu */
.adm-in .page-head { padding-top: 22px; padding-bottom: 14px; }
.adm-in .page-head .eyebrow, .adm-in .page-intro { display: none; }
.adm-in .page-title { margin-top: 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.adm-pv { display: inline-flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.adm-pv__btn[aria-pressed="true"] { background-color: var(--amber); color: var(--sub); box-shadow: none; }
.adm-pv__open { font-family: var(--font-mono); font-size: 0.9rem; color: var(--amber); text-underline-offset: 3px; }
.adm-onsite { display: inline-block; margin: 10px 0 0 18px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--gold-hi); text-underline-offset: 3px; }
.adm-imgtools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.adm-picker { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 4px; padding: 10px; border: 1px solid var(--line); max-height: 320px; overflow: auto; }
.adm-picker__item { padding: 0; border: 2px solid transparent; background: #0f0719; cursor: pointer; aspect-ratio: 4 / 3; }
.adm-picker__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-picker__item:hover, .adm-picker__item:focus-visible { border-color: var(--amber); outline: none; }
.adm-pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 18px; }
.adm-picture { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.adm-picture__img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #0f0719; border: 1px solid var(--line); }
.adm-picture .adm-item__title { font-size: 0.95rem; }
.adm-picture__bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.adm-item.has-thumb { grid-template-columns: 64px minmax(0, 1fr) auto; }
.adm-item.has-thumb > * { grid-column: 2; }
.adm-item.has-thumb > .adm-item__thumb { grid-column: 1; grid-row: 1 / span 3; }
.adm-item.has-thumb > .adm-item__moves { grid-column: 3; }
.adm-item__thumb { width: 64px; height: 48px; object-fit: cover; border: 1px solid var(--line); background: #0f0719; }
.adm-jump { display: none; }
@media (max-width: 760px) {
  .adm-nav ul { display: none; }
  .adm-jump { display: block; width: 100%; padding: 10px 12px; border: 0; background: #0f0719; color: var(--silk); font: inherit; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5); }
  .adm-jump:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
  .adm-item.has-thumb { grid-template-columns: 56px minmax(0, 1fr); }
  .adm-item.has-thumb > .adm-item__moves { grid-column: 2; }
  .adm-item__thumb { width: 56px; height: 42px; }
}

/* ==========================================================================
   The printer is away: "the printer has been kidnapped" and the chase game (site/js/kidnap.js)
   ========================================================================== */
.away { padding: clamp(18px, 3vw, 32px); margin-bottom: 28px; }
.away__news { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--amber); }
.away__title { margin: 0 0 12px; font-family: var(--font-head); font-size: clamp(1.5rem, 4.4vw, 2.5rem); line-height: 1.15; text-transform: uppercase; letter-spacing: 0.02em; color: var(--silk); }
.away__title em { font-style: normal; color: var(--gold-hi); }
.away__lead, .away__plain { max-width: 70ch; margin: 0 0 10px; }
.away__plain { color: var(--silk-dim); }
.away__note { max-width: 70ch; margin: 6px 0 14px; padding: 10px 14px; border-left: 3px solid var(--gold); background: rgba(212, 165, 74, 0.08); font-family: var(--font-mono); }
.away__game { margin: 18px 0 12px; border: 1px solid rgba(212, 165, 74, 0.45); border-radius: 10px; overflow: hidden; background: var(--sub); }
.away__canvas { display: block; width: 100%; height: 240px; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.away__canvas:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: -3px; }
.away__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.away__how { flex: 1 1 260px; margin: 0; }

/* ==========================================================================
   Control panel: "Edit on the page" (admin.js pageView). The page in a frame beside the editor.
   ========================================================================== */
.adm-vis { margin-top: 14px; }
.adm-vis__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.adm-vis__pick { min-width: 12rem; padding: 8px 10px; border: 0; background: #0f0719; color: var(--silk); font: inherit; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5); }
.adm-vis__width { display: inline-flex; gap: 4px; }
.adm-vis__width [aria-pressed="true"] { color: var(--gold-hi); border-color: var(--gold); }
.adm-vis__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: 16px; align-items: start; }
.adm-vis__stage { min-width: 0; border: 1px solid var(--line-strong); background: var(--sub); }
.adm-vis__stage.is-phone { width: min(100%, 392px); margin: 0 auto; }
.adm-vis__frame { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: var(--sub); }
.adm-vis__side { padding: 14px 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.adm-vis__h { margin: 0 0 6px; font-family: var(--font-head); font-size: 1.15rem; color: var(--silk); }
.adm-vis__group { margin: 14px 0 4px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.adm-vis__list { display: grid; gap: 2px; margin: 0 0 8px; }
.adm-vis__item { display: block; width: 100%; text-align: left; padding: 6px 8px; background: none; border: 0; border-left: 2px solid transparent; color: var(--silk-dim); font: inherit; cursor: pointer; }
.adm-vis__item:hover, .adm-vis__item:focus-visible { color: var(--silk); border-left-color: var(--gold); background: rgba(212, 165, 74, 0.08); }
.adm-vis__side .adm-form { position: relative; z-index: 1; margin-top: 12px; padding: 4px 0 0; border: 0; background: none; box-shadow: none; clip-path: none; }
@media (max-width: 1000px) {
  .adm-vis__main { grid-template-columns: minmax(0, 1fr); }
  .adm-vis__side { position: static; max-height: none; }
  .adm-vis__frame { height: 70vh; }
}

/* On the page itself, inside that frame (html.r0-editing): what can be edited, what's selected, its tools */
.r0-editing [data-edit] { cursor: pointer; outline: 1px dashed rgba(255, 216, 138, 0.5); outline-offset: 3px; -webkit-user-select: none; user-select: none; }
.r0-editing [data-edit] img, .r0-editing [data-edit] a { -webkit-user-drag: none; }
.r0-editing [data-edit]:hover { outline: 2px solid rgba(255, 216, 138, 0.85); }
.r0-editing [data-edit]:focus-visible, .r0-editing [data-edit].r0-sel { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.r0-editing [data-edit].r0-dragging { opacity: 0.55; cursor: grabbing; }
.r0-tools { position: absolute; z-index: 300; display: flex; gap: 4px; padding: 4px; background: #1a0c2c; border: 2px solid var(--gold); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); }
.r0-tools[hidden] { display: none; }
.r0-tools button { min-width: 40px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line-strong); background: var(--sub); color: var(--silk); font: 700 0.9rem var(--font-mono); cursor: pointer; }
.r0-tools button:hover, .r0-tools button:focus-visible { border-color: var(--gold); color: var(--gold-hi); }
.r0-tools button[hidden] { display: none; }

/* While editing on the page, the panel uses the whole width: its menu becomes the drop-down */
.adm-wide main.container { max-width: none; }
.adm-wide .adm-wrap { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.adm-wide .adm-nav ul { display: none; }
.adm-wide .adm-jump { display: block; max-width: 22rem; padding: 10px 12px; border: 0; background: #0f0719; color: var(--silk); font: inherit; box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5); }
.adm-wide .adm-jump:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.adm-vis__side .adm-form > .adm-actions { position: sticky; bottom: -14px; z-index: 2; margin: 18px -16px -14px; padding: 12px 16px 14px; background: #160a26; border-top: 1px solid var(--line); }

/* ---------- Posts made of parts (js/blocks.js: journal posts written in the control panel) ---------- */
.jb { max-width: 780px; margin-top: 14px; color: var(--silk-dim); }
.jb > * + * { margin-top: 16px; }
.jb-h { margin-top: 28px; font-family: var(--font-head); font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.2; color: var(--silk); }
.jb-h--small { margin-top: 22px; font-size: clamp(1.08rem, 2vw, 1.25rem); }
.jb-p { line-height: 1.75; overflow-wrap: anywhere; }
.jb-p--center { text-align: center; }
.jb-p--right { text-align: right; }
.jb-p--small { font-size: 0.9rem; }
.jb-p--large { font-size: 1.22rem; line-height: 1.6; color: var(--silk); }
.jb strong { color: var(--silk); font-weight: 700; }
.jb a { color: var(--glow); }
.jb a:hover { color: var(--gold-hi); }
.jb-code-i { padding: 1px 6px; background: rgba(109, 40, 217, 0.22); font-family: var(--font-mono); font-size: 0.92em; color: var(--silk); }
.jb-hl { padding: 0 3px; background: rgba(212, 165, 74, 0.3); color: var(--silk); }
.jb-c--gold { color: var(--gold-hi); }
.jb-c--purple { color: #c99bff; }
.jb-c--amber { color: var(--amber); }
.jb-c--red { color: #ff6b66; }
.jb-c--green { color: var(--up); }
.jb-c--blue { color: #8ccaff; }
.jb-c--dim { color: #b6a8cf; }
.jb-quote { margin: 22px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); }
.jb-quote blockquote p { font-size: 1.15rem; line-height: 1.6; font-style: italic; color: var(--silk); overflow-wrap: anywhere; }
.jb-quote figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--gold); }
.jb-note { padding: 14px 18px; border: 1px solid rgba(168, 85, 247, 0.4); border-left: 4px solid var(--trace-hi); background: rgba(109, 40, 217, 0.12); }
.jb-note--tip { border-color: rgba(126, 224, 168, 0.4); border-left-color: var(--up); background: rgba(126, 224, 168, 0.07); }
.jb-note--warn { border-color: rgba(255, 159, 28, 0.45); border-left-color: var(--amber); background: rgba(255, 159, 28, 0.08); }
.jb-note__label { margin-bottom: 4px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silk); }
.jb-note p:not(.jb-note__label) { line-height: 1.65; overflow-wrap: anywhere; }
.jb-list { padding-left: 1.4em; line-height: 1.7; list-style: disc; }
ol.jb-list { list-style: decimal; }
.jb-list li + li { margin-top: 6px; }
.jb-list li::marker { color: var(--gold); }
.jb-pre { overflow-x: auto; padding: 14px 16px; background: #0c0514; border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.55; color: var(--silk); white-space: pre; tab-size: 4; }
.jb-pre[data-lang]::before { content: attr(data-lang); display: block; margin-bottom: 8px; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.jb-hr { position: relative; height: 2px; margin: 30px 8px; border: 0; background: var(--gold); opacity: 0.6; overflow: visible; }
.jb-hr::before, .jb-hr::after { content: ""; position: absolute; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.jb-hr::before { left: -8px; }
.jb-hr::after { right: -8px; }
.jb-fig { margin: 22px auto; }
.jb-fig img, .jb-gallery img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.jb-fig figcaption, .jb-gallery figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 0.88rem; color: var(--silk-dim); overflow-wrap: anywhere; }
.jb-fig--small { max-width: 34%; }
.jb-fig--medium { max-width: 52%; }
.jb-fig--wide { max-width: 78%; }
.jb-fig--full { max-width: 100%; }
.jb-fig--left { float: left; margin: 6px 22px 12px 0; }
.jb-fig--right { float: right; margin: 6px 0 12px 22px; }
.jb-gallery { margin: 22px 0; }
.jb-gallery__row { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 10px; }
.jb-gallery__row img { aspect-ratio: 4 / 3; object-fit: cover; }
.jb-end { clear: both; }
@media (max-width: 640px) {
  .jb-fig--small, .jb-fig--medium, .jb-fig--wide { max-width: 100%; }
  .jb-fig--left, .jb-fig--right { float: none; margin: 18px 0; }
  .jb-gallery__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ez-contrast .jb-c, .ez-contrast .jb a { color: inherit; }
.ez-contrast .jb-hl { background: #fff; color: #000; }

/* ---------- The post editor in the control panel (js/blocks-editor.js) ---------- */
.adm-blocks { min-width: 0; }
.be { display: grid; gap: 10px; margin-top: 10px; }
.be__parts { display: grid; gap: 12px; }
.be-part { padding: 12px 14px 10px; border: 1px solid var(--line); background: rgba(12, 5, 20, 0.55); }
.be-part:focus-within { border-color: var(--trace-hi); }
.be-part__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.be-part__name { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.be-part__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.be-part__moves { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.be .adm-mini { min-height: 32px; padding: 4px 10px; }
.be .be-select { width: auto; max-width: 100%; min-height: 32px; padding: 3px 8px; background: #0c0514; border: 1px solid var(--line); color: var(--silk); font-family: var(--font-mono); font-size: 0.85rem; }
.be-select:disabled { opacity: 0.5; }
.be-field { display: grid; gap: 4px; margin-top: 10px; }
.be-field__label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silk-dim); }
.be-input { width: 100%; padding: 8px 10px; background: #0c0514; border: 1px solid var(--line); color: var(--silk); font: inherit; }
.be-input:focus, .be-rt:focus, .be-select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.be-code { font-family: var(--font-mono); font-size: 0.9rem; white-space: pre; tab-size: 4; }
.be-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.be-tool--b { font-weight: 700; }
.be-tool--i { font-style: italic; }
.be-tool--u { text-decoration: underline; }
.be-tool--s { text-decoration: line-through; }
.be-tools .be-link { display: inline-flex; margin: 0; font: inherit; letter-spacing: normal; text-transform: none; flex-wrap: wrap; gap: 6px; align-items: center; }
.be-tools .be-link[hidden] { display: none; }
.be .be-link__in { width: min(320px, 100%); padding: 5px 10px; }
.be-rt { min-height: 3.4em; padding: 10px 12px; background: #0c0514; border: 1px solid var(--line); color: var(--silk-dim); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.be-rt:empty::before { content: attr(data-placeholder); color: #7d6f99; }
.be-rt--list { border-left: 3px solid var(--gold); }
/* the panel's form rule for spans (.field span: labels in capitals) stays out of the text */
.be-rt span { display: inline; margin: 0; font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.be-rt .be-r--b { font-weight: 700; color: var(--silk); }
.be-rt .be-r--i { font-style: italic; }
.be-rt .be-r--u { text-decoration: underline; }
.be-rt .be-r--s { text-decoration: line-through; }
.be-rt .be-r--u.be-r--s { text-decoration: underline line-through; }
.be-rt .be-r--code { padding: 0 4px; background: rgba(109, 40, 217, 0.25); font-family: var(--font-mono); font-size: 0.92em; }
.be-rt .be-r--hl { background: rgba(212, 165, 74, 0.3); color: var(--silk); }
.be-rt .be-r--a { color: var(--glow); text-decoration: underline dotted; }
.be-rt .be-c--gold { color: var(--gold-hi); }
.be-rt .be-c--purple { color: #c99bff; }
.be-rt .be-c--amber { color: var(--amber); }
.be-rt .be-c--red { color: #ff6b66; }
.be-rt .be-c--green { color: var(--up); }
.be-rt .be-c--blue { color: #8ccaff; }
.be-rt .be-c--dim { color: #b6a8cf; }
.be-part--h .be-input { font-family: var(--font-head); font-size: 1.2rem; color: var(--silk); }
.be-hr { height: 2px; margin: 8px 6px; background: var(--gold); opacity: 0.6; }
.be-img { display: grid; gap: 8px; }
.be-img__pic { display: block; max-width: 100%; max-height: 240px; border: 1px solid var(--line); }
.be-img--small .be-img__pic { max-width: 34%; }
.be-img--medium .be-img__pic { max-width: 52%; }
.be-img--left .be-img__pic { justify-self: start; }
.be-img--right .be-img__pic { justify-self: end; }
.be-pictools { display: flex; flex-wrap: wrap; gap: 6px; }
.be-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.be-gallery__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.be-gallery__moves { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.be-gallery__add { margin-top: 10px; }
.be-add { margin-top: 8px; }
.be-add__open { opacity: 0.75; }
.be-add__open:hover, .be-add__open:focus-visible, .be-add__open[aria-expanded="true"] { opacity: 1; }
.be-add__menu { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 8px; border: 1px dashed var(--line); }
.be-add__menu[hidden] { display: none; }
.be-add--first { margin: 0; }
.be__end { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.be__hint { margin-right: 4px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--silk-dim); }
.be-part .adm-err { display: block; margin-top: 6px; }

/* ---------- The radio (home page, js/radio.js): an old tabletop set in purple bakelite and gold ---------- */
.radio-sec__head { margin-bottom: 22px; }
.radio { --lit: 0; margin: 0; max-width: 820px; }
.radio[data-state="playing"] { --lit: 1; }
.radio__cabinet {
  display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: 18px; padding: 18px;
  background: linear-gradient(160deg, #3a1a5c 0%, #241040 45%, #170a2a 100%);
  border: 2px solid var(--gold); border-radius: 26px 26px 18px 18px;
  box-shadow: inset 0 2px 0 rgba(255, 216, 138, 0.25), inset 0 -10px 24px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.5);
}
.radio__grille {
  position: relative; min-height: 170px; border-radius: 16px 6px 6px 16px;
  background: repeating-linear-gradient(90deg, #b8893a 0 3px, #2a1638 3px 11px), #2a1638;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(0, 0, 0, 0.7);
}
.radio__badge {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 3px 10px; border: 1px solid var(--gold);
  background: #1a0c2c; font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.06em; color: var(--silk); white-space: nowrap;
}
.radio__badge b { color: var(--gold); }
.radio__front { display: grid; gap: 14px; min-width: 0; }
.radio__dial { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.radio__bands { display: grid; align-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8d7aa8; }
.radio__bands li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.radio__bands li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3b2a24; box-shadow: inset 0 0 2px #000; }
.radio__bands li.is-on { color: var(--silk); }
.radio__bands li.is-on::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.radio__bands li[data-band="air"].is-on::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.radio__glass {
  position: relative; min-width: 0; padding: 4px 0; border-radius: 8px; overflow: hidden; border: 2px solid #8a6a2c;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 200, 110, calc(0.15 + 0.55 * var(--lit))), rgba(120, 70, 20, calc(0.25 + 0.3 * var(--lit))) 70%), #2b1a10;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
  transition: background 1.2s ease;
}
.radio__scale { display: block; width: 100%; height: auto; }
.radio__ticks line { stroke: #241408; stroke-width: 1.4; }
.radio__nums text, .radio__band-name { fill: #241408; font-family: var(--font-mono); font-size: 13px; text-anchor: middle; }
.radio__band-name { text-anchor: start; font-weight: 700; }
.radio__band-name--r { text-anchor: end; }
.radio__brand { fill: #5a3a1a; font-family: var(--font-mono); font-size: 8px; letter-spacing: 3px; text-anchor: middle; }
.radio:not([data-state="playing"]) .radio__ticks line { stroke: #5a4030; }
.radio:not([data-state="playing"]) .radio__nums text, .radio:not([data-state="playing"]) .radio__band-name { fill: #6a5040; }
.radio__needle {
  --pos: 0%; position: absolute; top: 6%; bottom: 6%; left: calc(5% + var(--pos) * 0.9); width: 3px; margin-left: -1.5px;
  background: #e8322e; box-shadow: 0 0 6px rgba(255, 60, 56, 0.7); border-radius: 2px;
  transition: left 1.8s cubic-bezier(0.3, 0.1, 0.2, 1);
}
.radio__freq { position: absolute; right: 8px; bottom: 6px; font-family: var(--font-pixel); font-size: 1.1rem; line-height: 1; color: var(--amber); text-shadow: 0 0 8px rgba(255, 159, 28, 0.6); opacity: calc(0.35 + 0.65 * var(--lit)); }
.radio__window {
  display: flex; gap: 14px; align-items: center; min-width: 0; padding: 12px 14px; border-radius: 8px;
  background: linear-gradient(180deg, #0b0612, #140a20); border: 1px solid rgba(212, 165, 74, 0.45); box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.8);
}
.radio__art { flex: none; width: 76px; height: 76px; object-fit: cover; border: 1px solid rgba(212, 165, 74, 0.5); background: #1a0c2c; }
.radio__now { min-width: 0; flex: 1 1 auto; }
.radio__label { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.radio__song { margin: 4px 0 0; font-family: var(--font-head); font-size: 1.15rem; line-height: 1.25; color: var(--silk); overflow-wrap: anywhere; }
.radio__artist { margin: 2px 0 0; color: var(--silk-dim); font-size: 0.95rem; overflow-wrap: anywhere; }
.radio__progress { height: 4px; margin-top: 10px; background: rgba(168, 85, 247, 0.2); }
.radio__progress span { display: block; width: 0; height: 100%; background: var(--amber); transition: width 1s linear; }
.radio__controls { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
/* the magic eye: the green fan closes when a station is tuned in */
.radio__eye { position: relative; width: 34px; height: 34px; border-radius: 50%; background: #06120a; box-shadow: inset 0 0 0 2px #2a1638, 0 0 0 2px #8a6a2c; overflow: hidden; }
.radio__eye span { position: absolute; inset: 4px; border-radius: 50%;
  background: conic-gradient(from 0deg, #0b1a10 0 var(--shadow, 140deg), #4dff9a var(--shadow, 140deg) calc(360deg - var(--shadow, 140deg)), #0b1a10 0);
  opacity: calc(0.35 + 0.65 * var(--lit)); transform: rotate(180deg); transition: --shadow 1s; }
.radio[data-state="playing"] .radio__eye span { --shadow: 25deg; filter: drop-shadow(0 0 4px #4dff9a); }
/* the VU meter: its needle dances while something plays */
.radio__vu { position: relative; width: 70px; height: 38px; border-radius: 6px 6px 2px 2px; overflow: hidden; background: linear-gradient(180deg, #f3e2b8, #d9c08a); border: 2px solid #8a6a2c; }
.radio__vu-scale { position: absolute; left: 6px; right: 6px; top: 6px; height: 50px; border-radius: 50% 50% 0 0; border-top: 2px solid #3a2410; }
.radio__vu-scale::after { content: ""; position: absolute; right: 0; top: -2px; width: 30%; height: 50px; border-radius: 0 50% 0 0; border-top: 2px solid #c0302c; }
.radio__vu-needle { position: absolute; left: 50%; bottom: -2px; width: 2px; height: 32px; margin-left: -1px; background: #241408; transform-origin: 50% 100%; transform: rotate(-50deg); transition: transform 0.6s ease; }
.radio[data-state="playing"] .radio__vu-needle { transform: rotate(-10deg); }
.radio__air { padding: 3px 8px; border: 1px solid #5a2a2a; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: #6a3a3a; }
.radio__air.is-on { border-color: var(--red); color: #fff; background: var(--red); box-shadow: 0 0 12px rgba(255, 60, 56, 0.6); }
.radio__listen { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.08em; color: var(--glow); text-underline-offset: 3px; }
.radio__knobs { display: flex; gap: 16px; margin-left: auto; }
.radio__knob { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe2a6, #b8893a 45%, #5a3e14 100%); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), inset 0 -2px 3px rgba(0, 0, 0, 0.4); position: relative; }
.radio__knob::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 12px; margin-left: -1.5px; background: #3a2410; border-radius: 2px; }
.radio__knob--b { transform: rotate(40deg); }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.ez-calm) .radio[data-state="playing"] .radio__vu-needle { animation: vu 1.7s ease-in-out infinite; }
}
@keyframes vu { 0%, 100% { transform: rotate(-22deg); } 18% { transform: rotate(4deg); } 31% { transform: rotate(-12deg); } 47% { transform: rotate(14deg); } 63% { transform: rotate(-4deg); } 80% { transform: rotate(9deg); } }
@media (prefers-reduced-motion: reduce) { .radio__needle, .radio__glass, .radio__progress span, .radio__vu-needle { transition: none; } }
.ez-calm .radio__needle, .ez-calm .radio__glass, .ez-calm .radio__vu-needle { transition: none; }
@media (max-width: 640px) {
  .radio__cabinet { grid-template-columns: minmax(0, 1fr); padding: 14px; border-radius: 20px 20px 14px 14px; }
  .radio__grille { min-height: 56px; border-radius: 12px; }
  .radio__dial { grid-template-columns: minmax(0, 1fr); }
  .radio__bands { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .radio__art { width: 60px; height: 60px; }
  /* the dial's numbers get small: the frequency goes under them instead of over "108" */
  .radio__glass { padding-bottom: calc(1.1rem + 10px); }
}
@media (max-width: 400px) {
  .radio__window { gap: 10px; padding: 10px; }
  .radio__art { width: 48px; height: 48px; }
  .radio__label { letter-spacing: 0.12em; }
}
.adm-hint { margin: 10px 0 0; font-size: 0.9rem; color: var(--silk-dim); }

/* ---------- Windows High Contrast (forced colours) ----------
   The system's colours replace the site's, and anything drawn only with a background colour vanishes:
   progress bars, chart bars, the radio's needle and lamps, filament colour swatches. These keep their
   own colours (they are the information), and the radio's dial is drawn in the system's text colour. */
@media (forced-colors: active) {
  .meter i, .radio__progress span, .pl-bar__part, .pl-mat__fill, .pl-key::before, .swatch, .led, .radio__needle, .pl-cal__d,
  .radio__bands li::before, .radio__eye span { forced-color-adjust: none; }
  .meter i, .radio__progress span { background: Highlight; }
  .radio__needle { background: Highlight; box-shadow: none; }
  .radio__bands li.is-on::before { background: Highlight; box-shadow: none; }
  .radio__bands li:not(.is-on)::before { background: Canvas; box-shadow: inset 0 0 0 1px CanvasText; }
  .radio__nums text, .radio__band-name, .radio__brand { fill: CanvasText; }
  .radio__ticks line { stroke: CanvasText; }
  .radio__glass, .radio__window, .radio__vu, .radio__air, .meter, .radio__progress { border: 1px solid CanvasText; }
  .adm-picker__item:focus-visible { outline: 2px solid Highlight; }
}

/* ---------- Printing a page (Ctrl+P): dark text on white, no pop-ups, no grey blocks ---------- */
@media print {
  :root { --silk: #000; --silk-dim: #333; --glow: #4b1d8f; --amber: #7a4a00; --gold: #6b5200; }
  .toast, .preview-bar, .live-badge, .hdr-tools, .lights, .lights__log, .lights__off, .radio__controls { display: none !important; }
  .site-footer { background: none; border-top: 1px solid #999; }
  h1, h2, .section__title, .log__title a { text-shadow: none; }
  a { color: inherit; }
}

/* Maker Forge's page for each thing it makes (the name keychain first): examples that open in the app, questions */
.kc-examples .card__img { aspect-ratio: 778 / 482; }
.kc-faq { display: grid; gap: 12px; margin-top: 24px; max-width: 920px; }
.kc-faq__q { padding: 16px 22px; }
.kc-faq__q summary { cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--silk); }
.kc-faq__q summary::-webkit-details-marker { display: none; }
.kc-faq__q summary::before { content: "+ "; color: var(--glow); font-family: var(--font-mono); }
.kc-faq__q[open] summary::before { content: "\2212  "; }
.kc-faq__q p { margin: 10px 0 0; color: var(--silk-dim); max-width: 72ch; }

/* ---------- Room for fingers, and the UX pass of 2026-10-24 ---------- */
/* On touch screens the small links and buttons are at least 44 px tall: the footer's links were 16 px
   and the tags 30 px, easy to miss or to hit the one next to it. A mouse keeps the compact look. */
@media (pointer: coarse) {
  .explore a, .social a, .logo { display: inline-flex; align-items: center; min-height: 44px; }
  .explore, .social { row-gap: 0; }
  .tag { display: flex; align-items: center; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .chips a, .filter { display: inline-flex; align-items: center; min-height: 44px; }
  .nav .menu__list a, .menu__list a { padding-top: 13px; padding-bottom: 13px; }
  .card__links a, .view3d, .log__meta a { display: inline-flex; align-items: center; min-height: 44px; }
  .card__links { row-gap: 0; }
}
/* The Maker Forge page's other screenshots, behind "Show all" */
.gallery-more { margin-top: 20px; }
.gallery-more > summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; cursor: pointer; list-style: none;
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.5); background: rgba(109, 40, 217, 0.18);
  font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.16em; color: var(--silk);
}
.gallery-more > summary::-webkit-details-marker { display: none; }
.gallery-more > summary:hover, .gallery-more > summary:focus-visible { background: rgba(109, 40, 217, 0.36); }
.gallery-more[open] > summary { display: none; }
.gallery-more > .gallery { margin-top: 0; }
/* Build logs: older ones on request; a log's picture opens big */
.logs-more { display: flex; margin: -70px auto 100px; min-height: 44px; }   /* (into the list's own space below) */
.logs-more[hidden] { display: none; }
.pic-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pic-open img { display: block; }
.pic-open:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Halloween, turned up (js/haunt.js; the intro's haunted lines come from boot.js) ---------- */
.hh { display: none; }
.boot-haunted .hn { display: none; }
.boot-haunted .hh { display: inline; }
.boot-haunted .boot__sys { color: #ff5a4f; }
.boot-haunted .boot__logo { color: #ffe9e6; text-shadow: 0 0 40px rgba(255, 30, 30, 0.6), 0 0 10px rgba(255, 90, 60, 0.5); }
.boot-haunted .boot__logo .pad-plus { color: #ff8a1f; fill: #ff8a1f; }
.boot-haunted .boot__bar { border-color: rgba(220, 30, 40, 0.6); background: rgba(120, 0, 10, 0.25); }
.boot-haunted .boot__bar span { background: linear-gradient(90deg, #6b000c, #d4141f); }
.boot-haunted .boot__pct { color: #ff3b3b; }
@media (prefers-reduced-motion: no-preference) { .boot-haunted .boot { animation-delay: 5.5s; } }   /* (a second longer on 666%) */
.boot--glitch .boot__inner { animation: haunt-glitch 0.7s steps(2, end) both; }
.boot--glitch::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 20, 30, 0.16) 0 2px, transparent 2px 5px), radial-gradient(ellipse at center, transparent 40%, rgba(120, 0, 0, 0.55)); }
@keyframes haunt-glitch {
  0% { transform: translate(0, 0) skewX(0); filter: none; }
  20% { transform: translate(-6px, 2px) skewX(-4deg); filter: hue-rotate(-90deg) saturate(3); }
  40% { transform: translate(5px, -1px) skewX(3deg); filter: none; }
  60% { transform: translate(-3px, 0) skewX(-2deg); filter: hue-rotate(-90deg) saturate(3); }
  100% { transform: none; filter: none; }
}
.haunt-count { margin: 8px 0 0; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.3em; color: #ff8a1f; text-shadow: 0 0 12px rgba(255, 90, 0, 0.6); }
.haunt-eyes { position: absolute; z-index: 0; display: flex; gap: calc(9px * var(--sz, 1)); pointer-events: none; transition: opacity 0.4s ease; }
.haunt-eyes i { width: calc(9px * var(--sz, 1)); height: calc(5px * var(--sz, 1)); border-radius: 50% 50% 45% 45%; background: #ffd23a;
  box-shadow: 0 0 8px 2px rgba(255, 180, 0, 0.55); transform-origin: center; }
.haunt-eyes i:first-child { transform: rotate(10deg); } .haunt-eyes i:last-child { transform: rotate(-10deg); }
.haunt-eyes.is-shut { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.ez-calm) .haunt-eyes i { animation: haunt-blink 7s ease-in-out var(--bl, 0s) infinite; }
  :root:not(.ez-calm) .haunt-fog__a { animation: haunt-drift 48s ease-in-out infinite alternate; }
  :root:not(.ez-calm) .haunt-fog__b { animation: haunt-drift 66s ease-in-out -20s infinite alternate-reverse; }
  :root:not(.ez-calm) .haunt-rec b { animation: haunt-rec 1.6s steps(1, end) infinite; }
}
@keyframes haunt-blink { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 0.1; } }
@keyframes haunt-drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
@keyframes haunt-rec { 50% { opacity: 0.2; } }
.haunt-fog { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; overflow: hidden; pointer-events: none; z-index: 0; }
.haunt-fog i { position: absolute; left: -20%; right: -20%; bottom: -30%; height: 120%;
  background: radial-gradient(ellipse 30% 40% at 20% 70%, rgba(200, 190, 230, 0.16), transparent 70%), radial-gradient(ellipse 35% 35% at 60% 80%, rgba(200, 190, 230, 0.13), transparent 70%),
              radial-gradient(ellipse 25% 30% at 90% 75%, rgba(200, 190, 230, 0.14), transparent 70%); filter: blur(6px); }
.haunt-fog__b { opacity: 0.8; bottom: -45%; }
.haunt-curse { position: fixed; z-index: 300; display: flex; align-items: center; white-space: nowrap; pointer-events: none;
  color: #ff2b2b; text-shadow: 0 0 10px rgba(255, 0, 0, 0.75), 2px 0 rgba(0, 255, 255, 0.35), -2px 0 rgba(255, 0, 80, 0.5); animation: haunt-curse 1.1s steps(1, end) both; }
@keyframes haunt-curse { 0% { transform: translate(2px, -1px) skewX(-8deg); } 15% { transform: translate(-2px, 1px); } 30% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.is-cursed { color: transparent !important; text-shadow: none !important; }
.is-cursed * { color: transparent !important; }
.haunt-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }   /* (no z-index: what's in it keeps its own) */
.haunt-scrawl { position: absolute; z-index: 230; max-width: 38%; pointer-events: none; transform: rotate(var(--rot, 0deg));
  font-family: "VT323", var(--font-mono); font-size: clamp(1.8rem, 5vw, 3.4rem); letter-spacing: 0.08em; color: #a30d14;
  text-shadow: 0 0 2px #3a0004, 3px 3px 0 rgba(0, 0, 0, 0.5); opacity: 0.92; }
.haunt-figure { position: absolute; z-index: 230; width: 90px; height: 270px; pointer-events: none; transition: opacity 0.35s ease;
  background: radial-gradient(circle 22px at 50% 26px, #020103 96%, transparent 100%), radial-gradient(ellipse 44px 120px at 50% 150px, #020103 96%, transparent 100%),
              radial-gradient(ellipse 30px 90px at 34% 210px, #020103 95%, transparent 100%), radial-gradient(ellipse 30px 90px at 66% 210px, #020103 95%, transparent 100%);
  filter: blur(1.5px); }
.haunt-figure::after { content: ""; position: absolute; left: 36px; top: 20px; width: 18px; height: 4px; background: radial-gradient(circle 2px at 3px 2px, #fff 98%, transparent), radial-gradient(circle 2px at 15px 2px, #fff 98%, transparent); opacity: 0.85; }
.haunt-figure.is-gone { opacity: 0; }
.haunt-eyes--dark { position: fixed; z-index: 245; }
.haunt-rec { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 16px;
  font-family: "VT323", var(--font-mono); font-size: clamp(1rem, 2.4vw, 1.5rem); letter-spacing: 0.08em; color: #eaffea; text-shadow: 0 0 4px #000;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55)); }
.haunt-rec b { color: #ff3030; font-weight: 400; }
.season-halloween .print-cam img { filter: grayscale(1) sepia(1) hue-rotate(55deg) saturate(2.4) brightness(1.08) contrast(1.15); }
.card.fail { position: relative; }
.toe-tag { position: absolute; z-index: 3; top: 14px; right: 14px; display: grid; gap: 2px; padding: 8px 12px 8px 24px; transform: rotate(7deg); pointer-events: none;
  background: #e9dcb4; color: #3a2a12; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }
.toe-tag::before { content: ""; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #1a0e2a; }
.toe-tag b { font-size: 0.9rem; }
.haunt-retitle { position: relative; text-decoration: line-through; text-decoration-color: #c4121b; text-decoration-thickness: 5px; }
.haunt-retitle__new { position: absolute; left: 0.2em; top: -0.95em; transform: rotate(-4deg); font-family: "VT323", var(--font-mono); font-size: 0.62em; letter-spacing: 0.06em;
  color: #e3141f; text-shadow: 0 0 12px rgba(255, 0, 0, 0.5); white-space: nowrap; text-transform: uppercase; pointer-events: none; }
.haunt-grave { display: block; width: min(240px, 70vw); margin-top: 22px; }
.haunt-grave__stone { fill: #3b3150; stroke: #6b5c86; stroke-width: 2; }
.haunt-grave__dirt { fill: #2a1c12; }
.haunt-grave__weed { fill: none; stroke: #3e6b2a; stroke-width: 3; stroke-linecap: round; }
.haunt-grave__rip { fill: #d9cef0; font: 700 22px var(--font-mono); letter-spacing: 0.12em; }
.haunt-grave__name { fill: #b8a9d6; font: 12px var(--font-mono); }
.haunt-grave__date { fill: #8e7bb3; font: 10px var(--font-mono); letter-spacing: 0.12em; }
.haunt-404 { margin: 14px 0 0; color: #ff8a8a; font-family: var(--font-mono); letter-spacing: 0.06em; }
.sp-moon__dark { fill: rgba(244, 236, 210, 0.08); }
.sp-flash { fill: #d9d2ff; opacity: 0; }
.sp-bolt { fill: none; stroke: #f4f0ff; stroke-width: 2; stroke-linejoin: round; opacity: 0; }
.sp-wisp { fill: rgba(205, 195, 235, 0.22); }
.sp-hand { fill: #8fa07a; }
.sp-crow { fill: #07040b; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.ez-calm) .is-striking .sp-flash { animation: sp-flash 0.9s linear both; }
  :root:not(.ez-calm) .is-striking .sp-bolt { animation: sp-bolt 0.9s linear both; }
  :root:not(.ez-calm) .sp-wisp { animation: sp-wisp 30s ease-in-out var(--wd, 0s) infinite alternate; }
  :root:not(.ez-calm) .sp-hand { animation: sp-hand 19s ease-in-out 3s infinite; }
}
:root:is(.ez-calm) .sp-hand { transform: translate(342px, 150px); }
@media (prefers-reduced-motion: reduce) { .sp-hand { transform: translate(342px, 150px); } }
@keyframes sp-flash { 0%, 22%, 44%, 100% { opacity: 0; } 8% { opacity: 0.22; } 34% { opacity: 0.14; } }
@keyframes sp-bolt { 0%, 30%, 100% { opacity: 0; } 4% { opacity: 0.9; } 20% { opacity: 0.5; } }
.season-scene .sp-grave-link { pointer-events: auto; cursor: pointer; }
.season-scene .sp-grave-link:hover .sp-stone { fill: #4a3e63; stroke: #ff8a1f; }
@keyframes sp-wisp { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes sp-hand { 0%, 30% { transform: translate(342px, 160px); } 42%, 62% { transform: translate(342px, 128px); } 66% { transform: translate(342px, 126px) rotate(-4deg); } 70% { transform: translate(342px, 128px) rotate(3deg); } 82%, 100% { transform: translate(342px, 160px); } }
/* the sound button ("Haunt me"), bottom right */
.haunt-sound { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 95; min-height: 44px; padding: 8px 14px; border: 0; cursor: pointer;
  background: rgba(40, 6, 12, 0.88); box-shadow: inset 0 0 0 1px rgba(255, 70, 60, 0.6); color: #ffb3ad; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.16em; }
.haunt-sound[aria-pressed="true"] { color: #ffe1de; background: rgba(120, 8, 18, 0.9); box-shadow: inset 0 0 0 1px #ff5a4f, 0 0 18px rgba(255, 40, 30, 0.45); }
.haunt-sound:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.lights-out .haunt-sound { z-index: 250; }
@media print { .haunt-sound, .haunt-blood-bar, .haunt-candle, .haunt-crawler, .haunt-dropper, .haunt-hand, .haunt-eyes, .haunt-fog { display: none !important; } }
/* the séance */
.haunt-ouija { position: fixed; inset: 0; z-index: 280; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; background: rgba(6, 2, 10, 0.88); }
.haunt-ouija__board { width: min(640px, 94vw); height: auto; filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8)); }
.haunt-ouija__wood { fill: #6b4423; stroke: #2a170a; stroke-width: 4; }
.haunt-ouija__line { fill: none; stroke: rgba(30, 14, 4, 0.55); stroke-width: 2; }
.haunt-ouija__l, .haunt-ouija__w { fill: #1d0f05; font-family: "VT323", var(--font-mono); letter-spacing: 0.04em; }
.haunt-ouija__sun { fill: none; stroke: #1d0f05; stroke-width: 3; }
.haunt-ouija__pl { fill: rgba(232, 214, 176, 0.92); stroke: #2a170a; stroke-width: 2; }
.haunt-ouija__glass { fill: rgba(255, 255, 255, 0.15); stroke: #2a170a; stroke-width: 2; }
.haunt-ouija__planchette { transition: transform 0.75s cubic-bezier(.45, .05, .3, 1); }
.haunt-ouija__said { min-height: 1.6em; margin: 0; font-family: "VT323", var(--font-mono); font-size: clamp(1.6rem, 6vw, 2.6rem); letter-spacing: 0.2em; color: #ff8a7a; text-shadow: 0 0 14px rgba(255, 30, 30, 0.6); text-align: center; }
.haunt-ouija__close { min-height: 44px; padding: 8px 16px; border: 0; cursor: pointer; background: none; color: #cdbfe6; font-family: var(--font-mono); text-decoration: underline; text-underline-offset: 4px; }
/* something summoned */
.haunt-summon { position: fixed; inset: 0; z-index: 290; display: grid; place-items: center; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.9)); transition: opacity 1.2s ease; }
.haunt-summon__face { width: min(70vmin, 520px); height: auto; }
.haunt-summon__hole { fill: #050307; } .haunt-summon__eye { fill: #ff2020; filter: drop-shadow(0 0 4px #ff0000); }
.haunt-summon__blood { fill: #5a0008; } .haunt-summon__crack { fill: none; stroke: #4a4436; stroke-width: 1.5; }
.haunt-summon__teeth { fill: none; stroke: #c9c1a8; stroke-width: 3; stroke-linejoin: round; }
.haunt-summon.is-going { opacity: 0; }
@media (prefers-reduced-motion: no-preference) { :root:not(.ez-calm) .haunt-summon__face { animation: haunt-rush 0.35s cubic-bezier(.2, .9, .3, 1.2) both, haunt-shake 0.08s linear 0.35s 8; } }
@keyframes haunt-rush { from { transform: scale(0.15); } to { transform: scale(1.08); } }
@keyframes haunt-shake { 0%, 100% { translate: 0 0; } 25% { translate: -6px 3px; } 75% { translate: 5px -3px; } }
/* midnight: the site dies */
.haunt-dead { position: fixed; inset: 0; z-index: 295; display: grid; place-content: center; justify-items: center; gap: 10px; cursor: pointer; background: #030205; transition: opacity 0.9s ease; }
.haunt-dead.is-back { opacity: 0; }
.haunt-dead__static { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0.55; }
.haunt-dead__ecg { position: relative; width: min(700px, 90vw); height: 90px; }
.haunt-dead__line { fill: none; stroke: #39ff6a; stroke-width: 3; filter: drop-shadow(0 0 6px #39ff6a); stroke-dasharray: 900; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) { :root:not(.ez-calm) .haunt-dead__line { animation: haunt-ecg 2.4s linear both; } }
@keyframes haunt-ecg { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
.haunt-dead__big, .haunt-dead__small { position: relative; margin: 0; font-family: "VT323", var(--font-mono); text-align: center; color: #e8e2f2; }
.haunt-dead__big { font-size: clamp(2.6rem, 10vw, 5rem); letter-spacing: 0.2em; text-shadow: 0 0 20px rgba(255, 255, 255, 0.35); }
.haunt-dead__small { font-size: clamp(1.1rem, 3.5vw, 1.5rem); letter-spacing: 0.12em; color: #ff8a7a; }
/* spiders */
.haunt-dropper { position: fixed; top: var(--header-h); z-index: 75; width: 34px; height: var(--drop, 200px); margin-left: -17px; pointer-events: none; }
.haunt-dropper__thread { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: rgba(220, 210, 235, 0.55); transform-origin: top; animation: haunt-thread 9s ease-in-out both; }
.haunt-dropper__spider { position: absolute; left: 0; top: -14px; width: 34px; height: 34px; animation: haunt-drop 9s ease-in-out both; }
@keyframes haunt-thread { 0% { transform: scaleY(0); } 35%, 70% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
@keyframes haunt-drop { 0% { transform: translateY(0); } 35% { transform: translateY(var(--drop, 200px)); } 45% { transform: translateY(calc(var(--drop, 200px) - 8px)); } 55%, 70% { transform: translateY(var(--drop, 200px)); } 100% { transform: translateY(0); } }
.haunt-crawler { position: absolute; left: 0; top: 0; z-index: 3; width: 20px; height: 20px; pointer-events: none; transition: transform 3.5s linear; }
.haunt-crawler.is-running { transition-duration: 0.35s; transition-timing-function: ease-out; }
.haunt-crawler__svg { width: 100%; height: 100%; }
/* (black on a dark page: a candle-lit rim so they're seen) */
.haunt-dropper__spider, .haunt-crawler__svg { overflow: visible; filter: drop-shadow(0 0 1px rgba(255, 190, 120, 0.85)) drop-shadow(0 0 7px rgba(255, 120, 40, 0.45)); }
/* the candle */
.haunt-candle { position: fixed; left: 0; top: 0; z-index: 300; width: 12px; height: 18px; pointer-events: none; transition: opacity 0.3s ease; }
.haunt-candle.is-out { opacity: 0; }
.haunt-candle__flame { position: absolute; inset: 0; border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse 40% 45% at 50% 70%, #fffbe0 0%, #ffd34d 45%, #ff7a1a 75%, rgba(255, 60, 0, 0) 100%);
  box-shadow: 0 0 14px 6px rgba(255, 150, 40, 0.35), 0 0 40px 18px rgba(255, 120, 30, 0.12); }
@media (prefers-reduced-motion: no-preference) { :root:not(.ez-calm) .haunt-candle__flame { animation: haunt-flicker 0.9s ease-in-out infinite alternate; } }
@keyframes haunt-flicker { 0% { transform: scale(1, 1) rotate(-2deg); } 50% { transform: scale(0.92, 1.08) rotate(2deg); } 100% { transform: scale(1.05, 0.95) rotate(-1deg); } }
/* a hand on the glass; the scroll bar */
.haunt-hand { position: fixed; z-index: 76; width: 90px; height: 117px; pointer-events: none; transform: rotate(var(--rot, 0deg)); fill: rgba(130, 0, 12, 0.8); animation: haunt-hand 3.2s ease-in both; }
.haunt-hand svg { width: 100%; height: 100%; filter: blur(0.6px); }
@keyframes haunt-hand { 0% { opacity: 0; } 6% { opacity: 0.9; } 60% { opacity: 0.75; transform: rotate(var(--rot, 0deg)) translateY(10px) scaleY(1.06); } 100% { opacity: 0; transform: rotate(var(--rot, 0deg)) translateY(26px) scaleY(1.15); } }
.haunt-blood-bar { position: fixed; left: 0; top: 0; z-index: 85; width: calc(var(--p, 0) * 100%); height: 3px; pointer-events: none; background: linear-gradient(90deg, #4a0006, #c4121b); }
.haunt-blood-bar::after { content: ""; position: absolute; right: -3px; top: 1px; width: 6px; height: 9px; border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%; background: #c4121b; }
/* home: now haunting */
.haunt-now { position: relative; max-width: 860px; margin: 40px auto 0; padding: 28px clamp(20px, 4vw, 40px); }
.haunt-now__title { margin: 6px 0 4px; font-size: clamp(1.8rem, 5vw, 2.8rem); color: #fff1e6; text-shadow: 0 0 22px rgba(255, 90, 0, 0.45); }
.haunt-now__fear { margin: 4px 0 10px; font-size: 1.6rem; letter-spacing: 0.15em; color: rgba(205, 191, 230, 0.25); }
.haunt-now__fear .is-on { color: #ff8a1f; text-shadow: 0 0 10px rgba(255, 120, 0, 0.6); }
.haunt-now__meta, .haunt-now__next { margin: 0 0 8px; font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--silk-dim); }
.haunt-now__verdict { margin: 12px 0 16px; color: var(--silk); font-style: italic; }
.badge-card__season { margin: 6px 0 0; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; color: #ff8a1f; }
