:root {
  color-scheme: dark;
  --page: #090b10;
  --surface: #10141c;
  --surface-2: #161c26;
  --line: #2a3342;
  --line-bright: #47566d;
  --text: #f2f5f8;
  --muted: #a7b1c0;
  --cyan: #56d9ff;
  --magenta: #ff5aa7;
  --amber: #ffd166;
  --green: #78e3a4;
  --shadow: 0 22px 70px rgb(0 0 0 / 35%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgb(255 255 255 / 1.5%) 1px, transparent 1px) 0 0 / 100% 4px,
    radial-gradient(circle at 10% -10%, rgb(86 217 255 / 14%), transparent 30rem),
    radial-gradient(circle at 90% 0, rgb(255 90 167 / 10%), transparent 28rem),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

button, input, select { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  color: #071016;
  background: var(--cyan);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
main,
footer {
  width: min(1600px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-banner {
  width: 100%;
  margin: 0 0 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05070b;
  box-shadow: var(--shadow);
}

.site-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 1;
  object-fit: cover;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.brand,
.github-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-shapes {
  display: grid;
  grid-template-columns: repeat(2, .48rem);
  gap: .17rem;
  rotate: -8deg;
}

.brand-shapes i { width: .48rem; height: .48rem; }
.brand-shapes i:nth-child(1) { border: 2px solid var(--cyan); border-radius: 50%; }
.brand-shapes i:nth-child(2) { background: var(--magenta); }
.brand-shapes i:nth-child(3) { background: var(--amber); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.brand-shapes i:nth-child(4) { border: 2px solid var(--green); }

.github-link {
  padding: .48rem .72rem;
  color: var(--muted);
  border: 1px solid var(--line);
}

.github-link:hover { color: var(--text); border-color: var(--line-bright); }

main { padding-block: 3.5rem 2.5rem; }

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--cyan);
  font: 700 .75rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.lede {
  max-width: 720px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.count-card {
  min-width: 150px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--magenta);
  background: rgb(16 20 28 / 80%);
  box-shadow: var(--shadow);
}

.count-card strong { display: block; font-size: 2.1rem; line-height: 1; }
.count-card span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.catalog-panel {
  border: 1px solid var(--line);
  background: rgb(16 20 28 / 92%);
  box-shadow: var(--shadow);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px auto auto;
  align-items: end;
  gap: .85rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.field { display: grid; gap: .32rem; }

.field > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

input,
select,
.reset-button {
  min-height: 42px;
  color: var(--text);
  border: 1px solid var(--line-bright);
  border-radius: 0;
  background: #0c1016;
}

input, select { width: 100%; padding: .55rem .7rem; }
input::placeholder { color: #747f8f; }

.reset-button {
  padding: .55rem .9rem;
  cursor: pointer;
}

.reset-button:hover { border-color: var(--cyan); }

.result-count {
  justify-self: end;
  margin: 0 0 .65rem;
  color: var(--muted);
  font: .78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.table-shell { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

th,
td {
  padding: .86rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  background: #0c1016;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sort-button:hover,
th[aria-sort="ascending"] .sort-button,
th[aria-sort="descending"] .sort-button { color: var(--cyan); }

.game-row:hover { background: rgb(86 217 255 / 4%); }

.title-button {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .2rem 0;
  color: var(--text);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  text-align: left;
}

.title-button:hover { color: var(--cyan); }

.disclosure {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #071016;
  background: var(--cyan);
  font-size: .7rem;
  transition: rotate 140ms ease;
}

.title-button[aria-expanded="true"] .disclosure { rotate: 90deg; }

code {
  padding: .24rem .38rem;
  color: #dbe5ef;
  background: #232b36;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .85em;
  white-space: nowrap;
}

.region-detail {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.arch-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .3rem .55rem;
  border: 1px solid var(--line-bright);
  font: .78rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-decoration: none;
  white-space: nowrap;
}

.arch-link:hover { border-color: var(--green); color: var(--green); }

.arch-links { display: flex; align-items: center; gap: .4rem; }
.disc-count, .muted { color: var(--muted); font-size: .82rem; }

.details-row td {
  padding: 0;
  white-space: normal;
  background: #0b0f15;
}

.game-details {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .8fr);
  gap: 1.25rem;
  padding: 1.25rem;
  border-left: 3px solid var(--cyan);
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

figure { margin: 0; }

figure img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #050609;
}

figcaption {
  margin-top: .35rem;
  color: var(--muted);
  font: .72rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.notes { display: grid; gap: .75rem; align-content: start; }

.note-block {
  padding: .85rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.note-block h3 {
  margin: 0 0 .35rem;
  color: var(--amber);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.note-block p { margin: 0; color: var(--muted); font-size: .88rem; }

.empty-state { margin: 0; padding: 2rem; color: var(--muted); text-align: center; }

.notice {
  display: flex;
  gap: .65rem;
  margin-top: 1rem;
  padding: .9rem 1rem;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: .86rem;
}

.notice strong { color: var(--amber); }

footer {
  display: flex;
  justify-content: space-between;
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .8rem;
}

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

.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;
}

@media (max-width: 800px) {
  main { padding-top: 2.5rem; }
  .intro { align-items: stretch; flex-direction: column; }
  .count-card { align-self: start; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .result-count { justify-self: start; margin: .25rem 0; }
  .game-details { grid-template-columns: 1fr; }
  th, td { padding: .75rem; }
}

@media (max-width: 540px) {
  .site-header, main, footer { width: min(100% - 1rem, 1600px); }
  .brand { font-size: .76rem; }
  .github-link { font-size: .75rem; }
  .toolbar { grid-template-columns: 1fr; }
  .screenshots { grid-template-columns: 1fr; }
  .notice { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
