/* ==========================================================================
   Zombie Games Hub — Core design system
   Original design tokens, layout primitives, header/footer, cards, buttons.
   Loaded on every page. Keep this file free of page-specific rules.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — deep charcoal with a faint green cast */
  --bg:            #0b0e0c;
  --bg-elevated:   #111512;
  --surface:       #161c18;
  --surface-2:     #1d251f;
  --surface-3:     #263029;
  --line:          #2b352e;
  --line-strong:   #3a4740;

  /* Text */
  --text:          #e9efe9;
  --text-muted:    #9caa9f;
  --text-dim:      #74827a;

  /* Brand — zombie green + a muted toxic tint */
  --green:         #7ed321;
  --green-soft:    #a4e05c;
  --green-deep:    #4f8c15;
  --toxic:         #b6f24a;

  /* Action accents */
  --accent:        #ff6b2c;
  --accent-deep:   #d64f14;
  --danger:        #e2452f;
  --warning:       #f0b429;
  --info:          #4bb3d4;

  /* Category hues (used for badges, thumbnails, category pages) */
  --cat-shooters:  #ff6b2c;
  --cat-survival:  #7ed321;
  --cat-defense:   #4bb3d4;
  --cat-escape:    #f0b429;
  --cat-runner:    #c76bff;
  --cat-casual:    #2fd6a5;

  /* Typography */
  --font-display: "Trebuchet MS", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 88px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .45);
  --glow-green: 0 0 0 1px rgba(126, 211, 33, .35), 0 8px 26px rgba(126, 211, 33, .14);

  /* Layout */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 64px;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Subtle atmospheric backdrop — pure CSS, no image requests */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 12% -8%, rgba(126, 211, 33, .10), transparent 62%),
    radial-gradient(880px 540px at 96% 4%, rgba(255, 107, 44, .07), transparent 60%),
    linear-gradient(180deg, #0d110e 0%, var(--bg) 46%, #080a09 100%);
}

img, svg, video, canvas { max-width: 100%; }
img { height: auto; border: 0; display: block; }

a { color: var(--green-soft); text-decoration: none; }
a:hover { color: var(--toxic); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 var(--s-4);
  color: #f3f8f3;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.05rem); }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.4rem); }
h4 { font-size: 1.06rem; }

p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.35em; }
li { margin-bottom: var(--s-2); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }

code, kbd, pre { font-family: var(--font-mono); font-size: .92em; }
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .12em .4em;
  color: var(--toxic);
}
kbd {
  display: inline-block;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: .1em .5em;
  font-size: .85em;
  color: var(--text);
  white-space: nowrap;
}

/* Focus visibility — never remove without replacement */
:focus-visible {
  outline: 3px solid var(--toxic);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: rgba(126, 211, 33, .3); color: #fff; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--green);
  color: #0b0e0c;
  padding: 10px 18px;
  font-weight: 700;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

/* Screen-reader-only helper */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-4);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

main { flex: 1 0 auto; }

.section { padding-block: var(--s-7); }
.section--tight { padding-block: var(--s-6); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--text-muted); max-width: 62ch; }
.section-head .link-more { white-space: nowrap; font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--green);
  display: inline-block;
}

.grid { display: grid; gap: var(--s-4); }
.grid--games { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid--cats  { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--posts { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid--2     { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3     { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.stack > * + * { margin-top: var(--s-4); }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  min-height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s var(--ease), background-color .16s var(--ease),
              border-color .16s var(--ease), box-shadow .16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  --btn-fg: #0a0d09;
  --btn-bd: transparent;
  box-shadow: 0 6px 20px rgba(126, 211, 33, .22);
}
.btn--primary:hover { box-shadow: 0 10px 28px rgba(126, 211, 33, .32); color: #0a0d09; }

.btn--accent {
  --btn-bg: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  --btn-fg: #fff;
  --btn-bd: transparent;
  box-shadow: 0 6px 20px rgba(255, 107, 44, .2);
}
.btn--accent:hover { color: #fff; }

.btn--ghost { --btn-bg: transparent; --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-bd: var(--green-deep); color: var(--text); }

.btn--sm { padding: 7px 14px; min-height: 38px; font-size: .85rem; }
.btn--lg { padding: 14px 28px; min-height: 52px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 12, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: 0 0 34px; }
.brand__name { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name b { font-size: 1.02rem; }
.brand__name span {
  font-size: .58rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}

.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: .93rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav__list a[aria-current="page"] { color: var(--green); background: rgba(126, 211, 33, .1); }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--green); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn__badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}
.icon-btn__badge[hidden] { display: none; }

.nav-toggle { display: none; }

/* Slide-in mobile navigation */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(320px, 86vw);
    background: var(--bg-elevated);
    border-left: 1px solid var(--line);
    transform: translateX(105%);
    transition: transform .25s var(--ease);
    overflow-y: auto;
    padding: var(--s-4);
    margin: 0;
    box-shadow: var(--shadow-lg);
  }
  .nav[data-open="true"] { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__list a { padding: 13px 14px; font-size: 1rem; border-radius: var(--r-md); }
  .nav__list li + li { border-top: 1px solid var(--line); }
}

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.nav-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }

/* --------------------------------------------------------------------------
   6. Search overlay
   -------------------------------------------------------------------------- */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(6, 9, 7, .82);
  backdrop-filter: blur(6px);
  display: none;
  padding: 8vh var(--s-4) var(--s-4);
}
.search-panel[data-open="true"] { display: block; }
.search-panel__box {
  max-width: 640px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-panel__field { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search-panel__field svg { width: 20px; height: 20px; color: var(--text-dim); flex: 0 0 20px; }
.search-panel input[type="search"] {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 1.05rem;
  padding: 6px 0;
  min-width: 0;
}
.search-panel input[type="search"]:focus { outline: none; }
.search-results { max-height: min(56vh, 460px); overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.search-results li { margin: 0; }
.search-results a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--text);
}
.search-results a:hover, .search-results a:focus-visible { background: var(--surface-2); text-decoration: none; }
.search-results img { width: 56px; height: 38px; border-radius: var(--r-sm); object-fit: cover; flex: 0 0 56px; }
.search-results a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.search-results .r-title { display: block; font-weight: 700; font-size: .96rem; }
.search-results .r-title mark { background: rgba(126, 211, 33, .28); color: var(--toxic); border-radius: 3px; padding: 0 2px; }
.search-results .r-meta { display: block; font-size: .8rem; color: var(--text-muted); }
.search-empty { padding: 22px 16px; color: var(--text-muted); text-align: center; }

/* --------------------------------------------------------------------------
   7. Badges, chips, meta
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge--cat { border-color: transparent; color: #0b0e0c; }
.badge--easy   { color: var(--green); border-color: rgba(126,211,33,.4); background: rgba(126,211,33,.1); }
.badge--medium { color: var(--warning); border-color: rgba(240,180,41,.4); background: rgba(240,180,41,.1); }
.badge--hard   { color: var(--danger); border-color: rgba(226,69,47,.4); background: rgba(226,69,47,.1); }
.badge--new    { color: var(--accent); border-color: rgba(255,107,44,.45); background: rgba(255,107,44,.12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { margin: 0; }
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.chip:hover { border-color: var(--green-deep); color: var(--text); text-decoration: none; }
.chip[aria-pressed="true"], .chip.is-active {
  background: rgba(126, 211, 33, .14);
  border-color: var(--green);
  color: var(--green-soft);
}

/* --------------------------------------------------------------------------
   8. Game cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--green-deep); box-shadow: var(--shadow-md); }
.card:focus-within { border-color: var(--green); }

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 60px); }

.card__body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; flex: 1; gap: 6px; }
.card__title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.25; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--green-soft); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }  /* full-card click target */
.card__desc { font-size: .87rem; color: var(--text-muted); margin: 0; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--text-dim); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.card__best { font-size: .76rem; color: var(--green); font-weight: 700; }
.card__best[hidden] { display: none; }

/* Favourite toggle sits above the card-wide link overlay */
.fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 3;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(11, 14, 12, .72);
  color: var(--text-muted);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.fav-btn:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.fav-btn svg { width: 18px; height: 18px; }
.fav-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: rgba(255,107,44,.16); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

/* Compact list rows (recently played, related) */
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mini-list li { margin: 0; }
.mini-list a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.mini-list a:hover { border-color: var(--green-deep); text-decoration: none; background: var(--surface-2); }
.mini-list img { width: 74px; height: 48px; border-radius: var(--r-sm); object-fit: cover; flex: 0 0 74px; }
/* The title/meta wrapper is a flex item and so is blockified, but its own
   children are plain spans — they need display:block to stack rather than
   running together on one line. Same applies to .search-results below. */
.mini-list a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mini-list .m-title { display: block; font-weight: 700; font-size: .92rem; line-height: 1.3; }
.mini-list .m-meta { display: block; font-size: .78rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   9. Category cards
   -------------------------------------------------------------------------- */
.cat-card {
  position: relative;
  display: block;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.cat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px 160px at 100% 0%, var(--cat-hue, var(--green)), transparent 70%);
  opacity: .12;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--cat-hue, var(--green)); text-decoration: none; color: var(--text); }
.cat-card:hover::after { opacity: .22; }
.cat-card__icon { width: 44px; height: 44px; margin-bottom: var(--s-3); color: var(--cat-hue, var(--green)); }
.cat-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.cat-card p { margin: 0 0 10px; color: var(--text-muted); font-size: .89rem; }
.cat-card__count { font-size: .78rem; font-weight: 700; color: var(--cat-hue, var(--green)); text-transform: uppercase; letter-spacing: .07em; }

/* --------------------------------------------------------------------------
   10. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--s-8) var(--s-7);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--s-7);
  align-items: center;
}
.hero h1 { margin-bottom: var(--s-4); }
.hero h1 .hl {
  background: linear-gradient(100deg, var(--green) 10%, var(--toxic) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--text-muted); max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-6); list-style: none; padding: 0; }
.hero__facts li { margin: 0; }
.hero__facts b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--green); line-height: 1.1; }
.hero__facts span { font-size: .8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.hero__art { position: relative; }
.hero__art svg { width: 100%; height: auto; border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }

@media (max-width: 900px) {
  .hero { padding-block: var(--s-6); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero__art { order: -1; }
}

/* --------------------------------------------------------------------------
   11. Panels, notes, feature blocks
   -------------------------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.panel--tint { background: linear-gradient(160deg, rgba(126,211,33,.07), transparent 60%), var(--surface); }

.note {
  border-left: 3px solid var(--green);
  background: var(--surface-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--s-4);
  margin-bottom: var(--s-4);
}
.note--warn { border-left-color: var(--warning); }
.note--info { border-left-color: var(--info); }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--text); }

.feature {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.feature__icon { flex: 0 0 34px; width: 34px; height: 34px; color: var(--green); }
.feature h3 { font-size: 1rem; margin: 0 0 4px; }
.feature p { margin: 0; font-size: .88rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   12. Tables
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin-bottom: var(--s-5); border-radius: var(--r-md); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; min-width: 460px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); color: var(--text); font-family: var(--font-display); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(126, 211, 33, .04); }

/* --------------------------------------------------------------------------
   13. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb { padding-block: var(--s-4) 0; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .84rem;
  color: var(--text-dim);
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: var(--text-dim); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* --------------------------------------------------------------------------
   14. FAQ (details/summary — works without JS)
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq details[open] { border-color: var(--green-deep); }
.faq summary {
  cursor: pointer;
  padding: 14px var(--s-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  color: #f0f6f0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--green);
  line-height: 1;
  flex: 0 0 auto;
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { background: var(--surface-2); }
.faq__body { padding: 0 var(--s-4) var(--s-4); color: var(--text-muted); }
.faq__body p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   15. Ad slots — clearly labelled, never adjacent to interactive game controls
   -------------------------------------------------------------------------- */
.ad-slot {
  display: block;
  margin: var(--s-6) auto;
  padding: var(--s-3);
  max-width: 970px;
  min-height: 100px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .012);
  text-align: center;
  color: var(--text-dim);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ad-slot::before { content: "Advertisement"; display: block; margin-bottom: 6px; }
.ad-slot--inline { max-width: 728px; min-height: 90px; }
/* Guarantees clear separation from gameplay controls (AdSense placement policy) */
.ad-slot--game { margin-top: var(--s-7); margin-bottom: var(--s-7); }

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--s-8);
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding-block: var(--s-7) var(--s-5);
  flex-shrink: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-5);
}
.footer-brand p { color: var(--text-muted); font-size: .89rem; max-width: 38ch; margin-top: var(--s-3); }
.footer-col h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--green);
  margin-bottom: var(--s-3);
  font-family: var(--font-display);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: .89rem; }
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   17. Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--text); }
.field .hint { font-size: .82rem; color: var(--text-dim); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="search"], textarea, select {
  width: 100%;
  padding: 11px 14px;
  min-height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(126,211,33,.18); }
.field-error { color: var(--danger); font-size: .84rem; margin-top: 5px; display: block; }
.field-error:empty { display: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.form-status { margin-top: var(--s-4); }

/* --------------------------------------------------------------------------
   18. Empty states & utilities
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: var(--s-7) var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.empty-state svg { width: 62px; height: 62px; color: var(--green-deep); margin-bottom: var(--s-3); }
.empty-state h2, .empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); max-width: 46ch; margin-inline: auto; }
.empty-state__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; margin-top: var(--s-4); }

.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.lede { font-size: 1.08rem; color: var(--text-muted); max-width: 68ch; }
[hidden] { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--surface-3);
  border: 1px solid var(--green-deep);
  color: var(--text);
  padding: 11px 20px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 300;
}
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }
