@charset "UTF-8";
/**
 * Full Skin — Site 017: Free Mathdoku
 * Primary: #06b6d4 (vivid cyan)   Accent: #fb7185 (coral rose)
 * Theme: Vibrant cyan + warm coral — energetic, fun math puzzle energy
 * Rebrand: 2026-03-12
 */

/* ═══ 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: #cffafe; color: #164e63; }
::-moz-selection { background: #cffafe; color: #164e63; }

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

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #06b6d4;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: #0891b2; }

/* ═══ Body Background ═══ */
body {
  background: linear-gradient(160deg, #ecfeff 0%, #ffffff 50%, #fff1f2 100%);
  background-attachment: fixed;
}

/* ═══ Typography ═══ */

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #164e63;
  line-height: 1.3;
  font-family: var(--font-heading, 'Poppins', system-ui, sans-serif);
  letter-spacing: -0.02em;
}

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

/* ═══ Hero ═══ */

.page-header {
  background: #ffffff;
  border-bottom: 3px solid #a5f3fc;
  padding: 1.5rem 1.5rem 1rem;
}

.hero {
  background: #ffffff;
  border-bottom: 3px solid #06b6d4;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--gradient-hero-blob,   radial-gradient(ellipse 600px 400px at 80% 20%, rgba(6,182,212,0.08) 0%, transparent 70%)),
    var(--gradient-accent-blob, radial-gradient(ellipse 400px 300px at 10% 90%, rgba(251,113,133,0.06) 0%, transparent 65%));
  pointer-events: none;
  z-index: 0;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #164e63;
  font-family: var(--font-heading, 'Poppins', system-ui, sans-serif);
  letter-spacing: -0.025em;
  position: relative;
  z-index: 1;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: #1e3a45;
  margin-top: 0.75rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 0.8rem 1.2rem;
  background: var(--gradient-stat, linear-gradient(135deg, #06b6d4, #164e63));
  border: none;
  border-radius: 14px;
  color: white;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(6,182,212,0.28);
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-heading);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  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: #64748b;
}

.breadcrumb a { color: #06b6d4; text-decoration: none; }
.breadcrumb a:hover { color: #0891b2; text-decoration: underline; }
.breadcrumb li:not(:last-child)::after { content: '›'; color: #a5f3fc; font-weight: 600; margin-left: 0.3rem; }
.breadcrumb li:last-child { color: #0c1a1f; font-weight: 600; }


/* ═══ Set Switcher ═══ */
.set-switcher {
  background: white;
  border: 1px solid #a5f3fc;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(6,182,212,0.07);
}

.set-switcher-label { font-size: 1rem; font-weight: 600; color: #0c1a1f; }

.set-btn {
  background: white;
  border: 2px solid #a5f3fc;
  border-radius: 10px;
  color: #0c1a1f;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 0.5rem 1rem;
  position: relative;
  transition: background var(--dur-fast) ease,
              color var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}

.set-btn:hover {
  border-color: #06b6d4;
  background: #ecfeff;
  transform: translateY(-1px);
}

.set-btn.active {
  background: #06b6d4;
  color: white;
  border-color: #0891b2;
  box-shadow: 0 2px 8px rgba(6,182,212,0.30);
}


/* ═══ Buttons ═══ */
.btn {
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  background: white;
  color: #0c1a1f;
  box-shadow: 0 1px 3px rgba(6,182,212,0.07);
  transition: background 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 200ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 200ms ease;
}

.btn:hover {
  box-shadow: var(--shadow-btn-brand, 0 4px 14px rgba(6,182,212,0.30));
  transform: translateY(-2px);
}

.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  background: #06b6d4;
  color: white;
  border-color: #0891b2;
}

.btn-primary:hover {
  background: #0891b2;
  box-shadow: 0 6px 20px rgba(6,182,212,0.35);
}

.btn-success, .btn-answers {
  background: #059669;
  color: white;
  border-color: #047857;
}

.btn-success:hover, .btn-answers:hover { background: #047857; }

.btn-check {
  background: #fb7185;
  color: white;
  border-color: #f43f5e;
}

.btn-check:hover { background: #f43f5e; }

.btn:focus-visible {
  outline: 3px solid #06b6d4;
  outline-offset: 3px;
}


/* ═══ Intro Section ═══ */
.intro, .intro-section {
  background: linear-gradient(135deg, #ecfeff 0%, #f0fdfe 100%);
  border: 1px solid #a5f3fc;
  border-left: 4px solid #06b6d4;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.intro h3, .intro-section h3 { font-weight: 600; color: #164e63; }
.intro p, .intro-section p { color: #0c1a1f; line-height: 1.7; }
.intro strong, .intro-section strong { color: #0891b2; }


/* ═══ Body Content / Worksheet ═══ */
.body-content {
  background: white;
  border-radius: 0 0 16px 16px;
  border: 1px solid #a5f3fc;
  border-top: none;
}

.problems-grid { border-top: 2px solid #cffafe; }

.problem {
  border-bottom: 1px solid #f0fdfe;
  font-size: 1.125rem;
  color: #0c1a1f;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.problem:hover { transform: translateX(2px); }


/* ═══ Variant Chip ═══ */
.variant-chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  color: #0891b2;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
}


/* ═══ Category Cards ═══ */

.section-header { margin: 1.5rem 0 1rem; }

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0c1a1f;
  font-family: var(--font-heading);
  position: relative;
  padding-bottom: 0.6rem;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #fb7185);
  border-radius: 2px;
  margin-top: 0.5rem;
  transition: width 300ms ease;
}

.section-header:hover h2::after { width: 5rem; }

.section-header p { color: #64748b; margin-top: 0.25rem; }
.categories-section { padding: 0 0.5rem; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.category-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1.5px solid #a5f3fc;
  border-left: 4px solid #06b6d4;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(6,182,212,0.07);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 200ms cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 200ms ease;
}

.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #fb7185);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover { border-left-color: #fb7185; }
.category-card:hover::after { transform: scaleX(1); }

.category-card:hover {
  box-shadow: var(--shadow-card-hover, 0 12px 28px rgba(6,182,212,0.18), 0 4px 10px rgba(6,182,212,0.10));
  transform: translateY(-4px);
}

.category-card:focus-within {
  outline: 3px solid rgba(6,182,212,0.40);
  outline-offset: 2px;
}

.category-card:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 1px 3px rgba(6,182,212,0.10);
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: #ecfeff;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: background 200ms ease, transform 200ms ease;
}

.category-card:hover .category-icon {
  background: #cffafe;
  transform: scale(1.05);
}

.category-card h3 { font-weight: 600; font-size: 1.05rem; color: #0c1a1f; margin: 0 0 0.25rem; }
.category-card p { font-size: 0.85rem; color: #64748b; line-height: 1.4; margin: 0; }
.category-meta { font-size: 0.85rem; font-weight: 600; color: #06b6d4; margin-top: 0.5rem; }


/* ═══ Subcategory Cards ═══ */
.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: 1.5px solid #a5f3fc;
  border-top: 3px solid #06b6d4;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 180ms ease;
}

.subcategory-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #fb7185);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.subcategory-card:hover { border-top-color: #fb7185; }
.subcategory-card:hover::after { transform: scaleX(1); }
.subcategory-card:hover {
  box-shadow: 0 4px 14px rgba(6,182,212,0.14);
  transform: translateY(-4px);
}

.subcategory-card h3 { font-weight: 600; color: #0c1a1f; }
.subcategory-card p { font-size: 0.85rem; color: #64748b; }

.subcategory-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #06b6d4;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: auto;
  transition: gap 200ms ease;
}

.subcategory-card:hover .subcategory-arrow { gap: 0.5rem; }


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

.worksheets-grid { display: flex; flex-direction: column; gap: 0.5rem; }

.worksheet-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 1px solid #a5f3fc;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 180ms ease,
              transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.worksheet-card:hover {
  background: #f0fdfe;
  border-color: #06b6d4;
  transform: translateY(-1px);
}

.worksheet-number {
  background: #ecfeff;
  color: #06b6d4;
  font-weight: 700;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 150ms ease, transform 150ms ease;
  flex-shrink: 0;
}

.worksheet-card:hover .worksheet-number {
  background: #06b6d4;
  color: white;
  transform: scale(1.08);
}

.worksheet-card h3 { font-size: 0.9rem; margin: 0; flex: 1; }
.worksheet-problems { font-size: 0.8rem; color: #64748b; }


/* ═══ Content Toggle ═══ */

.body-content--collapsible {
  margin: 1rem 0;
  border: 1px solid #a5f3fc;
  border-radius: 16px;
  overflow: hidden;
}

.content-toggle { border: none; }

.content-toggle summary {
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #164e63;
  cursor: pointer;
  background: #f0fdfe;
  border-bottom: 1px solid transparent;
  transition: background 150ms ease;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.content-toggle summary::-webkit-details-marker { display: none; }

.content-toggle summary::after {
  content: '⌄';
  font-size: 1.2rem;
  font-weight: 700;
  color: #06b6d4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #ecfeff;
  border-radius: 50%;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.content-toggle[open] summary::after { transform: rotate(180deg); }
.content-toggle summary:hover { background: #ecfeff; }
.content-toggle[open] summary { border-bottom-color: #a5f3fc; }
.content-toggle-panel { padding: 1.25rem 1.5rem; }

.content-toggle-panel h2 { font-size: 1.3rem; font-weight: 700; color: #164e63; margin: 1rem 0 0.5rem; }
.content-toggle-panel h3 { font-size: 1.1rem; font-weight: 600; color: #0891b2; margin: 0.75rem 0 0.4rem; }
.content-toggle-panel p { line-height: 1.7; color: #1e3a45; margin: 0.4rem 0; }
.content-toggle-panel ul, .content-toggle-panel ol { padding-left: 1.25rem; margin: 0.5rem 0; color: #1e3a45; }
.content-toggle-panel li { margin: 0.3rem 0; line-height: 1.6; }
.content-toggle-panel strong { color: #164e63; }


/* ═══ Score Panel ═══ */

.score-panel {
  display: none;
  background: white;
  border: 1px solid #a5f3fc;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  transition: opacity 200ms ease, transform 200ms ease;
}

.score-panel.score-visible { display: block; animation: scoreSlide 300ms ease-out; }

@keyframes scoreSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.score-inner { position: relative; }

.score-inner::after {
  content: "";
  display: block;
  height: 6px;
  margin-top: 0.75rem;
  background: #cffafe;
  border-radius: 3px;
  overflow: hidden;
}

.score-icon { font-size: 1.5rem; line-height: 1; }
.score-detail { font-size: 1rem; font-weight: 600; color: #0c1a1f; }
.score-pct { font-size: 1.6rem; font-weight: 700; color: #06b6d4; font-family: var(--font-heading); }


/* ═══ Content Section ═══ */
.content-section { padding: 1.5rem; margin: 1rem 0; }
.content-section h2 { font-family: var(--font-heading); color: #164e63; font-weight: 700; margin-bottom: 0.75rem; }
.content-section h3 { color: #0891b2; font-weight: 600; }
.content-section p { line-height: 1.7; color: #1e3a45; }


/* ═══ Interactive Answer Input ═══ */
.answer-input {
  border: 2px solid #a5f3fc;
  border-radius: 10px;
  background: #ffffff;
  color: #0c1a1f;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.answer-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

/* Problem states */
.problem.is-correct .answer-input { border-color: #059669; background: #f0f8f6; color: #03704e; }
.problem.is-wrong .answer-input   { border-color: #ef4444; background: #fef2f2; color: #991b1b; }
.problem.is-empty .answer-input   { border-color: #fb7185; background: #fff1f2; }

.problem.is-correct {
  background: color-mix(in srgb, #059669 4%, white);
  border-left: 3px solid #059669;
}
.problem.is-wrong {
  background: color-mix(in srgb, #ef4444 4%, white);
  border-left: 3px solid #ef4444;
}
.problem.is-empty {
  background: color-mix(in srgb, #fb7185 4%, white);
  border-left: 3px solid #fb7185;
}

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

/* Answer badge */
.problem .answer {
  background: #f0fdf4;
  color: #03704e;
  font-weight: 700;
  border-radius: 10px;
}


/* ═══ Score Retry Button ═══ */
.score-retry {
  background: #ecfeff;
  color: #06b6d4;
  border: 2px solid #a5f3fc;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.score-retry:hover {
  background: #06b6d4;
  color: white;
  border-color: #0891b2;
}


/* ═══ Utility Animations ═══ */
@keyframes fadeIn   { from { opacity: 0; }                         to { opacity: 1; } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.fade-in  { animation: fadeIn  300ms ease-out; }
.slide-up { animation: slideUp 300ms ease-out; }

/* Staggered card entrance */
.category-card,
.subcategory-card,
.seo-block {
  animation: fadeInUp 500ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.category-card:nth-child(1), .subcategory-card:nth-child(1), .seo-block:nth-child(1) { animation-delay: 0ms; }
.category-card:nth-child(2), .subcategory-card:nth-child(2), .seo-block:nth-child(2) { animation-delay: 60ms; }
.category-card:nth-child(3), .subcategory-card:nth-child(3), .seo-block:nth-child(3) { animation-delay: 120ms; }
.category-card:nth-child(4), .subcategory-card:nth-child(4), .seo-block:nth-child(4) { animation-delay: 180ms; }
.category-card:nth-child(5), .subcategory-card:nth-child(5), .seo-block:nth-child(5) { animation-delay: 240ms; }
.category-card:nth-child(6), .subcategory-card:nth-child(6), .seo-block:nth-child(6) { animation-delay: 300ms; }


/* ═══ SEO Components ═══ */

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

.seo-block {
  background: #ffffff;
  border: 1px solid #a5f3fc;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 4px rgba(6,182,212,0.07);
  transition: box-shadow 250ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seo-block:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(6,182,212,0.14);
}

/* SEO card header band */
.seo-card {
  background: #ffffff;
  border-color: #a5f3fc;
  border-top: none;
}

.seo-card::before        { background: #06b6d4; }
.seo-card:hover          { box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }

/* Card band color per SEO type */
.seo-card.features::before      { background: #06b6d4; }
.seo-card.benefits::before      { background: #fb7185; }
.seo-card.faq::before           { background: #164e63; }
.seo-card.tips::before          { background: #fb7185; }
.seo-card.steps::before         { background: #0891b2; }
.seo-card.tutorial::before      { background: #06b6d4; }
.seo-card.examples::before      { background: #0e7490; }
.seo-card.use-cases::before     { background: #f43f5e; }
.seo-card.common-mistakes::before { background: #ef4444; }
.seo-card.practice::before      { background: #fb7185; }
.seo-card.requirements::before  { background: #0891b2; }
.seo-card.resources::before     { background: #0e7490; }
.seo-card.next-steps::before    { background: #06b6d4; }
.seo-card.summary::before       { background: #64748b; }
.seo-card.related::before       { background: #0891b2; }

.seo-components--secondary .seo-block { background: #f0fdfe; }

.seo-block.tutorial        { border-left: 3px solid #06b6d4; }
.seo-block.examples        { border-left: 3px solid #0891b2; }
.seo-block.use-cases       { border-left: 3px solid #f43f5e; }
.seo-block.common-mistakes { border-left: 3px solid #ef4444; }
.seo-block.practice        { border-left: 3px solid #fb7185; }
.seo-block.requirements    { border-left: 3px solid #0891b2; }
.seo-block.resources       { border-left: 3px solid #0e7490; }
.seo-block.next-steps      { border-left: 3px solid #06b6d4; }
.seo-block.summary         { border-left: 3px solid #64748b; }
.seo-block.related         { border-left: 3px solid #0891b2; }

/* SEO block typography */
.seo-block h2 { font-size: 1.15rem; font-weight: 700; color: #164e63; margin: 0 0 0.6rem; font-family: var(--font-heading); }
.seo-block h3 { font-size: 1rem; font-weight: 600; color: #0891b2; margin: 0.6rem 0 0.4rem; }
.seo-block h4 { font-size: 0.95rem; font-weight: 600; color: #06b6d4; margin: 0.5rem 0 0.3rem; }
.seo-block p  { font-size: 0.92rem; line-height: 1.65; color: #1e3a45; 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: #1e3a45; margin: 0.25rem 0; }
.seo-block strong { color: #164e63; }
.seo-block a  { color: #06b6d4; text-decoration: none; }
.seo-block a:hover { text-decoration: underline; }

/* FAQ details */
.seo-block details { border-bottom: 1px solid #cffafe; 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: #0891b2; }
.seo-block details summary::-webkit-details-marker { display: none; }
.seo-block details summary::before { content: "▸"; margin-right: 0.4rem; color: #06b6d4; 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: #475569; 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 #a5f3fc;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(6,182,212,0.07);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  color: #06b6d4;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 150ms ease;
}

.btn-nav:hover { background: #ecfeff; }
.btn-nav.disabled { color: #a5f3fc; cursor: not-allowed; }


/* ═══ Print — delegated to platform layer ═══ */
/* All print rules live in platform/shared/assets/shared/main.css @media print. */


/* ═══ 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; }
  .categories-grid { grid-template-columns: 1fr; }
  .subcategories-grid { grid-template-columns: 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; }
}


/* ═══ Dark Mode ═══ */
@media (prefers-color-scheme: dark) {
  :root {
    --site-background:     #011020;
    --site-surface:        #021a2e;
    --site-text:           #e0f7fa;
    --site-text-primary:   #e0f7fa;
    --site-text-secondary: #b2ebf2;
    --site-text-muted:     #67e8f9;
    --site-border:         #0c3a52;
    --shadow-sm:           0 1px 3px rgba(0,0,0,0.35);
    --shadow-md:           0 4px 8px rgba(0,0,0,0.40);
    --shadow-lg:           0 10px 20px rgba(0,0,0,0.45);
    --shadow-card-hover:   0 12px 28px rgba(6,182,212,0.25), 0 4px 10px rgba(0,0,0,0.30);
  }

  body { background: #011020; color: #e0f7fa; }

  .hero { background: linear-gradient(135deg, #021a2e 0%, #052e45 100%); border-bottom-color: #06b6d4; }
  .hero::before { opacity: 0.4; }
  .hero h1 { color: #e0f7fa; }
  .hero .subtitle { color: #b2ebf2; }

  .page-header { background: #021a2e; border-bottom-color: #0c3a52; }
  .page-header h1 { color: #e0f7fa; }
  .page-header .subtitle { color: #67e8f9; }

  .breadcrumb { }
  .breadcrumb ol { color: #67e8f9; }
  .breadcrumb li:last-child { color: #e0f7fa; }

  .set-switcher { background: #021a2e; border-color: #0c3a52; }
  .set-switcher-label { color: #e0f7fa; }
  .set-btn { background: #021a2e; border-color: #0c3a52; color: #e0f7fa; }
  .set-btn:hover { background: #052e45; border-color: #06b6d4; }

  .btn { background: #021a2e; color: #e0f7fa; border-color: #0c3a52; }
  .btn:hover { background: #052e45; }

  .category-card { background: #021a2e; border-color: #0c3a52; border-left-color: #06b6d4; }
  .category-card:hover { background: #052e45; }
  .category-card h3 { color: #e0f7fa; }
  .category-card p { color: #67e8f9; }
  .category-icon { background: #0c3a52; }
  .category-card:hover .category-icon { background: #164e63; }

  .subcategory-card { background: #021a2e; border-color: #0c3a52; border-top-color: #06b6d4; }
  .subcategory-card:hover { background: #052e45; }
  .subcategory-card h3 { color: #e0f7fa; }
  .subcategory-card p { color: #67e8f9; }

  .worksheet-card { background: #021a2e; border-color: #0c3a52; }
  .worksheet-card:hover { background: #052e45; }
  .worksheet-card h3 { color: #e0f7fa; }
  .worksheet-number { background: #0c3a52; color: #06b6d4; }

  .intro, .intro-section { background: #021a2e; border-color: #0c3a52; }
  .intro h3, .intro-section h3 { color: #b2ebf2; }
  .intro p, .intro-section p { color: #67e8f9; }

  .body-content { background: #021a2e; border-color: #0c3a52; }
  .problem { border-bottom-color: #0c3a52; color: #e0f7fa; }
  .problem .num { background: #052e45; color: #67e8f9; }

  .answer-input { background: #011020; border-color: #0c3a52; color: #e0f7fa; }
  .answer-input:focus { border-color: #06b6d4; box-shadow: 0 0 0 3px rgba(6,182,212,0.20); }

  .score-panel { background: #021a2e; border-color: #0c3a52; }
  .score-detail { color: #e0f7fa; }
  .score-pct { color: #06b6d4; }
  .score-retry { background: #052e45; color: #67e8f9; border-color: #0c3a52; }
  .score-retry:hover { background: #06b6d4; color: white; }

  .content-toggle summary { background: #021a2e; color: #b2ebf2; }
  .content-toggle summary:hover { background: #052e45; }
  .content-toggle summary::after { background: #052e45; color: #06b6d4; }
  .content-toggle[open] summary { border-bottom-color: #0c3a52; }
  .content-toggle-panel h2 { color: #e0f7fa; }
  .content-toggle-panel h3 { color: #b2ebf2; }
  .content-toggle-panel p  { color: #67e8f9; }
  .content-toggle-panel strong { color: #e0f7fa; }
  .body-content--collapsible { border-color: #0c3a52; }

  .section-header h2 { color: #e0f7fa; }
  .section-header p  { color: #67e8f9; }

  .content-section h2 { color: #e0f7fa; }
  .content-section h3 { color: #b2ebf2; }
  .content-section p  { color: #67e8f9; }

  .seo-block { background: #021a2e; border-color: #0c3a52; }
  .seo-block:hover { box-shadow: 0 4px 16px rgba(6,182,212,0.20); }
  .seo-block h2 { color: #e0f7fa; }
  .seo-block h3 { color: #b2ebf2; }
  .seo-block h4 { color: #67e8f9; }
  .seo-block p  { color: #67e8f9; }
  .seo-block li { color: #67e8f9; }
  .seo-block strong { color: #e0f7fa; }
  .seo-block details { border-bottom-color: #0c3a52; }
  .seo-block details summary { color: #b2ebf2; }
  .seo-block details p { color: #67e8f9; }
  .seo-components--secondary .seo-block { background: #010f1a; }
  .seo-card { background: #021a2e; border-color: #0c3a52; }

  .page-navigation { background: #021a2e; border-color: #0c3a52; }
  .btn-nav { color: #b2ebf2; }
  .btn-nav:hover { background: #052e45; }
  .btn-nav.disabled { color: #0c3a52; }

  .variant-chip { background: #052e45; color: #67e8f9; border-color: #0c3a52; }

  .stat-item { box-shadow: 0 4px 12px rgba(0,0,0,0.35); }

  ::selection { background: #164e63; color: #e0f7fa; }
  ::-moz-selection { background: #164e63; color: #e0f7fa; }
}


/* ═══ Print ═══ */
@media print {
  body { background: white !important; color: #000 !important; }

  .hero {
    background: none !important;
    border-bottom: 2px solid #333 !important;
    padding: 1rem !important;
  }

  .hero::before, .hero::after { display: none !important; }
  .hero h1 { color: #000 !important; font-size: 1.6rem !important; }
  .hero .subtitle { color: #333 !important; }

  .stat-item {
    background: #f5f5f5 !important;
    color: #000 !important;
    border: 1pt solid #ccc !important;
    box-shadow: none !important;
  }

  .stat-number { color: #000 !important; }
  .stat-label  { color: #555 !important; }

  .category-card, .subcategory-card, .worksheet-card, .seo-block {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1pt solid #ccc !important;
    animation: none !important;
    transform: none !important;
  }

  .category-card::after, .subcategory-card::after { display: none !important; }

  .btn, .set-switcher, .page-navigation, .score-retry { display: none !important; }

  .content-toggle[open] summary::after { display: none !important; }

  .breadcrumb { padding: 0 !important; }

  ::-webkit-scrollbar { display: none !important; }

  @page { margin: 1.5cm; }
}


/* ═══ Focus-visible ring enhancement ═══ */
*:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 3px;
  border-radius: var(--radius-sm, 4px);
  transition: outline-offset 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
