/* dark is the default; html[data-theme="light"] switches to light */
:root {
  --bg: #0f1115;
  --card: #171a20;
  --fg: #ebe9e4;
  --muted: #9aa1ac;
  --line: #262a32;
  --accent: #8eaaff;
  --accent-soft: #1c2440;
  --radius: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f6f2;
  --card: #ffffff;
  --fg: #16181d;
  --muted: #5f6672;
  --line: #e3e0d8;
  --accent: #3156d3;
  --accent-soft: #e9eefc;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-feature-settings: "kern", "liga", "tnum";
  text-rendering: optimizeLegibility;
}
main { max-width: 42rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg); text-decoration: none; font-weight: 650; letter-spacing: .01em; }
.mark { width: 1.25rem; height: 1.25rem; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 2px; }
.mark i { background: var(--line); border-radius: 2px; }
.mark i:nth-child(odd) { background: var(--accent); }

.tools { display: flex; align-items: center; gap: .5rem; }
.tools select, .tools button {
  font: inherit; font-size: .875rem; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; height: 2.1rem; cursor: pointer;
}
.tools select { padding: 0 2rem 0 .85rem; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.tools button { width: 2.1rem; padding: 0; display: grid; place-items: center; }
.tools button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tools select:hover, .tools button:hover { border-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .4rem; font-weight: 700; text-wrap: balance; }
h2 { font-size: 1.125rem; line-height: 1.3; margin: 2.2rem 0 .5rem; font-weight: 650; }
p { margin: 0 0 .9rem; max-width: 64ch; text-wrap: pretty; }
.meta { color: var(--muted); font-size: .9375rem; }
.lead { font-size: 1.0625rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin: 1.4rem 0 .5rem; }

.games { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; }
.game { display: flex; gap: 1rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.game img { width: 4rem; height: 4rem; border-radius: 22%; flex: none; }
.game h3 { margin: 0; font-size: 1.125rem; }
.game p { margin: .1rem 0 .55rem; color: var(--muted); font-size: .9375rem; }
.links { display: flex; flex-wrap: wrap; gap: .4rem; }
.links a { font-size: .875rem; text-decoration: none; padding: .25rem .7rem; border-radius: 999px; background: var(--accent-soft); }
.links a:hover { text-decoration: underline; }
.game h3 a { color: inherit; text-decoration: none; }
.game h3 a:hover { text-decoration: underline; }

.hero { display: flex; align-items: center; gap: 1.1rem; margin-bottom: .5rem; }
.hero img { width: 6rem; height: 6rem; border-radius: 22%; flex: none; }
.hero h1 { margin: 0; }
.hero .meta { margin: .2rem 0 0; }
.features { list-style: none; padding: 0; margin: .25rem 0 0; display: grid; gap: .5rem; }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; }

section + section { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
footer { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
@media (max-width: 30rem) { main { padding-top: 2rem; } .top { margin-bottom: 1.75rem; } }
