/*!
 * QuadraEdge.LMS — Unified Stylesheet (qe.css)
 * Consolidates:
 *   - the v3 design system  (tokens, components, layouts)
 *   - the accessibility / UX overlay  (focus, status pills, quiz review)
 *   - the mobile-first navigation
 *   - the front-page sections  (hero, access paths, pillars, course preview)
 *
 * Single source of truth. Header.php should load only this file.
 * ========================================================================= */

/*
 * QuadraEdge.LMS — Design System v3.0
 * Drop-in replacement for qe.css
 * Mobile-first. Fully responsive. No JS dependencies for layout.
 */

/* ═══════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════ */
:root {
  /* Brand palette */
  --cobalt:       #2563eb;
  --cobalt-lt:    #3b82f6;
  --cobalt-pale:  #eff4ff;
  --cobalt-deep:  #1d4ed8;
  --teal:         #0ea5e9;
  --teal-pale:    #f0f9ff;
  --orange:       #f97316;
  --orange-lt:    #fb923c;
  --orange-pale:  #fff7ed;
  --success:      #16a34a;
  --success-lt:   #22c55e;
  --success-pale: #f0fdf4;
  --warn:         #d97706;
  --warn-pale:    #fffbeb;
  --danger:       #dc2626;
  --danger-pale:  #fef2f2;

  /* Surface scale */
  --slate-950:    #0a0f1e;
  --slate-900:    #111827;
  --slate-800:    #1e2a3a;
  --slate-700:    #2d3a4f;
  --off-white:    #f6f8fb;
  --blue-tint:    #eef2ff;
  --surface:      #ffffff;

  /* Text */
  --ink:          #0f172a;
  --ink-2:        #1e293b;
  --ink-3:        #334155;
  --muted:        #64748b;
  --muted-lt:     #94a3b8;
  --line:         #e2e8f0;
  --line-lt:      #f1f5f9;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Shape */
  --r:      12px;
  --r-sm:   8px;
  --r-xs:   6px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* Shadows */
  --sh-xs: 0 1px 3px rgba(10,15,30,.06), 0 1px 2px rgba(10,15,30,.04);
  --sh-sm: 0 2px 8px rgba(10,15,30,.08), 0 1px 3px rgba(10,15,30,.05);
  --sh:    0 8px 24px rgba(10,15,30,.10), 0 2px 6px rgba(10,15,30,.06);
  --sh-lg: 0 20px 48px rgba(10,15,30,.14), 0 6px 16px rgba(10,15,30,.08);
  --sh-xl: 0 32px 72px rgba(10,15,30,.18);
  --sh-cobalt: 0 4px 16px rgba(37,99,235,.28);
  --sh-orange: 0 4px 14px rgba(249,115,22,.28);

  /* Motion */
  --t:      200ms cubic-bezier(.25,.8,.25,1);
  --t-fast: 120ms cubic-bezier(.25,.8,.25,1);
  --t-slow: 350ms cubic-bezier(.25,.8,.25,1);

  /* Typography */
  --font-d: 'DM Sans', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, -apple-system, sans-serif;
  --font-ar:'Tajawal', system-ui, sans-serif;

  /* Layout */
  --nav-h:  68px;
  --sidebar-w: 240px;
  --max-w:  1200px;
  --max-w-sm: 840px;
  --max-w-xs: 520px;
}

/* ═══════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-b);
  background: var(--off-white);
  color: var(--ink-3);
  padding-top: var(--nav-h);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.lang-ar { font-family: var(--font-ar); direction: rtl; }
body.no-pad { padding-top: 0; }
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }
h1,h2,h3,h4,h5 {
  font-family: var(--font-d);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -.015em;
}

/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY UTILITIES
═══════════════════════════════════════════════════════ */
.eyebrow {
  display: inline-block;
  font-family: var(--font-d);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: .75rem;
}
.on-dark .eyebrow { color: var(--teal); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark p { color: rgba(255,255,255,.65); }

/* Blanket rule: headings on every dark hero/section always render white */
.hero h1,
.learn-hero h1, .learn-hero h2, .learn-hero h3,
.dash-hero h1, .dash-hero h2,
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4,
.auth-left h1, .auth-left h2, .auth-left h3,
.tp-left h1, .tp-left h2, .tp-left h3 {
  color: #fff;
}
.lead { font-size: .97rem; line-height: 1.78; color: var(--muted); }
.text-sm { font-size: .83rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--muted); }
.text-ink { color: var(--ink); }
.font-d { font-family: var(--font-d); }
.font-bold { font-weight: 700; }
.font-800 { font-weight: 800; }

/* ═══════════════════════════════════════════════════════
   NAV — polished & mobile-perfect
═══════════════════════════════════════════════════════ */
.qe-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10,15,30,.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: box-shadow var(--t);
}
.qe-nav.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.qe-nav .inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: auto;
  text-decoration: none;
}
[dir=rtl] .nav-logo { margin-right: 0; margin-left: auto; }
.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-deep));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(37,99,235,.4);
}
.nav-logo-icon svg { width: 18px; height: 18px; }
.nav-brand {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: .95rem;
  color: #fff;
  line-height: 1.1;
}
.nav-brand small {
  display: block;
  font-size: .58rem;
  font-weight: 500;
  color: rgba(255,255,255,.36);
  letter-spacing: .04em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a, .nav-links button {
  font-family: var(--font-d);
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.68);
  padding: 7px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color var(--t), background var(--t);
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover, .nav-links button:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
}
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,.11);
}
.nav-sep {
  width: 1px; height: 18px;
  background: rgba(255,255,255,.1);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Pill buttons in nav */
.nav-pill {
  font-family: var(--font-d) !important;
  font-size: .8rem !important;
  font-weight: 700 !important;
  padding: 7px 15px !important;
  border-radius: var(--r-sm) !important;
}
.nav-pill-orange {
  background: var(--orange) !important;
  color: #fff !important;
  box-shadow: var(--sh-orange);
}
.nav-pill-orange:hover { background: var(--orange-lt) !important; }
.nav-pill-ghost {
  background: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.85) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
}
.nav-pill-ghost:hover {
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(255,255,255,.24) !important;
}
.nav-lang {
  font-size: .72rem !important;
  padding: 5px 9px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 6px !important;
  color: rgba(255,255,255,.55) !important;
}
.nav-lang:hover {
  border-color: rgba(255,255,255,.4) !important;
  color: #fff !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background var(--t), border-color var(--t);
}
.nav-toggle:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.35);
}



/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .88rem;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: background var(--t), transform var(--t-fast), box-shadow var(--t), border-color var(--t);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px; /* touch target */
  letter-spacing: -.01em;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: var(--sh-cobalt);
}
.btn-primary:hover {
  background: var(--cobalt-deep);
  box-shadow: 0 6px 20px rgba(37,99,235,.38);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--sh-orange);
}
.btn-orange:hover {
  background: #ea6c10;
  box-shadow: 0 6px 18px rgba(249,115,22,.38);
}

.btn-white  { background: #fff; color: var(--cobalt); }
.btn-white:hover { box-shadow: var(--sh); }

.btn-outline {
  background: transparent;
  color: var(--cobalt);
  border: 1.5px solid var(--cobalt);
}
.btn-outline:hover { background: var(--cobalt-pale); }

.btn-ghost-dark {
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.16);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); }

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.38);
}
.btn-outline-white:hover {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.07);
}

.btn-danger  { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-muted   { background: var(--off-white); color: var(--muted); border: 1px solid var(--line); }
.btn-muted:hover { border-color: var(--cobalt); color: var(--cobalt); }

.btn-sm  { padding: 8px 16px; font-size: .8rem; min-height: 36px; }
.btn-lg  { padding: 14px 30px; font-size: 1rem; min-height: 52px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 9px; aspect-ratio: 1; }

/* ═══════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-family: var(--font-d);
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
}
.form-hint  { font-size: .74rem; color: var(--muted); }
.form-control {
  width: 100%;
  font-family: var(--font-b);
  font-size: .92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  min-height: 44px; /* touch target */
}
.form-control:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(37,99,235,.13);
  background: var(--surface);
}
.form-control:hover:not(:focus) { border-color: var(--muted-lt); }
.form-control.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }
.form-error { font-size: .76rem; color: var(--danger); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }

.form-pass-wrap { position: relative; }
.form-pass-wrap input { padding-right: 44px; }
.form-pass-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px;
  transition: color var(--t);
}
.form-pass-toggle:hover { color: var(--cobalt); }

/* ═══════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════ */
.alert {
  padding: 13px 16px;
  border-radius: 10px;
  font-size: .89rem;
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-pale); color: #166534; border-color: #bbf7d0; }
.alert-error   { background: var(--danger-pale);  color: #991b1b; border-color: #fecaca; }
.alert-warn    { background: var(--warn-pale);    color: #92400e; border-color: #fde68a; }
.alert-info    { background: var(--cobalt-pale);  color: #1e40af; border-color: #bfdbfe; }

/* ═══════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}
.card-body { padding: var(--space-6); }
.card-hover { transition: box-shadow var(--t), transform var(--t); }
.card-hover:hover { box-shadow: var(--sh); transform: translateY(-2px); }

/* ═══════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-d);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.badge-blue   { background: var(--cobalt-pale); color: var(--cobalt); }
.badge-green  { background: var(--success-pale); color: #166534; }
.badge-orange { background: var(--orange-pale);  color: #c2410c; }
.badge-gray   { background: var(--off-white);    color: var(--muted); border: 1px solid var(--line); }
.badge-teal   { background: var(--teal-pale);    color: #0369a1; }

/* ═══════════════════════════════════════════════════════
   PROGRESS
═══════════════════════════════════════════════════════ */
.progress {
  height: 7px;
  background: var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.progress-fill-cobalt,
.pf-cobalt { background: linear-gradient(90deg, var(--cobalt), var(--cobalt-lt)); }
.pf-green  { background: linear-gradient(90deg, var(--success), var(--success-lt)); }
.pf-orange { background: linear-gradient(90deg, #ea580c, var(--orange)); }
/* Tall variant for section headers */
.progress-lg { height: 10px; }

/* ═══════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); border: 1px solid var(--line); }
.qe-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.qe-table th {
  font-family: var(--font-d);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--line-lt);
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.qe-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-size: .89rem;
  color: var(--ink-2);
  vertical-align: middle;
}
.qe-table tr:last-child td { border-bottom: none; }
.qe-table tr:hover td { background: var(--line-lt); }
[dir=rtl] .qe-table th, [dir=rtl] .qe-table td { text-align: right; }

/* ═══════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
═══════════════════════════════════════════════════════ */
.section    { padding: 80px 0; }
.section-sm { padding: 52px 0; }
.section-alt  { background: var(--surface); }
.section-dark { background: var(--slate-900); }
.container    { max-width: var(--max-w);    margin: 0 auto; padding: 0 var(--space-6); }
.container-sm { max-width: var(--max-w-sm); margin: 0 auto; padding: 0 var(--space-6); }
.container-xs { max-width: var(--max-w-xs); margin: 0 auto; padding: 0 var(--space-6); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: .85rem;
}
.section-head p { font-size: .96rem; line-height: 1.78; color: var(--muted); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ═══════════════════════════════════════════════════════
   COURSE CARDS — upgraded
═══════════════════════════════════════════════════════ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.course-card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-3px);
  border-color: rgba(37,99,235,.2);
}
.course-card.hidden { display: none; }

/* Color accent strip */
.cc-band { height: 5px; flex-shrink: 0; }
.cc-band-blue   { background: linear-gradient(90deg, var(--cobalt), var(--teal)); }
.cc-band-orange { background: linear-gradient(90deg, var(--orange), #fbbf24); }
.cc-band-green  { background: linear-gradient(90deg, var(--success), var(--teal)); }
.cc-band-purple { background: linear-gradient(90deg, #7c3aed, var(--cobalt)); }

.cc-body { padding: 18px 18px 16px; flex: 1; display: flex; flex-direction: column; }
.cc-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 6px; flex-wrap: wrap; }
.cc-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-d);
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.cc-level {
  font-family: var(--font-d);
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 2px 7px;
}
.cc-title {
  font-family: var(--font-d);
  font-size: .96rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 7px;
  letter-spacing: -.01em;
}
.cc-desc {
  font-size: .82rem;
  line-height: 1.66;
  color: var(--muted);
  flex: 1;
  margin-bottom: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-stats {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.cc-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-d);
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
}
.cc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  gap: 8px;
}
.cc-free {
  font-family: var(--font-d);
  font-size: .7rem;
  font-weight: 700;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ═══════════════════════════════════════════════════════
   STAT / METRIC CARDS
═══════════════════════════════════════════════════════ */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--sh-xs);
  transition: box-shadow var(--t), transform var(--t);
}
.metric:hover { box-shadow: var(--sh-sm); transform: translateY(-1px); }
.metric-num {
  font-family: var(--font-d);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -.03em;
}
.metric-lbl { font-size: .78rem; color: var(--muted); font-family: var(--font-d); font-weight: 500; }

.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--sh-xs); }
.stat-card-num { font-family: var(--font-d); font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; margin-bottom: 4px; }
.stat-card-label { font-size: .8rem; color: var(--muted); }
.stat-card-icon { font-size: 1.5rem; margin-bottom: 10px; }

/* ═══════════════════════════════════════════════════════
   ADMIN SHELL
═══════════════════════════════════════════════════════ */
.admin-layout { display: flex; min-height: calc(100vh - var(--nav-h)); }
.admin-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--slate-900);
  padding: 20px 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.05);
}
.admin-main { flex: 1; min-width: 0; padding: 32px 40px 80px; }
.adm-lbl {
  font-family: var(--font-d);
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
  padding: 4px 18px;
  display: block;
  margin-top: 18px;
  margin-bottom: 3px;
}
.adm-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-family: var(--font-d);
  font-size: .83rem;
  font-weight: 600;
  color: rgba(255,255,255,.58);
  transition: background var(--t), color var(--t);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin: 1px 0;
}
.adm-link:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.adm-link.active { background: rgba(37,99,235,.22); color: var(--cobalt-lt); border-left-color: var(--cobalt); }
.adm-icon { font-size: .92rem; width: 18px; text-align: center; flex-shrink: 0; }
.page-title { font-family: var(--font-d); font-size: 1.6rem; font-weight: 800; color: var(--ink); margin-bottom: 4px; letter-spacing: -.02em; }
.page-sub   { font-size: .86rem; color: var(--muted); margin-bottom: 28px; }
.admin-section { margin-bottom: 36px; }

/* Admin mobile drawer */
.admin-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--slate-900);
  color: rgba(255,255,255,.8);
  border: none;
  padding: 12px 16px;
  font-family: var(--font-d);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
  border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════════════════════ */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-page  { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }

.auth-left {
  background: var(--slate-900);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(ellipse, rgba(37,99,235,.22) 0%, transparent 65%);
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -5%;
  width: 40%; height: 55%;
  background: radial-gradient(ellipse, rgba(14,165,233,.14) 0%, transparent 60%);
  pointer-events: none;
}
.auth-left-inner { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.auth-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-deep));
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
}
.auth-logo-icon svg { width: 22px; height: 22px; }
.auth-logo-text { font-family: var(--font-d); font-weight: 800; font-size: 1.1rem; color: #fff; }
.auth-headline {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -.025em;
}
.auth-headline em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cobalt-lt), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-bullets { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.auth-bullet { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: rgba(255,255,255,.7); }
.auth-bullet-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(37,99,235,.2);
  border: 1px solid rgba(37,99,235,.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .7rem;
  color: var(--cobalt-lt);
  font-weight: 700;
}
.auth-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  background: var(--off-white);
  overflow-y: auto;
}
.auth-right-inner { max-width: 420px; width: 100%; }
.auth-title { font-family: var(--font-d); font-size: 1.7rem; font-weight: 800; color: var(--ink); margin-bottom: .4rem; letter-spacing: -.025em; }
.auth-sub   { font-size: .87rem; color: var(--muted); margin-bottom: 24px; }
.auth-sub a { color: var(--cobalt); font-weight: 600; }
.auth-card  { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--sh); }
.auth-divider {
  text-align: center;
  font-size: .77rem;
  color: var(--muted);
  margin: 16px 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.auth-divider span { background: var(--surface); padding: 0 12px; position: relative; }
.auth-switch { text-align: center; margin-top: 18px; font-size: .84rem; color: var(--muted); }
.auth-switch a { color: var(--cobalt); font-weight: 600; }
.auth-team-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--off-white);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  font-family: var(--font-d);
  font-size: .87rem;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  width: 100%;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  text-decoration: none;
  min-height: 60px;
}
.auth-team-btn:hover {
  border-color: var(--cobalt);
  background: var(--cobalt-pale);
  color: var(--cobalt);
  box-shadow: var(--sh-sm);
}
.auth-team-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════════ */
.dash-hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
  color: #fff;
  padding: 44px 0 40px;
  position: relative;
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -5%;
  width: 50%; height: 160%;
  background: radial-gradient(ellipse, rgba(37,99,235,.15) 0%, transparent 70%);
  pointer-events: none;
}
.dash-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: .4rem; color: #fff; }
.dash-hero p  { color: rgba(255,255,255,.65); font-size: .95rem; }
.dash-body    { padding: 32px 0 80px; }

/* ═══════════════════════════════════════════════════════
   COURSE CARD (dashboard view with progress)
═══════════════════════════════════════════════════════ */
.course-card-body { padding: 20px 20px 16px; flex: 1; display: flex; flex-direction: column; }
.course-card-body h3 { font-family: var(--font-d); font-size: .96rem; font-weight: 800; margin: 8px 0 6px; color: var(--ink); letter-spacing: -.01em; }
.course-card-body p  { font-size: .82rem; color: var(--muted); line-height: 1.6; margin-bottom: 12px; flex: 1; }
.course-card-body .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ═══════════════════════════════════════════════════════
   LEARN PAGE
═══════════════════════════════════════════════════════ */
.learn-hero { background: var(--slate-900); color: #fff; padding: 48px 0; }
.learn-hero h1 { font-family: var(--font-d); font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; max-width: 850px; letter-spacing: -.025em; color: #fff; }
.learn-hero p   { color: rgba(255,255,255,.7); max-width: 780px; font-size: .96rem; margin-top: .6rem; }
.learn-body     { padding: 32px 0 80px; }
.learn-layout   { display: grid; grid-template-columns: 270px 1fr; gap: 24px; }

/* Sidebar lesson list */
.lesson-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  height: max-content;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
}
.lesson-list-head {
  font-family: var(--font-d);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 6px 8px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.lesson-link {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 10px;
  border-radius: 9px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: .84rem;
  transition: background var(--t), color var(--t);
  line-height: 1.4;
}
.lesson-link:hover { background: var(--off-white); }
.lesson-link.done  { color: var(--muted); }

/* Lesson cards */
.lesson-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 18px;
  transition: box-shadow var(--t);
}
.lesson-card:hover { box-shadow: var(--sh-sm); }
.lesson-card h2 { font-family: var(--font-d); font-size: 1.2rem; font-weight: 800; margin: 8px 0 14px; letter-spacing: -.015em; }
.lesson-content { color: var(--ink-2); line-height: 1.75; font-size: .94rem; }
.lesson-content p + p { margin-top: .75em; }
.resource-list { display: grid; gap: 10px; margin: 16px 0; }
.resource-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--off-white);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color var(--t);
}
.resource-item:hover { border-color: var(--cobalt); }
.complete-box {
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--success-pale);
  border: 1px solid #bbf7d0;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   HERO (landing page)
═══════════════════════════════════════════════════════ */
.hero {
  background: var(--slate-900);
  min-height: 82vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 55%; height: 80%;
  background: radial-gradient(ellipse, rgba(37,99,235,.22) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -5%;
  width: 40%; height: 55%;
  background: radial-gradient(ellipse, rgba(14,165,233,.13) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(37,99,235,.16);
  border: 1px solid rgba(37,99,235,.32);
  border-radius: var(--r-pill);
  padding: 4px 13px 4px 7px;
  margin-bottom: 22px;
}
.hero-kicker-dot {
  width: 7px; height: 7px;
  background: var(--cobalt-lt);
  border-radius: 50%;
  animation: pdot 2s ease-in-out infinite;
}
@keyframes pdot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .45; transform: scale(.75); }
}
.hero-kicker span { font-family: var(--font-d); font-size: .72rem; font-weight: 600; color: var(--cobalt-lt); }
.hero h1 {
  font-family: var(--font-d);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.06;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cobalt-lt), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-lead { font-size: .99rem; line-height: 1.78; color: rgba(255,255,255,.66); max-width: 500px; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.hero-proof-item {
  font-size: .76rem;
  color: rgba(255,255,255,.48);
  font-family: var(--font-d);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ═══════════════════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════════════════ */
.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
}
.filter-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  font-family: var(--font-d);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t);
  min-height: 36px;
}
.filter-pill:hover { border-color: var(--cobalt); color: var(--cobalt); background: var(--cobalt-pale); }
.filter-pill.active { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

/* Search bar */
.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-family: var(--font-b);
  background: var(--off-white);
  color: var(--ink);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  min-height: 40px;
}
.search-input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: var(--surface); }

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.qe-footer {
  background: var(--slate-950);
  color: rgba(255,255,255,.48);
  padding: 52px 0 24px;
}
.qe-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.qe-footer-brand { font-family: var(--font-d); font-size: .95rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.qe-footer-desc  { font-size: .8rem; line-height: 1.72; }
.qe-footer-col-head {
  font-family: var(--font-d);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  margin-bottom: 14px;
  display: block;
}
.qe-footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.qe-footer-col a { font-size: .81rem; color: rgba(255,255,255,.48); transition: color var(--t); }
.qe-footer-col a:hover { color: rgba(255,255,255,.9); }
.qe-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.qe-footer-bottom p { font-size: .76rem; }
.qe-footer-links    { display: flex; gap: 18px; }
.qe-footer-links a  { font-size: .76rem; color: rgba(255,255,255,.3); transition: color var(--t); }
.qe-footer-links a:hover { color: rgba(255,255,255,.8); }

/* ═══════════════════════════════════════════════════════
   TEAM PASS PAGE
═══════════════════════════════════════════════════════ */
.tp-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.tp-left { background: linear-gradient(145deg, var(--slate-900), var(--slate-800)); display: flex; flex-direction: column; justify-content: center; padding: 64px 56px; }
.tp-card { background: var(--surface); border-radius: var(--r-xl); padding: 40px; box-shadow: var(--sh-xl); }

/* ═══════════════════════════════════════════════════════
   CERTIFICATE PAGE
═══════════════════════════════════════════════════════ */
.cert-wrapper {
  background: var(--off-white);
  padding: 40px 0 80px;
}
.cert-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cert-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 48px;
  box-shadow: var(--sh-lg);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  border: 1px solid var(--line);
}

/* ═══════════════════════════════════════════════════════
   MOBILE NAV DRAWER
═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  :root {
    --nav-h: 60px;
    --sidebar-w: 0;
  }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(10,15,30,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 18px 20px;
    gap: 4px;
    z-index: 299;
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 32px rgba(0,0,0,.4);
  }
  .nav-links.open a,
  .nav-links.open button {
    width: 100%;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: .9rem;
  }
  .nav-links.open .nav-sep { display: none; }
  .nav-links.open .nav-pill { margin-top: 4px; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-brand small { display: none; } /* save space */

  /* Sections */
  .section    { padding: 52px 0; }
  .section-sm { padding: 36px 0; }
  .container, .container-sm, .container-xs { padding: 0 16px; }

  /* Grids collapse */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-grid { grid-template-columns: 1fr; }

  /* Auth */
  .auth-split, .auth-page, .tp-page {
    grid-template-columns: 1fr;
  }
  .auth-left, .tp-left { display: none; }
  .auth-right { padding: 32px 20px; min-height: 100vh; justify-content: flex-start; padding-top: 48px; }
  .auth-right-inner { max-width: 100%; }
  .tp-card { padding: 28px 20px; }

  /* Learn */
  .learn-layout { grid-template-columns: 1fr; }
  .lesson-list  { position: static; max-height: none; }
  .learn-hero   { padding: 32px 0; }
  .lesson-card  { padding: 20px 18px; }

  /* Admin */
  .admin-sidebar { display: none; }
  .admin-sidebar.open {
    display: block;
    position: fixed;
    top: var(--nav-h);
    left: 0; bottom: 0;
    z-index: 200;
    width: min(280px, 80vw);
    box-shadow: var(--sh-xl);
  }
  .admin-main  { padding: 18px 16px 60px; }
  .admin-menu-toggle { display: flex; }

  /* Hero */
  .hero { min-height: auto; padding: 48px 0 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  /* Dash hero */
  .dash-hero { padding: 32px 0 28px; }

  /* Footer */
  .qe-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .qe-footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Cert */
  .cert-card { padding: 28px 20px; }
  .cert-actions { flex-direction: column; }

  /* Touch targets everywhere */
  .btn { min-height: 48px; }
  .form-control { min-height: 48px; font-size: 16px; } /* prevents iOS zoom */
  .filter-pill  { min-height: 40px; }

  /* Tables */
  .table-wrap { border-radius: var(--r-sm); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .qe-footer-grid  { grid-template-columns: 1fr 1fr; }
  .hero-inner      { grid-template-columns: 1fr 320px; gap: 36px; }
  .learn-layout    { grid-template-columns: 240px 1fr; }
  .admin-sidebar   { width: 200px; }
  .admin-main      { padding: 24px 24px 60px; }
  .auth-left       { padding: 48px 40px; }
  .auth-right      { padding: 48px 40px; }
}

/* ═══════════════════════════════════════════════════════
   MISC / UTILS
═══════════════════════════════════════════════════════ */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.gap-2      { gap: 8px; }
.gap-3      { gap: 12px; }
.gap-4      { gap: 16px; }
.mt-auto    { margin-top: auto; }
.sr-only    { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Scroll overlay on admin sidebar for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.sidebar-overlay.open { display: block; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }
}

/* Print */
@media print {
  .qe-nav, .qe-footer, .admin-sidebar, .print-actions, .lesson-list, .filter-bar { display: none !important; }
  body { background: #fff !important; padding-top: 0 !important; }
  .admin-main { padding: 0 !important; }
  .cert-card { box-shadow: none !important; border: 2px solid #000 !important; }
}
/* =========================================================
   QuadraEdge.LMS — Mobile header/menu production fix
   ========================================================= */

.qe-nav {
  width: 100%;
  max-width: 100vw;
  background: rgba(10, 15, 30, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.qe-nav .inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 76px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 18px;
}

.qe-nav .nav-logo {
  flex: 0 1 auto;
  min-width: 0;
}

.qe-nav .nav-logo img {
  height: 72px !important;
  max-width: 220px !important;
  width: auto;
  object-fit: contain;
}

.qe-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.qe-nav .nav-toggle {
  display: none;
}

/* =========================================================================
 * NAVIGATION — mobile-first
 * Replaces the old .open / .is-open inline cascades with one canonical state.
 * ========================================================================= */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .qe-nav .inner {
    padding: 0 14px;
    min-height: 62px;
    justify-content: space-between;
  }

  .qe-nav .nav-logo img {
    height: 44px;
    max-width: 170px;
  }

  .qe-nav .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-inline-start: auto;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .10);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .qe-nav .nav-toggle:hover { background: rgba(255, 255, 255, .18); }

  .qe-nav .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    max-width: calc(100vw - 24px);
    margin: 0;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #0a0f1e;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    z-index: 1001;
  }
  .qe-nav .nav-links.is-open { display: flex; }

  .qe-nav .nav-links a,
  .qe-nav .nav-links button {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    justify-content: flex-start;
    text-align: start;
    padding: 10px 14px;
  }
  .qe-nav .nav-sep {
    width: 100%;
    height: 1px;
    margin: 6px 0;
    background: rgba(255, 255, 255, .12);
  }
}

@media (max-width: 420px) {
  .qe-nav .nav-logo img { height: 40px; max-width: 150px; }
}


/* =========================================================================
 * ACCESSIBILITY & UX LAYER
 * (formerly qe-a11y.css; merged so a single CSS request serves the page)
 * ========================================================================= */

:root {
  --focus-ring:        #1d4ed8;   /* cobalt-deep — 3:1+ against white & off-white */
  --focus-ring-light:  #ffffff;   /* for dark navs / heroes */
  --status-done-bg:    #dcfce7;
  --status-done-ink:   #14532d;   /* ~10:1 on the bg above */
  --status-prog-bg:    #fef9c3;
  --status-prog-ink:   #854d0e;   /* ~8:1 */
  --status-todo-bg:    #eef2f7;
  --status-todo-ink:   #334155;   /* ~9:1 */
}

/* ═══════════════════════════════════════════════════════
   1 · KEYBOARD FOCUS  (the unplug-the-mouse test)
   :focus-visible only fires for keyboard / programmatic focus, so mouse
   users never see a ring, but keyboard & screen-reader users always do.
   These selectors are 1-class+1-pseudo (0,2,0) and therefore override the
   (0,1,0) `outline:none` declarations already in qe-v3.css with no !important.
═══════════════════════════════════════════════════════ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.nav-links a:focus-visible,
.nav-pill:focus-visible,
.nav-lang:focus-visible,
.nav-toggle:focus-visible,
.filter-pill:focus-visible,
.search-input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs, 6px);
}

/* On dark surfaces a cobalt ring disappears — switch to a white ring. */
.qe-nav :focus-visible,
.on-dark :focus-visible,
.hero :focus-visible,
.learn-hero :focus-visible,
.dash-hero :focus-visible,
.section-dark :focus-visible,
.auth-left :focus-visible,
.qe-footer :focus-visible {
  outline-color: var(--focus-ring-light);
}

/* Inputs already carry a soft inner glow on :focus; keep it and add the
   sharp outer ring only for keyboard focus so the field stays obvious. */
.form-control:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

/* ═══════════════════════════════════════════════════════
   2 · SKIP LINK
═══════════════════════════════════════════════════════ */
.qe-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-160%);
  background: var(--cobalt);
  color: #fff;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .9rem;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  transition: transform 160ms cubic-bezier(.25, .8, .25, 1);
  text-decoration: none;
}
.qe-skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #fff;
  outline-offset: 2px;
}
[dir="rtl"] .qe-skip-link { left: auto; right: 8px; }

/* A focus target landed on by the skip link should not draw its own box. */
:target,
[tabindex="-1"]:focus { outline: none; }

/* ═══════════════════════════════════════════════════════
   3 · STATUS PILLS — colour + icon + TEXT (colour-blind safe)
   Use anywhere a "where am I" signal is needed: dashboards, course maps,
   lesson lists. The label text is mandatory; colour is reinforcement only.
═══════════════════════════════════════════════════════ */
.qe-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-d);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  line-height: 1.4;
  white-space: nowrap;
}
.qe-status::before {
  font-size: .8em;
  font-weight: 900;
  line-height: 1;
}
.qe-status--done   { background: var(--status-done-bg); color: var(--status-done-ink); }
.qe-status--done::before   { content: "\2713"; }              /* ✓ */
.qe-status--prog   { background: var(--status-prog-bg); color: var(--status-prog-ink); }
.qe-status--prog::before   { content: "\25D0"; }              /* ◐ half-filled */
.qe-status--todo   { background: var(--status-todo-bg); color: var(--status-todo-ink); }
.qe-status--todo::before   { content: "\25CB"; }              /* ○ */
.qe-status--locked { background: var(--status-todo-bg); color: var(--status-todo-ink); }
.qe-status--locked::before { content: "\1F512"; }            /* 🔒 */

/* High-contrast border so the pill survives forced-colours / greyscale. */
@media (forced-colors: active) {
  .qe-status { border: 1px solid currentColor; }
}

/* ═══════════════════════════════════════════════════════
   4 · PROGRESS BAR — works with role="progressbar"
   Keeps the qe-v3 look but makes the fill readable and adds a colour-blind
   safe striped texture option for the "in progress" state.
═══════════════════════════════════════════════════════ */
.progress[role="progressbar"] { position: relative; }
.progress-fill-prog {
  background: var(--warn, #d97706);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, .25) 0,
    rgba(255, 255, 255, .25) 6px,
    transparent 6px,
    transparent 12px
  );
}
.progress-fill-done { background: var(--success, #16a34a); }

/* ═══════════════════════════════════════════════════════
   5 · ACCESSIBLE QUIZ OPTION CARDS
   The whole row is the click/tap target (≥44px). Selected state is shown by
   a filled control + border + tint + a check glyph — four redundant signals,
   not colour alone. Native radio/checkbox stays in the DOM for AT + keyboard.
═══════════════════════════════════════════════════════ */
.qe-question {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  margin: 0 0 16px;
  box-shadow: var(--sh-xs);
}
.qe-question > legend,
.qe-question .qe-q-text {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 14px;
  padding: 0;
}
.qe-q-num {
  display: inline-block;
  min-width: 1.6em;
  color: var(--cobalt);
  font-weight: 800;
}
.qe-options { display: grid; gap: 10px; }
.qe-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.qe-option:hover { border-color: var(--cobalt-lt); background: var(--cobalt-pale); }
.qe-option input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--cobalt); flex-shrink: 0; }
.qe-option-text { color: var(--ink-2); line-height: 1.5; }
/* Selected card: the :has() selector lights the whole card on modern browsers;
   the input's own accent-color covers everywhere else. */
.qe-option:has(input:checked) {
  border-color: var(--cobalt);
  background: var(--cobalt-pale);
  box-shadow: inset 0 0 0 1px var(--cobalt);
}
.qe-option:has(input:focus-visible) {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Live "answered N of M" helper bar */
.qe-quiz-progress {
  position: sticky;
  top: calc(var(--nav-h) + 8px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 18px;
  box-shadow: var(--sh-sm);
}
.qe-quiz-progress .progress { flex: 1; height: 8px; }
.qe-quiz-count { font-family: var(--font-d); font-weight: 700; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }

/* ═══════════════════════════════════════════════════════
   6 · ASSESSMENT REVIEW — explicit [Correct] / [Incorrect]
   Verdict is a TEXT label first; the colour and the left bar are extra.
   Incorrect uses a dashed bar so it differs from Correct in greyscale too.
═══════════════════════════════════════════════════════ */
.qe-review-item {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 18px 18px 22px;
  margin-bottom: 14px;
  background: var(--surface);
  border-left: 6px solid var(--muted-lt);
}
.qe-review-item.is-correct   { border-left: 6px solid var(--success); border-left-style: solid; }
.qe-review-item.is-incorrect { border-left: 6px dashed var(--danger); }
.qe-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: .76rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}
.qe-verdict--correct   { background: var(--status-done-bg); color: var(--status-done-ink); }
.qe-verdict--correct::before   { content: "\2713 "; }
.qe-verdict--incorrect { background: var(--danger-pale); color: #991b1b; }
.qe-verdict--incorrect::before { content: "\2717 "; }
.qe-review-q { font-family: var(--font-d); font-weight: 700; color: var(--ink); margin: 4px 0 12px; line-height: 1.45; }
.qe-answer-row { display: flex; gap: 8px; font-size: .9rem; margin: 4px 0; color: var(--ink-2); }
.qe-answer-row .lbl { color: var(--muted); min-width: 122px; font-weight: 600; }
.qe-answer-row .val { font-weight: 600; }
.qe-answer-row .val.correct { color: var(--status-done-ink); }
.qe-answer-row .val.wrong   { color: #991b1b; text-decoration: line-through; text-decoration-color: rgba(153,27,27,.5); }
.qe-explain {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--off-white);
  border-radius: var(--r-sm);
  font-size: .9rem;
  color: var(--ink-3);
  line-height: 1.6;
}
.qe-explain b { color: var(--ink); }

.qe-score-hero {
  text-align: center;
  padding: 30px 24px;
  border-radius: var(--r-lg);
  margin-bottom: 22px;
  border: 1px solid var(--line);
}
.qe-score-hero.passed     { background: var(--status-done-bg); border-color: #86efac; }
.qe-score-hero.not-passed { background: var(--danger-pale); border-color: #fecaca; }
.qe-score-num { font-family: var(--font-d); font-size: 3rem; font-weight: 800; line-height: 1; color: var(--ink); }
.qe-score-verdict { font-family: var(--font-d); font-weight: 800; font-size: 1.05rem; margin-top: 8px; }
.qe-score-hero.passed .qe-score-verdict     { color: var(--status-done-ink); }
.qe-score-hero.not-passed .qe-score-verdict { color: #991b1b; }

/* ═══════════════════════════════════════════════════════
   7 · COURSE MAP (learn.php) — vertical progress tree
═══════════════════════════════════════════════════════ */
.qe-coursemap { display: flex; flex-direction: column; gap: 2px; }
.qe-coursemap a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.35;
  transition: background var(--t);
}
.qe-coursemap a:hover { background: var(--off-white); }
.qe-coursemap a[aria-current="true"] {
  background: var(--cobalt-pale);
  color: var(--cobalt-deep);
  box-shadow: inset 3px 0 0 var(--cobalt);
}
.qe-map-dot {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 900;
  border: 1.5px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}
.qe-map-dot.done { background: var(--success); border-color: var(--success); color: #fff; }
.qe-map-dot.done::before { content: "\2713"; }
.qe-map-dot.todo::before { content: ""; }
.qe-map-num { font-size: .72rem; }

/* Focus mode: collapse the map for distraction-free reading */
.learn-layout.focus-mode { grid-template-columns: 1fr; }
.learn-layout.focus-mode .lesson-list { display: none; }
.qe-focus-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.qe-focus-toggle:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* ═══════════════════════════════════════════════════════
   8 · RESUME CARD (dashboard) — single-click continue
═══════════════════════════════════════════════════════ */
.qe-resume {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(120deg, var(--slate-900), var(--slate-800));
  color: #fff;
  border-radius: var(--r-lg);
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: var(--sh);
  flex-wrap: wrap;
}
.qe-resume-body { flex: 1 1 280px; min-width: 0; }
.qe-resume-eyebrow {
  font-family: var(--font-d);
  font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal);
}
.qe-resume h2 { color: #fff; font-size: 1.35rem; margin: 4px 0 6px; }
.qe-resume p { color: rgba(255, 255, 255, .72); font-size: .9rem; margin: 0; }
.qe-resume .progress { margin-top: 12px; max-width: 360px; background: rgba(255, 255, 255, .16); }

/* ═══════════════════════════════════════════════════════
   9 · CARD MICRO-INTERACTIONS  (alive, but subtle)
═══════════════════════════════════════════════════════ */
.course-card { transition: transform var(--t), box-shadow var(--t); }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.course-card:focus-within { box-shadow: var(--sh), 0 0 0 3px rgba(37, 99, 235, .18); }

/* Make completed mark-as-done buttons read as a finished state, with a tick. */
.btn-muted.is-done::before { content: "\2713 "; font-weight: 900; }

/* ═══════════════════════════════════════════════════════
   10 · USER PREFERENCES — motion & contrast
═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .course-card:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --line: #94a3b8; --muted: #475569; }
  .btn-outline { border-width: 2px; }
  .qe-status, .badge { border: 1px solid currentColor; }
  .form-control { border-width: 2px; }
  a:not(.btn) { text-decoration: underline; }
}

/* Honour the OS "increase contrast" on Windows high-contrast mode too. */
@media (forced-colors: active) {
  .btn { border: 1px solid currentColor; }
  .progress-fill { forced-color-adjust: none; }
}

/* =========================================================================
 * HOME PAGE — sections built fresh for the new index.php
 *
 * The hero is type-led, no mock-dashboard right rail. Bilingual eyebrow is
 * permanent (the dual-script tagline is a design signature, not a translation
 * footnote). Cobalt is used for emphasis; gradient text is intentionally
 * avoided. Mobile-first.
 * ========================================================================= */

/* The bilingual eyebrow — EN + AR shown together, separated by a hair rule.
   This is the design signature for the home page. */
.qe-bi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font-family: var(--font-d);
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  letter-spacing: .06em;
}
.qe-bi-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .18);
}
.qe-bi-eyebrow .qe-bi-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, .22);
  margin: 0 4px;
}
.qe-bi-eyebrow .qe-bi-ar {
  font-family: var(--font-ar);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 0;
}

/* ── HOME HERO ── */
.qe-home-hero {
  position: relative;
  background: var(--slate-900);
  color: #fff;
  padding: 96px 0 80px;
  overflow: hidden;
  isolation: isolate;
}
/* Two ambient washes, no busy patterns */
.qe-home-hero::before,
.qe-home-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.qe-home-hero::before {
  top: -25%;
  inset-inline-start: -10%;
  width: 60%;
  height: 90%;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, .26) 0%, transparent 65%);
}
.qe-home-hero::after {
  bottom: -15%;
  inset-inline-end: -6%;
  width: 50%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(14, 165, 233, .14) 0%, transparent 60%);
}

.qe-home-hero-inner {
  position: relative;
  display: grid;
  gap: 24px;
  max-width: 900px;
}
.qe-home-hero h1 {
  font-family: var(--font-d);
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.025em;
  color: #fff;
  margin: 4px 0 0;
}
/* The accent word: a clean cobalt swap. No gradient. */
.qe-home-hero h1 .qe-accent {
  color: var(--cobalt-lt);
}
/* RTL: the heading flips, but we keep the accent treatment */
body.lang-ar .qe-home-hero h1 { font-family: var(--font-ar); letter-spacing: 0; }

.qe-home-hero-sub {
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .72);
  max-width: 620px;
  margin: 0;
}
body.lang-ar .qe-home-hero-sub { font-family: var(--font-ar); }

.qe-home-hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Promise row — tied to actual differentiators, not generic SaaS bullets */
.qe-home-promise {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .10);
}
.qe-home-promise-item { min-width: 0; }
.qe-home-promise-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  margin-bottom: 10px;
}
.qe-home-promise-h {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .92rem;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -.005em;
}
.qe-home-promise-p {
  font-size: .82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .55);
  margin: 0;
}

/* ── ACCESS PATHS ── three clear ways in, each gets its own card */
.qe-access-section { padding: 64px 0; background: var(--off-white); }
.qe-access-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.qe-access-head h2 {
  font-family: var(--font-d);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 8px 0 10px;
}
.qe-access-head p { color: var(--muted); margin: 0; }

.qe-access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.qe-access-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.qe-access-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh);
  border-color: transparent;
}
.qe-access-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-d);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}
.qe-access-card-tag.free  { background: var(--success-pale); color: #166534; }
.qe-access-card-tag.vip   { background: var(--cobalt-pale); color: var(--cobalt-deep); }
.qe-access-card-tag.team  { background: var(--orange-pale); color: #9a3412; }
.qe-access-card h3 {
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.012em;
  margin: 0;
  color: var(--ink);
}
.qe-access-card p {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.qe-access-card .btn { margin-top: auto; align-self: flex-start; }

/* ── PILLARS ── why this LMS, tied to the NGO/SME story */
.qe-pillars-section {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.qe-pillars-head { max-width: 820px; margin: 0 0 48px; }
.qe-pillars-head h2 {
  font-family: var(--font-d);
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 8px 0 12px;
  color: var(--ink);
  max-width: 600px;
}
.qe-pillars-head p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0; max-width: 580px; }

.qe-pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.qe-pillar {
  padding-inline-start: 18px;
  border-inline-start: 3px solid var(--cobalt);
}
.qe-pillar-num {
  font-family: var(--font-d);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--cobalt);
  display: block;
  margin-bottom: 10px;
}
.qe-pillar h3 {
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.012em;
  color: var(--ink);
  margin: 0 0 8px;
}
.qe-pillar p {
  font-size: .94rem;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0;
}

/* ── COURSE PREVIEW STRIP ── real data when available */
.qe-courses-preview { padding: 80px 0; background: var(--off-white); }
.qe-courses-preview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.qe-courses-preview-head h2 {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.022em;
  margin: 6px 0 6px;
}
.qe-courses-preview-head p { color: var(--muted); margin: 0; }

/* ── TRUST BAR — keep but refine ── */
.qe-trust {
  padding: 36px 0 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.qe-trust-label {
  font-family: var(--font-d);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 18px;
}
.qe-trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.qe-trust-logos img {
  max-height: 28px;
  width: auto;
  filter: grayscale(100%) contrast(.85);
  opacity: .6;
  transition: opacity var(--t), filter var(--t);
}
.qe-trust-logos img:hover { opacity: 1; filter: none; }

/* ── FINAL CTA BAND ── confident, single-purpose */
.qe-cta-band {
  padding: 72px 0;
  background: var(--slate-900);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.qe-cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, .22), transparent 70%);
  pointer-events: none;
}
.qe-cta-band > .container { position: relative; }
.qe-cta-band h2 {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.022em;
  color: #fff;
  margin: 0 0 14px;
}
.qe-cta-band p {
  color: rgba(255, 255, 255, .7);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 24px;
}
.qe-cta-band .qe-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── HOME RESPONSIVE ── mobile-first refinements */
@media (max-width: 900px) {
  .qe-home-hero { padding: 64px 0 56px; }
  .qe-home-promise {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-top: 28px;
    padding-top: 24px;
  }
  .qe-access-grid { grid-template-columns: 1fr; }
  .qe-pillars-grid { grid-template-columns: 1fr; gap: 22px; }
  .qe-pillars-section { padding: 56px 0; }
  .qe-courses-preview { padding: 56px 0; }
  .qe-cta-band { padding: 52px 0; }
}

@media (max-width: 480px) {
  .qe-home-hero { padding: 48px 0 44px; }
  .qe-home-promise { grid-template-columns: 1fr; gap: 16px; }
  .qe-bi-eyebrow { font-size: .68rem; padding: 6px 12px 6px 6px; }
  .qe-bi-eyebrow .qe-bi-ar { font-size: .72rem; }
  .qe-home-hero-cta .btn { width: 100%; }
}

/* ========================================================================= 
 * COURSES CATALOG — refined for the rewritten courses.php
 * ========================================================================= */
.qe-catalog-hero {
  background: var(--slate-900);
  color: #fff;
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.qe-catalog-hero::before {
  content: "";
  position: absolute;
  top: -30%; inset-inline-start: -10%;
  width: 50%; height: 80%;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, .22), transparent 65%);
  pointer-events: none;
}
.qe-catalog-hero > .container { position: relative; }
.qe-catalog-hero h1 {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.025em;
  color: #fff;
  margin: 8px 0 8px;
}
.qe-catalog-hero p {
  color: rgba(255, 255, 255, .72);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 600px;
  margin: 0;
}

.qe-catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0;
  position: sticky;
  top: calc(var(--nav-h) + 0px);
  z-index: 5;
  background: rgba(246, 248, 251, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}
.qe-catalog-toolbar .qe-catalog-count {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
}
.qe-catalog-toolbar .qe-catalog-count em { color: var(--cobalt); font-style: normal; }
.qe-catalog-toolbar .qe-catalog-search {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  margin-inline-start: auto;
}
.qe-catalog-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qe-filter-chip {
  font-family: var(--font-d);
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--t);
  min-height: 36px;
}
.qe-filter-chip:hover { border-color: var(--cobalt); color: var(--cobalt); }
.qe-filter-chip[aria-pressed="true"] {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

.qe-catalog-body { padding: 0 0 80px; }
.qe-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

/* Catalog course card — distinct from the dashboard course-card,
   tuned to communicate AT-A-GLANCE: level + duration + free/paid + title. */
.qe-cc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
}
.qe-cc:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.qe-cc-band {
  height: 6px;
  background: linear-gradient(90deg, var(--cobalt), var(--teal));
}
.qe-cc.is-free .qe-cc-band {
  background: linear-gradient(90deg, var(--success), #4ade80);
}
.qe-cc-body { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.qe-cc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qe-cc-tag {
  font-family: var(--font-d);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cobalt-pale);
  color: var(--cobalt-deep);
}
.qe-cc.is-free .qe-cc-tag { background: var(--success-pale); color: #166534; }
.qe-cc-meta {
  font-size: .76rem;
  color: var(--muted);
  font-family: var(--font-d);
  font-weight: 600;
}
.qe-cc h3 {
  font-family: var(--font-d);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.012em;
  color: var(--ink);
  margin: 0;
  line-height: 1.35;
}
.qe-cc p {
  font-size: .9rem;
  color: var(--ink-3);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qe-cc-foot { margin-top: auto; padding-top: 4px; }

/* Empty / no-results state for the catalog */
.qe-catalog-empty {
  text-align: center;
  padding: 60px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
}
.qe-catalog-empty strong {
  display: block;
  font-family: var(--font-d);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 6px;
}

@media (max-width: 600px) {
  .qe-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .qe-catalog-toolbar .qe-catalog-search { max-width: none; margin-inline-start: 0; }
  .qe-catalog-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .qe-filter-chip { flex-shrink: 0; }
}

/* ========================================================================= 
 * RTL fine-tuning for new sections
 * ========================================================================= */
[dir="rtl"] .qe-pillar { border-inline-start: 3px solid var(--cobalt); padding-inline-start: 18px; }
[dir="rtl"] .qe-catalog-toolbar .qe-catalog-search { margin-inline-start: auto; }
