/* The Machine Index — Codex edition
   ---------------------------------------------------------------------------
   An editorial museum-catalogue treatment: warm stock, carbon ink, safety orange
   and graph-paper rules. Numbers stay monospace; display headings use a sturdy
   book face. The restrained source project remains available as a separate build.
   --------------------------------------------------------------------------- */

:root {
  color-scheme: light;
  --paper:    #f1eee5;
  --surface:  #faf8f1;
  --raised:   #fffdf7;
  --ink:      #17201e;
  --ink-2:    #4e5954;
  --muted:    #7a817c;
  --line:     #c9c6ba;
  --line-soft:#dfdccf;

  --accent:      #e34f28;
  --accent-deep: #a92e13;
  --accent-soft: #ef9b7c;
  --accent-wash: #f7ddd1;

  --good:  #1d6b45;
  --warn:  #8a5a12;
  --bad:   #98351f;

  --r: 2px;
  --shadow: 4px 4px 0 rgb(23 32 30 / .12);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --prose: 68ch;
}

/* Dark palette lives in a mixin-by-hand: applied when the system prefers dark
   (unless the user forced light) AND when the user explicitly toggles dark. Both
   selectors must set the same tokens, or the manual toggle is a no-op on a
   light-default machine. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:   #151a18;
    --surface: #1c2421;
    --raised:  #222b27;
    --ink:     #f3efe3;
    --ink-2:   #c2c3b9;
    --muted:   #92988f;
    --line:    #3b443f;
    --line-soft:#2d3732;
    --accent:      #ff7450;
    --accent-deep: #ff9b81;
    --accent-soft: #8c3c29;
    --accent-wash: #392720;
    --good: #58b98a;
    --warn: #d6a44e;
    --bad:  #e08268;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 22px -12px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:   #151a18;
  --surface: #1c2421;
  --raised:  #222b27;
  --ink:     #f3efe3;
  --ink-2:   #c2c3b9;
  --muted:   #92988f;
  --line:    #3b443f;
  --line-soft:#2d3732;
  --accent:      #ff7450;
  --accent-deep: #ff9b81;
  --accent-soft: #8c3c29;
  --accent-wash: #392720;
  --good: #58b98a;
  --warn: #d6a44e;
  --bad:  #e08268;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 22px -12px rgb(0 0 0 / .7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.028em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); letter-spacing: -0.032em; }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.05rem; margin-top: 1.9em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); }

.mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.big { font-size: 1.22rem; font-weight: 600; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.skip {
  position: absolute; left: -9999px; top: .5rem; z-index: 99;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: var(--r);
}
.skip:focus { left: .75rem; }

/* ---------------------------------------------------------------- chrome */
.site {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
  max-width: var(--wrap); margin: 0 auto; padding: 1.1rem 1.25rem;
}
.site__brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 680; letter-spacing: -.02em; color: var(--ink); text-decoration: none; font-size: 1.02rem;
}
.site__mark {
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.site__mark i { width: 9px; height: 9px; border: 2px solid var(--raised); border-radius: 50%; }
.site__brand > span:last-child { display: grid; line-height: 1; }
.site__brand small { margin-top: .32rem; color: var(--muted); font-family: var(--mono); font-size: .56rem; font-weight: 500; letter-spacing: .11em; text-transform: uppercase; }
.site__nav { display: flex; gap: 1.35rem; font-size: .93rem; flex-wrap: wrap; }
.site__nav a { color: var(--ink-2); text-decoration: none; padding-bottom: 2px; }
.site__nav a:hover { color: var(--ink); }
.site__nav a[aria-current] { color: var(--ink); box-shadow: 0 1.5px 0 var(--accent); }
.theme-btn {
  font: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--raised); color: var(--ink-2); border: 1px solid var(--line); border-radius: 50%;
}
.theme-btn:hover { border-color: var(--muted); color: var(--ink); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem 5rem; }

/* ---------------------------------------------------------------- hero
   Deliberately short: it must not eat a screen of scroll before the grid. */
.hero { padding: clamp(1.6rem, 4vw, 3rem) 0 1.6rem; max-width: 52rem; position: relative; }
.hero::after { content: ""; position: absolute; right: min(-18vw, -8rem); top: 8%; width: 38vw; height: 70%; z-index: -1; opacity: .38; background: repeating-linear-gradient(135deg, transparent 0 15px, var(--accent-soft) 15px 17px); }
.hero__kicker { margin-bottom: .7rem; font: 650 .72rem/1 var(--mono); color: var(--accent-deep); letter-spacing: .14em; }
.hero--narrow { max-width: 42rem; padding-top: clamp(2rem, 6vw, 4rem); }
.hero__h { margin-bottom: .5rem; text-wrap: balance; font-size: clamp(2.1rem, 1.5rem + 3vw, 4rem); max-width: 16ch; }
.hero--narrow .hero__h { font-size: clamp(2.3rem, 1.8rem + 2.6vw, 4.4rem); max-width: 12ch; }
.hero__lede { font-size: clamp(1.02rem, .95rem + .4vw, 1.22rem); color: var(--ink-2); max-width: 42rem; margin-bottom: 1rem; }
.hero__note {
  font-size: .93rem; color: var(--ink-2);
  border-left: 2.5px solid var(--accent-soft); padding: .1rem 0 .1rem .9rem; margin-top: 1.4rem;
}
.hero__cta { margin: 0; }
.startbtn {
  font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .95rem; color: var(--ink);
  background: var(--raised); border: 1.5px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--accent);
  transition: transform .12s ease, box-shadow .12s ease;
}
.startbtn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent); }
.startbtn__ic { color: var(--accent); }

/* ---------------------------------------------------------------- filters
   One quiet line (search · sort · count); the checkbox facets fold away in a
   <details> so the bar never dominates the page. */
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r); border-top: 3px solid var(--ink);
  padding: .6rem .7rem;
  margin-bottom: 1.4rem;
  position: sticky; top: .4rem; z-index: 20;
  box-shadow: var(--shadow);
}
.filters__bar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.filters__search { flex: 1 1 16rem; }
.filters__search input {
  width: 100%; font: inherit; font-size: .95rem;
  padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--raised); color: var(--ink);
}
.filters__more { margin-top: .1rem; }
.filters__more summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .55rem; font-size: .8rem; color: var(--ink-2); user-select: none;
}
.filters__more summary::-webkit-details-marker { display: none; }
.filters__more summary::before { content: "▸"; font-size: .7rem; color: var(--muted); transition: transform .12s; }
.filters__more[open] summary::before { transform: rotate(90deg); }
.filters__toggle { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .72rem; }
.filters__facets {
  display: flex; flex-wrap: wrap; gap: .55rem 1.6rem; align-items: flex-end;
  margin: .7rem 0 .2rem; padding-top: .7rem; border-top: 1px solid var(--line-soft);
}
.facet { border: 0; margin: 0; padding: 0; }
.facet legend {
  font-size: .69rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); font-weight: 600; padding: 0 0 .3rem;
}
.facet__opts { display: flex; flex-wrap: wrap; gap: .3rem; }
.opt { cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt span {
  display: inline-block; padding: .21rem .6rem;
  font-size: .845rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--raised); color: var(--ink-2);
  transition: background .12s, color .12s, border-color .12s;
}
.opt:hover span { border-color: var(--muted); }
.opt input:checked + span {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500;
}
.opt input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.filters__foot {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft); padding-top: .7rem; margin-top: .5rem;
}
.filters__count { margin: 0; font-size: .88rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sort { margin-left: auto; display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-2); }
.sort select {
  font: inherit; font-size: .85rem; padding: .28rem .5rem;
  border: 1px solid var(--line); border-radius: 5px; background: var(--raised); color: var(--ink);
}
.btn-reset, .linkbtn {
  font: inherit; font-size: .85rem; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 5px;
  padding: .28rem .7rem; color: var(--ink-2);
}
.btn-reset:hover { border-color: var(--muted); color: var(--ink); }
.linkbtn { border: 0; color: var(--accent); text-decoration: underline; padding: 0; }

/* ---------------------------------------------------------------- grid
   Dense on purpose (fixes "too many gaps"). The photo is the loudest thing on
   the card; price/BIOS/setup detail is hidden until the card is opened. */
.grid {
  display: grid; gap: .85rem;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--ink); border-radius: var(--r);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card[hidden] { display: none; }
.card:hover { box-shadow: var(--shadow); transform: translate(-2px, -2px); }
.card__media {
  position: relative; aspect-ratio: 4 / 3; background: var(--raised);
  border-bottom: 1px solid var(--line-soft); overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__ph { object-fit: contain; }
.card__open {
  position: absolute; bottom: .5rem; left: .5rem; z-index: 2;
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: #fff; background: rgb(23 32 30 / .72); padding: .22rem .55rem; border-radius: 999px;
  backdrop-filter: blur(4px); opacity: 0; transform: translateY(4px); transition: .16s; pointer-events: none;
}
.card:hover .card__open, .card:focus-visible .card__open { opacity: 1; transform: none; }
.card__body { padding: .75rem .8rem .85rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__name { font-size: 1.1rem; margin: 0; letter-spacing: -.02em; line-height: 1.15; }
.card__meta { font-size: .78rem; color: var(--muted); margin: 0; }
.card__games { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .1rem 0 0; }
.card__games-k { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-right: .1rem; }
.gm {
  font-size: .74rem; padding: .1rem .42rem; border-radius: 3px;
  background: var(--accent-wash); color: var(--accent-deep); white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.card__chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: auto 0 0; padding-top: .2rem; }

/* power-on chime button on the photo */
.chime {
  position: absolute; bottom: .5rem; right: .5rem; z-index: 3;
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  font: inherit; font-size: .68rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink); background: rgb(255 253 247 / .82); border: 1px solid var(--line);
  padding: .22rem .5rem .22rem .4rem; border-radius: 999px; backdrop-filter: blur(5px);
}
.chime:hover { border-color: var(--accent); color: var(--accent-deep); }
.chime__ic { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .55rem; }
.chime.playing { background: var(--accent); color: #fff; border-color: var(--accent); }
.chime.playing .chime__ic { background: #fff; color: var(--accent); }

.grid__empty { padding: 3rem 0; text-align: center; color: var(--ink-2); }

/* ---------------------------------------------------------------- chips */
.chip {
  display: inline-block; font-size: .73rem; padding: .13rem .5rem;
  border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2);
  background: var(--raised); white-space: nowrap;
}
.chip--v-essential   { border-color: var(--good); color: var(--good); font-weight: 550; }
.chip--v-rewarding   { border-color: var(--good); color: var(--good); }
.chip--v-mixed       { color: var(--ink-2); }
.chip--v-curiosity   { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.chip--v-museum-piece{ color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.chip--v-skip        { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.chip--warn          { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.chip--d-trivial, .chip--d-easy { color: var(--good); }
.chip--d-hard, .chip--d-expert  { color: var(--warn); }
.chip--yt {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  text-decoration: none;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.chip--yt:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-deep);
  transform: translateY(-1px);
}
.chip__yt-ic {
  font-size: .62rem;
  color: var(--accent);
  line-height: 1;
}

/* ---------------------------------------------------------------- THE WAGE BAR
   The signature element. Identical scale on every card, so scanning the grid
   shows at a glance which machines were luxuries. Full width = two months'
   average pay; the tick marks one month. */
.wage { margin: .1rem 0 0; }
.wage__row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.wage__price { font-family: var(--mono); font-size: .93rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wage__pct { font-family: var(--mono); font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wage__track {
  position: relative; height: 7px; margin-top: .32rem;
  background: var(--accent-wash); border-radius: 2px; overflow: hidden;
}
.wage__fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 2px; }
.wage__fill--over {
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, var(--accent-deep) 6px 12px);
}
.wage__tick {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: var(--paper); opacity: .85;
}
.wage__phrase { font-size: .87rem; color: var(--ink-2); margin: .5rem 0 0; }
.wage--unknown .wage__none { font-size: .84rem; color: var(--muted); font-style: italic; }
.wage--compact .wage__price { font-size: .87rem; }

/* benchmark bars reuse the same visual language at list scale */
.bench { list-style: none; margin: .5rem 0 0; padding: 0; }
.bench li {
  display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr 3.1rem;
  gap: .85rem; align-items: center;
  padding: .38rem 0; border-bottom: 1px solid var(--line-soft);
}
.bench__label { font-size: .9rem; }
.bench__bar { height: 7px; background: var(--accent-wash); border-radius: 2px; overflow: hidden; }
.bench__bar > span { display: block; height: 100%; background: var(--accent-soft); border-radius: 2px; }
.bench--large .bench__bar > span, .bench__bar > span.over { background: var(--accent); }
.bench__pct { text-align: right; font-size: .82rem; color: var(--ink-2); }

/* ---------------------------------------------------------------- system page */
.sys { max-width: 100%; }
.sys__head { padding: 2rem 0 1.4rem; max-width: var(--prose); }
.sys__eyebrow { font-size: .8rem; color: var(--muted); letter-spacing: .02em; margin-bottom: .5rem; }
.sys__tag { font-size: 1.12rem; color: var(--ink-2); text-wrap: balance; }
.sys__aka { font-size: .88rem; color: var(--muted); }
.sys__badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }

.sys__media {
  display: grid; gap: 1rem; margin-bottom: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
/* A single photo should not become a billboard. Cap it and let the layout breathe. */
.sys__media:has(.shot:only-child) { grid-template-columns: minmax(0, 560px); }
.shot img { max-height: 420px; object-fit: contain; }
.shot { margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.shot img { width: 100%; display: block; background: var(--raised); }
.shot figcaption { font-size: .82rem; color: var(--muted); padding: .55rem .75rem; border-top: 1px solid var(--line-soft); }

.panel {
  background: var(--surface); border: 1px solid var(--ink); border-radius: var(--r);
  padding: 1.35rem 1.5rem; margin-bottom: 1rem;
}
.panel > *:last-child { margin-bottom: 0; }
.panel--intro, .panel--prose { max-width: var(--prose); font-size: 1.03rem; }
.panel--intro p:first-child { font-size: 1.1rem; }
.panel--redirect { max-width: var(--prose); }
.panel--verdict { border-left: 7px solid var(--accent); }
.verdict__line { font-size: 1.12rem; font-weight: 550; text-wrap: balance; }
.verdict__caveat { color: var(--ink-2); }

.kv { width: 100%; border-collapse: collapse; margin: .4rem 0 1rem; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.kv th { width: 34%; font-weight: 500; color: var(--ink-2); font-size: .89rem; padding-right: 1rem; }
.cell-note { font-size: .85rem; color: var(--muted); margin: .2rem 0 0; }

.unknown { color: var(--muted); font-style: italic; }
.tag {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 3px; padding: .05rem .32rem; color: var(--muted);
}
.callout {
  background: var(--accent-wash); border-radius: 5px; padding: .75rem .9rem;
  font-size: .93rem; margin: 1rem 0;
}
.legal { font-size: .93rem; color: var(--ink-2); }
.fineprint { font-size: .82rem; color: var(--muted); margin-top: 1rem; }

.plain { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.plain li { padding: .3rem 0; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }

.games { margin: .4rem 0 0; padding-left: 1.4rem; }
.games li { padding: .32rem 0; border-bottom: 1px solid var(--line-soft); }
.games__t { font-weight: 550; }
.games__n { font-size: .86rem; color: var(--muted); margin: .12rem 0 0; }

.forwhom { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1.2rem 0 0; font-size: .95rem; }
.forwhom dt { font-weight: 600; color: var(--ink-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; padding-top: .15rem; }
.forwhom dd { margin: 0; }

.tools { list-style: none; padding: 0; margin: 0; }
.tools > li { padding: 1.2rem 0; border-bottom: 1px solid var(--line-soft); max-width: var(--prose); }
.tools > li:last-child { border-bottom: 0; }
.tools h2 { font-family: var(--mono); font-size: 1rem; }
.dl {
  display: inline-block; font-size: .89rem; font-family: var(--mono);
  border: 1px solid var(--accent); border-radius: 5px; padding: .32rem .7rem;
  text-decoration: none;
}
.dl:hover { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- detail modal */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow: auto; }
.modal.show { display: flex; }
.modal__bg { position: fixed; inset: 0; background: rgb(23 32 30 / .55); backdrop-filter: blur(6px); }
.sheet {
  position: relative; z-index: 2; width: min(840px, 100%);
  background: var(--surface); border: 1px solid var(--ink); border-radius: var(--r);
  box-shadow: 6px 6px 0 rgb(23 32 30 / .3); overflow: hidden; margin-bottom: 4vh;
  animation: sheet-in .22s ease;
}
@keyframes sheet-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__close {
  position: absolute; top: .7rem; right: .7rem; z-index: 4; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1rem; color: var(--ink); background: rgb(255 253 247 / .85); border: 1px solid var(--line);
}
.sheet__close:hover { border-color: var(--accent); color: var(--accent-deep); }
.sheet__media {
  position: relative; width: min(100%, 576px); margin: 0 auto; aspect-ratio: 16 / 10; max-height: 360px; overflow: hidden;
  background: radial-gradient(120% 130% at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 58%), var(--raised);
  border-bottom: 2px solid var(--ink);
}
.sheet__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
/* one-shot shimmer as the sheet opens */
.sheet__media::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .28), transparent);
  transform: skewX(-18deg); animation: sheet-sweep 1.05s ease-out .1s 1;
}
@keyframes sheet-sweep { to { left: 130%; } }
.sheet__body { padding: 1.2rem 1.4rem 1.5rem; }
.sheet__eyebrow { font-size: .78rem; color: var(--muted); margin: 0 0 .3rem; }
.sheet__body h2 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.1rem); margin: 0 0 .3rem; }
.sheet__tag {
  font-size: 1.08rem; font-weight: 550; color: var(--ink); margin: 0 0 .9rem; text-wrap: balance;
  padding-left: .85rem; border-left: 3px solid var(--accent);
}
.sheet__price {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .25rem .8rem;
  margin: .75rem 0 .8rem; padding: .65rem .8rem;
  background: var(--accent-wash); border-left: 3px solid var(--accent);
}
.sheet__price-label { font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.sheet__price-copy { font-size: .9rem; color: var(--ink-2); }
.sheet__price-today { color: var(--muted); white-space: nowrap; }
.sheet__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .9rem; }
.sheet__intro { font-size: .96rem; color: var(--ink-2); margin: 0 0 1.1rem; }
.sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 0 0 1rem; }
.sheet__block { background: var(--raised); border: 1px solid var(--line-soft); border-radius: var(--r); padding: .8rem .9rem; }
.sheet__block p { margin: 0 0 .35rem; font-size: .9rem; }
.sheet__block p:last-child { margin-bottom: 0; }
.sheet__k { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: .5rem; }
/* ---- grade meters (Grails-inspired): fun / historical / setup, animated ---- */
.grades {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .55rem .9rem;
  margin: 0 0 1.1rem; padding: .8rem .9rem;
  background: var(--raised); border: 1px solid var(--line-soft); border-radius: var(--r); border-left: 3px solid var(--accent);
}
.grade { display: grid; grid-template-columns: 1fr; gap: .3rem; }
.grade__k { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.grade__bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.grade__bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.grade__v { font-size: .8rem; font-weight: 600; color: var(--ink); }
.grade--setup .grade__bar i { background: linear-gradient(90deg, var(--good, #4e8d6e), var(--accent)); }

/* ---- "where to start" games: numbered rows, notes, reveal-on-demand ---- */
.sheet__games { list-style: none; margin: .2rem 0 0; padding: 0; counter-reset: gm; }
.sheet__game { display: grid; grid-template-columns: 1.9rem 1fr; gap: .1rem .7rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.sheet__game:last-child { border-bottom: 0; }
.sheet__game-n { grid-row: 1 / span 3; font-size: .82rem; font-weight: 600; color: var(--accent); padding-top: .05rem; }
.sheet__game-main { display: flex; flex-direction: column; gap: .12rem; }
.sheet__game .gm { font-weight: 600; color: var(--ink); font-size: .96rem; }
.sheet__game-meta { font-size: .78rem; color: var(--muted); }
.sheet__game-note { font-size: .86rem; color: var(--ink-2); line-height: 1.4; }
.sheet__game--more { display: none; }
.sheet__game--more.sheet__game--shown { display: grid; animation: sheet-in .22s ease; }
.sheet__moregames {
  margin-top: .8rem; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem; color: var(--ink);
  background: var(--raised); border: 1.5px solid var(--accent); border-radius: 999px; padding: .35rem .9rem;
  box-shadow: 2px 2px 0 var(--accent-soft); transition: transform .12s, box-shadow .12s, background .12s, opacity .2s;
}
.sheet__moregames:hover { background: var(--accent-wash); color: var(--accent-deep); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); }
.sheet__moregames-ic { color: var(--accent); font-weight: 800; }
.sheet__moregames--done { opacity: 0; transform: translateY(-4px); }
.chip--good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.sheet__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  margin-top: .6rem;
  border-top: 1px solid var(--line-soft);
}
.sheet__full { font-size: .92rem; font-weight: 550; }
.sheet__yt {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--raised);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: .35rem .85rem;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--accent-soft);
  transition: transform .12s, box-shadow .12s, background .12s, color .12s;
}
.sheet__yt:hover {
  background: var(--accent-wash);
  color: var(--accent-deep);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--accent);
}
.sheet__yt-ic {
  color: var(--accent);
  font-size: .75rem;
}

/* intro is now full prose (multiple paragraphs) inside the sheet */
.sheet__intro p { margin: 0 0 .7rem; }
.sheet__intro p:last-child { margin-bottom: 0; }

/* ---- hardware / sound-chip spec list (full page + modal) ---- */
.specs { margin: .4rem 0 0; display: grid; gap: 0; }
.specs__row { display: grid; grid-template-columns: 8.5rem 1fr; gap: .4rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.specs__row:last-child { border-bottom: 0; }
.specs__row dt { margin: 0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding-top: .1rem; }
.specs__row dd { margin: 0; font-size: .94rem; color: var(--ink); }
/* the row people came for */
.specs__row--sound dt { color: var(--accent-deep); }
.specs__row--sound dd { font-weight: 550; }
.panel--specs .specs { max-width: 46rem; }

.specs--sheet { margin-top: .2rem; }

/* ---- expanded modal: hardware block + full detail under the YouTube link ---- */
.sheet__sec { margin: 1.3rem 0 0; }
.sheet__sec--specs {
  background: var(--raised); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: .5rem 1rem .7rem;
}
.sheet__h {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--muted); margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line-soft);
}
.sheet__sec--specs .sheet__h { border-bottom: 0; padding-bottom: 0; margin-bottom: .1rem; }
.sheet__h4 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
.sheet__sec p { font-size: .94rem; color: var(--ink-2); margin: 0 0 .6rem; }
.sheet__sec p:last-child { margin-bottom: 0; }
.kv--sheet { margin: .2rem 0 .4rem; }
.sheet__yt { margin-top: .4rem; }
.sheet__full-detail {
  margin-top: 1.4rem; padding-top: .4rem; border-top: 2px solid var(--line);
}
.sheet__perma { margin-top: 1.6rem; font-size: .9rem; font-weight: 550; }

/* start-here overlay */
.sheet--start { max-width: 620px; }
.startguide { padding: 1.6rem 1.6rem 1.8rem; }
.startguide__eyebrow { font: 650 .72rem/1 var(--mono); color: var(--accent-deep); letter-spacing: .14em; margin: 0 0 .5rem; }
.startguide h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin: 0 0 1rem; }
.startguide dl { margin: 0; }
.startguide dt { font-weight: 650; color: var(--ink); margin-top: 1rem; }
.startguide dd { margin: .2rem 0 0; color: var(--ink-2); font-size: .93rem; }
.startguide__more { margin: 1.4rem 0 0; }

@media (max-width: 560px) {
  .sheet__grid { grid-template-columns: 1fr; }
  .sheet__price { grid-template-columns: 1fr; }
  .sheet__price-today { white-space: normal; }
}

@media (max-width: 640px) {
  .filters { position: static; }
  .bench li { grid-template-columns: 1fr 2.8rem; }
  .bench__bar { grid-column: 1 / -1; }
  .panel { padding: 1.1rem 1rem; }
  .forwhom { grid-template-columns: 1fr; gap: .15rem; }
  .forwhom dd { margin-bottom: .7rem; }
}

/* Collector value — sits inside the price panel */
.collector { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.collector h3 { margin: 0 0 .5rem; }
.collector__tier {
  display: inline-block; padding: .12rem .55rem; border-radius: var(--r);
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  background: var(--accent-wash); color: var(--accent-deep);
  border: 1px solid var(--accent-soft);
}
.collector__tier--grail { background: var(--accent); color: #fff; border-color: var(--accent-deep); }
.collector__tier--very-high { background: var(--accent-soft); color: var(--accent-deep); }
.collector__range { margin-left: .5rem; font-variant-numeric: tabular-nums; }

/* Hardware revisions table */
.revs { width: 100%; border-collapse: collapse; margin-top: .4rem; font-size: .92rem; }
.revs th, .revs td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.revs thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.revs__model { font-weight: 600; white-space: nowrap; }
.revs__name, .revs__region { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); white-space: normal; }
@media (max-width: 640px) { .revs__model { white-space: normal; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
