/* ===========================
   sevoflurane/games.css
   The community game database: the index with its search, and one page per
   game. The pages are rendered by the sevostats service; this sheet and
   games.js are their only assets. Tokens follow the Sevoflurane page's
   teal-black and gold (issue.css), in oklch.
   =========================== */

:root {
  color-scheme: dark;
  --bg: oklch(12% 0.012 220);
  --bg-deep: oklch(10.5% 0.012 225);
  --panel: oklch(16% 0.012 215);
  --panel-raised: oklch(19% 0.014 212);
  --ink: oklch(93% 0.012 85);
  --muted: oklch(73% 0.004 120);
  --dim: oklch(64% 0.008 200);
  --accent: oklch(79% 0.11 80);
  --accent-light: oklch(88% 0.07 85);
  --accent-ink: oklch(22% 0.03 70);
  --line: oklch(83% 0.03 85 / 0.16);
  --line-soft: oklch(83% 0.03 85 / 0.09);
  --gold-line: oklch(79% 0.11 80 / 0.32);
  --gold-wash: oklch(79% 0.11 80 / 0.07);
  --verdict-perfect: oklch(82% 0.12 85);
  --verdict-playable: oklch(78% 0.09 170);
  --verdict-runs: oklch(76% 0.11 55);
  --verdict-unplayable: oklch(70% 0.14 25);
  --verdict-unknown: oklch(66% 0.01 200);
  --serif: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'PingFang SC', 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --wrap: 1180px;
  --gutter: 50px;
}

:root:lang(zh-CN) {
  --serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:lang(zh-CN) .eyebrow { letter-spacing: 0.08em; }
:lang(zh-CN) h1 { line-height: 1.3; }
.language-link { white-space: nowrap; }

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 400; font-family: var(--serif); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
code { font: 0.86em var(--mono); color: var(--accent-light); overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible, .table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: 16px; padding: 9px 15px; background: var(--accent); color: var(--accent-ink); z-index: 100; transform: translateY(-160%); }
.skip:focus { transform: none; }
.eyebrow { font: 10px/1.7 var(--mono); letter-spacing: 0.17em; text-transform: uppercase; color: var(--accent); }
.inline { color: var(--accent-light); border-bottom: 1px solid var(--gold-line); padding-bottom: 1px; }
.inline:hover { color: var(--ink); border-color: var(--accent); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 11px 22px;
  border: 1px solid oklch(88% 0.05 85 / 0.45); border-radius: 6px;
  line-height: 1.4; font-size: 13px; cursor: pointer; background: none;
  transition: background 0.2s, border-color 0.2s;
}
.button:hover { background: var(--gold-wash); border-color: var(--accent); }
.button.primary {
  color: var(--accent-ink);
  background: linear-gradient(120deg, oklch(90% 0.06 85), oklch(80% 0.11 80));
  border-color: oklch(89% 0.07 85);
}
.button.primary:hover { background: oklch(89% 0.07 85); }
.button.subtle { background: oklch(14% 0.012 215 / 0.65); }

/* ---------------------------------------------------------------
   Masthead
   --------------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg-deep); }
.nav { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: flex; flex-direction: column; white-space: nowrap; }
.brand .wordmark { font: 21px/1.15 var(--serif); letter-spacing: 0.18em; }
.brand small { font: 9px/1.5 var(--mono); letter-spacing: 0.14em; color: var(--dim); margin-top: 5px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font: 14px var(--serif); }
.site-nav a { color: oklch(82% 0.006 120); }
.site-nav a:hover { color: var(--accent); }

/* ---------------------------------------------------------------
   Index: the introduction and the search
   --------------------------------------------------------------- */
main { display: block; padding-bottom: 72px; }
.intro { padding: 64px 0 40px; max-width: 760px; }
.intro h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.08; letter-spacing: -0.03em; margin: 14px 0 18px; }
.lede { color: oklch(80% 0.006 120); font-size: 15px; max-width: 620px; }
.search { margin-top: 30px; }
.search label { display: block; font: 10px/1.7 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.search-row { display: flex; gap: 10px; }
.search input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 16px;
  background: var(--panel); border: 1px solid var(--gold-line); border-radius: 6px;
  font-size: 16px;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--accent); }
.hint { margin-top: 8px; font-size: 12px; color: var(--dim); }

.live-results { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.live-results h2 { font: 10px/1.7 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.live-results .empty { font-size: 13px; }

/* ---------------------------------------------------------------
   Game lists and cards
   --------------------------------------------------------------- */
.list-section { margin-top: 44px; }
.list-section > h2, .table-section > h2, .method h2 { font-size: 28px; line-height: 1.2; margin-bottom: 18px; }
.game-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.game-card {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden;
  background: var(--panel); transition: border-color 0.2s, background 0.2s;
}
.game-card:hover { border-color: var(--gold-line); background: var(--panel-raised); }
.game-card img, .art-empty { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--bg-deep); }
/* A Steam header in a portrait slot: shown whole on the dark ground rather than cropped to its middle. */
.game-card img.art-wide { object-fit: contain; }
.card-text { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; min-width: 0; }
.game-name { font: 18px/1.3 var(--serif); overflow-wrap: anywhere; }
.matched { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.counts { font: 11px/1.5 var(--mono); color: var(--dim); }

.game-list.compact { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.game-list.compact .game-card { flex-direction: row; align-items: center; }
.game-list.compact img, .game-list.compact .art-empty { width: 60px; flex-shrink: 0; }
.game-list.compact .card-text { padding: 8px 12px; }
.game-list.compact .game-name { font-size: 16px; }

.empty { color: var(--muted); }

/* ---------------------------------------------------------------
   Verdict badges
   --------------------------------------------------------------- */
.verdict {
  --tone: var(--verdict-unknown);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 9px; border: 1px solid color-mix(in oklch, var(--tone) 45%, transparent);
  border-radius: 999px; background: color-mix(in oklch, var(--tone) 10%, transparent);
  color: var(--tone); font: 11px/1.6 var(--mono); letter-spacing: 0.04em; white-space: nowrap;
}
.verdict::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.v-perfect { --tone: var(--verdict-perfect); }
.v-playable { --tone: var(--verdict-playable); }
.v-runs { --tone: var(--verdict-runs); }
.v-unplayable { --tone: var(--verdict-unplayable); }
.v-unknown { --tone: var(--verdict-unknown); }
.verdict.big { font: 30px/1.1 var(--serif); letter-spacing: -0.01em; padding: 6px 18px 7px; }
.verdict.big::before { width: 9px; height: 9px; }

/* ---------------------------------------------------------------
   Game page
   --------------------------------------------------------------- */
.crumbs { padding-top: 26px; font: 11px/1.6 var(--mono); color: var(--dim); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--accent-light); }
.crumbs a:hover { color: var(--ink); }

.game-head { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.game-art { width: 100%; border-radius: 8px; border: 1px solid var(--line-soft); }
.game-head.has-cover { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.game-title h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.aliases { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.aliases li { overflow-wrap: anywhere; }
.aliases li + li::before { content: '·'; margin-right: 14px; color: var(--dim); }
.byline { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 14px 0 12px; font: 12px/1.6 var(--mono); color: var(--dim); }
.game-title .inline { font-size: 13px; }

.verdict-panel { margin-top: 32px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.verdict-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.verdict-line .counts { font-size: 13px; color: var(--muted); }
.verdict-note { margin-top: 12px; color: oklch(80% 0.006 120); max-width: 640px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.facts dt { font: 10px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.facts dd { font: 24px/1.3 var(--serif); margin-top: 2px; }
.facts .dd-note { display: block; margin-top: 3px; font: 11px/1.5 var(--mono); color: var(--muted); }

.table-section { margin-top: 44px; }
.section-note { margin: -8px 0 14px; font-size: 13px; color: var(--muted); max-width: 680px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.wide { min-width: 980px; }
table.mid { min-width: 620px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font: 10px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: 400; background: var(--bg-deep); }
tbody th { font-weight: 500; color: var(--ink); }
td { color: oklch(84% 0.006 120); }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.engines { white-space: normal; min-width: 140px; }
td.display { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
td.display .share {
  margin-left: 8px; padding: 1px 7px; border: 1px solid var(--gold-line); border-radius: 999px;
  background: var(--gold-wash); color: var(--accent-light); font-size: 11px;
}
tbody tr:hover th, tbody tr:hover td { background: oklch(79% 0.11 80 / 0.04); }

.updated { margin-top: 20px; font: 11px/1.6 var(--mono); color: var(--dim); }

/* ---------------------------------------------------------------
   How the data is collected
   --------------------------------------------------------------- */
.method { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 48px; color: oklch(80% 0.006 120); font-size: 14px; }
.method em { font-style: normal; color: var(--accent-light); }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.page-footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding: 32px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; }
.footer-brand { font: 19px var(--serif); letter-spacing: 0.14em; }
.footer-brand small { display: block; font: 8px/1.8 var(--mono); letter-spacing: 0.14em; color: var(--dim); }
.healing { font: italic 15px var(--serif); color: var(--accent-light); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; font-size: 13px; }
.footer-links a:hover { color: var(--accent); }
.footer-notes { width: 100%; font-size: 11px; color: var(--dim); }

/* ---------------------------------------------------------------
   Narrow windows
   --------------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .game-head { grid-template-columns: 1fr; gap: 20px; }
  .method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .nav { flex-wrap: wrap; gap: 8px 20px; padding: 14px 0; min-height: 0; }
  .site-nav { margin-left: 0; gap: 18px; font-size: 13px; flex-wrap: wrap; }
  .intro { padding: 36px 0 28px; }
  .search-row { flex-direction: column; }
  .search .button { width: 100%; }
  .game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-list.compact { grid-template-columns: minmax(0, 1fr); }
  .game-head.has-cover { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 20px; }
  .verdict-panel { padding: 20px 18px; }
  .verdict.big { font-size: 26px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts dd { font-size: 20px; }
  .footer-links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* The index's Not-on-Steam filter, and a game page's Reports: staff reports first with a
   badge, each with its verdict tone, the run's configuration as chips, and the note. */
/* ---- Index: the "Not on Steam" filter under the search box ---- */
.kind-filter { display: flex; gap: 14px; margin-top: 18px; font: 11px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.kind-filter a { color: var(--accent-light); }
.kind-filter a:hover { color: var(--ink); }
.kind-filter [aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--gold-line); }

/* ---- Game page: Reports ---- */
.reports { margin-top: 44px; }
.reports > h2 { font-size: 28px; line-height: 1.2; margin-bottom: 18px; }

.report-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin: 0 0 18px; }
.report-filter label { display: flex; flex-direction: column; gap: 6px; font: 10px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.report-filter select { min-height: 36px; padding: 6px 10px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.report-filter select:focus { border-color: var(--accent); }
.report-filter .inline { font-size: 13px; }

.report-list { display: grid; gap: 12px; }
.report { padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel); }
.report.staff { border-color: var(--gold-line); }
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.report-head time { margin-left: auto; font: 11px/1.6 var(--mono); color: var(--dim); }
.badge { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font: 11px/1.6 var(--mono); letter-spacing: 0.04em; }
.staff-badge { color: var(--accent-light); border: 1px solid var(--gold-line); background: color-mix(in oklch, var(--accent) 10%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; list-style: none; padding: 0; }
.chips li { padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; font: 11px/1.6 var(--mono); color: var(--muted); white-space: nowrap; }

.report-note { margin-top: 12px; max-width: 680px; white-space: pre-line; color: oklch(84% 0.006 120); }

/* Report verdict tones, reusing the summary's palette:
   plays = perfect, plays-with-fixes = playable, launches = runs, fails = unplayable. */
.r-plays { --tone: var(--verdict-perfect); }
.r-plays-with-fixes { --tone: var(--verdict-playable); }
.r-launches { --tone: var(--verdict-runs); }
.r-fails { --tone: var(--verdict-unplayable); }

@media (max-width: 640px) {
  .report { padding: 14px; }
  .report-head time { margin-left: 0; width: 100%; }
}
