/* 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-search { position: relative; margin-left: auto; flex: 0 1 250px;
  min-width: 150px; }
.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); }
#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: auto; padding: 6px;
}
#q-results a {
  display: flex; gap: 10px; align-items: center;
  padding: 7px 9px; border-radius: 7px; color: var(--ink);
}
#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 .meta { color: var(--ink-soft); font-size: .8rem; }
#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;
}
.hero-art > img {
  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;
}
@keyframes gs-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) { .hero-art > img { animation: none; } }
.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 > img { 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-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;
  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; } }
/* 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 .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;
}
