/* RetroCYD website — shared styles
   Dark retro-arcade theme. No build step. */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #06070f;
  --bg-2: #0a0e1d;
  --panel: #0f1428;
  --panel-2: #141a33;
  --panel-3: #1a2142;
  --line: #26305a;
  --line-2: #34407a;

  /* text (AA+ on --bg and --panel) */
  --text: #e8ebff;
  --muted: #a9b1d6;
  --dim: #8790bd;

  /* neon accents */
  --yellow: #ffd23f;      /* the "Cheap Yellow" */
  --yellow-2: #ffe27a;
  --cyan: #3ef0ff;
  --cyan-2: #8ff6ff;
  --magenta: #ff5fa8;
  --green: #5dff9e;
  --red: #ff6b6b;
  --orange: #ffa94d;

  --link: #7ff4ff;
  --focus: #ffd23f;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1180px;

  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --glow-y: 0 0 18px rgba(255, 210, 63, .35);
  --glow-c: 0 0 18px rgba(62, 240, 255, .35);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(62, 240, 255, .10), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(255, 95, 168, .08), transparent 60%),
    radial-gradient(1000px 700px at 50% 120%, rgba(255, 210, 63, .06), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* faint pixel grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(120, 140, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, .045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25));
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--yellow-2); }
p, li, dd, td { overflow-wrap: break-word; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: .92em; }
:not(pre) > code {
  background: rgba(62, 240, 255, .08);
  border: 1px solid rgba(62, 240, 255, .18);
  border-radius: 5px;
  padding: .05em .35em;
  color: var(--cyan-2);
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: .62rem;
  line-height: 1;
  padding: .45em .55em .4em;
  border-radius: 5px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-bottom-width: 3px;
  color: var(--text);
  vertical-align: .12em;
  white-space: nowrap;
}
hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }
::selection { background: var(--yellow); color: #111; }

/* ---------- focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(255, 210, 63, .18);
}

/* ---------- utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--yellow); color: #111; font-weight: 700;
  padding: .6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
.pixel, h1.pixel, h2 {
  font-family: var(--font-pixel);
  font-weight: 400;
  letter-spacing: .02em;
}
h2 {
  font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  line-height: 1.5;
  color: var(--text);
  text-shadow: 0 0 22px rgba(62, 240, 255, .25);
}
h2 .accent { color: var(--yellow); text-shadow: var(--glow-y); }
h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); }
h4 { font-size: 1.02rem; font-weight: 700; color: var(--cyan-2); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: .25em 0; }
li::marker { color: var(--cyan); }
strong { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-pixel);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.lead { font-size: clamp(1.08rem, 1.8vw, 1.22rem); color: var(--muted); max-width: 62ch; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 7, 15, .82);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--text);
  font-family: var(--font-pixel); font-size: .9rem; letter-spacing: .04em;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--yellow); font-weight: 400; text-shadow: var(--glow-y); }
.brand:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: .5rem .7rem; cursor: pointer;
  font-family: var(--font-pixel); font-size: .6rem; letter-spacing: .08em;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .35rem; flex-wrap: wrap; }
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block;
  padding: .55rem .8rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.site-nav a[aria-current="page"] { color: var(--yellow); background: rgba(255, 210, 63, .08); }
.site-nav a.nav-cta {
  color: #111; background: var(--yellow);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, .5), 0 0 18px rgba(255, 210, 63, .25);
}
.site-nav a.nav-cta:hover { background: var(--yellow-2); color: #111; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; }
  .site-nav ul {
    display: none;
    flex-direction: column; gap: 0;
    background: rgba(8, 10, 22, .98);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
  }
  .site-nav.open ul { display: flex; }
  .site-nav a { display: block; padding: .8rem .6rem; }
  .site-nav a.nav-cta { text-align: center; margin-top: .4rem; }
  .no-js .site-nav { position: static; }
  .no-js .site-nav ul { display: flex; flex-direction: row; background: none; border: 0; padding: 0; }
  .no-js .nav-toggle { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--yellow);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-pixel); font-size: .72rem; letter-spacing: .06em; line-height: 1.4;
  text-transform: uppercase; text-decoration: none;
  padding: 1rem 1.3rem;
  border-radius: 10px;
  border: 2px solid var(--b);
  background: var(--b);
  color: #0c0c12;
  cursor: pointer;
  box-shadow: 0 6px 0 0 #8a6b00, 0 0 24px rgba(255, 210, 63, .25);
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover { background: var(--yellow-2); color: #0c0c12; transform: translateY(-1px); box-shadow: 0 7px 0 0 #8a6b00, 0 0 32px rgba(255, 210, 63, .4); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 0 #8a6b00, 0 0 16px rgba(255, 210, 63, .2); }
.btn-ghost {
  background: transparent; color: var(--cyan-2); border-color: var(--cyan);
  box-shadow: 0 6px 0 0 #0d5e66, 0 0 24px rgba(62, 240, 255, .14);
}
.btn-ghost:hover { background: rgba(62, 240, 255, .1); color: #fff; box-shadow: 0 7px 0 0 #0d5e66, 0 0 32px rgba(62, 240, 255, .3); }
.btn-ghost:active { box-shadow: 0 1px 0 0 #0d5e66; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--panel-3); border-color: var(--line-2); color: var(--dim);
  box-shadow: none; cursor: not-allowed; transform: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem 1.1rem; align-items: center; }
.btn svg { width: 1.2em; height: 1.2em; }

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-head { margin-bottom: 2.4rem; max-width: 760px; }
.section-head p { color: var(--muted); }
.band {
  background: linear-gradient(180deg, rgba(15, 20, 40, .65), rgba(10, 14, 29, .9));
  border-block: 1px solid var(--line);
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 9vw, 7rem); isolation: isolate; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 {
  font-family: var(--font-pixel); font-weight: 400;
  font-size: clamp(1.9rem, 5.8vw, 3.6rem);
  line-height: 1.15; letter-spacing: .02em;
  margin-bottom: .45em;
}
.hero h1 .logo-retro { color: var(--text); text-shadow: 0 0 24px rgba(62, 240, 255, .45), 3px 3px 0 #1f2a66; }
.hero h1 .logo-cyd { color: var(--yellow); text-shadow: 0 0 26px rgba(255, 210, 63, .55), 3px 3px 0 #5c4500; }
.hero .tagline {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; line-height: 1.35;
  margin-bottom: .8rem; max-width: 26ch;
}
.hero .tagline em { font-style: normal; color: var(--cyan); }
.hero .btn-row { margin-top: 1.8rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; padding: 0; list-style: none; }
.hero-meta li {
  margin: 0;
  font-size: .85rem; color: var(--muted);
  padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(15, 20, 40, .6);
}
.hero-meta li::marker { content: none; }

/* synthwave floor */
.hero-floor {
  position: absolute; z-index: -1; left: -20%; right: -20%; bottom: -2px; height: 46%;
  background-image:
    linear-gradient(rgba(255, 95, 168, .55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(62, 240, 255, .45) 2px, transparent 2px);
  background-size: 64px 40px;
  transform: perspective(380px) rotateX(62deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgba(0,0,0,.55), transparent 85%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.55), transparent 85%);
  animation: floor 3.2s linear infinite;
}
@keyframes floor { to { background-position: 0 40px, 0 0; } }
.hero-sun {
  position: absolute; z-index: -2; width: 520px; height: 520px; right: -120px; top: 40px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(6, 7, 15, .9) 22px 28px),
    radial-gradient(circle at 50% 30%, rgba(255, 210, 63, .35), rgba(255, 95, 168, .18) 55%, transparent 70%);
  filter: blur(.3px);
  opacity: .55;
}

/* ---------- board illustration ---------- */
.board-wrap { position: relative; perspective: 1400px; }
.board-svg {
  display: block; width: 100%; height: auto;
  transform: rotateY(-12deg) rotateX(6deg) rotateZ(1deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .7)) drop-shadow(0 0 60px rgba(62, 240, 255, .14));
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.board-wrap:hover .board-svg { transform: rotateY(-4deg) rotateX(2deg) rotateZ(0); }
.board-caption { margin-top: 1rem; font-size: .85rem; color: var(--dim); text-align: center; }
.board-svg .px { font-family: var(--font-pixel); }
.board-svg .sel { animation: selpulse 1.6s ease-in-out infinite; }
.board-svg .blink { animation: blink 1.1s steps(2, start) infinite; }
@keyframes selpulse { 50% { opacity: .45; } }
@keyframes blink { to { visibility: hidden; } }

/* ---------- stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(12, 16, 34, .8);
  overflow: hidden;
}
.stat { padding: 1.3rem 1rem; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block; font-family: var(--font-pixel); font-weight: 400;
  font-size: clamp(1rem, 2.4vw, 1.35rem); color: var(--yellow); text-shadow: var(--glow-y); margin-bottom: .45rem;
}
.stat:nth-child(2n) b { color: var(--cyan); text-shadow: var(--glow-c); }
.stat span { font-size: .88rem; color: var(--muted); line-height: 1.35; display: block; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.2rem;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--muted); }
.card .icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 10px; margin-bottom: .9rem;
  background: rgba(62, 240, 255, .08); border: 1px solid rgba(62, 240, 255, .3);
  color: var(--cyan);
}
.card .icon svg { width: 24px; height: 24px; }
.card.y .icon { background: rgba(255, 210, 63, .08); border-color: rgba(255, 210, 63, .35); color: var(--yellow); }
.card.m .icon { background: rgba(255, 95, 168, .08); border-color: rgba(255, 95, 168, .35); color: var(--magenta); }
.card.g .icon { background: rgba(93, 255, 158, .08); border-color: rgba(93, 255, 158, .35); color: var(--green); }

/* arcade corner brackets */
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--yellow); border-style: solid; opacity: .8;
}
.bracket::before { top: -1px; left: -1px; border-width: 3px 0 0 3px; border-top-left-radius: var(--radius); }
.bracket::after { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; border-bottom-right-radius: var(--radius); }

/* ---------- badges / tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35em;
  font-family: var(--font-pixel); font-size: .58rem; letter-spacing: .08em; line-height: 1.2;
  text-transform: uppercase;
  padding: .45em .65em .4em;
  border-radius: 6px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge-primary { color: var(--green); background: rgba(93, 255, 158, .08); }
.badge-exp { color: var(--orange); background: rgba(255, 169, 77, .08); }
.badge-info { color: var(--cyan); background: rgba(62, 240, 255, .08); }
.badge-no { color: var(--red); background: rgba(255, 107, 107, .08); }
.badge-muted { color: var(--muted); background: rgba(169, 177, 214, .06); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.tags li { margin: 0; }
.tag {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--panel-3); color: var(--text); border: 1px solid var(--line-2);
}
.tag-nes { color: #ffc2de; border-color: rgba(255, 95, 168, .5); background: rgba(255, 95, 168, .1); }
.tag-gb { color: #c8ffd9; border-color: rgba(93, 255, 158, .45); background: rgba(93, 255, 158, .08); }
.tag-gbc { color: #c9fbff; border-color: rgba(62, 240, 255, .45); background: rgba(62, 240, 255, .08); }
.tag-chip8 { color: #fff0bf; border-color: rgba(255, 210, 63, .5); background: rgba(255, 210, 63, .08); }
.tag-sms { color: #bfe9ff; border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .08); }
.tag-gg { color: #bff7ee; border-color: rgba(45, 212, 191, .5); background: rgba(45, 212, 191, .08); }

/* ---------- notices ---------- */
.notice {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: start;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  border-left-width: 4px;
  background: rgba(20, 26, 51, .75);
  margin: 0 0 1.2rem;
}
.notice > svg { width: 22px; height: 22px; margin-top: .15rem; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice strong:first-child { display: block; margin-bottom: .2rem; }
.notice-info { border-left-color: var(--cyan); }
.notice-info > svg { color: var(--cyan); }
.notice-warn { border-left-color: var(--orange); background: rgba(255, 169, 77, .06); }
.notice-warn > svg { color: var(--orange); }
.notice-danger { border-left-color: var(--red); background: rgba(255, 107, 107, .06); }
.notice-danger > svg { color: var(--red); }
.notice-ok { border-left-color: var(--green); background: rgba(93, 255, 158, .05); }
.notice-ok > svg { color: var(--green); }

/* ---------- flasher ---------- */
.flash-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .flash-grid { grid-template-columns: minmax(0, 1fr); } .flash-grid .flasher { order: -1; } }
.flasher {
  position: relative;
  background:
    linear-gradient(180deg, rgba(26, 33, 66, .9), rgba(12, 16, 34, .95));
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, .08), 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(62, 240, 255, .35);
}
.flasher-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.flasher-title h3 { font-family: var(--font-pixel); font-weight: 400; font-size: .85rem; letter-spacing: .06em; margin: 0; color: var(--yellow); }
.led { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); }
.led::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 2px rgba(255,255,255,.06); }
.led[data-state="ok"]::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.led[data-state="warn"]::before { background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.led[data-state="bad"]::before { background: var(--red); box-shadow: 0 0 10px var(--red); }

.board-picker { border: 0; margin: 0 0 1.2rem; padding: 0; min-width: 0; }
.board-picker legend { font-weight: 700; margin-bottom: .6rem; padding: 0; font-size: .95rem; }
.board-options { display: grid; gap: .7rem; }
.board-option { position: relative; display: block; cursor: pointer; }
.board-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.board-option .opt {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .9rem; align-items: center;
  padding: .9rem 1rem;
  border: 2px solid var(--line-2);
  border-radius: 12px;
  background: rgba(10, 14, 29, .7);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.board-option .radio {
  grid-row: span 2;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line-2); display: grid; place-items: center;
}
.board-option .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.board-option .name { font-weight: 700; line-height: 1.3; }
.board-option .spec { grid-column: 2 / 3; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.board-option .badge { grid-row: 1; grid-column: 3; justify-self: end; }
.board-option .avail { grid-column: 3; grid-row: 2; justify-self: end; font-size: .78rem; color: var(--dim); white-space: nowrap; }
.board-option .avail[data-state="ok"] { color: var(--green); }
.board-option .avail[data-state="none"] { color: var(--orange); }
.board-option:hover .opt { border-color: var(--cyan); }
.board-option input:checked + .opt {
  border-color: var(--yellow);
  background: rgba(255, 210, 63, .06);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, .3), 0 0 24px rgba(255, 210, 63, .12);
}
.board-option input:checked + .opt .radio { border-color: var(--yellow); }
.board-option input:checked + .opt .radio::after { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.board-option input:focus-visible + .opt { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 480px) {
  .board-option .opt { grid-template-columns: auto minmax(0, 1fr); }
  .board-option .badge, .board-option .avail { grid-column: 2; grid-row: auto; justify-self: start; }
}

.build-info {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem;
  margin: 0 0 1.2rem; padding: 0;
}
.build-info div { background: rgba(6, 7, 15, .55); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; min-width: 0; }
.build-info dt { font-family: var(--font-pixel); font-size: .55rem; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; margin-bottom: .35rem; }
.build-info dd { margin: 0; font-family: var(--font-mono); font-size: .92rem; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 480px) { .build-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .build-info div:last-child { grid-column: 1 / -1; } }

.install-area {
  display: flex; flex-direction: column; align-items: stretch; gap: .9rem;
  padding: 1.1rem; border-radius: 12px;
  border: 1px dashed var(--line-2);
  background: rgba(6, 7, 15, .45);
  margin-bottom: 1rem;
}
.install-area .btn { width: 100%; font-size: .8rem; padding: 1.15rem 1.2rem; }
esp-web-install-button { display: block; }
esp-web-install-button:not(:defined) { display: none; }
esp-web-install-button [slot="activate"] { width: 100%; }
.install-status { margin: 0; font-size: .95rem; color: var(--muted); }
.install-status strong { color: var(--text); }
.dl-row { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; font-size: .92rem; }
.dl-row a { font-weight: 600; }
.safe-line {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .9rem; color: var(--muted); margin: 0;
}
.safe-line svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: .2rem; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1rem; }
.steps > li {
  counter-increment: step;
  position: relative;
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 1rem; align-items: start;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 46px; height: 46px;
  font-family: var(--font-pixel); font-size: .9rem; color: #0c0c12;
  background: var(--yellow);
  border-radius: 10px;
  box-shadow: 0 4px 0 #8a6b00, 0 0 18px rgba(255, 210, 63, .25);
}
.steps > li:nth-child(2n)::before { background: var(--cyan); box-shadow: 0 4px 0 #0d5e66, 0 0 18px rgba(62, 240, 255, .25); }
.steps > li > div > :last-child { margin-bottom: 0; }
.steps h3 { font-size: 1.06rem; margin: .55rem 0 .25rem; }
.steps p { color: var(--muted); margin-bottom: .5rem; }
.steps-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 980px) { .steps-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps-cards { grid-template-columns: minmax(0, 1fr); } }
.steps-cards > li {
  grid-template-columns: minmax(0, 1fr);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem;
}

/* ---------- systems ---------- */
.sys {
  display: flex; flex-direction: column;
}
.sys .sys-name { font-family: var(--font-pixel); font-size: .9rem; line-height: 1.5; margin-bottom: .6rem; }
.sys.ok { border-top: 3px solid var(--green); }
.sys.no { border-top: 3px solid var(--red); opacity: .95; }
.sys .ext { font-family: var(--font-mono); font-size: .85rem; color: var(--cyan-2); margin-top: auto; padding-top: .5rem; }
.why-list { display: grid; gap: .6rem; padding: 0; list-style: none; margin: 0; }
.why-list li {
  margin: 0; display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 1rem;
  padding: .75rem 1rem; border-radius: 10px; background: rgba(255, 107, 107, .05); border: 1px solid rgba(255, 107, 107, .2);
}
.why-list li b { font-family: var(--font-pixel); font-weight: 400; font-size: .68rem; line-height: 1.6; color: #ffb4b4; }
.why-list li span { color: var(--muted); font-size: .95rem; }
@media (max-width: 560px) { .why-list li { grid-template-columns: minmax(0, 1fr); gap: .3rem; } }

/* ---------- honesty / meters ---------- */
.honesty {
  border: 2px solid var(--cyan);
  border-radius: 18px;
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  background:
    repeating-linear-gradient(0deg, rgba(62, 240, 255, .025) 0 2px, transparent 2px 4px),
    rgba(10, 14, 29, .85);
  box-shadow: 0 0 0 1px rgba(62, 240, 255, .15), 0 0 60px -20px rgba(62, 240, 255, .4);
}
.meter { margin: 0 0 1.1rem; }
.meter-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 700; margin-bottom: .4rem; }
.meter-top span:last-child { font-family: var(--font-mono); color: var(--cyan-2); font-weight: 500; }
.meter-bar { height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); overflow: hidden; }
.meter-bar i {
  display: block; height: 100%;
  background: repeating-linear-gradient(90deg, var(--green) 0 10px, rgba(0,0,0,.35) 10px 12px);
  box-shadow: 0 0 12px rgba(93, 255, 158, .5);
}
.meter.y .meter-bar i { background: repeating-linear-gradient(90deg, var(--yellow) 0 10px, rgba(0,0,0,.35) 10px 12px); box-shadow: 0 0 12px rgba(255, 210, 63, .5); }
.meter-note { font-size: .88rem; color: var(--dim); margin-top: .3rem; }
.math {
  font-family: var(--font-mono); font-size: .9rem; color: var(--muted);
  background: rgba(6, 7, 15, .6); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; overflow-x: auto;
}
.math table { border-collapse: collapse; width: 100%; min-width: 420px; }
.math th, .math td { text-align: left; padding: .3rem .6rem .3rem 0; white-space: nowrap; }
.math th { color: var(--dim); font-weight: 500; }
.math td:last-child { color: var(--green); }

/* ---------- safety ---------- */
.safety {
  border: 2px solid var(--green);
  border-radius: 18px;
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  background:
    linear-gradient(135deg, rgba(93, 255, 158, .07), transparent 50%),
    rgba(10, 14, 29, .9);
  box-shadow: 0 0 60px -25px rgba(93, 255, 158, .45);
}
.safety h2 { text-shadow: 0 0 22px rgba(93, 255, 158, .35); }
.safety .vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0; }
@media (max-width: 720px) { .safety .vs { grid-template-columns: minmax(0, 1fr); } }
.safety .vs > div { border-radius: 12px; padding: 1.1rem 1.2rem; border: 1px solid var(--line-2); background: rgba(6, 7, 15, .55); }
.safety .vs > div > :last-child { margin-bottom: 0; }
.safety .vs .yes { border-color: rgba(93, 255, 158, .45); }
.safety .vs .never { border-color: rgba(255, 107, 107, .5); }
.safety .vs h3 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ---------- code ---------- */
pre {
  position: relative;
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem;
  background: #04050b;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  overflow-x: auto;
  color: #d8f9ff;
  line-height: 1.55;
  font-size: .9rem;
  tab-size: 2;
}
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
pre .c { color: var(--dim); }
pre .p { color: var(--yellow); user-select: none; }
pre.tree { border-left-color: var(--yellow); color: var(--text); }
pre.tree .d { color: var(--yellow); }
pre.tree .x { color: var(--cyan-2); }
pre.tree .n { color: var(--dim); }
pre.danger { border-left-color: var(--red); }
.code-wrap { position: relative; }
.copy-btn {
  position: absolute; top: .5rem; right: .5rem; z-index: 1;
  font-family: var(--font-pixel); font-size: .55rem; letter-spacing: .06em;
  padding: .5rem .6rem; border-radius: 6px;
  background: var(--panel-3); color: var(--muted); border: 1px solid var(--line-2);
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--cyan); }
.code-wrap pre { padding-right: 5.2rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 1.4rem; background: rgba(10, 14, 29, .7); }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.data caption { text-align: left; padding: .9rem 1rem .4rem; color: var(--muted); font-size: .88rem; }
table.data th, table.data td { padding: .65rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data thead th { font-family: var(--font-pixel); font-weight: 400; font-size: .58rem; letter-spacing: .08em; color: var(--yellow); text-transform: uppercase; background: rgba(255, 210, 63, .04); white-space: nowrap; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody th { font-weight: 700; color: var(--text); white-space: nowrap; }
table.data td { color: var(--muted); }
table.data td code { white-space: nowrap; }
table.data tbody tr:hover { background: rgba(62, 240, 255, .03); }
@media (max-width: 560px) {
  table.data { font-size: .9rem; }
  table.data th, table.data td { padding: .55rem .7rem; }
  table.data thead th, table.data tbody th { white-space: normal; }
  table.data td code { white-space: normal; }
}

/* ---------- flash layout bar ---------- */
.flashmap { margin: 1rem 0 1.6rem; }
.flashmap-bar { display: flex; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); }
.flashmap-bar > div {
  display: grid; place-items: center; text-align: center; padding: 0 .4rem; min-width: 0;
  font-family: var(--font-pixel); font-size: .55rem; line-height: 1.5; color: #0c0c12;
}
.flashmap-bar .fm-boot { flex: 0 0 9%; background: var(--magenta); }
.flashmap-bar .fm-app { flex: 1984 1 0; background: var(--cyan); }
.flashmap-bar .fm-rom { flex: 2048 1 0; background: var(--yellow); }
.flashmap-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: .7rem; font-size: .88rem; color: var(--muted); padding: 0; list-style: none; }
.flashmap-legend li { margin: 0; display: inline-flex; gap: .5rem; align-items: center; }
.flashmap-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }

/* ---------- guide layout ---------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); position: relative; overflow: hidden; }
.page-hero h1 { font-family: var(--font-pixel); font-weight: 400; font-size: clamp(1.4rem, 4.4vw, 2.5rem); line-height: 1.35; margin-bottom: .6em; text-shadow: 0 0 26px rgba(62, 240, 255, .35); }
.page-hero h1 .accent { color: var(--yellow); text-shadow: 0 0 26px rgba(255, 210, 63, .5); }
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-bottom: 4rem; }
@media (max-width: 960px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } }
.toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: .3rem; }
.toc details { border: 1px solid var(--line); border-radius: 12px; background: rgba(12, 16, 34, .8); }
.toc summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-pixel); font-size: .62rem; letter-spacing: .1em; color: var(--yellow);
  padding: .9rem 1rem;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: " +"; color: var(--dim); }
.toc details[open] summary::after { content: " –"; }
.toc ol { list-style: none; margin: 0; padding: 0 .5rem .7rem; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: .38rem .6rem; border-radius: 7px;
  color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.35;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.toc a.active { color: var(--yellow); border-left-color: var(--yellow); background: rgba(255, 210, 63, .06); }
@media (max-width: 960px) { .toc { position: static; max-height: none; } }

.doc { min-width: 0; }
.doc > section { padding-top: 1rem; margin-bottom: 3.2rem; scroll-margin-top: 84px; }
.doc > section > h2 {
  display: flex; align-items: baseline; gap: .8rem;
  padding-bottom: .8rem; border-bottom: 1px solid var(--line); margin-bottom: 1.3rem;
}
.doc > section > h2 .num { color: var(--yellow); font-size: .75em; text-shadow: var(--glow-y); flex: none; }
.doc h3 { margin-top: 1.8rem; }
.doc h3:first-child { margin-top: 0; }
.doc p, .doc li { color: #d3d8f4; }
.doc .card p { color: var(--muted); }
.anchor { color: var(--dim); text-decoration: none; margin-left: .3rem; font-family: var(--font-body); font-size: .8em; opacity: 0; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }

dl.defs { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr); gap: 0; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
dl.defs dt, dl.defs dd { margin: 0; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
dl.defs dt { font-weight: 700; color: var(--text); background: rgba(255, 255, 255, .02); }
dl.defs dd { color: var(--muted); }
dl.defs dt:last-of-type, dl.defs dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) {
  dl.defs { grid-template-columns: minmax(0, 1fr); }
  dl.defs dt { border-bottom: 0; padding-bottom: .1rem; }
  dl.defs dt:last-of-type { border-bottom: 0; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .7rem; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 20, 40, .75);
  transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--line-2); background: rgba(20, 26, 51, .85); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.1rem; position: relative;
  font-weight: 700; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-pixel); font-size: .8rem; color: var(--yellow);
}
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 1.1rem 1rem; color: var(--muted); }
.faq .a > :last-child { margin-bottom: 0; }

/* ---------- troubleshooting ---------- */
.trouble { display: grid; gap: .8rem; }
.trouble > div {
  display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 1.2rem;
  padding: 1rem 1.15rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(15, 20, 40, .7);
}
.trouble h3 { font-size: 1rem; margin: 0; color: var(--orange); }
.trouble p, .trouble ul { margin: 0; color: var(--muted); }
.trouble ul { padding-left: 1.1em; }
@media (max-width: 680px) { .trouble > div { grid-template-columns: minmax(0, 1fr); gap: .4rem; } }

/* ---------- diagrams ---------- */
.figure { margin: 1.2rem 0 1.8rem; }
.figure svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.figure figcaption { font-size: .86rem; color: var(--dim); margin-top: .6rem; }
.diagram text { font-family: var(--font-body); }
.diagram .pxl { font-family: var(--font-pixel); }

/* ---------- games page ---------- */
.legal-grid .card { border-top: 3px solid var(--line-2); }
.legal-grid .card.ok-card { border-top-color: var(--green); }
.legal-grid .card.no-card { border-top-color: var(--red); }
.legal-grid .verdict { font-family: var(--font-pixel); font-size: .62rem; letter-spacing: .08em; margin-bottom: .7rem; display: block; }
.legal-grid .ok-card .verdict { color: var(--green); }
.legal-grid .no-card .verdict { color: var(--red); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; align-items: center; }
.filters .label { font-size: .9rem; color: var(--muted); margin-right: .3rem; }
.chip {
  font-family: var(--font-pixel); font-size: .6rem; letter-spacing: .06em;
  padding: .65rem .8rem; border-radius: 999px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-2); cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--cyan); }
.chip[aria-pressed="true"] { background: var(--yellow); color: #111; border-color: var(--yellow); box-shadow: 0 0 16px rgba(255, 210, 63, .3); }

.sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 820px) { .sources { grid-template-columns: minmax(0, 1fr); } }
.source { display: flex; flex-direction: column; }
.source h3 { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex-wrap: wrap; font-size: 1.15rem; }
.source .host { font-family: var(--font-mono); font-size: .8rem; color: var(--dim); font-weight: 400; }
.source .lic {
  font-size: .9rem; color: var(--muted);
  border-left: 3px solid var(--green); padding: .35rem .7rem; margin: .2rem 0 1rem;
  background: rgba(93, 255, 158, .04); border-radius: 0 6px 6px 0;
}
.source .lic.warn { border-left-color: var(--orange); background: rgba(255, 169, 77, .05); }
.source .links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: auto 0 0; padding: 0; list-style: none; }
.source .links li { margin: 0; }
.source .links a { font-weight: 600; font-size: .95rem; }
.source .links a::after { content: " ↗"; font-size: .8em; color: var(--dim); }
.source.is-hidden { display: none; }
.filter-empty { color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .55rem; }
.checklist li {
  margin: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .7rem; align-items: start;
  padding: .75rem .9rem; border-radius: 10px; background: rgba(15, 20, 40, .7); border: 1px solid var(--line);
}
.checklist li::before {
  content: ""; width: 22px; height: 22px; margin-top: .15rem; border-radius: 5px;
  border: 2px solid var(--green);
  background:
    linear-gradient(45deg, transparent 45%, var(--green) 45% 60%, transparent 60%) no-repeat 3px 6px / 7px 7px,
    linear-gradient(-45deg, transparent 42%, var(--green) 42% 58%, transparent 58%) no-repeat 7px 3px / 10px 11px;
  box-shadow: 0 0 10px rgba(93, 255, 158, .25);
}

/* ---------- roadmap ---------- */
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; position: relative; }
.roadmap li {
  margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center;
  padding: 1rem 1.1rem; border: 1px dashed var(--line-2); border-radius: 12px; background: rgba(15, 20, 40, .55);
}
.roadmap li strong { display: block; }
.roadmap li span { color: var(--muted); font-size: .95rem; }

/* ---------- CTA ---------- */
.cta-grid .card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.cta-grid .card:hover { transform: translateY(-3px); border-color: var(--cyan); color: inherit; }
.cta-grid .card .go { margin-top: auto; font-family: var(--font-pixel); font-size: .62rem; color: var(--yellow); letter-spacing: .08em; padding-top: .6rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(4, 5, 11, .9); padding-block: 2.6rem 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.site-footer h2 { font-size: .68rem; color: var(--yellow); text-shadow: none; letter-spacing: .1em; margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { color: var(--muted); font-size: .92rem; }
.disclaimer { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--dim); }
.disclaimer p { color: var(--dim); font-size: .84rem; margin-bottom: .5rem; }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.lost h1 { font-family: var(--font-pixel); font-weight: 400; font-size: clamp(2.2rem, 10vw, 5rem); color: var(--yellow); text-shadow: 0 0 30px rgba(255, 210, 63, .5); margin-bottom: .3em; }

/* ---------- responsive hero ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .tagline { max-width: none; }
  .board-svg { transform: none; }
  .board-wrap:hover .board-svg { transform: none; }
  .hero-sun { width: 360px; height: 360px; right: -140px; top: 10px; opacity: .35; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .board-svg .blink { visibility: visible; }
  .board-svg { transform: none !important; }
}

/* ---------- print ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, .hero-floor, .hero-sun, .site-header, .toc, .copy-btn { display: none !important; }
  a { color: #000; }
}

/* games catalog (games.html#auto) */
.cat-summary { color: var(--text); margin: 0 0 1rem; }
.cat-filters .cat-search {
  flex: 1 1 220px; margin-left: auto; min-width: 0;
  font: inherit; font-size: .95rem; color: var(--text);
  background: rgba(10, 14, 29, .8); border: 1px solid var(--line-2); border-radius: 999px;
  padding: .55rem 1rem;
}
.cat-filters .cat-search:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cat-wrap { max-height: 480px; overflow: auto; }
.cat-table thead th { position: sticky; top: 0; z-index: 1; background: #0d1226; }
.cat-table { table-layout: fixed; min-width: 640px; }
.cat-table .c-game { width: 34%; }
.cat-table .c-sys { width: 9.5rem; }
.cat-table .c-author { width: 24%; }
.cat-table .c-lic { width: 18%; }
.cat-table .c-size { width: 5.5rem; }
.cat-table th, .cat-table td { overflow-wrap: anywhere; }
.cat-table td:nth-child(2), .cat-table td:last-child, .cat-table thead th { white-space: nowrap; }
.cat-table td:last-child, .cat-table thead th:last-child { text-align: right; }
