/* ============================================================
   AHA Elementary — Safe & Smart Online
   Kid-first design: calm focus colors, large targets, Nunito
   Research basis: Forest/sky reduce anxiety; orange energizes
   interaction; purple signals creativity; warm background
   prevents eye strain; 18px+ base for grade 3-5 readability
   ============================================================ */

@import url('fonts/fonts.css');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --forest:       #2d7a4f;
  --forest-dark:  #1a5535;
  --forest-light: #e8f5ee;
  --sky:          #3d8fc4;
  --sky-light:    #e6f3fb;
  --sun:          #f0a500;
  --sun-light:    #fff4d6;
  --berry:        #7c4fa0;
  --berry-light:  #f0e9fa;
  --coral:        #e84040;
  --coral-light:  #fde8e8;
  --mint:         #c8eedd;
  --white:        #ffffff;
  --cream:        #f8faf5;  /* sage-tinted cream — reduces eye strain */
  --text:         #1a2e1a;
  --text-mid:     #3d5c3d;
  --text-muted:   #6b8c6b;
  --gold:         #c49a28;
  --gold-light:   #fff8e1;

  --r:   16px;
  --rlg: 24px;
  --rxl: 36px;
  --font:'Nunito', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 4px 20px rgba(45,122,79,.10);
  --shadow-lg: 0 8px 40px rgba(45,122,79,.18);

  --sidebar-w: 260px;
  --header-h: 64px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  font-size: 18px;
}
a { color: var(--forest); }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ── Layout ─────────────────────────────────────────────── */
.course-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--forest-dark);
  position: fixed; top:0; left:0; bottom:0;
  overflow-y: auto;
  z-index: 200;
  transition: transform 0.28s ease;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar-logo-text {
  font-size: 13px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sun);
}
.sidebar-logo-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top:2px; }

.sidebar-modules { padding: 12px 0 24px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  font-size: 13px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar-item:hover { background: rgba(255,255,255,0.07); color: white; }
.sidebar-item.active { background: rgba(240,165,0,0.15); color: var(--sun); border-left-color: var(--sun); }
.sidebar-item.done { color: var(--mint); }
.sidebar-item .si-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.sidebar-item.active .si-num { background: var(--sun); color: var(--forest-dark); }
.sidebar-item.done .si-num { background: var(--forest); color: white; }
.sidebar-stars { margin-left: auto; font-size: 14px; letter-spacing: -1px; }

.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ────────────────────────────────────────────── */
.top-bar {
  position: sticky; top:0; z-index:100;
  background: var(--white);
  border-bottom: 2px solid var(--forest-light);
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  box-shadow: 0 2px 12px rgba(45,122,79,.07);
}
.menu-btn {
  display: none;
  background: none; border: none;
  font-size: 22px; color: var(--forest);
  padding: 8px; border-radius: 8px;
}
.top-bar-title {
  font-weight: 800; font-size: 15px; color: var(--forest-dark);
  flex: 1;
}
.star-pill {
  background: var(--sun-light);
  color: var(--gold);
  font-weight: 800; font-size: 13px;
  padding: 6px 14px; border-radius: 99px;
  letter-spacing: .02em;
}

/* ── Content area ───────────────────────────────────────── */
.content-area { flex:1; padding: 28px 32px 60px; max-width: 820px; }

/* ── Module hero ────────────────────────────────────────── */
.module-hero {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 60%, #3d9e6a 100%);
  border-radius: var(--rxl);
  padding: 36px 40px 30px;
  margin-bottom: 28px;
  color: white;
  position: relative; overflow: hidden;
}
.module-hero::before {
  content: '';
  position: absolute; top:-60px; right:-60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.hero-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--sun);
  margin-bottom: 10px;
}
.hero-title {
  font-size: 32px; font-weight: 900;
  line-height: 1.2; margin-bottom: 10px;
}
.hero-sub {
  font-size: 16px; color: rgba(255,255,255,0.78);
  max-width: 480px; line-height: 1.6; margin-bottom: 24px;
}
.hero-badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.9);
}

/* ── Story panels ───────────────────────────────────────── */
.story-wrap {
  background: white;
  border-radius: var(--rlg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 2px solid var(--forest-light);
}
.story-label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--forest);
  margin-bottom: 16px;
}
.story-panels { display: flex; flex-direction: column; gap: 16px; }
.story-panel {
  display: flex; gap: 16px; align-items: flex-start;
}
.story-panel.reverse { flex-direction: row-reverse; }
.story-char {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  background: var(--forest-light);
}
.story-char.pixel { background: var(--sun-light); }
.story-char.mom { background: var(--berry-light); }
.story-char.caleb { background: var(--sky-light); }
.story-char.jax { background: var(--coral-light); }
.story-bubble {
  background: var(--forest-light);
  border-radius: 0 var(--rlg) var(--rlg) var(--rlg);
  padding: 14px 18px;
  font-size: 16px; color: var(--text);
  line-height: 1.55; flex: 1;
  position: relative;
}
.story-bubble.narrator {
  background: var(--cream);
  border-radius: var(--rlg);
  font-style: italic;
  color: var(--text-mid);
  border: 1.5px solid var(--forest-light);
}
.story-panel.reverse .story-bubble {
  border-radius: var(--rlg) 0 var(--rlg) var(--rlg);
}
.story-bubble.jax-bubble {
  background: #fff0f0;
  border: 1.5px solid #fcc;
  border-radius: 0 var(--rlg) var(--rlg) var(--rlg);
}
.bubble-name {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 4px;
  color: var(--forest);
}
.bubble-name.jax-name { color: var(--coral); }
.bubble-name.pixel-name { color: var(--sun); }
.bubble-name.mom-name { color: var(--berry); }
.bubble-name.caleb-name { color: var(--sky); }

/* ── Big Idea card ──────────────────────────────────────── */
.big-idea {
  background: linear-gradient(135deg, var(--sun-light), var(--gold-light));
  border: 2px solid var(--sun);
  border-radius: var(--rlg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex; gap: 18px; align-items: flex-start;
}
.big-idea-icon { font-size: 36px; flex-shrink: 0; margin-top: 2px; }
.big-idea-label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 6px;
}
.big-idea-text { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.5; }

/* ── Activities ─────────────────────────────────────────── */
.activity-card {
  background: white;
  border-radius: var(--rlg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 2px solid var(--forest-light);
}
.activity-label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sky);
  margin-bottom: 6px;
}
.activity-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.activity-desc { font-size: 15px; color: var(--text-mid); margin-bottom: 20px; }

/* Sort activity */
.sort-items { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.sort-item {
  padding: 12px 18px;
  background: var(--cream);
  border: 2px solid var(--forest-light);
  border-radius: 99px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.sort-item:hover { border-color: var(--forest); transform: translateY(-2px); }
.sort-item.selected-share { background: var(--mint); border-color: var(--forest); }
.sort-item.selected-private { background: #fde8e8; border-color: var(--coral); }

.sort-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.sort-zone {
  border: 3px dashed var(--forest-light);
  border-radius: var(--rlg);
  padding: 20px;
  min-height: 100px;
  transition: all 0.2s;
}
.sort-zone.share-zone { border-color: var(--forest); background: var(--forest-light); }
.sort-zone.private-zone { border-color: var(--coral); background: var(--coral-light); }
.sort-zone-label {
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 10px;
}
.sort-zone.share-zone .sort-zone-label { color: var(--forest); }
.sort-zone.private-zone .sort-zone-label { color: var(--coral); }
.sort-result { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-result-item {
  padding: 6px 14px; border-radius: 99px;
  font-size: 13px; font-weight: 700;
  background: white; border: 1.5px solid rgba(0,0,0,.08);
}

/* Tap activity */
.tap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tap-card {
  padding: 18px 20px;
  background: var(--cream);
  border: 2px solid var(--forest-light);
  border-radius: var(--rlg);
  cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text);
  text-align: center;
  transition: all 0.22s;
  user-select: none;
}
.tap-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tap-card.revealed-safe { background: var(--mint); border-color: var(--forest); }
.tap-card.revealed-unsafe { background: var(--coral-light); border-color: var(--coral); }
.tap-card.revealed-true { background: var(--mint); border-color: var(--forest); }
.tap-card.revealed-false { background: var(--coral-light); border-color: var(--coral); }
.tap-result {
  font-size: 13px; font-weight: 700; margin-top: 8px;
  display: none;
}
.tap-card.revealed-safe .tap-result,
.tap-card.revealed-true .tap-result { display: block; color: var(--forest); }
.tap-card.revealed-unsafe .tap-result,
.tap-card.revealed-false .tap-result { display: block; color: var(--coral); }
.tap-icon { font-size: 28px; margin-bottom: 8px; }

/* Safety team builder */
.safety-team-wrap { display: flex; flex-direction: column; gap: 14px; }
.safety-input-row { display: flex; gap: 12px; align-items: center; }
.safety-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--forest); color: white;
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.safety-input {
  flex: 1; padding: 14px 18px;
  border: 2.5px solid var(--forest-light);
  border-radius: 99px;
  font-size: 16px; font-weight: 600; font-family: var(--font);
  color: var(--text);
  transition: border-color 0.2s;
  background: var(--cream);
}
.safety-input:focus { outline: none; border-color: var(--forest); background: white; }
.magic-phrase {
  background: var(--forest);
  color: white;
  border-radius: var(--rlg);
  padding: 18px 24px;
  margin-top: 8px;
  font-size: 16px; font-weight: 700; text-align: center;
  line-height: 1.5;
}
.magic-phrase span { color: var(--sun); }

/* Brain check */
.brain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brain-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--rlg);
  border: 2px solid var(--forest-light);
  background: var(--cream);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.brain-item .bi-icon { font-size: 24px; flex-shrink: 0; }
.brain-item:hover { border-color: var(--forest); }
.brain-item.checked { background: var(--mint); border-color: var(--forest); }
.brain-check { width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--forest-light); background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0; margin-top: 2px; transition: all 0.2s; }
.brain-item.checked .brain-check { background: var(--forest); border-color: var(--forest); color: white; }

/* ── Quiz ───────────────────────────────────────────────── */
.quiz-wrap {
  background: white;
  border-radius: var(--rlg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  border: 2px solid var(--forest-light);
  margin-bottom: 24px;
}
.quiz-label {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--berry);
  margin-bottom: 6px;
}
.quiz-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.quiz-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.quiz-stars-earned { font-size: 24px; letter-spacing: 3px; }
.quiz-q-num {
  font-size: 12px; font-weight: 800; color: var(--text-muted);
  letter-spacing: .08em; margin-bottom: 10px;
}
.quiz-q-text { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 18px; line-height: 1.45; }
.quiz-choices { display: flex; flex-direction: column; gap: 10px; }
.quiz-choice {
  padding: 16px 20px;
  background: var(--cream);
  border: 2.5px solid var(--forest-light);
  border-radius: var(--rlg);
  font-size: 16px; font-weight: 600; color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-choice:hover:not(:disabled) { border-color: var(--forest); background: var(--forest-light); transform: translateX(4px); }
.quiz-choice.correct { background: var(--mint); border-color: var(--forest); color: var(--forest-dark); }
.quiz-choice.wrong { background: var(--coral-light); border-color: var(--coral); color: #7a1212; }
.quiz-choice:disabled { cursor: default; }
.quiz-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 16px; font-weight: 700;
  display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.correct-fb { background: var(--mint); color: var(--forest-dark); }
.quiz-feedback.wrong-fb { background: var(--coral-light); color: #7a1212; }
.quiz-next-btn {
  margin-top: 18px;
  padding: 14px 32px;
  background: var(--forest);
  color: white;
  border: none;
  border-radius: 99px;
  font-size: 16px; font-weight: 800;
  cursor: pointer;
  display: none;
  transition: all 0.2s;
}
.quiz-next-btn:hover { background: var(--forest-dark); transform: translateY(-2px); }
.quiz-next-btn.show { display: inline-block; }
.quiz-progress { display: flex; gap: 6px; margin-bottom: 20px; }
.quiz-pip { width: 28px; height: 6px; border-radius: 99px; background: var(--forest-light); }
.quiz-pip.done { background: var(--forest); }
.quiz-pip.active { background: var(--sun); }

/* Quiz complete */
.quiz-complete { text-align: center; padding: 20px 0; }
.quiz-complete-emoji { font-size: 56px; margin-bottom: 12px; }
.quiz-complete-title { font-size: 26px; font-weight: 900; color: var(--forest-dark); margin-bottom: 8px; }
.quiz-complete-stars { font-size: 36px; letter-spacing: 4px; margin-bottom: 12px; }
.quiz-complete-msg { font-size: 16px; color: var(--text-mid); margin-bottom: 24px; }
.retry-btn {
  padding: 12px 28px; background: white;
  border: 2.5px solid var(--forest); border-radius: 99px;
  font-size: 15px; font-weight: 800; color: var(--forest);
  cursor: pointer; margin-right: 12px;
  transition: all 0.2s;
}
.retry-btn:hover { background: var(--forest-light); }

/* ── Badge celebration ──────────────────────────────────── */
.badge-card {
  background: linear-gradient(135deg, var(--forest-dark), var(--forest));
  border-radius: var(--rxl);
  padding: 36px 32px;
  text-align: center; color: white;
  margin-bottom: 24px;
}
.badge-icon { font-size: 64px; margin-bottom: 10px; }
.badge-title { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.badge-desc { font-size: 15px; color: rgba(255,255,255,0.75); margin-bottom: 20px; }
.badge-earned { background: var(--sun); color: var(--forest-dark);
  font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; padding: 6px 20px; border-radius: 99px;
  display: inline-block; margin-bottom: 20px;
}

/* ── Nav buttons ────────────────────────────────────────── */
.nav-bar { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.btn {
  padding: 14px 28px;
  border-radius: 99px;
  font-size: 16px; font-weight: 800;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.22s;
  text-decoration: none; display: inline-block;
  font-family: var(--font);
}
.btn-green { background: var(--forest); color: white; border-color: var(--forest); }
.btn-green:hover { background: var(--forest-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: white; color: var(--forest); border-color: var(--forest); }
.btn-outline:hover { background: var(--forest-light); }
.btn-sun { background: var(--sun); color: var(--forest-dark); border-color: var(--sun); }
.btn-sun:hover { background: #d4900a; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-dim { background: var(--cream); color: var(--text-muted); border-color: var(--forest-light); cursor: default; }

/* ── Index / landing ────────────────────────────────────── */
.landing-hero {
  background: linear-gradient(150deg, #1a5535 0%, #2d7a4f 50%, #3d9e6a 100%);
  min-height: 420px;
  display: flex; align-items: center;
  padding: 60px 8vw;
  position: relative; overflow: hidden;
}
.landing-hero::after {
  content: '🏔️';
  position: absolute; right: 5vw; bottom: 0;
  font-size: 200px; opacity: 0.1;
  line-height: 1;
}
.landing-hero-content { max-width: 600px; color: white; }
.landing-tag {
  font-size: 11px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--sun); margin-bottom: 14px;
}
.landing-h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.15; margin-bottom: 16px; }
.landing-sub { font-size: 18px; color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 32px; }
.landing-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.landing-badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 13px; font-weight: 700; color: white;
}
.landing-content { max-width: 900px; margin: 0 auto; padding: 56px 8vw; }
.module-preview-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 32px 0; }
.module-preview-card {
  background: white;
  border: 2px solid var(--forest-light);
  border-radius: var(--rlg);
  padding: 20px;
  text-align: center;
  transition: all 0.22s;
}
.module-preview-card:hover { border-color: var(--forest); box-shadow: var(--shadow); transform: translateY(-3px); }
.mpc-icon { font-size: 36px; margin-bottom: 10px; }
.mpc-num { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.mpc-title { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; }

/* ── Certificate ────────────────────────────────────────── */
.cert-wrap {
  max-width: 680px; margin: 40px auto;
  background: white;
  border: 6px solid var(--forest);
  border-radius: var(--rxl);
  padding: 52px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.cert-wrap::before {
  content: '';
  position: absolute; inset: 10px;
  border: 2px solid var(--sun);
  border-radius: 24px;
  pointer-events: none;
}
.cert-badge { font-size: 72px; margin-bottom: 12px; }
.cert-label {
  font-size: 11px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--forest);
  margin-bottom: 8px;
}
.cert-title { font-size: 36px; font-weight: 900; color: var(--forest-dark); margin-bottom: 8px; }
.cert-sub { font-size: 18px; color: var(--text-mid); margin-bottom: 24px; }
.cert-name-line {
  border-bottom: 3px solid var(--forest);
  padding-bottom: 8px;
  font-size: 28px; font-weight: 900; color: var(--forest);
  margin: 0 auto 24px; min-width: 240px; display: inline-block;
}
.cert-modules { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.cert-stars { font-size: 28px; letter-spacing: 4px; margin-bottom: 24px; }
.cert-sig { display: flex; justify-content: center; gap: 48px; margin-top: 28px; }
.cert-sig-line { text-align: center; }
.cert-sig-name { font-size: 14px; font-weight: 800; color: var(--forest-dark); border-top: 2px solid var(--forest-light); padding-top: 8px; }
.cert-sig-title { font-size: 11px; color: var(--text-muted); letter-spacing: .06em; }

/* ── Pixel dog SVG helper ───────────────────────────────── */
.pixel-sprite { display: inline-block; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes bounce-in {
  0%   { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.12) rotate(3deg); }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes star-pop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes pulse-sun {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,165,0,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(240,165,0,0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.bounce-in { animation: bounce-in 0.55s cubic-bezier(.36,.07,.19,.97); }
.float { animation: float 3s ease-in-out infinite; }
.pulse-sun { animation: pulse-sun 2s infinite; }

/* ── Orientation ────────────────────────────────────────── */
.orientation-hero {
  background: linear-gradient(135deg, var(--forest-dark), var(--forest));
  border-radius: var(--rxl);
  padding: 40px 40px 36px;
  color: white; margin-bottom: 28px; text-align: center;
}
.ori-char { font-size: 72px; margin-bottom: 12px; animation: float 3s ease-in-out infinite; }
.ori-title { font-size: 28px; font-weight: 900; margin-bottom: 10px; }
.ori-sub { font-size: 16px; color: rgba(255,255,255,0.78); max-width: 420px; margin: 0 auto 24px; }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .menu-btn { display: flex; }
  .content-area { padding: 20px 16px 48px; }
  .module-hero { padding: 28px 24px 24px; border-radius: var(--rlg); }
  .hero-title { font-size: 26px; }
  .tap-grid { grid-template-columns: 1fr; }
  .sort-zones { grid-template-columns: 1fr; }
  .brain-grid { grid-template-columns: 1fr; }
  .module-preview-grid { grid-template-columns: 1fr 1fr; }
  .story-wrap { padding: 20px 18px; }
  .activity-card { padding: 20px 18px; }
  .quiz-wrap { padding: 20px 18px; }
  .cert-wrap { padding: 36px 24px; }
  .quiz-choice { font-size: 15px; padding: 14px 16px; }
}
@media (max-width: 420px) {
  .hero-title { font-size: 22px; }
  .sort-items .sort-item { font-size: 13px; padding: 10px 14px; }
  .module-preview-grid { grid-template-columns: 1fr; }
}

/* ── Mobile additions ── */
@media (max-width: 480px) {
  /* Content padding tighter on small phones */
  .content-area { padding: 16px 12px 48px; }
  .landing-content { padding: 32px 5vw !important; }

  /* Story panels: char image stays 72px, text stays readable */
  .story-char { width: 60px !important; height: 60px !important; }
  .story-char img { height: 72px !important; }
  .story-bubble { font-size: 14px; padding: 10px 14px; }

  /* Quiz choices: full width, large tap targets */
  .quiz-choices { gap: 8px; }
  .quiz-choice { font-size: 14px; padding: 14px 12px; }

  /* Nav bar: stack buttons vertically */
  .nav-bar { flex-direction: column; }
  .nav-bar .btn { text-align: center; }

  /* Certificate: sig row stacks */
  .cert-sig { flex-direction: column; gap: 24px; }
  .cert-wrap { padding: 28px 16px; }
  .cert-title { font-size: 26px; }

  /* Activity tap grid: already 1col at 768px via tap-grid rule */

  /* Module preview grid already 1col at 420px */

  /* Landing hero collapses at 680px already — add tighter text */
  .landing-h1 { font-size: 28px; }
  .landing-sub { font-size: 15px; }
  .landing-badge { font-size: 11px; padding: 6px 12px; }

  /* Big idea card */
  .big-idea { flex-direction: column; gap: 10px; }
  .big-idea-icon { font-size: 28px; }

  /* Badge celebration card */
  .badge-card { padding: 28px 20px; }
  .badge-icon { font-size: 48px; }

  /* Sort items wrap tightly */
  .sort-items { gap: 8px; }
  .sort-item { font-size: 13px; padding: 10px 12px; }
}

@media (max-width: 360px) {
  /* Very small phones (Galaxy S8 etc) */
  .hero-title { font-size: 20px !important; }
  .content-area { padding: 12px 10px 48px; }
  .quiz-choice { padding: 12px 10px; }
}
