/* What is the Apple IIGS? - 2026 rebuild.
   Palette: IIgs platinum case + the six badge stripe colors.
   Type: system UI for text, monospace accents for the retro voice. */

:root {
  --platinum: #e3e1d9;
  --platinum-dark: #cfccc2;
  --ink: #26251f;
  --ink-soft: #5d5b52;
  --paper: #faf7ee;
  --card: #ffffff;
  --accent: #01a1df;
  --accent-dark: #0077a8;
  --g1: #76bd21; --g2: #ffc728; --g3: #ff651b;
  --g4: #d10e30; --g5: #b01dac; --g6: #01a1df;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(38, 37, 31, .08), 0 4px 14px rgba(38, 37, 31, .06);
  /* the rainbow, horizontal and vertical */
  --rainbow-h: linear-gradient(90deg,
    var(--g1) 0 16.6%, var(--g2) 16.6% 33.3%, var(--g3) 33.3% 50%,
    var(--g4) 50% 66.6%, var(--g5) 66.6% 83.3%, var(--g6) 83.3% 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1100px 520px at 12% -5%, rgba(1,161,223,.10), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(255,101,27,.09), transparent 55%),
    radial-gradient(1000px 600px at 50% 108%, rgba(176,29,172,.06), transparent 55%),
    var(--paper);
  color: var(--ink);
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 2rem; }

/* rainbow rule under major headings */
h1.rule, h2.rule, .rule {
  position: relative; padding-bottom: 12px;
}
h1.rule::after, h2.rule::after, .rule::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 120px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg,
    var(--g1) 0 16.6%, var(--g2) 16.6% 33.3%, var(--g3) 33.3% 50%,
    var(--g4) 50% 66.6%, var(--g5) 66.6% 83.3%, var(--g6) 83.3% 100%);
}

.stripe-bar { display: flex; height: 6px; }
.stripe-bar span { flex: 1; }

/* ------------------------------------------------ header: GS/OS menu bar */
.site-header { position: sticky; top: 0; z-index: 50; }
.menubar {
  background: #fff; border-bottom: 2px solid #000;
  display: flex; align-items: center; gap: 2px;
  padding: 0 14px; height: 40px;
}
.apple-menu {
  display: flex; align-items: center; padding: 0 9px; height: 30px;
  border-radius: 5px; flex: none;
}
.apple-menu svg { width: 26px; height: 26px; display: block; }
.apple-menu:hover { background: #000; }
.menu-title {
  font-weight: 700; color: #000; padding: 3px 10px; border-radius: 5px;
  white-space: nowrap; flex: none;
}
.menu-title:hover { background: #000; color: #fff; text-decoration: none; }
.menu-items { display: flex; gap: 0; flex-wrap: nowrap; overflow-x: auto; }
.menu-items a {
  padding: 3px 11px; color: #000; font-size: .95rem; font-weight: 500;
  border-radius: 5px; white-space: nowrap;
}
.menu-items a:hover, .menu-items a.on {
  background: #000; color: #fff; text-decoration: none;
}
.header-tools {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  flex: 0 1 280px; min-width: 0;
}
.theme-toggle {
  flex: none; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center;
  border: 1.5px solid #000; border-radius: 6px; background: #fff;
  color: #000; cursor: pointer;
}
.theme-toggle:hover { background: #000; color: #fff; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.theme-ic { width: 16px; height: 16px; display: block; }
.theme-ic-sun { display: none; }
[data-theme="dark"] .theme-ic-moon { display: none; }
[data-theme="dark"] .theme-ic-sun { display: block; }
.header-search { position: relative; flex: 1 1 auto; min-width: 120px; }
.header-search input {
  width: 100%; padding: 4px 11px; font-size: .88rem; height: 27px;
  border: 1.5px solid #000; border-radius: 6px; background: #fff;
}
.header-search input:focus { outline: 2px solid var(--accent); }
/* phone / narrow: title + theme + search on row 1 (old layout),
   nav links scroll on their own row underneath */
@media (max-width: 900px) {
  .menubar {
    flex-wrap: wrap; height: auto; min-height: 40px;
    padding: 5px 10px; row-gap: 2px;
  }
  .menu-title {
    flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis;
  }
  .header-tools {
    flex: 1 1 160px; max-width: none; min-width: 0;
  }
  .header-search { min-width: 0; }
  .header-search input { font-size: 16px; } /* no iOS focus-zoom */
  .menu-items {
    order: 3; flex: 1 1 100%; width: 100%;
    padding: 1px 0 3px; gap: 0;
  }
}
#q-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(38,37,31,.22);
  max-height: 65vh; overflow-x: hidden; overflow-y: auto; padding: 6px;
}
#q-results a {
  display: flex; gap: 10px; align-items: center;
  padding: 7px 9px; border-radius: 7px; color: var(--ink);
  min-width: 0;
}
#q-results a:hover, #q-results a.sel { background: var(--paper); text-decoration: none; }
#q-results img, #q-results .noart {
  width: 34px; height: 34px; object-fit: cover; border-radius: 5px;
  background: var(--platinum); flex: none;
}
#q-results .noart { display: grid; place-items: center; font-size: .7rem; color: var(--ink-soft); }
#q-results .q-hit { min-width: 0; flex: 1 1 auto; overflow: hidden; }
#q-results .meta, #q-results .onboot, #q-results .snip {
  display: block; color: var(--ink-soft); font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#q-results .none { padding: 12px; color: var(--ink-soft); }

/* ------------------------------------------------ layout */
main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.crumb { font-size: .88rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-weight: 400; }

.hero {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  align-items: center; column-gap: 42px; row-gap: 14px;
  padding: 44px 8px 18px;
}
.hero-copy { min-width: 0; }
.hero-kicker {
  margin: 0 0 7px; color: var(--ink-soft);
  font-size: .76rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 { font-size: 2.85rem; margin: 0 0 12px; }
.hero-art { position: relative; text-align: center; }
.hero-art::before {
  content: ""; position: absolute; inset: -30px -36px;
  background: conic-gradient(from 210deg,
    rgba(118,189,33,.16), rgba(255,199,40,.16), rgba(255,101,27,.16),
    rgba(209,14,48,.14), rgba(176,29,172,.14), rgba(1,161,223,.16),
    rgba(118,189,33,.16));
  border-radius: 50%; filter: blur(26px); z-index: 0;
}
.gs-photo-dark { display: none; }
.hero-art > .gs-photo {
  position: relative; z-index: 1; display: block; margin: 0 auto;
  width: 250px; max-width: 100%; height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 22px rgba(38,37,31,.25));
  animation: gs-float 7s ease-in-out infinite;
}
.hero-art > .gs-photo-dark { display: none; }
@keyframes gs-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) { .hero-art > .gs-photo { animation: none; } }
/* The hero IIGS full stack, carved from a Woz Limited Edition photo: the CRT
   glass is a transparent hole in the base PNG, the screenshot sits UNDER it
   so the hole's real rounded shape clips it pixel-perfectly (same trick as
   the a2cogs monitor). Power-on: LEDs light, then the tube warms up. */
.hero-art .gs-stack {
  position: relative; z-index: 1; width: 250px; max-width: 100%;
  margin: 0 auto; cursor: pointer;
  filter: drop-shadow(0 14px 22px rgba(38,37,31,.25));
  animation: gs-float 7s ease-in-out infinite;
}
.gs-stack-base { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.gs-stack-screen {
  position: absolute; left: 24.22%; top: 14.02%; width: 41.41%; height: 35.11%;
  background: #060606; overflow: hidden; z-index: 0;
}
/* soft inner shadow so the tube reads as glass */
.gs-stack-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 12px rgba(0,0,0,.45), inset 0 2px 5px rgba(0,0,0,.4);
}
.gs-stack-screen img {
  display: block; width: 100%; height: 100%; object-fit: fill;
  /* tube warm-up: sits dark ~5.5s so the "off" machine registers, then an
     even black-to-picture fade */
  opacity: 0; filter: brightness(.55);
  animation: gs-crt-on 8s ease-in-out 5.5s forwards;
}
@keyframes gs-crt-on {
  0%   { opacity: 0; filter: brightness(.55); }
  55%  { opacity: 1; filter: brightness(.85); }
  100% { opacity: 1; filter: brightness(1); }
}
/* power lights: PNGs lit from each slot's own pixels (glow baked in), the
   monitor notch and the case's front power light */
.gs-stack-led {
  position: absolute; z-index: 2; opacity: 0; pointer-events: none;
  background: 0 0 / 100% 100% no-repeat;
  animation: gs-led-on .25s ease-out 5s forwards;
}
.gs-stack-led-mon { left: 62.21%; top: 50.41%; width: 3.61%; height: 5.56%; background-image: url("iigs-woz-led-mon.png"); }
.gs-stack-led-cpu { left: 62.30%; top: 71.61%; width: 3.22%; height: 4.40%; background-image: url("iigs-woz-led-cpu.png"); }
@keyframes gs-led-on { to { opacity: 1; } }
/* 3.5 drive activity light: red flicker while the system "boots" (screen
   fade-in) and for a few seconds after, then idle. Irregular pattern baked
   into the keyframes so it reads as real disk activity. */
.gs-stack-led-drive {
  position: absolute; z-index: 2; opacity: 0; pointer-events: none;
  left: 90.53%; top: 52.84%; width: 3.32%; height: 3.94%;
  background: url("iigs-woz-led-drive.png") 0 0 / 100% 100% no-repeat;
  animation: gs-drive-flicker 11s linear 5.4s;
}
@keyframes gs-drive-flicker {
  0%, 2% { opacity: 0; }
  2.5%, 5% { opacity: 1; }
  5.5%, 7% { opacity: .12; }
  7.5%, 12% { opacity: 1; }
  12.5%, 16% { opacity: 0; }
  16.5%, 22% { opacity: 1; }
  23%, 25% { opacity: .15; }
  25.5%, 34% { opacity: 1; }
  35%, 38% { opacity: 0; }
  38.5%, 46% { opacity: 1; }
  46.5%, 48% { opacity: .12; }
  48.5%, 58% { opacity: 1; }
  59%, 63% { opacity: 0; }
  63.5%, 70% { opacity: 1; }
  70.5%, 72% { opacity: .15; }
  72.5%, 82% { opacity: 1; }
  83%, 86% { opacity: 0; }
  86.5%, 93% { opacity: 1; }
  94%, 100% { opacity: 0; }
}
/* click-to-toggle power: once JS adds .manual, the auto sequence is off and
   .is-on drives the LEDs + warm-up with no initial dark sit */
.gs-stack.manual .gs-stack-screen img {
  animation: none; opacity: 0; filter: brightness(.55);
  transition: opacity .4s ease-out, filter .4s ease-out;
}
.gs-stack.manual .gs-stack-led { animation: none; opacity: 0; transition: opacity .18s ease-out; }
.gs-stack.manual.is-on .gs-stack-led { opacity: 1; transition-delay: .15s; }
.gs-stack.manual.is-on .gs-stack-screen img { animation: gs-crt-on 6.5s ease-in-out .55s forwards; }
.gs-stack.manual .gs-stack-led-drive { animation: none; opacity: 0; }
.gs-stack.manual.is-on .gs-stack-led-drive { animation: gs-drive-flicker 9s linear .5s; }
@media (prefers-reduced-motion: reduce) {
  .hero-art .gs-stack { animation: none; }
  .gs-stack-screen img { animation: none; opacity: 1; filter: none; }
  .gs-stack-led { animation: none; opacity: 1; }
  .gs-stack-led-drive { animation: none; opacity: 0; }
}
.rainbow-gs {
  font-family: Georgia, serif; font-weight: 700; font-style: italic;
  /* stripes compressed into the glyphs' x-height band so all six colors
     actually land on ink instead of the empty line box above and below */
  background: linear-gradient(180deg,
    var(--g1) 0 31%, var(--g2) 31% 41%, var(--g3) 41% 51%,
    var(--g4) 51% 61%, var(--g5) 61% 71%, var(--g6) 71% 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* the GS runs smaller than the II, like the IIGS case badge */
.rainbow-gs .gs-small { font-size: .68em; letter-spacing: .02em; }
/* one shared measure for intro copy everywhere, so pages line up */
.lede { max-width: 760px; margin: 0; font-size: 1.08rem; color: var(--ink-soft); }
.lede-left { max-width: 760px; font-size: 1.05rem; color: var(--ink-soft); }
.hero-cta {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 0;
}
.hero-cta .btn {
  flex: 1 1 218px; min-width: 0; white-space: nowrap;
}
/* The side-by-side hero narrows before the full mobile stack kicks in.
   Switch the actions to a clean 2+1 arrangement instead of crushing labels. */
@media (min-width: 761px) and (max-width: 1000px) {
  .hero-cta {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-cta .btn { width: 100%; }
  .hero-cta .btn:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr; gap: 22px;
    padding-top: 34px; text-align: center;
  }
  .hero-art > .gs-photo { width: 190px; }
  .hero-art .gs-stack { width: 190px; }
  .hero .lede, .hero-cta { margin-left: auto; margin-right: auto; }
  .hero-cta { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .hero h1 { font-size: 2.25rem; }
  .hero-cta { display: grid; grid-template-columns: 1fr; }
}
/* the GS/OS boot dialog, rebuilt from the real System 6.0.1 splash:
   icon and "Welcome to the IIGS" text are 1:1 pixel crops of the actual
   boot screen; the thermometer fills red in chunky steps on page load */
.boot-dialog {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  position: relative; z-index: 1;  /* above the hero glow, stays white */
  margin-top: 16px; padding: 9px 12px 10px 10px;
  background: #fff; border: 2px solid #000;
  box-shadow: 0 0 0 1px #fff, 0 0 0 2px #000;
}
.bd-icon, .bd-title { image-rendering: pixelated; display: block; }
.bd-art-dark { display: none; }
.bd-body { display: flex; flex-direction: column; align-items: center;
  gap: 9px; }
.bd-thermo {
  display: block; width: 144px; height: 12px;
  border: 2px solid #000; background: #fff; box-sizing: content-box;
}
/* one slow, smooth 10s boot: fill for ~8.5s, rest full, then again */
.bd-fill {
  display: block; height: 100%; width: 0; background: #b40000;
  animation: bd-boot 10s linear .5s infinite;
}
@keyframes bd-boot {
  0% { width: 0; }
  85% { width: 100%; }
  100% { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-fill { animation: none; width: 100%; }
}

/* Build-generated archive counters form one neutral footer inside the hero.
   Labels stay inside the control so it reads as one object, not four cards. */
.archive-status {
  grid-column: 1 / -1; margin: 0; padding: 0;
}
.archive-status-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0; overflow: hidden;
  background: #fff; border: 1px solid #7c7a70;
  box-shadow: 2px 3px 0 rgba(38,37,31,.18);
}
.archive-stat {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-width: 0; padding: 4px 8px 3px;
  color: var(--ink); border-right: 1px solid #aaa79d;
  text-align: center;
}
.archive-stat:last-child { border-right: 0; }
.archive-stat-label {
  margin-top: 1px; color: var(--ink-soft);
  font-size: .66rem; line-height: 1.1; font-weight: 600;
}
.archive-stat strong {
  color: var(--ink); font-size: 1.12rem; line-height: 1; font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.archive-stat-action {
  margin-top: 1px; color: var(--accent-dark);
  font-size: .66rem; line-height: 1.1; font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px;
}
.archive-stat-action:hover { color: var(--ink); }
@media (max-width: 860px) {
  .archive-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-stat:nth-child(3) { border-right: 0; }
  .archive-stat:nth-child(-n+3) { border-bottom: 1px solid #aaa79d; }
}
@media (max-width: 520px) {
  .archive-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-stat { border-right: 1px solid #aaa79d; }
  .archive-stat:nth-child(2n) { border-right: 0; }
  .archive-stat:nth-child(-n+4) { border-bottom: 1px solid #aaa79d; }
  .archive-stat:nth-child(5) { border-bottom: 0; grid-column: 1 / -1; }
}
/* GS/OS buttons: pixel frames traced from the real control (stepped
   corners, 2px border), applied via border-image so any label fits.
   Hover = the classic full inversion. */
.btn {
  display: inline-block; padding: 0 24px;
  color: #000; font-weight: 600; line-height: 16px;
  border: 10px solid transparent;
  border-image: url("btn.png") 10 fill stretch;
  image-rendering: pixelated;
  min-width: 218px; text-align: center; box-sizing: border-box;
}
.btn:hover { text-decoration: none; filter: invert(1); }
.btn:active { transform: translateY(1px); }
.btn-default {
  border-width: 14px;
  border-image: url("btn-default.png") 14 fill stretch;
  padding: 0 20px; line-height: 20px;
}

/* small title + rainbow rule between hero stats and category disks */
.home-break {
  margin: 28px 0 4px;
}
.home-break .rule {
  margin: 0;
  font-size: 1.35rem;
}

.groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin: 18px 0 10px;
}
/* zero-specificity default so the .g-* assignments below always win */
:where(.group-tile, .browse-group) { --gc: var(--accent); }
/* the five groups wear the Apple logo stripes in order:
   green, yellow, orange, red, purple (yellow darkened for legibility) */
.g-applications { --gc: var(--g1); }
.g-games { --gc: #d6a400; }
.g-educational { --gc: var(--g3); }
.g-hardware { --gc: var(--g4); }
.g-publications { --gc: var(--g5); }
.g-more { --gc: var(--g6); }
/* each home category tile is a 3.5" floppy, proportioned from a real
   disk (90 x 94 mm shell, shutter 54% of the width by a third of the
   height, flush with the top edge). The shutter is one connected metal
   plate with a window punched in its right half; on hover it slides
   left so the window lines up with the media underneath. Chamfered
   corners top left and top right, write-protect hole bottom right. */
.group-tile-wrap {
  display: block;
  container-type: inline-size;
  container-name: floppy;
  filter: drop-shadow(3px 4px 0 rgba(38,37,31,.22))
          drop-shadow(0 6px 12px rgba(20,16,8,.10));
  transition: filter .12s ease;
}
.group-tile-wrap:hover {
  filter: drop-shadow(3px 5px 0 rgba(38,37,31,.20))
          drop-shadow(0 12px 22px rgba(20,16,8,.13));
}
.group-tile {
  position: relative; aspect-ratio: 90 / 94;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--gc) 30%, #ffffff),
    color-mix(in srgb, var(--gc) 12%, #ffffff) 70%);
  padding: 0; color: var(--ink);
  clip-path: polygon(9px 0, calc(100% - 18px) 0, 100% 18px,
                     100% 100%, 0 100%, 0 9px);
  transition: transform .12s ease;
}
.group-tile:hover { transform: translateY(-3px); text-decoration: none; }
.fd-top { display: block; position: relative; height: 66px; overflow: hidden; }
/* molded insertion arrow, upper left of the shell pointing up */
.fd-top::before { content: ""; position: absolute; top: 10px; left: 14px;
  border: 5px solid transparent;
  border-bottom: 8px solid color-mix(in srgb, var(--gc) 45%, #6668); }
/* the disk, seen through the shutter window once it slides */
.fd-media { position: absolute; top: 4px; left: calc(50% - 18px);
  width: 27px; height: 58px; border-radius: 2px;
  background: radial-gradient(circle at 50% 120%, #3a3d44, #17181c 70%);
  box-shadow: inset 0 0 3px rgba(0,0,0,.8); }
/* one connected metal plate; the window is a hole masked out of it.
   Geometry measured from a photo of a real disk: window 25% of the
   plate width starting at 59%, running nearly the full height */
.fd-shutter { position: absolute; top: 0; left: calc(50% - 54px);
  width: 108px; height: 66px; border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #eef0f3, #b4bac2 60%, #d0d4da);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
  -webkit-mask: linear-gradient(#000 0 0),
                linear-gradient(#000 0 0) 64px 4px / 27px 58px no-repeat;
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0),
        linear-gradient(#000 0 0) 64px 4px / 27px 58px no-repeat;
  mask-composite: exclude;
  transition: transform .3s ease; }
/* real shutters travel only one window-width */
.group-tile:hover .fd-shutter { transform: translateX(-28px); }
@media (prefers-reduced-motion: reduce) { .fd-shutter { transition: none; } }
/* Wide tiles (mobile single-column, large tablets): uniformly scale the
   tuned 200px-tile pixel geometry with cqw. Percentage-of-tile-height
   stretched the shutter plate (108×66) and put the window in the wrong
   place. Desktop multi-column (<250px) keeps the fixed pixels above. */
@container floppy (min-width: 250px) {
  .group-tile .fd-top { height: 33cqw; } /* 66/200 */
  .group-tile .fd-top::before {
    top: 5cqw; left: 7cqw;           /* 10/200, 14/200 */
    border-width: 0 2.5cqw 4cqw;     /* 5 / 8 */
  }
  .group-tile .fd-media {
    top: 2cqw;                        /* 4/200 */
    left: calc(50% - 9cqw);           /* 18/200 */
    width: 13.5cqw; height: 29cqw;    /* 27/200, 58/200 */
  }
  .group-tile .fd-shutter {
    left: calc(50% - 27cqw);          /* 54/200 */
    width: 54cqw; height: 33cqw;      /* 108/200, 66/200 */
    -webkit-mask: linear-gradient(#000 0 0),
                  linear-gradient(#000 0 0) 32cqw 2cqw / 13.5cqw 29cqw no-repeat;
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0),
          linear-gradient(#000 0 0) 32cqw 2cqw / 13.5cqw 29cqw no-repeat;
    mask-composite: exclude;
  }
  .group-tile:hover .fd-shutter { transform: translateX(-14cqw); } /* 28/200 */
}
/* write-protect hole */
.group-tile::after { content: ""; position: absolute;
  right: 4px; bottom: 7px; width: 7px; height: 7px; border-radius: 1px;
  background: color-mix(in srgb, var(--gc) 30%, #2a2d33);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.7); }
/* the label sticker: faint ruled lines, colored head stripe, thin border */
.fd-top { flex: none; }
.fd-label { display: block; flex: 1; margin: 4px 14px 14px; padding: 9px 12px 11px;
  background:
    repeating-linear-gradient(180deg,
      transparent 0 21px, rgba(112,100,80,.16) 21px 22px) #fff;
  border-radius: 2px; border: 1px solid color-mix(in srgb, var(--gc) 40%, #fff);
  border-top: 4px solid var(--gc);
  box-shadow: 0 1px 3px rgba(0,0,0,.14); color: var(--ink); }
.tile-ic { display: inline-block; width: 30px; height: 30px; color: var(--gc); }
.tile-ic svg { width: 100%; height: 100%; }
.group-tile .tile-ic { margin-bottom: 6px; }
.group-tile strong { display: block; font-size: 1.05rem; }
.fd-label > span:not(.tile-ic) { display: block; color: var(--ink-soft);
  font-size: .85rem; }
.group-tile em { display: block; font-style: normal; font-size: .82rem;
  color: var(--ink-soft); margin-top: 6px; }

/* ------------------------------------------------ cards & grids */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; margin: 18px 0 30px;
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); color: var(--ink); display: flex;
  flex-direction: column; position: relative;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card::after {
  /* rainbow baseline that slides in on hover */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg,
    var(--g1) 0 16.6%, var(--g2) 16.6% 33.3%, var(--g3) 33.3% 50%,
    var(--g4) 50% 66.6%, var(--g5) 66.6% 83.3%, var(--g6) 83.3% 100%);
  transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.card:hover { transform: translateY(-4px); text-decoration: none;
  box-shadow: 0 10px 26px rgba(38,37,31,.16); }
.card:hover::after { transform: scaleX(1); }
.card .art { aspect-ratio: 3 / 4; background: var(--platinum);
  display: grid; place-items: center; overflow: hidden; }
.card .art img { width: 100%; height: 100%; object-fit: cover;
  image-rendering: auto; }
.card .noart { font-family: Georgia, serif; font-size: 1.7rem; color: #b6b3a8; }
.card .t { padding: 8px 10px 2px; font-size: .88rem; font-weight: 600; line-height: 1.25; }
.card .card-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; flex-wrap: wrap; padding: 0 10px 9px; min-height: 1.2em;
}
.card .y { font-size: .78rem; color: var(--ink-soft); }
.card .card-boot {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: auto; padding: 1px 6px 1px 4px;
  font-size: .62rem; font-weight: 700; letter-spacing: .02em;
  line-height: 1.3; color: #173a08; white-space: nowrap;
  background: rgba(118, 189, 33, .28); border: 1px solid rgba(118, 189, 33, .55);
  border-radius: 4px;
}
.card .card-boot-ic { flex: none; display: block; color: #3f8f12; }

/* compact shelf (home page highest-rated row) */
.grid-shelf { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.grid-shelf .card .t { font-size: .74rem; padding: 6px 7px 2px; }
.grid-shelf .card .card-meta { padding: 0 7px 7px; }
.grid-shelf .card .y { font-size: .68rem; }
.grid-shelf .card .card-boot { font-size: .58rem; padding: 0 5px 0 3px; }
.grid-shelf .card .card-boot-ic { width: 9px; height: 9px; }
.grid-shelf .card .noart { font-size: 1.2rem; }

/* browse page: the groups as a grid of panels, subcategories as
   ruled rows inside each panel with counts on the right margin */
.browse-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px; margin: 22px 0;
}
@media (max-width: 860px) { .browse-grid { grid-template-columns: 1fr; } }
.browse-group {
  padding: 16px 20px 10px;
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--gc) 9%, #ffffff), #ffffff 70%);
  border-radius: 14px; border-top: 4px solid var(--gc);
  box-shadow: var(--shadow);
}
.browse-group.is-collapsed { padding-bottom: 14px; }
.browse-group.is-collapsed .g-blurb { margin-bottom: 0; }
.browse-group h2 { margin: 0; }
.browse-group-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 0; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 700; font-size: inherit; line-height: inherit;
  letter-spacing: inherit; color: inherit; text-align: left; cursor: pointer;
}
.browse-group-toggle:hover { color: var(--ink); }
.browse-group-toggle:focus-visible {
  outline: 2px solid var(--gc); outline-offset: 3px; border-radius: 6px;
}
.browse-group-name { min-width: 0; }
.browse-chevron {
  flex: none; width: .55em; height: .55em; margin-left: 2px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg); transition: transform .15s ease;
}
.browse-group.is-collapsed .browse-chevron {
  transform: rotate(-45deg); margin-top: 0;
}
.g-total { margin-left: auto; font-size: .82rem; font-weight: 700;
  color: var(--gc); background: color-mix(in srgb, var(--gc) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--gc) 35%, #fff);
  padding: 2px 10px; border-radius: 999px; }
.g-blurb { margin: 4px 0 10px; font-size: .85rem; color: var(--ink-soft); }
.muted-count { font-size: .85rem; font-weight: 400; color: var(--ink-soft);
  margin-left: 6px; }
.cat-rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
/* Author display:grid beats the UA [hidden] rule; keep collapse working. */
.cat-rows[hidden],
.browse-group.is-collapsed .cat-rows { display: none; }
@media (max-width: 480px) { .cat-rows { grid-template-columns: 1fr; } }
.cat-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 2px; font-size: .95rem; color: var(--ink);
  border-bottom: 1px dotted color-mix(in srgb, var(--gc) 35%, #ddd);
}
.cat-row span { margin-left: auto; font-size: .8rem; font-variant-numeric: tabular-nums;
  color: var(--ink-soft); }
.cat-row:hover { text-decoration: none;
  background: color-mix(in srgb, var(--gc) 14%, #fff); }
.cat-row:hover span { color: var(--ink); }

.az-bar { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0;
  position: sticky; top: 50px; background: var(--paper); padding: 6px 0;
  z-index: 5; }
.az-bar a { padding: 3px 9px; border-radius: 6px; background: var(--card);
  box-shadow: var(--shadow); color: var(--ink); font-size: .9rem;
  transition: background .1s ease, color .1s ease; }
.az-bar a:hover { background: var(--ink); color: #fff; text-decoration: none; }

/* ------------------------------------------------ title page */
.title-page { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 30px; }
@media (max-width: 760px) { .title-page { grid-template-columns: 1fr; }
  .title-side { order: -1; } }
.meta { border-collapse: collapse; margin: 14px 0; width: 100%; max-width: 560px; }
.meta th { text-align: left; padding: 6px 14px 6px 0; color: var(--ink-soft);
  font-weight: 500; white-space: nowrap; vertical-align: top; }
.meta td { padding: 6px 0; }
.meta tr { border-bottom: 1px solid #e8e6df; }
.cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.downloads { padding-left: 20px; }
.downloads li { margin: 6px 0; }
.title-boot-actions {
  margin: 14px 0; padding: 10px 14px 14px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(1,161,223,.09), rgba(118,189,33,.09));
  border-left: 4px solid var(--accent);
  font-size: .92rem;
}
.title-boot-note { margin: 0 0 12px; }
.title-boot-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin: 0;
}
.title-boot-links .btn,
.title-boot-links .btn-default {
  display: inline-block; box-sizing: border-box;
  min-width: 10.5rem; flex: 0 1 10.5rem; text-align: center;
  font-size: .8rem; padding: 0 5px; line-height: 12px;
}
.shots { display: flex; flex-wrap: wrap; gap: 12px; }
.shot { max-width: 100%; border-radius: 6px; box-shadow: var(--shadow);
  image-rendering: pixelated; }

/* ------------------------------------------------ boot disks */
/* GS/OS Finder hard drive, traced from the real icon: a flat wide slab,
   1px black outline, 50% checkerboard dither, white indicator at the right.
   Rendered from an exact-pixel PNG at integer multiples so the dither and
   the rectangle stay perfect. */
.disk-ic {
  flex: none; width: 58px; height: 17px;
  background: url("hd.png") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
}
.disk-ic.big { width: 116px; height: 34px; }
/* 1.5x size: from a 3x png so it's 1:1 on retina, smooth half-scale on 1x */
.disk-ic.mid {
  width: 87px; height: 25.5px;
  background-image: url("hd3x.png"); image-rendering: auto;
}

/* GS/OS NuBus / expansion-card icon (ROM downloads). Exact-pixel PNG. */
.card-ic {
  flex: none; width: 34px; height: 11px;
  background: url("card.png") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
}
.card-ic.mid {
  width: 51px; height: 16.5px;
  background-image: url("card3x.png"); image-rendering: auto;
}

.boot-home { margin: 34px 0; }
.boot-home-intro {
  display: flex; align-items: center; justify-content: space-between;
  gap: 34px; margin: 18px 0 8px;
}
.boot-home-intro > div:first-child { flex: 1 1 480px; }
.boot-home-intro h3 { margin: 0 0 7px; font-size: 1.2rem; }
.boot-home-intro p { max-width: 680px; margin: 0; }
.boot-home-intro .boot-dialog {
  flex: 0 0 auto; margin: 0 4px 0 auto;
}
@media (max-width: 720px) {
  .boot-home-intro { flex-wrap: wrap; }
  .boot-home-intro .boot-dialog { margin: 8px auto 0; }
}

/* GS/OS Finder icon label: tight white slab, bold black text, sits
   2px under the icon; hover = classic inverse-video selection. The
   label is inline with per-line box cloning so the white hugs each
   line of text, and the line-height is low enough that wrapped lines
   stack into one contiguous label like real Finder HD labels. */
.gslabel-wrap {
  margin-top: 2px; text-align: center;
  font-size: .78rem; line-height: 1.3;
}
.gslabel {
  display: inline; font-weight: 700;
  background: #fff; color: #000; padding: 1px 5px 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.gslabel.inv { background: #000; color: #fff; }
.gsdisk:hover .gslabel { background: #000; color: #fff; }
.gsdisk:hover .gslabel.inv { background: #fff; color: #000; }
.gsdisk:hover .disk-ic,
.gsdisk:hover .card-ic { filter: invert(1); }

/* GS/OS Finder-style windows (boot disks page) */
.gswindow {
  margin: 26px 0; background: var(--platinum);
  border: 1px solid #7c7a70; border-radius: 7px; overflow: hidden;
  box-shadow: 3px 4px 0 rgba(38,37,31,.22), var(--shadow);
}
.gswindow-bar {
  height: 28px; display: flex; align-items: center; padding: 0 10px;
  background: repeating-linear-gradient(180deg,
    var(--platinum) 0 3px, #aeaba0 3px 4px);
  border-bottom: 1px solid #7c7a70; position: relative;
}
.gsclose, .gszoom {
  width: 13px; height: 13px; background: var(--platinum);
  border: 1.5px solid var(--ink); flex: none;
}
.gszoom { margin-left: auto; position: relative; }
.gszoom::after { content: ""; position: absolute; inset: 1px 4px 4px 1px;
  border: 1.5px solid var(--ink); }
.gswindow-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: var(--platinum); padding: 0 14px;
  font-weight: 700; font-size: .88rem; letter-spacing: .01em;
  white-space: nowrap;
}
.gswindow-info {
  padding: 5px 14px; font-size: .8rem; color: var(--ink-soft);
  background: #edebe4; border-bottom: 1px solid #c8c5ba;
}
.gswindow-info-select { min-height: 30px; }
.gswindow-actions {
  display: flex; align-items: center; flex-direction: column;
  gap: 5px; min-width: 0; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid #c8c5ba; color: var(--ink);
}
.gswindow-actions-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 700; text-align: center;
}
.gswindow-actions-links {
  display: flex; align-items: center; justify-content: center;
  gap: 9px; white-space: nowrap;
}
.gswindow-actions-links > span { display: none; }
.gswindow-actions-links a {
  min-width: 84px; padding: 3px 10px;
  border: 1px solid #000; border-radius: 2px;
  background: #fff; box-shadow: 1px 1px 0 #000;
  color: #000; font-weight: 700; text-align: center;
  text-decoration: none;
}
.gswindow-actions-links a:not([aria-disabled="true"]):hover {
  background: #000; color: #fff;
}
.gswindow-actions-links a[aria-disabled="true"] {
  border-color: #9b998f; background: #d8d6cf; box-shadow: none;
  color: #8a887f; pointer-events: none;
}
@media (max-width: 620px) {
  .gswindow-actions-links { flex-wrap: wrap; }
}
.gsdesk {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 6px; padding: 18px 14px 20px;
  background:
    radial-gradient(circle at 1px 1px, rgba(38,37,31,.05) 1px, transparent 1.5px)
    0 0 / 8px 8px, #dbd8cf;
}
.gsdisk {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 8px 10px; border-radius: 8px; color: var(--ink);
  text-align: center;
}
.gsdisk:hover { text-decoration: none; }
.gsdisk-selectable { cursor: default; }
.gswindow[data-disk-actions] .gsdisk-selectable:not(.selected):hover .gslabel {
  background: #fff; color: #000;
}
.gswindow[data-disk-actions] .gsdisk-selectable:not(.selected):hover .disk-ic {
  filter: none;
}
.gsdisk-selectable.selected .gslabel {
  background: #000; color: #fff;
}
.gsdisk-selectable.selected .disk-ic {
  background-image: url("hd-selected3x.png"); filter: none;
}
.gsdisk-size { font-size: .72rem; color: var(--ink-soft); margin-top: 3px; }

/* Home Boot Disks shelf: "+N more" without a drive icon. Same cell
   footprint as a mid disk tile, stack + count instead of hd.png. */
.gsdisk-more-mark {
  flex: none;
  width: 87px;
  height: 40px;
  display: grid;
  place-items: center;
  position: relative;
}
.gsdisk-more-stack {
  position: absolute;
  inset: 4px 6px 10px;
}
.gsdisk-more-stack i {
  position: absolute;
  left: 0; right: 0;
  height: 11px;
  border: 1.5px solid #000;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 72%, #fff 72% 78%, transparent 78%),
    repeating-conic-gradient(#bdb9ad 0% 25%, #e4e1d6 0% 50%) 0 0 / 3px 3px;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, .18);
}
.gsdisk-more-stack i:nth-child(1) {
  top: 0; left: 12px; right: 12px; opacity: .4;
}
.gsdisk-more-stack i:nth-child(2) {
  top: 7px; left: 6px; right: 6px; opacity: .7;
}
.gsdisk-more-stack i:nth-child(3) { top: 14px; }
.gsdisk-more-count {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding: 1px 7px 2px;
  border: 1.5px solid #000;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
  box-shadow: 1px 1px 0 #000;
}
.gsdisk-more:hover .gsdisk-more-count {
  background: #000;
  color: #fff;
}
.gsdisk-more:hover .gsdisk-more-stack i {
  filter: invert(1);
}

/* contents-page header: title left, drive + download button right */
.fs-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.fs-head > div { min-width: 0; }
.fs-actions {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  align-items: end; gap: 18px;
}
.fs-dl {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: 10.5rem; min-width: 10.5rem;
  margin-bottom: 0; color: var(--ink);
}
.fs-dl .disk-ic { width: 102px; height: 30px; }
.fs-dl .btn {
  display: block; width: 100%; min-width: 0;
  box-sizing: border-box; text-align: center;
  font-size: .8rem; padding: 0 5px; line-height: 12px;
}
.fs-dl:hover { text-decoration: none; }
.fs-dl:hover .btn { filter: invert(1); }

/* ------------------------------------- in-browser play (Action Games spike) */
.play-root { margin: 18px 0 28px; }
.play-screen {
  background: #000; border: 2px solid #000; border-radius: 6px;
  overflow: hidden; width: 100%; max-width: 800px;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow); position: relative;
}
/* #canvas: MAME soft framebuffer, locked at 704×462 (see play.js).
   Invisible; input goes through #play-hit. #play-view shows the bilinear
   upscale after native neighbor-melt in play.js (no CSS filter on view). */
.play-screen #canvas {
  position: absolute; top: 0; left: 0;
  display: block;
  width: 704px !important;
  height: 462px !important;
  max-width: none !important;
  background: #000;
  opacity: 0;
  z-index: 2;
  image-rendering: auto !important;
  filter: none !important;
  transform: none !important;
}
.play-screen .play-view {
  position: absolute; inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  background: #000;
  z-index: 1;
  pointer-events: none;
  image-rendering: auto !important;
}
.play-screen .play-hit {
  position: absolute; inset: 0;
  z-index: 3;
  cursor: pointer;
  outline: none;
}
/* Keep splash under the picture so a failed hide() can't cover it. */
.play-screen .emularity-splash-screen {
  z-index: 0;
}
/* Emularity injects its download splash as a sibling; keep it tidy */
.play-root > div:not(.play-screen):not(.play-bar) {
  max-width: 800px;
}
.play-root #emularity-splash-screen,
.play-root .emularity-splash-screen {
  max-width: 800px;
}
.play-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 10px; max-width: 800px;
}
.play-ctl {
  appearance: none; border: 2px solid #000; background: #fff;
  color: #000; font: 600 .85rem/1.2 -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 7px 14px; border-radius: 6px; cursor: pointer;
}
.play-ctl:hover { background: #000; color: #fff; }
.play-ctl.on { background: #000; color: #fff; }
.play-sep {
  width: 2px; height: 22px; background: #000; margin: 0 4px; opacity: .35;
}
.play-status {
  margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); max-width: 704px;
}

/* ------------------------------------- boot image contents (file trees) */
.fs-filter { margin: 14px 0 18px; }
.fs-filter input {
  width: 100%; max-width: 420px; padding: 8px 14px;
  border: 2px solid #000; border-radius: 999px; font-size: .95rem;
  background: #fff;
}
.fs-list {
  background: #fff; font-size: .86rem;
  font-variant-numeric: tabular-nums; padding: 6px 0;
  max-height: 72vh; overflow-y: auto;
}
.fs-list details { margin: 0; }
.fs-list summary {
  display: flex; align-items: baseline; gap: 8px; cursor: pointer;
  padding: 3px 14px; list-style: none;
}
.fs-list summary::before {
  content: ""; flex: none; width: 13px; height: 11px; align-self: center;
  background: linear-gradient(180deg, #8ecdea, #4b9cd0);
  border: 1px solid #1c5c8a; border-radius: 1px 3px 2px 2px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5);
}
.fs-list details[open] > summary::before {
  background: linear-gradient(180deg, #bfe2f5, #7db8dd);
}
.fs-list summary:hover { background: rgba(1,161,223,.09); }
.fs-list summary .fs-name { font-weight: 600; }
.fs-list details > *:not(summary) { margin-left: 22px; }
.fs-meta { margin-left: auto; color: var(--ink-soft); font-size: .76rem;
  white-space: nowrap; }
.fs-file {
  display: flex; align-items: baseline; gap: 8px; padding: 2px 14px;
  color: var(--ink);
}
.fs-file:nth-child(even) { background: rgba(38,37,31,.025); }
.fs-file .fs-name { overflow-wrap: anywhere; }
.fs-type { margin-left: auto; color: var(--ink-soft); font-size: .72rem;
  border: 1px solid #d5d2c8; border-radius: 3px; padding: 0 5px;
  white-space: nowrap; }
.fs-size { color: var(--ink-soft); font-size: .76rem; min-width: 58px;
  text-align: right; white-space: nowrap; }
.fs-title { font-size: .76rem; color: var(--accent-dark);
  font-weight: 400; white-space: nowrap; }
.on-images {
  margin: 14px 0; padding: 10px 14px; border-radius: var(--radius);
  background: rgba(118,189,33,.10); border-left: 4px solid var(--g1);
  font-size: .92rem;
}
#q-results .onboot { font-size: .72rem; color: var(--accent-dark); }
#q-results .snip { font-size: .75rem; }
#q-results .tag-bootable {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  font-size: .65rem; font-weight: 700; letter-spacing: .02em;
  vertical-align: 1px; border-radius: 4px; color: #173a08;
  background: rgba(118,189,33,.28); border: 1px solid rgba(118,189,33,.55);
}

.stream-box {
  margin: 18px 0; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(1,161,223,.09), rgba(118,189,33,.09));
  border-left: 4px solid var(--accent);
  font-size: .95rem;
}

.steps { max-width: 760px; }
.stream-cols { display: flex; gap: 34px; align-items: flex-start;
  flex-wrap: wrap; margin: 6px 0 10px; }
.stream-copy { flex: 1 1 420px; }
.stream-copy .lede { margin-bottom: 18px; }
.stream-copy .steps { margin-bottom: 0; }
.stream-shot { flex: 0 1 512px; margin: 8px 0 0; }
.stream-shot img { width: 100%; height: auto; display: block;
  border-radius: 0; box-shadow: var(--shadow);
  image-rendering: pixelated; }
.stream-shot figcaption { margin-top: 8px; font-size: .85rem;
  color: var(--ink-soft); text-align: center; }
.boot-intro {
  display: flex; gap: 30px; align-items: center;
  flex-wrap: wrap; margin-bottom: 6px;
}
.boot-intro > div { flex: 1 1 420px; }
.boot-intro .stream-box { margin: 14px 0 0; }
/* Exactly half of the 704px source so the desktop's 1px hatching
   lands 1:1 on 2x and blends evenly on 1x. Any other scale moires. */
.boot-shot { flex: 0 0 352px; margin: 0; max-width: 100%; }
.boot-shot img {
  width: 352px; max-width: 100%; height: auto; display: block;
  border-radius: 0; box-shadow: var(--shadow);
  image-rendering: pixelated;
}
.boot-shot figcaption {
  margin-top: 8px; font-size: .85rem;
  color: var(--ink-soft); text-align: center;
}
.steps li { margin: 12px 0; }

/* ------------------------------------------------ footer */
.site-footer { background: var(--platinum); border-top: 1px solid #b9b6ab;
  margin-top: 40px; text-align: center; padding-bottom: 26px; }
.footer-gs { margin-top: 20px; image-rendering: pixelated; opacity: .9; }
.site-footer p { margin: 14px 20px 0; }
.fine { font-size: .8rem; color: var(--ink-soft); }


/* ----- Bootable titles landing ----- */
.bootable-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  margin: 18px 0 8px;
}
.bootable-chips {
  display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto;
}
.bootable-chip {
  appearance: none; cursor: pointer;
  padding: 3px 10px; border: 1px solid #7c7a70; border-radius: 999px;
  background: #fff; color: var(--ink); font: inherit; font-size: .8rem;
  font-weight: 600; line-height: 1.4;
}
.bootable-chip span {
  margin-left: 4px; color: var(--ink-soft); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.bootable-chip:hover { border-color: #000; }
.bootable-chip.on {
  background: rgba(118,189,33,.28); border-color: rgba(70,120,20,.7);
  color: #173a08;
}
.bootable-chip.on span { color: #2a5a10; }
.bootable-search { flex: 1 1 200px; max-width: 280px; }
.bootable-search input {
  width: 100%; padding: 5px 12px; font-size: .88rem; height: 30px;
  border: 1.5px solid #000; border-radius: 6px; background: #fff;
}
.bootable-search input:focus { outline: 2px solid var(--accent); }
.bootable-count {
  margin: 0; margin-left: auto; font-size: .85rem; color: var(--ink-soft);
  white-space: nowrap;
}
.bootable-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.bootable-empty { margin: 28px 0; color: var(--ink-soft); }
.bootable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.bootable-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid #7c7a70;
  box-shadow: 2px 3px 0 rgba(38,37,31,.14);
  overflow: hidden;
}
.bootable-card[hidden] { display: none; }
.bootable-media {
  display: block; aspect-ratio: 4 / 3;
  background: #1a1916; overflow: hidden;
}
.bootable-media img, .bootable-media .noart {
  width: 100%; height: 100%; object-fit: contain;
  background: #1a1916;
}
.bootable-media .bootable-shot {
  object-fit: contain;
  image-rendering: pixelated;
}
.bootable-media .noart {
  display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 2rem; color: #b6b3a8;
}
.bootable-body {
  padding: 8px 10px 10px; display: flex; flex-direction: column;
  gap: 3px; flex: 1;
}
.bootable-title {
  margin: 0; font-size: .9rem; line-height: 1.25; font-weight: 700;
}
.bootable-title a { color: var(--ink); text-decoration: none; }
.bootable-title a:hover {
  color: var(--accent-dark); text-decoration: underline;
}
.bootable-meta {
  margin: 0; font-size: .75rem; color: var(--ink-soft); min-height: 1.1em;
}
.bootable-year { font-weight: 600; }
.bootable-actions {
  margin: 4px 0 0; font-size: .8rem; font-weight: 600;
}
.bootable-actions a { color: var(--accent-dark); text-decoration: none; }
.bootable-actions a:hover { text-decoration: underline; color: var(--ink); }
.bootable-sep { margin: 0 6px; color: var(--ink-soft); font-weight: 400; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------ outbound hardware strips */
.ae-showcase {
  margin: 28px 0 16px;
  padding: 14px 14px 12px;
  background:
    linear-gradient(145deg, rgba(13, 144, 172, .07), transparent 42%),
    var(--card);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ae-showcase.modern-hw {
  background:
    linear-gradient(145deg, rgba(118, 189, 33, .09), transparent 46%),
    var(--card);
}
.ae-showcase.modern-hw > .eyebrow { color: #4f8f10; }
.ae-showcase.modern-hw .ext-hw-hub { color: #4f8f10; }
.ae-showcase.modern-hw .ae-card:hover .ae-go { color: #4f8f10; }
.ae-showcase.archive-hw > .eyebrow { color: #0d90ac; }
.ae-showcase > .eyebrow { margin: 0 0 4px; }
.ae-showcase > h2.rule { margin: 0 0 6px; font-size: 1.35rem; }
.ae-showcase > .muted {
  margin: 0 0 0;
  padding: 0 0 12px;
  font-size: .9rem;
  border-bottom: 1px solid rgba(0,0,0,.10);
}
.ae-showcase > .ext-hw-group:first-of-type,
.ae-showcase > .ext-hw-singles:first-of-type {
  margin-top: 14px;
  padding-top: 2px;
}
.ext-hw-group + .ext-hw-group,
.ext-hw-singles + .ext-hw-group,
.ext-hw-group + .ext-hw-singles,
.ext-hw-singles + .ext-hw-singles {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.08);
}
/* Pack consecutive small vendors (1-3 cards) into a 50/50 row. */
.ext-hw-singles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
  align-items: start;
}
.ext-hw-singles > .ext-hw-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}
/* Half-width shops: keep a compact 2-up when the vendor has two items. */
.ext-hw-singles .ae-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
/* Vertical rule only on the right-hand cell of each pair. */
.ext-hw-singles > .ext-hw-group:nth-child(even) {
  padding-left: 28px;
  border-left: 1px solid rgba(0,0,0,.08);
}
@media (max-width: 820px) {
  .ext-hw-singles { grid-template-columns: 1fr; gap: 14px; }
  .ext-hw-singles > .ext-hw-group:nth-child(even) {
    padding: 12px 0 0;
    border-left: none;
    border-top: 1px solid rgba(0,0,0,.08);
  }
}
.ext-hw-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.ext-hw-bar-text { min-width: 0; flex: 1 1 220px; }
.ext-hw-group h3 {
  margin: 0;
  font: 650 1.02rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ext-hw-bar .muted {
  margin: 2px 0 0;
  font-size: .78rem;
  line-height: 1.35;
}
.ext-hw-hub {
  flex: none;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.ext-hw-hub:hover { text-decoration: underline; }
.ext-hw-hub img {
  display: block;
  max-height: 28px;
  width: auto;
}
.card.card-ext { position: relative; }
.card-ext-label {
  display: block;
  margin-top: 4px;
  color: #0d90ac;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.ext-title-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: rgba(13, 144, 172, .08);
  border-left: 4px solid #0d90ac;
  border-radius: 6px;
}
.ext-title-note p { margin: 0 0 6px; }
.ext-title-note p:last-child { margin-bottom: 0; }
.ae-showcase .eyebrow {
  margin: 0 0 4px;
  color: #0d90ac;
  font-size: .68rem;
  font-weight: 780;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ae-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.ae-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 7px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.ae-card:hover {
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(38, 37, 31, .10);
}
.ae-art {
  display: grid;
  place-items: center;
  height: 72px;
  margin-bottom: 6px;
  background: linear-gradient(145deg, #eef0ee, #dce2df);
  border-radius: 5px;
}
/* Pale cases (DominoDisk, Mini BurgerDisk) need a dark well to read. */
.ae-art.ae-art-dark {
  background: linear-gradient(145deg, #3a3d42, #2a2d31);
}
.ae-art img {
  max-width: 94%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.ae-art .noart {
  color: #0d90ac;
  font: 700 italic 1.1rem/1 Georgia, serif;
}
.ae-title {
  display: block;
  font: 650 .8rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ae-type {
  display: inline-block;
  margin: 0 0 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  color: var(--ink-soft);
  font-size: .58rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ae-card-dual {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 7px;
}
.ae-card-main {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  flex: 1;
}
.ae-card-main:hover { color: inherit; text-decoration: none; }
.ae-card-main:hover .ae-title { color: #0d90ac; }
.ae-showcase.modern-hw .ae-card-main:hover .ae-title { color: #4f8f10; }
.ae-card-links {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: .62rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.ae-card-links a {
  text-decoration: none;
  white-space: nowrap;
}
.ae-card-links a:hover { text-decoration: underline; }
.ae-go {
  margin-top: auto;
  padding-top: 4px;
  color: var(--ink-soft);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.ae-card:hover .ae-go { color: #0d90ac; }
[data-theme="dark"] .ae-type {
  background: rgba(255,255,255,.08);
  color: #c8c4b8;
}
[data-theme="dark"] .ae-card-dual {
  background: var(--card);
  border-color: #3a3730;
}
[data-theme="dark"] .ae-card-links { border-top-color: #3a3730; }

/* ------------------------------------------------ hardware archive hub */
.hw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.95fr);
  gap: 28px 36px;
  align-items: start;
  margin: 0 0 8px;
}
.hw-hero-copy .lede { max-width: none; }
.hw-hero-copy .archive-search { max-width: none; margin-bottom: 0; }
.hw-hero-art {
  margin: 4px 0 0;
  position: sticky;
  top: 56px;
}
.hw-hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06);
}
.hw-hero-art figcaption {
  margin: 8px 2px 0;
  font-size: .72rem;
  line-height: 1.35;
}
@media (max-width: 820px) {
  .hw-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hw-hero-art { position: static; order: -1; max-width: 420px; margin: 0 auto; }
}
.hw-all-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 6px 0 18px;
}
.hw-all-cta .btn { margin: 0; }
.hw-all-cta .muted { margin: 0; }
.hw-cat-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 22px;
}
.hw-cat {
  --gc: var(--g4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  padding: 10px 10px 9px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--gc) 26%, #ffffff),
    color-mix(in srgb, var(--gc) 10%, #ffffff) 72%);
  border: 1px solid color-mix(in srgb, var(--gc) 35%, #fff);
  border-top: 3px solid var(--gc);
  box-shadow: 2px 3px 0 rgba(38,37,31,.12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.hw-cat:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 2px 5px 0 rgba(38,37,31,.14);
}
.hw-c1 { --gc: var(--g1); }
.hw-c2 { --gc: #d6a400; }
.hw-c3 { --gc: var(--g3); }
.hw-c4 { --gc: var(--g4); }
.hw-c5 { --gc: var(--g5); }
.hw-c6 { --gc: var(--g6); }
.hw-cat-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0 0 4px;
  color: var(--gc);
}
.hw-cat-icon svg { width: 100%; height: 100%; display: block; }
.hw-cat strong {
  font-size: .86rem;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.hw-cat > span:not(.hw-cat-icon) {
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
@media (max-width: 1099px) {
  .hw-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hw-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------ forum archive (read-only) */
.archive-search {
  position: relative; max-width: 520px; margin: 14px 0 22px;
}
.archive-search input {
  width: 100%; padding: 9px 14px; font-size: 1rem; height: 40px;
  border: 1.5px solid #000; border-radius: 8px; background: #fff;
  color: var(--ink);
}
.archive-search input:focus { outline: 2px solid var(--accent); }
#fq-results, #hq-results, #nq-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(38,37,31,.22);
  max-height: 65vh; overflow-x: hidden; overflow-y: auto; padding: 6px;
}
#fq-results a, #hq-results a, #nq-results a {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 9px; border-radius: 7px; color: var(--ink);
  min-width: 0;
}
#fq-results a:hover, #fq-results a.sel,
#hq-results a:hover, #hq-results a.sel,
#nq-results a:hover, #nq-results a.sel {
  background: var(--paper); text-decoration: none;
}
#fq-results .noart, #hq-results .noart, #nq-results .noart {
  width: 34px; height: 34px; flex: none; border-radius: 5px;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  background: var(--platinum); color: var(--ink-soft);
}
#hq-results img {
  width: 34px; height: 34px; object-fit: cover; border-radius: 5px;
  background: var(--platinum); flex: none;
}
#fq-results .q-hit, #hq-results .q-hit, #nq-results .q-hit {
  min-width: 0; flex: 1 1 auto; overflow: hidden;
}
#fq-results .meta, #fq-results .snip,
#hq-results .meta,
#nq-results .meta, #nq-results .snip {
  display: block; color: var(--ink-soft); font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#fq-results .snip, #nq-results .snip { font-size: .75rem; }
#fq-results .none, #hq-results .none, #nq-results .none {
  padding: 12px; color: var(--ink-soft);
}

/* News archive */
.news-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 32px; }
.news-row a {
  display: grid;
  grid-template-columns: auto 6.8rem 1fr;
  gap: 3px 16px;
  padding: 14px 18px 15px;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: transform .12s ease;
}
/* Cycle the six badge stripe colors down the list, home-catalog style. */
.news-row:nth-child(6n+1) a { border-left-color: #76bd21; }
.news-row:nth-child(6n+2) a { border-left-color: #ffc728; }
.news-row:nth-child(6n+3) a { border-left-color: #ff651b; }
.news-row:nth-child(6n+4) a { border-left-color: #d10e30; }
.news-row:nth-child(6n+5) a { border-left-color: #b01dac; }
.news-row:nth-child(6n+6) a { border-left-color: #01a1df; }
.news-row a:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--ink);
}
.news-row a:hover strong { color: var(--accent-dark); }
/* The classic per-post icon from the old theme; GIFs have a baked white
   background, so keep them on a small white chip in both color modes. */
.news-row .news-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 38px;
  height: auto;
  padding: 3px 4px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--platinum-dark) 55%, #fff);
}
.news-row time {
  grid-row: 1 / span 2;
  align-self: start;
  justify-self: start;
  margin-top: 1px;
  padding: 3px 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--platinum) 55%, #fff);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.news-row strong { font-size: 1.05rem; line-height: 1.3; }
.news-row .news-snip {
  grid-column: 3;
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.news-article-head { display: flex; align-items: flex-start; gap: 18px; }
.news-article-head > div { flex: 1; min-width: 0; }
.news-article-icon {
  width: 54px;
  height: auto;
  margin-top: 10px;
  padding: 4px 5px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--platinum-dark) 55%, #fff);
  box-shadow: var(--shadow);
}
.news-article .news-body {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  padding: 18px 22px 20px;
  margin: 16px 0 8px;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 48rem;
  overflow-wrap: anywhere;
}
.news-article .news-body p { margin: 0 0 .85em; }
.news-article .news-body p:last-child { margin-bottom: 0; }
.news-article .news-body a { color: var(--accent-dark); }
.news-article .news-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
/* Alex's little inline disc icons next to download links. */
.news-article .news-body img.left {
  display: inline-block;
  vertical-align: text-bottom;
  margin-right: 6px;
  border-radius: 0;
}
#news-year-filter { margin: 8px 0 20px; }

/* Community hub: copy left, KansasFest accent on the right.
   Dropped below the H1 so it sits with the prose, not the title. */
.hw-hero.community-hero {
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px 28px;
  align-items: start;
}
.hw-hero.community-hero .hw-hero-art {
  width: 260px;
  max-width: 260px;
  /* Clear the Community title + rainbow rule; sit with the lede. */
  margin: 5.75rem 0 0;
  position: sticky;
  top: 56px;
}
.hw-hero.community-hero .hw-hero-art img {
  width: 260px;
  max-width: 100%;
  height: auto;
}
.community-spirit { margin: 0 0 18px; }
.community-spirit .lede { margin: 0 0 .9em; }
.community-spirit .lede:last-child { margin-bottom: 0; }
@media (max-width: 820px) {
  /* Beat the general .hw-hero stack rule so the photo never goes full-width. */
  .hw-hero.community-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 14px 16px;
  }
  .hw-hero.community-hero .hw-hero-art {
    width: 160px;
    max-width: 160px;
    position: static;
    order: 0;
    margin: 4.5rem 0 0;
  }
  .hw-hero.community-hero .hw-hero-art img { width: 100%; }
}
.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 18px;
}
.community-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 12px 18px 12px 12px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
  border-left: 5px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.community-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.community-btn-news {
  background: color-mix(in srgb, var(--g1) 14%, #fff);
  border-color: color-mix(in srgb, var(--g1) 35%, #fff);
  border-left-color: var(--g1);
}
.community-btn-forum {
  background: color-mix(in srgb, var(--g6) 14%, #fff);
  border-color: color-mix(in srgb, var(--g6) 35%, #fff);
  border-left-color: var(--g6);
}
.community-btn img {
  width: 42px;
  height: auto;
  padding: 3px 4px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--platinum-dark) 45%, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.community-btn span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}
.community-btn strong { font-size: 1.1rem; }
.community-btn em {
  font-style: normal;
  font-size: .8rem;
  color: var(--ink-soft);
}
#q-results .tag-news {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  border-radius: 999px; font-size: .65rem; font-weight: 750;
  background: #e8f4f7; color: #0a6a7e; vertical-align: middle;
}
@media (max-width: 640px) {
  .news-row a { grid-template-columns: auto 1fr; gap: 4px 12px; }
  .news-row .news-icon { grid-row: 1 / span 3; width: 32px; }
  .news-row time { grid-row: auto; justify-self: start; margin-bottom: 2px; }
  .news-row strong, .news-row .news-snip { grid-column: 2; }
  .news-article-head { gap: 12px; }
  .news-article-icon { width: 42px; margin-top: 4px; }
}
.forum-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin: 22px 0 10px;
}
.forum-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow); border-top: 4px solid var(--accent);
  transition: transform .12s ease;
}
.forum-card:hover {
  transform: translateY(-2px); text-decoration: none; color: var(--ink);
}
.forum-card strong { font-size: 1.1rem; }
.forum-card span { font-size: .85rem; color: var(--ink-soft); }
.forum-card em {
  font-style: normal; font-size: .88rem; color: var(--ink-soft); margin-top: 4px;
}
.forum-card.is-empty {
  opacity: .55; border-top-color: var(--platinum-dark); cursor: default;
}
.forum-table {
  width: 100%; border-collapse: collapse; margin: 16px 0 8px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.forum-table th, .forum-table td {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--platinum-dark) 70%, #fff);
}
.forum-table th {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); background: color-mix(in srgb, var(--platinum) 55%, #fff);
}
.forum-table tr:last-child td { border-bottom: 0; }
.forum-table a { color: var(--ink); font-weight: 600; }
.forum-table a:hover { color: var(--accent-dark); }
.forum-meta { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-soft); }
.forum-count, .forum-when {
  white-space: nowrap; font-size: .88rem; color: var(--ink-soft); width: 1%;
}
.forum-thread { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.forum-post {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px 16px;
  border-left: 4px solid var(--accent);
}
.forum-post-head {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
  margin-bottom: 6px;
}
.forum-author { font-size: 1rem; }
.forum-post-head time { font-size: .85rem; color: var(--ink-soft); }
.forum-post-subj {
  margin: 0 0 10px; font-size: 1.05rem; font-weight: 700;
}
.forum-post-body { font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.forum-post-body p { margin: 0 0 .7em; }
.forum-post-body p:last-child { margin-bottom: 0; }
.forum-post-body a { color: var(--accent-dark); }
#q-results .tag-forum {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  font-size: .68rem; font-weight: 700; letter-spacing: .03em;
  border-radius: 4px; color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, #fff);
  vertical-align: middle;
}
@media (max-width: 620px) {
  .forum-when { display: none; }
  .forum-table th:last-child { display: none; }
}

/* ------------------------------------------------ dark theme (opt-in)
   Aim: one cohesive night surface, not light chrome dropped on black.
   Pixel GS buttons invert as a set; Finder/file lists use dark desks. */
[data-theme="dark"] {
  color-scheme: dark;
  --platinum: #35332e;
  --platinum-dark: #282622;
  --ink: #e4e1d8;
  --ink-soft: #9e9a8f;
  --paper: #161512;
  --card: #24221e;
  --accent: #4eb4e8;
  --accent-dark: #8ecceb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 22px rgba(0, 0, 0, .4);
}
[data-theme="dark"] body {
  background:
    radial-gradient(1100px 520px at 12% -5%, rgba(78,180,232,.10), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(255,101,27,.07), transparent 55%),
    radial-gradient(1000px 600px at 50% 108%, rgba(176,29,172,.06), transparent 55%),
    var(--paper);
}
/* menu bar */
[data-theme="dark"] .menubar {
  background: #24221e; border-bottom-color: #0a0908;
}
[data-theme="dark"] .menu-title,
[data-theme="dark"] .menu-items a { color: var(--ink); }
[data-theme="dark"] .menu-title:hover,
[data-theme="dark"] .menu-items a:hover,
[data-theme="dark"] .menu-items a.on,
[data-theme="dark"] .apple-menu:hover {
  background: var(--ink); color: #161512;
}
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .header-search input {
  background: #161512; border-color: #6a665c; color: var(--ink);
}
[data-theme="dark"] .theme-toggle:hover {
  background: var(--ink); color: #161512; border-color: var(--ink);
}
[data-theme="dark"] .header-search input:focus {
  outline-color: var(--accent);
}
[data-theme="dark"] #q-results {
  background: var(--card);
  box-shadow: 0 14px 44px rgba(0,0,0,.6);
  border: 1px solid #3a3730;
}
[data-theme="dark"] #q-results a:hover,
[data-theme="dark"] #q-results a.sel {
  background: #35332e;
}
/* GS pixel buttons: invert the light artwork into dark chrome */
[data-theme="dark"] .btn {
  filter: invert(1);
}
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .fs-dl:hover .btn {
  filter: none;
}
/* hero stats (white is on the grid, not the wrapper) */
[data-theme="dark"] .archive-status-grid {
  background: #24221e; border-color: #4a463c;
  box-shadow: 2px 3px 0 rgba(0,0,0,.45);
}
[data-theme="dark"] .archive-stat {
  border-right-color: #4a463c;
}
@media (max-width: 860px) {
  [data-theme="dark"] .archive-stat:nth-child(-n+3) {
    border-bottom-color: #4a463c;
  }
}
@media (max-width: 520px) {
  [data-theme="dark"] .archive-stat {
    border-right-color: #4a463c;
  }
  [data-theme="dark"] .archive-stat:nth-child(-n+4) {
    border-bottom-color: #4a463c;
  }
}
/* hero / footer GS photo: rematted dark asset, no cream-paper fringe.
   inline-block (not block) so .site-footer text-align:center still centers
   the footer icon; hero keeps its own block + margin:auto rule below. */
[data-theme="dark"] .gs-photo-light { display: none; }
[data-theme="dark"] .gs-photo-dark { display: inline-block; }
[data-theme="dark"] .hero-art > .gs-photo-dark {
  display: block;
  filter: drop-shadow(0 16px 26px rgba(0,0,0,.65));
}
[data-theme="dark"] .hero-art::before {
  opacity: .55;
}
/* dark theme: dim the machine, let the lit CRT and power LEDs glow */
[data-theme="dark"] .hero-art .gs-stack {
  filter: drop-shadow(0 16px 26px rgba(0,0,0,.65));
}
[data-theme="dark"] .gs-stack-base { filter: brightness(.8) saturate(.92); }
/* boot splash: transparent panel, white chrome, white-ink art */
[data-theme="dark"] .boot-dialog {
  background: transparent;
  border-color: #fff;
  box-shadow: 0 0 0 1px #161512, 0 0 0 2px #fff;
}
[data-theme="dark"] .bd-art-light { display: none; }
[data-theme="dark"] .bd-art-dark { display: block; }
[data-theme="dark"] .bd-thermo {
  border-color: #fff; background: transparent;
}
[data-theme="dark"] .bd-fill { background: #ff3b3b; }
/* stripe hues a step brighter so dark shells stay readable */
[data-theme="dark"] .g-applications { --gc: #8fd42e; }
[data-theme="dark"] .g-games { --gc: #f0c020; }
[data-theme="dark"] .g-educational { --gc: #ff7a35; }
[data-theme="dark"] .g-hardware { --gc: #ef2a4a; }
[data-theme="dark"] .g-publications { --gc: #d03ac8; }
[data-theme="dark"] .g-more { --gc: #3db8ef; }
[data-theme="dark"] .browse-group {
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--gc) 28%, #24221e), #24221e 72%);
  box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 16px rgba(0,0,0,.28);
}
/* shells: more stripe, less muddy brown (was 34%/14% into #2c2a26) */
[data-theme="dark"] .group-tile {
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--gc) 62%, #1c1a16),
    color-mix(in srgb, var(--gc) 42%, #12110e) 70%);
  color: var(--ink);
}
[data-theme="dark"] .group-tile-wrap {
  filter: drop-shadow(3px 4px 0 rgba(0,0,0,.55))
          drop-shadow(0 8px 18px rgba(0,0,0,.45));
}
[data-theme="dark"] .group-tile::after {
  background: color-mix(in srgb, var(--gc) 45%, #0a0908);
}
[data-theme="dark"] .fd-top::before {
  border-bottom-color: color-mix(in srgb, var(--gc) 70%, #111);
}
[data-theme="dark"] .fd-label {
  background:
    repeating-linear-gradient(180deg,
      transparent 0 21px, rgba(228,225,216,.10) 21px 22px) #24221e;
  border-color: color-mix(in srgb, var(--gc) 55%, #24221e);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
[data-theme="dark"] .fd-label > span:not(.tile-ic),
[data-theme="dark"] .group-tile em { color: var(--ink-soft); }
[data-theme="dark"] .cat-row {
  color: var(--ink);
  border-bottom-color: color-mix(in srgb, var(--gc) 35%, #3a3730);
}
[data-theme="dark"] .cat-row:hover {
  background: color-mix(in srgb, var(--gc) 18%, #24221e);
}
[data-theme="dark"] .g-total {
  background: color-mix(in srgb, var(--gc) 22%, #161512);
  border-color: color-mix(in srgb, var(--gc) 45%, #161512);
}
[data-theme="dark"] .browse-chevron {
  border-right-color: var(--ink-soft);
  border-bottom-color: var(--ink-soft);
}
[data-theme="dark"] .browse-group-toggle:focus-visible {
  outline-color: var(--gc);
}
/* cards / A–Z / title pages */
[data-theme="dark"] .card {
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.3);
}
[data-theme="dark"] .card .art { background: #1a1815; }
[data-theme="dark"] .card .t { color: var(--ink); }
[data-theme="dark"] .az-bar { background: var(--paper); }
[data-theme="dark"] .az-bar a {
  background: var(--card); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
}
[data-theme="dark"] .az-bar a:hover { background: var(--ink); color: #161512; }
[data-theme="dark"] .meta tr { border-bottom-color: #2e2c27; }
[data-theme="dark"] .stream-box,
[data-theme="dark"] .on-images,
[data-theme="dark"] .title-boot-actions {
  background: rgba(78,180,232,.08);
  border-left-color: var(--accent);
}
[data-theme="dark"] .on-images {
  background: rgba(118,189,33,.10);
  border-left-color: var(--g1);
}
/* Finder windows + boot desk */
[data-theme="dark"] .gswindow {
  background: var(--platinum);
  border-color: #4a463c;
  box-shadow: 3px 4px 0 rgba(0,0,0,.5), var(--shadow);
}
[data-theme="dark"] .gswindow-bar {
  background: repeating-linear-gradient(180deg,
    #3a3730 0 3px, #2a2823 3px 4px);
  border-bottom-color: #4a463c;
}
[data-theme="dark"] .gswindow-title {
  background: #3a3730; color: var(--ink);
}
[data-theme="dark"] .gsclose,
[data-theme="dark"] .gszoom {
  background: #2a2823; border-color: #9e9a8f;
}
[data-theme="dark"] .gszoom::after { border-color: #9e9a8f; }
[data-theme="dark"] .gswindow-info {
  background: #2a2823; border-bottom-color: #4a463c; color: var(--ink-soft);
}
[data-theme="dark"] .gswindow-actions { border-top-color: #4a463c; }
[data-theme="dark"] .gswindow-actions-links a {
  border-color: #6a665c; background: #1a1815; color: var(--ink);
  box-shadow: 1px 1px 0 #0a0908;
}
[data-theme="dark"] .gswindow-actions-links a:not([aria-disabled="true"]):hover {
  background: var(--ink); color: #161512; border-color: var(--ink);
}
[data-theme="dark"] .gsdesk {
  background:
    radial-gradient(circle at 1px 1px, rgba(228,225,216,.05) 1px, transparent 1.5px)
    0 0 / 8px 8px, #1a1815;
}
[data-theme="dark"] .gslabel { background: #161512; color: var(--ink); }
[data-theme="dark"] .gslabel.inv { background: var(--ink); color: #161512; }
[data-theme="dark"] .gsdisk:hover .gslabel { background: var(--ink); color: #161512; }
[data-theme="dark"] .gsdisk:hover .gslabel.inv { background: #161512; color: var(--ink); }
[data-theme="dark"] .gswindow[data-disk-actions] .gsdisk-selectable:not(.selected):hover .gslabel {
  background: #161512; color: var(--ink);
}
[data-theme="dark"] .gsdisk-selectable.selected .gslabel {
  background: var(--ink); color: #161512;
}
[data-theme="dark"] .gsdisk-more {
  background: rgba(78,180,232,.10);
  box-shadow: inset 0 0 0 2px var(--accent);
}
[data-theme="dark"] .gsdisk-more-count {
  background: #161512; color: var(--ink); border-color: #6a665c;
  box-shadow: 1px 1px 0 #0a0908;
}
[data-theme="dark"] .gsdisk-more:hover .gsdisk-more-count {
  background: var(--ink); color: #161512;
}
[data-theme="dark"] .disk-ic {
  filter: brightness(1.35) contrast(1.05);
}
/* file trees inside bootcontents windows (was white-on-white) */
[data-theme="dark"] .fs-filter input {
  background: #1a1815; border-color: #6a665c; color: var(--ink);
}
[data-theme="dark"] .fs-filter input::placeholder { color: #7a766c; }
[data-theme="dark"] .fs-list {
  background: #1a1815; color: var(--ink);
}
[data-theme="dark"] .fs-list summary:hover,
[data-theme="dark"] .fs-list summary:hover .fs-meta {
  background: rgba(78,180,232,.12);
}
[data-theme="dark"] .fs-list summary::before {
  background: linear-gradient(180deg, #5a9fc4, #2f6f96);
  border-color: #8ecceb;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.15);
}
[data-theme="dark"] .fs-list details[open] > summary::before {
  background: linear-gradient(180deg, #7eb8d4, #4a8aad);
}
[data-theme="dark"] .fs-file { color: var(--ink); }
[data-theme="dark"] .fs-file:nth-child(even) { background: rgba(228,225,216,.04); }
[data-theme="dark"] .fs-type {
  border-color: #4a463c; color: var(--ink-soft);
}
[data-theme="dark"] .site-footer {
  background: #1a1815; border-top-color: #0a0908;
}
[data-theme="dark"] #q-results .tag-bootable,
[data-theme="dark"] .card .card-boot {
  color: #c8f0a0;
  background: rgba(118,189,33,.18);
  border-color: rgba(118,189,33,.4);
}
[data-theme="dark"] .card .card-boot-ic { color: #8fd94a; }
[data-theme="dark"] .bootable-chip {
  background: #24221e; border-color: #4a463c; color: var(--ink);
}
[data-theme="dark"] .bootable-chip:hover { border-color: #8a867a; }
[data-theme="dark"] .bootable-chip.on {
  background: rgba(118,189,33,.22); border-color: rgba(118,189,33,.5);
  color: #c8f0a0;
}
[data-theme="dark"] .bootable-chip.on span { color: #a8d878; }
[data-theme="dark"] .bootable-search input {
  background: #1a1815; border-color: #6a665c; color: var(--ink);
}
[data-theme="dark"] .hw-cat {
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--gc) 34%, #1c1a16),
    color-mix(in srgb, var(--gc) 14%, #141210) 72%);
  border-color: color-mix(in srgb, var(--gc) 40%, #2a2822);
  box-shadow: 2px 3px 0 rgba(0,0,0,.35);
}
[data-theme="dark"] .ae-showcase.modern-hw > .eyebrow { color: #8fd94a; }
[data-theme="dark"] .ae-showcase.modern-hw .ext-hw-hub { color: #8fd94a; }
[data-theme="dark"] .ae-showcase.modern-hw .ae-card:hover .ae-go { color: #8fd94a; }
[data-theme="dark"] .ae-art {
  background: linear-gradient(145deg, #2a2822, #1a1815);
}
[data-theme="dark"] .ae-art.ae-art-dark {
  background: linear-gradient(145deg, #12141a, #0a0b0e);
}
[data-theme="dark"] .archive-search input {
  background: #161512; border-color: #6a665c; color: var(--ink);
}
[data-theme="dark"] .archive-search input:focus { outline-color: var(--accent); }
[data-theme="dark"] #fq-results,
[data-theme="dark"] #hq-results {
  background: var(--card); border: 1px solid #3a3730;
  box-shadow: 0 14px 44px rgba(0,0,0,.6);
}
[data-theme="dark"] #fq-results a:hover,
[data-theme="dark"] #fq-results a.sel,
[data-theme="dark"] #hq-results a:hover,
[data-theme="dark"] #hq-results a.sel { background: #35332e; }
[data-theme="dark"] #fq-results .noart,
[data-theme="dark"] #hq-results .noart { background: #1a1815; }
[data-theme="dark"] .forum-card {
  background: var(--card); border-top-color: var(--accent);
}
[data-theme="dark"] .forum-card.is-empty { border-top-color: #4a463c; }
[data-theme="dark"] .forum-table th {
  background: #1a1815; color: var(--ink-soft);
}
[data-theme="dark"] .forum-table th, [data-theme="dark"] .forum-table td {
  border-bottom-color: #3a3730;
}
[data-theme="dark"] .forum-post {
  background: var(--card); border-left-color: var(--accent);
}
[data-theme="dark"] .news-row time {
  background: #35332e; color: #c8c4b8;
}
/* The old-theme GIFs bake in a white background; keep their chips white but
   soften the edge against dark cards. */
[data-theme="dark"] .news-row .news-icon,
[data-theme="dark"] .news-article-icon,
[data-theme="dark"] .community-btn img {
  border-color: #4a463e;
}
[data-theme="dark"] .community-btn-news {
  background: color-mix(in srgb, var(--g1) 22%, #24221e);
  border-color: color-mix(in srgb, var(--g1) 40%, #3a3730);
}
[data-theme="dark"] .community-btn-forum {
  background: color-mix(in srgb, var(--g6) 22%, #24221e);
  border-color: color-mix(in srgb, var(--g6) 40%, #3a3730);
}
[data-theme="dark"] #q-results .tag-news {
  background: rgba(13,144,172,.22); color: #8fd4e4;
}
[data-theme="dark"] #q-results .tag-forum {
  color: #8ecceb;
  background: rgba(78,180,232,.18);
  border-color: rgba(78,180,232,.4);
}
[data-theme="dark"] .bootable-card {
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.3);
}
[data-theme="dark"] .play-frame,
[data-theme="dark"] .play-screen {
  background: #0c0b0a;
  border-color: #3a3730;
}
[data-theme="dark"] .play-ctl {
  background: #24221e; border-color: #6a665c; color: var(--ink);
}
[data-theme="dark"] .play-ctl:hover,
[data-theme="dark"] .play-ctl.on {
  background: var(--ink); color: #161512; border-color: var(--ink);
}
[data-theme="dark"] .play-sep { background: #6a665c; }
