@charset "UTF-8";
/**
 * Full Skin — 020-musictheory
 * Primary: #9333ea (electric purple)  Accent: #ec4899 (hot pink)
 * Hero archetype: white canvas with purple-pink gradient backdrop
 * Card archetype: white, purple border, lift-on-hover with glow
 * Personality: Creative / Passionate / Harmonious
 * Font: Playfair Display headings — musical, expressive, premium
 */

/* ═══════════════════════════════════════════════
   1. Base Overrides
   ═══════════════════════════════════════════════ */

html { scroll-behavior: smooth; }

/* ═══════════════════════════════════════════════
   2. Reduced Motion (mandatory accessibility rule)
   ═══════════════════════════════════════════════ */

@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;
  }
}

/* ═══════════════════════════════════════════════
   3. Text Selection
   ═══════════════════════════════════════════════ */

::selection      { background: #e9d5ff; color: #3b0764; }
::-moz-selection { background: #e9d5ff; color: #3b0764; }

/* ═══════════════════════════════════════════════
   4. Focus — WCAG 2.1 AA visible ring
   ═══════════════════════════════════════════════ */

*:focus-visible {
  outline: 2.5px solid #9333ea;
  outline-offset: 3px;
  border-radius: var(--radius-sm, 6px);
}

/* ═══════════════════════════════════════════════
   5. Scrollbar — thin purple brand thumb
   ═══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9333ea 0%, #7e22ce 100%);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7e22ce 0%, #581c87 100%);
}

/* ═══════════════════════════════════════════════
   6. Body Background — music energy gradient
   ═══════════════════════════════════════════════ */

body {
  background: linear-gradient(160deg, #faf5ff 0%, #ffffff 40%, #fff0f6 100%);
  background-attachment: fixed;
  color: var(--site-text, #1a0533);
  font-family: var(--font-body, system-ui, sans-serif);
}

/* ═══════════════════════════════════════════════
   7. Typography — Playfair Display headings
   ═══════════════════════════════════════════════ */

h1, h2, h3 {
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #3b0764;
  line-height: 1.25;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.page-header .subtitle {
  color: #6b21a8;
  font-size: 1.05rem;
  margin-top: 0.4rem;
  font-family: var(--font-body, system-ui, sans-serif);
}

/* ═══════════════════════════════════════════════
   8. Page Header (list / detail top bar)
   ═══════════════════════════════════════════════ */

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

/* ═══════════════════════════════════════════════
   9. Hero — pure white canvas, gradient backdrop
   ═══════════════════════════════════════════════ */

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

/* Dual radial gradient overlay: purple upper-right, pink lower-left */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 85% 15%, rgba(147,51,234,0.09) 0%, transparent 65%),
    radial-gradient(ellipse 400px 350px at 15% 85%, rgba(236,72,153,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle staff-line texture: horizontal rule marks */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 18px,
      rgba(147,51,234,0.04) 18px,
      rgba(147,51,234,0.04) 19px
    );
  pointer-events: none;
  z-index: 0;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #581c87;
  position: relative;
  z-index: 1;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: #6b21a8;
  margin-top: 0.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  font-family: var(--font-body, system-ui, sans-serif);
}

/* Hero entry animation */
.hero {
  animation: heroFadeIn 600ms var(--ease-out, cubic-bezier(0,0,0.2,1)) both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.stat-item {
  text-align: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 60%, #581c87 100%);
  border-radius: 14px;
  transition:
    transform 300ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)),
    box-shadow 300ms ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(147,51,234,0.30);
}

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

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  margin-top: 0.15rem;
}

/* Hero CTA buttons */
.hero .btn-primary,
.hero-actions .btn-primary {
  padding: 0.75rem 2.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(147,51,234,0.32);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.hero .btn-primary:hover,
.hero-actions .btn-primary:hover {
  background: linear-gradient(135deg, #ec4899 0%, #9333ea 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(147,51,234,0.40);
}

/* ═══════════════════════════════════════════════
   10. 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: #9333ea; text-decoration: none; }
.breadcrumb a:hover { color: #7e22ce; text-decoration: underline; }

.breadcrumb li:not(:last-child)::after {
  content: '›';
  color: #d8b4fe;
  font-weight: 600;
  margin-left: 0.3rem;
}

.breadcrumb li:last-child { color: #1a0533; font-weight: 600; }

/* ═══════════════════════════════════════════════
   11. Set Switcher
   ═══════════════════════════════════════════════ */

.set-switcher {
  background: white;
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(147,51,234,0.07));
}

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

.set-btn {
  background: white;
  border: 2px solid #e9d5ff;
  border-radius: 12px;
  color: #1a0533;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 0.5rem 1rem;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.set-btn:hover { border-color: #9333ea; background: #faf5ff; }
.set-btn.active { background: #9333ea; color: white; border-color: #7e22ce; }

/* ═══════════════════════════════════════════════
   12. Buttons
   ═══════════════════════════════════════════════ */

.btn {
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-button, 12px);
  background: white;
  color: #1a0533;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(147,51,234,0.07));
  transition:
    background 200ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)),
    box-shadow 200ms ease,
    transform  200ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)),
    border-color 200ms ease,
    color 150ms ease;
}

.btn:hover {
  box-shadow: var(--shadow-btn-brand, 0 4px 16px rgba(147,51,234,0.30));
  transform: translateY(-2px);
}

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

/* Primary — electric purple, gradient hover to pink */
.btn-primary {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: white;
  border-color: #7e22ce;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ec4899 0%, #9333ea 100%);
  border-color: #db2777;
  box-shadow: 0 6px 20px rgba(147,51,234,0.35);
}

/* Success / Answers */
.btn-success,
.btn-answers {
  background: #22c55e;
  color: white;
  border-color: #16a34a;
}

.btn-success:hover,
.btn-answers:hover { background: #16a34a; border-color: #15803d; }

/* Check — hot pink */
.btn-check { background: #ec4899; color: white; border-color: #db2777; }
.btn-check:hover { background: #db2777; border-color: #9d174d; }

/* Outline */
.btn-outline {
  background: transparent;
  color: #9333ea;
  border-color: #9333ea;
}

.btn-outline:hover { background: #faf5ff; border-color: #7e22ce; color: #7e22ce; }

.btn:focus-visible { outline: 2.5px solid #9333ea; outline-offset: 3px; }

/* ═══════════════════════════════════════════════
   13. Intro / Intro Section
   ═══════════════════════════════════════════════ */

.intro,
.intro-section {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.intro h3,
.intro-section h3 {
  font-weight: 700;
  color: #3b0764;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.intro p,
.intro-section p { color: #374151; line-height: 1.7; }

.intro strong,
.intro-section strong { color: #581c87; }

/* ═══════════════════════════════════════════════
   14. Body Content / Worksheet
   ═══════════════════════════════════════════════ */

.body-content {
  background: white;
  border-radius: 0 0 16px 16px;
  border: 1px solid #e9d5ff;
  border-top: none;
}

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

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

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

/* Note badge / variant chip — pink accent */
.variant-chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  color: #9d174d;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  border: 1px solid #fbcfe8;
}

/* ═══════════════════════════════════════════════
   15. Category Cards — white, purple border, lift + glow
   ═══════════════════════════════════════════════ */

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

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a0533;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

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

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

.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(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 #e9d5ff;
  border-left: 4px solid #9333ea;
  border-radius: var(--radius-card, 16px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(147,51,234,0.07));
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition:
    border-left-color 180ms ease,
    box-shadow 250ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)),
    transform  250ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1));
}

/* Bottom accent line — slides in on hover */
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms var(--ease-default, cubic-bezier(0.4,0,0.2,1));
}

.category-card:hover {
  border-left-color: #ec4899;
  box-shadow: var(--shadow-card-hover, 0 12px 32px rgba(147,51,234,0.16));
  transform: translateY(-4px);
}

.category-card:hover::after { transform: scaleX(1); }

.category-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 250ms ease;
}

.category-card:hover .category-icon { transform: scale(1.12); }

.category-card h3 {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a0533;
  margin: 0 0 0.25rem;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.category-card p {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

.category-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9333ea;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════
   16. 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 #e9d5ff;
  border-top: 3px solid #9333ea;
  border-radius: var(--radius-card, 16px);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition:
    border-top-color 180ms ease,
    box-shadow 250ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)),
    transform  250ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1));
}

/* Bottom accent line */
.subcategory-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms var(--ease-default, cubic-bezier(0.4,0,0.2,1));
}

.subcategory-card:hover {
  border-top-color: #ec4899;
  box-shadow: 0 8px 20px rgba(147,51,234,0.14);
  transform: translateY(-4px);
}

.subcategory-card:hover::after { transform: scaleX(1); }

.subcategory-card h3 {
  font-weight: 700;
  color: #1a0533;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.subcategory-card p  { font-size: 0.85rem; color: #6b7280; }

.subcategory-arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9333ea;
  margin-top: auto;
}

/* ═══════════════════════════════════════════════
   17. 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 #e9d5ff;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition:
    background 180ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)),
    border-color 150ms ease,
    transform   180ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1));
}

.worksheet-card:hover {
  background: #faf5ff;
  border-color: #c4b5fd;
  transform: translateX(4px);
}

.worksheet-number { font-weight: 700; font-size: 1rem; color: #9333ea; min-width: 60px; }
.worksheet-card h3 { font-size: 0.9rem; margin: 0; flex: 1; }
.worksheet-problems { font-size: 0.8rem; color: #9ca3af; }

/* ═══════════════════════════════════════════════
   18. Content Toggle / Collapsible SEO section
   ═══════════════════════════════════════════════ */

.body-content--collapsible {
  margin: 1rem 0;
  border: 1px solid #e9d5ff;
  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: #3b0764;
  cursor: pointer;
  background: #faf5ff;
  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: #9333ea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #f3e8ff;
  border-radius: 50%;
  transition: transform 200ms ease;
}

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

.content-toggle-panel h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #3b0764;
  margin: 1rem 0 0.5rem;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.content-toggle-panel h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #581c87;
  margin: 0.75rem 0 0.4rem;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.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: #3b0764; }

/* ═══════════════════════════════════════════════
   19. Score Panel
   ═══════════════════════════════════════════════ */

.score-panel {
  display: none;
  background: white;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius-card, 16px);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.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: #e9d5ff;
  border-radius: 3px;
  overflow: hidden;
}

.score-icon   { font-size: 1.5rem; line-height: 1; }
.score-detail { font-size: 1rem; font-weight: 600; color: #1a0533; }
.score-pct {
  font-size: 1.6rem;
  font-weight: 700;
  color: #9333ea;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.score-retry {
  background: #f3e8ff;
  color: #9333ea;
  border: 2px solid #d8b4fe;
  border-radius: 12px;
  cursor: pointer;
  min-height: 44px;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.score-retry:hover {
  background: #9333ea;
  color: white;
  border-color: #7e22ce;
}

/* ═══════════════════════════════════════════════
   20. Content Section (SEO long-form content)
   ═══════════════════════════════════════════════ */

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

.content-section h2 {
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
  color: #3b0764;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.content-section h3 {
  color: #581c87;
  font-weight: 600;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.content-section p { line-height: 1.7; color: #374151; }

/* ═══════════════════════════════════════════════
   21. Answer Input + Problem States
   ═══════════════════════════════════════════════ */

.answer-input {
  border: 2px solid #e9d5ff;
  border-radius: 10px;
  background: #ffffff;
  color: #1a0533;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.answer-input:focus {
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147,51,234,0.14);
}

/* Problem states */
.problem.is-correct .answer-input {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #15803d;
}

.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: #22c55e !important; }
.problem.is-wrong   { border-left-color: #ef4444 !important; }

/* Correct note highlight — green with musical bounce */
.problem.is-correct {
  animation: noteCorrect 400ms var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1));
}

@keyframes noteCorrect {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.025); }
  100% { transform: scale(1); }
}

/* Problem number badge */
.problem .num {
  background: #f3e8ff;
  color: #9333ea;
  font-weight: 700;
}

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

/* Note badge chip — pink accent */
.note-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

/* ═══════════════════════════════════════════════
   22. SEO Components — 2-color (purple + pink)
   ═══════════════════════════════════════════════ */

.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 #e9d5ff;
  border-radius: var(--radius-card, 16px);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(147,51,234,0.07));
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.seo-block:hover {
  box-shadow: var(--shadow-card-hover, 0 12px 32px rgba(147,51,234,0.16));
  transform: scale(1.015);
}

/* seo-card: header-band via ::before — 2-color: purple + pink */
.seo-card {
  background: #ffffff;
  border-color: #e9d5ff;
  border-top: none;
}

/* Alternating bands: odd = purple, even = pink */
.seo-card::before { background: #9333ea; }

.seo-card:hover { box-shadow: 0 0 0 3px rgba(147,51,234,0.15); }

.seo-card.features::before        { background: #9333ea; }
.seo-card.benefits::before        { background: #ec4899; }
.seo-card.faq::before             { background: #9333ea; }
.seo-card.tips::before            { background: #ec4899; }
.seo-card.steps::before           { background: #9333ea; }
.seo-card.tutorial::before        { background: #ec4899; }
.seo-card.examples::before        { background: #9333ea; }
.seo-card.use-cases::before       { background: #ec4899; }
.seo-card.common-mistakes::before { background: #9333ea; }
.seo-card.practice::before        { background: #ec4899; }
.seo-card.requirements::before    { background: #9333ea; }
.seo-card.resources::before       { background: #ec4899; }
.seo-card.next-steps::before      { background: #9333ea; }
.seo-card.summary::before         { background: #ec4899; }
.seo-card.related::before         { background: #9333ea; }

/* Secondary seo-block left-bar — alternating purple + pink */
.seo-components--secondary .seo-block { background: #faf5ff; }

.seo-block.tutorial      { border-left: 3px solid #9333ea; }
.seo-block.examples      { border-left: 3px solid #ec4899; }
.seo-block.use-cases     { border-left: 3px solid #9333ea; }
.seo-block.common-mistakes { border-left: 3px solid #ec4899; }
.seo-block.practice      { border-left: 3px solid #9333ea; }
.seo-block.requirements  { border-left: 3px solid #ec4899; }
.seo-block.resources     { border-left: 3px solid #9333ea; }
.seo-block.next-steps    { border-left: 3px solid #ec4899; }
.seo-block.summary       { border-left: 3px solid #9333ea; }
.seo-block.related       { border-left: 3px solid #ec4899; }

/* SEO block typography */
.seo-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #3b0764;
  margin: 0 0 0.6rem;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.seo-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #581c87;
  margin: 0.6rem 0 0.4rem;
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.seo-block h4 { font-size: 0.95rem; font-weight: 600; color: #6b21a8; 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: #3b0764; }
.seo-block a      { color: #9333ea; text-decoration: none; }
.seo-block a:hover { text-decoration: underline; color: #7e22ce; }

/* FAQ details */
.seo-block details { border-bottom: 1px solid #f3e8ff; 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: #581c87;
}

.seo-block details summary::-webkit-details-marker { display: none; }

.seo-block details summary::before {
  content: "▸";
  margin-right: 0.4rem;
  color: #9333ea;
  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; }

/* ═══════════════════════════════════════════════
   23. 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 #e9d5ff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(147,51,234,0.07));
}

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

.btn-nav:hover { background: #faf5ff; color: #7e22ce; }
.btn-nav.disabled { color: #d1d5db; cursor: not-allowed; }

/* ═══════════════════════════════════════════════
   24. Music-Specific Elements
   ═══════════════════════════════════════════════ */

/* Staff lines use purple brand token */
.staff-line { stroke: var(--site-staff-line, #9333ea); }
.note-head  { fill: var(--site-note, #1a0533); }

/* Piano keys */
.piano-key-black { background: #1e1b4b !important; }
.piano-key-white { background: #ffffff !important; border: 1px solid #e9d5ff !important; }

/* ═══════════════════════════════════════════════
   25. Staggered Card Entrance Animations
   ═══════════════════════════════════════════════ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.category-card,
.subcategory-card,
.seo-block {
  animation: fadeInUp 500ms var(--ease-default, 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; }

/* Utility animation classes */
@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; }

/* ═══════════════════════════════════════════════
   26. Responsive — 768px
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hero                     { padding: 2.5rem 1.25rem 2rem; }
  .hero h1                  { font-size: 1.85rem; }
  .hero .subtitle           { max-width: 100%; }
  .hero-stats               { gap: 1rem; }
  .stat-number              { font-size: 1.3rem; }
  .hero::after              { display: none; }

  .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; }
}

/* ═══════════════════════════════════════════════
   27. Responsive — 480px
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {
  .hero           { padding: 1.75rem 1rem 1.5rem; }
  .hero h1        { font-size: 1.6rem; }
  .hero-stats     { flex-direction: column; gap: 0.75rem; }
  .stat-item      { width: 100%; }

  .categories-grid    { grid-template-columns: 1fr; }
  .subcategories-grid { grid-template-columns: 1fr; }
  .worksheet-card     { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════
   28. Dark Mode — deep #0d0014 musical dark
   ═══════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  :root {
    --site-background:  #0d0014;
    --site-surface:     #1a0533;
    --site-text:        #f3e8ff;
    --site-text-secondary: #d8b4fe;
    --site-text-muted:  #c084fc;
    --site-border:      #3b1560;
    --site-border-dark: #4c1d95;
    --site-bg-alt:      #160026;
    --shadow-sm:        0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:        0 4px 8px rgba(0,0,0,0.45);
    --shadow-card-hover: 0 12px 32px rgba(147,51,234,0.35), 0 4px 12px rgba(0,0,0,0.30);
  }

  body { background: #0d0014; color: #f3e8ff; }

  .hero {
    background: linear-gradient(145deg, #1a0533 0%, #2e0052 50%, #3b0070 100%);
    border-bottom-color: #4c1d95;
  }

  .hero::before {
    background:
      radial-gradient(ellipse 700px 500px at 85% 15%, rgba(147,51,234,0.18) 0%, transparent 65%),
      radial-gradient(ellipse 400px 350px at 15% 85%, rgba(236,72,153,0.12) 0%, transparent 60%);
  }

  .hero h1 { color: #f3e8ff; }
  .hero .subtitle { color: #d8b4fe; }

  .page-header { background: #1a0533; border-bottom-color: #3b1560; }
  .page-header h1 { color: #f3e8ff; }
  .page-header .subtitle { color: #d8b4fe; }

  .breadcrumb { }
  .breadcrumb ol { color: #c084fc; }
  .breadcrumb li:last-child { color: #f3e8ff; }

  .set-switcher { background: #1a0533; border-color: #3b1560; }
  .set-switcher-label { color: #f3e8ff; }
  .set-btn { background: #1a0533; border-color: #3b1560; color: #f3e8ff; }
  .set-btn:hover { background: #2e0052; border-color: #9333ea; }

  .btn { background: #1a0533; color: #f3e8ff; border-color: #3b1560; }
  .btn:hover { background: #2e0052; }

  .category-card { background: #1a0533; border-color: #3b1560; border-left-color: #9333ea; }
  .category-card:hover { background: #2e0052; }
  .category-card h3 { color: #f3e8ff; }
  .category-card p { color: #c084fc; }

  .subcategory-card { background: #1a0533; border-color: #3b1560; border-top-color: #9333ea; }
  .subcategory-card:hover { background: #2e0052; }
  .subcategory-card h3 { color: #f3e8ff; }
  .subcategory-card p { color: #c084fc; }

  .worksheet-card { background: #1a0533; border-color: #3b1560; }
  .worksheet-card:hover { background: #2e0052; }
  .worksheet-card h3 { color: #f3e8ff; }

  .intro, .intro-section { background: #1a0533; border-color: #3b1560; }
  .intro h3, .intro-section h3 { color: #d8b4fe; }
  .intro p, .intro-section p { color: #c084fc; }

  .body-content { background: #1a0533; border-color: #3b1560; }
  .problem { border-bottom-color: #3b1560; color: #f3e8ff; }
  .problem .num { background: #2e0052; color: #d8b4fe; }

  .answer-input { background: #0d0014; border-color: #3b1560; color: #f3e8ff; }
  .answer-input:focus { border-color: #9333ea; box-shadow: 0 0 0 3px rgba(147,51,234,0.28); }

  .score-panel { background: #1a0533; border-color: #3b1560; }
  .score-detail { color: #f3e8ff; }
  .score-retry { background: #2e0052; color: #d8b4fe; border-color: #3b1560; }
  .score-retry:hover { background: #9333ea; color: white; }

  .content-toggle summary { background: #1a0533; color: #d8b4fe; }
  .content-toggle summary:hover { background: #2e0052; }
  .content-toggle summary::after { background: #2e0052; }
  .content-toggle[open] summary { border-bottom-color: #3b1560; }
  .content-toggle-panel h2 { color: #f3e8ff; }
  .content-toggle-panel h3 { color: #d8b4fe; }
  .content-toggle-panel p { color: #c084fc; }
  .content-toggle-panel strong { color: #f3e8ff; }
  .body-content--collapsible { border-color: #3b1560; }

  .section-header h2 { color: #f3e8ff; }
  .section-header p { color: #c084fc; }

  .content-section h2 { color: #f3e8ff; }
  .content-section h3 { color: #d8b4fe; }
  .content-section p { color: #c084fc; }

  .seo-block { background: #1a0533; border-color: #3b1560; }
  .seo-block:hover { box-shadow: 0 4px 20px rgba(147,51,234,0.25); }
  .seo-block h2 { color: #f3e8ff; }
  .seo-block h3 { color: #d8b4fe; }
  .seo-block h4 { color: #c084fc; }
  .seo-block p  { color: #c084fc; }
  .seo-block li { color: #c084fc; }
  .seo-block strong { color: #f3e8ff; }
  .seo-block details { border-bottom-color: #3b1560; }
  .seo-block details summary { color: #d8b4fe; }
  .seo-block details p { color: #c084fc; }
  .seo-components--secondary .seo-block { background: #14002a; }
  .seo-card { background: #1a0533; border-color: #3b1560; }

  .page-navigation { background: #1a0533; border-color: #3b1560; }
  .btn-nav { color: #d8b4fe; }
  .btn-nav:hover { background: #2e0052; }
  .btn-nav.disabled { color: #4b1d7a; }

  .variant-chip { background: #2e0052; color: #d8b4fe; border-color: #4c1d95; }

  .staff-line { stroke: #c084fc; }
  .note-head  { fill: #f3e8ff; }

  .stat-item {
    background: linear-gradient(135deg, rgba(147,51,234,0.35) 0%, rgba(126,34,206,0.25) 100%);
    border: 1px solid rgba(147,51,234,0.45);
  }

  ::selection      { background: #4c1d95; color: #f3e8ff; }
  ::-moz-selection { background: #4c1d95; color: #f3e8ff; }
}

/* ═══════════════════════════════════════════════
   29. Print — clean, no chrome, no shadows
   ═══════════════════════════════════════════════ */

@media print {
  body {
    background: white !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

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

  .hero::before,
  .hero::after { display: none !important; }

  .hero h1 {
    color: #000 !important;
    font-size: 17pt !important;
    background: none !important;
    -webkit-text-fill-color: #000 !important;
    letter-spacing: 0 !important;
  }

  .hero .subtitle { color: #333 !important; font-size: 11pt !important; }

  .stat-item {
    background: #f5f5f5 !important;
    color: #000 !important;
    border: 1pt solid #ccc !important;
    border-radius: 0 !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;
    border-radius: 0 !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: 15mm 12mm 12mm 12mm; }
}
