@charset "UTF-8";
/**
 * Full Skin — Auto-generated by generate-full-skin.py
 * Primary: #10b981  Accent: #f59e0b
 * Do not edit manually — regenerate via Phase 6 pipeline.
 */

/* ═══ Base Overrides ═══ */

html { scroll-behavior: smooth; }

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

::selection { background: #dbf4ec; color: #085c40; }
::-moz-selection { background: #dbf4ec; color: #085c40; }

*:focus-visible {
  outline: 3px solid #10b981;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f5fcf9; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10b981 0%, #0d9d6d 100%);
  border-radius: 5px; border: 2px solid #f5fcf9;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0d9d6d 0%, #0b815a 100%);
}

/* ═══ Body Background ═══ */
body {
  background: linear-gradient(135deg, #f5fcf9 0%, #f8f9fa 60%, #fefbf5 100%);
  background-attachment: fixed;
}

/* ═══ Typography ═══ */

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #07533a;
  line-height: 1.3;
  font-family: var(--font-heading, system-ui, sans-serif);
}

.page-header .subtitle {
  color: #6b7280;
  font-size: 1.05rem;
  margin-top: 0.4rem;
}

/* ═══ Hero — Archetype: gradient-band ═══ */

.page-header {
  background: linear-gradient(135deg, #eefaf6 0%, #e2f6ef 100%);
  border-bottom: 3px solid #10b981;
  border-radius: 12px 12px 0 0;
  padding: 1.5rem 1.5rem 1rem;
}
.hero {
  background: linear-gradient(135deg, #e2f6ef 0%, #eefaf6 50%, #fef5e6 100%);
  border-bottom: 3px solid #10b981;
  border-radius: 12px 12px 0 0;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem; font-weight: 700; color: #05402d;
  font-family: var(--font-heading); letter-spacing: -0.02em;
}
.hero .subtitle {
  font-size: 1.15rem; color: #6b7280;
  margin-top: 0.5rem; max-width: 600px; margin-left: auto; margin-right: auto;
}
/* Hero stats */
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.stat-item { text-align: center; padding: 0.8rem 1.2rem; background: #ffffff; border: 1px solid #bcebdb; border-radius: 8px; }
.stat-number { display: block; font-size: 1.6rem; font-weight: 700; color: #10b981; font-family: var(--font-heading); }
.stat-label { display: block; font-size: 0.85rem; color: #6b7280; margin-top: 0.15rem; }


/* ═══ Breadcrumb ═══ */
.breadcrumb { padding: 0.6rem 1rem; margin-bottom: 1rem;
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; padding: 0; margin: 0; font-size: 0.875rem; color: #6b7280; }
.breadcrumb a { color: #10b981; text-decoration: none; }
.breadcrumb a:hover { color: #0d9d6d; text-decoration: underline; }
.breadcrumb li:not(:last-child)::after { content: '›'; color: #d1d5db; font-weight: 600; margin-left: 0.3rem; }
.breadcrumb li:last-child { color: var(--site-text, #1f2937); font-weight: 600; }


/* ═══ Set Switcher ═══ */
.set-switcher {
  background: white; border: 1px solid #bcebdb;
  border-radius: 12px; box-shadow: 0 1px 3px rgba(16,185,129,0.06);
}
.set-switcher-label { font-size: 1rem; font-weight: 600; color: var(--site-text, #1f2937); }
.set-btn {
  background: white; border: 2px solid #bcebdb;
  border-radius: 6px; color: var(--site-text, #1f2937);
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 150ms ease;
}
.set-btn:hover { border-color: #10b981; background: #ebf9f4; }
.set-btn.active { background: #10b981; color: white; border-color: #0d9d6d; }

/* ═══ Buttons ═══ */
.btn {
  font-size: 1rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; border-radius: 6px;
  background: white; color: var(--site-text, #1f2937);
  box-shadow: 0 1px 3px rgba(16,185,129,0.06); transition: all 150ms ease;
}
.btn:hover { box-shadow: 0 4px 8px rgba(16,185,129,0.12); transform: translateY(-1px); }
.btn-primary { background: #10b981; color: white; border-color: #0d9d6d; }
.btn-primary:hover { background: #0d9d6d; }
.btn-success, .btn-answers { background: #f59e0b; color: white; border-color: #d08609; }
.btn-success:hover, .btn-answers:hover { background: #d08609; }
.btn-check { background: #f59e0b; color: white; border-color: #d97706; }
.btn-check:hover { background: #d97706; }
.btn:focus-visible { outline: 3px solid #10b981; outline-offset: 3px; }


/* ═══ Intro Section ═══ */
.intro, .intro-section {
  background: linear-gradient(135deg, #eefaf6 0%, #e2f6ef 100%);
  border: 1px solid #bcebdb;
  border-radius: 12px; padding: 1.25rem 1.5rem; margin: 1rem 0;
}
.intro h3, .intro-section h3 { font-weight: 600; color: #07533a; }
.intro p, .intro-section p { color: #4a4a5a; line-height: 1.7; }
.intro strong, .intro-section strong { color: #05402d; }

/* ═══ Body Content / Worksheet ═══ */
.body-content {
  background: white;
  border-radius: 0 0 12px 12px;
  border: 1px solid #bcebdb; border-top: none;
}
.problems-grid { border-top: 2px solid #bcebdb; }
.problem { border-bottom: 1px solid #f3f4f6; font-size: 1.125rem; color: var(--site-text, #1f2937); }

/* ═══ Variant Chip ═══ */
.variant-chip {
  font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 999px;
  color: #0d9d6d; background: #ebf9f4; border: 1px solid #93dfc6;
}


/* ═══ Category Cards — Archetype: gradient-card ═══ */

.section-header { margin: 1.5rem 0 1rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--site-text, #1f2937); font-family: var(--font-heading); }
.section-header p { color: #6b7280; margin-top: 0.25rem; }
.categories-section { padding: 0 0.5rem; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.category-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
  padding: 1.5rem; background: linear-gradient(135deg, #f5fcf9 0%, white 100%);
  border: 1.5px solid #bcebdb; border-radius: 12px;
  box-shadow: 0 2px 6px rgba(16,185,129,0.06); text-decoration: none; color: inherit;
  transition: all 200ms ease;
}
.category-card:hover { background: linear-gradient(135deg, #ebf9f4 0%, #f5fcf9 100%); box-shadow: 0 6px 18px rgba(16,185,129,0.12); transform: translateY(-2px); }
.category-icon { font-size: 2rem; line-height: 1; }
.category-card h3 { font-weight: 700; font-size: 1.1rem; color: #05402d; }
.category-card p { font-size: 0.85rem; color: #6b7280; line-height: 1.4; }
.category-meta { font-size: 0.85rem; font-weight: 600; color: #10b981; margin-top: auto; }

/* ═══ Subcategory Cards — Archetype: left-accent ═══ */
.subcategories-section { margin: 1.5rem 0; }
.difficulty-icon { font-size: 1.3rem; }

.subcategories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.subcategory-card {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1.25rem 1rem; background: white;
  border: 2px solid #bcebdb; border-left: 4px solid #10b981;
  border-radius: 8px; text-decoration: none; color: inherit;
  transition: all 180ms ease;
}
.subcategory-card:hover { border-color: #10b981; box-shadow: 0 4px 12px rgba(16,185,129,0.12); transform: translateY(-1px); }
.subcategory-card h3 { font-weight: 600; color: var(--site-text); }
.subcategory-card p { font-size: 0.85rem; color: #6b7280; }
.subcategory-arrow { font-size: 0.85rem; font-weight: 600; color: #10b981; margin-top: auto; }

/* ═══ Worksheet Grid — Archetype: compact-tile ═══ */
.worksheets-section { margin: 1.5rem 0; }

.worksheets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.worksheet-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 1rem; background: white;
  border: 2px solid #bcebdb; border-radius: 8px;
  text-decoration: none; color: inherit; text-align: center; transition: all 180ms ease;
}
.worksheet-card:hover { border-color: #10b981; background: #f5fcf9; }
.worksheet-number { font-weight: 700; font-size: 1.1rem; color: #10b981; }
.worksheet-problems { font-size: 0.8rem; color: #9ca3af; }

/* ═══ Content Toggle — Archetype: plus-minus ═══ */

.body-content--collapsible {
  margin: 1rem 0; border: 1px solid #bcebdb;
  border-radius: 12px; overflow: hidden;
}
.content-toggle { border: none; }

.content-toggle summary {
  padding: 0.9rem 1.25rem; font-weight: 600; font-size: 0.95rem; color: #07533a;
  cursor: pointer; background: #f5fcf9; border-bottom: 1px solid transparent;
  transition: background 150ms ease; list-style: none;
}
.content-toggle summary::-webkit-details-marker { display: none; }
.content-toggle summary::before {
  content: '+'; display: inline-flex; align-items: center; justify-content: center;
  width: 1.2rem; height: 1.2rem; margin-right: 0.6rem; font-size: 1rem; font-weight: 700;
  color: white; background: #10b981; border-radius: 50%;
  transition: transform 200ms ease;
}
.content-toggle[open] summary::before { content: '−'; background: #f59e0b; }
.content-toggle summary:hover { background: #e2f6ef; }
.content-toggle[open] summary { border-bottom-color: #bcebdb; }
.content-toggle-panel { padding: 1.25rem 1.5rem; }
.content-toggle-panel h2 { font-size: 1.3rem; font-weight: 700; color: #05402d; margin: 1rem 0 0.5rem; }
.content-toggle-panel h3 { font-size: 1.1rem; font-weight: 600; color: #07533a; margin: 0.75rem 0 0.4rem; }
.content-toggle-panel p { line-height: 1.7; color: #374151; margin: 0.4rem 0; }
.content-toggle-panel ul, .content-toggle-panel ol { padding-left: 1.25rem; margin: 0.5rem 0; color: #374151; }
.content-toggle-panel li { margin: 0.3rem 0; line-height: 1.6; }
.content-toggle-panel strong { color: #05402d; }


/* ═══ Score Panel — Archetype: banner-full ═══ */

.score-panel {
  display: none;
  background: linear-gradient(135deg, #ebf9f4 0%, #fef7eb 100%);
  border: none; border-radius: 0; padding: 1.25rem 2rem;
  margin: 1rem -2rem; width: calc(100% + 4rem);
  text-align: center; transition: all 200ms ease;
}
.score-panel.score-visible { display: block; animation: bannerDrop 300ms ease-out; }
@keyframes bannerDrop { from { opacity: 0; max-height: 0; padding: 0 2rem; } to { opacity: 1; max-height: 100px; padding: 1.25rem 2rem; } }
.score-icon { font-size: 2rem; line-height: 1; }
.score-detail { font-size: 1.1rem; font-weight: 600; color: #05402d; }
.score-pct { font-size: 2rem; font-weight: 700; color: #10b981; font-family: var(--font-heading); }

/* ═══ Content Section ═══ */
.content-section { padding: 1.5rem; margin: 1rem 0; }
.content-section h2 { font-family: var(--font-heading); color: #05402d; font-weight: 700; margin-bottom: 0.75rem; }
.content-section h3 { color: #07533a; font-weight: 600; }
.content-section p { line-height: 1.7; color: #374151; }


/* ═══ Interactive Answer Input ═══ */
.answer-input {
  border: 2px solid #bcebdb; border-radius: 6px;
  background: #ffffff; color: var(--site-text, #1f2937);
  font-family: inherit; font-size: 1rem; font-weight: 600;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.answer-input:focus {
  border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

/* Problem states */
.problem.is-correct .answer-input { border-color: #f59e0b; background: #fef9f0; color: #b77608; }
.problem.is-wrong .answer-input { border-color: #ef4444; background: #fef2f2; color: #991b1b; }
.problem.is-empty .answer-input { border-color: #f59e0b; background: #fffbeb; }
.problem.is-correct { border-left-color: #f59e0b !important; }
.problem.is-wrong { border-left-color: #ef4444 !important; }

/* Problem hover */
.problem { transition: transform 180ms ease, box-shadow 180ms ease; }
.problem:hover { transform: translateX(2px); }

/* Problem number badge */
.problem .num {
  background: #ebf9f4; color: #10b981;
  font-weight: 700; font-family: var(--font-heading);
}

/* Answer badge */
.problem .answer {
  background: #fef5e6; color: #b77608;
  font-weight: 700; border-radius: 6px;
}

/* ═══ Score Retry Button ═══ */
.score-retry {
  background: #ebf9f4; color: #10b981;
  border: 2px solid #93dfc6; cursor: pointer;
  transition: all 150ms ease;
}
.score-retry:hover {
  background: #10b981; color: white; border-color: #0d9d6d;
}

/* ═══ Utility Animations ═══ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 300ms ease-out; }
.slide-up { animation: slideUp 300ms ease-out; }


/* ═══ SEO Components — Archetype: left-bar ═══ */
/* hover=scale, grid=2col-auto, palette=monochrome */

.seo-components { margin: 1.5rem 0; }
.seo-components--primary { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.seo-components--secondary { margin-top: 1rem; }
.seo-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }

.seo-block {
  background: #ffffff;
  border: 1px solid #bcebdb;
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 4px rgba(16,185,129,0.06);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.seo-block:hover { transform: scale(1.02); }

/* -- SEO Card -- header-band accent -- */
.seo-card {
  background: var(--site-background, #ffffff);
  border-color: var(--site-border, #e5e7eb);
  border-top: none;
}

.seo-card::before {
  background: var(--site-primary, #3b82f6);
}

.seo-card:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-primary, #3b82f6) 15%, transparent);
}

/* Card band color — 3-color brand rotation */
.seo-card::before { background: var(--site-primary, #10b981); }
.seo-card:nth-child(3n+2)::before { background: var(--site-accent, #f59e0b); }
.seo-card:nth-child(3n+3)::before { background: var(--site-primary-dark, #059669); }



.seo-components--secondary .seo-block { background: #f5fcf9; }
/* Left-bar accent — 3-color brand rotation */
.seo-block { border-left: 3px solid var(--site-primary, #10b981); }
.seo-block:nth-child(3n+2) { border-left: 3px solid var(--site-accent, #f59e0b); }
.seo-block:nth-child(3n+3) { border-left: 3px solid var(--site-primary-dark, #059669); }

/* ── SEO block typography ── */
.seo-block h2 { font-size: 1.15rem; font-weight: 700; color: #05402d; margin: 0 0 0.6rem; font-family: var(--font-heading); }
.seo-block h3 { font-size: 1rem; font-weight: 600; color: #07533a; margin: 0.6rem 0 0.4rem; }
.seo-block h4 { font-size: 0.95rem; font-weight: 600; color: #086546; margin: 0.5rem 0 0.3rem; }
.seo-block p { font-size: 0.92rem; line-height: 1.65; color: #374151; margin: 0.35rem 0; }
.seo-block ul, .seo-block ol { padding-left: 1.2rem; margin: 0.4rem 0; }
.seo-block li { font-size: 0.92rem; line-height: 1.55; color: #374151; margin: 0.25rem 0; }
.seo-block strong { color: #05402d; }
.seo-block a { color: #10b981; text-decoration: none; }
.seo-block a:hover { text-decoration: underline; }

/* ── FAQ details ── */
.seo-block details { border-bottom: 1px solid #c3eddf; padding: 0.5rem 0; }
.seo-block details:last-child { border-bottom: none; }
.seo-block details summary { font-weight: 600; font-size: 0.92rem; cursor: pointer; list-style: none; color: #07533a; }
.seo-block details summary::-webkit-details-marker { display: none; }
.seo-block details summary::before { content: "▸"; margin-right: 0.4rem; color: #10b981; display: inline-block; transition: transform 150ms ease; }
.seo-block details[open] summary::before { transform: rotate(90deg); }
.seo-block details p { padding: 0.3rem 0 0.3rem 1rem; color: #4b5563; font-size: 0.88rem; }


/* ═══ Page Navigation ═══ */
.page-navigation {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem; padding: 1rem; background: white;
  border: 1px solid #bcebdb; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16,185,129,0.06);
}
.btn-nav {
  display: inline-flex; align-items: center; padding: 0.5rem 1rem;
  border-radius: 6px; color: #10b981;
  text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: background 150ms ease;
}
.btn-nav:hover { background: #f5fcf9; }
.btn-nav.disabled { color: #d1d5db; cursor: not-allowed; }


/* ═══ Print Styles ═══ */
/* Removed: all print rules are now consolidated in platform layer:
   - print-base.css (dedicated print route)
   - main.css @media print (browser Ctrl+P path)
   - print-profile-*.css (site-type-specific density) */


/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero .subtitle { max-width: 100%; }
  .hero-stats { gap: 1.2rem; }
  .stat-number { font-size: 1.3rem; }
  .hero::after { display: none; }
  .categories-grid { grid-template-columns: 1fr; }
  .subcategories-grid { grid-template-columns: 1fr; }
  .worksheets-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .seo-components--primary { grid-template-columns: 1fr; }
  .seo-more-grid { grid-template-columns: 1fr; }
  .page-navigation { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .hero { padding: 1.5rem 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { flex-direction: column; gap: 0.8rem; }
  .categories-grid { grid-template-columns: 1fr; }
  .subcategories-grid { grid-template-columns: 1fr; }
}

/* ═══ Phase 1 Interaction — Maze ═══ */

/* Path drawing states */
.maze-path-active { stroke: #10b981; stroke-width: 3; fill: none; }
.maze-path-collision { stroke: #ef4444; stroke-width: 3; stroke-dasharray: 4 2; }
.maze-path-complete { stroke: #10b981; stroke-width: 4; fill: none; }

/* Resume card site adaptation */
.ia-resume-card {
  background: #ebf9f4;
  border: 1px solid #bcebdb;
  border-radius: 8px;
}

/* Print suppression */
@media print {
  .ia-game-controls,
  .ia-streak-badge,
  .ia-btn,
  .ia-resume-card,
  .no-print { display: none !important; }
}


/* ═══════════════════════════════════════════════════════
   PREMIUM ENHANCEMENTS — 005-maze
   Primary: #10b981  Accent: #f59e0b
   ═══════════════════════════════════════════════════════ */

/* ── 1. Hero polish ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 2rem 3rem;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, rgba(16,185,129,0.02) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  letter-spacing: -0.03em;
}

/* ── 2. Card elevation ── */
.category-card {
  border-radius: var(--radius-card, 12px);
  box-shadow: var(--shadow-card);
  position: relative;
}
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  border-radius: 0 0 var(--radius-card, 12px) var(--radius-card, 12px);
  transform: translateX(-50%);
  transition: width 350ms var(--transition-bounce);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.category-card:hover::after {
  width: 60%;
}

.subcategory-card {
  border-radius: var(--radius-card, 12px);
  box-shadow: var(--shadow-card);
  position: relative;
}
.subcategory-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  border-radius: 0 0 var(--radius-card, 12px) var(--radius-card, 12px);
  transform: translateX(-50%);
  transition: width 350ms var(--transition-bounce);
}
.subcategory-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.subcategory-card:hover::after {
  width: 50%;
}

.worksheet-card {
  position: relative;
  border-radius: var(--radius-card, 12px);
}
.worksheet-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  transform: translateX(-50%);
  transition: width 300ms var(--transition-bounce);
}
.worksheet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16,185,129,0.10);
}
.worksheet-card:hover::after {
  width: 80%;
}

/* ── 3. Button premium ── */
.btn {
  border-radius: var(--radius-btn, 8px);
  transition: all 180ms ease, transform 180ms var(--transition-bounce);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,0.18);
}
.btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(16,185,129,0.10);
}
.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(16,185,129,0.30);
}
.btn-success:hover, .btn-answers:hover {
  box-shadow: 0 4px 14px rgba(245,158,11,0.25);
}

/* ── 4. Stat badges ── */
.stat-item {
  background: linear-gradient(135deg, #ffffff 0%, #f5fcf9 100%);
  border: 1px solid rgba(16,185,129,0.18);
  transition: all 200ms ease, transform 200ms var(--transition-bounce);
}
.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.30);
}

/* ── 5. Entrance animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-card,
.subcategory-card,
.worksheet-card,
.seo-block {
  animation: fadeInUp 500ms ease-out both;
}
.category-card:nth-child(1), .subcategory-card:nth-child(1) { animation-delay: 0ms; }
.category-card:nth-child(2), .subcategory-card:nth-child(2) { animation-delay: 60ms; }
.category-card:nth-child(3), .subcategory-card:nth-child(3) { animation-delay: 120ms; }
.category-card:nth-child(4), .subcategory-card:nth-child(4) { animation-delay: 180ms; }
.category-card:nth-child(5), .subcategory-card:nth-child(5) { animation-delay: 240ms; }
.category-card:nth-child(6), .subcategory-card:nth-child(6) { animation-delay: 300ms; }
.category-card:nth-child(7), .subcategory-card:nth-child(7) { animation-delay: 360ms; }
.category-card:nth-child(8), .subcategory-card:nth-child(8) { animation-delay: 420ms; }

/* ── 6. Section dividers ── */
.section-header h2 {
  position: relative;
  padding-bottom: 0.75rem;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  border-radius: 2px;
}

/* ── 7. Selection & scrollbar (refinements) ── */
::selection { background: rgba(16,185,129,0.15); color: #085c40; }
::-moz-selection { background: rgba(16,185,129,0.15); color: #085c40; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10b981 0%, #0d9d6d 100%);
  border-radius: 6px;
  border: 2px solid #f5fcf9;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0d9d6d 0%, #047857 100%);
}

/* ── 8. Button gradient & min-height ── */
.btn {
  min-height: 44px;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #0d9d6d 100%);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0d9d6d 0%, #047857 100%);
}
.btn-success, .btn-answers {
  background: linear-gradient(135deg, #f59e0b 0%, #d08609 100%);
}
.btn-success:hover, .btn-answers:hover {
  background: linear-gradient(135deg, #d08609 0%, #b45309 100%);
}

/* ── 9. Stat badge color-mix gradients ── */
.stat-item {
  background: color-mix(in srgb, var(--site-primary) 6%, white);
}

/* ── 10. Premium transitions ── */
.category-card,
.subcategory-card,
.worksheet-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.seo-block {
  transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1), transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.answer-input {
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 11. Focus-visible refinement ── */
*:focus-visible {
  outline: 2px solid var(--site-primary, #10b981);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 12. Dark mode ── */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #0f1a17 0%, #111c1a 60%, #1a1a0f 100%);
    background-attachment: fixed;
    color: #e5e7eb;
  }
  .hero {
    background: linear-gradient(135deg, #0f2922 0%, #152e27 50%, #1f2a15 100%);
    border-bottom-color: #10b981;
  }
  .hero::before {
    background: radial-gradient(circle, rgba(16,185,129,0.14) 0%, rgba(16,185,129,0.04) 50%, transparent 70%);
  }
  .hero h1 { color: #f9fafb; }
  .hero .subtitle { color: #d1d5db; }
  .page-header {
    background: #0f2922;
    border-bottom-color: rgba(16,185,129,0.4);
  }
  .page-header h1 { color: #f9fafb; }
  .page-header .subtitle { color: #d1d5db; }
  .category-card,
  .subcategory-card,
  .worksheet-card,
  .seo-block {
    background: #111c1a;
    border-color: rgba(16,185,129,0.2);
    color: #e5e7eb;
  }
  .category-card:hover,
  .subcategory-card:hover,
  .worksheet-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  }
  .category-card h3,
  .subcategory-card h3,
  .worksheet-card h3 { color: #f3f4f6; }
  .category-card p,
  .subcategory-card p { color: #9ca3af; }
  .stat-item {
    background: #111c1a;
    border-color: rgba(16,185,129,0.25);
  }
  .stat-label { color: #9ca3af; }
  .breadcrumb {
  }
  .breadcrumb ol { color: #9ca3af; }
  .set-switcher {
    background: #111c1a;
    border-color: rgba(16,185,129,0.2);
  }
  .set-btn {
    background: #111c1a;
    border-color: rgba(16,185,129,0.2);
    color: #e5e7eb;
  }
  .set-btn:hover {
    background: rgba(16,185,129,0.1);
    border-color: #10b981;
  }
  .intro, .intro-section {
    background: linear-gradient(135deg, #111c1a 0%, #0f2922 100%);
    border-color: rgba(16,185,129,0.2);
  }
  .intro h3, .intro-section h3 { color: #f3f4f6; }
  .intro p, .intro-section p { color: #d1d5db; }
  .body-content {
    background: #0f1a17;
    border-color: rgba(16,185,129,0.2);
  }
  .problem { border-bottom-color: rgba(16,185,129,0.1); color: #e5e7eb; }
  .problem .num { background: rgba(16,185,129,0.15); }
  .answer-input {
    background: #0f1a17;
    border-color: rgba(16,185,129,0.2);
    color: #e5e7eb;
  }
  .content-toggle summary {
    background: #111c1a;
    color: #f3f4f6;
  }
  .content-toggle summary:hover { background: #0f2922; }
  .content-toggle summary::before { color: #f9fafb; }
  .content-toggle-panel { color: #d1d5db; }
  .content-toggle-panel h2 { color: #f9fafb; }
  .content-toggle-panel h3 { color: #f3f4f6; }
  .content-toggle-panel p { color: #d1d5db; }
  .seo-block h2 { color: #f9fafb; }
  .seo-block h3 { color: #f3f4f6; }
  .seo-block p, .seo-block li { color: #d1d5db; }
  .seo-block strong { color: #f3f4f6; }
  .seo-block details summary { color: #f3f4f6; }
  .seo-block details p { color: #d1d5db; }
  .seo-components--secondary .seo-block { background: #0f1a17; }
  .score-panel {
    background: #111c1a;
    border-color: rgba(16,185,129,0.2);
  }
  .page-navigation {
    background: #111c1a;
    border-color: rgba(16,185,129,0.2);
  }
  .section-header h2 { color: #f3f4f6; }
  .section-header p { color: #9ca3af; }
  .content-section h2 { color: #f9fafb; }
  .content-section h3 { color: #f3f4f6; }
  .content-section p { color: #d1d5db; }
  .variant-chip {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.3);
    color: #34d399;
  }
  .body-content--collapsible {
    border-color: rgba(16,185,129,0.2);
  }
  .score-retry {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.3);
  }
  .worksheet-number { color: #34d399; }
  .worksheet-problems { color: #6b7280; }
  .category-meta { color: #34d399; }
  .subcategory-arrow { color: #34d399; }
  /* Maze-specific dark mode */
  .maze-path-active { stroke: #34d399; }
  .maze-path-complete { stroke: #34d399; }
  .ia-resume-card {
    background: #111c1a;
    border-color: rgba(16,185,129,0.2);
  }
  ::selection { background: rgba(16,185,129,0.25); color: #a7f3d0; }
  ::-moz-selection { background: rgba(16,185,129,0.25); color: #a7f3d0; }
  ::-webkit-scrollbar-track { background: #0f1a17; }
  ::-webkit-scrollbar-thumb { border-color: #0f1a17; }
}

/* ── 13. Print optimization ── */
@media print {
  body { background: white !important; }
  .hero::before { display: none !important; }
  .category-card::after,
  .subcategory-card::after,
  .worksheet-card::after { display: none !important; }
  .category-card,
  .subcategory-card,
  .worksheet-card,
  .seo-block {
    animation: none !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .page-navigation { display: none !important; }
  .score-panel { box-shadow: none !important; border: 1px solid #d1d5db !important; }
}
