/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #8B4642;
  color: #f5e6d3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; cursor: pointer; }

button { cursor: pointer; font-family: inherit; border: none; background: none; }

img { max-width: 100%; }

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.mt-6  { margin-top: 1.5rem; }
.mt-8  { margin-top: 2rem; }
.mt-4  { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-12 { margin-bottom: 3rem; }
.full-w { width: 100%; }

.text-center { text-align: center; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.15; color: #f5e6d3; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.2; color: #f5e6d3; }
h3 { font-size: 1.25rem; line-height: 1.3; color: #f5e6d3; }
p  { line-height: 1.6; }

.section-title { color: #f5e6d3; margin-bottom: 2.5rem; }
.section-title.left { text-align: left; }

.body-text       { color: #f5e6d3cc; font-size: 1.05rem; line-height: 1.7; }
.body-text.center{ text-align: center; }
.body-text.dark  { color: #333; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: #2a2a2a;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #9ca3af;
  font-size: 0.95rem;
  transition: color .2s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: #fff; }

.btn-signup {
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: .45rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  transition: background .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-signup:hover { background: rgba(255,255,255,.25); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  display: block;
  transition: .3s;
}

/* =============================================
   PAGES
   ============================================= */
#app { flex: 1; }

.page { display: none; }
.page.active { display: block; }

/* =============================================
   SECTIONS
   ============================================= */
.dark-section {
  background: #6b3831;
  padding: 4rem 0;
}

.light-section {
  background: #8B4642;
  padding: 4rem 0;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #8B4642;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
}
.hero-bg-pattern svg { width: 100%; height: 100%; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: #f5e6d3;
  margin-bottom: 1.4rem;
  line-height: 1.15;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(245,230,211,.9);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-block;
  background: #c17a3a;
  color: #fff;
  padding: .75rem 2.2rem;
  border-radius: 9999px;
  font-size: 1rem;
  transition: background .2s, transform .15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary:hover { background: #d68b4a; transform: translateY(-1px); }
.btn-primary.btn-large { padding: 1rem 3rem; font-size: 1.1rem; }

.btn-outline {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #f5e6d3;
  padding: .75rem 2.2rem;
  border-radius: 9999px;
  font-size: 1rem;
  border: 2px solid rgba(245,230,211,.3);
  transition: background .2s;
  cursor: pointer;
}
.btn-outline:hover { background: rgba(255,255,255,.25); }

.btn-secondary {
  display: inline-block;
  background: #9ca3af;
  color: #fff;
  padding: .75rem 2rem;
  border-radius: 9999px;
  font-size: 1rem;
  transition: background .2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-secondary:hover { background: #6b7280; }

.btn-ghost {
  background: rgba(255,255,255,.55);
  color: #333;
  padding: .75rem 2rem;
  border-radius: .5rem;
  font-size: 1rem;
  transition: background .2s;
  border: none;
  font-family: inherit;
}
.btn-ghost:hover { background: #fff; }

/* =============================================
   LEARNING STEPS
   ============================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
}

.step {
  text-align: center;
}

.step-icon {
  width: 4rem; height: 4rem;
  background: #c17a3a;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  color: #fff;
}
.step-icon svg { width: 1.8rem; height: 1.8rem; }

.step h3 { color: #f5e6d3; margin-bottom: .4rem; }
.step p  { color: rgba(245,230,211,.8); font-size: .9rem; }

/* =============================================
   TWO COLUMN FEATURE
   ============================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.path-card {
  background: rgba(107,56,49,.5);
  border-radius: .75rem;
  padding: 2rem;
}

.path-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.path-step:last-child { margin-bottom: 0; }

.path-num {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: #c17a3a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.path-step h4 { color: #f5e6d3; margin-bottom: .15rem; }
.path-step p  { color: rgba(245,230,211,.7); font-size: .85rem; }

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */
.page-hero { padding: 3.5rem 0; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .6rem; }
.page-hero p  { color: rgba(245,230,211,.9); font-size: 1.1rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(245,230,211,.75);
  font-size: .9rem;
  margin-bottom: .75rem;
  transition: color .2s;
  cursor: pointer;
}
.back-link:hover { color: #f5e6d3; }

/* =============================================
   FLOW BANNER
   ============================================= */
.flow-banner {
  background: rgba(139,70,66,.45);
  padding: 1.2rem 0;
  font-size: .9rem;
  color: rgba(245,230,211,.85);
}
.flow-banner strong { color: #f5e6d3; }

/* =============================================
   COURSES GRID
   ============================================= */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem;
}

.course-card {
  background: #d9c4b0;
  border-radius: .75rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.35); }

.course-card-top {
  padding: 1.4rem 1.5rem;
  color: #fff;
}
.course-card-top h3 { font-size: 1.25rem; margin-top: .5rem; }

.badge {
  display: inline-block;
  background: rgba(255,255,255,.25);
  padding: .15rem .6rem;
  border-radius: 9999px;
  font-size: .75rem;
}
.badge-mid { background: rgba(255,200,100,.35); }
.badge-adv { background: rgba(255,100,100,.3); }

.course-card-body { padding: 1.2rem 1.5rem; }
.course-card-body p { color: #555; font-size: .95rem; margin-bottom: 1rem; min-height: 56px; }

.course-info {
  display: flex;
  gap: 1.2rem;
  color: #666;
  font-size: .85rem;
  margin-bottom: .8rem;
}

.course-link {
  color: #c17a3a;
  font-size: .9rem;
  font-weight: 500;
  border-top: 1px solid #ccc;
  padding-top: .7rem;
  margin-top: .2rem;
  transition: text-decoration .2s;
}
.course-card:hover .course-link { text-decoration: underline; }

/* =============================================
   PRACTICE PAGE
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: #d9c4b0;
  border-radius: .75rem;
  padding: 1.5rem;
  color: #333;
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}
.stat-icon { font-size: 1.4rem; }
.stat-card h3 { font-size: 1.1rem; color: #333; }

.stat-num {
  font-size: 3rem;
  font-weight: 700;
  color: #c17a3a;
  line-height: 1;
  margin-bottom: .4rem;
}
.stat-sub { font-size: 1.4rem; color: #888; font-weight: 400; }

.stat-card p { color: #666; font-size: .9rem; }

.progress-bar-wrap {
  width: 100%;
  height: .6rem;
  background: #ccc;
  border-radius: 9999px;
  overflow: hidden;
  margin: .6rem 0;
}
.progress-bar {
  height: 100%;
  background: #c17a3a;
  border-radius: 9999px;
  transition: width .5s ease;
}

.practice-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.col-title {
  font-size: 1.4rem;
  color: #f5e6d3;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-panel {
  background: #d9c4b0;
  border-radius: .75rem;
  padding: 1.5rem;
  color: #333;
}

.practice-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,.5);
  border-radius: .5rem;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.practice-item:last-child { margin-bottom: 0; }

.char-badge {
  width: 3rem; height: 3rem;
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}
.char-badge.green  { background: #22c55e; }
.char-badge.orange { background: #f97316; }

.practice-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.practice-info strong { color: #222; font-size: .95rem; }
.practice-info span   { color: #666; font-size: .8rem; }

.status-done     { color: #16a34a; font-size: 1.2rem; }
.status-in-progress { color: #ea580c; font-size: .8rem; font-weight: 600; }

.community-post {
  background: rgba(255,255,255,.5);
  border-radius: .5rem;
  padding: 1rem;
  margin-bottom: .75rem;
}
.community-post:last-of-type { margin-bottom: 1rem; }

.post-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.avatar {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: #c17a3a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.post-header strong { display: block; color: #222; font-size: .9rem; }
.post-header small  { color: #666; font-size: .78rem; }

.char-display {
  background: #fff;
  border: 2px solid #ccc;
  border-radius: .5rem;
  width: 8rem; height: 8rem;
  margin: 0 auto .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 4.5rem;
}

.post-actions {
  display: flex;
  gap: 1rem;
}
.like-btn {
  background: none;
  border: none;
  color: #666;
  font-size: .85rem;
  cursor: pointer;
  transition: color .2s;
  font-family: inherit;
}
.like-btn:hover { color: #c17a3a; }

.achievements-title {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.achievement {
  text-align: center;
  background: rgba(255,255,255,.5);
  border-radius: .5rem;
  padding: 1rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.achievement.locked { opacity: .5; }
.ach-emoji { font-size: 2.2rem; }
.achievement strong { color: #222; font-size: .85rem; }
.achievement small  { color: #666; font-size: .75rem; }

/* =============================================
   RESOURCES PAGE
   ============================================= */
.search-wrap {
  position: relative;
  max-width: 640px;
  margin-bottom: 2.5rem;
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem; height: 1.1rem;
  color: #888;
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.8rem;
  background: #d9c4b0;
  border: none;
  border-radius: .6rem;
  font-size: 1rem;
  color: #333;
  font-family: inherit;
  outline: none;
  transition: box-shadow .2s;
}
.search-wrap input::placeholder { color: #888; }
.search-wrap input:focus { box-shadow: 0 0 0 3px rgba(193,122,58,.4); }

.resources-list { }

.resource-category { margin-bottom: 3rem; }
.resource-category h2 {
  color: #f5e6d3;
  font-size: 1.7rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.resources-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.resource-item {
  background: #d9c4b0;
  border-radius: .6rem;
  padding: 1.3rem;
  transition: box-shadow .2s;
}
.resource-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.resource-item h3 { font-size: 1rem; color: #222; margin-bottom: .6rem; }
.resource-item p  { font-size: .82rem; color: #555; margin-bottom: .25rem; }
.resource-item p span { font-weight: 600; color: #333; }
.resource-item .btn-primary { margin-top: .8rem; padding: .5rem 1rem; font-size: .85rem; border-radius: .4rem; }

.ext-ref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.5);
  border-radius: .5rem;
  padding: 1rem;
  margin-bottom: .75rem;
  color: #333;
  transition: background .2s;
}
.ext-ref:hover { background: rgba(255,255,255,.75); }
.ext-ref div { display: flex; flex-direction: column; gap: .2rem; }
.ext-ref strong { font-size: .95rem; color: #222; }
.ext-ref span   { font-size: .82rem; color: #666; }
.ext-ref svg    { color: #888; flex-shrink: 0; margin-left: 1rem; transition: color .2s; }
.ext-ref:hover svg { color: #c17a3a; }

.note-banner {
  background: rgba(107,56,49,.4);
  border-radius: .6rem;
  padding: 1.2rem 1.5rem;
  color: rgba(245,230,211,.85);
  text-align: center;
  font-size: .95rem;
  margin-top: 2rem;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: rgba(245,230,211,.7);
  font-size: 1.1rem;
}

/* =============================================
   COURSE / LESSON PAGE
   ============================================= */
.course-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.lesson-sidebar .card-panel { position: sticky; top: 5rem; }

.lesson-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }

.lesson-btn {
  width: 100%;
  text-align: left;
  padding: .65rem .9rem;
  border-radius: .4rem;
  font-size: .85rem;
  font-weight: 500;
  background: rgba(255,255,255,.5);
  color: #333;
  transition: background .2s;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.lesson-btn:hover:not(:disabled) { background: rgba(255,255,255,.75); }
.lesson-btn.active   { background: #c17a3a; color: #fff; }
.lesson-btn.completed { color: #15803d; }
.lesson-btn.locked   { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }

.progress-info { border-top: 1px solid #bbb; padding-top: 1rem; }
.progress-info p { font-size: .85rem; color: #555; margin-bottom: .5rem; }

.lesson-num  { color: #888; font-size: .9rem; margin-bottom: .2rem; }
.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}
.lesson-title { font-size: 1.6rem; color: #c17a3a; margin-bottom: 0; }

.technique-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.technique-steps li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.step-num {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: #c17a3a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  font-size: .9rem;
}
.technique-steps p { color: #444; padding-top: .2rem; }

.practice-chars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.practice-char-box {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  border: 2px dashed #bbb;
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
}
.practice-char-box span {
  font-size: 4rem;
  color: #aaa;
  position: relative;
  z-index: 2;
}
.char-grid-lines {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =============================================
   ONBOARDING PAGES
   ============================================= */
.onboarding-page {
  position: relative;
  min-height: calc(100vh - 140px);
  display: none;
  align-items: center;
  justify-content: center;
  background: #8B4642;
}
.onboarding-page.active { display: flex; flex-direction: column; }

.onboarding-center {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.ob-welcome-title {
  text-align: center;
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  color: #f5e6d3;
  line-height: 1.45;
}

.ob-card {
  background: #d9c4b0;
  border-radius: .75rem;
  padding: 2.5rem 2rem;
  width: 100%;
  color: #333;
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
}

.ob-progress-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ob-progress-bar {
  flex: 1;
  height: .45rem;
  background: #c8b8a0;
  border-radius: 9999px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: #c17a3a;
  border-radius: 9999px;
  transition: width .4s ease;
}
.ob-progress-wrap span { font-size: .8rem; color: #777; white-space: nowrap; }

.ob-card h2 { font-size: 2rem; color: #333; margin-bottom: 1rem; }

.ob-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .75rem .9rem;
  border-radius: .4rem;
  cursor: pointer;
  color: #333;
  font-size: .95rem;
  line-height: 1.5;
  transition: background .2s;
}
.radio-option:hover { background: rgba(255,255,255,.4); }
.radio-option input[type="radio"] {
  margin-top: .15rem;
  accent-color: #c17a3a;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

.ob-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.ob-nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 680px;
  padding: 0 1.5rem;
}
.ob-nav a {
  font-size: .85rem;
  color: rgba(245,230,211,.75);
  transition: color .2s;
  cursor: pointer;
}
.ob-nav a:hover { color: #f5e6d3; }

/* Q5 visual options */
.q5-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.q5-btn {
  aspect-ratio: 1;
  background: transparent;
  border: 3px solid transparent;
  border-radius: .6rem;
  padding: 0;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-family: inherit;
  overflow: hidden;
}

/* Image fills the button area, the red border is already part of the image */
.q5-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: .35rem;
  flex: 1;
  min-height: 0;
}

/* Selection indicator row below the image */
.q5-btn .q5-radio {
  flex-shrink: 0;
  margin-bottom: .4rem;
}

/* Selected state — green glow outline */
.q5-btn.active {
  border-color: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .45);
  background: rgba(74, 222, 128, .08);
}

.q5-btn:not(.active):hover {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .1);
}

.q5-radio {
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  border: 2px solid #555;
  margin-top: auto;
  flex-shrink: 0;
}
.q5-radio.filled { background: #4ade80; border-color: #4ade80; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #2a2a2a;
  color: #9ca3af;
  padding: 1.2rem 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-help {
  color: #9ca3af;
  font-size: .85rem;
  transition: color .2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.footer-help:hover { color: #fff; }

.footer-controls {
  display: flex;
  gap: 1.5rem;
}
.footer-controls button {
  color: #9ca3af;
  font-size: .82rem;
  transition: color .2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.footer-controls button:hover { color: #fff; }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  border-top: 1px solid #3f3f3f;
  padding-top: .9rem;
}
.footer-nav a {
  color: #9ca3af;
  font-size: .8rem;
  transition: color .2s;
  cursor: pointer;
  letter-spacing: .05em;
}
.footer-nav a:hover { color: #fff; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fadeUp .7s ease both;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease calc(var(--delay, 0s)), transform .6s ease calc(var(--delay, 0s));
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .two-col          { grid-template-columns: 1fr; }
  .practice-cols    { grid-template-columns: 1fr; }
  .course-layout    { grid-template-columns: 1fr; }
  .lesson-sidebar .card-panel { position: static; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav { display: none; flex-direction: column; gap: 0; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #2a2a2a;
    padding: 1rem 1.5rem;
    border-top: 1px solid #3f3f3f;
  }
  .main-nav.open .nav-link { padding: .6rem 0; border-bottom: 1px solid #3f3f3f; font-size: 1rem; }
  .main-nav.open .nav-link:last-child { border-bottom: none; }

  .hamburger { display: flex; }
  .btn-signup { display: none; }

  .site-header { flex-wrap: wrap; position: relative; }

  .hero-content h1 { font-size: 2rem; }

  .stats-grid    { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }

  .q5-options    { gap: .75rem; }

  .ob-card { padding: 1.5rem 1.2rem; }

  .lesson-nav { flex-direction: column; }
  .lesson-nav button { width: 100%; text-align: center; }

  .practice-chars-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  .practice-char-box span { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .courses-grid   { grid-template-columns: 1fr; }
  .steps-grid     { grid-template-columns: 1fr 1fr; }
}