/**
 * Learneta Evaluation - World-Class Design
 * Real paper texture, GSAP-like animations, Amharic-first
 */

/**
 * CSS CUSTOM PROPERTIES (Design Tokens)
 */
:root {
  --site-header-height: 72px;
  /* Brand Colors */
  --brand-green: #6CBE45;
  --brand-green-dark: #4A8C2A;
  --brand-green-light: #e8f5da;
  --brand-accent: #F5A623;
  --brand-accent-light: #fef3c7;
  
  /* Paper Colors */
  --paper-cream: #fdfcfa;
  --paper-warm: #f8f6f0;
  --paper-shadow: rgba(139, 125, 107, 0.08);
  
  /* Text Colors */
  --text-primary: #2d2a26;
  --text-secondary: #5c5650;
  --text-muted: #8b8175;
  
  /* Status Colors */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Animation Timing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Radius Scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/**
 * GLOBAL RESETS
 */
[hidden] {
  display: none !important;
}

/**
 * HEADER STYLES
 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 125, 107, 0.1);
  padding: 0.75rem 1.5rem;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.site-header__logo strong {
  color: var(--brand-green);
}

.site-header__menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.site-header__menu a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.site-header__menu a:hover {
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
}

/**
 * FOOTER STYLES
 */
.site-footer {
  background: #1f2420;
  color: white;
  padding: 2.5rem 1.5rem 1.25rem;
  margin-top: 4rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.9fr;
  gap: 1.2rem;
  align-items: start;
  text-align: left;
}

.site-footer__logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
}

.site-footer__logo span {
  color: #ffffff;
}

.site-footer__tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.site-footer__highlights h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: #d1f0bf;
}

.site-footer__highlight-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.site-footer__highlight-list li {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.site-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.site-footer__menu a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer__menu a:hover {
  color: #d1f0bf;
}

.site-footer__contact {
  display: grid;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.site-footer__contact p {
  margin: 0;
}

.site-footer__contact a {
  color: var(--brand-green);
  text-decoration: none;
}

.site-footer__courses {
  color: #d1f0bf !important;
  font-weight: 600;
}

.site-footer__bottom {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.site-footer__bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.site-footer__copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  margin-top: 1rem;
}

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

html {
  scroll-behavior: smooth;
}

/**
 * REAL PAPER TEXTURE BACKGROUND
 */
body {
  background-color: var(--paper-cream);
  background-image: 
    /* Fine grain noise */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"),
    /* Subtle fiber texture */
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(139, 125, 107, 0.02) 2px,
      rgba(139, 125, 107, 0.02) 4px
    ),
    /* Warm gradient overlay */
    radial-gradient(ellipse at 30% 20%, rgba(245, 166, 35, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(108, 190, 69, 0.03) 0%, transparent 50%);
  background-blend-mode: soft-light, normal, normal, normal;
  background-size: 256px 256px, 100% 100%, 100% 100%, 100% 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--site-header-height);
}

/* Paper card effect with realistic shadow */
.paper-card {
  background: var(--paper-cream);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 1px 2px rgba(139, 125, 107, 0.05),
    0 4px 12px rgba(139, 125, 107, 0.08),
    0 8px 24px rgba(139, 125, 107, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(139, 125, 107, 0.1);
  position: relative;
  overflow: hidden;
}

.paper-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-accent) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-expo);
}

.paper-card.active::before {
  opacity: 1;
}

/**
 * HERO SECTION - Dramatic Entry
 */
.hero {
  min-height: calc(100vh - var(--site-header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(108, 190, 69, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 166, 35, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.hero__container {
  max-width: 640px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(108, 190, 69, 0.1);
  border: 1px solid rgba(108, 190, 69, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-green-dark);
  margin-bottom: 1.5rem;
  animation: badge-enter 0.8s var(--ease-out-expo) backwards;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-green);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero__title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
  animation: title-enter 1s var(--ease-out-expo) 0.1s backwards;
}

.hero__title-highlight {
  color: var(--brand-green);
  position: relative;
  display: inline-block;
}

.hero__title-highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: -4px;
  right: -4px;
  height: 12px;
  background: var(--brand-accent-light);
  border-radius: 4px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: highlight-reveal 0.6s var(--ease-out-expo) 0.8s forwards;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-inline: auto;
  animation: fade-up 0.8s var(--ease-out-expo) 0.2s backwards;
}

/* Social proof with animated avatars */
.hero__social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fade-up 0.8s var(--ease-out-expo) 0.3s backwards;
}

.hero__avatars {
  display: flex;
}

.hero__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--paper-cream);
  margin-left: -12px;
  animation: avatar-pop 0.5s var(--ease-spring) backwards;
}

.hero__avatar:first-child { 
  margin-left: 0; 
  background: linear-gradient(135deg, #6CBE45, #4A8C2A);
  animation-delay: 0.4s;
}

.hero__avatar:nth-child(2) { 
  background: linear-gradient(135deg, #F5A623, #e8940a);
  animation-delay: 0.5s;
}

.hero__avatar:nth-child(3) { 
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  animation-delay: 0.6s;
}

.hero__social-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero__social-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Task previews - floating cards */
.hero__task-previews {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  animation: fade-up 0.8s var(--ease-out-expo) 0.4s backwards;
}

.hero__task-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(139, 125, 107, 0.08);
  border: 1px solid rgba(139, 125, 107, 0.1);
  transition: all 0.3s var(--ease-out-expo);
}

.hero__task-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 125, 107, 0.12);
}

.hero__task-icon {
  font-size: 1.25rem;
}

/* Hero disclaimer */
.hero__disclaimer {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.test-task-picker {
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(74, 140, 42, 0.22);
  background: #f6fbf2;
  border-radius: 12px;
}

.test-task-picker[hidden] {
  display: none !important;
}

.test-task-picker__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-green-dark);
  margin-bottom: 0.55rem;
}

.test-task-picker__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.test-task-picker__btn {
  border: 1px solid rgba(74, 140, 42, 0.24);
  background: white;
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.test-task-picker__btn:hover {
  border-color: var(--brand-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(108, 190, 69, 0.14);
}

.test-task-picker__hint {
  margin-top: 0.55rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

@media (max-width: 680px) {
  .test-task-picker__buttons {
    grid-template-columns: 1fr;
  }
}

/* Hide hero when evaluation starts */
.hero[hidden],
.hero[style*="display: none"] {
  display: none !important;
}

/* CTA Button - Magnetic effect */
.btn--magnetic {
  position: relative;
  background: var(--brand-green);
  color: white;
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 
    0 4px 16px rgba(108, 190, 69, 0.3),
    0 8px 32px rgba(108, 190, 69, 0.2);
  transition: all 0.4s var(--ease-out-expo);
  animation: fade-up 0.8s var(--ease-out-expo) 0.5s backwards;
}

.btn--magnetic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn--magnetic:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 24px rgba(108, 190, 69, 0.4),
    0 16px 48px rgba(108, 190, 69, 0.15);
}

.btn--magnetic:hover::before {
  opacity: 1;
}

.btn--magnetic:active {
  transform: translateY(-1px) scale(0.98);
}

/* Massively enhanced Hero Start Button */
#start-evaluation-btn {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 3.5rem;
  font-size: 1.5rem;
  border-radius: 999px;
  margin-top: 2rem;
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  background: var(--brand-green);
  z-index: 1;
  /* Aggressive heartbeat scaling + ring glow combined */
  animation: hero-heartbeat 2.4s infinite ease-in-out;
}

/* Glassy shine sweep effect */
#start-evaluation-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.6), 
    transparent
  );
  transform: skewX(-20deg);
  z-index: -1;
  animation: hero-shine 3s infinite;
}

#start-evaluation-btn:hover {
  transform: scale(1.08) translateY(-4px);
  animation-play-state: paused;
  box-shadow: 0 15px 45px rgba(108, 190, 69, 0.5);
}

@keyframes hero-heartbeat {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(108, 190, 69, 0.7);
  }
  10% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px rgba(108, 190, 69, 0.3);
  }
  20% {
    transform: scale(1);
    box-shadow: 0 0 0 25px rgba(108, 190, 69, 0);
  }
  30% {
    transform: scale(1.02);
  }
  40% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes hero-shine {
  0% { left: -100%; }
  25% { left: 200%; }
  100% { left: 200%; }
}

/**
 * EVALUATION WRAPPER & PROGRESS
 */
.evaluation-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: none;
}

.evaluation-wrapper[style*="display: flex"] {
  display: flex !important;
  flex-direction: column;
}

/* Progress bar - animated gradient */
.eval-progress {
  position: sticky;
  top: calc(var(--site-header-height) + 0.75rem);
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 
    0 4px 20px rgba(139, 125, 107, 0.1),
    0 1px 3px rgba(139, 125, 107, 0.05);
  z-index: 100;
  margin-bottom: 2rem;
}

.task-card,
#lead-gate,
#results-section {
  scroll-margin-top: calc(var(--site-header-height) + 120px);
}

.eval-progress__bar {
  height: 8px;
  background: #e5e1dc;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.eval-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-accent) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.8s var(--ease-out-expo);
  position: relative;
  animation: shimmer 2s infinite linear;
}

.eval-progress__steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.eval-progress__step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: #e5e1dc;
  color: var(--text-muted);
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
}

.eval-progress__step.active {
  background: var(--brand-green);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(108, 190, 69, 0.3);
}

.eval-progress__step.done {
  background: var(--brand-green-dark);
  color: white;
}

.eval-progress__step.done::after {
  content: '✓';
  font-size: 1rem;
}

.eval-progress__step.done .eval-progress__step-num {
  display: none;
}

.eval-progress__label {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/**
 * TASK CARDS - Paper Style
 */
.task-card {
  background: var(--paper-cream);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 1px 2px rgba(139, 125, 107, 0.05),
    0 4px 12px rgba(139, 125, 107, 0.08),
    0 8px 24px rgba(139, 125, 107, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(139, 125, 107, 0.1);
  position: relative;
  overflow: hidden;
  padding: 2.5rem;
  margin-bottom: 2rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.task-card[hidden] {
  display: none !important;
}

.task-card.animate-in {
  opacity: 0;
  transform: translateY(30px);
  animation: card-enter 0.8s var(--ease-out-expo) forwards;
}

.task-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.task-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
}

.task-card__badge-icon {
  font-size: 1.25rem;
}

.task-card__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.task-card__title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.task-card__header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.task-card__header-title .task-card__title {
  margin-bottom: 0;
}

.help-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.help-icon-btn:hover {
  background: var(--brand-green-light);
  border-color: var(--brand-green);
  color: var(--brand-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108,190,69,0.15);
}

.task-card__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Task badge variants */
.task-badge--speaking {
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
}

.task-badge--listening {
  background: #dbeafe;
  color: #1d4ed8;
}

.task-badge--reading {
  background: #fef3c7;
  color: #92400e;
}

.task-badge--vocabulary {
  background: #fce7f3;
  color: #be185d;
}

.task-badge--writing {
  background: #e0e7ff;
  color: #4338ca;
}

/* Task navigation */
.task-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(139, 125, 107, 0.1);
  border-bottom: 1px solid rgba(139, 125, 107, 0.1);
}

.task-nav__count {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Conversation area */
.conversation {
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--paper-warm);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* Mic area */
.mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: #fafafa;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(108, 190, 69, 0.3);
}

.mic-btn {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-green);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-spring);
}

.mic-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(108, 190, 69, 0.4);
}

.mic-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mic-btn__icon {
  font-size: 2rem;
}

.mic-btn__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--brand-green);
  opacity: 0;
  animation: mic-pulse 2s ease-out infinite;
}

.mic-area__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ================================================================
   ICE-BREAKER TASK (Task 1) — redesigned single-recording UI
   ================================================================ */

/* AI greeting card */
.ib-ai-greeting {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 1.5rem 0;
}

.ib-ai-greeting__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: #f0fbe9;
  border: 2px solid var(--brand-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.ib-ai-greeting__bubble {
  flex: 1;
  background: #f0fbe9;
  border: 1.5px solid rgba(108,190,69,0.35);
  border-radius: 0 1rem 1rem 1rem;
  padding: 1rem 1.25rem;
}

.ib-ai-greeting__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  margin-bottom: 0.5rem;
}

.ib-ai-greeting__text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.55;
  margin: 0;
}

/* Permission notice */
.ib-permission-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #fff8e1;
  border: 1.5px solid #f9a825;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.ib-permission-notice[hidden] { display: none !important; }

.ib-permission-notice__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ib-permission-notice strong {
  display: block;
  font-size: 0.95rem;
  color: #5d4037;
  margin-bottom: 0.25rem;
}

.ib-permission-notice p {
  font-size: 0.85rem;
  color: #795548;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

/* Recorder zone */
.ib-recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2.5rem 1.5rem;
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.ib-recorder__status {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0;
  min-height: 1.3em;
  transition: color 0.3s ease;
}

.ib-recorder__wave {
  margin: 0;
}

/* Wide confident record button */
.ib-record-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: auto;
  min-width: 240px;
  padding: 1.1rem 2.5rem;
  border-radius: 4rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  outline: none;
}

.ib-record-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(108,190,69,0.3);
}

/* Ready state (Record) */
.ib-record-btn--ready {
  background: var(--brand-green);
  color: white;
  box-shadow: 0 4px 15px rgba(108,190,69,0.25);
}

.ib-record-btn--ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,190,69,0.35);
}

/* Recording state (Stop) */
.ib-record-btn--recording {
  background: #e53935;
  color: white;
  box-shadow: 0 4px 15px rgba(229,57,53,0.25);
}

.ib-record-btn--recording:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229,57,53,0.35);
}

/* Disabled / Done state */
.ib-record-btn--disabled,
.ib-record-btn--done {
  background: #f0f0f0;
  color: #9e9e9e;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

.ib-record-btn__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.ib-record-btn__label {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
}

/* Transcript */
.ib-transcript {
  width: 100%;
  background: white;
  border: 1.5px solid #e8e4dc;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: left;
}

.ib-transcript[hidden] { display: none !important; }

.ib-transcript__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.3rem;
}

.ib-transcript__text {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.55;
  font-style: italic;
}

/* Feedback card */
.ib-feedback {
  margin: 1.5rem 0;
  padding: 1.75rem 2rem;
  background: #fdfdfd;
  border: 1px solid #e0f2d8;
  border-left: 6px solid var(--brand-green);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(108,190,69,0.12);
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ib-feedback[hidden] { display: none !important; }

.ib-feedback__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ib-feedback__stars {
  font-size: 1.3rem;
  line-height: 1;
}

.ib-feedback__stars-empty {
  opacity: 0.3;
}

.ib-feedback__label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-green);
}

.ib-feedback__text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0 0 0.5rem;
}

.ib-feedback__highlights {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Button size variant */
.btn--lg {
  padding: 0.9rem 2.25rem;
  font-size: 1rem;
}

/* Keyframes */
@keyframes ib-btn-breathe {
  0%, 100% { box-shadow: 0 4px 15px rgba(229,57,53,0.25); }
  50%       { box-shadow: 0 6px 25px rgba(229,57,53,0.45); }
}

/* Audio wave */
.audio-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
}

.audio-wave__bar {
  width: 4px;
  height: 4px;
  background: var(--brand-green);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.audio-wave--playing .audio-wave__bar {
  animation: wave-bar 0.8s ease-in-out infinite;
}

/* AI Feedback */
.ai-feedback {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: white;
  border-left: 4px solid var(--brand-green);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-feedback[hidden] {
  display: none !important;
}

/* Task actions */
.task-card__actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(139, 125, 107, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.task-card__actions[hidden] {
  display: none !important;
}

/* Task buttons */
.task-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.task-nav-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.task-nav-actions__left,
.task-nav-actions__right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Make primary action pop more in the flow */
.spk-next-btn {
  box-shadow: 0 4px 12px rgba(108, 190, 69, 0.25);
}

@media (max-width: 520px) {
  .task-nav-actions {
     flex-direction: column;
     align-items: stretch;
  }
  .task-nav-actions__left,
  .task-nav-actions__right {
    justify-content: center;
  }
}

/* Task teaser (used in tasks 2-6 inline) */
.task-teaser {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #fffbeb;
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.task-teaser__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.task-teaser p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Task 1 — intro video + registration */
.ib-video-wrap {
  margin: 1.25rem 0 1.5rem;
}

.ib-video-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 9;
  max-height: min(52vh, 400px);
  margin: 0 auto;
  /* Glowing gradient border */
  box-shadow:
    0 0 0 3px rgba(108, 190, 69, 0.5),
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 60px rgba(108, 190, 69, 0.1);
  transition: box-shadow 0.4s ease;
}

.ib-video-frame:hover {
  box-shadow:
    0 0 0 3px rgba(108, 190, 69, 0.8),
    0 16px 48px rgba(0, 0, 0, 0.3),
    0 0 80px rgba(108, 190, 69, 0.2);
}

/* Buffering loader overlay */
.ib-video-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.4s ease;
}

.ib-video-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.ib-video-loader__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(108, 190, 69, 0.2);
  border-top-color: var(--brand-green);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

.ib-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
  background: #000;
}

/* Play overlay button */
.ib-video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: none;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 4;
  transition: background 0.25s ease;
  backdrop-filter: blur(2px);
}

.ib-video-play-overlay:hover {
  background: rgba(0, 0, 0, 0.25);
}

.ib-video-play-overlay.hidden {
  display: none;
}

.ib-video-play-overlay__icon {
  width: 64px;
  height: 64px;
  background: var(--brand-green);
  border-radius: 50%;
  padding: 16px;
  box-shadow: 0 4px 24px rgba(108, 190, 69, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ib-video-play-overlay:hover .ib-video-play-overlay__icon {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(108, 190, 69, 0.7);
}

@media (max-width: 480px) {
  .ib-video-frame {
    max-height: min(40vh, 220px);
  }
  .ib-video-play-overlay__icon {
    width: 48px;
    height: 48px;
    padding: 12px;
  }
}

.ib-video-missing {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.ib-video-missing code {
  font-size: 0.8rem;
  background: var(--paper-warm);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.ib-register-form {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.ib-register-form[hidden] {
  display: none !important;
}

/* Task 1 teaser — small floating pill, centered on screen, non-blocking */
.ib-teaser-float {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: #fff;
  border-left: 4px solid var(--brand-green);
  border-radius: 2rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ib-teaser-float[hidden] { display: none !important; }

.ib-teaser-float.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Transcript area */
.transcript-area {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--paper-warm);
  border-radius: var(--radius-md);
}

.transcript-area__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.transcript-area__text {
  font-size: 1rem;
  color: var(--text-primary);
  font-style: italic;
}

/* Writing area */
.writing-area {
  margin: 1.5rem 0;
}

.writing-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(139, 125, 107, 0.2);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.writing-textarea:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(108, 190, 69, 0.1);
}

.writing-area__counter {
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Game stats */
.game-stats {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--paper-warm);
  border-radius: var(--radius-md);
}

.game-stats__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.game-stats__label {
  color: var(--text-muted);
}

.game-stats__value {
  font-weight: 700;
  color: var(--text-primary);
}

/* Memory grid */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

/* Game complete */
.game-complete {
  text-align: center;
  padding: 2rem;
  background: var(--brand-green-light);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

.game-complete__icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.game-complete h3 {
  color: var(--brand-green-dark);
  margin-bottom: 0.5rem;
}

/* ── LISTENING: Listen Card (tap-to-listen) ────────────────────── */
@keyframes ripple-out {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes speaker-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); }
}

.listen-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #f0fdf4, #ecfccb);
  border: 2px solid rgba(108,190,69,0.25);
  border-radius: 1.25rem;
  margin: 1.25rem 0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 14px rgba(108,190,69,0.08);
}

.listen-card:hover {
  border-color: rgba(108,190,69,0.5);
  box-shadow: 0 6px 24px rgba(108,190,69,0.18);
  transform: translateY(-1px);
}

.listen-card:active {
  transform: scale(0.99);
}

.listen-card.is-playing {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(108,190,69,0.2), 0 6px 24px rgba(108,190,69,0.2);
}

/* Speaker icon + ripple rings */
.listen-card__left {
  flex-shrink: 0;
}

.listen-card__icon-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listen-card__speaker {
  font-size: 1.7rem;
  line-height: 1;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.listen-card.is-playing .listen-card__speaker {
  animation: speaker-pulse 0.8s ease-in-out infinite;
}

.listen-card__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--brand-green);
  opacity: 0;
  pointer-events: none;
}

.listen-card.is-playing .listen-card__ring--1 {
  animation: ripple-out 1.6s ease-out infinite;
}

.listen-card.is-playing .listen-card__ring--2 {
  animation: ripple-out 1.6s ease-out 0.7s infinite;
}

/* Center: label + waveform */
.listen-card__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.listen-card__hint {
  font-size: 0.9rem;
  font-weight: 700;
  color: #166534;
  letter-spacing: 0.01em;
}

/* Premium wave inside card */
.audio-wave--premium {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  overflow: hidden;
}

/* Mobile responsiveness for Listen Card */
@media (max-width: 480px) {
  .listen-card {
    padding: 0.75rem 0.8rem;
    gap: 0.75rem;
  }
  .listen-card__icon-wrap {
    width: 42px;
    height: 42px;
  }
  .listen-card__speaker {
    width: 22px;
    height: 22px;
  }
  .audio-wave--premium .audio-wave__bar {
    width: 3px;
  }
}

.audio-wave--premium .audio-wave__bar {
  background: rgba(108,190,69,0.3);
  width: 4px;
  height: 4px;
  min-height: 4px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

/* Activate wave-bar animation for premium bars too */
.audio-wave--playing.audio-wave--premium .audio-wave__bar {
  background: var(--brand-green);
  animation: wave-bar 0.8s ease-in-out infinite;
}

/* Stagger the 20 bars */
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(1)  { animation-delay: 0.0s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(2)  { animation-delay: 0.1s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(3)  { animation-delay: 0.2s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(4)  { animation-delay: 0.3s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(5)  { animation-delay: 0.4s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(6)  { animation-delay: 0.5s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(7)  { animation-delay: 0.0s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(8)  { animation-delay: 0.1s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(9)  { animation-delay: 0.2s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(10) { animation-delay: 0.3s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(11) { animation-delay: 0.4s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(12) { animation-delay: 0.5s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(13) { animation-delay: 0.0s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(14) { animation-delay: 0.1s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(15) { animation-delay: 0.2s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(16) { animation-delay: 0.3s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(17) { animation-delay: 0.4s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(18) { animation-delay: 0.5s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(19) { animation-delay: 0.1s; }
.audio-wave--premium.audio-wave--playing .audio-wave__bar:nth-child(20) { animation-delay: 0.3s; }

/* ── Word order/chips ─────────────────── */
.word-order {
  margin: 1.5rem 0;
}

.word-order__label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
}

.word-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 58px;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fffe, #f3fcef);
  border-radius: var(--radius-md);
  border: 2px dashed rgba(108,190,69,0.35);
  transition: border-color 0.3s ease;
  position: relative;
}

.word-slots:empty::after {
  content: 'ቃላቱን ከታች ይጫኑ ›';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(139,125,107,0.4);
  font-size: 0.9rem;
  font-style: italic;
}

/* Tag panel redesign */
.word-chips {
  margin: 1.5rem 0;
}

.word-chips__label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.word-chips__bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Instruction */
.task-instruction {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #fffbeb;
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.task-instruction__icon {
  font-size: 1.25rem;
}

/* Reading board */
.reading-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}

@media (max-width: 640px) {
  .reading-board {
    grid-template-columns: 1fr;
  }
}

/* Speaking prompt */
.speaking-prompt {
  margin: 1.5rem 0;
}

.speaking-prompt__image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.speaking-prompt__image {
  width: 100%;
  height: auto;
  display: block;
}

.speaking-prompt__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 0.875rem;
}

/* Writing prompt */
.writing-prompt {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--paper-warm);
  border-radius: var(--radius-md);
}

.writing-prompt__starter {
  margin-bottom: 1rem;
}

.writing-prompt__starter-label,
.writing-prompt__example-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.writing-prompt__starter-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem;
  background: white;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--brand-green);
}

.writing-prompt__example-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
  padding: 0.75rem;
  background: white;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--brand-accent);
}

/* Mic timer */
.mic-timer {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-green);
}

/* Task feedback */
.task-feedback {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: var(--radius-md);
}

.task-feedback--success {
  background: #dcfce7;
  border-left: 4px solid var(--success);
  color: #166534;
}

.task-feedback--error {
  background: #fee2e2;
  border-left: 4px solid var(--error);
  color: #991b1b;
}

.task-feedback[hidden] {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 48px;
}

.btn--primary {
  background: var(--brand-green);
  color: white;
  border-color: var(--brand-green);
}

.btn--primary:hover {
  background: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 190, 69, 0.3);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(139, 125, 107, 0.3);
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--paper-warm);
  border-color: rgba(139, 125, 107, 0.5);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: 40px;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn--xl {
  padding: 1.125rem 2.5rem;
  font-size: 1.25rem;
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------
   Task Component Polish Overrides (Task 2-5)
------------------------------------------------------------------- */

/* ── Word Chip ─ tap to ADD ────────────────────── */
@keyframes chip-bounce-in {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1);   opacity: 1; }
}

.word-chip {
  position: relative;
  border: 2px solid #d1fae5;
  background: linear-gradient(135deg, #fff, #f0fdf4);
  color: #166534;
  border-radius: 50px;
  padding: 0.45rem 1rem 0.45rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(108,190,69,0.1);
  animation: chip-bounce-in 0.25s ease both;
}

.word-chip::after {
  content: '+';
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-green);
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.word-chip:hover {
  border-color: var(--brand-green);
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 16px rgba(108,190,69,0.25);
}

.word-chip:hover::after {
  opacity: 1;
}

.word-chip--used {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
  pointer-events: none;
}

.word-chip--used::after {
  display: none;
}

/* ── Word Slot ─ tap to REMOVE ──────────────────── */
.word-slot {
  border: 2px dashed #cbd5e1;
  background: #fff;
  color: var(--text-primary);
  border-radius: 50px;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.word-slot {
  border-style: solid;
  border-color: var(--brand-green);
  background: #f0fdf4;
  color: #166534;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  gap: 0.35rem;
}

button.word-slot::after {
  content: '✕';
  font-size: 0.72rem;
  color: #ef4444;
  opacity: 0;
  transition: opacity 0.2s ease;
}

button.word-slot:hover {
  border-color: #ef4444;
  background: #fff5f5;
  color: #991b1b;
  transform: scale(1.05);
}

button.word-slot:hover::after {
  opacity: 1;
}

.word-slot--correct {
  border-color: #22c55e !important;
  background: #dcfce7 !important;
  color: #166534 !important;
  cursor: default !important;
}

.word-slot--wrong {
  border-color: #ef4444 !important;
  background: #fee2e2 !important;
  color: #991b1b !important;
  cursor: default !important;
}

.audio-replay-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-replay-btn:hover {
  border-color: var(--brand-green);
  color: var(--brand-green-dark);
}

/* Reading */
.reading-board__sentences,
.reading-board__pictures {
  display: grid;
  gap: 0.85rem;
}

.sentence-item {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: grab;
  transition: all 0.2s ease;
}

.sentence-item:hover {
  border-color: var(--brand-green);
  background: #f7fdf3;
}

.sentence-item.dragging {
  opacity: 0.6;
}

.sentence-item--selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sentence-item--placed {
  opacity: 0.5;
}

.picture-slot {
  border: 2px dashed #d1d5db;
  background: #fff;
  border-radius: 12px;
  min-height: 96px;
  padding: 0.8rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}

.picture-slot.drag-over,
.picture-slot:hover {
  border-color: var(--brand-green);
  background: #f7fdf3;
}

.picture-slot__emoji {
  font-size: 2rem;
  line-height: 1;
}

.picture-slot__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.picture-slot__answer {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  background: #f3f4f6;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}

.picture-slot--correct {
  border-style: solid;
  border-color: #22c55e;
  background: #dcfce7;
}

.picture-slot--wrong {
  border-style: solid;
  border-color: #ef4444;
  background: #fee2e2;
}

/* Memory */
.memory-card {
  position: relative;
  height: 110px;
  border-radius: 14px;
  perspective: 900px;
  -webkit-perspective: 900px;
  cursor: pointer;
}

.memory-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.memory-card.flipped .memory-card__inner {
  transform: rotateY(180deg);
}

.memory-card__front,
.memory-card__back {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.memory-card__front {
  background: linear-gradient(135deg, #6cbe45 0%, #4a8c2a 100%);
  box-shadow: 0 8px 18px rgba(108, 190, 69, 0.25);
}

.memory-card__front::after {
  content: "?";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
}

.memory-card__back {
  transform: rotateY(180deg);
  background: #fff;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.memory-card__back-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.memory-card__back-word {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.memory-card--matched .memory-card__back {
  border-color: #22c55e;
  box-shadow: inset 0 0 0 3px #22c55e;
}

/**
 * WRITING TASK (Task 6) Premium Redesign
 */
.writing-prompt-new {
  background: linear-gradient(135deg, #fefce8 0%, #fdf5d3 100%);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.08);
}

.writing-prompt-new__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.writing-prompt-new__text {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.writing-prompt-new__starter {
  font-weight: 700;
  color: #92400e;
}

.writing-prompt-new__highlight {
  color: #b45309;
  font-style: italic;
}

.sentence-builder {
  background: #fff;
  border-radius: 1.25rem;
  border: 2.5px solid rgba(108, 190, 69, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1.5rem;
}

.sentence-builder:focus-within {
  border-color: var(--brand-green);
  box-shadow: 0 8px 30px rgba(108, 190, 69, 0.15);
}

.sentence-builder__inner {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #fbfdf9;
}

.sentence-builder__starter {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-green-dark);
  margin-bottom: 0.5rem;
  display: block;
}

.sentence-builder__input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  font-family: inherit;
  color: var(--text-primary);
  line-height: 1.6;
  resize: none;
  padding: 0;
}

.sentence-builder__input:focus {
  outline: none;
}

.sentence-builder__input::placeholder {
  color: #cbd5e1;
  font-weight: 400;
}

.sentence-builder__footer {
  background: #f6f9f4;
  border-top: 1.5px solid rgba(108, 190, 69, 0.15);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Feedback variants used by tasks */
.task-feedback--correct {
  background: #dcfce7;
  border-left: 4px solid #22c55e;
  color: #166534;
}

.task-feedback--partial {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

/* ------------------------------------------------------------------
   Lead Gate + Results Section Polish
------------------------------------------------------------------- */

.lead-gate {
  border-top: 4px solid var(--brand-accent);
}

.lead-gate__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  margin-bottom: 0.9rem;
}

.lead-gate__preview {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}

.lead-gate__preview-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-weight: 600;
  color: #92400e;
}

.lead-form {
  display: grid;
  gap: 1rem;
}

.lead-form__group {
  display: grid;
  gap: 0.45rem;
}

.lead-form__label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.lead-form__required {
  color: #ef4444;
}

.lead-form__input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0 0.85rem;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-form__input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(108, 190, 69, 0.16);
}

.lead-form__phone-wrap {
  display: grid;
  grid-template-columns: minmax(150px, 44%) 1fr;
  gap: 0.55rem;
}

.lead-form__country {
  height: 46px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-form__country:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(108, 190, 69, 0.16);
}

@media (max-width: 480px) {
  .lead-form__phone-wrap {
    grid-template-columns: 1fr;
  }
}

.lead-form__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lead-form__error {
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.lead-form__skip {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  text-decoration: underline;
  cursor: pointer;
}

.results-card {
  border-top: 4px solid var(--brand-green);
}

.results-header {
  text-align: center;
  padding: 1.1rem 1rem 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.results-header__badge {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.results-header__title {
  margin: 0;
}

.results-header__name {
  margin: 0.35rem 0 0.6rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.results-overall-score {
  display: grid;
  gap: 0.35rem;
}

.results-big-stars {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.results-overall-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-green-dark);
}

.results-before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: stretch;
  margin: 1rem 0 1.35rem;
}

.results-before,
.results-after {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.95rem;
}

.results-before h4,
.results-after h4 {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.results-before p,
.results-after p {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

.results-before-after__arrow {
  align-self: center;
  color: var(--brand-green-dark);
  font-weight: 800;
  font-size: 1.2rem;
}

.results-skills {
  margin: 1.2rem 0 1.35rem;
}

.results-skills__title {
  margin-bottom: 0.8rem;
}

.results-skill-grid {
  display: grid;
  gap: 0.65rem;
}

.results-skill-item {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.results-recommendation {
  border: 1px solid #d9f99d;
  background: #f7fee7;
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0 1.4rem;
}

.results-recommendation__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.results-recommendation__header h3 {
  margin: 0;
  font-size: 1.02rem;
}

.results-recommendation__body {
  color: #3f6212;
  line-height: 1.6;
}

.results-recommendation-box {
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.25rem;
}

.results-recommendation-box p {
  margin: 0 0 1rem 0;
}

.results-recommendation-box p:last-child {
  margin-bottom: 0;
}

.results-recommendation-box strong {
  font-weight: 800;
  color: #166534;
}

.results-plan-list {
  padding-left: 1.2rem;
  margin: 0.8rem 0 1.25rem 0;
  list-style: none;
}

.results-plan-list li {
  margin-bottom: 0.65rem;
  position: relative;
  font-weight: 600;
  color: #274712;
}

.results-plan-list li::before {
  content: '🎯';
  position: absolute;
  left: -1.4rem;
  top: -1px;
  font-size: 0.95rem;
}

.course-cta {
  border-radius: 16px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfccb 100%);
  border: 1px solid #bbf7d0;
  padding: 1.2rem;
}

.course-cta__title {
  margin: 0;
}

.course-cta__subtitle {
  margin: 0.35rem 0 0.9rem;
  color: #166534;
}

.course-cta__card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid #dcfce7;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.06);
}

.course-cta__media {
  overflow: hidden;
  border-radius: 10px;
  background: #f0fdf4;
  aspect-ratio: 1;
}

.course-cta__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-cta__body {
  min-width: 0;
}

.course-cta__level {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #ecfccb;
  color: #3f6212;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.course-cta__course-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.3;
  color: #14532d;
}

.course-cta__excerpt {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #4b5563;
}

.course-cta__fallback {
  margin: 0 0 0.85rem;
  color: #166534;
}

.course-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.course-highlight {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid #dcfce7;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #166534;
}

.course-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.course-price__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.course-price__num {
  font-size: 1.35rem;
  font-weight: 900;
  color: #166534;
  line-height: 1.2;
}

.btn--cta {
  width: 100%;
  border-radius: 12px;
  min-height: 54px;
  background: var(--brand-green);
  color: #fff;
  border: 0;
  font-weight: 800;
}

.btn--cta:hover {
  background: var(--brand-green-dark);
}

.course-guarantee {
  margin: 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #166534;
  font-size: 0.86rem;
}

.course-guarantee p {
  margin: 0;
}

.testimonials {
  display: grid;
  gap: 0.6rem;
}

.testimonial {
  background: #fff;
  border: 1px solid #dcfce7;
  border-radius: 10px;
  padding: 0.75rem;
}

.testimonial__stars {
  color: #f59e0b;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.testimonial__text {
  margin: 0 0 0.3rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.testimonial__author {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .results-before-after {
    grid-template-columns: 1fr;
  }

  .results-before-after__arrow {
    display: none;
  }

  .course-highlights {
    grid-template-columns: 1fr;
  }

  .course-cta__card {
    grid-template-columns: 1fr;
  }

  .course-cta__media {
    aspect-ratio: 16 / 9;
  }

  .course-price {
    flex-direction: column;
    align-items: flex-start;
  }
}

/**
 * TRANSITION MODAL - Next Task Preview
 */
.transition-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo);
}

.transition-modal[hidden] {
  display: none !important;
}

.transition-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.transition-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 38, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.transition-modal__box {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--paper-cream);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 
    0 24px 80px rgba(45, 42, 38, 0.25),
    0 8px 24px rgba(45, 42, 38, 0.1);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.5s var(--ease-spring);
  overflow: hidden;
}

.transition-modal.visible .transition-modal__box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Success Animation */
.success-animation {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.success-animation__circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--brand-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: success-pop 0.6s var(--ease-spring);
}

.success-animation__icon {
  font-size: 3rem;
  animation: success-icon 0.5s var(--ease-spring) 0.3s backwards;
}

/* Score Display */
.score-display {
  text-align: center;
  margin-bottom: 1.5rem;
}

.score-display__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.score-display__value {
  font-size: 3rem;
  font-weight: 900;
  color: var(--brand-green);
  line-height: 1;
  font-family: 'Merriweather', Georgia, serif;
}

.score-display__time {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Next Task Preview (with Video) */
.next-task-preview {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 2px dashed rgba(108, 190, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.next-task-preview--video {
  padding: 0;
  border: 1px solid rgba(139, 125, 107, 0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.next-task-preview__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--paper-warm);
  border-bottom: 1px solid rgba(139, 125, 107, 0.1);
}

.next-task-preview__badge {
  font-size: 1.5rem;
  background: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.next-task-preview__titles {
  display: flex;
  flex-direction: column;
}

.next-task-preview__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-green);
}

.next-task-preview__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.next-task-video-wrapper {
  width: 100%;
  background: #000;
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid rgba(139, 125, 107, 0.1);
}

.next-task-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.next-task-preview__desc {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  background: white;
}

/* CTA Buttons in modal */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn--next {
  width: 100%;
  background: var(--brand-green);
  color: white;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn--next:hover {
  background: var(--brand-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 190, 69, 0.3);
}

/**
 * ANIMATIONS
 */
@keyframes badge-enter {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes title-enter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlight-reveal {
  to {
    transform: scaleX(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes avatar-pop {
  from {
    opacity: 0;
    transform: scale(0) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(108, 190, 69, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(108, 190, 69, 0);
  }
}

@keyframes card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes success-pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes success-icon {
  from {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes icon-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/**
 * READING TASK (Task 3) — Sentence-to-Image Matching
 */

/* Board: sentences on top, images below in a grid */
.reading-board {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

/* Sentence pills row */
.reading-board__sentences {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Image cards grid */
.reading-board__pictures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .reading-board__pictures {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Sentence pills ───────────────────────────────────────────── */
.rd-sentence {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  background: #fff;
  border: 1.5px solid rgba(139, 125, 107, 0.2);
  border-radius: 2rem;
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
  font-size: 0.82rem;
  line-height: 1.35;
}

.rd-sentence:hover {
  border-color: var(--brand-green);
  box-shadow: 0 2px 8px rgba(108, 190, 69, 0.12);
  transform: translateY(-1px);
}

.rd-sentence__number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rd-sentence__text {
  color: var(--text-dark);
  font-weight: 500;
}

/* Selected (tap) */
.rd-sentence--selected {
  border-color: var(--brand-green);
  background: #f0fbe9;
  box-shadow: 0 0 0 3px rgba(108, 190, 69, 0.2);
}

/* Dragging */
.rd-sentence--dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

/* Already placed on a picture */
.rd-sentence--placed {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.rd-sentence--placed .rd-sentence__number {
  background: #94a3b8;
}

/* ── Picture cards ────────────────────────────────────────────── */
.rd-picture {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid rgba(139, 125, 107, 0.15);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rd-picture:hover {
  border-color: rgba(108, 190, 69, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rd-picture__img-wrap {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #f8f6f2;
}

@media (min-width: 641px) {
  .rd-picture__img-wrap {
    height: 140px;
  }
}

.rd-picture__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.rd-picture:hover .rd-picture__img {
  transform: scale(1.05);
}

/* Answer label at bottom */
.rd-picture__answer {
  min-height: 1.8rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  background: #fafafa;
  border-top: 1px solid rgba(139, 125, 107, 0.08);
  transition: all 0.2s ease;
  line-height: 1.35;
}

.rd-picture__answer:empty::after {
  content: 'ዓረፍተ-ነገር ያስቀምጡ';
  color: #c5c5c5;
  font-style: italic;
  font-size: 0.7rem;
}

/* Matched state */
.rd-picture--matched {
  border-color: var(--brand-green);
}

.rd-picture--matched .rd-picture__answer {
  background: #f0fbe9;
  color: var(--text-dark);
  font-weight: 600;
}

/* Dragover */
.rd-picture--dragover {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(108, 190, 69, 0.2);
  transform: scale(1.02);
}

/* Correct / Wrong after check */
.rd-picture--correct {
  border-color: var(--success, #22c55e);
}

.rd-picture--correct .rd-picture__answer {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.rd-picture--wrong {
  border-color: var(--error, #ef4444);
}

.rd-picture--wrong .rd-picture__answer {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}

/* Mobile hint */
.task-mobile-hint {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-green);
  min-height: 1.2em;
  margin: 0.25rem 0;
}

/**
 * SPEAKING TASK (Task 4)
 */

.spk-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(139, 125, 107, 0.15);
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.spk-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f8f6f2;
}

.spk-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background-color: #f1efeb;
}

.spk-card__prompt {
  padding: 1rem;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  background: #fcfcfc;
  border-top: 1px solid rgba(139, 125, 107, 0.1);
}

.spk-mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8faf6;
  border-radius: 1rem;
  border: 1.5px solid rgba(108, 190, 69, 0.2);
  margin-bottom: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.spk-mic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: var(--brand-green);
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(108, 190, 69, 0.3);
  z-index: 2;
}

.spk-mic:hover {
  transform: scale(1.05);
  background: #5baa38;
}

.spk-mic:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.spk-mic__pulse {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  background: var(--brand-green);
  z-index: -1;
  opacity: 0;
}

.spk-mic--recording {
  background: var(--error, #ef4444);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.spk-mic--recording:hover {
  background: #dc2626;
}

.spk-mic--recording .spk-mic__pulse {
  background: var(--error, #ef4444);
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.spk-mic--done {
  background: #10b981; /* Success green */
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.spk-mic-area__label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
}

.spk-timer {
  background: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--error, #ef4444);
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Audio wave override for speaking area */
.spk-wave {
  margin: 0.5rem 0;
  height: 20px;
}

.spk-wave .audio-wave__bar {
  background-color: var(--error, #ef4444);
}

/* AI Feedback area */
.spk-feedback {
  background: #f0fdf4;
  border-left: 4px solid var(--success, #22c55e);
  padding: 1.25rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin-top: 1.5rem;
}

.spk-feedback__stars {
  font-size: 1.25rem;
  color: #fbbf24; /* Yellow for stars */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.spk-feedback__score {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  background: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.spk-feedback__text {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #166534;
}

.spk-feedback__highlights {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
}

.spk-feedback__entities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.spk-feedback__entity-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #44403c;
  margin-right: 0.25rem;
}

.spk-chip {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
}

.spk-chip--ok {
  background: #dcfce7;
  color: #166534;
}

.spk-chip--miss {
  background: #fef3c7;
  color: #92400e;
}

.task4-transcript--placeholder #task4-transcript-text,
.task4-transcript--placeholder .task4-transcript__body {
  opacity: 0.65;
  font-style: italic;
}

.spk-loading {
  text-align: center;
  padding: 2rem;
}
.spk-loading p {
  margin-top: 1rem;
  color: var(--brand-green);
  font-weight: 500;
}

/**
 * MOTIVATIONAL MESSAGES (Amharic)
 */
.motivation-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(45, 42, 38, 0.2);
  z-index: 1001;
  opacity: 0;
  transition: all 0.5s var(--ease-out-expo);
  max-width: 90%;
  width: max-content;
}

.motivation-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/**
 * RESPONSIVE
 */
@media (max-width: 640px) {
  :root {
    --site-header-height: 60px;
  }

  .site-header {
    padding: 0.5rem 1rem;
  }
  
  .site-header__logo {
    font-size: 1rem;
  }
  
  .site-header__menu {
    display: none;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .site-footer__highlight-list {
    padding-left: 0;
    list-style: none;
  }
  
  .hero__title {
    font-size: 2rem;
  }
  
  .hero__task-previews {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 0.6rem;
  }
  
  .hero__task-preview {
    justify-content: center;
  }
  
  .task-card {
    padding: 1.5rem;
  }
  
  .transition-modal__box {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .score-display__value {
    font-size: 2.5rem;
  }
}
