/* ============================================
   AI AWARE – GLOBAL STYLES
   ============================================ */

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

:root {
  --primary: #778beb;
  --primary-dark: #5e74e0;
  --primary-light: #EEF2FE;
  --accent: #00D9B5;
  --accent-dark: #00A88C;
  --danger: #FF4D6D;
  --warning: #FFB300;
  --success: #00C48C;
  --bg: #F7F8FC;
  --surface: #FFFFFF;
  --surface-2: #F0F2FA;
  --border: #E2E5F0;
  --text: #1A1D2E;
  --text-muted: #6B7080;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 12px rgba(30,30,60,0.08);
  --shadow-lg: 0 8px 40px rgba(30,30,60,0.13);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

a { text-decoration: none; color: inherit; }

/* ── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.18s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(119,139,235,0.3); }
.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; border-radius: 10px; }

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
/* ── Logo (Stamp + crisp underline, brand colour #778beb) ── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}
.logo-icon {
  border: 2px solid currentColor;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  line-height: 1;
  display: inline-block;
}
.logo-text {
  font-weight: 800;
  font-size: 1.28rem;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  color: inherit;
}
.logo-text::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.logo-text strong { color: inherit; font-weight: 800; }
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-light); }
.nav-cta { margin-left: 12px; }

/* ── NAV USER CHIP (top-right) ──────────────── */
.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 100px;
  padding: 5px 12px 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 10px;
  white-space: nowrap;
}
.nav-user-icon { font-size: 0.7rem; color: var(--primary); }
.nav-user-logout {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
  font-family: var(--font);
}
.nav-user-logout:hover { opacity: 1; text-decoration: underline; }

/* ── USER DROPDOWN MENU ────────────────────── */
.user-menu-wrap {
  position: relative;
  margin-left: 10px;
}
.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: background 0.15s;
}
.user-menu-toggle:hover { background: var(--primary); color: #fff; }
.user-menu-toggle .arrow { font-size: 0.6rem; margin-left: 2px; transition: transform 0.2s; }
.user-menu-wrap.open .user-menu-toggle .arrow { transform: rotate(180deg); }
.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}
.user-menu-wrap.open .user-menu-dropdown { display: block; }
.user-menu-dropdown a,
.user-menu-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.12s;
  text-decoration: none;
}
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover { background: var(--bg); }
.user-menu-dropdown .menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}
.user-menu-dropdown .menu-danger { color: var(--danger); }

/* ── HERO ───────────────────────────────────── */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 22px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.hero-stats {
  display: flex;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 340px;
}
.hero-card:nth-child(2) { margin-left: 40px; }
.hero-card:nth-child(3) { margin-left: 20px; }
.card-icon { font-size: 2rem; }
.card-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.card-sub { font-size: 0.82rem; color: var(--text-muted); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.floating { animation: float 4s ease-in-out infinite; }
.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 2s; }

/* ── SECTIONS ───────────────────────────────── */
.section { padding: 52px 0; }
.section:nth-child(even) { background: var(--surface); }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 0.98rem; max-width: 560px; margin: 0 auto; }

/* ── INFO CARDS ─────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: box-shadow 0.18s, transform 0.18s;
}
.info-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.info-icon { font-size: 2rem; margin-bottom: 14px; }
.info-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.info-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ── MODULES LIST ───────────────────────────── */
.modules-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 36px; }
.module-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: all 0.15s;
  cursor: pointer;
}
.module-row:hover { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow); }
.module-num { font-size: 1.3rem; font-weight: 800; color: var(--primary); min-width: 36px; }
.module-info { flex: 1; }
.module-title { font-weight: 600; font-size: 0.97rem; margin-bottom: 2px; }
.module-meta { font-size: 0.8rem; color: var(--text-muted); }
.module-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--primary-light);
  color: var(--primary);
}
.module-tag[data-level="Important"] { background: #FFF3CD; color: #856404; }
.module-tag[data-level="Advanced"] { background: #FFE5E9; color: #C0143C; }
.module-arrow { font-size: 1.1rem; color: var(--text-muted); }
.modules-cta { text-align: center; }

/* ── TRAINING PAGE ──────────────────────────── */
.training-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}
.sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}
.sidebar-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 12px; }
.sidebar-list { display: flex; flex-direction: column; gap: 4px; list-style: none; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-muted);
}
.sidebar-item:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-item.active { background: var(--primary); color: #fff; }
.sidebar-item.done { color: var(--success); }
.sidebar-num { font-weight: 800; font-size: 0.8rem; min-width: 20px; }
.sidebar-check { margin-left: auto; font-size: 0.9rem; }
.sidebar-lock  { margin-left: auto; font-size: 0.85rem; opacity: 0.45; }
.sidebar-item.locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.module-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
}
.module-header { margin-bottom: 32px; }
.module-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 8px;
}
.module-content h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; }
.module-content .lead { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }

.module-body h2 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 10px; }
.module-body p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.75; }
.module-body ul { padding-left: 28px; margin-bottom: 14px; list-style-position: outside; margin-left: 8px; }
.module-body li { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 6px; line-height: 1.7; }
.module-body strong { color: var(--text); }

.callout {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.93rem;
  color: var(--text);
}
.callout.warning { border-color: var(--warning); background: #FFF8E1; }
.callout.danger { border-color: var(--danger); background: #FFF0F3; }
.callout.success { border-color: var(--success); background: #E6FAF5; }

.module-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── QUIZ PAGE ──────────────────────────────── */
.quiz-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}
.quiz-header { text-align: center; margin-bottom: 40px; }
.quiz-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.quiz-header p { color: var(--text-muted); }

.progress-bar-wrap { background: var(--border); border-radius: 100px; height: 8px; margin-bottom: 36px; overflow: hidden; }
.progress-bar-fill { height: 8px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 100px; transition: width 0.4s ease; }

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.question-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.question-text { font-size: 1.2rem; font-weight: 700; margin-bottom: 28px; line-height: 1.5; }

.options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--bg);
}
.option:hover:not(.disabled) { border-color: var(--primary); background: var(--primary-light); }
.option.selected { border-color: var(--primary); background: var(--primary-light); }
.option.correct { border-color: var(--success); background: #E6FAF5; }
.option.incorrect { border-color: var(--danger); background: #FFF0F3; }
.option.disabled { cursor: not-allowed; }
.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.option.selected .option-letter { background: var(--primary); color: #fff; }
.option.correct .option-letter { background: var(--success); color: #fff; }
.option.incorrect .option-letter { background: var(--danger); color: #fff; }

.explanation {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
  line-height: 1.65;
}
.explanation.visible { display: block; }
.explanation.correct-exp { border-color: var(--success); background: #E6FAF5; }
.explanation.incorrect-exp { border-color: var(--danger); background: #FFF0F3; }

.quiz-footer { display: flex; justify-content: flex-end; gap: 12px; }

/* ── RESULTS ────────────────────────────────── */
.results-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.score-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--pct, 0%), var(--border) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
}
.score-ring::before {
  content: '';
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--surface);
  position: absolute;
}
.score-value {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.results-card h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 10px; }
.results-card p { color: var(--text-muted); font-size: 1rem; margin-bottom: 28px; }
.score-breakdown { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; }
.breakdown-item { text-align: center; }
.breakdown-num { font-size: 1.6rem; font-weight: 800; }
.breakdown-label { font-size: 0.8rem; color: var(--text-muted); }
.correct-color { color: var(--success); }
.incorrect-color { color: var(--danger); }

.results-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ─────────────────────────────────── */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 20px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer .logo { color: #fff; }
.footer .logo-icon { border-color: #fff; color: #fff; }
.footer .logo-text { color: #fff; }
.footer .logo-text::after { background: #fff; }
.footer .logo-text strong { color: #fff; }
.footer-copy { font-size: 0.85rem; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 48px 24px 40px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 2.1rem; }
  .training-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .module-content { padding: 28px 24px; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-inner { padding: 0 16px; gap: 10px; height: 60px; }
  .logo-text { font-size: 1.05rem; }
  .logo-icon { font-size: 0.55rem; padding: 3px 6px; }
  .nav-cta { margin-left: auto; padding: 8px 12px; font-size: 0.82rem; }
  .nav-contact { margin-right: 0; padding: 8px 12px; font-size: 0.82rem; }
  .quiz-card { padding: 24px 20px; }
  .results-card { padding: 32px 20px; }
  .module-row { gap: 12px; padding: 14px 14px; }
  .module-num { min-width: 26px; font-size: 1.1rem; }
  .module-info { min-width: 0; }
  .module-title { font-size: 0.92rem; word-break: break-word; }
  .module-meta { font-size: 0.75rem; }
  .module-tag { font-size: 0.68rem; padding: 3px 8px; flex-shrink: 0; }
}
@media (max-width: 420px) {
  .nav-inner { padding: 0 12px; gap: 8px; }
  .logo-text { font-size: 0.95rem; }
  .nav-cta, .nav-contact { padding: 7px 10px; font-size: 0.75rem; }
  .module-row { gap: 10px; padding: 12px 12px; }
  .module-num { min-width: 22px; font-size: 1rem; }
  .module-tag { font-size: 0.62rem; padding: 2px 7px; }
}

/* ── SCREEN IMAGE LAYOUT ────────────────────── */
.screen-with-image {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.screen-text {
  flex: 1;
  min-width: 0;
}
.screen-image {
  flex-shrink: 0;
  width: 170px;
  padding-top: 8px;
}
.screen-image svg {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 700px) {
  .screen-with-image { flex-direction: column; }
  .screen-image { width: 120px; margin: 0 auto; }
}

/* ── SCREEN PROGRESS ────────────────────────── */
.screen-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.screen-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.screen-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 100px;
  transition: width 0.4s ease;
}
.screen-progress-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── COUNTDOWN BUTTON ───────────────────────── */
.btn-countdown {
  opacity: 0.65;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ── COMPLETION SCREEN ──────────────────────── */
.screen-completion {
  text-align: center;
  padding: 48px 20px;
}
.completion-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.screen-completion h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}
.screen-completion p {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 10px;
}
.screen-placeholder {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
}

/* ── PAGE TRANSITIONS ───────────────────────── */
.page-fade { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── LANGUAGE SWITCHER ──────────────────────── */
.lang-switcher {
  position: relative;
  margin-left: 8px;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
  color: var(--text);
}
.lang-toggle:hover { border-color: var(--primary); background: var(--primary-light); }
.lang-caret { font-size: 0.7rem; color: var(--text-muted); transition: transform 0.2s; }
.lang-switcher.open .lang-caret { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 150px;
  z-index: 200;
}
.lang-switcher.open .lang-dropdown { display: block; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: var(--font);
  color: var(--text);
  transition: background 0.12s;
  text-align: left;
}
.lang-btn:hover { background: var(--bg); }
.lang-btn.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }

/* ── INLINE MODULE QUIZ ────────────────────── */
.quiz-question-screen { padding-bottom: 8px; }
.quiz-question-screen .quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.quiz-question-screen .quiz-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}
.quiz-progress-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 100px;
}
.quiz-question-text {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 24px;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--bg);
}
.quiz-option:hover:not(.disabled) { border-color: var(--primary); background: var(--primary-light); }
.quiz-option.correct { border-color: var(--success); background: #E6FAF5; }
.quiz-option.incorrect { border-color: var(--danger); background: #FFF0F3; }
.quiz-option.disabled { cursor: not-allowed; }
.quiz-option-letter {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem; flex-shrink: 0;
}
.quiz-option.correct .quiz-option-letter { background: var(--success); color: #fff; }
.quiz-option.incorrect .quiz-option-letter { background: var(--danger); color: #fff; }
.quiz-explanation {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
  line-height: 1.65;
}
.quiz-explanation.visible { display: block; }
.quiz-explanation.correct-exp { border-color: var(--success); background: #E6FAF5; }
.quiz-explanation.incorrect-exp { border-color: var(--danger); background: #FFF0F3; }

/* Quiz results screen */
.quiz-results-screen { text-align: center; padding: 24px 0; }
.quiz-results-screen h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; }
.quiz-score-ring {
  width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(var(--primary) var(--pct), var(--border) var(--pct));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.quiz-score-value {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: var(--primary);
}
.quiz-score-detail { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 8px; }
.quiz-score-msg { font-size: 1rem; font-weight: 600; margin-bottom: 24px; }
.quiz-answers-review {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}
.quiz-review-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}
.quiz-review-item.review-correct { background: #E6FAF5; }
.quiz-review-item.review-incorrect { background: #FFF0F3; }
.review-icon { font-weight: 800; flex-shrink: 0; }
.review-correct .review-icon { color: var(--success); }
.review-incorrect .review-icon { color: var(--danger); }
