/* ==========================================================================
   Football Arcade — Design System
   footballarcade.xyz
   --------------------------------------------------------------------------
   Contents
   1.  Design tokens (colours, type, spacing, radii, shadows)
   2.  Reset & base elements
   3.  Layout primitives (container, grid, section, sidebar)
   4.  Header & navigation (incl. mega-menu + mobile drawer)
   5.  Buttons & form controls
   6.  Cards (game cards, article cards, category cards)
   7.  Hero & homepage blocks
   8.  Article typography, TOC, author box, FAQ
   9.  Game stage (canvas shell, HUD, overlays, touch pads)
   10. Breadcrumbs, pagination, tables
   11. Search overlay & filter bar
   12. Ad placeholders
   13. Footer
   14. Utilities, cookie banner, back-to-top, reading progress
   15. Responsive breakpoints
   16. Reduced motion & print
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   Theme is driven entirely by these custom properties. Change the values in
   :root to re-skin the whole site. Dark values are redefined further down.
   ========================================================================== */

:root {
  /* Brand palette */
  --pitch-900: #05341d;
  --pitch-800: #075c31;
  --pitch-700: #0a7b3e;
  --pitch-600: #0f9d4f;
  --pitch-500: #16b45c;
  --pitch-400: #43ce80;
  --pitch-200: #b7ecce;
  --pitch-100: #e6f8ee;

  --charcoal-900: #0c1015;
  --charcoal-800: #12161c;
  --charcoal-700: #1a1f27;
  --charcoal-600: #262d37;
  --charcoal-500: #3a4350;

  --amber-500: #ffb43a;
  --amber-600: #e89a19;
  --sky-500: #2f9fe0;
  --rose-500: #e05353;

  /* Semantic surface + text tokens (light theme is the base) */
  --bg: #f6f8f7;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f3f1;
  --surface-3: #e7ebe8;
  --border: #dfe4e0;
  --border-strong: #c6cec8;

  --text: #14181d;
  --text-soft: #4c5661;
  --text-faint: #6d7883;
  --text-invert: #ffffff;

  --brand: var(--pitch-700);
  --brand-hover: var(--pitch-800);
  --brand-soft: var(--pitch-100);
  --brand-contrast: #ffffff;
  --accent: var(--amber-600);
  --accent-soft: #fff4e0;
  --link: #0a6d38;
  --link-hover: #05341d;

  --ok: #12813f;
  --warn: #9a6400;
  --danger: #b62f2f;

  /* Typography */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Semibold", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.4rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.15rem;
  --fs-4xl: 2.65rem;
  --fs-5xl: 3.25rem;

  --lh-tight: 1.18;
  --lh-snug: 1.35;
  --lh-base: 1.68;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.75rem;
  --sp-8: 3.5rem;
  --sp-9: 5rem;

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

  --shadow-sm: 0 1px 2px rgba(12, 16, 21, 0.06), 0 1px 3px rgba(12, 16, 21, 0.04);
  --shadow-md: 0 4px 12px rgba(12, 16, 21, 0.08), 0 2px 4px rgba(12, 16, 21, 0.04);
  --shadow-lg: 0 14px 38px rgba(12, 16, 21, 0.12);
  --ring: 0 0 0 3px rgba(22, 180, 92, 0.38);

  /* Layout */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 68px;
  --transition: 160ms cubic-bezier(0.32, 0.72, 0.4, 1);
}

/* Dark theme — applies on system preference unless the user forced light,
   and always when the user forced dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1015;
    --bg-alt: #12161c;
    --surface: #161b22;
    --surface-2: #1c222b;
    --surface-3: #232a34;
    --border: #2a323d;
    --border-strong: #3b4552;

    --text: #eef2f0;
    --text-soft: #b3bdc6;
    --text-faint: #8a959f;

    --brand: var(--pitch-500);
    --brand-hover: var(--pitch-400);
    --brand-soft: rgba(22, 180, 92, 0.14);
    --brand-contrast: #052012;
    --accent: var(--amber-500);
    --accent-soft: rgba(255, 180, 58, 0.14);
    --link: var(--pitch-400);
    --link-hover: var(--pitch-200);

    --ok: #4bd183;
    --warn: #ffc658;
    --danger: #ff7b7b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
    --ring: 0 0 0 3px rgba(67, 206, 128, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #0c1015;
  --bg-alt: #12161c;
  --surface: #161b22;
  --surface-2: #1c222b;
  --surface-3: #232a34;
  --border: #2a323d;
  --border-strong: #3b4552;

  --text: #eef2f0;
  --text-soft: #b3bdc6;
  --text-faint: #8a959f;

  --brand: var(--pitch-500);
  --brand-hover: var(--pitch-400);
  --brand-soft: rgba(22, 180, 92, 0.14);
  --brand-contrast: #052012;
  --accent: var(--amber-500);
  --accent-soft: rgba(255, 180, 58, 0.14);
  --link: var(--pitch-400);
  --link-hover: var(--pitch-200);

  --ok: #4bd183;
  --warn: #ffc658;
  --danger: #ff7b7b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(67, 206, 128, 0.45);
}

/* ==========================================================================
   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) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.014em;
  color: var(--text);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5, h6 { font-size: var(--fs-md); }

p { margin: 0 0 var(--sp-4); }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--link-hover); text-decoration: underline; }

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

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

strong, b { font-weight: 700; color: var(--text); }
small { font-size: var(--fs-sm); }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.1em 0.38em;
}

kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 0.12em 0.45em;
  font-size: 0.85em;
  color: var(--text);
  white-space: nowrap;
}

blockquote {
  margin: var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--brand);
  background: var(--surface-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-soft);
  font-size: var(--fs-md);
}
blockquote p:last-child { margin-bottom: 0; }

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

figure { margin: var(--sp-5) 0; }
figcaption {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin-top: var(--sp-2);
}

/* Visible focus for keyboard users on every interactive element */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--pitch-200);
  color: var(--charcoal-900);
}

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -100px;
  z-index: 200;
  background: var(--brand);
  color: var(--brand-contrast);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-weight: 700;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--sp-3); text-decoration: none; }

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.container--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-6); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.section-head h2 { margin-bottom: var(--sp-1); }
.section-head p {
  margin: 0;
  color: var(--text-soft);
  max-width: 62ch;
  font-size: var(--fs-base);
}
.section-head .link-more {
  font-weight: 700;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-2);
}

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid--auto-lg { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* Content + sidebar shell used on articles, games and category pages */
.with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--sp-7);
  align-items: start;
}
.sidebar { position: sticky; top: calc(var(--header-h) + var(--sp-4)); display: grid; gap: var(--sp-5); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.panel > :last-child { margin-bottom: 0; }
.panel h2, .panel h3 { font-size: var(--fs-lg); }

.panel-list { list-style: none; margin: 0; padding: 0; }
.panel-list li {
  margin: 0;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}
.panel-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-list li:first-child { padding-top: 0; }
.panel-list a { font-weight: 600; color: var(--text); }
.panel-list a:hover { color: var(--brand); }
.panel-list .meta { display: block; font-size: var(--fs-xs); color: var(--text-faint); margin-top: 2px; }

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--sp-4);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* --- Logo ------------------------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
  color: var(--text);
  flex: 0 0 auto;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--pitch-600), var(--pitch-800));
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.logo__mark svg { width: 21px; height: 21px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.02; }
.logo__text span:last-child {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

/* --- Primary nav ------------------------------------------------------ */
.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list > li { margin: 0; position: relative; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--text-soft);
  white-space: nowrap;
}
.nav__link:hover, .nav__link:focus-visible {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.nav__link[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav__caret { width: 10px; height: 10px; transition: transform var(--transition); }
.nav__trigger[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

.nav__trigger {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* Mega menu */
.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(620px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.nav__item--has-mega[data-open="true"] .mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mega__link {
  display: block;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text);
}
.mega__link:hover { background: var(--surface-2); text-decoration: none; }
.mega__link strong { display: block; font-size: var(--fs-base); }
.mega__link span { display: block; font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.45; }
.mega__foot {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  display: flex;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 650;
}

/* --- Header actions -------------------------------------------------- */
.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.nav-toggle { display: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* --- Mobile drawer --------------------------------------------------- */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0 auto;
  width: min(360px, 88vw);
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  padding: var(--sp-5) var(--sp-4) var(--sp-8);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 70;
  display: none;
}
.drawer[data-open="true"] { transform: translateX(0); }
.drawer__group { margin-bottom: var(--sp-5); }
.drawer__group h2 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: var(--sp-2);
}
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list li { margin: 0; }
.drawer__list a {
  display: block;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.drawer__list a:hover { color: var(--brand); text-decoration: none; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 15, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 65;
}
.scrim[data-open="true"] { opacity: 1; visibility: visible; }

body.is-locked { overflow: hidden; }

/* ==========================================================================
   5. BUTTONS & FORMS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }

.btn--primary { background: var(--brand); color: var(--brand-contrast); }
.btn--primary:hover { background: var(--brand-hover); color: var(--brand-contrast); }

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary:hover { background: var(--surface-2); color: var(--text); }

.btn--ghost { background: transparent; color: var(--brand); border-color: currentColor; }
.btn--ghost:hover { background: var(--brand-soft); }

.btn--accent { background: var(--accent); color: #2a1c00; }
.btn--accent:hover { background: var(--amber-500); color: #2a1c00; }

.btn--lg { padding: 0.95rem 1.7rem; font-size: var(--fs-md); }
.btn--sm { padding: 0.5rem 0.85rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* Forms */
.field { margin-bottom: var(--sp-4); }
.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--text);
}
.field .hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--sp-2); }
.field .req { color: var(--danger); }

input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%236d7883' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 12px;
  padding-right: 2.1rem;
}

.field-error {
  display: none;
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--danger);
}
.field[data-invalid="true"] .field-error { display: block; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea,
.field[data-invalid="true"] select { border-color: var(--danger); }

.form-note {
  padding: var(--sp-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--text-soft);
}
.form-note strong { color: var(--text); }
.form-note p:last-child { margin-bottom: 0; }

.form-status {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: none;
}
.form-status[data-state="ok"] {
  display: block;
  background: var(--brand-soft);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}
.form-status[data-state="error"] {
  display: block;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

/* ==========================================================================
   6. CARDS
   ========================================================================== */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  flex: 1 1 auto;
}
.card__title {
  margin: 0;
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
}
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--brand); text-decoration: none; }
.card__excerpt {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-soft);
  line-height: 1.6;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: auto;
  padding-top: var(--sp-2);
}
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.card__foot {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

/* Tags / chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tag--brand { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.tag--accent { background: var(--accent-soft); color: var(--warn); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* Difficulty indicator — uses text + pips, never colour alone */
.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-soft);
}
.difficulty__pips { display: inline-flex; gap: 2px; }
.difficulty__pip {
  width: 6px;
  height: 11px;
  border-radius: 2px;
  background: var(--border-strong);
}
.difficulty__pip[data-on="true"] { background: var(--brand); }

/* Game card specifics */
.game-card .card__media { aspect-ratio: 16 / 9; }
.game-card__play {
  position: absolute;
  inset: auto var(--sp-3) var(--sp-3) auto;
  background: rgba(8, 11, 15, 0.72);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card__badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  background: var(--brand);
  color: var(--brand-contrast);
  border-radius: var(--r-pill);
  padding: 0.24rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Category card */
.cat-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: var(--sp-2);
}
.cat-card__icon svg { width: 24px; height: 24px; }
.cat-card h3 { margin: 0; font-size: var(--fs-lg); color: var(--text); }
.cat-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-soft); }
.cat-card__count { font-size: var(--fs-xs); font-weight: 700; color: var(--brand); margin-top: var(--sp-2); }

/* Compact list row (used in sidebars, sitemap, hubs) */
.row-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.row-list > li { margin: 0; }
.row-item {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--transition), background var(--transition);
}
.row-item:hover { border-color: var(--brand); background: var(--surface-2); text-decoration: none; }
.row-item__thumb {
  width: 76px;
  flex: 0 0 76px;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.row-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item__body { min-width: 0; }
.row-item__body strong { display: block; color: var(--text); font-size: var(--fs-base); line-height: 1.3; }
.row-item__body span { font-size: var(--fs-xs); color: var(--text-faint); }

/* ==========================================================================
   7. HERO & HOMEPAGE BLOCKS
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 420px at 82% -8%, rgba(22, 180, 92, 0.22), transparent 60%),
    radial-gradient(760px 360px at 6% 8%, rgba(255, 180, 58, 0.14), transparent 62%),
    linear-gradient(170deg, var(--charcoal-900), var(--charcoal-800) 58%, #0b1a12);
  color: #f2f6f3;
  border-bottom: 1px solid var(--border);
}
.hero::after {
  /* faint pitch line motif, pure CSS — no image request */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 35%, transparent 78%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--sp-9) var(--sp-4) var(--sp-8);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--sp-7);
  align-items: center;
}
.hero h1 {
  color: #fff;
  font-size: var(--fs-5xl);
  margin-bottom: var(--sp-4);
}
.hero__lead {
  font-size: var(--fs-lg);
  color: #c9d5cd;
  max-width: 54ch;
  margin-bottom: var(--sp-5);
}
.hero .eyebrow { color: var(--pitch-400); }
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: #fff;
  line-height: 1;
}
.hero__stat span { font-size: var(--fs-xs); color: #9fb0a6; text-transform: uppercase; letter-spacing: 0.08em; }

/* Hero art: layered CSS pitch + ball, no external asset */
.hero__art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, #0d7a3f, #085c2f 70%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.hero__art svg { width: 100%; height: 100%; }

/* Trending strip */
.trending {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.trending__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.trending__head h2 { margin: 0; font-size: var(--fs-xl); }
.trending__note { font-size: var(--fs-xs); color: var(--text-faint); }
.trending__grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.trending-item {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg);
}
.trending-item:hover { border-color: var(--brand); text-decoration: none; }
.trending-item__rank {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--brand);
  flex: 0 0 auto;
}
.trending-item strong { display: block; font-size: var(--fs-base); color: var(--text); line-height: 1.3; }
.trending-item span { font-size: var(--fs-xs); color: var(--text-faint); }

/* Newsletter */
.newsletter {
  background: linear-gradient(150deg, var(--pitch-800), var(--charcoal-800) 78%);
  color: #eef4f0;
  border-radius: var(--r-xl);
  padding: var(--sp-7);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: var(--sp-6);
  align-items: center;
  box-shadow: var(--shadow-md);
}
.newsletter h2 { color: #fff; margin-bottom: var(--sp-2); }
.newsletter p { color: #bfd0c6; margin-bottom: 0; font-size: var(--fs-base); }
.newsletter form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.newsletter input[type="email"] { flex: 1 1 220px; background: rgba(255, 255, 255, 0.96); color: #14181d; border-color: transparent; }
.newsletter .form-note {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: #bfd0c6;
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
}
.newsletter .form-note strong { color: #fff; }

/* SEO prose block on hubs/home */
.prose-block { max-width: 74ch; }
.prose-block h2 { margin-top: var(--sp-6); }
.prose-block h3 { margin-top: var(--sp-5); font-size: var(--fs-lg); }
.prose-block > :first-child { margin-top: 0; }

/* ==========================================================================
   8. ARTICLE TYPOGRAPHY
   ========================================================================== */

.article-header { margin-bottom: var(--sp-5); }
.article-header h1 { font-size: var(--fs-4xl); margin-bottom: var(--sp-3); }
.article-header .standfirst {
  font-size: var(--fs-lg);
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 68ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) 0;
  margin-bottom: var(--sp-5);
  border-block: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-soft);
}
.article-meta a { font-weight: 700; }
.article-meta__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  flex: 0 0 34px;
}
.article-meta__avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-meta__who { display: flex; align-items: center; gap: var(--sp-2); }

.featured-media {
  margin: 0 0 var(--sp-6);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.featured-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.featured-media figcaption { padding: var(--sp-2) var(--sp-4) var(--sp-3); margin: 0; }

.article-body { font-size: var(--fs-md); max-width: 74ch; }
.article-body > h2 {
  margin-top: var(--sp-7);
  padding-top: var(--sp-2);
  font-size: var(--fs-2xl);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.article-body > h3 {
  margin-top: var(--sp-5);
  font-size: var(--fs-lg);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.article-body > h2:first-child, .article-body > h3:first-child { margin-top: 0; }
.article-body li { line-height: 1.62; }
.article-body ul, .article-body ol { margin-bottom: var(--sp-5); }
.article-body a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Table of contents */
.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
}
.toc > strong {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.toc a { color: var(--text); font-weight: 600; }
.toc a:hover { color: var(--brand); }

.toc-sticky ol { list-style: none; padding: 0; margin: 0; }
.toc-sticky li { margin-bottom: 0; }
.toc-sticky a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-soft);
  font-weight: 600;
}
.toc-sticky a:hover { color: var(--brand); border-left-color: var(--brand); text-decoration: none; }
.toc-sticky a.is-active {
  color: var(--brand);
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

/* Callouts */
.callout {
  margin: var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--fs-base);
}
.callout > strong:first-child {
  display: block;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--sp-2);
}
.callout p:last-child { margin-bottom: 0; }
.callout--tip { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 32%, transparent); }
.callout--tip > strong:first-child { color: var(--ok); }
.callout--note { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.callout--note > strong:first-child { color: var(--warn); }
.callout--insight { background: var(--surface-2); border-left: 4px solid var(--brand); }
.callout--insight > strong:first-child { color: var(--brand); }

/* Key takeaways */
.takeaways {
  margin: var(--sp-6) 0;
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.takeaways h2 { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.takeaways ul { list-style: none; padding: 0; margin: 0; }
.takeaways li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-base);
}
.takeaways li:last-child { margin-bottom: 0; }
.takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid var(--brand);
}

/* Data tables */
.table-wrap {
  overflow-x: auto;
  margin: var(--sp-5) 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
caption {
  caption-side: bottom;
  padding: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-align: left;
}
th, td { padding: 0.7rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* FAQ (details/summary — keyboard accessible by default) */
.faq { margin: var(--sp-6) 0; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: var(--sp-3);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  padding: var(--sp-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  align-items: center;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--brand);
  flex: 0 0 auto;
}
.faq__item[open] summary::after { content: "–"; }
.faq__item[open] summary { border-bottom: 1px solid var(--border); }
.faq__answer { padding: var(--sp-4); }
.faq__answer > :last-child { margin-bottom: 0; }

/* Author box */
.author-box {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
  margin: var(--sp-7) 0;
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.author-box__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 2px solid var(--border);
}
.author-box__photo img { width: 100%; height: 100%; object-fit: cover; }
.author-box h2, .author-box h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-1); }
.author-box__role {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--brand);
  margin-bottom: var(--sp-3);
}
.author-box p { font-size: var(--fs-sm); color: var(--text-soft); margin-bottom: var(--sp-3); }
.author-box__dates { font-size: var(--fs-xs); color: var(--text-faint); }

/* Sources / references */
.sources { margin: var(--sp-6) 0; font-size: var(--fs-sm); }
.sources h2 { font-size: var(--fs-lg); }
.sources ol { padding-left: 1.3rem; }
.sources li { color: var(--text-soft); }

/* Article CTA */
.article-cta {
  margin: var(--sp-7) 0;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--pitch-800), var(--charcoal-800));
  color: #eef4f0;
}
.article-cta h2 { color: #fff; font-size: var(--fs-xl); }
.article-cta p { color: #c3d3c9; }
.article-cta > :last-child { margin-bottom: 0; }

/* ==========================================================================
   9. GAME STAGE
   ========================================================================== */

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); align-items: start; }

.game-stage {
  background: var(--charcoal-900);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.game-stage__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--charcoal-800);
  border-bottom: 1px solid var(--charcoal-600);
  color: #e7efe9;
  flex-wrap: wrap;
}
.game-stage__bar .stat {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 62px;
}
.game-stage__bar .stat span {
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #93a39a;
}
.game-stage__bar .stat strong {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.game-stage__bar .spacer { margin-left: auto; }
.game-stage__bar .btn { padding: 0.45rem 0.8rem; font-size: var(--fs-xs); }
.game-stage__bar .btn--secondary { background: var(--charcoal-700); color: #e7efe9; border-color: var(--charcoal-500); }
.game-stage__bar .btn--secondary:hover { background: var(--charcoal-600); color: #fff; }

.game-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a2f1c;
  touch-action: manipulation;
}
.game-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--sp-5);
  background: linear-gradient(180deg, rgba(6, 22, 14, 0.82), rgba(4, 12, 8, 0.92));
  backdrop-filter: blur(2px);
  text-align: center;
  color: #eef4f0;
  z-index: 2;
}
.game-overlay[hidden] { display: none; }
.game-overlay__inner { max-width: 440px; }
.game-overlay h2 { color: #fff; font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.game-overlay p { color: #c3d3c9; font-size: var(--fs-base); margin-bottom: var(--sp-4); }
.game-overlay .keys {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  color: #a8bab0;
}
.game-overlay kbd { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.game-overlay__score {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  color: var(--pitch-400);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.game-overlay__sub { font-size: var(--fs-sm); color: #93a39a; }

/* Touch control pad — shown on pointer:coarse devices */
.touch-pad {
  display: none;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--charcoal-800);
  border-top: 1px solid var(--charcoal-600);
}
.touch-pad button {
  flex: 1 1 0;
  min-height: 56px;
  border-radius: var(--r-md);
  border: 1px solid var(--charcoal-500);
  background: var(--charcoal-700);
  color: #eef4f0;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.touch-pad button:active { background: var(--pitch-700); border-color: var(--pitch-600); }
@media (hover: none) and (pointer: coarse) {
  .touch-pad[data-touch="true"] { display: flex; }
}

/* --- Tactics game (DOM based, no canvas) ----------------------------- */
.tactics {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.tactics__fixture { margin-bottom: var(--sp-5); }
.tactics__fixture h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.tactics__threats {
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: 0;
}
.tactics__group { border: 0; padding: 0; margin: 0 0 var(--sp-5); }
.tactics__group legend {
  padding: 0;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}
.tactics__options { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tactics__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.tactics__option:hover { border-color: var(--brand); }
.tactics__option strong { font-family: var(--font-display); font-size: var(--fs-base); }
.tactics__option span { font-size: var(--fs-xs); color: var(--text-soft); line-height: 1.45; }
.tactics__option[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.tactics__option[aria-pressed="true"] strong::after { content: " ✓"; color: var(--brand); }
.tactics__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.tactics__hint { margin: 0; font-size: var(--fs-sm); color: var(--text-faint); }
.tactics__result, .tactics__done { text-align: left; }
.tactics__score {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  line-height: 1;
  color: var(--brand);
  margin-bottom: var(--sp-2);
}
.tactics__result ul { padding-left: 1.2rem; }
.tactics__result li { font-size: var(--fs-base); }
.tactics__best { font-weight: 700; color: var(--ok); }
.tactics button[disabled] { opacity: 0.55; cursor: not-allowed; }

.game-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
}
.game-info-grid div {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.game-info-grid dt, .game-info-grid strong {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 2px;
  font-weight: 700;
}
.game-info-grid dd, .game-info-grid span {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 650;
  color: var(--text);
}

.controls-table td:first-child { width: 34%; white-space: nowrap; }

/* ==========================================================================
   10. BREADCRUMBS, PAGINATION
   ========================================================================== */

.breadcrumbs {
  padding: var(--sp-4) 0 0;
  font-size: var(--fs-sm);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 0.35rem; color: var(--text-faint); }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-soft); font-weight: 600; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 650; }

.page-head { padding: var(--sp-6) 0 var(--sp-2); }
.page-head h1 { margin-bottom: var(--sp-3); }
.page-head .standfirst {
  font-size: var(--fs-lg);
  color: var(--text-soft);
  max-width: 70ch;
  margin-bottom: 0;
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-5) 0;
}
.pill-nav a {
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--text-soft);
}
.pill-nav a:hover, .pill-nav a[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
  text-decoration: none;
}

/* ==========================================================================
   11. SEARCH & FILTERS
   ========================================================================== */

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding: max(6vh, var(--sp-6)) var(--sp-4) var(--sp-4);
  background: rgba(8, 11, 15, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.search-modal[data-open="true"] { display: block; }
.search-modal__panel {
  max-width: 660px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-modal__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.search-modal__head svg { width: 20px; height: 20px; color: var(--text-faint); flex: 0 0 20px; }
.search-modal__head input {
  border: 0;
  padding: 0;
  font-size: var(--fs-lg);
  background: transparent;
}
.search-modal__head input:focus { box-shadow: none; }
.search-results { max-height: min(56vh, 520px); overflow-y: auto; padding: var(--sp-2); }
.search-empty { padding: var(--sp-5); color: var(--text-faint); font-size: var(--fs-sm); text-align: center; }
.search-hit {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  color: var(--text);
}
.search-hit:hover, .search-hit:focus-visible { background: var(--surface-2); text-decoration: none; }
.search-hit strong { display: block; font-size: var(--fs-base); }
.search-hit p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--text-soft); }
.search-hit .tag { margin-top: var(--sp-2); }
.search-modal__foot {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Inline search (hub pages) */
.inline-search { position: relative; }
.inline-search input { padding-left: 2.5rem; }
.inline-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-3);
  align-items: end;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.filter-bar .field { margin: 0; }
.filter-bar label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }

.filter-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-soft);
}
.filter-status strong { color: var(--text); }

.empty-state {
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--text-soft);
}
.empty-state h3 { font-size: var(--fs-lg); }

/* ==========================================================================
   12. AD PLACEHOLDERS
   AdSense-ready slots. These are inert containers — no ad code is loaded
   until real ad units are pasted in by the site owner.
   ========================================================================== */

.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 96px;
  margin: var(--sp-6) 0;
  padding: var(--sp-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-faint);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}
.ad-placeholder--leaderboard { min-height: 110px; }
.ad-placeholder--rectangle { min-height: 260px; }
.ad-placeholder--sidebar { min-height: 600px; margin: 0; }
.ad-placeholder small {
  display: block;
  margin-top: var(--sp-2);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  opacity: 0.8;
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */

.site-footer {
  margin-top: var(--sp-9);
  background: var(--charcoal-900);
  color: #c4cfc8;
  border-top: 3px solid var(--brand);
}
.site-footer a { color: #c4cfc8; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--sp-8) var(--sp-4) var(--sp-6);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: var(--sp-6);
}
.footer-brand .logo { color: #fff; margin-bottom: var(--sp-3); }
.footer-brand .logo__text span:last-child { color: var(--pitch-400); }
.footer-brand p { font-size: var(--fs-sm); line-height: 1.65; max-width: 44ch; }
.footer-col h2 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #fff;
  margin-bottom: var(--sp-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-bottom__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: #93a39a;
}
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer-disclaimer {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--sp-4) var(--sp-6);
  font-size: var(--fs-xs);
  color: #7f8f86;
  line-height: 1.6;
}

/* ==========================================================================
   14. UTILITIES & FLOATING UI
   ========================================================================== */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-6 { margin-top: var(--sp-6); }
.muted { color: var(--text-soft); }
.small { font-size: var(--fs-sm); }
.stack { display: grid; gap: var(--sp-4); }
.stack--lg { display: grid; gap: var(--sp-6); }
.divider { border-top: 1px solid var(--border); margin: var(--sp-6) 0; }

/* Reading progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--pitch-500), var(--amber-500));
  z-index: 80;
  transition: width 90ms linear;
}

/* Back to top */
.to-top {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 55;
}
.to-top[data-show="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 18px; height: 18px; }

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  max-width: 780px;
  margin-inline: auto;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  display: none;
}
.cookie-banner[data-open="true"] { display: block; }
.cookie-banner h2 { font-size: var(--fs-lg); }
.cookie-banner p { font-size: var(--fs-sm); color: var(--text-soft); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.cookie-prefs { margin-top: var(--sp-4); display: none; }
.cookie-prefs[data-open="true"] { display: block; }
.cookie-prefs label {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.cookie-prefs input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 18px; accent-color: var(--brand); }
.cookie-prefs strong { display: block; }

/* 404 */
.notfound {
  text-align: center;
  padding: var(--sp-9) var(--sp-4);
  max-width: 620px;
  margin-inline: auto;
}
.notfound__num {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  line-height: 0.9;
  color: var(--brand);
  opacity: 0.22;
  margin-bottom: var(--sp-3);
}
.notfound h1 { font-size: var(--fs-3xl); }
.notfound .btn-row { justify-content: center; margin-top: var(--sp-5); }

/* Sitemap page */
.sitemap-group { margin-bottom: var(--sp-7); }
.sitemap-group h2 {
  font-size: var(--fs-xl);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid var(--brand);
  margin-bottom: var(--sp-4);
}
.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: var(--sp-6);
}
.sitemap-list li { margin-bottom: var(--sp-2); break-inside: avoid; font-size: var(--fs-sm); }

/* Workflow diagram (editorial process) */
.workflow { list-style: none; padding: 0; margin: var(--sp-5) 0; counter-reset: step; }
.workflow li {
  position: relative;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 3.2rem;
  margin-bottom: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-base);
  counter-increment: step;
}
.workflow li::before {
  content: counter(step);
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-sm);
}
.workflow li strong { display: block; }
.workflow li span { font-size: var(--fs-sm); color: var(--text-soft); }

/* Definition-style info list */
.def-list { display: grid; gap: var(--sp-4); margin: var(--sp-5) 0; }
.def-list > div {
  padding: var(--sp-4);
  border-left: 3px solid var(--brand);
  background: var(--surface-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.def-list dt, .def-list h3 { font-size: var(--fs-base); margin-bottom: var(--sp-1); }
.def-list dd, .def-list p { margin: 0; font-size: var(--fs-sm); color: var(--text-soft); }

/* ==========================================================================
   15. RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
  .with-sidebar, .game-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .ad-placeholder--sidebar { min-height: 180px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --fs-5xl: 2.6rem; --fs-4xl: 2.1rem; --fs-3xl: 1.85rem; --fs-2xl: 1.55rem; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); padding-block: var(--sp-8) var(--sp-7); }
  .hero__art { max-width: 520px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter { grid-template-columns: minmax(0, 1fr); padding: var(--sp-6); }
  .nav { display: none; }
  .nav-toggle { display: grid; }
  .drawer { display: block; }
}

@media (max-width: 700px) {
  :root { --sp-8: 2.5rem; --sp-9: 3.25rem; --header-h: 60px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .grid--auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .filter-bar { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: var(--sp-6); }
  .sitemap-list { columns: 1; }
  .author-box { grid-template-columns: minmax(0, 1fr); }
  .author-box__photo { width: 68px; height: 68px; }
  .article-body, .prose-block { max-width: none; }
  .logo__text span:last-child { display: none; }
  .game-canvas-wrap { aspect-ratio: 4 / 3; }
  .hero__stats { gap: var(--sp-5); }
  .panel { padding: var(--sp-4); }
  .article-cta { padding: var(--sp-5); }
}

/* Small phones: the logo plus three icon buttons stop fitting below ~380px,
   so tighten the header rather than letting it push the page sideways. */
@media (max-width: 380px) {
  .header-inner { gap: var(--sp-2); padding-inline: var(--sp-3); }
  .header-actions { gap: 4px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .logo { font-size: 1rem; gap: 0.45rem; }
  .logo__mark { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; }
  .logo__mark svg { width: 18px; height: 18px; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1 1 100%; }
  .game-stage__bar .btn { width: auto; flex: 0 0 auto; }
  .cookie-banner__actions .btn { flex: 1 1 100%; }
}

@media (min-width: 1500px) {
  :root { --wrap: 1320px; }
}

/* ==========================================================================
   16. REDUCED MOTION & PRINT
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card:hover, .btn:hover, .cat-card:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .ad-placeholder, .to-top, .cookie-banner,
  .progress-bar, .search-modal, .drawer, .scrim, .newsletter, .game-stage { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-body { max-width: none; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
