/* =====================================================================
   HIT THE BUTTON - Design System  (main.css)
   Cache buster: main.css?v=1   | JS: main.js?v=1
   Pure CSS, no framework. One responsive block lives at the END.
   Sections:
     1. Design tokens (CSS variables)
     2. Reset & base
     3. Accessibility helpers
     4. Layout (container, sections, grid)
     5. Header / navigation
     6. Footer
     7. Components (buttons, cards, pills, badges, accordion, breadcrumb…)
     8. Page blocks (hero, features, steps, CTA, article, TOC…)
     9. The Game
    10. Utilities
    11. Animations
    12. Responsive  (single @media block - do not scatter)
   ===================================================================== */

/* ============================ 0. FONTS (self-hosted) =============== */
/* Nunito (body) */
@font-face { font-family:"Nunito"; font-style:normal; font-weight:400; font-display:swap; src:url("/assets/fonts/nunito-400.woff2") format("woff2"); }
@font-face { font-family:"Nunito"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/nunito-600.woff2") format("woff2"); }
@font-face { font-family:"Nunito"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family:"Nunito"; font-style:normal; font-weight:800; font-display:swap; src:url("/assets/fonts/nunito-800.woff2") format("woff2"); }
/* Fredoka (display / headings) */
@font-face { font-family:"Fredoka"; font-style:normal; font-weight:500; font-display:swap; src:url("/assets/fonts/fredoka-500.woff2") format("woff2"); }
@font-face { font-family:"Fredoka"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/fredoka-600.woff2") format("woff2"); }
@font-face { font-family:"Fredoka"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/fredoka-700.woff2") format("woff2"); }

/* ============================ 1. TOKENS ============================= */
:root {
  /* Brand palette - playful but AA-contrast aware */
  --brand:        #5A32E6;   /* indigo-violet */
  --brand-ink:    #3A1DB0;   /* darker: brand as text on light */
  --brand-soft:   #EEE9FF;   /* tint bg */
  --sky:          #2AA7F0;
  --sky-ink:      #0B6FB0;
  --mint:         #10B981;
  --mint-ink:     #067349;
  --sunny:        #FFC93C;
  --sunny-ink:    #7A5A00;
  --coral:        #FF6B6B;
  --coral-ink:    #AF2A2A;
  --grape:        #A66BFF;

  /* Neutrals */
  --ink:          #1E2033;   /* body text */
  --ink-soft:     #3A3D57;
  --muted:        #5C6079;   /* secondary text - AA on white */
  --line:         #E7E4F2;   /* hairlines */
  --bg:           #FFFFFF;
  --bg-soft:      #F6F4FF;   /* soft lilac section bg */
  --bg-warm:      #FFF8EC;   /* warm section bg */
  --card:         #FFFFFF;

  /* Gradients */
  --grad-hero:    radial-gradient(1200px 600px at 15% -10%, #EFE7FF 0%, transparent 60%),
                  radial-gradient(1000px 500px at 100% 0%, #E2F4FF 0%, transparent 55%),
                  linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 100%);
  --grad-brand:   linear-gradient(135deg, #6E44FF 0%, #5A32E6 55%, #7B2FF7 100%);
  --grad-sky:     linear-gradient(135deg, #47C0FF 0%, #2AA7F0 100%);
  --grad-mint:    linear-gradient(135deg, #34D399 0%, #10B981 100%);
  --grad-sunny:   linear-gradient(135deg, #FFD873 0%, #FFC93C 100%);
  --grad-coral:   linear-gradient(135deg, #FF8E8E 0%, #FF6B6B 100%);

  /* Typography */
  --font-display: "Fredoka", "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body:    "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --fs-hero:      clamp(2.3rem, 6.2vw, 4.2rem);
  --fs-h1:        clamp(2rem, 4.6vw, 3rem);
  --fs-h2:        clamp(1.55rem, 3.4vw, 2.25rem);
  --fs-h3:        clamp(1.2rem, 2.2vw, 1.5rem);
  --fs-lead:      clamp(1.06rem, 1.8vw, 1.3rem);
  --fs-body:      1.05rem;
  --fs-small:     0.9rem;
  --lh-tight:     1.12;
  --lh-body:      1.7;

  /* Spacing scale (4px base) */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;     --sp-10: 8rem;

  /* Radius */
  --r-xs: 8px; --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 36px; --r-pill: 999px;

  /* Shadows - soft & playful */
  --sh-sm:  0 2px 8px rgba(41, 30, 90, 0.08);
  --sh-md:  0 10px 30px rgba(41, 30, 90, 0.10);
  --sh-lg:  0 22px 50px rgba(41, 30, 90, 0.16);
  --sh-brand: 0 14px 30px rgba(90, 50, 230, 0.32);
  --sh-inset: inset 0 -4px 0 rgba(0,0,0,0.14);

  /* Layout */
  --container: 1160px;
  --container-narrow: 760px;
  --header-h: 74px;

  /* Motion */
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);   /* springy */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.16s; --t: 0.28s; --t-slow: 0.5s;
}

/* ========================= 2. RESET & BASE ========================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x on html ONLY - never body (SOP rule) */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--sp-4); }
a { color: var(--brand-ink); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand); }
strong { font-weight: 800; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: var(--sp-2); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ====================== 3. ACCESSIBILITY ========================== */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--brand); color: #fff; padding: 12px 20px;
  border-radius: var(--r-sm); z-index: 10001; font-weight: 800;
  transition: top var(--t);
}
.skip-link:focus { top: 12px; color: #fff; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================== 4. LAYOUT ============================ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-7); }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }
.section--brand { background: var(--grad-brand); color: #fff; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }
.section__head { max-width: 720px; margin: 0 auto var(--sp-7); text-align: center; }
.section__head p { color: var(--muted); font-size: var(--fs-lead); }
.section--brand .section__head p { color: rgba(255,255,255,0.9); }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  padding: 6px 14px; border-radius: var(--r-pill); margin-bottom: var(--sp-4);
}
.section--brand .eyebrow { color: #fff; background: rgba(255,255,255,0.18); }
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); }

/* ======================= 5. HEADER / NAV ========================= */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: var(--header-h); display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-4);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-brand); box-shadow: var(--sh-brand); flex: none;
  color: #fff; font-size: 1.35rem; transform: rotate(-6deg);
}
.brand__mark::after { content: "●"; }
.nav__links { display: flex; align-items: center; gap: var(--sp-2); list-style: none; padding: 0; margin: 0; }
.nav__links a {
  display: inline-block; padding: 9px 14px; border-radius: var(--r-pill);
  color: var(--ink-soft); font-weight: 700; font-size: 0.98rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.nav__cta { margin-left: var(--sp-2); }
.nav__toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-soft); position: relative; z-index: 10000; flex: none;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 12px; width: 22px; height: 2.6px;
  background: var(--brand-ink); border-radius: 3px; transition: transform var(--t), opacity var(--t);
}
.nav__toggle span { top: 22px; }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after { top: 7px; }
body.nav-open .nav__toggle span { background: transparent; }
body.nav-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav__toggle span::after  { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay { position: fixed; inset: 0; background: rgba(20,16,45,0.5); z-index: 9998; display: none; }
.nav-overlay.nav-open { display: block; }

/* ============================ 6. FOOTER ========================== */
.site-footer { background: #14122A; color: #C9C6E0; padding-block: var(--sp-8) var(--sp-6); }
.site-footer a { color: #C9C6E0; }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); margin-bottom: var(--sp-7); }
.footer__brand .brand { color: #fff; }
.footer__brand p { color: #9F9CBB; margin-top: var(--sp-3); max-width: 32ch; }
.footer__col h2 { color: #fff; font-size: 1rem; margin-bottom: var(--sp-3); }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: var(--sp-2); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--sp-5);
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--fs-small); color: #9F9CBB;
}
.footer__social { display: flex; gap: var(--sp-3); }
.footer__social a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.08); display: grid; place-items: center; }
.footer__social a:hover { background: var(--brand); }

/* ========================= 7. COMPONENTS ========================= */
/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  padding: 14px 28px; border-radius: var(--r-pill); color: #fff;
  background: var(--grad-brand); box-shadow: var(--sh-brand), var(--sh-inset);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), filter var(--t-fast);
  -webkit-tap-highlight-color: transparent; text-align: center; line-height: 1.1;
}
.btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--lg { font-size: 1.2rem; padding: 18px 38px; }
.btn--sky   { background: var(--grad-sky);   box-shadow: 0 12px 26px rgba(42,167,240,0.34), var(--sh-inset); }
.btn--mint  { background: var(--grad-mint);  box-shadow: 0 12px 26px rgba(16,185,129,0.32), var(--sh-inset); }
.btn--sunny { background: var(--grad-sunny); color: var(--sunny-ink); box-shadow: 0 12px 26px rgba(255,201,60,0.4), var(--sh-inset); }
.btn--sunny:hover { color: var(--sunny-ink); }
.btn--coral { background: var(--grad-coral); box-shadow: 0 12px 26px rgba(255,107,107,0.34), var(--sh-inset); }
.btn--ghost {
  background: #fff; color: var(--brand-ink); box-shadow: var(--sh-sm);
  border: 2px solid var(--line);
}
.btn--ghost:hover { color: var(--brand-ink); border-color: var(--brand); }
.btn--block { width: 100%; }

/* Pills / tags / badges */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 800; font-size: 0.9rem; background: var(--brand-soft); color: var(--brand-ink); }
.pill--mint { background: #DFF7EE; color: var(--mint-ink); }
.pill--sky  { background: #DEF2FE; color: var(--sky-ink); }
.pill--sunny{ background: #FFF3D0; color: var(--sunny-ink); }
.pill--coral{ background: #FFE3E3; color: var(--coral-ink); }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: var(--r-pill); background: var(--sunny); color: var(--sunny-ink); }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-6); box-shadow: var(--sh-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t);
}
.card--hover:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.card__icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.8rem; margin-bottom: var(--sp-4); background: var(--brand-soft);
}
.card__icon--mint { background: #DFF7EE; } .card__icon--sky { background: #DEF2FE; }
.card__icon--sunny { background: #FFF3D0; } .card__icon--coral { background: #FFE3E3; }
/* inline-SVG icons */
.ic { display: block; width: 100%; height: 100%; }
.card__icon--ic { color: var(--brand-ink); }
.card__icon--ic .ic { width: 30px; height: 30px; }
.card__icon--ic.card__icon--mint { color: var(--mint-ink); }
.card__icon--ic.card__icon--sky { color: var(--sky-ink); }
.card__icon--ic.card__icon--sunny { color: var(--sunny-ink); }
.card__icon--ic.card__icon--coral { color: var(--coral-ink); }
.skill__emoji--ic { color: var(--brand-ink); }
.skill__emoji--ic .ic { width: 30px; height: 30px; }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--muted); margin-bottom: 0; }

/* Game-review screenshot figure */
.game-figure { margin: 0 0 var(--sp-6); }
.game-figure img { width: 100%; height: auto; border-radius: var(--r-md); box-shadow: var(--sh-md); background: var(--bg-soft); }
.game-figure figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: var(--sp-2); font-weight: 700; }
.reviews-list { margin-top: var(--sp-4); }

/* Internal search */
.search-box input { width: 100%; font-size: 1.15rem; padding: 16px 20px; border-radius: var(--r-pill); border: 2px solid var(--line); background: #fff; font-family: inherit; }
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-block { margin-top: var(--sp-5); }
.search-block h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: var(--sp-3); }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chips .pill { border: none; cursor: pointer; }
.search-count { color: var(--muted); font-weight: 700; margin: var(--sp-5) 0 var(--sp-3); }
.search-result { display: block; padding: var(--sp-4) var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--sp-3); background: #fff; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.search-result:hover, .search-result.is-active { transform: translateX(4px); box-shadow: var(--sh-sm); border-color: var(--brand); }
.search-result__tag { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 10px; border-radius: var(--r-pill); margin-bottom: 6px; }
.search-result__t { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.search-result__d { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.search-result mark { background: #FFF3B0; color: inherit; padding: 0 2px; border-radius: 3px; }
.search-none { padding: var(--sp-5); }
.search-none .search-chips { margin-top: var(--sp-4); }

/* Printable worksheets */
.ws-actions { display: flex; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.worksheet { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-7); box-shadow: var(--sh-sm); }
.worksheet__head { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--brand); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); }
.worksheet__head strong { font-family: var(--font-display); display: block; }
.worksheet__head span { font-size: var(--fs-small); color: var(--muted); }
.worksheet h1 { font-size: 1.8rem; }
.worksheet__sub { color: var(--muted); margin-bottom: var(--sp-5); }
.worksheet__name { display: flex; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); font-weight: 700; flex-wrap: wrap; }
.ws-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: var(--sp-4) var(--sp-5); }
.ws-q { font-size: 1.05rem; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.ws-blank { flex: 1; border-bottom: 2px dotted var(--muted); min-width: 28px; height: 1.1em; }
.ws-list { list-style: none; padding: 0; }
.ws-check { padding: 10px 0 10px 40px; position: relative; border-bottom: 1px solid var(--line); font-weight: 600; }
.ws-check::before { content: ""; position: absolute; left: 0; top: 10px; width: 22px; height: 22px; border: 2px solid var(--brand); border-radius: 6px; }
.ws-table { width: 100%; border-collapse: collapse; }
.ws-table th, .ws-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; height: 42px; }
.ws-table th { background: var(--bg-soft); font-family: var(--font-display); }
.worksheet__foot { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--muted); }
@media print {
  .site-header, .site-footer, .to-top, .cookie-notice, .no-print, .breadcrumb, .progress-bar { display: none !important; }
  body { background: #fff; }
  .section--tight { padding: 0 !important; }
  .worksheet { border: none; box-shadow: none; padding: 0; }
  .ws-blank { border-bottom-color: #999; }
}

/* Glossary */
.glossary-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-4); }
.glossary-index a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.glossary-index a:hover { background: var(--brand); color: #fff; }
.glossary { display: block; }
.glossary h2 { font-size: 1.4rem; margin: var(--sp-6) 0 var(--sp-3); color: var(--brand-ink); border-bottom: 2px solid var(--line); padding-bottom: var(--sp-2); }
.glossary-term { padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.glossary-term dt { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; }
.glossary-term dd { margin: 0; color: var(--ink-soft); }

/* HTML sitemap */
.sitemap-grid { columns: 3 260px; column-gap: var(--sp-6); }
.sitemap-col { break-inside: avoid; margin-bottom: var(--sp-6); }
.sitemap-col h2 { font-size: 1.15rem; margin-bottom: var(--sp-3); color: var(--brand-ink); }
.sitemap-col ul { list-style: none; padding: 0; margin: 0; }
.sitemap-col li { margin-bottom: 6px; font-size: 0.95rem; }

/* Topic card (blog clusters) */
.topic-card { display: flex; flex-direction: column; align-items: flex-start; color: var(--ink); }
.topic-card:hover { color: var(--ink); }
.topic-card h3 { margin-bottom: var(--sp-2); }
.topic-card p { color: var(--muted); margin-bottom: 0; }
.topic-card .pill { margin-top: auto; }

/* Breadcrumb */
.breadcrumb { padding-block: var(--sp-4); font-size: var(--fs-small); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--line); }
.breadcrumb a { color: var(--muted); font-weight: 700; }
.breadcrumb a:hover { color: var(--brand); }

/* Accordion (FAQ) */
.faq { max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.faq__item { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow: hidden; box-shadow: var(--sh-sm); }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5); text-align: left; font-family: var(--font-display);
  font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.faq__q .faq__icon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 1.3rem; transition: transform var(--t), background var(--t); }
.faq__item[open] .faq__icon { transform: rotate(45deg); background: var(--brand); color: #fff; }
.faq__a { padding: 0 var(--sp-5) var(--sp-5); color: var(--muted); }
.faq__q::-webkit-details-marker { display: none; }

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; box-shadow: var(--sh-brand); z-index: 900;
  display: grid; place-items: center; font-size: 1.3rem; opacity: 0; visibility: hidden;
  transform: translateY(12px); transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: #fff; transform: translateY(-3px); }

/* Privacy notice */
.cookie-notice {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px);
  width: min(680px, calc(100vw - 32px)); z-index: 950;
  background: #14122A; color: #E7E4F2; border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  opacity: 0; transition: opacity var(--t), transform var(--t);
}
.cookie-notice.is-in { opacity: 1; transform: translate(-50%, 0); }
.cookie-notice p { margin: 0; font-size: 0.92rem; flex: 1 1 260px; }
.cookie-notice__actions { display: flex; align-items: center; gap: var(--sp-3); }
.cookie-notice a { color: #C9C6E0; font-weight: 700; font-size: 0.9rem; }
.cookie-notice a:hover { color: #fff; }
.cookie-notice .btn { padding: 10px 20px; font-size: 0.95rem; }

/* Reading progress bar */
.progress-bar { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--grad-sunny); z-index: 1001; transition: width 0.1s linear; }

/* ======================== 8. PAGE BLOCKS ========================= */
/* Hero */
.hero { background: var(--grad-hero); padding-block: var(--sp-9) var(--sp-8); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-8); align-items: center; }
.hero h1 { font-size: var(--fs-hero); font-weight: 700; margin-bottom: var(--sp-4); }
.hero h1 .accent { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-bottom: var(--sp-6); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.hero__stats { display: flex; gap: var(--sp-6); margin-top: var(--sp-7); flex-wrap: wrap; }
.hero__stat strong { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--brand-ink); line-height: 1; }
.hero__stat span { font-size: var(--fs-small); color: var(--muted); font-weight: 700; }
.hero__art { position: relative; }

/* Floating blobs / decoration */
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: 0.5; z-index: 0; }

/* Feature grid item colours cycle via nth-child in components */
.steps { counter-reset: step; display: grid; gap: var(--sp-5); }
.step { display: flex; gap: var(--sp-4); align-items: flex-start; }
.step__num {
  flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff;
  background: var(--grad-brand); box-shadow: var(--sh-brand);
}
.step:nth-child(2) .step__num { background: var(--grad-sky); box-shadow: 0 10px 22px rgba(42,167,240,.3); }
.step:nth-child(3) .step__num { background: var(--grad-mint); box-shadow: 0 10px 22px rgba(16,185,129,.3); }
.step:nth-child(4) .step__num { background: var(--grad-sunny); color: var(--sunny-ink); }
.step:nth-child(5) .step__num { background: var(--grad-coral); box-shadow: 0 10px 22px rgba(255,107,107,.3); }
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); margin: 0; }

/* Skills chips */
.skill-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-4); }
.skill {
  display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5);
  border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t);
}
.skill:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.skill__emoji { font-size: 2rem; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); flex: none; }
.skill h3 { font-size: 1.15rem; margin: 0 0 2px; }
.skill p { margin: 0; color: var(--muted); font-size: var(--fs-small); }

/* Age band cards */
.age-card { text-align: center; padding: var(--sp-6) var(--sp-5); border-radius: var(--r-lg); color: #fff; box-shadow: var(--sh-md); }
.age-card h3 { color: #fff; font-size: 2.2rem; }
.age-card .age-label { font-weight: 800; opacity: 0.95; }
.age-card p { color: rgba(255,255,255,0.92); margin-top: var(--sp-2); font-size: 0.95rem; }

/* CTA band */
.cta-band { text-align: center; border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-6); background: var(--grad-brand); color: #fff; box-shadow: var(--sh-lg); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; margin-bottom: var(--sp-3); }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 52ch; margin-inline: auto; margin-bottom: var(--sp-6); font-size: var(--fs-lead); }

/* Post / game card */
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.post-card__thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-card__thumb .thumb-svg { display: block; width: 100%; height: 100%; }
.post-card h3 { font-size: 1.16rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); }
.post-card__meta { margin-top: auto; font-size: var(--fs-small); color: var(--muted); }

/* ---- Article / blog ---- */
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: var(--sp-8); align-items: start; }
.article-body { max-width: 72ch; }
.article-body > * { margin-bottom: var(--sp-5); }
.article-body h2 { margin-top: var(--sp-7); margin-bottom: var(--sp-3); padding-top: var(--sp-2); }
.article-body h3 { margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.article-body p, .article-body li { font-size: 1.1rem; color: var(--ink-soft); }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body a { color: var(--brand-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--brand-soft); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--brand); }
.article-body img { border-radius: var(--r-md); box-shadow: var(--sh-md); margin-block: var(--sp-5); }
.article-body blockquote { border-left: 4px solid var(--brand); background: var(--bg-soft); padding: var(--sp-4) var(--sp-5); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 1.15rem; color: var(--ink-soft); }
.callout { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 var(--r-md) var(--r-md) 0; padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-6); }
.callout a { color: var(--brand-ink); font-weight: 800; }
.article-hero .card__icon { margin-bottom: var(--sp-4); }

/* ---- Content-experience components (hero articles) ---- */
.note { display: flex; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); margin-block: var(--sp-5); font-size: 1.02rem; }
.note__ic { flex: none; font-size: 1.3rem; line-height: 1.4; }
.note p:last-child { margin-bottom: 0; }
.note--tip { background: #DFF7EE; border: 1px solid #A7E9D0; color: var(--mint-ink); }
.note--tip strong { color: #075e3f; }
.note--warn { background: #FFF3D0; border: 1px solid #F3D98A; color: var(--sunny-ink); }
.note--info { background: var(--brand-soft); border: 1px solid #D9CEFF; color: var(--brand-ink); }
.summary-box { background: linear-gradient(135deg,#F3EFFF,#EAF6FF); border: 1px solid #DDD3F7; border-radius: var(--r-lg); padding: var(--sp-5) var(--sp-6); margin-bottom: var(--sp-6); }
.summary-box h2 { font-size: 1.15rem; margin-bottom: var(--sp-3); }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.summary-box li { margin-bottom: 6px; color: var(--ink-soft); }
figure.diagram { margin: var(--sp-6) 0; text-align: center; }
figure.diagram svg { max-width: 100%; height: auto; }
figure.diagram figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: var(--sp-3); font-weight: 700; }
.worked { background: #fff; border: 2px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); margin-block: var(--sp-5); }
.worked h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); margin-bottom: var(--sp-3); }
.download-card { display: flex; align-items: center; gap: var(--sp-5); background: var(--grad-brand); color: #fff; border-radius: var(--r-lg); padding: var(--sp-5) var(--sp-6); margin-block: var(--sp-6); box-shadow: var(--sh-brand); flex-wrap: wrap; }
.download-card__ic { font-size: 2.4rem; flex: none; }
.download-card h3 { color: #fff; margin: 0 0 4px; }
.download-card p { color: rgba(255,255,255,.9); margin: 0; }
.download-card .btn { margin-left: auto; background: #fff; color: var(--brand-ink); box-shadow: none; }
.howto-steps { counter-reset: ht; list-style: none; padding: 0; }
.howto-steps li { position: relative; padding-left: 3.4rem; margin-bottom: var(--sp-4); min-height: 2.4rem; }
.howto-steps li::before { counter-increment: ht; content: counter(ht); position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.refs { font-size: var(--fs-small); color: var(--muted); }
.refs li { margin-bottom: 6px; }
.reviewed-meta { font-size: var(--fs-small); color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--sp-4); margin-top: var(--sp-6); }
.article-body table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); border: 1px solid var(--line); }
.article-body table th, .article-body table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.article-body table th { background: var(--bg-soft); font-family: var(--font-display); }
.article-hero { padding-block: var(--sp-7) var(--sp-5); background: var(--grad-hero); }
.article-hero h1 { font-size: var(--fs-h1); max-width: 20ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; margin-top: var(--sp-4); color: var(--muted); font-size: var(--fs-small); }
.article-meta .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* TOC sidebar */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: var(--sp-5); }
.toc { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); background: #fff; box-shadow: var(--sh-sm); }
.toc h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: var(--sp-3); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; font-size: 0.92rem; color: var(--ink-soft); font-weight: 700; border-left: 3px solid transparent; }
.toc a:hover { background: var(--brand-soft); }
.toc a.is-active { background: var(--brand-soft); color: var(--brand-ink); border-left-color: var(--brand); }

.share { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.share a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.share a:hover { background: var(--brand); color: #fff; }

.author-box { display: flex; gap: var(--sp-5); padding: var(--sp-6); border-radius: var(--r-lg); background: var(--bg-soft); border: 1px solid var(--line); align-items: center; }
.author-box .avatar { width: 66px; height: 66px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; flex: none; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.prev-next a { padding: var(--sp-5); border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; box-shadow: var(--sh-sm); transition: transform var(--t), box-shadow var(--t); }
.prev-next a:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.prev-next span { font-size: var(--fs-small); color: var(--muted); font-weight: 800; }
.prev-next strong { display: block; color: var(--ink); margin-top: 4px; }
.prev-next .nxt { text-align: right; }

/* Contact form */
.form-grid { display: grid; gap: var(--sp-4); }
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group label { font-weight: 800; font-size: 0.95rem; }
.field-group input, .field-group textarea, .field-group select {
  font-family: inherit; font-size: 1rem; padding: 14px 16px; border-radius: var(--r-sm);
  border: 2px solid var(--line); background: #fff; color: var(--ink); transition: border-color var(--t-fast);
}
.field-group input:focus, .field-group textarea:focus, .field-group select:focus { outline: none; border-color: var(--brand); }

/* ========================= 10. UTILITIES ======================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.hidden { display: none; }
.flex { display: flex; } .items-center { align-items: center; } .gap-3 { gap: var(--sp-3); }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }

/* ========================= 11. ANIMATIONS ======================= */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(0.9) translateY(10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes wiggle { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes shine { to { background-position: 200% center; } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.float { animation: floaty 5s ease-in-out infinite; }
.brand__mark:hover { animation: wiggle 0.5s ease-in-out; }

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

/* ========================= 12. RESPONSIVE ======================= */
/* Single block. Do not scatter @media elsewhere. */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero__art { order: -1; max-width: 520px; margin-inline: auto; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; }
  .toc { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__links {
    position: fixed; top: 0; right: 0; width: min(320px, 86vw); height: 100vh;
    flex-direction: column; align-items: stretch; gap: var(--sp-2);
    background: #fff; padding: calc(var(--header-h) + 16px) var(--sp-5) var(--sp-6);
    box-shadow: -20px 0 50px rgba(20,16,45,0.18); z-index: 9999; isolation: isolate;
    transform: translateX(100%); transition: transform var(--t) var(--ease-out);
    overflow-y: auto;
  }
  body.nav-open .nav__links { transform: translateX(0); }
  .nav__links a { padding: 14px 16px; font-size: 1.1rem; }
  .nav__cta { margin: var(--sp-3) 0 0; }
  .nav__cta .btn { width: 100%; }
  .nav__toggle { display: block; }
  .grid--3, .grid--4, .skill-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .section { padding-block: var(--sp-7); }
  .grid--2, .grid--3, .grid--4, .skill-grid { grid-template-columns: 1fr; }
  .hero__stats { gap: var(--sp-5); }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .prev-next { grid-template-columns: 1fr; }
  .cta-band { padding: var(--sp-7) var(--sp-4); }
  .btn { width: 100%; }
  .hero__cta .btn { width: 100%; }
  .author-box { flex-direction: column; text-align: center; }
}
