/* ==========================================================
   Yadiko — base theme (v0.7 "notebook" refresh)
   Mobile-first, RTL, no framework, no CDN.

   Design language (shared with the landing page):
   paper surfaces, deep-green ink, a fresh green primary,
   colorful "letter block" accents and crisp offset shadows.

   Fonts are served locally from /assets/fonts (no external requests):
     Vazirmatn variable    -> UI text, Persian + Latin, one file for all weights
     IBM Plex Sans Arabic  -> fallback only
   Both ship under the SIL Open Font License.
   ========================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype-variations"),
       url("../fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand greens */
  --c-green: #67a516;
  --c-green-d: #528312;
  --c-green-dd: #2b4b04;
  --c-green-dark: #142605;
  --c-green-l: #baec79;
  --c-green-m: #9bd84c;
  --c-green-wash: #eef8e2;

  /* Accents (the landing's letter blocks) */
  --c-sun: #f5bf3c;
  --c-sky: #3b86cf;
  --c-berry: #d94a6a;
  --c-clay: #e7773f;
  --c-plum: #7b5cc4;

  /* Semantic tokens (referenced by games.css / blog.css / resources.css / admin-*.css) */
  --c-bg: #f6f7f2;
  --c-bg-2: #eceee6;
  --c-paper: #fbfbf5;
  --c-surface: #fff;
  --c-text: #142106;
  --c-muted: #5d6a54;
  --c-primary: #67a516;
  --c-primary-d: #528312;
  --c-primary-dd: #2b4b04;
  --c-on-primary: #fff;
  --c-accent: #baec79;
  --c-ok: #3f8c0a;
  --c-err: #c0392b;
  --c-warn: #b45309;
  --c-border: #e2e6da;
  --c-border-strong: #cdd4c2;
  --c-line: rgba(59, 134, 207, .12);

  /* Shape language */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 6, .06);
  --shadow: 0 1px 2px rgba(20, 33, 6, .05), 0 8px 24px -10px rgba(20, 33, 6, .14);
  --shadow-lift: 0 2px 4px rgba(20, 33, 6, .05), 0 22px 40px -18px rgba(20, 33, 6, .32);
  --shadow-hard: 4px 4px 0 var(--c-green-dd);
  --shadow-hard-sm: 3px 3px 0 var(--c-green-dd);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --font: "Vazirmatn", "IBM Plex Sans Arabic", Tahoma, "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font);

  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  color: var(--c-text);
  background-color: var(--c-bg);
  /* very faint dot grid: reads as "paper", not as flat grey */
  background-image: radial-gradient(rgba(43, 75, 4, .055) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-primary-d); text-decoration-thickness: 1px; text-underline-offset: 4px; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .6em; font-weight: 900; letter-spacing: -.015em; color: var(--c-text); }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.65rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
code { background: var(--c-bg-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
::selection { background: var(--c-green-l); color: var(--c-green-dark); }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 1.1rem; }
.muted { color: var(--c-muted); }
.lead { font-size: 1.08rem; color: #46523d; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Skip link: hidden vertically (direction-agnostic, overflow-free in RTL). */
.skip-link {
  position: absolute; inset-inline-start: 1rem;
  top: -100px; z-index: 200;
  background: var(--c-green-dark); color: #fff;
  padding: .6rem 1.1rem; font-weight: 700;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top .12s ease;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--c-green-d); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px;
  border: 2px solid var(--c-border-strong);
  background: var(--c-surface); color: var(--c-text);
  padding: .5rem 1.3rem; border-radius: var(--radius-pill);
  font: inherit; font-weight: 800; line-height: 1.4;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--c-green-dd); box-shadow: var(--shadow-hard-sm); transform: translate(-1px, -1px); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-primary { background: var(--c-primary); border-color: var(--c-green-dd); color: var(--c-on-primary); box-shadow: var(--shadow-hard-sm); }
.btn-primary:hover { background: var(--c-primary-d); border-color: var(--c-green-dd); box-shadow: var(--shadow-hard); transform: translate(-2px, -2px); }
.btn-dark { background: var(--c-green-dd); border-color: var(--c-green-dd); color: #fff; }
.btn-dark:hover { background: var(--c-green-dark); }
.btn-sun { background: var(--c-sun); border-color: var(--c-green-dd); color: var(--c-green-dark); box-shadow: var(--shadow-hard-sm); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--c-green-wash); border-color: transparent; box-shadow: none; transform: none; }
.btn-lg { padding: .75rem 1.8rem; font-size: 1.06rem; min-height: 54px; }
.btn-sm { padding: .3rem .9rem; min-height: 36px; font-size: .9rem; }
.btn-block { width: 100%; margin-top: 1rem; }
.btn-link { background: none; border: 0; color: var(--c-primary-d); padding: 0; font-weight: 800; min-height: 0; box-shadow: none !important; }
.btn-link:hover { box-shadow: none; text-decoration: underline; transform: none; }
.btn-icon { width: 44px; padding: 0; }

/* Touch targets (phone widths only) */
@media (max-width: 767px) {
  .btn, .btn-link { min-height: 44px; }
  .btn-link { display: inline-flex; align-items: center; }
  .game-card-title a,
  .post-card-title a,
  .resource-card-title a,
  .card-title a { display: inline-block; padding-block: .65rem; margin-block: -.65rem; }
  .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; }
  .breadcrumb a,
  .pagination a,
  .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px;
  }
  .breadcrumb a { padding-inline: .6rem; margin-inline: -.6rem; }
}

/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */
label { display: block; font-weight: 800; margin: .9rem 0 .35rem; font-size: .95rem; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--c-text);
  min-height: 48px;
  padding: .6rem 1rem;
  border: 2px solid var(--c-border); border-radius: 14px;
  background: var(--c-surface);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
textarea { line-height: 1.85; }
select {
  padding-inline-end: 2.4rem;
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-muted) 50%),
                    linear-gradient(135deg, var(--c-muted) 50%, transparent 50%);
  background-position: left 1.2rem top 52%, left .85rem top 52%;
  background-size: .38rem .38rem, .38rem .38rem;
  background-repeat: no-repeat;
}
select[multiple] { background-image: none; padding-inline-end: 1rem; }
input:hover, textarea:hover, select:hover { border-color: var(--c-border-strong); }
input:focus, textarea:focus, select:focus {
  border-color: var(--c-green-dd); box-shadow: 0 0 0 4px rgba(103, 165, 22, .18); outline: none;
}
input::placeholder, textarea::placeholder { color: #98a28e; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--c-primary); cursor: pointer; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--c-err); }
.field small { display: block; margin-top: .3rem; color: var(--c-muted); font-size: .85rem; line-height: 1.7; }
.error { color: var(--c-err); font-size: .9rem; display: block; margin-top: .3rem; font-weight: 700; }
.grid-2 { display: grid; gap: 0 1rem; }
form.inline { display: inline; }

/* ---------------------------------------------------------
   Cards, chips, alerts
   --------------------------------------------------------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem; margin-bottom: 1.25rem;
}
.card.warn { border-color: var(--c-warn); }
.alert { padding: .9rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 700; }
.alert-success { background: #eef8e2; color: #2b4b04; border: 1px solid #cfe9ad; border-inline-start: 5px solid var(--c-primary); }
.alert-error   { background: #fdeeec; color: #8c2a1e; border: 1px solid #f5cdc7; border-inline-start: 5px solid var(--c-err); }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 251, 245, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(43, 75, 4, .1);
  transition: box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .94); box-shadow: 0 10px 30px -18px rgba(20, 33, 6, .35); }
.site-header::after { /* brand stripe in the landing's block colors */
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; opacity: 0;
  background: linear-gradient(to left, var(--c-green) 0 20%, var(--c-sky) 20% 40%, var(--c-sun) 40% 60%, var(--c-berry) 60% 80%, var(--c-plum) 80% 100%);
  transition: opacity .25s var(--ease);
}
.site-header.is-scrolled::after { opacity: 1; }
.header-inner { display: flex; align-items: center; gap: .75rem; min-height: var(--header-h); }

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 900; font-size: 1.3rem; color: var(--c-green-dd);
  text-decoration: none; letter-spacing: -.02em;
  min-height: 44px; min-width: 0;
}
.brand:hover { color: var(--c-green-d); }
.brand-mark {
  flex-shrink: 0; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--c-green); color: #fff; font-size: 1.35rem; font-weight: 900; line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 2px 0 rgba(255, 255, 255, .3), var(--shadow-hard-sm);
  transform: rotate(-6deg);
  transition: transform .35s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(4deg) scale(1.06); }
.brand-logo { display: block; height: 2.4rem; width: auto; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header-actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.header-cta { display: none; }
.nav-toggle {
  display: inline-grid; place-items: center;
  background: #fff; border: 2px solid var(--c-green-dd); color: var(--c-green-dd);
  border-radius: 14px; width: 46px; height: 46px; cursor: pointer; padding: 0;
  box-shadow: var(--shadow-hard-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav-toggle:active { transform: translate(2px, 2px); box-shadow: none; }
.nav-burger { position: relative; display: block; width: 20px; height: 2.5px; border-radius: 2px; background: currentColor; transition: background-color .2s ease; }
.nav-burger::before, .nav-burger::after { content: ""; position: absolute; inset-inline: 0; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .3s var(--spring), top .2s ease; }
.nav-burger::before { top: -6.5px; }
.nav-burger::after { top: 6.5px; }
.nav-toggle[aria-expanded="true"] .nav-burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-burger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-burger::after { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.main-nav {
  display: none; position: absolute; top: calc(100% + .5rem); inset-inline: .75rem;
  flex-direction: column; gap: .25rem; padding: .6rem;
  background: #fff; border: 2px solid var(--c-green-dd); border-radius: 20px; box-shadow: var(--shadow-hard), var(--shadow-lift);
}
.main-nav.is-open { display: flex; animation: nav-drop .28s var(--ease); }
.main-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .75rem 1rem; border-radius: 14px; color: var(--c-text); text-decoration: none; font-weight: 800; font-size: 1.05rem;
}
.main-nav a::after { content: "←"; color: var(--c-muted); font-weight: 400; }
.main-nav a:hover, .main-nav a:focus-visible { background: var(--c-green-wash); color: var(--c-green-dd); }
.main-nav a[aria-current="page"] { background: var(--c-green-dd); color: #fff; }
.main-nav a[aria-current="page"]::after { color: var(--c-green-l); }
.main-nav .nav-cta-mobile { margin-top: .35rem; background: var(--c-primary); color: #fff; justify-content: center; }
.main-nav .nav-cta-mobile::after { content: none; }
@keyframes nav-drop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

.site-main { min-height: 60vh; }

/* ---------------------------------------------------------
   Page hero (inner pages): notebook paper + marker underline
   --------------------------------------------------------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-block: clamp(1.25rem, 4vw, 2.25rem) clamp(2rem, 5vw, 3.25rem);
  background-color: var(--c-paper);
  background-image:
    linear-gradient(to left, transparent 0 calc(1rem + 30px), rgba(217, 74, 106, .22) calc(1rem + 30px) calc(1rem + 32px), transparent calc(1rem + 32px)),
    repeating-linear-gradient(to bottom, transparent 0 35px, var(--c-line) 35px 36px);
  border-bottom: 1px solid var(--c-border);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin: .25rem 0 .5rem; font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.2; color: var(--c-green-dd); max-width: 22ch; }
.page-hero .lead { margin: 0; max-width: 40rem; font-size: clamp(1rem, 1.8vw, 1.15rem); }
.page-hero .lead p { margin: 0 0 .5rem; }
.hero-mark { position: relative; display: inline-block; color: var(--c-green); z-index: 0; }
.hero-mark::after {
  content: ""; position: absolute; z-index: -1; inset-inline: -3%; bottom: .08em; height: .32em;
  background: var(--c-sun); opacity: .55; border-radius: 6px; transform: rotate(-1.2deg);
}
.page-kicker {
  display: inline-flex; align-items: center; gap: .45rem; margin: .4rem 0 .2rem;
  padding: .2rem .85rem; border-radius: 999px; background: #fff;
  border: 1.5px solid var(--c-green-dd); box-shadow: var(--shadow-hard-sm);
  font-weight: 800; font-size: .88rem; color: var(--c-green-dd);
}
.page-kicker::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c-green); }
.page-hero-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.page-hero-stats li { padding: .3rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--c-border); font-size: .9rem; font-weight: 700; color: var(--c-muted); }
.page-hero-stats strong { color: var(--c-green-dd); font-weight: 900; }
/* Floating letter blocks (decorative) */
.hero-blocks { display: none; position: absolute; inset-block: 0; inset-inline-end: 0; width: 38%; pointer-events: none; z-index: 0; }
.hero-blocks span {
  position: absolute; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 18px;
  font-weight: 900; font-size: 2rem; color: #fff; line-height: 1;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .16), inset 0 3px 0 rgba(255, 255, 255, .28), 0 14px 22px -12px rgba(20, 33, 6, .45);
  animation: block-bob 6s ease-in-out infinite;
}
.hero-blocks span:nth-child(1) { top: 16%; left: 20%; background: var(--c-sky); transform: rotate(-8deg); }
.hero-blocks span:nth-child(2) { top: 48%; left: 6%; width: 86px; height: 86px; font-size: 2.4rem; background: var(--c-sun); color: var(--c-green-dd); transform: rotate(7deg); animation-delay: -2s; }
.hero-blocks span:nth-child(3) { top: 30%; left: 44%; width: 58px; height: 58px; font-size: 1.6rem; background: var(--c-berry); transform: rotate(12deg); animation-delay: -4s; }
.hero-blocks span:nth-child(4) { top: 62%; left: 34%; background: var(--c-green); transform: rotate(-4deg); animation-delay: -1s; }
@keyframes block-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .35rem; font-size: .88rem; color: var(--c-muted); margin: 0 0 .5rem; }
.breadcrumb a { color: inherit; text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--c-green-dd); text-decoration: underline; }
.breadcrumb [aria-current], .breadcrumb > span:last-child { color: var(--c-text); font-weight: 700; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Section heading used inside pages */
.section-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.section-title::before { content: ""; flex-shrink: 0; width: 12px; height: 28px; border-radius: 4px; background: var(--c-green); box-shadow: 3px 3px 0 var(--c-sun); }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
  position: relative; margin-top: clamp(3rem, 7vw, 5rem); color: #cfdcbf;
  background-color: var(--c-green-dark);
  background-image:
    radial-gradient(50% 60% at 90% 0%, rgba(103, 165, 22, .22), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(59, 134, 207, .12), transparent 70%);
}
.site-footer::before { /* chalk tray edge */
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 6px;
  background: linear-gradient(to left, var(--c-green) 0 20%, var(--c-sky) 20% 40%, var(--c-sun) 40% 60%, var(--c-berry) 60% 80%, var(--c-plum) 80% 100%);
}
.footer-main { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-mark { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 2px 0 rgba(255, 255, 255, .3), 3px 3px 0 var(--c-sun); }
.footer-brand p { margin: .9rem 0 0; max-width: 32rem; line-height: 2; color: #b9c9a6; }
.footer-col h2 { margin: 0 0 .8rem; font-size: 1rem; color: #fff; letter-spacing: 0; }
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .25rem; }
.footer-col a { color: #cfdcbf; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; transition: color .15s ease, transform .2s var(--ease); }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--c-green-l); transform: translateX(-4px); }
.footer-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.footer-chips a { padding: .15rem .8rem; min-height: 32px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); font-size: .88rem; }
.footer-chips a:hover { background: rgba(255, 255, 255, .08); transform: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-block: 1.1rem; font-size: .88rem; color: #a5b693; }
.footer-bottom p { margin: 0; }
.to-top {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem 1rem; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .25); color: #fff; text-decoration: none; font-weight: 700; font-size: .88rem;
  transition: background-color .15s ease, border-color .15s ease;
}
.to-top:hover { background: var(--c-green); border-color: var(--c-green); }

/* ---------------------------------------------------------
   Legacy hero (kept for any page still using it)
   --------------------------------------------------------- */
.hero { padding: 3.25rem 1rem; text-align: center; background: var(--c-paper); border-bottom: 1px solid var(--c-border); }
.hero h1 { font-size: 2.05rem; color: var(--c-green-dd); }
.hero .lead { max-width: 640px; margin: 0 auto 1.75rem; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------
   Error pages
   --------------------------------------------------------- */
.error-page { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); }
.error-page .lead { max-width: 34rem; margin-inline: auto; margin-bottom: 1.75rem; }
.error-code {
  display: inline-flex; gap: .4rem; margin: 0 0 1rem; font-size: clamp(3rem, 12vw, 5rem); font-weight: 900; line-height: 1;
  color: var(--c-green-dd);
}
.error-code::before, .error-code::after { content: ""; }

/* ---------------------------------------------------------
   Plain layout (login / installer)
   --------------------------------------------------------- */
.plain-main { max-width: 760px; margin: 0 auto; padding: 2rem 1rem; }
.auth-card { max-width: 420px; margin: 8vh auto; border: 2px solid var(--c-green-dd); box-shadow: var(--shadow-hard), var(--shadow-lift); border-radius: var(--radius-lg); padding: 2rem; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: .25rem 0; }
.checklist .ok { color: var(--c-ok); }
.checklist .fail { color: var(--c-err); }
.checklist .warn { color: var(--c-warn); }

/* ---------------------------------------------------------
   Admin shell
   --------------------------------------------------------- */
body.admin { background-image: none; background-color: #f3f5ef; }
.admin-shell { min-height: 100vh; }
.admin-sidebar { display: none; background: var(--c-green-dark); color: #fff; padding: 1rem .8rem; }
.admin-sidebar.is-open { display: block; }
.admin-sidebar .brand { color: #fff; margin-bottom: 1.1rem; padding-inline: .4rem; }
.admin-sidebar small { font-weight: 500; opacity: .7; font-size: .78rem; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: .1rem; }
.admin-sidebar nav a, .nav-soon {
  color: #d9e6c8; text-decoration: none; padding: .5rem .8rem;
  border-radius: 12px; font-weight: 700; font-size: .95rem;
  transition: background-color .15s ease, color .15s ease;
}
.admin-sidebar nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-sidebar nav a[aria-current="page"] { background: var(--c-primary); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.nav-soon { opacity: .5; cursor: default; }
.nav-soon em { font-style: normal; font-size: .75rem; }
.admin-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1rem; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-border); padding: .55rem 1rem; }
.admin-topbar > span { margin-inline-start: auto; font-weight: 700; }
.admin-topbar .nav-toggle { width: 42px; height: 42px; box-shadow: none; }
.admin-content { padding: 1rem; max-width: 1240px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.1rem; text-align: center; color: var(--c-muted); font-weight: 700; transition: border-color .15s ease, box-shadow .15s ease, transform .2s var(--ease); }
a.stat:hover { border-color: var(--c-green-dd); box-shadow: var(--shadow-hard-sm); transform: translate(-1px, -1px); }
.stat span { display: block; font-size: 1.9rem; font-weight: 900; color: var(--c-green-dd); line-height: 1.3; }
.kv { list-style: none; padding: 0; }

/* ---------------------------------------------------------
   Tablet and up
   --------------------------------------------------------- */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .admin-shell { display: grid; grid-template-columns: 250px 1fr; }
  .admin-sidebar { display: block; min-height: 100vh; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
  .admin-topbar .nav-toggle { display: none; }
  .admin-content { padding: 1.75rem 2rem; }
}
@media (min-width: 900px) {
  .site-header .nav-toggle { display: none; }
  .main-nav, .main-nav.is-open {
    display: flex; position: static; flex-direction: row; gap: .2rem; padding: .3rem;
    background: rgba(43, 75, 4, .05); border: 0; border-radius: 999px; box-shadow: none; animation: none;
    margin-inline-start: 1.25rem;
  }
  .main-nav a { padding: .4rem 1.1rem; border-radius: 999px; font-size: .98rem; font-weight: 700; color: #3a4731; }
  .main-nav a::after { content: none; }
  .main-nav a:hover { background: #fff; color: var(--c-green-dd); box-shadow: var(--shadow-sm); }
  .main-nav a[aria-current="page"] { background: var(--c-green-dd); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
  .main-nav .nav-cta-mobile { display: none; }
  .header-cta { display: inline-flex; }
  .hero-blocks { display: block; }
  .footer-main { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

/* Classroom projector / large screens */
@media (min-width: 1600px) {
  body { font-size: 1.08rem; }
  .container { max-width: 1400px; }
}

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

.brand img { display: block; }
a.stat { color: inherit; text-decoration: none; }
a.stat:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.admin-sidebar .brand { display: flex; align-items: center; gap: .5rem; min-height: 0; font-size: 1.15rem; }

/* Print: teachers print worksheets and game lists */
@media print {
  .site-header, .site-footer, .admin-sidebar, .admin-topbar, .btn, .pagination, .hero-blocks, .read-progress, .post-share, .post-toc { display: none !important; }
  body { background: #fff; color: #000; }
  .page-hero { background: none; border: 0; }
  .card, .game-card, .post-card, .resource-card { box-shadow: none; border: 1px solid #999; }
}
.footer-col .footer-gap { margin-top: 1.4rem; }

/* v0.7.1 — compact footer (grade/subject columns removed from footer.php) */
.footer-main{gap:1.25rem;padding-block:1.75rem 1rem}
.footer-brand p{font-size:.85rem;margin:.6rem 0 0}
.footer-col h2{font-size:.95rem;margin-block-end:.55rem}
.footer-col ul{gap:.15rem}
.footer-col a{font-size:.88rem;min-height:30px}
.footer-bottom-inner{padding-block:.8rem;font-size:.8rem}
.to-top{font-size:.8rem;padding:.25rem .85rem}
