/* ===================================================
   DunoSteps Website Stylesheet - Theme A (Playful Adventure)
   Warm cream, emerald green, sky blue, amber & coral accents
   =================================================== */

:root {
  --bg-main: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFDF9;
  --bg-soft-green: #ECFDF5;
  --bg-soft-blue: #EFF6FF;
  --bg-soft-amber: #FFFBEB;
  --bg-soft-coral: #FFF7ED;
  --bg-soft-purple: #F5F3FF;

  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #A7F3D0;

  --secondary: #3B82F6;
  --secondary-dark: #2563EB;
  --secondary-light: #BFDBFE;

  --accent-amber: #F59E0B;
  --accent-amber-dark: #D97706;
  
  --accent-coral: #F97316;
  --accent-purple: #8B5CF6;
  --accent-pink: #EC4899;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --border-color: #E2E8F0;
  --border-focus: #CBD5E1;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Base Reset & Setup ───────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-size: 16px;
}

/* ── Full Window Scrolling for Website Pages ─────── */
html.website-active,
body.website-active,
html:has(.website-root),
body:has(.website-root) {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scroll-behavior: smooth !important;
}

body.website-active #root,
body:has(.website-root) #root {
  height: auto !important;
  min-height: 100vh !important;
  display: block !important;
  overflow: visible !important;
  flex: none !important;
}

body.website-active #root div:has(.website-root),
body:has(.website-root) #root div:has(.website-root) {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  flex: none !important;
}

body.website-active #root div:has(.website-root).r-position-u8s1d,
body.website-active #root div:has(.website-root)[style*="position: absolute"],
body:has(.website-root) #root div:has(.website-root).r-position-u8s1d,
body:has(.website-root) #root div:has(.website-root)[style*="position: absolute"] {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.website-root {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(#EDE8DF 1.5px, transparent 1.5px),
    radial-gradient(#EDE8DF 1.5px, var(--bg-main) 1.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

.website-root main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Offset for in-page anchors so headings aren't hidden behind fixed header */
section[id], div[id] {
  scroll-margin-top: 6.5rem;
}

/* ── Header (Permanently Fixed Top Navigation) ────── */
header {
  position: fixed !important;
  top: 1rem !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 2rem) !important;
  max-width: 1240px !important;
  z-index: 1000 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  pointer-events: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.logo-icon-wrap {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.logo span {
  background: linear-gradient(135deg, #0F172A 30%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.2s ease;
  position: relative;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
}

.nav-links a:hover {
  color: var(--primary-dark);
  background-color: var(--bg-soft-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(2px) !important;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 0px var(--primary-dark), 0 8px 16px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  background-color: #0ebd84;
  box-shadow: 0 2px 0px var(--primary-dark), 0 4px 10px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
  box-shadow: 0 4px 0px var(--secondary-dark), 0 8px 16px rgba(59, 130, 246, 0.25);
}

.btn-secondary:hover {
  background-color: #2b77f5;
  box-shadow: 0 2px 0px var(--secondary-dark), 0 4px 10px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: white;
  color: var(--text-main);
  border: 2px solid var(--border-color);
  box-shadow: 0 3px 0px var(--border-color);
}

.btn-outline:hover {
  border-color: #CBD5E1;
  background-color: #F8FAFC;
  box-shadow: 0 1px 0px #CBD5E1;
  transform: translateY(-1px);
}

.btn-large {
  padding: 1.1rem 2.5rem;
  font-size: 1.25rem;
  border-radius: var(--radius-pill);
}

/* ── Badges ───────────────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-green {
  background-color: var(--bg-soft-green);
  color: var(--primary-dark);
  border: 1px solid var(--primary-light);
}

.badge-blue {
  background-color: var(--bg-soft-blue);
  color: var(--secondary-dark);
  border: 1px solid var(--secondary-light);
}

.badge-amber {
  background-color: var(--bg-soft-amber);
  color: var(--accent-amber-dark);
  border: 1px solid #FDE68A;
}

/* ── Hero Section ─────────────────────────────────── */
.hero-section {
  padding: 7rem 0 4.5rem !important;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.hero-content h1 .text-highlight-green {
  color: var(--primary);
}

.hero-content h1 .text-highlight-blue {
  color: var(--secondary);
}

.hero-content p.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 600;
}

.hero-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-trust-item svg {
  color: var(--primary);
}

/* Hero Showcase (Right Column) */
.hero-showcase {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 0.85rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  border: 2px solid #EDE8DF;
  overflow: visible;
}

.hero-main-img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 4px);
  display: block;
  object-fit: cover;
}

/* Floating Badges on Hero */
.floating-badge {
  position: absolute;
  background: white;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  border: 1.5px solid #EDE8DF;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10;
  animation: float 4s ease-in-out infinite;
}

.floating-badge.badge-top-left {
  top: -1.2rem;
  left: -1.5rem;
  animation-delay: 0s;
}

.floating-badge.badge-bottom-right {
  bottom: -1.5rem;
  right: -1rem;
  animation-delay: 2s;
}

.floating-badge.badge-bottom-left {
  bottom: 1.5rem;
  left: -2rem;
  animation-delay: 1s;
}

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

.float-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.float-text h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.float-text span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── Interactive Live Quiz Widget Section ─────────── */
.interactive-quiz-section {
  padding: 3rem 0 5rem;
}

.quiz-container-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid #EDE8DF;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  padding: 2.5rem;
  max-width: 880px;
  margin-inline: auto;
  position: relative;
}

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

.quiz-subject-tabs {
  display: flex;
  gap: 0.5rem;
  background: #F8FAFC;
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.quiz-tab-btn {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 800;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-heading);
}

.quiz-tab-btn.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quiz-xp-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-soft-amber);
  color: var(--accent-amber-dark);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px solid #FDE68A;
}

.quiz-question-box {
  margin-bottom: 1.75rem;
}

.quiz-question-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
  margin-top: 0.5rem;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quiz-option-btn {
  background: white;
  border: 2px solid var(--border-color);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: 0 3px 0px var(--border-color);
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--secondary);
  background-color: var(--bg-soft-blue);
  transform: translateY(-2px);
  box-shadow: 0 5px 0px var(--secondary-light);
}

.quiz-option-btn.selected-correct {
  border-color: var(--primary) !important;
  background-color: var(--bg-soft-green) !important;
  color: var(--primary-dark) !important;
  box-shadow: 0 4px 0px var(--primary-dark) !important;
}

.quiz-option-btn.selected-wrong {
  border-color: #EF4444 !important;
  background-color: #FEF2F2 !important;
  color: #DC2626 !important;
  box-shadow: 0 4px 0px #B91C1C !important;
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #F1F5F9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.quiz-feedback-box {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  animation: fadeIn 0.3s ease;
}

.quiz-feedback-box.correct {
  background: var(--bg-soft-green);
  border: 1.5px solid var(--primary-light);
  color: #065F46;
}

.quiz-feedback-box.wrong {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  color: #991B1B;
}

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

/* ── Subject Cards Grid ───────────────────────────── */
.section-title-wrap {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-title-wrap p {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 600;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.subject-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem 1.6rem;
  border: 2px solid #EDE8DF;
  box-shadow: var(--shadow-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.subject-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
}

.subject-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.subject-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.subject-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.subject-topic-pill {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: #F8FAFC;
  color: var(--text-muted);
}

/* ── Interactive Grade Explorer ──────────────────── */
.grades-section {
  padding: 4rem 0 5rem;
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid #EDE8DF;
  margin-bottom: 5rem;
  box-shadow: var(--shadow-sm);
}

.grade-pills-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.grade-pill-btn {
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 0px var(--border-color);
}

.grade-pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.grade-pill-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 0px var(--primary-dark);
  transform: translateY(-2px);
}

.grade-preview-card {
  max-width: 920px;
  margin-inline: auto;
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  border: 1.5px solid #EDE8DF;
}

.grade-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.grade-topic-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.grade-topic-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.grade-topic-col li {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.grade-topic-col li::before {
  content: "•";
  color: var(--primary);
  font-weight: 900;
  font-size: 1.2rem;
}

/* ── Trust & Parent Proof ────────────────────────── */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.trust-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  border: 2px solid #EDE8DF;
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trust-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--bg-soft-green);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.trust-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.trust-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Testimonials ─────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  border: 2px solid #EDE8DF;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.test-stars {
  color: #F59E0B;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial-card p {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.65;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.test-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.test-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--secondary) 0%, #1D4ED8 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.test-info h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.test-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Final Call To Action ─────────────────────────── */
.final-cta-card {
  background: linear-gradient(135deg, #065F46 0%, #047857 50%, #0F766E 100%);
  border-radius: var(--radius-xl);
  padding: 4.5rem 2rem;
  text-align: center;
  color: white;
  margin-bottom: 4rem;
  box-shadow: 0 20px 45px rgba(6, 95, 70, 0.25);
  position: relative;
  overflow: hidden;
}

.final-cta-card h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.final-cta-card p {
  font-size: 1.25rem;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 2.25rem;
  opacity: 0.95;
  font-weight: 600;
}

.final-cta-btn {
  background: #F59E0B;
  color: #78350F;
  font-size: 1.2rem;
  padding: 1.15rem 2.8rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  box-shadow: 0 5px 0px #D97706, 0 12px 24px rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.final-cta-btn:hover {
  background: #FBBF24;
  transform: translateY(-2px);
}

/* ── Footer ───────────────────────────────────────── */
footer {
  background: white;
  border-top: 2px solid #EDE8DF;
  padding: 4rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--primary-dark);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Legal & Policy Pages (Privacy, Terms, Delete Data) ─ */
.legal-page {
  padding-top: 8.5rem;
  padding-bottom: 7rem;
  max-width: 880px;
  margin-inline: auto;
  width: 100%;
}

.legal-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.legal-header h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.legal-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-content {
  background: white;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  padding: 3.5rem 3rem;
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-soft-green);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.legal-content ul {
  margin-left: 1.75rem;
  margin-bottom: 1.5rem;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.75;
}

.legal-content li {
  margin-bottom: 0.65rem;
  font-weight: 500;
}

.legal-content strong {
  color: var(--text-main);
  font-weight: 700;
}

.legal-cta {
  margin-top: 1.75rem;
  display: inline-flex;
}

/* ── TV Activation Page ────────────────────────────── */
.activate-page {
  min-height: calc(100vh - 220px);
  padding-top: 8.5rem;
  padding-bottom: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1.5rem;
  width: 100%;
}

.activate-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  padding: 3.5rem 3rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.activate-card h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.activate-card > p {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.code-input {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  outline: none;
  background: var(--bg-card-hover);
  color: var(--text-main);
  text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.code-input::placeholder {
  color: var(--text-light);
  letter-spacing: 0.25rem;
}

.code-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.status-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
}

.status-message.success {
  background: var(--bg-soft-green);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
}

.status-message.error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1.5px solid #FECACA;
}

.status-message.loading,
.status-message.signing-in {
  background: var(--bg-soft-blue);
  color: var(--secondary-dark);
  border: 1.5px solid var(--secondary-light);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-soft-blue);
  border: 1.5px solid var(--secondary-light);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary-dark);
  text-align: left;
}

/* ── Mobile Responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .subjects-grid,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Tab / Narrow Browser Breakpoint ─────────────── */
/* Fixes header crowding when the browser is in a narrow tab (~640-900px).  */
/* Tightens nav gaps, shrinks fonts, and hides the secondary header button   */
/* so the primary Login button is always fully visible.                       */
@media (max-width: 900px) {
  .nav-links {
    gap: 0.9rem;
  }
  .nav-links a {
    font-size: 0.88rem;
    padding: 0.25rem 0.35rem;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .header-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  /* If logged in, keep dashboard button visible */
  .header-actions .btn-primary.dashboard-btn {
    display: inline-flex;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
  }
  .logo {
    font-size: 1.35rem;
  }
  .logo-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .header-inner {
    padding: 0.7rem 1.1rem;
  }
}

/* Below 750px, hide Sign Up Free to keep Log In always visible */
@media (max-width: 750px) {
  .header-actions .btn-primary:not(.dashboard-btn) {
    display: none;
  }
}

@media (max-width: 640px) {
  header {
    top: 0.5rem !important;
    width: calc(100% - 1rem) !important;
  }
  .header-inner {
    padding: 0.6rem 1rem !important;
  }
  .hero-section {
    padding-top: 5.5rem !important;
  }
  section[id], div[id] {
    scroll-margin-top: 5rem;
  }
  .hero-content h1 {
    font-size: 2.3rem;
  }
  .nav-links {
    display: none;
  }
  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
  .subjects-grid,
  .trust-grid,
  .testimonials-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
  }
  .grade-preview-grid {
    grid-template-columns: 1fr;
  }
  .legal-page {
    padding-top: 6.5rem;
    padding-bottom: 4.5rem;
  }
  .legal-header h1 {
    font-size: 2.2rem;
  }
  .legal-content {
    padding: 2rem 1.25rem;
    border-radius: var(--radius-lg);
  }
  .activate-page {
    padding-top: 6.5rem;
    padding-bottom: 4.5rem;
  }
  .activate-card {
    padding: 2.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }
}
