/* =========================================================
   Белые медведи — Unified Design System
   Style: playful arctic adventure / family edutainment
   ========================================================= */

:root {
  --primary: #0b4a6e;
  --primary-dark: #083552;
  --secondary: #1a8a9e;
  --accent: #ff8a3d;
  --accent-hover: #ff7a24;
  --bg-soft: #f5fbff;
  --white: #ffffff;
  --text: #1c3b4d;
  --text-light: #5a7383;
  --border: #d7ebf7;
  --shadow: 0 10px 30px rgba(11, 74, 110, 0.08);
  --shadow-hover: 0 16px 40px rgba(11, 74, 110, 0.14);
  --radius: 22px;
  --radius-pill: 999px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #dff1ff 0%, var(--bg-soft) 220px, #f8fcff 100%);
  min-height: 100vh;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--primary); }
ul { list-style: none; }

.main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.86);
  border-bottom: 1px solid rgba(215,235,247,0.9);
}
.header-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 800; font-size: 1.15rem; color: var(--primary);
}
.logo-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7ad3ff, #3aa7d9);
  box-shadow: 0 6px 16px rgba(58,167,217,0.28);
  font-size: 1.35rem;
}
.nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.nav a {
  color: var(--text); font-weight: 600; font-size: 0.95rem;
  padding: 0.55rem 0.95rem; border-radius: var(--radius-pill);
}
.nav a:hover, .nav a.active { background: #e7f6ff; color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.75rem 1.25rem; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: #eef7fd; color: var(--primary);
  font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff9d5c);
  color: #fff; box-shadow: 0 10px 22px rgba(255,138,61,0.28);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #ff8a3d); color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--primary); }
.btn-danger { background: #ffe2e0; color: #b42318; }

/* Breadcrumbs & badges */
.breadcrumbs { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1.1rem; }
.breadcrumbs a { color: var(--secondary); }
.breadcrumbs span { margin: 0 0.35rem; opacity: 0.55; }
.cat-badge, .pillar-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.7rem; border-radius: var(--radius-pill);
  font-size: 0.78rem; font-weight: 700;
}
.cat-badge { background: #dff4ff; color: var(--primary); }
.pillar-badge { background: #ffe8cf; color: #b45a10; }

/* Hero home */
.hero-home {
  position: relative; overflow: hidden; border-radius: 32px;
  padding: 2.4rem 2rem 1.6rem;
  background:
    radial-gradient(circle at 80% 20%, rgba(120,230,180,0.28), transparent 30%),
    linear-gradient(135deg, #1482b8 0%, #0d5f8f 45%, #0a4a73 100%);
  color: #fff; box-shadow: var(--shadow); margin-bottom: 1.4rem;
}
.hero-home h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15;
  max-width: 15ch; margin-bottom: 0.8rem;
}
.hero-home > p {
  max-width: 40ch; color: rgba(255,255,255,0.92);
  margin-bottom: 1.2rem; font-size: 1.05rem;
}
.hero-facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem; margin-top: 1.4rem;
}
.hero-fact {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 18px; padding: 0.9rem;
}
.hero-fact strong { display: block; margin-bottom: 0.25rem; font-size: 0.95rem; }
.hero-fact span { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.88); line-height: 1.4; }

/* Sections */
.home-section { margin: 2.2rem 0; }
.section-title { font-size: 1.55rem; color: var(--primary-dark); margin-bottom: 0.45rem; }
.section-lead { color: var(--text-light); margin-bottom: 1.2rem; max-width: 700px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }

/* Category grid */
.category-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.9rem;
}
.category-card {
  display: flex; flex-direction: column; gap: 0.4rem;
  background: #fff; border-radius: 20px; padding: 1rem;
  box-shadow: var(--shadow); min-height: 170px; transition: 0.2s ease; color: inherit;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card .cat-num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 800; background: rgba(255,255,255,0.75); color: var(--primary);
}
.category-card .cat-emoji { font-size: 1.7rem; }
.category-card h3 { font-size: 1rem; line-height: 1.25; color: var(--primary-dark); }
.category-card p { font-size: 0.82rem; color: var(--text-light); flex: 1; }
.category-card .cat-count { font-size: 0.78rem; font-weight: 700; color: var(--secondary); }
.cat-c1 { background: linear-gradient(180deg, #e8f8ff, #dff3ff); }
.cat-c2 { background: linear-gradient(180deg, #eafff3, #d9f8e8); }
.cat-c3 { background: linear-gradient(180deg, #fff4e8, #ffe7cf); }
.cat-c4 { background: linear-gradient(180deg, #eef2ff, #e0e8ff); }
.cat-c5 { background: linear-gradient(180deg, #f3e8ff, #ead9ff); }
.cat-c6 { background: linear-gradient(180deg, #ffe8f1, #ffd7e6); }
.cat-c7 { background: linear-gradient(180deg, #e8f7ff, #d8f0ff); }
.cat-c8 { background: linear-gradient(180deg, #e9fff1, #d7f8e4); }
.cat-c9 { background: linear-gradient(180deg, #fff0e0, #ffe2c4); }
.cat-c10 { background: linear-gradient(180deg, #f0e9ff, #e5dbff); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-img {
  height: 150px; display: grid; place-items: center; font-size: 3rem;
  background: linear-gradient(135deg, #d9f1ff, #c5e8fb);
}
.card-body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card-meta { font-size: 0.8rem; color: var(--text-light); }
.card-body h3 { font-size: 1.02rem; line-height: 1.3; }
.card-body h3 a { color: var(--primary-dark); }
.card-body p { color: var(--text-light); font-size: 0.9rem; flex: 1; }

/* Pillar */
.pillar-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.pillar-item {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 210px;
  color: #fff; box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0d6b97, #0a4d72);
}
.pillar-item-body {
  position: relative; z-index: 1; padding: 1.2rem; height: 100%;
  display: flex; flex-direction: column; justify-content: end;
  background: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.35) 100%);
}
.pillar-item h3 { font-size: 1.15rem; margin: 0.4rem 0; }
.pillar-item h3 a { color: #fff; }
.pillar-item p { color: rgba(255,255,255,0.9); font-size: 0.9rem; margin-bottom: 0.8rem; }

/* FAQ */
.faq-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.faq-list li + li { border-top: 1px solid var(--border); }
.faq-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem; color: var(--text); font-weight: 600;
}
.faq-list a:hover { background: #f3faff; color: var(--primary); }
.faq-arrow { color: var(--secondary); }

.intro-text {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.6rem;
}
.intro-text p { margin-bottom: 0.9rem; }
.intro-link { margin-top: 1rem; }

/* Category page */
.category-hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.2rem; align-items: center;
  background: linear-gradient(135deg, #e9f7ff, #f8fcff);
  border: 1px solid var(--border); border-radius: 28px; padding: 1.4rem;
  margin-bottom: 1.3rem; box-shadow: var(--shadow);
}
.category-hero-icon {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.4rem; background: linear-gradient(135deg, #d9f3ff, #bfe9ff); margin-bottom: 0.8rem;
}
.category-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem); color: var(--primary-dark); margin-bottom: 0.5rem;
}
.category-hero p { color: var(--text-light); max-width: 46ch; }
.category-hero-art {
  min-height: 220px; border-radius: 22px;
  background: radial-gradient(circle at 70% 40%, rgba(120,220,170,0.25), transparent 40%), linear-gradient(135deg, #2f95c2, #0d5f8f);
  display: grid; place-items: center; font-size: 5rem; color: rgba(255,255,255,0.92);
}
.pillar-highlight {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; align-items: center;
  background: #fff; border-radius: 24px; box-shadow: var(--shadow);
  padding: 1.2rem; margin-bottom: 1.5rem;
}
.pillar-highlight h2 { font-size: 1.4rem; color: var(--primary-dark); margin: 0.45rem 0 0.55rem; }
.pillar-highlight p { color: var(--text-light); margin-bottom: 0.9rem; }
.pillar-highlight-art {
  min-height: 180px; border-radius: 18px;
  background: linear-gradient(135deg, #3aa7d9, #0d6b97);
  display: grid; place-items: center; font-size: 4rem;
}

/* Article */
.article {
  background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 1.6rem 1.6rem 2rem;
}
.article h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.2;
  color: var(--primary-dark); margin: 0.5rem 0 0.7rem;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  color: var(--text-light); font-size: 0.9rem; margin-bottom: 1rem;
}
.article-image {
  border-radius: 20px; overflow: hidden; margin: 0.4rem 0 1.2rem;
  background: linear-gradient(135deg, #d9f1ff, #c5e8fb);
  display: grid; place-items: center; font-size: 5rem;
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.article-content { font-size: 1.05rem; line-height: 1.75; color: var(--text); }
.article-content h2 { margin: 1.5rem 0 0.6rem; color: var(--primary-dark); font-size: 1.3rem; }
.article-content h3 { margin: 1.2rem 0 0.45rem; color: var(--primary); font-size: 1.1rem; }
.article-content p { margin-bottom: 0.9rem; }
.article-content ul, .article-content ol { margin: 0 0 1rem 1.2rem; list-style: disc; }
.fact-box {
  background: #eefaf6; border: 1px solid #cdeedf; border-radius: 18px;
  padding: 1rem 1.1rem; margin: 1.1rem 0;
}
.related-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1rem; margin-top: 1.5rem; }
.related-card { background: #f3faff; border-radius: 18px; padding: 1rem; }
.related-list-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.mini-card { background: #fff; border-radius: 16px; padding: 0.8rem; box-shadow: var(--shadow); }
.mini-card h4 { font-size: 0.92rem; margin-bottom: 0.3rem; }
.mini-card p { font-size: 0.8rem; color: var(--text-light); }

.other-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.7rem; margin-top: 1.2rem; }
.other-cat {
  background: #fff; border-radius: 16px; padding: 0.85rem; text-align: center;
  box-shadow: var(--shadow); color: inherit;
}
.other-cat .emoji { font-size: 1.5rem; margin-bottom: 0.3rem; }
.other-cat strong { display: block; font-size: 0.86rem; color: var(--primary-dark); }
.other-cat span { font-size: 0.75rem; color: var(--text-light); }

/* Footer */
.footer {
  margin-top: 2rem;
  background: linear-gradient(180deg, #0b4a6e, #083552);
  color: rgba(255,255,255,0.86); padding: 2.2rem 0 1.2rem;
}
.footer-inner {
  width: min(1180px, calc(100% - 2rem)); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 1.2rem;
}
.footer h4 { color: #fff; margin-bottom: 0.7rem; font-size: 0.95rem; }
.footer a { color: rgba(255,255,255,0.82); }
.footer a:hover { color: #fff; }
.footer li { margin-bottom: 0.35rem; font-size: 0.9rem; }
.footer-bottom {
  width: min(1180px, calc(100% - 2rem)); margin: 1.3rem auto 0;
  padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem; color: rgba(255,255,255,0.65);
  display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap;
}

/* Admin */
.admin-panel { max-width: 920px; margin: 0 auto; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border);
  border-radius: 12px; font: inherit; background: #fff;
}
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin-item {
  display: flex; justify-content: space-between; gap: 1rem; background: #fff;
  border-radius: 16px; padding: 0.95rem 1rem; box-shadow: var(--shadow); margin-bottom: 0.7rem;
}
.empty-state {
  text-align: center; padding: 2.5rem 1rem; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-state .emoji { font-size: 3rem; margin-bottom: 0.6rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin: 1.5rem 0; }
.page-btn {
  min-width: 2.3rem; height: 2.3rem; padding: 0 0.7rem; border-radius: 12px;
  display: inline-grid; place-items: center; background: #fff;
  border: 1px solid var(--border); color: var(--primary); font-weight: 700;
}
.page-btn.active, .page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.mt-2 { margin-top: 1rem; }
.text-center { text-align: center; }
.cluster-nav {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.45rem;
  background: linear-gradient(135deg, #0a4d68, #088395); color: #fff;
  border-radius: var(--radius); padding: 1.5rem; margin-top: 1rem;
}
.cluster-nav a {
  color: #fff; font-weight: 600; padding: 0.4rem 0.75rem; border-radius: 999px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
}
.cluster-sep { opacity: 0.55; }

@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .cards, .pillar-list { grid-template-columns: repeat(2, 1fr); }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .category-hero, .pillar-highlight, .related-grid, .footer-inner { grid-template-columns: 1fr; }
  .other-cats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; padding: 0.7rem 0; }
  .category-grid, .cards, .pillar-list, .related-list-cards, .other-cats, .hero-facts { grid-template-columns: 1fr; }
  .hero-home { padding: 1.5rem 1.1rem; border-radius: 22px; }
  .article { padding: 1.1rem; }
}

/* Image slots */
.hero-home {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: center;
}
.hero-home-copy { position: relative; z-index: 1; }
.hero-home-art {
  border-radius: 24px;
  overflow: hidden;
  min-height: 280px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}
.hero-home-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}
.hero-facts { grid-column: 1 / -1; }
.card-img {
  height: 160px;
  padding: 0;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-hero-art {
  padding: 0;
  overflow: hidden;
}
.category-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}
.pillar-highlight-art {
  padding: 0;
  overflow: hidden;
}
.pillar-highlight-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 180px;
}
.category-card .cat-thumb {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 0.35rem;
  background: rgba(255,255,255,0.35);
}
.category-card .cat-thumb img,
.category-card .cat-thumb picture,
.category-card .cat-thumb picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.category-card--v2 .cat-thumb {
  height: 130px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(11,74,110,0.08);
}
@media (max-width: 900px) {
  .hero-home { grid-template-columns: 1fr; }
}

/* =========================================================
   Homepage v2 — modern interactive layer
   ========================================================= */

.btn-lg { padding: 0.9rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.88rem; }
.btn-ghost {
  background: rgba(255,255,255,0.7);
  color: var(--primary);
  border: 1px solid rgba(11,74,110,0.15);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: #fff; color: var(--primary-dark); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero v2 */
.hero-home--v2 {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(122,211,255,0.35), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(255,138,61,0.18), transparent 35%),
    linear-gradient(135deg, #e8f6ff 0%, #f7fcff 55%, #eef8ff 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.8rem 1.6rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(11,74,110,0.1);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  margin-bottom: 0.85rem;
}
.hero-home--v2 h1 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  line-height: 1.15;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}
.hero-home--v2 .hero-home-copy p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 42ch;
  margin-bottom: 1.2rem;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.hero-home--v2 .hero-home-art {
  position: relative;
}
.hero-float-chip {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 8px 24px rgba(11,74,110,0.14);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  animation: floatY 4.5s ease-in-out infinite;
}
.hero-float-chip--1 { top: 12%; left: 6%; animation-delay: 0s; }
.hero-float-chip--2 { bottom: 14%; right: 8%; animation-delay: 1.2s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}
.stat-item {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1rem 0.8rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.stat-num {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Intro panel */
.intro-panel {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1.2rem;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.4rem 1.5rem;
}
.intro-panel-text p {
  color: var(--text-light);
  margin-bottom: 0.7rem;
}
.intro-panel-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.mini-fact {
  background: linear-gradient(180deg, #f3faff, #eaf6ff);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.mini-fact span { font-size: 1.35rem; }
.mini-fact strong { font-size: 0.92rem; color: var(--primary-dark); }
.mini-fact em { font-style: normal; font-size: 0.82rem; color: var(--text-light); }

/* Category cards v2 */
.category-card--v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1rem 0.95rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}
.category-card--v2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,0.35));
  pointer-events: none;
}
.category-card--v2:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 18px 40px rgba(11,74,110,0.16);
  border-color: rgba(26,138,158,0.25);
}
.category-card--v2 .cat-num {
  position: absolute;
  top: 0.7rem; right: 0.8rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(11,74,110,0.35);
}
.category-card--v2 .cat-emoji {
  font-size: 1.85rem;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  margin-bottom: 0.2rem;
}
.category-card--v2 h3 {
  font-size: 1.02rem;
  color: var(--primary-dark);
  line-height: 1.25;
  z-index: 1;
}
.category-card--v2 p {
  font-size: 0.84rem;
  color: var(--text-light);
  flex: 1;
  z-index: 1;
}
.cat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.45rem;
  z-index: 1;
}
.cat-go {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  opacity: 0;
  transform: translateX(-6px);
  transition: 0.2s ease;
}
.category-card--v2:hover .cat-go {
  opacity: 1;
  transform: none;
}

/* Pillars v2 */
.pillar-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.pillar-card-v2 {
  background: #fff;
  color: var(--text);
  border-radius: 22px;
  padding: 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 280px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pillar-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(8,53,82,0.16);
}
.pillar-card-thumb {
  display: block;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: linear-gradient(160deg, #0d6b97 0%, #0a4d72 100%);
}
.pillar-card-thumb img,
.pillar-card-thumb picture,
.pillar-card-thumb picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.pillar-card-v2:hover .pillar-card-thumb img,
.pillar-card-v2:hover .pillar-card-thumb picture img {
  transform: scale(1.05);
}
.pillar-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
}
.pillar-card-v2 h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0;
}
.pillar-card-v2 h3 a {
  color: var(--primary-dark);
  text-decoration: none;
}
.pillar-card-v2 h3 a:hover { color: var(--secondary); }
.pillar-card-v2 p {
  color: var(--text-light);
  font-size: 0.88rem;
  flex: 1;
  margin: 0;
}
.pillar-card-v2 .btn-primary {
  align-self: flex-start;
  margin-top: 0.25rem;
}

/* FAQ accordion */
.faq-accordion {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-weight: 700;
  color: var(--text);
  transition: background 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: #f3faff; }
.faq-item[open] summary { background: #eef8ff; color: var(--primary-dark); }
.faq-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #e7f6ff;
  color: var(--secondary);
  font-weight: 800;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--secondary);
  color: #fff;
}
.faq-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-light);
  animation: faqIn 0.25s ease;
}
.faq-body p { margin-bottom: 0.75rem; }
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* Cards v2 */
.card--v2 {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card--v2:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.card--v2 .card-img {
  position: relative;
  height: 170px;
}
.card--v2 .card-img img {
  transition: transform 0.35s ease;
}
.card--v2:hover .card-img img {
  transform: scale(1.05);
}
.card-emoji {
  font-size: 3rem;
}
.card-link {
  font-weight: 700;
  color: var(--secondary);
  margin-top: auto;
}
.card-link:hover { color: var(--primary); }

/* Games teaser */
.games-teaser {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, #0a4d68, #0e7a8f 55%, #1a8a9e);
  color: #fff;
  border-radius: 24px;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 16px 40px rgba(10,77,104,0.25);
}
.games-teaser h2 { font-size: 1.4rem; margin-bottom: 0.45rem; }
.games-teaser p { color: rgba(255,255,255,0.9); margin-bottom: 1rem; max-width: 40ch; }
.games-teaser .btn-primary {
  background: #fff;
  color: var(--primary-dark);
}
.games-teaser-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}
.game-chip {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition: 0.2s ease;
}
.game-chip:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
  transform: translateY(-2px);
}

/* Cluster nav v2 */
.cluster-nav--v2 {
  gap: 0.55rem;
  padding: 1.35rem;
}
.cluster-nav--v2 a {
  transition: transform 0.15s ease, background 0.15s ease;
}
.cluster-nav--v2 a:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-2px);
  color: #fff;
}

/* Responsive for homepage v2 */
@media (max-width: 1024px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .intro-panel { grid-template-columns: 1fr; }
  .pillar-grid-v2 { grid-template-columns: repeat(2, 1fr); }
  .games-teaser { grid-template-columns: 1fr; }
  .games-teaser-icons { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .pillar-grid-v2 { grid-template-columns: 1fr; }
  .hero-float-chip { display: none; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .intro-panel-facts { grid-template-columns: 1fr 1fr; }
}

/* Parallax layers */
.hero-home--v2 { isolation: isolate; }
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
}
.hero-bg-orb--1 {
  width: 280px; height: 280px;
  top: -60px; right: 18%;
  background: radial-gradient(circle, rgba(122,211,255,0.45), transparent 70%);
}
.hero-bg-orb--2 {
  width: 220px; height: 220px;
  bottom: -40px; left: 8%;
  background: radial-gradient(circle, rgba(255,138,61,0.22), transparent 70%);
}
.hero-home--v2 .hero-home-copy { position: relative; z-index: 2; will-change: transform; }
.hero-home-art { position: relative; z-index: 1; overflow: hidden; border-radius: 24px; }
.hero-parallax-media {
  will-change: transform;
  height: 100%;
  min-height: 280px;
}
.hero-parallax-media img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transform: scale(1.12);
  transform-origin: center center;
}
.hero-float-chip { will-change: transform; }
@media (max-width: 700px) {
  .hero-bg-orb { display: none; }
  .hero-parallax-media img { transform: none; min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-float-chip { animation: none; }
  .hero-bg-orb { display: none; }
}

/* =========================================================
   Category & Article pages v2 — unified with homepage
   ========================================================= */

.breadcrumbs--v2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.15rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  backdrop-filter: blur(8px);
}
.breadcrumbs--v2 a { color: var(--secondary); font-weight: 600; }
.breadcrumbs--v2 a:hover { color: var(--primary); }
.breadcrumbs--v2 .bc-current {
  color: var(--primary-dark);
  font-weight: 700;
  max-width: 42ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category hero v2 */
.category-hero--v2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
  align-items: center;
  background:
    radial-gradient(circle at 12% 20%, rgba(122,211,255,0.3), transparent 42%),
    linear-gradient(135deg, #e8f6ff 0%, #f7fcff 60%, #eef8ff 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.5rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.category-hero--v2 h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: var(--primary-dark);
  margin: 0.5rem 0 0.55rem;
  line-height: 1.18;
}
.category-hero--v2 p {
  color: var(--text-light);
  max-width: 48ch;
  margin-bottom: 0.9rem;
}
.category-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(11,74,110,0.1);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
}
.meta-chip--link { color: var(--secondary); }
.meta-chip--link:hover { background: #fff; color: var(--primary-dark); }
.category-hero--v2 .category-hero-art {
  border-radius: 22px;
  overflow: hidden;
  min-height: 240px;
  box-shadow: 0 14px 34px rgba(11,74,110,0.16);
}
.category-hero--v2 .category-hero-art img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}
.category-hero-fallback {
  min-height: 240px;
  display: grid;
  place-items: center;
  font-size: 5rem;
  background: linear-gradient(135deg, #2f95c2, #0d5f8f);
  color: rgba(255,255,255,0.92);
}

/* Pillar highlight v2 */
.pillar-highlight--v2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pillar-highlight--v2:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.pillar-highlight--v2 h2 {
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin: 0.45rem 0 0.55rem;
}
.pillar-highlight--v2 h2 a { color: var(--primary-dark); }
.pillar-highlight--v2 h2 a:hover { color: var(--secondary); }
.pillar-highlight--v2 p {
  color: var(--text-light);
  margin-bottom: 0.9rem;
}
.pillar-highlight--v2 .pillar-highlight-art {
  border-radius: 18px;
  overflow: hidden;
  min-height: 180px;
}
.pillar-highlight--v2 .pillar-highlight-art img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}
.pillar-fallback {
  min-height: 180px;
  display: grid;
  place-items: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, #3aa7d9, #0d6b97);
}

/* Other categories v2 */
.other-cats--v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.other-cat--v2 {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem 0.95rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.other-cat--v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.other-cat--v2 .emoji { font-size: 1.5rem; }
.other-cat--v2 strong { color: var(--primary-dark); font-size: 0.98rem; }
.other-cat--v2 span { color: var(--text-light); font-size: 0.82rem; font-weight: 600; }

/* Article v2 */
.article--v2 {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.article-header {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.2rem;
  margin-bottom: 1rem;
}
.article-badges {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.article-header h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  line-height: 1.18;
  color: var(--primary-dark);
  margin-bottom: 0.55rem;
}
.article-image--v2 {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #d9f1ff, #c5e8fb);
}
.article-image--v2 img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.article-image-fallback {
  min-height: 260px;
  display: grid;
  place-items: center;
  font-size: 5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.15rem;
  align-items: start;
}
.article--v2 .article-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.45rem 1.5rem 1.7rem;
  font-size: 1.05rem;
  line-height: 1.75;
}
.article--v2 .article-content h2 {
  margin: 1.55rem 0 0.6rem;
  color: var(--primary-dark);
  font-size: 1.32rem;
}
.article--v2 .article-content h3 {
  margin: 1.2rem 0 0.45rem;
  color: var(--primary);
  font-size: 1.12rem;
}
.article--v2 .article-content p { margin-bottom: 0.9rem; }
.article--v2 .article-content a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article--v2 .article-content a:hover { color: var(--primary); }
.article--v2 .article-content ul,
.article--v2 .article-content ol {
  margin: 0 0 1rem 1.2rem;
  list-style: disc;
}

.fact-box--v2 {
  margin-top: 1.4rem;
  background: linear-gradient(135deg, #eef8ff, #f5fbff);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem 1.1rem;
}
.fact-box--v2 p { margin: 0.4rem 0 0; color: var(--text-light); }

.article-aside {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 90px;
}
.aside-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
}
.aside-card h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin: 0.4rem 0 0.45rem;
  line-height: 1.3;
}
.aside-card h3 a { color: var(--primary-dark); }
.aside-card h3 a:hover { color: var(--secondary); }
.aside-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}
.aside-card--list h3 { margin-bottom: 0.65rem; }
.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.aside-links a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: #f3faff;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: background 0.15s ease, transform 0.15s ease;
}
.aside-links a:hover {
  background: #e7f6ff;
  transform: translateX(3px);
  color: var(--primary);
}
.aside-card--games {
  background: linear-gradient(135deg, #0a4d68, #1a8a9e);
  border: none;
  color: #fff;
}
.aside-card--games h3 { color: #fff; }
.aside-card--games p { color: rgba(255,255,255,0.9); }
.aside-card--games .btn-primary {
  background: #fff;
  color: var(--primary-dark);
}

.article-footer {
  margin-top: 1.15rem;
}
.article-nav-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Reading progress */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 100;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .category-hero--v2,
  .pillar-highlight--v2,
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-aside { position: static; }
  .other-cats--v2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .other-cats--v2 { grid-template-columns: 1fr; }
  .article-header,
  .article--v2 .article-content { padding: 1.1rem; }
  .breadcrumbs--v2 { max-width: 100%; }
}

/* Optimized images / picture */
picture { display: contents; }
.article-image--v2 picture,
.hero-parallax-media picture,
.card-img picture,
.category-hero-art picture,
.pillar-highlight-art picture {
  display: block;
  width: 100%;
  height: 100%;
}
.article-image--v2 picture img,
.hero-parallax-media picture img,
.card-img picture img,
.category-hero-art picture img,
.pillar-highlight-art picture img {
  width: 100%;
  height: auto;
  display: block;
}
.card-img picture img,
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-parallax-media picture img,
.hero-parallax-media img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transform: scale(1.12);
  transform-origin: center center;
}
@media (max-width: 700px) {
  .hero-parallax-media picture img,
  .hero-parallax-media img {
    transform: none;
    min-height: 220px;
  }
}

/* Image performance / CLS */
.card-img,
.article-image--v2,
.hero-home-art,
.category-hero--v2 .category-hero-art {
  background: linear-gradient(135deg, #d9f1ff, #c5e8fb);
}
.card-img { aspect-ratio: 3 / 2; }
.card-img img,
.card-img picture,
.card-img picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-image--v2 picture,
.article-image--v2 picture img,
.hero-home-art picture,
.hero-home-art picture img,
.category-hero-art picture,
.category-hero-art picture img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-parallax-media picture,
.hero-parallax-media picture img {
  display: block;
  width: 100%;
  height: auto;
}
/* Keep article images uncropped */
.article-image--v2 img,
.article-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Category intro block — full width split */
.category-intro {
  max-width: 1120px;
  margin: 2.5rem auto 1rem;
  padding: 0 1.25rem;
}
.category-intro--wide {
  max-width: 1120px;
  width: 100%;
}
.category-intro-inner {
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(240,248,255,0.9));
  border: 1px solid rgba(30, 90, 140, 0.12);
  border-radius: 20px;
  padding: 1.75rem 1.9rem 1.5rem;
  box-shadow: 0 12px 40px rgba(15, 40, 70, 0.06);
}
.category-intro-inner--split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 1.75rem 2rem;
  align-items: start;
}
.category-intro-main {
  min-width: 0;
}
.category-intro .section-title {
  margin-bottom: 1rem;
  font-size: 1.45rem;
}
.category-intro-text {
  color: var(--text);
  line-height: 1.7;
  font-size: 1.02rem;
}
.category-intro-text p {
  margin: 0 0 0.85rem;
}
.category-intro-text p:last-child {
  margin-bottom: 0;
}
.category-intro-cta {
  margin: 1.25rem 0 0;
}
.category-intro-cta .btn {
  display: inline-flex;
}

/* Pillar badge on card */
.card--pillar {
  border: 1px solid rgba(230, 160, 40, 0.35);
  box-shadow: 0 10px 28px rgba(180, 120, 20, 0.08);
}
.card-img {
  position: relative;
}
.card-pillar-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  background: linear-gradient(135deg, #f5c542, #e8a317);
  color: #1a1200;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  letter-spacing: 0.01em;
  line-height: 1.2;
  max-width: calc(100% - 20px);
}

@media (max-width: 900px) {
  .category-intro-inner--split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .category-key-links {
    position: static;
  }
}
@media (max-width: 640px) {
  .category-intro-inner {
    padding: 1.25rem 1.15rem 1.1rem;
    border-radius: 16px;
  }
  .card-pillar-badge {
    font-size: 0.65rem;
    padding: 0.28rem 0.45rem;
  }
}

/* ===== Category page — modern UX ===== */

/* Enhanced hero */
.category-hero--enhanced {
  position: relative;
  overflow: hidden;
}
.category-hero--enhanced .category-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(100, 180, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(80, 200, 220, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.category-hero--enhanced > * {
  position: relative;
  z-index: 1;
}
.category-hero--enhanced .category-hero-copy {
  animation: catHeroIn 0.7s ease both;
}
.category-hero--enhanced .category-hero-art {
  animation: catHeroIn 0.85s ease 0.08s both;
}
@keyframes catHeroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero-badge--pulse {
  animation: badgePulse 2.8s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(100, 170, 255, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(100, 170, 255, 0); }
}
.category-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 90, 140, 0.22);
  background: rgba(255,255,255,0.65);
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.btn-ghost:hover {
  background: #fff;
  border-color: var(--secondary);
  transform: translateY(-1px);
}
.meta-chip--progress {
  background: linear-gradient(135deg, rgba(80, 180, 120, 0.15), rgba(80, 180, 120, 0.08));
  border-color: rgba(60, 150, 100, 0.25);
  color: #1a5c38;
}

/* Sticky subnav */
.cat-subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 251, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cat-subnav.is-stuck {
  border-bottom-color: rgba(30, 90, 140, 0.1);
  box-shadow: 0 8px 24px rgba(15, 40, 70, 0.06);
}
.cat-subnav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.cat-subnav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cat-subnav-link:hover {
  background: rgba(30, 90, 140, 0.08);
  color: var(--primary-dark);
}
.cat-subnav-link.is-active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}
.cat-subnav-progress {
  margin-left: auto;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: rgba(30, 90, 140, 0.12);
  position: relative;
  overflow: hidden;
}
.cat-subnav-progress::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, #3db87a, #2a9d8f);
  border-radius: inherit;
  transition: width 0.35s ease;
}

/* Start grid */
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 0.5rem;
}
.start-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(30, 90, 140, 0.1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(15, 40, 70, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
.start-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 40, 70, 0.12);
  border-color: rgba(30, 120, 200, 0.25);
}
.start-card--pillar {
  border-color: rgba(230, 160, 40, 0.4);
  box-shadow: 0 12px 32px rgba(180, 120, 20, 0.1);
}
.start-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #e8f4ff, #d4eaf8);
}
.start-card-img img,
.start-card-img picture,
.start-card-img picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.start-card:hover .start-card-img img {
  transform: scale(1.05);
}
.start-card-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  background: rgba(15, 30, 50, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  max-width: calc(100% - 20px);
}
.start-card--pillar .start-card-label {
  background: linear-gradient(135deg, #f5c542, #e8a317);
  color: #1a1200;
}
.start-card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.start-card-body h3 {
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  line-height: 1.35;
  color: var(--primary-dark);
}
.start-card-body p {
  margin: 0 0 0.75rem;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}
.start-card-go {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--secondary);
}

/* Toolbar + pillar wide card */
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.cat-toolbar {
  display: flex;
  gap: 0.35rem;
  background: rgba(30, 90, 140, 0.06);
  padding: 0.25rem;
  border-radius: 999px;
}
.cat-sort-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cat-sort-btn.is-active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(15, 40, 70, 0.08);
}
.cat-sort-btn:hover:not(.is-active) {
  color: var(--primary-dark);
}

.cards--category {
  grid-template-columns: repeat(3, 1fr);
}
.cards--category .card--pillar {
  grid-column: span 2;
}
.cards--category .card--v2 {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cards--category .card--v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(15, 40, 70, 0.12);
}
.cards--category .card--pillar:hover {
  box-shadow: 0 16px 40px rgba(180, 120, 20, 0.16);
}

/* Anchor offset for sticky nav */
#cat-about,
#cat-start,
#cat-articles,
#cat-other {
  scroll-margin-top: 64px;
}

@media (max-width: 960px) {
  .start-grid {
    grid-template-columns: 1fr;
  }
  .cards--category {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards--category .card--pillar {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .cat-subnav-inner {
    padding: 0.45rem 0.75rem;
    gap: 0.25rem;
  }
  .cat-subnav-link {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
  }
  .cat-subnav-progress {
    display: none;
  }
  .cards--category {
    grid-template-columns: 1fr;
  }
  .cards--category .card--pillar {
    grid-column: span 1;
  }
  .category-hero-actions {
    width: 100%;
  }
  .category-hero-actions .btn,
  .category-hero-actions .btn-ghost {
    flex: 1;
    justify-content: center;
  }
}

/* Key materials — right column */
.category-key-links {
  margin: 0;
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: 16px;
  background: rgba(30, 90, 140, 0.04);
  border: 1px solid rgba(30, 90, 140, 0.1);
  position: sticky;
  top: 72px;
}
.category-key-links-title {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
  color: var(--primary-dark);
  line-height: 1.3;
}
.category-key-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.category-key-links li a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(30, 90, 140, 0.06);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.category-key-links li a:hover {
  background: #fff;
  border-color: rgba(30, 90, 140, 0.14);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(15, 40, 70, 0.06);
}

/* Rich related categories */
.other-cats--rich {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.6rem;
}
.other-cat-rich {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(30, 90, 140, 0.1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 22px rgba(15, 40, 70, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}
.other-cat-rich:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 40, 70, 0.1);
  border-color: rgba(30, 120, 200, 0.22);
}
.other-cat-rich-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.other-cat-rich-emoji {
  font-size: 1.45rem;
  line-height: 1;
}
.other-cat-rich-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  background: rgba(30, 90, 140, 0.07);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.other-cat-rich strong {
  font-size: 1.05rem;
  color: var(--primary-dark);
  line-height: 1.3;
}
.other-cat-rich p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-light);
  flex: 1;
}
.other-cat-rich-go {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--secondary);
}

@media (max-width: 960px) {
  .other-cats--rich {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .other-cats--rich {
    grid-template-columns: 1fr;
  }
}

/* ——— Read also block (article footer cards) ——— */
.read-also {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.read-also-head {
  margin-bottom: 0.9rem;
}
.read-also-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  color: var(--primary-dark);
}
.read-also-head p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}
.read-also-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.read-also-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.read-also-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 60, 90, 0.12);
}
.read-also-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e8f6ff, #f5fbff);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.read-also-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.read-also-emoji {
  font-size: 2rem;
}
.read-also-body {
  padding: 0.75rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.read-also-body h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--primary-dark);
}
.read-also-pill {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #ffe8cf;
  color: #9a5b12;
}
.read-also-go {
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--secondary);
}
.read-also-card:hover .read-also-go {
  color: var(--primary);
}
@media (max-width: 700px) {
  .read-also-grid {
    grid-template-columns: 1fr;
  }
}

/* Header search */
.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  background: #f4faff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.2rem 0.15rem 0.7rem;
  max-width: 220px;
}
.header-search input[type="search"] {
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
}
.header-search input[type="search"]::placeholder {
  color: var(--text-light);
}
.header-search button {
  border: 0;
  background: var(--primary);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.header-search button:hover {
  background: var(--primary-dark);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
@media (max-width: 820px) {
  .header-search {
    order: 3;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

/* =========================================================
   Theme: Light / Polar Night (dark)
   Creative control: aurora toggle in header
   ========================================================= */

.site-header,
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(215, 235, 247, 0.9);
}

/* Aurora theme toggle */
.theme-aurora {
  --track-w: 64px;
  --track-h: 34px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  flex-shrink: 0;
}
.theme-aurora-track {
  position: relative;
  width: var(--track-w);
  height: var(--track-h);
  border-radius: 999px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(11, 74, 110, 0.12),
    0 6px 16px rgba(11, 74, 110, 0.1);
  background: linear-gradient(135deg, #9ad9ff 0%, #5eb6e8 45%, #ffe29a 100%);
  transition: background 0.45s ease, box-shadow 0.3s ease;
}
.theme-aurora-sky {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(circle at 30% 20%, rgba(120, 255, 210, 0.35), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(90, 160, 255, 0.35), transparent 42%),
    linear-gradient(160deg, #071a2c 0%, #0b2f4a 55%, #123b55 100%);
}
.theme-aurora-band {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 35%;
  height: 42%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(80, 255, 200, 0.0) 15%,
    rgba(100, 255, 210, 0.55) 40%,
    rgba(120, 180, 255, 0.5) 58%,
    rgba(180, 120, 255, 0.25) 72%,
    transparent 100%);
  filter: blur(3px);
  transform: translateX(-12%) rotate(-6deg);
  animation: aurora-shift 5s ease-in-out infinite alternate;
}
.theme-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
  box-shadow: 0 0 6px rgba(255,255,255,0.9);
}
.theme-star.s1 { top: 22%; left: 22%; }
.theme-star.s2 { top: 40%; left: 68%; width: 2px; height: 2px; }
.theme-star.s3 { top: 62%; left: 40%; width: 2px; height: 2px; opacity: 0.65; }

.theme-aurora-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 4px 12px rgba(11, 74, 110, 0.2);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
  z-index: 2;
}
.theme-icon {
  position: absolute;
  font-size: 0.95rem;
  line-height: 1;
  transition: opacity 0.25s ease, transform 0.35s ease;
}
.theme-icon-moon { opacity: 0; transform: scale(0.6) rotate(-30deg); }
.theme-icon-sun { opacity: 1; transform: scale(1) rotate(0); }

.theme-aurora-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  min-width: 2.6rem;
  text-align: left;
}

.theme-aurora.is-dark .theme-aurora-track {
  background: #0a2236;
  box-shadow:
    inset 0 0 0 1px rgba(130, 200, 255, 0.18),
    0 0 18px rgba(80, 220, 200, 0.12);
}
.theme-aurora.is-dark .theme-aurora-sky { opacity: 1; }
.theme-aurora.is-dark .theme-aurora-knob {
  transform: translateX(30px);
  background: #13283c;
  box-shadow: 0 0 0 1px rgba(140, 210, 255, 0.25), 0 4px 14px rgba(0,0,0,0.35);
}
.theme-aurora.is-dark .theme-icon-sun {
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
}
.theme-aurora.is-dark .theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}
.theme-aurora.is-dark .theme-aurora-label { color: #9eb6c7; }

.theme-aurora:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 12px;
}

@keyframes aurora-shift {
  from { transform: translateX(-14%) rotate(-7deg); opacity: 0.7; }
  to { transform: translateX(10%) rotate(-3deg); opacity: 1; }
}

@media (max-width: 820px) {
  .theme-aurora-label { display: none; }
  .theme-aurora { margin-left: auto; }
}

/* ---------- Dark theme tokens ---------- */
html[data-theme="dark"] {
  --primary: #7ec8ff;
  --primary-dark: #d7efff;
  --secondary: #5ed0e0;
  --accent: #ff9a56;
  --accent-hover: #ffb07a;
  --bg-soft: #0b1722;
  --white: #12202e;
  --text: #e7f1f7;
  --text-light: #9db0bf;
  --border: rgba(140, 190, 220, 0.16);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(40, 120, 160, 0.18), transparent 50%),
    radial-gradient(900px 420px at 90% 0%, rgba(60, 180, 150, 0.1), transparent 45%),
    linear-gradient(180deg, #071018 0%, #0b1722 180px, #0d1a26 100%);
  color: var(--text);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .header {
  background: rgba(10, 20, 30, 0.82);
  border-bottom-color: rgba(140, 190, 220, 0.12);
}

html[data-theme="dark"] .logo { color: var(--primary-dark); }
html[data-theme="dark"] .nav a { color: var(--text); }
html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .nav a.active {
  background: rgba(90, 170, 220, 0.14);
  color: #d7efff;
}

html[data-theme="dark"] .header-search {
  background: rgba(18, 32, 46, 0.95);
  border-color: rgba(140, 190, 220, 0.16);
}
html[data-theme="dark"] .header-search input[type="search"] {
  color: var(--text);
}
html[data-theme="dark"] .header-search input[type="search"]::placeholder {
  color: #7f96a8;
}
html[data-theme="dark"] .header-search button {
  background: #1a6f8f;
}
html[data-theme="dark"] .header-search button:hover {
  background: #2285aa;
}

html[data-theme="dark"] .btn {
  background: rgba(30, 52, 70, 0.9);
  color: #d7efff;
  border-color: transparent;
}
html[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #ff9a56, #ff7a24);
  color: #fff;
}
html[data-theme="dark"] .btn-outline {
  background: rgba(16, 30, 42, 0.8);
  border-color: rgba(140, 190, 220, 0.22);
  color: #d7efff;
}
html[data-theme="dark"] .btn-outline:hover {
  background: rgba(40, 70, 95, 0.55);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .mini-card,
html[data-theme="dark"] .aside-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .search-result-card,
html[data-theme="dark"] .about-card,
html[data-theme="dark"] .read-also-card,
html[data-theme="dark"] .game-card-v2,
html[data-theme="dark"] .fact-box,
html[data-theme="dark"] .fact-box--v2 {
  background: rgba(16, 28, 40, 0.92);
  border-color: rgba(140, 190, 220, 0.14);
  color: var(--text);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .category-card h3,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .about-card h2,
html[data-theme="dark"] .read-also-body h3,
html[data-theme="dark"] .search-result-body h2 a {
  color: #eaf6ff;
}

html[data-theme="dark"] .section-lead,
html[data-theme="dark"] .about-card p,
html[data-theme="dark"] .about-list,
html[data-theme="dark"] .search-result-body p {
  color: var(--text-light);
}

/* Soft panels / heroes that used light gradients */
html[data-theme="dark"] .cats-hub-hero,
html[data-theme="dark"] .about-hero,
html[data-theme="dark"] .search-hero,
html[data-theme="dark"] .err404-hero,
html[data-theme="dark"] .games-bottom-cta-inner,
html[data-theme="dark"] .article-hero,
html[data-theme="dark"] .category-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(60, 160, 200, 0.16), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(70, 200, 170, 0.1), transparent 40%),
    linear-gradient(145deg, #102030, #0d1b28 55%, #122233) !important;
  border-color: rgba(140, 190, 220, 0.12) !important;
  color: var(--text);
}

html[data-theme="dark"] .cats-hub-hero h1,
html[data-theme="dark"] .about-hero h1,
html[data-theme="dark"] .search-hero h1,
html[data-theme="dark"] .err404-hero h1 {
  color: #eaf6ff;
}

html[data-theme="dark"] .about-stat,
html[data-theme="dark"] .about-step,
html[data-theme="dark"] .about-hero-aside,
html[data-theme="dark"] .about-orbit span,
html[data-theme="dark"] .cats-stat {
  background: rgba(18, 32, 46, 0.95) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text);
}

html[data-theme="dark"] .about-stat strong,
html[data-theme="dark"] .about-step h3 {
  color: #eaf6ff;
}

html[data-theme="dark"] .breadcrumbs--v2 {
  color: var(--text-light);
}
html[data-theme="dark"] .breadcrumbs--v2 a { color: var(--secondary); }
html[data-theme="dark"] .breadcrumbs--v2 .bc-current { color: #c5d8e6; }

html[data-theme="dark"] .footer {
  background: linear-gradient(180deg, #071018, #050c12);
  border-top: 1px solid rgba(140, 190, 220, 0.08);
}

html[data-theme="dark"] .cat-c1 { background: linear-gradient(180deg, #143047, #102838) !important; }
html[data-theme="dark"] .cat-c2 { background: linear-gradient(180deg, #14382f, #102c26) !important; }
html[data-theme="dark"] .cat-c3 { background: linear-gradient(180deg, #3a2a18, #2c2014) !important; }
html[data-theme="dark"] .cat-c4 { background: linear-gradient(180deg, #1c2440, #151c33) !important; }
html[data-theme="dark"] .cat-c5 { background: linear-gradient(180deg, #2a1f3c, #211830) !important; }
html[data-theme="dark"] .cat-c6 { background: linear-gradient(180deg, #3a1f2c, #2c1822) !important; }
html[data-theme="dark"] .cat-c7 { background: linear-gradient(180deg, #1a3038, #14242c) !important; }
html[data-theme="dark"] .cat-c8 { background: linear-gradient(180deg, #1c2c24, #15221c) !important; }
html[data-theme="dark"] .cat-c9 { background: linear-gradient(180deg, #2c2818, #221e12) !important; }
html[data-theme="dark"] .cat-c10 { background: linear-gradient(180deg, #1a2838, #141f2c) !important; }

html[data-theme="dark"] .article-content,
html[data-theme="dark"] .article-layout {
  color: var(--text);
}
html[data-theme="dark"] .article-content h2,
html[data-theme="dark"] .article-content h3 {
  color: #eaf6ff;
}
html[data-theme="dark"] .article-content a {
  color: #7ad7ff;
}

html[data-theme="dark"] .search-form--page input[type="search"],
html[data-theme="dark"] .err404-search input[type="search"] {
  background: rgba(16, 28, 40, 0.95);
  border-color: rgba(140, 190, 220, 0.18);
  color: var(--text);
}

html[data-theme="dark"] .empty-state {
  color: var(--text-light);
}

html[data-theme="dark"] .read-progress {
  background: linear-gradient(90deg, #5ed0e0, #7ec8ff);
}

/* Inline page styles that force light backgrounds */
html[data-theme="dark"] .games-hero-panel {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   Dark theme — fix remaining light surfaces
   ========================================================= */

/* Breadcrumbs */
html[data-theme="dark"] .breadcrumbs,
html[data-theme="dark"] .breadcrumbs--v2 {
  background: rgba(16, 28, 40, 0.88) !important;
  border-color: rgba(140, 190, 220, 0.16) !important;
  color: var(--text-light) !important;
}
html[data-theme="dark"] .breadcrumbs--v2 .bc-current {
  color: #e6f3fc !important;
}

/* Badges */
html[data-theme="dark"] .cat-badge {
  background: rgba(70, 150, 200, 0.22) !important;
  color: #9fd6ff !important;
}
html[data-theme="dark"] .pillar-badge {
  background: rgba(230, 160, 60, 0.2) !important;
  color: #ffd089 !important;
}

/* Article surfaces */
html[data-theme="dark"] .article-header {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .article-header h1 {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .article-image--v2 {
  background: linear-gradient(135deg, #153048, #102636) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
}
html[data-theme="dark"] .article-content,
html[data-theme="dark"] .article--v2 .article-content {
  background: rgba(14, 26, 38, 0.92) !important;
  border: 1px solid rgba(140, 190, 220, 0.12);
  border-radius: 22px;
  padding: 1.25rem 1.3rem;
  color: var(--text) !important;
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .article--v2 .article-content h2,
html[data-theme="dark"] .article-content h2 {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .article--v2 .article-content h3,
html[data-theme="dark"] .article-content h3 {
  color: #9fd6ff !important;
}
html[data-theme="dark"] .article--v2 .article-content a,
html[data-theme="dark"] .article-content a {
  color: #7ad7ff !important;
}
html[data-theme="dark"] .article--v2 .article-content a:hover,
html[data-theme="dark"] .article-content a:hover {
  color: #b7ebff !important;
}

/* Aside */
html[data-theme="dark"] .aside-card {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
}
html[data-theme="dark"] .aside-card h3,
html[data-theme="dark"] .aside-card h3 a {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .aside-card h3 a:hover {
  color: var(--secondary) !important;
}
html[data-theme="dark"] .aside-links a {
  background: rgba(30, 52, 70, 0.85) !important;
  color: #d7efff !important;
}
html[data-theme="dark"] .aside-links a:hover {
  background: rgba(50, 90, 120, 0.55) !important;
  color: #fff !important;
}
html[data-theme="dark"] .fact-box--v2,
html[data-theme="dark"] .fact-box {
  background: linear-gradient(135deg, #153048, #122636) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text);
}

/* Heroes — home / category / pillar / about / search */
html[data-theme="dark"] .hero-home,
html[data-theme="dark"] .hero-home--v2 {
  background:
    radial-gradient(circle at 80% 20%, rgba(60, 180, 150, 0.14), transparent 32%),
    linear-gradient(135deg, #0a3048 0%, #0c3a55 45%, #0a2d42 100%) !important;
  color: #eaf6ff !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .hero-home h1,
html[data-theme="dark"] .hero-home--v2 h1 {
  color: #fff !important;
}
html[data-theme="dark"] .hero-home > p,
html[data-theme="dark"] .hero-home--v2 .hero-home-copy p {
  color: rgba(230, 244, 255, 0.9) !important;
}

html[data-theme="dark"] .category-hero,
html[data-theme="dark"] .category-hero--v2,
html[data-theme="dark"] .category-hero--enhanced {
  background:
    radial-gradient(circle at 12% 20%, rgba(70, 160, 210, 0.16), transparent 42%),
    linear-gradient(135deg, #102636 0%, #0e2233 55%, #122a3c 100%) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .category-hero--enhanced .category-hero-bg {
  background:
    radial-gradient(circle at 20% 0%, rgba(80, 180, 220, 0.12), transparent 50%),
    transparent !important;
  opacity: 1;
}
html[data-theme="dark"] .category-hero--v2 h1,
html[data-theme="dark"] .category-hero h1 {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .category-hero--v2 p,
html[data-theme="dark"] .category-hero p {
  color: var(--text-light) !important;
}
html[data-theme="dark"] .meta-chip {
  background: rgba(20, 36, 52, 0.9) !important;
  border-color: rgba(140, 190, 220, 0.16) !important;
  color: #9fd6ff !important;
}
html[data-theme="dark"] .meta-chip--link:hover {
  background: rgba(40, 70, 95, 0.7) !important;
  color: #eaf6ff !important;
}
html[data-theme="dark"] .hero-badge {
  background: rgba(20, 40, 58, 0.9) !important;
  color: #cce8ff !important;
  border-color: rgba(140, 190, 220, 0.16);
}

html[data-theme="dark"] .pillar-highlight,
html[data-theme="dark"] .pillar-highlight--v2 {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
}
html[data-theme="dark"] .pillar-highlight h2,
html[data-theme="dark"] .pillar-highlight--v2 h2,
html[data-theme="dark"] .pillar-highlight--v2 h2 a {
  color: #eaf6ff !important;
}

html[data-theme="dark"] .start-card {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .start-card:hover {
  border-color: rgba(120, 190, 240, 0.28) !important;
}
html[data-theme="dark"] .start-card-img {
  background: linear-gradient(145deg, #153048, #102636) !important;
}
html[data-theme="dark"] .start-card-body h3 {
  color: #eaf6ff !important;
}

/* Catalog / list heroes used on categories & articles pages */
html[data-theme="dark"] .cats-hub-hero,
html[data-theme="dark"] .about-hero,
html[data-theme="dark"] .search-hero,
html[data-theme="dark"] .err404-hero,
html[data-theme="dark"] .games-bottom-cta-inner {
  background:
    radial-gradient(circle at 12% 20%, rgba(60, 160, 200, 0.16), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(70, 200, 170, 0.08), transparent 40%),
    linear-gradient(145deg, #102030, #0d1b28 55%, #122233) !important;
  border-color: rgba(140, 190, 220, 0.12) !important;
}

/* Extra light panels that may appear in inline/page CSS */
html[data-theme="dark"] .cats-howto-card,
html[data-theme="dark"] .cats-stat,
html[data-theme="dark"] .about-stat,
html[data-theme="dark"] .about-step,
html[data-theme="dark"] .about-hero-aside,
html[data-theme="dark"] .search-hints,
html[data-theme="dark"] .err404-block {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .cats-howto-card h2,
html[data-theme="dark"] .search-hints h2,
html[data-theme="dark"] .err404-block h2 {
  color: #eaf6ff !important;
}

/* Cards grid on home / articles */
html[data-theme="dark"] .card,
html[data-theme="dark"] .card--v2,
html[data-theme="dark"] .related-card,
html[data-theme="dark"] .mini-card {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text);
}
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .card--v2 h3 {
  color: #eaf6ff !important;
}

/* Hub heroes on /categories.php and /articles.php (inline page CSS) */
html[data-theme="dark"] .cats-hub-hero,
html[data-theme="dark"] .arts-hub-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(60, 160, 200, 0.16), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(70, 200, 170, 0.08), transparent 40%),
    linear-gradient(145deg, #102030, #0d1b28 55%, #122233) !important;
  border-color: rgba(140, 190, 220, 0.12) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .cats-hub-hero h1,
html[data-theme="dark"] .arts-hub-hero h1 {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .cats-lead,
html[data-theme="dark"] .arts-lead,
html[data-theme="dark"] .cats-hub-hero p,
html[data-theme="dark"] .arts-hub-hero p {
  color: var(--text-light) !important;
}
html[data-theme="dark"] .cats-stat,
html[data-theme="dark"] .arts-hero-stats > *,
html[data-theme="dark"] .cats-hero-stats > * {
  background: rgba(18, 32, 46, 0.95) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .cats-hub-hero-aside,
html[data-theme="dark"] .arts-hub-hero-aside {
  background: rgba(16, 28, 40, 0.88) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .cats-howto,
html[data-theme="dark"] .cats-howto-card,
html[data-theme="dark"] .arts-filters,
html[data-theme="dark"] .arts-filter-chip {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .arts-filter-chip.is-active,
html[data-theme="dark"] .arts-filter-chip:hover {
  background: rgba(40, 80, 110, 0.65) !important;
  color: #eaf6ff !important;
}

/* =========================================================
   Dark theme — remaining light surfaces (round 3)
   ========================================================= */

/* Home */
html[data-theme="dark"] .hero-float-chip {
  background: rgba(14, 28, 40, 0.92) !important;
  border-color: rgba(140, 190, 220, 0.22) !important;
  color: #e6f3fc !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .stat-item {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .stat-num { color: #7ec8ff !important; }
html[data-theme="dark"] .stat-label { color: var(--text-light) !important; }

html[data-theme="dark"] .intro-panel {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .intro-panel-text p { color: var(--text-light) !important; }

html[data-theme="dark"] .mini-fact {
  background: linear-gradient(180deg, #153048, #102636) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
}
html[data-theme="dark"] .mini-fact strong { color: #eaf6ff !important; }
html[data-theme="dark"] .mini-fact em { color: var(--text-light) !important; }

html[data-theme="dark"] .pillar-card-v2 {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .pillar-card-v2 h3,
html[data-theme="dark"] .pillar-card-v2 h3 a {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .pillar-card-v2 p { color: var(--text-light) !important; }
html[data-theme="dark"] .pillar-card-v2:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
}

/* Categories bottom CTA */
html[data-theme="dark"] .cats-bottom-cta-inner {
  background:
    radial-gradient(circle at 12% 20%, rgba(60, 160, 200, 0.14), transparent 42%),
    linear-gradient(145deg, #102030, #0d1b28 55%, #122233) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .cats-bottom-cta h2 { color: #eaf6ff !important; }
html[data-theme="dark"] .cats-bottom-cta p { color: var(--text-light) !important; }

/* Articles sidebar cards */
html[data-theme="dark"] .arts-side-card,
html[data-theme="dark"] .arts-side-card--soft {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .arts-side-card h2,
html[data-theme="dark"] .arts-side-card h3 {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .arts-side-lead { color: var(--text-light) !important; }
html[data-theme="dark"] .arts-cat-item {
  background: rgba(30, 52, 70, 0.75) !important;
  color: #d7efff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .arts-cat-item:hover {
  background: rgba(50, 90, 120, 0.55) !important;
  border-color: rgba(140, 190, 220, 0.2) !important;
}
html[data-theme="dark"] .arts-cat-item.is-active {
  background: linear-gradient(135deg, #0d6b97, #0a4d72) !important;
  color: #fff !important;
}

/* Games toolbar + chips */
html[data-theme="dark"] .games-toolbar-panel {
  background: rgba(14, 26, 38, 0.9) !important;
  border-color: rgba(140, 190, 220, 0.16) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}
html[data-theme="dark"] .games-toolbar-note {
  color: var(--text-light) !important;
}
html[data-theme="dark"] .games-filters .chip,
html[data-theme="dark"] .chip {
  background: rgba(30, 52, 70, 0.85) !important;
  color: #9fd6ff !important;
  border-color: rgba(140, 190, 220, 0.18) !important;
}

/* =========================================================
   Dark theme — remaining light surfaces (round 4)
   ========================================================= */

/* FAQ on homepage */
html[data-theme="dark"] .faq-accordion {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .faq-item + .faq-item {
  border-top-color: rgba(140, 190, 220, 0.12) !important;
}
html[data-theme="dark"] .faq-item summary {
  color: var(--text) !important;
}
html[data-theme="dark"] .faq-item summary:hover {
  background: rgba(40, 70, 95, 0.35) !important;
}
html[data-theme="dark"] .faq-item[open] summary {
  background: rgba(40, 70, 95, 0.45) !important;
  color: #eaf6ff !important;
}
html[data-theme="dark"] .faq-icon {
  background: rgba(30, 60, 85, 0.9) !important;
  color: #9fd6ff !important;
}
html[data-theme="dark"] .faq-item[open] .faq-icon {
  background: var(--secondary) !important;
  color: #fff !important;
}
html[data-theme="dark"] .faq-body {
  color: var(--text-light) !important;
}

/* Pagination */
html[data-theme="dark"] .page-btn {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.18) !important;
  color: #9fd6ff !important;
}
html[data-theme="dark"] .page-btn.active,
html[data-theme="dark"] .page-btn:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #083552 !important;
}

/* Category subnav */
html[data-theme="dark"] .cat-subnav {
  background: rgba(10, 20, 30, 0.88) !important;
  border-bottom-color: rgba(140, 190, 220, 0.12) !important;
}
html[data-theme="dark"] .cat-subnav.is-stuck {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .cat-subnav-link {
  color: var(--text-light) !important;
}
html[data-theme="dark"] .cat-subnav-link:hover {
  background: rgba(50, 90, 120, 0.4) !important;
  color: #eaf6ff !important;
}
html[data-theme="dark"] .cat-subnav-link.is-active {
  background: linear-gradient(135deg, #1a6f8f, #1a8a9e) !important;
  color: #fff !important;
}
html[data-theme="dark"] .cat-subnav-progress {
  background: rgba(140, 190, 220, 0.15) !important;
}

/* Category intro + key links */
html[data-theme="dark"] .category-intro-inner {
  background: linear-gradient(145deg, rgba(16, 28, 40, 0.96), rgba(14, 24, 36, 0.94)) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .category-key-links {
  background: rgba(20, 36, 52, 0.55) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
}
html[data-theme="dark"] .category-key-links-title {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .category-key-links li a {
  background: rgba(30, 52, 70, 0.85) !important;
  border-color: rgba(140, 190, 220, 0.12) !important;
  color: #d7efff !important;
}
html[data-theme="dark"] .category-key-links li a:hover {
  background: rgba(50, 90, 120, 0.55) !important;
  border-color: rgba(140, 190, 220, 0.22) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  color: #fff !important;
}

/* Other categories rich cards */
html[data-theme="dark"] .other-cat-rich {
  background: rgba(14, 26, 38, 0.96) !important;
  border-color: rgba(140, 190, 220, 0.14) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .other-cat-rich:hover {
  border-color: rgba(120, 190, 240, 0.28) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .other-cat-rich-count {
  color: var(--text-light) !important;
}
html[data-theme="dark"] .other-cat-rich h3,
html[data-theme="dark"] .other-cat-rich-title {
  color: #eaf6ff !important;
}
html[data-theme="dark"] .other-cat-rich-go {
  color: #7ad7ff !important;
}

html[data-theme="dark"] .game-card-media {
  background: #153048 !important;
}
html[data-theme="dark"] .game-card-tag {
  background: rgba(14, 26, 38, 0.9) !important;
  color: #9fd6ff !important;
}
