@font-face { font-family:'Source Han Sans'; src:url('/fonts/SourceHanSansCN-VF.woff2') format('woff2'); font-weight:100 900; font-style:normal; font-display:swap; }
/* ---------------------------------------------------------------------- */
/* Font                                                                    */
/* ---------------------------------------------------------------------- */

@font-face {
  font-family: 'Game Sites Sans';
  src: url('/fonts/GameSitesSans.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Game Sites Sans', 'Source Han Sans', sans-serif;
  line-height: 1.6;
  min-width: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0 0 1em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* ---------------------------------------------------------------------- */
/* Theme tokens                                                            */
/* ---------------------------------------------------------------------- */

html[data-site='greatgame'] {
  --bg: #0a0e14;
  --bg-raised: #10151f;
  --ink: #e8edf5;
  --ink-muted: #9aa7bd;
  --accent: #5be3ff;
  --line: #263041;
  --rule: #1b2331;
  --focus: #5be3ff;
  --card-bg: #0d1220;
}

html[data-site='puzzle'] {
  --bg: #f5f3e9;
  --bg-raised: #eeebd9;
  --ink: #183c31;
  --ink-muted: #4a5f52;
  --accent: #d7ef75;
  --line: #183c31;
  --rule: #d9d5bd;
  --focus: #183c31;
  --card-bg: #fbfaf1;
}

html[data-site='notfound'] {
  --bg: #12141a;
  --ink: #e8edf5;
  --ink-muted: #9aa7bd;
  --accent: #5be3ff;
  --focus: #5be3ff;
}

body {
  background: var(--bg);
  color: var(--ink);
}

/* ---------------------------------------------------------------------- */
/* Focus + skip link                                                       */
/* ---------------------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75em 1.25em;
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ---------------------------------------------------------------------- */
/* Draft banner                                                            */
/* ---------------------------------------------------------------------- */

.draft-banner {
  background: #b45309;
  color: #fff;
  text-align: center;
  padding: 0.5em 1em;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9em 1.25em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  color: var(--accent);
  flex-shrink: 0;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5em;
  height: 2.5em;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1.1em;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-icon::before {
  content: '';
  position: absolute;
  top: -6px;
}

.nav-toggle-icon::after {
  content: '';
  position: absolute;
  top: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5em;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.25em;
  flex-wrap: wrap;
}

.nav-list a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.nav-list a:hover {
  color: var(--ink);
}

.lang-switch {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1em 1.25em 1.5em;
    gap: 1em;
    display: none;
  }
  .site-nav.is-open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9em;
  }
}

@media (min-width: 781px) {
  .nav-toggle {
    display: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Layout shell                                                            */
/* ---------------------------------------------------------------------- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2em 1.25em 4em;
}

.section-heading {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5em;
  margin-bottom: 1em;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  padding: 2em 0 1.5em;
}

.hero .kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.85rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
  max-width: 18ch;
}

.hero-sub {
  max-width: 60ch;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

html[data-site='puzzle'] .hero h1 {
  max-width: 14ch;
}

/* ---------------------------------------------------------------------- */
/* Feature grid (home)                                                     */
/* ---------------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5em;
  padding: 1.5em 0;
  border-top: 1px solid var(--rule);
}

.feature-lead .kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.8rem;
}

.feature-lead h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.feature-lead h2 a {
  text-decoration: none;
  color: var(--ink);
}

.feature-desc {
  color: var(--ink-muted);
  max-width: 60ch;
}

.read-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--accent);
}

.hero-art {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-raised);
}

html[data-site='greatgame'] .feature-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.secondary-feature {
  padding: 1.5em 0;
  border-top: 1px solid var(--rule);
}

.secondary-feature > .kicker {
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.75em;
}

/* ---------------------------------------------------------------------- */
/* Cards                                                                    */
/* ---------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25em;
}

.card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.card-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-raised);
}

.card-body {
  padding: 1.1em 1.25em 1.4em;
}

.card-kicker {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5em;
}

.card-title {
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}

.card-desc {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.card-link {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------- */
/* Category strip + principles                                             */
/* ---------------------------------------------------------------------- */

.category-strip {
  padding: 2em 0;
  border-top: 1px solid var(--rule);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
}

.category-list a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  color: var(--ink);
  font-size: 0.9rem;
}

.principles-strip {
  padding: 2em 0 0;
  border-top: 1px solid var(--rule);
}

.principles-strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
}

.principles-strip li {
  flex: 1 1 220px;
  color: var(--ink-muted);
  font-size: 0.9rem;
  padding: 1em;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

/* ---------------------------------------------------------------------- */
/* Empty state                                                             */
/* ---------------------------------------------------------------------- */

.empty-state {
  padding: 3em 1.5em;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  max-width: 60ch;
  margin: 1.5em auto;
}

.empty-state h2 {
  font-size: 1.3rem;
}

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

/* ---------------------------------------------------------------------- */
/* Breadcrumbs                                                             */
/* ---------------------------------------------------------------------- */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.5em;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 0.4em;
}

.breadcrumbs a {
  text-decoration: none;
  color: var(--ink-muted);
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.breadcrumbs li[aria-current='page'] {
  color: var(--ink);
}

/* ---------------------------------------------------------------------- */
/* Article                                                                 */
/* ---------------------------------------------------------------------- */

.article-header .kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.8rem;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.15;
  max-width: 22ch;
}

.deck {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 65ch;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.article-art {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 1.5em 0;
  background: var(--bg-raised);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  gap: 2.5em;
  align-items: start;
}

.article-prose {
  max-width: 720px;
}

.article-prose h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
  scroll-margin-top: 5em;
}

.article-prose p {
  max-width: 68ch;
}

.article-prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.article-prose .table-wrap,
.article-prose table {
  display: block;
  overflow-x: auto;
}

.article-prose th,
.article-prose td {
  border: 1px solid var(--rule);
  padding: 0.6em 0.9em;
  text-align: left;
  font-size: 0.95rem;
}

.article-prose a {
  color: var(--accent);
}

.article-prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1em 0;
  padding: 0.2em 1em;
  color: var(--ink-muted);
}

.toc {
  display: none;
}

@media (min-width: 1000px) {
  .article-layout {
    grid-template-columns: minmax(0, 720px) 240px;
  }
  .toc {
    display: block;
    position: sticky;
    top: 5.5em;
    align-self: start;
    border-left: 1px solid var(--rule);
    padding-left: 1.25em;
  }
  .toc-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 0.75em;
  }
  .toc ol {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
  }
  .toc a {
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--ink-muted);
  }
  .toc a:hover {
    color: var(--ink);
  }
}

.sources-panel {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--rule);
  max-width: 720px;
}

.sources-list li {
  margin-bottom: 0.4em;
}

.sources-list a {
  color: var(--accent);
  text-decoration: none;
}

.evidence-line {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.75em;
}

.related {
  margin-top: 2em;
  max-width: 720px;
}

.related-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--accent);
}

/* ---------------------------------------------------------------------- */
/* Category page                                                           */
/* ---------------------------------------------------------------------- */

.category-page h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  margin-bottom: 1em;
}

/* ---------------------------------------------------------------------- */
/* Search page                                                             */
/* ---------------------------------------------------------------------- */

.search-page h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
}

#search-form {
  margin: 1em 0;
}

#search-input {
  width: 100%;
  max-width: 480px;
  padding: 0.7em 1em;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--ink);
  font-family: inherit;
}

#search-status {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.search-results {
  display: grid;
  gap: 1em;
  margin-top: 1em;
}

.search-result a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1em 1.25em;
}

.search-result h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35em;
}

.search-result p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5em;
}

.search-result-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------------------------------------------------------------------- */
/* About page                                                              */
/* ---------------------------------------------------------------------- */

.about-page {
  max-width: 65ch;
}

.about-page p {
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5em 1.25em;
}

.footer-brand {
  font-weight: 700;
  margin-bottom: 0.4em;
}

.footer-method,
.footer-copyright {
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin-bottom: 0.3em;
}

/* ---------------------------------------------------------------------- */
/* Language chooser (domain root)                                          */
/* ---------------------------------------------------------------------- */

.chooser-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  padding: 2em 1.25em;
}

.chooser-inner {
  text-align: center;
  max-width: 32ch;
}

.chooser-inner .logo-mark {
  margin: 0 auto 1em;
}

.chooser-brand {
  font-size: 2rem;
  margin-bottom: 0.5em;
}

.chooser-links {
  display: flex;
  gap: 1em;
  justify-content: center;
  margin-top: 1.5em;
}

.chooser-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6em 1.5em;
  font-weight: 700;
  color: var(--ink);
}

/* ---------------------------------------------------------------------- */
/* 404 page                                                                */
/* ---------------------------------------------------------------------- */

.notfound-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4em 1.25em;
  text-align: center;
}

.notfound-page h1 {
  font-size: 4rem;
}

.notfound-page hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2em auto;
  max-width: 20ch;
}

/* ---------------------------------------------------------------------- */
/* Responsive tweaks                                                       */
/* ---------------------------------------------------------------------- */

@media (max-width: 480px) {
  main {
    padding: 1.25em 1em 3em;
  }
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                          */
/* ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Final editorial styling and responsive corrections. */
@font-face { font-family:'Game Sites Sans'; src:url('/fonts/GameSitesSans.woff2') format('woff2'); font-weight:100 900; font-style:normal; font-display:swap; }
html[data-site='puzzle'] { --accent:#2b694c; --highlight:#d7ef75; --line:#c1cbb5; }
body { overflow-x:clip; }
input,button,select { font-family:inherit; }
.draft-banner { background:var(--bg-raised,#eef0e7);color:var(--ink-muted,#405346);padding:5px 20px;font-size:11px;font-weight:400;letter-spacing:.09em;border-bottom:1px solid var(--rule,#d9d5bd); }
.site-header { backdrop-filter:blur(12px); }
.header-inner { gap:24px; }
.site-nav { margin-left:auto; }
.brand { letter-spacing:-.04em; }
main { padding-top:20px; }
.hero { padding:42px 0 38px; }
.hero h1,html[data-site='puzzle'] .hero h1 { max-width:none;font-size:clamp(40px,5.5vw,70px);line-height:1.19;letter-spacing:-.055em;margin:0 0 24px;font-weight:800; }
.hero h1 span { display:block; }
.hero h1 span:last-child { color:var(--accent); }
.hero-sub { margin-bottom:0;max-width:660px;font-size:16px; }
html[data-site='puzzle'] .hero h1 span:last-child { color:#487454; }
.feature-grid,html[data-site='greatgame'] .feature-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:52px;align-items:center;padding:30px 0 36px; }
.feature-lead h2 { font-size:clamp(23px,2.5vw,34px);line-height:1.45;letter-spacing:-.035em; }
.feature-desc { font-size:15px;line-height:1.9; }
.hero-art { aspect-ratio:4/3;object-fit:cover;border-radius:2px; }
.read-link { display:inline-block;padding:10px 0;border-bottom:1px solid currentColor;font-size:14px; }
.secondary-feature .card { display:grid;grid-template-columns:minmax(0,.65fr) minmax(0,1fr);align-items:center;border-radius:2px; }
.secondary-feature .card-art { height:100%;aspect-ratio:16/9; }
.secondary-feature .card-body { padding:28px 32px; }
.card-title { line-height:1.5;letter-spacing:-.025em; }
.card-kicker { color:var(--accent); }
.category-list a { color:var(--ink);border-color:var(--line); }
html[data-site='puzzle'] .category-list a:hover { background:var(--highlight); }
.article-header h1 { max-width:1050px;line-height:1.35;text-wrap:balance;letter-spacing:-.04em; }
.article-header .deck { max-width:780px; }
.article-art { width:100%;max-height:300px;object-fit:cover;object-position:center 45%;margin-bottom:36px;border-radius:2px; }
.article-prose { font-size:17px;line-height:1.95;min-width:0; }
.article-prose ul { list-style:disc;padding-left:1.5em;margin:1em 0; }
.article-prose ol { list-style:decimal;padding-left:1.5em;margin:1em 0; }
.article-prose li { margin:0.6em 0; }
.article-prose p { max-width:none; }
.article-prose a { text-underline-offset:3px; }
.article-prose th { background:var(--bg-raised); }
.sources-panel { color:var(--ink-muted); }
#search-form { display:flex;gap:12px;max-width:700px; }
#search-input { max-width:none;min-width:0; }
.search-submit { padding:0 24px;border:1px solid var(--accent);background:var(--accent);color:var(--bg);border-radius:5px;font-weight:600;white-space:nowrap;cursor:pointer; }
.about-page { padding:42px 0;max-width:760px;font-size:17px;line-height:1.9; }
.footer-method { max-width:480px; }
.notfound-page { min-height:100vh;display:flex;flex-direction:column;justify-content:center; }
@media(max-width:780px) {
 .header-inner { gap:14px; }
 .lang-switch { margin-left:auto;order:2; }
 .nav-toggle { order:3; }
 .site-nav { margin-left:0; }
 .hero { padding:28px 0; }
 .hero h1,html[data-site='puzzle'] .hero h1 { font-size:clamp(34px,8.6vw,48px);line-height:1.3;letter-spacing:-.055em; }
 .hero-sub { font-size:14px; }
 .feature-grid,html[data-site='greatgame'] .feature-grid { grid-template-columns:1fr;gap:24px; }
 .feature-lead h2 { font-size:25px;line-height:1.5; }
 .hero-art { max-height:320px; }
 .secondary-feature .card { display:block; }
 .secondary-feature .card-body { padding:22px; }
 .article-prose { font-size:16px; }
 .article-art { max-height:220px; }
 .article-header h1 { font-size:clamp(26px,7vw,34px);text-wrap:wrap; }
 .principles-strip ul { align-items:flex-start; }
 .search-submit { padding:0 16px; }
}
