/* =====================================================================
   Meiword — design system (logo-matched)
   Indigo/violet/amber to match the logo. Bricolage Grotesque display,
   Inter body. All class names match the HTML/JS; restyle freely here.
   ===================================================================== */
:root {
  --primary: #6366f1;      /* indigo — buttons, active states, links */
  --primary-dark: #4f46e5; /* primary hover */
  --secondary: #8b5cf6;    /* violet — gradients, accents */
  --soft: #e9ebfd;         /* light indigo tint — badges, hovers */
  --forest: #1e1b4b;       /* deep indigo ink — hero panels, timer bars, footer */
  --gold: #f59e0b;         /* amber — accents, badges, sticky note */
  --gold-deep: #92400e;    /* amber text on light */
  --coral: #e4573d;        /* record button coral red, decorative */
  --mint: #d1fae5;         /* success fill */
  --teal: #0E7C5B;         /* success text, teacher labels */
  --pink: #fee2e2;         /* error fill */
  --errred: #b91c1c;       /* error text */
  --peach: #ffedd5;
  --paleblue: #e0e7ff;
  --creamchip: #FEF3C7;    /* target/mission tints */
  --sage: #ecfdf5;         /* teacher instruction panels */
  --ink: #1e1b4b;          /* logo wordmark ink */
  --muted: #5b5b7a;        /* secondary text */
  --bg: #f7f7fd;           /* page background */
  --card: #fff;
  --line: #e6e6f5;         /* light indigo-gray borders */
  --sand: #e9e9f7;         /* soft tint for chips */
  --radius: 18px;
  --shadow: 0 8px 28px rgba(30, 27, 75, 0.10);
  --shadow-sm: 0 3px 12px rgba(30, 27, 75, 0.08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  /* faint dotted grid texture */
  background-image: radial-gradient(rgba(99, 102, 241, 0.08) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3, .price, .level-tag { font-family: var(--font-display); }

/* ---------- hand-coded SVG icon set (inline <defs> per page) ---------- */
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -5px;
}
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 40px; height: 40px; }
.icon-inline { width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-right: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / nav ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(30, 27, 75, 0.08);
  border-bottom-color: rgba(230, 230, 245, 0.85);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.88rem;
  padding: 8px 13px; border-radius: 999px;
}
.nav a:hover, .nav a.active { background: var(--soft); color: var(--primary); }
.nav a.cta { background: var(--primary); color: #fff; font-weight: 800; }
.nav a.cta:hover { background: var(--primary-dark); }
/* mobile hamburger */
.nav-toggle {
  display: none; border: 0; background: none; cursor: pointer;
  padding: 10px; color: var(--ink); border-radius: 12px;
}
.nav-toggle:hover { background: var(--soft); }
.nav-toggle .icon { vertical-align: 0; }

/* ---------- hero (homepage - full bleed) ---------- */
.hero.hero-home {
  background: linear-gradient(135deg, var(--primary) 0%, var(--forest) 78%);
  color: #fff; padding: 68px 0 76px; overflow: hidden; position: relative;
}
.hero.hero-home::before {
  content: ""; position: absolute; right: -70px; top: -70px; width: 300px; height: 300px;
  background: rgba(245, 158, 11, 0.18); border-radius: 50%; pointer-events: none;
}
.hero.hero-home::after {
  content: ""; position: absolute; left: 6%; bottom: -110px; width: 220px; height: 220px;
  border: 26px solid rgba(255, 255, 255, 0.06); border-radius: 50%; pointer-events: none;
}
.hero.hero-home .wrap { position: relative; z-index: 1; }
.hero.hero-home h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; margin: 0 0 12px; letter-spacing: -1px; }
.hero.hero-home p.lead { font-size: 1.15rem; max-width: 640px; opacity: 0.95; margin: 0 0 28px; }
.hero.hero-home .logo-hero { height: 64px; margin-bottom: 18px; filter: brightness(0) invert(1); }

/* ---------- hero (inner pages & session - rounded floating card) ---------- */
.hero:not(.hero-home),
.session-hero {
  background: transparent;
  padding: 28px 20px 0;
  position: relative;
}
.hero:not(.hero-home) .wrap,
.session-hero .wrap {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--forest) 0%, var(--primary) 100%);
  border-radius: 24px;
  padding: 48px 46px 52px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero:not(.hero-home) .wrap::before,
.session-hero .wrap::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: rgba(245, 158, 11, 0.20); border-radius: 50%; pointer-events: none;
}
.hero:not(.hero-home) .wrap::after,
.session-hero .wrap::after {
  content: ""; position: absolute; left: 42%; bottom: -90px; width: 180px; height: 180px;
  border: 22px solid rgba(228, 87, 61, 0.22); border-radius: 50%; pointer-events: none;
}
.hero:not(.hero-home) h1,
.session-hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
  line-height: 1.15;
}
.hero:not(.hero-home) p.lead {
  position: relative;
  z-index: 1;
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 720px;
  opacity: 0.95;
  margin: 0 0 24px;
}
.hero:not(.hero-home) p.lead:last-child {
  margin-bottom: 0;
}
.hero:not(.hero-home) .btn-row {
  position: relative;
  z-index: 1;
}

/* Slim hero variation for levels, materials, about, placement */
.hero.slim:not(.hero-home) .wrap {
  padding: 44px 44px 46px;
}
.hero.slim:not(.hero-home) h1 {
  font-size: clamp(1.95rem, 4.5vw, 2.75rem);
  margin-bottom: 12px;
}
.hero.slim:not(.hero-home) p.lead {
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* Consistent spacing: tighter gap between floating hero card and body content */
.hero:not(.hero-home) + .section {
  padding-top: 28px;
}
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 14px 30px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 1rem; transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--soft); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--gold); color: #3b2f04; }
.btn-accent:hover { background: #d97706; }
.btn-ghost { background: transparent; color: var(--primary); border: 2px solid var(--line); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- cards & grids ---------- */
.section { padding: 56px 0; }
.section h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 8px; }
.section .sub { color: var(--muted); margin: 0 0 28px; max-width: 720px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; }
.card p { margin: 0 0 14px; color: var(--muted); }
.card .card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--soft); color: var(--primary); margin-bottom: 12px;
}
.level-card { text-decoration: none; color: inherit; display: block; transition: transform .12s ease; }
.level-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.level-tag {
  display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--primary), var(--forest)); color: #fff;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; text-transform: uppercase;
}
.level-card h3 { margin: 6px 0 6px; }
.level-card .go { color: var(--primary); font-weight: 700; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; position: relative; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--soft); color: var(--primary); font-weight: 800; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); }

/* ---------- levels page ---------- */
.level-block { background: var(--card); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.level-head {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 14px; padding: 18px 22px; font: inherit;
}
.level-head:hover { background: #f4f4fe; }
.level-head .chev { margin-left: auto; color: var(--muted); transition: transform .15s ease; }
.level-block.open .level-head .chev { transform: rotate(180deg); }
.level-body { display: none; border-top: 1px solid var(--line); padding: 8px 22px 22px; }
.level-block.open .level-body { display: block; }
.module { margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.module-head {
  width: 100%; text-align: left; background: #f4f4fe; border: 0; cursor: pointer;
  padding: 12px 16px; font: inherit; font-weight: 700; display: flex; gap: 10px; align-items: center;
}
.module-head .n {
  background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 800;
  width: 28px; height: 28px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; flex: none;
}
.module-head .chev { margin-left: auto; color: var(--muted); }
.module.open .module-head .chev { transform: rotate(180deg); }
.module-sessions { display: none; padding: 4px 16px 14px; }
.module.open .module-sessions { display: block; }
.session-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-top: 1px dashed var(--line); text-decoration: none; color: inherit;
}
.session-row:first-child { border-top: 0; }
a.session-row:hover { background: #f4f4fe; border-radius: 8px; }
.session-row .sn {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--soft); color: var(--primary); font-weight: 800; font-size: 0.85rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.session-row .st { flex: 1; }
.session-row .st b { display: block; }
.session-row .st small { color: var(--muted); }
.pill {
  flex: none; font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  background: var(--soft); color: var(--primary);
}
.pill.soon { background: var(--sand); color: var(--muted); }
.session-row.disabled { opacity: 0.75; cursor: default; }

/* "Continue where you left off" card + last-opened session highlight */
.continue-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--creamchip); border: 2px solid var(--gold); border-radius: 16px;
  padding: 16px 20px; margin: 0 0 22px;
}
.continue-card .cc-kicker {
  display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 4px;
}
.continue-card .cc-title { display: block; font-weight: 800; font-size: 1.05rem; }
.continue-card .cc-sub { display: block; color: var(--muted); margin-top: 2px; }
.continue-card .cc-go { display: inline-block; margin-top: 10px; font-weight: 800; color: var(--gold-deep); }
a.session-row.last { background: #fff8e6; border-radius: 8px; outline: 2px solid var(--gold); outline-offset: -2px; }

/* ---------- category hub cards (levels.html) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 18px;
}
.category-card {
  display: flex;
  flex-direction: column;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: 0 2px 8px rgba(30, 27, 75, 0.05);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(30, 27, 75, 0.10);
}
.category-card.disabled {
  background: transparent;
  border: 1.5px dashed #d3d3e6;
  box-shadow: none;
  cursor: default;
}
.category-card.disabled:hover {
  transform: none;
  box-shadow: none;
}
.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.category-card.career .category-icon {
  background: #ffedd5;
  color: #c2410c;
}
.category-card.disabled .category-icon {
  background: var(--sand);
  color: var(--muted);
}
/* small uppercase kicker replaces the old gradient badge pills */
.category-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* rubber-stamp "coming soon" */
.category-badge.soon {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 2px solid var(--gold-deep);
  border-radius: 6px;
  padding: 4px 10px;
  transform: rotate(-4deg);
  background: rgba(245, 158, 11, 0.08);
}
.category-card h3 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}
.category-card p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 18px;
  flex-grow: 1;
}
/* meta reads as one honest line, not a pile of pills */
.category-meta-chips {
  margin: 0 0 22px;
  font-size: 0.88rem;
  color: var(--muted);
}
.category-chip {
  font-weight: 600;
}
.category-chip + .category-chip::before {
  content: "\00b7";
  margin: 0 8px;
  color: var(--gold);
  font-weight: 800;
}
.category-card.career .category-chip + .category-chip::before {
  color: #ea580c;
}
.category-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.category-action {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap .15s ease;
}
.category-card:hover .category-action {
  gap: 12px;
}
.category-card.career .category-action {
  color: #c2410c;
}
.category-card.disabled .category-action {
  color: var(--muted);
}
/* hand-drawn underline for the hub section titles */
.hub-title {
  display: inline-block;
  margin-bottom: 4px;
}
.hub-title::after {
  content: "";
  display: block;
  width: 132px;
  height: 9px;
  margin-top: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='9' viewBox='0 0 132 9'%3E%3Cpath d='M3 6 Q 18 2, 33 5 T 63 5 T 93 5 T 129 4' fill='none' stroke='%23f59e0b' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
}
.hero:not(.hero-home) .crumbs,
.session-hero .crumbs {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hero:not(.hero-home) .crumbs a,
.session-hero .crumbs a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero:not(.hero-home) .crumbs a:hover,
.session-hero .crumbs a:hover {
  opacity: 0.8;
}

/* ---------- session page ---------- */
/* "Today's goal" card */
#s-outcome {
  position: relative; z-index: 1;
  display: inline-block; max-width: 600px;
  background: var(--gold); color: #3b2f04; font-weight: 700;
  padding: 12px 18px 14px; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  margin: 14px 0 16px !important; opacity: 1 !important;
  line-height: 1.5;
}
#s-outcome::before {
  content: "Today's goal"; display: block;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; opacity: 0.75; margin-bottom: 4px;
}
.meta-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.chip {
  background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.6); color: #fff;
  padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
}

/* ---------- module session progress stepper ---------- */
.session-stepper {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  position: relative;
  z-index: 1;
}
.stepper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.95);
}
.stepper-header .stepper-title {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.stepper-header .stepper-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.stepper-track {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.step-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
  cursor: pointer;
}
.step-item:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}
.stepper-header .stepper-badge-done {
  background: rgba(16, 185, 129, 0.32);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #fff;
}
.step-item.is-done {
  border-color: rgba(52, 211, 153, 0.7);
  background: rgba(16, 185, 129, 0.22);
}
.step-item.is-done:hover {
  background: rgba(16, 185, 129, 0.36);
  border-color: #34d399;
}
.step-item.is-done .step-num {
  background: #10b981;
  color: #fff;
}
.step-item.current {
  background: #fff;
  color: var(--forest);
  font-weight: 800;
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: default;
}
.step-item.current .step-num {
  background: var(--forest);
  color: #fff;
}
.step-item.current.is-done {
  background: #fff;
  color: var(--forest);
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.step-item.current.is-done .step-num {
  background: #10b981;
  color: #fff;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step-name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .step-name { display: none; }
  .step-item { padding: 6px 10px; gap: 0; }
}

.session-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
@media (max-width: 640px) {
  .session-pager {
    grid-template-columns: 1fr;
  }
}
.pager-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}
.pager-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.pager-card.pager-next {
  text-align: right;
  background: linear-gradient(135deg, var(--card) 0%, rgba(230, 246, 237, 0.45) 100%);
  border-color: rgba(46, 139, 87, 0.35);
}
.pager-card.pager-next:hover {
  border-color: var(--forest);
}
.pager-card.pager-prev {
  text-align: left;
}
.pager-sub {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pager-card.pager-next .pager-sub {
  justify-content: flex-end;
  color: var(--forest);
}
.pager-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}
.view-switch { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 20px 0 6px; min-height: 38px; }
#btn-teacher {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font: 600 13px Inter, system-ui, sans-serif; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
#btn-teacher:hover { border-color: var(--primary); color: var(--primary); }
#btn-student {
  border: 0; background: var(--soft); color: var(--primary);
  font: 600 13px Inter, system-ui, sans-serif; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
/* one visible at a time: the teacher link in student view, the back link in teacher view */
#btn-teacher.on, #btn-student.on { display: none; }

/* stage progress rail (removed) */
.stage-rail { display: none !important; }

.stage { margin-bottom: 28px; scroll-margin-top: 140px; }
.stage-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.stage-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.stage-head .mins { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.stage-goal { color: var(--muted); margin: 0 0 14px; }

.activity {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.activity > h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; }
.activity .instr { color: var(--muted); margin: 0 0 14px; }
.activity.done { border-color: #9ADBB8; }

/* guess */
.guess-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.guess-card { border: 2px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; cursor: pointer; background: #f4f4fe; transition: border-color .15s ease; }
.guess-card:hover { border-color: var(--primary); }
/* Avatar slot: generic person icon fallback (used when a card has no photo). */
.avatar-slot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--soft); color: var(--primary);
}
.avatar-slot .icon { width: 32px; height: 32px; }
/* Real avatar photos (uploads in assets/avatars/). */
.avatar-photo {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; background: var(--soft); flex: none;
}
.guess-card .avatar-photo { margin-bottom: 8px; }
.role-card .avatar-photo { margin-bottom: 10px; }
.dlg-line .avatar-photo {
  display: inline-block; width: 38px; height: 38px;
  margin-right: 8px; vertical-align: middle;
}
.guess-card .clues { display: none; text-align: left; margin-top: 10px; }
.guess-card.open .clues { display: block; }
.guess-card .clues li { margin-bottom: 6px; }
.feedback { margin-top: 12px; font-weight: 800; min-height: 1.4em; padding: 10px 14px; border-radius: 12px; }
.feedback:empty { display: none; }
.feedback.ok { background: var(--mint); color: var(--teal); }
.feedback.no { background: var(--pink); color: var(--errred); }
.feedback .icon { vertical-align: -0.2em; margin-right: 4px; }

/* listen */
.listen-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.listen-item:first-of-type { border-top: 0; }
.listen-item .txt { flex: 1; font-size: 1.1rem; }
.listen-item .txt mark { background: var(--creamchip); padding: 1px 6px; border-radius: 6px; }
.speak-btn {
  flex: none; border: 0; cursor: pointer; background: var(--soft); color: var(--primary);
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.speak-btn:hover { background: var(--primary); color: #fff; }
.speak-btn .icon { width: 22px; height: 22px; }

/* match */
.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match-col h4 { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.match-item {
  border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px;
  cursor: pointer; background: #fff; font-weight: 600; transition: border-color .12s ease;
}
.match-item:hover { border-color: var(--primary); }
.match-item.picked { border-color: var(--gold); background: var(--creamchip); }
.match-item.matched { border-color: var(--teal); background: var(--mint); color: var(--teal); cursor: default; }
.match-item.wrong { border-color: var(--errred); background: var(--pink); }

/* order */
.word-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 48px; }
.word-tile {
  border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 14px;
  font-weight: 700; cursor: pointer; font-size: 1rem;
}
.word-tile:hover { border-color: var(--primary); }
.word-tile.used { opacity: 0.25; pointer-events: none; }
.answer-line {
  min-height: 52px; border: 2px dashed var(--line); border-radius: 12px;
  padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
  background: #f4f4fe;
}
.answer-line .hint { color: var(--muted); font-size: 0.9rem; }
.mini-btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.9rem;
  padding: 10px 22px; border-radius: 999px; background: var(--sand); color: var(--ink); margin-right: 8px;
  transition: background .15s ease;
}
.mini-btn:hover { background: var(--primary); color: #fff; }
.mini-btn.primary { background: var(--primary); color: #fff; }
.mini-btn.primary:hover { background: var(--primary-dark); }
.mini-btn.primary.is-done { background: #10b981; color: #fff; }
.mini-btn.primary.is-done:hover { background: #059669; }

/* choice / quiz */
.choice-q { margin-bottom: 18px; }
.choice-q > p { font-weight: 700; margin: 0 0 8px; }
.choice-opt {
  display: block; width: 100%; text-align: left; font: inherit;
  border: 2px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 8px; cursor: pointer;
}
.choice-opt:hover:not(:disabled) { border-color: var(--primary); }
.choice-opt:disabled { cursor: default; }
.choice-opt.right { border-color: var(--teal); background: var(--mint); }
.choice-opt.wrong { border-color: var(--errred); background: var(--pink); }
.explain { font-size: 0.9rem; color: var(--muted); margin-top: 6px; display: none; }
.explain.show { display: block; }

/* gap */
.gap-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 1.05rem; }
.gap-item:first-of-type { border-top: 0; }
.gap-item input {
  font: inherit; width: 150px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px;
}
.gap-item input:focus { outline: none; border-color: var(--primary); }
.gap-item input.right { border-color: var(--teal); background: var(--mint); }
.gap-item input.wrong { border-color: var(--errred); background: var(--pink); }

/* dialogue — chat conversation */
.dlg-hint { color: var(--muted); font-size: .95rem; margin: 0 0 4px; }
.dlg-chat-title { margin: 18px 0 8px; }
.dlg-pool { display: grid; gap: 10px; margin: 10px 0 6px; }
.dlg-pick {
  display: flex; align-items: center; gap: 12px; width: 100%;
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--line);
  border-radius: 16px; padding: 10px 14px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .15s ease;
}
.dlg-pick:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.dlg-pick .dlg-emoji {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; background: var(--spk-bg, var(--soft));
  border: 2px solid var(--spk, var(--line));
}
.dlg-pick .avatar-photo,
.dlg-pick .avatar-slot {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--spk, var(--line));
  display: inline-flex; align-items: center; justify-content: center;
}
.dlg-pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dlg-name { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--spk, var(--primary)); }
.dlg-text { font-size: 1.02rem; font-weight: 600; line-height: 1.45; }
.dlg-tap { flex: none; font-size: 1.25rem; opacity: .5; }
.dlg-pick.picked { opacity: .35; }
.dlg-pick.picked .dlg-tap { opacity: 1; font-size: 0; }
.dlg-pick.picked .dlg-tap::after { content: "\2713"; font-size: 1.4rem; color: var(--teal); font-weight: 800; }
/* speaker color themes */
.dlg-pick.spk-0, .dlg-msg.spk-0 { --spk: #7c3aed; --spk-bg: #f5f3ff; }
.dlg-pick.spk-1, .dlg-msg.spk-1 { --spk: #db2777; --spk-bg: #fdf2f8; }
.dlg-pick.spk-2, .dlg-msg.spk-2 { --spk: #0d9488; --spk-bg: #f0fdfa; }
.dlg-pick.spk-3, .dlg-msg.spk-3 { --spk: #d97706; --spk-bg: #fffbeb; }
.dlg-pick.spk-4, .dlg-msg.spk-4 { --spk: #2563eb; --spk-bg: #eff6ff; }
.dlg-pick.spk-5, .dlg-msg.spk-5 { --spk: #16a34a; --spk-bg: #f0fdf4; }
.dlg-pick.spk-0, .dlg-pick.spk-1, .dlg-pick.spk-2,
.dlg-pick.spk-3, .dlg-pick.spk-4, .dlg-pick.spk-5 { border-left-color: var(--spk); background: var(--spk-bg); }
/* the chat thread */
.dlg-chat {
  display: flex; flex-direction: column; gap: 10px;
  background: #f4f4fe; border: 2px dashed var(--line); border-radius: 16px;
  padding: 14px; min-height: 96px;
}
.dlg-empty { color: var(--muted); text-align: center; padding: 20px 8px; font-size: .95rem; }
.dlg-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.dlg-msg.left { align-self: flex-start; }
.dlg-msg.right { align-self: flex-end; flex-direction: row-reverse; }
.dlg-msg .dlg-emoji {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; background: #fff; border: 2px solid var(--spk);
}
.dlg-msg .avatar-photo { flex: none; width: 38px; height: 38px; }
.dlg-bubble {
  background: var(--spk-bg); border: 2px solid var(--spk);
  border-radius: 16px; padding: 8px 14px; min-width: 0;
}
.dlg-msg.left .dlg-bubble { border-bottom-left-radius: 5px; }
.dlg-msg.right .dlg-bubble { border-bottom-right-radius: 5px; }
.dlg-bubble .dlg-name { font-size: .75rem; }
.dlg-bubble p { margin: 2px 0 4px; font-weight: 600; line-height: 1.45; }
.dlg-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--spk); color: #fff; font-size: .78rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: center;
}

/* ask / discuss / roleplay */
.prompt-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; background: #f4f4fe; }
.prompt-card .starter { font-weight: 800; color: var(--primary); }
.prompt-card p { margin: 6px 0; }
details.sample { margin-top: 8px; }
details.sample summary { cursor: pointer; color: var(--primary); font-weight: 700; font-size: 0.9rem; }
details.sample .ans { margin: 8px 0 0; padding: 10px 14px; background: #fff; border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li {
  padding: 10px 12px 10px 40px; position: relative; cursor: pointer;
  background: #f4f4fe; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px;
}
.checklist li::before {
  content: ""; position: absolute; left: 12px; top: 12px; width: 20px; height: 20px;
  border: 2px solid #c9c9e3; border-radius: 6px; background: #fff;
}
.checklist li.tick::before { background: var(--teal); border-color: var(--teal); }
.checklist li.tick::after {
  content: "✓"; position: absolute; left: 17px; top: 11px; color: #fff; font-weight: 800; font-size: 0.85rem;
}
.checklist li.tick { color: var(--muted); text-decoration: line-through; }
.role-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.role-card { border: 2px solid var(--line); border-radius: 16px; padding: 16px; background: #f4f4fe; }
.role-card h4 { margin: 0 0 8px; color: var(--primary); }
.role-card ul { margin: 0; padding-left: 20px; }

/* record */
.rec-box { border: 2px dashed #d9d9ec; border-radius: 16px; padding: 24px 20px; text-align: center; background: #f4f4fe; }
.rec-btn {
  border: 0; cursor: pointer; width: 76px; height: 76px; border-radius: 50%;
  background: var(--coral); color: #fff; margin-bottom: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(228, 87, 61, 0.4);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.rec-btn:hover {
  transform: scale(1.06);
  background: #d4472e;
  box-shadow: 0 8px 22px rgba(228, 87, 61, 0.5);
}
.rec-btn:active {
  transform: scale(0.96);
}
.rec-btn .icon { width: 30px; height: 30px; }
.rec-btn.recording { animation: pulse 1.2s infinite; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); margin-right: 6px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(228,87,61,.5);} 70% { box-shadow: 0 0 0 16px rgba(228,87,61,0);} 100% { box-shadow: 0 0 0 0 rgba(228,87,61,0);} }
.rec-status { font-weight: 800; margin: 6px 0; }
.rec-box audio { width: 100%; margin-top: 10px; }
.fact-card { display: inline-block; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 10px 0; }
.fact-card li { margin-bottom: 4px; }

/* mission */
.mission-box { background: var(--creamchip); border: 2px solid var(--gold); border-radius: 16px; padding: 18px 20px; }
.mission-box h4 { margin: 0 0 8px; color: var(--gold-deep); font-weight: 800; }
.recap-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.recap-chips span { background: #fff; border: 1px solid var(--gold); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.9rem; }

/* ---------- teacher view ---------- */
.t-stage { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.t-stage-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.t-stage-head h3 { margin: 0; flex: 1; min-width: 180px; font-weight: 800; }
.t-acc-head { cursor: pointer; }
.t-badge {
  flex: none; width: 36px; height: 36px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: #fff;
}
.t-b1 { background: var(--gold); color: #3b2f04; }
.t-b2 { background: var(--coral); }
.t-b3 { background: var(--primary); }
.t-b4 { background: var(--teal); }
.t-b5 { background: var(--forest); }
.t-chev {
  flex: none; border: 0; cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sand); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.t-chev .icon { transition: transform .2s ease; vertical-align: 0; }
.t-stage.open .t-chev .icon { transform: rotate(180deg); }
.t-body { padding-top: 10px; }
.t-stage:not(.open) .t-body { display: none; }
.timer { display: flex; align-items: center; gap: 8px; background: var(--forest); border-radius: 999px; padding: 6px 8px 6px 16px; }
.timer .t-display { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; color: #fff; }
.timer button { border: 0; cursor: pointer; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; font-size: 0.85rem; }
.timer .t-start { background: var(--gold); color: #3b2f04; }
.timer .t-start.pause { background: var(--coral); color: #fff; }
.timer .t-reset { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.55); }
.t-block { margin: 12px 0; background: var(--sage); border-radius: 14px; padding: 14px 18px; }
.t-block h4 { margin: 0 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); font-weight: 800; }
.t-block h4 .icon { vertical-align: -0.2em; }
.t-block p, .t-block ul { margin: 0; }
.t-block ul { padding-left: 20px; }
.talk { background: #fff; border-left: 4px solid var(--primary); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 6px 0; font-style: italic; }
.err { background: #fff; border: 1px solid #F3B8B8; border-radius: 8px; padding: 8px 14px; margin: 6px 0; }
.err b { color: var(--errred); }
.err .fix { color: var(--teal); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--forest);
  color: #c7c9e8;
  padding: 32px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.footer-brand {
  flex: 1;
  max-width: 560px;
}
.footer-logo {
  display: inline-block;
  margin-bottom: 8px;
}
.footer-logo img {
  display: block;
  height: 28px;
  width: auto;
}
.footer-desc {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}
.footer-inline-link {
  color: #a5b4fc !important;
  font-weight: 600;
  text-decoration: underline !important;
}
.footer-inline-link:hover {
  color: #ffffff !important;
}
.footer-links {
  flex: 0 0 auto;
  min-width: 160px;
}
.footer-links-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 12px;
}
.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links ul li a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
}
.footer-links ul li a:hover {
  color: #fff;
  text-decoration: none;
}
.footer-bottom {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- misc ---------- */
.notice { background: var(--creamchip); border: 1px solid var(--gold); border-radius: 12px; padding: 14px 18px; margin: 18px 0 48px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 24px 0 56px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, color 0.15s ease;
}
.back-link:hover {
  transform: translateX(-3px);
  color: var(--primary-dark);
}
.target-box { background: var(--creamchip); border: 1px solid var(--gold); border-radius: 14px; padding: 14px 18px; margin: 16px 0; }
.target-box b { color: var(--gold-deep); }

/* ---------- floating Chat / Contact Us button (site theme) ---------- */
.chat-fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38), 0 4px 12px rgba(30, 27, 75, 0.15);
  z-index: 200; text-decoration: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.2s ease;
  animation: chatPulse 3s infinite ease-out;
}
.chat-fab:hover {
  transform: translate3d(0, -4px, 0) scale(1.08);
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.52), 0 6px 16px rgba(30, 27, 75, 0.2);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  animation: none;
}
.chat-fab:active {
  transform: translate3d(0, -1px, 0) scale(0.98);
  transition-duration: 0.1s;
}
.chat-fab .icon {
  width: 28px; height: 28px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-fab:hover .icon {
  transform: scale(1.08);
}
.chat-fab::after {
  content: attr(data-tip);
  position: absolute; right: 68px; top: 50%; transform: translateY(-50%) translateX(8px);
  background: var(--forest); color: #fff; font-size: 0.85rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-fab:hover::after, .chat-fab:focus-visible::after {
  opacity: 1; transform: translateY(-50%) translateX(0);
}

@keyframes chatPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55), 0 8px 24px rgba(30, 27, 75, 0.18);
  }
  65% {
    box-shadow: 0 0 0 14px rgba(99, 102, 241, 0), 0 8px 24px rgba(30, 27, 75, 0.18);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 8px 24px rgba(30, 27, 75, 0.18);
  }
}

/* ---------- pricing page ---------- */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.price-card { position: relative; }
.price-card .card-icon { margin-bottom: 8px; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin: 4px 0; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-list { list-style: none; padding: 0; margin: 14px 0 20px; }
.price-list li { padding: 7px 0 7px 32px; position: relative; color: var(--muted); }
.price-list li .icon { position: absolute; left: 0; top: 9px; color: var(--primary); }
.badge-pop {
  position: absolute; top: -13px; right: 18px;
  background: var(--gold); color: #3b2f04; font-size: 0.75rem; font-weight: 800;
  padding: 4px 14px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase;
}
.steps-book { counter-reset: book; }
.book-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px dashed var(--line); }
.book-step:first-child { border-top: 0; }
.book-step .n {
  counter-increment: book; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--soft); color: var(--primary); font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.book-step .n::before { content: counter(book); }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }

/* ---------- pricing tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.price-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.98rem; }
.price-table th, .price-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.price-table thead th { background: var(--primary); color: #fff; font-weight: 700; white-space: nowrap; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table tbody tr:hover td { background: #f4f4fe; }
.price-table .cell-price { font-weight: 800; font-size: 1.08rem; letter-spacing: -0.3px; white-space: nowrap; }
.price-table .cell-book { margin-top: 8px; }
.muted-sm { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- placement test ---------- */
.quiz-shell { max-width: 720px; margin: 0 auto; }
.quiz-shell h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; }
.quiz-count {
  font-size: 0.82rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px;
}
.quiz-progress {
  height: 10px; background: var(--soft); border-radius: 999px;
  overflow: hidden; margin: 0 0 20px;
}
.quiz-progress i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.25s ease;
}
.quiz-q {
  font-family: var(--font-display); font-size: 1.25rem;
  font-weight: 800; letter-spacing: -0.3px; margin: 0 0 16px;
}
.choice-opt.picked { border-color: var(--primary); background: var(--soft); }
.quiz-field { margin-bottom: 14px; }
.quiz-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.quiz-field input[type="text"], .quiz-field input[type="tel"], .quiz-field input[type="email"] {
  width: 100%; font: inherit; padding: 12px 16px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
}
.quiz-field input[type="text"]:focus, .quiz-field input[type="tel"]:focus, .quiz-field input[type="email"]:focus { outline: none; border-color: var(--primary); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.level-badge {
  display: inline-block; font-family: var(--font-display);
  font-size: 3rem; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; border-radius: 20px; padding: 8px 36px; margin: 10px 0 12px;
  box-shadow: var(--shadow);
}
.voice-box {
  background: var(--soft); border: 2px dashed var(--primary);
  border-radius: 16px; padding: 20px 22px; margin-top: 20px;
}
.voice-box h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; }

/* ---------- teachers grid & cards ---------- */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.teacher-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}
.teacher-card-head {
  padding: 28px 24px 18px;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.teacher-photo-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--primary) 100%);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.2);
  position: relative;
}
.teacher-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #f1f5f9;
}
.teacher-status-badge {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: #10b981;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.teacher-card-head h3 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.teacher-role {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}
.teacher-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.teacher-rating svg {
  color: var(--gold);
}
.teacher-card-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.teacher-bio {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}
.teacher-meta-group {
  margin-bottom: 14px;
}
.teacher-meta-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 6px;
}
.teacher-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.teacher-tag {
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--soft);
  color: var(--primary);
  padding: 4px 9px;
  border-radius: 8px;
}
.teacher-tag.alt {
  background: #eef2ff;
  color: #3730a3;
}
.teacher-card-foot {
  padding: 0 24px 24px;
}
.teacher-card-foot .btn {
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .grid-2, .grid-3, .steps, .teachers-grid, .category-grid { grid-template-columns: 1fr; }
  .guess-cards { grid-template-columns: 1fr; }
  .match-cols { grid-template-columns: 1fr; }
  .role-cards { grid-template-columns: 1fr; }
  /* mobile nav: hamburger opens a dropdown panel */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .wrap { position: relative; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav a.cta { text-align: center; margin-top: 8px; }
  .section { padding: 40px 0; }
  .view-switch { justify-content: center; }
  .rail-name { display: none; }
  .rail-btn { padding: 8px; }
  /* Homepage full-bleed hero on mobile */
  .hero.hero-home {
    padding: 48px 0 54px;
  }
  /* Floating rounded hero card on mobile with comfortable outer breathing room */
  .hero:not(.hero-home),
  .session-hero {
    background: transparent !important;
    padding: 16px 20px 0 !important;
  }
  .hero:not(.hero-home) .wrap,
  .session-hero .wrap {
    background: linear-gradient(135deg, var(--forest) 0%, var(--primary) 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 24px rgba(30, 27, 75, 0.16) !important;
    padding: 32px 22px !important;
    position: relative;
    overflow: hidden;
  }
  /* Kids theme keeps its playful gradient on mobile too */
  .theme-kids .session-hero .wrap {
    background: linear-gradient(120deg, #7c3aed 0%, #db2777 55%, #f59e0b 100%) !important;
  }
  .hero:not(.hero-home) .wrap::before,
  .session-hero .wrap::before {
    right: -40px; top: -40px; width: 160px; height: 160px;
  }
  .hero:not(.hero-home) .wrap::after,
  .session-hero .wrap::after {
    left: auto; right: 10%; bottom: -70px; width: 140px; height: 140px;
  }
  .hero:not(.hero-home) h1,
  .session-hero h1 {
    font-size: clamp(1.65rem, 5vw, 2.1rem);
    line-height: 1.2;
    margin-bottom: 10px;
  }
  .hero:not(.hero-home) p.lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }
  .hero:not(.hero-home) + .section {
    padding-top: 18px;
  }
  /* mobile footer */
  .footer-top {
    flex-direction: column;
    gap: 24px;
  }
  .footer-brand {
    max-width: 100%;
  }
  .footer-bottom {
    margin-top: 12px;
    padding-top: 10px;
  }
}

/* ---------- teacher whiteboard ---------- */
.wb-fab {
  position: fixed; right: 18px; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--forest); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 200; transition: transform 0.12s ease;
}
.wb-fab:hover { transform: scale(1.07); }
.wb-fab .icon { width: 28px; height: 28px; }
.wb-fab::after {
  content: attr(data-tip);
  position: absolute; right: 68px; top: 50%; transform: translateY(-50%) translateX(6px);
  background: var(--forest); color: #fff; font-size: 0.85rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease;
}
.wb-fab:hover::after, .wb-fab:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(0); }

.wb-overlay { position: fixed; inset: 0; z-index: 400; }
.wb-overlay[hidden] { display: none; }
#wb-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair;
}
.wb-toolbar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; justify-content: flex-start;
  max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
  background: rgba(30, 27, 75, 0.96); color: #fff;
  padding: 8px 12px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 2;
}
.wb-toolbar::-webkit-scrollbar { display: none; }
.wb-toolbar button {
  background: transparent; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font: 600 12px Inter, system-ui, sans-serif;
  padding: 8px; border-radius: 999px;
}
.wb-toolbar button span { display: none; }
.wb-toolbar button:hover { background: rgba(255, 255, 255, 0.14); }
.wb-toolbar button.active { background: rgba(255, 255, 255, 0.22); }
.wb-toolbar button .icon { margin-right: 0; }
.wb-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.25); margin: 0 4px; }
.wb-toolbar .wb-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--c); border: 2px solid transparent;
  padding: 0; flex: none;
}
.wb-toolbar .wb-dot.active { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.wb-size { font-weight: 800; font-size: 13px; min-width: 34px; justify-content: center; }
.wb-textinput {
  position: absolute; z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  border: none; border-bottom: 2px dashed currentColor;
  font-family: Inter, system-ui, sans-serif; font-weight: 700; line-height: 1.25;
  padding: 2px 8px; min-width: 60px; max-width: 60vw; resize: none;
}
.wb-textinput:focus { outline: none; background: #fff; }
@media (max-width: 640px) {
  .wb-sep { margin: 0 2px; }
}

/* ---------- teacher-view lock ---------- */
.tl-modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(30, 27, 75, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tl-modal[hidden] { display: none; }
.tl-card {
  background: #fffdf7; border-radius: 18px; padding: 28px;
  max-width: 380px; width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.tl-card h3 {
  margin: 0 0 8px;
  font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  color: var(--forest, #1e1b4b);
}
.tl-sub { margin: 0 0 16px; color: #555; font-size: 0.95rem; }
.tl-input {
  width: 100%; box-sizing: border-box;
  font: 600 16px Inter, system-ui, sans-serif;
  padding: 12px 14px; border: 2px solid #e5ddc9; border-radius: 12px; background: #fff;
}
.tl-input:focus { outline: none; border-color: var(--forest, #1e1b4b); }
.tl-error { color: #b91c1c; font-size: 0.9rem; font-weight: 600; margin: 10px 0 0; }
.tl-error[hidden] { display: none; }
.tl-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.tl-btn {
  font: 700 14px Inter, system-ui, sans-serif;
  padding: 10px 20px; border-radius: 999px; border: none; cursor: pointer;
}
.tl-btn-primary { background: var(--forest, #1e1b4b); color: #fff; }
.tl-btn-ghost { background: transparent; color: var(--forest, #1e1b4b); border: 2px solid var(--forest, #1e1b4b); }
.tl-lockbtn {
  border: 2px dashed var(--muted, #5b5b7a) !important; background: transparent !important;
  font-size: 13px !important; padding: 8px 14px !important; margin-left: 4px;
  color: var(--muted, #5b5b7a) !important; white-space: nowrap;
}
.tl-lockbtn:hover { color: var(--forest, #1e1b4b) !important; border-color: var(--forest, #1e1b4b) !important; }

/* ---------- premium access codes (reuses the teacher-lock modal) ---------- */
.pv-input { text-transform: uppercase; letter-spacing: 2px; }
.pv-actions { align-items: center; }
.pv-spacer { flex: 1; }
.pv-buy {
  font: 700 14px Inter, system-ui, sans-serif;
  color: var(--forest, #1e1b4b);
  text-decoration: underline; text-underline-offset: 3px;
}
.pv-buy:hover { opacity: 0.75; }

/* ---------- 404 error page ---------- */
.error-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.suggestion-card {
  background: #f4f4fe;
  border: 2px solid var(--primary);
  border-radius: 18px;
  padding: 18px 22px;
  margin: 24px auto 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 540px;
}
.suggestion-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.suggestion-content {
  flex-grow: 1;
}
.suggestion-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}
.suggestion-card code {
  background: rgba(99, 102, 241, 0.14);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9em;
}
@media (max-width: 600px) {
  .error-badge { font-size: 4rem; }
  .suggestion-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .suggestion-card .btn { width: 100%; justify-content: center; }
}

/* ---------- self-practice session (Practice out loud) ---------- */
.practice-intro, .practice-outro {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  margin: 22px 0;
  box-shadow: var(--shadow-sm);
}
.practice-intro h2, .practice-outro h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.practice-steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.practice-steps li b { display: block; }
.practice-steps li span { color: var(--muted); font-size: .93rem; }
.practice-note {
  color: var(--muted);
  font-size: .9rem;
  margin: 14px 0 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.practice-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 18px;
  font-size: .95rem;
}
.pp-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pp-bar { flex: 1; height: 8px; background: #eeeaf6; border-radius: 99px; overflow: hidden; }
.pp-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 99px;
  transition: width .4s ease;
}
.practice-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
}
.practice-card.done { border-color: var(--gold); }
.pq-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.pq-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}
.practice-card.done .pq-num { background: var(--gold); }
.pq-head h3 { margin: 2px 0 0; font-size: 1.2rem; }
.pq-tip {
  color: var(--muted);
  font-size: .92rem;
  margin: 0 0 14px 42px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.rec { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px 42px; }
.rec .rec-btn {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 99px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.rec .rec-btn:hover { transform: translateY(-1px); }
.rec .rec-btn.recording { background: var(--errred); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: recpulse 1.2s infinite; }
@keyframes recpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--errred); }
.rec-status { flex-basis: 100%; margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.rec-status.err { color: var(--errred); }
.rec-play { flex-basis: 100%; margin-top: 6px; max-width: 100%; }
.rec-dl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--primary); }
.pq-reveal {
  margin: 10px 0 0 42px;
  background: none;
  border: 1px dashed var(--line);
  border-radius: 99px;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
}
.pq-reveal.open { border-style: solid; border-color: var(--gold); }
.pq-answer {
  margin: 12px 0 0 42px;
  padding: 14px 16px;
  background: #fffdf4;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
}
.pq-answer-label {
  display: block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.pq-answer p { margin: 0; line-height: 1.6; }
@media (max-width: 600px) {
  .pq-tip, .rec, .pq-reveal, .pq-answer { margin-left: 0; }
  .practice-intro, .practice-outro, .practice-card { padding: 18px; }
}
/* Dual example answers (Job Interview S7): two labeled answers in one reveal.
   Scoped to .pq-answer so nothing else on the site is touched. */
.pq-answer-one + .pq-answer-one {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.pq-answer-one .pq-answer-label { color: var(--primary); }
.pq-answer-one p { margin: 0; line-height: 1.6; }

/* ---- Lesson visuals (built for Pre-A1, usable anywhere). ----
   New selectors only, scoped to .act-media / .item-media so no existing
   rule is affected. Data contract: act/prompts/items may carry
   `visual` (big glyph, lesson content) and/or `img` (picture URL or
   repo-relative path) plus optional `imgAlt`. */
.act-media { margin: 2px 0 12px; }
.act-media-glyph { font-size: 4.5rem; line-height: 1.15; }
.act-media-img { display: block; max-width: 100%; max-height: 340px; border-radius: 14px; }
.item-media { display: flex; align-items: center; }
.item-media-glyph { font-size: 2.6rem; line-height: 1; }
.item-media-img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.prompt-card .item-media { margin-bottom: 8px; }
.prompt-card .item-media-glyph { font-size: 3rem; }
.prompt-card .item-media-img { width: 132px; height: 96px; }

/* ============ Kids theme: flip flashcards ============
   Big, chunky, candy-colored flip cards — deliberately distinct from
   the General English look. Card fronts show the picture ONLY; the
   word hides until tapped. All selectors are new (.fc-*) or scoped
   under body.theme-kids, so no existing rule is affected. */
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 2px; }
.fc-counter { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: #1e1b4b; background: #fff; border: 3px solid #ffd166; padding: 8px 18px; border-radius: 999px; box-shadow: 0 4px 12px rgba(30,27,75,.12); }
.fc-counter .fc-n { color: #e8590c; font-size: 1.1em; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 14px; }
.fc-card { perspective: 1000px; cursor: pointer; border-radius: 28px; }
.fc-card:focus-visible { outline: 4px solid #7c3aed; outline-offset: 4px; }
.fc-inner { position: relative; width: 100%; aspect-ratio: 4/5; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,1.35,.5,1); }
.fc-card.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 12px; border: 4px solid #fff; box-shadow: 0 10px 24px rgba(30,27,75,.20); overflow: hidden; }
.fc-front { background: linear-gradient(135deg, var(--fc1,#ffd166), var(--fc2,#fb8b24)); }
.fc-card:nth-child(8n+1) { --fc1: #ffd166; --fc2: #fb8b24; }
.fc-card:nth-child(8n+2) { --fc1: #ff8fa3; --fc2: #ef476f; }
.fc-card:nth-child(8n+3) { --fc1: #80ed99; --fc2: #06d6a0; }
.fc-card:nth-child(8n+4) { --fc1: #90e0ef; --fc2: #118ab2; }
.fc-card:nth-child(8n+5) { --fc1: #c8b6ff; --fc2: #7b2ff7; }
.fc-card:nth-child(8n+6) { --fc1: #ffb3c6; --fc2: #ff5d8f; }
.fc-card:nth-child(8n+7) { --fc1: #ffe66d; --fc2: #f4a261; }
.fc-card:nth-child(8n)   { --fc1: #95d5b2; --fc2: #2d6a4f; }
.fc-emoji { font-size: 4.4rem; line-height: 1; filter: drop-shadow(0 5px 6px rgba(0,0,0,.18)); }
.fc-front .act-media { margin: 0; }
.fc-front .act-media-glyph { font-size: 4.4rem; }
.fc-front .act-media-img { max-height: 120px; border-radius: 18px; border: 3px solid #fff; }
.fc-tap { background: #1e1b4b; color: #fff; font-weight: 800; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding: 7px 18px; border-radius: 999px; }
.fc-back { background: #fffdf7; transform: rotateY(180deg); border-color: var(--fc1,#ffd166); }
.fc-word { font-size: 1.8rem; font-weight: 800; color: #1e1b4b; text-align: center; line-height: 1.2; }
.fc-phon { color: #8a8aa3; font-size: .92rem; }
.fc-say { width: 60px; height: 60px; border-radius: 50%; border: none; background: #1e1b4b; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 14px rgba(30,27,75,.30); }
.fc-say .icon { width: 26px; height: 26px; }
.fc-say:active { transform: scale(.92); }
.fc-ex { font-size: .92rem; color: #5b5b7a; font-style: italic; text-align: center; }
/* Kids page theme: playful hero + chunky activity cards */
.theme-kids .session-hero .wrap { background: linear-gradient(120deg, #7c3aed 0%, #db2777 55%, #f59e0b 100%); }
.theme-kids .activity { border-radius: 26px; border-width: 3px; }
.theme-kids .activity > h3 { font-size: 1.3rem; }
@media (max-width: 520px) {
  .fc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fc-emoji { font-size: 3.2rem; }
  .fc-word { font-size: 1.45rem; }
  .fc-face { border-radius: 22px; padding: 14px 8px; }
}
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } }
/* Hero micro-stats (levels page) */
.hero-stats {
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  letter-spacing: 0.02em;
}
/* Premium nudge — contextual upsell at end of free sessions with premium continuation */
.premium-nudge {
  margin-top: 24px;
  padding: 28px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.premium-nudge::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.25) 0%, transparent 70%);
  pointer-events: none;
}
.premium-nudge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1e1b4b;
  background: #f59e0b;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.premium-nudge-badge .icon { width: 14px; height: 14px; }
.premium-nudge-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.premium-nudge-body {
  margin: 0 0 20px;
  font-size: .95rem;
  line-height: 1.6;
  color: rgba(255,255,255,.88);
  max-width: 560px;
}
.premium-nudge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.premium-nudge-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.premium-nudge-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.35);
}
.premium-nudge-actions .btn-ghost:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}
@media (max-width: 520px) {
  .premium-nudge { padding: 22px 18px; }
  .premium-nudge-title { font-size: 1.2rem; }
  .premium-nudge-actions { flex-direction: column; }
  .premium-nudge-actions .btn { justify-content: center; }
}

/* ---------- Language Switcher (Header Nav) ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: var(--sand);
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-left: 10px;
  flex: none;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.lang-btn:hover {
  color: var(--ink);
}
.lang-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(30, 27, 75, 0.12);
}
@media (max-width: 760px) {
  .lang-switch {
    margin: 0 8px 0 0;
    align-self: center;
  }
  /* Larger touch targets on mobile (min 44px) */
  .lang-btn {
    font-size: 0.85rem;
    padding: 10px 16px;
    min-height: 44px;
  }
  /* When lang-switch is moved next to hamburger, keep them grouped right */
  .site-header .wrap > .lang-switch {
    margin-left: auto;
  }
}

/* ---------- Curriculum Learning Progress Tracker ---------- */
.ge-progress-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.ge-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ge-progress-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--forest);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ge-progress-count {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}
.ge-progress-count strong {
  color: var(--teal);
  font-weight: 800;
}
.ge-progress-bar {
  width: 100%;
  height: 10px;
  background: var(--sand);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.ge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Session row checklist button & completion state */
.session-chk {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
  margin-left: auto;
  padding: 0;
}
.session-chk:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.session-row.is-done {
  background: rgba(16, 185, 129, 0.05);
}
.session-row.is-done .session-chk {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.session-row.is-done .sn {
  background: #d1fae5;
  color: #065f46;
}
.pill-done {
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}




/* ── Catalog Search (levels.html) ────────────────────── */
.catalog-search-wrap {
  margin: 0 0 36px;
}

.catalog-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 6px 18px 6px 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.catalog-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.catalog-search-box .search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
  margin-right: 12px;
}

.catalog-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.02rem;
  color: var(--ink);
  background: transparent;
  padding: 8px 0;
}

.catalog-search-input::placeholder {
  color: #94a3b8;
}

.catalog-search-clear {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.catalog-search-clear:hover {
  background: #e2e8f0;
  color: var(--ink);
}

.catalog-search-clear .icon {
  width: 14px;
  height: 14px;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}

.search-tags-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 4px;
}

.search-tag {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.search-tag.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.catalog-search-results {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}

.search-reset-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0;
}

.search-reset-btn:hover {
  text-decoration: underline;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.search-res-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.search-res-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.search-res-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 2px;
}

.badge-bipa {
  background: #fee2e2;
  color: #dc2626;
}

.badge-general {
  background: #dbeafe;
  color: #2563eb;
}

.badge-career {
  background: #fef3c7;
  color: #d97706;
}

.badge-kids {
  background: #fce7f3;
  color: #db2777;
}

.search-res-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.search-res-title mark,
.search-res-desc mark {
  background: #fef08a;
  color: inherit;
  padding: 1px 3px;
  border-radius: 4px;
}

.search-res-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.search-res-arrow {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-empty {
  background: var(--creamchip);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
