@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&family=Outfit:wght@300;400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --teal: #0BA89A;
  --teal-dark: #088F83;
  --teal-deep: #066B60;
  --teal-glow: rgba(11,168,154,0.14);
  --teal-line: rgba(11,168,154,0.22);
  --teal-pale: #E8F6F4;
  --teal-mint: #CFEDEA;
  --navy: #0F2A24;
  --navy-2: #1A3C35;
  --cream: #F7FAF9;
  --cream-2: #F0F5F3;
  --white: #FFFFFF;
  --line: #E5EBE8;
  --line-2: #EEF3F1;
  --text: #0F2A24;
  --text-2: #4A5F58;
  --text-3: #7A8A85;
  --text-fade: #A4B0AC;
  --amber: #C9963A;
  --amber-soft: #FEF3C7;
  --success: #10B981;
  --success-soft: #D1FAE5;
  --danger: #EF4444;
  --danger-soft: #FEE2E2;
  --shadow-sm: 0 2px 8px rgba(15,42,36,0.05), 0 1px 2px rgba(15,42,36,0.03);
  --shadow-md: 0 8px 24px rgba(15,42,36,0.06);
  --shadow-lg: 0 24px 60px rgba(15,42,36,0.09), 0 6px 16px rgba(15,42,36,0.04);
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-editorial: 'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: var(--font-sans); color: var(--text); background: var(--cream); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ═══ VIEW SYSTEM ═══ */
.view { display: none; min-height: 100vh; }
.view.active { display: block; }

/* ═══ AUTH SCREENS ═══ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  background: linear-gradient(135deg, #0F2A24 0%, #1A3C35 100%);
  color: #fff;
  padding: 60px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: ''; position: absolute; right: -100px; top: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--teal-glow), transparent 70%);
  border-radius: 50%;
}
.auth-side-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-side-brand svg { width: 44px; height: 44px; }
.auth-side-brand-name { font-family: var(--font-serif); font-size: 22px; font-weight: 700; }
.auth-side-brand-name .accent { color: var(--teal); }

.auth-side-quote {
  position: relative; z-index: 1;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: rgba(255,255,255,0.95);
}
.auth-side-quote em { font-family: var(--font-editorial); font-style: italic; font-weight: 400; color: var(--teal); }
.auth-side-quote-attrib {
  margin-top: 20px;
  font-family: var(--font-sans); font-size: 13px;
  color: rgba(255,255,255,0.5); font-style: normal;
  letter-spacing: 0.05em; text-transform: uppercase;
}

.auth-side-footer { position: relative; z-index: 1; font-size: 12px; color: rgba(255,255,255,0.5); }

.auth-form-side {
  background: var(--cream);
  padding: 60px 80px;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-form-wrap { max-width: 420px; width: 100%; margin: 0 auto; }
.auth-form-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-dark); font-weight: 700; margin-bottom: 12px; }
.auth-form-title { font-family: var(--font-serif); font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-form-sub { font-size: 15px; color: var(--text-2); margin-bottom: 32px; line-height: 1.55; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font: inherit; font-size: 15px;
  color: var(--text); background: var(--white);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.field input:focus, .field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-glow);
}
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.field .err { font-size: 12.5px; color: var(--danger); margin-top: 4px; font-weight: 600; }

.btn-primary-lg {
  width: 100%; margin-top: 8px;
  background: var(--teal); color: #fff;
  border: none; padding: 14px 24px;
  border-radius: var(--r-md);
  font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(11,168,154,0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary-lg:hover { transform: translateY(-1px); background: var(--teal-dark); }

.auth-alt {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--text-2);
  text-align: center;
}
.auth-alt a { color: var(--teal-dark); font-weight: 700; text-decoration: none; }

.form-error {
  background: var(--danger-soft); color: #991B1B;
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
  display: none;
}
.form-error.show { display: block; }

/* ═══ APP LAYOUT ═══ */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #0F2A24 0%, #0A1F1B 100%);
  color: rgba(255,255,255,0.8);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.brand-icon { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: #fff; line-height: 1.05; }
.brand-name .accent { color: var(--teal); }
.brand-tag { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.4); font-weight: 600; margin-top: 3px; }

.nav-group-label { font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,0.32); letter-spacing: 0.14em; text-transform: uppercase; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.68);
  text-decoration: none; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  position: relative; border: none; background: none; font-family: inherit; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: rgba(11,168,154,0.12); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -4px; top: 6px; bottom: 6px; width: 3px; background: var(--teal); border-radius: 0 3px 3px 0; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-bottom {
  margin-top: auto;
  padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.user-mini { display: flex; align-items: center; gap: 10px; }
.user-name { color: #fff; font-size: 13.5px; font-weight: 600; }
.user-tier { color: rgba(255,255,255,0.5); font-size: 11px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #FDE68A, #C9963A);
  color: #4A2E00; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.logout-btn {
  background: none; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; padding: 6px; margin-left: auto;
  font: inherit; font-size: 11px;
}
.logout-btn:hover { color: #fff; }

/* Main */
.main { padding: 32px 40px 60px; background: radial-gradient(circle 800px at 90% -100px, rgba(11,168,154,0.05), transparent), var(--cream); }

.hero-strip {
  background: linear-gradient(135deg, #0F2A24 0%, #1A3C35 100%);
  color: #fff; border-radius: var(--r-xl);
  padding: 40px 44px; margin-bottom: 32px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-strip::before {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; max-width: 620px; }
.hero-eyebrow { font-size: 11px; letter-spacing: 0.14em; font-weight: 700; color: var(--teal); text-transform: uppercase; margin-bottom: 14px; }
.hero-strip h1 { font-family: var(--font-serif); font-size: 38px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
.hero-sub { font-size: 16px; color: rgba(255,255,255,0.75); line-height: 1.55; margin-bottom: 24px; max-width: 500px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-md);
  font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 20px rgba(11,168,154,0.4); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 10px 28px rgba(11,168,154,0.5); }
.btn-outline { background: var(--white); color: var(--text); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.14); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.stat-val { font-family: var(--font-serif); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.stat-val .unit { font-family: var(--font-sans); font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 3px; }
.stat-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; font-weight: 600; }

/* Section title */
.sec-title {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700; letter-spacing: -0.015em;
  margin-bottom: 14px;
}

/* Topic cards grid */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.topic-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column; gap: 6px;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-line); }
.topic-card .t-paper { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.topic-card .t-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.topic-card .t-info { font-size: 12.5px; color: var(--text-3); }
.topic-progress { height: 5px; background: var(--cream-2); border-radius: 3px; overflow: hidden; margin: 10px 0 6px; }
.topic-progress-fill { height: 100%; background: var(--teal); border-radius: 3px; }
.topic-progress-fill.weak { background: var(--danger); }
.topic-progress-fill.med { background: var(--amber); }
.topic-meta-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-top: 4px; }

/* Question player view */
.q-shell { max-width: 900px; margin: 0 auto; padding: 32px 32px 60px; }
.q-topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.q-back { background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.q-back:hover { border-color: var(--teal); color: var(--teal); }
.q-progress-mini { font-size: 13px; color: var(--text-3); font-weight: 600; }
.q-progress-mini strong { color: var(--text); }
.q-progress-bar { flex: 1; height: 6px; background: var(--cream-2); border-radius: 3px; overflow: hidden; max-width: 320px; }
.q-progress-bar-fill { height: 100%; background: var(--teal); border-radius: 3px; transition: width 0.3s; }

.q-body {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 40px 44px;
  box-shadow: var(--shadow-md);
}
.q-topline { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.q-num-badge { font-family: var(--font-serif); font-size: 15px; font-weight: 700; background: var(--navy); color: #fff; padding: 4px 14px; border-radius: var(--r-pill); }
.q-topic-name { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.q-marks-info { margin-left: auto; font-size: 13px; color: var(--text-2); font-weight: 600; }
.q-stem { font-family: var(--font-serif); font-size: 22px; line-height: 1.5; margin-bottom: 24px; letter-spacing: -0.005em; }
.q-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--teal-dark); margin-bottom: 8px; }

.q-working {
  width: 100%; min-height: 160px;
  background: #FAFCFB;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 18px; line-height: 1.7;
  color: var(--text);
  resize: vertical; outline: none;
  background-image: repeating-linear-gradient(transparent 0, transparent 30px, #F0F5F3 30px, #F0F5F3 31px);
  transition: border-color 0.15s;
}
.q-working:focus { border-color: var(--teal); background-image: repeating-linear-gradient(transparent 0, transparent 30px, #E8F6F4 30px, #E8F6F4 31px); }

.q-answer-row { display: flex; align-items: center; gap: 14px; background: var(--cream); border: 2px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; margin-top: 20px; transition: border-color 0.15s; }
.q-answer-row:focus-within { border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px var(--teal-glow); }
.q-answer-row .lbl { font-size: 14px; font-weight: 700; color: var(--text-2); }
.q-answer-row input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--text); }
.q-unit-tag { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--white); padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); }

.q-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.q-actions .spacer { flex: 1; }

/* Feedback panel */
.q-feedback {
  margin-top: 24px;
  border-radius: var(--r-lg);
  padding: 24px 28px;
  display: none;
}
.q-feedback.show { display: block; }
.q-feedback.full { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); border: 1px solid #10B981; }
.q-feedback.partial { background: linear-gradient(135deg, #FEF3C7, #FDE68A); border: 1px solid #C9963A; }
.q-feedback.weak { background: linear-gradient(135deg, #FEE2E2, #FECACA); border: 1px solid #EF4444; }

.q-feedback-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.q-marks-big { font-family: var(--font-serif); font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.q-marks-big .total { color: rgba(0,0,0,0.35); font-weight: 500; }
.q-verdict-lbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; opacity: 0.7; }
.q-feedback-text { font-size: 14.5px; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.q-feedback-text strong { font-weight: 700; }
.q-next-actions { display: flex; gap: 10px; margin-top: 18px; }

/* Session summary */
.session-summary {
  max-width: 700px; margin: 60px auto 40px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 44px 48px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.session-summary h2 { font-family: var(--font-serif); font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.session-summary h2 em { font-family: var(--font-editorial); font-weight: 400; color: var(--teal-dark); }
.session-summary .lead { font-size: 15px; color: var(--text-2); margin-bottom: 32px; line-height: 1.55; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.summary-stat { text-align: center; padding: 20px 12px; background: var(--cream-2); border-radius: var(--r-md); }
.summary-stat .v { font-family: var(--font-serif); font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.summary-stat .l { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin-top: 4px; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  background: var(--white); border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty-state h3 { font-family: var(--font-serif); font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-3); font-size: 14px; margin-bottom: 20px; }

/* Progress view */
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.progress-topic-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px;
}
.progress-topic-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.progress-topic-meta { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.progress-topic-bar { height: 8px; background: var(--cream-2); border-radius: 4px; overflow: hidden; }
.progress-topic-bar-fill { height: 100%; border-radius: 4px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { padding: 30px; min-height: auto; }
  .auth-side-quote { font-size: 24px; }
  .auth-form-side { padding: 30px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .progress-grid { grid-template-columns: 1fr; }
  .q-body { padding: 24px; }
  .q-stem { font-size: 18px; }
}

/* ═══ LESSON CARDS ═══ */
.lesson-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 22px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.lesson-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-line); }

.mastery-bar-wrap { height: 6px; background: var(--cream-2); border-radius: 3px; overflow: hidden; }
.mastery-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }

.mastery-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: var(--r-pill); text-transform: uppercase;
}
.mastery-badge.mastery-read { background: var(--success-soft); color: #065F46; }
.mastery-badge.mastery-new { background: var(--teal-pale); color: var(--teal-dark); }

/* ═══ LESSON PLAYER ═══ */
.lesson-hero {
  background: linear-gradient(135deg, #0F2A24 0%, #1A3C35 100%);
  color: #fff; border-radius: var(--r-xl); padding: 40px 44px;
  margin-bottom: 28px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lesson-hero::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(11,168,154,0.15), transparent 70%);
  border-radius: 50%;
}

.lesson-section {
  display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: start;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 20px;
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.lesson-section-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--teal-pale); color: var(--teal-deep);
  font-weight: 800; font-size: 14px; font-family: var(--font-serif);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.lesson-formulas {
  background: var(--teal-pale); border: 1px solid var(--teal-line);
  border-radius: var(--r-lg); padding: 22px 24px; margin: 20px 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.formula-chip {
  background: var(--white); border: 1px solid var(--teal-line);
  border-radius: var(--r-md); padding: 8px 14px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15px; color: var(--teal-deep); font-weight: 500;
}

.lesson-worked {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid rgba(201,150,58,0.25);
  border-radius: var(--r-lg); padding: 24px 28px; margin: 20px 0;
}

.lesson-tips {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 24px; margin: 20px 0;
  box-shadow: var(--shadow-sm);
}
.tip-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2);
}
.tip-item:last-child { border-bottom: none; }

/* ═══ FLASHCARD PLAYER ═══ */
.fc-card {
  width: 100%; min-height: 280px;
  perspective: 1000px; cursor: pointer;
  margin: 0 auto;
}
.fc-card-inner {
  position: relative; width: 100%; min-height: 280px;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--r-xl);
}
.fc-card.flipped .fc-card-inner { transform: rotateY(180deg); }
.fc-front, .fc-back {
  position: absolute; width: 100%; min-height: 280px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--r-xl); padding: 36px 40px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: var(--shadow-lg);
}
.fc-front {
  background: linear-gradient(135deg, #0F2A24 0%, #1A3C35 100%);
  color: #fff;
}
.fc-back {
  background: var(--white); border: 1px solid var(--line);
  color: var(--text);
  transform: rotateY(180deg);
}
.fc-label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700; opacity: 0.6; margin-bottom: 16px;
}
.fc-text {
  font-family: var(--font-serif); font-size: 20px; font-weight: 600;
  line-height: 1.5; letter-spacing: -0.005em;
}
.fc-hint {
  margin-top: auto; padding-top: 20px;
  font-size: 12px; opacity: 0.5; text-align: center;
}

/* ═══ HERO EYEBROW reuse ═══ */
.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--teal); margin-bottom: 14px;
}

@media (max-width: 900px) {
  .lesson-hero { padding: 28px; }
  .fc-text { font-size: 17px; }
  .fc-front, .fc-back { padding: 24px 28px; min-height: 240px; }
  .fc-card, .fc-card-inner { min-height: 240px; }
}

/* Loading spinner */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; font-size: 15px; color: var(--text-3);
  font-family: var(--font-sans);
}
.loading-spinner::before {
  content: '';
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  animation: spin 0.7s linear infinite;
  margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
