:root {
  --contrast: #222222;
  --contrast-2: #575760;
  --contrast-3: #b2b2be;
  --base: #f0f0f0;
  --base-2: #f7f8f9;
  --base-3: #ffffff;
  --accent: #1e73be;
  --brand: #c0392b;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 20px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--contrast);
  background: var(--base);
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--contrast); }
h1, h2, h3 { margin: 0 0 20px; line-height: 1.25; color: var(--contrast); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 400; }
h3 { font-size: 1.45rem; font-weight: 400; }
p { margin: 0 0 1.5em; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

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

/* Header */
.site-header { background: var(--base-3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; padding-bottom: 24px; }
.brand img { width: min(420px, 70vw); }
.primary-nav { background: var(--base-3); border-top: 1px solid var(--base); }
.nav-list { display: flex; flex-wrap: wrap; margin: 0 auto; list-style: none; }
.nav-list a {
  display: block;
  padding: 0 14px;
  line-height: 56px;
  font-size: 15px;
  color: var(--contrast);
  text-decoration: none;
  transition: color .2s;
}
.nav-list li:first-child a { padding-left: 0; }
.nav-list a:hover,
.nav-list a.is-active { color: var(--accent); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 11px;
  width: 22px; height: 2px;
  background: var(--contrast);
  transition: transform .3s, background .3s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Article */
main.container { padding-top: 20px; padding-bottom: 40px; }
.entry { padding: clamp(24px, 4vw, 40px); background: var(--base-3); }
.entry-header { margin-bottom: 10px; }
.entry section,
.conclusion { padding-top: 10px; }

.toc { margin: 0 0 2em; padding: 20px 24px; border: 1px solid #e5e5e5; background: var(--base-2); }
.toc-title { margin: 0 0 8px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 22px; }
.toc ol ol { padding-left: 20px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.wide-figure { margin: 0 0 1.5em; }
.wide-figure img { margin: 0 auto; }

.intro-with-badge { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.intro-with-badge > * { min-width: 0; }

.game {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid #e5e5e5;
  background: var(--base-2);
  scroll-margin-top: 20px;
}
.game > * { min-width: 0; }
.game img { width: 100%; border: 1px solid #e5e5e5; background: var(--base-3); }
.game h3 { margin-bottom: 12px; }
.game p { margin: 0; }
.game-text { grid-template-columns: 1fr; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.5em; padding: 0; list-style: none; }
.chips li {
  padding: 6px 14px;
  border: 1px solid #dcdce6;
  border-radius: 999px;
  font-size: 15px;
  background: var(--base-2);
}

#faq details { border-bottom: 1px solid #e5e5e5; }
#faq summary { position: relative; padding: 16px 40px 16px 0; list-style: none; cursor: pointer; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); }
#faq details[open] summary::after { content: "−"; }
#faq summary h3 { display: inline; margin: 0; font-size: 1.15rem; }
#faq details p { margin: 0; padding: 0 0 16px; }
.conclusion { margin-top: 1.5em; }

/* Footer */
.site-footer { font-size: 15px; color: var(--contrast-2); background: var(--base-3); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 20px; padding-bottom: 20px; }
.footer-inner p { margin: 0; }
.footer-inner a { text-decoration: none; }

.back-to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 2px;
  color: var(--base-3);
  background: rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
}
.back-to-top:hover { color: var(--base-3); background: rgba(0, 0, 0, .6); }
.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a, .nav-list li:first-child a { padding: 0; line-height: 48px; border-bottom: 1px solid var(--base); }
  .intro-with-badge, .game { grid-template-columns: 1fr; }
  .intro-with-badge img, .game img { max-width: 320px; }
}

@media (max-width: 767.98px) {
  body { font-size: 16px; }
  .container { padding: 0 12px; }
  main.container { padding-top: 12px; }
  .entry { padding: 20px 16px; }
  .game { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.release-not-found main { display: block; width: 100%; max-width: 640px; min-height: 0; margin: 10vh auto; padding: 32px; box-sizing: border-box; }
.release-not-found h1 { font-size: clamp(32px, 7vw, 48px); line-height: 1.2; letter-spacing: normal; }
