:root {
  --bg:        #161217;
  --bg-2:      #211a22;
  --surface:   #2a2230;
  --border:    rgba(255,232,244,0.12);
  --border-strong: rgba(255,232,244,0.28);
  --text:      #fff1f7;
  --text-2:    #c8adbb;
  --text-3:    #8c7482;
  --accent:    #ff5c9a;
  --accent-bg: #3b1830;
  --accent-border: rgba(255,92,154,0.34);
  --accent-hover: #4d1e3d;
  --active-text: #161217;
  --nav-bg:    rgba(22,18,23,0.92);
  --r:         8px;
  --font:      system-ui, -apple-system, sans-serif;
  --max-w:     1200px;
  --site-pad:  clamp(1.25rem, 4vw, 2.5rem);
  --nav-h:     60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* ── Container ── */
.wrap,
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--site-pad);
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.nav-inner {
  width: 100%; max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.nav-logo { justify-self: start; grid-column: 1; }
.nav-links { justify-self: center; grid-column: 2; }
.nav-actions { justify-self: end; grid-column: 3; }
.nav-burger { justify-self: end; grid-column: 3; }
.nav-logo {
  font-size: 1rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}
.nav-logo svg { color: var(--accent); }
.nav-logo img { height: 30px; width: auto; display: block; }
.nav-links {
  display: flex; align-items: center; gap: 1.75rem;
  list-style: none; flex: 1;
}
.nav-links a {
  font-size: 0.8125rem; color: var(--text-2); text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.nav-burger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Mobile menu — base styles in global mobile nav block below */

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-family: var(--font); font-size: 0.8125rem; font-weight: 500;
  padding: 0.5rem 1rem; border-radius: var(--r);
  cursor: pointer; text-decoration: none; border: none;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--text); color: var(--active-text); }
.btn-dark:hover { background: var(--text-2); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn-accent { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-border); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; border-radius: 10px; }

/* ── Tag / Badge ── */
.tag {
  display: inline-block; font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.2rem 0.625rem; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent);
}
.hero .tag { margin-bottom: 0.75rem; }

/* ── Sections ── */
.section { padding-block: clamp(0.75rem, 2vw, 1.5rem); }
.section + .section { padding-top: 0; }
.section--hero { padding-bottom: 0; }
.section--games { padding-block: clamp(0.5rem, 1.5vw, 1rem); }

.sec-label {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 0.75rem;
}
.sec-title {
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
}

/* ── Divider ── */
hr { border: none; border-top: 1px solid var(--border); }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }

/* ── Game card ── */
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.game-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); transform: translateY(-2px); }
.game-thumb {
  width: 100%; aspect-ratio: 13/10;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  position: relative; overflow: hidden;
}
/* CSS geometric art per card */
.game-thumb::before {
  content: ''; position: absolute;
  border-radius: 50%;
  background: var(--accent); opacity: 0.12;
  width: 80%; height: 80%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.game-thumb::after {
  content: ''; position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0.2;
  width: 55%; height: 55%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.game-thumb-label {
  position: relative; z-index: 1;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--accent); opacity: 0.7; text-align: center;
  padding: 0.5rem;
}
.game-thumb--photo::before,
.game-thumb--photo::after { display: none; }
.game-thumb--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
a.game-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.game-info { padding: 0.75rem 0.875rem 0.875rem; }
.game-name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.game-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.game-rating-star {
  flex-shrink: 0;
  color: var(--accent);
}
.game-rtp {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ── Stat ── */
.stat-num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.04em; color: var(--text); line-height: 1; }
.stat-lbl { font-size: 0.75rem; color: var(--text-3); margin-top: 0.25rem; }

/* ── Promo card ── */
.promo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: box-shadow 0.2s;
}
.promo-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.promo-amount { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.promo-desc { font-size: 0.8125rem; color: var(--text-2); max-width: 38ch; }

/* ── FAQ ── */
.faq-section .faq-intro {
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 52ch;
  margin-top: 0.75rem;
  line-height: 1.65;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faq-item.is-open { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.faq-list h3,
.faq-list .faq-question { margin: 0; font-size: inherit; font-weight: inherit; }
.article-section .toc-scope .faq-list h3,
.article-section .faq-list h3.faq-question { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.125rem 1.25rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s;
}
.faq-trigger:hover { color: var(--accent); }
.faq-question-text {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75rem;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.2s;
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer {
  padding: 0 1.25rem 1.125rem;
}
.faq-answer[hidden] {
  display: none !important;
}
.faq-list .faq-answer p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 0;
}
.article-section .toc-scope .faq-list .faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
}

/* ── Filter bar ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1.25rem; }
.filter-btn {
  font-family: var(--font); font-size: 0.75rem; font-weight: 500;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.375rem 0.875rem; cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active { background: var(--text); color: var(--active-text); border-color: var(--text); }
.search-input {
  font-family: var(--font); font-size: 0.8125rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.375rem 0.875rem; outline: none; min-width: 200px;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--border-strong); }
.search-input::placeholder { color: var(--text-3); }

/* ── Pagination ── */
.pagination { display: flex; gap: 0.25rem; margin-top: 1.5rem; justify-content: center; }
.page-btn {
  font-family: var(--font); font-size: 0.8125rem;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 6px;
  width: 34px; height: 34px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.page-btn:hover { color: var(--text); border-color: var(--border-strong); }
.page-btn.active { background: var(--text); color: var(--active-text); border-color: var(--text); }
.page-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem 1.25rem;
  background: var(--bg);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  text-decoration: none;
}
.footer-logo img {
  height: 30px;
  width: auto;
  display: block;
}
.footer-desc { font-size: 0.8125rem; color: var(--text-3); max-width: 26ch; line-height: 1.6; }
.footer-heading { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.875rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.8125rem; color: var(--text-2); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; color: var(--text-3); padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .search-input { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ===== PAGE INLINE STYLES ===== */

/* from index.html */
/* Hero */
    .hero {
      padding: 0;
      display: grid;
      grid-template-columns: 1fr 420px;
      gap: 2.5rem;
      align-items: center;
    }
    .hero-media {
      width: 100%;
      margin: 0;
    }
    .hero-media-slot {
      width: 100%;
      aspect-ratio: 3 / 2;
      border-radius: 12px;
      overflow: hidden;
      background: var(--bg-2);
      border: 1px solid var(--border);
    }
    .hero-media-slot img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }

    .hero h1 {
      font-size: clamp(2.5rem, 5.5vw, 4rem);
      font-weight: 600; letter-spacing: -0.04em; line-height: 1.08;
      margin: 0 0 0.875rem;
    }
    .hero h1 span { color: var(--accent); }
    .hero-sub { font-size: 1rem; color: var(--text-2); max-width: 42ch; line-height: 1.7; margin-bottom: 1.25rem; }
    .hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

    /* Stats band — full-width divider attached to hero */
    .stats-band {
      width: 100%;
      background: var(--surface);
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      margin-top: 0;
      margin-bottom: 0;
      padding-block: 0;
    }
    .stats-band .wrap {
      padding-block: 0;
    }

    /* Stats */
    .stats-row {
      display: grid; grid-template-columns: repeat(4, 1fr);
      gap: 0; border-radius: 12px;
      overflow: hidden; background: var(--surface);
    }
    .stat-cell {
      padding: 1rem 1rem;
      border-right: 1px solid var(--border);
    }
    .stat-cell:last-child { border-right: none; }

    /* Games grid */
    .games-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 1rem;
    }

    /* Promos */
    .promos-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; }
    .promo-stack { display: flex; flex-direction: column; gap: 1rem; }

    /* Section header row */
    .sec-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }

    /* Thin rule between sections */
    .section-divider { border-top: 1px solid var(--border); margin-block: 0; }

    @media (max-width: 900px) {
      .hero { grid-template-columns: 1fr; }
      .stats-row { grid-template-columns: 1fr 1fr; }
      .stat-cell:nth-child(2) { border-right: none; }
      .stat-cell:nth-child(3) { border-top: 1px solid var(--border); border-right: 1px solid var(--border); }
      .stat-cell:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
      .promos-grid { grid-template-columns: 1fr; }
    }

/* from about.html */
.page-head { padding-block: clamp(1.25rem, 3vw, 2rem) 1rem; }
    .mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
    .license-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
    .stats-inline { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
    .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.75rem; text-align: center; }
    .lic-num { font-size: 0.6875rem; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
    @media (max-width: 768px) {
      .mission-grid, .license-grid, .stats-inline { grid-template-columns: 1fr; }
    }

/* from games.html */
.page-head { padding-block: clamp(1.25rem, 3vw, 2rem) 1rem; }
    .games-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 1rem;
      min-height: 200px;
    }
    .no-results {
      display: none; padding: 4rem; text-align: center;
      font-size: 0.875rem; color: var(--text-3);
    }

/* from 404.html */
body { display:flex; flex-direction:column; min-height:100dvh; }
    .page-404 {
      flex:1; display:flex; flex-direction:column;
      align-items:center; justify-content:center;
      text-align:center; padding:2.5rem 1.5rem;
    }
    /* CSS geometric art */
    .geo-404 {
      width:140px; height:140px;
      position:relative; margin-bottom:1.5rem;
    }
    .geo-404-ring {
      position:absolute; inset:0;
      border:1px solid var(--border); border-radius:50%;
    }
    .geo-404-ring:nth-child(2) {
      inset:20px;
      border-color:var(--accent); opacity:0.3;
    }
    .geo-404-ring:nth-child(3) {
      inset:45px;
      background:var(--accent-bg);
    }
    .geo-404-num {
      position:absolute; inset:0;
      display:flex; align-items:center; justify-content:center;
      font-size:1.5rem; font-weight:700; letter-spacing:-0.04em; color:var(--accent);
    }
    .err-title { font-size:clamp(1.25rem,3vw,1.875rem); font-weight:600; letter-spacing:-0.03em; margin-bottom:0.75rem; }
    .err-sub { font-size:0.875rem; color:var(--text-2); max-width:36ch; margin-bottom:2rem; }
    .err-btns { display:flex; gap:0.75rem; flex-wrap:wrap; justify-content:center; }

/* ── Content blocks & TOC ── */
.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.125rem 1.25rem;
}

.article-section { padding-block: clamp(1rem, 2.5vw, 1.75rem); }
.article-section .toc-scope h2 { margin: 0.85em 0; font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; }
.article-section .toc-scope h3 { margin: 0.85em 0; font-size: 1.05rem; font-weight: 600; }
.article-section .toc-scope p { margin-bottom: 0.75rem; line-height: 1.7; }
.article-section .toc-scope ul,
.article-section .toc-scope ol { margin: 0.75rem 0 1rem 1.4rem; }
.article-section .toc-scope li { margin-bottom: 0.35rem; line-height: 1.6; }
.article-section .toc-scope table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.article-section .toc-scope th,
.article-section .toc-scope td { padding: 0.625rem 0.875rem; border: 1px solid var(--border); text-align: left; }
.article-section .toc-scope th { font-weight: 600; background: var(--bg-2); color: var(--text); }

.toc-scope [id] { scroll-margin-top: var(--toc-scroll-offset, 80px); }

.toc { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.875rem 1.125rem; cursor: pointer; user-select: none; background: var(--bg-2); }
.toc-title { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.toc-toggle { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-2); cursor: pointer; transition: transform 0.2s; }
.toc-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.toc-list { margin: 0; padding: 0.5rem 0.75rem 0.875rem; list-style: none; display: grid; gap: 0.25rem; }
.toc-list.collapsed { display: none; }
.toc-list a { display: block; padding: 0.625rem 0.875rem; border-radius: 6px; color: var(--text-2); text-decoration: none; font-size: 0.875rem; line-height: 1.35; border: 1px solid transparent; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.toc-list a:hover { border-color: var(--border); background: var(--bg-2); color: var(--text); }
.toc-sub a { padding-left: 1.75rem; font-size: 0.8125rem; }

/* TOC visual variant: clean two-column panel */
.toc { border-radius: 14px; background: linear-gradient(180deg, var(--surface), rgba(255,255,255,.025)); }
.toc-head { padding: 0.65rem 0.875rem; }
.toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 0.5rem; padding: 0.5rem 0.625rem 0.75rem; }
.toc-list a { padding: 0.5rem 0.625rem; font-size: 0.8125rem; line-height: 1.28; }
.toc-sub a { padding-left: 1rem; font-size: 0.78rem; opacity: 0.82; }
@media (max-width: 640px) { .toc-list { grid-template-columns: 1fr; } }

/* Hero H1 — compact fluid scale (data-hero-size set by hero-h1.js) */
.hero h1 {
  line-height: 1.12;
  margin: 0 0 0.875rem;
  font-size: clamp(1.5rem, 2.2vw + 0.65rem, 2.5rem);
}

.hero h1[data-hero-size="medium"] {
  font-size: clamp(1.375rem, 1.75vw + 0.55rem, 2.125rem);
}

.hero h1[data-hero-size="long"] {
  font-size: clamp(1.25rem, 1.35vw + 0.45rem, 1.875rem);
}

.hero h1[data-hero-size="xl"] {
  font-size: clamp(1.125rem, 1vw + 0.4rem, 1.625rem);
}

/* Inner pages — compact hero (breadcrumbs + h1 + subtitle) + content area */
.page-hero.wrap {
  padding-block: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.page-hero .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 10px;
}

.page-hero .breadcrumb a {
  color: var(--text-3);
  text-decoration: none;
}

.page-hero .breadcrumb a:hover {
  opacity: 1;
}

.page-hero h1,
.page-hero .hero-h1 {
  line-height: 1.15;
  margin: 0;
  font-size: clamp(1.375rem, 2vw + 0.5rem, 2rem);
}

.page-hero .hero-sub,
.page-hero-sub {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-2);
  width: 100%;
  max-width: none;
  display: block;
}

.page-hero-media {
  margin: 1rem 0 0;
  width: 100%;
}

.page-hero-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.content-image {
  width: 100%;
  max-width: 750px;
  height: auto;
  display: block;
  margin: 0.75rem auto 0;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

.page-button {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem auto 1.25rem;
  max-width: 750px;
}

.page-content {
  padding: 0 0 0;
}

.page-content > .container,
.page-content > .wrap {
  display: block;
}

/* Inner page spacing sync */
.page-content > .wrap {
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.page-content :is(.section, .section-sm, .article-section, .content-block, .wrap, .stats-inline, .mission-grid, .license-grid) {
  margin-bottom: 12px;
}

/* === Site layout: min viewport height, sticky footer === */
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.footer,
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

.page-404,
.error-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

main > .container:has(.error-page) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

main > .container:has(.error-page) > .error-page {
  flex: 1;
}

/* === Global mobile nav (burger + open menu) === */
:root {
  --burger-icon: var(--text);
  --mobile-nav-fg: var(--text);
  --mobile-nav-fg-active: var(--text);
  --mobile-nav-bg: var(--bg);
  --mobile-nav-border: var(--border);
}

.burger,
.nav-hamburger,
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.burger span,
.nav-hamburger span,
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--burger-icon);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.open span:nth-child(1),
.nav-hamburger.open span:nth-child(1),
.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2),
.nav-hamburger.open span:nth-child(2),
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3),
.nav-hamburger.open span:nth-child(3),
.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .burger,
  .nav-hamburger,
  .nav-burger {
    display: flex;
  }

  .header-actions > .btn,
  .hdr-cta > .btn,
  .nav-actions > .btn {
    display: none;
  }
}

.mobile-nav,
.mobile-menu {
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  z-index: 99;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.open,
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__panel {
  height: 100%;
  overflow-y: auto;
  padding: 1rem clamp(1rem, 4vw, 1.5rem) 1.5rem;
  background: var(--mobile-nav-bg);
  border-top: 1px solid var(--mobile-nav-border);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.mobile-menu.open .mobile-menu__panel {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.mobile-menu-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  transition: color 0.15s, background 0.15s;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
  color: var(--text);
  background: var(--bg-2);
}

.mobile-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--mobile-nav-border);
}

.mobile-menu-actions .btn {
  justify-content: center;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
}

.mobile-nav.open,
.mobile-menu.open {
  display: block;
  flex-direction: unset;
}

.mobile-nav a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 11px 16px;
  color: var(--mobile-nav-fg);
  text-decoration: none;
}

.mobile-nav a:not(.btn):hover,
.mobile-nav a:not(.btn).active {
  color: var(--mobile-nav-fg-active);
}

.mobile-nav-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--mobile-nav-border);
}

.mobile-nav-actions .btn,
.mobile-menu .btn,
.mobile-menu a.btn {
  flex: 1;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 0;
}

body.menu-open {
  overflow: hidden;
}

body > .mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--header-h, var(--nav-h, 64px));
  z-index: 99;
  background: var(--mobile-nav-bg);
  border-top: 1px solid var(--mobile-nav-border);
  padding: 16px;
  overflow-y: auto;
  gap: 2px;
}

.site-header > .mobile-nav,
header.site-header > .mobile-nav {
  position: static;
  background: var(--mobile-nav-bg);
  border-top: 1px solid var(--mobile-nav-border);
  padding: 8px 16px 12px;
  gap: 0;
}


/* === Global content typography (page-content, articles) === */
.page-content,
.article-section,
.content-block {
  font-size: 1rem;
  line-height: 1.7;
}

.page-content :is(h1, h2, h3, h4),
.article-section :is(h1, h2, h3, h4),
.content-block :is(h1, h2, h3, h4) {
  color: inherit;
  letter-spacing: -0.01em;
}

.page-content h1:not(.hero-h1),
.article-section h1:not(.hero-h1),
.content-block h1:not(.hero-h1) {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0.75em 0;
}

.page-content h2,
.article-section h2,
.content-block h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0.85em 0;
}

.page-content h3,
.article-section h3,
.content-block h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0.85em 0;
}

.page-content h4,
.content-block h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 1em 0 0.35em;
}

.page-content p,
.article-section p,
.content-block p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 0.75em;
}

.content-block :is(ul, ol) {
  margin: 0 0 1em 1.25em;
  padding: 0;
}

.page-content li,
.article-section li,
.content-block li,
.toc-scope li {
  margin-bottom: 0.35em;
  line-height: 1.65;
  color: var(--site-text-color);
}

.page-content table,
.content-block table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.9375rem;
}

.page-content :is(th, td),
.content-block :is(th, td) {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--mobile-nav-border, rgba(255, 255, 255, 0.12));
  text-align: left;
  vertical-align: top;
}

.page-content th,
.content-block th {
  font-weight: 600;
}

.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1em 0;
  border-radius: var(--r);
  scrollbar-width: thin;
  scrollbar-color: var(--text-3) transparent;
}

.article-section .toc-scope .table-wrapper table,
.page-content .table-wrapper table,
.content-block .table-wrapper table,
.table-wrapper table {
  width: max-content;
  min-width: 100%;
  margin: 0;
}

/* Site-wide typography rhythm override */
:root {
  --site-text-color: var(--color-text, var(--text, var(--txt, var(--ink, #26303d))));
  --site-muted-color: var(--color-muted, var(--muted, var(--dim, #5f6c7b)));
  --site-heading-color: var(--color-heading, var(--heading, var(--site-text-color)));
  --site-section-space: clamp(0.5rem, 1.5vw, 1rem);
  --site-block-space: clamp(0.625rem, 1.25vw, 0.875rem);
}

body {
  color: var(--site-text-color);
}

main,
.page,
.page-content,
.content,
.content-block,
.article,
.article-section,
.text-section,
.manifesto,
.faq,
.toc {
  color: var(--site-text-color);
}

section,
.section,
.page-section,
.article-section,
.content-section,
.content-block {
  margin-top: var(--site-section-space);
  margin-bottom: var(--site-section-space);
  padding-top: clamp(0.5rem, 1.5vw, 1rem);
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

section:first-child,
.section:first-child,
.page-section:first-child,
.article-section:first-child,
.content-section:first-child,
.content-block:first-child {
  margin-top: 0;
}

section.stats-band {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.section {
  padding-top: clamp(0.75rem, 2vw, 1.5rem);
  padding-bottom: clamp(0.75rem, 2vw, 1.5rem);
}

.section--hero {
  padding-top: clamp(1rem, 2.5vw, 1.5rem);
  padding-bottom: 0;
}

.section--games {
  padding-top: clamp(0.5rem, 1.5vw, 1rem);
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.section + .section,
.section--hero + .section,
.section--games + .section {
  padding-top: clamp(0.5rem, 1.5vw, 1rem);
}

p,
li,
dl,
figcaption,
blockquote {
  color: var(--site-text-color);
}

p {
  margin-top: 0;
  margin-bottom: 0.85rem;
  line-height: 1.7;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

h1,
.page-hero h1,
.hero h1,
.article h1,
.article-section h1 {
  max-width: 980px;
  margin: 1rem 0;
  color: var(--site-heading-color);
  font-size: clamp(1.75rem, 3vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.hero h1 {
  margin: 0 0 0.875rem;
}

.page-hero h1,
.page-hero .hero-h1 {
  margin: 0;
}

h2,
.page-hero h2,
.hero h2,
.article h2,
.article-section h2,
.content h2,
.content-block h2 {
  margin: 0.9rem 0;
  color: var(--site-heading-color);
  font-size: clamp(1.45rem, 2.5vw, 1.625rem);
  line-height: 1.22;
  letter-spacing: -0.018em;
}

h3,
.article h3,
.article-section h3,
.content h3,
.content-block h3 {
  margin: 0.8rem 0;
  color: var(--site-heading-color);
  font-size: clamp(1.2rem, 2vw, 1.375rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
}

h2 + p,
h3 + p {
  margin-top: 0;
}

main ul,
main ol,
.page-content ul,
.page-content ol,
.content ul,
.content ol,
.article ul,
.article ol,
.article-section ul,
.article-section ol,
.content-block ul,
.content-block ol,
.toc-scope ul,
.toc-scope ol {
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
  padding-left: 1.25rem;
  color: var(--site-text-color);
}

main li,
.page-content li,
.content li,
.article li,
.article-section li,
.content-block li,
.toc-scope li {
  margin-bottom: 0.45rem;
  color: var(--site-text-color);
  line-height: 1.65;
}

main li::marker,
.page-content li::marker,
.content li::marker,
.article li::marker,
.article-section li::marker,
.content-block li::marker,
.toc-scope li::marker {
  color: var(--site-muted-color);
}

/* Protect navigation and generated lists from content spacing. */
nav ul,
nav ol,
.header ul,
.header ol,
.footer ul,
.footer ol,
.footer-links,
.toc-list,
.toc-list ul,
.toc-list ol,
.breadcrumbs,
.pagination {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

nav li,
.header li,
.footer li,
.footer-links li,
.toc-list li,
.breadcrumbs li,
.pagination li {
  margin-bottom: 0;
}

/* Global internal layout sync: keep inner pages on one grid. */
.wrap,
.container,
.nav-inner,
.footer > .container,
.page-hero > .container,
.page-content > .container,
.page-content > .wrap,
.article-section,
.mission-grid,
.license-grid,
.stats-inline {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--site-pad);
  box-sizing: border-box;
}

.page-hero,
.page-content,
.footer {
  width: 100%;
}
