@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Special Elite'; font-weight: 400; font-display: swap; src: url('/fonts/special-elite-400.woff2') format('woff2'); }
/* Inside the case at night. One dark look, on purpose. Each game shows itself (a real
   screenshot); Jared's hardware photos and sketches fill in for any game without one. */
:root {
  --bg: #05070f; --bg-2: #0a0f20; --bg-3: #0f1630; --line: #1c2542; --line-2: #2a3560; --ink: #e8ecf8; --ink-2: #98a2c0; --ink-3: #8b96b8;
  --glow: #3aa8ff; --paper: #f3f0e6; --pen: #22309c; --stamp: #ff4d5e;
  --prod: #3ee08f; --qa: #ffbf3c; --dev: #ff5bd8; --env: var(--prod); --on-env: #05070f; --badge-ink: #c4cce4;
  --gut: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); --bar-h: 68px;
  --head: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --type: 'Special Elite', 'Courier New', monospace;
  color-scheme: dark;
}
/* The page is dark on purpose, for everyone (prefers-color-scheme: light does not change it). A light palette is kept here,
   switched on only by <html data-scheme="light">, in case it is ever wanted; high contrast is honoured. */
:root[data-scheme="light"] {
    --bg: #f5f2e9; --bg-2: #fffdf8; --bg-3: #ece7da; --line: #d9d2bf; --line-2: #b8b09a; --ink: #101528; --ink-2: #3f4764; --ink-3: #5f6784;
    --glow: #1560b8; --prod: #076836; --qa: #9a5a00; --dev: #b0128f; --on-env: #ffffff; color-scheme: light;
}
@media (prefers-contrast: more) {
  :root { --line: #46528a; --line-2: #8a96c8; --ink-2: #c9d1ea; --ink-3: #aab4d6; }
  .game, .rule, .tile, .chip, .seg, .btn.ghost, .share { border-width: 2px; }
}
html[data-env="qa"] { --env: var(--qa); }
html[data-env="dev"] { --env: var(--dev); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--mono); overflow-x: hidden; padding-bottom: env(safe-area-inset-bottom); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible, .pad-focus { outline: 3px solid var(--env); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px var(--bg); }
.skip { position: fixed; left: var(--gut); top: max(8px, env(safe-area-inset-top)); z-index: 100; transform: translateY(-200%); background: var(--env); color: var(--on-env); font: 700 15px/1 var(--mono); padding: 0 18px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; text-decoration: none; }
.skip:focus { transform: none; }
main:focus { outline: none; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar: the environment switch lives here and never scrolls away ---- */
.bar {
  position: sticky; top: 0; z-index: 20; min-height: var(--bar-h); display: flex; align-items: center; gap: 16px;
  padding: 8px max(var(--gut), calc((100% - 1180px) / 2)); padding-top: calc(8px + env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; justify-content: center; text-decoration: none; font: 700 15px/1 var(--head); letter-spacing: .01em; }
.brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; box-shadow: 0 0 10px -2px var(--glow); }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand span.sr-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tabs { display: flex; gap: 2px; margin-right: auto; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font: 700 14px/1 var(--head); letter-spacing: .02em; }
.tabs a:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--glow); }
.doc .tba { font: 700 clamp(2rem, 7vw, 3.4rem)/1 var(--head); color: var(--ink); margin: 18px 0 26px; letter-spacing: .02em; }
.envswitch { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.envswitch .lbl { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  font: 700 13px/1 var(--mono); letter-spacing: .08em; padding: 0 16px; min-height: 44px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px;
}
.seg button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: .55; }
.seg button[data-env="prod"] { --c: var(--prod); } .seg button[data-env="qa"] { --c: var(--qa); } .seg button[data-env="dev"] { --c: var(--dev); }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--c); color: var(--on-env); box-shadow: 0 0 18px -2px var(--c); }
.seg button[aria-checked="true"]::before { background: var(--on-env); opacity: 1; }
.status-link { font-size: 13px; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.status-link:hover { color: var(--ink); }

/* ---- hero ---- */
.hero { position: relative; min-height: min(84vh, 760px); display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.hero .photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; opacity: .5; transform: scale(1.05); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 75% 45%, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 45%, var(--bg) 90%), linear-gradient(to bottom, color-mix(in srgb, var(--bg) 20%, transparent), var(--bg)); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .18;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.07) 0 1px, transparent 1px 3px); }
.hero-in { width: min(1180px, 100% - 2 * var(--gut)); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 64px 0 40px; }
.kicker { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--glow); margin: 0 0 18px; }
h1 { font: 700 clamp(3rem, 8.6vw, 7rem)/.9 var(--head); letter-spacing: -.035em; margin: 0 0 26px; text-wrap: balance; }
h1 .no { position: relative; display: inline-block; }
h1 .no svg { position: absolute; left: -4%; top: 52%; width: 108%; height: 46%; overflow: visible; pointer-events: none; }
h1 .no path { fill: none; stroke: var(--stamp); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 0; filter: drop-shadow(0 0 8px rgba(255,77,94,.55)); }
.lede { font-size: 17px; color: var(--ink-2); max-width: 46ch; margin: 0 0 28px; line-height: 1.65; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 700 15px/1 var(--mono); letter-spacing: .04em; padding: 0 20px; min-height: 48px; border-radius: 12px;
  background: var(--env); color: var(--on-env); border: 0; box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 8px 30px -8px var(--env);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 14px 40px -8px var(--env); }
.btn.ghost { background: color-mix(in srgb, var(--bg-2) 70%, transparent); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.btn.ghost:hover { box-shadow: 0 0 0 1px var(--ink-3) inset; }
.btn .env { font-size: 11px; padding: 4px 7px; border-radius: 6px; background: var(--on-env); color: var(--env); letter-spacing: .1em; }
.btn[hidden] { display: none; }

/* The start-here game: the best one, with a real screenshot of it being played. */
.feature { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: #000; text-decoration: none; color: #fff; transition: transform .25s ease, border-color .25s ease; }
.feature:hover, .feature:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--env) 60%, var(--line)); }
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature .f-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(to top, rgba(5,7,15,.94), transparent); text-shadow: 0 1px 2px #000; }
.feature .f-kick { display: block; font: 700 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--env); margin-bottom: 6px; }
.feature .f-name { display: block; font: 700 clamp(1.4rem, 3vw, 2rem)/1.1 var(--head); }
.feature .f-meta { display: block; font: 400 12px/1.4 var(--mono); color: #d3daee; margin-top: 4px; }

/* The environment tooling (PROD / QA / DEV, "updated 3h ago", deploy status) is for Jared: it shows only with ?dev in the address. */
html:not([data-dev]) .devonly, html:not([data-dev]) .envswitch, html:not([data-dev]) .chips, html:not([data-dev]) .badge.fresh, html:not([data-dev]) .btn .env { display: none !important; }

/* ---- the rules: three promises, right under the fold ---- */
.rules { width: min(1180px, 100% - 2 * var(--gut)); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 6px 0 10px; }
.rule { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, var(--bg-3), var(--bg-2)); }
.rule .ic { width: 30px; height: 30px; color: var(--env); padding: 5px; border-radius: 9px; background: color-mix(in srgb, var(--env) 12%, transparent); box-sizing: content-box; }
.rule b { display: block; font: 700 17px/1.2 var(--head); margin-bottom: 3px; }
.rule span { color: var(--ink-2); font-size: 14px; }

/* ---- games ---- */
.wrap { width: min(1180px, 100% - 2 * var(--gut)); margin: 0 auto; }
.section { padding: 64px 0 24px; scroll-margin-top: var(--bar-h); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
h2 { font: 700 clamp(1.9rem, 4vw, 2.8rem)/1 var(--head); letter-spacing: -.02em; margin: 0; }
.sec-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; font-size: 14px; }
.viewing { font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
.viewing b { color: var(--env); }

.toolbar { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top)); z-index: 10; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 0; margin-bottom: 18px; background: linear-gradient(var(--bg) 70%, transparent); }
.search { position: relative; flex: 1 1 180px; max-width: 220px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; font: 400 14px/1 var(--mono); color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 34px 0 38px; min-height: 44px; }
.search input::placeholder { color: var(--ink-3); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 700 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--mono); letter-spacing: .04em; color: var(--ink-2); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 14px; min-height: 44px; }
.filter .ic { width: 15px; height: 15px; }
.filter:hover { color: var(--ink); border-color: var(--ink-3); }
.filter[aria-pressed="true"] { color: var(--on-env); background: var(--env); border-color: var(--env); }
.tools-end { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.sort { font: 700 12px/1 var(--mono); color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; min-height: 44px; }
.count { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.game {
  position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--bg-2);
  border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--env) 55%, var(--line)); box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--env) 60%, transparent); }
.game .art { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.game .art .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; filter: saturate(.6) contrast(1.1); transition: transform .5s ease, opacity .3s ease; }
.game:hover .art .ph { transform: scale(1.05); opacity: .75; }
.game .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-2) 2%, transparent 60%); }
.game .art .sk { position: absolute; right: 4%; bottom: -6%; height: 104%; width: auto; mix-blend-mode: screen; z-index: 1; transition: transform .35s ease;
  filter: drop-shadow(0 0 10px rgba(58,168,255,.7)) sepia(1) hue-rotate(170deg) saturate(2.4) brightness(1.1); }
.game:hover .art .sk { transform: translateY(-4px) rotate(-1.5deg); }
.game.shot .art .ph { opacity: 1; filter: none; }
.game.shot:hover .art .ph { opacity: 1; }
.game.shot .art::after { background: linear-gradient(to top, var(--bg-2) 1%, transparent 35%); }
.badges { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; background: rgba(5,7,15,.78); color: var(--badge-ink); border: 1px solid rgba(120,135,190,.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.badge.new { background: var(--stamp); color: #fff; border-color: transparent; }
.badge.fresh { color: #3ee08f; border-color: rgba(62,224,143,.5); }
html[data-env="qa"] .badge.fresh { color: #ffbf3c; border-color: rgba(255,191,60,.5); }
html[data-env="dev"] .badge.fresh { color: #ff5bd8; border-color: rgba(255,91,216,.5); }
@media (min-width: 760px) {
  .game.flagship { grid-column: span 2; }
  .game.flagship .art { aspect-ratio: 2 / 1; }
  .game.flagship .art .ph { object-position: center 8%; }
}
.game .body { padding: 2px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game h3 { font: 700 1.4rem/1.12 var(--head); margin: 0; letter-spacing: -.01em; min-width: 0; }
.game h3 a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.game h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.titlerow { display: flex; align-items: center; gap: 12px; }
.gicon { flex: none; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); object-fit: cover; }
.game { scroll-margin-top: calc(var(--bar-h) + 84px); }
.game.hit { border-color: var(--env); box-shadow: 0 0 0 3px color-mix(in srgb, var(--env) 55%, transparent), 0 20px 50px -20px var(--env); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--ink-3); }
.meta .genres { color: var(--ink-2); }
.meta .plays { display: inline-flex; gap: 6px; color: var(--ink-2); }
.meta .plays .ic { width: 17px; height: 17px; }
.game .blurb { margin: 0; color: var(--ink-2); font-size: 14px; flex: 1; }
.game details.stack, .game details.info { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.game details.stack summary, .game details.info summary { min-height: 44px; cursor: pointer; color: var(--ink-3); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.game details.stack summary::-webkit-details-marker, .game details.info summary::-webkit-details-marker { display: none; }
.game details.stack summary::before, .game details.info summary::before { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 11px; }
.game details.stack[open] summary::before, .game details.info[open] summary::before { content: "-"; }
.game details.stack summary:hover, .game details.info summary:hover { color: var(--ink-2); }
.game details.stack p { margin: 8px 0 0; }
.game details.info dl { margin: 4px 0 0; display: grid; gap: 8px; }
.game details.info dt { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; color: var(--ink-2); }
.game details.info dd { margin: 2px 0 0; }
.actions { display: flex; gap: 8px; }
.play { flex: 1; justify-content: center; }
.play.off { background: transparent; color: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset; cursor: default; pointer-events: none; }
.share { appearance: none; cursor: pointer; display: inline-grid; place-items: center; width: 48px; min-height: 48px; border-radius: 12px; background: transparent; border: 0; box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--ink-2); position: relative; }
.share:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--ink-3) inset; }
.fav { appearance: none; cursor: pointer; display: inline-grid; place-items: center; width: 48px; min-height: 48px; border-radius: 12px; background: transparent; border: 0; box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--ink-2); }
.fav:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--ink-3) inset; }
.fav[aria-pressed="true"] { color: var(--on-env); background: var(--env); box-shadow: none; }
.fav[aria-pressed="true"] .ic { fill: currentColor; }
.share[data-done]::after { content: attr(data-done); position: absolute; bottom: calc(100% + 6px); right: 0; font: 700 11px/1 var(--mono); white-space: nowrap; color: var(--on-env); background: var(--env); padding: 6px 8px; border-radius: 6px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chip { display: flex; flex-direction: column; justify-content: center; gap: 3px; text-decoration: none; padding: 8px 10px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); font-size: 11px; color: var(--ink-3); min-width: 0; }
.chip b { font-size: 12px; letter-spacing: .1em; color: var(--c); display: flex; align-items: center; gap: 6px; }
.chip b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.chip[data-env="prod"] { --c: var(--prod); } .chip[data-env="qa"] { --c: var(--qa); } .chip[data-env="dev"] { --c: var(--dev); }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.chip:hover { border-color: var(--c); color: var(--ink-2); }
.chip.none { border-style: dashed; }
.chip.none b::before { background: transparent; border: 1px solid var(--c); }
.chip.current { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--ink-2); }
details.old { margin-top: 34px; border-top: 1px dashed var(--line); padding-top: 18px; }
details.old summary { cursor: pointer; color: var(--ink-2); font-size: 14px; min-height: 44px; display: flex; align-items: center; }
details.old .grid { content-visibility: auto; contain-intrinsic-size: auto 1600px; }
details.old .grid { margin-top: 20px; }
details.old .game { opacity: .8; }
.empty { grid-column: 1 / -1; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 18px; padding: 30px; text-align: center; }
.empty button { margin-left: 8px; }

footer { content-visibility: auto; contain-intrinsic-size: auto 140px; border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--ink-3); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
.linkbtn { appearance: none; background: none; border: 0; cursor: pointer; color: var(--ink-2); font: inherit; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn[hidden] { display: none; }
.linkbtn .ic { width: 16px; height: 16px; }
footer kbd { font: 700 11px/1 var(--mono); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 5px; color: var(--ink-2); }

/* ---- static pages: /about/, /credits/, /privacy/ ---- */
.doc { width: min(760px, 100% - 2 * var(--gut)); margin: 0 auto; padding: 48px 0 32px; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; margin: 0 0 22px; }
.doc h2 { font-size: 1.35rem; margin: 30px 0 8px; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--ink-2); font-size: 15px; max-width: 68ch; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc dt { font: 700 15px/1.3 var(--head); color: var(--ink); margin-top: 16px; }
.doc dd { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 68ch; }
.doc a { color: var(--ink); text-underline-offset: 3px; }

/* ---- 404 ---- */
.lost { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.lost h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
.lost p { color: var(--ink-2); }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding: 40px 0 36px; }
  .rules { grid-template-columns: 1fr; gap: 10px; }
  .tools-end { margin-left: 0; width: 100%; justify-content: space-between; }
  .search { max-width: none; }
}
@media (max-width: 620px) {
  .bar { gap: 10px; flex-wrap: wrap; }
  .brand span:not(.sr-name) { display: none; }
  .envswitch .lbl, .status-link { display: none; }
  .seg button { padding: 0 12px; }
  .toolbar { position: static; }
  .game { scroll-margin-top: calc(var(--bar-h) + 12px); }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .filter { flex: none; }
  .grid { grid-template-columns: 1fr; }
  .search kbd { display: none; }
  .lede { font-size: 15px; }
}
@media (max-height: 520px) {  /* a phone on its side: the toolbar would fill half the screen, so it scrolls away */
  .toolbar { position: static; }
  .game { scroll-margin-top: calc(var(--bar-h) + 12px); }
}
@media (prefers-reduced-motion: no-preference) {
  h1 .no path { stroke-dashoffset: 900; animation: scribble 1.1s .5s cubic-bezier(.6,.1,.3,1) forwards; }
  .game { animation: rise .35s ease both; }
  @keyframes scribble { to { stroke-dashoffset: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .hero .photo { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (forced-colors: active) {
  .seg button[aria-checked="true"], .filter[aria-pressed="true"], .fav[aria-pressed="true"] { outline: 2px solid Highlight; }
  .btn, .game, .tile, .chip, .rule, .share, .fav, .filter, .search input, .sort { border: 1px solid CanvasText; }
  .badge { border: 1px solid CanvasText; }
}

/* ---- strips: continue where you left off, what's new ---- */
.strips:empty { display: none; }
.strip { margin: 0 0 18px; }
.strip h3 { font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.strip a { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 12px; text-decoration: none; background: var(--bg-2); font: 700 13px/1.25 var(--head); }
.strip a small { display: block; font: 400 11px/1.2 var(--mono); color: var(--ink-2); }
.strip a:hover { border-color: var(--env); }
.strip a.plain { border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; font: 400 12px/1 var(--mono); }
.strip .more { font-size: 12px; color: var(--ink-2); margin-left: 6px; align-self: center; }
.meta .time { border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px; color: var(--ink-2); }
.pills { display: inline-flex; gap: 8px; align-items: center; }

/* ---- keyboard help ---- */
dialog.help { max-width: min(520px, 100% - 32px); width: 100%; padding: 22px 24px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg-2); color: var(--ink); }
dialog.help::backdrop { background: rgba(5,7,15,.72); }
dialog.help h2 { font-size: 1.5rem; margin-bottom: 14px; }
dialog.help dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 18px; font-size: 14px; }
dialog.help dt { white-space: nowrap; } dialog.help dd { margin: 0; color: var(--ink-2); }
dialog.help kbd, footer kbd { font: 700 12px/1 var(--mono); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; }
.credit { font-weight: 700; color: var(--ink-2); }

/* ---- a phone on its side: the hero gives way to the games ---- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 0; }
  .hero-in { padding: 24px 0 20px; }
  h1 { font-size: clamp(2rem, 7vh, 3.4rem); margin-bottom: 14px; }
  .kicker { margin-bottom: 8px; }
  .lede { margin-bottom: 14px; }
}

/* ---- a TV or a very wide window: the same page, bigger, with a focus ring you can see from the sofa ---- */
@media (min-width: 2200px) { html { zoom: 1.6; } }
@media (min-width: 3000px) { html { zoom: 2.2; } }
@media (min-width: 2200px) { :focus-visible, .pad-focus { outline-width: 5px; outline-offset: 5px; } }

/* ---- print: the list of games on white paper, no controls ---- */
@media print {
  :root { --bg: #fff; --bg-2: #fff; --bg-3: #fff; --ink: #000; --ink-2: #222; --ink-3: #444; --line: #bbb; --line-2: #888; --glow: #000; --env: #000; color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .bar, .toolbar, .feature, .hero .photo, .hero::before, .hero::after, .actions, .chips, .skip, .strips, .cta-row, .badges, .sk, #install, details.stack, footer .foot-links button { display: none !important; }
  .hero { min-height: 0; } .hero-in { grid-template-columns: 1fr; padding: 0 0 12px; }
  h1 { font-size: 28pt; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .game { break-inside: avoid; animation: none; border: 1px solid #888; box-shadow: none; }
  .game .art { display: none; }
  .game .body { padding: 10px; }
  a[href^="http"]::after { content: none; }
}
