﻿/* BlairsLab Games site. Hand-written, no external resources.
   Themes: dark "lamplit workshop" (default) and light "parchment". */

:root {
  --bg: #111522;
  --bg-2: #171c2d;
  --surface: #1c2236;
  --surface-2: #252c44;
  --border: #38405c;
  --text: #f4ead2;
  --muted: #bcb29c;
  --brass: #e2b45c;
  --brass-ink: #1a1408;
  --link: #f0c878;
  --focus: #ffd98a;
  --ok: #86dba6;
  --warn: #f2c56a;
  --info: #a9c0ff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --hero-glow: rgba(226, 180, 92, .30);
  --callout-tip: #86dba6;
  --callout-note: #a9c0ff;
  --callout-warning: #f2a36a;
  --topbar-h: 60px;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6efdf;
  --bg-2: #efe5cc;
  --surface: #fffaf0;
  --surface-2: #f3e9d0;
  --border: #d6c8a8;
  --text: #2a2118;
  --muted: #655843;
  --brass: #9a6410;
  --brass-ink: #fffaf0;
  --link: #7a4c06;
  --focus: #1b4fd8;
  --ok: #17663a;
  --warn: #7f5200;
  --info: #264aa3;
  --shadow: 0 10px 26px rgba(80, 55, 20, .16);
  --hero-glow: rgba(214, 150, 40, .30);
  --callout-tip: #17663a;
  --callout-note: #264aa3;
  --callout-warning: #9a4310;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f6efdf; --bg-2: #efe5cc; --surface: #fffaf0; --surface-2: #f3e9d0;
    --border: #d6c8a8; --text: #2a2118; --muted: #655843; --brass: #9a6410;
    --brass-ink: #fffaf0; --link: #7a4c06; --focus: #1b4fd8; --ok: #17663a;
    --warn: #7f5200; --info: #264aa3; --shadow: 0 10px 26px rgba(80, 55, 20, .16);
    --hero-glow: rgba(214, 150, 40, .30); --callout-tip: #17663a;
    --callout-note: #264aa3; --callout-warning: #9a4310; color-scheme: light;
  }
}

/* Per game accent: body gets --acc-raw/--acc-d/--acc-l/--on-acc inline from the build. */
body { --accent: var(--acc-d, #e2b45c); --accent-raw: var(--acc-raw, #e2b45c); --on-accent: var(--on-acc, #1a1408); }
:root[data-theme="light"] body { --accent: var(--acc-l, #9a6410); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) body { --accent: var(--acc-l, #9a6410); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; font-weight: 700; letter-spacing: .005em; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--brass); color: var(--brass-ink); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; min-height: 44px; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; color: var(--brass); flex: none; }
.brand .brand-sub { color: var(--muted); font-weight: 400; font-size: .85em; }
.icon-btn {
  appearance: none; border: 1px solid transparent; background: transparent; color: var(--text);
  width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); }
.icon-btn svg { width: 24px; height: 24px; }
.topbar .spacer { flex: 1; }
.nav-toggle { margin-left: -8px; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

.menu { position: relative; display: none; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; color: var(--text); font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--surface-2); }
.menu summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.menu-panel { position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; z-index: 50; }
.menu-panel a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 10px; color: var(--text); text-decoration: none; }
.menu-panel a:hover { background: var(--surface-2); }
.menu-panel a[aria-current] { background: var(--surface-2); }

.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 0 14px 0 40px; font: inherit; font-size: 1rem;
}
.search input::placeholder { color: var(--muted); }
.search .glass { position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); max-height: min(70vh, 520px); overflow: auto; padding: 6px; margin: 0; list-style: none;
}
.search-results[hidden] { display: none; }
.search-results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.search-results a:hover, .search-results a.active { background: var(--surface-2); }
.search-results .r-title { font-weight: 700; }
.search-results .r-meta { font-size: .85rem; color: var(--muted); }
.search-results .r-empty { padding: 14px; color: var(--muted); }

/* ---------- Layout ---------- */
.layout { flex: 1; width: 100%; }
main { display: block; min-width: 0; padding: 24px 16px 56px; }
.container { max-width: 1040px; margin: 0 auto; }
body.page-home main { padding: 0 0 24px; }
.sidenav { background: var(--bg-2); }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 44; opacity: 0; pointer-events: none; transition: opacity .2s; }
body.nav-open .scrim { opacity: 1; pointer-events: auto; }

@media (max-width: 959px) {
  .js .sidenav {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(88vw, 340px); z-index: 45;
    transform: translateX(-102%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
    overflow-y: auto; padding: 16px; border-right: 1px solid var(--border); box-shadow: var(--shadow);
  }
  body.nav-open .sidenav { transform: none; visibility: visible; transition: transform .25s ease; }
  body.nav-open { overflow: hidden; }
  html:not(.js) .sidenav { padding: 16px; }
  .search { max-width: none; }
  .brand .brand-sub { display: none; }
}
@media (max-width: 520px) {
  .brand-text { display: none; }
  .topbar { gap: 6px; padding: 0 12px; }
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .menu { display: block; }
  .nav-games { display: none; }
  .scrim { display: none; }
  .layout.has-sidebar {
    display: grid; grid-template-columns: 288px minmax(0, 1fr);
    max-width: 1360px; margin: 0 auto; width: 100%;
  }
  .layout.has-sidebar .sidenav {
    position: sticky; top: var(--topbar-h); align-self: start;
    height: calc(100vh - var(--topbar-h)); overflow-y: auto;
    padding: 24px 16px 32px 20px; border-right: 1px solid var(--border);
  }
  .layout.no-sidebar .sidenav { display: none; }
  main { padding: 36px 40px 72px; }
}

/* ---------- Side navigation ---------- */
.nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nav-close { display: none; }
body.nav-open .nav-close { display: inline-grid; }
@media (min-width: 960px) { .nav-close { display: none !important; } }
.nav-game-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin: 4px 0 6px; }
.nav-game-title a { color: var(--accent); text-decoration: none; }
.nav-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 20px 0 4px; font-weight: 700; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 12px;
  border-radius: 10px; color: var(--text); text-decoration: none; line-height: 1.3;
}
.sidenav li a:hover { background: var(--surface-2); }
.sidenav li a[aria-current="page"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); font-weight: 700; }
.nav-games a .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--brass)); flex: none; }
.nav-games a { justify-content: flex-start; }
.nav-games a .nm { flex: 1; }
.spoil-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--warn); color: var(--warn); border-radius: 999px; padding: 0 7px; line-height: 1.5; flex: none; }

/* ---------- Badges & buttons ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; background: color-mix(in srgb, var(--surface) 80%, transparent); line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-live { color: var(--ok); }
.badge-testing { color: var(--warn); }
.badge-dev { color: var(--info); }
.badge-other { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px;
  border-radius: 12px; font-weight: 700; text-decoration: none; border: 2px solid var(--accent-raw);
  background: var(--accent-raw); color: var(--on-accent); font-size: 1rem; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface-2); filter: none; }
.btn svg { width: 20px; height: 20px; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 70% 90% at 82% 18%, var(--hero-glow), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 1160px; margin: 0 auto; padding: 56px 16px 64px; display: grid; gap: 24px; position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; color: var(--link); font-weight: 700; margin: 0; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4rem); margin: 0; max-width: 16ch; }
.hero .lead { font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--muted); max-width: 52ch; margin: 0; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-art { position: absolute; right: -40px; top: 0; bottom: 0; width: min(520px, 70vw); z-index: 0; opacity: .28; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; }
@media (min-width: 900px) {
  .hero-inner { padding: 96px 40px 104px; }
  .hero-art { right: 3%; opacity: .95; }
}
.moth-float { animation: floaty 7s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.lantern-sway { animation: sway 9s ease-in-out infinite; transform-origin: 50% 0; transform-box: fill-box; }
.glow-pulse { animation: pulse 5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -12px); } }
@keyframes sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes pulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

.band { padding: 40px 16px; }
.band > .inner { max-width: 1160px; margin: 0 auto; }
@media (min-width: 900px) { .band { padding: 56px 40px; } }
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; }
.section-sub { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
.intro-band { padding-bottom: 8px; }

/* ---------- Game cards ---------- */
.game-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); list-style: none; padding: 0; margin: 0; }
.game-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
  --card-accent: var(--card-d, var(--accent));
}
:root[data-theme="light"] .game-card { --card-accent: var(--card-l, var(--accent)); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .game-card { --card-accent: var(--card-l, var(--accent)); } }
.game-card .btn { --accent-raw: var(--card-raw); --on-accent: var(--on-acc); background: var(--card-raw); border-color: var(--card-raw); color: var(--on-acc); }
.game-card:hover, .game-card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--card-accent); }
.card-media { position: relative; aspect-ratio: 2 / 1; background: linear-gradient(135deg, var(--card-raw), color-mix(in srgb, var(--card-raw) 25%, #0b0e17)); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .5); }
.card-media .ph svg { width: 38%; height: auto; }
.card-media .badge { position: absolute; left: 12px; top: 12px; background: var(--surface); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.4rem; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-body p { margin: 0; color: var(--muted); }
.card-actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: relative; z-index: 2; }
.card-actions .btn { min-height: 44px; padding: 6px 16px; font-size: .95rem; }
.card-actions .more { color: var(--card-accent); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Small page cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); list-style: none; padding: 0; margin: 0 0 8px; }
.page-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; height: 100%; }
.page-card:hover, .page-card:focus-within { border-color: var(--accent); transform: translateY(-2px); }
.page-card .thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent-raw), color-mix(in srgb, var(--accent-raw) 25%, #0b0e17)); overflow: hidden; }
.page-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-card .pc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.page-card h3 { margin: 0; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-card h3 a { color: var(--text); text-decoration: none; }
.page-card h3 a::after { content: ""; position: absolute; inset: 0; }
.page-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.group-title { font-size: 1.4rem; margin: 36px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.group-title:first-child { margin-top: 0; }

/* ---------- Universe teaser / community ---------- */
.world-teaser {
  display: grid; gap: 24px; align-items: center; border: 1px solid var(--border); border-radius: 22px; padding: 28px 22px;
  background: radial-gradient(ellipse 80% 120% at 100% 0%, var(--hero-glow), transparent 60%), var(--surface);
}
.world-teaser h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.world-teaser p { color: var(--muted); max-width: 56ch; margin: 0 0 18px; }
.world-teaser .art { max-width: 200px; width: 100%; margin: 0 auto; color: var(--brass); }
.world-teaser .art svg { display: block; width: 100%; height: auto; }
@media (min-width: 760px) { .world-teaser { grid-template-columns: 1fr 220px; padding: 40px; } }
.community { text-align: center; border: 1px dashed var(--border); border-radius: 22px; padding: 32px 20px; }
.community h2 { margin: 0 0 8px; }
.community p { color: var(--muted); margin: 0 auto 18px; max-width: 52ch; }

/* ---------- Hub ---------- */
.hub-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; border: 1px solid var(--border); margin-bottom: 28px; background: linear-gradient(135deg, var(--accent-raw), color-mix(in srgb, var(--accent-raw) 22%, #0b0e17)); }
.hub-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hub-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 10, 18, .92), rgba(8, 10, 18, .45) 70%, rgba(8, 10, 18, .25)); }
.hub-hero-inner { padding: 120px 22px 26px; display: grid; gap: 12px; color: #f7f0de; }
.hub-hero.no-img .hub-hero-inner { padding-top: 56px; }
.hub-hero h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); color: #fff; }
.hub-hero .tagline { margin: 0; font-size: 1.2rem; max-width: 52ch; color: #efe4c8; }
.hub-hero .hero-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hub-hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hub-hero .btn-ghost:hover { background: rgba(255, 255, 255, .15); border-color: #fff; }
.hub-hero .badge { background: rgba(8, 10, 18, .75); justify-self: start; }
.hub-hero .badge-live { color: #8ee8ae; } .hub-hero .badge-testing { color: #f6cd78; } .hub-hero .badge-dev { color: #b9ccff; } .hub-hero .badge-other { color: #ddd; }
@media (min-width: 760px) { .hub-hero-inner { padding: 180px 40px 36px; } .hub-hero.no-img .hub-hero-inner { padding-top: 70px; } }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.quick a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.quick a:hover { border-color: var(--accent); }
.empty-note { color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; }

/* ---------- Article ---------- */
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .6; }
.crumbs a { color: var(--muted); display: inline-block; padding: 6px 0; }
.crumbs a:hover { color: var(--text); }
.article { max-width: 70ch; }
.article-wide { max-width: 1040px; margin: 0 auto; }
.article-col { max-width: 70ch; }
.page-title { font-size: clamp(2rem, 5.5vw, 3rem); margin: 0 0 10px; }
.page-lead { font-size: 1.25rem; color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.page-meta { font-size: .88rem; color: var(--muted); margin: 0 0 18px; }
.spoiler-banner { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--warn); border-left-width: 6px; border-radius: 12px; padding: 12px 16px; margin: 0 0 20px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.spoiler-banner strong { color: var(--warn); }
.toc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 0 0 26px; }
.toc summary { cursor: pointer; padding: 12px 16px; font-weight: 700; min-height: 44px; display: flex; align-items: center; font-family: var(--serif); font-size: 1.05rem; }
.toc ol { margin: 0; padding: 0 16px 14px 36px; }
.toc li { margin: 2px 0; }
.toc ol ol { padding: 0 0 0 20px; }
.toc a { display: inline-block; padding: 4px 0; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.75rem; margin: 2.2em 0 .5em; padding-top: .2em; }
.prose h3 { font-size: 1.3rem; margin: 1.8em 0 .4em; }
.prose h4 { font-size: 1.1rem; margin: 1.5em 0 .3em; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1.1em; }
.prose li { margin: .25em 0; }
.prose li > p { margin-bottom: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1.4em 0; padding: .6em 1.1em; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--text); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose blockquote.callout { border-left-width: 6px; border: 1px solid var(--border); border-left: 6px solid var(--callout-note); border-radius: 12px; }
.prose blockquote.callout-tip { border-left-color: var(--callout-tip); }
.prose blockquote.callout-note { border-left-color: var(--callout-note); }
.prose blockquote.callout-warning { border-left-color: var(--callout-warning); }
.prose blockquote.callout > p:first-child > strong:first-child { text-transform: uppercase; letter-spacing: .08em; font-size: .85em; color: var(--callout-note); }
.prose blockquote.callout-tip > p:first-child > strong:first-child { color: var(--callout-tip); }
.prose blockquote.callout-warning > p:first-child > strong:first-child { color: var(--callout-warning); }
.prose details { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin: 0 0 1.1em; background: var(--surface); }
.prose summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 0; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .96rem; line-height: 1.45; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose thead th { background: var(--surface-2); font-family: var(--serif); white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface) 75%, var(--bg)); }
.prose tbody tr:nth-child(odd) { background: var(--surface); }
.prose tbody tr:last-child td { border-bottom: 0; }

.prose figure { margin: 1.6em 0; }
.prose figure img, .prose img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.prose figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; text-align: center; }
.prose p > img { margin: 1em 0; }

.pager { display: grid; gap: 12px; margin: 40px 0 0; max-width: 70ch; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); min-height: 44px; }
.pager a:hover { border-color: var(--accent); }
.pager .dir { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pager .t { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.pager .next { text-align: right; }

/* ---------- Ad slots (rendered only when ads are enabled) ---------- */
.ad-slot { display: block; margin: 28px 0; min-height: 280px; background: color-mix(in srgb, var(--surface) 60%, transparent); border: 1px dashed var(--border); border-radius: 12px; padding: 6px; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot .ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
.ad-sidebar { display: none; }
@media (min-width: 960px) { .ad-sidebar { display: block; min-height: 250px; margin: 24px 0 0; } }
.ad-end { min-height: 280px; }

/* ---------- Consent banner (stub; shown only when ads are on) ---------- */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80; max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--brass); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; font-size: .95rem; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 36px 16px 44px; color: var(--muted); font-size: .95rem; }
.site-footer .inner { max-width: 1160px; margin: 0 auto; display: grid; gap: 24px; }
.site-footer p { margin: 0; max-width: 62ch; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.site-footer h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 2px; }
@media (min-width: 900px) { .site-footer { padding: 44px 40px 52px; } }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 60px 0; }
.notfound .art { width: 140px; margin: 0 auto 16px; color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .sidenav, .site-footer, .ad-slot, .consent, .pager { display: none !important; }
  body { background: #fff; color: #000; }
}



.no-sidebar .article-wide .article-col, .no-sidebar .pager { margin-left: auto; margin-right: auto; }

/* =====================================================================
   Look pass: full-bleed art, bigger cards, title banners, gentle motion.
   Later rules here override the base styles above.
   ===================================================================== */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -6%, color-mix(in srgb, var(--accent-raw) 16%, transparent), transparent 70%),
    radial-gradient(720px 520px at -6% 104%, color-mix(in srgb, var(--accent-raw) 10%, transparent), transparent 70%);
}
.container { max-width: 1200px; }
.article-wide { max-width: 1100px; }
.band > .inner, .hero-inner, .site-footer .inner { max-width: 1320px; }
@media (min-width: 960px) { .layout.has-sidebar { max-width: 1520px; } }
.topbar { border-bottom-color: color-mix(in srgb, var(--accent-raw) 35%, var(--border)); }

/* ---------- Home hero: cross-fading key art ---------- */
.hero { background: #0b0e17; min-height: min(82vh, 760px); display: grid; align-items: end; border-bottom: 0; }
.hero-slides { position: absolute; inset: 0; z-index: -3; }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0;
  animation: heroFade calc(var(--n, 6) * 6s) linear infinite; animation-delay: calc(var(--i, 0) * 6s);
}
@keyframes heroFade {
  0% { opacity: 0; transform: scale(1.03); }
  4% { opacity: 1; }
  16% { opacity: 1; }
  21% { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.12); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(8, 10, 18, 0) 34%),
    linear-gradient(90deg, rgba(8, 10, 18, .90) 0%, rgba(8, 10, 18, .62) 42%, rgba(8, 10, 18, .12) 100%);
}
.hero-embers { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ember {
  position: absolute; bottom: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: #ffd98a; box-shadow: 0 0 10px 3px rgba(255, 200, 110, .55); opacity: 0;
  animation: emberRise var(--d) linear infinite; animation-delay: calc(var(--w) * -1s);
}
@keyframes emberRise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: .9; }
  70% { opacity: .55; }
  100% { transform: translate(46px, -78vh); opacity: 0; }
}
.hero-inner { padding-top: 120px; padding-bottom: 72px; width: 100%; }
.hero .eyebrow { color: #f0c878; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); color: #fff; max-width: 13ch; text-shadow: 0 4px 30px rgba(0, 0, 0, .65); letter-spacing: -.01em; }
.hero .lead { color: #efe4c8; font-size: clamp(1.15rem, 2.6vw, 1.5rem); text-shadow: 0 2px 14px rgba(0, 0, 0, .7); }
.hero .btn { min-height: 52px; padding: 10px 26px; font-size: 1.08rem; box-shadow: 0 10px 30px -8px rgba(226, 180, 92, .7); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); box-shadow: none; background: rgba(8, 10, 18, .35); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
@media (min-width: 900px) { .hero-inner { padding-bottom: 110px; } }
.intro-band .inner { font-size: 1.15rem; }
.section-title { font-size: clamp(1.9rem, 4.6vw, 2.8rem); }
.section-title::after, .group-title::after {
  content: ""; display: block; width: 72px; height: 4px; border-radius: 4px; margin-top: 10px;
  background: linear-gradient(90deg, var(--accent-raw), transparent);
}
.group-title { border-bottom: 0; font-size: 1.6rem; margin-top: 44px; }

/* ---------- Game cards ---------- */
.game-grid { gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.game-card { border-radius: 22px; border-top: 3px solid var(--card-raw); }
.game-card:hover, .game-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px -22px var(--card-raw), 0 12px 30px rgba(0, 0, 0, .4);
}
.card-media { aspect-ratio: 16 / 9; }
.card-media img { transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.game-card:hover .card-media img, .game-card:focus-within .card-media img { transform: scale(1.08); }
.card-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, var(--surface) 0%, transparent 38%); }
.card-media .badge { z-index: 1; }
.card-body { padding: 6px 24px 24px; }
.card-body h3 { font-size: 1.75rem; }
.card-body p { font-size: 1.05rem; }

/* ---------- Page cards ---------- */
.cards { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.page-card { border-radius: 16px; }
.page-card:hover, .page-card:focus-within { transform: translateY(-4px); box-shadow: 0 18px 40px -20px var(--accent-raw), 0 8px 22px rgba(0, 0, 0, .3); }
.page-card .thumb { position: relative; }
.page-card .thumb img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.page-card:hover .thumb img, .page-card:focus-within .thumb img { transform: scale(1.07); }
.thumb-fallback { aspect-ratio: 16 / 6 !important; }
.thumb-fallback img { transform: scale(1.9); filter: saturate(.85) brightness(.7); }
.page-card:hover .thumb-fallback img, .page-card:focus-within .thumb-fallback img { transform: scale(2.02); }
.thumb-fallback::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-raw) 45%, transparent), rgba(8, 10, 18, .35)); }

/* ---------- Game hub hero ---------- */
.hub-hero { border-radius: 26px; box-shadow: 0 30px 70px -34px var(--accent-raw); }
.hub-hero > img { animation: kenburns 32s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.hub-hero::before { background: linear-gradient(0deg, rgba(8, 10, 18, .94), rgba(8, 10, 18, .35) 62%, rgba(8, 10, 18, .1)); }
.hub-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--accent-raw), transparent 75%); }
.hub-hero-inner { padding-top: 200px; }
.hub-hero h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); text-shadow: 0 4px 26px rgba(0, 0, 0, .6); }
.hub-hero .tagline { font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
@media (min-width: 760px) { .hub-hero-inner { padding: 300px 48px 44px; } }
.quick a { transition: transform .2s, border-color .2s, background .2s; }
.quick a:hover { transform: translateY(-2px); background: var(--surface-2); }

/* ---------- Article title banner ---------- */
.page-banner {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; border: 1px solid var(--border); margin: 0 0 30px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-raw) 38%, #0b0e17), #0b0e17);
}
.pb-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; z-index: -2; filter: blur(16px) saturate(1.25); }
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 10, 18, .90), rgba(8, 10, 18, .58) 60%, rgba(8, 10, 18, .4)); }
.page-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--accent-raw), transparent 75%); }
.pb-inner { padding: 26px 22px 28px; }
@media (min-width: 760px) { .pb-inner { padding: 40px 44px 42px; } }
.page-banner .page-title { color: #fff; font-size: clamp(2.2rem, 6vw, 3.6rem); text-shadow: 0 3px 22px rgba(0, 0, 0, .6); margin-bottom: 12px; }
.page-banner .page-lead { color: #efe4c8; max-width: 62ch; margin-bottom: 0; }
.page-banner .page-meta { color: #cfc5ac; margin: 14px 0 0; }
.page-banner .crumbs, .page-banner .crumbs a { color: #d9cfb6; }
.page-banner .crumbs a:hover { color: #fff; }

/* ---------- Article body ---------- */
.prose h2 { padding-bottom: .3em; border-bottom: 1px solid var(--border); position: relative; }
.prose h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 3px; border-radius: 3px; background: var(--accent-raw); }
.prose thead th { border-bottom: 2px solid var(--accent-raw); }
.prose figure img, .prose img { border-radius: 16px; box-shadow: 0 18px 44px -22px rgba(0, 0, 0, .7); cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
.prose a img { cursor: pointer; }
.prose figure img:hover, .prose img:hover { transform: translateY(-2px); box-shadow: 0 24px 54px -22px var(--accent-raw); }
.pager a { transition: transform .2s, border-color .2s; }
.pager a:hover { transform: translateY(-2px); }
.world-teaser { border-radius: 26px; }
.community { border-style: solid; background: radial-gradient(ellipse 70% 120% at 50% 0%, var(--hero-glow), transparent 65%), var(--surface); }

/* ---------- Scroll reveal and picture zoom (classes are added by site.js) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.zoom { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 3vmin; background: rgba(5, 7, 12, .92); cursor: zoom-out; animation: zoomIn .18s ease; }
.zoom img { max-width: 100%; max-height: 94vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
@keyframes zoomIn { from { opacity: 0; } to { opacity: 1; } }
body.zoom-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .hero-slides img:first-child { opacity: 1; }
  .ember { display: none; }
}
@media print { .page-banner { border: 0; background: none; } .pb-bg, .hero-slides, .hero-embers { display: none; } .page-banner .page-title, .page-banner .page-lead { color: #000; text-shadow: none; } }

/* Hub hero, second pass: the key art often has the game's name painted in, so show the picture whole
   and put the heading in a bar under it instead of on top of it. */
.hub-hero { background: #0b0e17; }
.hub-hero > img { position: static; display: block; width: 100%; height: auto; max-height: 600px; object-fit: cover; z-index: auto; animation: none; }
.hub-hero::before { display: none; }
.hub-hero-inner, .hub-hero.no-img .hub-hero-inner {
  position: relative; margin-top: -80px; padding: 96px 24px 30px;
  background: linear-gradient(180deg, rgba(11, 14, 23, 0) 0, #0b0e17 80px, color-mix(in srgb, var(--accent-raw) 20%, #0b0e17) 100%);
}
.hub-hero.no-img .hub-hero-inner { margin-top: 0; padding-top: 56px; }
@media (min-width: 760px) { .hub-hero-inner, .hub-hero.no-img .hub-hero-inner { padding: 100px 48px 40px; } .hub-hero.no-img .hub-hero-inner { padding-top: 70px; } }

.article-col { max-width: 78ch; }
.pager { max-width: 78ch; }
